@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,114 +1,165 @@
1
- export const PLAYER_META_KEY_REGEX = /^[a-z][a-z0-9_.-]{2,63}$/;
2
- export const PLAYER_META_DEFINITION_STATUS_VALUES = ['ACTIVE', 'RETIRED'];
3
- export const APP_ACHIEVEMENT_KIND_VALUES = ['STANDARD', 'INCREMENTAL'];
4
- export const APP_LEADERBOARD_SCORE_TYPE_VALUES = ['INTEGER', 'TIME_MS'];
5
- export const APP_LEADERBOARD_SORT_VALUES = ['DESC', 'ASC'];
6
- export const PLAYER_META_ERROR_CODE_VALUES = [
7
- 'E_AUTH_REQUIRED',
8
- 'E_RUNTIME_AUTH_REQUIRED',
9
- 'E_META_NOT_FOUND',
10
- 'E_META_RETIRED',
11
- 'E_META_INVALID_KEY',
12
- 'E_META_INVALID_DEFINITION',
13
- 'E_INVALID_ARGUMENT',
14
- 'E_SCORE_INVALID',
15
- 'E_PROGRESS_INVALID',
16
- 'E_FEATURE_KIND_MISMATCH',
17
- 'E_RATE_LIMITED',
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 player_meta_exports = {};
19
+ __export(player_meta_exports, {
20
+ ADMIN_ACHIEVEMENT_MUTATION_ACTION_VALUES: () => ADMIN_ACHIEVEMENT_MUTATION_ACTION_VALUES,
21
+ ADMIN_LEADERBOARD_MUTATION_ACTION_VALUES: () => ADMIN_LEADERBOARD_MUTATION_ACTION_VALUES,
22
+ APP_ACHIEVEMENT_KIND_VALUES: () => APP_ACHIEVEMENT_KIND_VALUES,
23
+ APP_LEADERBOARD_SCORE_TYPE_VALUES: () => APP_LEADERBOARD_SCORE_TYPE_VALUES,
24
+ APP_LEADERBOARD_SORT_VALUES: () => APP_LEADERBOARD_SORT_VALUES,
25
+ PLAYER_META_DEFINITION_STATUS_VALUES: () => PLAYER_META_DEFINITION_STATUS_VALUES,
26
+ PLAYER_META_ERROR_CODE_VALUES: () => PLAYER_META_ERROR_CODE_VALUES,
27
+ PLAYER_META_KEY_REGEX: () => PLAYER_META_KEY_REGEX,
28
+ computeAchievementProgressPercent: () => computeAchievementProgressPercent,
29
+ formatLeaderboardScore: () => formatLeaderboardScore,
30
+ isPlayerMetaKey: () => isPlayerMetaKey,
31
+ isSafeNonNegativeInteger: () => isSafeNonNegativeInteger,
32
+ isSafePositiveInteger: () => isSafePositiveInteger,
33
+ isValidLeaderboardDefinitionCombination: () => isValidLeaderboardDefinitionCombination,
34
+ parseAdminAchievementMutationAction: () => parseAdminAchievementMutationAction,
35
+ parseAdminLeaderboardMutationAction: () => parseAdminLeaderboardMutationAction,
36
+ parseAppAchievementKind: () => parseAppAchievementKind,
37
+ parseAppLeaderboardScoreType: () => parseAppLeaderboardScoreType,
38
+ parseAppLeaderboardSort: () => parseAppLeaderboardSort,
39
+ parsePlayerMetaDefinitionStatus: () => parsePlayerMetaDefinitionStatus
40
+ });
41
+ module.exports = __toCommonJS(player_meta_exports);
42
+ const PLAYER_META_KEY_REGEX = /^[a-z][a-z0-9_.-]{2,63}$/;
43
+ const PLAYER_META_DEFINITION_STATUS_VALUES = ["ACTIVE", "RETIRED"];
44
+ const APP_ACHIEVEMENT_KIND_VALUES = ["STANDARD", "INCREMENTAL"];
45
+ const APP_LEADERBOARD_SCORE_TYPE_VALUES = ["INTEGER", "TIME_MS"];
46
+ const APP_LEADERBOARD_SORT_VALUES = ["DESC", "ASC"];
47
+ const PLAYER_META_ERROR_CODE_VALUES = [
48
+ "E_AUTH_REQUIRED",
49
+ "E_RUNTIME_AUTH_REQUIRED",
50
+ "E_META_NOT_FOUND",
51
+ "E_META_RETIRED",
52
+ "E_META_INVALID_KEY",
53
+ "E_META_INVALID_DEFINITION",
54
+ "E_INVALID_ARGUMENT",
55
+ "E_SCORE_INVALID",
56
+ "E_PROGRESS_INVALID",
57
+ "E_FEATURE_KIND_MISMATCH",
58
+ "E_RATE_LIMITED"
18
59
  ];
19
- export const ADMIN_ACHIEVEMENT_MUTATION_ACTION_VALUES = ['grant', 'revoke', 'reset'];
20
- export const ADMIN_LEADERBOARD_MUTATION_ACTION_VALUES = ['reset', 'remove'];
21
- export function isPlayerMetaKey(value) {
22
- return typeof value === 'string' && PLAYER_META_KEY_REGEX.test(value.trim());
60
+ const ADMIN_ACHIEVEMENT_MUTATION_ACTION_VALUES = ["grant", "revoke", "reset"];
61
+ const ADMIN_LEADERBOARD_MUTATION_ACTION_VALUES = ["reset", "remove"];
62
+ function isPlayerMetaKey(value) {
63
+ return typeof value === "string" && PLAYER_META_KEY_REGEX.test(value.trim());
23
64
  }
24
- export function parsePlayerMetaDefinitionStatus(value) {
25
- if (typeof value !== 'string') {
26
- return null;
27
- }
28
- const normalized = value.trim().toUpperCase();
29
- return PLAYER_META_DEFINITION_STATUS_VALUES.includes(normalized)
30
- ? normalized
31
- : null;
65
+ function parsePlayerMetaDefinitionStatus(value) {
66
+ if (typeof value !== "string") {
67
+ return null;
68
+ }
69
+ const normalized = value.trim().toUpperCase();
70
+ return PLAYER_META_DEFINITION_STATUS_VALUES.includes(normalized) ? normalized : null;
32
71
  }
33
- export function parseAppAchievementKind(value) {
34
- if (typeof value !== 'string') {
35
- return null;
36
- }
37
- const normalized = value.trim().toUpperCase();
38
- return APP_ACHIEVEMENT_KIND_VALUES.includes(normalized)
39
- ? normalized
40
- : null;
72
+ function parseAppAchievementKind(value) {
73
+ if (typeof value !== "string") {
74
+ return null;
75
+ }
76
+ const normalized = value.trim().toUpperCase();
77
+ return APP_ACHIEVEMENT_KIND_VALUES.includes(normalized) ? normalized : null;
41
78
  }
42
- export function parseAppLeaderboardScoreType(value) {
43
- if (typeof value !== 'string') {
44
- return null;
45
- }
46
- const normalized = value.trim().toUpperCase();
47
- return APP_LEADERBOARD_SCORE_TYPE_VALUES.includes(normalized)
48
- ? normalized
49
- : null;
79
+ function parseAppLeaderboardScoreType(value) {
80
+ if (typeof value !== "string") {
81
+ return null;
82
+ }
83
+ const normalized = value.trim().toUpperCase();
84
+ return APP_LEADERBOARD_SCORE_TYPE_VALUES.includes(normalized) ? normalized : null;
50
85
  }
51
- export function parseAppLeaderboardSort(value) {
52
- if (typeof value !== 'string') {
53
- return null;
54
- }
55
- const normalized = value.trim().toUpperCase();
56
- return APP_LEADERBOARD_SORT_VALUES.includes(normalized)
57
- ? normalized
58
- : null;
86
+ function parseAppLeaderboardSort(value) {
87
+ if (typeof value !== "string") {
88
+ return null;
89
+ }
90
+ const normalized = value.trim().toUpperCase();
91
+ return APP_LEADERBOARD_SORT_VALUES.includes(normalized) ? normalized : null;
59
92
  }
60
- export function parseAdminAchievementMutationAction(value) {
61
- if (typeof value !== 'string') {
62
- return null;
63
- }
64
- const normalized = value.trim().toLowerCase();
65
- return ADMIN_ACHIEVEMENT_MUTATION_ACTION_VALUES.includes(normalized)
66
- ? normalized
67
- : null;
93
+ function parseAdminAchievementMutationAction(value) {
94
+ if (typeof value !== "string") {
95
+ return null;
96
+ }
97
+ const normalized = value.trim().toLowerCase();
98
+ return ADMIN_ACHIEVEMENT_MUTATION_ACTION_VALUES.includes(normalized) ? normalized : null;
68
99
  }
69
- export function parseAdminLeaderboardMutationAction(value) {
70
- if (typeof value !== 'string') {
71
- return null;
72
- }
73
- const normalized = value.trim().toLowerCase();
74
- return ADMIN_LEADERBOARD_MUTATION_ACTION_VALUES.includes(normalized)
75
- ? normalized
76
- : null;
100
+ function parseAdminLeaderboardMutationAction(value) {
101
+ if (typeof value !== "string") {
102
+ return null;
103
+ }
104
+ const normalized = value.trim().toLowerCase();
105
+ return ADMIN_LEADERBOARD_MUTATION_ACTION_VALUES.includes(normalized) ? normalized : null;
77
106
  }
78
- export function isSafeNonNegativeInteger(value) {
79
- return Number.isSafeInteger(value) && Number(value) >= 0;
107
+ function isSafeNonNegativeInteger(value) {
108
+ return Number.isSafeInteger(value) && Number(value) >= 0;
80
109
  }
81
- export function isSafePositiveInteger(value) {
82
- return Number.isSafeInteger(value) && Number(value) > 0;
110
+ function isSafePositiveInteger(value) {
111
+ return Number.isSafeInteger(value) && Number(value) > 0;
83
112
  }
84
- export function isValidLeaderboardDefinitionCombination(scoreType, sort) {
85
- return ((scoreType === 'INTEGER' && sort === 'DESC')
86
- || (scoreType === 'TIME_MS' && sort === 'ASC'));
113
+ function isValidLeaderboardDefinitionCombination(scoreType, sort) {
114
+ return scoreType === "INTEGER" && sort === "DESC" || scoreType === "TIME_MS" && sort === "ASC";
87
115
  }
88
- export function computeAchievementProgressPercent(progress, maxProgress) {
89
- if (!Number.isSafeInteger(progress) || progress < 0) {
90
- throw new Error('invalid_progress_value');
91
- }
92
- if (!Number.isSafeInteger(maxProgress) || maxProgress <= 0) {
93
- throw new Error('invalid_max_progress_value');
94
- }
95
- const clamped = Math.min(progress, maxProgress);
96
- return Math.floor((clamped / maxProgress) * 100);
116
+ function computeAchievementProgressPercent(progress, maxProgress) {
117
+ if (!Number.isSafeInteger(progress) || progress < 0) {
118
+ throw new Error("invalid_progress_value");
119
+ }
120
+ if (!Number.isSafeInteger(maxProgress) || maxProgress <= 0) {
121
+ throw new Error("invalid_max_progress_value");
122
+ }
123
+ const clamped = Math.min(progress, maxProgress);
124
+ return Math.floor(clamped / maxProgress * 100);
97
125
  }
98
- export function formatLeaderboardScore(score, scoreType, unitLabel) {
99
- if (!Number.isSafeInteger(score) || score < 0) {
100
- throw new Error('invalid_score_value');
101
- }
102
- if (scoreType === 'TIME_MS') {
103
- if (score <= 0) {
104
- throw new Error('invalid_time_score_value');
105
- }
106
- const totalMilliseconds = score;
107
- const minutes = Math.floor(totalMilliseconds / 60_000);
108
- const seconds = Math.floor((totalMilliseconds % 60_000) / 1_000);
109
- const milliseconds = totalMilliseconds % 1_000;
110
- return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}.${String(milliseconds).padStart(3, '0')}`;
126
+ function formatLeaderboardScore(score, scoreType, unitLabel) {
127
+ if (!Number.isSafeInteger(score) || score < 0) {
128
+ throw new Error("invalid_score_value");
129
+ }
130
+ if (scoreType === "TIME_MS") {
131
+ if (score <= 0) {
132
+ throw new Error("invalid_time_score_value");
111
133
  }
112
- const formatted = new Intl.NumberFormat('en-US').format(score);
113
- return unitLabel && unitLabel.trim().length > 0 ? `${formatted} ${unitLabel.trim()}` : formatted;
134
+ const totalMilliseconds = score;
135
+ const minutes = Math.floor(totalMilliseconds / 6e4);
136
+ const seconds = Math.floor(totalMilliseconds % 6e4 / 1e3);
137
+ const milliseconds = totalMilliseconds % 1e3;
138
+ return `${String(minutes).padStart(2, "0")}:${String(seconds).padStart(2, "0")}.${String(milliseconds).padStart(3, "0")}`;
139
+ }
140
+ const formatted = new Intl.NumberFormat("en-US").format(score);
141
+ return unitLabel && unitLabel.trim().length > 0 ? `${formatted} ${unitLabel.trim()}` : formatted;
114
142
  }
143
+ // Annotate the CommonJS export names for ESM import in node:
144
+ 0 && (module.exports = {
145
+ ADMIN_ACHIEVEMENT_MUTATION_ACTION_VALUES,
146
+ ADMIN_LEADERBOARD_MUTATION_ACTION_VALUES,
147
+ APP_ACHIEVEMENT_KIND_VALUES,
148
+ APP_LEADERBOARD_SCORE_TYPE_VALUES,
149
+ APP_LEADERBOARD_SORT_VALUES,
150
+ PLAYER_META_DEFINITION_STATUS_VALUES,
151
+ PLAYER_META_ERROR_CODE_VALUES,
152
+ PLAYER_META_KEY_REGEX,
153
+ computeAchievementProgressPercent,
154
+ formatLeaderboardScore,
155
+ isPlayerMetaKey,
156
+ isSafeNonNegativeInteger,
157
+ isSafePositiveInteger,
158
+ isValidLeaderboardDefinitionCombination,
159
+ parseAdminAchievementMutationAction,
160
+ parseAdminLeaderboardMutationAction,
161
+ parseAppAchievementKind,
162
+ parseAppLeaderboardScoreType,
163
+ parseAppLeaderboardSort,
164
+ parsePlayerMetaDefinitionStatus
165
+ });
@@ -1,7 +1,27 @@
1
- // ============================================================================
2
- // WebSocket Protocol Types - Extracted from services/realtime-server/src/index.ts
3
- // ============================================================================
4
- /**
5
- * Error codes used in ServerError frames.
6
- */
7
- export const PLAYDROP_REALTIME_TYPES_VERSION = 1;
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 realtime_exports = {};
19
+ __export(realtime_exports, {
20
+ PLAYDROP_REALTIME_TYPES_VERSION: () => PLAYDROP_REALTIME_TYPES_VERSION
21
+ });
22
+ module.exports = __toCommonJS(realtime_exports);
23
+ const PLAYDROP_REALTIME_TYPES_VERSION = 1;
24
+ // Annotate the CommonJS export names for ESM import in node:
25
+ 0 && (module.exports = {
26
+ PLAYDROP_REALTIME_TYPES_VERSION
27
+ });
@@ -1,139 +1,197 @@
1
- // ============================================================================
2
- // Versioning Enums
3
- // ============================================================================
4
- export const APP_HOSTING_MODE_VALUES = ['HOSTED', 'EXTERNAL'];
5
- export const DEFAULT_APP_HOSTING_MODE = 'HOSTED';
6
- export function isAppHostingMode(value) {
7
- if (typeof value !== 'string') {
8
- return false;
9
- }
10
- return APP_HOSTING_MODE_VALUES.includes(value.trim().toUpperCase());
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 version_exports = {};
19
+ __export(version_exports, {
20
+ APP_AUTH_MODE_VALUES: () => APP_AUTH_MODE_VALUES,
21
+ APP_CONTROLLER_MODE_VALUES: () => APP_CONTROLLER_MODE_VALUES,
22
+ APP_HOSTING_MODE_VALUES: () => APP_HOSTING_MODE_VALUES,
23
+ APP_UPLOAD_INIT_STATUS_VALUES: () => APP_UPLOAD_INIT_STATUS_VALUES,
24
+ APP_UPLOAD_LAUNCH_CHECK_STATUS_VALUES: () => APP_UPLOAD_LAUNCH_CHECK_STATUS_VALUES,
25
+ APP_UPLOAD_SESSION_STATUS_VALUES: () => APP_UPLOAD_SESSION_STATUS_VALUES,
26
+ APP_VERSION_VISIBILITY_VALUES: () => APP_VERSION_VISIBILITY_VALUES,
27
+ DEFAULT_APP_AUTH_MODE: () => DEFAULT_APP_AUTH_MODE,
28
+ DEFAULT_APP_CONTROLLER_MODE: () => DEFAULT_APP_CONTROLLER_MODE,
29
+ DEFAULT_APP_HOSTING_MODE: () => DEFAULT_APP_HOSTING_MODE,
30
+ DEFAULT_APP_PREVIEWABLE: () => DEFAULT_APP_PREVIEWABLE,
31
+ DEFAULT_APP_VERSION_VISIBILITY: () => DEFAULT_APP_VERSION_VISIBILITY,
32
+ REVIEW_STATE_VALUES: () => REVIEW_STATE_VALUES,
33
+ SEMVER_REGEX: () => SEMVER_REGEX,
34
+ compareVersions: () => compareVersions,
35
+ formatVersion: () => formatVersion,
36
+ isAppAuthMode: () => isAppAuthMode,
37
+ isAppControllerMode: () => isAppControllerMode,
38
+ isAppHostingMode: () => isAppHostingMode,
39
+ isAppVersionVisibility: () => isAppVersionVisibility,
40
+ isReviewState: () => isReviewState,
41
+ isValidVersion: () => isValidVersion,
42
+ parseAppAuthMode: () => parseAppAuthMode,
43
+ parseAppControllerMode: () => parseAppControllerMode,
44
+ parseAppHostingMode: () => parseAppHostingMode,
45
+ parseAppVersionVisibility: () => parseAppVersionVisibility,
46
+ parseReviewState: () => parseReviewState,
47
+ parseVersion: () => parseVersion
48
+ });
49
+ module.exports = __toCommonJS(version_exports);
50
+ const APP_HOSTING_MODE_VALUES = ["HOSTED", "EXTERNAL"];
51
+ const DEFAULT_APP_HOSTING_MODE = "HOSTED";
52
+ function isAppHostingMode(value) {
53
+ if (typeof value !== "string") {
54
+ return false;
55
+ }
56
+ return APP_HOSTING_MODE_VALUES.includes(value.trim().toUpperCase());
11
57
  }
12
- export function parseAppHostingMode(value) {
13
- if (typeof value !== 'string') {
14
- return null;
15
- }
16
- const normalized = value.trim().toUpperCase();
17
- return isAppHostingMode(normalized) ? normalized : null;
58
+ function parseAppHostingMode(value) {
59
+ if (typeof value !== "string") {
60
+ return null;
61
+ }
62
+ const normalized = value.trim().toUpperCase();
63
+ return isAppHostingMode(normalized) ? normalized : null;
18
64
  }
19
- export const APP_VERSION_VISIBILITY_VALUES = ['PRIVATE', 'PUBLIC'];
20
- export const DEFAULT_APP_VERSION_VISIBILITY = 'PUBLIC';
21
- export function isAppVersionVisibility(value) {
22
- if (typeof value !== 'string') {
23
- return false;
24
- }
25
- return APP_VERSION_VISIBILITY_VALUES.includes(value.trim().toUpperCase());
65
+ const APP_VERSION_VISIBILITY_VALUES = ["PRIVATE", "PUBLIC"];
66
+ const DEFAULT_APP_VERSION_VISIBILITY = "PUBLIC";
67
+ function isAppVersionVisibility(value) {
68
+ if (typeof value !== "string") {
69
+ return false;
70
+ }
71
+ return APP_VERSION_VISIBILITY_VALUES.includes(value.trim().toUpperCase());
26
72
  }
27
- export function parseAppVersionVisibility(value) {
28
- if (typeof value !== 'string') {
29
- return null;
30
- }
31
- const normalized = value.trim().toUpperCase();
32
- return isAppVersionVisibility(normalized) ? normalized : null;
73
+ function parseAppVersionVisibility(value) {
74
+ if (typeof value !== "string") {
75
+ return null;
76
+ }
77
+ const normalized = value.trim().toUpperCase();
78
+ return isAppVersionVisibility(normalized) ? normalized : null;
33
79
  }
34
- export const REVIEW_STATE_VALUES = [
35
- 'NOT_REQUIRED',
36
- 'QUEUED',
37
- 'RUNNING',
38
- 'SUPERSEDED',
39
- 'LOW_QUALITY',
40
- 'PASSED',
41
- 'GOOD',
42
- 'EXCELLENT',
43
- 'FAILED',
44
- 'ERROR',
80
+ const REVIEW_STATE_VALUES = [
81
+ "NOT_REQUIRED",
82
+ "QUEUED",
83
+ "RUNNING",
84
+ "SUPERSEDED",
85
+ "LOW_QUALITY",
86
+ "PASSED",
87
+ "GOOD",
88
+ "EXCELLENT",
89
+ "FAILED",
90
+ "ERROR"
45
91
  ];
46
- export function isReviewState(value) {
47
- if (typeof value !== 'string') {
48
- return false;
49
- }
50
- return REVIEW_STATE_VALUES.includes(value.trim().toUpperCase());
92
+ function isReviewState(value) {
93
+ if (typeof value !== "string") {
94
+ return false;
95
+ }
96
+ return REVIEW_STATE_VALUES.includes(value.trim().toUpperCase());
51
97
  }
52
- export function parseReviewState(value) {
53
- if (typeof value !== 'string') {
54
- return null;
55
- }
56
- const normalized = value.trim().toUpperCase();
57
- return isReviewState(normalized) ? normalized : null;
98
+ function parseReviewState(value) {
99
+ if (typeof value !== "string") {
100
+ return null;
101
+ }
102
+ const normalized = value.trim().toUpperCase();
103
+ return isReviewState(normalized) ? normalized : null;
58
104
  }
59
- export const APP_AUTH_MODE_VALUES = ['REQUIRED', 'OPTIONAL', 'NONE'];
60
- export const DEFAULT_APP_AUTH_MODE = 'REQUIRED';
61
- export function isAppAuthMode(value) {
62
- if (typeof value !== 'string') {
63
- return false;
64
- }
65
- return APP_AUTH_MODE_VALUES.includes(value.trim().toUpperCase());
105
+ const APP_AUTH_MODE_VALUES = ["REQUIRED", "OPTIONAL", "NONE"];
106
+ const DEFAULT_APP_AUTH_MODE = "REQUIRED";
107
+ function isAppAuthMode(value) {
108
+ if (typeof value !== "string") {
109
+ return false;
110
+ }
111
+ return APP_AUTH_MODE_VALUES.includes(value.trim().toUpperCase());
66
112
  }
67
- export function parseAppAuthMode(value) {
68
- if (typeof value !== 'string') {
69
- return null;
70
- }
71
- const normalized = value.trim().toUpperCase();
72
- return isAppAuthMode(normalized) ? normalized : null;
113
+ function parseAppAuthMode(value) {
114
+ if (typeof value !== "string") {
115
+ return null;
116
+ }
117
+ const normalized = value.trim().toUpperCase();
118
+ return isAppAuthMode(normalized) ? normalized : null;
73
119
  }
74
- export const APP_CONTROLLER_MODE_VALUES = ['UNSUPPORTED', 'SUPPORTED', 'REQUIRED'];
75
- export const DEFAULT_APP_CONTROLLER_MODE = 'UNSUPPORTED';
76
- export function isAppControllerMode(value) {
77
- if (typeof value !== 'string') {
78
- return false;
79
- }
80
- return APP_CONTROLLER_MODE_VALUES.includes(value.trim().toUpperCase());
120
+ const APP_CONTROLLER_MODE_VALUES = ["UNSUPPORTED", "SUPPORTED", "REQUIRED"];
121
+ const DEFAULT_APP_CONTROLLER_MODE = "UNSUPPORTED";
122
+ function isAppControllerMode(value) {
123
+ if (typeof value !== "string") {
124
+ return false;
125
+ }
126
+ return APP_CONTROLLER_MODE_VALUES.includes(value.trim().toUpperCase());
81
127
  }
82
- export function parseAppControllerMode(value) {
83
- if (typeof value !== 'string') {
84
- return null;
85
- }
86
- const normalized = value.trim().toUpperCase();
87
- return isAppControllerMode(normalized) ? normalized : null;
128
+ function parseAppControllerMode(value) {
129
+ if (typeof value !== "string") {
130
+ return null;
131
+ }
132
+ const normalized = value.trim().toUpperCase();
133
+ return isAppControllerMode(normalized) ? normalized : null;
88
134
  }
89
- export const DEFAULT_APP_PREVIEWABLE = false;
90
- /**
91
- * Regex for validating semantic version strings.
92
- * Format: Major.Minor.Patch where each is a non-negative integer.
93
- * Leading zeros are not allowed except for 0 itself.
94
- */
95
- export const SEMVER_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
96
- /**
97
- * Format a SemVer object as a string (e.g., "1.2.3").
98
- */
99
- export function formatVersion(v) {
100
- return `${v.major}.${v.minor}.${v.patch}`;
135
+ const DEFAULT_APP_PREVIEWABLE = false;
136
+ const SEMVER_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
137
+ function formatVersion(v) {
138
+ return `${v.major}.${v.minor}.${v.patch}`;
101
139
  }
102
- /**
103
- * Parse a version string into a SemVer object.
104
- * Returns null if the string is not a valid semantic version.
105
- */
106
- export function parseVersion(s) {
107
- const match = s.match(SEMVER_REGEX);
108
- if (!match)
109
- return null;
110
- const [, major, minor, patch] = match;
111
- if (!major || !minor || !patch) {
112
- return null;
113
- }
114
- return {
115
- major: parseInt(major, 10),
116
- minor: parseInt(minor, 10),
117
- patch: parseInt(patch, 10),
118
- };
140
+ function parseVersion(s) {
141
+ const match = s.match(SEMVER_REGEX);
142
+ if (!match)
143
+ return null;
144
+ const [, major, minor, patch] = match;
145
+ if (!major || !minor || !patch) {
146
+ return null;
147
+ }
148
+ return {
149
+ major: parseInt(major, 10),
150
+ minor: parseInt(minor, 10),
151
+ patch: parseInt(patch, 10)
152
+ };
119
153
  }
120
- /**
121
- * Check if a string is a valid semantic version.
122
- */
123
- export function isValidVersion(s) {
124
- return SEMVER_REGEX.test(s);
154
+ function isValidVersion(s) {
155
+ return SEMVER_REGEX.test(s);
125
156
  }
126
- /**
127
- * Compare two SemVer objects.
128
- * Returns negative if a < b, positive if a > b, zero if equal.
129
- */
130
- export function compareVersions(a, b) {
131
- if (a.major !== b.major)
132
- return a.major - b.major;
133
- if (a.minor !== b.minor)
134
- return a.minor - b.minor;
135
- return a.patch - b.patch;
157
+ function compareVersions(a, b) {
158
+ if (a.major !== b.major)
159
+ return a.major - b.major;
160
+ if (a.minor !== b.minor)
161
+ return a.minor - b.minor;
162
+ return a.patch - b.patch;
136
163
  }
137
- export const APP_UPLOAD_SESSION_STATUS_VALUES = ['OPEN', 'FINALIZED', 'ABORTED', 'EXPIRED'];
138
- export const APP_UPLOAD_INIT_STATUS_VALUES = ['created', 'resume', 'finalized'];
139
- export const APP_UPLOAD_LAUNCH_CHECK_STATUS_VALUES = ['NOT_RUN', 'PASSED', 'FAILED'];
164
+ const APP_UPLOAD_SESSION_STATUS_VALUES = ["OPEN", "FINALIZED", "ABORTED", "EXPIRED"];
165
+ const APP_UPLOAD_INIT_STATUS_VALUES = ["created", "resume", "finalized"];
166
+ const APP_UPLOAD_LAUNCH_CHECK_STATUS_VALUES = ["NOT_RUN", "PASSED", "FAILED"];
167
+ // Annotate the CommonJS export names for ESM import in node:
168
+ 0 && (module.exports = {
169
+ APP_AUTH_MODE_VALUES,
170
+ APP_CONTROLLER_MODE_VALUES,
171
+ APP_HOSTING_MODE_VALUES,
172
+ APP_UPLOAD_INIT_STATUS_VALUES,
173
+ APP_UPLOAD_LAUNCH_CHECK_STATUS_VALUES,
174
+ APP_UPLOAD_SESSION_STATUS_VALUES,
175
+ APP_VERSION_VISIBILITY_VALUES,
176
+ DEFAULT_APP_AUTH_MODE,
177
+ DEFAULT_APP_CONTROLLER_MODE,
178
+ DEFAULT_APP_HOSTING_MODE,
179
+ DEFAULT_APP_PREVIEWABLE,
180
+ DEFAULT_APP_VERSION_VISIBILITY,
181
+ REVIEW_STATE_VALUES,
182
+ SEMVER_REGEX,
183
+ compareVersions,
184
+ formatVersion,
185
+ isAppAuthMode,
186
+ isAppControllerMode,
187
+ isAppHostingMode,
188
+ isAppVersionVisibility,
189
+ isReviewState,
190
+ isValidVersion,
191
+ parseAppAuthMode,
192
+ parseAppControllerMode,
193
+ parseAppHostingMode,
194
+ parseAppVersionVisibility,
195
+ parseReviewState,
196
+ parseVersion
197
+ });
@@ -2,7 +2,7 @@
2
2
  "name": "@playdrop/types",
3
3
  "version": "0.7.2",
4
4
  "description": "Shared TypeScript types for Playdrop platform",
5
- "type": "module",
5
+ "type": "commonjs",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playdrop/playdrop-cli",
3
- "version": "0.7.13",
3
+ "version": "0.7.16",
4
4
  "description": "Official Playdrop CLI for publishing browser games, creator apps, and AI-generated game assets on playdrop.ai",
5
5
  "homepage": "https://www.playdrop.ai",
6
6
  "repository": {