@orkestrel/capture 0.0.2 → 0.0.4
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.
|
@@ -15,9 +15,9 @@ import type { CaptureStamp } from '@orkestrel/capture';
|
|
|
15
15
|
import type { CaptureStoredManifest } from '@orkestrel/capture';
|
|
16
16
|
import type { CaptureViewport } from '@orkestrel/capture';
|
|
17
17
|
import type { CaptureWarning } from '@orkestrel/capture';
|
|
18
|
+
import type { DuplexInterface } from '@orkestrel/process';
|
|
18
19
|
import type { parseArgs } from 'node:util';
|
|
19
20
|
import type { ParseArgsOptionsConfig } from 'node:util';
|
|
20
|
-
import type { SessionInterface } from '@orkestrel/process';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Answers the runner's discovery request from the wrapper, before the wrapper does any other work.
|
|
@@ -847,7 +847,7 @@ export declare interface CaptureCheckResult {
|
|
|
847
847
|
* const terminate: CaptureChildTerminationHandler = (child) => child.stop()
|
|
848
848
|
* ```
|
|
849
849
|
*/
|
|
850
|
-
export declare type CaptureChildTerminationHandler = (child:
|
|
850
|
+
export declare type CaptureChildTerminationHandler = (child: DuplexInterface) => Promise<boolean>;
|
|
851
851
|
|
|
852
852
|
/**
|
|
853
853
|
* Dispatches capture commands and maps usage and evidence refusals to their exit codes.
|
|
@@ -15,9 +15,9 @@ import type { CaptureStamp } from '@orkestrel/capture';
|
|
|
15
15
|
import type { CaptureStoredManifest } from '@orkestrel/capture';
|
|
16
16
|
import type { CaptureViewport } from '@orkestrel/capture';
|
|
17
17
|
import type { CaptureWarning } from '@orkestrel/capture';
|
|
18
|
+
import type { DuplexInterface } from '@orkestrel/process';
|
|
18
19
|
import type { parseArgs } from 'node:util';
|
|
19
20
|
import type { ParseArgsOptionsConfig } from 'node:util';
|
|
20
|
-
import type { SessionInterface } from '@orkestrel/process';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Answers the runner's discovery request from the wrapper, before the wrapper does any other work.
|
|
@@ -847,7 +847,7 @@ export declare interface CaptureCheckResult {
|
|
|
847
847
|
* const terminate: CaptureChildTerminationHandler = (child) => child.stop()
|
|
848
848
|
* ```
|
|
849
849
|
*/
|
|
850
|
-
export declare type CaptureChildTerminationHandler = (child:
|
|
850
|
+
export declare type CaptureChildTerminationHandler = (child: DuplexInterface) => Promise<boolean>;
|
|
851
851
|
|
|
852
852
|
/**
|
|
853
853
|
* Dispatches capture commands and maps usage and evidence refusals to their exit codes.
|
package/dist/src/server/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { crc32, deflateSync, inflateSync } from "node:zlib";
|
|
|
6
6
|
import { arrayOf, attempt, isArray, isError, isFunction, isRecord, isString, parseJSON, preview } from "@orkestrel/contract";
|
|
7
7
|
import { CAPTURE_LOOKUPS_FILE, CAPTURE_MANIFEST_FILE, CAPTURE_PNG_SIGNATURE, CAPTURE_REGISTRY_FILE, CAPTURE_REQUEST_PREFIX, CAPTURE_VERSION, CaptureError, collectCaptureChanges, collectCaptureDuplicates, describeCaptureDeclaration, describeCaptureDestination, describeCaptureError, describeCaptureIdentity, describeCaptureRequest, isCaptureError, isCaptureGeometry, isCaptureLookupJournal, isCapturePath, isCapturePattern, isCaptureReceipt, isCaptureRegistry, isCaptureRequest, isCaptureRun, isCaptureSegment, isCaptureSelector, isCaptureStoredManifest, matchesCaptureMembers, matchesCaptureSelector, readCaptureDirty, readCaptureReport, requireCaptureUnique, resolveCaptureKey, resolveCaptureOwner, resolveCaptureStatus, resolveLookupKey, validateCaptureReceipt, validateCaptureRun } from "../core/index.js";
|
|
8
8
|
import { pathToFileURL } from "node:url";
|
|
9
|
-
import {
|
|
9
|
+
import { createDuplex, executeSync } from "@orkestrel/process/server";
|
|
10
10
|
import { StringDecoder } from "node:string_decoder";
|
|
11
11
|
import { createTimeout } from "@orkestrel/timeout";
|
|
12
12
|
// src/server/constants.ts
|
|
@@ -3462,7 +3462,7 @@ var CaptureInvocation = class {
|
|
|
3462
3462
|
mkdirSync(this.#directory, { recursive: true });
|
|
3463
3463
|
writeFileSync(log, "");
|
|
3464
3464
|
const environment = Object.fromEntries(Object.entries(process.env).filter(([name]) => name.toLowerCase() !== "CAPTURE".toLowerCase() && name.toLowerCase() !== "CAPTURE_REQUESTS".toLowerCase()));
|
|
3465
|
-
const session =
|
|
3465
|
+
const session = createDuplex({
|
|
3466
3466
|
command: {
|
|
3467
3467
|
file: process.execPath,
|
|
3468
3468
|
arguments: args,
|