apiblaze 0.4.12 → 0.4.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.
- package/dist/index.js +5 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ var import_commander = require("commander");
|
|
|
28
28
|
var import_chalk28 = __toESM(require("chalk"));
|
|
29
29
|
|
|
30
30
|
// package.json
|
|
31
|
-
var version = "0.4.
|
|
31
|
+
var version = "0.4.15";
|
|
32
32
|
|
|
33
33
|
// src/types.ts
|
|
34
34
|
var ApiError = class extends Error {
|
|
@@ -2179,9 +2179,8 @@ var DASHBOARD_BASE4 = process.env.APIBLAZE_DASHBOARD_BASE || "https://dashboard.
|
|
|
2179
2179
|
async function runExport(projectArg, versionArg, opts) {
|
|
2180
2180
|
const token = getAccessToken();
|
|
2181
2181
|
if (!token) throw new Error("Not authenticated. Run `apiblaze login` first.");
|
|
2182
|
-
const
|
|
2183
|
-
const match =
|
|
2184
|
-
if (!match) throw new Error(`Project "${projectArg}" not found. Run \`apiblaze projects\`.`);
|
|
2182
|
+
const { teamId } = await resolveTeam(opts.team);
|
|
2183
|
+
const match = await resolveProject(teamId, projectArg, versionArg);
|
|
2185
2184
|
const projectId = match.projectId;
|
|
2186
2185
|
const version2 = versionArg || match.apiVersion;
|
|
2187
2186
|
const target = opts.kong ? "kong" : "data";
|
|
@@ -3128,7 +3127,7 @@ program.command("projects").description("List the projects in your team").action
|
|
|
3128
3127
|
}
|
|
3129
3128
|
});
|
|
3130
3129
|
program.command("delete").description("Delete a proxy and everything under it (asks first)").argument("<project>", "Project name or id (see `apiblaze projects`)").argument("[version]", "API version (defaults to the first match)").option("--team <id|name>", "Team the project is in (defaults to active team)").option("-y, --yes", "Skip the confirmation prompt").option("--json", "Output machine-readable JSON").action(action((project, version2, opts) => runDelete(project, version2, opts)));
|
|
3131
|
-
program.command("export").description("Export
|
|
3130
|
+
program.command("export").description("Export config and data for migration out of APIblaze (Kong, ...)").argument("<project>", "Project name or id (see `apiblaze projects`)").argument("[version]", "API version (defaults to the first match)").option("--kong", "Produce a runnable Kong OSS bundle (decK config + plugins + docker-compose)").option("--data", "Plain data export (default)").option("--secrets", "Include decrypted producer-supplied secrets (member role; audit-logged)").option("--keys <mode>", "API-key export: hashes (default, consumers keep keys) | mint | none").option("--no-consumers", "Skip the end-user lane (users, groups, keys)").option("-o, --out <file>", "Output zip path").option("--team <id|name>", "Team the project is in (defaults to active team)").action(action((project, version2, opts) => runExport(project, version2, { ...opts, noConsumers: opts.consumers === false })));
|
|
3132
3131
|
program.command("target").description("Change where a proxy forwards requests").argument("<project>", "Project name or id").requiredOption("--url <url>", "Target URL to forward to").option("--env <env>", "Environment to scope the target to (e.g. prod, dev)").option("--team <id|name>", "Team the project is in").option("--apiversion <version>", "API version (defaults to the first match)").option("--json", "Output machine-readable JSON").action(action((project, opts) => runTargetSet(project, opts)));
|
|
3133
3132
|
program.command("throttle").description("Set rate limits and quotas for a proxy").argument("<project>", "Project name or id").option("--rate <n>", "User rate limit (requests/sec)").option("--end-user-rate <n>", "Per-end-user rate limit (requests/sec)").option("--quota <n>", "Proxy quota (requests/period)").option("--period <p>", "Quota period: daily | weekly | monthly").option("--team <id|name>", "Team the project is in").option("--apiversion <version>", "API version").option("--json", "Output machine-readable JSON").action(action((project, opts) => runThrottleSet(project, opts)));
|
|
3134
3133
|
program.command("rename").description("Change a proxy's display name").argument("<project>", "Project name or id").requiredOption("--display-name <name>", "New human-friendly display name").option("--team <id|name>", "Team the project is in").option("--apiversion <version>", "API version").option("--json", "Output machine-readable JSON").action(action((project, opts) => runRename(project, opts)));
|
|
@@ -3155,7 +3154,7 @@ spec.command("set").description("Replace the stored OpenAPI spec from a local fi
|
|
|
3155
3154
|
var HELP_GROUPS = [
|
|
3156
3155
|
{ title: "Chat", commands: ["agent"] },
|
|
3157
3156
|
{ title: "Setup", commands: ["login", "create", "dev", "claim", "team", "whoami", "logout"] },
|
|
3158
|
-
{ title: "Control plane commands", commands: ["projects", "tenant", "domain", "delete", "target", "throttle", "rename", "spec"] },
|
|
3157
|
+
{ title: "Control plane commands", commands: ["projects", "tenant", "domain", "delete", "target", "throttle", "rename", "spec", "export"] },
|
|
3159
3158
|
{ title: "Data plane commands", commands: [
|
|
3160
3159
|
{ parent: "consumer", sub: "login" },
|
|
3161
3160
|
{ parent: "consumer", sub: "apikeys" }
|