@camstack/types 1.2.564 → 1.2.566
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 +15 -0
- package/dist/addon/base-addon.d.ts +6 -0
- package/dist/addon.js +2 -2
- package/dist/addon.mjs +2 -2
- package/dist/automation/recipe.d.ts +156 -3
- package/dist/automation/template-link.d.ts +871 -9
- package/dist/automation/when.d.ts +98 -6
- package/dist/capabilities/migrations.cap.d.ts +1 -0
- package/dist/client.js +0 -3
- package/dist/client.mjs +0 -3
- package/dist/{composed-stable-id-Bp33yrYi.js → composed-stable-id-BzXh1Swk.js} +0 -2
- package/dist/{composed-stable-id-B3wcvtvW.mjs → composed-stable-id-COP6zOXx.mjs} +0 -2
- package/dist/device/device-control-resolution.d.ts +1 -1
- package/dist/device/device-icon.d.ts +0 -1
- package/dist/device/device-type.d.ts +0 -2
- package/dist/device/hero/hero-layout.d.ts +0 -1
- package/dist/device/hero/hero-look.d.ts +0 -6
- package/dist/device/hero/hero-scene.d.ts +0 -1
- package/dist/generated/customize-catalog.d.ts +1 -1
- package/dist/{implemented-methods-CgUBu6uM.mjs → implemented-methods-0xxMOekw.mjs} +1 -1
- package/dist/{implemented-methods-CDYOCn9a.js → implemented-methods-D4F6RWkO.js} +1 -1
- package/dist/index.js +859 -557
- package/dist/index.mjs +848 -558
- package/dist/migrations/addon-migration.d.ts +5 -0
- package/dist/node.js +2 -2
- package/dist/node.mjs +2 -2
- package/dist/{sleep-D7hCDd7y.mjs → sleep-B5XPl2YP.mjs} +16 -3
- package/dist/{sleep-B1IED7ED.js → sleep-mEzgbYFJ.js} +16 -3
- package/dist/template/automation-template.d.ts +1230 -189
- package/package.json +1 -1
|
@@ -77,6 +77,11 @@ export interface AddonMigrationRunOptions {
|
|
|
77
77
|
* untouched, neither started nor reported — a later call runs them.
|
|
78
78
|
*/
|
|
79
79
|
readonly only?: readonly string[];
|
|
80
|
+
/**
|
|
81
|
+
* Ids this owner deliberately REMOVED from its catalogue. They are never run; an applied
|
|
82
|
+
* ledger row of one is reported `applied`, not `skipped-newer`, and raises no alert.
|
|
83
|
+
*/
|
|
84
|
+
readonly retired?: readonly string[];
|
|
80
85
|
}
|
|
81
86
|
/**
|
|
82
87
|
* Offer `migrations` to the engine and run what it says to run, in its order. Never
|
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_composed_stable_id = require("./composed-stable-id-
|
|
25
|
-
const require_implemented_methods = require("./implemented-methods-
|
|
24
|
+
const require_composed_stable_id = require("./composed-stable-id-BzXh1Swk.js");
|
|
25
|
+
const require_implemented_methods = require("./implemented-methods-D4F6RWkO.js");
|
|
26
26
|
let node_crypto = require("node:crypto");
|
|
27
27
|
let node_fs = require("node:fs");
|
|
28
28
|
node_fs = __toESM(node_fs);
|
package/dist/node.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as errMsg } from "./composed-stable-id-
|
|
2
|
-
import { Gn as FFMPEG_RELEASE, Hn as FFMPEG_PATH_ENV, Jn as canonicalHash, Kn as getFfmpegArtifact, Un as chooseFfmpegBinary, Wn as ffmpegBinaryName, Yn as Fmp4BoxSplitter, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, er as buildFfmpegArgs, ir as isSoftwareDecode, qn as getFfmpegDownloadUrl, t as implementedMethodsOf, z as compositionSourceKey } from "./implemented-methods-
|
|
1
|
+
import { s as errMsg } from "./composed-stable-id-COP6zOXx.mjs";
|
|
2
|
+
import { Gn as FFMPEG_RELEASE, Hn as FFMPEG_PATH_ENV, Jn as canonicalHash, Kn as getFfmpegArtifact, Un as chooseFfmpegBinary, Wn as ffmpegBinaryName, Yn as Fmp4BoxSplitter, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, er as buildFfmpegArgs, ir as isSoftwareDecode, qn as getFfmpegDownloadUrl, t as implementedMethodsOf, z as compositionSourceKey } from "./implemented-methods-0xxMOekw.mjs";
|
|
3
3
|
import { createHash, createHmac, randomUUID, timingSafeEqual } from "node:crypto";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import { chmodSync, copyFileSync, createWriteStream, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as EventCategory } from "./event-category-Dv-Gcv1f.mjs";
|
|
2
|
-
import { a as DeviceType, i as DeviceRole, s as errMsg } from "./composed-stable-id-
|
|
2
|
+
import { a as DeviceType, i as DeviceRole, s as errMsg } from "./composed-stable-id-COP6zOXx.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/audio/audio-chunk-format.ts
|
|
5
5
|
/**
|
|
@@ -916,7 +916,8 @@ async function runAddonMigrations(host, migrations, logger, options = {}) {
|
|
|
916
916
|
try {
|
|
917
917
|
declaration = await host.declareOwner({
|
|
918
918
|
owner,
|
|
919
|
-
metas: migrations.map((m) => m.meta)
|
|
919
|
+
metas: migrations.map((m) => m.meta),
|
|
920
|
+
...options.retired === void 0 ? {} : { retired: [...options.retired] }
|
|
920
921
|
});
|
|
921
922
|
} catch (err) {
|
|
922
923
|
log.error("the migration engine refused or could not take this addon catalogue — none ran", { meta: { error: errMsg(err) } });
|
|
@@ -3218,6 +3219,14 @@ var BaseAddon = class {
|
|
|
3218
3219
|
declareRegistrySwitch(spec) {
|
|
3219
3220
|
this.registrySwitchSpec = spec;
|
|
3220
3221
|
}
|
|
3222
|
+
/**
|
|
3223
|
+
* Ids this addon removed from its catalogue on purpose (`declareRetiredMigrations`): sent with
|
|
3224
|
+
* every declaration so the engine does not read their applied rows as a newer database.
|
|
3225
|
+
*/
|
|
3226
|
+
retiredMigrationIds = [];
|
|
3227
|
+
declareRetiredMigrations(ids) {
|
|
3228
|
+
this.retiredMigrationIds = ids;
|
|
3229
|
+
}
|
|
3221
3230
|
registrySwitchSpec = null;
|
|
3222
3231
|
registrySwitchBound() {
|
|
3223
3232
|
const spec = this.registrySwitchSpec;
|
|
@@ -3241,10 +3250,14 @@ var BaseAddon = class {
|
|
|
3241
3250
|
async runBound(declared, options) {
|
|
3242
3251
|
const added = this.registrySwitchBound();
|
|
3243
3252
|
const migrations = [...declared, ...added];
|
|
3244
|
-
const
|
|
3253
|
+
const widened = options?.only === void 0 || added.length === 0 ? options : {
|
|
3245
3254
|
...options,
|
|
3246
3255
|
only: [...options.only, ...added.map((m) => m.meta.id)]
|
|
3247
3256
|
};
|
|
3257
|
+
const phased = this.retiredMigrationIds.length === 0 ? widened ?? {} : {
|
|
3258
|
+
...widened,
|
|
3259
|
+
retired: this.retiredMigrationIds
|
|
3260
|
+
};
|
|
3248
3261
|
const api = this.ctx.api.migrations;
|
|
3249
3262
|
const report = await runAddonMigrations({
|
|
3250
3263
|
declareOwner: (input) => api.declareOwner.mutate(input),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_event_category = require("./event-category-Ps2LC8dN.js");
|
|
2
|
-
const require_composed_stable_id = require("./composed-stable-id-
|
|
2
|
+
const require_composed_stable_id = require("./composed-stable-id-BzXh1Swk.js");
|
|
3
3
|
let zod = require("zod");
|
|
4
4
|
//#region src/audio/audio-chunk-format.ts
|
|
5
5
|
/**
|
|
@@ -916,7 +916,8 @@ async function runAddonMigrations(host, migrations, logger, options = {}) {
|
|
|
916
916
|
try {
|
|
917
917
|
declaration = await host.declareOwner({
|
|
918
918
|
owner,
|
|
919
|
-
metas: migrations.map((m) => m.meta)
|
|
919
|
+
metas: migrations.map((m) => m.meta),
|
|
920
|
+
...options.retired === void 0 ? {} : { retired: [...options.retired] }
|
|
920
921
|
});
|
|
921
922
|
} catch (err) {
|
|
922
923
|
log.error("the migration engine refused or could not take this addon catalogue — none ran", { meta: { error: require_composed_stable_id.errMsg(err) } });
|
|
@@ -3218,6 +3219,14 @@ var BaseAddon = class {
|
|
|
3218
3219
|
declareRegistrySwitch(spec) {
|
|
3219
3220
|
this.registrySwitchSpec = spec;
|
|
3220
3221
|
}
|
|
3222
|
+
/**
|
|
3223
|
+
* Ids this addon removed from its catalogue on purpose (`declareRetiredMigrations`): sent with
|
|
3224
|
+
* every declaration so the engine does not read their applied rows as a newer database.
|
|
3225
|
+
*/
|
|
3226
|
+
retiredMigrationIds = [];
|
|
3227
|
+
declareRetiredMigrations(ids) {
|
|
3228
|
+
this.retiredMigrationIds = ids;
|
|
3229
|
+
}
|
|
3221
3230
|
registrySwitchSpec = null;
|
|
3222
3231
|
registrySwitchBound() {
|
|
3223
3232
|
const spec = this.registrySwitchSpec;
|
|
@@ -3241,10 +3250,14 @@ var BaseAddon = class {
|
|
|
3241
3250
|
async runBound(declared, options) {
|
|
3242
3251
|
const added = this.registrySwitchBound();
|
|
3243
3252
|
const migrations = [...declared, ...added];
|
|
3244
|
-
const
|
|
3253
|
+
const widened = options?.only === void 0 || added.length === 0 ? options : {
|
|
3245
3254
|
...options,
|
|
3246
3255
|
only: [...options.only, ...added.map((m) => m.meta.id)]
|
|
3247
3256
|
};
|
|
3257
|
+
const phased = this.retiredMigrationIds.length === 0 ? widened ?? {} : {
|
|
3258
|
+
...widened,
|
|
3259
|
+
retired: this.retiredMigrationIds
|
|
3260
|
+
};
|
|
3248
3261
|
const api = this.ctx.api.migrations;
|
|
3249
3262
|
const report = await runAddonMigrations({
|
|
3250
3263
|
declareOwner: (input) => api.declareOwner.mutate(input),
|