Compare commits

...

10 Commits

Author SHA1 Message Date
bcb1ccc6e7 1.2.41 2023-06-03 16:10:38 +02:00
1dde4c8277 fix(core): update 2023-06-03 16:10:37 +02:00
3a6fc44fbb 1.2.40 2023-06-03 16:09:01 +02:00
a0d523513b fix(core): update 2023-06-03 16:09:01 +02:00
0715f88189 1.2.39 2022-10-20 14:15:04 +02:00
4a50ae3b00 fix(core): update 2022-10-20 14:15:04 +02:00
2b7c3b78f6 1.2.38 2022-10-12 17:21:04 +02:00
142667ac87 fix(core): update 2022-10-12 17:21:03 +02:00
9e55126adf 1.2.37 2022-06-14 21:42:07 +02:00
5271f0153e fix(core): update 2022-06-14 21:42:07 +02:00
15 changed files with 1062 additions and 3029 deletions

View File

@ -12,29 +12,25 @@ stages:
- release - release
- metadata - metadata
before_script:
- pnpm install -g pnpm
- pnpm install -g @shipzone/npmci
- npmci npm prepare
# ====================
# security stage
# ====================
# ==================== # ====================
# security stage # security stage
# ==================== # ====================
mirror:
stage: security
script:
- npmci git mirror
only:
- tags
tags:
- lossless
- docker
- notpriv
auditProductionDependencies: auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security stage: security
script: script:
- npmci npm prepare - npmci command npm config set registry https://registry.npmjs.org
- npmci command npm install --production --ignore-scripts - npmci command pnpm audit --audit-level=high --prod
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=prod --production
tags: tags:
- lossless
- docker - docker
allow_failure: true allow_failure: true
@ -42,11 +38,10 @@ auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security stage: security
script: script:
- npmci npm prepare
- npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org - npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=dev - npmci command pnpm audit --audit-level=high --dev
tags: tags:
- lossless
- docker - docker
allow_failure: true allow_failure: true
@ -57,7 +52,6 @@ auditDevDependencies:
testStable: testStable:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install stable - npmci node install stable
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
@ -68,10 +62,9 @@ testStable:
testBuild: testBuild:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install stable - npmci node install stable
- npmci npm install - npmci npm install
- npmci command npm run build - npmci npm build
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
@ -97,10 +90,9 @@ codequality:
only: only:
- tags - tags
script: script:
- npmci command npm install -g tslint typescript - npmci command npm install -g typescript
- npmci npm prepare - npmci npm prepare
- npmci npm install - npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags: tags:
- lossless - lossless
- docker - docker
@ -120,11 +112,9 @@ trigger:
pages: pages:
stage: metadata stage: metadata
script: script:
- npmci node install lts - npmci node install stable
- npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare
- npmci npm install - npmci npm install
- npmci command tsdoc - npmci command npm run buildDocs
tags: tags:
- lossless - lossless
- docker - docker

24
.vscode/launch.json vendored
View File

@ -2,28 +2,10 @@
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "current file", "command": "npm test",
"type": "node", "name": "Run npm test",
"request": "launch", "request": "launch",
"args": [ "type": "node-terminal"
"${relativeFile}"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "test.ts",
"type": "node",
"request": "launch",
"args": [
"test/test.ts"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
} }
] ]
} }

4
cli.child.ts Normal file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env node
process.env.CLI_CALL = 'true';
import * as cliTool from './ts/index.js';
cliTool.runCli();

View File

@ -1,5 +1,5 @@
#!/usr/bin/env node #!/usr/bin/env node
process.env.CLI_CALL = 'true'; process.env.CLI_CALL = 'true';
await import('@gitzone/tsrun');
const cliTool = await import('./ts/index.js'); import * as tsrun from '@gitzone/tsrun';
cliTool.runCli(); tsrun.runPath('./cli.child.js', import.meta.url);

View File

@ -10,7 +10,7 @@
"githost": "gitlab.com", "githost": "gitlab.com",
"gitscope": "gitzone", "gitscope": "gitzone",
"gitrepo": "tsrun", "gitrepo": "tsrun",
"shortDescription": "run typescript programs efficiently", "description": "run typescript programs efficiently",
"npmPackagename": "@gitzone/tsrun", "npmPackagename": "@gitzone/tsrun",
"license": "MIT" "license": "MIT"
} }

2927
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@gitzone/tsrun", "name": "@gitzone/tsrun",
"version": "1.2.36", "version": "1.2.41",
"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",
@ -13,19 +13,20 @@
"scripts": { "scripts": {
"test": "(tsbuild && node ./cli.js test/test.js sayhello)", "test": "(tsbuild && node ./cli.js test/test.js sayhello)",
"format": "(gitzone format)", "format": "(gitzone format)",
"build": "(tsbuild)" "build": "(tsbuild)",
"buildDocs": "tsdoc"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.63", "@gitzone/tsbuild": "^2.1.63",
"@pushrocks/smartcli": "^3.0.14", "@pushrocks/smartcli": "^4.0.6",
"@types/node": "^17.0.42", "@types/node": "^20.2.5",
"node-fetch": "^3.2.6" "node-fetch": "^3.3.1"
}, },
"dependencies": { "dependencies": {
"@pushrocks/smartfile": "^10.0.2", "@pushrocks/smartfile": "^10.0.7",
"@pushrocks/smartshell": "^2.0.30", "@pushrocks/smartshell": "^2.0.30",
"ts-node": "^10.8.1", "ts-node": "^10.8.1",
"typescript": "^4.7.3" "typescript": "^5.1.3"
}, },
"private": false, "private": false,
"files": [ "files": [

1005
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,6 @@ Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](htt
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@gitzone/tsrun)](https://lossless.cloud) PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@gitzone/tsrun)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@gitzone/tsrun)](https://lossless.cloud) PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@gitzone/tsrun)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@gitzone/tsrun)](https://lossless.cloud) BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@gitzone/tsrun)](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
@ -43,7 +42,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

@ -4,11 +4,11 @@ console.log(textToPost);
const run = async () => { const run = async () => {
const smartcli = await import('@pushrocks/smartcli'); const smartcli = await import('@pushrocks/smartcli');
const smartcliInstance = new smartcli.Smartcli(); const smartcliInstance = new smartcli.Smartcli();
console.log(process.argv) console.log(process.argv);
smartcliInstance.addCommand('sayhello').subscribe(async argvArg => { smartcliInstance.addCommand('sayhello').subscribe(async (argvArg) => {
console.log('hello there'); console.log('hello there');
}) });
smartcliInstance.startParse(); smartcliInstance.startParse();
} };
run(); run();

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@gitzone/tsrun', name: '@gitzone/tsrun',
version: '1.2.36', version: '1.2.41',
description: 'run typescript programs efficiently' description: 'run typescript programs efficiently'
} }

View File

@ -11,11 +11,13 @@ const defaultTsNodeOptions: plugins.tsNode.CreateOptions = {
strictNullChecks: false, strictNullChecks: false,
moduleResolution: <any>'nodenext', moduleResolution: <any>'nodenext',
module: <any>'ESNext', module: <any>'ESNext',
importsNotUsedAsValues: <any>'preserve', verbatimModuleSyntax: true,
} as CompilerOptions, } as CompilerOptions,
esm: true, esm: true,
skipIgnore: true, skipIgnore: true,
transpileOnly: true transpileOnly: true,
}; };
export const { resolve, load, getFormat, transformSource } = plugins.tsNode.createEsmHooks(plugins.tsNode.register(defaultTsNodeOptions)) as any; export const { resolve, load, getFormat, transformSource } = plugins.tsNode.createEsmHooks(
plugins.tsNode.register(defaultTsNodeOptions)
) as any;

View File

@ -2,21 +2,14 @@
import * as path from 'path'; import * as path from 'path';
import * as url from 'url'; import * as url from 'url';
export { export { path, url };
path,
url
}
// @pushrocks scope // @pushrocks scope
import * as smartshell from '@pushrocks/smartshell'; import * as smartshell from '@pushrocks/smartshell';
export { export { smartshell };
smartshell
}
// third party scope // third party scope
import * as tsNode from 'ts-node'; import * as tsNode from 'ts-node';
export { export { tsNode };
tsNode
}

View File

@ -1,7 +1,9 @@
{ {
"compilerOptions": { "compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "ES2022", "module": "ES2022",
"target": "ES2020", "moduleResolution": "nodenext"
"moduleResolution": "Node12"
} }
} }

View File

@ -1,17 +0,0 @@
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}