Compare commits

..

27 Commits

Author SHA1 Message Date
4c158ba0ea 4.0.14 2023-07-25 17:35:14 +02:00
831ab25a6f fix(core): update 2023-07-25 17:35:13 +02:00
8fb95634df switch to new org scheme 2023-07-10 10:18:08 +02:00
c8eeb4b8e6 4.0.13 2023-06-25 13:48:54 +02:00
56df0d3246 fix(core): update 2023-06-25 13:48:54 +02:00
883ecff182 4.0.12 2023-06-25 13:39:43 +02:00
9589ad6146 fix(core): update 2023-06-25 13:39:42 +02:00
c2d4f9684c 4.0.11 2023-06-25 13:25:54 +02:00
d2b325889d fix(core): update 2023-06-25 13:25:53 +02:00
f6cd3c245b 4.0.10 2023-06-25 13:24:33 +02:00
1529ac12e4 fix(core): update 2023-06-25 13:24:32 +02:00
b4b5e52799 4.0.9 2023-06-25 12:45:44 +02:00
7de1cfbb6f fix(core): update 2023-06-25 12:45:44 +02:00
f426e110f0 4.0.8 2023-06-25 12:33:14 +02:00
02e9cdff98 fix(core): update 2023-06-25 12:33:13 +02:00
576ee88283 4.0.7 2023-06-25 12:27:17 +02:00
d1886a0966 fix(core): update 2023-06-25 12:27:17 +02:00
9f8b14c6fe 4.0.6 2023-06-25 12:26:39 +02:00
e64e610092 fix(core): update 2023-06-25 12:26:39 +02:00
86f19de7d8 4.0.5 2023-06-25 00:59:37 +02:00
1b6b45f15f fix(core): update 2023-06-25 00:59:36 +02:00
a8d2954689 4.0.4 2023-06-25 00:50:25 +02:00
6071ae5de3 fix(core): update 2023-06-25 00:50:25 +02:00
a664f3da76 4.0.3 2022-06-26 00:31:58 +02:00
5d3b4585b0 fix(core): update 2022-06-26 00:31:57 +02:00
11abf9aafd 4.0.2 2022-06-25 03:23:08 +02:00
1b86228bc4 fix(core): update 2022-06-25 03:23:08 +02:00
14 changed files with 5283 additions and 12282 deletions

View File

@ -0,0 +1,66 @@
name: Default (not tags)
on:
push:
tags-ignore:
- '**'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{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 @shipzone/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: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{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 @shipzone/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 @shipzone/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 @shipzone/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 @shipzone/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 @gitzone/tsdoc
npmci command tsdoc
continue-on-error: true

View File

@ -1,139 +0,0 @@
# gitzone ci_default
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache:
paths:
- .npmci_cache/
key: '$CI_BUILD_STAGE'
stages:
- security
- test
- release
- metadata
before_script:
- npm install -g @shipzone/npmci
# ====================
# security stage
# ====================
mirror:
stage: security
script:
- npmci git mirror
only:
- tags
tags:
- lossless
- docker
- notpriv
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --production --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=prod --production
tags:
- docker
allow_failure: true
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=dev
tags:
- 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:
- 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:
- docker
release:
stage: release
script:
- npmci node install stable
- npmci npm publish
only:
- tags
tags:
- lossless
- docker
- notpriv
# ====================
# metadata stage
# ====================
codequality:
stage: metadata
allow_failure: true
only:
- tags
script:
- npmci command npm install -g typescript
- npmci npm prepare
- npmci npm install
tags:
- lossless
- docker
- priv
trigger:
stage: metadata
script:
- npmci trigger
only:
- tags
tags:
- lossless
- docker
- notpriv
pages:
stage: metadata
script:
- npmci node install stable
- npmci npm prepare
- npmci npm install
- npmci command npm run buildDocs
tags:
- lossless
- docker
- notpriv
only:
- tags
artifacts:
expire_in: 1 week
paths:
- public
allow_failure: true

View File

@ -10,10 +10,10 @@
"projectType": "npm", "projectType": "npm",
"module": { "module": {
"githost": "gitlab.com", "githost": "gitlab.com",
"gitscope": "pushrocks", "gitscope": "push.rocks",
"gitrepo": "smartscaf", "gitrepo": "smartscaf",
"description": "scaffold projects quickly", "description": "scaffold projects quickly",
"npmPackagename": "@pushrocks/smartscaf", "npmPackagename": "@push.rocks/smartscaf",
"license": "MIT" "license": "MIT"
} }
} }

12087
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,13 @@
{ {
"name": "@pushrocks/smartscaf", "name": "@push.rocks/smartscaf",
"version": "4.0.1", "version": "4.0.14",
"private": false, "private": false,
"description": "scaffold projects quickly", "description": "scaffold projects quickly",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts", "typings": "dist_ts/index.d.ts",
"scripts": { "scripts": {
"test": "(tstest test/)", "test": "(tstest test/)",
"build": "(tsbuild)", "build": "(tsbuild --web --allowimplicitany)",
"buildDocs": "tsdoc" "buildDocs": "tsdoc"
}, },
"repository": { "repository": {
@ -26,24 +26,22 @@
"npm" "npm"
], ],
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.63", "@gitzone/tsbuild": "^2.1.66",
"@gitzone/tsrun": "^1.2.37", "@gitzone/tsrun": "^1.2.44",
"@gitzone/tstest": "^1.0.71", "@gitzone/tstest": "^1.0.77",
"@pushrocks/tapbundle": "^5.0.3", "@push.rocks/tapbundle": "^5.0.12",
"@types/node": "^18.0.0", "@types/node": "^20.4.4"
"tslint": "^6.0.0",
"tslint-config-prettier": "^1.18.0"
}, },
"dependencies": { "dependencies": {
"@pushrocks/lik": "^6.0.0", "@push.rocks/lik": "^6.0.3",
"@pushrocks/smartfile": "^10.0.2", "@push.rocks/smartfile": "^10.0.28",
"@pushrocks/smartfm": "^2.0.4", "@push.rocks/smartfm": "^2.0.4",
"@pushrocks/smarthbs": "^2.0.8", "@push.rocks/smarthbs": "^3.0.3",
"@pushrocks/smartinteract": "^2.0.11", "@push.rocks/smartinteract": "^2.0.14",
"@pushrocks/smartparam": "^1.1.6", "@push.rocks/smartparam": "^1.1.10",
"@pushrocks/smartpromise": "^3.1.7", "@push.rocks/smartpromise": "^4.0.2",
"@pushrocks/smartshell": "^2.0.30", "@push.rocks/smartshell": "^3.0.3",
"@pushrocks/smartyaml": "^2.0.5" "@push.rocks/smartyaml": "^2.0.5"
}, },
"files": [ "files": [
"ts/**/*", "ts/**/*",

5036
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +1,26 @@
# @pushrocks/smartscaf # @push.rocks/smartscaf
scaffold projects quickly scaffold projects quickly
## Availabililty and Links ## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartscaf) * [npmjs.org (npm package)](https://www.npmjs.com/package/@push.rocks/smartscaf)
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartscaf) * [gitlab.com (source)](https://gitlab.com/push.rocks/smartscaf)
* [github.com (source mirror)](https://github.com/pushrocks/smartscaf) * [github.com (source mirror)](https://github.com/push.rocks/smartscaf)
* [docs (typedoc)](https://pushrocks.gitlab.io/smartscaf/) * [docs (typedoc)](https://push.rocks.gitlab.io/smartscaf/)
## Status for master ## Status for master
Status Category | Status Badge Status Category | Status Badge
-- | -- -- | --
GitLab Pipelines | [![pipeline status](https://gitlab.com/pushrocks/smartscaf/badges/master/pipeline.svg)](https://lossless.cloud) GitLab Pipelines | [![pipeline status](https://gitlab.com/push.rocks/smartscaf/badges/master/pipeline.svg)](https://lossless.cloud)
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/pushrocks/smartscaf/badges/master/coverage.svg)](https://lossless.cloud) GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/push.rocks/smartscaf/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@pushrocks/smartscaf)](https://lossless.cloud) npm | [![npm downloads per month](https://badgen.net/npm/dy/@push.rocks/smartscaf)](https://lossless.cloud)
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/pushrocks/smartscaf)](https://lossless.cloud) Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/push.rocks/smartscaf)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud) TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud) Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smartscaf)](https://lossless.cloud) PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@push.rocks/smartscaf)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartscaf)](https://lossless.cloud) PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@push.rocks/smartscaf)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartscaf)](https://lossless.cloud) BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@push.rocks/smartscaf)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
## Usage ## Usage
@ -40,7 +39,6 @@ We are always happy for code contributions. If you are not the code contributing
For further information read the linked docs at the top of this readme. For further information read the linked docs at the top of this readme.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) ## Legal
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy) | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)

View File

@ -1,4 +1,4 @@
import { expect, tap } from '@pushrocks/tapbundle'; import { expect, tap } from '@push.rocks/tapbundle';
import * as path from 'path'; import * as path from 'path';
import * as smartscaf from '../ts/index.js'; import * as smartscaf from '../ts/index.js';

View File

@ -0,0 +1,3 @@
# this is a wow
# this is a here
# this is a undefined variable

View File

@ -1,3 +1,6 @@
---
fileName: anothername.yml
---
# this is a {{templateObject.value1}} # this is a {{templateObject.value1}}
# this is a {{templateObject.value2}} # this is a {{templateObject.value2}}
# this is a {{templateVar3}} # this is a {{templateVar3}}

View File

@ -2,7 +2,7 @@
* autocreated commitinfo by @pushrocks/commitinfo * autocreated commitinfo by @pushrocks/commitinfo
*/ */
export const commitinfo = { export const commitinfo = {
name: '@pushrocks/smartscaf', name: '@push.rocks/smartscaf',
version: '4.0.1', version: '4.0.14',
description: 'scaffold projects quickly' description: 'scaffold projects quickly'
} }

View File

@ -1,9 +1,6 @@
import * as plugins from './smartscaf.plugins.js'; import * as plugins from './smartscaf.plugins.js';
import * as interfaces from './interfaces/index.js'; import * as interfaces from './interfaces/index.js';
// interfaces
import { Smartfile } from '@pushrocks/smartfile';
export interface ScafTemplateContructorOptions { export interface ScafTemplateContructorOptions {
name?: string; name?: string;
description?: string; description?: string;
@ -11,7 +8,9 @@ export interface ScafTemplateContructorOptions {
} }
export class ScafTemplate { export class ScafTemplate {
public static async createTemplateFromDir() {} public static async createTemplateFromDir(dirPathArg: string) {
return new ScafTemplate(dirPathArg);
}
/** /**
* the name of the template * the name of the template
@ -37,7 +36,7 @@ export class ScafTemplate {
/** /**
* the files of the template as array of Smartfiles * the files of the template as array of Smartfiles
*/ */
public templateSmartfileArray: Smartfile[]; public templateSmartfileArray: plugins.smartfile.Smartfile[];
public requiredVariables: string[]; public requiredVariables: string[];
public defaultVariables: any; public defaultVariables: any;
public suppliedVariables: any = {}; public suppliedVariables: any = {};
@ -129,7 +128,7 @@ export class ScafTemplate {
*/ */
public async writeToDisk(destinationDirArg) { public async writeToDisk(destinationDirArg) {
this.destinationPath = destinationDirArg; this.destinationPath = destinationDirArg;
const smartfileArrayToWrite: Smartfile[] = []; const smartfileArrayToWrite: plugins.smartfile.Smartfile[] = [];
for (const smartfile of this.templateSmartfileArray) { for (const smartfile of this.templateSmartfileArray) {
// lets filter out template files // lets filter out template files
if (smartfile.path === '.smartscaf.yml') { if (smartfile.path === '.smartscaf.yml') {
@ -149,7 +148,7 @@ export class ScafTemplate {
smartfile.updateFileName(parsedTemplate.data.fileName); smartfile.updateFileName(parsedTemplate.data.fileName);
} }
smartfile.contents = Buffer.from(parsedTemplate.content); smartfile.contents = Buffer.from(await plugins.smarthbs.postprocess(parsedTemplate.content));
smartfileArrayToWrite.push(smartfile); smartfileArrayToWrite.push(smartfile);
} }

View File

@ -1,13 +1,13 @@
import * as path from 'path'; import * as path from 'path';
import * as lik from '@pushrocks/lik'; import * as lik from '@push.rocks/lik';
import * as smartfile from '@pushrocks/smartfile'; import * as smartfile from '@push.rocks/smartfile';
import * as smartfm from '@pushrocks/smartfm'; import * as smartfm from '@push.rocks/smartfm';
import * as smarthbs from '@pushrocks/smarthbs'; import * as smarthbs from '@push.rocks/smarthbs';
import * as smartinteract from '@pushrocks/smartinteract'; import * as smartinteract from '@push.rocks/smartinteract';
import * as smartparam from '@pushrocks/smartparam'; import * as smartparam from '@push.rocks/smartparam';
import * as smartpromise from '@pushrocks/smartpromise'; import * as smartpromise from '@push.rocks/smartpromise';
import * as smartyaml from '@pushrocks/smartyaml'; import * as smartyaml from '@push.rocks/smartyaml';
import * as smartshell from '@pushrocks/smartshell'; import * as smartshell from '@push.rocks/smartshell';
export { export {
path, path,