@servicetitan/startup-jest 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +7 -2
- package/dist/index.js +18 -16
- package/dist/index.js.map +1 -1
- package/dist/jest/index.d.ts +1 -1
- package/dist/jest/index.d.ts.map +1 -1
- package/dist/jest/index.js +16 -19
- package/dist/jest/index.js.map +1 -1
- package/package.json +2 -10
- package/src/jest/index.ts +5 -20
package/bin/index.js
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
const jest = require('../dist');
|
|
4
4
|
|
|
5
5
|
(function () {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
try {
|
|
7
|
+
jest.runJestCli()
|
|
8
|
+
} catch (e) {
|
|
9
|
+
// eslint-disable-next-line no-console
|
|
10
|
+
console.error(String(e));
|
|
11
|
+
process.exitCode = 1;
|
|
12
|
+
}
|
|
8
13
|
})();
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
_export_star(require("./jest"), exports);
|
|
6
|
+
function _export_star(from, to) {
|
|
7
|
+
Object.keys(from).forEach(function(k) {
|
|
8
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
9
|
+
Object.defineProperty(to, k, {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function() {
|
|
12
|
+
return from[k];
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
return from;
|
|
18
|
+
}
|
|
19
|
+
|
|
18
20
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './jest';\n"],"names":[],"mappings":";;;;qBAAc"}
|
package/dist/jest/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function runJestCli():
|
|
1
|
+
export declare function runJestCli(): void;
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/jest/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jest/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jest/index.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,SAKzB"}
|
package/dist/jest/index.js
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
const { $0, _, ...argvSync } = yargs_1.argv;
|
|
10
|
-
// Fix reporters, because Rider sends it as string, but array is required by Jest
|
|
11
|
-
argvSync.reporters = (0, utils_1.toArray)(argvSync.reporters);
|
|
12
|
-
let cliArgument = _;
|
|
13
|
-
if (argvSync.runTestsByPath) {
|
|
14
|
-
cliArgument = [argvSync.runTestsByPath];
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "runJestCli", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return runJestCli;
|
|
15
9
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
});
|
|
11
|
+
const _child_process = require("child_process");
|
|
12
|
+
function runJestCli() {
|
|
13
|
+
const args = process.argv.slice(2); // argv[0] = Node executable, argv[1] = script path
|
|
14
|
+
const command = `npx startup test ${args.join(' ')}`;
|
|
15
|
+
console.log(`> ${command}`); // eslint-disable-line no-console
|
|
16
|
+
(0, _child_process.execSync)(command, {
|
|
17
|
+
stdio: 'inherit'
|
|
21
18
|
});
|
|
22
|
-
return jestCommand.execute();
|
|
23
19
|
}
|
|
20
|
+
|
|
24
21
|
//# sourceMappingURL=index.js.map
|
package/dist/jest/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../src/jest/index.ts"],"sourcesContent":["import { execSync } from 'child_process';\n\nexport function runJestCli() {\n const args = process.argv.slice(2); // argv[0] = Node executable, argv[1] = script path\n const command = `npx startup test ${args.join(' ')}`;\n console.log(`> ${command}`); // eslint-disable-line no-console\n execSync(command, { stdio: 'inherit' });\n}\n"],"names":["runJestCli","args","process","argv","slice","command","join","console","log","execSync","stdio"],"mappings":";;;;+BAEgBA;;;eAAAA;;;+BAFS;AAElB,SAASA;IACZ,MAAMC,OAAOC,QAAQC,IAAI,CAACC,KAAK,CAAC,IAAI,mDAAmD;IACvF,MAAMC,UAAU,CAAC,iBAAiB,EAAEJ,KAAKK,IAAI,CAAC,MAAM;IACpDC,QAAQC,GAAG,CAAC,CAAC,EAAE,EAAEH,SAAS,GAAG,iCAAiC;IAC9DI,IAAAA,uBAAQ,EAACJ,SAAS;QAAEK,OAAO;IAAU;AACzC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/startup-jest",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://docs.st.dev/docs/frontend/startup",
|
|
6
6
|
"repository": {
|
|
@@ -17,22 +17,14 @@
|
|
|
17
17
|
"tsconfig.json"
|
|
18
18
|
],
|
|
19
19
|
"bin": "./bin/index.js",
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"@types/stylelint": "~13.13.3",
|
|
22
|
-
"@types/webpack-dev-server": "~3.11.5",
|
|
23
|
-
"@types/yargs": "~17.0.22"
|
|
24
|
-
},
|
|
25
20
|
"peerDependencies": {
|
|
26
21
|
"@servicetitan/startup": ">=21.10.0"
|
|
27
22
|
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"yargs": "~17.7.1"
|
|
30
|
-
},
|
|
31
23
|
"publishConfig": {
|
|
32
24
|
"access": "public"
|
|
33
25
|
},
|
|
34
26
|
"cli": {
|
|
35
27
|
"webpack": false
|
|
36
28
|
},
|
|
37
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "3dab3310534a39aaacb0069e1d377579fe0a7fab"
|
|
38
30
|
}
|
package/src/jest/index.ts
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Tests } from '@servicetitan/startup/dist/cli/commands/tests';
|
|
3
|
-
import { toArray } from '@servicetitan/startup/dist/utils';
|
|
1
|
+
import { execSync } from 'child_process';
|
|
4
2
|
|
|
5
3
|
export function runJestCli() {
|
|
6
|
-
//
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
argvSync.reporters = toArray(argvSync.reporters);
|
|
11
|
-
|
|
12
|
-
let cliArgument = _;
|
|
13
|
-
if (argvSync.runTestsByPath) {
|
|
14
|
-
cliArgument = [argvSync.runTestsByPath as string];
|
|
15
|
-
}
|
|
16
|
-
const jestCommand = new Tests({
|
|
17
|
-
$0,
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
19
|
-
_: cliArgument,
|
|
20
|
-
...argvSync,
|
|
21
|
-
});
|
|
22
|
-
return jestCommand.execute();
|
|
4
|
+
const args = process.argv.slice(2); // argv[0] = Node executable, argv[1] = script path
|
|
5
|
+
const command = `npx startup test ${args.join(' ')}`;
|
|
6
|
+
console.log(`> ${command}`); // eslint-disable-line no-console
|
|
7
|
+
execSync(command, { stdio: 'inherit' });
|
|
23
8
|
}
|