@camstack/types 1.2.380 → 1.2.382
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/dist/addon.d.ts +2 -0
- package/dist/addon.js +88 -2
- package/dist/addon.mjs +79 -3
- package/dist/capabilities/alerts.cap.d.ts +25 -0
- package/dist/capabilities/battery.cap.d.ts +1 -1
- package/dist/capabilities/caller-stamp.d.ts +4 -3
- package/dist/capabilities/dishwasher.cap.d.ts +178 -0
- package/dist/capabilities/heating-valve.cap.d.ts +39 -0
- package/dist/capabilities/index.d.ts +5 -1
- package/dist/capabilities/storage-admin.cap.d.ts +22 -0
- package/dist/client.js +71 -32
- package/dist/client.mjs +71 -32
- package/dist/{composition-DOwQB_Ua.mjs → composition-CB6PMT9p.mjs} +1 -1
- package/dist/{composition-CUAOHZ38.js → composition-eoYYVfOp.js} +1 -1
- package/dist/device/base-device-provider.d.ts +4 -2
- package/dist/device/device-context.d.ts +2 -0
- package/dist/device/device-control-resolution.d.ts +1 -1
- package/dist/device/device-type.d.ts +5 -1
- package/dist/{err-msg--2RrYiLO.mjs → err-msg-BXKzRBwg.mjs} +4 -0
- package/dist/{err-msg-Bb-s4Xuj.js → err-msg-BhVbr0NX.js} +4 -0
- package/dist/ffmpeg/fmp4-fragment-child.d.ts +2 -2
- package/dist/ffmpeg/process.d.ts +21 -0
- package/dist/generated/addon-api.d.ts +329 -230
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/cap-status-types.d.ts +5 -1
- package/dist/generated/capability-router-map.d.ts +8 -2
- package/dist/generated/device-local-state.d.ts +6 -0
- package/dist/generated/device-proxy.d.ts +6 -0
- package/dist/generated/device-scoped-caps.d.ts +1 -1
- package/dist/generated/history-catalog.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/generated/runtime-state-durability.d.ts +1 -1
- package/dist/helpers/addon-slice-handle.d.ts +4 -0
- package/dist/helpers/trpc-leaf.d.ts +17 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +431 -68
- package/dist/index.mjs +413 -67
- package/dist/interfaces/addon-peer-bytes.d.ts +19 -2
- package/dist/interfaces/config-ui-secrets.d.ts +2 -0
- package/dist/interfaces/config-ui.d.ts +14 -0
- package/dist/node.d.ts +2 -2
- package/dist/node.js +6 -2
- package/dist/node.mjs +6 -3
- package/dist/records/in-memory-records.d.ts +21 -0
- package/dist/records/index.d.ts +3 -0
- package/dist/records/settings-array-adopts-from.d.ts +12 -0
- package/dist/records/settings-brokers-adopts-from.d.ts +10 -0
- package/dist/{sleep-CIGOw58l.js → sleep--L6qY125.js} +572 -47
- package/dist/{sleep-WsrozGDL.mjs → sleep-BOjuyoPC.mjs} +489 -48
- package/package.json +1 -1
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
* handle. A caller that minted an offer per frame would exhaust the outstanding
|
|
63
63
|
* bound inside a second and be refused by name.
|
|
64
64
|
*/
|
|
65
|
-
import type { IncomingMessage
|
|
65
|
+
import type { IncomingMessage } from 'node:http';
|
|
66
66
|
import type { Readable } from 'node:stream';
|
|
67
67
|
import { z } from 'zod';
|
|
68
68
|
/**
|
|
@@ -145,7 +145,23 @@ export interface PeerBytesOfferOptions {
|
|
|
145
145
|
readonly declaredBytes?: number;
|
|
146
146
|
readonly ttlMs?: number;
|
|
147
147
|
}
|
|
148
|
-
|
|
148
|
+
type PeerBytesResponseEvent = 'close' | 'drain' | 'data';
|
|
149
|
+
/** Minimal `ServerResponse` surface peer-bytes producers write through. */
|
|
150
|
+
export interface PeerBytesHandlerResponse {
|
|
151
|
+
readonly headersSent: boolean;
|
|
152
|
+
readonly writable: boolean;
|
|
153
|
+
readonly destroyed: boolean;
|
|
154
|
+
readonly writableEnded: boolean;
|
|
155
|
+
writeHead(statusCode: number, statusMessage?: string, headers?: Record<string, string>): this;
|
|
156
|
+
writeHead(statusCode: number, headers?: Record<string, string>): this;
|
|
157
|
+
write(chunk: Uint8Array | string): boolean;
|
|
158
|
+
end(cb?: () => void): this;
|
|
159
|
+
destroy(err?: Error): this;
|
|
160
|
+
on(event: PeerBytesResponseEvent, listener: (...args: readonly unknown[]) => void): this;
|
|
161
|
+
once(event: 'close' | 'drain', listener: () => void): this;
|
|
162
|
+
off(event: 'close' | 'drain', listener: () => void): this;
|
|
163
|
+
}
|
|
164
|
+
export type PeerBytesHandler = (req: IncomingMessage, res: PeerBytesHandlerResponse) => void | Promise<void>;
|
|
149
165
|
/** A buffer the producer already holds, written out in bounded chunks. */
|
|
150
166
|
export interface PeerBytesBufferOffer {
|
|
151
167
|
readonly bytes: Buffer;
|
|
@@ -242,3 +258,4 @@ export interface AddonPeerBytes {
|
|
|
242
258
|
offerFile(options: PeerBytesFileOffer): Promise<PeerBytesOfferResult>;
|
|
243
259
|
open(ticket: PeerBytesTicket): Promise<PeerBytesOpenResult>;
|
|
244
260
|
}
|
|
261
|
+
export {};
|
|
@@ -51,6 +51,8 @@ export declare function collectSecretConfigKeys(schema: unknown): ReadonlySet<st
|
|
|
51
51
|
* blobs (see {@link isKeychainStoredField}). What a form sends as
|
|
52
52
|
* `secretKeys` so the owner's door knows which values to keep out of the blob.
|
|
53
53
|
*/
|
|
54
|
+
/** Drop fields marked `omitFromSettings` before an integration settings write. */
|
|
55
|
+
export declare function omitTransientConfig(schema: unknown, config: Record<string, unknown>): Record<string, unknown>;
|
|
54
56
|
export declare function collectKeychainStoredKeys(schema: unknown): ReadonlySet<string>;
|
|
55
57
|
/**
|
|
56
58
|
* True when the value is a readable schema declaring at least one field of any
|
|
@@ -143,6 +143,11 @@ export interface ConfigFieldBase {
|
|
|
143
143
|
readonly default?: unknown;
|
|
144
144
|
readonly span?: 1 | 2 | 3 | 4;
|
|
145
145
|
readonly showWhen?: ConfigCondition;
|
|
146
|
+
/**
|
|
147
|
+
* The value is only for an in-form action (a sign-in). It is not written
|
|
148
|
+
* into the integration settings.
|
|
149
|
+
*/
|
|
150
|
+
readonly omitFromSettings?: boolean;
|
|
146
151
|
/**
|
|
147
152
|
* The field's stored value is a CREDENTIAL and must never leave the process
|
|
148
153
|
* on a read surface. Redaction machinery keys off
|
|
@@ -942,6 +947,11 @@ export interface ConfigAddonActionButtonField extends ConfigFieldBase {
|
|
|
942
947
|
/** Toast/inline success message template. `{key}` placeholders are
|
|
943
948
|
* resolved against the action result. */
|
|
944
949
|
successMessage?: string;
|
|
950
|
+
/**
|
|
951
|
+
* After a successful action, copy string fields from the result into form
|
|
952
|
+
* keys (e.g. pairing writes `sslCertificate` without showing PEM fields).
|
|
953
|
+
*/
|
|
954
|
+
assignResult?: Readonly<Record<string, string>>;
|
|
945
955
|
/** Confirmation prompt before executing. */
|
|
946
956
|
confirmMessage?: string;
|
|
947
957
|
}
|
|
@@ -1144,3 +1154,7 @@ export interface HydrateSchemaOptions {
|
|
|
1144
1154
|
readonly inlineSecretsAsViews?: boolean;
|
|
1145
1155
|
}
|
|
1146
1156
|
export declare function hydrateSchema(schema: ConfigUISchema, values: Record<string, unknown>, options?: HydrateSchemaOptions): ConfigUISchemaWithValues;
|
|
1157
|
+
/** Strip inline `value` from a hydrated field for schema-only round-trips. */
|
|
1158
|
+
export declare function dehydrateConfigField(field: ConfigFieldWithValue): ConfigField;
|
|
1159
|
+
/** Inverse of {@link hydrateSchema} — drops resolved values from every leaf field. */
|
|
1160
|
+
export declare function dehydrateSchema(schema: ConfigUISchemaWithValues): ConfigUISchema;
|
package/dist/node.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ export type { Fmp4FragmentChildArgs, Fmp4FragmentChildDeps, } from './ffmpeg/fmp
|
|
|
10
10
|
export { Fmp4FragmentChild } from './ffmpeg/fmp4-fragment-child.js';
|
|
11
11
|
export type { Fmp4CloseReason, Fmp4Packet, Fmp4PrebufferOptions, Fmp4PrebufferStats, Fmp4SubscribeInput, Fmp4SubscriberInfo, Fmp4Subscription, } from './ffmpeg/fmp4-fragment-plane.js';
|
|
12
12
|
export { Fmp4FragmentPlane } from './ffmpeg/fmp4-fragment-plane.js';
|
|
13
|
-
export type { FfmpegExit, FfmpegExitClass, FfmpegProcessOptions } from './ffmpeg/process.js';
|
|
14
|
-
export { FfmpegProcess } from './ffmpeg/process.js';
|
|
13
|
+
export type { FfmpegExit, FfmpegExitClass, FfmpegProcessOptions, FfmpegSpawnFn, SpawnedFfmpegProcess, } from './ffmpeg/process.js';
|
|
14
|
+
export { defaultFfmpegSpawn, FfmpegProcess } from './ffmpeg/process.js';
|
|
15
15
|
export type { FfmpegArgvSpawn, PinnedFfmpegSpawnAnswer } from './ffmpeg/pinned-spawn.js';
|
|
16
16
|
export { NO_PINNED_FFMPEG_DETAIL, pinnedFfmpegSpawner, resolvePinnedFfmpegSpawner, } from './ffmpeg/pinned-spawn.js';
|
|
17
17
|
export type { ChildCostClaimHandle, ChildCostClaimInput, ProcStatReader, } from './process/child-cost-registry.js';
|
package/dist/node.js
CHANGED
|
@@ -21,8 +21,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
enumerable: true
|
|
22
22
|
}) : target, mod));
|
|
23
23
|
//#endregion
|
|
24
|
-
const require_composition = require("./composition-
|
|
25
|
-
const require_err_msg = require("./err-msg-
|
|
24
|
+
const require_composition = require("./composition-eoYYVfOp.js");
|
|
25
|
+
const require_err_msg = require("./err-msg-BhVbr0NX.js");
|
|
26
26
|
let node_crypto = require("node:crypto");
|
|
27
27
|
let node_fs = require("node:fs");
|
|
28
28
|
node_fs = __toESM(node_fs);
|
|
@@ -1410,6 +1410,9 @@ var Fmp4FragmentPlane = class {
|
|
|
1410
1410
|
* that also owned the bytes would need a mode per consumer, which is the same
|
|
1411
1411
|
* mistake as one builder per consumer.
|
|
1412
1412
|
*/
|
|
1413
|
+
function defaultFfmpegSpawn(command, args, options) {
|
|
1414
|
+
return (0, node_child_process.spawn)(command, args, options ?? {});
|
|
1415
|
+
}
|
|
1413
1416
|
var DEFAULT_FIRST_DATA_TIMEOUT_MS = 8e3;
|
|
1414
1417
|
var DEFAULT_RESTART_DELAY_MS = 1e3;
|
|
1415
1418
|
var DEFAULT_STABLE_RUN_MS = 3e4;
|
|
@@ -2285,6 +2288,7 @@ exports.canonicalDeviceFingerprint = canonicalDeviceFingerprint;
|
|
|
2285
2288
|
exports.canonicalHash = require_composition.canonicalHash;
|
|
2286
2289
|
exports.containsOrEquals = containsOrEquals;
|
|
2287
2290
|
exports.customizationBlockName = customizationBlockName;
|
|
2291
|
+
exports.defaultFfmpegSpawn = defaultFfmpegSpawn;
|
|
2288
2292
|
exports.diffExportTargets = diffExportTargets;
|
|
2289
2293
|
exports.downloadBinary = downloadBinary;
|
|
2290
2294
|
exports.ensureBinary = ensureBinary;
|
package/dist/node.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { At as Fmp4BoxSplitter, Ct as FFMPEG_PATH_ENV, Dt as getFfmpegArtifact, Et as FFMPEG_RELEASE, Ot as getFfmpegDownloadUrl, P as compositionSourceKey, Pt as buildFfmpegArgs, Rt as isSoftwareDecode, Tt as ffmpegBinaryName, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, kt as canonicalHash, wt as chooseFfmpegBinary } from "./composition-
|
|
2
|
-
import { t as errMsg } from "./err-msg
|
|
1
|
+
import { At as Fmp4BoxSplitter, Ct as FFMPEG_PATH_ENV, Dt as getFfmpegArtifact, Et as FFMPEG_RELEASE, Ot as getFfmpegDownloadUrl, P as compositionSourceKey, Pt as buildFfmpegArgs, Rt as isSoftwareDecode, Tt as ffmpegBinaryName, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, kt as canonicalHash, wt as chooseFfmpegBinary } from "./composition-CB6PMT9p.mjs";
|
|
2
|
+
import { t as errMsg } from "./err-msg-BXKzRBwg.mjs";
|
|
3
3
|
import { createHash, createHmac, randomUUID, timingSafeEqual } from "node:crypto";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import { chmodSync, createWriteStream, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
@@ -1387,6 +1387,9 @@ var Fmp4FragmentPlane = class {
|
|
|
1387
1387
|
* that also owned the bytes would need a mode per consumer, which is the same
|
|
1388
1388
|
* mistake as one builder per consumer.
|
|
1389
1389
|
*/
|
|
1390
|
+
function defaultFfmpegSpawn(command, args, options) {
|
|
1391
|
+
return spawn(command, args, options ?? {});
|
|
1392
|
+
}
|
|
1390
1393
|
var DEFAULT_FIRST_DATA_TIMEOUT_MS = 8e3;
|
|
1391
1394
|
var DEFAULT_RESTART_DELAY_MS = 1e3;
|
|
1392
1395
|
var DEFAULT_STABLE_RUN_MS = 3e4;
|
|
@@ -2247,4 +2250,4 @@ function resolveExportFingerprint(input) {
|
|
|
2247
2250
|
return input.persisted ?? input.fresh;
|
|
2248
2251
|
}
|
|
2249
2252
|
//#endregion
|
|
2250
|
-
export { ChildCostRegistry, FFMPEG_RELEASE, FfmpegProcess, FilesystemStorageProvider, Fmp4FragmentChild, Fmp4FragmentPlane, NO_COST_CLAIM, NO_PINNED_FFMPEG_DETAIL, OwnerOnlyError, PYTHON_VERSION, buildBinaryPath, canonicalDeviceFingerprint, canonicalHash, containsOrEquals, customizationBlockName, diffExportTargets, downloadBinary, ensureBinary, ensureFfmpeg, ensurePython, findInPath, getFfmpegArtifact, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, icaclsArgs, installPythonPackages, installPythonRequirements, mkdirOwnerOnlySync, nodeProcStatReader, parseFfmpegCapabilities, parseProcCpuSeconds, parseProcRssBytes, physicalRootOf, pinnedFfmpegSpawner, probeFfmpegBinary, readProcessCost, resolveExportFingerprint, resolvePinnedFfmpegSpawner, restrictDirToOwnerSync, restrictFileToOwnerSync, signExpiringUrl, verifyExpiringUrl, writeFileAtomic, writeOwnerOnlyFileSync };
|
|
2253
|
+
export { ChildCostRegistry, FFMPEG_RELEASE, FfmpegProcess, FilesystemStorageProvider, Fmp4FragmentChild, Fmp4FragmentPlane, NO_COST_CLAIM, NO_PINNED_FFMPEG_DETAIL, OwnerOnlyError, PYTHON_VERSION, buildBinaryPath, canonicalDeviceFingerprint, canonicalHash, containsOrEquals, customizationBlockName, defaultFfmpegSpawn, diffExportTargets, downloadBinary, ensureBinary, ensureFfmpeg, ensurePython, findInPath, getFfmpegArtifact, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, icaclsArgs, installPythonPackages, installPythonRequirements, mkdirOwnerOnlySync, nodeProcStatReader, parseFfmpegCapabilities, parseProcCpuSeconds, parseProcRssBytes, physicalRootOf, pinnedFfmpegSpawner, probeFfmpegBinary, readProcessCost, resolveExportFingerprint, resolvePinnedFfmpegSpawner, restrictDirToOwnerSync, restrictFileToOwnerSync, signExpiringUrl, verifyExpiringUrl, writeFileAtomic, writeOwnerOnlyFileSync };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type RecordsAccess } from './records-access.js';
|
|
2
|
+
interface StoredRow {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly at: number | null;
|
|
5
|
+
readonly rev: number;
|
|
6
|
+
readonly updatedAt: number;
|
|
7
|
+
readonly data: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
export interface InMemoryRecords {
|
|
10
|
+
readonly records: RecordsAccess;
|
|
11
|
+
readonly tables: ReadonlyMap<string, ReadonlyMap<string, StoredRow>>;
|
|
12
|
+
seed(kind: string, row: {
|
|
13
|
+
id: string;
|
|
14
|
+
at?: number;
|
|
15
|
+
data: Record<string, unknown>;
|
|
16
|
+
}): void;
|
|
17
|
+
failWrites(on: boolean): void;
|
|
18
|
+
failReads(on: boolean): void;
|
|
19
|
+
}
|
|
20
|
+
export declare function makeInMemoryRecords(owner?: string): InMemoryRecords;
|
|
21
|
+
export {};
|
package/dist/records/index.d.ts
CHANGED
|
@@ -4,3 +4,6 @@ export * from './record-kind.js';
|
|
|
4
4
|
export * from './secret-paths.js';
|
|
5
5
|
export * from './records-access.js';
|
|
6
6
|
export * from './entry-kind.js';
|
|
7
|
+
export * from './settings-brokers-adopts-from.js';
|
|
8
|
+
export * from './settings-array-adopts-from.js';
|
|
9
|
+
export { makeInMemoryRecords, type InMemoryRecords } from './in-memory-records.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legacy source for entry adoption (B3): a list stored under addon-settings
|
|
3
|
+
* `<addonId>.<key>` until records-adopt copies rows into the entry kind.
|
|
4
|
+
*/
|
|
5
|
+
export declare const SETTINGS_ARRAY_ADOPTS_PREFIX = "@settings-array/";
|
|
6
|
+
/** The `adoptsFrom` value for an addon-settings array field. */
|
|
7
|
+
export declare function settingsArrayAdoptsFrom(addonId: string, settingsKey: string): string;
|
|
8
|
+
/** When non-null, `from` names an addon-settings array blob, not a SQL table. */
|
|
9
|
+
export declare function parseSettingsArrayAdoptsFrom(from: string): {
|
|
10
|
+
readonly addonId: string;
|
|
11
|
+
readonly settingsKey: string;
|
|
12
|
+
} | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legacy source for broker entry adoption (B2): brokers live in addon-settings
|
|
3
|
+
* as one row `<addonId>.brokers` whose value is an array until records-adopt
|
|
4
|
+
* copies them into the entry kind.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SETTINGS_BROKERS_ADOPTS_PREFIX = "@settings-brokers/";
|
|
7
|
+
/** The `adoptsFrom` value for an addon's broker entry kind. */
|
|
8
|
+
export declare function settingsBrokersAdoptsFrom(addonId: string): string;
|
|
9
|
+
/** When non-null, `from` names an addon-settings brokers blob, not a SQL table. */
|
|
10
|
+
export declare function parseSettingsBrokersAdoptsFrom(from: string): string | null;
|