neon 8.0.5 → 8.0.6
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/commands/config.js +90 -5
- package/dist/commands/dev.js +2 -2
- package/dist/commands/env.js +1 -1
- package/package.json +3 -3
package/dist/commands/config.js
CHANGED
|
@@ -559,11 +559,96 @@ const status = async (props) => {
|
|
|
559
559
|
process.stdout.write(`${JSON.stringify(configView, null, 2)}\n`);
|
|
560
560
|
return;
|
|
561
561
|
}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
562
|
+
if (props.output !== "table") {
|
|
563
|
+
writer(props).end({
|
|
564
|
+
project: live.project,
|
|
565
|
+
branch: live.branch,
|
|
566
|
+
config: configView
|
|
567
|
+
}, { fields: INSPECT_FIELDS });
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
writeStatusTables(props, live, configView);
|
|
571
|
+
};
|
|
572
|
+
const STATUS_FIELDS = [
|
|
573
|
+
"project",
|
|
574
|
+
"region",
|
|
575
|
+
"postgres_version",
|
|
576
|
+
"organization",
|
|
577
|
+
"branch",
|
|
578
|
+
"parent",
|
|
579
|
+
"default",
|
|
580
|
+
"protected",
|
|
581
|
+
"expires_at",
|
|
582
|
+
"auth",
|
|
583
|
+
"data_api",
|
|
584
|
+
"compute",
|
|
585
|
+
"scale_to_zero",
|
|
586
|
+
"ttl"
|
|
587
|
+
];
|
|
588
|
+
const formatComputeUnits = (settings) => {
|
|
589
|
+
const min = settings?.autoscalingLimitMinCu;
|
|
590
|
+
const max = settings?.autoscalingLimitMaxCu;
|
|
591
|
+
if (min === void 0 && max === void 0) return void 0;
|
|
592
|
+
if (min === void 0) return `max ${max} CU`;
|
|
593
|
+
if (max === void 0) return `min ${min} CU`;
|
|
594
|
+
return min === max ? `${min} CU` : `${min}-${max} CU`;
|
|
595
|
+
};
|
|
596
|
+
/** Human `status`: one summary block, then a table per reported resource kind. */
|
|
597
|
+
const writeStatusTables = (props, live, view) => {
|
|
598
|
+
const compute = view.branch?.postgres?.computeSettings;
|
|
599
|
+
const suspend = compute?.suspendTimeout;
|
|
600
|
+
const out = writer(props);
|
|
601
|
+
out.write({
|
|
602
|
+
project: `${live.project.name} (${live.project.id})`,
|
|
603
|
+
region: live.project.region,
|
|
604
|
+
postgres_version: live.project.pgVersion,
|
|
605
|
+
organization: live.project.orgId,
|
|
606
|
+
branch: `${live.branch.name} (${live.branch.id})`,
|
|
607
|
+
parent: live.branch.parent,
|
|
608
|
+
default: live.branch.isDefault ? "yes" : "no",
|
|
609
|
+
protected: live.branch.protected ? "yes" : "no",
|
|
610
|
+
expires_at: live.branch.expiresAt,
|
|
611
|
+
auth: view.auth ? "enabled" : void 0,
|
|
612
|
+
data_api: view.dataApi ? "enabled" : void 0,
|
|
613
|
+
compute: formatComputeUnits(compute),
|
|
614
|
+
scale_to_zero: suspend === void 0 ? void 0 : suspend === false ? "off" : String(suspend),
|
|
615
|
+
ttl: view.branch?.ttl
|
|
616
|
+
}, {
|
|
617
|
+
fields: STATUS_FIELDS,
|
|
618
|
+
humanTitle: "Status"
|
|
619
|
+
});
|
|
620
|
+
const functions = Object.entries(view.preview?.functions ?? {}).map(([slug, fn]) => ({
|
|
621
|
+
slug,
|
|
622
|
+
name: fn.name
|
|
623
|
+
}));
|
|
624
|
+
if (functions.length > 0) out.write(functions, {
|
|
625
|
+
fields: ["slug", "name"],
|
|
626
|
+
humanTitle: "Functions"
|
|
627
|
+
});
|
|
628
|
+
const buckets = Object.entries(view.preview?.buckets ?? {}).map(([name, bucket]) => ({
|
|
629
|
+
name,
|
|
630
|
+
access: bucket.access
|
|
631
|
+
}));
|
|
632
|
+
if (buckets.length > 0) out.write(buckets, {
|
|
633
|
+
fields: ["name", "access"],
|
|
634
|
+
humanTitle: "Buckets"
|
|
635
|
+
});
|
|
636
|
+
const credentials = (view.preview?.credentials ?? []).map((credential) => ({
|
|
637
|
+
id: credential.id,
|
|
638
|
+
name: credential.name,
|
|
639
|
+
scopes: credential.scopes.join(", "),
|
|
640
|
+
last_used_at: credential.lastUsedAt
|
|
641
|
+
}));
|
|
642
|
+
if (credentials.length > 0) out.write(credentials, {
|
|
643
|
+
fields: [
|
|
644
|
+
"id",
|
|
645
|
+
"name",
|
|
646
|
+
"scopes",
|
|
647
|
+
"last_used_at"
|
|
648
|
+
],
|
|
649
|
+
humanTitle: "Credentials"
|
|
650
|
+
});
|
|
651
|
+
out.end();
|
|
567
652
|
};
|
|
568
653
|
const planCmd = async (props) => {
|
|
569
654
|
const config = await loadConfig(props);
|
package/dist/commands/dev.js
CHANGED
|
@@ -4,11 +4,11 @@ import { isClaimableEnvTarget } from "../claimable/state.js";
|
|
|
4
4
|
import { getCliName } from "../utils/cli_name.js";
|
|
5
5
|
import { readEnvFile, resolveEnvFilePath } from "../env_file.js";
|
|
6
6
|
import { l as functionBaseUrlKey } from "../_chunks/env-N19A7qND.js";
|
|
7
|
-
import { branchIdResolve } from "../utils/enrichers.js";
|
|
8
|
-
import { bundleEntry } from "../utils/esbuild.js";
|
|
9
7
|
import { a as resolveDevEnv } from "../_chunks/env-BgiaRNT1.js";
|
|
10
8
|
import { findConfigFunctionBySource, resolveFunctionsFromConfig } from "../dev/functions.js";
|
|
11
9
|
import { resolveWatchInputs } from "../dev/inputs.js";
|
|
10
|
+
import { branchIdResolve } from "../utils/enrichers.js";
|
|
11
|
+
import { bundleEntry } from "../utils/esbuild.js";
|
|
12
12
|
import { existsSync, mkdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
13
13
|
import { basename, dirname, join, relative, resolve } from "node:path";
|
|
14
14
|
import { fileURLToPath } from "node:url";
|
package/dist/commands/env.js
CHANGED
|
@@ -7,10 +7,10 @@ import { deprecatedServiceMessage, parseServices, servicesFlagValue, servicesOpt
|
|
|
7
7
|
import { mergeEnvFile, readEnvFile, resolveEnvFilePath } from "../env_file.js";
|
|
8
8
|
import { t as NEON_ENV_VAR_KEYS, u as isFunctionBaseUrlKey } from "../_chunks/env-N19A7qND.js";
|
|
9
9
|
import { ENV_PULL_KEY_HELP, ENV_PULL_SERVICES, envKeysForSelection, envPullFlagValue, ownedEnvServiceKeys, parseEnvPullKeys } from "../env_services.js";
|
|
10
|
+
import { i as dropClaimableUnsupported, o as resolveNeonEnvVars } from "../_chunks/env-BgiaRNT1.js";
|
|
10
11
|
import { fillSingleProject, resolveBranchRef } from "../utils/enrichers.js";
|
|
11
12
|
import { warnAiGateway } from "../utils/ai_gateway_notice.js";
|
|
12
13
|
import { announceTargetBranch } from "../utils/branch_notice.js";
|
|
13
|
-
import { i as dropClaimableUnsupported, o as resolveNeonEnvVars } from "../_chunks/env-BgiaRNT1.js";
|
|
14
14
|
import { existsSync } from "node:fs";
|
|
15
15
|
import chalk from "chalk";
|
|
16
16
|
//#region src/commands/env.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neon",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.6",
|
|
4
4
|
"description": "CLI tool for Neon, the cloud backend primitives built around Lakebase Postgres",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"neon",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"yaml": "^2.9.0",
|
|
65
65
|
"yargs": "17.7.2",
|
|
66
66
|
"yoctocolors": "^2.1.2",
|
|
67
|
-
"@neon/config-runtime": "1.7.
|
|
67
|
+
"@neon/config-runtime": "1.7.4",
|
|
68
68
|
"@neon/sdk": "7.0.0",
|
|
69
69
|
"@neon/config": "1.8.3"
|
|
70
70
|
},
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"tsx": "4.22.3",
|
|
100
100
|
"typescript": "^5.9.0",
|
|
101
101
|
"vitest": "^3.0.9",
|
|
102
|
-
"@neon-internals/cli-core": "0.0.0",
|
|
103
102
|
"@neon-internals/env-core": "0.0.26",
|
|
103
|
+
"@neon-internals/cli-core": "0.0.0",
|
|
104
104
|
"@neon/e2e-harness": "0.0.0",
|
|
105
105
|
"@neon/functions": "0.11.0"
|
|
106
106
|
},
|