@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.
Files changed (70) 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/types/dist/api.js +289 -203
  53. package/node_modules/@playdrop/types/dist/app-capability-filters.js +112 -62
  54. package/node_modules/@playdrop/types/dist/app.js +91 -45
  55. package/node_modules/@playdrop/types/dist/asset-pack.js +37 -5
  56. package/node_modules/@playdrop/types/dist/asset-spec.js +170 -90
  57. package/node_modules/@playdrop/types/dist/asset.js +186 -108
  58. package/node_modules/@playdrop/types/dist/content-license.js +49 -15
  59. package/node_modules/@playdrop/types/dist/creator-public-image.js +60 -32
  60. package/node_modules/@playdrop/types/dist/ecs.js +102 -82
  61. package/node_modules/@playdrop/types/dist/engine-builtins.js +603 -573
  62. package/node_modules/@playdrop/types/dist/entity.js +63 -53
  63. package/node_modules/@playdrop/types/dist/graph.js +116 -80
  64. package/node_modules/@playdrop/types/dist/index.js +47 -20
  65. package/node_modules/@playdrop/types/dist/owned-assets.js +55 -33
  66. package/node_modules/@playdrop/types/dist/player-meta.js +151 -100
  67. package/node_modules/@playdrop/types/dist/realtime.js +27 -7
  68. package/node_modules/@playdrop/types/dist/version.js +182 -124
  69. package/node_modules/@playdrop/types/package.json +1 -1
  70. package/package.json +1 -1
@@ -1,163 +1,189 @@
1
- export function buildTagsApiClientMethods(input) {
2
- const { request, handleApiError, normalizePositiveIntegerInput, } = input;
3
- return {
4
- async fetchTagDirectory(options = {}) {
5
- const params = new URLSearchParams();
6
- if (typeof options.limit === 'number') {
7
- params.set('limit', String(normalizePositiveIntegerInput(options.limit, 'invalid_tags_limit')));
8
- }
9
- if (typeof options.offset === 'number') {
10
- params.set('offset', String(normalizePositiveIntegerInput(options.offset, 'invalid_tags_offset')));
11
- }
12
- if (typeof options.tagLimit === 'number') {
13
- params.set('tagLimit', String(normalizePositiveIntegerInput(options.tagLimit, 'invalid_tags_limit')));
14
- }
15
- const query = params.toString();
16
- const response = await request({
17
- method: 'GET',
18
- path: `/tags/directory${query ? `?${query}` : ''}`,
19
- });
20
- if (response.status !== 200) {
21
- handleApiError(response, 'fetch_tag_directory');
22
- }
23
- return response.body;
24
- },
25
- async fetchTags(options = {}) {
26
- const params = new URLSearchParams();
27
- if (typeof options.targetKind === 'string' && options.targetKind.trim().length > 0) {
28
- params.set('targetKind', options.targetKind.trim());
29
- }
30
- if (typeof options.groupSlug === 'string' && options.groupSlug.trim().length > 0) {
31
- params.set('groupSlug', options.groupSlug.trim());
32
- }
33
- if (typeof options.limit === 'number') {
34
- params.set('limit', String(normalizePositiveIntegerInput(options.limit, 'invalid_tags_limit')));
35
- }
36
- if (typeof options.offset === 'number') {
37
- params.set('offset', String(normalizePositiveIntegerInput(options.offset, 'invalid_tags_offset')));
38
- }
39
- const query = params.toString();
40
- const response = await request({
41
- method: 'GET',
42
- path: `/tags${query ? `?${query}` : ''}`,
43
- });
44
- if (response.status !== 200) {
45
- handleApiError(response, 'fetch_tags');
46
- }
47
- return response.body;
48
- },
49
- async fetchTag(groupSlug, tagSlug) {
50
- const normalizedGroupSlug = typeof groupSlug === 'string' ? groupSlug.trim() : '';
51
- const normalizedTagSlug = typeof tagSlug === 'string' ? tagSlug.trim() : '';
52
- if (!normalizedGroupSlug || !normalizedTagSlug) {
53
- throw new Error('invalid_tag_ref');
54
- }
55
- const response = await request({
56
- method: 'GET',
57
- path: `/tags/${encodeURIComponent(normalizedGroupSlug)}/${encodeURIComponent(normalizedTagSlug)}`,
58
- });
59
- if (response.status !== 200) {
60
- handleApiError(response, 'fetch_tag');
61
- }
62
- return response.body;
63
- },
64
- async fetchTagGroup(groupSlug, options = {}) {
65
- const normalizedGroupSlug = typeof groupSlug === 'string' ? groupSlug.trim() : '';
66
- if (!normalizedGroupSlug) {
67
- throw new Error('invalid_tag_group_slug');
68
- }
69
- const params = new URLSearchParams();
70
- if (typeof options.targetKind === 'string' && options.targetKind.trim().length > 0) {
71
- params.set('targetKind', options.targetKind.trim());
72
- }
73
- if (typeof options.appType === 'string' && options.appType.trim().length > 0) {
74
- params.set('appType', options.appType.trim());
75
- }
76
- if (typeof options.sort === 'string' && options.sort.trim().length > 0) {
77
- params.set('sort', options.sort.trim());
78
- }
79
- if (typeof options.limit === 'number') {
80
- params.set('limit', String(normalizePositiveIntegerInput(options.limit, 'invalid_tags_limit')));
81
- }
82
- if (typeof options.offset === 'number') {
83
- params.set('offset', String(normalizePositiveIntegerInput(options.offset, 'invalid_tags_offset')));
84
- }
85
- const query = params.toString();
86
- const response = await request({
87
- method: 'GET',
88
- path: `/tags/${encodeURIComponent(normalizedGroupSlug)}${query ? `?${query}` : ''}`,
89
- });
90
- if (response.status !== 200) {
91
- handleApiError(response, 'fetch_tag_group');
92
- }
93
- return response.body;
94
- },
95
- async fetchAdminTagGroups() {
96
- const response = await request({
97
- method: 'GET',
98
- path: '/admin/tag-groups',
99
- });
100
- if (response.status !== 200) {
101
- handleApiError(response, 'fetch_admin_tag_groups');
102
- }
103
- return response.body;
104
- },
105
- async createAdminTagGroup(requestBody) {
106
- const response = await request({
107
- method: 'POST',
108
- path: '/admin/tag-groups',
109
- body: requestBody,
110
- });
111
- if (response.status !== 201) {
112
- handleApiError(response, 'create_admin_tag_group');
113
- }
114
- return response.body;
115
- },
116
- async updateAdminTagGroup(groupSlug, requestBody) {
117
- const normalizedGroupSlug = typeof groupSlug === 'string' ? groupSlug.trim() : '';
118
- if (!normalizedGroupSlug) {
119
- throw new Error('invalid_tag_group_slug');
120
- }
121
- const response = await request({
122
- method: 'PATCH',
123
- path: `/admin/tag-groups/${encodeURIComponent(normalizedGroupSlug)}`,
124
- body: requestBody,
125
- });
126
- if (response.status !== 200) {
127
- handleApiError(response, 'update_admin_tag_group');
128
- }
129
- return response.body;
130
- },
131
- async createAdminTag(groupSlug, requestBody) {
132
- const normalizedGroupSlug = typeof groupSlug === 'string' ? groupSlug.trim() : '';
133
- if (!normalizedGroupSlug) {
134
- throw new Error('invalid_tag_group_slug');
135
- }
136
- const response = await request({
137
- method: 'POST',
138
- path: `/admin/tag-groups/${encodeURIComponent(normalizedGroupSlug)}/tags`,
139
- body: requestBody,
140
- });
141
- if (response.status !== 201) {
142
- handleApiError(response, 'create_admin_tag');
143
- }
144
- return response.body;
145
- },
146
- async updateAdminTag(groupSlug, tagSlug, requestBody) {
147
- const normalizedGroupSlug = typeof groupSlug === 'string' ? groupSlug.trim() : '';
148
- const normalizedTagSlug = typeof tagSlug === 'string' ? tagSlug.trim() : '';
149
- if (!normalizedGroupSlug || !normalizedTagSlug) {
150
- throw new Error('invalid_tag_ref');
151
- }
152
- const response = await request({
153
- method: 'PATCH',
154
- path: `/admin/tags/${encodeURIComponent(normalizedGroupSlug)}/${encodeURIComponent(normalizedTagSlug)}`,
155
- body: requestBody,
156
- });
157
- if (response.status !== 200) {
158
- handleApiError(response, 'update_admin_tag');
159
- }
160
- return response.body;
161
- },
162
- };
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 tags_exports = {};
19
+ __export(tags_exports, {
20
+ buildTagsApiClientMethods: () => buildTagsApiClientMethods
21
+ });
22
+ module.exports = __toCommonJS(tags_exports);
23
+ function buildTagsApiClientMethods(input) {
24
+ const { request, handleApiError, normalizePositiveIntegerInput } = input;
25
+ return {
26
+ async fetchTagDirectory(options = {}) {
27
+ const params = new URLSearchParams();
28
+ if (typeof options.limit === "number") {
29
+ params.set("limit", String(normalizePositiveIntegerInput(options.limit, "invalid_tags_limit")));
30
+ }
31
+ if (typeof options.offset === "number") {
32
+ params.set("offset", String(normalizePositiveIntegerInput(options.offset, "invalid_tags_offset")));
33
+ }
34
+ if (typeof options.tagLimit === "number") {
35
+ params.set("tagLimit", String(normalizePositiveIntegerInput(options.tagLimit, "invalid_tags_limit")));
36
+ }
37
+ const query = params.toString();
38
+ const response = await request({
39
+ method: "GET",
40
+ path: `/tags/directory${query ? `?${query}` : ""}`
41
+ });
42
+ if (response.status !== 200) {
43
+ handleApiError(response, "fetch_tag_directory");
44
+ }
45
+ return response.body;
46
+ },
47
+ async fetchTags(options = {}) {
48
+ const params = new URLSearchParams();
49
+ if (typeof options.targetKind === "string" && options.targetKind.trim().length > 0) {
50
+ params.set("targetKind", options.targetKind.trim());
51
+ }
52
+ if (typeof options.groupSlug === "string" && options.groupSlug.trim().length > 0) {
53
+ params.set("groupSlug", options.groupSlug.trim());
54
+ }
55
+ if (typeof options.limit === "number") {
56
+ params.set("limit", String(normalizePositiveIntegerInput(options.limit, "invalid_tags_limit")));
57
+ }
58
+ if (typeof options.offset === "number") {
59
+ params.set("offset", String(normalizePositiveIntegerInput(options.offset, "invalid_tags_offset")));
60
+ }
61
+ const query = params.toString();
62
+ const response = await request({
63
+ method: "GET",
64
+ path: `/tags${query ? `?${query}` : ""}`
65
+ });
66
+ if (response.status !== 200) {
67
+ handleApiError(response, "fetch_tags");
68
+ }
69
+ return response.body;
70
+ },
71
+ async fetchTag(groupSlug, tagSlug) {
72
+ const normalizedGroupSlug = typeof groupSlug === "string" ? groupSlug.trim() : "";
73
+ const normalizedTagSlug = typeof tagSlug === "string" ? tagSlug.trim() : "";
74
+ if (!normalizedGroupSlug || !normalizedTagSlug) {
75
+ throw new Error("invalid_tag_ref");
76
+ }
77
+ const response = await request({
78
+ method: "GET",
79
+ path: `/tags/${encodeURIComponent(normalizedGroupSlug)}/${encodeURIComponent(normalizedTagSlug)}`
80
+ });
81
+ if (response.status !== 200) {
82
+ handleApiError(response, "fetch_tag");
83
+ }
84
+ return response.body;
85
+ },
86
+ async fetchTagGroup(groupSlug, options = {}) {
87
+ const normalizedGroupSlug = typeof groupSlug === "string" ? groupSlug.trim() : "";
88
+ if (!normalizedGroupSlug) {
89
+ throw new Error("invalid_tag_group_slug");
90
+ }
91
+ const params = new URLSearchParams();
92
+ if (typeof options.targetKind === "string" && options.targetKind.trim().length > 0) {
93
+ params.set("targetKind", options.targetKind.trim());
94
+ }
95
+ if (typeof options.appType === "string" && options.appType.trim().length > 0) {
96
+ params.set("appType", options.appType.trim());
97
+ }
98
+ if (typeof options.sort === "string" && options.sort.trim().length > 0) {
99
+ params.set("sort", options.sort.trim());
100
+ }
101
+ if (typeof options.limit === "number") {
102
+ params.set("limit", String(normalizePositiveIntegerInput(options.limit, "invalid_tags_limit")));
103
+ }
104
+ if (typeof options.offset === "number") {
105
+ params.set("offset", String(normalizePositiveIntegerInput(options.offset, "invalid_tags_offset")));
106
+ }
107
+ const query = params.toString();
108
+ const response = await request({
109
+ method: "GET",
110
+ path: `/tags/${encodeURIComponent(normalizedGroupSlug)}${query ? `?${query}` : ""}`
111
+ });
112
+ if (response.status !== 200) {
113
+ handleApiError(response, "fetch_tag_group");
114
+ }
115
+ return response.body;
116
+ },
117
+ async fetchAdminTagGroups() {
118
+ const response = await request({
119
+ method: "GET",
120
+ path: "/admin/tag-groups"
121
+ });
122
+ if (response.status !== 200) {
123
+ handleApiError(response, "fetch_admin_tag_groups");
124
+ }
125
+ return response.body;
126
+ },
127
+ async createAdminTagGroup(requestBody) {
128
+ const response = await request({
129
+ method: "POST",
130
+ path: "/admin/tag-groups",
131
+ body: requestBody
132
+ });
133
+ if (response.status !== 201) {
134
+ handleApiError(response, "create_admin_tag_group");
135
+ }
136
+ return response.body;
137
+ },
138
+ async updateAdminTagGroup(groupSlug, requestBody) {
139
+ const normalizedGroupSlug = typeof groupSlug === "string" ? groupSlug.trim() : "";
140
+ if (!normalizedGroupSlug) {
141
+ throw new Error("invalid_tag_group_slug");
142
+ }
143
+ const response = await request({
144
+ method: "PATCH",
145
+ path: `/admin/tag-groups/${encodeURIComponent(normalizedGroupSlug)}`,
146
+ body: requestBody
147
+ });
148
+ if (response.status !== 200) {
149
+ handleApiError(response, "update_admin_tag_group");
150
+ }
151
+ return response.body;
152
+ },
153
+ async createAdminTag(groupSlug, requestBody) {
154
+ const normalizedGroupSlug = typeof groupSlug === "string" ? groupSlug.trim() : "";
155
+ if (!normalizedGroupSlug) {
156
+ throw new Error("invalid_tag_group_slug");
157
+ }
158
+ const response = await request({
159
+ method: "POST",
160
+ path: `/admin/tag-groups/${encodeURIComponent(normalizedGroupSlug)}/tags`,
161
+ body: requestBody
162
+ });
163
+ if (response.status !== 201) {
164
+ handleApiError(response, "create_admin_tag");
165
+ }
166
+ return response.body;
167
+ },
168
+ async updateAdminTag(groupSlug, tagSlug, requestBody) {
169
+ const normalizedGroupSlug = typeof groupSlug === "string" ? groupSlug.trim() : "";
170
+ const normalizedTagSlug = typeof tagSlug === "string" ? tagSlug.trim() : "";
171
+ if (!normalizedGroupSlug || !normalizedTagSlug) {
172
+ throw new Error("invalid_tag_ref");
173
+ }
174
+ const response = await request({
175
+ method: "PATCH",
176
+ path: `/admin/tags/${encodeURIComponent(normalizedGroupSlug)}/${encodeURIComponent(normalizedTagSlug)}`,
177
+ body: requestBody
178
+ });
179
+ if (response.status !== 200) {
180
+ handleApiError(response, "update_admin_tag");
181
+ }
182
+ return response.body;
183
+ }
184
+ };
163
185
  }
186
+ // Annotate the CommonJS export names for ESM import in node:
187
+ 0 && (module.exports = {
188
+ buildTagsApiClientMethods
189
+ });