@playdrop/playdrop-cli 0.13.11 → 0.13.13
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 +2 -2
- package/dist/apps/build.d.ts +1 -0
- package/dist/apps/build.js +2 -0
- package/dist/apps/registration.js +5 -0
- package/dist/apps/upload.js +1 -0
- package/dist/catalogue.d.ts +3 -0
- package/dist/catalogue.js +14 -0
- package/node_modules/@playdrop/config/client-meta.json +2 -2
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/types/dist/api.d.ts +9 -1
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +11 -0
- package/node_modules/@playdrop/types/dist/version.d.ts +1 -0
- package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
- package/package.json +1 -1
package/config/client-meta.json
CHANGED
package/dist/apps/build.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { AppPlaytestTapes, AppSurface, AppType } from '@playdrop/types';
|
|
|
2
2
|
import type { AppTask } from '../catalogue';
|
|
3
3
|
export type AppBuildMetadata = {
|
|
4
4
|
displayName?: string;
|
|
5
|
+
subtitle?: string;
|
|
5
6
|
description?: string;
|
|
6
7
|
type?: AppType;
|
|
7
8
|
emoji?: string | null;
|
package/dist/apps/build.js
CHANGED
|
@@ -595,6 +595,8 @@ async function buildApp(task) {
|
|
|
595
595
|
const metadata = {};
|
|
596
596
|
if (task.displayName)
|
|
597
597
|
metadata.displayName = task.displayName;
|
|
598
|
+
if (task.subtitle)
|
|
599
|
+
metadata.subtitle = task.subtitle;
|
|
598
600
|
if (typeof task.description === 'string')
|
|
599
601
|
metadata.description = task.description;
|
|
600
602
|
if (task.type)
|
|
@@ -27,6 +27,7 @@ async function ensureRegisteredHostedAppShell(input) {
|
|
|
27
27
|
const createdResponse = await input.client.createApp(input.creatorUsername, {
|
|
28
28
|
name: input.task.name,
|
|
29
29
|
displayName,
|
|
30
|
+
subtitle: input.task.subtitle ?? null,
|
|
30
31
|
...(input.agentTaskId !== undefined ? { agentTaskId: input.agentTaskId } : {}),
|
|
31
32
|
...(input.task.remix ? { remixRef: input.task.remix } : {}),
|
|
32
33
|
});
|
|
@@ -40,6 +41,10 @@ async function ensureRegisteredHostedAppShell(input) {
|
|
|
40
41
|
if (app.displayName !== displayName) {
|
|
41
42
|
updateRequest.displayName = displayName;
|
|
42
43
|
}
|
|
44
|
+
const subtitle = input.task.subtitle ?? null;
|
|
45
|
+
if ((app.subtitle ?? null) !== subtitle) {
|
|
46
|
+
updateRequest.subtitle = subtitle;
|
|
47
|
+
}
|
|
43
48
|
if (input.task.type && app.type !== input.task.type) {
|
|
44
49
|
updateRequest.type = input.task.type;
|
|
45
50
|
}
|
package/dist/apps/upload.js
CHANGED
|
@@ -260,6 +260,7 @@ async function uploadAppVersion(client, task, artifacts, options) {
|
|
|
260
260
|
previewable: task.previewable,
|
|
261
261
|
skipReview: options?.skipReview,
|
|
262
262
|
displayName: task.displayName,
|
|
263
|
+
subtitle: task.subtitle,
|
|
263
264
|
description: task.description,
|
|
264
265
|
type: task.type,
|
|
265
266
|
emoji: task.emoji ?? undefined,
|
package/dist/catalogue.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export type ResolvedAppLeaderboardDefinition = Omit<AppLeaderboardCatalogueDefin
|
|
|
31
31
|
export type AppCatalogueEntry = {
|
|
32
32
|
name: string;
|
|
33
33
|
displayName?: string;
|
|
34
|
+
subtitle?: string;
|
|
34
35
|
description?: string;
|
|
35
36
|
file?: string;
|
|
36
37
|
type?: string;
|
|
@@ -175,6 +176,7 @@ export type AppTask = {
|
|
|
175
176
|
hasValidateScript: boolean;
|
|
176
177
|
hasFormatScript: boolean;
|
|
177
178
|
displayName?: string;
|
|
179
|
+
subtitle?: string;
|
|
178
180
|
description?: string;
|
|
179
181
|
type?: AppType;
|
|
180
182
|
emoji?: string | null;
|
|
@@ -344,6 +346,7 @@ export type SurfaceTargetsMap = {
|
|
|
344
346
|
};
|
|
345
347
|
export type ValidatedAppMetadata = {
|
|
346
348
|
displayName?: string;
|
|
349
|
+
subtitle?: string;
|
|
347
350
|
description?: string;
|
|
348
351
|
type?: AppType;
|
|
349
352
|
emoji?: string | null;
|
package/dist/catalogue.js
CHANGED
|
@@ -854,6 +854,18 @@ function validateAppMetadata(entry) {
|
|
|
854
854
|
if (typeof entry.displayName === 'string' && entry.displayName.trim()) {
|
|
855
855
|
displayName = entry.displayName.trim();
|
|
856
856
|
}
|
|
857
|
+
let subtitle;
|
|
858
|
+
if (Object.prototype.hasOwnProperty.call(entry, 'subtitle')) {
|
|
859
|
+
if (typeof entry.subtitle !== 'string' || entry.subtitle.trim().length === 0) {
|
|
860
|
+
errors.push('subtitle must be a non-empty string when provided');
|
|
861
|
+
}
|
|
862
|
+
else if (entry.subtitle.trim().length > types_1.APP_SUBTITLE_MAX_LENGTH) {
|
|
863
|
+
errors.push(`subtitle must be ${types_1.APP_SUBTITLE_MAX_LENGTH} characters or fewer`);
|
|
864
|
+
}
|
|
865
|
+
else {
|
|
866
|
+
subtitle = entry.subtitle.trim();
|
|
867
|
+
}
|
|
868
|
+
}
|
|
857
869
|
let description;
|
|
858
870
|
if (typeof entry.description === 'string') {
|
|
859
871
|
description = entry.description;
|
|
@@ -893,6 +905,7 @@ function validateAppMetadata(entry) {
|
|
|
893
905
|
}
|
|
894
906
|
return {
|
|
895
907
|
displayName,
|
|
908
|
+
subtitle,
|
|
896
909
|
description,
|
|
897
910
|
type,
|
|
898
911
|
emoji,
|
|
@@ -1506,6 +1519,7 @@ function buildAppTasks(rootDir, catalogues, options) {
|
|
|
1506
1519
|
hasValidateScript,
|
|
1507
1520
|
hasFormatScript,
|
|
1508
1521
|
displayName: metadata.displayName,
|
|
1522
|
+
subtitle: metadata.subtitle,
|
|
1509
1523
|
description: metadata.description,
|
|
1510
1524
|
type: metadata.type,
|
|
1511
1525
|
emoji: metadata.emoji === undefined ? undefined : metadata.emoji,
|