fix(core): update

This commit is contained in:
Philipp Kunz 2021-06-23 15:26:55 +02:00
parent 45bba88f46
commit f8736d3556
12 changed files with 2044 additions and 534 deletions

View File

@ -19,23 +19,36 @@ mirror:
stage: security
script:
- npmci git mirror
only:
- tags
tags:
- lossless
- docker
- notpriv
audit:
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- 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
allow_failure: true
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
- npmci command npm audit --audit-level=high --only=dev
tags:
- lossless
- docker
- notpriv
allow_failure: true
# ====================
# test stage
@ -50,9 +63,7 @@ testStable:
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- lossless
- docker
- priv
testBuild:
stage: test
@ -63,9 +74,7 @@ testBuild:
- npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- lossless
- docker
- notpriv
release:
stage: release
@ -85,6 +94,8 @@ release:
codequality:
stage: metadata
allow_failure: true
only:
- tags
script:
- npmci command npm install -g tslint typescript
- npmci npm prepare

4
.snyk
View File

@ -1,4 +0,0 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.13.4
ignore: {}
patch: {}

View File

@ -15,7 +15,7 @@
"properties": {
"projectType": {
"type": "string",
"enum": ["website", "element", "service", "npm"]
"enum": ["website", "element", "service", "npm", "wcc"]
}
}
}

View File

@ -1 +0,0 @@
.gitignore: ../gitignore/

1
dist/index.d.ts vendored
View File

@ -1 +0,0 @@
export {};

31
dist/index.js vendored
View File

@ -1,31 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const tsNode = require("ts-node");
const defaultTsNodeOptions = {
compilerOptions: {
lib: ['es2017'],
target: 'es2017',
experimentalDecorators: true,
esModuleInterop: true
},
skipIgnore: true
};
if (process.argv.includes('--web')) {
const previousCompilerOptions = defaultTsNodeOptions.compilerOptions;
defaultTsNodeOptions.compilerOptions = Object.assign({}, previousCompilerOptions, { lib: ['es2016', 'es2017', 'dom'], target: 'es2015' // Script Target should be a string -> 2 is for ES2015
});
}
if (process.argv.includes('--nocache')) {
// currently caching is not used
}
tsNode.register(defaultTsNodeOptions);
if (process.env.CLI_CALL_TSRUN) {
// contents of argv array
// process.argv[0] -> node Executable
// process.argv[1] -> tsrun executable
const pathToTsFile = process.argv[2];
const pathToLoad = path.join(process.cwd(), pathToTsFile);
Promise.resolve().then(() => require(pathToLoad));
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDZCQUE2QjtBQUM3QixrQ0FBa0M7QUFHbEMsTUFBTSxvQkFBb0IsR0FBbUI7SUFDM0MsZUFBZSxFQUFFO1FBQ2YsR0FBRyxFQUFFLENBQUMsUUFBUSxDQUFDO1FBQ2YsTUFBTSxFQUFPLFFBQVE7UUFDckIsc0JBQXNCLEVBQUUsSUFBSTtRQUM1QixlQUFlLEVBQUUsSUFBSTtLQUNIO0lBQ3BCLFVBQVUsRUFBRSxJQUFJO0NBQ2pCLENBQUM7QUFFRixJQUFJLE9BQU8sQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLE9BQU8sQ0FBQyxFQUFFO0lBQ2xDLE1BQU0sdUJBQXVCLEdBQUcsb0JBQW9CLENBQUMsZUFBa0MsQ0FBQztJQUN4RixvQkFBb0IsQ0FBQyxlQUFlLHFCQUMvQix1QkFBdUIsSUFDMUIsR0FBRyxFQUFFLENBQUMsUUFBUSxFQUFFLFFBQVEsRUFBRSxLQUFLLENBQUMsRUFDaEMsTUFBTSxFQUFPLFFBQVEsQ0FBQyxzREFBc0Q7T0FDN0UsQ0FBQztDQUNIO0FBRUQsSUFBSSxPQUFPLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxXQUFXLENBQUMsRUFBRTtJQUN0QyxnQ0FBZ0M7Q0FDakM7QUFFRCxNQUFNLENBQUMsUUFBUSxDQUFDLG9CQUFvQixDQUFDLENBQUM7QUFFdEMsSUFBSSxPQUFPLENBQUMsR0FBRyxDQUFDLGNBQWMsRUFBRTtJQUM5Qix5QkFBeUI7SUFDekIscUNBQXFDO0lBQ3JDLHNDQUFzQztJQUN0QyxNQUFNLFlBQVksR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBRXJDLE1BQU0sVUFBVSxHQUFHLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLEdBQUcsRUFBRSxFQUFFLFlBQVksQ0FBQyxDQUFDO0lBQzFELHFDQUFPLFVBQVUsR0FBRTtDQUNwQiJ9

1
dist_ts/index.d.ts vendored
View File

@ -1 +0,0 @@
export declare const runCli: () => Promise<void>;

View File

@ -1,51 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.runCli = void 0;
const path = __importStar(require("path"));
const tsNode = __importStar(require("ts-node"));
const defaultTsNodeOptions = {
compilerOptions: {
lib: ['es2017'],
target: 'es2017',
experimentalDecorators: true,
esModuleInterop: true
},
skipIgnore: true
};
if (process.argv.includes('--web')) {
const previousCompilerOptions = defaultTsNodeOptions.compilerOptions;
defaultTsNodeOptions.compilerOptions = Object.assign(Object.assign({}, previousCompilerOptions), { lib: ['es2016', 'es2017', 'dom'], target: 'es2017' // Script Target should be a string -> 2 is for ES2015
});
}
if (process.argv.includes('--nocache')) {
// currently caching is not used
}
tsNode.register(defaultTsNodeOptions);
exports.runCli = async () => {
// contents of argv array
// process.argv[0] -> node Executable
// process.argv[1] -> tsrun executable
const pathToTsFile = process.argv[2];
const pathToLoad = path.join(process.cwd(), pathToTsFile);
Promise.resolve().then(() => __importStar(require(pathToLoad)));
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsMkNBQTZCO0FBQzdCLGdEQUFrQztBQUdsQyxNQUFNLG9CQUFvQixHQUF5QjtJQUNqRCxlQUFlLEVBQUU7UUFDZixHQUFHLEVBQUUsQ0FBQyxRQUFRLENBQUM7UUFDZixNQUFNLEVBQU8sUUFBUTtRQUNyQixzQkFBc0IsRUFBRSxJQUFJO1FBQzVCLGVBQWUsRUFBRSxJQUFJO0tBQ0g7SUFDcEIsVUFBVSxFQUFFLElBQUk7Q0FDakIsQ0FBQztBQUVGLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsT0FBTyxDQUFDLEVBQUU7SUFDbEMsTUFBTSx1QkFBdUIsR0FBRyxvQkFBb0IsQ0FBQyxlQUFrQyxDQUFDO0lBQ3hGLG9CQUFvQixDQUFDLGVBQWUsbUNBQy9CLHVCQUF1QixLQUMxQixHQUFHLEVBQUUsQ0FBQyxRQUFRLEVBQUUsUUFBUSxFQUFFLEtBQUssQ0FBQyxFQUNoQyxNQUFNLEVBQU8sUUFBUSxDQUFDLHNEQUFzRDtPQUM3RSxDQUFDO0NBQ0g7QUFFRCxJQUFJLE9BQU8sQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLFdBQVcsQ0FBQyxFQUFFO0lBQ3RDLGdDQUFnQztDQUNqQztBQUVELE1BQU0sQ0FBQyxRQUFRLENBQUMsb0JBQW9CLENBQUMsQ0FBQztBQUV6QixRQUFBLE1BQU0sR0FBRyxLQUFLLElBQUksRUFBRTtJQUMvQix5QkFBeUI7SUFDekIscUNBQXFDO0lBQ3JDLHNDQUFzQztJQUN0QyxNQUFNLFlBQVksR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBRXJDLE1BQU0sVUFBVSxHQUFHLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLEdBQUcsRUFBRSxFQUFFLFlBQVksQ0FBQyxDQUFDO0lBQzFELGtEQUFPLFVBQVUsSUFBRTtBQUNyQixDQUFDLENBQUEifQ==

2437
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -16,14 +16,14 @@
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.24",
"@types/node": "^14.0.6",
"@types/node": "^15.12.4",
"tslint": "^6.1.2",
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {
"@pushrocks/smartfile": "^7.0.12",
"ts-node": "^8.10.2",
"typescript": "^3.9.3"
"@pushrocks/smartfile": "^8.0.10",
"ts-node": "^10.0.0",
"typescript": "^4.3.4"
},
"private": false,
"files": [
@ -37,5 +37,8 @@
"cli.js",
"npmextra.json",
"readme.md"
],
"browserslist": [
"last 1 chrome versions"
]
}
}

View File

@ -19,7 +19,7 @@ TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](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)
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)
@ -37,7 +37,6 @@ There are options available:
- `--web` will inject browser types. this is useful when testing code with polyfills on node, but that is meant for the browser later on.
## Contribution
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)

View File

@ -7,9 +7,9 @@ const defaultTsNodeOptions: tsNode.CreateOptions = {
lib: ['es2017'],
target: <any>'es2017', // Script Target should be a string -> 2 is for ES2015
experimentalDecorators: true,
esModuleInterop: true
esModuleInterop: true,
} as CompilerOptions,
skipIgnore: true
skipIgnore: true,
};
if (process.argv.includes('--web')) {
@ -17,7 +17,7 @@ if (process.argv.includes('--web')) {
defaultTsNodeOptions.compilerOptions = {
...previousCompilerOptions,
lib: ['es2016', 'es2017', 'dom'],
target: <any>'es2017' // Script Target should be a string -> 2 is for ES2015
target: <any>'es2017', // Script Target should be a string -> 2 is for ES2015
};
}
@ -34,5 +34,6 @@ export const runCli = async () => {
const pathToTsFile = process.argv[2];
const pathToLoad = path.join(process.cwd(), pathToTsFile);
process.argv.shift();
import(pathToLoad);
};