Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e0cbc9cfec | |||
| c538e6b10b |
66
.gitea/workflows/default_nottags.yaml
Normal file
66
.gitea/workflows/default_nottags.yaml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
name: Default (not tags)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags-ignore:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE: code.foss.global/host.today/ht-docker-node:npmci
|
||||||
|
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@/${{gitea.repository}}.git
|
||||||
|
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||||
|
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||||
|
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||||
|
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
security:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install pnpm and npmci
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @ship.zone/npmci
|
||||||
|
|
||||||
|
- name: Run npm prepare
|
||||||
|
run: npmci npm prepare
|
||||||
|
|
||||||
|
- name: Audit production dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --prod
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Audit development dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --dev
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
test:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs: security
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Test stable
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm test
|
||||||
|
|
||||||
|
- name: Test build
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm build
|
||||||
124
.gitea/workflows/default_tags.yaml
Normal file
124
.gitea/workflows/default_tags.yaml
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
name: Default (tags)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE: code.foss.global/host.today/ht-docker-node:npmci
|
||||||
|
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@/${{gitea.repository}}.git
|
||||||
|
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||||
|
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||||
|
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||||
|
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
security:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @ship.zone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Audit production dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --prod
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Audit development dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --dev
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
test:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs: security
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @ship.zone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Test stable
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm test
|
||||||
|
|
||||||
|
- name: Test build
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm build
|
||||||
|
|
||||||
|
release:
|
||||||
|
needs: test
|
||||||
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @ship.zone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm publish
|
||||||
|
|
||||||
|
metadata:
|
||||||
|
needs: test
|
||||||
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @ship.zone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Code quality
|
||||||
|
run: |
|
||||||
|
npmci command npm install -g typescript
|
||||||
|
npmci npm install
|
||||||
|
|
||||||
|
- name: Trigger
|
||||||
|
run: npmci trigger
|
||||||
|
|
||||||
|
- name: Build docs and upload artifacts
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
pnpm install -g @git.zone/tsdoc
|
||||||
|
npmci command tsdoc
|
||||||
|
continue-on-error: true
|
||||||
11
.gitignore
vendored
11
.gitignore
vendored
@@ -3,7 +3,6 @@
|
|||||||
# artifacts
|
# artifacts
|
||||||
coverage/
|
coverage/
|
||||||
public/
|
public/
|
||||||
pages/
|
|
||||||
|
|
||||||
# installs
|
# installs
|
||||||
node_modules/
|
node_modules/
|
||||||
@@ -15,9 +14,11 @@ node_modules/
|
|||||||
|
|
||||||
# builds
|
# builds
|
||||||
dist/
|
dist/
|
||||||
dist_web/
|
dist_*/
|
||||||
dist_serve/
|
|
||||||
dist_ts_web/
|
|
||||||
|
|
||||||
# custom
|
# AI
|
||||||
|
.claude/
|
||||||
|
.serena/
|
||||||
|
|
||||||
|
#------# custom
|
||||||
test
|
test
|
||||||
|
|||||||
11
.vscode/launch.json
vendored
Normal file
11
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"command": "npm test",
|
||||||
|
"name": "Run npm test",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "node-terminal"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
25
.vscode/settings.json
vendored
25
.vscode/settings.json
vendored
@@ -1,3 +1,26 @@
|
|||||||
{
|
{
|
||||||
"typescript.tsdk": "node_modules/typescript/lib"
|
"json.schemas": [
|
||||||
|
{
|
||||||
|
"fileMatch": ["/npmextra.json"],
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"npmci": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "settings for npmci"
|
||||||
|
},
|
||||||
|
"gitzone": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "settings for gitzone",
|
||||||
|
"properties": {
|
||||||
|
"projectType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["website", "element", "service", "npm", "wcc"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
FROM hosttoday/ht-docker-node:npmci
|
FROM hosttoday/ht-docker-node:npmci
|
||||||
RUN yarn global add @gitzone/tsdocker
|
RUN yarn global add @git.zone/tsdocker
|
||||||
COPY ./ /workspace
|
COPY ./ /workspace
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
ENV CI=true
|
ENV CI=true
|
||||||
|
|||||||
75
changelog.md
75
changelog.md
@@ -1,15 +1,30 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-12-13 - 1.2.43 - fix(packaging)
|
||||||
|
Rename package scope to @git.zone and migrate deps/CI; pin pnpm and enable ESM packaging
|
||||||
|
|
||||||
|
- Rename npm package scope from @gitzone/tsdocker to @git.zone/tsdocker (package.json, commitinfo, README, npmextra)
|
||||||
|
- Migrate devDependencies from @gitzone/* to @git.zone/* and ensure runtime packages use @push.rocks/* where applicable
|
||||||
|
- Replace smartfile usage with smartfs and update code to use async smartfs.file(...).write()/delete() patterns
|
||||||
|
- Add packageManager pin for pnpm, set type: "module", add files array and pnpm.overrides in package.json
|
||||||
|
- Add tsconfig.json with NodeNext/ES2022 settings and other ESM-related adjustments
|
||||||
|
- Add Gitea CI workflows (.gitea/workflows/default_tags.yaml and default_nottags.yaml) for test, audit and release flows
|
||||||
|
- Update assets Dockerfile to reference @git.zone/tsdocker and other packaging/CI related scripts
|
||||||
|
- Update .gitignore to consolidate dist patterns and add AI/tooling excludes (.claude/, .serena/)
|
||||||
|
- Update README, readme.hints.md and changelog to document the scope rename, dependency migrations and SmartFS migration
|
||||||
|
|
||||||
## 2025-11-22 - 1.2.42 - fix(package.json)
|
## 2025-11-22 - 1.2.42 - fix(package.json)
|
||||||
|
|
||||||
Add packageManager field to package.json to pin pnpm version
|
Add packageManager field to package.json to pin pnpm version
|
||||||
|
|
||||||
- Add packageManager: "pnpm@10.18.1+sha512.77a884a165cbba2d8d1c19e3b4880eee6d2fcabd0d879121e282196b80042351d5eb3ca0935fa599da1dc51265cc68816ad2bddd2a2de5ea9fdf92adbec7cd34" to package.json to lock pnpm CLI version and integrity
|
- Add packageManager: "pnpm@10.18.1+sha512.77a884a165cbba2d8d1c19e3b4880eee6d2fcabd0d879121e282196b80042351d5eb3ca0935fa599da1dc51265cc68816ad2bddd2a2de5ea9fdf92adbec7cd34" to package.json to lock pnpm CLI version and integrity
|
||||||
|
|
||||||
## 2025-11-22 - 1.2.41 - fix(core)
|
## 2025-11-22 - 1.2.41 - fix(core)
|
||||||
|
|
||||||
Migrate to @git.zone / @push.rocks packages, replace smartfile with smartfs and adapt filesystem usage; update dev deps and remove CI/lint config
|
Migrate to @git.zone / @push.rocks packages, replace smartfile with smartfs and adapt filesystem usage; update dev deps and remove CI/lint config
|
||||||
|
|
||||||
- Updated devDependencies from @gitzone/* to @git.zone/* (tsbuild, tsrun, tstest) and bumped versions
|
- Updated devDependencies from @gitzone/_ to @git.zone/_ (tsbuild, tsrun, tstest) and bumped versions
|
||||||
- Re-scoped runtime dependencies from @pushrocks/* to @push.rocks/* and updated package versions
|
- Re-scoped runtime dependencies from @pushrocks/_ to @push.rocks/_ and updated package versions
|
||||||
- Replaced deprecated smartfile usage with new async smartfs API; added SmartFs instance in ts/tsdocker.plugins.ts
|
- Replaced deprecated smartfile usage with new async smartfs API; added SmartFs instance in ts/tsdocker.plugins.ts
|
||||||
- Switched sync filesystem calls to Node fs where appropriate (fs.existsSync, fs.mkdirSync) and updated code to await smartfs.file(...).write()/delete()
|
- Switched sync filesystem calls to Node fs where appropriate (fs.existsSync, fs.mkdirSync) and updated code to await smartfs.file(...).write()/delete()
|
||||||
- Made buildDockerFile async and awaited file write/delete operations to ensure correct async flow
|
- Made buildDockerFile async and awaited file write/delete operations to ensure correct async flow
|
||||||
@@ -18,269 +33,322 @@ Migrate to @git.zone / @push.rocks packages, replace smartfile with smartfs and
|
|||||||
- Added readme.hints.md describing the migration and dependency changes
|
- Added readme.hints.md describing the migration and dependency changes
|
||||||
|
|
||||||
## 2021-09-30 - 1.2.40 - release (no code changes)
|
## 2021-09-30 - 1.2.40 - release (no code changes)
|
||||||
|
|
||||||
Routine release tag with no recorded source changes.
|
Routine release tag with no recorded source changes.
|
||||||
|
|
||||||
- Tagged release only (no changelogged changes).
|
- Tagged release only (no changelogged changes).
|
||||||
|
|
||||||
## 2021-09-30 - 1.2.39 - fix(core)
|
## 2021-09-30 - 1.2.39 - fix(core)
|
||||||
|
|
||||||
Core maintenance updates.
|
Core maintenance updates.
|
||||||
|
|
||||||
- Internal core updates and maintenance.
|
- Internal core updates and maintenance.
|
||||||
|
|
||||||
## 2019-05-28 - 1.2.38 - fix(core)
|
## 2019-05-28 - 1.2.38 - fix(core)
|
||||||
|
|
||||||
Core maintenance updates.
|
Core maintenance updates.
|
||||||
|
|
||||||
- Internal core updates and maintenance.
|
- Internal core updates and maintenance.
|
||||||
|
|
||||||
## 2019-05-27 - 1.2.37 - fix(core)
|
## 2019-05-27 - 1.2.37 - fix(core)
|
||||||
|
|
||||||
Core maintenance updates.
|
Core maintenance updates.
|
||||||
|
|
||||||
- Internal core updates and maintenance.
|
- Internal core updates and maintenance.
|
||||||
|
|
||||||
## 2019-05-27 - 1.2.36 - fix(core)
|
## 2019-05-27 - 1.2.36 - fix(core)
|
||||||
|
|
||||||
Core maintenance updates.
|
Core maintenance updates.
|
||||||
|
|
||||||
- Internal core updates and maintenance.
|
- Internal core updates and maintenance.
|
||||||
|
|
||||||
## 2019-05-21 - 1.2.35 - fix(core)
|
## 2019-05-21 - 1.2.35 - fix(core)
|
||||||
|
|
||||||
Core maintenance updates.
|
Core maintenance updates.
|
||||||
|
|
||||||
- Internal core updates and maintenance.
|
- Internal core updates and maintenance.
|
||||||
|
|
||||||
## 2019-05-21 - 1.2.34 - fix(core)
|
## 2019-05-21 - 1.2.34 - fix(core)
|
||||||
|
|
||||||
Core maintenance updates.
|
Core maintenance updates.
|
||||||
|
|
||||||
- Internal core updates and maintenance.
|
- Internal core updates and maintenance.
|
||||||
|
|
||||||
## 2019-05-12 - 1.2.33 - fix(core)
|
## 2019-05-12 - 1.2.33 - fix(core)
|
||||||
|
|
||||||
Core maintenance updates.
|
Core maintenance updates.
|
||||||
|
|
||||||
- Internal core updates and maintenance.
|
- Internal core updates and maintenance.
|
||||||
|
|
||||||
## 2019-05-12 - 1.2.32 - fix(core)
|
## 2019-05-12 - 1.2.32 - fix(core)
|
||||||
|
|
||||||
Core maintenance updates.
|
Core maintenance updates.
|
||||||
|
|
||||||
- Internal core updates and maintenance.
|
- Internal core updates and maintenance.
|
||||||
|
|
||||||
## 2019-05-12 - 1.2.31 - fix(bin name)
|
## 2019-05-12 - 1.2.31 - fix(bin name)
|
||||||
|
|
||||||
Rename of the published CLI binary.
|
Rename of the published CLI binary.
|
||||||
|
|
||||||
- Changed published binary name from "npmdocker" to "tsdocker".
|
- Changed published binary name from "npmdocker" to "tsdocker".
|
||||||
|
|
||||||
## 2019-05-10 - 1.2.30 - fix(core)
|
## 2019-05-10 - 1.2.30 - fix(core)
|
||||||
|
|
||||||
Core maintenance updates.
|
Core maintenance updates.
|
||||||
|
|
||||||
- Internal core updates and maintenance.
|
- Internal core updates and maintenance.
|
||||||
|
|
||||||
## 2019-05-10 - 1.2.29 - fix(core)
|
## 2019-05-10 - 1.2.29 - fix(core)
|
||||||
|
|
||||||
Core maintenance updates.
|
Core maintenance updates.
|
||||||
|
|
||||||
- Internal core updates and maintenance.
|
- Internal core updates and maintenance.
|
||||||
|
|
||||||
## 2019-05-10 - 1.2.28 - fix(core)
|
## 2019-05-10 - 1.2.28 - fix(core)
|
||||||
|
|
||||||
Core maintenance updates.
|
Core maintenance updates.
|
||||||
|
|
||||||
- Internal core updates and maintenance.
|
- Internal core updates and maintenance.
|
||||||
|
|
||||||
## 2019-05-09 - 1.2.27 - fix(core)
|
## 2019-05-09 - 1.2.27 - fix(core)
|
||||||
|
|
||||||
Core maintenance updates.
|
Core maintenance updates.
|
||||||
|
|
||||||
- Internal core updates and maintenance.
|
- Internal core updates and maintenance.
|
||||||
|
|
||||||
## 2018-10-29 - 1.2.26 - fix(ci)
|
## 2018-10-29 - 1.2.26 - fix(ci)
|
||||||
|
|
||||||
CI build process change.
|
CI build process change.
|
||||||
|
|
||||||
- Removed "npmts" from the build process.
|
- Removed "npmts" from the build process.
|
||||||
|
|
||||||
## 2018-10-29 - 1.2.25 - fix(core)
|
## 2018-10-29 - 1.2.25 - fix(core)
|
||||||
|
|
||||||
Core maintenance updates.
|
Core maintenance updates.
|
||||||
|
|
||||||
- Internal core updates and maintenance.
|
- Internal core updates and maintenance.
|
||||||
|
|
||||||
## 2018-10-28 - 1.2.24 - fix(clean)
|
## 2018-10-28 - 1.2.24 - fix(clean)
|
||||||
|
|
||||||
Improved image cleanup.
|
Improved image cleanup.
|
||||||
|
|
||||||
- Images are now cleaned in a more thorough way.
|
- Images are now cleaned in a more thorough way.
|
||||||
|
|
||||||
## 2018-09-16 - 1.2.23 - fix(core)
|
## 2018-09-16 - 1.2.23 - fix(core)
|
||||||
|
|
||||||
Core maintenance updates.
|
Core maintenance updates.
|
||||||
|
|
||||||
- Internal core updates and maintenance.
|
- Internal core updates and maintenance.
|
||||||
|
|
||||||
## 2018-09-16 - 1.2.22 - fix(dependencies)
|
## 2018-09-16 - 1.2.22 - fix(dependencies)
|
||||||
|
|
||||||
Dependency updates.
|
Dependency updates.
|
||||||
|
|
||||||
- Updated dependencies (maintenance).
|
- Updated dependencies (maintenance).
|
||||||
|
|
||||||
## 2018-07-21 - 1.2.21 - fix(update to latest standards)
|
## 2018-07-21 - 1.2.21 - fix(update to latest standards)
|
||||||
|
|
||||||
Standards/update alignment.
|
Standards/update alignment.
|
||||||
|
|
||||||
- Updated codebase to latest standards (general maintenance).
|
- Updated codebase to latest standards (general maintenance).
|
||||||
|
|
||||||
## 2018-05-18 - 1.2.20 - release (no code changes)
|
## 2018-05-18 - 1.2.20 - release (no code changes)
|
||||||
|
|
||||||
Tagged release with no recorded source changes.
|
Tagged release with no recorded source changes.
|
||||||
|
|
||||||
- Tagged release only (no changelogged changes).
|
- Tagged release only (no changelogged changes).
|
||||||
|
|
||||||
## 2018-05-18 - 1.2.19 - fix(ci)
|
## 2018-05-18 - 1.2.19 - fix(ci)
|
||||||
|
|
||||||
CI improvements.
|
CI improvements.
|
||||||
|
|
||||||
- Added a build command to package.json to support CI builds.
|
- Added a build command to package.json to support CI builds.
|
||||||
|
|
||||||
## 2018-05-18 - 1.2.18 - fix(package)
|
## 2018-05-18 - 1.2.18 - fix(package)
|
||||||
|
|
||||||
Packaging change for scoped publish.
|
Packaging change for scoped publish.
|
||||||
|
|
||||||
- Include npmdocker under the @gitzone npm scope.
|
- Include npmdocker under the @git.zone npm scope.
|
||||||
|
|
||||||
## 2018-01-24 - 1.2.18 - update
|
## 2018-01-24 - 1.2.18 - update
|
||||||
|
|
||||||
Documentation update.
|
Documentation update.
|
||||||
|
|
||||||
- Updated package description.
|
- Updated package description.
|
||||||
|
|
||||||
## 2017-10-13 - 1.2.17 - fix(cleanup)
|
## 2017-10-13 - 1.2.17 - fix(cleanup)
|
||||||
|
|
||||||
Cleanup behavior fix.
|
Cleanup behavior fix.
|
||||||
|
|
||||||
- Now cleans up correctly after operations.
|
- Now cleans up correctly after operations.
|
||||||
|
|
||||||
## 2017-10-13 - 1.2.16 - update
|
## 2017-10-13 - 1.2.16 - update
|
||||||
|
|
||||||
Miscellaneous updates.
|
Miscellaneous updates.
|
||||||
|
|
||||||
- General maintenance and updates.
|
- General maintenance and updates.
|
||||||
|
|
||||||
## 2017-10-13 - 1.2.15 - fix(test)
|
## 2017-10-13 - 1.2.15 - fix(test)
|
||||||
|
|
||||||
Testing improvements.
|
Testing improvements.
|
||||||
|
|
||||||
- Fixed Docker testing.
|
- Fixed Docker testing.
|
||||||
|
|
||||||
## 2017-10-07 - 1.2.14 - ci
|
## 2017-10-07 - 1.2.14 - ci
|
||||||
|
|
||||||
CI improvements.
|
CI improvements.
|
||||||
|
|
||||||
- Updated CI configuration.
|
- Updated CI configuration.
|
||||||
|
|
||||||
## 2017-10-07 - 1.2.13 - update(analytics)
|
## 2017-10-07 - 1.2.13 - update(analytics)
|
||||||
|
|
||||||
Analytics integration.
|
Analytics integration.
|
||||||
|
|
||||||
- Updated Analytics integration.
|
- Updated Analytics integration.
|
||||||
|
|
||||||
## 2017-10-07 - 1.2.12 - update(dependencies)
|
## 2017-10-07 - 1.2.12 - update(dependencies)
|
||||||
|
|
||||||
Dependency updates.
|
Dependency updates.
|
||||||
|
|
||||||
- Updated dependencies.
|
- Updated dependencies.
|
||||||
|
|
||||||
## 2017-07-16 - 1.2.11 - update
|
## 2017-07-16 - 1.2.11 - update
|
||||||
|
|
||||||
Dependency and greeting update.
|
Dependency and greeting update.
|
||||||
|
|
||||||
- Updated dependencies and changed greeting text.
|
- Updated dependencies and changed greeting text.
|
||||||
|
|
||||||
## 2017-04-21 - 1.2.10 - feature
|
## 2017-04-21 - 1.2.10 - feature
|
||||||
|
|
||||||
Added analytics.
|
Added analytics.
|
||||||
|
|
||||||
- Now includes SmartAnalytics.
|
- Now includes SmartAnalytics.
|
||||||
|
|
||||||
## 2017-04-02 - 1.2.8 - docs & ci
|
## 2017-04-02 - 1.2.8 - docs & ci
|
||||||
|
|
||||||
Docs and CI updates.
|
Docs and CI updates.
|
||||||
|
|
||||||
- Updated README and CI configuration.
|
- Updated README and CI configuration.
|
||||||
|
|
||||||
## 2017-04-02 - 1.2.7 - fix(command)
|
## 2017-04-02 - 1.2.7 - fix(command)
|
||||||
|
|
||||||
Command execution fix.
|
Command execution fix.
|
||||||
|
|
||||||
- Fixed command execution behavior.
|
- Fixed command execution behavior.
|
||||||
|
|
||||||
## 2017-03-28 - 1.2.6 - ci
|
## 2017-03-28 - 1.2.6 - ci
|
||||||
|
|
||||||
CI configuration update.
|
CI configuration update.
|
||||||
|
|
||||||
- Updated .gitlab-ci.yml for correct images/steps.
|
- Updated .gitlab-ci.yml for correct images/steps.
|
||||||
|
|
||||||
## 2017-03-28 - 1.2.5 - ci
|
## 2017-03-28 - 1.2.5 - ci
|
||||||
|
|
||||||
CI improvements.
|
CI improvements.
|
||||||
|
|
||||||
- Further CI updates.
|
- Further CI updates.
|
||||||
|
|
||||||
## 2017-03-28 - 1.2.4 - perf
|
## 2017-03-28 - 1.2.4 - perf
|
||||||
|
|
||||||
Performance improvements.
|
Performance improvements.
|
||||||
|
|
||||||
- Now runs asynchronously and is significantly faster.
|
- Now runs asynchronously and is significantly faster.
|
||||||
|
|
||||||
## 2017-02-12 - 1.2.3 - feature
|
## 2017-02-12 - 1.2.3 - feature
|
||||||
|
|
||||||
New cleanup and diagnostics features.
|
New cleanup and diagnostics features.
|
||||||
|
|
||||||
- Added speedtest utility.
|
- Added speedtest utility.
|
||||||
- Added removal of volumes.
|
- Added removal of volumes.
|
||||||
|
|
||||||
## 2017-02-11 - 1.2.2 - feature
|
## 2017-02-11 - 1.2.2 - feature
|
||||||
|
|
||||||
Cleanup enhancement.
|
Cleanup enhancement.
|
||||||
|
|
||||||
- Added "clean --all" option to remove more artifacts.
|
- Added "clean --all" option to remove more artifacts.
|
||||||
|
|
||||||
## 2017-02-11 - 1.2.1 - maintenance
|
## 2017-02-11 - 1.2.1 - maintenance
|
||||||
|
|
||||||
Docs and dependency updates.
|
Docs and dependency updates.
|
||||||
|
|
||||||
- Updated README and dependencies.
|
- Updated README and dependencies.
|
||||||
|
|
||||||
## 2016-08-04 - 1.2.0 - maintenance
|
## 2016-08-04 - 1.2.0 - maintenance
|
||||||
|
|
||||||
Dependency cleanup.
|
Dependency cleanup.
|
||||||
|
|
||||||
- Removed unnecessary dependencies.
|
- Removed unnecessary dependencies.
|
||||||
|
|
||||||
## 2016-07-29 - 1.1.6 - feature
|
## 2016-07-29 - 1.1.6 - feature
|
||||||
|
|
||||||
Environment support.
|
Environment support.
|
||||||
|
|
||||||
- Added support for qenv.
|
- Added support for qenv.
|
||||||
|
|
||||||
## 2016-07-29 - 1.1.5 - fix
|
## 2016-07-29 - 1.1.5 - fix
|
||||||
|
|
||||||
Container cleanup improvements.
|
Container cleanup improvements.
|
||||||
|
|
||||||
- Now also removes old running containers.
|
- Now also removes old running containers.
|
||||||
|
|
||||||
## 2016-07-29 - 1.1.4 - fix
|
## 2016-07-29 - 1.1.4 - fix
|
||||||
|
|
||||||
Namespace conflict avoidance.
|
Namespace conflict avoidance.
|
||||||
|
|
||||||
- Removes previous containers to avoid name-space conflicts after errors.
|
- Removes previous containers to avoid name-space conflicts after errors.
|
||||||
|
|
||||||
## 2016-07-29 - 1.1.3 - ci
|
## 2016-07-29 - 1.1.3 - ci
|
||||||
|
|
||||||
CI image configuration.
|
CI image configuration.
|
||||||
|
|
||||||
- Added correct images for GitLab CI.
|
- Added correct images for GitLab CI.
|
||||||
|
|
||||||
## 2016-07-29 - 1.1.2 - ci
|
## 2016-07-29 - 1.1.2 - ci
|
||||||
|
|
||||||
CI fixes.
|
CI fixes.
|
||||||
|
|
||||||
- Fixed GitLab CI configuration.
|
- Fixed GitLab CI configuration.
|
||||||
|
|
||||||
## 2016-07-28 - 1.1.1 - ci
|
## 2016-07-28 - 1.1.1 - ci
|
||||||
|
|
||||||
CI fixes and configuration.
|
CI fixes and configuration.
|
||||||
|
|
||||||
- Fixed gitlab.yml and CI issues.
|
- Fixed gitlab.yml and CI issues.
|
||||||
|
|
||||||
## 2016-07-28 - 1.1.0 - feature
|
## 2016-07-28 - 1.1.0 - feature
|
||||||
|
|
||||||
Docker-in-Docker support.
|
Docker-in-Docker support.
|
||||||
|
|
||||||
- Improved support for Docker-in-Docker scenarios.
|
- Improved support for Docker-in-Docker scenarios.
|
||||||
|
|
||||||
## 2016-07-28 - 1.0.5 - feature & ci
|
## 2016-07-28 - 1.0.5 - feature & ci
|
||||||
|
|
||||||
Docker socket option and CI update.
|
Docker socket option and CI update.
|
||||||
|
|
||||||
- Added dockerSock option.
|
- Added dockerSock option.
|
||||||
- Updated .gitlab-ci.yml.
|
- Updated .gitlab-ci.yml.
|
||||||
|
|
||||||
## 2016-07-19 - 1.0.4 - release (no code changes)
|
## 2016-07-19 - 1.0.4 - release (no code changes)
|
||||||
|
|
||||||
Tagged release with no recorded source changes.
|
Tagged release with no recorded source changes.
|
||||||
|
|
||||||
- Tagged release only (no changelogged changes).
|
- Tagged release only (no changelogged changes).
|
||||||
|
|
||||||
## 2016-07-19 - 1.0.3 - feature
|
## 2016-07-19 - 1.0.3 - feature
|
||||||
|
|
||||||
Environment tagging.
|
Environment tagging.
|
||||||
|
|
||||||
- Added environment tag support.
|
- Added environment tag support.
|
||||||
|
|
||||||
## 2016-07-19 - 1.0.2 - milestone
|
## 2016-07-19 - 1.0.2 - milestone
|
||||||
|
|
||||||
CLI and stability improvements.
|
CLI and stability improvements.
|
||||||
|
|
||||||
- Wired up CLI usage.
|
- Wired up CLI usage.
|
||||||
- Marked as fully working.
|
- Marked as fully working.
|
||||||
|
|
||||||
## 2016-07-19 - 1.0.1 - initial improvements
|
## 2016-07-19 - 1.0.1 - initial improvements
|
||||||
|
|
||||||
Early project refinements and Docker integration.
|
Early project refinements and Docker integration.
|
||||||
|
|
||||||
- Added/updated Docker integration and configuration.
|
- Added/updated Docker integration and configuration.
|
||||||
@@ -288,6 +356,7 @@ Early project refinements and Docker integration.
|
|||||||
- Updated Docker handling and removed test artifacts.
|
- Updated Docker handling and removed test artifacts.
|
||||||
|
|
||||||
## 2016-07-13 - 1.0.0 - initial
|
## 2016-07-13 - 1.0.0 - initial
|
||||||
|
|
||||||
Initial release.
|
Initial release.
|
||||||
|
|
||||||
- Added README and initial project scaffolding.
|
- Added README and initial project scaffolding.
|
||||||
@@ -8,12 +8,13 @@
|
|||||||
"npmAccessLevel": "public"
|
"npmAccessLevel": "public"
|
||||||
},
|
},
|
||||||
"gitzone": {
|
"gitzone": {
|
||||||
|
"projectType": "npm",
|
||||||
"module": {
|
"module": {
|
||||||
"githost": "gitlab.com",
|
"githost": "gitlab.com",
|
||||||
"gitscope": "gitzone",
|
"gitscope": "gitzone",
|
||||||
"gitrepo": "npmdocker",
|
"gitrepo": "tsdocker",
|
||||||
"shortDescription": "develop npm modules cross platform with docker",
|
"description": "develop npm modules cross platform with docker",
|
||||||
"npmPackagename": "@gitzone/npmdocker",
|
"npmPackagename": "@git.zone/tsdocker",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
28061
package-lock.json
generated
28061
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
31
package.json
31
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tsdocker",
|
"name": "@git.zone/tsdocker",
|
||||||
"version": "1.2.42",
|
"version": "1.2.43",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "develop npm modules cross platform with docker",
|
"description": "develop npm modules cross platform with docker",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
@@ -17,11 +17,12 @@
|
|||||||
"testVscode": "(cd test/ && node ../cli.ts.js vscode)",
|
"testVscode": "(cd test/ && node ../cli.ts.js vscode)",
|
||||||
"clean": "(rm -rf test/)",
|
"clean": "(rm -rf test/)",
|
||||||
"compile": "(npmts --notest)",
|
"compile": "(npmts --notest)",
|
||||||
"setupCheck": "(git clone https://gitlab.com/sandboxzone/sandbox-npmts.git test/)"
|
"setupCheck": "(git clone https://gitlab.com/sandboxzone/sandbox-npmts.git test/)",
|
||||||
|
"buildDocs": "tsdoc"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+ssh://git@gitlab.com/gitzone/npmdocker.git"
|
"url": "https://gitlab.com/gitzone/tsdocker.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"docker"
|
"docker"
|
||||||
@@ -29,9 +30,9 @@
|
|||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://gitlab.com/gitzone/npmdocker/issues"
|
"url": "https://gitlab.com/gitzone/tsdocker/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/gitzone/npmdocker#README",
|
"homepage": "https://gitlab.com/gitzone/tsdocker#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@git.zone/tsbuild": "^3.1.0",
|
"@git.zone/tsbuild": "^3.1.0",
|
||||||
"@git.zone/tsrun": "^2.0.0",
|
"@git.zone/tsrun": "^2.0.0",
|
||||||
@@ -53,5 +54,21 @@
|
|||||||
"@push.rocks/smartshell": "^3.3.0",
|
"@push.rocks/smartshell": "^3.3.0",
|
||||||
"@push.rocks/smartstring": "^4.1.0"
|
"@push.rocks/smartstring": "^4.1.0"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.18.1+sha512.77a884a165cbba2d8d1c19e3b4880eee6d2fcabd0d879121e282196b80042351d5eb3ca0935fa599da1dc51265cc68816ad2bddd2a2de5ea9fdf92adbec7cd34"
|
"packageManager": "pnpm@10.18.1+sha512.77a884a165cbba2d8d1c19e3b4880eee6d2fcabd0d879121e282196b80042351d5eb3ca0935fa599da1dc51265cc68816ad2bddd2a2de5ea9fdf92adbec7cd34",
|
||||||
|
"type": "module",
|
||||||
|
"files": [
|
||||||
|
"ts/**/*",
|
||||||
|
"ts_web/**/*",
|
||||||
|
"dist/**/*",
|
||||||
|
"dist_*/**/*",
|
||||||
|
"dist_ts/**/*",
|
||||||
|
"dist_ts_web/**/*",
|
||||||
|
"assets/**/*",
|
||||||
|
"cli.js",
|
||||||
|
"npmextra.json",
|
||||||
|
"readme.md"
|
||||||
|
],
|
||||||
|
"pnpm": {
|
||||||
|
"overrides": {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
# tsdocker Project Hints
|
# tsdocker Project Hints
|
||||||
|
|
||||||
## Module Purpose
|
## Module Purpose
|
||||||
|
|
||||||
tsdocker is a tool for developing npm modules cross-platform using Docker. It allows testing in clean, reproducible Linux environments locally.
|
tsdocker is a tool for developing npm modules cross-platform using Docker. It allows testing in clean, reproducible Linux environments locally.
|
||||||
|
|
||||||
## Recent Upgrades (2025-11-22)
|
## Recent Upgrades (2025-11-22)
|
||||||
- Updated all @gitzone/* dependencies to @git.zone/* scope (latest versions)
|
|
||||||
- Updated all @pushrocks/* dependencies to @push.rocks/* scope (latest versions)
|
- Updated all @git.zone/_ dependencies to @git.zone/_ scope (latest versions)
|
||||||
|
- Updated all @pushrocks/_ dependencies to @push.rocks/_ scope (latest versions)
|
||||||
- Migrated from smartfile v8 to smartfs v1.1.0
|
- Migrated from smartfile v8 to smartfs v1.1.0
|
||||||
- All filesystem operations now use smartfs fluent API
|
- All filesystem operations now use smartfs fluent API
|
||||||
- Operations are now async (smartfs is async-only)
|
- Operations are now async (smartfs is async-only)
|
||||||
@@ -18,17 +20,21 @@ tsdocker is a tool for developing npm modules cross-platform using Docker. It al
|
|||||||
- Removed tslint and tslint-config-prettier (no longer needed)
|
- Removed tslint and tslint-config-prettier (no longer needed)
|
||||||
|
|
||||||
## SmartFS Migration Details
|
## SmartFS Migration Details
|
||||||
|
|
||||||
The following operations were converted:
|
The following operations were converted:
|
||||||
|
|
||||||
- `smartfile.fs.fileExistsSync()` → Node.js `fs.existsSync()` (for sync needs)
|
- `smartfile.fs.fileExistsSync()` → Node.js `fs.existsSync()` (for sync needs)
|
||||||
- `smartfile.fs.ensureDirSync()` → Node.js `fs.mkdirSync(..., { recursive: true })`
|
- `smartfile.fs.ensureDirSync()` → Node.js `fs.mkdirSync(..., { recursive: true })`
|
||||||
- `smartfile.memory.toFsSync()` → `smartfs.file(path).write(content)` (async)
|
- `smartfile.memory.toFsSync()` → `smartfs.file(path).write(content)` (async)
|
||||||
- `smartfile.fs.removeSync()` → `smartfs.file(path).delete()` (async)
|
- `smartfile.fs.removeSync()` → `smartfs.file(path).delete()` (async)
|
||||||
|
|
||||||
## Test Status
|
## Test Status
|
||||||
|
|
||||||
- Build: ✅ Passes
|
- Build: ✅ Passes
|
||||||
- The integration test requires cloning an external test repository (sandbox-npmts)
|
- The integration test requires cloning an external test repository (sandbox-npmts)
|
||||||
- The external test repo uses top-level await which requires ESM module handling
|
- The external test repo uses top-level await which requires ESM module handling
|
||||||
- This is not a tsdocker issue but rather the test repository's structure
|
- This is not a tsdocker issue but rather the test repository's structure
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
All dependencies are now at their latest versions compatible with Node.js without introducing new Node.js-specific dependencies.
|
All dependencies are now at their latest versions compatible with Node.js without introducing new Node.js-specific dependencies.
|
||||||
|
|||||||
39
readme.md
39
readme.md
@@ -1,4 +1,4 @@
|
|||||||
# @gitzone/tsdocker
|
# @git.zone/tsdocker
|
||||||
|
|
||||||
> 🐳 Cross-platform npm module development with Docker — test your packages in clean, reproducible Linux environments every time.
|
> 🐳 Cross-platform npm module development with Docker — test your packages in clean, reproducible Linux environments every time.
|
||||||
|
|
||||||
@@ -18,18 +18,21 @@ For reporting bugs, issues, or security vulnerabilities, please visit [community
|
|||||||
## Features
|
## Features
|
||||||
|
|
||||||
✨ **Works Everywhere Docker Does**
|
✨ **Works Everywhere Docker Does**
|
||||||
|
|
||||||
- Docker Toolbox
|
- Docker Toolbox
|
||||||
- Native Docker Desktop
|
- Native Docker Desktop
|
||||||
- Docker-in-Docker (DinD)
|
- Docker-in-Docker (DinD)
|
||||||
- Mounted docker.sock scenarios
|
- Mounted docker.sock scenarios
|
||||||
|
|
||||||
🔧 **Flexible Configuration**
|
🔧 **Flexible Configuration**
|
||||||
|
|
||||||
- Custom base images
|
- Custom base images
|
||||||
- Configurable test commands
|
- Configurable test commands
|
||||||
- Environment variable injection via qenv
|
- Environment variable injection via qenv
|
||||||
- Optional docker.sock mounting for nested container tests
|
- Optional docker.sock mounting for nested container tests
|
||||||
|
|
||||||
📦 **TypeScript-First**
|
📦 **TypeScript-First**
|
||||||
|
|
||||||
- Full TypeScript support with excellent IntelliSense
|
- Full TypeScript support with excellent IntelliSense
|
||||||
- Type-safe configuration
|
- Type-safe configuration
|
||||||
- Modern async/await patterns throughout
|
- Modern async/await patterns throughout
|
||||||
@@ -37,9 +40,9 @@ For reporting bugs, issues, or security vulnerabilities, please visit [community
|
|||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install --save-dev @gitzone/tsdocker
|
npm install --save-dev @git.zone/tsdocker
|
||||||
# or
|
# or
|
||||||
pnpm install --save-dev @gitzone/tsdocker
|
pnpm install --save-dev @git.zone/tsdocker
|
||||||
```
|
```
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
@@ -65,6 +68,7 @@ npx tsdocker
|
|||||||
```
|
```
|
||||||
|
|
||||||
That's it! tsdocker will:
|
That's it! tsdocker will:
|
||||||
|
|
||||||
1. ✅ Verify Docker is available
|
1. ✅ Verify Docker is available
|
||||||
2. 🏗️ Build a test container with your specified base image
|
2. 🏗️ Build a test container with your specified base image
|
||||||
3. 📂 Mount your project directory
|
3. 📂 Mount your project directory
|
||||||
@@ -74,7 +78,7 @@ That's it! tsdocker will:
|
|||||||
## Configuration Options
|
## Configuration Options
|
||||||
|
|
||||||
| Option | Type | Description |
|
| Option | Type | Description |
|
||||||
|--------|------|-------------|
|
| ------------ | --------- | ---------------------------------------------------------------------- |
|
||||||
| `baseImage` | `string` | Docker image to use as the test environment base |
|
| `baseImage` | `string` | Docker image to use as the test environment base |
|
||||||
| `command` | `string` | CLI command to execute inside the container |
|
| `command` | `string` | CLI command to execute inside the container |
|
||||||
| `dockerSock` | `boolean` | Whether to mount `/var/run/docker.sock` for Docker-in-Docker scenarios |
|
| `dockerSock` | `boolean` | Whether to mount `/var/run/docker.sock` for Docker-in-Docker scenarios |
|
||||||
@@ -84,6 +88,7 @@ That's it! tsdocker will:
|
|||||||
If you have a `qenv.yml` file in your project, tsdocker automatically loads and injects those environment variables into your test container.
|
If you have a `qenv.yml` file in your project, tsdocker automatically loads and injects those environment variables into your test container.
|
||||||
|
|
||||||
Example `qenv.yml`:
|
Example `qenv.yml`:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
demoKey: demoValue
|
demoKey: demoValue
|
||||||
API_KEY: your-key-here
|
API_KEY: your-key-here
|
||||||
@@ -92,16 +97,21 @@ API_KEY: your-key-here
|
|||||||
## CLI Commands
|
## CLI Commands
|
||||||
|
|
||||||
### Standard Test Run
|
### Standard Test Run
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
tsdocker
|
tsdocker
|
||||||
```
|
```
|
||||||
|
|
||||||
Runs your configured test command in a fresh Docker container.
|
Runs your configured test command in a fresh Docker container.
|
||||||
|
|
||||||
### Clean Docker Environment
|
### Clean Docker Environment
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
tsdocker clean --all
|
tsdocker clean --all
|
||||||
```
|
```
|
||||||
|
|
||||||
⚠️ **WARNING**: This aggressively cleans your Docker environment by:
|
⚠️ **WARNING**: This aggressively cleans your Docker environment by:
|
||||||
|
|
||||||
- Killing all running containers
|
- Killing all running containers
|
||||||
- Removing all stopped containers
|
- Removing all stopped containers
|
||||||
- Removing dangling images
|
- Removing dangling images
|
||||||
@@ -111,15 +121,19 @@ tsdocker clean --all
|
|||||||
Use with caution!
|
Use with caution!
|
||||||
|
|
||||||
### VSCode in Docker
|
### VSCode in Docker
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
tsdocker vscode
|
tsdocker vscode
|
||||||
```
|
```
|
||||||
|
|
||||||
Launches a containerized VS Code instance accessible via browser at `testing-vscode.git.zone:8443`.
|
Launches a containerized VS Code instance accessible via browser at `testing-vscode.git.zone:8443`.
|
||||||
|
|
||||||
### Speed Test
|
### Speed Test
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
tsdocker speedtest
|
tsdocker speedtest
|
||||||
```
|
```
|
||||||
|
|
||||||
Runs a network speed test inside a Docker container.
|
Runs a network speed test inside a Docker container.
|
||||||
|
|
||||||
## Advanced Usage
|
## Advanced Usage
|
||||||
@@ -154,6 +168,7 @@ You can use any Docker image as your base:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Popular choices:
|
Popular choices:
|
||||||
|
|
||||||
- `node:20` — Official Node.js images
|
- `node:20` — Official Node.js images
|
||||||
- `node:20-alpine` — Lightweight Alpine-based images
|
- `node:20-alpine` — Lightweight Alpine-based images
|
||||||
- `hosttoday/ht-docker-node:npmts` — Pre-configured with npmts tooling
|
- `hosttoday/ht-docker-node:npmts` — Pre-configured with npmts tooling
|
||||||
@@ -161,6 +176,7 @@ Popular choices:
|
|||||||
### CI Integration
|
### CI Integration
|
||||||
|
|
||||||
tsdocker automatically detects CI environments (via `CI=true` env var) and adjusts behavior:
|
tsdocker automatically detects CI environments (via `CI=true` env var) and adjusts behavior:
|
||||||
|
|
||||||
- Skips mounting project directory in CI (assumes code is already in container)
|
- Skips mounting project directory in CI (assumes code is already in container)
|
||||||
- Optimizes for CI execution patterns
|
- Optimizes for CI execution patterns
|
||||||
|
|
||||||
@@ -169,6 +185,7 @@ tsdocker automatically detects CI environments (via `CI=true` env var) and adjus
|
|||||||
### The Problem
|
### The Problem
|
||||||
|
|
||||||
Local development environments drift over time. You might have:
|
Local development environments drift over time. You might have:
|
||||||
|
|
||||||
- Stale global packages
|
- Stale global packages
|
||||||
- Modified system configurations
|
- Modified system configurations
|
||||||
- Cached dependencies
|
- Cached dependencies
|
||||||
@@ -190,15 +207,15 @@ tsdocker ensures every test run happens in a **clean, reproducible environment**
|
|||||||
tsdocker is built with TypeScript and provides full type definitions:
|
tsdocker is built with TypeScript and provides full type definitions:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { IConfig } from '@gitzone/tsdocker/dist/tsdocker.config';
|
import { IConfig } from '@git.zone/tsdocker/dist/tsdocker.config';
|
||||||
|
|
||||||
const config: IConfig = {
|
const config: IConfig = {
|
||||||
baseImage: 'node:20',
|
baseImage: 'node:20',
|
||||||
command: 'npm test',
|
command: 'npm test',
|
||||||
dockerSock: false,
|
dockerSock: false,
|
||||||
keyValueObject: {
|
keyValueObject: {
|
||||||
NODE_ENV: 'test'
|
NODE_ENV: 'test',
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -234,6 +251,7 @@ docker --version
|
|||||||
### Tests fail in container but work locally
|
### Tests fail in container but work locally
|
||||||
|
|
||||||
This often indicates environment-specific issues. Check:
|
This often indicates environment-specific issues. Check:
|
||||||
|
|
||||||
- Are all dependencies in `package.json`? (not relying on global packages)
|
- Are all dependencies in `package.json`? (not relying on global packages)
|
||||||
- Does your code have hardcoded paths?
|
- Does your code have hardcoded paths?
|
||||||
- Are environment variables set correctly?
|
- Are environment variables set correctly?
|
||||||
@@ -250,6 +268,7 @@ sudo usermod -aG docker $USER
|
|||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### Basic npm test
|
### Basic npm test
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"npmdocker": {
|
"npmdocker": {
|
||||||
@@ -260,6 +279,7 @@ sudo usermod -aG docker $USER
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Using npmci for multiple Node versions
|
### Using npmci for multiple Node versions
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"npmdocker": {
|
"npmdocker": {
|
||||||
@@ -270,6 +290,7 @@ sudo usermod -aG docker $USER
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Testing Docker-based tools
|
### Testing Docker-based tools
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"npmdocker": {
|
"npmdocker": {
|
||||||
@@ -286,9 +307,9 @@ sudo usermod -aG docker $USER
|
|||||||
🚀 **Layer caching**: Docker caches image layers — your base image only downloads once
|
🚀 **Layer caching**: Docker caches image layers — your base image only downloads once
|
||||||
🚀 **Prune regularly**: Run `docker system prune` periodically to reclaim disk space
|
🚀 **Prune regularly**: Run `docker system prune` periodically to reclaim disk space
|
||||||
|
|
||||||
## Migration from @gitzone/npmdocker
|
## Migration from legacy npmdocker scope
|
||||||
|
|
||||||
This package was previously published as `@gitzone/npmdocker`. The scope has been updated to `@gitzone/tsdocker` for better naming consistency. Functionality remains the same.
|
This package was previously published under the `npmdocker` name in the old scope. It is now available as `@git.zone/tsdocker` for better naming consistency. Functionality remains the same.
|
||||||
|
|
||||||
## License and Legal Information
|
## License and Legal Information
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* autocreated commitinfo by @push.rocks/commitinfo
|
* autocreated commitinfo by @push.rocks/commitinfo
|
||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@gitzone/tsdocker',
|
name: '@git.zone/tsdocker',
|
||||||
version: '1.2.42',
|
version: '1.2.43',
|
||||||
description: 'develop npm modules cross platform with docker'
|
description: 'develop npm modules cross platform with docker'
|
||||||
}
|
}
|
||||||
|
|||||||
12
tsconfig.json
Normal file
12
tsconfig.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2022",
|
||||||
|
"module": "NodeNext",
|
||||||
|
"moduleResolution": "NodeNext",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"verbatimModuleSyntax": true,
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {}
|
||||||
|
},
|
||||||
|
"exclude": ["dist_*/**/*.d.ts"]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user