Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
e41cd896bb | |||
ba44007fb2 | |||
8d1362f14b | |||
61ceb03962 | |||
ab3ec90245 | |||
b51cda08c4 | |||
b8332e1de4 | |||
da9a73bc79 | |||
26bf39abae | |||
b66b2083ab | |||
e40c0151bc | |||
fe97fcd193 |
2
cli.js
2
cli.js
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
process.env.CLI_CALL = 'true';
|
process.env.CLI_CALL = 'true';
|
||||||
const cliTool = require('./dist_ts/index');
|
const cliTool = await import('./dist_ts/index.js');
|
||||||
cliTool.runCli();
|
cliTool.runCli();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
process.env.CLI_CALL = 'true';
|
process.env.CLI_CALL = 'true';
|
||||||
require('@gitzone/tsrun');
|
await import('@gitzone/tsrun');
|
||||||
const cliTool = require('./ts/index');
|
const cliTool = await import('./ts/index.js');
|
||||||
cliTool.runCli();
|
cliTool.runCli();
|
||||||
|
255
package-lock.json
generated
255
package-lock.json
generated
@ -1,23 +1,25 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tsrun",
|
"name": "@gitzone/tsrun",
|
||||||
"version": "1.2.20",
|
"version": "1.2.26",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@gitzone/tsrun",
|
"name": "@gitzone/tsrun",
|
||||||
"version": "1.2.20",
|
"version": "1.2.26",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartfile": "^9.0.6",
|
"@pushrocks/smartfile": "^9.0.6",
|
||||||
|
"@pushrocks/smartshell": "^2.0.30",
|
||||||
"ts-node": "^10.7.0",
|
"ts-node": "^10.7.0",
|
||||||
"typescript": "^4.6.2"
|
"typescript": "4.7.0-dev.20220311"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsrun": "cli.js"
|
"tsrun": "cli.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "2.1.29",
|
"@gitzone/tsbuild": "^2.1.43",
|
||||||
|
"@pushrocks/smartcli": "^3.0.14",
|
||||||
"@types/node": "^17.0.21",
|
"@types/node": "^17.0.21",
|
||||||
"node-fetch": "^3.2.2",
|
"node-fetch": "^3.2.2",
|
||||||
"tslint": "^6.1.2",
|
"tslint": "^6.1.2",
|
||||||
@ -91,66 +93,24 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@gitzone/tsbuild": {
|
"node_modules/@gitzone/tsbuild": {
|
||||||
"version": "2.1.29",
|
"version": "2.1.43",
|
||||||
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbuild/-/tsbuild-2.1.29.tgz",
|
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbuild/-/tsbuild-2.1.43.tgz",
|
||||||
"integrity": "sha512-rS0WlwXKb0W+gjFvVgcr1h+ZWRQTBwDm9RylEipPsDb+RmbTYKFT1xtoS53TWAgSKJouknVfsLowbSEic9+75g==",
|
"integrity": "sha512-7vWO3Od03JGXQzmrdFahsgNST5LpaJjOREL1lvO1gUfbOIyJiFLr/SpI2pRTKd181YETbXu1RCp8VoVyJP3YDg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/early": "^3.0.6",
|
"@pushrocks/early": "^3.0.6",
|
||||||
"@pushrocks/smartcli": "^3.0.14",
|
"@pushrocks/smartcli": "^3.0.14",
|
||||||
"@pushrocks/smartfile": "^8.0.10",
|
"@pushrocks/smartfile": "^9.0.6",
|
||||||
"@pushrocks/smartlog": "^2.0.44",
|
"@pushrocks/smartlog": "^2.0.44",
|
||||||
"@pushrocks/smartpath": "^4.0.3",
|
"@pushrocks/smartpath": "^4.0.3",
|
||||||
"@pushrocks/smartpromise": "^3.1.6",
|
"@pushrocks/smartpromise": "^3.1.7",
|
||||||
"typescript": "^4.4.2"
|
"typescript": "4.7.0-dev.20220311"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsbuild": "cli.js"
|
"tsbuild": "cli.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@gitzone/tsbuild/node_modules/@pushrocks/smartfile": {
|
|
||||||
"version": "8.0.11",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartfile/-/smartfile-8.0.11.tgz",
|
|
||||||
"integrity": "sha512-mujs1mDgorsryQ8OZuL94MZZDYL3+cbdPKaXSchPjyxOOx8iGacUzc5BK4jDsImYeYEo07MpdJ5BjvGkORQR/w==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@pushrocks/smartfile-interfaces": "^1.0.7",
|
|
||||||
"@pushrocks/smarthash": "^2.1.10",
|
|
||||||
"@pushrocks/smartjson": "^4.0.6",
|
|
||||||
"@pushrocks/smartmime": "^1.0.5",
|
|
||||||
"@pushrocks/smartpath": "^4.0.3",
|
|
||||||
"@pushrocks/smartpromise": "^3.1.6",
|
|
||||||
"@pushrocks/smartrequest": "^1.1.52",
|
|
||||||
"@types/fs-extra": "^9.0.13",
|
|
||||||
"@types/glob": "^7.2.0",
|
|
||||||
"@types/js-yaml": "^4.0.5",
|
|
||||||
"fs-extra": "^10.0.0",
|
|
||||||
"glob": "^7.2.0",
|
|
||||||
"js-yaml": "^4.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@gitzone/tsbuild/node_modules/argparse": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/argparse/-/argparse-2.0.1.tgz",
|
|
||||||
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "Python-2.0"
|
|
||||||
},
|
|
||||||
"node_modules/@gitzone/tsbuild/node_modules/js-yaml": {
|
|
||||||
"version": "4.1.0",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-4.1.0.tgz",
|
|
||||||
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"argparse": "^2.0.1"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"js-yaml": "bin/js-yaml.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@pushrocks/consolecolor": {
|
"node_modules/@pushrocks/consolecolor": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fconsolecolor/-/consolecolor-2.0.1.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fconsolecolor/-/consolecolor-2.0.1.tgz",
|
||||||
@ -184,7 +144,6 @@
|
|||||||
"version": "4.0.20",
|
"version": "4.0.20",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.20.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.20.tgz",
|
||||||
"integrity": "sha512-DJbxSZFwDuHe4W7dU5anyO72gy4woZpkxSpySphdHbSYZf50VJ1sMOKIccSpgRIczeB0BTR5i0c+cKnNFrg2jw==",
|
"integrity": "sha512-DJbxSZFwDuHe4W7dU5anyO72gy4woZpkxSpySphdHbSYZf50VJ1sMOKIccSpgRIczeB0BTR5i0c+cKnNFrg2jw==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartdelay": "^2.0.10",
|
"@pushrocks/smartdelay": "^2.0.10",
|
||||||
@ -221,6 +180,16 @@
|
|||||||
"@pushrocks/smartpromise": "^3.0.6"
|
"@pushrocks/smartpromise": "^3.0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@pushrocks/smartexit": {
|
||||||
|
"version": "1.0.20",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartexit/-/smartexit-1.0.20.tgz",
|
||||||
|
"integrity": "sha512-u/KgA7s2zAtZ7gZvL13HZbO3mZATvjfCLU8Ez6h8VweG8UsIBVaPfYziMDCmJOWIPYLGzEW8eG/u4mCHuyLBow==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@pushrocks/lik": "^4.0.20",
|
||||||
|
"@pushrocks/smartdelay": "^2.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@pushrocks/smartfile": {
|
"node_modules/@pushrocks/smartfile": {
|
||||||
"version": "9.0.6",
|
"version": "9.0.6",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartfile/-/smartfile-9.0.6.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartfile/-/smartfile-9.0.6.tgz",
|
||||||
@ -409,6 +378,20 @@
|
|||||||
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==",
|
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==",
|
||||||
"license": "0BSD"
|
"license": "0BSD"
|
||||||
},
|
},
|
||||||
|
"node_modules/@pushrocks/smartshell": {
|
||||||
|
"version": "2.0.30",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartshell/-/smartshell-2.0.30.tgz",
|
||||||
|
"integrity": "sha512-HPgdTFzfzhk2TQau/jVdYNSANlxyBZdqq2vyZ+bZahegVHfH/27Zur5Fk+2vE16VJjJMqP7zcvDITUe2+ipgJg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@pushrocks/smartdelay": "^2.0.13",
|
||||||
|
"@pushrocks/smartexit": "^1.0.20",
|
||||||
|
"@pushrocks/smartpromise": "^3.1.6",
|
||||||
|
"@types/which": "^2.0.1",
|
||||||
|
"tree-kill": "^1.2.2",
|
||||||
|
"which": "^2.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@pushrocks/smarttime": {
|
"node_modules/@pushrocks/smarttime": {
|
||||||
"version": "3.0.45",
|
"version": "3.0.45",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmarttime/-/smarttime-3.0.45.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmarttime/-/smarttime-3.0.45.tgz",
|
||||||
@ -537,6 +520,12 @@
|
|||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/which": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@types%2fwhich/-/which-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-Jjakcv8Roqtio6w1gr0D7y6twbhx6gGgFGF5BLwajPpnOIOxFkakFhCq+LmyyeAz7BX6ULrjBOxdKaCDy+4+dQ==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@types/yargs": {
|
"node_modules/@types/yargs": {
|
||||||
"version": "16.0.3",
|
"version": "16.0.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fyargs/-/yargs-16.0.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fyargs/-/yargs-16.0.3.tgz",
|
||||||
@ -1133,6 +1122,12 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/isexe": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/isexe/-/isexe-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
"node_modules/js-tokens": {
|
"node_modules/js-tokens": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/js-tokens/-/js-tokens-4.0.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||||
@ -1499,6 +1494,15 @@
|
|||||||
"readable-stream": "3"
|
"readable-stream": "3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/tree-kill": {
|
||||||
|
"version": "1.2.2",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/tree-kill/-/tree-kill-1.2.2.tgz",
|
||||||
|
"integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==",
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"tree-kill": "cli.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/ts-node": {
|
"node_modules/ts-node": {
|
||||||
"version": "10.7.0",
|
"version": "10.7.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/ts-node/-/ts-node-10.7.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/ts-node/-/ts-node-10.7.0.tgz",
|
||||||
@ -1593,7 +1597,7 @@
|
|||||||
"node": ">=4.0.0"
|
"node": ">=4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tsutils": {
|
"node_modules/tslint/node_modules/tsutils": {
|
||||||
"version": "2.29.0",
|
"version": "2.29.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/tsutils/-/tsutils-2.29.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/tsutils/-/tsutils-2.29.0.tgz",
|
||||||
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
|
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
|
||||||
@ -1607,9 +1611,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "4.6.2",
|
"version": "4.7.0-dev.20220311",
|
||||||
"resolved": "https://verdaccio.lossless.one/typescript/-/typescript-4.6.2.tgz",
|
"resolved": "https://verdaccio.lossless.one/typescript/-/typescript-4.7.0-dev.20220311.tgz",
|
||||||
"integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==",
|
"integrity": "sha512-ZNMv/ta7e5SqRO591yC36VBmsM4+S6u60MFW3xOwKrrm/RbPCNJjwS+lmSY57avA0VIAUnokWlm+ThWBNo0awQ==",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
@ -1650,6 +1654,21 @@
|
|||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/which": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/which/-/which-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"isexe": "^2.0.0"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"node-which": "bin/node-which"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/wrap-ansi": {
|
"node_modules/wrap-ansi": {
|
||||||
"version": "7.0.0",
|
"version": "7.0.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
||||||
@ -1806,56 +1825,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@gitzone/tsbuild": {
|
"@gitzone/tsbuild": {
|
||||||
"version": "2.1.29",
|
"version": "2.1.43",
|
||||||
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbuild/-/tsbuild-2.1.29.tgz",
|
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbuild/-/tsbuild-2.1.43.tgz",
|
||||||
"integrity": "sha512-rS0WlwXKb0W+gjFvVgcr1h+ZWRQTBwDm9RylEipPsDb+RmbTYKFT1xtoS53TWAgSKJouknVfsLowbSEic9+75g==",
|
"integrity": "sha512-7vWO3Od03JGXQzmrdFahsgNST5LpaJjOREL1lvO1gUfbOIyJiFLr/SpI2pRTKd181YETbXu1RCp8VoVyJP3YDg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/early": "^3.0.6",
|
"@pushrocks/early": "^3.0.6",
|
||||||
"@pushrocks/smartcli": "^3.0.14",
|
"@pushrocks/smartcli": "^3.0.14",
|
||||||
"@pushrocks/smartfile": "^8.0.10",
|
"@pushrocks/smartfile": "^9.0.6",
|
||||||
"@pushrocks/smartlog": "^2.0.44",
|
"@pushrocks/smartlog": "^2.0.44",
|
||||||
"@pushrocks/smartpath": "^4.0.3",
|
"@pushrocks/smartpath": "^4.0.3",
|
||||||
"@pushrocks/smartpromise": "^3.1.6",
|
"@pushrocks/smartpromise": "^3.1.7",
|
||||||
"typescript": "^4.4.2"
|
"typescript": "4.7.0-dev.20220311"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@pushrocks/smartfile": {
|
|
||||||
"version": "8.0.11",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartfile/-/smartfile-8.0.11.tgz",
|
|
||||||
"integrity": "sha512-mujs1mDgorsryQ8OZuL94MZZDYL3+cbdPKaXSchPjyxOOx8iGacUzc5BK4jDsImYeYEo07MpdJ5BjvGkORQR/w==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"@pushrocks/smartfile-interfaces": "^1.0.7",
|
|
||||||
"@pushrocks/smarthash": "^2.1.10",
|
|
||||||
"@pushrocks/smartjson": "^4.0.6",
|
|
||||||
"@pushrocks/smartmime": "^1.0.5",
|
|
||||||
"@pushrocks/smartpath": "^4.0.3",
|
|
||||||
"@pushrocks/smartpromise": "^3.1.6",
|
|
||||||
"@pushrocks/smartrequest": "^1.1.52",
|
|
||||||
"@types/fs-extra": "^9.0.13",
|
|
||||||
"@types/glob": "^7.2.0",
|
|
||||||
"@types/js-yaml": "^4.0.5",
|
|
||||||
"fs-extra": "^10.0.0",
|
|
||||||
"glob": "^7.2.0",
|
|
||||||
"js-yaml": "^4.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"argparse": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/argparse/-/argparse-2.0.1.tgz",
|
|
||||||
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"js-yaml": {
|
|
||||||
"version": "4.1.0",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-4.1.0.tgz",
|
|
||||||
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"argparse": "^2.0.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/consolecolor": {
|
"@pushrocks/consolecolor": {
|
||||||
@ -1888,7 +1869,6 @@
|
|||||||
"version": "4.0.20",
|
"version": "4.0.20",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.20.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.20.tgz",
|
||||||
"integrity": "sha512-DJbxSZFwDuHe4W7dU5anyO72gy4woZpkxSpySphdHbSYZf50VJ1sMOKIccSpgRIczeB0BTR5i0c+cKnNFrg2jw==",
|
"integrity": "sha512-DJbxSZFwDuHe4W7dU5anyO72gy4woZpkxSpySphdHbSYZf50VJ1sMOKIccSpgRIczeB0BTR5i0c+cKnNFrg2jw==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartdelay": "^2.0.10",
|
"@pushrocks/smartdelay": "^2.0.10",
|
||||||
"@pushrocks/smartmatch": "^1.0.7",
|
"@pushrocks/smartmatch": "^1.0.7",
|
||||||
@ -1922,6 +1902,15 @@
|
|||||||
"@pushrocks/smartpromise": "^3.0.6"
|
"@pushrocks/smartpromise": "^3.0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@pushrocks/smartexit": {
|
||||||
|
"version": "1.0.20",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartexit/-/smartexit-1.0.20.tgz",
|
||||||
|
"integrity": "sha512-u/KgA7s2zAtZ7gZvL13HZbO3mZATvjfCLU8Ez6h8VweG8UsIBVaPfYziMDCmJOWIPYLGzEW8eG/u4mCHuyLBow==",
|
||||||
|
"requires": {
|
||||||
|
"@pushrocks/lik": "^4.0.20",
|
||||||
|
"@pushrocks/smartdelay": "^2.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@pushrocks/smartfile": {
|
"@pushrocks/smartfile": {
|
||||||
"version": "9.0.6",
|
"version": "9.0.6",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartfile/-/smartfile-9.0.6.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartfile/-/smartfile-9.0.6.tgz",
|
||||||
@ -2093,6 +2082,19 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@pushrocks/smartshell": {
|
||||||
|
"version": "2.0.30",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartshell/-/smartshell-2.0.30.tgz",
|
||||||
|
"integrity": "sha512-HPgdTFzfzhk2TQau/jVdYNSANlxyBZdqq2vyZ+bZahegVHfH/27Zur5Fk+2vE16VJjJMqP7zcvDITUe2+ipgJg==",
|
||||||
|
"requires": {
|
||||||
|
"@pushrocks/smartdelay": "^2.0.13",
|
||||||
|
"@pushrocks/smartexit": "^1.0.20",
|
||||||
|
"@pushrocks/smartpromise": "^3.1.6",
|
||||||
|
"@types/which": "^2.0.1",
|
||||||
|
"tree-kill": "^1.2.2",
|
||||||
|
"which": "^2.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@pushrocks/smarttime": {
|
"@pushrocks/smarttime": {
|
||||||
"version": "3.0.45",
|
"version": "3.0.45",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmarttime/-/smarttime-3.0.45.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmarttime/-/smarttime-3.0.45.tgz",
|
||||||
@ -2206,6 +2208,11 @@
|
|||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@types/which": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@types%2fwhich/-/which-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-Jjakcv8Roqtio6w1gr0D7y6twbhx6gGgFGF5BLwajPpnOIOxFkakFhCq+LmyyeAz7BX6ULrjBOxdKaCDy+4+dQ=="
|
||||||
|
},
|
||||||
"@types/yargs": {
|
"@types/yargs": {
|
||||||
"version": "16.0.3",
|
"version": "16.0.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fyargs/-/yargs-16.0.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fyargs/-/yargs-16.0.3.tgz",
|
||||||
@ -2613,6 +2620,11 @@
|
|||||||
"integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==",
|
"integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"isexe": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/isexe/-/isexe-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
|
||||||
|
},
|
||||||
"js-tokens": {
|
"js-tokens": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/js-tokens/-/js-tokens-4.0.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||||
@ -2853,6 +2865,11 @@
|
|||||||
"readable-stream": "3"
|
"readable-stream": "3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"tree-kill": {
|
||||||
|
"version": "1.2.2",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/tree-kill/-/tree-kill-1.2.2.tgz",
|
||||||
|
"integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A=="
|
||||||
|
},
|
||||||
"ts-node": {
|
"ts-node": {
|
||||||
"version": "10.7.0",
|
"version": "10.7.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/ts-node/-/ts-node-10.7.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/ts-node/-/ts-node-10.7.0.tgz",
|
||||||
@ -2898,6 +2915,17 @@
|
|||||||
"semver": "^5.3.0",
|
"semver": "^5.3.0",
|
||||||
"tslib": "^1.13.0",
|
"tslib": "^1.13.0",
|
||||||
"tsutils": "^2.29.0"
|
"tsutils": "^2.29.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"tsutils": {
|
||||||
|
"version": "2.29.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/tsutils/-/tsutils-2.29.0.tgz",
|
||||||
|
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"tslib": "^1.8.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tslint-config-prettier": {
|
"tslint-config-prettier": {
|
||||||
@ -2906,19 +2934,10 @@
|
|||||||
"integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==",
|
"integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"tsutils": {
|
|
||||||
"version": "2.29.0",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/tsutils/-/tsutils-2.29.0.tgz",
|
|
||||||
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"tslib": "^1.8.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "4.6.2",
|
"version": "4.7.0-dev.20220311",
|
||||||
"resolved": "https://verdaccio.lossless.one/typescript/-/typescript-4.6.2.tgz",
|
"resolved": "https://verdaccio.lossless.one/typescript/-/typescript-4.7.0-dev.20220311.tgz",
|
||||||
"integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg=="
|
"integrity": "sha512-ZNMv/ta7e5SqRO591yC36VBmsM4+S6u60MFW3xOwKrrm/RbPCNJjwS+lmSY57avA0VIAUnokWlm+ThWBNo0awQ=="
|
||||||
},
|
},
|
||||||
"universalify": {
|
"universalify": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
@ -2941,6 +2960,14 @@
|
|||||||
"integrity": "sha512-EqPmREeOzttaLRm5HS7io98goBgZ7IVz79aDvqjD0kYXLtFZTc0T/U6wHTPKyIjb+MdN7DFIIX6hgdBEpWmfPA==",
|
"integrity": "sha512-EqPmREeOzttaLRm5HS7io98goBgZ7IVz79aDvqjD0kYXLtFZTc0T/U6wHTPKyIjb+MdN7DFIIX6hgdBEpWmfPA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"which": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/which/-/which-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||||
|
"requires": {
|
||||||
|
"isexe": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"wrap-ansi": {
|
"wrap-ansi": {
|
||||||
"version": "7.0.0",
|
"version": "7.0.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
||||||
|
10
package.json
10
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tsrun",
|
"name": "@gitzone/tsrun",
|
||||||
"version": "1.2.20",
|
"version": "1.2.26",
|
||||||
"description": "run typescript programs efficiently",
|
"description": "run typescript programs efficiently",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
"typings": "dist_ts/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
@ -11,12 +11,13 @@
|
|||||||
"tsrun": "./cli.js"
|
"tsrun": "./cli.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tsbuild && node ./cli.js test/test.ts)",
|
"test": "(tsbuild && node ./cli.js test/test.js sayhello)",
|
||||||
"format": "(gitzone format)",
|
"format": "(gitzone format)",
|
||||||
"build": "(tsbuild)"
|
"build": "(tsbuild)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "2.1.29",
|
"@gitzone/tsbuild": "^2.1.43",
|
||||||
|
"@pushrocks/smartcli": "^3.0.14",
|
||||||
"@types/node": "^17.0.21",
|
"@types/node": "^17.0.21",
|
||||||
"node-fetch": "^3.2.2",
|
"node-fetch": "^3.2.2",
|
||||||
"tslint": "^6.1.2",
|
"tslint": "^6.1.2",
|
||||||
@ -24,8 +25,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartfile": "^9.0.6",
|
"@pushrocks/smartfile": "^9.0.6",
|
||||||
|
"@pushrocks/smartshell": "^2.0.30",
|
||||||
"ts-node": "^10.7.0",
|
"ts-node": "^10.7.0",
|
||||||
"typescript": "^4.6.2"
|
"typescript": "4.7.0-dev.20220311"
|
||||||
},
|
},
|
||||||
"private": false,
|
"private": false,
|
||||||
"files": [
|
"files": [
|
||||||
|
10
test/test.ts
10
test/test.ts
@ -2,9 +2,13 @@ const textToPost: string = 'Test runs!';
|
|||||||
console.log(textToPost);
|
console.log(textToPost);
|
||||||
|
|
||||||
const run = async () => {
|
const run = async () => {
|
||||||
// lets test esm
|
const smartcli = await import('@pushrocks/smartcli');
|
||||||
console.warn('remember to enable esm checks once TypeScript 4.5 is released.')
|
const smartcliInstance = new smartcli.Smartcli();
|
||||||
// const nodeFetch = await import('node-fetch');
|
console.log(process.argv)
|
||||||
|
smartcliInstance.addCommand('sayhello').subscribe(async argvArg => {
|
||||||
|
console.log('hello there');
|
||||||
|
})
|
||||||
|
smartcliInstance.startParse();
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
51
ts/index.ts
51
ts/index.ts
@ -1,32 +1,35 @@
|
|||||||
import * as path from 'path';
|
import * as plugins from './plugins.js';
|
||||||
import * as tsNode from 'ts-node';
|
|
||||||
import { CompilerOptions } from 'typescript';
|
|
||||||
|
|
||||||
const defaultTsNodeOptions: tsNode.CreateOptions = {
|
import { dirname } from 'path';
|
||||||
compilerOptions: {
|
import { fileURLToPath } from 'url';
|
||||||
lib: ['dom'],
|
|
||||||
target: <any>'es2020', // Script Target should be a string -> 2 is for ES2015
|
|
||||||
experimentalDecorators: true,
|
|
||||||
esModuleInterop: true,
|
|
||||||
strictNullChecks: false,
|
|
||||||
moduleResolution: <any>'node12',
|
|
||||||
module: <any>'es2020',
|
|
||||||
importsNotUsedAsValues: <any>'preserve',
|
|
||||||
} as CompilerOptions,
|
|
||||||
skipIgnore: true,
|
|
||||||
esm: true,
|
|
||||||
};
|
|
||||||
|
|
||||||
tsNode.register(defaultTsNodeOptions);
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||||
|
|
||||||
export const runCli = async () => {
|
export const runPath = async (pathArg: string) => {
|
||||||
|
await runCli(pathArg);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const runCli = async (pathArg?: string) => {
|
||||||
// contents of argv array
|
// contents of argv array
|
||||||
// process.argv[0] -> node Executable
|
// process.argv[0] -> node Executable
|
||||||
// process.argv[1] -> tsrun executable
|
// process.argv[1] -> tsrun executable
|
||||||
const pathToTsFile = process.argv[2];
|
const relativePathToTsFile = pathArg ? pathArg : process.argv[2];
|
||||||
|
const absolutePathToTsFile = plugins.path.join(process.cwd(), relativePathToTsFile);
|
||||||
|
|
||||||
|
|
||||||
|
process.argv.splice(0, 3); // this ensures transparent arguments for the child process
|
||||||
|
|
||||||
|
|
||||||
|
// lets setup things for execution
|
||||||
|
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||||
|
executor: 'bash'
|
||||||
|
});
|
||||||
|
|
||||||
|
const tsNodeLoaderPath = plugins.path.join(__dirname, 'loader.js')
|
||||||
|
// note: -> reduce on emtpy array does not work
|
||||||
|
// thus check needed before reducing the argv array
|
||||||
|
smartshellInstance.exec(`node --loader ${tsNodeLoaderPath} ${absolutePathToTsFile} ${process.argv.length > 0 ? process.argv.reduce((prevArg, currentArg) => {
|
||||||
|
return prevArg + ' ' + currentArg;
|
||||||
|
}) : ''}`);
|
||||||
|
|
||||||
const pathToLoad = path.join(process.cwd(), pathToTsFile);
|
|
||||||
process.argv.splice(2, 1);
|
|
||||||
// console.log(process.argv);
|
|
||||||
import(pathToLoad);
|
|
||||||
};
|
};
|
||||||
|
20
ts/loader.ts
Normal file
20
ts/loader.ts
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import * as plugins from './plugins.js';
|
||||||
|
import type { CompilerOptions } from 'typescript';
|
||||||
|
|
||||||
|
const defaultTsNodeOptions: plugins.tsNode.CreateOptions = {
|
||||||
|
compilerOptions: {
|
||||||
|
lib: ['dom'],
|
||||||
|
target: <any>'es2020', // Script Target should be a string -> 2 is for ES2015
|
||||||
|
experimentalDecorators: true,
|
||||||
|
esModuleInterop: true,
|
||||||
|
strictNullChecks: false,
|
||||||
|
moduleResolution: <any>'node12',
|
||||||
|
module: <any>'ESNext',
|
||||||
|
importsNotUsedAsValues: <any>'preserve',
|
||||||
|
} as CompilerOptions,
|
||||||
|
esm: true,
|
||||||
|
skipIgnore: true,
|
||||||
|
transpileOnly: true
|
||||||
|
};
|
||||||
|
|
||||||
|
export const { resolve, load, getFormat, transformSource } = plugins.tsNode.createEsmHooks(plugins.tsNode.register(defaultTsNodeOptions)) as any;
|
15
ts/plugins.ts
Normal file
15
ts/plugins.ts
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
// @pushrocks scope
|
||||||
|
import * as smartshell from '@pushrocks/smartshell';
|
||||||
|
|
||||||
|
export {
|
||||||
|
smartshell
|
||||||
|
}
|
||||||
|
|
||||||
|
// third party scope
|
||||||
|
import * as path from 'path';
|
||||||
|
import * as tsNode from 'ts-node';
|
||||||
|
|
||||||
|
export {
|
||||||
|
path,
|
||||||
|
tsNode
|
||||||
|
}
|
7
tsconfig.json
Normal file
7
tsconfig.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "ES2022",
|
||||||
|
"target": "ES2020",
|
||||||
|
"moduleResolution": "Node12"
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user