@popcraft/cli 0.9.5 → 0.9.7
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/popcraft.mjs +48 -6
- package/package.json +2 -2
package/dist/popcraft.mjs
CHANGED
|
@@ -1173,7 +1173,7 @@ function operations(spec = openapi) {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
async function call(target2, method, path, opts = {}) {
|
|
1175
1175
|
const qs = new URLSearchParams(opts.query ?? {}).toString();
|
|
1176
|
-
const headers = { "user-agent": `popcraft-cli/${"0.9.
|
|
1176
|
+
const headers = { "user-agent": `popcraft-cli/${"0.9.7"}`, ...opts.headers };
|
|
1177
1177
|
if (target2.token) headers.authorization = `Bearer ${target2.token}`;
|
|
1178
1178
|
if (opts.contentType) headers["content-type"] = opts.contentType;
|
|
1179
1179
|
try {
|
|
@@ -90237,7 +90237,6 @@ function repairDocumentPaints(doc2) {
|
|
|
90237
90237
|
var broken;
|
|
90238
90238
|
var init_paint_repair = __esm({
|
|
90239
90239
|
"lib/document/paint-repair.ts"() {
|
|
90240
|
-
"use strict";
|
|
90241
90240
|
init_shader_graph();
|
|
90242
90241
|
broken = (p2) => {
|
|
90243
90242
|
if (!p2 || typeof p2 !== "object") return false;
|
|
@@ -90356,6 +90355,21 @@ var init_idb_keyval = __esm({
|
|
|
90356
90355
|
}
|
|
90357
90356
|
});
|
|
90358
90357
|
|
|
90358
|
+
// lib/storage/open-connections.ts
|
|
90359
|
+
function holdsIndexedDB(close) {
|
|
90360
|
+
closers.add(close);
|
|
90361
|
+
return () => {
|
|
90362
|
+
closers.delete(close);
|
|
90363
|
+
};
|
|
90364
|
+
}
|
|
90365
|
+
var closers;
|
|
90366
|
+
var init_open_connections = __esm({
|
|
90367
|
+
"lib/storage/open-connections.ts"() {
|
|
90368
|
+
"use strict";
|
|
90369
|
+
closers = /* @__PURE__ */ new Set();
|
|
90370
|
+
}
|
|
90371
|
+
});
|
|
90372
|
+
|
|
90359
90373
|
// lib/storage/idb.ts
|
|
90360
90374
|
function open3(dbName, storeName, version6) {
|
|
90361
90375
|
return new Promise((resolve6, reject) => {
|
|
@@ -90377,12 +90391,19 @@ function createStore(dbName, storeName) {
|
|
|
90377
90391
|
let db3 = null;
|
|
90378
90392
|
const connect2 = () => db3 ??= open3(dbName, storeName).then(
|
|
90379
90393
|
(conn) => {
|
|
90394
|
+
const release = holdsIndexedDB(() => {
|
|
90395
|
+
conn.close();
|
|
90396
|
+
db3 = null;
|
|
90397
|
+
release();
|
|
90398
|
+
});
|
|
90380
90399
|
conn.onversionchange = () => {
|
|
90381
90400
|
conn.close();
|
|
90382
90401
|
db3 = null;
|
|
90402
|
+
release();
|
|
90383
90403
|
};
|
|
90384
90404
|
conn.onclose = () => {
|
|
90385
90405
|
db3 = null;
|
|
90406
|
+
release();
|
|
90386
90407
|
};
|
|
90387
90408
|
return conn;
|
|
90388
90409
|
},
|
|
@@ -90397,6 +90418,7 @@ var fallback, defaultStore, get2, set3, setMany2, getMany2, update2, del2, delMa
|
|
|
90397
90418
|
var init_idb = __esm({
|
|
90398
90419
|
"lib/storage/idb.ts"() {
|
|
90399
90420
|
init_idb_keyval();
|
|
90421
|
+
init_open_connections();
|
|
90400
90422
|
init_idb_keyval();
|
|
90401
90423
|
fallback = null;
|
|
90402
90424
|
defaultStore = () => fallback ??= createStore("keyval-store", "keyval");
|
|
@@ -91516,6 +91538,7 @@ function relinkCopies(doc2, copies) {
|
|
|
91516
91538
|
var TEXT_PATH_SOURCE_TYPES, isPathSource;
|
|
91517
91539
|
var init_text_links = __esm({
|
|
91518
91540
|
"lib/document/text-links.ts"() {
|
|
91541
|
+
"use strict";
|
|
91519
91542
|
init_transform();
|
|
91520
91543
|
TEXT_PATH_SOURCE_TYPES = ["VECTOR", "ELLIPSE", "RECTANGLE", "POLYGON", "STAR", "LINE", "ARROW", "FRAME"];
|
|
91521
91544
|
isPathSource = (n) => !!n && TEXT_PATH_SOURCE_TYPES.includes(n.type);
|
|
@@ -92227,6 +92250,7 @@ function isAutoLayout(node2) {
|
|
|
92227
92250
|
}
|
|
92228
92251
|
var init_auto_layout = __esm({
|
|
92229
92252
|
"lib/document/auto-layout.ts"() {
|
|
92253
|
+
"use strict";
|
|
92230
92254
|
init_instance_layout();
|
|
92231
92255
|
setLayoutEngine(applyAutoLayout);
|
|
92232
92256
|
}
|
|
@@ -95171,6 +95195,7 @@ function layerInputPatch(node2, name2, path) {
|
|
|
95171
95195
|
var NO_RUNTIME, MAX_DEPTH, freshIndex, indexOf, isComponentLike, selfStarting, startedAt, endMemo, HOST_OWNS, rootTracksMemo, layerMemo, idle;
|
|
95172
95196
|
var init_instances2 = __esm({
|
|
95173
95197
|
"lib/motion/instances.ts"() {
|
|
95198
|
+
"use strict";
|
|
95174
95199
|
init_node_delta();
|
|
95175
95200
|
init_instances();
|
|
95176
95201
|
init_scene_graph();
|
|
@@ -95442,6 +95467,7 @@ function repairStateMachine(raw, markerIds, hasNode) {
|
|
|
95442
95467
|
var STATE_MACHINE_INPUT_TYPES, STATE_MACHINE_GUARD_OPS, STATE_MACHINE_ACTION_TYPES, STATE_MACHINE_LISTENER_TYPES, isKeyListener, ANY_STATE, MAX_STEPS2, byId2, sortedValues, machineOf, startValue, isObj3, finite4, isValue, goodId;
|
|
95443
95468
|
var init_state_machine = __esm({
|
|
95444
95469
|
"lib/motion/state-machine.ts"() {
|
|
95470
|
+
"use strict";
|
|
95445
95471
|
STATE_MACHINE_INPUT_TYPES = ["boolean", "number", "string", "event"];
|
|
95446
95472
|
STATE_MACHINE_GUARD_OPS = ["eq", "neq", "gt", "gte", "lt", "lte"];
|
|
95447
95473
|
STATE_MACHINE_ACTION_TYPES = ["set", "toggle", "increment", "decrement", "fire", "reset"];
|
|
@@ -239622,6 +239648,7 @@ function repairCompositions(comps, nodes) {
|
|
|
239622
239648
|
var isObj5, finite6, optFinite, isVec2, TIMELINE_COLOR_IDS, TIMELINE_COLORS, UNITS, ORDERS, PROP_KEYS, ANIMATOR_ID, MOTION_TYPES, TRANSITIONS, isFraction, MEDIA_HASH;
|
|
239623
239649
|
var init_invariants = __esm({
|
|
239624
239650
|
"lib/motion/invariants.ts"() {
|
|
239651
|
+
"use strict";
|
|
239625
239652
|
init_easing();
|
|
239626
239653
|
init_properties();
|
|
239627
239654
|
init_markers();
|
|
@@ -240592,6 +240619,7 @@ function fillPhotoFrame(doc2, groupId, imageUrl, size6, name2 = "Photo", credit)
|
|
|
240592
240619
|
var isPhotoFrame;
|
|
240593
240620
|
var init_photo_frames = __esm({
|
|
240594
240621
|
"lib/document/photo-frames.ts"() {
|
|
240622
|
+
"use strict";
|
|
240595
240623
|
init_dist_node();
|
|
240596
240624
|
init_scene_graph();
|
|
240597
240625
|
init_types();
|
|
@@ -244145,6 +244173,7 @@ function resizeWindow(doc2, target2, rect) {
|
|
|
244145
244173
|
}
|
|
244146
244174
|
var init_crop = __esm({
|
|
244147
244175
|
"lib/editor/crop.ts"() {
|
|
244176
|
+
"use strict";
|
|
244148
244177
|
init_dist_node();
|
|
244149
244178
|
init_scene_graph();
|
|
244150
244179
|
init_photo_frames();
|
|
@@ -247667,6 +247696,7 @@ fn shade(uv: vec2<f32>, res: vec2<f32>, tm: f32) -> vec4<f32> {
|
|
|
247667
247696
|
var SHADER_PRESETS, shaderPreset, legacyPresetOf, DEFAULT_SHADER_PRESET, DEFAULT_TEXTURE_PARAMS, f, vec4, NOISE_LIB;
|
|
247668
247697
|
var init_shader_presets = __esm({
|
|
247669
247698
|
"lib/engine/shader-presets.ts"() {
|
|
247699
|
+
"use strict";
|
|
247670
247700
|
init_shader_graph();
|
|
247671
247701
|
init_shader_graph_presets();
|
|
247672
247702
|
init_shader_presets_legacy();
|
|
@@ -252007,6 +252037,7 @@ function retuneShaderAudio(node2, fillId) {
|
|
|
252007
252037
|
}
|
|
252008
252038
|
var init_shader_audio = __esm({
|
|
252009
252039
|
"lib/motion/shader-audio.ts"() {
|
|
252040
|
+
"use strict";
|
|
252010
252041
|
init_shader_params();
|
|
252011
252042
|
init_modifier_edit();
|
|
252012
252043
|
init_keys();
|
|
@@ -263216,6 +263247,7 @@ var init_client = __esm({
|
|
|
263216
263247
|
init_encoding();
|
|
263217
263248
|
init_decoding();
|
|
263218
263249
|
init_y_indexeddb();
|
|
263250
|
+
init_open_connections();
|
|
263219
263251
|
init_legacy_migration();
|
|
263220
263252
|
init_protocol();
|
|
263221
263253
|
CollabClient = class {
|
|
@@ -263244,8 +263276,13 @@ var init_client = __esm({
|
|
|
263244
263276
|
this.onUnload = () => {
|
|
263245
263277
|
removeAwarenessStates(this.awareness, [this.ydoc.clientID], "unload");
|
|
263246
263278
|
};
|
|
263279
|
+
this.releaseIndexedDB = () => {
|
|
263280
|
+
};
|
|
263247
263281
|
this.role = opts.role ?? null;
|
|
263248
263282
|
this.persistence = new IndexeddbPersistence(`popcraft-ydoc:${opts.key}`, this.ydoc);
|
|
263283
|
+
this.releaseIndexedDB = holdsIndexedDB(() => {
|
|
263284
|
+
void this.persistence.destroy();
|
|
263285
|
+
});
|
|
263249
263286
|
this.ydoc.on("update", (update3, origin) => {
|
|
263250
263287
|
if (origin === this || !this.ws || this.ws.readyState !== WebSocket.OPEN || !this.canWrite()) return;
|
|
263251
263288
|
const enc2 = createEncoder();
|
|
@@ -263439,6 +263476,7 @@ var init_client = __esm({
|
|
|
263439
263476
|
if (type === MSG_AWARENESS) applyAwarenessUpdate(this.awareness, readVarUint8Array(dec), this);
|
|
263440
263477
|
}
|
|
263441
263478
|
destroy() {
|
|
263479
|
+
this.releaseIndexedDB();
|
|
263442
263480
|
this.destroyed = true;
|
|
263443
263481
|
if (this.reconnectTimer) clearTimeout(this.reconnectTimer);
|
|
263444
263482
|
if (this.refreshTimer) clearInterval(this.refreshTimer);
|
|
@@ -301719,6 +301757,7 @@ async function createFreshFileOrExplain(place4 = {}, seed2 = {}) {
|
|
|
301719
301757
|
var online, goesLocal;
|
|
301720
301758
|
var init_new_file = __esm({
|
|
301721
301759
|
"lib/client/cloud/new-file.ts"() {
|
|
301760
|
+
"use strict";
|
|
301722
301761
|
init_scene_graph();
|
|
301723
301762
|
init_print_pages();
|
|
301724
301763
|
init_page_presets();
|
|
@@ -302226,7 +302265,6 @@ function startCloudSync() {
|
|
|
302226
302265
|
var status, readOnlyDoc, activeLink, statusListeners, notice, urlArmed, opening, syncStatus, canEdit, uploaded, MEDIA_UPLOAD_PARALLEL, pushTimer, pushing, dirty, pendingMedia, collab, collabSession, collabAnonymous, uploadedThumbs, thumbCheckedAt, THUMB_EVERY_MS, putThumbnail, openingFiles, mediaHealed, started;
|
|
302227
302266
|
var init_sync2 = __esm({
|
|
302228
302267
|
"lib/client/cloud/sync.ts"() {
|
|
302229
|
-
"use strict";
|
|
302230
302268
|
init_paint_repair();
|
|
302231
302269
|
init_migrate();
|
|
302232
302270
|
init_view();
|
|
@@ -303476,6 +303514,7 @@ function applyTextPath(layout2, path, tp, rebase = true) {
|
|
|
303476
303514
|
var defaultCircleRadius, ownsPath, mapPoint;
|
|
303477
303515
|
var init_text_path = __esm({
|
|
303478
303516
|
"lib/engine/text/text-path.ts"() {
|
|
303517
|
+
"use strict";
|
|
303479
303518
|
init_scene_graph();
|
|
303480
303519
|
init_transform();
|
|
303481
303520
|
init_shape_to_path();
|
|
@@ -303593,6 +303632,7 @@ function areaBounds(rings) {
|
|
|
303593
303632
|
}
|
|
303594
303633
|
var init_text_area = __esm({
|
|
303595
303634
|
"lib/engine/text/text-area.ts"() {
|
|
303635
|
+
"use strict";
|
|
303596
303636
|
}
|
|
303597
303637
|
});
|
|
303598
303638
|
|
|
@@ -308689,7 +308729,6 @@ function agentToolList() {
|
|
|
308689
308729
|
var AGENT_CAPABILITIES, legacyCommandId, legacyTools, blobToDataUrl3, provided, legacyTool, legacyToolList;
|
|
308690
308730
|
var init_agent = __esm({
|
|
308691
308731
|
"lib/commands/agent.ts"() {
|
|
308692
|
-
"use strict";
|
|
308693
308732
|
init_types5();
|
|
308694
308733
|
init_registry();
|
|
308695
308734
|
init_errors();
|
|
@@ -317223,7 +317262,7 @@ var init_package = __esm({
|
|
|
317223
317262
|
"packages/runtime/package.json"() {
|
|
317224
317263
|
package_default = {
|
|
317225
317264
|
name: "@popcraft/runtime",
|
|
317226
|
-
version: "0.9.
|
|
317265
|
+
version: "0.9.7",
|
|
317227
317266
|
description: "What code exported from PopCraft shares: the meaning of expressions (operators and functions) and, as it grows, the parts of a design's behaviour that are common code rather than generated React.",
|
|
317228
317267
|
license: "MIT",
|
|
317229
317268
|
homepage: "https://popcraft.app/docs/exporting/nextjs",
|
|
@@ -349421,6 +349460,7 @@ function designRecorder() {
|
|
|
349421
349460
|
var installed;
|
|
349422
349461
|
var init_recorders = __esm({
|
|
349423
349462
|
"lib/agent/design-script/recorders.ts"() {
|
|
349463
|
+
"use strict";
|
|
349424
349464
|
installed = null;
|
|
349425
349465
|
}
|
|
349426
349466
|
});
|
|
@@ -349447,6 +349487,7 @@ function designFrameOf(doc2, id3) {
|
|
|
349447
349487
|
}
|
|
349448
349488
|
var init_locate = __esm({
|
|
349449
349489
|
"lib/agent/design-script/locate.ts"() {
|
|
349490
|
+
"use strict";
|
|
349450
349491
|
}
|
|
349451
349492
|
});
|
|
349452
349493
|
|
|
@@ -349685,6 +349726,7 @@ function placeDesign(doc2, built, source3, size6, name2, at3) {
|
|
|
349685
349726
|
var DESIGN_NAMESPACES, DERIVED2, templateOfBuild;
|
|
349686
349727
|
var init_build3 = __esm({
|
|
349687
349728
|
"lib/agent/design-script/build.ts"() {
|
|
349729
|
+
"use strict";
|
|
349688
349730
|
init_hash();
|
|
349689
349731
|
init_scene_graph();
|
|
349690
349732
|
init_libraries();
|
|
@@ -397785,7 +397827,7 @@ init_resources();
|
|
|
397785
397827
|
init_desktop();
|
|
397786
397828
|
init_hypery();
|
|
397787
397829
|
import { createInterface } from "node:readline";
|
|
397788
|
-
var VERSION2 = "0.9.
|
|
397830
|
+
var VERSION2 = "0.9.7";
|
|
397789
397831
|
var HELP = `popcraft ${VERSION2} \u2014 the PopCraft command line
|
|
397790
397832
|
|
|
397791
397833
|
Files (headless, on .popcraft files):
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@popcraft/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.7",
|
|
4
4
|
"description": "The PopCraft command line: edit .popcraft files headlessly, call the REST API, publish to the marketplace and manage the desktop app's local plugins, themes, fonts, skills and agents.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://popcraft.app/docs/api/cli",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"esbuild": "0.28.2"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@popcraft/kit": "0.9.
|
|
37
|
+
"@popcraft/kit": "0.9.7"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "node build.mjs",
|