fix(core): update

This commit is contained in:
2024-06-21 19:48:43 +02:00
commit 84a10a89de
109 changed files with 11639 additions and 0 deletions

View File

@ -0,0 +1,66 @@
name: Default (not tags)
on:
push:
tags-ignore:
- '**'
env:
IMAGE: code.foss.global/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${-{gitea.repository_owner}-}:${-{secrets.GITEA_TOKEN}-}@{{git.host}}/${-{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

View File

@ -0,0 +1,124 @@
name: Default (tags)
on:
push:
tags:
- '*'
env:
IMAGE: code.foss.global/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${-{gitea.repository_owner}-}:${-{secrets.GITEA_TOKEN}-}@{{git.host}}/${-{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

View File

@ -0,0 +1,128 @@
# gitzone ci_default
image: code.foss.global/hosttoday/ht-docker-node:npmci
cache:
paths:
- .npmci_cache/
key: '$CI_BUILD_STAGE'
stages:
- security
- test
- release
- metadata
before_script:
- pnpm install -g pnpm
- pnpm install -g @ship.zone/npmci
- npmci npm prepare
# ====================
# security stage
# ====================
# ====================
# security stage
# ====================
auditProductionDependencies:
image: code.foss.global/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci command npm config set registry https://registry.npmjs.org
- npmci command pnpm audit --audit-level=high --prod
tags:
- private
- docker
allow_failure: true
auditDevDependencies:
image: code.foss.global/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci command npm config set registry https://registry.npmjs.org
- npmci command pnpm audit --audit-level=high --dev
tags:
- private
- docker
allow_failure: true
# ====================
# test stage
# ====================
testStable:
stage: test
script:
- npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
testBuild:
stage: test
script:
- npmci node install stable
- npmci npm install
- npmci npm build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
release:
stage: release
script:
- npmci node install stable
- npmci npm publish
only:
- tags
tags:
- private
- docker
- notprivileged
# ====================
# metadata stage
# ====================
codequality:
stage: metadata
allow_failure: true
only:
- tags
script:
- npmci command npm install -g typescript
- npmci npm prepare
- npmci npm install
tags:
- private
- docker
- priv
trigger:
stage: metadata
script:
- npmci trigger
only:
- tags
tags:
- private
- docker
- notprivileged
pages:
stage: metadata
script:
- npmci node install stable
- npmci npm install
- npmci command npm run buildDocs
tags:
- private
- docker
- notprivileged
only:
- tags
artifacts:
expire_in: 1 week
paths:
- public
allow_failure: true

View File

@ -0,0 +1,66 @@
name: Default (not tags)
on:
push:
tags-ignore:
- '**'
env:
IMAGE: code.foss.global/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${-{gitea.repository_owner}-}:${-{secrets.GITEA_TOKEN}-}@{{git.host}}/${-{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

View File

@ -0,0 +1,124 @@
name: Default (tags)
on:
push:
tags:
- '*'
env:
IMAGE: code.foss.global/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${-{gitea.repository_owner}-}:${-{secrets.GITEA_TOKEN}-}@{{git.host}}/${-{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

View File

@ -0,0 +1,133 @@
# gitzone ci_default_private
image: code.foss.global/hosttoday/ht-docker-node:npmci
cache:
paths:
- .npmci_cache/
key: '$CI_BUILD_STAGE'
stages:
- security
- test
- release
- metadata
before_script:
- pnpm install -g pnpm
- pnpm install -g @ship.zone/npmci
- npmci npm prepare
# ====================
# security stage
# ====================
# ====================
# security stage
# ====================
auditProductionDependencies:
image: code.foss.global/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci command npm config set registry https://registry.npmjs.org
- npmci command pnpm audit --audit-level=high --prod
tags:
- private
- docker
allow_failure: true
auditDevDependencies:
image: code.foss.global/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci command npm config set registry https://registry.npmjs.org
- npmci command pnpm audit --audit-level=high --dev
tags:
- private
- docker
allow_failure: true
# ====================
# test stage
# ====================
testStable:
stage: test
script:
- npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- private
- docker
- notprivileged
testBuild:
stage: test
script:
- npmci node install stable
- npmci npm install
- npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- private
- docker
- notprivileged
release:
stage: release
script:
- npmci node install stable
- npmci npm publish
only:
- tags
tags:
- private
- docker
- notprivileged
# ====================
# metadata stage
# ====================
codequality:
stage: metadata
allow_failure: true
only:
- tags
script:
- npmci command npm install -g typescript
- npmci npm prepare
- npmci npm install
tags:
- private
- docker
- priv
trigger:
stage: metadata
script:
- npmci trigger
only:
- tags
tags:
- private
- docker
- notprivileged
pages:
stage: metadata
script:
- npmci node install lts
- npmci command npm install -g @git.zone/tsdoc
- npmci npm install
- npmci command tsdoc
tags:
- private
- docker
- notprivileged
only:
- tags
artifacts:
expire_in: 1 week
paths:
- public
allow_failure: true

View File

@ -0,0 +1,71 @@
name: Docker (tags)
on:
push:
tags-ignore:
- '**'
env:
IMAGE: code.foss.global/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${-{gitea.repository_owner}-}:${-{secrets.GITEA_TOKEN}-}@{{gi.host}}/${-{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_LOGIN_DOCKER_GITEA: ${-{ github.server_url }-}|${-{ gitea.repository_owner }-}|${-{ secrets.GITEA_TOKEN }-}
NPMCI_LOGIN_DOCKER_DOCKERREGISTRY: ${-{ secrets.NPMCI_LOGIN_DOCKER_DOCKERREGISTRY }-}
jobs:
security:
runs-on: ubuntu-latest
container:
image: ${-{ env.IMAGE }-}
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: Install pnpm and npmci
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:
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 npm prepare
npmci node install stable
npmci npm install
npmci command npm run build

View File

@ -0,0 +1,106 @@
name: Docker (tags)
on:
push:
tags:
- '*'
env:
IMAGE: code.foss.global/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${-{gitea.repository_owner}-}:${-{secrets.GITEA_TOKEN}-}@{{git.host}}/${-{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_LOGIN_DOCKER_GITEA: ${-{ github.server_url }-}|${-{ gitea.repository_owner }-}|${-{ secrets.GITEA_TOKEN }-}
NPMCI_LOGIN_DOCKER_DOCKERREGISTRY: ${-{ secrets.NPMCI_LOGIN_DOCKER_DOCKERREGISTRY }-}
jobs:
security:
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: 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:
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 command npm run build
release:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: code.foss.global/hosttoday/ht-docker-dbase:npmci
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @ship.zone/npmci
- name: Release
run: |
npmci docker login
npmci docker build
npmci docker test
# npmci docker push {{git.host}}
npmci docker push {{git.host}}
metadata:
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: Trigger
run: npmci trigger

View File

@ -0,0 +1,107 @@
# gitzone ci_docker
image: code.foss.global/hosttoday/ht-docker-node:npmci
cache:
paths:
- .npmci-cache/
key: '$CI_BUILD_STAGE'
before_script:
- pnpm install -g pnpm
- pnpm install -g @ship.zone/npmci
- npmci npm prepare
stages:
- security
- test
- release
- metadata
- pages
# ====================
# security stage
# ====================
auditProductionDependencies:
image: code.foss.global/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci command npm config set registry https://registry.npmjs.org
- npmci command pnpm audit --audit-level=high --prod
tags:
- private
- docker
allow_failure: true
auditDevDependencies:
image: code.foss.global/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci command npm config set registry https://registry.npmjs.org
- npmci command pnpm audit --audit-level=high --dev
tags:
- private
- docker
allow_failure: true
# ====================
# test stage
# ====================
testStable:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- private
- docker
testBuild:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- private
- docker
- notprivileged
# ====================
# release stage
# ====================
release:
image: code.foss.global/hosttoday/ht-docker-dbase:npmci
services:
- docker:stable-dind
stage: release
script:
- npmci docker login
- npmci docker build
- npmci docker test
- npmci docker push registry.gitlab.com
only:
- tags
tags:
- private
- docker
- priv
# ====================
# metadata stage
# ====================
trigger:
stage: metadata
script:
- npmci trigger
only:
- tags
tags:
- private
- docker

View File

@ -0,0 +1,4 @@
#!/usr/bin/env node
process.env.CLI_CALL = 'true';
import * as cliTool from './ts/index.js';
cliTool.runCli();

View File

@ -0,0 +1,4 @@
#!/usr/bin/env node
process.env.CLI_CALL = 'true';
const cliTool = await import('./dist_ts/index.js');
cliTool.runCli();

View File

@ -0,0 +1,5 @@
#!/usr/bin/env node
process.env.CLI_CALL = 'true';
import * as tsrun from '@git.zone/tsrun';
tsrun.runPath('./cli.child.js', import.meta.url);

View File

@ -0,0 +1,46 @@
# gitzone dockerfile_service
## STAGE 1 // BUILD
FROM code.foss.global/hosttoday/ht-docker-node:npmci as node1
COPY ./ /app
WORKDIR /app
ARG NPMCI_TOKEN_NPM2
ENV NPMCI_TOKEN_NPM2 $NPMCI_TOKEN_NPM2
RUN npmci npm prepare
RUN pnpm config set store-dir .pnpm-store
RUN rm -rf node_modules && pnpm install
RUN pnpm run build
# gitzone dockerfile_service
## STAGE 2 // install production
FROM code.foss.global/hosttoday/ht-docker-node:npmci as node2
WORKDIR /app
COPY --from=node1 /app /app
RUN rm -rf .pnpm-store
ARG NPMCI_TOKEN_NPM2
ENV NPMCI_TOKEN_NPM2 $NPMCI_TOKEN_NPM2
RUN npmci npm prepare
RUN pnpm config set store-dir .pnpm-store
RUN rm -rf node_modules/ && pnpm install --prod
## STAGE 3 // rebuild dependencies for alpine
FROM code.foss.global/hosttoday/ht-docker-node:alpinenpmci as node3
WORKDIR /app
COPY --from=node2 /app /app
ARG NPMCI_TOKEN_NPM2
ENV NPMCI_TOKEN_NPM2 $NPMCI_TOKEN_NPM2
RUN npmci npm prepare
RUN pnpm config set store-dir .pnpm-store
RUN pnpm rebuild -r
## STAGE 4 // the final production image with all dependencies in place
FROM code.foss.global/hosttoday/ht-docker-node:alpine as node4
WORKDIR /app
COPY --from=node3 /app /app
### Healthchecks
RUN pnpm install -g @servezone/healthy
HEALTHCHECK --interval=30s --timeout=30s --start-period=30s --retries=3 CMD [ "healthy" ]
EXPOSE 80
CMD ["npm", "start"]

View File

@ -0,0 +1,4 @@
---
fileName: .dockerignore
---
node_modules/

View File

@ -0,0 +1,23 @@
---
fileName: .gitignore
---
.nogit/
# artifacts
coverage/
public/
pages/
# installs
node_modules/
# caches
.yarn/
.cache/
.rpt2_cache
# builds
dist/
dist_*/
# custom

View File

@ -0,0 +1,19 @@
Copyright (c) {{date.year}} {{module.author}} ({{module.contact}})
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,3 @@
{
"projects": {}
}

View File

@ -0,0 +1,5 @@
runafter:
- git add -A && git commit -m initial
- git push origin master
- gitzone meta update

View File

@ -0,0 +1,11 @@
{
"name": "@{{module.gitscope}}/{{module.gitrepo}}_meta",
"version": "1.0.1",
"description": "a meta package for {{module.gitscope}}",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "{{module.author}}",
"license": "UNLICENSED"
}

View File

@ -0,0 +1,28 @@
---
fileName: package.json
---
{
"name": "{{module.npmPackagename}}",
"version": "1.0.1",
"private": false,
"description": "{{module.description}}",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"type": "module",
"author": "{{module.author}}",
"license": "{{module.license}}",
"scripts": {
"test": "(tstest test/ --web)",
"build": "(tsbuild --web --allowimplicitany)",
"buildDocs": "(tsdoc)"
},
"devDependencies": {
"@git.zone/tsbuild": "^2.1.25",
"@git.zone/tsbundle": "^2.0.5",
"@git.zone/tsrun": "^1.2.46",
"@git.zone/tstest": "^1.0.44",
"@push.rocks/tapbundle": "^5.0.15",
"@types/node": "^20.8.7"
},
"dependencies": {}
}

View File

@ -0,0 +1,24 @@
defaults:
module.name: smartmodule
module.description: a smart description
module.author: Anonymous
module.contact: anonymous
module.license: UNLICENSED
module.githost: gitlab.com
module.npmAccessLevel: private
projectType: npm
usageInfo: Use TypeScript for best in class intellisense
dependencies:
merge:
- ../gitignore
- ../ci_default
- ../tsconfig_update
- ../npmextra
- ../vscode
- ../readme
runafter:
- pnpm install
- gitzone format

View File

@ -0,0 +1,8 @@
import { expect, expectAsync, tap } from '@push.rocks/tapbundle';
import * as {{module.name}} from '../ts/index.js'
tap.test('first test', async () => {
console.log({{module.name}})
})
tap.start()

View File

@ -0,0 +1,3 @@
import * as plugins from './{{module.name}}.plugins.js';
export let demoExport = 'Hi there! :) This is an exported string';

View File

@ -0,0 +1,7 @@
---
fileName: {{module.name}}.plugins.ts
---
const removeme = {};
export {
removeme
}

View File

@ -0,0 +1,18 @@
{
"gitzone": {
"projectType": "{{projectType}}",
"module": {
"githost": "{{module.githost}}",
"gitscope": "{{module.gitscope}}",
"gitrepo": "{{module.gitrepo}}",
"description": "{{module.description}}",
"npmPackagename": "{{module.npmPackagename}}",
"license": "{{module.license}}",
"projectDomain": "{{module.projectDomain}}"
}
},
"npmci": {
"npmGlobalTools": [],
"npmAccessLevel": "{{module.npmAccessLevel}}"
}
}

View File

@ -0,0 +1,5 @@
# @{{module.gitscope}}/{{module.gitrepo}}
{{module.description}}
## How to create the docs
To create docs run gitzone aidoc.

View File

@ -0,0 +1,34 @@
---
fileName: package.json
---
{
"name": "{{module.npmPackagename}}",
"version": "1.0.1",
"description": "{{module.description}}",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"type": "module",
"author": "{{service.author}}",
"license": "UNLICENSED",
"scripts": {
"test": "(tstest test/)",
"start": "(node --max_old_space_size=100 ./cli.js)",
"startTs": "(node cli.ts.js)",
"build": "(tsbuild --web --allowimplicitany)"
},
"devDependencies": {
"@git.zone/tsbuild": "^2.1.17",
"@git.zone/tsrun": "^1.2.8",
"@git.zone/tstest": "^1.0.28",
"@git.zone/tswatch": "^2.0.1",
"@push.rocks/tapbundle": "^5.0.3"
},
"dependencies": {
"@api.global/typedserver": "^1.0.24",
"@push.rocks/projectinfo": "^5.0.1",
"@push.rocks/qenv": "^4.0.10",
"@push.rocks/smartdata": "^5.0.7",
"@push.rocks/smartpath": "^5.0.5",
"@push.rocks/smartstate": "^2.0.0"
}
}

View File

@ -0,0 +1,21 @@
defaults:
module.name: smartmodule
module.description: a smart description
module.author: Anonymous
module.license: UNLICENSED
module.githost: gitlab.com
projectType: service
dependencies:
merge:
- ../gitignore
- ../ci_docker
- ../dockerfile_service
- ../tsconfig_update
- ../cli
- ../readme
- ../vscode
runafter:
- pnpm install
- gitzone format

View File

@ -0,0 +1,24 @@
{
"gitzone": {
"projectType": "{{projectType}}",
"module": {
"githost": "{{module.githost}}",
"gitscope": "{{module.gitscope}}",
"gitrepo": "{{module.gitrepo}}",
"description": "{{module.description}}",
"npmPackagename": "{{module.npmPackagename}}",
"license": "{{module.license}}",
"projectDomain": "{{module.projectDomain}}"
}
},
"npmci": {
"npmGlobalTools": [],
"dockerRegistryRepoMap": {
"registry.gitlab.com": "{{dockerTargetImagePath}}"
},
"dockerBuildargEnvMap": {
"NPMCI_TOKEN_NPM2": "NPMCI_TOKEN_NPM2"
},
"npmRegistryUrl": "{{npmPrivateRegistry}}"
}
}

View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @push.rocks/commitinfo
*/
export const commitinfo = {
name: '{{module.name}}',
version: '1.0.0',
description: '{{module.description}}'
}

View File

@ -0,0 +1,4 @@
export * from './00_commitinfo_data.js';
import { {{module.name}} } from './{{module.name}}.classes.{{module.name}}.js'
export const runCli = async () => {}

View File

@ -0,0 +1,30 @@
---
fileName: {{module.name}}.classes.{{module.name}}db.ts
---
import * as plugins from './{{module.name}}.plugins.js';
import { {{module.name}} } from './{{module.name}}.classes.{{module.name}}.js';
export class {{module.name}}Db {
public smartdataDb: plugins.smartdata.SmartdataDb;
public {{module.name}}Ref: {{module.name}};
constructor({{module.name}}RefArg: {{module.name}}) {
this.{{module.name}}Ref = {{module.name}}RefArg;
}
public async start() {
this.smartdataDb = new plugins.smartdata.SmartdataDb({
mongoDbUser: this.{{module.name}}Ref.serviceQenv.getEnvVarOnDemand('MONGO_DB_USER'),
mongoDbName: this.{{module.name}}Ref.serviceQenv.getEnvVarOnDemand('MONGO_DB_NAME'),
mongoDbPass: this.{{module.name}}Ref.serviceQenv.getEnvVarOnDemand('MONGO_DB_PASS'),
mongoDbUrl: this.{{module.name}}Ref.serviceQenv.getEnvVarOnDemand('MONGO_DB_URL'),
});
await this.smartdataDb.init();
}
public async stop() {
await this.smartdataDb.close();
}
}

View File

@ -0,0 +1,27 @@
---
fileName: {{module.name}}.classes.{{module.name}}.ts
---
import * as plugins from './{{module.name}}.plugins.js';
import * as paths from './{{module.name}}.paths.js';
import { {{module.name}}Db } from './{{module.name}}.db.js'
export class {{module.name}} {
public projectinfo: plugins.projectinfo.ProjectInfo;
public serverInstance: plugins.loleServiceserver.ServiceServer;
public serviceQenv = new plugins.qenv.Qenv('./', './.nogit');
public {{module.name}}Db: {{module.name}}Db;
public async start() {
this.{{module.name}}Db = new {{module.name}}Db;
this.projectinfo = new plugins.projectinfo.ProjectInfo(paths.packageDir);
this.serverInstance = new plugins.loleServiceserver.ServiceServer({
serviceDomain: '{{module.domain}}',
serviceName: '{{module.name}}',
serviceVersion: this.projectinfo.npm.version,
addCustomRoutes: async (serverArg) => {
// any custom route configs go here
}
});
await this.serverInstance.start();
}
}

View File

@ -0,0 +1,9 @@
---
fileName: {{module.name}}.paths.ts
---
import * as plugins from './{{module.name}}.plugins.js';
export const packageDir = plugins.path.join(
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
'../'
);

View File

@ -0,0 +1,25 @@
---
fileName: {{module.name}}.plugins.ts
---
// node native
import * as path from 'path';
export {
path
}
// @api.global scope
import * as loleServiceserver from '@api.global/typedserver';
export {
loleServiceserver
}
// pushrocks scope
// pushrocks scope
import * as projectinfo from '@push.rocks/projectinfo';
import * as qenv from '@push.rocks/qenv';
import * as smartdata from '@push.rocks/smartdata';
import * as smartpath from '@push.rocks/smartpath';
export { projectinfo, qenv, smartdata, smartpath };

View File

@ -0,0 +1,14 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"verbatimModuleSyntax": true
},
"exclude": [
"dist_*/**/*.d.ts"
]
}

View File

@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "npm test",
"name": "Run npm test",
"request": "launch",
"type": "node-terminal"
}
]
}

View File

@ -0,0 +1,26 @@
{
"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"]
}
}
}
}
}
}
]
}

View File

@ -0,0 +1,47 @@
---
fileName: package.json
---
{
"name": "@{{module.scope}}/{{module.name}}",
"version": "1.0.55",
"private": false,
"description": "{{module.description}}",
"main": "dist_ts_web/index.js",
"typings": "dist_ts_web/index.d.ts",
"type": "module",
"scripts": {
"test": "npm run build",
"build": "tsbuild element && tsbundle element --production",
"watch": "tswatch element"
},
"author": "{{author.name}}",
"license": "{{license}}",
"dependencies": {
"@design.estate/dees-domtools": "^2.0.55",
"@design.estate/dees-element": "^2.0.33",
"@design.estate/dees-wcctools": "^1.0.37",
"@git.zone/tsrun": "^1.2.12",
"@push.rocks/smartlog": "^1.0.9"
},
"devDependencies": {
"@git.zone/tsbuild": "^2.1.24",
"@git.zone/tsbundle": "^2.0.10",
"@git.zone/tswatch": "^2.0.13",
"@push.rocks/projectinfo": "^5.0.2"
},
"files": [
"ts/**/*",
"ts_web/**/*",
"dist/**/*",
"dist_*/**/*",
"dist_ts/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
"npmextra.json",
"readme.md"
],
"browserslist": [
"last 1 Chrome versions"
]
}

View File

@ -0,0 +1,20 @@
defaults:
module.name: smartmodule
module.description: a smart description
module.author: Anonymous
module.license: UNLICENSED
dependencies:
merge:
- ../wcc_update
- ../gitignore
- ../ci_default
- ../tsconfig_update
- ../npmextra
- ../vscode
- ../readme
runafter:
- npm install
- gitzone format

View File

@ -0,0 +1,47 @@
import { DeesElement, property, html, customElement, type TemplateResult, css, cssManager } from '@design.estate/dees-element';
import * as domtools from '@design.estate/dees-domtools';
declare global {
interface HTMLElementTagNameMap {
'first-element': FirstElement;
}
}
@customElement('first-element')
export class FirstElement extends DeesElement {
public static demo = () => html`
<first-element .aProp="${'test'}"></first-element>
`;
@property({
type: String
})
public aProp: string = 'loading...';
constructor() {
super();
domtools.DomTools.setupDomTools();
}
public static styles = [
cssManager.defaultStyles,
css`
:host {
display: block;
background: blue;
color: white;
padding: 10px;
text-align: center;
}
`
]
public render(): TemplateResult {
return html`
<div class="mainbox">
${this.aProp}
</div>
`;
}
}

View File

@ -0,0 +1 @@
export * from './first-element.js';

View File

@ -0,0 +1 @@
export * from './elements/index.js';

View File

@ -0,0 +1,25 @@
<html lang="en">
<head>
<!--Lets set some basic meta tags-->
<meta
name="viewport"
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height"
/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--Lets load standard fonts-->
<link rel="preconnect" href="https://{{assetbrokerUrl}}" crossorigin>
<link rel="stylesheet" href="https://{{assetbrokerUrl}}/fonts/fonts.css">
<style>
body {
margin: 0px;
background: #222222;
}
</style>
<script type="module" src="/bundle.js"></script>
</head>
<body>
</body>
</html>

View File

@ -0,0 +1,10 @@
// dees tools
import * as deesWccTools from '@design.estate/dees-wcctools';
import * as deesDomTools from '@design.estate/dees-domtools';
// elements and pages
import * as elements from '../ts_web/elements/index.js';
import * as pages from '../ts_web/pages/index.js';
deesWccTools.setupWccTools(elements as any, pages);
deesDomTools.elementBasic.setup();

View File

@ -0,0 +1,40 @@
---
fileName: package.json
---
{
"name": "{{module.npmPackagename}}",
"version": "1.0.0",
"description": "{{module.description}}",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"type": "module",
"scripts": {
"test": "npm run build",
"build": "tsbuild --web --allowimplicitany && tsbundle website --production",
"watch": "tswatch website",
"start": "(node cli.js)",
"startTs": "(node cli.ts.js)"
},
"author": "{{author.name}}",
"license": "{{module.license}}",
"dependencies": {
"@api.global/typedserver": "^1.0.16",
"@consentsoftware_private/catalog": "^1.0.73",
"@design.estate/dees-domtools": "^2.0.23",
"@design.estate/dees-element": "^2.0.15",
"@push.rocks/smartlog": "^2.0.1",
"@push.rocks/qenv": "^5.0.2",
"@push.rocks/smartpath": "^5.0.5",
"@push.rocks/smartstate": "^2.0.0",
"@push.rocks/websetup": "^3.0.15"
},
"devDependencies": {
"@git.zone/tsbuild": "^2.1.17",
"@git.zone/tsbundle": "^2.0.3",
"@git.zone/tsrun": "^1.2.8",
"@git.zone/tswatch": "^2.0.1",
"@push.rocks/projectinfo": "^5.0.1",
"@types/node": "^18.11.15"
},
"private": true
}

View File

@ -0,0 +1,17 @@
defaults:
module.name: my.website
module.author: Task Venture Capital GmbH
module.license: UNLICENSED
module.description: a smart description for my.website
dependencies:
merge:
- ../website_update
- ../gitignore
- ../ci_docker
- ../tsconfig_update
- ../cli
runafter:
- gitzone format
- pnpm install

View File

@ -0,0 +1,3 @@
# gitzone dockerfile_service
# written by format action
#

View File

@ -0,0 +1,24 @@
{
"gitzone": {
"projectType": "website",
"module": {
"githost": "{{module.githost}}",
"gitscope": "{{module.gitscope}}",
"gitrepo": "{{module.gitrepo}}",
"description": "{{module.description}}",
"npmPackagename": "{{module.npmPackagename}}",
"license": "{{module.license}}",
"projectDomain": "{{module.projectDomain}}"
}
},
"npmci": {
"npmGlobalTools": [],
"dockerRegistryRepoMap": {
"registry.gitlab.com": "{{docker.registryImageTag}}"
},
"dockerBuildargEnvMap": {
"NPMCI_TOKEN_NPM2": "NPMCI_TOKEN_NPM2"
},
"npmRegistryUrl": "{{private.npmRegistryUrl}}"
}
}

View File

@ -0,0 +1 @@
required:

View File

@ -0,0 +1 @@
## Usage

View File

@ -0,0 +1,7 @@
import * as plugins from './ffb.plugins.js';
export const packageDir = plugins.path.join(
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
'../'
);
export const distWebDir = plugins.path.join(packageDir, 'dist_serve/');

View File

@ -0,0 +1,14 @@
// native scope
import * as path from 'path';
export { path };
// @api.global scope
import * as typedserver from '@api.global/typedserver';
export { typedserver };
// @pushrocks scope
import * as qenv from '@push.rocks/qenv';
import * as smartpath from '@push.rocks/smartpath';
export { qenv, smartpath };

View File

@ -0,0 +1,12 @@
import * as plugins from './ffb.plugins.js';
import * as paths from './ffb.paths.js';
export const runCli = async () => {
const serviceQenv = new plugins.qenv.Qenv('./', './.nogit', false);
const websiteServer = new plugins.loleWebsiteserver.LoleWebsiteServer({
feedMetadata: null,
domain: '{{module.projectDomain}}',
serveDir: paths.distWebDir
});
await websiteServer.start();
};

View File

@ -0,0 +1,62 @@
import {
customElement,
DeesElement,
property,
html,
cssManager,
unsafeCSS,
css,
TemplateResult,
} from '@design.estate/dees-element';
@customElement('default-header')
export class DefaultHeader extends DeesElement {
@property()
public someProperty = 'someProperty';
constructor() {
super();
}
public static styles = [
cssManager.defaultStyles,
css`
:host {
display: block;
height: 100px;
}
:host([hidden]) {
display: none;
}
.headerMain {
background: var(--background-accent);
color: #fff;
position: relative;
z-index: 1;
height: 100px;
}
.headerMain:after {
background: inherit;
bottom: 0;
content: '';
display: block;
height: 60%;
left: 0;
position: absolute;
right: 0;
transform: skewY(-2deg);
transform-origin: 100%;
z-index: -1;
}
`,
];
public render(): TemplateResult {
return html`
<style></style>
<div class="headerMain">${this.someProperty}</div>
<slot></slot>
`;
}
}

View File

@ -0,0 +1,63 @@
import * as serviceworker from '@api.global/typedserver/web_serviceworker_client';
import * as domtools from '@design.estate/dees-domtools';
import { html, render } from '@design.estate/dees-element';
import { DefaultHeader } from './elements/header.js';
export { DefaultHeader };
const run = async () => {
const domtoolsInstance = await domtools.DomTools.setupDomTools();
domtools.elementBasic.setup();
domtoolsInstance.setWebsiteInfo({
metaObject: {
title: '{{website.title}}',
description:
'{{website.description}}',
canonicalDomain: 'https://{{module.domain}}',
ldCompany: {
name: '{{company.name}}',
status: 'active',
contact: {
address: {
name: '{{company.name}}',
city: '{{company.city}}',
country: 'Germany',
houseNumber: '{{company.houseNumber}}',
postalCode: '{{company.postalCode}}',
streetName: '{{company.streetName}}',
},
description: 'work',
name: 'Task Venture Capital GmbH',
type: 'company',
facebookUrl: 'https://www.facebook.com/{{author.facebookHandle}}',
twitterUrl: 'https://twitter.com/{{authro.twitterHandle}}',
website: 'https://{{author.website}}',
phone: '+49 421 16767 548',
},
closedDate: null,
foundedDate: {
day: 1,
month: 1,
year: 2014,
},
},
},
});
const serviceWorker = serviceworker.getServiceWorker();
const mainTemplate = html`
<style>
body {
margin: 0px;
--background-accent: #303f9f;
}
</style>
<default-header></default-header>
`;
render(mainTemplate, document.body);
};
run();

View File

@ -0,0 +1,110 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!--Lets set some basic meta tags-->
<meta
name="viewport"
content="user-scalable=0, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height"
/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="theme-color" content="#000000" />
<!--Lets make sure we recognize this as an PWA-->
<link rel="manifest" href="/manifest.json" />
<link rel="icon" type="image/png" href="/assetbroker/manifest/favicon.png" />
<!--Lets load standard fonts-->
<link rel="preconnect" href="https://{{assetbrokerUrl}}/" crossorigin>
<link rel="stylesheet" href="https://{{assetbrokerUrl}}/fonts/fonts.css">
<!--Lets avoid a rescaling flicker due to default body margins-->
<style>
html {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
position: relative;
background: #000;
margin: 0px;
}
</style>
<script>
projectVersion = '';
</script>
</head>
<body>
<noscript>
<style>
body {
background: #303f9f;
font-family: Inter, Roboto, sans-serif;
color: #ffffff;
}
a {
color: #ffffff;
text-decoration: none;
}
img {
width: 130px;
}
.container {
width: 600px;
margin: auto;
margin-top: 20px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
overflow: hidden;
border-radius: 3px;
background: #4357d9;
}
.contentHeader {
padding: 20px;
text-align: center;
font-size: 25px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.content {
padding: 20px;
}
.footer {
padding: 10px;
text-align: center;
}
</style>
<div class="container">
<div class="contentHeader">We need JavaScript to run properly!</div>
<div class="content">
This site is being built using lit-element (made by Google). This technology works with
JavaScript. Subsequently this website does not work as intended without
JavaScript.
</div>
</div>
<div class="footer">
<a href="https://{{legalUrl}}">Legal Info</a> |
<a href="https://{{legalUrl}}/privacy">Privacy Policy</a>
</div>
</noscript>
<script type="text/javascript" async defer>
window.revenueEnabled = true;
const runRevenueCheck = async () => {
var e = document.createElement('div');
e.id = '476kjuhzgtr764';
e.style.display = 'none';
document.body.appendChild(e);
if (document.getElementById('476kjuhzgtr764')) {
window.revenueEnabled = true;
} else {
window.revenueEnabled = false;
}
console.log(`revenue enabled: ${window.revenueEnabled}`);
};
runRevenueCheck();
</script>
</body>
<script defer type="module" src="/bundle.js"></script>
</html>