openany-cli-dev 0.1.6 → 0.1.8
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/README.md +12 -1
- package/package.json +1 -1
- package/skills/openany-provider/SKILL.md +2 -0
- package/skills/openany-provider/SKILL.zh-CN.md +2 -0
- package/skills/openany-provider/references/publishing.md +3 -1
- package/skills/openany-provider/references/publishing.zh-CN.md +3 -1
- package/src/catalog.js +6 -2
- package/src/cli.js +8 -2
- package/src/config.js +27 -0
- package/src/http.js +4 -0
- package/src/provider-api-import-v2.js +9 -2
- package/src/provider-imports.js +1 -1
package/README.md
CHANGED
|
@@ -63,12 +63,23 @@ openany-dev run --id API_ID --query '{"limit":"10"}' -j
|
|
|
63
63
|
|
|
64
64
|
Use the API ID and parameters from the live catalog. `status` checks local configuration and reports `configured/missing` without testing network access or key validity. Configure a key before proceeding with authenticated discovery or inspection. Use `discover --public` when the user explicitly requests public catalog browsing only.
|
|
65
65
|
|
|
66
|
-
`run --headers` accepts `Accept` and `
|
|
66
|
+
`run --headers` accepts `Accept`, `Accept-Language`, and `x-openany-partner-id` even when they are absent from the published inputs. Header names are case-insensitive. Published constraints still apply when these headers are declared; other unknown headers and reserved headers remain rejected.
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
69
|
openany-dev run --id API_ID --headers '{"Accept":"application/json;version=20230203","Accept-Language":"zh-CN"}' -j
|
|
70
|
+
openany-dev run --id API_ID --headers '{"x-openany-partner-id":"PARTNER_ID"}' -j
|
|
70
71
|
```
|
|
71
72
|
|
|
73
|
+
Save a default partner ID once to automatically include `x-openany-partner-id` on API and model gateway requests:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
openany config set partner-id PARTNER_ID
|
|
77
|
+
openany config get partner-id
|
|
78
|
+
openany config unset partner-id
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
These local commands do not require an API key or access the network. The ID is stored in the existing restricted credentials file and survives later CLI invocations. Explicit `run --headers` values override the saved ID case-insensitively for that call; published API input constraints still apply. Backend requests do not receive the saved header. `config unset partner-id` removes the default, and `logout` clears it along with other local account configuration. Model calls use the saved default; `models run --headers` remains unsupported.
|
|
82
|
+
|
|
72
83
|
Balance checks use `GET /api/v1/agent-api-account` with a Bearer API key. This works with both wallet and email account keys. `run` reads the API contract, validates parameters, checks the balance, and calls the gateway. `calls list/get` retrieves model, data, and tool API usage records for the current key and requires a backend version that includes this fix. Status filters accept only `--status success` or `--status failed`. Passing `--review-required` produces a local error.
|
|
73
84
|
|
|
74
85
|
## Retrieving asynchronous API results
|
package/package.json
CHANGED
|
@@ -24,6 +24,8 @@ This rule applies throughout the workflow, including when a referenced guide, an
|
|
|
24
24
|
|
|
25
25
|
## General input and security rules
|
|
26
26
|
|
|
27
|
+
- For `catalogType: "task"`, top-level `categories` must contain 1–4 unique IDs chosen only from `research-comparison`, `documents-data`, `writing-content`, and `business-operations`. This applies to direct creation, edits, and batch imports; the general API category catalog and 16-item limit do not apply to Tasks. Do not use display names, custom IDs, other Resource category IDs, or an empty array. If categories are missing or invalid, ask the user to select from these four options before submitting; do not guess or silently substitute a category.
|
|
28
|
+
|
|
27
29
|
- Use the current mode's native form first whenever you need the user's non-secret input, selection, correction, or confirmation. For example, use `request_user_input_async`, `request_user_input` when available in the current mode, or `AskUserQuestion`. When valid choices are known, present them as selectable options. If they exceed the form's option limit, present them in groups or pages through follow-up selection forms. Use text input for free-form values or when the available form cannot present selectable options. Once a form is open, wait for the user's answer without repeating the question in chat or running dependent commands. An accepted response, a default option, silence, or a timeout does not count as an answer. When no suitable native form is available, use local stdin with the same fields, validation, and authorization rules. Collect the fields directly so the user can provide them without writing JSON.
|
|
28
30
|
- When a connection is needed, follow the [connection workflow](references/connections.md) and first confirm whether to select an existing connection or create a new one. If the user chooses to create one and has not supplied connection fields, open the full secure dialog immediately. Collect the name, base URL, authentication method, and key in that dialog. If the dialog is unavailable, follow the connection workflow for entry in the user's local terminal. Accept only the completion status and results that contain no secrets. Keep keys out of agent forms, chat, logs, ordinary configuration files, and screenshots.
|
|
29
31
|
- Keep passwords, tokens, cookies, and credential files out of chat and forms. Use the login reference to collect a temporary email login code. If the user has already supplied the code for this attempt in chat, reuse it. Never echo it in messages, reports, or logs. Do not search repositories, `.env`, user directories, or credential stores for secrets, or ask the user to print or edit credential files.
|
|
@@ -24,6 +24,8 @@ metadata:
|
|
|
24
24
|
|
|
25
25
|
## 通用输入与安全规则
|
|
26
26
|
|
|
27
|
+
- 当 `catalogType: "task"` 时,顶层 `categories` 必须包含 1–4 个不重复 ID,且只能从 `research-comparison`(研究与对比)、`documents-data`(文档与数据)、`writing-content`(写作与内容)、`business-operations`(业务运营)中选择。直接创建、编辑和批量导入均遵循此约束;Task 不适用普通 API 的分类目录和最多 16 项规则。禁止填写展示名称、自定义 ID、其他 Resource 分类 ID 或空数组。分类缺失或无效时,提交前通过表单请用户从这四项中选择,不得猜测或静默替换分类。
|
|
28
|
+
|
|
27
29
|
- 凡需用户填写、选择、更正或确认非秘密信息,优先调用当前模式的原生表单,例如 `request_user_input_async`、当前模式可用的 `request_user_input` 或 `AskUserQuestion`。有明确候选项时优先用可点选的表单选项。候选超过表单选项上限时,分组或分页继续用选择表单。只有自由填写的值或当前表单不支持可选项时,才用表单的文本输入。发出表单后等待用户作答,期间不在对话里重复提问,也不执行依赖答案的命令。accepted、默认项、沉默或超时均不算回答。没有合适的原生表单时用本地 stdin,沿用字段、校验和授权规则,不要求用户写 JSON。
|
|
28
30
|
- 需要绑定连接时,按[中文连接流程](references/connections.zh-CN.md)先确认选择已有连接还是新建连接。用户选择新建且尚未提供连接字段时,直接打开完整安全弹框;名称、Base URL、认证方式和 Key 都在弹框中填写。弹框不可用时按连接流程交给用户在本地终端录入。只接收完成状态及不含秘密的结果,不把密钥放入 Agent 表单、聊天、日志、普通配置文件或截图。
|
|
29
31
|
- 密码、令牌、Cookie、凭据文件不得进入聊天/表单。临时邮箱登录验证码按登录文档收集。用户已在对话中提供本次验证码时直接复用,不得在消息、报告或日志中回显。不得扫描仓库、`.env`、用户目录或凭据存储寻找秘密,不要求打印或编辑凭据文件。
|
|
@@ -12,6 +12,8 @@ For a request to list a resource, if the request and already confirmed informati
|
|
|
12
12
|
|
|
13
13
|
For Skill, Bot, Service, Data, or Goods, use the [Agent API template](../templates/seller-agent-api-import-template.json) and [Imports](imports.md). Set `catalogType` to the selected type: `skill`, `bot`, `service`, `data`, or `digital`, respectively. The template's `service` value is an example.
|
|
14
14
|
|
|
15
|
+
For `catalogType: "task"`, top-level `categories` must contain 1–4 unique IDs chosen only from `research-comparison`, `documents-data`, `writing-content`, and `business-operations`. This applies to direct creation, edits, and batch imports; the general API category catalog and 16-item limit do not apply to Tasks. Do not use display names, custom IDs, other Resource category IDs, or an empty array. If categories are missing or invalid, ask the user to select from these four options before submitting; do not guess or silently substitute a category.
|
|
16
|
+
|
|
15
17
|
When a connection is needed and still undecided, use the native form to choose an existing connection or add one. Follow [Connections](connections.md), reusing confirmed connections and using the secure dialog when no connection fields have been collected. For a connection-only task, stop once you confirm the ID and revision.
|
|
16
18
|
|
|
17
19
|
Confirm the required connection before requesting or reading source materials. When the source is missing, open a separate **Source materials** form with the options applicable to the chosen type: resource or API documentation link, sanitized cURL, file upload, or absolute local path. If the form allows only three options, group the two file options and ask how to provide the file next. In the form prompt, show the matching [Agent API](../templates/seller-agent-api-import-template.json), [standard API](../templates/provider-agent-api-template.json), or [model](../templates/models-v2.json) template location and say: “The template location is provided here. If you do not have a copy, download the template, fill it in, then upload the completed file or enter its absolute path.” Use an accessible absolute URL or verified local absolute path. If the location is inaccessible, attach the template and name it in the form. For Agent API listings, point to `fieldGuide` and the examples in `apis[0]`. Use a follow-up form for input the source selector cannot collect. For a file upload, direct the user to the attachment control.
|
|
@@ -20,7 +22,7 @@ Wait for the user to identify the source before inspecting any source materials.
|
|
|
20
22
|
|
|
21
23
|
Read the chosen source and use the form to ask only about omissions or conflicts. Collect the included content, usage instructions, effect examples, and how the resource is delivered. If its delivery is unsupported by the CLI, explain the limitation before preparing a draft. Preserve the supplied methods, paths, mappings, and billing terms. Validate imports against the template. Fetch the schema once for direct creation.
|
|
22
24
|
|
|
23
|
-
Use top-level `categories` for APIs and `configuration.categories` in the metadata for OpenAPI imports.
|
|
25
|
+
Use top-level `categories` for APIs and `configuration.categories` in the metadata for OpenAPI imports. For non-Task APIs, use at most 16 distinct IDs; Tasks must follow the four-option constraint above. Use `routes[].familyId` for new public models, with choices from `items[].families` in the import preview. Preserve existing assignments. If the family is missing, ask the user to pick from the current options. Allow independently complete items to proceed.
|
|
24
26
|
|
|
25
27
|
## 2. Create drafts
|
|
26
28
|
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
Skill、Bot、Service、Data、Goods 使用 [Agent API 模板](../templates/seller-agent-api-import-template.json),走[导入流程](imports.zh-CN.md),并按用户选定类型将 `catalogType` 分别填写为 `skill`、`bot`、`service`、`data`、`digital`。模板中的 `service` 只是示例。
|
|
12
12
|
|
|
13
|
+
当 `catalogType: "task"` 时,顶层 `categories` 必须包含 1–4 个不重复 ID,且只能从 `research-comparison`(研究与对比)、`documents-data`(文档与数据)、`writing-content`(写作与内容)、`business-operations`(业务运营)中选择。直接创建、编辑和批量导入均遵循此约束;Task 不适用普通 API 的分类目录和最多 16 项规则。禁止填写展示名称、自定义 ID、其他 Resource 分类 ID 或空数组。分类缺失或无效时,提交前通过表单请用户从这四项中选择,不得猜测或静默替换分类。
|
|
14
|
+
|
|
13
15
|
需要连接且用户未指定时,用原生表单选择复用已有连接或新建。按[连接流程](connections.zh-CN.md)复用已确认的连接,按录入进度选择安全弹框或补齐字段。仅建连接时,确认 ID 和修订即结束。
|
|
14
16
|
|
|
15
17
|
先确认本次需要的连接,再索取或读取资源资料。缺来源时,单独打开**资料来源**表单:按已选类型提供适用的资源或接口文档链接、脱敏 cURL、上传文件或本地绝对路径选项。表单最多支持三项时合并文件选项,下一步再问上传或路径。在表单题面显示对应的 [Agent API](../templates/seller-agent-api-import-template.json)、[普通 API](../templates/provider-agent-api-template.json)或[模型](../templates/models-v2.json)模板位置,并注明「这里已提供模板位置。如果你还没有模板,请先下载并填写,再上传填好的文件或输入本地绝对路径。」使用可访问的完整 URL 或已核实的本地绝对路径,位置不可访问时提供附件并在表单标出文件名。Agent API 资源请参考 `fieldGuide` 和 `apis[0]` 中的示例。来源选择表单无法接收所选资料时,用后续表单收集。选择上传文件时,引导用户使用附件上传入口。
|
|
@@ -18,7 +20,7 @@ Skill、Bot、Service、Data、Goods 使用 [Agent API 模板](../templates/sell
|
|
|
18
20
|
|
|
19
21
|
读取指定资料后只通过表单补问缺项或冲突,保留原方法、路径、映射和计费。收集交付内容、使用说明、效果示例和交付方式。如果 CLI 不支持该交付方式,建草稿前先说明限制。导入按模板校验,直接创建时取对应 schema 一次。
|
|
20
22
|
|
|
21
|
-
API 分类用顶层 `categories`,OpenAPI 导入写入元数据的 `configuration.categories
|
|
23
|
+
API 分类用顶层 `categories`,OpenAPI 导入写入元数据的 `configuration.categories`,非 Task 的 API 最多 16 个不重复 ID;Task 必须遵循上面的四项分类约束。新公共模型用 `routes[].familyId`,选项来自导入预览的 `items[].families`;已有归属保持原样。缺失时请用户从当前选项选择,缺配置的项目不阻塞独立完整项。
|
|
22
24
|
|
|
23
25
|
## 2. 创建草稿
|
|
24
26
|
|
package/src/catalog.js
CHANGED
|
@@ -144,7 +144,7 @@ export function prepareApiRequest(
|
|
|
144
144
|
for (const [location, values] of Object.entries(groups))
|
|
145
145
|
for (const name of Object.keys(values))
|
|
146
146
|
if (
|
|
147
|
-
!(location === "header" && /^(accept|accept-language)$/i.test(name)) &&
|
|
147
|
+
!(location === "header" && /^(accept|accept-language|x-openany-partner-id)$/i.test(name)) &&
|
|
148
148
|
!definition.inputs.some(
|
|
149
149
|
(f) =>
|
|
150
150
|
f.location === location &&
|
|
@@ -276,10 +276,14 @@ export async function runApi(options, ctx) {
|
|
|
276
276
|
const definition = unwrap(
|
|
277
277
|
await ctx.http.backend(`/api/v1/agent-apis/${encodeURIComponent(id)}`),
|
|
278
278
|
);
|
|
279
|
+
let headers = ctx.jsonOption("headers", {});
|
|
280
|
+
if (ctx.http.partnerId && isObject(headers) &&
|
|
281
|
+
!Object.keys(headers).some(name => name.toLowerCase() === "x-openany-partner-id"))
|
|
282
|
+
headers = { ...headers, "x-openany-partner-id": ctx.http.partnerId };
|
|
279
283
|
const prepared = prepareApiRequest(definition, {
|
|
280
284
|
path: ctx.jsonOption("path", {}),
|
|
281
285
|
query: ctx.jsonOption("query", {}),
|
|
282
|
-
headers
|
|
286
|
+
headers,
|
|
283
287
|
body: await ctx.input(),
|
|
284
288
|
});
|
|
285
289
|
const account = unwrap(
|
package/src/cli.js
CHANGED
|
@@ -3,7 +3,7 @@ import packageInfo from "../package.json" with { type: "json" };
|
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { readFile, writeFile, lstat, mkdtemp } from "node:fs/promises";
|
|
6
|
-
import { ConfigStore, configurationStatus } from "./config.js";
|
|
6
|
+
import { ConfigStore, configurationStatus, runConfig } from "./config.js";
|
|
7
7
|
import { CLIError, errorRecord, redact, requireValue } from "./errors.js";
|
|
8
8
|
import { HttpClient, unwrap } from "./http.js";
|
|
9
9
|
import { listQuery, runApi, formatMicroUsd } from "./catalog.js";
|
|
@@ -17,6 +17,9 @@ Model execution uses the OpenAny gateway with the path and query from curlExampl
|
|
|
17
17
|
setup --api_key api_key --gui [-j] (native API key dialog)
|
|
18
18
|
setup --wallet_connect wallet --gui [-j] (native wallet dialog)
|
|
19
19
|
logout [-j] (back up and remove all local account configuration)
|
|
20
|
+
config set partner-id VALUE [-j] (save the default gateway partner ID)
|
|
21
|
+
config get partner-id [-j]
|
|
22
|
+
config unset partner-id [-j]
|
|
20
23
|
status_check wallet|email|api_key|payment [-j]
|
|
21
24
|
Legacy syntax (still supported):
|
|
22
25
|
setup [--scenario call|wallet|email] (interactive terminal setup)
|
|
@@ -408,6 +411,7 @@ export async function runCommand(args, ctx) {
|
|
|
408
411
|
return runSetup(ctx);
|
|
409
412
|
}
|
|
410
413
|
if (command === "status") return configurationStatus(store, options);
|
|
414
|
+
if (command === "config") return runConfig(args, ctx);
|
|
411
415
|
if (
|
|
412
416
|
command === "keys" &&
|
|
413
417
|
!["remote", "create", "rotate", "revoke"].includes(args[1])
|
|
@@ -552,7 +556,9 @@ export async function main(
|
|
|
552
556
|
env = await store.getEnvironment();
|
|
553
557
|
const apiKey = await store.getApiKey();
|
|
554
558
|
if (apiKey) secrets.push(apiKey);
|
|
555
|
-
const
|
|
559
|
+
const partnerId = args[0] === "config" || args[0] === "logout"
|
|
560
|
+
? null : await store.getPartnerId();
|
|
561
|
+
const http = new HttpClient({ fetch, apiKey, partnerId });
|
|
556
562
|
const ctx = {
|
|
557
563
|
args,
|
|
558
564
|
options,
|
package/src/config.js
CHANGED
|
@@ -151,6 +151,11 @@ export class ConfigStore {
|
|
|
151
151
|
const state = await this.read();
|
|
152
152
|
return state.keys.find((k) => k.label === state.activeKey)?.key || null;
|
|
153
153
|
}
|
|
154
|
+
async getPartnerId() {
|
|
155
|
+
const state = await this.read();
|
|
156
|
+
const value = state.settings?.partnerId;
|
|
157
|
+
return value === undefined ? null : validatePartnerId(value, "CONFIG_INVALID");
|
|
158
|
+
}
|
|
154
159
|
async getEnvironment() {
|
|
155
160
|
const { settings = {} } = await this.read();
|
|
156
161
|
if (!settings || typeof settings !== "object" || Array.isArray(settings))
|
|
@@ -170,6 +175,28 @@ export class ConfigStore {
|
|
|
170
175
|
}
|
|
171
176
|
}
|
|
172
177
|
|
|
178
|
+
function validatePartnerId(value, code = "INVALID_INPUT") {
|
|
179
|
+
if (typeof value !== "string" || !value.trim() || !/^[\x20-\x7e]+$/.test(value))
|
|
180
|
+
throw new CLIError(code, "Partner ID must be a non-empty printable ASCII header value");
|
|
181
|
+
return value.trim();
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export async function runConfig(args, { store, options }) {
|
|
185
|
+
const [, action, name, value] = args;
|
|
186
|
+
if (name !== "partner-id" || !["set", "get", "unset"].includes(action) ||
|
|
187
|
+
args.length !== (action === "set" ? 4 : 3) ||
|
|
188
|
+
Object.keys(options).some(key => !["json", "output"].includes(key)))
|
|
189
|
+
throw new CLIError("INVALID_INPUT", "Use config set partner-id VALUE, config get partner-id, or config unset partner-id");
|
|
190
|
+
if (action === "get") return { partnerId: await store.getPartnerId() };
|
|
191
|
+
const partnerId = action === "set" ? validatePartnerId(value) : null;
|
|
192
|
+
return store.update(state => {
|
|
193
|
+
state.settings = { ...state.settings };
|
|
194
|
+
if (partnerId === null) delete state.settings.partnerId;
|
|
195
|
+
else state.settings.partnerId = partnerId;
|
|
196
|
+
return { partnerId, saved: true };
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
|
|
173
200
|
export async function configurationStatus(store, options = {}) {
|
|
174
201
|
const env = await store.getEnvironment();
|
|
175
202
|
const state = await store.read();
|
package/src/http.js
CHANGED
|
@@ -58,10 +58,12 @@ export class HttpClient {
|
|
|
58
58
|
constructor({
|
|
59
59
|
fetch: fetcher = globalThis.fetch,
|
|
60
60
|
apiKey,
|
|
61
|
+
partnerId,
|
|
61
62
|
timeoutMs = 120000,
|
|
62
63
|
} = {}) {
|
|
63
64
|
this.fetch = fetcher;
|
|
64
65
|
this.apiKey = apiKey;
|
|
66
|
+
this.partnerId = partnerId;
|
|
65
67
|
this.timeoutMs = timeoutMs;
|
|
66
68
|
}
|
|
67
69
|
backend(path, options = {}) {
|
|
@@ -127,6 +129,8 @@ export class HttpClient {
|
|
|
127
129
|
for (const item of Array.isArray(value) ? value : [value])
|
|
128
130
|
url.searchParams.append(key, String(item));
|
|
129
131
|
const headers = new Headers(extra);
|
|
132
|
+
if (origin === GATEWAY_ORIGIN && this.partnerId && !headers.has("x-openany-partner-id"))
|
|
133
|
+
headers.set("x-openany-partner-id", this.partnerId);
|
|
130
134
|
for (const name of [
|
|
131
135
|
"authorization",
|
|
132
136
|
"cookie",
|
|
@@ -4,6 +4,7 @@ import { checkConfiguration } from "./provider-models.js";
|
|
|
4
4
|
|
|
5
5
|
const fields = JSON.parse(readFileSync(new URL("./vendor/provider-import/api-fields.json", import.meta.url), "utf8"));
|
|
6
6
|
const categoryIds = new Set(JSON.parse(readFileSync(new URL("./vendor/provider-import/api-categories.json", import.meta.url), "utf8")));
|
|
7
|
+
const taskCategoryIds = new Set(["research-comparison", "documents-data", "writing-content", "business-operations"]);
|
|
7
8
|
const maxPathLength = 2048;
|
|
8
9
|
export const maxApiItemIdLength = "DELETE ".length + maxPathLength;
|
|
9
10
|
export const apiImportVersion = "provider-agent-api-v2";
|
|
@@ -23,7 +24,13 @@ function rename(value, names, path) {
|
|
|
23
24
|
return result;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
export function validateApiImportCategories(categories, path) {
|
|
27
|
+
export function validateApiImportCategories(categories, path, catalogType) {
|
|
28
|
+
if (catalogType === "task") {
|
|
29
|
+
if (!Array.isArray(categories) || categories.length < 1 || categories.length > 4 ||
|
|
30
|
+
new Set(categories).size !== categories.length || categories.some(id => !taskCategoryIds.has(id)))
|
|
31
|
+
throw new CLIError("IMPORT_FORMAT", `${path}.categories: select 1–4 unique Task category IDs (${[...taskCategoryIds].join(", ")})`);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
27
34
|
if (categories === undefined) return;
|
|
28
35
|
if (!Array.isArray(categories) || categories.length > 16 || new Set(categories).size !== categories.length ||
|
|
29
36
|
categories.some(id => !categoryIds.has(id)))
|
|
@@ -43,7 +50,7 @@ export function apiImportV2(document) {
|
|
|
43
50
|
const path = `apis[${index}]`;
|
|
44
51
|
const api = rename(entry, fields.api, path);
|
|
45
52
|
checkConfiguration(api, "api");
|
|
46
|
-
validateApiImportCategories(api.categories, path);
|
|
53
|
+
validateApiImportCategories(api.categories, path, api.catalogType);
|
|
47
54
|
if (!["GET", "POST", "PUT", "PATCH", "DELETE"].includes(api.method) ||
|
|
48
55
|
typeof api.pathTemplate !== "string" || !api.pathTemplate.startsWith("/") || api.pathTemplate.length > maxPathLength)
|
|
49
56
|
throw new CLIError("IMPORT_FORMAT", `${path} requires a supported httpMethod and publicPath`);
|
package/src/provider-imports.js
CHANGED
|
@@ -296,7 +296,7 @@ export async function runImports(action, client, ctx) {
|
|
|
296
296
|
...entry.configuration,
|
|
297
297
|
};
|
|
298
298
|
if (item.source.schemaVersion === apiImportVersion)
|
|
299
|
-
validateApiImportCategories(item.configuration.categories, item.itemId);
|
|
299
|
+
validateApiImportCategories(item.configuration.categories, item.itemId, item.configuration.catalogType);
|
|
300
300
|
}
|
|
301
301
|
const bound = o["bindings-file"]
|
|
302
302
|
? applyBindings(changed, sellerInput(await readProviderJSON(o["bindings-file"])), batch.type)
|