@telepath-computer/television 0.1.12 → 0.1.14
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/browser/assets/index-CJHYp4Ch.js +397 -0
- package/dist/browser/index.html +1 -1
- package/dist/cli.cjs +21 -6
- package/dist/electron.cjs +21 -6
- package/package.json +1 -1
- package/dist/browser/assets/index-Dm8R9oqd.js +0 -396
package/dist/browser/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Television</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/index-
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-CJHYp4Ch.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="./assets/index-CmOTsDN-.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body></body>
|
package/dist/cli.cjs
CHANGED
|
@@ -77795,7 +77795,11 @@ function migrateWorkspaceJson(raw) {
|
|
|
77795
77795
|
return true;
|
|
77796
77796
|
}
|
|
77797
77797
|
if ("artifactIDs" in raw && Array.isArray(raw.artifactIDs)) {
|
|
77798
|
-
raw.layout = raw.artifactIDs.map((id) => ({
|
|
77798
|
+
raw.layout = raw.artifactIDs.map((id) => ({
|
|
77799
|
+
artifactID: id,
|
|
77800
|
+
width: DEFAULT_COLS,
|
|
77801
|
+
height: DEFAULT_ROWS
|
|
77802
|
+
}));
|
|
77799
77803
|
delete raw.artifactIDs;
|
|
77800
77804
|
return true;
|
|
77801
77805
|
}
|
|
@@ -77930,7 +77934,10 @@ var ServerStore = class extends EventTarget {
|
|
|
77930
77934
|
throw new Error(`Artifact not linked to workspace: ${input.artifactID}`);
|
|
77931
77935
|
}
|
|
77932
77936
|
this.artifacts.delete(input.artifactID);
|
|
77933
|
-
workspace.layout = removeArtifactFromLayout(
|
|
77937
|
+
workspace.layout = removeArtifactFromLayout(
|
|
77938
|
+
workspace.layout,
|
|
77939
|
+
input.artifactID
|
|
77940
|
+
);
|
|
77934
77941
|
this.persistWorkspace(workspace);
|
|
77935
77942
|
this.deleteArtifactFile(input.artifactID);
|
|
77936
77943
|
this.dispatchEvent(
|
|
@@ -77969,7 +77976,9 @@ var ServerStore = class extends EventTarget {
|
|
|
77969
77976
|
nextFields.name = input.fields.name;
|
|
77970
77977
|
}
|
|
77971
77978
|
if (Array.isArray(input.fields.layout)) {
|
|
77972
|
-
workspace.layout = input.fields.layout.map(
|
|
77979
|
+
workspace.layout = input.fields.layout.map(
|
|
77980
|
+
(node) => structuredClone(node)
|
|
77981
|
+
);
|
|
77973
77982
|
nextFields.layout = workspace.layout;
|
|
77974
77983
|
}
|
|
77975
77984
|
this.persistWorkspace(workspace);
|
|
@@ -78016,14 +78025,18 @@ var ServerStore = class extends EventTarget {
|
|
|
78016
78025
|
const raw = this.readJsonFile(filePath);
|
|
78017
78026
|
if (!raw || typeof raw !== "object") continue;
|
|
78018
78027
|
const renamedLegacyFields = migrateWorkspaceJson(raw);
|
|
78019
|
-
const { workspace, migrated } = deserializeWorkspaceData(
|
|
78028
|
+
const { workspace, migrated } = deserializeWorkspaceData(
|
|
78029
|
+
raw
|
|
78030
|
+
);
|
|
78020
78031
|
this.workspaces.set(workspace.id, workspace);
|
|
78021
78032
|
if (renamedLegacyFields || migrated) {
|
|
78022
78033
|
this.persistWorkspace(workspace);
|
|
78023
78034
|
}
|
|
78024
78035
|
}
|
|
78025
78036
|
for (const file2 of this.readEntityFiles(this.artifactsDir)) {
|
|
78026
|
-
const artifact = this.readJsonFile(
|
|
78037
|
+
const artifact = this.readJsonFile(
|
|
78038
|
+
import_node_path4.default.join(this.artifactsDir, file2)
|
|
78039
|
+
);
|
|
78027
78040
|
if (!artifact) continue;
|
|
78028
78041
|
this.artifacts.set(artifact.id, artifact);
|
|
78029
78042
|
}
|
|
@@ -78077,7 +78090,9 @@ var ServerStore = class extends EventTarget {
|
|
|
78077
78090
|
(0, import_node_fs3.rmSync)(import_node_path4.default.join(this.artifactsDir, `${artifactID}.json`), { force: true });
|
|
78078
78091
|
}
|
|
78079
78092
|
deleteWorkspaceFile(workspaceID) {
|
|
78080
|
-
(0, import_node_fs3.rmSync)(import_node_path4.default.join(this.workspacesDir, `${workspaceID}.json`), {
|
|
78093
|
+
(0, import_node_fs3.rmSync)(import_node_path4.default.join(this.workspacesDir, `${workspaceID}.json`), {
|
|
78094
|
+
force: true
|
|
78095
|
+
});
|
|
78081
78096
|
}
|
|
78082
78097
|
get workspacesDir() {
|
|
78083
78098
|
return import_node_path4.default.join(this.dataDir, "workspaces");
|
package/dist/electron.cjs
CHANGED
|
@@ -74083,7 +74083,11 @@ function migrateWorkspaceJson(raw) {
|
|
|
74083
74083
|
return true;
|
|
74084
74084
|
}
|
|
74085
74085
|
if ("artifactIDs" in raw && Array.isArray(raw.artifactIDs)) {
|
|
74086
|
-
raw.layout = raw.artifactIDs.map((id) => ({
|
|
74086
|
+
raw.layout = raw.artifactIDs.map((id) => ({
|
|
74087
|
+
artifactID: id,
|
|
74088
|
+
width: DEFAULT_COLS,
|
|
74089
|
+
height: DEFAULT_ROWS
|
|
74090
|
+
}));
|
|
74087
74091
|
delete raw.artifactIDs;
|
|
74088
74092
|
return true;
|
|
74089
74093
|
}
|
|
@@ -74218,7 +74222,10 @@ var ServerStore = class extends EventTarget {
|
|
|
74218
74222
|
throw new Error(`Artifact not linked to workspace: ${input.artifactID}`);
|
|
74219
74223
|
}
|
|
74220
74224
|
this.artifacts.delete(input.artifactID);
|
|
74221
|
-
workspace.layout = removeArtifactFromLayout(
|
|
74225
|
+
workspace.layout = removeArtifactFromLayout(
|
|
74226
|
+
workspace.layout,
|
|
74227
|
+
input.artifactID
|
|
74228
|
+
);
|
|
74222
74229
|
this.persistWorkspace(workspace);
|
|
74223
74230
|
this.deleteArtifactFile(input.artifactID);
|
|
74224
74231
|
this.dispatchEvent(
|
|
@@ -74257,7 +74264,9 @@ var ServerStore = class extends EventTarget {
|
|
|
74257
74264
|
nextFields.name = input.fields.name;
|
|
74258
74265
|
}
|
|
74259
74266
|
if (Array.isArray(input.fields.layout)) {
|
|
74260
|
-
workspace.layout = input.fields.layout.map(
|
|
74267
|
+
workspace.layout = input.fields.layout.map(
|
|
74268
|
+
(node) => structuredClone(node)
|
|
74269
|
+
);
|
|
74261
74270
|
nextFields.layout = workspace.layout;
|
|
74262
74271
|
}
|
|
74263
74272
|
this.persistWorkspace(workspace);
|
|
@@ -74304,14 +74313,18 @@ var ServerStore = class extends EventTarget {
|
|
|
74304
74313
|
const raw = this.readJsonFile(filePath);
|
|
74305
74314
|
if (!raw || typeof raw !== "object") continue;
|
|
74306
74315
|
const renamedLegacyFields = migrateWorkspaceJson(raw);
|
|
74307
|
-
const { workspace, migrated } = deserializeWorkspaceData(
|
|
74316
|
+
const { workspace, migrated } = deserializeWorkspaceData(
|
|
74317
|
+
raw
|
|
74318
|
+
);
|
|
74308
74319
|
this.workspaces.set(workspace.id, workspace);
|
|
74309
74320
|
if (renamedLegacyFields || migrated) {
|
|
74310
74321
|
this.persistWorkspace(workspace);
|
|
74311
74322
|
}
|
|
74312
74323
|
}
|
|
74313
74324
|
for (const file2 of this.readEntityFiles(this.artifactsDir)) {
|
|
74314
|
-
const artifact = this.readJsonFile(
|
|
74325
|
+
const artifact = this.readJsonFile(
|
|
74326
|
+
import_node_path3.default.join(this.artifactsDir, file2)
|
|
74327
|
+
);
|
|
74315
74328
|
if (!artifact) continue;
|
|
74316
74329
|
this.artifacts.set(artifact.id, artifact);
|
|
74317
74330
|
}
|
|
@@ -74365,7 +74378,9 @@ var ServerStore = class extends EventTarget {
|
|
|
74365
74378
|
(0, import_node_fs2.rmSync)(import_node_path3.default.join(this.artifactsDir, `${artifactID}.json`), { force: true });
|
|
74366
74379
|
}
|
|
74367
74380
|
deleteWorkspaceFile(workspaceID) {
|
|
74368
|
-
(0, import_node_fs2.rmSync)(import_node_path3.default.join(this.workspacesDir, `${workspaceID}.json`), {
|
|
74381
|
+
(0, import_node_fs2.rmSync)(import_node_path3.default.join(this.workspacesDir, `${workspaceID}.json`), {
|
|
74382
|
+
force: true
|
|
74383
|
+
});
|
|
74369
74384
|
}
|
|
74370
74385
|
get workspacesDir() {
|
|
74371
74386
|
return import_node_path3.default.join(this.dataDir, "workspaces");
|