fix(core): update

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

20
.gitignore vendored Normal file
View File

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

11
.vscode/launch.json vendored Normal file
View File

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

26
.vscode/settings.json vendored Normal file
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,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>

4
cli.child.ts Normal file
View File

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

4
cli.js Normal file
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();

5
cli.ts.js Normal file
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);

19
license Normal file
View File

@ -0,0 +1,19 @@
Copyright (c) 2015 Task Venture Capital GmbH (hello@lossless.com)
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.

34
npmextra.json Normal file
View File

@ -0,0 +1,34 @@
{
"npmci": {
"npmGlobalTools": [],
"npmAccessLevel": "private",
"npmRegistryUrl": "verdaccio.lossless.one"
},
"gitzone": {
"projectType": "npm",
"module": {
"githost": "gitlab.com",
"gitscope": "gitzone/private",
"gitrepo": "gitzone",
"description": "A CLI toolbelt to streamline local development cycles by using various gitzone utilities.",
"npmPackagename": "@gitzone_private/gitzone",
"license": "MIT",
"keywords": [
"CLI",
"development",
"git",
"npm",
"TypeScript",
"automation",
"project setup",
"code formatting",
"template creation",
"logging",
"meta project management"
]
}
},
"tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
}
}

107
package.json Normal file
View File

@ -0,0 +1,107 @@
{
"name": "@git.zone/cli",
"private": false,
"version": "1.9.94",
"description": "A CLI toolbelt to streamline local development cycles by using various gitzone utilities.",
"main": "dist_ts/index.ts",
"typings": "dist_ts/index.d.ts",
"type": "module",
"bin": {
"gitzone": "./cli.js",
"gzone": "./cli.js"
},
"scripts": {
"test": "(npm run clean && npm run prepareTest && npm run testCli && npm run testCommit && npm run testDeprecate && npm run testVersion && npm run testReadme && npm run testFormat && npm run testUpdate && npm run testTemplateNpm && npm run testTemplateLit) && rm -rf test",
"build": "(tsbuild --web --allowimplicitany)",
"clean": "(rm -rf test/)",
"prepareTest": "(git clone https://gitlab.com/sandboxzone/sandbox-npmts.git test/)",
"testBuild": "npm run build && rm -r dist/",
"testCli": "(cd test && node ../cli.ts.js)",
"testCommit": "(cd test && node ../cli.ts.js commit)",
"testDeprecate": "(cd test && node ../cli.ts.js deprecate)",
"testOpen": "(cd test && node ../cli.ts.js open ci)",
"testReadme": "(cd test && node ../cli.ts.js readme)",
"testFormat": "(cd test && node ../cli.ts.js format)",
"testTemplateNpm": "(rm -rf test/testtemplate_npm/ && mkdir test/testtemplate_npm && cd test/testtemplate_npm && node ../../cli.ts.js template npm)",
"testTemplateLit": "(rm -rf test/testtemplate_lit/ && mkdir test/testtemplate_lit && cd test/testtemplate_lit && node ../../cli.ts.js template lit)",
"testUpdate": "(cd test && node ../cli.ts.js update)",
"testVersion": "(cd test && node ../cli.ts.js -v)",
"buildDocs": "tsdoc"
},
"repository": {
"type": "git",
"url": "git+https://gitlab.com/gitzone/private/gitzone.git"
},
"keywords": [
"CLI",
"development",
"git",
"npm",
"TypeScript",
"automation",
"project setup",
"code formatting",
"template creation",
"logging",
"meta project management"
],
"author": "Task Venture Capital GmbH",
"license": "MIT",
"bugs": {
"url": "https://gitlab.com/gitzone/private/gitzone/issues"
},
"homepage": "https://gitlab.com/gitzone/private/gitzone#readme",
"devDependencies": {
"@git.zone/tsbuild": "^2.1.80",
"@git.zone/tsrun": "^1.2.46",
"@git.zone/tstest": "^1.0.90",
"@types/node": "^20.14.7"
},
"dependencies": {
"@push.rocks/commitinfo": "^1.0.11",
"@push.rocks/early": "^4.0.4",
"@push.rocks/gulp-function": "^3.0.7",
"@push.rocks/lik": "^6.0.15",
"@push.rocks/npmextra": "^5.0.23",
"@push.rocks/projectinfo": "^5.0.2",
"@push.rocks/smartchok": "^1.0.34",
"@push.rocks/smartcli": "^4.0.11",
"@push.rocks/smartdelay": "^3.0.5",
"@push.rocks/smartfile": "^11.0.20",
"@push.rocks/smartgulp": "^3.0.4",
"@push.rocks/smartinteract": "^2.0.15",
"@push.rocks/smartjson": "^5.0.20",
"@push.rocks/smartlegal": "^1.0.27",
"@push.rocks/smartlog": "^3.0.7",
"@push.rocks/smartlog-destination-local": "^9.0.2",
"@push.rocks/smartmustache": "^3.0.2",
"@push.rocks/smartnpm": "^2.0.4",
"@push.rocks/smartobject": "^1.0.12",
"@push.rocks/smartopen": "^2.0.0",
"@push.rocks/smartpath": "^5.0.18",
"@push.rocks/smartpromise": "^4.0.3",
"@push.rocks/smartscaf": "^4.0.15",
"@push.rocks/smartshell": "^3.0.5",
"@push.rocks/smartstream": "^3.0.44",
"@push.rocks/smartunique": "^3.0.9",
"@push.rocks/smartupdate": "^2.0.6",
"@types/through2": "^2.0.41",
"prettier": "^3.3.2",
"through2": "^4.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"
]
}

8027
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

1
readme.hints.md Normal file
View File

@ -0,0 +1 @@
* the cli of the git.zone project.

207
readme.md Normal file
View File

@ -0,0 +1,207 @@
# @git.zone/cli
A CLI toolbelt to streamline local development cycles by using various gitzone utilities.
## Install
To install the `@git.zone/cli` tool, you need to have Node.js and npm installed on your machine. Once you have those set up, you can install the CLI tool globally using the following command:
```shell
npm install -g @git.zone/cli
```
This will add the `gitzone` or `gzone` command to your PATH, allowing you to use the tool from any directory.
## Usage
The `gitzone` CLI is designed to streamline various aspects of the local development cycle, including project setup, maintenance, and deployment. Below, we'll go through several scenarios that demonstrate the capabilities of `gitzone`.
### Getting Started
To start using `gitzone`, you need to initialize a new project or use it with an existing one. This section will guide you through the initial setup and provide examples of the core commands.
#### Initialize a New Project
`gitzone` can create several types of projects, including standard npm modules, websites using LitElement, and custom web components. To create a new project, you can use the following command:
```shell
gitzone template [templatename]
```
Replace `[templatename]` with one of the following:
- `npm`: A standard npm module with TypeScript support, testing, and CI/CD setup.
- `website`: A LitElement-based website with e2e testing, bundling, and service worker support.
- `element`: A LitElement standard setup for creating web components.
Example of starting a new npm project:
1. Open your terminal and navigate to the directory where you want to create your project.
2. Execute the following command:
```shell
gitzone template npm
```
3. Follow the interactive prompts to set up your project. You will be asked to provide information such as the project name, description, GitHub repository, etc.
#### Committing Changes
To standardize commit messages and increment versions based on change types (fix, feat, breaking change):
```shell
gitzone commit
```
This command will prompt you with a series of questions to help construct a standardized commit message and create a new commit.
#### Deprecating a Package
To deprecate an old package in favor of a new one:
```shell
gitzone deprecate
```
This command will prompt you for the old and new package names and will automatically deprecate the old package on npm.
#### Opening CI/CD Settings
Quickly open the CI/CD settings page of your project repository:
```shell
gitzone open ci
```
### Example Commands
#### Project Setup and Initialization
Let's go through how to scaffold a new web component project:
1. Navigate to your desired directory.
2. Run the following command:
```shell
gitzone template element
```
3. Follow the prompts to set up your web component project.
#### Managing Project Lifecycle
Commands to manage your project's lifecycle:
- **Commit Changes:**
```shell
gitzone commit
```
- **Deprecate a Package:**
```shell
gitzone deprecate
```
- **Format Project Files:**
```shell
gitzone format
```
- **Regenerate Readme:**
```shell
gitzone readme
```
- **Update Local Repositories:**
```shell
gitzone update
```
#### Advanced Scenarios
##### Formatting
To ensure consistent formatting using Prettier:
```shell
gitzone format
```
##### Building the Project
To build your project as defined in your `package.json`:
```shell
npm run build
```
##### Git and Version Control
Check the current project version:
```shell
gitzone -v
```
To synchronize local repositories with remotes:
```shell
gitzone update
```
##### Metadata and Configuration
To initialize or update metadata:
```shell
gitzone meta init
```
### Continuous Integration and Delivery (CI/CD)
#### Running Tests
To execute tests defined in your `package.json`:
```shell
npm test
```
#### Building Documentation
Generate documentation:
```shell
npm run buildDocs
```
### Troubleshooting and Debugging
#### Detailed Logs
Enable detailed logging for troubleshooting:
```shell
gitzone --loglevel=debug
```
#### Cleaning Up
To clean up project artifacts:
```shell
gitzone clean
```
### Summary
The `gitzone` CLI tool provides a comprehensive suite of commands that streamline project setup, lifecycle management, and deployment, which are indispensable for modern development workflows. By familiarizing yourself with the different commands, you can maximize your productivity and focus on what really matters—writing code. Whether you are starting a new project, maintaining an existing one, or deploying your work, `gitzone` is your toolbelt for efficient development cycles.
## License and Legal Information
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
### Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
### Company Information
Task Venture Capital GmbH
Registered at District court Bremen HRB 35230 HB, Germany
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.

1
test Submodule

@ -0,0 +1 @@
Subproject commit 0b89443584ecd3a5948baacea665327165f102b5

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@git.zone/cli',
version: '1.9.95',
description: 'A CLI toolbelt to streamline local development cycles by using various gitzone utilities.'
}

View File

@ -0,0 +1,47 @@
import * as plugins from './plugins.js';
import * as paths from './paths.js';
export type TGitzoneProjectType = 'npm' | 'service' | 'wcc' | 'website';
/**
* type of the actual gitzone data
*/
export interface IGitzoneConfigData {
projectType: TGitzoneProjectType;
module: {
githost: string;
gitscope: string;
gitrepo: string;
description: string;
npmPackageName: string;
license: string;
projectDomain: string;
};
copy: {[key: string]: string}
npmciOptions: {
npmAccessLevel: 'public' | 'private';
};
}
/**
* gitzone config
*/
export class GitzoneConfig {
public static async fromCwd() {
const gitzoneConfig = new GitzoneConfig();
await gitzoneConfig.readConfigFromCwd();
return gitzoneConfig;
}
public data: IGitzoneConfigData;
public async readConfigFromCwd() {
const npmextraInstance = new plugins.npmextra.Npmextra(paths.cwd);
this.data = npmextraInstance.dataFor<IGitzoneConfigData>('gitzone', {});
this.data.npmciOptions = npmextraInstance.dataFor<IGitzoneConfigData['npmciOptions']>('npmci', {
npmAccessLevel: 'public',
});
}
constructor() {}
}

28
ts/classes.project.ts Normal file
View File

@ -0,0 +1,28 @@
import * as plugins from './plugins.js'
import * as paths from './paths.js';
import { GitzoneConfig } from './classes.gitzoneconfig.js';
import type { TGitzoneProjectType } from './classes.gitzoneconfig.js';
/**
* the Project class is a tool to work with a gitzone project
*/
export class Project {
public static async fromCwd() {
const gitzoneConfig = await GitzoneConfig.fromCwd();
const project = new Project(gitzoneConfig);
if (!project.gitzoneConfig.data.projectType) {
throw new Error('Please define a project type');
}
return project;
}
public gitzoneConfig: GitzoneConfig;
public get type(): TGitzoneProjectType {
return this.gitzoneConfig.data.projectType;
}
constructor(gitzoneConfigArg: GitzoneConfig) {
this.gitzoneConfig = gitzoneConfigArg;
}
}

101
ts/gitzone.cli.ts Normal file
View File

@ -0,0 +1,101 @@
import * as plugins from './plugins.js';
import * as paths from './paths.js';
import { GitzoneConfig } from './classes.gitzoneconfig.js';
const gitzoneSmartcli = new plugins.smartcli.Smartcli();
export let run = async () => {
const done = plugins.smartpromise.defer();
// get packageInfo
const projectInfo = new plugins.projectinfo.ProjectInfo(paths.packageDir);
// check for updates
const smartupdateInstance = new plugins.smartupdate.SmartUpdate();
await smartupdateInstance.check(
'gitzone',
projectInfo.npm.version,
'http://gitzone.gitlab.io/gitzone/changelog.html'
);
console.log('---------------------------------------------');
gitzoneSmartcli.addVersion(projectInfo.npm.version);
// ======> Standard task <======
/**
* standard task
*/
gitzoneSmartcli.standardCommand().subscribe(async (argvArg) => {
const modStandard = await import('./mod_standard/index.js');
await modStandard.run();
});
// ======> Specific tasks <======
/**
* commit something
*/
gitzoneSmartcli.addCommand('commit').subscribe(async (argvArg) => {
const modCommit = await import('./mod_commit/index.js');
await modCommit.run(argvArg);
});
/**
* deprecate a package on npm
*/
gitzoneSmartcli.addCommand('deprecate').subscribe(async (argvArg) => {
const modDeprecate = await import('./mod_deprecate/index.js');
await modDeprecate.run();
});
/**
* Update all files that comply with the gitzone standard
*/
gitzoneSmartcli.addCommand('format').subscribe(async (argvArg) => {
const config = GitzoneConfig.fromCwd();
const modFormat = await import('./mod_format/index.js');
await modFormat.run();
});
/**
* run meta commands
*/
gitzoneSmartcli.addCommand('meta').subscribe(async (argvArg) => {
const config = GitzoneConfig.fromCwd();
const modMeta = await import('./mod_meta/index.js');
modMeta.run(argvArg);
});
/**
* open assets
*/
gitzoneSmartcli.addCommand('open').subscribe(async (argvArg) => {
const modOpen = await import('./mod_open/index.js');
modOpen.run(argvArg);
});
/**
* add a readme to a project
*/
gitzoneSmartcli.addCommand('template').subscribe(async (argvArg) => {
const modTemplate = await import('./mod_template/index.js');
modTemplate.run(argvArg);
});
/**
* start working on a project
*/
gitzoneSmartcli.addCommand('start').subscribe(async (argvArg) => {
const modTemplate = await import('./mod_start/index.js');
modTemplate.run(argvArg);
});
gitzoneSmartcli.addCommand('helpers').subscribe(async (argvArg) => {
const modHelpers = await import('./mod_helpers/index.js');
modHelpers.run(argvArg);
});
// start parsing of the cli
gitzoneSmartcli.startParse();
return await done.promise;
};

15
ts/gitzone.logging.ts Normal file
View File

@ -0,0 +1,15 @@
import * as plugins from './plugins.js';
export const logger = new plugins.smartlog.Smartlog({
minimumLogLevel: 'silly',
logContext: {
company: 'Task Venture Capital GmbH',
companyunit: 'Lossless Cloud',
containerName: 'local',
environment: 'local',
runtime: 'node',
zone: 'gitzone',
},
});
logger.addLogDestination(new plugins.smartlogDestinationLocal.DestinationLocal());

9
ts/index.ts Normal file
View File

@ -0,0 +1,9 @@
export const runCli = async () => {
const early = await import('@push.rocks/early');
early.start('gitzone');
const plugins = await import('./plugins.js');
const gitzoneCli = await import('./gitzone.cli.js');
early.stop().then(() => {
gitzoneCli.run();
});
};

1
ts/mod_audit/index.ts Normal file
View File

@ -0,0 +1 @@
import * as paths from '../paths.js';

73
ts/mod_commit/index.ts Normal file
View File

@ -0,0 +1,73 @@
// this file contains code to create commits in a consistent way
import * as plugins from './mod.plugins.js';
import * as paths from '../paths.js';
import { logger } from '../gitzone.logging.js';
export const run = async (argvArg: any) => {
const commitInteract = new plugins.smartinteract.SmartInteract();
commitInteract.addQuestions([
{
type: 'list',
name: `commitType`,
message: `Choose TYPE of the commit:`,
choices: [`fix`, `feat`, `BREAKING CHANGE`],
default: `fix`,
},
{
type: 'input',
name: `commitScope`,
message: `What is the SCOPE of the commit:`,
default: `core`,
},
{
type: `input`,
name: `commitDescription`,
message: `What is the DESCRIPTION of the commit?`,
default: `update`,
},
{
type: 'confirm',
name: `pushToOrigin`,
message: `Do you want to push this version now?`,
default: true,
},
]);
const answerBucket = await commitInteract.runQueue();
const commitString = createCommitStringFromAnswerBucket(answerBucket);
const commitVersionType = (() => {
switch (answerBucket.getAnswerFor('commitType')) {
case 'fix':
return 'patch';
case 'feat':
return 'minor';
case 'BREAKING CHANGE':
return 'major';
}
})();
logger.log('info', `OK! Creating commit with message '${commitString}'`);
const smartshellInstance = new plugins.smartshell.Smartshell({
executor: 'bash',
sourceFilePaths: [],
});
logger.log('info', `Baking commitinfo into code`);
const commitInfo = new plugins.commitinfo.CommitInfo(paths.cwd, commitVersionType);
await commitInfo.writeIntoPotentialDirs();
logger.log('info', `Staging files for commit:`);
await smartshellInstance.exec(`git add -A`);
await smartshellInstance.exec(`git commit -m "${commitString}"`);
await smartshellInstance.exec(`npm version ${commitVersionType}`);
if (answerBucket.getAnswerFor('pushToOrigin') && !(process.env.CI === 'true')) {
await smartshellInstance.exec(`git push origin master --follow-tags`);
}
};
const createCommitStringFromAnswerBucket = (answerBucket: plugins.smartinteract.AnswerBucket) => {
const commitType = answerBucket.getAnswerFor('commitType');
const commitScope = answerBucket.getAnswerFor('commitScope');
const commitDescription = answerBucket.getAnswerFor('commitDescription');
return `${commitType}(${commitScope}): ${commitDescription}`;
};

View File

@ -0,0 +1,7 @@
export * from '../plugins.js';
import * as commitinfo from '@push.rocks/commitinfo';
import * as smartinteract from '@push.rocks/smartinteract';
import * as smartshell from '@push.rocks/smartshell';
export { commitinfo, smartinteract, smartshell };

37
ts/mod_deprecate/index.ts Normal file
View File

@ -0,0 +1,37 @@
import * as plugins from './mod.plugins.js';
import { logger } from '../gitzone.logging.js';
export const run = async () => {
const smartInteract = new plugins.smartinteract.SmartInteract([
{
name: `oldPackageName`,
message: `Whats the name of the OLD package?`,
type: `input`,
default: ``,
validate: (stringInput) => {
return stringInput !== '' && !process.env.CI;
},
},
{
name: `newPackageName`,
message: `Whats the name of the NEW package?`,
type: `input`,
default: ``,
validate: (stringInput) => {
return stringInput !== '' && !process.env.CI;
},
},
]);
const answerBucket = await smartInteract.runQueue();
const oldPackageName = answerBucket.getAnswerFor(`oldPackageName`);
const newPackageName = answerBucket.getAnswerFor(`newPackageName`);
logger.log('info', `Deprecating package ${oldPackageName} in favour of ${newPackageName}`);
const smartshellInstance = new plugins.smartshell.Smartshell({
executor: 'bash',
});
await smartshellInstance.exec(
`npm deprecate ${oldPackageName}@* ` +
`"${oldPackageName} has been deprecated in favour of ${newPackageName} - please upgrade asap!!!"`
);
};

View File

@ -0,0 +1,6 @@
export * from '../plugins.js';
import * as smartinteract from '@push.rocks/smartinteract';
import * as smartshell from '@push.rocks/smartshell';
export { smartinteract, smartshell };

View File

@ -0,0 +1,19 @@
import * as plugins from './mod.plugins.js';
import * as paths from '../paths.js';
import { logger } from '../gitzone.logging.js';
import { Project } from '../classes.project.js';
const filesToDelete = ['defaults.yml', 'yarn.lock', 'package-lock.json', 'tslint.json'];
export const run = async (projectArg: Project) => {
for (const relativeFilePath of filesToDelete) {
const fileExists = plugins.smartfile.fs.fileExistsSync(relativeFilePath);
if (fileExists) {
logger.log('info', `Found ${relativeFilePath}! Removing it!`);
plugins.smartfile.fs.removeSync(plugins.path.join(paths.cwd, relativeFilePath));
} else {
logger.log('info', `Project is free of ${relativeFilePath}`);
}
}
};

View File

@ -0,0 +1,6 @@
import type { Project } from '../classes.project.js';
import * as plugins from '../plugins.js';
export const run = async (projectArg: Project) => {
const gitzoneConfig = await projectArg.gitzoneConfig;
}

View File

@ -0,0 +1,21 @@
import * as plugins from './mod.plugins.js';
import * as paths from '../paths.js';
import { Project } from '../classes.project.js';
import { logger } from '../gitzone.logging.js';
const gitignorePath = plugins.path.join(paths.cwd, './.gitignore');
export const run = async (projectArg: Project) => {
const gitignoreExists = await plugins.smartfile.fs.fileExists(gitignorePath);
const templateModule = await import('../mod_template/index.js');
const ciTemplate = await templateModule.getTemplate('gitignore');
if (gitignoreExists) {
// lets get the existing gitignore file
const existingGitIgnoreString = plugins.smartfile.fs.toStringSync(gitignorePath);
let customPart = existingGitIgnoreString.split('# custom\n')[1];
customPart ? null : (customPart = '');
}
ciTemplate.writeToDisk(paths.cwd);
logger.log('info', 'Added a .gitignore!');
};

View File

@ -0,0 +1,24 @@
import * as plugins from './mod.plugins.js';
import * as paths from '../paths.js';
import { Project } from '../classes.project.js';
import { logger } from '../gitzone.logging.js';
const incompatibleLicenses: string[] = [
"AGPL",
"GPL",
"SSPL",
];
export const run = async (projectArg: Project) => {
const licenseChecker = await plugins.smartlegal.createLicenseChecker();
const licenseCheckResult = await licenseChecker.excludeLicenseWithinPath(paths.cwd, incompatibleLicenses);
if (licenseCheckResult.failingModules.length === 0) {
logger.log('info', 'Success -> licenses passed!');
} else {
logger.log('error', 'Error -> licenses failed. Here is why:');
for (const failedModule of licenseCheckResult.failingModules) {
console.log(`${failedModule.name} fails with license ${failedModule.license}`);
}
}
};

View File

@ -0,0 +1,70 @@
import * as plugins from './mod.plugins.js';
import * as paths from '../paths.js';
import * as gulpFunction from '@push.rocks/gulp-function';
import { Project } from '../classes.project.js';
/**
* runs the npmextra file checking
*/
export const run = async (projectArg: Project) => {
const formatSmartstream = new plugins.smartstream.StreamWrapper([
plugins.smartgulp.src([`npmextra.json`]),
gulpFunction.forEach(async (fileArg: plugins.smartfile.SmartFile) => {
const fileString = fileArg.contents.toString();
const npmextraJson = JSON.parse(fileString);
if (!npmextraJson.gitzone) {
npmextraJson.gitzone = {};
}
const expectedRepoInformation: string[] = [
'projectType',
'module.githost',
'module.gitscope',
'module.gitrepo',
'module.description',
'module.npmPackagename',
'module.license',
];
const interactInstance = new plugins.smartinteract.SmartInteract();
for (const expectedRepoInformationItem of expectedRepoInformation) {
if (!plugins.smartobject.smartGet(npmextraJson.gitzone, expectedRepoInformationItem)) {
interactInstance.addQuestions([
{
message: `What is the value of ${expectedRepoInformationItem}`,
name: expectedRepoInformationItem,
type: 'input',
default: 'undefined variable',
},
]);
}
}
const answerbucket = await interactInstance.runQueue();
for (const expectedRepoInformationItem of expectedRepoInformation) {
const cliProvidedValue = answerbucket.getAnswerFor(expectedRepoInformationItem);
if (cliProvidedValue) {
plugins.smartobject.smartAdd(
npmextraJson.gitzone,
expectedRepoInformationItem,
cliProvidedValue
);
}
}
// delete obsolete
// tbd
if (!npmextraJson.npmci) {
npmextraJson.npmci = {};
}
fileArg.setContentsFromString(JSON.stringify(npmextraJson, null, 2));
}),
plugins.smartgulp.replace(),
]);
await formatSmartstream.run().catch((error) => {
console.log(error);
});
};

View File

@ -0,0 +1,120 @@
import * as plugins from './mod.plugins.js';
import * as paths from '../paths.js';
import * as gulpFunction from '@push.rocks/gulp-function';
import { Project } from '../classes.project.js';
import { logger } from '../gitzone.logging.js';
/**
* ensures a certain dependency
*/
const ensureDependency = async (
packageJsonObjectArg: any,
position: 'dep' | 'devDep' | 'everywhere',
constraint: 'exclude' | 'include' | 'latest',
dependencyArg: string
) => {};
export const run = async (projectArg: Project) => {
const formatStreamWrapper = new plugins.smartstream.StreamWrapper([
plugins.smartgulp.src([`package.json`]),
gulpFunction.forEach(async (fileArg: plugins.smartfile.SmartFile) => {
const npmextraConfig = new plugins.npmextra.Npmextra(paths.cwd);
const gitzoneData: any = npmextraConfig.dataFor('gitzone', {});
const fileString = fileArg.contents.toString();
const packageJson = JSON.parse(fileString);
// metadata
packageJson.repository = {
"type": "git",
"url": `git+https://${gitzoneData.module.githost}/${gitzoneData.module.gitscope}/${gitzoneData.module.gitrepo}.git`
};
packageJson.bugs = {
"url": `https://${gitzoneData.module.githost}/${gitzoneData.module.gitscope}/${gitzoneData.module.gitrepo}/issues`
},
packageJson.homepage = `https://${gitzoneData.module.githost}/${gitzoneData.module.gitscope}/${gitzoneData.module.gitrepo}#readme`;
// Check for module type
if (!packageJson.type) {
logger.log('info', `setting packageJson.type to "module"`);
packageJson.type = 'module';
}
// Check for private or public
if (packageJson.private !== undefined) {
logger.log('info', 'Success -> found private/public info in package.json!');
} else {
logger.log('error', 'found no private boolean! Setting it to private for now!');
packageJson.private = true;
}
// Check for license
if (packageJson.license) {
logger.log('info', 'Success -> found license in package.json!');
} else {
logger.log('error', 'found no license! Setting it to UNLICENSED for now!');
packageJson.license = 'UNLICENSED';
}
// Check for build script
if (packageJson.scripts.build) {
logger.log('info', 'Success -> found build script in package.json!');
} else {
logger.log('error', 'found no build script! Putting a placeholder there for now!');
packageJson.scripts.build = `echo "Not needed for now"`;
}
// Check for buildDocs script
if (!packageJson.scripts.buildDocs) {
logger.log('info', 'found no buildDocs script! Putting tsdoc script there now.');
packageJson.scripts.buildDocs = `tsdoc`;
}
// check package.json
if (!packageJson.main) {
logger.log('error', 'no "main" property');
process.exit(0);
}
if (!packageJson.typings) {
logger.log('error', 'no "typings" property');
process.exit(0);
}
if (!packageJson.browserslist) {
packageJson.browserslist = ['last 1 chrome versions'];
}
if (!packageJson.main.includes('dist_') || !packageJson.typings.includes('dist_')) {
logger.log('error', 'check packagesJson main and typings');
process.exit(0);
}
// check for files
packageJson.files = [
'ts/**/*',
'ts_web/**/*',
'dist/**/*',
'dist_*/**/*',
'dist_ts/**/*',
'dist_ts_web/**/*',
'assets/**/*',
'cli.js',
'npmextra.json',
'readme.md',
];
// check for dependencies
await ensureDependency(packageJson, 'devDep', 'latest', '@push.rocks/tapbundle');
await ensureDependency(packageJson, 'devDep', 'latest', '@git.zone/tstest');
await ensureDependency(packageJson, 'devDep', 'latest', '@git.zone/tsbuild');
// exclude
// TODO
fileArg.setContentsFromString(JSON.stringify(packageJson, null, 2));
}),
plugins.smartgulp.replace(),
]);
await formatStreamWrapper.run().catch((error) => {
console.log(error);
});
};

View File

@ -0,0 +1,58 @@
import * as plugins from './mod.plugins.js';
import prettier from 'prettier';
import { Project } from '../classes.project.js';
import { logger } from '../gitzone.logging.js';
const prettierDefaultTypeScriptConfig: prettier.Options = {
printWidth: 100,
parser: 'typescript',
singleQuote: true,
};
const prettierDefaultMarkdownConfig: prettier.Options = {
singleQuote: true,
printWidth: 100,
parser: 'markdown',
};
const filesToFormat = [`ts/**/*.ts`, `test/**/*.ts`, `readme.md`, `docs/**/*.md`];
const choosePrettierConfig = (fileArg: plugins.smartfile.SmartFile) => {
switch (fileArg.parsedPath.ext) {
case '.ts':
return prettierDefaultTypeScriptConfig;
case '.md':
return prettierDefaultMarkdownConfig;
default:
return {};
}
};
const prettierTypeScriptPipestop = plugins.through2.obj(
async (fileArg: plugins.smartfile.SmartFile, enc, cb) => {
const fileString = fileArg.contentBuffer.toString();
const chosenConfig = choosePrettierConfig(fileArg);
const filePasses = prettier.check(fileString, chosenConfig);
if (filePasses) {
logger.log('info', `OK! -> ${fileArg.path} passes!`);
cb(null);
} else {
logger.log('info', `${fileArg.path} is being reformated!`);
const formatedFileString = await prettier.format(fileString, chosenConfig);
fileArg.setContentsFromString(formatedFileString);
cb(null, fileArg);
}
}
);
export const run = async (projectArg: Project) => {
const formatStreamWrapper = new plugins.smartstream.StreamWrapper([
plugins.smartgulp.src(filesToFormat),
prettierTypeScriptPipestop,
plugins.smartgulp.replace(),
]);
await formatStreamWrapper.run().catch((error) => {
console.log(error);
});
};

View File

@ -0,0 +1,47 @@
import * as plugins from './mod.plugins.js';
import * as paths from '../paths.js';
import { GitzoneConfig } from '../classes.gitzoneconfig.js';
import { Project } from '../classes.project.js';
export const run = async (projectArg: Project) => {
const readmePath = plugins.path.join(paths.cwd, 'readme.md');
const readmeFile = await plugins.smartfile.SmartFile.fromFilePath(readmePath);
// lets do our transformation
let usageInfo: string = '';
const gitzoneConfig = await GitzoneConfig.fromCwd();
if (readmeFile) {
const readmeFileString = readmeFile.contentBuffer.toString();
const stringArray1 = readmeFileString.split('## Usage\n');
if (stringArray1[1]) {
const stringArray2 = stringArray1[1].split(
'\nFor further information read the linked docs at the top of this readme.'
);
const stringArray3 = stringArray2[0].split('\n\n## Contribution');
usageInfo = stringArray3[0];
}
}
if (gitzoneConfig.data.module && gitzoneConfig.data.module.license === 'MIT') {
usageInfo +=
'\n\n## Contribution\n\n' +
'We are always happy for code contributions. If you are not the code contributing type that is ok. ' +
'Still, maintaining Open Source repositories takes considerable time and thought. ' +
'If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: ' +
'You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)\n';
}
const templateModule = await import('../mod_template/index.js');
const readmeTemplate = await templateModule.getTemplate('readme');
console.log(gitzoneConfig.data);
await readmeTemplate.supplyVariables({
module: {
...gitzoneConfig.data.module,
},
usageInfo,
});
await readmeTemplate.askCliForMissingVariables();
await readmeTemplate.writeToDisk(paths.cwd);
};

View File

@ -0,0 +1,71 @@
import * as plugins from './mod.plugins.js';
import * as paths from '../paths.js';
import { logger } from '../gitzone.logging.js';
import { Project } from '../classes.project.js';
/**
* takes care of updating files from templates
*/
export const run = async (project: Project) => {
const templateModule = await import('../mod_template/index.js');
// update tslint
// getting template
const tslintTemplate = await templateModule.getTemplate('tslint');
await tslintTemplate.writeToDisk(paths.cwd);
logger.log('info', 'Updated tslint.json!');
// update vscode
const vscodeTemplate = await templateModule.getTemplate('vscode');
await vscodeTemplate.writeToDisk(paths.cwd);
logger.log('info', `Updated vscode template!`);
// update gitlab ci and Dockerfile
switch (project.gitzoneConfig.data.projectType) {
case 'npm':
case 'wcc':
if (project.gitzoneConfig.data.npmciOptions.npmAccessLevel === 'public') {
const ciTemplateDefault = await templateModule.getTemplate('ci_default');
ciTemplateDefault.writeToDisk(paths.cwd);
} else {
const ciTemplateDefault = await templateModule.getTemplate('ci_default_private');
ciTemplateDefault.writeToDisk(paths.cwd);
}
logger.log('info', 'Updated .gitlabci.yml!');
break;
case 'service':
case 'website':
const ciTemplateDocker = await templateModule.getTemplate('ci_docker');
await ciTemplateDocker.writeToDisk(paths.cwd);
logger.log('info', 'Updated .gitlabci.yml!');
// lets care about docker
const dockerTemplate = await templateModule.getTemplate('dockerfile_service');
dockerTemplate.writeToDisk(paths.cwd);
logger.log('info', 'Updated Dockerfile!');
// lets care about cli
const cliTemplate = await templateModule.getTemplate('cli');
await cliTemplate.writeToDisk(paths.cwd);
logger.log('info', 'Updated cli.ts.js and cli.js!');
break;
default:
break;
}
// update html
if (project.gitzoneConfig.data.projectType === 'website') {
const websiteUpdateTemplate = await templateModule.getTemplate('website_update');
await websiteUpdateTemplate.writeToDisk(paths.cwd);
logger.log('info', `Updated html for website!`);
} else if (project.gitzoneConfig.data.projectType === 'service') {
const websiteUpdateTemplate = await templateModule.getTemplate('service_update');
await websiteUpdateTemplate.writeToDisk(paths.cwd);
logger.log('info', `Updated html for element template!`);
} else if (project.gitzoneConfig.data.projectType === 'wcc') {
const wccUpdateTemplate = await templateModule.getTemplate('wcc_update');
await wccUpdateTemplate.writeToDisk(paths.cwd);
logger.log('info', `Updated html for wcc template!`);
}
};

38
ts/mod_format/index.ts Normal file
View File

@ -0,0 +1,38 @@
import * as plugins from './mod.plugins.js';
import { Project } from '../classes.project.js';
export let run = async (write: boolean = true): Promise<any> => {
const project = await Project.fromCwd();
// cleanup
const formatCleanup = await import('./format.cleanup.js');
await formatCleanup.run(project);
// npmextra
const formatNpmextra = await import('./format.npmextra.js');
await formatNpmextra.run(project);
// license
const formatLicense = await import('./format.license.js');
await formatLicense.run(project);
// format package.json
const formatPackageJson = await import('./format.packagejson.js');
await formatPackageJson.run(project);
// format .gitlab-ci.yml
const formatTemplates = await import('./format.templates.js');
await formatTemplates.run(project);
// format .gitignore
const formatGitignore = await import('./format.gitignore.js');
await formatGitignore.run(project);
// format TypeScript
const formatPrettier = await import('./format.prettier.js');
await formatPrettier.run(project);
// format readme.md
const formatReadme = await import('./format.readme.js');
// await formatReadme.run();
};

View File

@ -0,0 +1,13 @@
export * from '../plugins.js';
import * as lik from '@push.rocks/lik';
import * as smartfile from '@push.rocks/smartfile';
import * as smartgulp from '@push.rocks/smartgulp';
import * as smartinteract from '@push.rocks/smartinteract';
import * as smartlegal from '@push.rocks/smartlegal';
import * as smartobject from '@push.rocks/smartobject';
import * as smartnpm from '@push.rocks/smartnpm';
import * as smartstream from '@push.rocks/smartstream';
import * as through2 from 'through2';
export { lik, smartfile, smartgulp, smartinteract, smartlegal, smartobject, smartnpm, smartstream, through2 };

10
ts/mod_helpers/index.ts Normal file
View File

@ -0,0 +1,10 @@
import * as plugins from './mod.plugins.js';
export const run = async (argvArg) => {
const command = argvArg._[1];
switch (command) {
case 'shortid':
console.log('Here is new shortid');
console.log(plugins.smartunique.shortId());
}
};

View File

@ -0,0 +1,5 @@
export * from '../plugins.js';
import * as smartunique from '@push.rocks/smartunique';
export { smartunique };

26
ts/mod_meta/index.ts Normal file
View File

@ -0,0 +1,26 @@
import * as plugins from './meta.plugins.js';
import * as paths from '../paths.js';
import { Meta } from './meta.classes.meta.js';
import { logger } from '../gitzone.logging.js';
export const run = async (argvArg) => {
const command = argvArg._[1];
const metaInstance = new Meta(paths.cwd);
switch (true) {
case command === 'update':
await metaInstance.updateLocalRepos();
break;
case command === 'add':
await metaInstance.addProject(argvArg._[2], argvArg._[3]);
break;
case command === 'remove':
await metaInstance.removeProject(argvArg._[2]);
break;
case command === 'init':
await metaInstance.initProject();
break;
default:
logger.log('error', `You have to specify a command!`);
}
};

View File

@ -0,0 +1,234 @@
import * as plugins from './meta.plugins.js';
import * as paths from '../paths.js';
import * as interfaces from './meta.interfaces.js';
import { logger } from '../gitzone.logging.js';
export class Meta {
public cwd: string;
public dirName: string;
public filePaths: {
metaJson: string;
gitIgnore: string;
packageJson: string;
};
constructor(cwdArg: string) {
this.cwd = cwdArg;
this.dirName = plugins.path.basename(this.cwd);
this.filePaths = {
metaJson: plugins.path.join(this.cwd, './.meta.json'),
gitIgnore: plugins.path.join(this.cwd, './.gitignore'),
packageJson: plugins.path.join(this.cwd, './package.json'),
};
}
/**
* the meta repo data
*/
public metaRepoData: interfaces.IMetaRepoData;
public smartshellInstance = new plugins.smartshell.Smartshell({
executor: 'bash',
});
/**
* sorts the metaRepoData
*/
public async sortMetaRepoData() {
const stringifiedMetadata = plugins.smartjson.stringify(this.metaRepoData, []);
this.metaRepoData = plugins.smartjson.parse(stringifiedMetadata);
}
/**
* reads the meta file from disk
*/
public async readDirectory() {
await this.syncToRemote(true);
logger.log('info', `reading directory`);
const metaFileExists = plugins.smartfile.fs.fileExistsSync(this.filePaths.metaJson);
if (!metaFileExists) {
throw new Error(`meta file does not exist at ${this.filePaths.metaJson}`);
}
this.metaRepoData = plugins.smartfile.fs.toObjectSync(this.filePaths.metaJson);
}
/**
* generates the gitignore file and stores it on disk
*/
public async generateGitignore(): Promise<string> {
await this.sortMetaRepoData();
let gitignoreString = `# ignored repo directories\n`;
gitignoreString += `.nogit/\n`;
gitignoreString += `.pnpm-store/\n`;
for (const key of Object.keys(this.metaRepoData.projects)) {
gitignoreString = `${gitignoreString}${key}\n`;
}
return gitignoreString;
}
/**
* write to disk
*/
public async writeToDisk() {
// write .meta.json to disk
plugins.smartfile.memory.toFsSync(
JSON.stringify(this.metaRepoData, null, 2),
this.filePaths.metaJson
);
// write .gitignore to disk
plugins.smartfile.memory.toFsSync(await this.generateGitignore(), this.filePaths.gitIgnore);
}
/**
* push to remote
*/
public async syncToRemote(gitCleanArg = false) {
logger.log('info', `syncing from origin master`);
await this.smartshellInstance.exec(`cd ${this.cwd} && git pull origin master`);
if (gitCleanArg) {
logger.log('info', `cleaning the repository from old directories`);
await this.smartshellInstance.exec(`cd ${this.cwd} && git clean -fd`);
}
logger.log('info', `syncing to remote origin master`);
await this.smartshellInstance.exec(`cd ${this.cwd} && git push origin master`);
}
/**
* update the locally cloned repositories
*/
public async updateLocalRepos() {
await this.syncToRemote();
const projects = plugins.smartfile.fs.toObjectSync(this.filePaths.metaJson).projects;
const preExistingFolders = plugins.smartfile.fs.listFoldersSync(this.cwd);
for (const preExistingFolderArg of preExistingFolders) {
if (
preExistingFolderArg !== '.git' &&
!Object.keys(projects).find((projectFolder) =>
projectFolder.startsWith(preExistingFolderArg)
)
) {
const response = await plugins.smartinteraction.SmartInteract.getCliConfirmation(
`Do you want to delete superfluous directory >>${preExistingFolderArg}<< ?`,
true
);
if (response) {
logger.log('warn', `Deleting >>${preExistingFolderArg}<<!`);
} else {
logger.log('warn', `Not deleting ${preExistingFolderArg} by request!`);
}
}
}
await this.readDirectory();
await this.sortMetaRepoData();
const missingRepos: string[] = [];
for (const key of Object.keys(this.metaRepoData.projects)) {
plugins.smartfile.fs.isDirectory(key)
? logger.log('ok', `${key} -> is already cloned`)
: missingRepos.push(key);
}
logger.log('info', `found ${missingRepos.length} missing repos`);
for (const missingRepo of missingRepos) {
await this.smartshellInstance.exec(
`cd ${this.cwd} && git clone ${this.metaRepoData.projects[missingRepo]} ${missingRepo}`
);
}
logger.log('info', `write changes to disk`);
await this.writeToDisk();
logger.log('info', `persist changes with a git commit`);
await this.smartshellInstance.exec(
`cd ${this.cwd} && git add -A && git commit -m "updated structure"`
);
await this.syncToRemote();
// go recursive
const folders = await plugins.smartfile.fs.listFolders(this.cwd);
const childMetaRepositories: string[] = [];
for (const folder of folders) {
logger.log('info', folder);
}
console.log('Recursion still needs to be implemented');
}
// project manipulation
/**
* init a new meta project
*/
public async initProject() {
await this.syncToRemote(true);
const fileExists = await plugins.smartfile.fs.fileExists(this.filePaths.metaJson);
if (!fileExists) {
await plugins.smartfile.memory.toFs(
JSON.stringify({
projects: {},
}),
this.filePaths.metaJson
);
logger.log(`success`, `created a new .meta.json in directory ${this.cwd}`);
await plugins.smartfile.memory.toFs(
JSON.stringify({
name: this.dirName,
version: '1.0.0',
}),
this.filePaths.packageJson
);
logger.log(`success`, `created a new package.json in directory ${this.cwd}`);
} else {
logger.log(`error`, `directory ${this.cwd} already has a .metaJson file. Doing nothing.`);
}
await this.smartshellInstance.exec(
`cd ${this.cwd} && git add -A && git commit -m "feat(project): init meta project for ${this.dirName}"`
);
await this.updateLocalRepos();
}
/**
* adds a project
*/
public async addProject(projectNameArg: string, gitUrlArg) {
await this.readDirectory();
const existingProject = this.metaRepoData.projects[projectNameArg];
if (existingProject) {
throw new Error('Project already exists! Please remove it first before adding it again.');
}
this.metaRepoData.projects[projectNameArg] = gitUrlArg;
await this.sortMetaRepoData();
await this.writeToDisk();
await this.smartshellInstance.exec(
`cd ${this.cwd} && git add -A && git commit -m "feat(project): add ${projectNameArg}"`
);
await this.updateLocalRepos();
}
/**
* removes a project
*/
public async removeProject(projectNameArg: string) {
await this.readDirectory();
const existingProject = this.metaRepoData.projects[projectNameArg];
if (!existingProject) {
logger.log('error', `Project ${projectNameArg} does not exist! So it cannot be removed`);
return;
}
delete this.metaRepoData.projects[projectNameArg];
logger.log('info', 'removing project from .meta.json');
await this.sortMetaRepoData();
await this.writeToDisk();
logger.log('info', 'removing directory from cwd');
await plugins.smartfile.fs.remove(plugins.path.join(paths.cwd, projectNameArg));
await this.updateLocalRepos();
}
}

View File

@ -0,0 +1,3 @@
export interface IMetaRepoData {
projects: { [key: string]: string };
}

View File

@ -0,0 +1,8 @@
export * from '../plugins.js';
import * as smartfile from '@push.rocks/smartfile';
import * as smartinteraction from '@push.rocks/smartinteract';
import * as smartjson from '@push.rocks/smartjson';
import * as smartshell from '@push.rocks/smartshell';
export { smartfile, smartinteraction, smartjson, smartshell };

15
ts/mod_open/index.ts Normal file
View File

@ -0,0 +1,15 @@
import * as plugins from './mod.plugins.js';
import * as paths from '../paths.js';
export let run = (argvArg) => {
let projectInfo = new plugins.projectinfo.ProjectInfo(paths.cwd);
if (argvArg._[1] === 'ci') {
plugins.smartopen.openUrl(
`https://gitlab.com/${projectInfo.git.gituser}/${projectInfo.git.gitrepo}/settings/ci_cd`
);
} else if (argvArg._[1] === 'pipelines') {
plugins.smartopen.openUrl(
`https://gitlab.com/${projectInfo.git.gituser}/${projectInfo.git.gitrepo}/pipelines`
);
}
};

View File

@ -0,0 +1,5 @@
export * from '../plugins.js';
import * as smartopen from '@push.rocks/smartopen';
import * as projectinfo from '@push.rocks/projectinfo';
export { projectinfo, smartopen };

Some files were not shown because too many files have changed in this diff Show More