feat(packaging): Rename package scope to @git.zone and migrate to ESM; rename CLI/config keys, update entrypoints and imports, bump Node requirement to 18, and adjust scripts/dependencies

This commit is contained in:
2026-01-19 22:08:59 +00:00
parent e0cbc9cfec
commit 6995010a2c
15 changed files with 450 additions and 122 deletions

View File

@@ -1,4 +1,4 @@
import * as plugins from './tsdocker.plugins';
import * as plugins from './tsdocker.plugins.js';
export interface IDockerfileSnippet {
baseImage: string;
@@ -14,23 +14,20 @@ let getMountSolutionString = (optionsArg: IDockerfileSnippet) => {
};
let getGlobalPreparationString = (optionsArg: IDockerfileSnippet) => {
if (optionsArg.baseImage !== 'hosttoday/ht-docker-node:npmdocker') {
return 'RUN npm install -g npmdocker';
} else {
return '# not installing npmdocker since it is included in the base image';
}
// Always install tsdocker to ensure the latest version is available
return 'RUN npm install -g @git.zone/tsdocker';
};
export let dockerfileSnippet = (optionsArg: IDockerfileSnippet): string => {
return plugins.smartstring.indent.normalize(
`
FROM ${optionsArg.baseImage}
# For info about what npmdocker does read the docs at https://gitzone.github.io/npmdocker
# For info about what tsdocker does read the docs at https://gitzone.github.io/tsdocker
${getGlobalPreparationString(optionsArg)}
${getMountSolutionString(optionsArg)}
WORKDIR /workspace
ENV CI=true
ENTRYPOINT ["npmdocker"]
ENTRYPOINT ["tsdocker"]
CMD ["runinside"]
`
);