@playdrop/playdrop-cli 0.9.6 → 0.10.1

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 (73) hide show
  1. package/config/client-meta.json +2 -2
  2. package/dist/apiClient.d.ts +10 -0
  3. package/dist/apiClient.js +55 -2
  4. package/dist/appUrls.d.ts +1 -0
  5. package/dist/appUrls.js +9 -0
  6. package/dist/apps/build.js +39 -28
  7. package/dist/apps/index.d.ts +1 -0
  8. package/dist/apps/index.js +2 -0
  9. package/dist/apps/launchCheck.d.ts +2 -0
  10. package/dist/apps/launchCheck.js +31 -6
  11. package/dist/apps/registration.d.ts +1 -0
  12. package/dist/apps/registration.js +1 -0
  13. package/dist/apps/upload.d.ts +1 -0
  14. package/dist/apps/upload.js +4 -17
  15. package/dist/captureRuntime.d.ts +14 -0
  16. package/dist/captureRuntime.js +329 -0
  17. package/dist/catalogue.d.ts +4 -2
  18. package/dist/catalogue.js +50 -7
  19. package/dist/commandContext.js +61 -4
  20. package/dist/commands/capture.d.ts +1 -0
  21. package/dist/commands/capture.js +30 -13
  22. package/dist/commands/captureRemote.d.ts +2 -0
  23. package/dist/commands/captureRemote.js +90 -0
  24. package/dist/commands/create.d.ts +0 -1
  25. package/dist/commands/create.js +2 -151
  26. package/dist/commands/creations.d.ts +0 -13
  27. package/dist/commands/creations.js +0 -141
  28. package/dist/commands/dev.d.ts +2 -1
  29. package/dist/commands/dev.js +23 -6
  30. package/dist/commands/devServer.js +3 -1
  31. package/dist/commands/generation.d.ts +1 -0
  32. package/dist/commands/generation.js +274 -0
  33. package/dist/commands/review.d.ts +46 -0
  34. package/dist/commands/review.js +353 -0
  35. package/dist/commands/upload.d.ts +27 -1
  36. package/dist/commands/upload.js +962 -21
  37. package/dist/commands/validate.js +5 -0
  38. package/dist/commands/worker/runtime.d.ts +81 -0
  39. package/dist/commands/worker/runtime.js +458 -0
  40. package/dist/commands/worker.d.ts +158 -0
  41. package/dist/commands/worker.js +2626 -0
  42. package/dist/config.d.ts +2 -0
  43. package/dist/config.js +23 -0
  44. package/dist/index.js +116 -30
  45. package/dist/shellProbe.d.ts +1 -1
  46. package/dist/shellProbe.js +3 -3
  47. package/dist/workspaceAuth.d.ts +3 -0
  48. package/dist/workspaceAuth.js +14 -0
  49. package/node_modules/@playdrop/api-client/dist/client.d.ts +36 -15
  50. package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
  51. package/node_modules/@playdrop/api-client/dist/client.js +2 -2
  52. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +5 -2
  53. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
  54. package/node_modules/@playdrop/api-client/dist/domains/admin.js +51 -3
  55. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +75 -0
  56. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -0
  57. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +478 -0
  58. package/node_modules/@playdrop/api-client/dist/index.d.ts +36 -15
  59. package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
  60. package/node_modules/@playdrop/api-client/dist/index.js +153 -42
  61. package/node_modules/@playdrop/config/client-meta.json +2 -2
  62. package/node_modules/@playdrop/types/dist/api.d.ts +662 -75
  63. package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
  64. package/node_modules/@playdrop/types/dist/api.js +100 -9
  65. package/node_modules/@playdrop/types/dist/app.d.ts +2 -0
  66. package/node_modules/@playdrop/types/dist/app.d.ts.map +1 -1
  67. package/node_modules/@playdrop/types/dist/app.js +3 -0
  68. package/node_modules/@playdrop/types/dist/version.d.ts +1 -0
  69. package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
  70. package/package.json +2 -1
  71. package/node_modules/@playdrop/api-client/dist/domains/game-ideas.d.ts +0 -46
  72. package/node_modules/@playdrop/api-client/dist/domains/game-ideas.d.ts.map +0 -1
  73. package/node_modules/@playdrop/api-client/dist/domains/game-ideas.js +0 -177
@@ -0,0 +1,353 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.REQUIRED_REVIEW_EVIDENCE_FILES = exports.REVIEW_CRITERIA = void 0;
7
+ exports.validateGameReviewResult = validateGameReviewResult;
8
+ exports.validateReviewResultCommand = validateReviewResultCommand;
9
+ exports.composeReviewEvidence = composeReviewEvidence;
10
+ exports.createReviewRatingCard = createReviewRatingCard;
11
+ const node_path_1 = __importDefault(require("node:path"));
12
+ const node_fs_1 = require("node:fs");
13
+ const sharp_1 = __importDefault(require("sharp"));
14
+ const output_1 = require("../output");
15
+ exports.REVIEW_CRITERIA = [
16
+ 'Gameplay / Core Loop',
17
+ 'Depth / Replayability',
18
+ 'Controls / Input',
19
+ 'UX / Usability',
20
+ 'First Time User Experience',
21
+ 'Visuals / Art Direction',
22
+ 'Audio / Feedback',
23
+ 'Store Listing & Metadata Accuracy',
24
+ 'Safety / Age Rating / Compliance',
25
+ 'Performance / Stability',
26
+ ];
27
+ const TERMINAL_REVIEW_STATES = new Set([
28
+ 'FAILED',
29
+ 'LOW_QUALITY',
30
+ 'PASSED',
31
+ 'GOOD',
32
+ 'EXCELLENT',
33
+ ]);
34
+ const STATE_OUTCOME = {
35
+ EXCELLENT: 'Excellent',
36
+ FAILED: 'Blocked',
37
+ GOOD: 'Good',
38
+ LOW_QUALITY: 'Limited',
39
+ PASSED: 'Passed',
40
+ };
41
+ exports.REQUIRED_REVIEW_EVIDENCE_FILES = [
42
+ 'core.png',
43
+ 'win.png',
44
+ 'loss.png',
45
+ 'composite.png',
46
+ 'rating-card.png',
47
+ ];
48
+ const REVIEW_EVIDENCE_MAX_BYTES = 10 * 1024 * 1024;
49
+ function resolveFilePath(filePath, code) {
50
+ const normalized = typeof filePath === 'string' ? filePath.trim() : '';
51
+ if (!normalized) {
52
+ throw new Error(code);
53
+ }
54
+ return node_path_1.default.isAbsolute(normalized) ? normalized : node_path_1.default.resolve(process.cwd(), normalized);
55
+ }
56
+ async function readRequiredTextFile(filePath, code) {
57
+ const resolved = resolveFilePath(filePath, code);
58
+ const content = await node_fs_1.promises.readFile(resolved, 'utf8');
59
+ if (!content.trim()) {
60
+ throw new Error(code);
61
+ }
62
+ return content;
63
+ }
64
+ function requireLine(text, prefix) {
65
+ const line = text.split(/\r?\n/).find((entry) => entry.startsWith(prefix));
66
+ if (!line) {
67
+ throw new Error(`missing_review_line:${prefix}`);
68
+ }
69
+ return line.slice(prefix.length).trim();
70
+ }
71
+ function normalizeReviewText(...values) {
72
+ return values
73
+ .join(' ')
74
+ .toLowerCase()
75
+ .replace(/\s+/g, ' ')
76
+ .trim();
77
+ }
78
+ function parseScores(reviewMessage) {
79
+ if (/\/5\b/.test(reviewMessage)) {
80
+ throw new Error('review_scores_must_use_10_point_scale');
81
+ }
82
+ const scores = {};
83
+ for (const criterion of exports.REVIEW_CRITERIA) {
84
+ const escaped = criterion.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
85
+ const regex = new RegExp(`^- ${escaped}: (10|[1-9])/10 \\| .+`, 'm');
86
+ const match = reviewMessage.match(regex);
87
+ if (!match) {
88
+ throw new Error(`missing_or_invalid_criterion_score:${criterion}`);
89
+ }
90
+ scores[criterion] = Number.parseInt(match[1], 10);
91
+ }
92
+ return scores;
93
+ }
94
+ function averageScore(scores) {
95
+ const values = Object.values(scores);
96
+ return values.reduce((sum, value) => sum + value, 0) / values.length;
97
+ }
98
+ function minimumScore(scores) {
99
+ return Math.min(...Object.values(scores));
100
+ }
101
+ function validateOutcomeAgainstScores(outcome, scores) {
102
+ const average = averageScore(scores);
103
+ const minimum = minimumScore(scores);
104
+ const gameplay = scores['Gameplay / Core Loop'];
105
+ const controls = scores['Controls / Input'];
106
+ const ux = scores['UX / Usability'];
107
+ const ftue = scores['First Time User Experience'];
108
+ const visuals = scores['Visuals / Art Direction'];
109
+ const performance = scores['Performance / Stability'];
110
+ const actual = `actual=average=${average.toFixed(2)},minimum=${minimum},gameplay=${gameplay},controls=${controls},ux=${ux},ftue=${ftue},visuals=${visuals},performance=${performance}`;
111
+ if (outcome === 'Excellent' && (average < 8.5 || minimum < 7 || gameplay < 8 || controls < 8 || ux < 8 || ftue < 7 || visuals < 8 || performance < 8)) {
112
+ throw new Error(`excellent_outcome_not_supported_by_scores:requires=average>=8.5,minimum>=7,gameplay>=8,controls>=8,ux>=8,ftue>=7,visuals>=8,performance>=8:${actual}:use_good_or_lower_outcome_unless_scores_are_supported_by_evidence`);
113
+ }
114
+ if (outcome === 'Good' && (average < 7.5 || minimum < 6 || gameplay < 7 || controls < 7 || ux < 7 || ftue < 6 || visuals < 7 || performance < 7)) {
115
+ throw new Error(`good_outcome_not_supported_by_scores:requires=average>=7.5,minimum>=6,gameplay>=7,controls>=7,ux>=7,ftue>=6,visuals>=7,performance>=7:${actual}:use_passed_or_lower_outcome_unless_scores_are_supported_by_evidence`);
116
+ }
117
+ if (outcome === 'Passed' && (average < 6 || minimum < 4 || gameplay < 5 || controls < 5 || performance < 5)) {
118
+ throw new Error(`passed_outcome_not_supported_by_scores:requires=average>=6,minimum>=4,gameplay>=5,controls>=5,performance>=5:${actual}:use_low_quality_or_failed_unless_scores_are_supported_by_evidence`);
119
+ }
120
+ }
121
+ function validateRequiredEvidenceLines(reviewMessage) {
122
+ const primaryVerb = requireLine(reviewMessage, 'Primary player verb: ');
123
+ const primaryEvidence = requireLine(reviewMessage, 'Primary interaction evidence: ');
124
+ const challengeEvidence = requireLine(reviewMessage, 'Challenge evidence: ');
125
+ const punchline = requireLine(reviewMessage, 'Punchline assessment: ');
126
+ const benchmark = requireLine(reviewMessage, 'Comparable benchmark: ');
127
+ if (primaryVerb.length < 3) {
128
+ throw new Error('primary_player_verb_too_vague');
129
+ }
130
+ if (primaryEvidence.length < 20) {
131
+ throw new Error('primary_interaction_evidence_too_vague');
132
+ }
133
+ if (challengeEvidence.length < 20) {
134
+ throw new Error('challenge_evidence_too_vague');
135
+ }
136
+ if (punchline.length < 8 || punchline.length > 160) {
137
+ throw new Error('punchline_assessment_invalid_length');
138
+ }
139
+ if (benchmark.length < 8) {
140
+ throw new Error('comparable_benchmark_too_vague');
141
+ }
142
+ }
143
+ function isNoScoreCaps(scoreCapsApplied) {
144
+ return scoreCapsApplied.trim().toLowerCase() === 'none';
145
+ }
146
+ function validateCapConsistency(input) {
147
+ const normalizedText = normalizeReviewText(input.reviewMessage, input.creatorFeedback);
148
+ const describesZeroChallenge = /\bzero challenge\b|\bno (?:real |meaningful )?challenge\b(?!-)|\bchallenge (?:is )?(?:absent|missing|nonexistent)\b/.test(normalizedText);
149
+ const describesPrimaryMissing = /\bprimary (?:interaction|verb) (?:is )?(?:absent|missing|unavailable)\b/.test(normalizedText);
150
+ if (isNoScoreCaps(input.scoreCapsApplied) && (describesZeroChallenge || describesPrimaryMissing)) {
151
+ const trigger = describesZeroChallenge ? 'zero_or_missing_challenge' : 'primary_interaction_missing';
152
+ throw new Error(`missing_required_score_cap:${trigger}:score_caps_applied_must_name_the_triggered_cap_or_adjust_the_evidence_wording`);
153
+ }
154
+ if (describesZeroChallenge && (['Passed', 'Good', 'Excellent'].includes(input.outcome) || input.scores['Gameplay / Core Loop'] > 3 || input.scores['Depth / Replayability'] > 3)) {
155
+ throw new Error('gameplay_challenge_absent_score_cap_required');
156
+ }
157
+ }
158
+ async function assertPngFile(filePath) {
159
+ const bytes = await node_fs_1.promises.readFile(filePath);
160
+ if (bytes.length <= 0 || bytes.length > REVIEW_EVIDENCE_MAX_BYTES) {
161
+ throw new Error(`invalid_review_evidence_size:${filePath}`);
162
+ }
163
+ const signature = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];
164
+ for (let index = 0; index < signature.length; index += 1) {
165
+ if (bytes[index] !== signature[index]) {
166
+ throw new Error(`review_evidence_not_png:${filePath}`);
167
+ }
168
+ }
169
+ }
170
+ async function validateGameReviewResult(input) {
171
+ const normalizedState = String(input.reviewState || '').trim().toUpperCase();
172
+ if (!TERMINAL_REVIEW_STATES.has(normalizedState)) {
173
+ return { skipped: true, reason: 'non_terminal_state' };
174
+ }
175
+ if (!input.reviewMessage.trim()) {
176
+ throw new Error('missing_review_message');
177
+ }
178
+ const creatorFeedback = input.creatorFeedback ?? '';
179
+ if (!creatorFeedback.trim()) {
180
+ throw new Error('missing_creator_feedback');
181
+ }
182
+ if (!input.evidenceDir.trim()) {
183
+ throw new Error('missing_evidence_dir');
184
+ }
185
+ const expectedOutcome = STATE_OUTCOME[normalizedState];
186
+ const actualOutcome = requireLine(input.reviewMessage, 'Outcome: ');
187
+ if (actualOutcome !== expectedOutcome) {
188
+ throw new Error(`review_outcome_state_mismatch:${actualOutcome}:${normalizedState}`);
189
+ }
190
+ const primarySurface = requireLine(input.reviewMessage, 'Primary reviewed surface: ');
191
+ if (!['MOBILE_PORTRAIT', 'MOBILE_LANDSCAPE', 'DESKTOP'].includes(primarySurface)) {
192
+ throw new Error(`invalid_primary_reviewed_surface:${primarySurface}`);
193
+ }
194
+ validateRequiredEvidenceLines(input.reviewMessage);
195
+ const scoreCapsApplied = requireLine(input.reviewMessage, 'Score caps applied: ');
196
+ if (!creatorFeedback.includes(`Reviewed surface: ${primarySurface}`)) {
197
+ throw new Error('creator_feedback_missing_reviewed_surface');
198
+ }
199
+ const scores = parseScores(input.reviewMessage);
200
+ validateOutcomeAgainstScores(actualOutcome, scores);
201
+ validateCapConsistency({
202
+ creatorFeedback,
203
+ outcome: actualOutcome,
204
+ reviewMessage: input.reviewMessage,
205
+ scoreCapsApplied,
206
+ scores,
207
+ });
208
+ const evidenceDir = resolveFilePath(input.evidenceDir, 'missing_evidence_dir');
209
+ for (const filename of exports.REQUIRED_REVIEW_EVIDENCE_FILES) {
210
+ await assertPngFile(node_path_1.default.join(evidenceDir, filename));
211
+ }
212
+ return {
213
+ average: averageScore(scores),
214
+ evidenceDir,
215
+ outcome: actualOutcome,
216
+ primarySurface,
217
+ scoreCount: Object.keys(scores).length,
218
+ skipped: false,
219
+ };
220
+ }
221
+ async function validateReviewResultCommand(options) {
222
+ const result = await validateGameReviewResult({
223
+ creatorFeedback: options.creatorFeedbackFile ? await readRequiredTextFile(options.creatorFeedbackFile, 'invalid_creator_feedback_file') : '',
224
+ evidenceDir: options.evidenceDir,
225
+ reviewMessage: await readRequiredTextFile(options.messageFile, 'invalid_review_message_file'),
226
+ reviewState: options.state,
227
+ });
228
+ console.log(JSON.stringify(result, null, 2));
229
+ }
230
+ async function resizeForComposite(filePath) {
231
+ const image = (0, sharp_1.default)(resolveFilePath(filePath, 'invalid_review_evidence_file'));
232
+ const metadata = await image.metadata();
233
+ if (!metadata.width || !metadata.height) {
234
+ throw new Error('invalid_review_evidence_image');
235
+ }
236
+ const buffer = await image
237
+ .resize({ width: 540, height: 960, fit: 'inside', withoutEnlargement: true })
238
+ .png()
239
+ .toBuffer();
240
+ const resizedMetadata = await (0, sharp_1.default)(buffer).metadata();
241
+ if (!resizedMetadata.width || !resizedMetadata.height) {
242
+ throw new Error('invalid_review_evidence_image');
243
+ }
244
+ return { buffer, width: resizedMetadata.width, height: resizedMetadata.height };
245
+ }
246
+ async function composeReviewEvidence(options) {
247
+ const entries = [
248
+ options.core ? { label: 'core', path: options.core } : null,
249
+ options.win ? { label: 'win', path: options.win } : null,
250
+ options.loss ? { label: 'loss', path: options.loss } : null,
251
+ ].filter((entry) => Boolean(entry));
252
+ if (entries.length === 0) {
253
+ throw new Error('missing_review_evidence_images');
254
+ }
255
+ const images = await Promise.all(entries.map((entry) => resizeForComposite(entry.path)));
256
+ const padding = 16;
257
+ const width = images.reduce((sum, image) => sum + image.width, padding * (images.length + 1));
258
+ const height = Math.max(...images.map((image) => image.height)) + padding * 2;
259
+ let left = padding;
260
+ const composites = images.map((image) => {
261
+ const composite = { input: image.buffer, left, top: padding };
262
+ left += image.width + padding;
263
+ return composite;
264
+ });
265
+ const outputPath = resolveFilePath(options.out, 'missing_out');
266
+ await node_fs_1.promises.mkdir(node_path_1.default.dirname(outputPath), { recursive: true });
267
+ await (0, sharp_1.default)({
268
+ create: {
269
+ width,
270
+ height,
271
+ channels: 4,
272
+ background: { r: 12, g: 12, b: 16, alpha: 1 },
273
+ },
274
+ })
275
+ .composite(composites)
276
+ .png()
277
+ .toFile(outputPath);
278
+ (0, output_1.printSuccess)(`Review evidence composite written to ${outputPath}`);
279
+ return { outputPath, imageCount: images.length };
280
+ }
281
+ function escapeXml(value) {
282
+ return value
283
+ .replace(/&/g, '&amp;')
284
+ .replace(/</g, '&lt;')
285
+ .replace(/>/g, '&gt;')
286
+ .replace(/"/g, '&quot;');
287
+ }
288
+ function parseCriterionRating(reviewMessage, criterion) {
289
+ const escaped = criterion.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
290
+ const regex = new RegExp(`^- ${escaped}: (10|[1-9])/10 \\| .+`, 'm');
291
+ const match = reviewMessage.match(regex);
292
+ if (!match) {
293
+ throw new Error(`missing_or_invalid_criterion_score:${criterion}`);
294
+ }
295
+ return Number.parseInt(match[1], 10);
296
+ }
297
+ function ratingColor(score) {
298
+ if (score <= 1)
299
+ return '#ff3b30';
300
+ if (score <= 4)
301
+ return '#ff9500';
302
+ if (score <= 6)
303
+ return '#ffd60a';
304
+ if (score <= 9)
305
+ return '#34c759';
306
+ return '#bf5af2';
307
+ }
308
+ function outcomeColor(outcome) {
309
+ if (outcome === 'Blocked')
310
+ return '#ff3b30';
311
+ if (outcome === 'Limited')
312
+ return '#ff9500';
313
+ if (outcome === 'Passed')
314
+ return '#ffd60a';
315
+ if (outcome === 'Good')
316
+ return '#34c759';
317
+ if (outcome === 'Excellent')
318
+ return '#bf5af2';
319
+ return '#ff9500';
320
+ }
321
+ async function createReviewRatingCard(options) {
322
+ const reviewMessage = await readRequiredTextFile(options.reviewMessageFile, 'invalid_review_message_file');
323
+ const outcome = requireLine(reviewMessage, 'Outcome: ');
324
+ const punchline = (options.punchline?.trim() || requireLine(reviewMessage, 'Punchline assessment: ')).slice(0, 160);
325
+ const title = (options.title?.trim() || 'Game review ratings').slice(0, 80);
326
+ const rows = exports.REVIEW_CRITERIA.map((criterion, index) => {
327
+ const score = parseCriterionRating(reviewMessage, criterion);
328
+ const x = index < 5 ? 56 : 628;
329
+ const y = 170 + (index % 5) * 92;
330
+ return `
331
+ <rect x="${x}" y="${y}" width="516" height="70" rx="6" fill="#15151c" stroke="#333340"/>
332
+ <rect x="${x}" y="${y}" width="8" height="70" fill="${ratingColor(score)}"/>
333
+ <text x="${x + 24}" y="${y + 42}" fill="#f5f5f7" font-size="22" font-weight="700">${escapeXml(criterion)}</text>
334
+ <text x="${x + 448}" y="${y + 44}" fill="${ratingColor(score)}" font-size="32" font-weight="800" text-anchor="end">${score}/10</text>
335
+ `;
336
+ }).join('');
337
+ const svg = `
338
+ <svg width="1200" height="760" xmlns="http://www.w3.org/2000/svg">
339
+ <rect width="1200" height="760" fill="#000"/>
340
+ <text x="56" y="82" fill="#fff" font-size="38" font-weight="800">${escapeXml(title)}</text>
341
+ <text x="1144" y="82" fill="${outcomeColor(outcome)}" font-size="30" font-weight="800" text-anchor="end">${escapeXml(outcome)}</text>
342
+ <line x1="56" y1="122" x2="1144" y2="122" stroke="#333340"/>
343
+ ${rows}
344
+ <line x1="56" y1="650" x2="1144" y2="650" stroke="#333340"/>
345
+ <text x="600" y="708" fill="${outcomeColor(outcome)}" font-size="32" font-weight="800" text-anchor="middle">${escapeXml(punchline)}</text>
346
+ </svg>
347
+ `;
348
+ const outputPath = resolveFilePath(options.out, 'missing_out');
349
+ await node_fs_1.promises.mkdir(node_path_1.default.dirname(outputPath), { recursive: true });
350
+ await (0, sharp_1.default)(Buffer.from(svg)).png().toFile(outputPath);
351
+ (0, output_1.printSuccess)(`Review rating card written to ${outputPath}`);
352
+ return { outputPath, width: 1200, height: 760 };
353
+ }
@@ -1,8 +1,34 @@
1
+ import type { ApiClient } from '@playdrop/api-client';
2
+ import type { UserResponse } from '@playdrop/types';
1
3
  export type UploadCommandOptions = {
2
4
  env?: string;
3
5
  skipEcs?: boolean;
4
6
  skipReview?: boolean;
5
7
  clearTags?: boolean;
6
- gameIdea?: string;
7
8
  };
8
9
  export declare function upload(pathOrName: string, options?: UploadCommandOptions): Promise<void>;
10
+ export type WorkerAppPublishInput = {
11
+ client: ApiClient;
12
+ taskId: number;
13
+ kind: 'NEW_GAME' | 'GAME_UPDATE';
14
+ expectedAppName?: string | null;
15
+ playdropAssetRequirement?: WorkerPlaydropAssetRequirement | null;
16
+ creatorRequest?: string | null;
17
+ projectDir: string;
18
+ creatorUsername: string;
19
+ apiBase: string;
20
+ webBase?: string | null;
21
+ token: string;
22
+ user: UserResponse;
23
+ };
24
+ export type WorkerAppPublishResult = {
25
+ appId: number;
26
+ appVersionId: number;
27
+ versionNodeId: string;
28
+ version: string;
29
+ appName: string;
30
+ creatorUsername: string;
31
+ warnings: string[];
32
+ };
33
+ export type WorkerPlaydropAssetRequirement = 'PACK' | 'ASSET_OR_PACK';
34
+ export declare function publishWorkerAppProject(input: WorkerAppPublishInput): Promise<WorkerAppPublishResult>;