neon 8.0.11 → 8.0.12
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/checkout.js +12 -1
- package/package.json +3 -3
|
@@ -3,6 +3,7 @@ import { isCi } from "../env.js";
|
|
|
3
3
|
import { log } from "../log.js";
|
|
4
4
|
import { isNeonApiError } from "../api.js";
|
|
5
5
|
import { applyContext, contextBranch, readContextFile } from "../context.js";
|
|
6
|
+
import { isClaimableEnvTarget } from "../claimable/state.js";
|
|
6
7
|
import { getCliName } from "../utils/cli_name.js";
|
|
7
8
|
import { loadEnvFileIntoProcess } from "../env_file.js";
|
|
8
9
|
import { createBranch, pickBranchInteractively } from "../utils/branch_picker.js";
|
|
@@ -91,13 +92,19 @@ const handler = async (props) => {
|
|
|
91
92
|
props.id = renamed;
|
|
92
93
|
}
|
|
93
94
|
}
|
|
95
|
+
const orgRead = isClaimableEnvTarget({
|
|
96
|
+
apiHost: props.apiHost,
|
|
97
|
+
contextFile: props.contextFile,
|
|
98
|
+
configDir: props.configDir ?? ""
|
|
99
|
+
}) ? void 0 : resolveOrgId(props, projectId);
|
|
100
|
+
orgRead?.catch(() => void 0);
|
|
94
101
|
const { branchId, branchName, created, policyApplied, policyFailure } = await resolveBranchId(props, projectId, {
|
|
95
102
|
hooks,
|
|
96
103
|
git,
|
|
97
104
|
event,
|
|
98
105
|
cwd
|
|
99
106
|
});
|
|
100
|
-
const orgId = await resolveOrgId(props, projectId);
|
|
107
|
+
const orgId = await (orgRead ?? resolveOrgId(props, projectId));
|
|
101
108
|
applyContext(props.contextFile, {
|
|
102
109
|
projectId,
|
|
103
110
|
...orgId ? { orgId } : {},
|
|
@@ -119,6 +126,10 @@ const handler = async (props) => {
|
|
|
119
126
|
projectId,
|
|
120
127
|
branch: branchId,
|
|
121
128
|
envPull: props.envPull
|
|
129
|
+
}, {
|
|
130
|
+
branchId,
|
|
131
|
+
branchName,
|
|
132
|
+
usedDefault: false
|
|
122
133
|
});
|
|
123
134
|
const needsCreateAfter = created && hooks?.create?.after;
|
|
124
135
|
if (config && (hooks?.checkout?.after || needsCreateAfter)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neon",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.12",
|
|
4
4
|
"description": "CLI tool for Neon, the cloud backend primitives built around Lakebase Postgres",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"neon",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"yargs": "17.7.2",
|
|
66
66
|
"yoctocolors": "^2.1.2",
|
|
67
67
|
"@neon/config": "1.8.4",
|
|
68
|
-
"@neon/
|
|
69
|
-
"@neon/
|
|
68
|
+
"@neon/config-runtime": "1.7.6",
|
|
69
|
+
"@neon/sdk": "7.0.1"
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
72
72
|
"@napi-rs/keyring": "1.3.0",
|