BREAKING CHANGE(cli): remove legacy container test runner and make the default command show the man page

This commit is contained in:
2026-03-12 10:50:34 +00:00
parent 8f0514d10e
commit 0f445b4c86
14 changed files with 239 additions and 445 deletions

View File

@@ -1,34 +1,10 @@
import * as plugins from './tsdocker.plugins.js';
import * as paths from './tsdocker.paths.js';
import * as fs from 'fs';
import type { ITsDockerConfig } from './interfaces/index.js';
// Re-export ITsDockerConfig as IConfig for backward compatibility
export type IConfig = ITsDockerConfig & {
exitCode?: number;
};
const getQenvKeyValueObject = async () => {
let qenvKeyValueObjectArray: { [key: string]: string | number };
if (fs.existsSync(plugins.path.join(paths.cwd, 'qenv.yml'))) {
qenvKeyValueObjectArray = new plugins.qenv.Qenv(paths.cwd, '.nogit/').keyValueObject;
} else {
qenvKeyValueObjectArray = {};
}
return qenvKeyValueObjectArray;
};
const buildConfig = async (qenvKeyValueObjectArg: { [key: string]: string | number }) => {
const buildConfig = async (): Promise<ITsDockerConfig> => {
const npmextra = new plugins.npmextra.Npmextra(paths.cwd);
const config = npmextra.dataFor<IConfig>('@git.zone/tsdocker', {
// Legacy options (backward compatible)
baseImage: 'hosttoday/ht-docker-node:npmdocker',
init: 'rm -rf node_nodules/ && yarn install',
command: 'npmci npm test',
dockerSock: false,
keyValueObject: qenvKeyValueObjectArg,
// New Docker build options
const config = npmextra.dataFor<ITsDockerConfig>('@git.zone/tsdocker', {
registries: [],
registryRepoMap: {},
buildArgEnvMap: {},
@@ -39,7 +15,6 @@ const buildConfig = async (qenvKeyValueObjectArg: { [key: string]: string | numb
return config;
};
export let run = async (): Promise<IConfig> => {
const config = await getQenvKeyValueObject().then(buildConfig);
return config;
export let run = async (): Promise<ITsDockerConfig> => {
return buildConfig();
};