@uniformdev/cli 19.88.1-alpha.7 → 19.89.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.
Files changed (2) hide show
  1. package/dist/index.mjs +14 -11
  2. package/package.json +8 -8
package/dist/index.mjs CHANGED
@@ -810,9 +810,7 @@ var extractAndUploadUniformFilesForObject = async (object, options) => {
810
810
  options.fileClient.get({ sourceId: hash }).catch(() => null),
811
811
  options.fileClient.get({ sourceId: legacyHash }).catch(() => null)
812
812
  ]);
813
- const file = fileAlreadyExistsChecks.find((check) => check !== null);
814
- if (file) {
815
- objectAsString = objectAsString.replaceAll(`"${url}"`, `"${file.url}"`);
813
+ if (fileAlreadyExistsChecks.some((check) => check !== null)) {
816
814
  return;
817
815
  }
818
816
  const localFileName = urlToFileName(url);
@@ -867,12 +865,12 @@ var extractAndUploadUniformFilesForObject = async (object, options) => {
867
865
  return;
868
866
  }
869
867
  const checkForFile = async () => {
870
- const file2 = await options.fileClient.get({ id });
871
- if (!file2 || file2.state !== FILE_READY_STATE || !file2.url) {
868
+ const file = await options.fileClient.get({ id });
869
+ if (!file || file.state !== FILE_READY_STATE || !file.url) {
872
870
  await new Promise((resolve2) => setTimeout(resolve2, 500));
873
871
  return checkForFile();
874
872
  }
875
- return file2.url;
873
+ return file.url;
876
874
  };
877
875
  const abortTimeout = setTimeout(() => {
878
876
  throw new Error(`Failed to upload file ${url} (upload timed out)`);
@@ -1279,10 +1277,15 @@ var AssetPushModule = {
1279
1277
  return sourceObjectWithNewFileUrls;
1280
1278
  },
1281
1279
  onBeforeWriteObject: async (sourceObject) => {
1282
- const sourceObjectWithNewFileUrls = await extractAndUploadUniformFilesForObject(sourceObject, {
1283
- directory,
1284
- fileClient
1285
- });
1280
+ const sourceObjectWithNewFileUrls = await swapOutUniformFileUrlsForTargetProject(
1281
+ await extractAndUploadUniformFilesForObject(sourceObject, {
1282
+ directory,
1283
+ fileClient
1284
+ }),
1285
+ {
1286
+ fileClient
1287
+ }
1288
+ );
1286
1289
  sourceObjectWithNewFileUrls.object = await updateAssetFileIdBasedOnUrl(
1287
1290
  sourceObjectWithNewFileUrls.object,
1288
1291
  {
@@ -5823,7 +5826,7 @@ import { PostHog } from "posthog-node";
5823
5826
  // package.json
5824
5827
  var package_default = {
5825
5828
  name: "@uniformdev/cli",
5826
- version: "19.88.0",
5829
+ version: "19.89.0",
5827
5830
  description: "Uniform command line interface tool",
5828
5831
  license: "SEE LICENSE IN LICENSE.txt",
5829
5832
  main: "./cli.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/cli",
3
- "version": "19.88.1-alpha.7+69b3ccba4",
3
+ "version": "19.89.0",
4
4
  "description": "Uniform command line interface tool",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./cli.js",
@@ -17,12 +17,12 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@thi.ng/mime": "^2.2.23",
20
- "@uniformdev/assets": "19.88.1-alpha.7+69b3ccba4",
21
- "@uniformdev/canvas": "19.88.1-alpha.7+69b3ccba4",
22
- "@uniformdev/context": "19.88.1-alpha.7+69b3ccba4",
23
- "@uniformdev/files": "19.88.1-alpha.7+69b3ccba4",
24
- "@uniformdev/project-map": "19.88.1-alpha.7+69b3ccba4",
25
- "@uniformdev/redirect": "19.88.1-alpha.7+69b3ccba4",
20
+ "@uniformdev/assets": "19.89.0",
21
+ "@uniformdev/canvas": "19.89.0",
22
+ "@uniformdev/context": "19.89.0",
23
+ "@uniformdev/files": "19.89.0",
24
+ "@uniformdev/project-map": "19.89.0",
25
+ "@uniformdev/redirect": "19.89.0",
26
26
  "call-bind": "^1.0.2",
27
27
  "colorette": "2.0.20",
28
28
  "cosmiconfig": "8.3.6",
@@ -69,5 +69,5 @@
69
69
  "publishConfig": {
70
70
  "access": "public"
71
71
  },
72
- "gitHead": "69b3ccba4050c4ff412c4f226f54a36d74cf9a39"
72
+ "gitHead": "247189fb1039d0f81498949534646baaffb8bca7"
73
73
  }