@jclvsh/dropspace 2.7.2 → 2.7.3
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/dist/commands/launches.js +3 -0
- package/dist/tools/launches.js +13 -2
- package/package.json +1 -1
|
@@ -66,6 +66,9 @@ export function registerLaunchCommands(program, client) {
|
|
|
66
66
|
body.publish = true;
|
|
67
67
|
if (opts.wait)
|
|
68
68
|
body.wait = true;
|
|
69
|
+
if (!body.product_description && !body.product_url && !body.custom_content && !body.platform_contents) {
|
|
70
|
+
throw new Error("provide --url or --description (or --custom-content / --platform-contents)");
|
|
71
|
+
}
|
|
69
72
|
const result = await client.post("/launches", body);
|
|
70
73
|
formatOutput(result, getFormat(program.opts()));
|
|
71
74
|
}
|
package/dist/tools/launches.js
CHANGED
|
@@ -77,14 +77,14 @@ export function registerLaunchTools(server, client) {
|
|
|
77
77
|
product_description: z
|
|
78
78
|
.string()
|
|
79
79
|
.optional()
|
|
80
|
-
.describe("product description
|
|
80
|
+
.describe("product description — required unless product_url, custom_content, or platform_contents is provided"),
|
|
81
81
|
platforms: z
|
|
82
82
|
.array(z.enum(PLATFORMS))
|
|
83
83
|
.min(1)
|
|
84
84
|
.max(10)
|
|
85
85
|
.optional()
|
|
86
86
|
.describe("target platforms - required unless dropspace_platforms or user_platform_accounts is provided (inferred from their union)"),
|
|
87
|
-
product_url: z.string().url().optional().describe("product URL"),
|
|
87
|
+
product_url: z.string().url().optional().describe("product URL — scraped to generate content; can substitute for product_description"),
|
|
88
88
|
scheduled_date: z
|
|
89
89
|
.string()
|
|
90
90
|
.optional()
|
|
@@ -141,6 +141,17 @@ export function registerLaunchTools(server, client) {
|
|
|
141
141
|
.optional()
|
|
142
142
|
.describe("wait for publishing to complete and return post URLs inline (returns 200). requires publish: true"),
|
|
143
143
|
}, async (args) => {
|
|
144
|
+
if (!args.product_description && !args.product_url && !args.custom_content && !args.platform_contents) {
|
|
145
|
+
return {
|
|
146
|
+
content: [
|
|
147
|
+
{
|
|
148
|
+
type: "text",
|
|
149
|
+
text: "error: provide a product_url or product_description (or custom_content / platform_contents) so dropspace can generate the launch.",
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
isError: true,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
144
155
|
try {
|
|
145
156
|
const result = await client.post("/launches", args);
|
|
146
157
|
return {
|