@uniformdev/cli 19.54.3-alpha.3 → 19.54.3-alpha.5

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 +9 -10
  2. package/package.json +8 -8
package/dist/index.mjs CHANGED
@@ -1599,8 +1599,8 @@ var extractAndUploadUniformFilesForObject = async (object, options) => {
1599
1599
  fileUploadQueue.add(async () => {
1600
1600
  try {
1601
1601
  const fileAlreadyExistsChecks = await Promise.all([
1602
- options.fileClient.getFile({ projectId: options.projectId, url }).catch(() => null),
1603
- options.fileClient.getFile({ projectId: options.projectId, sourceId: hash }).catch(() => null)
1602
+ options.fileClient.get({ url }).catch(() => null),
1603
+ options.fileClient.get({ sourceId: hash }).catch(() => null)
1604
1604
  ]);
1605
1605
  if (fileAlreadyExistsChecks.some((check) => check !== null)) {
1606
1606
  return;
@@ -1632,13 +1632,12 @@ var extractAndUploadUniformFilesForObject = async (object, options) => {
1632
1632
  };
1633
1633
  }
1634
1634
  })();
1635
- const { id, method, uploadUrl } = await options.fileClient.createNewProjectFile({
1635
+ const { id, method, uploadUrl } = await options.fileClient.insert({
1636
1636
  name: fileName,
1637
1637
  mediaType: preferredType(url.split(".").at(-1) ?? ""),
1638
1638
  size: fileBuffer.length,
1639
1639
  width,
1640
1640
  height,
1641
- projectId: options.projectId,
1642
1641
  sourceId: hash
1643
1642
  });
1644
1643
  const uploadResponse = await fetch(uploadUrl, {
@@ -1650,8 +1649,8 @@ var extractAndUploadUniformFilesForObject = async (object, options) => {
1650
1649
  return;
1651
1650
  }
1652
1651
  const checkForFile = async () => {
1653
- const file = await options.fileClient.getFile({ id });
1654
- if (!file || file.state !== FILE_READY_STATE) {
1652
+ const file = await options.fileClient.get({ id });
1653
+ if (!file || file.state !== FILE_READY_STATE || !file.url) {
1655
1654
  await new Promise((resolve2) => setTimeout(resolve2, 500));
1656
1655
  return checkForFile();
1657
1656
  }
@@ -1685,8 +1684,8 @@ var swapOutUniformFileUrlsForTargetProject = async (object, options) => {
1685
1684
  fileUrlReplacementQueue.add(async () => {
1686
1685
  try {
1687
1686
  const fileAlreadyExistsChecks = await Promise.all([
1688
- options.fileClient.getFile({ projectId: options.projectId, url }).catch(() => null),
1689
- options.fileClient.getFile({ projectId: options.projectId, sourceId: hash }).catch(() => null)
1687
+ options.fileClient.get({ url }).catch(() => null),
1688
+ options.fileClient.get({ sourceId: hash }).catch(() => null)
1690
1689
  ]);
1691
1690
  const file = fileAlreadyExistsChecks.find((check) => check !== null);
1692
1691
  if (!file) {
@@ -4779,7 +4778,7 @@ import { PostHog } from "posthog-node";
4779
4778
  // package.json
4780
4779
  var package_default = {
4781
4780
  name: "@uniformdev/cli",
4782
- version: "19.54.2",
4781
+ version: "19.55.0",
4783
4782
  description: "Uniform command line interface tool",
4784
4783
  license: "SEE LICENSE IN LICENSE.txt",
4785
4784
  main: "./cli.js",
@@ -4828,7 +4827,7 @@ var package_default = {
4828
4827
  zod: "3.21.4"
4829
4828
  },
4830
4829
  devDependencies: {
4831
- "@types/diff": "5.0.3",
4830
+ "@types/diff": "5.0.4",
4832
4831
  "@types/inquirer": "9.0.3",
4833
4832
  "@types/js-yaml": "4.0.5",
4834
4833
  "@types/jsonwebtoken": "9.0.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/cli",
3
- "version": "19.54.3-alpha.3+c24f64403",
3
+ "version": "19.54.3-alpha.5+014bd6280",
4
4
  "description": "Uniform command line interface tool",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./cli.js",
@@ -17,11 +17,11 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@thi.ng/mime": "^2.2.23",
20
- "@uniformdev/canvas": "19.54.3-alpha.3+c24f64403",
21
- "@uniformdev/context": "19.54.3-alpha.3+c24f64403",
22
- "@uniformdev/files": "19.54.3-alpha.3+c24f64403",
23
- "@uniformdev/project-map": "19.54.3-alpha.3+c24f64403",
24
- "@uniformdev/redirect": "19.54.3-alpha.3+c24f64403",
20
+ "@uniformdev/canvas": "19.54.3-alpha.5+014bd6280",
21
+ "@uniformdev/context": "19.54.3-alpha.5+014bd6280",
22
+ "@uniformdev/files": "19.54.3-alpha.5+014bd6280",
23
+ "@uniformdev/project-map": "19.54.3-alpha.5+014bd6280",
24
+ "@uniformdev/redirect": "19.54.3-alpha.5+014bd6280",
25
25
  "colorette": "2.0.20",
26
26
  "cosmiconfig": "8.2.0",
27
27
  "cosmiconfig-typescript-loader": "5.0.0",
@@ -49,7 +49,7 @@
49
49
  "zod": "3.21.4"
50
50
  },
51
51
  "devDependencies": {
52
- "@types/diff": "5.0.3",
52
+ "@types/diff": "5.0.4",
53
53
  "@types/inquirer": "9.0.3",
54
54
  "@types/js-yaml": "4.0.5",
55
55
  "@types/jsonwebtoken": "9.0.2",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "c24f64403ca47e28674e94da9ab1566671f398fc"
69
+ "gitHead": "014bd628043639e39e853dfdc2a7f1d2da340854"
70
70
  }