vouchington-tooling 0.62.0 → 0.64.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/README.md +147 -0
- package/dist/cli/commands/cloc.d.mts +7 -0
- package/dist/cli/commands/cloc.mjs +47 -0
- package/dist/cli/commands/storybook-browser-runner.d.mts +7 -0
- package/dist/cli/commands/storybook-browser-runner.mjs +29 -0
- package/dist/cli/index.mjs +4 -0
- package/dist/cli/parse-forwarded-commands.d.mts +6 -0
- package/dist/cli/parse-forwarded-commands.mjs +4 -0
- package/dist/cli/parse.d.mts +6 -0
- package/dist/cli/usage-text.d.mts +1 -1
- package/dist/cli/usage-text.mjs +18 -0
- package/dist/cloc/child-process.d.mts +3 -0
- package/dist/cloc/child-process.mjs +14 -0
- package/dist/cloc/classify.d.mts +8 -0
- package/dist/cloc/classify.mjs +20 -0
- package/dist/cloc/config-load.d.mts +7 -0
- package/dist/cloc/config-load.mjs +26 -0
- package/dist/cloc/config.d.mts +55 -0
- package/dist/cloc/config.mjs +109 -0
- package/dist/cloc/count.d.mts +9 -0
- package/dist/cloc/count.mjs +33 -0
- package/dist/cloc/index.d.mts +12 -0
- package/dist/cloc/index.mjs +7 -0
- package/dist/cloc/layout.test-helpers.d.mts +8 -0
- package/dist/cloc/layout.test-helpers.mjs +42 -0
- package/dist/cloc/paths.d.mts +7 -0
- package/dist/cloc/paths.mjs +29 -0
- package/dist/cloc/patterns.d.mts +10 -0
- package/dist/cloc/patterns.mjs +25 -0
- package/dist/cloc/rows.d.mts +13 -0
- package/dist/cloc/rows.mjs +42 -0
- package/dist/cloc/scc.d.mts +10 -0
- package/dist/cloc/scc.mjs +55 -0
- package/dist/cloc/tracked.d.mts +4 -0
- package/dist/cloc/tracked.mjs +40 -0
- package/dist/postgres-test-faults/fault-support.d.mts +11 -0
- package/dist/postgres-test-faults/fault-support.mjs +61 -0
- package/dist/postgres-test-faults/fault-types.d.mts +43 -0
- package/dist/postgres-test-faults/fault-types.mjs +1 -0
- package/dist/postgres-test-faults/index.d.mts +5 -0
- package/dist/postgres-test-faults/index.mjs +4 -0
- package/dist/postgres-test-faults/lock-observers.d.mts +20 -0
- package/dist/postgres-test-faults/lock-observers.mjs +14 -0
- package/dist/postgres-test-faults/lock-wait.d.mts +13 -0
- package/dist/postgres-test-faults/lock-wait.mjs +62 -0
- package/dist/postgres-test-faults/lock-waiter.d.mts +19 -0
- package/dist/postgres-test-faults/lock-waiter.mjs +95 -0
- package/dist/postgres-test-faults/observation-queue.d.mts +2 -0
- package/dist/postgres-test-faults/observation-queue.mjs +22 -0
- package/dist/postgres-test-faults/polling.d.mts +6 -0
- package/dist/postgres-test-faults/polling.mjs +33 -0
- package/dist/postgres-test-faults/pool-query-failure.d.mts +8 -0
- package/dist/postgres-test-faults/pool-query-failure.mjs +136 -0
- package/dist/postgres-test-faults/query-failure.d.mts +8 -0
- package/dist/postgres-test-faults/query-failure.mjs +108 -0
- package/dist/postgres-test-faults/test-cluster.test-helpers.d.mts +13 -0
- package/dist/postgres-test-faults/test-cluster.test-helpers.mjs +84 -0
- package/dist/provider-replay/abort-listeners.d.mts +4 -0
- package/dist/provider-replay/abort-listeners.mjs +19 -0
- package/dist/provider-replay/aws-replay-abort-signal.d.mts +5 -0
- package/dist/provider-replay/aws-replay-abort-signal.mjs +63 -0
- package/dist/provider-replay/aws-replay-request-handler.d.mts +38 -0
- package/dist/provider-replay/aws-replay-request-handler.mjs +66 -0
- package/dist/provider-replay/force-client-option.d.mts +6 -0
- package/dist/provider-replay/force-client-option.mjs +13 -0
- package/dist/provider-replay/index.d.mts +6 -0
- package/dist/provider-replay/index.mjs +6 -0
- package/dist/provider-replay/provider-replay.d.mts +32 -0
- package/dist/provider-replay/provider-replay.mjs +54 -0
- package/dist/provider-replay/recorded-response.d.mts +17 -0
- package/dist/provider-replay/recorded-response.mjs +42 -0
- package/dist/provider-replay/replay-response.d.mts +8 -0
- package/dist/provider-replay/replay-response.mjs +38 -0
- package/dist/storybook-browser-runner/args.d.mts +8 -0
- package/dist/storybook-browser-runner/args.mjs +52 -0
- package/dist/storybook-browser-runner/attempt-result.d.mts +41 -0
- package/dist/storybook-browser-runner/attempt-result.mjs +108 -0
- package/dist/storybook-browser-runner/bootstrap-telemetry.d.mts +35 -0
- package/dist/storybook-browser-runner/bootstrap-telemetry.mjs +138 -0
- package/dist/storybook-browser-runner/cache-plan.d.mts +22 -0
- package/dist/storybook-browser-runner/cache-plan.mjs +53 -0
- package/dist/storybook-browser-runner/diagnostics.d.mts +8 -0
- package/dist/storybook-browser-runner/diagnostics.mjs +29 -0
- package/dist/storybook-browser-runner/env.d.mts +2 -0
- package/dist/storybook-browser-runner/env.mjs +59 -0
- package/dist/storybook-browser-runner/fixtures.test-helpers.d.mts +49 -0
- package/dist/storybook-browser-runner/fixtures.test-helpers.mjs +95 -0
- package/dist/storybook-browser-runner/index.d.mts +15 -0
- package/dist/storybook-browser-runner/index.mjs +70 -0
- package/dist/storybook-browser-runner/observer-state.d.mts +22 -0
- package/dist/storybook-browser-runner/observer-state.mjs +21 -0
- package/dist/storybook-browser-runner/options.d.mts +18 -0
- package/dist/storybook-browser-runner/options.mjs +49 -0
- package/dist/storybook-browser-runner/output-observer.d.mts +37 -0
- package/dist/storybook-browser-runner/output-observer.mjs +130 -0
- package/dist/storybook-browser-runner/output-patterns.d.mts +14 -0
- package/dist/storybook-browser-runner/output-patterns.mjs +26 -0
- package/dist/storybook-browser-runner/quiet-output.d.mts +16 -0
- package/dist/storybook-browser-runner/quiet-output.mjs +79 -0
- package/dist/storybook-browser-runner/run-attempt.d.mts +14 -0
- package/dist/storybook-browser-runner/run-attempt.mjs +111 -0
- package/dist/storybook-browser-runner/runtime-metadata.d.mts +12 -0
- package/dist/storybook-browser-runner/runtime-metadata.mjs +50 -0
- package/dist/storybook-browser-runner/session-deps.d.mts +11 -0
- package/dist/storybook-browser-runner/session-deps.mjs +70 -0
- package/dist/storybook-browser-runner/types.d.mts +49 -0
- package/dist/storybook-browser-runner/types.mjs +1 -0
- package/dist/storybook-browser-runner/vite-detectors.d.mts +6 -0
- package/dist/storybook-browser-runner/vite-detectors.mjs +20 -0
- package/dist/storybook-browser-runner/watchdog.d.mts +23 -0
- package/dist/storybook-browser-runner/watchdog.mjs +55 -0
- package/package.json +27 -1
- package/scripts/__pycache__/run_bounded_process.cpython-312.pyc +0 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { normalizePath } from "./patterns.mjs";
|
|
2
|
+
export const DEFAULT_EXCLUDED_DIRS = [
|
|
3
|
+
'.git',
|
|
4
|
+
'.hg',
|
|
5
|
+
'.svn',
|
|
6
|
+
'.next',
|
|
7
|
+
'.turbo',
|
|
8
|
+
'build',
|
|
9
|
+
'coverage',
|
|
10
|
+
'dist',
|
|
11
|
+
'node_modules',
|
|
12
|
+
'out',
|
|
13
|
+
];
|
|
14
|
+
export const DEFAULT_IGNORED_DIRS = ['fixtures', '__fixtures__', '__snapshots__'];
|
|
15
|
+
function asRecord(value) {
|
|
16
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value)) {
|
|
17
|
+
throw new Error('cloc config must be an object');
|
|
18
|
+
}
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
// `./api/` and `api` name the same target; tracked and scc paths never carry either spelling.
|
|
22
|
+
function cleanTarget(target) {
|
|
23
|
+
return normalizePath(target).replace(/\/+$/u, '') || '.';
|
|
24
|
+
}
|
|
25
|
+
function categoryLabels(value) {
|
|
26
|
+
if (value === undefined)
|
|
27
|
+
return {};
|
|
28
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value)) {
|
|
29
|
+
throw new Error('cloc config "categories" must be an object');
|
|
30
|
+
}
|
|
31
|
+
return value;
|
|
32
|
+
}
|
|
33
|
+
function list(value, field) {
|
|
34
|
+
if (value === undefined)
|
|
35
|
+
return [];
|
|
36
|
+
if (!Array.isArray(value) || value.some((item) => typeof item !== 'string' || item === '')) {
|
|
37
|
+
throw new Error(`cloc config "${field}" must be an array of non-empty strings`);
|
|
38
|
+
}
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
function text(value, field) {
|
|
42
|
+
if (value === undefined)
|
|
43
|
+
return undefined;
|
|
44
|
+
if (typeof value !== 'string' || value === '') {
|
|
45
|
+
throw new Error(`cloc config "${field}" must be a non-empty string`);
|
|
46
|
+
}
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
function services(value) {
|
|
50
|
+
if (value === undefined)
|
|
51
|
+
return [];
|
|
52
|
+
if (!Array.isArray(value))
|
|
53
|
+
throw new Error('cloc config "services" must be an array');
|
|
54
|
+
return value.map((rule, index) => {
|
|
55
|
+
const entry = (rule ?? {});
|
|
56
|
+
const name = text(entry.name, `services[${index}].name`);
|
|
57
|
+
if (name === undefined)
|
|
58
|
+
throw new Error(`cloc config "services[${index}].name" is required`);
|
|
59
|
+
return { name, match: list(entry.match, `services[${index}].match`) };
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/** Validates a raw config value and fills defaults. Throws a descriptive error when malformed. */
|
|
63
|
+
export function normalizeClocConfig(raw) {
|
|
64
|
+
const input = asRecord(raw);
|
|
65
|
+
const rules = services(input.services);
|
|
66
|
+
const defaultService = text(input.defaultService, 'defaultService') ?? 'other';
|
|
67
|
+
if (!rules.some((rule) => rule.name === defaultService)) {
|
|
68
|
+
rules.push({ name: defaultService, match: [] });
|
|
69
|
+
}
|
|
70
|
+
const names = rules.map((rule) => rule.name);
|
|
71
|
+
const duplicate = names.find((name, index) => names.indexOf(name) !== index);
|
|
72
|
+
if (duplicate !== undefined)
|
|
73
|
+
throw new Error(`cloc config has duplicate service "${duplicate}"`);
|
|
74
|
+
if (names.includes('total'))
|
|
75
|
+
throw new Error('cloc config service name "total" is reserved');
|
|
76
|
+
const roots = list(input.countedRoots, 'countedRoots').map(cleanTarget);
|
|
77
|
+
const rootFiles = list(input.countedRootFiles, 'countedRootFiles').map(cleanTarget);
|
|
78
|
+
// A root of "." (or "./") is the whole repository: no narrowing.
|
|
79
|
+
const countAll = roots.includes('.');
|
|
80
|
+
const categories = categoryLabels(input.categories);
|
|
81
|
+
const labels = {
|
|
82
|
+
source: text(categories.source, 'categories.source') ?? 'source',
|
|
83
|
+
tests: text(categories.tests, 'categories.tests') ?? 'tests',
|
|
84
|
+
tooling: text(categories.tooling, 'categories.tooling') ?? 'tooling',
|
|
85
|
+
};
|
|
86
|
+
const used = new Set(['service', 'total', ...Object.values(labels)]);
|
|
87
|
+
if (used.size !== 5) {
|
|
88
|
+
throw new Error('cloc config category names must be distinct and not "service" or "total"');
|
|
89
|
+
}
|
|
90
|
+
const sccBin = text(input.sccBin, 'sccBin');
|
|
91
|
+
const missingSccHint = text(input.missingSccHint, 'missingSccHint');
|
|
92
|
+
return {
|
|
93
|
+
services: rules,
|
|
94
|
+
defaultService,
|
|
95
|
+
categories: labels,
|
|
96
|
+
testPatterns: list(input.testPatterns, 'testPatterns'),
|
|
97
|
+
toolingPatterns: list(input.toolingPatterns, 'toolingPatterns'),
|
|
98
|
+
countedRoots: countAll ? [] : roots,
|
|
99
|
+
countedRootFiles: countAll ? [] : rootFiles,
|
|
100
|
+
excludedDirs: input.excludedDirs === undefined
|
|
101
|
+
? [...DEFAULT_EXCLUDED_DIRS]
|
|
102
|
+
: list(input.excludedDirs, 'excludedDirs'),
|
|
103
|
+
ignoredDirs: input.ignoredDirs === undefined
|
|
104
|
+
? [...DEFAULT_IGNORED_DIRS]
|
|
105
|
+
: list(input.ignoredDirs, 'ignoredDirs'),
|
|
106
|
+
...(sccBin === undefined ? {} : { sccBin }),
|
|
107
|
+
...(missingSccHint === undefined ? {} : { missingSccHint }),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ClocConfig } from './config.mts';
|
|
2
|
+
import type { CountedFile } from './rows.mts';
|
|
3
|
+
export type CountOptions = {
|
|
4
|
+
cwd: string;
|
|
5
|
+
sccBin?: string;
|
|
6
|
+
env?: NodeJS.ProcessEnv;
|
|
7
|
+
};
|
|
8
|
+
/** Lists tracked files with git, then counts the configured targets with scc. */
|
|
9
|
+
export declare function countFiles(config: ClocConfig, options: CountOptions): Promise<CountedFile[]>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { resolve } from 'node:path';
|
|
2
|
+
import { createPathPolicy } from "./paths.mjs";
|
|
3
|
+
import { readSccFiles } from "./scc.mjs";
|
|
4
|
+
import { gitTopLevel, listTrackedFiles } from "./tracked.mjs";
|
|
5
|
+
/** Lists tracked files with git, then counts the configured targets with scc. */
|
|
6
|
+
export async function countFiles(config, options) {
|
|
7
|
+
const root = await gitTopLevel(options.cwd);
|
|
8
|
+
const tracked = await listTrackedFiles(root);
|
|
9
|
+
const policy = createPathPolicy(config);
|
|
10
|
+
const targets = policy.countTargetsFor(tracked);
|
|
11
|
+
// scc with no target would scan the whole working directory.
|
|
12
|
+
if (targets.length === 0)
|
|
13
|
+
return [];
|
|
14
|
+
const requested = options.sccBin ?? (options.env ?? process.env).SCC_BIN ?? config.sccBin ?? 'scc';
|
|
15
|
+
// The child runs from the repository top level; a path-like binary is relative to the caller.
|
|
16
|
+
const sccBin = requested.includes('/') ? resolve(options.cwd, requested) : requested;
|
|
17
|
+
try {
|
|
18
|
+
return await readSccFiles({
|
|
19
|
+
sccBin,
|
|
20
|
+
targets,
|
|
21
|
+
excludedDirs: config.excludedDirs,
|
|
22
|
+
cwd: root,
|
|
23
|
+
keep: (filePath) => policy.shouldCountFile(filePath, tracked),
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
catch (err) {
|
|
27
|
+
if (err.code === 'ENOENT') {
|
|
28
|
+
const hint = config.missingSccHint === undefined ? '' : ` ${config.missingSccHint}`;
|
|
29
|
+
throw new Error(`scc is required but "${sccBin}" was not found.${hint}`, { cause: err });
|
|
30
|
+
}
|
|
31
|
+
throw err;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { createClassifier } from './classify.mts';
|
|
2
|
+
export type { CategoryKey, Classification } from './classify.mts';
|
|
3
|
+
export { loadClocConfig } from './config-load.mts';
|
|
4
|
+
export type { LoadModule } from './config-load.mts';
|
|
5
|
+
export { normalizeClocConfig } from './config.mts';
|
|
6
|
+
export type { ClocCategories, ClocConfig, ClocConfigInput, ClocServiceRule, ClocServiceRuleInput, } from './config.mts';
|
|
7
|
+
export { countFiles } from './count.mts';
|
|
8
|
+
export type { CountOptions } from './count.mts';
|
|
9
|
+
export { createPathPolicy } from './paths.mts';
|
|
10
|
+
export { compilePatterns, normalizePath } from './patterns.mts';
|
|
11
|
+
export { buildRows, formatRows } from './rows.mts';
|
|
12
|
+
export type { ClocRow, CountedFile } from './rows.mts';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { createClassifier } from "./classify.mjs";
|
|
2
|
+
export { loadClocConfig } from "./config-load.mjs";
|
|
3
|
+
export { normalizeClocConfig } from "./config.mjs";
|
|
4
|
+
export { countFiles } from "./count.mjs";
|
|
5
|
+
export { createPathPolicy } from "./paths.mjs";
|
|
6
|
+
export { compilePatterns, normalizePath } from "./patterns.mjs";
|
|
7
|
+
export { buildRows, formatRows } from "./rows.mjs";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ClocConfig, type ClocConfigInput } from './config.mts';
|
|
2
|
+
export declare const LAYOUT: ClocConfigInput;
|
|
3
|
+
export declare function layoutConfig(overrides?: ClocConfigInput): ClocConfig;
|
|
4
|
+
export declare function tempRepo(files: Record<string, string>): string;
|
|
5
|
+
/** An executable stand-in for scc that prints the given stdout and exits with `status`. */
|
|
6
|
+
export declare function fakeScc(stdout: string, status?: number): string;
|
|
7
|
+
export declare const SCC_HEADER = "Language,Provider,Filename,Lines,Code,Comments,Blanks,Complexity,Bytes\n";
|
|
8
|
+
export declare function sccCsv(rows: Record<string, number>): string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { chmodSync, mkdirSync, mkdtempSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { execFileSync } from 'node:child_process';
|
|
3
|
+
import { tmpdir } from 'node:os';
|
|
4
|
+
import { dirname, join } from 'node:path';
|
|
5
|
+
import { normalizeClocConfig } from "./config.mjs";
|
|
6
|
+
export const LAYOUT = {
|
|
7
|
+
services: [
|
|
8
|
+
{ name: 'api', match: ['api/'] },
|
|
9
|
+
{ name: 'ui', match: ['ui/', 'e2e/'] },
|
|
10
|
+
{ name: 'docs', match: ['docs/', 'README.md'] },
|
|
11
|
+
],
|
|
12
|
+
defaultService: 'tooling',
|
|
13
|
+
testPatterns: ['*.test.*', '**/__tests__/**', 'e2e/'],
|
|
14
|
+
toolingPatterns: ['.github/', '**/scripts/**', 'package.json', '*.config.*'],
|
|
15
|
+
countedRoots: ['.github', 'api', 'docs', 'e2e', 'scripts', 'ui'],
|
|
16
|
+
countedRootFiles: ['README.md', 'package.json', 'missing.json'],
|
|
17
|
+
};
|
|
18
|
+
export function layoutConfig(overrides = {}) {
|
|
19
|
+
return normalizeClocConfig({ ...LAYOUT, ...overrides });
|
|
20
|
+
}
|
|
21
|
+
export function tempRepo(files) {
|
|
22
|
+
const root = mkdtempSync(join(tmpdir(), 'cloc-'));
|
|
23
|
+
for (const [file, content] of Object.entries(files)) {
|
|
24
|
+
mkdirSync(dirname(join(root, file)), { recursive: true });
|
|
25
|
+
writeFileSync(join(root, file), content);
|
|
26
|
+
}
|
|
27
|
+
execFileSync('git', ['init', '-q'], { cwd: root });
|
|
28
|
+
execFileSync('git', ['add', '-A'], { cwd: root });
|
|
29
|
+
return root;
|
|
30
|
+
}
|
|
31
|
+
/** An executable stand-in for scc that prints the given stdout and exits with `status`. */
|
|
32
|
+
export function fakeScc(stdout, status = 0) {
|
|
33
|
+
const file = join(mkdtempSync(join(tmpdir(), 'scc-')), 'scc');
|
|
34
|
+
writeFileSync(file, `#!/usr/bin/env node\nprocess.stdout.write(${JSON.stringify(stdout)})\nprocess.exit(${status})\n`);
|
|
35
|
+
chmodSync(file, 0o755);
|
|
36
|
+
return file;
|
|
37
|
+
}
|
|
38
|
+
export const SCC_HEADER = 'Language,Provider,Filename,Lines,Code,Comments,Blanks,Complexity,Bytes\n';
|
|
39
|
+
export function sccCsv(rows) {
|
|
40
|
+
const body = Object.entries(rows).map(([path, code]) => `TypeScript,${path},x,${code},${code},0,0,0,0\n`);
|
|
41
|
+
return SCC_HEADER + body.join('');
|
|
42
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ClocConfig } from './config.mts';
|
|
2
|
+
/** Decides which tracked paths are counted and which scc targets to hand the binary. */
|
|
3
|
+
export declare function createPathPolicy(config: ClocConfig): {
|
|
4
|
+
isCountedPath: (filePath: string) => boolean;
|
|
5
|
+
shouldCountFile: (filePath: string, trackedFiles: ReadonlySet<string>) => boolean;
|
|
6
|
+
countTargetsFor: (trackedFiles: ReadonlySet<string>) => string[];
|
|
7
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Decides which tracked paths are counted and which scc targets to hand the binary. */
|
|
2
|
+
export function createPathPolicy(config) {
|
|
3
|
+
const { countedRoots, countedRootFiles, ignoredDirs } = config;
|
|
4
|
+
const countAll = countedRoots.length === 0 && countedRootFiles.length === 0;
|
|
5
|
+
const ignored = new Set(ignoredDirs);
|
|
6
|
+
function isCountedPath(filePath) {
|
|
7
|
+
return (countAll ||
|
|
8
|
+
countedRootFiles.includes(filePath) ||
|
|
9
|
+
countedRoots.some((root) => filePath === root || filePath.startsWith(`${root}/`)));
|
|
10
|
+
}
|
|
11
|
+
function isIgnoredPath(filePath) {
|
|
12
|
+
return filePath
|
|
13
|
+
.split('/')
|
|
14
|
+
.slice(0, -1)
|
|
15
|
+
.some((segment) => ignored.has(segment));
|
|
16
|
+
}
|
|
17
|
+
function shouldCountFile(filePath, trackedFiles) {
|
|
18
|
+
return trackedFiles.has(filePath) && isCountedPath(filePath) && !isIgnoredPath(filePath);
|
|
19
|
+
}
|
|
20
|
+
function countTargetsFor(trackedFiles) {
|
|
21
|
+
if (countAll)
|
|
22
|
+
return trackedFiles.size === 0 ? [] : ['.'];
|
|
23
|
+
const files = [...trackedFiles];
|
|
24
|
+
const present = [...new Set([...countedRoots, ...countedRootFiles])].filter((target) => trackedFiles.has(target) || files.some((file) => file.startsWith(`${target}/`)));
|
|
25
|
+
// scc counts a file once per target that reaches it, so drop targets nested under another.
|
|
26
|
+
return present.filter((target) => !present.some((other) => other !== target && target.startsWith(`${other}/`)));
|
|
27
|
+
}
|
|
28
|
+
return { isCountedPath, shouldCountFile, countTargetsFor };
|
|
29
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function normalizePath(filePath: string): string;
|
|
2
|
+
/**
|
|
3
|
+
* Compiles path patterns into one predicate over repository-relative POSIX paths.
|
|
4
|
+
*
|
|
5
|
+
* - No `/` (`*.test.*`, `package.json`): matched against the basename, anywhere in the tree.
|
|
6
|
+
* - Trailing `/` (`docs/`) or a `/` with no glob characters (`docs/api`): the path itself or
|
|
7
|
+
* anything under it.
|
|
8
|
+
* - A `/` with glob characters (`**` + `/tests/**`): a full-path glob. Dotfiles match.
|
|
9
|
+
*/
|
|
10
|
+
export declare function compilePatterns(patterns: readonly string[]): (filePath: string) => boolean;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import picomatch from 'picomatch';
|
|
3
|
+
export function normalizePath(filePath) {
|
|
4
|
+
return filePath.replaceAll(path.sep, '/').replace(/^\.\//u, '');
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Compiles path patterns into one predicate over repository-relative POSIX paths.
|
|
8
|
+
*
|
|
9
|
+
* - No `/` (`*.test.*`, `package.json`): matched against the basename, anywhere in the tree.
|
|
10
|
+
* - Trailing `/` (`docs/`) or a `/` with no glob characters (`docs/api`): the path itself or
|
|
11
|
+
* anything under it.
|
|
12
|
+
* - A `/` with glob characters (`**` + `/tests/**`): a full-path glob. Dotfiles match.
|
|
13
|
+
*/
|
|
14
|
+
export function compilePatterns(patterns) {
|
|
15
|
+
const matchers = patterns.map((pattern) => {
|
|
16
|
+
if (!pattern.includes('/'))
|
|
17
|
+
return picomatch(pattern, { basename: true, dot: true });
|
|
18
|
+
if (picomatch.scan(pattern).isGlob) {
|
|
19
|
+
return picomatch(pattern.endsWith('/') ? `${pattern}**` : pattern, { dot: true });
|
|
20
|
+
}
|
|
21
|
+
const prefix = normalizePath(pattern).replace(/\/+$/u, '');
|
|
22
|
+
return (filePath) => filePath === prefix || filePath.startsWith(`${prefix}/`);
|
|
23
|
+
});
|
|
24
|
+
return (filePath) => matchers.some((matches) => matches(filePath));
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ClocConfig } from './config.mts';
|
|
2
|
+
export type CountedFile = {
|
|
3
|
+
code: number;
|
|
4
|
+
path: string;
|
|
5
|
+
};
|
|
6
|
+
/** One table row: per-category line counts keyed by the configured category names. */
|
|
7
|
+
export type ClocRow = {
|
|
8
|
+
service: string;
|
|
9
|
+
counts: Record<string, number>;
|
|
10
|
+
total: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function buildRows(files: readonly CountedFile[], config: ClocConfig): ClocRow[];
|
|
13
|
+
export declare function formatRows(rows: readonly ClocRow[], config: ClocConfig): string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { createClassifier } from "./classify.mjs";
|
|
2
|
+
export function buildRows(files, config) {
|
|
3
|
+
const classify = createClassifier(config);
|
|
4
|
+
const names = config.categories;
|
|
5
|
+
const blank = (service) => ({
|
|
6
|
+
service,
|
|
7
|
+
counts: { [names.source]: 0, [names.tests]: 0, [names.tooling]: 0 },
|
|
8
|
+
total: 0,
|
|
9
|
+
});
|
|
10
|
+
const rows = new Map(config.services.map((rule) => [rule.name, blank(rule.name)]));
|
|
11
|
+
const total = blank('total');
|
|
12
|
+
for (const file of files) {
|
|
13
|
+
const { category, service } = classify(file.path);
|
|
14
|
+
const label = names[category];
|
|
15
|
+
for (const target of [rows.get(service), total]) {
|
|
16
|
+
target.counts[label] = Number(target.counts[label]) + file.code;
|
|
17
|
+
target.total += file.code;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return [...rows.values(), total];
|
|
21
|
+
}
|
|
22
|
+
export function formatRows(rows, config) {
|
|
23
|
+
const { source, tests, tooling } = config.categories;
|
|
24
|
+
const columns = ['service', source, tests, tooling, 'total'];
|
|
25
|
+
const cell = (row, column) => {
|
|
26
|
+
if (column === 'service')
|
|
27
|
+
return row.service;
|
|
28
|
+
return String(column === 'total' ? row.total : (row.counts[column] ?? 0));
|
|
29
|
+
};
|
|
30
|
+
const table = columns.map((name) => {
|
|
31
|
+
const width = Math.max(name.length, ...rows.map((row) => cell(row, name).length));
|
|
32
|
+
return { name, width };
|
|
33
|
+
});
|
|
34
|
+
const line = (cells) => table
|
|
35
|
+
.map(({ name, width }, index) => index === 0 ? cells(name).padEnd(width) : cells(name).padStart(width))
|
|
36
|
+
.join(' ');
|
|
37
|
+
return [
|
|
38
|
+
line((name) => name),
|
|
39
|
+
table.map(({ width }) => '-'.repeat(width)).join(' '),
|
|
40
|
+
...rows.map((row) => line((name) => cell(row, name))),
|
|
41
|
+
].join('\n');
|
|
42
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CountedFile } from './rows.mts';
|
|
2
|
+
export type SccRun = {
|
|
3
|
+
sccBin: string;
|
|
4
|
+
targets: readonly string[];
|
|
5
|
+
excludedDirs: readonly string[];
|
|
6
|
+
cwd: string;
|
|
7
|
+
keep: (filePath: string) => boolean;
|
|
8
|
+
};
|
|
9
|
+
/** Streams `scc --by-file` CSV and returns the rows `keep` accepts. */
|
|
10
|
+
export declare function readSccFiles(run: SccRun): Promise<CountedFile[]>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { createInterface } from 'node:readline';
|
|
3
|
+
import { parse } from 'csv-parse/sync';
|
|
4
|
+
import { requireSuccess, terminateChild } from "./child-process.mjs";
|
|
5
|
+
import { normalizePath } from "./patterns.mjs";
|
|
6
|
+
function parseRecord(row) {
|
|
7
|
+
const records = parse(row);
|
|
8
|
+
const fields = records.length === 1 ? records[0] : undefined;
|
|
9
|
+
const path = fields?.[1];
|
|
10
|
+
const code = Number(fields?.[4]);
|
|
11
|
+
if (!path || !fields?.[4]?.trim() || !Number.isSafeInteger(code)) {
|
|
12
|
+
throw new Error('Invalid CSV record from scc');
|
|
13
|
+
}
|
|
14
|
+
return { code, path: normalizePath(path) };
|
|
15
|
+
}
|
|
16
|
+
/** Streams `scc --by-file` CSV and returns the rows `keep` accepts. */
|
|
17
|
+
export async function readSccFiles(run) {
|
|
18
|
+
const args = ['--format', 'csv-stream', '--by-file', '--no-cocomo', '--no-complexity'];
|
|
19
|
+
if (run.excludedDirs.length > 0)
|
|
20
|
+
args.push('--exclude-dir', run.excludedDirs.join(','));
|
|
21
|
+
const child = spawn(run.sccBin, [...args, '--', ...run.targets], {
|
|
22
|
+
cwd: run.cwd,
|
|
23
|
+
stdio: ['ignore', 'pipe', 'inherit'],
|
|
24
|
+
});
|
|
25
|
+
const completion = requireSuccess(child, 'scc');
|
|
26
|
+
// A spawn error (ENOENT) can reject before the stream loop reaches `await completion`.
|
|
27
|
+
completion.catch(() => { });
|
|
28
|
+
const files = [];
|
|
29
|
+
const rows = createInterface({ input: child.stdout, crlfDelay: Infinity });
|
|
30
|
+
let sawHeader = false;
|
|
31
|
+
let completed = false;
|
|
32
|
+
try {
|
|
33
|
+
for await (const row of rows) {
|
|
34
|
+
if (!sawHeader) {
|
|
35
|
+
if (!row.startsWith('Language,'))
|
|
36
|
+
throw new Error('Unexpected CSV header from scc');
|
|
37
|
+
sawHeader = true;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
const file = parseRecord(row);
|
|
41
|
+
if (run.keep(file.path))
|
|
42
|
+
files.push(file);
|
|
43
|
+
}
|
|
44
|
+
await completion;
|
|
45
|
+
if (!sawHeader)
|
|
46
|
+
throw new Error('scc produced no CSV header');
|
|
47
|
+
completed = true;
|
|
48
|
+
}
|
|
49
|
+
finally {
|
|
50
|
+
rows.close();
|
|
51
|
+
if (!completed)
|
|
52
|
+
await terminateChild(child, completion);
|
|
53
|
+
}
|
|
54
|
+
return files;
|
|
55
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Streams `git ls-files -z` (every entry is NUL-terminated) so the listing has no size cap. */
|
|
2
|
+
export declare function listTrackedFiles(cwd: string): Promise<Set<string>>;
|
|
3
|
+
/** The repository top level, so a run from a subdirectory still sees repository-relative paths. */
|
|
4
|
+
export declare function gitTopLevel(cwd: string): Promise<string>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { execFile, spawn } from 'node:child_process';
|
|
2
|
+
import { promisify } from 'node:util';
|
|
3
|
+
import { requireSuccess, terminateChild } from "./child-process.mjs";
|
|
4
|
+
import { normalizePath } from "./patterns.mjs";
|
|
5
|
+
/** Streams `git ls-files -z` (every entry is NUL-terminated) so the listing has no size cap. */
|
|
6
|
+
export async function listTrackedFiles(cwd) {
|
|
7
|
+
const child = spawn('git', ['ls-files', '-z'], { cwd, stdio: ['ignore', 'pipe', 'inherit'] });
|
|
8
|
+
const completion = requireSuccess(child, 'git ls-files');
|
|
9
|
+
completion.catch(() => { });
|
|
10
|
+
const files = new Set();
|
|
11
|
+
let remainder = Buffer.alloc(0);
|
|
12
|
+
let completed = false;
|
|
13
|
+
try {
|
|
14
|
+
for await (const chunk of child.stdout) {
|
|
15
|
+
const data = Buffer.concat([remainder, chunk]);
|
|
16
|
+
let start = 0;
|
|
17
|
+
for (;;) {
|
|
18
|
+
const end = data.indexOf(0, start);
|
|
19
|
+
if (end === -1)
|
|
20
|
+
break;
|
|
21
|
+
files.add(normalizePath(data.subarray(start, end).toString('utf8')));
|
|
22
|
+
start = end + 1;
|
|
23
|
+
}
|
|
24
|
+
remainder = data.subarray(start);
|
|
25
|
+
}
|
|
26
|
+
await completion;
|
|
27
|
+
completed = true;
|
|
28
|
+
}
|
|
29
|
+
finally {
|
|
30
|
+
if (!completed)
|
|
31
|
+
await terminateChild(child, completion);
|
|
32
|
+
}
|
|
33
|
+
return files;
|
|
34
|
+
}
|
|
35
|
+
const execFileAsync = promisify(execFile);
|
|
36
|
+
/** The repository top level, so a run from a subdirectory still sees repository-relative paths. */
|
|
37
|
+
export async function gitTopLevel(cwd) {
|
|
38
|
+
const { stdout } = await execFileAsync('git', ['rev-parse', '--show-toplevel'], { cwd });
|
|
39
|
+
return stdout.trim();
|
|
40
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PostgresFaultOptions } from './fault-types.mts';
|
|
2
|
+
export declare function assertFaultOptions(queryMarker: string, options: PostgresFaultOptions): void;
|
|
3
|
+
export declare function queryText(input: unknown): string;
|
|
4
|
+
/** True when `text` starts with the marker and, if given, the command that follows it. */
|
|
5
|
+
export declare function targetsStatement(text: string, queryMarker: string, command?: string): boolean;
|
|
6
|
+
/** The faulted call must be the adapter's plain `{ text }` config, never a callback or submittable. */
|
|
7
|
+
export declare function isPlainTextConfig(args: unknown[]): boolean;
|
|
8
|
+
export declare function ownsRequest(options: PostgresFaultOptions): boolean;
|
|
9
|
+
export declare function installProperty(object: object, key: string, value: unknown): void;
|
|
10
|
+
export declare function restoreProperty(object: object, key: string, descriptor: PropertyDescriptor | undefined): void;
|
|
11
|
+
export declare function hasErrorCode(err: unknown, code: string): err is Error;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// A marker is exactly one leading SQL block comment that holds a name.
|
|
2
|
+
const MARKER_PATTERN = /^\/\* [^*]+ \*\/$/;
|
|
3
|
+
export function assertFaultOptions(queryMarker, options) {
|
|
4
|
+
if (!MARKER_PATTERN.test(queryMarker))
|
|
5
|
+
throw new Error('PostgreSQL fault injection requires an exact leading query annotation');
|
|
6
|
+
if (options.pools.length === 0)
|
|
7
|
+
throw new Error('PostgreSQL fault injection requires at least one pool');
|
|
8
|
+
if (options.endTimeoutMs !== undefined &&
|
|
9
|
+
!(Number.isInteger(options.endTimeoutMs) && options.endTimeoutMs >= 0))
|
|
10
|
+
throw new Error('endTimeoutMs must be a non-negative integer');
|
|
11
|
+
if (options.requestId === undefined)
|
|
12
|
+
return;
|
|
13
|
+
if (options.requestId === '' || options.isOwnedRequest === undefined)
|
|
14
|
+
throw new Error('Request-scoped PostgreSQL faults require a request id and isOwnedRequest');
|
|
15
|
+
}
|
|
16
|
+
export function queryText(input) {
|
|
17
|
+
return typeof input === 'string'
|
|
18
|
+
? input
|
|
19
|
+
: typeof input === 'object' && input !== null && 'text' in input
|
|
20
|
+
? String(input.text)
|
|
21
|
+
: '';
|
|
22
|
+
}
|
|
23
|
+
/** True when `text` starts with the marker and, if given, the command that follows it. */
|
|
24
|
+
export function targetsStatement(text, queryMarker, command) {
|
|
25
|
+
const target = text.trimStart();
|
|
26
|
+
if (!target.startsWith(queryMarker))
|
|
27
|
+
return false;
|
|
28
|
+
return !command || target.slice(queryMarker.length).trimStart().toUpperCase().startsWith(command);
|
|
29
|
+
}
|
|
30
|
+
/** The faulted call must be the adapter's plain `{ text }` config, never a callback or submittable. */
|
|
31
|
+
export function isPlainTextConfig(args) {
|
|
32
|
+
const input = args[0];
|
|
33
|
+
return (args.length === 1 &&
|
|
34
|
+
typeof input === 'object' &&
|
|
35
|
+
input !== null &&
|
|
36
|
+
'text' in input &&
|
|
37
|
+
typeof input.text === 'string' &&
|
|
38
|
+
!('callback' in input) &&
|
|
39
|
+
!('submit' in input) &&
|
|
40
|
+
Object.getPrototypeOf(input) === Object.prototype);
|
|
41
|
+
}
|
|
42
|
+
export function ownsRequest(options) {
|
|
43
|
+
return options.requestId !== undefined && options.isOwnedRequest?.(options.requestId) === true;
|
|
44
|
+
}
|
|
45
|
+
export function installProperty(object, key, value) {
|
|
46
|
+
Object.defineProperty(object, key, {
|
|
47
|
+
configurable: true,
|
|
48
|
+
enumerable: true,
|
|
49
|
+
writable: true,
|
|
50
|
+
value,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
export function restoreProperty(object, key, descriptor) {
|
|
54
|
+
if (descriptor)
|
|
55
|
+
Object.defineProperty(object, key, descriptor);
|
|
56
|
+
else
|
|
57
|
+
Reflect.deleteProperty(object, key);
|
|
58
|
+
}
|
|
59
|
+
export function hasErrorCode(err, code) {
|
|
60
|
+
return err instanceof Error && 'code' in err && err.code === code;
|
|
61
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type pg from 'pg';
|
|
2
|
+
/** Minimal structural query executor: a `pg.Pool#query`, a pool client, or a wrapper around one. */
|
|
3
|
+
export type QueryExecutor = <Row extends object = Record<string, unknown>>(query: {
|
|
4
|
+
text: string;
|
|
5
|
+
values?: unknown[];
|
|
6
|
+
}) => Promise<{
|
|
7
|
+
rows: Row[];
|
|
8
|
+
}>;
|
|
9
|
+
/** Statement kinds a fault can target after the leading marker annotation. */
|
|
10
|
+
export type FaultCommand = 'SELECT' | 'INSERT' | 'UPDATE' | 'DELETE';
|
|
11
|
+
export type PostgresFaultOptions = {
|
|
12
|
+
/** Pools whose connections are instrumented while the operation runs. */
|
|
13
|
+
pools: readonly pg.Pool[];
|
|
14
|
+
/** Only fail a statement whose SQL, after the marker, starts with this command. */
|
|
15
|
+
command?: FaultCommand;
|
|
16
|
+
/** Own faults raised outside the async context of the operation, for example in a request handler. */
|
|
17
|
+
requestId?: string;
|
|
18
|
+
/** Decides whether the current execution context belongs to `requestId`. Required with `requestId`. */
|
|
19
|
+
isOwnedRequest?: (requestId: string) => boolean;
|
|
20
|
+
/** Milliseconds to wait for a failed pool client to finish closing. Defaults to 5000. */
|
|
21
|
+
endTimeoutMs?: number;
|
|
22
|
+
};
|
|
23
|
+
export type PostgresFaultResult<Result> = {
|
|
24
|
+
result: Result;
|
|
25
|
+
error: Error;
|
|
26
|
+
};
|
|
27
|
+
export type PollOptions = {
|
|
28
|
+
/** Milliseconds before an observer gives up. Defaults to 5000. */
|
|
29
|
+
timeoutMs?: number;
|
|
30
|
+
/** Milliseconds between observations. Defaults to 10. */
|
|
31
|
+
intervalMs?: number;
|
|
32
|
+
};
|
|
33
|
+
export type ObserverPool = 'write' | 'advisoryLock' | QueryExecutor;
|
|
34
|
+
export type LockObserverConfig = PollOptions & {
|
|
35
|
+
/** Executor for the default `'write'` observer and for advisory-lock holder lookups. */
|
|
36
|
+
write: QueryExecutor;
|
|
37
|
+
/** Executor for the `'advisoryLock'` observer, usually a pool reserved for observation. */
|
|
38
|
+
advisoryLockPool?: QueryExecutor;
|
|
39
|
+
};
|
|
40
|
+
export type LockWaiterDiagnostic = {
|
|
41
|
+
phase: 'snapshot-clear-start' | 'snapshot-cleared' | 'waiter-query-start' | 'waiter-query';
|
|
42
|
+
waiting: boolean;
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { withPostgresPoolQueryFailureForTest } from './pool-query-failure.mts';
|
|
2
|
+
export { withPostgresQueryFailureForTest } from './query-failure.mts';
|
|
3
|
+
export { createPostgresLockObservers, type PostgresLockObservers } from './lock-observers.mts';
|
|
4
|
+
export { getTestPostgresBackendProcessId } from './lock-wait.mts';
|
|
5
|
+
export type { FaultCommand, LockObserverConfig, LockWaiterDiagnostic, ObserverPool, PollOptions, PostgresFaultOptions, PostgresFaultResult, QueryExecutor, } from './fault-types.mts';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { withPostgresPoolQueryFailureForTest } from "./pool-query-failure.mjs";
|
|
2
|
+
export { withPostgresQueryFailureForTest } from "./query-failure.mjs";
|
|
3
|
+
export { createPostgresLockObservers } from "./lock-observers.mjs";
|
|
4
|
+
export { getTestPostgresBackendProcessId } from "./lock-wait.mjs";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { LockObserverConfig, QueryExecutor } from './fault-types.mts';
|
|
2
|
+
import { waitForBlockedLockChain, waitForLockWaiter } from './lock-waiter.mts';
|
|
3
|
+
type ConfiguredWaiter = (...args: Parameters<typeof waitForLockWaiter> extends [unknown, ...infer Rest] ? Rest : never) => Promise<void>;
|
|
4
|
+
type ConfiguredChain = (...args: Parameters<typeof waitForBlockedLockChain> extends [unknown, ...infer Rest] ? Rest : never) => Promise<void>;
|
|
5
|
+
export type PostgresLockObservers = {
|
|
6
|
+
getTestPostgresBackendProcessId: (query: QueryExecutor) => Promise<number>;
|
|
7
|
+
getTestPostgresAdvisoryLockHolderProcessId: (input: {
|
|
8
|
+
key: string;
|
|
9
|
+
mode?: 'exclusive' | 'shared';
|
|
10
|
+
namespace?: number;
|
|
11
|
+
}) => Promise<number>;
|
|
12
|
+
waitForTestPostgresLockWaiter: ConfiguredWaiter;
|
|
13
|
+
waitForTestPostgresBlockedLockChain: ConfiguredChain;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Binds the lock-wait observers to the executors and timings of one application. Call once in a
|
|
17
|
+
* test setup module and re-export the functions.
|
|
18
|
+
*/
|
|
19
|
+
export declare function createPostgresLockObservers(config: LockObserverConfig): PostgresLockObservers;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getAdvisoryLockHolderProcessId, getTestPostgresBackendProcessId } from "./lock-wait.mjs";
|
|
2
|
+
import { waitForBlockedLockChain, waitForLockWaiter } from "./lock-waiter.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Binds the lock-wait observers to the executors and timings of one application. Call once in a
|
|
5
|
+
* test setup module and re-export the functions.
|
|
6
|
+
*/
|
|
7
|
+
export function createPostgresLockObservers(config) {
|
|
8
|
+
return {
|
|
9
|
+
getTestPostgresBackendProcessId,
|
|
10
|
+
getTestPostgresAdvisoryLockHolderProcessId: (input) => getAdvisoryLockHolderProcessId(config, input),
|
|
11
|
+
waitForTestPostgresLockWaiter: (...args) => waitForLockWaiter(config, ...args),
|
|
12
|
+
waitForTestPostgresBlockedLockChain: (...args) => waitForBlockedLockChain(config, ...args),
|
|
13
|
+
};
|
|
14
|
+
}
|