@playdrop/playdrop-cli 0.7.13 → 0.7.16

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 (71) hide show
  1. package/config/client-meta.json +1 -1
  2. package/node_modules/@playdrop/ai-client/dist/index.js +461 -444
  3. package/node_modules/@playdrop/ai-client/package.json +1 -1
  4. package/node_modules/@playdrop/api-client/dist/client.js +903 -882
  5. package/node_modules/@playdrop/api-client/dist/core/errors.js +69 -45
  6. package/node_modules/@playdrop/api-client/dist/core/request.js +188 -159
  7. package/node_modules/@playdrop/api-client/dist/domains/admin.js +516 -491
  8. package/node_modules/@playdrop/api-client/dist/domains/ai.js +40 -14
  9. package/node_modules/@playdrop/api-client/dist/domains/apps.js +480 -462
  10. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.js +439 -419
  11. package/node_modules/@playdrop/api-client/dist/domains/assets.js +696 -676
  12. package/node_modules/@playdrop/api-client/dist/domains/auth.js +346 -320
  13. package/node_modules/@playdrop/api-client/dist/domains/comments.js +124 -98
  14. package/node_modules/@playdrop/api-client/dist/domains/free-credits.js +91 -65
  15. package/node_modules/@playdrop/api-client/dist/domains/me.js +71 -45
  16. package/node_modules/@playdrop/api-client/dist/domains/payments.js +407 -386
  17. package/node_modules/@playdrop/api-client/dist/domains/player-meta.js +144 -118
  18. package/node_modules/@playdrop/api-client/dist/domains/search.js +117 -104
  19. package/node_modules/@playdrop/api-client/dist/domains/tags.js +188 -162
  20. package/node_modules/@playdrop/api-client/dist/index.js +993 -552
  21. package/node_modules/@playdrop/api-client/package.json +1 -1
  22. package/node_modules/@playdrop/boxel-three/dist/src/animations.js +84 -62
  23. package/node_modules/@playdrop/boxel-three/dist/src/builders.js +341 -308
  24. package/node_modules/@playdrop/boxel-three/dist/src/context.js +55 -29
  25. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +856 -858
  26. package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.js +267 -261
  27. package/node_modules/@playdrop/boxel-three/dist/src/index.js +64 -15
  28. package/node_modules/@playdrop/boxel-three/dist/src/instantiate.js +89 -63
  29. package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +81 -56
  30. package/node_modules/@playdrop/boxel-three/dist/src/overlays.js +112 -86
  31. package/node_modules/@playdrop/boxel-three/dist/src/primitives.js +45 -17
  32. package/node_modules/@playdrop/boxel-three/dist/src/scene.js +160 -136
  33. package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.js +582 -584
  34. package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.js +123 -97
  35. package/node_modules/@playdrop/boxel-three/dist/src/textures.js +207 -182
  36. package/node_modules/@playdrop/boxel-three/dist/src/types.js +15 -1
  37. package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.js +451 -425
  38. package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.js +109 -84
  39. package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.js +127 -106
  40. package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.js +73 -51
  41. package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.js +97 -79
  42. package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +29 -7
  43. package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.js +80 -60
  44. package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.js +41 -19
  45. package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.js +72 -50
  46. package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.js +84 -62
  47. package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.js +69 -47
  48. package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.js +129 -109
  49. package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.js +40 -18
  50. package/node_modules/@playdrop/boxel-three/package.json +1 -1
  51. package/node_modules/@playdrop/config/client-meta.json +1 -1
  52. package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
  53. package/node_modules/@playdrop/types/dist/api.js +289 -203
  54. package/node_modules/@playdrop/types/dist/app-capability-filters.js +112 -62
  55. package/node_modules/@playdrop/types/dist/app.js +91 -45
  56. package/node_modules/@playdrop/types/dist/asset-pack.js +37 -5
  57. package/node_modules/@playdrop/types/dist/asset-spec.js +170 -90
  58. package/node_modules/@playdrop/types/dist/asset.js +186 -108
  59. package/node_modules/@playdrop/types/dist/content-license.js +49 -15
  60. package/node_modules/@playdrop/types/dist/creator-public-image.js +60 -32
  61. package/node_modules/@playdrop/types/dist/ecs.js +102 -82
  62. package/node_modules/@playdrop/types/dist/engine-builtins.js +603 -573
  63. package/node_modules/@playdrop/types/dist/entity.js +63 -53
  64. package/node_modules/@playdrop/types/dist/graph.js +116 -80
  65. package/node_modules/@playdrop/types/dist/index.js +47 -20
  66. package/node_modules/@playdrop/types/dist/owned-assets.js +55 -33
  67. package/node_modules/@playdrop/types/dist/player-meta.js +151 -100
  68. package/node_modules/@playdrop/types/dist/realtime.js +27 -7
  69. package/node_modules/@playdrop/types/dist/version.js +182 -124
  70. package/node_modules/@playdrop/types/package.json +1 -1
  71. package/package.json +1 -1
@@ -1,57 +1,67 @@
1
- export const ENTITY_TYPE_VALUES = ['AVATAR', 'HUMANOID', 'CREATURE', 'BLOCK'];
2
- export const AVATAR_VISIBILITY_VALUES = ['DEFAULT', 'SHOP', 'HIDDEN'];
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var entity_exports = {};
19
+ __export(entity_exports, {
20
+ AVATAR_VISIBILITY_VALUES: () => AVATAR_VISIBILITY_VALUES,
21
+ ENTITY_TYPE_VALUES: () => ENTITY_TYPE_VALUES,
22
+ isEntityMetadata: () => isEntityMetadata,
23
+ isEntityType: () => isEntityType
24
+ });
25
+ module.exports = __toCommonJS(entity_exports);
26
+ const ENTITY_TYPE_VALUES = ["AVATAR", "HUMANOID", "CREATURE", "BLOCK"];
27
+ const AVATAR_VISIBILITY_VALUES = ["DEFAULT", "SHOP", "HIDDEN"];
3
28
  function isNullableNumber(value) {
4
- return value === null || value === undefined || (typeof value === 'number' && Number.isFinite(value));
29
+ return value === null || value === void 0 || typeof value === "number" && Number.isFinite(value);
5
30
  }
6
- export function isEntityType(value) {
7
- if (typeof value !== 'string') {
8
- return false;
9
- }
10
- return ENTITY_TYPE_VALUES.includes(value);
31
+ function isEntityType(value) {
32
+ if (typeof value !== "string") {
33
+ return false;
34
+ }
35
+ return ENTITY_TYPE_VALUES.includes(value);
11
36
  }
12
- export function isEntityMetadata(value) {
13
- if (typeof value !== 'object' || value === null) {
14
- return false;
15
- }
16
- const metadata = value;
17
- const id = metadata['id'];
18
- const name = metadata['name'];
19
- const displayName = metadata['displayName'];
20
- const description = metadata['description'];
21
- const creatorId = metadata['creatorId'];
22
- const creatorUsername = metadata['creatorUsername'];
23
- const createdAt = metadata['createdAt'];
24
- const updatedAt = metadata['updatedAt'];
25
- const meshUrl = metadata['meshUrl'];
26
- const previewUrl = metadata['previewUrl'];
27
- const boxelUrl = metadata['boxelUrl'];
28
- const meshSizeBytes = metadata['meshSizeBytes'];
29
- const previewSizeBytes = metadata['previewSizeBytes'];
30
- const definitionSizeBytes = metadata['definitionSizeBytes'];
31
- const type = metadata['type'];
32
- const priceCredits = metadata['priceCredits'];
33
- const avatarVisibility = metadata['avatarVisibility'];
34
- return (typeof id === 'number'
35
- && Number.isInteger(id)
36
- && typeof name === 'string'
37
- && name.length > 0
38
- && typeof displayName === 'string'
39
- && typeof description === 'string'
40
- && typeof creatorId === 'number'
41
- && Number.isInteger(creatorId)
42
- && typeof creatorUsername === 'string'
43
- && typeof createdAt === 'string'
44
- && typeof updatedAt === 'string'
45
- && typeof meshUrl === 'string'
46
- && typeof previewUrl === 'string'
47
- && typeof boxelUrl === 'string'
48
- && isNullableNumber(meshSizeBytes)
49
- && isNullableNumber(previewSizeBytes)
50
- && isNullableNumber(definitionSizeBytes)
51
- && isEntityType(type)
52
- && (priceCredits === undefined || priceCredits === null || typeof priceCredits === 'number')
53
- && (avatarVisibility === undefined
54
- || avatarVisibility === null
55
- || (typeof avatarVisibility === 'string'
56
- && AVATAR_VISIBILITY_VALUES.includes(avatarVisibility))));
37
+ function isEntityMetadata(value) {
38
+ if (typeof value !== "object" || value === null) {
39
+ return false;
40
+ }
41
+ const metadata = value;
42
+ const id = metadata["id"];
43
+ const name = metadata["name"];
44
+ const displayName = metadata["displayName"];
45
+ const description = metadata["description"];
46
+ const creatorId = metadata["creatorId"];
47
+ const creatorUsername = metadata["creatorUsername"];
48
+ const createdAt = metadata["createdAt"];
49
+ const updatedAt = metadata["updatedAt"];
50
+ const meshUrl = metadata["meshUrl"];
51
+ const previewUrl = metadata["previewUrl"];
52
+ const boxelUrl = metadata["boxelUrl"];
53
+ const meshSizeBytes = metadata["meshSizeBytes"];
54
+ const previewSizeBytes = metadata["previewSizeBytes"];
55
+ const definitionSizeBytes = metadata["definitionSizeBytes"];
56
+ const type = metadata["type"];
57
+ const priceCredits = metadata["priceCredits"];
58
+ const avatarVisibility = metadata["avatarVisibility"];
59
+ return typeof id === "number" && Number.isInteger(id) && typeof name === "string" && name.length > 0 && typeof displayName === "string" && typeof description === "string" && typeof creatorId === "number" && Number.isInteger(creatorId) && typeof creatorUsername === "string" && typeof createdAt === "string" && typeof updatedAt === "string" && typeof meshUrl === "string" && typeof previewUrl === "string" && typeof boxelUrl === "string" && isNullableNumber(meshSizeBytes) && isNullableNumber(previewSizeBytes) && isNullableNumber(definitionSizeBytes) && isEntityType(type) && (priceCredits === void 0 || priceCredits === null || typeof priceCredits === "number") && (avatarVisibility === void 0 || avatarVisibility === null || typeof avatarVisibility === "string" && AVATAR_VISIBILITY_VALUES.includes(avatarVisibility));
57
60
  }
61
+ // Annotate the CommonJS export names for ESM import in node:
62
+ 0 && (module.exports = {
63
+ AVATAR_VISIBILITY_VALUES,
64
+ ENTITY_TYPE_VALUES,
65
+ isEntityMetadata,
66
+ isEntityType
67
+ });
@@ -1,89 +1,125 @@
1
- import { formatAssetSpecVersionRef, parseAssetSpecVersionRef } from './asset-spec.js';
2
- export const VERSION_NODE_KIND_VALUES = ['APP_VERSION', 'ASSET_VERSION', 'PACK_VERSION', 'ASSET_SPEC_VERSION'];
3
- export const RELATION_TYPE_VALUES = ['USES', 'CONTAINS', 'REMIXES'];
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var graph_exports = {};
19
+ __export(graph_exports, {
20
+ RELATION_TYPE_VALUES: () => RELATION_TYPE_VALUES,
21
+ VERSION_NODE_KIND_VALUES: () => VERSION_NODE_KIND_VALUES,
22
+ formatContentVersionRef: () => formatContentVersionRef,
23
+ isRelationType: () => isRelationType,
24
+ isVersionNodeKind: () => isVersionNodeKind,
25
+ parseContentVersionRef: () => parseContentVersionRef
26
+ });
27
+ module.exports = __toCommonJS(graph_exports);
28
+ var import_asset_spec = require("./asset-spec.js");
29
+ const VERSION_NODE_KIND_VALUES = ["APP_VERSION", "ASSET_VERSION", "PACK_VERSION", "ASSET_SPEC_VERSION"];
30
+ const RELATION_TYPE_VALUES = ["USES", "CONTAINS", "REMIXES"];
4
31
  const SEMVER_VERSION_REF_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
5
- export function parseContentVersionRef(raw) {
6
- if (typeof raw !== 'string') {
7
- return null;
8
- }
9
- const trimmed = raw.trim();
10
- if (!trimmed.length) {
11
- return null;
12
- }
13
- const match = /^(app|asset|pack|asset-spec):([^/]+)\/([^@]+)@(.+)$/i.exec(trimmed);
14
- if (!match) {
15
- return null;
16
- }
17
- const [, rawKind, rawCreatorUsername, rawName, rawVersionValue] = match;
18
- if (!rawKind || !rawCreatorUsername || !rawName || !rawVersionValue) {
19
- return null;
20
- }
21
- const kind = rawKind.toLowerCase();
22
- const creatorUsername = rawCreatorUsername.trim();
23
- const name = rawName.trim();
24
- const rawVersion = rawVersionValue.trim();
25
- if (!creatorUsername.length || !name.length || !rawVersion.length) {
26
- return null;
27
- }
28
- if (kind === 'asset') {
29
- const revisionMatch = /^r(\d+)$/i.exec(rawVersion);
30
- if (!revisionMatch) {
31
- return null;
32
- }
33
- const revisionValue = revisionMatch[1];
34
- if (!revisionValue) {
35
- return null;
36
- }
37
- const revision = Number.parseInt(revisionValue, 10);
38
- if (!Number.isInteger(revision) || revision <= 0) {
39
- return null;
40
- }
41
- return {
42
- kind: 'asset',
43
- creatorUsername,
44
- name,
45
- revision,
46
- };
47
- }
48
- if (!SEMVER_VERSION_REF_REGEX.test(rawVersion)) {
49
- return null;
50
- }
51
- if (kind === 'app') {
52
- return {
53
- kind: 'app',
54
- creatorUsername,
55
- name,
56
- version: rawVersion,
57
- };
32
+ function parseContentVersionRef(raw) {
33
+ if (typeof raw !== "string") {
34
+ return null;
35
+ }
36
+ const trimmed = raw.trim();
37
+ if (!trimmed.length) {
38
+ return null;
39
+ }
40
+ const match = /^(app|asset|pack|asset-spec):([^/]+)\/([^@]+)@(.+)$/i.exec(trimmed);
41
+ if (!match) {
42
+ return null;
43
+ }
44
+ const [, rawKind, rawCreatorUsername, rawName, rawVersionValue] = match;
45
+ if (!rawKind || !rawCreatorUsername || !rawName || !rawVersionValue) {
46
+ return null;
47
+ }
48
+ const kind = rawKind.toLowerCase();
49
+ const creatorUsername = rawCreatorUsername.trim();
50
+ const name = rawName.trim();
51
+ const rawVersion = rawVersionValue.trim();
52
+ if (!creatorUsername.length || !name.length || !rawVersion.length) {
53
+ return null;
54
+ }
55
+ if (kind === "asset") {
56
+ const revisionMatch = /^r(\d+)$/i.exec(rawVersion);
57
+ if (!revisionMatch) {
58
+ return null;
58
59
  }
59
- if (kind === 'pack') {
60
- return {
61
- kind: 'pack',
62
- creatorUsername,
63
- name,
64
- version: rawVersion,
65
- };
60
+ const revisionValue = revisionMatch[1];
61
+ if (!revisionValue) {
62
+ return null;
66
63
  }
67
- if (kind === 'asset-spec') {
68
- return parseAssetSpecVersionRef(trimmed);
64
+ const revision = Number.parseInt(revisionValue, 10);
65
+ if (!Number.isInteger(revision) || revision <= 0) {
66
+ return null;
69
67
  }
68
+ return {
69
+ kind: "asset",
70
+ creatorUsername,
71
+ name,
72
+ revision
73
+ };
74
+ }
75
+ if (!SEMVER_VERSION_REF_REGEX.test(rawVersion)) {
70
76
  return null;
77
+ }
78
+ if (kind === "app") {
79
+ return {
80
+ kind: "app",
81
+ creatorUsername,
82
+ name,
83
+ version: rawVersion
84
+ };
85
+ }
86
+ if (kind === "pack") {
87
+ return {
88
+ kind: "pack",
89
+ creatorUsername,
90
+ name,
91
+ version: rawVersion
92
+ };
93
+ }
94
+ if (kind === "asset-spec") {
95
+ return (0, import_asset_spec.parseAssetSpecVersionRef)(trimmed);
96
+ }
97
+ return null;
71
98
  }
72
- export function formatContentVersionRef(ref) {
73
- if (ref.kind === 'asset') {
74
- return `asset:${ref.creatorUsername}/${ref.name}@r${ref.revision}`;
75
- }
76
- if (ref.kind === 'app') {
77
- return `app:${ref.creatorUsername}/${ref.name}@${ref.version}`;
78
- }
79
- if (ref.kind === 'asset-spec') {
80
- return formatAssetSpecVersionRef(ref);
81
- }
82
- return `pack:${ref.creatorUsername}/${ref.name}@${ref.version}`;
99
+ function formatContentVersionRef(ref) {
100
+ if (ref.kind === "asset") {
101
+ return `asset:${ref.creatorUsername}/${ref.name}@r${ref.revision}`;
102
+ }
103
+ if (ref.kind === "app") {
104
+ return `app:${ref.creatorUsername}/${ref.name}@${ref.version}`;
105
+ }
106
+ if (ref.kind === "asset-spec") {
107
+ return (0, import_asset_spec.formatAssetSpecVersionRef)(ref);
108
+ }
109
+ return `pack:${ref.creatorUsername}/${ref.name}@${ref.version}`;
83
110
  }
84
- export function isVersionNodeKind(value) {
85
- return typeof value === 'string' && VERSION_NODE_KIND_VALUES.includes(value);
111
+ function isVersionNodeKind(value) {
112
+ return typeof value === "string" && VERSION_NODE_KIND_VALUES.includes(value);
86
113
  }
87
- export function isRelationType(value) {
88
- return typeof value === 'string' && RELATION_TYPE_VALUES.includes(value);
114
+ function isRelationType(value) {
115
+ return typeof value === "string" && RELATION_TYPE_VALUES.includes(value);
89
116
  }
117
+ // Annotate the CommonJS export names for ESM import in node:
118
+ 0 && (module.exports = {
119
+ RELATION_TYPE_VALUES,
120
+ VERSION_NODE_KIND_VALUES,
121
+ formatContentVersionRef,
122
+ isRelationType,
123
+ isVersionNodeKind,
124
+ parseContentVersionRef
125
+ });
@@ -1,20 +1,47 @@
1
- // Re-export all API types
2
- export * from './api.js';
3
- // Re-export all app types
4
- export * from './app.js';
5
- export * from './app-capability-filters.js';
6
- export * from './content-license.js';
7
- export * from './player-meta.js';
8
- // Re-export versioning types
9
- export * from './version.js';
10
- // Re-export generic asset types
11
- export * from './asset.js';
12
- export * from './asset-spec.js';
13
- export * from './asset-pack.js';
14
- export * from './owned-assets.js';
15
- export * from './graph.js';
16
- export * from './creator-public-image.js';
17
- // Re-export ECS config types
18
- export * from './ecs.js';
19
- // Re-export engine built-ins
20
- export * from './engine-builtins.js';
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var dist_exports = {};
16
+ module.exports = __toCommonJS(dist_exports);
17
+ __reExport(dist_exports, require("./api.js"), module.exports);
18
+ __reExport(dist_exports, require("./app.js"), module.exports);
19
+ __reExport(dist_exports, require("./app-capability-filters.js"), module.exports);
20
+ __reExport(dist_exports, require("./content-license.js"), module.exports);
21
+ __reExport(dist_exports, require("./player-meta.js"), module.exports);
22
+ __reExport(dist_exports, require("./version.js"), module.exports);
23
+ __reExport(dist_exports, require("./asset.js"), module.exports);
24
+ __reExport(dist_exports, require("./asset-spec.js"), module.exports);
25
+ __reExport(dist_exports, require("./asset-pack.js"), module.exports);
26
+ __reExport(dist_exports, require("./owned-assets.js"), module.exports);
27
+ __reExport(dist_exports, require("./graph.js"), module.exports);
28
+ __reExport(dist_exports, require("./creator-public-image.js"), module.exports);
29
+ __reExport(dist_exports, require("./ecs.js"), module.exports);
30
+ __reExport(dist_exports, require("./engine-builtins.js"), module.exports);
31
+ // Annotate the CommonJS export names for ESM import in node:
32
+ 0 && (module.exports = {
33
+ ...require("./api.js"),
34
+ ...require("./app.js"),
35
+ ...require("./app-capability-filters.js"),
36
+ ...require("./content-license.js"),
37
+ ...require("./player-meta.js"),
38
+ ...require("./version.js"),
39
+ ...require("./asset.js"),
40
+ ...require("./asset-spec.js"),
41
+ ...require("./asset-pack.js"),
42
+ ...require("./owned-assets.js"),
43
+ ...require("./graph.js"),
44
+ ...require("./creator-public-image.js"),
45
+ ...require("./ecs.js"),
46
+ ...require("./engine-builtins.js")
47
+ });
@@ -1,36 +1,58 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var owned_assets_exports = {};
19
+ __export(owned_assets_exports, {
20
+ canonicalizeOwnedAssetFingerprintInput: () => canonicalizeOwnedAssetFingerprintInput
21
+ });
22
+ module.exports = __toCommonJS(owned_assets_exports);
1
23
  function sortObjectKeys(value) {
2
- if (Array.isArray(value)) {
3
- return value.map((entry) => sortObjectKeys(entry));
4
- }
5
- if (!value || typeof value !== 'object') {
6
- return value;
7
- }
8
- return Object.keys(value)
9
- .sort((left, right) => left.localeCompare(right))
10
- .reduce((acc, key) => {
11
- acc[key] = sortObjectKeys(value[key]);
12
- return acc;
13
- }, {});
24
+ if (Array.isArray(value)) {
25
+ return value.map((entry) => sortObjectKeys(entry));
26
+ }
27
+ if (!value || typeof value !== "object") {
28
+ return value;
29
+ }
30
+ return Object.keys(value).sort((left, right) => left.localeCompare(right)).reduce((acc, key) => {
31
+ acc[key] = sortObjectKeys(value[key]);
32
+ return acc;
33
+ }, {});
14
34
  }
15
- export function canonicalizeOwnedAssetFingerprintInput(input) {
16
- return JSON.stringify(sortObjectKeys({
17
- category: input.category,
18
- subcategory: input.subcategory ?? null,
19
- format: input.format,
20
- visibility: input.visibility,
21
- license: input.license ?? null,
22
- sourceKind: input.sourceKind,
23
- assetSpecVersionId: input.assetSpecVersionId ?? null,
24
- remixTargetNodeId: input.remixTargetNodeId ?? null,
25
- validationStatus: input.validationStatus ?? null,
26
- validationReportJson: input.validationReportJson ?? null,
27
- files: [...input.files]
28
- .map((file) => ({
29
- role: file.role.trim().toLowerCase(),
30
- contentType: file.contentType.trim().toLowerCase(),
31
- sizeBytes: file.sizeBytes,
32
- sha256: file.sha256.trim().toLowerCase(),
33
- }))
34
- .sort((left, right) => left.role.localeCompare(right.role)),
35
- }));
35
+ function canonicalizeOwnedAssetFingerprintInput(input) {
36
+ return JSON.stringify(sortObjectKeys({
37
+ category: input.category,
38
+ subcategory: input.subcategory ?? null,
39
+ format: input.format,
40
+ visibility: input.visibility,
41
+ license: input.license ?? null,
42
+ sourceKind: input.sourceKind,
43
+ assetSpecVersionId: input.assetSpecVersionId ?? null,
44
+ remixTargetNodeId: input.remixTargetNodeId ?? null,
45
+ validationStatus: input.validationStatus ?? null,
46
+ validationReportJson: input.validationReportJson ?? null,
47
+ files: [...input.files].map((file) => ({
48
+ role: file.role.trim().toLowerCase(),
49
+ contentType: file.contentType.trim().toLowerCase(),
50
+ sizeBytes: file.sizeBytes,
51
+ sha256: file.sha256.trim().toLowerCase()
52
+ })).sort((left, right) => left.role.localeCompare(right.role))
53
+ }));
36
54
  }
55
+ // Annotate the CommonJS export names for ESM import in node:
56
+ 0 && (module.exports = {
57
+ canonicalizeOwnedAssetFingerprintInput
58
+ });