@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.
Files changed (190) hide show
  1. package/assets/templates/ci_default/.gitea/workflows/default_nottags.yaml +66 -0
  2. package/assets/templates/ci_default/.gitea/workflows/default_tags.yaml +124 -0
  3. package/assets/templates/ci_default_gitlab/.gitlab-ci.yml +128 -0
  4. package/assets/templates/ci_default_private/.gitea/workflows/default_nottags.yaml +66 -0
  5. package/assets/templates/ci_default_private/.gitea/workflows/default_tags.yaml +124 -0
  6. package/assets/templates/ci_default_private_gitlab/.gitlab-ci.yml +133 -0
  7. package/assets/templates/ci_docker/.gitea/workflows/docker_nottags.yaml +71 -0
  8. package/assets/templates/ci_docker/.gitea/workflows/docker_tags.yaml +106 -0
  9. package/assets/templates/ci_docker_gitlab/.gitlab-ci.yml +107 -0
  10. package/assets/templates/cli/cli.child.ts +4 -0
  11. package/assets/templates/cli/cli.js +4 -0
  12. package/assets/templates/cli/cli.ts.js +5 -0
  13. package/assets/templates/dockerfile_service/Dockerfile +46 -0
  14. package/assets/templates/dockerfile_service/dockerignore +4 -0
  15. package/assets/templates/gitignore/_gitignore +23 -0
  16. package/assets/templates/license_mit/license +19 -0
  17. package/assets/templates/meta/.meta.json +3 -0
  18. package/assets/templates/meta/.smartscaf.yml +5 -0
  19. package/assets/templates/meta/package.json +11 -0
  20. package/assets/templates/npm/.package.json +28 -0
  21. package/assets/templates/npm/.smartscaf.yml +24 -0
  22. package/assets/templates/npm/test/test.ts +8 -0
  23. package/assets/templates/npm/ts/index.ts +3 -0
  24. package/assets/templates/npm/ts/some.plugins.ts +7 -0
  25. package/assets/templates/npmextra/npmextra.json +18 -0
  26. package/assets/templates/readme/readme.md +5 -0
  27. package/assets/templates/service/.package.json +34 -0
  28. package/assets/templates/service/.smartscaf.yml +21 -0
  29. package/assets/templates/service/npmextra.json +24 -0
  30. package/assets/templates/service/ts/00_commitinfo_data.ts +8 -0
  31. package/assets/templates/service/ts/index.ts +4 -0
  32. package/assets/templates/service/ts/some.classes.some.db.ts +30 -0
  33. package/assets/templates/service/ts/some.classes.some.ts +27 -0
  34. package/assets/templates/service/ts/some.paths.ts +9 -0
  35. package/assets/templates/service/ts/some.plugins.ts +25 -0
  36. package/assets/templates/tsconfig_update/tsconfig.json +14 -0
  37. package/assets/templates/vscode/.vscode/launch.json +11 -0
  38. package/assets/templates/vscode/.vscode/settings.json +26 -0
  39. package/assets/templates/wcc/.package.json +47 -0
  40. package/assets/templates/wcc/.smartscaf.yml +20 -0
  41. package/assets/templates/wcc/ts_web/elements/first-element.ts +47 -0
  42. package/assets/templates/wcc/ts_web/elements/index.ts +1 -0
  43. package/assets/templates/wcc/ts_web/index.ts +1 -0
  44. package/assets/templates/wcc/ts_web/pages/index.ts +2 -0
  45. package/assets/templates/wcc/ts_web/pages/page1.ts +5 -0
  46. package/assets/templates/wcc/ts_web/pages/page2.ts +5 -0
  47. package/assets/templates/wcc_update/html/index.html +25 -0
  48. package/assets/templates/wcc_update/html/index.ts +10 -0
  49. package/assets/templates/website/.package.json +40 -0
  50. package/assets/templates/website/.smartscaf.yml +17 -0
  51. package/assets/templates/website/Dockerfile +3 -0
  52. package/assets/templates/website/npmextra.json +24 -0
  53. package/assets/templates/website/qenv.yml +1 -0
  54. package/assets/templates/website/readme.md +1 -0
  55. package/assets/templates/website/ts/ffb.paths.ts +7 -0
  56. package/assets/templates/website/ts/ffb.plugins.ts +14 -0
  57. package/assets/templates/website/ts/index.ts +12 -0
  58. package/assets/templates/website/ts_web/elements/header.ts +62 -0
  59. package/assets/templates/website/ts_web/index.ts +63 -0
  60. package/assets/templates/website_update/html/index.html +110 -0
  61. package/cli.js +4 -0
  62. package/dist_ts/00_commitinfo_data.d.ts +8 -0
  63. package/dist_ts/00_commitinfo_data.js +9 -0
  64. package/dist_ts/classes.gitzoneconfig.d.ts +31 -0
  65. package/dist_ts/classes.gitzoneconfig.js +21 -0
  66. package/dist_ts/classes.project.d.ts +11 -0
  67. package/dist_ts/classes.project.js +23 -0
  68. package/dist_ts/gitzone.cli.d.ts +1 -0
  69. package/dist_ts/gitzone.cli.js +82 -0
  70. package/dist_ts/gitzone.config.d.ts +28 -0
  71. package/dist_ts/gitzone.config.js +21 -0
  72. package/dist_ts/gitzone.logging.d.ts +2 -0
  73. package/dist_ts/gitzone.logging.js +14 -0
  74. package/dist_ts/gitzone.monitor.d.ts +1 -0
  75. package/dist_ts/gitzone.monitor.js +2 -0
  76. package/dist_ts/gitzone.paths.d.ts +4 -0
  77. package/dist_ts/gitzone.paths.js +6 -0
  78. package/dist_ts/gitzone.plugins.d.ts +10 -0
  79. package/dist_ts/gitzone.plugins.js +11 -0
  80. package/dist_ts/index.d.ts +1 -0
  81. package/dist_ts/index.js +10 -0
  82. package/dist_ts/mod_audit/index.d.ts +1 -0
  83. package/dist_ts/mod_audit/index.js +2 -0
  84. package/dist_ts/mod_commit/index.d.ts +1 -0
  85. package/dist_ts/mod_commit/index.js +68 -0
  86. package/dist_ts/mod_commit/mod.plugins.d.ts +5 -0
  87. package/dist_ts/mod_commit/mod.plugins.js +6 -0
  88. package/dist_ts/mod_deprecate/index.d.ts +1 -0
  89. package/dist_ts/mod_deprecate/index.js +34 -0
  90. package/dist_ts/mod_deprecate/mod.plugins.d.ts +4 -0
  91. package/dist_ts/mod_deprecate/mod.plugins.js +5 -0
  92. package/dist_ts/mod_format/format.classes.project.d.ts +8 -0
  93. package/dist_ts/mod_format/format.classes.project.js +20 -0
  94. package/dist_ts/mod_format/format.cleanup.d.ts +2 -0
  95. package/dist_ts/mod_format/format.cleanup.js +18 -0
  96. package/dist_ts/mod_format/format.copy.d.ts +2 -0
  97. package/dist_ts/mod_format/format.copy.js +5 -0
  98. package/dist_ts/mod_format/format.gitignore.d.ts +2 -0
  99. package/dist_ts/mod_format/format.gitignore.js +19 -0
  100. package/dist_ts/mod_format/format.license.d.ts +2 -0
  101. package/dist_ts/mod_format/format.license.js +23 -0
  102. package/dist_ts/mod_format/format.npmextra.d.ts +5 -0
  103. package/dist_ts/mod_format/format.npmextra.js +59 -0
  104. package/dist_ts/mod_format/format.packagejson.d.ts +2 -0
  105. package/dist_ts/mod_format/format.packagejson.js +104 -0
  106. package/dist_ts/mod_format/format.prettier.d.ts +2 -0
  107. package/dist_ts/mod_format/format.prettier.js +51 -0
  108. package/dist_ts/mod_format/format.readme.d.ts +2 -0
  109. package/dist_ts/mod_format/format.readme.js +40 -0
  110. package/dist_ts/mod_format/format.templates.d.ts +5 -0
  111. package/dist_ts/mod_format/format.templates.js +67 -0
  112. package/dist_ts/mod_format/index.d.ts +1 -0
  113. package/dist_ts/mod_format/index.js +30 -0
  114. package/dist_ts/mod_format/mod.plugins.d.ts +11 -0
  115. package/dist_ts/mod_format/mod.plugins.js +12 -0
  116. package/dist_ts/mod_helpers/index.d.ts +1 -0
  117. package/dist_ts/mod_helpers/index.js +10 -0
  118. package/dist_ts/mod_helpers/mod.plugins.d.ts +3 -0
  119. package/dist_ts/mod_helpers/mod.plugins.js +4 -0
  120. package/dist_ts/mod_meta/index.d.ts +1 -0
  121. package/dist_ts/mod_meta/index.js +25 -0
  122. package/dist_ts/mod_meta/meta.classes.meta.d.ts +53 -0
  123. package/dist_ts/mod_meta/meta.classes.meta.js +174 -0
  124. package/dist_ts/mod_meta/meta.interfaces.d.ts +5 -0
  125. package/dist_ts/mod_meta/meta.interfaces.js +2 -0
  126. package/dist_ts/mod_meta/meta.plugins.d.ts +6 -0
  127. package/dist_ts/mod_meta/meta.plugins.js +7 -0
  128. package/dist_ts/mod_open/index.d.ts +1 -0
  129. package/dist_ts/mod_open/index.js +12 -0
  130. package/dist_ts/mod_open/mod.plugins.d.ts +4 -0
  131. package/dist_ts/mod_open/mod.plugins.js +5 -0
  132. package/dist_ts/mod_standard/index.d.ts +1 -0
  133. package/dist_ts/mod_standard/index.js +25 -0
  134. package/dist_ts/mod_standard/mod.plugins.d.ts +3 -0
  135. package/dist_ts/mod_standard/mod.plugins.js +4 -0
  136. package/dist_ts/mod_start/index.d.ts +6 -0
  137. package/dist_ts/mod_start/index.js +22 -0
  138. package/dist_ts/mod_start/mod.plugins.d.ts +3 -0
  139. package/dist_ts/mod_start/mod.plugins.js +5 -0
  140. package/dist_ts/mod_template/index.d.ts +8 -0
  141. package/dist_ts/mod_template/index.js +47 -0
  142. package/dist_ts/mod_template/mod.plugins.d.ts +5 -0
  143. package/dist_ts/mod_template/mod.plugins.js +6 -0
  144. package/dist_ts/paths.d.ts +4 -0
  145. package/dist_ts/paths.js +6 -0
  146. package/dist_ts/plugins.d.ts +11 -0
  147. package/dist_ts/plugins.js +11 -0
  148. package/license +19 -0
  149. package/npmextra.json +34 -0
  150. package/package.json +107 -0
  151. package/readme.hints.md +1 -0
  152. package/readme.md +207 -0
  153. package/ts/00_commitinfo_data.ts +8 -0
  154. package/ts/classes.gitzoneconfig.ts +47 -0
  155. package/ts/classes.project.ts +28 -0
  156. package/ts/gitzone.cli.ts +101 -0
  157. package/ts/gitzone.logging.ts +15 -0
  158. package/ts/index.ts +9 -0
  159. package/ts/mod_audit/index.ts +1 -0
  160. package/ts/mod_commit/index.ts +73 -0
  161. package/ts/mod_commit/mod.plugins.ts +7 -0
  162. package/ts/mod_deprecate/index.ts +37 -0
  163. package/ts/mod_deprecate/mod.plugins.ts +6 -0
  164. package/ts/mod_format/format.cleanup.ts +19 -0
  165. package/ts/mod_format/format.copy.ts +6 -0
  166. package/ts/mod_format/format.gitignore.ts +21 -0
  167. package/ts/mod_format/format.license.ts +24 -0
  168. package/ts/mod_format/format.npmextra.ts +70 -0
  169. package/ts/mod_format/format.packagejson.ts +120 -0
  170. package/ts/mod_format/format.prettier.ts +58 -0
  171. package/ts/mod_format/format.readme.ts +47 -0
  172. package/ts/mod_format/format.templates.ts +71 -0
  173. package/ts/mod_format/index.ts +38 -0
  174. package/ts/mod_format/mod.plugins.ts +13 -0
  175. package/ts/mod_helpers/index.ts +10 -0
  176. package/ts/mod_helpers/mod.plugins.ts +5 -0
  177. package/ts/mod_meta/index.ts +26 -0
  178. package/ts/mod_meta/meta.classes.meta.ts +234 -0
  179. package/ts/mod_meta/meta.interfaces.ts +3 -0
  180. package/ts/mod_meta/meta.plugins.ts +8 -0
  181. package/ts/mod_open/index.ts +15 -0
  182. package/ts/mod_open/mod.plugins.ts +5 -0
  183. package/ts/mod_standard/index.ts +29 -0
  184. package/ts/mod_standard/mod.plugins.ts +4 -0
  185. package/ts/mod_start/index.ts +26 -0
  186. package/ts/mod_start/mod.plugins.ts +6 -0
  187. package/ts/mod_template/index.ts +52 -0
  188. package/ts/mod_template/mod.plugins.ts +7 -0
  189. package/ts/paths.ts +9 -0
  190. 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,4 @@
1
+ #!/usr/bin/env node
2
+ process.env.CLI_CALL = 'true';
3
+ import * as cliTool from './ts/index.js';
4
+ cliTool.runCli();
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ process.env.CLI_CALL = 'true';
3
+ const cliTool = await import('./dist_ts/index.js');
4
+ cliTool.runCli();
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ process.env.CLI_CALL = 'true';
3
+
4
+ import * as tsrun from '@git.zone/tsrun';
5
+ tsrun.runPath('./cli.child.js', import.meta.url);
@@ -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,4 @@
1
+ ---
2
+ fileName: .dockerignore
3
+ ---
4
+ node_modules/
@@ -0,0 +1,23 @@
1
+ ---
2
+ fileName: .gitignore
3
+ ---
4
+ .nogit/
5
+
6
+ # artifacts
7
+ coverage/
8
+ public/
9
+ pages/
10
+
11
+ # installs
12
+ node_modules/
13
+
14
+ # caches
15
+ .yarn/
16
+ .cache/
17
+ .rpt2_cache
18
+
19
+ # builds
20
+ dist/
21
+ dist_*/
22
+
23
+ # custom
@@ -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,3 @@
1
+ {
2
+ "projects": {}
3
+ }
@@ -0,0 +1,5 @@
1
+ runafter:
2
+ - git add -A && git commit -m initial
3
+ - git push origin master
4
+ - gitzone meta update
5
+
@@ -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,8 @@
1
+ import { expect, expectAsync, tap } from '@push.rocks/tapbundle';
2
+ import * as {{module.name}} from '../ts/index.js'
3
+
4
+ tap.test('first test', async () => {
5
+ console.log({{module.name}})
6
+ })
7
+
8
+ tap.start()
@@ -0,0 +1,3 @@
1
+ import * as plugins from './{{module.name}}.plugins.js';
2
+
3
+ export let demoExport = 'Hi there! :) This is an exported string';
@@ -0,0 +1,7 @@
1
+ ---
2
+ fileName: {{module.name}}.plugins.ts
3
+ ---
4
+ const removeme = {};
5
+ export {
6
+ removeme
7
+ }
@@ -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,5 @@
1
+ # @{{module.gitscope}}/{{module.gitrepo}}
2
+ {{module.description}}
3
+
4
+ ## How to create the docs
5
+ To create docs run gitzone aidoc.
@@ -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,8 @@
1
+ /**
2
+ * autocreated commitinfo by @push.rocks/commitinfo
3
+ */
4
+ export const commitinfo = {
5
+ name: '{{module.name}}',
6
+ version: '1.0.0',
7
+ description: '{{module.description}}'
8
+ }
@@ -0,0 +1,4 @@
1
+ export * from './00_commitinfo_data.js';
2
+ import { {{module.name}} } from './{{module.name}}.classes.{{module.name}}.js'
3
+
4
+ export const runCli = async () => {}
@@ -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,9 @@
1
+ ---
2
+ fileName: {{module.name}}.paths.ts
3
+ ---
4
+ import * as plugins from './{{module.name}}.plugins.js';
5
+
6
+ export const packageDir = plugins.path.join(
7
+ plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
8
+ '../'
9
+ );
@@ -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
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "command": "npm test",
6
+ "name": "Run npm test",
7
+ "request": "launch",
8
+ "type": "node-terminal"
9
+ }
10
+ ]
11
+ }