@git.zone/cli 1.9.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/templates/ci_default/.gitea/workflows/default_nottags.yaml +66 -0
- package/assets/templates/ci_default/.gitea/workflows/default_tags.yaml +124 -0
- package/assets/templates/ci_default_gitlab/.gitlab-ci.yml +128 -0
- package/assets/templates/ci_default_private/.gitea/workflows/default_nottags.yaml +66 -0
- package/assets/templates/ci_default_private/.gitea/workflows/default_tags.yaml +124 -0
- package/assets/templates/ci_default_private_gitlab/.gitlab-ci.yml +133 -0
- package/assets/templates/ci_docker/.gitea/workflows/docker_nottags.yaml +71 -0
- package/assets/templates/ci_docker/.gitea/workflows/docker_tags.yaml +106 -0
- package/assets/templates/ci_docker_gitlab/.gitlab-ci.yml +107 -0
- package/assets/templates/cli/cli.child.ts +4 -0
- package/assets/templates/cli/cli.js +4 -0
- package/assets/templates/cli/cli.ts.js +5 -0
- package/assets/templates/dockerfile_service/Dockerfile +46 -0
- package/assets/templates/dockerfile_service/dockerignore +4 -0
- package/assets/templates/gitignore/_gitignore +23 -0
- package/assets/templates/license_mit/license +19 -0
- package/assets/templates/meta/.meta.json +3 -0
- package/assets/templates/meta/.smartscaf.yml +5 -0
- package/assets/templates/meta/package.json +11 -0
- package/assets/templates/npm/.package.json +28 -0
- package/assets/templates/npm/.smartscaf.yml +24 -0
- package/assets/templates/npm/test/test.ts +8 -0
- package/assets/templates/npm/ts/index.ts +3 -0
- package/assets/templates/npm/ts/some.plugins.ts +7 -0
- package/assets/templates/npmextra/npmextra.json +18 -0
- package/assets/templates/readme/readme.md +5 -0
- package/assets/templates/service/.package.json +34 -0
- package/assets/templates/service/.smartscaf.yml +21 -0
- package/assets/templates/service/npmextra.json +24 -0
- package/assets/templates/service/ts/00_commitinfo_data.ts +8 -0
- package/assets/templates/service/ts/index.ts +4 -0
- package/assets/templates/service/ts/some.classes.some.db.ts +30 -0
- package/assets/templates/service/ts/some.classes.some.ts +27 -0
- package/assets/templates/service/ts/some.paths.ts +9 -0
- package/assets/templates/service/ts/some.plugins.ts +25 -0
- package/assets/templates/tsconfig_update/tsconfig.json +14 -0
- package/assets/templates/vscode/.vscode/launch.json +11 -0
- package/assets/templates/vscode/.vscode/settings.json +26 -0
- package/assets/templates/wcc/.package.json +47 -0
- package/assets/templates/wcc/.smartscaf.yml +20 -0
- package/assets/templates/wcc/ts_web/elements/first-element.ts +47 -0
- package/assets/templates/wcc/ts_web/elements/index.ts +1 -0
- package/assets/templates/wcc/ts_web/index.ts +1 -0
- package/assets/templates/wcc/ts_web/pages/index.ts +2 -0
- package/assets/templates/wcc/ts_web/pages/page1.ts +5 -0
- package/assets/templates/wcc/ts_web/pages/page2.ts +5 -0
- package/assets/templates/wcc_update/html/index.html +25 -0
- package/assets/templates/wcc_update/html/index.ts +10 -0
- package/assets/templates/website/.package.json +40 -0
- package/assets/templates/website/.smartscaf.yml +17 -0
- package/assets/templates/website/Dockerfile +3 -0
- package/assets/templates/website/npmextra.json +24 -0
- package/assets/templates/website/qenv.yml +1 -0
- package/assets/templates/website/readme.md +1 -0
- package/assets/templates/website/ts/ffb.paths.ts +7 -0
- package/assets/templates/website/ts/ffb.plugins.ts +14 -0
- package/assets/templates/website/ts/index.ts +12 -0
- package/assets/templates/website/ts_web/elements/header.ts +62 -0
- package/assets/templates/website/ts_web/index.ts +63 -0
- package/assets/templates/website_update/html/index.html +110 -0
- package/cli.js +4 -0
- package/dist_ts/00_commitinfo_data.d.ts +8 -0
- package/dist_ts/00_commitinfo_data.js +9 -0
- package/dist_ts/classes.gitzoneconfig.d.ts +31 -0
- package/dist_ts/classes.gitzoneconfig.js +21 -0
- package/dist_ts/classes.project.d.ts +11 -0
- package/dist_ts/classes.project.js +23 -0
- package/dist_ts/gitzone.cli.d.ts +1 -0
- package/dist_ts/gitzone.cli.js +82 -0
- package/dist_ts/gitzone.config.d.ts +28 -0
- package/dist_ts/gitzone.config.js +21 -0
- package/dist_ts/gitzone.logging.d.ts +2 -0
- package/dist_ts/gitzone.logging.js +14 -0
- package/dist_ts/gitzone.monitor.d.ts +1 -0
- package/dist_ts/gitzone.monitor.js +2 -0
- package/dist_ts/gitzone.paths.d.ts +4 -0
- package/dist_ts/gitzone.paths.js +6 -0
- package/dist_ts/gitzone.plugins.d.ts +10 -0
- package/dist_ts/gitzone.plugins.js +11 -0
- package/dist_ts/index.d.ts +1 -0
- package/dist_ts/index.js +10 -0
- package/dist_ts/mod_audit/index.d.ts +1 -0
- package/dist_ts/mod_audit/index.js +2 -0
- package/dist_ts/mod_commit/index.d.ts +1 -0
- package/dist_ts/mod_commit/index.js +68 -0
- package/dist_ts/mod_commit/mod.plugins.d.ts +5 -0
- package/dist_ts/mod_commit/mod.plugins.js +6 -0
- package/dist_ts/mod_deprecate/index.d.ts +1 -0
- package/dist_ts/mod_deprecate/index.js +34 -0
- package/dist_ts/mod_deprecate/mod.plugins.d.ts +4 -0
- package/dist_ts/mod_deprecate/mod.plugins.js +5 -0
- package/dist_ts/mod_format/format.classes.project.d.ts +8 -0
- package/dist_ts/mod_format/format.classes.project.js +20 -0
- package/dist_ts/mod_format/format.cleanup.d.ts +2 -0
- package/dist_ts/mod_format/format.cleanup.js +18 -0
- package/dist_ts/mod_format/format.copy.d.ts +2 -0
- package/dist_ts/mod_format/format.copy.js +5 -0
- package/dist_ts/mod_format/format.gitignore.d.ts +2 -0
- package/dist_ts/mod_format/format.gitignore.js +19 -0
- package/dist_ts/mod_format/format.license.d.ts +2 -0
- package/dist_ts/mod_format/format.license.js +23 -0
- package/dist_ts/mod_format/format.npmextra.d.ts +5 -0
- package/dist_ts/mod_format/format.npmextra.js +59 -0
- package/dist_ts/mod_format/format.packagejson.d.ts +2 -0
- package/dist_ts/mod_format/format.packagejson.js +104 -0
- package/dist_ts/mod_format/format.prettier.d.ts +2 -0
- package/dist_ts/mod_format/format.prettier.js +51 -0
- package/dist_ts/mod_format/format.readme.d.ts +2 -0
- package/dist_ts/mod_format/format.readme.js +40 -0
- package/dist_ts/mod_format/format.templates.d.ts +5 -0
- package/dist_ts/mod_format/format.templates.js +67 -0
- package/dist_ts/mod_format/index.d.ts +1 -0
- package/dist_ts/mod_format/index.js +30 -0
- package/dist_ts/mod_format/mod.plugins.d.ts +11 -0
- package/dist_ts/mod_format/mod.plugins.js +12 -0
- package/dist_ts/mod_helpers/index.d.ts +1 -0
- package/dist_ts/mod_helpers/index.js +10 -0
- package/dist_ts/mod_helpers/mod.plugins.d.ts +3 -0
- package/dist_ts/mod_helpers/mod.plugins.js +4 -0
- package/dist_ts/mod_meta/index.d.ts +1 -0
- package/dist_ts/mod_meta/index.js +25 -0
- package/dist_ts/mod_meta/meta.classes.meta.d.ts +53 -0
- package/dist_ts/mod_meta/meta.classes.meta.js +174 -0
- package/dist_ts/mod_meta/meta.interfaces.d.ts +5 -0
- package/dist_ts/mod_meta/meta.interfaces.js +2 -0
- package/dist_ts/mod_meta/meta.plugins.d.ts +6 -0
- package/dist_ts/mod_meta/meta.plugins.js +7 -0
- package/dist_ts/mod_open/index.d.ts +1 -0
- package/dist_ts/mod_open/index.js +12 -0
- package/dist_ts/mod_open/mod.plugins.d.ts +4 -0
- package/dist_ts/mod_open/mod.plugins.js +5 -0
- package/dist_ts/mod_standard/index.d.ts +1 -0
- package/dist_ts/mod_standard/index.js +25 -0
- package/dist_ts/mod_standard/mod.plugins.d.ts +3 -0
- package/dist_ts/mod_standard/mod.plugins.js +4 -0
- package/dist_ts/mod_start/index.d.ts +6 -0
- package/dist_ts/mod_start/index.js +22 -0
- package/dist_ts/mod_start/mod.plugins.d.ts +3 -0
- package/dist_ts/mod_start/mod.plugins.js +5 -0
- package/dist_ts/mod_template/index.d.ts +8 -0
- package/dist_ts/mod_template/index.js +47 -0
- package/dist_ts/mod_template/mod.plugins.d.ts +5 -0
- package/dist_ts/mod_template/mod.plugins.js +6 -0
- package/dist_ts/paths.d.ts +4 -0
- package/dist_ts/paths.js +6 -0
- package/dist_ts/plugins.d.ts +11 -0
- package/dist_ts/plugins.js +11 -0
- package/license +19 -0
- package/npmextra.json +34 -0
- package/package.json +107 -0
- package/readme.hints.md +1 -0
- package/readme.md +207 -0
- package/ts/00_commitinfo_data.ts +8 -0
- package/ts/classes.gitzoneconfig.ts +47 -0
- package/ts/classes.project.ts +28 -0
- package/ts/gitzone.cli.ts +101 -0
- package/ts/gitzone.logging.ts +15 -0
- package/ts/index.ts +9 -0
- package/ts/mod_audit/index.ts +1 -0
- package/ts/mod_commit/index.ts +73 -0
- package/ts/mod_commit/mod.plugins.ts +7 -0
- package/ts/mod_deprecate/index.ts +37 -0
- package/ts/mod_deprecate/mod.plugins.ts +6 -0
- package/ts/mod_format/format.cleanup.ts +19 -0
- package/ts/mod_format/format.copy.ts +6 -0
- package/ts/mod_format/format.gitignore.ts +21 -0
- package/ts/mod_format/format.license.ts +24 -0
- package/ts/mod_format/format.npmextra.ts +70 -0
- package/ts/mod_format/format.packagejson.ts +120 -0
- package/ts/mod_format/format.prettier.ts +58 -0
- package/ts/mod_format/format.readme.ts +47 -0
- package/ts/mod_format/format.templates.ts +71 -0
- package/ts/mod_format/index.ts +38 -0
- package/ts/mod_format/mod.plugins.ts +13 -0
- package/ts/mod_helpers/index.ts +10 -0
- package/ts/mod_helpers/mod.plugins.ts +5 -0
- package/ts/mod_meta/index.ts +26 -0
- package/ts/mod_meta/meta.classes.meta.ts +234 -0
- package/ts/mod_meta/meta.interfaces.ts +3 -0
- package/ts/mod_meta/meta.plugins.ts +8 -0
- package/ts/mod_open/index.ts +15 -0
- package/ts/mod_open/mod.plugins.ts +5 -0
- package/ts/mod_standard/index.ts +29 -0
- package/ts/mod_standard/mod.plugins.ts +4 -0
- package/ts/mod_start/index.ts +26 -0
- package/ts/mod_start/mod.plugins.ts +6 -0
- package/ts/mod_template/index.ts +52 -0
- package/ts/mod_template/mod.plugins.ts +7 -0
- package/ts/paths.ts +9 -0
- package/ts/plugins.ts +21 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
name: Docker (tags)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '*'
|
|
7
|
+
|
|
8
|
+
env:
|
|
9
|
+
IMAGE: code.foss.global/hosttoday/ht-docker-node:npmci
|
|
10
|
+
NPMCI_COMPUTED_REPOURL: https://${-{gitea.repository_owner}-}:${-{secrets.GITEA_TOKEN}-}@{{git.host}}/${-{gitea.repository}-}.git
|
|
11
|
+
NPMCI_TOKEN_NPM: ${-{secrets.NPMCI_TOKEN_NPM}-}
|
|
12
|
+
NPMCI_TOKEN_NPM2: ${-{secrets.NPMCI_TOKEN_NPM2}-}
|
|
13
|
+
NPMCI_GIT_GITHUBTOKEN: ${-{secrets.NPMCI_GIT_GITHUBTOKEN}-}
|
|
14
|
+
NPMCI_LOGIN_DOCKER_GITEA: ${-{ github.server_url }-}|${-{ gitea.repository_owner }-}|${-{ secrets.GITEA_TOKEN }-}
|
|
15
|
+
NPMCI_LOGIN_DOCKER_DOCKERREGISTRY: ${-{ secrets.NPMCI_LOGIN_DOCKER_DOCKERREGISTRY }-}
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
security:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
container:
|
|
21
|
+
image: ${-{ env.IMAGE }-}
|
|
22
|
+
continue-on-error: true
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v3
|
|
26
|
+
|
|
27
|
+
- name: Prepare
|
|
28
|
+
run: |
|
|
29
|
+
pnpm install -g pnpm
|
|
30
|
+
pnpm install -g @ship.zone/npmci
|
|
31
|
+
npmci npm prepare
|
|
32
|
+
|
|
33
|
+
- name: Audit production dependencies
|
|
34
|
+
run: |
|
|
35
|
+
npmci command npm config set registry https://registry.npmjs.org
|
|
36
|
+
npmci command pnpm audit --audit-level=high --prod
|
|
37
|
+
continue-on-error: true
|
|
38
|
+
|
|
39
|
+
- name: Audit development dependencies
|
|
40
|
+
run: |
|
|
41
|
+
npmci command npm config set registry https://registry.npmjs.org
|
|
42
|
+
npmci command pnpm audit --audit-level=high --dev
|
|
43
|
+
continue-on-error: true
|
|
44
|
+
|
|
45
|
+
test:
|
|
46
|
+
needs: security
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
container:
|
|
49
|
+
image: ${-{ env.IMAGE }-}
|
|
50
|
+
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@v3
|
|
53
|
+
|
|
54
|
+
- name: Prepare
|
|
55
|
+
run: |
|
|
56
|
+
pnpm install -g pnpm
|
|
57
|
+
pnpm install -g @ship.zone/npmci
|
|
58
|
+
npmci npm prepare
|
|
59
|
+
|
|
60
|
+
- name: Test stable
|
|
61
|
+
run: |
|
|
62
|
+
npmci node install stable
|
|
63
|
+
npmci npm install
|
|
64
|
+
npmci npm test
|
|
65
|
+
|
|
66
|
+
- name: Test build
|
|
67
|
+
run: |
|
|
68
|
+
npmci node install stable
|
|
69
|
+
npmci npm install
|
|
70
|
+
npmci command npm run build
|
|
71
|
+
|
|
72
|
+
release:
|
|
73
|
+
needs: test
|
|
74
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
container:
|
|
77
|
+
image: code.foss.global/hosttoday/ht-docker-dbase:npmci
|
|
78
|
+
|
|
79
|
+
steps:
|
|
80
|
+
- uses: actions/checkout@v3
|
|
81
|
+
|
|
82
|
+
- name: Prepare
|
|
83
|
+
run: |
|
|
84
|
+
pnpm install -g pnpm
|
|
85
|
+
pnpm install -g @ship.zone/npmci
|
|
86
|
+
|
|
87
|
+
- name: Release
|
|
88
|
+
run: |
|
|
89
|
+
npmci docker login
|
|
90
|
+
npmci docker build
|
|
91
|
+
npmci docker test
|
|
92
|
+
# npmci docker push {{git.host}}
|
|
93
|
+
npmci docker push {{git.host}}
|
|
94
|
+
|
|
95
|
+
metadata:
|
|
96
|
+
needs: test
|
|
97
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
98
|
+
runs-on: ubuntu-latest
|
|
99
|
+
container:
|
|
100
|
+
image: ${-{ env.IMAGE }-}
|
|
101
|
+
|
|
102
|
+
steps:
|
|
103
|
+
- uses: actions/checkout@v3
|
|
104
|
+
|
|
105
|
+
- name: Trigger
|
|
106
|
+
run: npmci trigger
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# gitzone ci_docker
|
|
2
|
+
image: code.foss.global/hosttoday/ht-docker-node:npmci
|
|
3
|
+
|
|
4
|
+
cache:
|
|
5
|
+
paths:
|
|
6
|
+
- .npmci-cache/
|
|
7
|
+
key: '$CI_BUILD_STAGE'
|
|
8
|
+
|
|
9
|
+
before_script:
|
|
10
|
+
- pnpm install -g pnpm
|
|
11
|
+
- pnpm install -g @ship.zone/npmci
|
|
12
|
+
- npmci npm prepare
|
|
13
|
+
|
|
14
|
+
stages:
|
|
15
|
+
- security
|
|
16
|
+
- test
|
|
17
|
+
- release
|
|
18
|
+
- metadata
|
|
19
|
+
- pages
|
|
20
|
+
|
|
21
|
+
# ====================
|
|
22
|
+
# security stage
|
|
23
|
+
# ====================
|
|
24
|
+
auditProductionDependencies:
|
|
25
|
+
image: code.foss.global/hosttoday/ht-docker-node:npmci
|
|
26
|
+
stage: security
|
|
27
|
+
script:
|
|
28
|
+
- npmci command npm config set registry https://registry.npmjs.org
|
|
29
|
+
- npmci command pnpm audit --audit-level=high --prod
|
|
30
|
+
tags:
|
|
31
|
+
- private
|
|
32
|
+
- docker
|
|
33
|
+
allow_failure: true
|
|
34
|
+
|
|
35
|
+
auditDevDependencies:
|
|
36
|
+
image: code.foss.global/hosttoday/ht-docker-node:npmci
|
|
37
|
+
stage: security
|
|
38
|
+
script:
|
|
39
|
+
- npmci command npm config set registry https://registry.npmjs.org
|
|
40
|
+
- npmci command pnpm audit --audit-level=high --dev
|
|
41
|
+
tags:
|
|
42
|
+
- private
|
|
43
|
+
- docker
|
|
44
|
+
allow_failure: true
|
|
45
|
+
|
|
46
|
+
# ====================
|
|
47
|
+
# test stage
|
|
48
|
+
# ====================
|
|
49
|
+
testStable:
|
|
50
|
+
stage: test
|
|
51
|
+
script:
|
|
52
|
+
- npmci npm prepare
|
|
53
|
+
- npmci node install stable
|
|
54
|
+
- npmci npm install
|
|
55
|
+
- npmci npm test
|
|
56
|
+
coverage: /\d+.?\d+?\%\s*coverage/
|
|
57
|
+
tags:
|
|
58
|
+
- private
|
|
59
|
+
- docker
|
|
60
|
+
|
|
61
|
+
testBuild:
|
|
62
|
+
stage: test
|
|
63
|
+
script:
|
|
64
|
+
- npmci npm prepare
|
|
65
|
+
- npmci node install stable
|
|
66
|
+
- npmci npm install
|
|
67
|
+
- npmci command npm run build
|
|
68
|
+
coverage: /\d+.?\d+?\%\s*coverage/
|
|
69
|
+
tags:
|
|
70
|
+
- private
|
|
71
|
+
- docker
|
|
72
|
+
- notprivileged
|
|
73
|
+
|
|
74
|
+
# ====================
|
|
75
|
+
# release stage
|
|
76
|
+
# ====================
|
|
77
|
+
|
|
78
|
+
release:
|
|
79
|
+
image: code.foss.global/hosttoday/ht-docker-dbase:npmci
|
|
80
|
+
services:
|
|
81
|
+
- docker:stable-dind
|
|
82
|
+
stage: release
|
|
83
|
+
script:
|
|
84
|
+
- npmci docker login
|
|
85
|
+
- npmci docker build
|
|
86
|
+
- npmci docker test
|
|
87
|
+
- npmci docker push registry.gitlab.com
|
|
88
|
+
only:
|
|
89
|
+
- tags
|
|
90
|
+
tags:
|
|
91
|
+
- private
|
|
92
|
+
- docker
|
|
93
|
+
- priv
|
|
94
|
+
|
|
95
|
+
# ====================
|
|
96
|
+
# metadata stage
|
|
97
|
+
# ====================
|
|
98
|
+
|
|
99
|
+
trigger:
|
|
100
|
+
stage: metadata
|
|
101
|
+
script:
|
|
102
|
+
- npmci trigger
|
|
103
|
+
only:
|
|
104
|
+
- tags
|
|
105
|
+
tags:
|
|
106
|
+
- private
|
|
107
|
+
- docker
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# gitzone dockerfile_service
|
|
2
|
+
## STAGE 1 // BUILD
|
|
3
|
+
FROM code.foss.global/hosttoday/ht-docker-node:npmci as node1
|
|
4
|
+
COPY ./ /app
|
|
5
|
+
WORKDIR /app
|
|
6
|
+
ARG NPMCI_TOKEN_NPM2
|
|
7
|
+
ENV NPMCI_TOKEN_NPM2 $NPMCI_TOKEN_NPM2
|
|
8
|
+
RUN npmci npm prepare
|
|
9
|
+
RUN pnpm config set store-dir .pnpm-store
|
|
10
|
+
RUN rm -rf node_modules && pnpm install
|
|
11
|
+
RUN pnpm run build
|
|
12
|
+
|
|
13
|
+
# gitzone dockerfile_service
|
|
14
|
+
## STAGE 2 // install production
|
|
15
|
+
FROM code.foss.global/hosttoday/ht-docker-node:npmci as node2
|
|
16
|
+
WORKDIR /app
|
|
17
|
+
COPY --from=node1 /app /app
|
|
18
|
+
RUN rm -rf .pnpm-store
|
|
19
|
+
ARG NPMCI_TOKEN_NPM2
|
|
20
|
+
ENV NPMCI_TOKEN_NPM2 $NPMCI_TOKEN_NPM2
|
|
21
|
+
RUN npmci npm prepare
|
|
22
|
+
RUN pnpm config set store-dir .pnpm-store
|
|
23
|
+
RUN rm -rf node_modules/ && pnpm install --prod
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## STAGE 3 // rebuild dependencies for alpine
|
|
27
|
+
FROM code.foss.global/hosttoday/ht-docker-node:alpinenpmci as node3
|
|
28
|
+
WORKDIR /app
|
|
29
|
+
COPY --from=node2 /app /app
|
|
30
|
+
ARG NPMCI_TOKEN_NPM2
|
|
31
|
+
ENV NPMCI_TOKEN_NPM2 $NPMCI_TOKEN_NPM2
|
|
32
|
+
RUN npmci npm prepare
|
|
33
|
+
RUN pnpm config set store-dir .pnpm-store
|
|
34
|
+
RUN pnpm rebuild -r
|
|
35
|
+
|
|
36
|
+
## STAGE 4 // the final production image with all dependencies in place
|
|
37
|
+
FROM code.foss.global/hosttoday/ht-docker-node:alpine as node4
|
|
38
|
+
WORKDIR /app
|
|
39
|
+
COPY --from=node3 /app /app
|
|
40
|
+
|
|
41
|
+
### Healthchecks
|
|
42
|
+
RUN pnpm install -g @servezone/healthy
|
|
43
|
+
HEALTHCHECK --interval=30s --timeout=30s --start-period=30s --retries=3 CMD [ "healthy" ]
|
|
44
|
+
|
|
45
|
+
EXPOSE 80
|
|
46
|
+
CMD ["npm", "start"]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) {{date.year}} {{module.author}} ({{module.contact}})
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@{{module.gitscope}}/{{module.gitrepo}}_meta",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "a meta package for {{module.gitscope}}",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"author": "{{module.author}}",
|
|
10
|
+
"license": "UNLICENSED"
|
|
11
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
fileName: package.json
|
|
3
|
+
---
|
|
4
|
+
{
|
|
5
|
+
"name": "{{module.npmPackagename}}",
|
|
6
|
+
"version": "1.0.1",
|
|
7
|
+
"private": false,
|
|
8
|
+
"description": "{{module.description}}",
|
|
9
|
+
"main": "dist_ts/index.js",
|
|
10
|
+
"typings": "dist_ts/index.d.ts",
|
|
11
|
+
"type": "module",
|
|
12
|
+
"author": "{{module.author}}",
|
|
13
|
+
"license": "{{module.license}}",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"test": "(tstest test/ --web)",
|
|
16
|
+
"build": "(tsbuild --web --allowimplicitany)",
|
|
17
|
+
"buildDocs": "(tsdoc)"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@git.zone/tsbuild": "^2.1.25",
|
|
21
|
+
"@git.zone/tsbundle": "^2.0.5",
|
|
22
|
+
"@git.zone/tsrun": "^1.2.46",
|
|
23
|
+
"@git.zone/tstest": "^1.0.44",
|
|
24
|
+
"@push.rocks/tapbundle": "^5.0.15",
|
|
25
|
+
"@types/node": "^20.8.7"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {}
|
|
28
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
defaults:
|
|
2
|
+
module.name: smartmodule
|
|
3
|
+
module.description: a smart description
|
|
4
|
+
module.author: Anonymous
|
|
5
|
+
module.contact: anonymous
|
|
6
|
+
module.license: UNLICENSED
|
|
7
|
+
module.githost: gitlab.com
|
|
8
|
+
module.npmAccessLevel: private
|
|
9
|
+
projectType: npm
|
|
10
|
+
usageInfo: Use TypeScript for best in class intellisense
|
|
11
|
+
|
|
12
|
+
dependencies:
|
|
13
|
+
merge:
|
|
14
|
+
- ../gitignore
|
|
15
|
+
- ../ci_default
|
|
16
|
+
- ../tsconfig_update
|
|
17
|
+
- ../npmextra
|
|
18
|
+
- ../vscode
|
|
19
|
+
- ../readme
|
|
20
|
+
|
|
21
|
+
runafter:
|
|
22
|
+
- pnpm install
|
|
23
|
+
- gitzone format
|
|
24
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"gitzone": {
|
|
3
|
+
"projectType": "{{projectType}}",
|
|
4
|
+
"module": {
|
|
5
|
+
"githost": "{{module.githost}}",
|
|
6
|
+
"gitscope": "{{module.gitscope}}",
|
|
7
|
+
"gitrepo": "{{module.gitrepo}}",
|
|
8
|
+
"description": "{{module.description}}",
|
|
9
|
+
"npmPackagename": "{{module.npmPackagename}}",
|
|
10
|
+
"license": "{{module.license}}",
|
|
11
|
+
"projectDomain": "{{module.projectDomain}}"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"npmci": {
|
|
15
|
+
"npmGlobalTools": [],
|
|
16
|
+
"npmAccessLevel": "{{module.npmAccessLevel}}"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
fileName: package.json
|
|
3
|
+
---
|
|
4
|
+
{
|
|
5
|
+
"name": "{{module.npmPackagename}}",
|
|
6
|
+
"version": "1.0.1",
|
|
7
|
+
"description": "{{module.description}}",
|
|
8
|
+
"main": "dist_ts/index.js",
|
|
9
|
+
"typings": "dist_ts/index.d.ts",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"author": "{{service.author}}",
|
|
12
|
+
"license": "UNLICENSED",
|
|
13
|
+
"scripts": {
|
|
14
|
+
"test": "(tstest test/)",
|
|
15
|
+
"start": "(node --max_old_space_size=100 ./cli.js)",
|
|
16
|
+
"startTs": "(node cli.ts.js)",
|
|
17
|
+
"build": "(tsbuild --web --allowimplicitany)"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@git.zone/tsbuild": "^2.1.17",
|
|
21
|
+
"@git.zone/tsrun": "^1.2.8",
|
|
22
|
+
"@git.zone/tstest": "^1.0.28",
|
|
23
|
+
"@git.zone/tswatch": "^2.0.1",
|
|
24
|
+
"@push.rocks/tapbundle": "^5.0.3"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@api.global/typedserver": "^1.0.24",
|
|
28
|
+
"@push.rocks/projectinfo": "^5.0.1",
|
|
29
|
+
"@push.rocks/qenv": "^4.0.10",
|
|
30
|
+
"@push.rocks/smartdata": "^5.0.7",
|
|
31
|
+
"@push.rocks/smartpath": "^5.0.5",
|
|
32
|
+
"@push.rocks/smartstate": "^2.0.0"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
defaults:
|
|
2
|
+
module.name: smartmodule
|
|
3
|
+
module.description: a smart description
|
|
4
|
+
module.author: Anonymous
|
|
5
|
+
module.license: UNLICENSED
|
|
6
|
+
module.githost: gitlab.com
|
|
7
|
+
projectType: service
|
|
8
|
+
|
|
9
|
+
dependencies:
|
|
10
|
+
merge:
|
|
11
|
+
- ../gitignore
|
|
12
|
+
- ../ci_docker
|
|
13
|
+
- ../dockerfile_service
|
|
14
|
+
- ../tsconfig_update
|
|
15
|
+
- ../cli
|
|
16
|
+
- ../readme
|
|
17
|
+
- ../vscode
|
|
18
|
+
|
|
19
|
+
runafter:
|
|
20
|
+
- pnpm install
|
|
21
|
+
- gitzone format
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"gitzone": {
|
|
3
|
+
"projectType": "{{projectType}}",
|
|
4
|
+
"module": {
|
|
5
|
+
"githost": "{{module.githost}}",
|
|
6
|
+
"gitscope": "{{module.gitscope}}",
|
|
7
|
+
"gitrepo": "{{module.gitrepo}}",
|
|
8
|
+
"description": "{{module.description}}",
|
|
9
|
+
"npmPackagename": "{{module.npmPackagename}}",
|
|
10
|
+
"license": "{{module.license}}",
|
|
11
|
+
"projectDomain": "{{module.projectDomain}}"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"npmci": {
|
|
15
|
+
"npmGlobalTools": [],
|
|
16
|
+
"dockerRegistryRepoMap": {
|
|
17
|
+
"registry.gitlab.com": "{{dockerTargetImagePath}}"
|
|
18
|
+
},
|
|
19
|
+
"dockerBuildargEnvMap": {
|
|
20
|
+
"NPMCI_TOKEN_NPM2": "NPMCI_TOKEN_NPM2"
|
|
21
|
+
},
|
|
22
|
+
"npmRegistryUrl": "{{npmPrivateRegistry}}"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
fileName: {{module.name}}.classes.{{module.name}}db.ts
|
|
3
|
+
---
|
|
4
|
+
import * as plugins from './{{module.name}}.plugins.js';
|
|
5
|
+
import { {{module.name}} } from './{{module.name}}.classes.{{module.name}}.js';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export class {{module.name}}Db {
|
|
10
|
+
public smartdataDb: plugins.smartdata.SmartdataDb;
|
|
11
|
+
public {{module.name}}Ref: {{module.name}};
|
|
12
|
+
|
|
13
|
+
constructor({{module.name}}RefArg: {{module.name}}) {
|
|
14
|
+
this.{{module.name}}Ref = {{module.name}}RefArg;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public async start() {
|
|
18
|
+
this.smartdataDb = new plugins.smartdata.SmartdataDb({
|
|
19
|
+
mongoDbUser: this.{{module.name}}Ref.serviceQenv.getEnvVarOnDemand('MONGO_DB_USER'),
|
|
20
|
+
mongoDbName: this.{{module.name}}Ref.serviceQenv.getEnvVarOnDemand('MONGO_DB_NAME'),
|
|
21
|
+
mongoDbPass: this.{{module.name}}Ref.serviceQenv.getEnvVarOnDemand('MONGO_DB_PASS'),
|
|
22
|
+
mongoDbUrl: this.{{module.name}}Ref.serviceQenv.getEnvVarOnDemand('MONGO_DB_URL'),
|
|
23
|
+
});
|
|
24
|
+
await this.smartdataDb.init();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public async stop() {
|
|
28
|
+
await this.smartdataDb.close();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
fileName: {{module.name}}.classes.{{module.name}}.ts
|
|
3
|
+
---
|
|
4
|
+
import * as plugins from './{{module.name}}.plugins.js';
|
|
5
|
+
import * as paths from './{{module.name}}.paths.js';
|
|
6
|
+
import { {{module.name}}Db } from './{{module.name}}.db.js'
|
|
7
|
+
|
|
8
|
+
export class {{module.name}} {
|
|
9
|
+
public projectinfo: plugins.projectinfo.ProjectInfo;
|
|
10
|
+
public serverInstance: plugins.loleServiceserver.ServiceServer;
|
|
11
|
+
public serviceQenv = new plugins.qenv.Qenv('./', './.nogit');
|
|
12
|
+
public {{module.name}}Db: {{module.name}}Db;
|
|
13
|
+
|
|
14
|
+
public async start() {
|
|
15
|
+
this.{{module.name}}Db = new {{module.name}}Db;
|
|
16
|
+
this.projectinfo = new plugins.projectinfo.ProjectInfo(paths.packageDir);
|
|
17
|
+
this.serverInstance = new plugins.loleServiceserver.ServiceServer({
|
|
18
|
+
serviceDomain: '{{module.domain}}',
|
|
19
|
+
serviceName: '{{module.name}}',
|
|
20
|
+
serviceVersion: this.projectinfo.npm.version,
|
|
21
|
+
addCustomRoutes: async (serverArg) => {
|
|
22
|
+
// any custom route configs go here
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
await this.serverInstance.start();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
fileName: {{module.name}}.plugins.ts
|
|
3
|
+
---
|
|
4
|
+
// node native
|
|
5
|
+
import * as path from 'path';
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
path
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// @api.global scope
|
|
12
|
+
import * as loleServiceserver from '@api.global/typedserver';
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
loleServiceserver
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// pushrocks scope
|
|
19
|
+
// pushrocks scope
|
|
20
|
+
import * as projectinfo from '@push.rocks/projectinfo';
|
|
21
|
+
import * as qenv from '@push.rocks/qenv';
|
|
22
|
+
import * as smartdata from '@push.rocks/smartdata';
|
|
23
|
+
import * as smartpath from '@push.rocks/smartpath';
|
|
24
|
+
|
|
25
|
+
export { projectinfo, qenv, smartdata, smartpath };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"experimentalDecorators": true,
|
|
4
|
+
"useDefineForClassFields": false,
|
|
5
|
+
"target": "ES2022",
|
|
6
|
+
"module": "NodeNext",
|
|
7
|
+
"moduleResolution": "NodeNext",
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"verbatimModuleSyntax": true
|
|
10
|
+
},
|
|
11
|
+
"exclude": [
|
|
12
|
+
"dist_*/**/*.d.ts"
|
|
13
|
+
]
|
|
14
|
+
}
|