@uniformdev/cli 20.80.1-alpha.3.sha-1a5ce5809e → 20.80.2-alpha.17.sha-6b1014c36e

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,7 +5,7 @@ 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.5.1_@microsoft+api-extractor@7.58.9_@types+node@26.0.0__jiti@2.7.0_postcss@8.5.2_1593607ac254a0f78ffdb743585a4e57/node_modules/tsup/assets/esm_shims.js
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.2_ec849ba4fed0187780e9a6f9c97688cf/node_modules/tsup/assets/esm_shims.js
9
9
  import path from "path";
10
10
  import { fileURLToPath } from "url";
11
11
  var getFilename = () => fileURLToPath(import.meta.url);
@@ -21,7 +21,7 @@ import { dirname, extname, isAbsolute, resolve, sep } from "path";
21
21
  // package.json
22
22
  var package_default = {
23
23
  name: "@uniformdev/cli",
24
- version: "20.80.0",
24
+ version: "20.80.1",
25
25
  description: "Uniform command line interface tool",
26
26
  license: "SEE LICENSE IN LICENSE.txt",
27
27
  main: "./cli.js",
@@ -66,7 +66,7 @@ var package_default = {
66
66
  execa: "5.1.1",
67
67
  "file-type": "^22.0.1",
68
68
  "fs-jetpack": "5.1.0",
69
- "image-size": "2.0.2",
69
+ "image-size": "2.0.4",
70
70
  "isomorphic-git": "1.38.5",
71
71
  "js-yaml": "^4.3.1",
72
72
  jsonwebtoken: "9.0.3",
@@ -1,4 +1,4 @@
1
- import "./chunk-ICATM6IY.mjs";
1
+ import "./chunk-U4K2JTQL.mjs";
2
2
 
3
3
  // src/sync/allSerializableEntitiesConfig.ts
4
4
  var allSerializableEntitiesConfig = {
package/dist/index.mjs CHANGED
@@ -25,7 +25,7 @@ import {
25
25
  withFormatOptions,
26
26
  withProjectOptions,
27
27
  withTeamOptions
28
- } from "./chunk-ICATM6IY.mjs";
28
+ } from "./chunk-U4K2JTQL.mjs";
29
29
 
30
30
  // src/index.ts
31
31
  import * as dotenv from "dotenv";
@@ -1205,7 +1205,8 @@ async function fetchMemberProfile({
1205
1205
  }
1206
1206
  var getUserInfo = async (baseUrl, authToken) => {
1207
1207
  try {
1208
- const projectClient = new ProjectClient({ apiHost: baseUrl, bearerToken: authToken });
1208
+ const cliFetch = (input3, init) => fetch(input3, { ...init, headers: { ...init?.headers, "User-Agent": CLI_USER_AGENT } });
1209
+ const projectClient = new ProjectClient({ apiHost: baseUrl, bearerToken: authToken, fetch: cliFetch });
1209
1210
  const [profile, projectsRes] = await Promise.all([
1210
1211
  fetchMemberProfile({ baseUrl, bearerToken: authToken }),
1211
1212
  projectClient.list()
@@ -2879,18 +2880,6 @@ import PQueue2 from "p-queue";
2879
2880
  import { join as join11 } from "path";
2880
2881
  var uploadQueueByKey = /* @__PURE__ */ new Map();
2881
2882
  var fileUploadQueue = new PQueue2({ concurrency: 10 });
2882
- var IMAGE_SIZE_SAFE_MEDIA_TYPES = /* @__PURE__ */ new Set([
2883
- "image/png",
2884
- "image/apng",
2885
- "image/jpeg",
2886
- "image/jpg",
2887
- "image/jfif",
2888
- "image/pjpeg",
2889
- "image/pjp",
2890
- "image/gif",
2891
- "image/webp",
2892
- "image/svg+xml"
2893
- ]);
2894
2883
  var uploadFile = async ({
2895
2884
  fileClient,
2896
2885
  fileUrl,
@@ -2955,7 +2944,7 @@ var uploadFile = async ({
2955
2944
  uploadBody = createReadStream(expectedFilePath);
2956
2945
  }
2957
2946
  const { width, height } = await (async () => {
2958
- if (!IMAGE_SIZE_SAFE_MEDIA_TYPES.has(mimeType)) {
2947
+ if (!mimeType.startsWith("image/")) {
2959
2948
  return {
2960
2949
  width: void 0,
2961
2950
  height: void 0
@@ -9519,7 +9508,6 @@ var PromptPushModule = {
9519
9508
  proxy,
9520
9509
  directory,
9521
9510
  mode,
9522
- whatIf,
9523
9511
  project: projectId,
9524
9512
  diff: diffMode,
9525
9513
  allowEmptySource,
@@ -9555,7 +9543,6 @@ var PromptPushModule = {
9555
9543
  source,
9556
9544
  target,
9557
9545
  mode,
9558
- whatIf,
9559
9546
  allowEmptySource,
9560
9547
  log: createSyncEngineConsoleLogger({ diffMode })
9561
9548
  });
@@ -13428,9 +13415,12 @@ var selectFilename2 = (source) => {
13428
13415
  return cleanFileName(source.sourceUrl.substring(index + 1)) + `_${source.id}`;
13429
13416
  };
13430
13417
  var selectDisplayName17 = (source) => {
13418
+ if (typeof source.sourceUrl !== "string") {
13419
+ return `${source.id ?? "redirect"} (id: ${source.id})`;
13420
+ }
13431
13421
  let pathName = source.sourceUrl;
13432
13422
  if (pathName.length > 30) {
13433
- const slashIndex = source.sourceUrl.indexOf("/", source.sourceUrl.length - 30);
13423
+ const slashIndex = pathName.indexOf("/", pathName.length - 30);
13434
13424
  pathName = "..." + pathName.substring(slashIndex);
13435
13425
  }
13436
13426
  return `${pathName} (id: ${source.id})`;
@@ -13700,7 +13690,11 @@ var RedirectDefinitionUpdateModule = {
13700
13690
  const fetch2 = nodeFetchProxy(proxy);
13701
13691
  const client = getRedirectClient({ apiKey, apiHost, fetch: fetch2, projectId });
13702
13692
  const file = readFileToObject(filename);
13703
- await client.upsertRedirect(file);
13693
+ if (!file || typeof file !== "object" || Array.isArray(file)) {
13694
+ console.error(`${filename} does not contain a YAML or JSON object`);
13695
+ process.exit(1);
13696
+ }
13697
+ await client.upsertRedirect("redirect" in file ? file.redirect : file);
13704
13698
  }
13705
13699
  };
13706
13700
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/cli",
3
- "version": "20.80.1-alpha.3.sha-1a5ce5809e",
3
+ "version": "20.80.2-alpha.17.sha-6b1014c36e",
4
4
  "description": "Uniform command line interface tool",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./cli.js",
@@ -27,14 +27,14 @@
27
27
  "dependencies": {
28
28
  "@inquirer/prompts": "^8.5.2",
29
29
  "@thi.ng/mime": "^2.2.23",
30
- "@uniformdev/assets": "20.80.1-alpha.3.sha-1a5ce5809e",
31
- "@uniformdev/automations-sdk": "20.80.1-alpha.3.sha-1a5ce5809e",
32
- "@uniformdev/canvas": "20.80.1-alpha.3.sha-1a5ce5809e",
33
- "@uniformdev/context": "20.80.1-alpha.3.sha-1a5ce5809e",
34
- "@uniformdev/files": "20.80.1-alpha.3.sha-1a5ce5809e",
35
- "@uniformdev/project-map": "20.80.1-alpha.3.sha-1a5ce5809e",
36
- "@uniformdev/redirect": "20.80.1-alpha.3.sha-1a5ce5809e",
37
- "@uniformdev/richtext": "20.80.1-alpha.3.sha-1a5ce5809e",
30
+ "@uniformdev/assets": "20.80.2-alpha.17.sha-6b1014c36e",
31
+ "@uniformdev/automations-sdk": "20.80.2-alpha.17.sha-6b1014c36e",
32
+ "@uniformdev/canvas": "20.80.2-alpha.17.sha-6b1014c36e",
33
+ "@uniformdev/context": "20.80.2-alpha.17.sha-6b1014c36e",
34
+ "@uniformdev/files": "20.80.2-alpha.17.sha-6b1014c36e",
35
+ "@uniformdev/project-map": "20.80.2-alpha.17.sha-6b1014c36e",
36
+ "@uniformdev/redirect": "20.80.2-alpha.17.sha-6b1014c36e",
37
+ "@uniformdev/richtext": "20.80.2-alpha.17.sha-6b1014c36e",
38
38
  "call-bind": "^1.0.2",
39
39
  "colorette": "2.0.20",
40
40
  "cosmiconfig": "9.0.2",
@@ -45,7 +45,7 @@
45
45
  "execa": "5.1.1",
46
46
  "file-type": "^22.0.1",
47
47
  "fs-jetpack": "5.1.0",
48
- "image-size": "2.0.2",
48
+ "image-size": "2.0.4",
49
49
  "isomorphic-git": "1.38.5",
50
50
  "js-yaml": "^4.3.1",
51
51
  "jsonwebtoken": "9.0.3",
@@ -78,5 +78,5 @@
78
78
  "publishConfig": {
79
79
  "access": "public"
80
80
  },
81
- "gitHead": "1a5ce5809ec27da2c9026548c3a5b8907eb76502"
81
+ "gitHead": "6b1014c36e49b6ec5cf3e347070d18ca8095c0e0"
82
82
  }