opentool 0.8.16 → 0.8.20
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/cli/index.d.ts +2 -2
- package/dist/cli/index.js +31 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -1
- package/dist/{validate-BsD3SEL4.d.ts → validate-C4a9tmrQ.d.ts} +6 -0
- package/package.json +1 -1
- package/templates/base/package.json +1 -1
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { M as Metadata, I as InternalToolDefinition } from '../validate-
|
|
3
|
-
export { G as GenerateMetadataOptions, a as GenerateMetadataResult, V as ValidateOptions, b as generateMetadata, g as generateMetadataCommand, l as loadAndValidateTools, v as validateCommand, c as validateFullCommand } from '../validate-
|
|
2
|
+
import { M as Metadata, I as InternalToolDefinition } from '../validate-C4a9tmrQ.js';
|
|
3
|
+
export { G as GenerateMetadataOptions, a as GenerateMetadataResult, V as ValidateOptions, b as generateMetadata, g as generateMetadataCommand, l as loadAndValidateTools, v as validateCommand, c as validateFullCommand } from '../validate-C4a9tmrQ.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../x402/index.js';
|
|
6
6
|
import 'viem';
|
package/dist/cli/index.js
CHANGED
|
@@ -1179,6 +1179,37 @@ async function loadAndValidateTools(toolsDir, options = {}) {
|
|
|
1179
1179
|
}
|
|
1180
1180
|
});
|
|
1181
1181
|
}
|
|
1182
|
+
const templateConfigRaw = toolModule?.profile?.templateConfig;
|
|
1183
|
+
if (templateConfigRaw !== void 0) {
|
|
1184
|
+
if (!templateConfigRaw || typeof templateConfigRaw !== "object") {
|
|
1185
|
+
throw new Error(`${file}: profile.templateConfig must be an object.`);
|
|
1186
|
+
}
|
|
1187
|
+
const record = templateConfigRaw;
|
|
1188
|
+
const version = record.version;
|
|
1189
|
+
if (typeof version !== "string" && typeof version !== "number") {
|
|
1190
|
+
throw new Error(
|
|
1191
|
+
`${file}: profile.templateConfig.version must be a string or number.`
|
|
1192
|
+
);
|
|
1193
|
+
}
|
|
1194
|
+
const schema2 = record.schema;
|
|
1195
|
+
if (schema2 !== void 0 && (!schema2 || typeof schema2 !== "object" || Array.isArray(schema2))) {
|
|
1196
|
+
throw new Error(
|
|
1197
|
+
`${file}: profile.templateConfig.schema must be an object when provided.`
|
|
1198
|
+
);
|
|
1199
|
+
}
|
|
1200
|
+
const defaults = record.defaults;
|
|
1201
|
+
if (defaults !== void 0 && (!defaults || typeof defaults !== "object" || Array.isArray(defaults))) {
|
|
1202
|
+
throw new Error(
|
|
1203
|
+
`${file}: profile.templateConfig.defaults must be an object when provided.`
|
|
1204
|
+
);
|
|
1205
|
+
}
|
|
1206
|
+
const envVar = record.envVar;
|
|
1207
|
+
if (envVar !== void 0 && (typeof envVar !== "string" || envVar.trim().length === 0)) {
|
|
1208
|
+
throw new Error(
|
|
1209
|
+
`${file}: profile.templateConfig.envVar must be a non-empty string when provided.`
|
|
1210
|
+
);
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1182
1213
|
if (hasGET && schedule && typeof schedule.cron === "string" && schedule.cron.trim().length > 0) {
|
|
1183
1214
|
normalizedSchedule = normalizeScheduleExpression(schedule.cron, file);
|
|
1184
1215
|
if (typeof schedule.enabled === "boolean") {
|