Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 450b3ba379 | |||
| 0daae0bd07 | |||
| 826f3a6c63 | |||
| c1a4671ce1 |
@@ -120,7 +120,7 @@ pages:
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci node install lts
|
||||
- npmci command npm install -g @gitzone/tsdoc
|
||||
- npmci command npm install -g @git.zone/tsdoc
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command tsdoc
|
||||
|
||||
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
@@ -8,7 +8,7 @@
|
||||
"args": [
|
||||
"${relativeFile}"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"runtimeArgs": ["-r", "@git.zone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
@@ -20,7 +20,7 @@
|
||||
"args": [
|
||||
"test/test.ts"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"runtimeArgs": ["-r", "@git.zone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
|
||||
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",
|
||||
"@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
3
cli.js
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
process.env.CLI_CALL = 'true';
|
||||
require('./dist/index');
|
||||
const cliTool = require('./dist_ts/index');
|
||||
cliTool.runCli();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"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
26
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@gitzone/tools",
|
||||
"version": "2.0.21",
|
||||
"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"
|
||||
},
|
||||
|
||||
25
package.json
25
package.json
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"name": "@gitzone/tools",
|
||||
"version": "2.0.21",
|
||||
"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_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
@@ -29,20 +30,16 @@
|
||||
},
|
||||
"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/**/*",
|
||||
|
||||
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 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();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
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({
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user