@playdrop/playdrop-cli 0.7.15 → 0.7.17
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/config/client-meta.json +1 -1
- package/node_modules/@playdrop/ai-client/dist/index.js +461 -444
- package/node_modules/@playdrop/ai-client/package.json +1 -1
- package/node_modules/@playdrop/api-client/dist/client.js +903 -882
- package/node_modules/@playdrop/api-client/dist/core/errors.js +69 -45
- package/node_modules/@playdrop/api-client/dist/core/request.js +188 -159
- package/node_modules/@playdrop/api-client/dist/domains/admin.js +516 -491
- package/node_modules/@playdrop/api-client/dist/domains/ai.js +40 -14
- package/node_modules/@playdrop/api-client/dist/domains/apps.js +480 -462
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.js +439 -419
- package/node_modules/@playdrop/api-client/dist/domains/assets.js +696 -676
- package/node_modules/@playdrop/api-client/dist/domains/auth.js +346 -320
- package/node_modules/@playdrop/api-client/dist/domains/comments.js +124 -98
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.js +91 -65
- package/node_modules/@playdrop/api-client/dist/domains/me.js +71 -45
- package/node_modules/@playdrop/api-client/dist/domains/payments.js +407 -386
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.js +144 -118
- package/node_modules/@playdrop/api-client/dist/domains/search.js +117 -104
- package/node_modules/@playdrop/api-client/dist/domains/tags.js +188 -162
- package/node_modules/@playdrop/api-client/dist/index.js +993 -552
- package/node_modules/@playdrop/api-client/package.json +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/animations.js +84 -62
- package/node_modules/@playdrop/boxel-three/dist/src/builders.js +341 -308
- package/node_modules/@playdrop/boxel-three/dist/src/context.js +55 -29
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +856 -858
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.js +267 -261
- package/node_modules/@playdrop/boxel-three/dist/src/index.js +64 -15
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.js +89 -63
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +81 -56
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.js +112 -86
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.js +45 -17
- package/node_modules/@playdrop/boxel-three/dist/src/scene.js +160 -136
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.js +582 -584
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.js +123 -97
- package/node_modules/@playdrop/boxel-three/dist/src/textures.js +207 -182
- package/node_modules/@playdrop/boxel-three/dist/src/types.js +15 -1
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.js +451 -425
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.js +109 -84
- package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.js +127 -106
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.js +73 -51
- package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.js +97 -79
- package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +29 -7
- package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.js +80 -60
- package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.js +41 -19
- package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.js +72 -50
- package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.js +84 -62
- package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.js +69 -47
- package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.js +129 -109
- package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.js +40 -18
- package/node_modules/@playdrop/boxel-three/package.json +1 -1
- package/node_modules/@playdrop/config/client-meta.json +1 -1
- package/node_modules/@playdrop/types/dist/api.js +289 -203
- package/node_modules/@playdrop/types/dist/app-capability-filters.js +112 -62
- package/node_modules/@playdrop/types/dist/app.js +91 -45
- package/node_modules/@playdrop/types/dist/asset-pack.js +37 -5
- package/node_modules/@playdrop/types/dist/asset-spec.js +170 -90
- package/node_modules/@playdrop/types/dist/asset.js +186 -108
- package/node_modules/@playdrop/types/dist/content-license.js +49 -15
- package/node_modules/@playdrop/types/dist/creator-public-image.js +60 -32
- package/node_modules/@playdrop/types/dist/ecs.js +102 -82
- package/node_modules/@playdrop/types/dist/engine-builtins.js +603 -573
- package/node_modules/@playdrop/types/dist/entity.js +63 -53
- package/node_modules/@playdrop/types/dist/graph.js +116 -80
- package/node_modules/@playdrop/types/dist/index.js +47 -20
- package/node_modules/@playdrop/types/dist/owned-assets.js +55 -33
- package/node_modules/@playdrop/types/dist/player-meta.js +151 -100
- package/node_modules/@playdrop/types/dist/realtime.js +27 -7
- package/node_modules/@playdrop/types/dist/version.js +182 -124
- package/node_modules/@playdrop/types/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,57 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
29
|
+
return value === null || value === void 0 || typeof value === "number" && Number.isFinite(value);
|
|
5
30
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
31
|
+
function isEntityType(value) {
|
|
32
|
+
if (typeof value !== "string") {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
return ENTITY_TYPE_VALUES.includes(value);
|
|
11
36
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
creatorUsername,
|
|
63
|
-
name,
|
|
64
|
-
version: rawVersion,
|
|
65
|
-
};
|
|
60
|
+
const revisionValue = revisionMatch[1];
|
|
61
|
+
if (!revisionValue) {
|
|
62
|
+
return null;
|
|
66
63
|
}
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
85
|
-
|
|
111
|
+
function isVersionNodeKind(value) {
|
|
112
|
+
return typeof value === "string" && VERSION_NODE_KIND_VALUES.includes(value);
|
|
86
113
|
}
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
+
});
|