Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 450b3ba379 | |||
| 0daae0bd07 | |||
| 826f3a6c63 | |||
| c1a4671ce1 | |||
| 73a6d5bc31 | |||
| e15a569391 | |||
| 74809bd8d4 | |||
| 5b852d9602 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -15,8 +15,6 @@ node_modules/
|
|||||||
|
|
||||||
# builds
|
# builds
|
||||||
dist/
|
dist/
|
||||||
dist_web/
|
dist_*/
|
||||||
dist_serve/
|
|
||||||
dist_ts_web/
|
|
||||||
|
|
||||||
# custom
|
# custom
|
||||||
@@ -4,7 +4,7 @@ image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
|||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- .npmci_cache/
|
- .npmci_cache/
|
||||||
key: "$CI_BUILD_STAGE"
|
key: '$CI_BUILD_STAGE'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- security
|
- security
|
||||||
@@ -19,20 +19,35 @@ mirror:
|
|||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
- npmci git mirror
|
- npmci git mirror
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
snyk:
|
auditProductionDependencies:
|
||||||
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
- npmci command npm install -g snyk
|
- npmci command npm install --production --ignore-scripts
|
||||||
- npmci command npm install --ignore-scripts
|
- npmci command npm config set registry https://registry.npmjs.org
|
||||||
- npmci command snyk test
|
- npmci command npm audit --audit-level=high --only=prod --production
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
|
||||||
|
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
|
# test stage
|
||||||
@@ -48,28 +63,27 @@ testStable:
|
|||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- priv
|
|
||||||
|
|
||||||
testBuild:
|
testBuild:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
- npmci node install lts
|
- npmci node install stable
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci command npm run build
|
- npmci command npm run build
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
script:
|
script:
|
||||||
- npmci node install lts
|
- npmci node install stable
|
||||||
- npmci npm publish
|
- npmci npm publish
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
@@ -79,11 +93,15 @@ release:
|
|||||||
codequality:
|
codequality:
|
||||||
stage: metadata
|
stage: metadata
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
script:
|
script:
|
||||||
- npmci command npm install -g tslint typescript
|
- npmci command npm install -g tslint typescript
|
||||||
|
- npmci npm prepare
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
- priv
|
- priv
|
||||||
|
|
||||||
@@ -94,20 +112,20 @@ trigger:
|
|||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
image: hosttoday/ht-docker-dbase:npmci
|
|
||||||
services:
|
|
||||||
- docker:stable-dind
|
|
||||||
stage: metadata
|
stage: metadata
|
||||||
script:
|
script:
|
||||||
- npmci command npm install -g @gitzone/tsdoc
|
- npmci node install lts
|
||||||
|
- npmci command npm install -g @git.zone/tsdoc
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci command tsdoc
|
- npmci command tsdoc
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
only:
|
only:
|
||||||
|
|||||||
29
.vscode/launch.json
vendored
Normal file
29
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "current file",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"args": [
|
||||||
|
"${relativeFile}"
|
||||||
|
],
|
||||||
|
"runtimeArgs": ["-r", "@git.zone/tsrun"],
|
||||||
|
"cwd": "${workspaceRoot}",
|
||||||
|
"protocol": "inspector",
|
||||||
|
"internalConsoleOptions": "openOnSessionStart"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "test.ts",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"args": [
|
||||||
|
"test/test.ts"
|
||||||
|
],
|
||||||
|
"runtimeArgs": ["-r", "@git.zone/tsrun"],
|
||||||
|
"cwd": "${workspaceRoot}",
|
||||||
|
"protocol": "inspector",
|
||||||
|
"internalConsoleOptions": "openOnSessionStart"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
26
.vscode/settings.json
vendored
Normal file
26
.vscode/settings.json
vendored
Normal 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"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
28
README.md
28
README.md
@@ -1,28 +0,0 @@
|
|||||||
# @gitzone/tools
|
|
||||||
setup your environment with the most important tools and update them easily.
|
|
||||||
|
|
||||||
## Availabililty and Links
|
|
||||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@gitzone/tools)
|
|
||||||
* [gitlab.com (source)](https://gitlab.com/gitzone/tools)
|
|
||||||
* [github.com (source mirror)](https://github.com/gitzone/tools)
|
|
||||||
* [docs (typedoc)](https://gitzone.gitlab.io/tools/)
|
|
||||||
|
|
||||||
## Status for master
|
|
||||||
[](https://gitlab.com/gitzone/tools/commits/master)
|
|
||||||
[](https://gitlab.com/gitzone/tools/commits/master)
|
|
||||||
[](https://www.npmjs.com/package/@gitzone/tools)
|
|
||||||
[](https://snyk.io/test/npm/@gitzone/tools)
|
|
||||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
|
||||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
|
||||||
[](https://prettier.io/)
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Use TypeScript for best in class instellisense.
|
|
||||||
|
|
||||||
For further information read the linked docs at the top of this readme.
|
|
||||||
|
|
||||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
|
||||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
|
||||||
|
|
||||||
[](https://maintainedby.lossless.com)
|
|
||||||
@@ -3,14 +3,11 @@
|
|||||||
"@bubblewrap/cli",
|
"@bubblewrap/cli",
|
||||||
"@losslessone_private/lole",
|
"@losslessone_private/lole",
|
||||||
"@gitzone_private/gitzone",
|
"@gitzone_private/gitzone",
|
||||||
"@gitzone/tsbuild",
|
"@git.zone/tsbuild",
|
||||||
"@gitzone/tsdocker",
|
"@git.zone/tsdocker",
|
||||||
"@gitzone/tsrun",
|
"@git.zone/tsrun",
|
||||||
"nativescript",
|
"nativescript",
|
||||||
"typescript",
|
"typescript",
|
||||||
"tslint",
|
"npm-check"
|
||||||
"npm-check",
|
|
||||||
""
|
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
3
cli.js
3
cli.js
@@ -1,3 +1,4 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
process.env.CLI_CALL = 'true';
|
process.env.CLI_CALL = 'true';
|
||||||
require('./dist/index');
|
const cliTool = require('./dist_ts/index');
|
||||||
|
cliTool.runCli();
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
process.env.CLI_CALL = 'true';
|
process.env.CLI_CALL = 'true';
|
||||||
require('@gitzone/tsrun');
|
require('@git.zone/tsrun');
|
||||||
require('./ts/index');
|
const cliTool = require('./ts/index');
|
||||||
|
cliTool.runCli();
|
||||||
|
|||||||
@@ -9,12 +9,13 @@
|
|||||||
"npmAccessLevel": "public"
|
"npmAccessLevel": "public"
|
||||||
},
|
},
|
||||||
"gitzone": {
|
"gitzone": {
|
||||||
|
"projectType": "npm",
|
||||||
"module": {
|
"module": {
|
||||||
"githost": "gitlab.com",
|
"githost": "gitlab.com",
|
||||||
"gitscope": "gitzone",
|
"gitscope": "gitzone",
|
||||||
"gitrepo": "tools",
|
"gitrepo": "tools",
|
||||||
"shortDescription": "setup your environment with the most important tools and update them easily.",
|
"shortDescription": "setup your environment with the most important tools and update them easily.",
|
||||||
"npmPackagename": "@gitzone/tools",
|
"npmPackagename": "@git.zone/tools",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
26
package-lock.json
generated
26
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tools",
|
"name": "@git.zone/tools",
|
||||||
"version": "2.0.19",
|
"version": "2.0.23",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -1158,9 +1158,9 @@
|
|||||||
"to-fast-properties": "^2.0.0"
|
"to-fast-properties": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@gitzone/tsbuild": {
|
"@git.zone/tsbuild": {
|
||||||
"version": "2.1.25",
|
"version": "2.1.25",
|
||||||
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbuild/-/tsbuild-2.1.25.tgz",
|
"resolved": "https://verdaccio.lossless.one/@git.zone%2ftsbuild/-/tsbuild-2.1.25.tgz",
|
||||||
"integrity": "sha512-KtesoQEm96x0/x1800R3pcj06RcYTdqwBhG9oje+jQW4qZs/bnUirWZXkRMSLAK92cVm899KzZtYkq/fKga2+A==",
|
"integrity": "sha512-KtesoQEm96x0/x1800R3pcj06RcYTdqwBhG9oje+jQW4qZs/bnUirWZXkRMSLAK92cVm899KzZtYkq/fKga2+A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@@ -1187,9 +1187,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@gitzone/tsbundle": {
|
"@git.zone/tsbundle": {
|
||||||
"version": "1.0.78",
|
"version": "1.0.78",
|
||||||
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbundle/-/tsbundle-1.0.78.tgz",
|
"resolved": "https://verdaccio.lossless.one/@git.zone%2ftsbundle/-/tsbundle-1.0.78.tgz",
|
||||||
"integrity": "sha512-QcjzUPYfp7w2uaNom2eOFiBBPabVOqmaI7Cun1P+BBB+a8JwNlpyNOwDY6cPr2MEW2t9Picbiz9yyqkG1qYrtw==",
|
"integrity": "sha512-QcjzUPYfp7w2uaNom2eOFiBBPabVOqmaI7Cun1P+BBB+a8JwNlpyNOwDY6cPr2MEW2t9Picbiz9yyqkG1qYrtw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@@ -1219,9 +1219,9 @@
|
|||||||
"typescript": "^3.9.7"
|
"typescript": "^3.9.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@gitzone/tsrun": {
|
"@git.zone/tsrun": {
|
||||||
"version": "1.2.12",
|
"version": "1.2.12",
|
||||||
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsrun/-/tsrun-1.2.12.tgz",
|
"resolved": "https://verdaccio.lossless.one/@git.zone%2ftsrun/-/tsrun-1.2.12.tgz",
|
||||||
"integrity": "sha512-xR+Ry3dj1L4fR72cYgEAmlE9colXXSPNg0i2jRJFudGO7ZqeGn+mPDOXmg/g7RbEd1wa9uJepgsOy4IlC9JB+g==",
|
"integrity": "sha512-xR+Ry3dj1L4fR72cYgEAmlE9colXXSPNg0i2jRJFudGO7ZqeGn+mPDOXmg/g7RbEd1wa9uJepgsOy4IlC9JB+g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartfile": "^7.0.12",
|
"@pushrocks/smartfile": "^7.0.12",
|
||||||
@@ -1270,14 +1270,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@gitzone/tstest": {
|
"@git.zone/tstest": {
|
||||||
"version": "1.0.52",
|
"version": "1.0.52",
|
||||||
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftstest/-/tstest-1.0.52.tgz",
|
"resolved": "https://verdaccio.lossless.one/@git.zone%2ftstest/-/tstest-1.0.52.tgz",
|
||||||
"integrity": "sha512-9n6mhGAd1MKMb4lcXstJvoG9bIl+mb+M9wdajbFe/jzv9q62P5RL9pSdyW4Yk8I7ObJmyggBvr8cLaOUsaqzAQ==",
|
"integrity": "sha512-9n6mhGAd1MKMb4lcXstJvoG9bIl+mb+M9wdajbFe/jzv9q62P5RL9pSdyW4Yk8I7ObJmyggBvr8cLaOUsaqzAQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@gitzone/tsbundle": "^1.0.78",
|
"@git.zone/tsbundle": "^1.0.78",
|
||||||
"@gitzone/tsrun": "^1.2.12",
|
"@git.zone/tsrun": "^1.2.12",
|
||||||
"@pushrocks/consolecolor": "^2.0.1",
|
"@pushrocks/consolecolor": "^2.0.1",
|
||||||
"@pushrocks/smartbrowser": "^1.0.17",
|
"@pushrocks/smartbrowser": "^1.0.17",
|
||||||
"@pushrocks/smartdelay": "^2.0.10",
|
"@pushrocks/smartdelay": "^2.0.10",
|
||||||
@@ -1474,7 +1474,7 @@
|
|||||||
"integrity": "sha512-ifUU0bbR/p3Vpe+nMg3LYHCPvM9QmRpL83pEYBvZ8KjbkrCxeXTJuNkeO3T8NGfeEL/q+SS8a9oEnpzoT/SGvw==",
|
"integrity": "sha512-ifUU0bbR/p3Vpe+nMg3LYHCPvM9QmRpL83pEYBvZ8KjbkrCxeXTJuNkeO3T8NGfeEL/q+SS8a9oEnpzoT/SGvw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@gitzone/tsbuild": "^2.1.24",
|
"@git.zone/tsbuild": "^2.1.24",
|
||||||
"@pushrocks/consolecolor": "^2.0.1",
|
"@pushrocks/consolecolor": "^2.0.1",
|
||||||
"@pushrocks/smartpromise": "^3.0.6"
|
"@pushrocks/smartpromise": "^3.0.6"
|
||||||
},
|
},
|
||||||
|
|||||||
49
package.json
49
package.json
@@ -1,13 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tools",
|
"name": "@git.zone/tools",
|
||||||
"version": "2.0.19",
|
"version": "2.0.23",
|
||||||
"private": false,
|
"private": false,
|
||||||
|
"type": "module",
|
||||||
"description": "setup your environment with the most important tools and update them easily.",
|
"description": "setup your environment with the most important tools and update them easily.",
|
||||||
"main": "dist/index.js",
|
"main": "dist_ts/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "tstest test/",
|
"test": "(tstest test/ --web)",
|
||||||
"build": "tsbuild"
|
"build": "(tsbuild --web)"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"gtools": "cli.js"
|
"gtools": "cli.js"
|
||||||
@@ -29,30 +30,30 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/GitZoneTools/npmg#readme",
|
"homepage": "https://github.com/GitZoneTools/npmg#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.25",
|
"@git.zone/tsbuild": "^4.1.2",
|
||||||
"@gitzone/tstest": "^1.0.52",
|
"@git.zone/tstest": "^3.1.8"
|
||||||
"@pushrocks/tapbundle": "^3.2.9",
|
|
||||||
"tslint": "^6.1.3",
|
|
||||||
"tslint-config-prettier": "^1.18.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@gitzone/tsrun": "^1.2.12",
|
"@git.zone/tsrun": "^2.0.1",
|
||||||
"@pushrocks/smartcli": "^3.0.12",
|
"@push.rocks/smartcli": "^4.0.20",
|
||||||
"@pushrocks/smartfile": "^8.0.4",
|
"@push.rocks/smartlog": "^3.1.10",
|
||||||
"@pushrocks/smartlog": "^2.0.39",
|
"@push.rocks/smartlog-destination-local": "^9.0.2",
|
||||||
"@pushrocks/smartlog-destination-local": "^8.0.8",
|
"@push.rocks/smartshell": "^3.3.0",
|
||||||
"@pushrocks/smartshell": "^2.0.26",
|
"@types/node": "^25.2.0"
|
||||||
"@types/node": "^14.11.2"
|
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/*",
|
"ts/**/*",
|
||||||
"ts_web/*",
|
"ts_web/**/*",
|
||||||
"dist/*",
|
"dist/**/*",
|
||||||
"dist_web/*",
|
"dist_*/**/*",
|
||||||
"dist_ts_web/*",
|
"dist_ts/**/*",
|
||||||
"assets/*",
|
"dist_ts_web/**/*",
|
||||||
|
"assets/**/*",
|
||||||
"cli.js",
|
"cli.js",
|
||||||
"npmextra.json",
|
"npmextra.json",
|
||||||
"readme.md"
|
"readme.md"
|
||||||
|
],
|
||||||
|
"browserslist": [
|
||||||
|
"last 1 chrome versions"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
8380
pnpm-lock.yaml
generated
Normal file
8380
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
14
test/test.node.ts
Normal file
14
test/test.node.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||||
|
|
||||||
|
import * as tools from '../ts/tools.install.js';
|
||||||
|
|
||||||
|
tap.test('should have install function exported', async () => {
|
||||||
|
expect(typeof tools.install).toEqual('function');
|
||||||
|
});
|
||||||
|
|
||||||
|
tap.test('should handle unknown package set', async () => {
|
||||||
|
// This will just log a warning, not throw
|
||||||
|
await tools.install('unknown');
|
||||||
|
});
|
||||||
|
|
||||||
|
export default tap.start();
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import { expect, tap } from '@pushrocks/tapbundle';
|
|
||||||
|
|
||||||
import * as tools from '../ts/tools.install';
|
|
||||||
|
|
||||||
tap.test("should install default list globally when parsed 'default' as argument", async () => {
|
|
||||||
await tools.install('default');
|
|
||||||
});
|
|
||||||
|
|
||||||
tap.start();
|
|
||||||
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* autocreated commitinfo by @pushrocks/commitinfo
|
||||||
|
*/
|
||||||
|
export const commitinfo = {
|
||||||
|
name: '@git.zone/tools',
|
||||||
|
version: '2.0.23',
|
||||||
|
description: 'setup your environment with the most important tools and update them easily.'
|
||||||
|
}
|
||||||
12
ts/index.ts
12
ts/index.ts
@@ -1,3 +1,9 @@
|
|||||||
import plugins = require('./tools.plugins');
|
import * as plugins from './tools.plugins.js';
|
||||||
import * as cli from './tools.cli';
|
import * as cli from './tools.cli.js';
|
||||||
cli.run();
|
|
||||||
|
export const runCli = async () => {
|
||||||
|
await cli.run();
|
||||||
|
};
|
||||||
|
|
||||||
|
// Auto-run when called directly
|
||||||
|
runCli();
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import * as plugins from './tools.plugins';
|
import * as plugins from './tools.plugins.js';
|
||||||
import * as toolsInstall from './tools.install';
|
import * as toolsInstall from './tools.install.js';
|
||||||
|
|
||||||
export const run = async () => {
|
export const run = async () => {
|
||||||
const toolsCli = new plugins.smartcli.Smartcli();
|
const toolsCli = new plugins.smartcli.Smartcli();
|
||||||
|
|
||||||
toolsCli.addCommand('install').subscribe(async argvArg => {
|
toolsCli.addCommand('install').subscribe(async (argvArg) => {
|
||||||
toolsInstall.install('default');
|
toolsInstall.install('default');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import plugins = require('./tools.plugins');
|
import * as plugins from './tools.plugins.js';
|
||||||
import paths = require('./tools.paths');
|
import * as paths from './tools.paths.js';
|
||||||
import { logger } from './tools.logging';
|
import { logger } from './tools.logging.js';
|
||||||
|
|
||||||
const installExec = async (packageNames: string[]) => {
|
const installExec = async (packageNames: string[]) => {
|
||||||
const smartshellInstance = new plugins.smartshell.Smartshell({
|
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||||
executor: 'bash'
|
executor: 'bash',
|
||||||
});
|
});
|
||||||
|
|
||||||
let installString = '';
|
let installString = '';
|
||||||
@@ -22,8 +22,8 @@ const installExec = async (packageNames: string[]) => {
|
|||||||
logger.log('ok', `installed tools successfully!`);
|
logger.log('ok', `installed tools successfully!`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const packageLibrary = plugins.smartfile.fs.toObjectSync(
|
const packageLibrary = JSON.parse(
|
||||||
plugins.path.join(paths.assetsDir, 'package_library.json')
|
plugins.fs.readFileSync(plugins.path.join(paths.assetsDir, 'package_library.json'), 'utf8')
|
||||||
);
|
);
|
||||||
|
|
||||||
export const install = async (packageSetArg: string) => {
|
export const install = async (packageSetArg: string) => {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import * as plugins from './tools.plugins';
|
import * as plugins from './tools.plugins.js';
|
||||||
|
|
||||||
export const logger = new plugins.smartlog.Smartlog({
|
export const logger = new plugins.smartlog.Smartlog({
|
||||||
logContext: {
|
logContext: {
|
||||||
@@ -7,9 +7,9 @@ export const logger = new plugins.smartlog.Smartlog({
|
|||||||
containerName: 'Some Containername',
|
containerName: 'Some Containername',
|
||||||
environment: 'local',
|
environment: 'local',
|
||||||
runtime: 'node',
|
runtime: 'node',
|
||||||
zone: 'gitzone'
|
zone: 'gitzone',
|
||||||
},
|
},
|
||||||
minimumLogLevel: 'silly'
|
minimumLogLevel: 'silly',
|
||||||
});
|
});
|
||||||
|
|
||||||
logger.addLogDestination(new plugins.smartlogDestinationLocal.DestinationLocal());
|
logger.addLogDestination(new plugins.smartlogDestinationLocal.DestinationLocal());
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
import plugins = require('./tools.plugins');
|
import * as plugins from './tools.plugins.js';
|
||||||
|
import { fileURLToPath } from 'url';
|
||||||
|
|
||||||
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
|
const __dirname = plugins.path.dirname(__filename);
|
||||||
|
|
||||||
export const packageBase = plugins.path.join(__dirname, '../');
|
export const packageBase = plugins.path.join(__dirname, '../');
|
||||||
export const assetsDir = plugins.path.join(packageBase, './assets');
|
export const assetsDir = plugins.path.join(packageBase, './assets');
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
// node native
|
// node native
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
import * as fs from 'fs';
|
||||||
|
|
||||||
// pushrocks scope
|
// push.rocks scope
|
||||||
import * as smartlog from '@pushrocks/smartlog';
|
import * as smartlog from '@push.rocks/smartlog';
|
||||||
import * as smartlogDestinationLocal from '@pushrocks/smartlog-destination-local';
|
import * as smartlogDestinationLocal from '@push.rocks/smartlog-destination-local';
|
||||||
import * as smartcli from '@pushrocks/smartcli';
|
import * as smartcli from '@push.rocks/smartcli';
|
||||||
import * as smartfile from '@pushrocks/smartfile';
|
import * as smartshell from '@push.rocks/smartshell';
|
||||||
import * as smartshell from '@pushrocks/smartshell';
|
|
||||||
|
|
||||||
export { smartlog, smartlogDestinationLocal, path, smartcli, smartfile, smartshell };
|
export { smartlog, smartlogDestinationLocal, path, fs, smartcli, smartshell };
|
||||||
|
|||||||
Reference in New Issue
Block a user