neon 8.10.0 → 8.10.1
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 +2 -2
- package/dist/commands/dev.js +3 -3
- package/dist/commands/docs.js +21 -4
- package/dist/commands/env.js +1 -1
- package/dist/commands/subscribe.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1007,7 +1007,7 @@ Default table output is `Feedback received. Thank you!`. `--output json` and `--
|
|
|
1007
1007
|
|
|
1008
1008
|
## Search neon.com (`docs search`)
|
|
1009
1009
|
|
|
1010
|
-
`neon docs search <query>` searches neon.com: the docs, API reference, PostgreSQL tutorial, guides, FAQs, changelog, and blog. It does not log in and does not use your Neon account. It uses the same search as the neon.com search box.
|
|
1010
|
+
`neon docs search <query>` searches neon.com: the docs, API reference, PostgreSQL tutorial, guides, FAQs, changelog, and blog. It does not log in and does not use your Neon account. It uses the same search as the neon.com search box. The search service records the query, the CLI version, and the detected coding agent; `--no-analytics` turns that off.
|
|
1011
1011
|
|
|
1012
1012
|
```bash
|
|
1013
1013
|
neon docs search "reset a branch"
|
|
@@ -1543,7 +1543,7 @@ Global options are supported with any Neon CLI command.
|
|
|
1543
1543
|
|
|
1544
1544
|
- <a id="analytics"></a>`--analytics`
|
|
1545
1545
|
|
|
1546
|
-
Analytics are enabled by default to gather information about the CLI commands and options that are used by our customers. This data collection assists in offering support, and allows for a better understanding of typical usage patterns so that we can improve user experience. Neon does not collect user-defined data, such as project IDs or command payloads, except the question passed to `neon ask --prompt`. When the CLI fails on an internal bug (a JavaScript `TypeError`, `ReferenceError`, `RangeError`, or `SyntaxError`), it also sends that error to Neon's Sentry: the error type, the message only when it is a standard JavaScript message that names nothing but code (any other message is replaced), the stack trace with file paths cut to the package (`neon/dist/...`), the CLI and Node.js versions, and whether it ran in CI or a coding agent. To opt-out of analytics data collection and error reports, specify `--no-analytics` or `--analytics false`.
|
|
1546
|
+
Analytics are enabled by default to gather information about the CLI commands and options that are used by our customers. This data collection assists in offering support, and allows for a better understanding of typical usage patterns so that we can improve user experience. Neon does not collect user-defined data, such as project IDs or command payloads, except the question passed to `neon ask --prompt` and the query passed to `neon docs search`. The Neon search service records each `neon docs search` query with the CLI version and the detected coding agent; with `--no-analytics` it records nothing. When the CLI fails on an internal bug (a JavaScript `TypeError`, `ReferenceError`, `RangeError`, or `SyntaxError`), it also sends that error to Neon's Sentry: the error type, the message only when it is a standard JavaScript message that names nothing but code (any other message is replaced), the stack trace with file paths cut to the package (`neon/dist/...`), the CLI and Node.js versions, and whether it ran in CI or a coding agent. To opt-out of analytics data collection and error reports, specify `--no-analytics` or `--analytics false`.
|
|
1547
1547
|
|
|
1548
1548
|
- <a id="version"></a>`-v, --version`
|
|
1549
1549
|
|
package/dist/commands/dev.js
CHANGED
|
@@ -4,12 +4,12 @@ import { isClaimableEnvTarget } from "../claimable/state.js";
|
|
|
4
4
|
import { getCliName } from "../utils/cli_name.js";
|
|
5
5
|
import { defaultDevEnvFiles, readEnvFile, resolveEnvFilePath } from "../env_file.js";
|
|
6
6
|
import { l as functionBaseUrlKey } from "../_chunks/env-BpP3Dqpe.js";
|
|
7
|
-
import { a as resolveDevEnv } from "../_chunks/env-BNm69Qh8.js";
|
|
8
|
-
import { findConfigFunctionBySource, resolveFunctionsFromConfig } from "../dev/functions.js";
|
|
9
|
-
import { resolveWatchInputs } from "../dev/inputs.js";
|
|
10
7
|
import { branchIdResolve } from "../utils/enrichers.js";
|
|
11
8
|
import { bundleEntry } from "../utils/esbuild.js";
|
|
9
|
+
import { a as resolveDevEnv } from "../_chunks/env-BNm69Qh8.js";
|
|
12
10
|
import { envFlag } from "./config.js";
|
|
11
|
+
import { findConfigFunctionBySource, resolveFunctionsFromConfig } from "../dev/functions.js";
|
|
12
|
+
import { resolveWatchInputs } from "../dev/inputs.js";
|
|
13
13
|
import { existsSync, mkdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
14
14
|
import { basename, dirname, join, relative, resolve } from "node:path";
|
|
15
15
|
import { fileURLToPath } from "node:url";
|
package/dist/commands/docs.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "../_chunks/rolldown-runtime-8H4AJuhK.js";
|
|
2
|
+
import { getCliAgent } from "../env.js";
|
|
3
|
+
import pkg_default from "../pkg.js";
|
|
2
4
|
import { isNetworkError } from "../errors.js";
|
|
3
5
|
import { writer } from "../writer.js";
|
|
4
6
|
import { single } from "../utils/flags.js";
|
|
@@ -12,7 +14,8 @@ var docs_exports = /* @__PURE__ */ __exportAll({
|
|
|
12
14
|
command: () => command,
|
|
13
15
|
describe: () => describe,
|
|
14
16
|
parseSearchHits: () => parseSearchHits,
|
|
15
|
-
resolveSiteSearchUrl: () => resolveSiteSearchUrl
|
|
17
|
+
resolveSiteSearchUrl: () => resolveSiteSearchUrl,
|
|
18
|
+
siteSearchHeaders: () => siteSearchHeaders
|
|
16
19
|
});
|
|
17
20
|
const DEFAULT_SITE_SEARCH_URL = "https://br-frosty-cell-a5smzg39-assistant.compute.c-1.us-east-2.aws.neon.tech/site-search";
|
|
18
21
|
const SITE_SEARCH_CATEGORIES = [
|
|
@@ -76,7 +79,12 @@ const search = async (props) => {
|
|
|
76
79
|
}),
|
|
77
80
|
query,
|
|
78
81
|
limit: props.limit,
|
|
79
|
-
categories: props.category ? [...new Set(props.category)] : void 0
|
|
82
|
+
categories: props.category ? [...new Set(props.category)] : void 0,
|
|
83
|
+
headers: siteSearchHeaders({
|
|
84
|
+
analytics: props.analytics,
|
|
85
|
+
agent: getCliAgent(process.env),
|
|
86
|
+
version: pkg_default.version
|
|
87
|
+
})
|
|
80
88
|
});
|
|
81
89
|
writer(props).end(hits, {
|
|
82
90
|
fields: [
|
|
@@ -92,6 +100,15 @@ function sectionOf(hit) {
|
|
|
92
100
|
const parts = hit.heading.split(" > ");
|
|
93
101
|
return (parts[0] === hit.title ? parts.slice(1) : parts).join(" > ");
|
|
94
102
|
}
|
|
103
|
+
function siteSearchHeaders(opts) {
|
|
104
|
+
return {
|
|
105
|
+
"Content-Type": "application/json",
|
|
106
|
+
"User-Agent": `neon/${opts.version}`,
|
|
107
|
+
"x-neon-source": "cli",
|
|
108
|
+
...opts.agent ? { "x-neon-client": encodeURIComponent(opts.agent) } : {},
|
|
109
|
+
...opts.analytics ? {} : { "x-neon-analytics": "off" }
|
|
110
|
+
};
|
|
111
|
+
}
|
|
95
112
|
function isTimeout(error) {
|
|
96
113
|
return error instanceof Error && (error.name === "TimeoutError" || error.name === "AbortError");
|
|
97
114
|
}
|
|
@@ -100,7 +117,7 @@ async function searchSite(opts) {
|
|
|
100
117
|
try {
|
|
101
118
|
const response = await fetch(opts.url, {
|
|
102
119
|
method: "POST",
|
|
103
|
-
headers:
|
|
120
|
+
headers: opts.headers,
|
|
104
121
|
body: JSON.stringify({
|
|
105
122
|
query: opts.query,
|
|
106
123
|
limit: opts.limit,
|
|
@@ -154,4 +171,4 @@ function parseSearchHits(raw) {
|
|
|
154
171
|
});
|
|
155
172
|
}
|
|
156
173
|
//#endregion
|
|
157
|
-
export { DEFAULT_SITE_SEARCH_URL, MAX_LIMIT, MAX_QUERY_LENGTH, SITE_SEARCH_CATEGORIES, builder, command, describe, parseSearchHits, resolveSiteSearchUrl, docs_exports as t };
|
|
174
|
+
export { DEFAULT_SITE_SEARCH_URL, MAX_LIMIT, MAX_QUERY_LENGTH, SITE_SEARCH_CATEGORIES, builder, command, describe, parseSearchHits, resolveSiteSearchUrl, siteSearchHeaders, docs_exports as t };
|
package/dist/commands/env.js
CHANGED
|
@@ -7,9 +7,9 @@ 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-BpP3Dqpe.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-BNm69Qh8.js";
|
|
11
10
|
import { fillSingleProject, resolveBranchRef } from "../utils/enrichers.js";
|
|
12
11
|
import { warnAiGateway } from "../utils/ai_gateway_notice.js";
|
|
12
|
+
import { i as dropClaimableUnsupported, o as resolveNeonEnvVars } from "../_chunks/env-BNm69Qh8.js";
|
|
13
13
|
import { formatPulledEnv, pulledBranch } from "./env_output.js";
|
|
14
14
|
import { existsSync } from "node:fs";
|
|
15
15
|
import chalk from "chalk";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { writer } from "../writer.js";
|
|
2
|
-
import { o as resolveNeonEnvVars } from "../_chunks/env-BNm69Qh8.js";
|
|
3
2
|
import { branchIdFromProps } from "../utils/enrichers.js";
|
|
3
|
+
import { o as resolveNeonEnvVars } from "../_chunks/env-BNm69Qh8.js";
|
|
4
4
|
import YAML from "yaml";
|
|
5
5
|
//#region src/commands/subscribe.ts
|
|
6
6
|
const builder = (argv) => argv.usage("$0 realtime subscribe \"<query>\" [options]").positional("query", {
|