@vosjs/cli 0.65.3 → 0.65.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.
@@ -4,12 +4,12 @@ import {
4
4
  localManifestRefs,
5
5
  pullManifest,
6
6
  uploadManifest
7
- } from "./chunk-7CIAU4QP.js";
8
- import "./chunk-WVQAZTYU.js";
7
+ } from "./chunk-63KINQOJ.js";
8
+ import "./chunk-UQLC4BEZ.js";
9
9
  export {
10
10
  hostedLiteralWarnings,
11
11
  localManifestRefs,
12
12
  pullManifest,
13
13
  uploadManifest
14
14
  };
15
- //# sourceMappingURL=assetManifest-RQYJYQ7Q.js.map
15
+ //# sourceMappingURL=assetManifest-RDHHKAAM.js.map
@@ -9,7 +9,7 @@ import {
9
9
  manifestRefs,
10
10
  nameForType,
11
11
  resolveMediaType
12
- } from "./chunk-WVQAZTYU.js";
12
+ } from "./chunk-UQLC4BEZ.js";
13
13
 
14
14
  // src/plugin/assetManifest.ts
15
15
  import {
@@ -700,4 +700,4 @@ export {
700
700
  pullManifest,
701
701
  hostedLiteralWarnings
702
702
  };
703
- //# sourceMappingURL=chunk-7CIAU4QP.js.map
703
+ //# sourceMappingURL=chunk-63KINQOJ.js.map
@@ -9,7 +9,7 @@ import {
9
9
  reencodeStill,
10
10
  renderStill,
11
11
  videoFormat
12
- } from "./chunk-DU3ANWU4.js";
12
+ } from "./chunk-TYGDQEEI.js";
13
13
  import {
14
14
  PREV_DOC_NAME,
15
15
  RECORDING_NAME,
@@ -33,7 +33,7 @@ import {
33
33
  uploadDocRefs,
34
34
  uploadManifest,
35
35
  writeJson
36
- } from "./chunk-7CIAU4QP.js";
36
+ } from "./chunk-63KINQOJ.js";
37
37
  import {
38
38
  CREDENTIALS_PATH,
39
39
  MEDIA_HEAD_BYTES,
@@ -44,6 +44,7 @@ import {
44
44
  clientId,
45
45
  containerMismatch,
46
46
  deriveSlug,
47
+ detailLine,
47
48
  formatChanges,
48
49
  hasFlag,
49
50
  hostedAssetId,
@@ -64,7 +65,7 @@ import {
64
65
  strFlag,
65
66
  writeCredential,
66
67
  writeSyncState
67
- } from "./chunk-WVQAZTYU.js";
68
+ } from "./chunk-UQLC4BEZ.js";
68
69
  import {
69
70
  deadLine,
70
71
  deadWarns
@@ -7128,16 +7129,6 @@ async function api(ctx, path, init) {
7128
7129
  const r = await apiJson(ctx.origin, `/api${path}`, { ...init, key: ctx.key });
7129
7130
  return { status: r.status, json: r.body };
7130
7131
  }
7131
- function detailLine(body) {
7132
- const details = body.details;
7133
- if (!Array.isArray(details) || !details.length) return "";
7134
- const lines = details.map((d) => {
7135
- const path = Array.isArray(d.path) ? d.path.join(".") : "";
7136
- return `${path ? `${path}: ` : ""}${String(d.message ?? JSON.stringify(d))}`;
7137
- });
7138
- return `
7139
- ${lines.join("\n ")}`;
7140
- }
7141
7132
  function printChanges(r, changes, protectedIds) {
7142
7133
  if (Array.isArray(changes)) {
7143
7134
  for (const entry of changes) {
@@ -7641,6 +7632,7 @@ import { existsSync as existsSync13, realpathSync } from "fs";
7641
7632
  function isLocalName(value) {
7642
7633
  if (/^(https?:|data:|blob:|asset:|media:)/.test(value)) return false;
7643
7634
  if (value.startsWith("$")) return false;
7635
+ if (value.startsWith("<svg") || value.startsWith("<?xml")) return false;
7644
7636
  if (value.startsWith("/")) return existsSync13(value);
7645
7637
  return true;
7646
7638
  }
@@ -9154,14 +9146,15 @@ async function cmdDelete(argv) {
9154
9146
  });
9155
9147
  if (res.status !== 200 && res.status !== 204)
9156
9148
  throw new Error(apiError(`delete ${vosId}`, res));
9149
+ const tracking = dir ?? trackingCwd(vosId);
9157
9150
  let unlinked = false;
9158
- if (dir) {
9159
- rmSync2(join16(dir, SYNC_STATE_NAME), { force: true });
9151
+ if (tracking) {
9152
+ rmSync2(join16(tracking, SYNC_STATE_NAME), { force: true });
9160
9153
  unlinked = true;
9161
9154
  }
9162
9155
  const trashed = res.body.trashed === true;
9163
9156
  const restoreUntil = typeof res.body.restoreUntil === "string" ? res.body.restoreUntil : null;
9164
- const tail = unlinked ? `; ${dir} no longer tracks it` : "";
9157
+ const tail = unlinked ? `; ${dir ?? "this directory"} no longer tracks it` : "";
9165
9158
  r.done(
9166
9159
  {
9167
9160
  id: vosId,
@@ -9179,6 +9172,11 @@ async function cmdDelete(argv) {
9179
9172
  );
9180
9173
  return EXIT_OK;
9181
9174
  }
9175
+ function trackingCwd(vosId) {
9176
+ const cwd = process.cwd();
9177
+ if (!existsSync15(join16(cwd, SYNC_STATE_NAME))) return null;
9178
+ return readSyncState(cwd)?.vosId === vosId ? cwd : null;
9179
+ }
9182
9180
 
9183
9181
  // src/plugin/buildProgram.ts
9184
9182
  import { readFileSync as readFileSync4, writeFileSync as writeFileSync2 } from "fs";
@@ -15095,4 +15093,4 @@ export {
15095
15093
  verbHelp,
15096
15094
  run
15097
15095
  };
15098
- //# sourceMappingURL=chunk-CODEEH2Z.js.map
15096
+ //# sourceMappingURL=chunk-IDPTF5PP.js.map