@uniformdev/cli 20.70.0 → 20.71.0

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.
@@ -5,9 +5,9 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
5
5
  throw Error('Dynamic require of "' + x + '" is not supported');
6
6
  });
7
7
 
8
- // ../../node_modules/.pnpm/tsup@8.3.0_@microsoft+api-extractor@7.43.2_postcss@8.5.3_tsx@4.20.5_typescript@5.9.2/node_modules/tsup/assets/esm_shims.js
9
- import { fileURLToPath } from "url";
8
+ // ../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.58.9_@types+node@26.0.0__jiti@2.7.0_postcss@8.5.1_7017c7d2ba4cec51f3116591eb787c26/node_modules/tsup/assets/esm_shims.js
10
9
  import path from "path";
10
+ import { fileURLToPath } from "url";
11
11
  var getFilename = () => fileURLToPath(import.meta.url);
12
12
  var getDirname = () => path.dirname(getFilename());
13
13
  var __dirname = /* @__PURE__ */ getDirname();
@@ -22,7 +22,7 @@ import { fetch as undiciFetch, ProxyAgent } from "undici";
22
22
  // package.json
23
23
  var package_default = {
24
24
  name: "@uniformdev/cli",
25
- version: "20.70.0",
25
+ version: "20.71.0",
26
26
  description: "Uniform command line interface tool",
27
27
  license: "SEE LICENSE IN LICENSE.txt",
28
28
  main: "./cli.js",
@@ -47,7 +47,7 @@ var package_default = {
47
47
  format: 'prettier --write "src/**/*.{js,ts,tsx}"'
48
48
  },
49
49
  dependencies: {
50
- "@inquirer/prompts": "^7.10.1",
50
+ "@inquirer/prompts": "^8.5.2",
51
51
  "@thi.ng/mime": "^2.2.23",
52
52
  "@uniformdev/assets": "workspace:*",
53
53
  "@uniformdev/canvas": "workspace:*",
@@ -58,40 +58,39 @@ var package_default = {
58
58
  "@uniformdev/richtext": "workspace:*",
59
59
  "call-bind": "^1.0.2",
60
60
  colorette: "2.0.20",
61
- cosmiconfig: "9.0.0",
61
+ cosmiconfig: "9.0.2",
62
62
  "cosmiconfig-typescript-loader": "5.0.0",
63
- diff: "^8.0.3",
64
- dotenv: "^16.4.7",
65
- esbuild: "0.25.0",
63
+ diff: "^9.0.0",
64
+ dotenv: "^17.4.2",
65
+ esbuild: "0.28.1",
66
66
  execa: "5.1.1",
67
- "file-type": "^21.3.2",
67
+ "file-type": "^22.0.1",
68
68
  "fs-jetpack": "5.1.0",
69
- graphql: "16.9.0",
70
- "graphql-request": "6.1.0",
69
+ graphql: "17.0.1",
70
+ "graphql-request": "7.4.0",
71
71
  "image-size": "2.0.2",
72
- "isomorphic-git": "1.35.0",
73
- "js-yaml": "^4.1.0",
72
+ "isomorphic-git": "1.38.5",
73
+ "js-yaml": "^4.2.0",
74
74
  jsonwebtoken: "9.0.3",
75
75
  mitt: "^3.0.1",
76
76
  "normalize-newline": "^4.1.0",
77
- open: "10.2.0",
78
- ora: "8.0.1",
77
+ open: "11.0.0",
78
+ ora: "9.4.0",
79
79
  "p-queue": "7.3.4",
80
- "posthog-node": "5.28.5",
80
+ "posthog-node": "5.38.2",
81
81
  "registry-auth-token": "^5.0.0",
82
82
  "registry-url": "^6.0.0",
83
- slugify: "1.6.6",
84
- svix: "^1.71.0",
85
- undici: "^7.24.0",
86
- yargs: "^17.6.2",
87
- zod: "4.3.6"
83
+ slugify: "1.6.9",
84
+ svix: "^1.96.0",
85
+ undici: "^7.28.0",
86
+ yargs: "^18.0.0",
87
+ zod: "4.4.3"
88
88
  },
89
89
  devDependencies: {
90
- "@types/diff": "^8.0.0",
91
90
  "@types/js-yaml": "4.0.9",
92
- "@types/jsonwebtoken": "9.0.5",
93
- "@types/node": "24.3.1",
94
- "@types/yargs": "17.0.32"
91
+ "@types/jsonwebtoken": "9.0.10",
92
+ "@types/node": "26.0.0",
93
+ "@types/yargs": "17.0.35"
95
94
  },
96
95
  bin: {
97
96
  uniform: "./cli.js"
@@ -1,4 +1,4 @@
1
- import "./chunk-Y24BXGPK.mjs";
1
+ import "./chunk-S4RUE6II.mjs";
2
2
 
3
3
  // src/sync/allSerializableEntitiesConfig.ts
4
4
  var allSerializableEntitiesConfig = {
package/dist/index.mjs CHANGED
@@ -21,7 +21,7 @@ import {
21
21
  withFormatOptions,
22
22
  withProjectOptions,
23
23
  withTeamOptions
24
- } from "./chunk-Y24BXGPK.mjs";
24
+ } from "./chunk-S4RUE6II.mjs";
25
25
 
26
26
  // src/index.ts
27
27
  import * as dotenv from "dotenv";
@@ -628,6 +628,9 @@ export default uniformConfig({
628
628
  `;
629
629
 
630
630
  // src/sync/fileSyncEngineDataSource.ts
631
+ function isErrorWithCode(error, code) {
632
+ return typeof error === "object" && error !== null && "code" in error && error.code === code;
633
+ }
631
634
  async function createFileSyncEngineDataSource({
632
635
  directory,
633
636
  format = "yaml",
@@ -688,7 +691,7 @@ ${e?.message}`));
688
691
  }
689
692
  await unlink(providerId);
690
693
  },
691
- writeObject: async (object4) => {
694
+ writeObject: async (object4, existingObject) => {
692
695
  const filename = selectFilename3 ? join(directory, `${selectFilename3(object4.object)}.${format}`) : getFullFilename(object4.id);
693
696
  let contents = object4.object;
694
697
  if (selectSchemaUrl2) {
@@ -701,6 +704,18 @@ ${e?.message}`));
701
704
  console.log(`Writing file ${filename}`);
702
705
  }
703
706
  emitWithFormat(contents, format, filename);
707
+ if (existingObject?.providerId && existingObject.providerId !== filename) {
708
+ if (verbose) {
709
+ console.log(`Deleting file ${existingObject.providerId}`);
710
+ }
711
+ try {
712
+ await unlink(existingObject.providerId);
713
+ } catch (error) {
714
+ if (!isErrorWithCode(error, "ENOENT")) {
715
+ throw error;
716
+ }
717
+ }
718
+ }
704
719
  }
705
720
  };
706
721
  }
@@ -724,6 +739,7 @@ function writeUniformPackage(filename, packageContents) {
724
739
  // src/sync/syncEngine.ts
725
740
  import { diffJson, diffLines } from "diff";
726
741
  import mitt from "mitt";
742
+ import PQueue from "p-queue";
727
743
 
728
744
  // src/sync/serializedDequal.ts
729
745
  var has = Object.prototype.hasOwnProperty;
@@ -790,7 +806,8 @@ async function syncEngine({
790
806
  onBeforeProcessObject,
791
807
  onBeforeCompareObjects,
792
808
  onBeforeWriteObject,
793
- onError
809
+ onError,
810
+ actionConcurrency
794
811
  //verbose = false,
795
812
  }) {
796
813
  const status = new ReactiveStatusUpdate((status2) => syncEngineEvents.emit("statusUpdate", status2));
@@ -839,43 +856,46 @@ async function syncEngine({
839
856
  const ids = Array.isArray(sourceObject.id) ? sourceObject.id : [sourceObject.id];
840
857
  const targetObject = targetItems.get(ids[0]);
841
858
  status.compared++;
842
- const invalidTargetObjects = ids.map((i) => targetItems.get(i)).filter((o) => o?.object !== targetObject?.object);
859
+ const invalidTargetObjects = ids.map((i) => targetItems.get(i)).filter(
860
+ (invalidTargetObject) => typeof invalidTargetObject !== "undefined" && invalidTargetObject.object !== targetObject?.object
861
+ );
862
+ const targetIds = Array.isArray(targetObject?.id) ? targetObject.id : [targetObject?.id];
863
+ const processedIds = new Set([...ids, ...targetIds].filter((id) => typeof id === "string"));
864
+ const processUpdate = async (sourceObject2, targetObject2) => {
865
+ try {
866
+ if (!whatIf) {
867
+ const finalSourceObject = onBeforeWriteObject ? await onBeforeWriteObject(sourceObject2, targetObject2) : sourceObject2;
868
+ await target.writeObject(finalSourceObject, targetObject2);
869
+ status.changesApplied++;
870
+ }
871
+ } catch (e) {
872
+ if (onError) {
873
+ onError(e, sourceObject2);
874
+ } else {
875
+ throw new SyncEngineError(e, sourceObject2);
876
+ }
877
+ } finally {
878
+ log2({
879
+ action: "update",
880
+ id: ids[0],
881
+ providerId: sourceObject2.providerId,
882
+ displayName: sourceObject2.displayName ?? sourceObject2.providerId,
883
+ whatIf,
884
+ diff: () => diffJson(targetObject2.object, sourceObject2.object)
885
+ });
886
+ }
887
+ };
843
888
  if (targetObject && invalidTargetObjects.length === 0) {
844
889
  sourceObject = onBeforeCompareObjects ? await onBeforeCompareObjects(sourceObject, targetObject) : sourceObject;
845
890
  const compareResult = compareContents(sourceObject, targetObject);
846
891
  if (!compareResult) {
847
892
  if (mode === "createOrUpdate" || mode === "mirror") {
848
893
  status.changeCount++;
849
- const process2 = async (sourceObject2, targetObject2) => {
850
- try {
851
- if (!whatIf) {
852
- const finalSourceObject = onBeforeWriteObject ? await onBeforeWriteObject(sourceObject2, targetObject2) : sourceObject2;
853
- await target.writeObject(finalSourceObject, targetObject2);
854
- status.changesApplied++;
855
- }
856
- } catch (e) {
857
- if (onError) {
858
- onError(e, sourceObject2);
859
- } else {
860
- throw new SyncEngineError(e, sourceObject2);
861
- }
862
- } finally {
863
- log2({
864
- action: "update",
865
- id: ids[0],
866
- providerId: sourceObject2.providerId,
867
- displayName: sourceObject2.displayName ?? sourceObject2.providerId,
868
- whatIf,
869
- diff: () => diffJson(targetObject2.object, sourceObject2.object)
870
- });
871
- }
872
- };
873
- actions.push(() => process2(sourceObject, targetObject));
894
+ actions.push(() => processUpdate(sourceObject, targetObject));
874
895
  }
875
896
  }
876
- ids.forEach((i) => targetItems.delete(i));
897
+ processedIds.forEach((i) => targetItems.delete(i));
877
898
  } else {
878
- status.changeCount++;
879
899
  const processUpsert = async (sourceObject2, id) => {
880
900
  try {
881
901
  if (!whatIf) {
@@ -901,38 +921,73 @@ async function syncEngine({
901
921
  }
902
922
  };
903
923
  if (invalidTargetObjects.length > 0) {
924
+ if (mode === "createOrUpdate" && !targetObject && invalidTargetObjects.length === 1) {
925
+ const matchedTargetObject = invalidTargetObjects[0];
926
+ sourceObject = onBeforeCompareObjects ? await onBeforeCompareObjects(sourceObject, matchedTargetObject) : sourceObject;
927
+ const compareResult = compareContents(sourceObject, matchedTargetObject);
928
+ if (!compareResult) {
929
+ status.changeCount++;
930
+ actions.push(() => processUpdate(sourceObject, matchedTargetObject));
931
+ }
932
+ (Array.isArray(matchedTargetObject.id) ? matchedTargetObject.id : [matchedTargetObject.id]).forEach(
933
+ (i) => targetItems.delete(i)
934
+ );
935
+ continue;
936
+ }
937
+ if (mode !== "mirror") {
938
+ continue;
939
+ }
940
+ status.changeCount++;
904
941
  [...invalidTargetObjects, targetObject].forEach((o) => {
905
942
  (Array.isArray(o?.id) ? o?.id : [o?.id])?.forEach((i) => i && targetItems.delete(i));
906
943
  });
907
- const deletes = invalidTargetObjects.filter((invalidTargetObject) => typeof invalidTargetObject !== "undefined").map((invalidTargetObject) => () => processDelete(invalidTargetObject));
944
+ const deletes = invalidTargetObjects.map(
945
+ (invalidTargetObject) => () => processDelete(invalidTargetObject)
946
+ );
908
947
  if (targetObject) {
909
948
  deletes.push(() => processDelete(targetObject));
910
949
  }
911
- actions.push(
912
- () => Promise.all(deletes.map((deleteFn) => deleteFn())).then(() => processUpsert(sourceObject, ids[0]))
913
- );
950
+ actions.push(async () => {
951
+ for (const deleteFn of deletes) {
952
+ await deleteFn();
953
+ }
954
+ await processUpsert(sourceObject, ids[0]);
955
+ });
914
956
  } else {
957
+ status.changeCount++;
915
958
  actions.push(() => processUpsert(sourceObject, ids[0]));
916
959
  }
917
960
  }
918
961
  }
919
- status.changeCount += targetItems.size;
920
- status.compared += targetItems.size;
962
+ const orphanTargetObjects = new Set(targetItems.values());
921
963
  if (mode === "mirror") {
922
- if (!sourceHasItems && !allowEmptySource && targetItems.size > 0) {
964
+ status.changeCount += orphanTargetObjects.size;
965
+ status.compared += orphanTargetObjects.size;
966
+ if (!sourceHasItems && !allowEmptySource && orphanTargetObjects.size > 0) {
923
967
  throw new Error(
924
968
  `Sync source (${source.name}) is empty and mode is mirror. This would cause deletion of everything in the target (${target.name}), and most likely indicates an error in source definition.`
925
969
  );
926
970
  }
927
971
  const deletes = [];
928
- targetItems.forEach((object4) => {
972
+ orphanTargetObjects.forEach((object4) => {
929
973
  deletes.push(() => processDelete(object4));
930
974
  });
931
- await Promise.all(deletes.map((d) => d()));
975
+ await runSyncActions(deletes, actionConcurrency);
932
976
  }
933
- await Promise.all(actions.map((a) => a()));
977
+ await runSyncActions(actions, actionConcurrency);
934
978
  await Promise.all([source.onSyncComplete?.(false), target.onSyncComplete?.(true)]);
935
979
  }
980
+ var runSyncActions = async (actions, actionConcurrency) => {
981
+ if (actions.length === 0) {
982
+ return;
983
+ }
984
+ if (typeof actionConcurrency === "undefined") {
985
+ await Promise.all(actions.map((action) => action()));
986
+ return;
987
+ }
988
+ const queue = new PQueue({ concurrency: actionConcurrency });
989
+ await queue.addAll(actions);
990
+ };
936
991
  var SyncEngineError = class _SyncEngineError extends Error {
937
992
  constructor(innerError, sourceObject) {
938
993
  super(
@@ -1149,7 +1204,7 @@ var Telemetry = class {
1149
1204
  });
1150
1205
  }
1151
1206
  shutdown() {
1152
- this.send("exited", { exitCode: process.exitCode });
1207
+ this.send("exited", { exitCode: process.exitCode ?? void 0 });
1153
1208
  return this.posthog?.shutdown();
1154
1209
  }
1155
1210
  };
@@ -2200,20 +2255,64 @@ import {
2200
2255
  } from "@uniformdev/canvas";
2201
2256
  import { isRichTextNodeType, isRichTextValue, walkRichTextTree } from "@uniformdev/richtext";
2202
2257
  import fsj4 from "fs-jetpack";
2203
- import PQueue2 from "p-queue";
2258
+ import PQueue3 from "p-queue";
2204
2259
  import { join as join10 } from "path";
2205
2260
 
2206
2261
  // src/files/downloadFile.ts
2262
+ import { createWriteStream } from "fs";
2207
2263
  import fsj2 from "fs-jetpack";
2208
- import { join as join8 } from "path";
2264
+ import { dirname as dirname2, join as join8 } from "path";
2265
+ import { Readable } from "stream";
2266
+ import { pipeline } from "stream/promises";
2267
+ var downloadedFilePathCacheByDirectory = /* @__PURE__ */ new Map();
2268
+ var tempDownloadFileCounter = 0;
2269
+ var getTempDownloadFilePath = (filePath) => {
2270
+ tempDownloadFileCounter += 1;
2271
+ return `${filePath}.${process.pid}.${Date.now()}.${tempDownloadFileCounter}.download`;
2272
+ };
2273
+ var getDownloadedFilePathCache = (filesDirectory) => {
2274
+ const cached = downloadedFilePathCacheByDirectory.get(filesDirectory);
2275
+ if (cached) {
2276
+ return cached;
2277
+ }
2278
+ const cache = fsj2.cwd(filesDirectory).findAsync({ files: true, directories: false }).then((paths) => new Set(paths)).catch(() => /* @__PURE__ */ new Set());
2279
+ downloadedFilePathCacheByDirectory.set(filesDirectory, cache);
2280
+ return cache;
2281
+ };
2282
+ var filePathMatchesSourceId = (filePath, sourceId) => filePath === sourceId || filePath.startsWith(`${sourceId}.`);
2283
+ var hasFilePathMatchingSourceId = (filePaths, sourceId) => {
2284
+ for (const filePath of filePaths) {
2285
+ if (filePathMatchesSourceId(filePath, sourceId)) {
2286
+ return true;
2287
+ }
2288
+ }
2289
+ return false;
2290
+ };
2291
+ var writeResponseBodyToFile = async (response, filePath) => {
2292
+ if (!response.body) {
2293
+ throw new Error("Response does not contain a body");
2294
+ }
2295
+ const tempFilePath = getTempDownloadFilePath(filePath);
2296
+ await fsj2.dirAsync(dirname2(filePath));
2297
+ try {
2298
+ const responseBody = response.body;
2299
+ await pipeline(Readable.fromWeb(responseBody), createWriteStream(tempFilePath));
2300
+ await fsj2.moveAsync(tempFilePath, filePath, { overwrite: true });
2301
+ } catch (error) {
2302
+ await fsj2.removeAsync(tempFilePath).catch(() => void 0);
2303
+ throw error;
2304
+ }
2305
+ };
2209
2306
  var downloadFile = async ({
2210
2307
  fileClient,
2211
2308
  fileUrl,
2212
2309
  directory
2213
2310
  }) => {
2214
2311
  const writeDirectory = getFilesDirectory(directory);
2312
+ const filesDirectory = join8(writeDirectory, FILES_DIRECTORY_NAME);
2215
2313
  const fileName = urlToFileName(fileUrl.toString());
2216
- const fileAlreadyExists = await fsj2.existsAsync(join8(writeDirectory, FILES_DIRECTORY_NAME, fileName));
2314
+ const filePath = join8(filesDirectory, fileName);
2315
+ const fileAlreadyExists = await fsj2.existsAsync(filePath);
2217
2316
  if (fileAlreadyExists) {
2218
2317
  return { url: fileUrl };
2219
2318
  }
@@ -2223,11 +2322,10 @@ var downloadFile = async ({
2223
2322
  return null;
2224
2323
  }
2225
2324
  if (file.sourceId) {
2325
+ const sourceId = file.sourceId;
2226
2326
  try {
2227
- const hashAlreadyExists = await fsj2.findAsync(join8(writeDirectory, FILES_DIRECTORY_NAME), {
2228
- matching: [file.sourceId, `${file.sourceId}.*`]
2229
- });
2230
- if (hashAlreadyExists.length > 0) {
2327
+ const downloadedFilePaths = await getDownloadedFilePathCache(filesDirectory);
2328
+ if (hasFilePathMatchingSourceId(downloadedFilePaths, sourceId)) {
2231
2329
  return { id: file.id, url: fileUrl };
2232
2330
  }
2233
2331
  } catch {
@@ -2238,8 +2336,12 @@ var downloadFile = async ({
2238
2336
  if (!response.ok) {
2239
2337
  return null;
2240
2338
  }
2241
- const fileBuffer = await response.arrayBuffer();
2242
- await fsj2.writeAsync(join8(writeDirectory, FILES_DIRECTORY_NAME, fileName), Buffer.from(fileBuffer));
2339
+ await writeResponseBodyToFile(response, filePath);
2340
+ const downloadedFilePathCache = downloadedFilePathCacheByDirectory.get(filesDirectory);
2341
+ if (downloadedFilePathCache) {
2342
+ const downloadedFilePaths = await downloadedFilePathCache;
2343
+ downloadedFilePaths.add(fileName);
2344
+ }
2243
2345
  return { id: file.id, url: fileUrl };
2244
2346
  };
2245
2347
 
@@ -2251,10 +2353,10 @@ import { createReadStream } from "fs";
2251
2353
  import fsj3 from "fs-jetpack";
2252
2354
  import { imageSizeFromFile } from "image-size/fromFile";
2253
2355
  import normalizeNewline from "normalize-newline";
2254
- import PQueue from "p-queue";
2356
+ import PQueue2 from "p-queue";
2255
2357
  import { join as join9 } from "path";
2256
2358
  var uploadQueueByKey = /* @__PURE__ */ new Map();
2257
- var fileUploadQueue = new PQueue({ concurrency: 10 });
2359
+ var fileUploadQueue = new PQueue2({ concurrency: 10 });
2258
2360
  var uploadFile = async ({
2259
2361
  fileClient,
2260
2362
  fileUrl,
@@ -2434,9 +2536,9 @@ var walkFileUrlsForCompositionOrEntry = ({
2434
2536
  };
2435
2537
 
2436
2538
  // src/files/files.ts
2437
- var fileDownloadQueue = new PQueue2({ concurrency: 10 });
2438
- var fileUploadQueue2 = new PQueue2({ concurrency: 10 });
2439
- var fileUrlReplacementQueue = new PQueue2({ concurrency: 10 });
2539
+ var fileDownloadQueue = new PQueue3({ concurrency: 10 });
2540
+ var fileUploadQueue2 = new PQueue3({ concurrency: 10 });
2541
+ var fileUrlReplacementQueue = new PQueue3({ concurrency: 10 });
2440
2542
  var downloadFileForAsset = async ({
2441
2543
  asset,
2442
2544
  directory,
@@ -2763,6 +2865,7 @@ function writeCanvasPackage(filename, packageContents) {
2763
2865
  }
2764
2866
 
2765
2867
  // src/commands/canvas/commands/asset/pull.ts
2868
+ var ASSET_PULL_ACTION_CONCURRENCY = 10;
2766
2869
  var AssetPullModule = {
2767
2870
  command: "pull <directory>",
2768
2871
  describe: "Pulls all assets to local files in a directory",
@@ -2861,6 +2964,7 @@ var AssetPullModule = {
2861
2964
  target,
2862
2965
  mode,
2863
2966
  whatIf,
2967
+ actionConcurrency: ASSET_PULL_ACTION_CONCURRENCY,
2864
2968
  allowEmptySource: allowEmptySource ?? true,
2865
2969
  log: createSyncEngineConsoleLogger({ diffMode }),
2866
2970
  onBeforeCompareObjects: async (sourceObject) => {
@@ -2888,6 +2992,7 @@ var AssetPullModule = {
2888
2992
  };
2889
2993
 
2890
2994
  // src/commands/canvas/commands/asset/push.ts
2995
+ var ASSET_PUSH_ACTION_CONCURRENCY = 10;
2891
2996
  var AssetPushModule = {
2892
2997
  command: "push <directory>",
2893
2998
  describe: "Pushes all assets from files in a directory to Uniform",
@@ -2963,6 +3068,7 @@ var AssetPushModule = {
2963
3068
  target,
2964
3069
  mode,
2965
3070
  whatIf,
3071
+ actionConcurrency: ASSET_PUSH_ACTION_CONCURRENCY,
2966
3072
  allowEmptySource,
2967
3073
  log: createSyncEngineConsoleLogger({ diffMode }),
2968
3074
  onBeforeCompareObjects: async (sourceObject, targetObject) => {
@@ -12163,6 +12269,20 @@ var selectIdentifier15 = (source, projectId) => [
12163
12269
  ];
12164
12270
  var selectFilename = (source) => cleanFileName(`${source.pathSegment}_${source.id}`);
12165
12271
  var selectDisplayName15 = (source) => `${source.name} (pid: ${source.id})`;
12272
+ function alignProjectMapNodeWithTargetIdentifier(sourceObject, targetObject) {
12273
+ if (!targetObject) {
12274
+ return sourceObject;
12275
+ }
12276
+ return {
12277
+ ...sourceObject,
12278
+ id: targetObject.id,
12279
+ providerId: targetObject.providerId,
12280
+ object: {
12281
+ ...sourceObject.object,
12282
+ id: targetObject.object.id
12283
+ }
12284
+ };
12285
+ }
12166
12286
 
12167
12287
  // src/commands/project-map/ProjectMapNodeEngineDataSource.ts
12168
12288
  function createProjectMapNodeEngineDataSource({
@@ -12379,6 +12499,12 @@ var ProjectMapNodePushModule = {
12379
12499
  whatIf,
12380
12500
  allowEmptySource,
12381
12501
  log: createSyncEngineConsoleLogger({ diffMode }),
12502
+ onBeforeCompareObjects: async (sourceObject, targetObject) => {
12503
+ return alignProjectMapNodeWithTargetIdentifier(sourceObject, targetObject);
12504
+ },
12505
+ onBeforeWriteObject: async (sourceObject, targetObject) => {
12506
+ return alignProjectMapNodeWithTargetIdentifier(sourceObject, targetObject);
12507
+ },
12382
12508
  onError: (error, object4) => {
12383
12509
  if (error.message.includes(__INTERNAL_MISSING_PARENT_NODE_ERROR)) {
12384
12510
  nodesFailedDueToMissingParent.add(object4.object);
@@ -12782,7 +12908,7 @@ import yargs40 from "yargs";
12782
12908
 
12783
12909
  // src/webhooksClient.ts
12784
12910
  import { ApiClient as ApiClient4 } from "@uniformdev/context/api";
12785
- import PQueue3 from "p-queue";
12911
+ import PQueue4 from "p-queue";
12786
12912
  import { Svix } from "svix";
12787
12913
  import * as z3 from "zod";
12788
12914
  var WEBHOOKS_DASHBOARD_BASE_PATH = "/api/v1/svix-dashboard";
@@ -12830,7 +12956,7 @@ var WebhooksClient = class extends ApiClient4 {
12830
12956
  };
12831
12957
  }
12832
12958
  async get() {
12833
- const webhooksAPIQueue = new PQueue3({ concurrency: 10 });
12959
+ const webhooksAPIQueue = new PQueue4({ concurrency: 10 });
12834
12960
  const { appId, token } = await this.getToken();
12835
12961
  const svix = new Svix(token);
12836
12962
  const getEndpoints = async ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/cli",
3
- "version": "20.70.0",
3
+ "version": "20.71.0",
4
4
  "description": "Uniform command line interface tool",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./cli.js",
@@ -25,51 +25,50 @@
25
25
  "format": "prettier --write \"src/**/*.{js,ts,tsx}\""
26
26
  },
27
27
  "dependencies": {
28
- "@inquirer/prompts": "^7.10.1",
28
+ "@inquirer/prompts": "^8.5.2",
29
29
  "@thi.ng/mime": "^2.2.23",
30
- "@uniformdev/assets": "20.70.0",
31
- "@uniformdev/canvas": "20.70.0",
32
- "@uniformdev/context": "20.70.0",
33
- "@uniformdev/files": "20.70.0",
34
- "@uniformdev/project-map": "20.70.0",
35
- "@uniformdev/redirect": "20.70.0",
36
- "@uniformdev/richtext": "20.70.0",
30
+ "@uniformdev/assets": "20.71.0",
31
+ "@uniformdev/canvas": "20.71.0",
32
+ "@uniformdev/context": "20.71.0",
33
+ "@uniformdev/files": "20.71.0",
34
+ "@uniformdev/project-map": "20.71.0",
35
+ "@uniformdev/redirect": "20.71.0",
36
+ "@uniformdev/richtext": "20.71.0",
37
37
  "call-bind": "^1.0.2",
38
38
  "colorette": "2.0.20",
39
- "cosmiconfig": "9.0.0",
39
+ "cosmiconfig": "9.0.2",
40
40
  "cosmiconfig-typescript-loader": "5.0.0",
41
- "diff": "^8.0.3",
42
- "dotenv": "^16.4.7",
43
- "esbuild": "0.25.0",
41
+ "diff": "^9.0.0",
42
+ "dotenv": "^17.4.2",
43
+ "esbuild": "0.28.1",
44
44
  "execa": "5.1.1",
45
- "file-type": "^21.3.2",
45
+ "file-type": "^22.0.1",
46
46
  "fs-jetpack": "5.1.0",
47
- "graphql": "16.9.0",
48
- "graphql-request": "6.1.0",
47
+ "graphql": "17.0.1",
48
+ "graphql-request": "7.4.0",
49
49
  "image-size": "2.0.2",
50
- "isomorphic-git": "1.35.0",
51
- "js-yaml": "^4.1.0",
50
+ "isomorphic-git": "1.38.5",
51
+ "js-yaml": "^4.2.0",
52
52
  "jsonwebtoken": "9.0.3",
53
53
  "mitt": "^3.0.1",
54
54
  "normalize-newline": "^4.1.0",
55
- "open": "10.2.0",
56
- "ora": "8.0.1",
55
+ "open": "11.0.0",
56
+ "ora": "9.4.0",
57
57
  "p-queue": "7.3.4",
58
- "posthog-node": "5.28.5",
58
+ "posthog-node": "5.38.2",
59
59
  "registry-auth-token": "^5.0.0",
60
60
  "registry-url": "^6.0.0",
61
- "slugify": "1.6.6",
62
- "svix": "^1.71.0",
63
- "undici": "^7.24.0",
64
- "yargs": "^17.6.2",
65
- "zod": "4.3.6"
61
+ "slugify": "1.6.9",
62
+ "svix": "^1.96.0",
63
+ "undici": "^7.28.0",
64
+ "yargs": "^18.0.0",
65
+ "zod": "4.4.3"
66
66
  },
67
67
  "devDependencies": {
68
- "@types/diff": "^8.0.0",
69
68
  "@types/js-yaml": "4.0.9",
70
- "@types/jsonwebtoken": "9.0.5",
71
- "@types/node": "24.3.1",
72
- "@types/yargs": "17.0.32"
69
+ "@types/jsonwebtoken": "9.0.10",
70
+ "@types/node": "26.0.0",
71
+ "@types/yargs": "17.0.35"
73
72
  },
74
73
  "bin": {
75
74
  "uniform": "./cli.js"
@@ -80,5 +79,5 @@
80
79
  "publishConfig": {
81
80
  "access": "public"
82
81
  },
83
- "gitHead": "3f8f572b37fc7ea5d2f37b1425451973556f3392"
82
+ "gitHead": "9b3f5e3fa27b275c00cc252da7ed72913464cce6"
84
83
  }