@systemfsoftware/stryker-js-typescript-checker 5.0.4 → 7.0.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/CHANGELOG.md +66 -0
- package/README.md +28 -16
- package/dist/execAsync-CUNMu62l.mjs +10 -0
- package/dist/execAsync-zBkwnfr9.mjs +10 -0
- package/dist/getMachineId-bsd-Ci7jvBhd.mjs +26 -0
- package/dist/getMachineId-bsd-DEwG9Ywj.mjs +26 -0
- package/dist/getMachineId-darwin-K9sCO4zL.mjs +23 -0
- package/dist/getMachineId-darwin-s7YULPyU.mjs +23 -0
- package/dist/getMachineId-linux-B4KmiJGj.mjs +19 -0
- package/dist/getMachineId-linux-NPalN4Yq.mjs +19 -0
- package/dist/getMachineId-unsupported-DpGC7koj.mjs +14 -0
- package/dist/getMachineId-unsupported-Dqj1BWmV.mjs +14 -0
- package/dist/getMachineId-win-B9REJgj2.mjs +25 -0
- package/dist/getMachineId-win-tvSIkbRI.mjs +25 -0
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +6 -1281
- package/dist/main.d.mts +1 -0
- package/dist/main.mjs +53078 -0
- package/package.json +68 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
# @systemfsoftware/stryker-js-typescript-checker
|
|
2
2
|
|
|
3
|
+
## 7.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- `testRunner`, `checkers`, and `ignorers` now carry the plugin and its options together.
|
|
8
|
+
|
|
9
|
+
- `testRunner` is `'command'`, `'vm'`, or `{ plugin, options?, nodeArgs? }`.
|
|
10
|
+
- `checkers` is `{ plugin, options?, nodeArgs? }[]`. Each checker is its own plugin.
|
|
11
|
+
- `ignorers` is plugin file URLs. Every ignorer those modules export runs. There is no separate name list.
|
|
12
|
+
- Put Vitest settings on `testRunner.options` (`configFile`, `dir`, `related`). There is no `vitest` block.
|
|
13
|
+
- Put TypeScript checker settings on that checker's `options` (`prioritizePerformanceOverAccuracy`). There is no `typescriptChecker` block.
|
|
14
|
+
|
|
15
|
+
Before:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
export default defineConfig({
|
|
19
|
+
testRunner: 'vitest',
|
|
20
|
+
checkers: ['typescript'],
|
|
21
|
+
plugins: [
|
|
22
|
+
import.meta.resolve('@systemfsoftware/stryker-js-vitest-runner'),
|
|
23
|
+
import.meta.resolve('@systemfsoftware/stryker-js-typescript-checker'),
|
|
24
|
+
import.meta.resolve('@systemfsoftware/stryker-ignorer-effect-schema-declarations'),
|
|
25
|
+
],
|
|
26
|
+
vitest: { configFile: 'vitest.config.ts' },
|
|
27
|
+
typescriptChecker: { prioritizePerformanceOverAccuracy: true },
|
|
28
|
+
ignorers: ['effect-schema-declarations'],
|
|
29
|
+
})
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
After:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
export default defineConfig({
|
|
36
|
+
testRunner: {
|
|
37
|
+
plugin: import.meta.resolve('@systemfsoftware/stryker-js-vitest-runner'),
|
|
38
|
+
options: { configFile: 'vitest.config.ts' },
|
|
39
|
+
},
|
|
40
|
+
checkers: [
|
|
41
|
+
{
|
|
42
|
+
plugin: import.meta.resolve('@systemfsoftware/stryker-js-typescript-checker'),
|
|
43
|
+
options: { prioritizePerformanceOverAccuracy: true },
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
ignorers: [
|
|
47
|
+
import.meta.resolve('@systemfsoftware/stryker-ignorer-effect-schema-declarations'),
|
|
48
|
+
],
|
|
49
|
+
})
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- Updated dependencies:
|
|
55
|
+
- @systemfsoftware/stryker-js-plugin-interface@6.0.0
|
|
56
|
+
|
|
57
|
+
## 6.0.0
|
|
58
|
+
|
|
59
|
+
### Major Changes
|
|
60
|
+
|
|
61
|
+
- The plugin system now runs each configured TestRunner/Checker/Reporter plugin in its own spawned process over an @effect/rpc wire: plugins load from the project's config-declared specifiers (no glob discovery), boundary failures are typed errors, and plugin spans link into the host trace. Breaking: the in-process plugin Layer contract is removed.
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- Maintenance release. Every published entry point, export, option, and behaviour is exactly as it was.
|
|
66
|
+
|
|
67
|
+
- effect and typescript dependency ranges widen from exact catalog pins to repo catalog ranges; repository metadata now points at stryker-js-effect
|
|
68
|
+
|
|
3
69
|
## 5.0.4
|
|
4
70
|
|
|
5
71
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,31 +1,43 @@
|
|
|
1
1
|
# @systemfsoftware/stryker-js-typescript-checker
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](../../LICENSE)
|
|
4
|
+
[](https://www.npmjs.com/package/@systemfsoftware/stryker-js-typescript-checker)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
TypeScript checker plugin for Stryker mutation testing — provides native support for TypeScript 5.x through 7.x.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
## Why Use a Type Checker Plugin?
|
|
9
|
+
|
|
10
|
+
Mutation testing modifies code syntax in ways that may cause compiler errors (e.g. invalid type assignments, breaking return type contracts). Without a checker plugin, those mutants execute in your test runner, waste runner execution time, or trigger misleading test runner errors.
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
The TypeScript checker intercepts mutants _before_ they reach the test runner. If a mutant causes a TypeScript compilation failure, it is classified immediately as `CompileError` without spinning up test runner workers.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
## Prerequisites
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
- Node.js `>=22.18.0`
|
|
17
|
+
- TypeScript `>=5.0.0`
|
|
18
|
+
- `@systemfsoftware/stryker-js` `>=5.0.0`
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
## Install
|
|
18
21
|
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
"plugins": ["@systemfsoftware/stryker-js-typescript-checker"]
|
|
22
|
-
}
|
|
22
|
+
```bash
|
|
23
|
+
pnpm add -D @systemfsoftware/stryker-js-typescript-checker typescript
|
|
23
24
|
```
|
|
24
25
|
|
|
25
|
-
##
|
|
26
|
+
## Setup in `stryker.config.ts`
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { defineConfig } from '@systemfsoftware/stryker-js/config'
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
export default defineConfig({
|
|
32
|
+
checkers: ['typescript'],
|
|
33
|
+
plugins: [
|
|
34
|
+
import.meta.resolve('@systemfsoftware/stryker-js-typescript-checker'),
|
|
35
|
+
],
|
|
36
|
+
// Optional custom tsconfig path (defaults to tsconfig.json)
|
|
37
|
+
// tsConfigFile: 'tsconfig.build.json',
|
|
38
|
+
})
|
|
39
|
+
```
|
|
28
40
|
|
|
29
41
|
## License
|
|
30
42
|
|
|
31
|
-
Apache-2.0
|
|
43
|
+
[Apache-2.0](../../LICENSE)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { i as __require, r as __commonJSMin } from "./main.mjs";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js
|
|
3
|
+
var require_execAsync = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.execAsync = void 0;
|
|
6
|
+
const child_process = __require("child_process");
|
|
7
|
+
exports.execAsync = __require("util").promisify(child_process.exec);
|
|
8
|
+
}));
|
|
9
|
+
//#endregion
|
|
10
|
+
export { require_execAsync as t };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { i as __require, r as __commonJSMin } from "./main.mjs";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js
|
|
3
|
+
var require_execAsync = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.execAsync = void 0;
|
|
6
|
+
const child_process = __require("child_process");
|
|
7
|
+
exports.execAsync = __require("util").promisify(child_process.exec);
|
|
8
|
+
}));
|
|
9
|
+
//#endregion
|
|
10
|
+
export { require_execAsync as t };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { a as __toCommonJS, i as __require, n as init_esm, r as __commonJSMin, t as esm_exports } from "./main.mjs";
|
|
2
|
+
import { t as require_execAsync } from "./execAsync-zBkwnfr9.mjs";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-bsd.js
|
|
4
|
+
var require_getMachineId_bsd = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getMachineId = void 0;
|
|
7
|
+
const fs_1 = __require("fs");
|
|
8
|
+
const execAsync_1 = require_execAsync();
|
|
9
|
+
const api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
10
|
+
async function getMachineId() {
|
|
11
|
+
try {
|
|
12
|
+
return (await fs_1.promises.readFile("/etc/hostid", { encoding: "utf8" })).trim();
|
|
13
|
+
} catch (e) {
|
|
14
|
+
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
return (await (0, execAsync_1.execAsync)("kenv -q smbios.system.uuid")).stdout.trim();
|
|
18
|
+
} catch (e) {
|
|
19
|
+
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.getMachineId = getMachineId;
|
|
23
|
+
}));
|
|
24
|
+
//#endregion
|
|
25
|
+
export default require_getMachineId_bsd();
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { a as __toCommonJS, i as __require, n as init_esm, r as __commonJSMin, t as esm_exports } from "./main.mjs";
|
|
2
|
+
import { t as require_execAsync } from "./execAsync-CUNMu62l.mjs";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-bsd.js
|
|
4
|
+
var require_getMachineId_bsd = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getMachineId = void 0;
|
|
7
|
+
const fs_1 = __require("fs");
|
|
8
|
+
const execAsync_1 = require_execAsync();
|
|
9
|
+
const api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
10
|
+
async function getMachineId() {
|
|
11
|
+
try {
|
|
12
|
+
return (await fs_1.promises.readFile("/etc/hostid", { encoding: "utf8" })).trim();
|
|
13
|
+
} catch (e) {
|
|
14
|
+
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
return (await (0, execAsync_1.execAsync)("kenv -q smbios.system.uuid")).stdout.trim();
|
|
18
|
+
} catch (e) {
|
|
19
|
+
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.getMachineId = getMachineId;
|
|
23
|
+
}));
|
|
24
|
+
//#endregion
|
|
25
|
+
export default require_getMachineId_bsd();
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { a as __toCommonJS, n as init_esm, r as __commonJSMin, t as esm_exports } from "./main.mjs";
|
|
2
|
+
import { t as require_execAsync } from "./execAsync-CUNMu62l.mjs";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-darwin.js
|
|
4
|
+
var require_getMachineId_darwin = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getMachineId = void 0;
|
|
7
|
+
const execAsync_1 = require_execAsync();
|
|
8
|
+
const api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
9
|
+
async function getMachineId() {
|
|
10
|
+
try {
|
|
11
|
+
const idLine = (await (0, execAsync_1.execAsync)("ioreg -rd1 -c \"IOPlatformExpertDevice\"")).stdout.split("\n").find((line) => line.includes("IOPlatformUUID"));
|
|
12
|
+
if (!idLine) return;
|
|
13
|
+
const parts = idLine.split("\" = \"");
|
|
14
|
+
if (parts.length === 2) return parts[1].slice(0, -1);
|
|
15
|
+
} catch (e) {
|
|
16
|
+
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.getMachineId = getMachineId;
|
|
20
|
+
}));
|
|
21
|
+
//#endregion
|
|
22
|
+
export default require_getMachineId_darwin();
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { a as __toCommonJS, n as init_esm, r as __commonJSMin, t as esm_exports } from "./main.mjs";
|
|
2
|
+
import { t as require_execAsync } from "./execAsync-zBkwnfr9.mjs";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-darwin.js
|
|
4
|
+
var require_getMachineId_darwin = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getMachineId = void 0;
|
|
7
|
+
const execAsync_1 = require_execAsync();
|
|
8
|
+
const api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
9
|
+
async function getMachineId() {
|
|
10
|
+
try {
|
|
11
|
+
const idLine = (await (0, execAsync_1.execAsync)("ioreg -rd1 -c \"IOPlatformExpertDevice\"")).stdout.split("\n").find((line) => line.includes("IOPlatformUUID"));
|
|
12
|
+
if (!idLine) return;
|
|
13
|
+
const parts = idLine.split("\" = \"");
|
|
14
|
+
if (parts.length === 2) return parts[1].slice(0, -1);
|
|
15
|
+
} catch (e) {
|
|
16
|
+
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.getMachineId = getMachineId;
|
|
20
|
+
}));
|
|
21
|
+
//#endregion
|
|
22
|
+
export default require_getMachineId_darwin();
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { a as __toCommonJS, i as __require, n as init_esm, r as __commonJSMin, t as esm_exports } from "./main.mjs";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-linux.js
|
|
3
|
+
var require_getMachineId_linux = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.getMachineId = void 0;
|
|
6
|
+
const fs_1 = __require("fs");
|
|
7
|
+
const api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
8
|
+
async function getMachineId() {
|
|
9
|
+
for (const path of ["/etc/machine-id", "/var/lib/dbus/machine-id"]) try {
|
|
10
|
+
return (await fs_1.promises.readFile(path, { encoding: "utf8" })).trim();
|
|
11
|
+
} catch (e) {
|
|
12
|
+
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.getMachineId = getMachineId;
|
|
16
|
+
}));
|
|
17
|
+
//#endregion
|
|
18
|
+
export default require_getMachineId_linux();
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { a as __toCommonJS, i as __require, n as init_esm, r as __commonJSMin, t as esm_exports } from "./main.mjs";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-linux.js
|
|
3
|
+
var require_getMachineId_linux = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.getMachineId = void 0;
|
|
6
|
+
const fs_1 = __require("fs");
|
|
7
|
+
const api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
8
|
+
async function getMachineId() {
|
|
9
|
+
for (const path of ["/etc/machine-id", "/var/lib/dbus/machine-id"]) try {
|
|
10
|
+
return (await fs_1.promises.readFile(path, { encoding: "utf8" })).trim();
|
|
11
|
+
} catch (e) {
|
|
12
|
+
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.getMachineId = getMachineId;
|
|
16
|
+
}));
|
|
17
|
+
//#endregion
|
|
18
|
+
export default require_getMachineId_linux();
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { a as __toCommonJS, n as init_esm, r as __commonJSMin, t as esm_exports } from "./main.mjs";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-unsupported.js
|
|
3
|
+
var require_getMachineId_unsupported = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.getMachineId = void 0;
|
|
6
|
+
const api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
7
|
+
async function getMachineId() {
|
|
8
|
+
api_1.diag.debug("could not read machine-id: unsupported platform");
|
|
9
|
+
}
|
|
10
|
+
exports.getMachineId = getMachineId;
|
|
11
|
+
}));
|
|
12
|
+
//#endregion
|
|
13
|
+
export default require_getMachineId_unsupported();
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { a as __toCommonJS, n as init_esm, r as __commonJSMin, t as esm_exports } from "./main.mjs";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-unsupported.js
|
|
3
|
+
var require_getMachineId_unsupported = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.getMachineId = void 0;
|
|
6
|
+
const api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
7
|
+
async function getMachineId() {
|
|
8
|
+
api_1.diag.debug("could not read machine-id: unsupported platform");
|
|
9
|
+
}
|
|
10
|
+
exports.getMachineId = getMachineId;
|
|
11
|
+
}));
|
|
12
|
+
//#endregion
|
|
13
|
+
export default require_getMachineId_unsupported();
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { a as __toCommonJS, i as __require, n as init_esm, r as __commonJSMin, t as esm_exports } from "./main.mjs";
|
|
2
|
+
import { t as require_execAsync } from "./execAsync-zBkwnfr9.mjs";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-win.js
|
|
4
|
+
var require_getMachineId_win = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getMachineId = void 0;
|
|
7
|
+
const process = __require("process");
|
|
8
|
+
const execAsync_1 = require_execAsync();
|
|
9
|
+
const api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
10
|
+
async function getMachineId() {
|
|
11
|
+
const args = "QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid";
|
|
12
|
+
let command = "%windir%\\System32\\REG.exe";
|
|
13
|
+
if (process.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process.env) command = "%windir%\\sysnative\\cmd.exe /c " + command;
|
|
14
|
+
try {
|
|
15
|
+
const parts = (await (0, execAsync_1.execAsync)(`${command} ${args}`)).stdout.split("REG_SZ");
|
|
16
|
+
if (parts.length === 2) return parts[1].trim();
|
|
17
|
+
} catch (e) {
|
|
18
|
+
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.getMachineId = getMachineId;
|
|
22
|
+
}));
|
|
23
|
+
//#endregion
|
|
24
|
+
export default require_getMachineId_win();
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { a as __toCommonJS, i as __require, n as init_esm, r as __commonJSMin, t as esm_exports } from "./main.mjs";
|
|
2
|
+
import { t as require_execAsync } from "./execAsync-CUNMu62l.mjs";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-win.js
|
|
4
|
+
var require_getMachineId_win = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getMachineId = void 0;
|
|
7
|
+
const process = __require("process");
|
|
8
|
+
const execAsync_1 = require_execAsync();
|
|
9
|
+
const api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
10
|
+
async function getMachineId() {
|
|
11
|
+
const args = "QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid";
|
|
12
|
+
let command = "%windir%\\System32\\REG.exe";
|
|
13
|
+
if (process.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process.env) command = "%windir%\\sysnative\\cmd.exe /c " + command;
|
|
14
|
+
try {
|
|
15
|
+
const parts = (await (0, execAsync_1.execAsync)(`${command} ${args}`)).stdout.split("REG_SZ");
|
|
16
|
+
if (parts.length === 2) return parts[1].trim();
|
|
17
|
+
} catch (e) {
|
|
18
|
+
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.getMachineId = getMachineId;
|
|
22
|
+
}));
|
|
23
|
+
//#endregion
|
|
24
|
+
export default require_getMachineId_win();
|
|
25
|
+
export {};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export declare const strykerPlugins: readonly {
|
|
2
|
+
readonly kind: 'Checker';
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly workerEntry: string;
|
|
5
|
+
}[];
|
|
6
6
|
|
|
7
7
|
export { }
|