fix(core): update

This commit is contained in:
Philipp Kunz 2022-03-13 00:30:32 +01:00
parent bd6713eee8
commit 1d751bdcdf
15 changed files with 3645 additions and 11597 deletions

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();

2
cli.js
View File

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

View File

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

15165
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,7 @@
"description": "a test utility to run tests that match test/**/*.ts",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"type": "module",
"author": "Lossless GmbH",
"license": "MIT",
"bin": {
@ -18,24 +19,24 @@
"build": "(tsbuild --web)"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.29",
"@gitzone/tsbuild": "^2.1.48",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {
"@gitzone/tsbundle": "^1.0.89",
"@gitzone/tsrun": "^1.2.18",
"@gitzone/tsbundle": "^1.0.91",
"@gitzone/tsrun": "^1.2.31",
"@pushrocks/consolecolor": "^2.0.1",
"@pushrocks/smartbrowser": "^1.0.22",
"@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartexpress": "^3.0.108",
"@pushrocks/smartfile": "^9.0.5",
"@pushrocks/smartfile": "^9.0.6",
"@pushrocks/smartlog": "^2.0.44",
"@pushrocks/smartpromise": "^3.1.6",
"@pushrocks/smartpromise": "^3.1.7",
"@pushrocks/smartshell": "^2.0.30",
"@pushrocks/tapbundle": "^4.0.3",
"@pushrocks/tapbundle": "^4.0.8",
"@types/figures": "^3.0.1",
"figures": "^3.0.0"
"figures": "^4.0.0"
},
"files": [
"ts/**/*",

View File

@ -1,5 +1,5 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as tstest from '../ts/index';
import * as tstest from '../ts/index.js';
tap.test('prepare test', async () => {});

View File

@ -1,4 +1,4 @@
import { TsTest } from './tstest.classes.tstest';
import { TsTest } from './tstest.classes.tstest.js';
export const runCli = async () => {
if (!process.argv[2]) {

View File

@ -1,11 +1,11 @@
// ============
// combines different tap test files to an overall result
// ============
import * as plugins from './tstest.plugins';
import * as plugins from './tstest.plugins.js';
import { coloredString as cs } from '@pushrocks/consolecolor';
import { TapParser } from './tstest.classes.tap.parser';
import * as logPrefixes from './tstest.logprefixes';
import { TapParser } from './tstest.classes.tap.parser.js';
import * as logPrefixes from './tstest.logprefixes.js';
export class TapCombinator {
tapParserStore: TapParser[] = [];

View File

@ -4,9 +4,9 @@ import { coloredString as cs } from '@pushrocks/consolecolor';
// ============
// combines different tap test files to an overall result
// ============
import * as plugins from './tstest.plugins';
import { TapTestResult } from './tstest.classes.tap.testresult';
import * as logPrefixes from './tstest.logprefixes';
import * as plugins from './tstest.plugins.js';
import { TapTestResult } from './tstest.classes.tap.testresult.js';
import * as logPrefixes from './tstest.logprefixes.js';
export class TapParser {
testStore: TapTestResult[] = [];

View File

@ -1,7 +1,7 @@
// ============
// combines different tap test files to an overall result
// ============
import * as plugins from './tstest.plugins';
import * as plugins from './tstest.plugins.js';
export class TapTestResult {
testLogBuffer = Buffer.from('');

View File

@ -1,11 +1,11 @@
import * as plugins from './tstest.plugins';
import * as paths from './tstest.paths';
import * as plugins from './tstest.plugins.js';
import * as paths from './tstest.paths.js';
import { Smartfile } from '@pushrocks/smartfile';
// tap related stuff
import { TapCombinator } from './tstest.classes.tap.combinator';
import { TapParser } from './tstest.classes.tap.parser';
import { TapTestResult } from './tstest.classes.tap.testresult';
import { TapCombinator } from './tstest.classes.tap.combinator.js';
import { TapParser } from './tstest.classes.tap.parser.js';
import { TapTestResult } from './tstest.classes.tap.testresult.js';
export class TestDirectory {
/**

View File

@ -1,12 +1,12 @@
import * as plugins from './tstest.plugins';
import * as paths from './tstest.paths';
import * as logPrefixes from './tstest.logprefixes';
import * as plugins from './tstest.plugins.js';
import * as paths from './tstest.paths.js';
import * as logPrefixes from './tstest.logprefixes.js';
import { coloredString as cs } from '@pushrocks/consolecolor';
import { TestDirectory } from './tstest.classes.testdirectory';
import { TapCombinator } from './tstest.classes.tap.combinator';
import { TapParser } from './tstest.classes.tap.parser';
import { TestDirectory } from './tstest.classes.testdirectory.js';
import { TapCombinator } from './tstest.classes.tap.combinator.js';
import { TapParser } from './tstest.classes.tap.parser.js';
export class TsTest {
public testDir: TestDirectory;
@ -100,7 +100,7 @@ export class TsTest {
// lets bundle the test
await plugins.smartfile.fs.ensureDir(tsbundleCacheDirPath);
await this.tsbundleInstance.buildTest(process.cwd(), fileNameArg, bundleFilePath, 'parcel');
await this.tsbundleInstance.buildTest(process.cwd(), fileNameArg, bundleFilePath, 'rollup');
// lets create a server
const server = new plugins.smartexpress.Server({

View File

@ -1,4 +1,4 @@
import * as plugins from './tstest.plugins';
import * as plugins from './tstest.plugins.js';
import { coloredString as cs } from '@pushrocks/consolecolor';
export const TapPrefix = cs(`::TAP::`, 'pink', 'black');

View File

@ -1,5 +1,5 @@
import * as plugins from './tstest.plugins';
import * as plugins from './tstest.plugins.js';
export const cwd = process.cwd();
export const testDir = plugins.path.join(cwd, './test/');
export const binDirectory = plugins.path.join(cwd, 'node_modules/.bin');
export const binDirectory = plugins.path.join(cwd, './node_modules/.bin');

View File

@ -32,6 +32,6 @@ import * as tsbundle from '@gitzone/tsbundle';
export { tsbundle };
// sindresorhus
import * as figures from 'figures';
import figures from 'figures';
export { figures };