Compare commits

...

8 Commits

Author SHA1 Message Date
450b3ba379 2.0.23 2026-02-03 16:59:33 +00:00
0daae0bd07 fix(core): update 2026-02-03 16:59:32 +00:00
826f3a6c63 2.0.22 2020-10-05 10:33:44 +00:00
c1a4671ce1 fix(core): update 2020-10-05 10:33:43 +00:00
73a6d5bc31 2.0.21 2020-10-05 10:33:09 +00:00
e15a569391 fix(core): update 2020-10-05 10:33:08 +00:00
74809bd8d4 2.0.20 2020-10-04 23:02:27 +00:00
5b852d9602 fix(core): update 2020-10-04 23:02:26 +00:00
21 changed files with 8602 additions and 155 deletions

4
.gitignore vendored
View File

@@ -15,8 +15,6 @@ node_modules/
# builds
dist/
dist_web/
dist_serve/
dist_ts_web/
dist_*/
# custom

View File

@@ -3,14 +3,14 @@ image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache:
paths:
- .npmci_cache/
key: "$CI_BUILD_STAGE"
- .npmci_cache/
key: '$CI_BUILD_STAGE'
stages:
- security
- test
- release
- metadata
- security
- test
- release
- metadata
# ====================
# security stage
@@ -18,21 +18,36 @@ stages:
mirror:
stage: security
script:
- npmci git mirror
- npmci git mirror
only:
- tags
tags:
- docker
- notpriv
- lossless
- docker
- notpriv
snyk:
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install -g snyk
- npmci command npm install --ignore-scripts
- npmci command snyk test
- 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
- notpriv
- docker
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
@@ -41,37 +56,36 @@ snyk:
testStable:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci npm test
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- priv
- docker
testBuild:
stage: test
script:
- npmci npm prepare
- npmci node install lts
- npmci npm install
- npmci command npm run build
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
- docker
release:
stage: release
script:
- npmci node install lts
- npmci npm publish
- npmci node install stable
- npmci npm publish
only:
- tags
- tags
tags:
- docker
- notpriv
- lossless
- docker
- notpriv
# ====================
# metadata stage
@@ -79,35 +93,39 @@ release:
codequality:
stage: metadata
allow_failure: true
only:
- tags
script:
- npmci command npm install -g tslint typescript
- npmci npm prepare
- npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags:
- docker
- priv
- lossless
- docker
- priv
trigger:
stage: metadata
script:
- npmci trigger
- npmci trigger
only:
- tags
- tags
tags:
- docker
- notpriv
- lossless
- docker
- notpriv
pages:
image: hosttoday/ht-docker-dbase:npmci
services:
- docker:stable-dind
stage: metadata
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 install
- npmci command tsdoc
tags:
- lossless
- docker
- notpriv
only:
@@ -115,5 +133,5 @@ pages:
artifacts:
expire_in: 1 week
paths:
- public
- public
allow_failure: true

29
.vscode/launch.json vendored Normal file
View 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
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

@@ -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
[![build status](https://gitlab.com/gitzone/tools/badges/master/build.svg)](https://gitlab.com/gitzone/tools/commits/master)
[![coverage report](https://gitlab.com/gitzone/tools/badges/master/coverage.svg)](https://gitlab.com/gitzone/tools/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/@gitzone/tools.svg)](https://www.npmjs.com/package/@gitzone/tools)
[![Known Vulnerabilities](https://snyk.io/test/npm/@gitzone/tools/badge.svg)](https://snyk.io/test/npm/@gitzone/tools)
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](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)
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)

View File

@@ -1,16 +1,13 @@
{
"default":[
"default": [
"@bubblewrap/cli",
"@losslessone_private/lole",
"@gitzone_private/gitzone",
"@gitzone/tsbuild",
"@gitzone/tsdocker",
"@gitzone/tsrun",
"@git.zone/tsbuild",
"@git.zone/tsdocker",
"@git.zone/tsrun",
"nativescript",
"typescript",
"tslint",
"npm-check",
""
"npm-check"
]
}

3
cli.js
View File

@@ -1,3 +1,4 @@
#!/usr/bin/env node
process.env.CLI_CALL = 'true';
require('./dist/index');
const cliTool = require('./dist_ts/index');
cliTool.runCli();

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env node
process.env.CLI_CALL = 'true';
require('@gitzone/tsrun');
require('./ts/index');
require('@git.zone/tsrun');
const cliTool = require('./ts/index');
cliTool.runCli();

View File

@@ -9,12 +9,13 @@
"npmAccessLevel": "public"
},
"gitzone": {
"projectType": "npm",
"module": {
"githost": "gitlab.com",
"gitscope": "gitzone",
"gitrepo": "tools",
"shortDescription": "setup your environment with the most important tools and update them easily.",
"npmPackagename": "@gitzone/tools",
"npmPackagename": "@git.zone/tools",
"license": "MIT"
}
}

26
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "@gitzone/tools",
"version": "2.0.19",
"name": "@git.zone/tools",
"version": "2.0.23",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -1158,9 +1158,9 @@
"to-fast-properties": "^2.0.0"
}
},
"@gitzone/tsbuild": {
"@git.zone/tsbuild": {
"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==",
"dev": true,
"requires": {
@@ -1187,9 +1187,9 @@
}
}
},
"@gitzone/tsbundle": {
"@git.zone/tsbundle": {
"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==",
"dev": true,
"requires": {
@@ -1219,9 +1219,9 @@
"typescript": "^3.9.7"
}
},
"@gitzone/tsrun": {
"@git.zone/tsrun": {
"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==",
"requires": {
"@pushrocks/smartfile": "^7.0.12",
@@ -1270,14 +1270,14 @@
}
}
},
"@gitzone/tstest": {
"@git.zone/tstest": {
"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==",
"dev": true,
"requires": {
"@gitzone/tsbundle": "^1.0.78",
"@gitzone/tsrun": "^1.2.12",
"@git.zone/tsbundle": "^1.0.78",
"@git.zone/tsrun": "^1.2.12",
"@pushrocks/consolecolor": "^2.0.1",
"@pushrocks/smartbrowser": "^1.0.17",
"@pushrocks/smartdelay": "^2.0.10",
@@ -1474,7 +1474,7 @@
"integrity": "sha512-ifUU0bbR/p3Vpe+nMg3LYHCPvM9QmRpL83pEYBvZ8KjbkrCxeXTJuNkeO3T8NGfeEL/q+SS8a9oEnpzoT/SGvw==",
"dev": true,
"requires": {
"@gitzone/tsbuild": "^2.1.24",
"@git.zone/tsbuild": "^2.1.24",
"@pushrocks/consolecolor": "^2.0.1",
"@pushrocks/smartpromise": "^3.0.6"
},

View File

@@ -1,13 +1,14 @@
{
"name": "@gitzone/tools",
"version": "2.0.19",
"name": "@git.zone/tools",
"version": "2.0.23",
"private": false,
"type": "module",
"description": "setup your environment with the most important tools and update them easily.",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"scripts": {
"test": "tstest test/",
"build": "tsbuild"
"test": "(tstest test/ --web)",
"build": "(tsbuild --web)"
},
"bin": {
"gtools": "cli.js"
@@ -29,30 +30,30 @@
},
"homepage": "https://github.com/GitZoneTools/npmg#readme",
"devDependencies": {
"@gitzone/tsbuild": "^2.1.25",
"@gitzone/tstest": "^1.0.52",
"@pushrocks/tapbundle": "^3.2.9",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0"
"@git.zone/tsbuild": "^4.1.2",
"@git.zone/tstest": "^3.1.8"
},
"dependencies": {
"@gitzone/tsrun": "^1.2.12",
"@pushrocks/smartcli": "^3.0.12",
"@pushrocks/smartfile": "^8.0.4",
"@pushrocks/smartlog": "^2.0.39",
"@pushrocks/smartlog-destination-local": "^8.0.8",
"@pushrocks/smartshell": "^2.0.26",
"@types/node": "^14.11.2"
"@git.zone/tsrun": "^2.0.1",
"@push.rocks/smartcli": "^4.0.20",
"@push.rocks/smartlog": "^3.1.10",
"@push.rocks/smartlog-destination-local": "^9.0.2",
"@push.rocks/smartshell": "^3.3.0",
"@types/node": "^25.2.0"
},
"files": [
"ts/*",
"ts_web/*",
"dist/*",
"dist_web/*",
"dist_ts_web/*",
"assets/*",
"ts/**/*",
"ts_web/**/*",
"dist/**/*",
"dist_*/**/*",
"dist_ts/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
"npmextra.json",
"readme.md"
],
"browserslist": [
"last 1 chrome versions"
]
}

8380
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

14
test/test.node.ts Normal file
View 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();

View File

@@ -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
View 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.'
}

View File

@@ -1,3 +1,9 @@
import plugins = require('./tools.plugins');
import * as cli from './tools.cli';
cli.run();
import * as plugins from './tools.plugins.js';
import * as cli from './tools.cli.js';
export const runCli = async () => {
await cli.run();
};
// Auto-run when called directly
runCli();

View File

@@ -1,10 +1,10 @@
import * as plugins from './tools.plugins';
import * as toolsInstall from './tools.install';
import * as plugins from './tools.plugins.js';
import * as toolsInstall from './tools.install.js';
export const run = async () => {
const toolsCli = new plugins.smartcli.Smartcli();
toolsCli.addCommand('install').subscribe(async argvArg => {
toolsCli.addCommand('install').subscribe(async (argvArg) => {
toolsInstall.install('default');
});

View File

@@ -1,10 +1,10 @@
import plugins = require('./tools.plugins');
import paths = require('./tools.paths');
import { logger } from './tools.logging';
import * as plugins from './tools.plugins.js';
import * as paths from './tools.paths.js';
import { logger } from './tools.logging.js';
const installExec = async (packageNames: string[]) => {
const smartshellInstance = new plugins.smartshell.Smartshell({
executor: 'bash'
executor: 'bash',
});
let installString = '';
@@ -22,8 +22,8 @@ const installExec = async (packageNames: string[]) => {
logger.log('ok', `installed tools successfully!`);
};
const packageLibrary = plugins.smartfile.fs.toObjectSync(
plugins.path.join(paths.assetsDir, 'package_library.json')
const packageLibrary = JSON.parse(
plugins.fs.readFileSync(plugins.path.join(paths.assetsDir, 'package_library.json'), 'utf8')
);
export const install = async (packageSetArg: string) => {

View File

@@ -1,4 +1,4 @@
import * as plugins from './tools.plugins';
import * as plugins from './tools.plugins.js';
export const logger = new plugins.smartlog.Smartlog({
logContext: {
@@ -7,9 +7,9 @@ export const logger = new plugins.smartlog.Smartlog({
containerName: 'Some Containername',
environment: 'local',
runtime: 'node',
zone: 'gitzone'
zone: 'gitzone',
},
minimumLogLevel: 'silly'
minimumLogLevel: 'silly',
});
logger.addLogDestination(new plugins.smartlogDestinationLocal.DestinationLocal());

View File

@@ -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 assetsDir = plugins.path.join(packageBase, './assets');

View File

@@ -1,11 +1,11 @@
// node native
import * as path from 'path';
import * as fs from 'fs';
// pushrocks scope
import * as smartlog from '@pushrocks/smartlog';
import * as smartlogDestinationLocal from '@pushrocks/smartlog-destination-local';
import * as smartcli from '@pushrocks/smartcli';
import * as smartfile from '@pushrocks/smartfile';
import * as smartshell from '@pushrocks/smartshell';
// push.rocks scope
import * as smartlog from '@push.rocks/smartlog';
import * as smartlogDestinationLocal from '@push.rocks/smartlog-destination-local';
import * as smartcli from '@push.rocks/smartcli';
import * as smartshell from '@push.rocks/smartshell';
export { smartlog, smartlogDestinationLocal, path, smartcli, smartfile, smartshell };
export { smartlog, smartlogDestinationLocal, path, fs, smartcli, smartshell };