@uniformdev/assets 19.61.1 → 19.62.1-alpha.127

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.esm.js CHANGED
@@ -37,7 +37,27 @@ var UncachedAssetClient = class extends AssetClient {
37
37
  super({ ...options, bypassCache: true });
38
38
  }
39
39
  };
40
+
41
+ // src/utils/assetConverter.ts
42
+ function convertAssetToPutAsset(asset) {
43
+ var _a, _b, _c;
44
+ return {
45
+ asset: {
46
+ _id: asset.asset._id,
47
+ _dataResources: asset.asset._dataResources,
48
+ _name: asset.asset._name,
49
+ type: asset.asset.type,
50
+ fields: {
51
+ title: (_a = asset.asset.fields) == null ? void 0 : _a.title,
52
+ description: (_b = asset.asset.fields) == null ? void 0 : _b.description,
53
+ file: (_c = asset.asset.fields) == null ? void 0 : _c.file
54
+ }
55
+ },
56
+ projectId: asset.projectId
57
+ };
58
+ }
40
59
  export {
41
60
  AssetClient,
42
- UncachedAssetClient
61
+ UncachedAssetClient,
62
+ convertAssetToPutAsset
43
63
  };
package/dist/index.js CHANGED
@@ -21,7 +21,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var src_exports = {};
22
22
  __export(src_exports, {
23
23
  AssetClient: () => AssetClient,
24
- UncachedAssetClient: () => UncachedAssetClient
24
+ UncachedAssetClient: () => UncachedAssetClient,
25
+ convertAssetToPutAsset: () => convertAssetToPutAsset
25
26
  });
26
27
  module.exports = __toCommonJS(src_exports);
27
28
 
@@ -64,8 +65,28 @@ var UncachedAssetClient = class extends AssetClient {
64
65
  super({ ...options, bypassCache: true });
65
66
  }
66
67
  };
68
+
69
+ // src/utils/assetConverter.ts
70
+ function convertAssetToPutAsset(asset) {
71
+ var _a, _b, _c;
72
+ return {
73
+ asset: {
74
+ _id: asset.asset._id,
75
+ _dataResources: asset.asset._dataResources,
76
+ _name: asset.asset._name,
77
+ type: asset.asset.type,
78
+ fields: {
79
+ title: (_a = asset.asset.fields) == null ? void 0 : _a.title,
80
+ description: (_b = asset.asset.fields) == null ? void 0 : _b.description,
81
+ file: (_c = asset.asset.fields) == null ? void 0 : _c.file
82
+ }
83
+ },
84
+ projectId: asset.projectId
85
+ };
86
+ }
67
87
  // Annotate the CommonJS export names for ESM import in node:
68
88
  0 && (module.exports = {
69
89
  AssetClient,
70
- UncachedAssetClient
90
+ UncachedAssetClient,
91
+ convertAssetToPutAsset
71
92
  });
package/dist/index.mjs CHANGED
@@ -37,7 +37,27 @@ var UncachedAssetClient = class extends AssetClient {
37
37
  super({ ...options, bypassCache: true });
38
38
  }
39
39
  };
40
+
41
+ // src/utils/assetConverter.ts
42
+ function convertAssetToPutAsset(asset) {
43
+ var _a, _b, _c;
44
+ return {
45
+ asset: {
46
+ _id: asset.asset._id,
47
+ _dataResources: asset.asset._dataResources,
48
+ _name: asset.asset._name,
49
+ type: asset.asset.type,
50
+ fields: {
51
+ title: (_a = asset.asset.fields) == null ? void 0 : _a.title,
52
+ description: (_b = asset.asset.fields) == null ? void 0 : _b.description,
53
+ file: (_c = asset.asset.fields) == null ? void 0 : _c.file
54
+ }
55
+ },
56
+ projectId: asset.projectId
57
+ };
58
+ }
40
59
  export {
41
60
  AssetClient,
42
- UncachedAssetClient
61
+ UncachedAssetClient,
62
+ convertAssetToPutAsset
43
63
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/assets",
3
- "version": "19.61.1",
3
+ "version": "19.62.1-alpha.127+d49e5a0782",
4
4
  "description": "Uniform Assets",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -36,7 +36,7 @@
36
36
  "access": "public"
37
37
  },
38
38
  "dependencies": {
39
- "@uniformdev/context": "19.61.1"
39
+ "@uniformdev/context": "19.62.1-alpha.127+d49e5a0782"
40
40
  },
41
- "gitHead": "01ed7d10fd66f65c79caa4cf87a22080b3d7942b"
41
+ "gitHead": "d49e5a07824d69e5df3a92ff10bc9acd88d0bc22"
42
42
  }