naro-cli 0.26.0 → 0.27.0
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 +10 -2
- package/dist/{chunk-RQJTCRKY.js → chunk-UGJFIEH7.js} +21 -75
- package/dist/deploy.js +1 -1
- package/dist/index.js +1 -52
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -102,8 +102,6 @@ naro env remove DATABASE_URL The production, preview and all values; an en
|
|
|
102
102
|
naro env pull [.env.local] Preview's values by default; --env production, or --env qa for an environment
|
|
103
103
|
(its own value wins over all; an unknown name fails before anything is written,
|
|
104
104
|
and so does a value no dotenv line reads back)
|
|
105
|
-
naro supabase [list] The project's Supabase links, per target (connect in the dashboard)
|
|
106
|
-
naro supabase disconnect [target] Remove a target's link, or (no target or all) every link your role may change, with its env vars (asks first)
|
|
107
105
|
naro env import .env.qa qa Upload every variable in a dotenv file to one target (all by default; asks first,
|
|
108
106
|
--yes in CI; an unclosed quote, an invalid key, ASSETS or a value over 5 KB
|
|
109
107
|
stops it before any request, and so does a key a storage binding already uses
|
|
@@ -886,6 +884,16 @@ An `--update-check` you give replaces the default: without
|
|
|
886
884
|
|
|
887
885
|
## Release notes
|
|
888
886
|
|
|
887
|
+
### 0.27.0
|
|
888
|
+
|
|
889
|
+
- `naro supabase` and `naro supabase disconnect` are gone, with the
|
|
890
|
+
dashboard's Supabase card and its routes. A project reaches its Supabase
|
|
891
|
+
like anything else: `NEXT_PUBLIC_SUPABASE_URL` and its key with
|
|
892
|
+
`naro env add`. Variables the card set stay, as your own. Older versions
|
|
893
|
+
answer `NOT_FOUND` on `naro supabase`.
|
|
894
|
+
- naro-mcp 0.26.0 goes out with it: `list_supabase_links` and
|
|
895
|
+
`disconnect_supabase` are gone.
|
|
896
|
+
|
|
889
897
|
### 0.26.0
|
|
890
898
|
|
|
891
899
|
- `naro dashboard [<capability>]` prints the dashboard URL for what the CLI
|
|
@@ -532,6 +532,25 @@ var CAPABILITIES = [
|
|
|
532
532
|
cli: { kind: "built", commands: ["naro usage"] },
|
|
533
533
|
mcp: { kind: "built", tools: ["get_team_usage"] }
|
|
534
534
|
},
|
|
535
|
+
{
|
|
536
|
+
id: "team-backend-usage",
|
|
537
|
+
domain: "teams",
|
|
538
|
+
title: "\uD300 \uBC31\uC5D4\uB4DC \uC0AC\uC6A9\uB7C9\xB7\uC77C\uBCC4 \uCC28\uD2B8(\uD568\uC218 CPU\xB7DB\xB7\uC2A4\uD1A0\uB9AC\uC9C0\xB7\uB9AC\uC5BC\uD0C0\uC784)",
|
|
539
|
+
routes: [
|
|
540
|
+
"GET teams/[teamSlug]/backend-usage",
|
|
541
|
+
"GET teams/[teamSlug]/usage/series"
|
|
542
|
+
],
|
|
543
|
+
dashboard: "/[teamSlug]/projects",
|
|
544
|
+
ui: { kind: "built" },
|
|
545
|
+
cli: {
|
|
546
|
+
kind: "planned",
|
|
547
|
+
note: "\uD300 \uAC1C\uC694 \uCE74\uB4DC\uB85C \uBA3C\uC800 \uB0C8\uB2E4. naro usage\uC5D0 \uBC31\uC5D4\uB4DC \uC904\uC744 \uB354\uD558\uB294 \uAC83\uC774 \uB2E4\uC74C\uC774\uB2E4."
|
|
548
|
+
},
|
|
549
|
+
mcp: {
|
|
550
|
+
kind: "planned",
|
|
551
|
+
note: "get_team_usage\uC5D0 \uBC31\uC5D4\uB4DC \uC0AC\uC6A9\uB7C9\uC744 \uB354\uD558\uB294 \uAC83\uC774 \uB2E4\uC74C\uC774\uB2E4."
|
|
552
|
+
}
|
|
553
|
+
},
|
|
535
554
|
{
|
|
536
555
|
id: "billing-view",
|
|
537
556
|
domain: "billing",
|
|
@@ -902,47 +921,6 @@ var CAPABILITIES = [
|
|
|
902
921
|
note: "\uBCF5\uD638\uD654\uD55C \uAC12\uC744 .env.local\uC5D0 \uC4F4\uB2E4. list_environment_variables\uB294 \uAC12\uC744 \uAC00\uB9B0\uB2E4. 2026-11-03 \uACB0\uC815."
|
|
903
922
|
}
|
|
904
923
|
},
|
|
905
|
-
{
|
|
906
|
-
id: "supabase-connect",
|
|
907
|
-
domain: "env",
|
|
908
|
-
title: "\uAE30\uC874 Supabase \uD504\uB85C\uC81D\uD2B8 \uC5F0\uACB0\xB7\uD0A4 \uB2E4\uC2DC \uBC1B\uAE30",
|
|
909
|
-
routes: [
|
|
910
|
-
"GET supabase/authorize",
|
|
911
|
-
"GET supabase/callback",
|
|
912
|
-
"GET projects/[projectId]/supabase/projects",
|
|
913
|
-
"PUT projects/[projectId]/supabase"
|
|
914
|
-
],
|
|
915
|
-
dashboard: "/[teamSlug]/projects/[projectSlug]/settings",
|
|
916
|
-
ui: { kind: "built" },
|
|
917
|
-
cli: {
|
|
918
|
-
kind: "excluded",
|
|
919
|
-
reason: "browser-required",
|
|
920
|
-
note: "Supabase OAuth \uB9AC\uB2E4\uC774\uB809\uD2B8\uB85C \uB05D\uB09C\uB2E4. \uD1A0\uD070\uC740 10\uBD84 \uCFE0\uD0A4\uC5D0\uB9CC \uC788\uB2E4(\uC124\uACC4 2026-11-04 \xA72.1)."
|
|
921
|
-
},
|
|
922
|
-
mcp: {
|
|
923
|
-
kind: "excluded",
|
|
924
|
-
reason: "browser-required",
|
|
925
|
-
note: "Supabase OAuth \uB9AC\uB2E4\uC774\uB809\uD2B8\uB85C \uB05D\uB09C\uB2E4. \uB300\uC2DC\uBCF4\uB4DC\uC758 \uD504\uB85C\uC81D\uD2B8 \uC124\uC815 \uD0ED\uC5D0\uC11C \uC5F0\uACB0\uD55C\uB2E4."
|
|
926
|
-
}
|
|
927
|
-
},
|
|
928
|
-
{
|
|
929
|
-
id: "supabase-link-list",
|
|
930
|
-
domain: "env",
|
|
931
|
-
title: "Supabase \uC5F0\uACB0 \uBCF4\uAE30",
|
|
932
|
-
routes: ["GET projects/[projectId]/supabase"],
|
|
933
|
-
ui: { kind: "built" },
|
|
934
|
-
cli: { kind: "built", commands: ["naro supabase"] },
|
|
935
|
-
mcp: { kind: "built", tools: ["list_supabase_links"] }
|
|
936
|
-
},
|
|
937
|
-
{
|
|
938
|
-
id: "supabase-disconnect",
|
|
939
|
-
domain: "env",
|
|
940
|
-
title: "Supabase \uC5F0\uACB0 \uD574\uC81C",
|
|
941
|
-
routes: ["DELETE projects/[projectId]/supabase"],
|
|
942
|
-
ui: { kind: "built" },
|
|
943
|
-
cli: { kind: "built", commands: ["naro supabase disconnect"] },
|
|
944
|
-
mcp: { kind: "built", tools: ["disconnect_supabase"] }
|
|
945
|
-
},
|
|
946
924
|
{
|
|
947
925
|
id: "environment-list",
|
|
948
926
|
domain: "environments",
|
|
@@ -2553,12 +2531,8 @@ var DEPLOYMENT_ERROR_CODES = [
|
|
|
2553
2531
|
"ENVIRONMENT_DELETED",
|
|
2554
2532
|
/** The edge refused the environment's protection change; the database change is rolled back. */
|
|
2555
2533
|
"ENVIRONMENT_PROTECTION_PUBLISH_FAILED",
|
|
2556
|
-
/** The variable
|
|
2557
|
-
"ENV_MANAGED"
|
|
2558
|
-
/** The 10-minute Supabase sign-in cookie is gone or expired (spec 2026-11-04 §6.4). */
|
|
2559
|
-
"SUPABASE_SESSION_EXPIRED",
|
|
2560
|
-
/** The Supabase Management API refused or did not answer (spec 2026-11-04 §6.4). */
|
|
2561
|
-
"SUPABASE_API_FAILED"
|
|
2534
|
+
/** The variable is owned by the Resend connection; only it changes it (spec 2026-11-04 resend §6.4). */
|
|
2535
|
+
"ENV_MANAGED"
|
|
2562
2536
|
];
|
|
2563
2537
|
var DeploymentError = class extends Error {
|
|
2564
2538
|
code;
|
|
@@ -22136,32 +22110,6 @@ var ObservabilityApi = class {
|
|
|
22136
22110
|
}
|
|
22137
22111
|
};
|
|
22138
22112
|
|
|
22139
|
-
// ../../packages/sdk/src/supabase-links.ts
|
|
22140
|
-
var SupabaseApi = class {
|
|
22141
|
-
constructor(client) {
|
|
22142
|
-
this.client = client;
|
|
22143
|
-
}
|
|
22144
|
-
async links(projectId) {
|
|
22145
|
-
const body = await this.client.request(
|
|
22146
|
-
`/api/projects/${encodeURIComponent(projectId)}/supabase`,
|
|
22147
|
-
{ context: "Read Supabase links" }
|
|
22148
|
-
);
|
|
22149
|
-
return body.links;
|
|
22150
|
-
}
|
|
22151
|
-
/**
|
|
22152
|
-
* Removes the link of one target (production, preview or an environment's
|
|
22153
|
-
* slug), or every link the role may write when `target` is left out, with
|
|
22154
|
-
* the env rows they hold. Answers how many went.
|
|
22155
|
-
*/
|
|
22156
|
-
async disconnect(projectId, options = {}) {
|
|
22157
|
-
const query = options.target === void 0 ? "" : `?target=${encodeURIComponent(options.target)}`;
|
|
22158
|
-
return this.client.request(
|
|
22159
|
-
`/api/projects/${encodeURIComponent(projectId)}/supabase${query}`,
|
|
22160
|
-
{ method: "DELETE", context: "Disconnect Supabase" }
|
|
22161
|
-
);
|
|
22162
|
-
}
|
|
22163
|
-
};
|
|
22164
|
-
|
|
22165
22113
|
// ../../packages/sdk/src/environments.ts
|
|
22166
22114
|
function isReservedEnvTarget(value) {
|
|
22167
22115
|
return RESERVED_ENVIRONMENT_SLUGS.includes(value);
|
|
@@ -22301,7 +22249,6 @@ var NaroClient = class _NaroClient {
|
|
|
22301
22249
|
flags;
|
|
22302
22250
|
billing;
|
|
22303
22251
|
observability;
|
|
22304
|
-
supabase;
|
|
22305
22252
|
logs;
|
|
22306
22253
|
db;
|
|
22307
22254
|
backend;
|
|
@@ -22330,7 +22277,6 @@ var NaroClient = class _NaroClient {
|
|
|
22330
22277
|
this.flags = new FlagsApi(this);
|
|
22331
22278
|
this.billing = new BillingApi(this);
|
|
22332
22279
|
this.observability = new ObservabilityApi(this);
|
|
22333
|
-
this.supabase = new SupabaseApi(this);
|
|
22334
22280
|
this.logs = new LogsApi(this);
|
|
22335
22281
|
this.db = new DbApi(this);
|
|
22336
22282
|
this.backend = new BackendApi(this);
|
package/dist/deploy.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -129,7 +129,7 @@ import {
|
|
|
129
129
|
warningLines,
|
|
130
130
|
withFunctionRetries,
|
|
131
131
|
writeProjectLink
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-UGJFIEH7.js";
|
|
133
133
|
import "./chunk-K3NQKI34.js";
|
|
134
134
|
|
|
135
135
|
// src/args.ts
|
|
@@ -11934,51 +11934,6 @@ async function runObservability(context) {
|
|
|
11934
11934
|
context.output.result({ projectId, report }, observabilityLines(report));
|
|
11935
11935
|
}
|
|
11936
11936
|
|
|
11937
|
-
// src/commands/supabase.ts
|
|
11938
|
-
async function runSupabase(context) {
|
|
11939
|
-
const projectId = await context.resolveProjectId();
|
|
11940
|
-
const client = await context.client();
|
|
11941
|
-
const links = await client.supabase.links(projectId);
|
|
11942
|
-
context.output.result({ projectId, links }, [
|
|
11943
|
-
`Supabase links (${String(links.length)}):`,
|
|
11944
|
-
...links.length === 0 ? [
|
|
11945
|
-
" None. Connect a Supabase project in the dashboard, under the project's Settings."
|
|
11946
|
-
] : links.map(
|
|
11947
|
-
(link) => ` ${link.target.padEnd(12)} ${link.supabaseName} (${link.supabaseRef}), ${link.keyKind} keys${link.includeSecret ? " + secret" : ""}`
|
|
11948
|
-
)
|
|
11949
|
-
]);
|
|
11950
|
-
}
|
|
11951
|
-
async function runSupabaseDisconnect(context) {
|
|
11952
|
-
const [given] = context.positionals;
|
|
11953
|
-
const target = given === "all" ? void 0 : given;
|
|
11954
|
-
const projectId = await context.resolveProjectId();
|
|
11955
|
-
const client = await context.client();
|
|
11956
|
-
await confirmOrAbort(
|
|
11957
|
-
context,
|
|
11958
|
-
target === void 0 ? "Disconnect Supabase from every target your role may change? The env vars it set are deleted, and the next deploy goes without them." : `Disconnect Supabase from ${target}? The env vars it set there are deleted, and the next deploy goes without them.`
|
|
11959
|
-
);
|
|
11960
|
-
const { removed } = await client.supabase.disconnect(
|
|
11961
|
-
projectId,
|
|
11962
|
-
target === void 0 ? {} : { target }
|
|
11963
|
-
);
|
|
11964
|
-
let remaining = [];
|
|
11965
|
-
if (target === void 0) {
|
|
11966
|
-
try {
|
|
11967
|
-
remaining = (await client.supabase.links(projectId)).map(
|
|
11968
|
-
(link) => link.target
|
|
11969
|
-
);
|
|
11970
|
-
} catch {
|
|
11971
|
-
remaining = null;
|
|
11972
|
-
}
|
|
11973
|
-
}
|
|
11974
|
-
context.output.result({ projectId, removed, remaining }, [
|
|
11975
|
-
`\u2705 Removed ${String(removed)} Supabase link(s)`,
|
|
11976
|
-
...remaining === null ? ["\u26A0 Could not read which links are left; run `naro supabase` to check."] : remaining.length > 0 ? [
|
|
11977
|
-
`\u26A0 Still connected: ${remaining.join(", ")} \u2014 your role cannot change those.`
|
|
11978
|
-
] : []
|
|
11979
|
-
]);
|
|
11980
|
-
}
|
|
11981
|
-
|
|
11982
11937
|
// src/commands/project-settings.ts
|
|
11983
11938
|
var SET_USAGE2 = "Usage: naro project set [--subdomain <name>] [--framework <preset>] [--root <dir>] [--branch <branch>] [--build-command <script>] [--output-dir <dir>] [--vinext on|off]";
|
|
11984
11939
|
var GRANT_USAGE = "Usage: naro project access grant <user-id> --role <project_admin|project_developer|project_viewer>";
|
|
@@ -14195,8 +14150,6 @@ Usage:
|
|
|
14195
14150
|
naro env import <file> [target] Upload a dotenv file's variables (asks first; --yes in CI)
|
|
14196
14151
|
naro env pull [file] Write env vars to .env.local
|
|
14197
14152
|
target is production, preview, all or an environment name; add and import use all when none is given
|
|
14198
|
-
naro supabase [list] The project's Supabase links: target, Supabase project and keys (connect in the dashboard)
|
|
14199
|
-
naro supabase disconnect [target] Remove a target's link, or (no target or all) every link your role may change, with its env vars (asks first)
|
|
14200
14153
|
|
|
14201
14154
|
naro environments List the project's environments: address, branch, protection, data, and how many the plan allows
|
|
14202
14155
|
naro environments create <slug> [--branch <b>] [--copy-env preview|production|none] [--database schema|empty]
|
|
@@ -14828,10 +14781,6 @@ function routeCommand(parsed) {
|
|
|
14828
14781
|
// Spec 2026-10-18-usage-cli-mcp §2.
|
|
14829
14782
|
case "usage":
|
|
14830
14783
|
return positionals.length === 0 ? { handler: runUsage, positionals: [] } : null;
|
|
14831
|
-
case "supabase":
|
|
14832
|
-
if (sub === void 0 || sub === "list")
|
|
14833
|
-
return positionals.length <= 1 ? { handler: runSupabase, positionals: [] } : null;
|
|
14834
|
-
return sub === "disconnect" && positionals.length <= 2 ? { handler: runSupabaseDisconnect, positionals: positionals.slice(1) } : null;
|
|
14835
14784
|
case "dashboard":
|
|
14836
14785
|
return positionals.length <= 1 ? { handler: runDashboard, positionals } : null;
|
|
14837
14786
|
case "billing":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "naro-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"naro": "./dist/index.js"
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"tsx": "4.23.12",
|
|
38
38
|
"typescript": "7.0.2",
|
|
39
39
|
"vitest": "3.2.7",
|
|
40
|
+
"naro-js": "0.9.0",
|
|
41
|
+
"@next-deploy/config": "0.1.0",
|
|
40
42
|
"@next-deploy/build": "0.1.0",
|
|
43
|
+
"@next-deploy/core": "0.1.0",
|
|
41
44
|
"@next-deploy/data-core": "0.1.0",
|
|
42
|
-
"@next-deploy/
|
|
45
|
+
"@next-deploy/functions-bundler": "0.1.0",
|
|
43
46
|
"@next-deploy/functions-runtime": "0.1.0",
|
|
44
|
-
"
|
|
45
|
-
"@next-deploy/sdk": "0.1.0",
|
|
46
|
-
"@next-deploy/core": "0.1.0",
|
|
47
|
-
"@next-deploy/functions-bundler": "0.1.0"
|
|
47
|
+
"@next-deploy/sdk": "0.1.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsup && pnpm build:types",
|