@uniformdev/cli 19.89.0 → 19.90.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.
- package/dist/index.mjs +25 -19
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -810,7 +810,9 @@ 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
|
-
|
|
813
|
+
const file = fileAlreadyExistsChecks.find((check) => check !== null);
|
|
814
|
+
if (file) {
|
|
815
|
+
objectAsString = objectAsString.replaceAll(`"${url}"`, `"${file.url}"`);
|
|
814
816
|
return;
|
|
815
817
|
}
|
|
816
818
|
const localFileName = urlToFileName(url);
|
|
@@ -829,7 +831,7 @@ var extractAndUploadUniformFilesForObject = async (object, options) => {
|
|
|
829
831
|
}
|
|
830
832
|
const fileBuffer = await fsj.readAsync(expectedFilePath, "buffer");
|
|
831
833
|
if (!fileBuffer) {
|
|
832
|
-
console.warn(`Skipping file ${url} as we couldn't read it`);
|
|
834
|
+
console.warn(`Skipping file ${url} (${expectedFilePath}) as we couldn't read it`);
|
|
833
835
|
return;
|
|
834
836
|
}
|
|
835
837
|
const fileName = getFileNameFromUrl(url);
|
|
@@ -861,19 +863,19 @@ var extractAndUploadUniformFilesForObject = async (object, options) => {
|
|
|
861
863
|
}
|
|
862
864
|
});
|
|
863
865
|
if (!uploadResponse.ok) {
|
|
864
|
-
console.warn(`Failed to upload file ${url}`);
|
|
866
|
+
console.warn(`Failed to upload file ${url} (${expectedFilePath})`);
|
|
865
867
|
return;
|
|
866
868
|
}
|
|
867
869
|
const checkForFile = async () => {
|
|
868
|
-
const
|
|
869
|
-
if (!
|
|
870
|
+
const file2 = await options.fileClient.get({ id });
|
|
871
|
+
if (!file2 || file2.state !== FILE_READY_STATE || !file2.url) {
|
|
870
872
|
await new Promise((resolve2) => setTimeout(resolve2, 500));
|
|
871
873
|
return checkForFile();
|
|
872
874
|
}
|
|
873
|
-
return
|
|
875
|
+
return file2.url;
|
|
874
876
|
};
|
|
875
877
|
const abortTimeout = setTimeout(() => {
|
|
876
|
-
throw new Error(`Failed to upload file ${url} (upload timed out
|
|
878
|
+
throw new Error(`Failed to upload file ${url} (${expectedFilePath}) - upload timed out`);
|
|
877
879
|
}, 3e4);
|
|
878
880
|
const uploadedFileUrl = await checkForFile();
|
|
879
881
|
clearTimeout(abortTimeout);
|
|
@@ -1277,15 +1279,10 @@ var AssetPushModule = {
|
|
|
1277
1279
|
return sourceObjectWithNewFileUrls;
|
|
1278
1280
|
},
|
|
1279
1281
|
onBeforeWriteObject: async (sourceObject) => {
|
|
1280
|
-
const sourceObjectWithNewFileUrls = await
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
}),
|
|
1285
|
-
{
|
|
1286
|
-
fileClient
|
|
1287
|
-
}
|
|
1288
|
-
);
|
|
1282
|
+
const sourceObjectWithNewFileUrls = await extractAndUploadUniformFilesForObject(sourceObject, {
|
|
1283
|
+
directory,
|
|
1284
|
+
fileClient
|
|
1285
|
+
});
|
|
1289
1286
|
sourceObjectWithNewFileUrls.object = await updateAssetFileIdBasedOnUrl(
|
|
1290
1287
|
sourceObjectWithNewFileUrls.object,
|
|
1291
1288
|
{
|
|
@@ -3177,7 +3174,9 @@ var EntryGetModule = {
|
|
|
3177
3174
|
offset: 0,
|
|
3178
3175
|
limit: 1,
|
|
3179
3176
|
entryIDs: [id],
|
|
3180
|
-
skipOverridesResolution: true
|
|
3177
|
+
skipOverridesResolution: true,
|
|
3178
|
+
skipPatternResolution: true,
|
|
3179
|
+
skipDataResolution: true
|
|
3181
3180
|
});
|
|
3182
3181
|
if (res.entries.length !== 1) {
|
|
3183
3182
|
throw new Error(`Entry with ID ${id} not found`);
|
|
@@ -3195,7 +3194,13 @@ var EntryListModule = {
|
|
|
3195
3194
|
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
3196
3195
|
const fetch3 = nodeFetchProxy(proxy);
|
|
3197
3196
|
const client = new ContentClient8({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
3198
|
-
const res = await client.getEntries({
|
|
3197
|
+
const res = await client.getEntries({
|
|
3198
|
+
offset: 0,
|
|
3199
|
+
limit: 1e3,
|
|
3200
|
+
skipOverridesResolution: true,
|
|
3201
|
+
skipPatternResolution: true,
|
|
3202
|
+
skipDataResolution: true
|
|
3203
|
+
});
|
|
3199
3204
|
emitWithFormat(res.entries, format, filename);
|
|
3200
3205
|
}
|
|
3201
3206
|
};
|
|
@@ -3223,6 +3228,7 @@ function createEntryEngineDataSource({
|
|
|
3223
3228
|
limit: 1e3,
|
|
3224
3229
|
skipDataResolution: true,
|
|
3225
3230
|
skipOverridesResolution: true,
|
|
3231
|
+
skipPatternResolution: true,
|
|
3226
3232
|
state: stateId,
|
|
3227
3233
|
withComponentIDs: true
|
|
3228
3234
|
});
|
|
@@ -5826,7 +5832,7 @@ import { PostHog } from "posthog-node";
|
|
|
5826
5832
|
// package.json
|
|
5827
5833
|
var package_default = {
|
|
5828
5834
|
name: "@uniformdev/cli",
|
|
5829
|
-
version: "19.
|
|
5835
|
+
version: "19.90.0",
|
|
5830
5836
|
description: "Uniform command line interface tool",
|
|
5831
5837
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
5832
5838
|
main: "./cli.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/cli",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.90.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.
|
|
21
|
-
"@uniformdev/canvas": "19.
|
|
22
|
-
"@uniformdev/context": "19.
|
|
23
|
-
"@uniformdev/files": "19.
|
|
24
|
-
"@uniformdev/project-map": "19.
|
|
25
|
-
"@uniformdev/redirect": "19.
|
|
20
|
+
"@uniformdev/assets": "19.90.0",
|
|
21
|
+
"@uniformdev/canvas": "19.90.0",
|
|
22
|
+
"@uniformdev/context": "19.90.0",
|
|
23
|
+
"@uniformdev/files": "19.90.0",
|
|
24
|
+
"@uniformdev/project-map": "19.90.0",
|
|
25
|
+
"@uniformdev/redirect": "19.90.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": "
|
|
72
|
+
"gitHead": "5fcbc2f570abedb01f09730eb986f024429e2422"
|
|
73
73
|
}
|