@tutti-os/app-release-tools 0.0.13 → 0.0.15
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.
|
@@ -184,7 +184,7 @@ function validateManifestReferences(references, sourceLabel) {
|
|
|
184
184
|
throw new Error(`${sourceLabel} references must be an object`);
|
|
185
185
|
}
|
|
186
186
|
const unsupportedKey = Object.keys(references).find(
|
|
187
|
-
(key) => key !== "listEndpoint"
|
|
187
|
+
(key) => key !== "listEndpoint" && key !== "searchEndpoint"
|
|
188
188
|
);
|
|
189
189
|
if (unsupportedKey) {
|
|
190
190
|
throw new Error(
|
|
@@ -200,6 +200,17 @@ function validateManifestReferences(references, sourceLabel) {
|
|
|
200
200
|
`${sourceLabel}.references.listEndpoint must be a relative URL path without query or fragment`
|
|
201
201
|
);
|
|
202
202
|
}
|
|
203
|
+
if (references.searchEndpoint !== undefined) {
|
|
204
|
+
const searchEndpoint = requireNonEmpty(
|
|
205
|
+
references.searchEndpoint,
|
|
206
|
+
`${sourceLabel}.references.searchEndpoint`
|
|
207
|
+
);
|
|
208
|
+
if (!isRelativeURLPath(searchEndpoint)) {
|
|
209
|
+
throw new Error(
|
|
210
|
+
`${sourceLabel}.references.searchEndpoint must be a relative URL path without query or fragment`
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
203
214
|
}
|
|
204
215
|
|
|
205
216
|
export function validateCLIManifest(manifest, sourceLabel = "cli manifest") {
|
|
@@ -341,8 +352,8 @@ function validateCLIHandler(handler, label) {
|
|
|
341
352
|
throw new Error(`${label}.path must start with /tutti/cli/`);
|
|
342
353
|
}
|
|
343
354
|
const timeoutMs = handler.timeoutMs ?? 30000;
|
|
344
|
-
if (!Number.isInteger(timeoutMs) || timeoutMs < 1000 || timeoutMs >
|
|
345
|
-
throw new Error(`${label}.timeoutMs must be between 1000 and
|
|
355
|
+
if (!Number.isInteger(timeoutMs) || timeoutMs < 1000 || timeoutMs > 600000) {
|
|
356
|
+
throw new Error(`${label}.timeoutMs must be between 1000 and 600000`);
|
|
346
357
|
}
|
|
347
358
|
}
|
|
348
359
|
|