neon 4.11.0 → 4.12.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 +1 -1
- package/dist/commands/config.js +7 -10
- package/dist/commands/dev.js +61 -19
- package/dist/commands/functions.js +33 -23
- package/dist/commands/plugins.js +3 -1
- package/dist/commands/skills.js +3 -1
- package/dist/context.js +2 -2
- package/dist/dev/functions.js +2 -1
- package/dist/index.js +2 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -675,7 +675,7 @@ neon config plan --project-id polished-snowflake-12345678 --output json
|
|
|
675
675
|
neon deploy --branch my-feature --update-existing
|
|
676
676
|
```
|
|
677
677
|
|
|
678
|
-
Function deploys declared under `preview.functions` are bundled by
|
|
678
|
+
Function deploys declared under `preview.functions` are bundled with esbuild by default. A directory `source` is discovered as `index.ts`, then `index.js`, then `index.mjs`. Set `bundler: "none"` to ship a prebuilt directory as-is. `neon function deploy --no-bundle` is the same switch without a `neon.ts`.
|
|
679
679
|
|
|
680
680
|
When a package cannot be bundled — a native addon with no esbuild loader, or an optional peer dependency a library references on an untaken code path — list it in that function's `externalPackages` and the bundler leaves the import alone. `neon dev` honours the same list. It does not make the package resolvable in the deployed archive (there is no `node_modules` next to the bundle), so it only unblocks an import that is never evaluated — a dependency the handler actually calls has to be bundled, and a natively-backed one cannot be. See [`@neon/config`](../config/README.md#unbundleable-dependencies-externalpackages).
|
|
681
681
|
|
package/dist/commands/config.js
CHANGED
|
@@ -23,7 +23,7 @@ import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
|
23
23
|
import { dirname, join } from "node:path";
|
|
24
24
|
import chalk from "chalk";
|
|
25
25
|
import { packagesToStage, resolveConfig } from "@neon/config";
|
|
26
|
-
import { PushConflictError, apply, assertZipWithinLimits, createBranch, describeNativeFinding, enforceLimits, findUndeclaredNativePackages, inspect, isPartialBranchCreateError, loadConfigFromFile as loadConfigFromFile$1, plan, traceNativePackages } from "@neon/config-runtime";
|
|
26
|
+
import { PushConflictError, apply, assertZipWithinLimits, bundleAsIs, createBranch, describeNativeFinding, enforceLimits, findUndeclaredNativePackages, inspect, isPartialBranchCreateError, loadConfigFromFile as loadConfigFromFile$1, plan, resolveEsbuildEntry, traceNativePackages, zipFunctionBundle } from "@neon/config-runtime";
|
|
27
27
|
//#region src/commands/config.ts
|
|
28
28
|
var config_exports = /* @__PURE__ */ __exportAll({
|
|
29
29
|
applyCmd: () => applyCmd,
|
|
@@ -41,27 +41,24 @@ var config_exports = /* @__PURE__ */ __exportAll({
|
|
|
41
41
|
planCmd: () => planCmd,
|
|
42
42
|
status: () => status
|
|
43
43
|
});
|
|
44
|
-
/**
|
|
45
|
-
* Bundle a function with neonctl's OWN bundler (the shared esbuild helper) so the
|
|
46
|
-
* config-runtime never has to import esbuild itself. Injecting this keeps esbuild
|
|
47
|
-
* out of config-runtime's static module graph — and therefore out of the packaged
|
|
48
|
-
* neonctl snapshot, which resolves esbuild dynamically at deploy time.
|
|
49
|
-
*/
|
|
50
44
|
const neonctlBundler = async (fn) => {
|
|
45
|
+
if (typeof fn.bundler === "function") return zipFunctionBundle(fn.slug, await fn.bundler(fn));
|
|
46
|
+
if (fn.bundler === "none") return zipFunctionBundle(fn.slug, await bundleAsIs(fn));
|
|
47
|
+
const entry = await resolveEsbuildEntry(fn.source);
|
|
51
48
|
const externalPackages = fn.externalPackages ?? [];
|
|
52
|
-
const { files, metafile, warnings } = await bundleEntry(
|
|
49
|
+
const { files, metafile, warnings } = await bundleEntry(entry, { externalPackages: externalPackages.map((pkg) => pkg.name) });
|
|
53
50
|
for (const warning of warnings) log.warning(warning);
|
|
54
51
|
for (const finding of findUndeclaredNativePackages({
|
|
55
52
|
metafile,
|
|
56
53
|
declared: externalPackages.map((pkg) => pkg.name),
|
|
57
|
-
projectDir: dirname(
|
|
54
|
+
projectDir: dirname(entry)
|
|
58
55
|
})) log.warning(describeNativeFinding(fn.slug, finding));
|
|
59
56
|
const staged = packagesToStage(externalPackages);
|
|
60
57
|
if (staged.length === 0) return zipBundle(files);
|
|
61
58
|
const traced = await traceNativePackages({
|
|
62
59
|
slug: fn.slug,
|
|
63
60
|
packages: staged,
|
|
64
|
-
projectDir: dirname(
|
|
61
|
+
projectDir: dirname(entry)
|
|
65
62
|
});
|
|
66
63
|
for (const warning of traced.warnings) log.warning(warning);
|
|
67
64
|
const entries = {
|
package/dist/commands/dev.js
CHANGED
|
@@ -7,12 +7,12 @@ import { bundleEntry } from "../utils/esbuild.js";
|
|
|
7
7
|
import { i as resolveDevEnv } from "../_chunks/env-NbA61JR3.js";
|
|
8
8
|
import { resolveFunctionsFromConfig } from "../dev/functions.js";
|
|
9
9
|
import { resolveWatchInputs } from "../dev/inputs.js";
|
|
10
|
-
import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
|
|
11
|
-
import { basename, dirname, join, resolve } from "node:path";
|
|
10
|
+
import { existsSync, mkdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
11
|
+
import { basename, dirname, join, relative, resolve } from "node:path";
|
|
12
12
|
import { fileURLToPath } from "node:url";
|
|
13
13
|
import chalk from "chalk";
|
|
14
14
|
import { spawn, spawnSync } from "node:child_process";
|
|
15
|
-
import { describeNativeFinding, findUndeclaredNativePackages } from "@neon/config-runtime";
|
|
15
|
+
import { bundleAsIs, describeNativeFinding, findUndeclaredNativePackages, resolveEsbuildEntry } from "@neon/config-runtime";
|
|
16
16
|
import { once } from "node:events";
|
|
17
17
|
//#region src/commands/dev.ts
|
|
18
18
|
var dev_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -239,11 +239,13 @@ const plannedToUnit = (fn, branchEnv, searchBase) => {
|
|
|
239
239
|
fn: Object.keys(fn.env)
|
|
240
240
|
},
|
|
241
241
|
...fn.externalPackages ? { externalPackages: fn.externalPackages } : {},
|
|
242
|
+
...fn.bundler !== void 0 ? { bundler: fn.bundler } : {},
|
|
242
243
|
configKey: JSON.stringify({
|
|
243
244
|
source: fn.source,
|
|
244
245
|
port: fn.port ?? null,
|
|
245
246
|
env: fn.env,
|
|
246
|
-
externalPackages: fn.externalPackages ?? null
|
|
247
|
+
externalPackages: fn.externalPackages ?? null,
|
|
248
|
+
bundler: typeof fn.bundler === "function" ? "custom" : fn.bundler ?? null
|
|
247
249
|
})
|
|
248
250
|
};
|
|
249
251
|
};
|
|
@@ -286,7 +288,7 @@ const runSupervisor = async (units, options = {}) => {
|
|
|
286
288
|
const bundleAndStart = async (r) => {
|
|
287
289
|
let bundlePath;
|
|
288
290
|
try {
|
|
289
|
-
bundlePath = await writeBundle(r.unit.source, r.unit.bundleDir, r.unit.externalPackages, r.unit.slug ?? void 0);
|
|
291
|
+
bundlePath = await writeBundle(r.unit.source, r.unit.bundleDir, r.unit.externalPackages, r.unit.slug ?? void 0, r.unit.bundler);
|
|
290
292
|
} catch (err) {
|
|
291
293
|
r.status = "error";
|
|
292
294
|
logUnit(r.unit, chalk.red("bundle failed: ") + (err instanceof Error ? err.message : String(err)));
|
|
@@ -329,7 +331,7 @@ const runSupervisor = async (units, options = {}) => {
|
|
|
329
331
|
}, 150);
|
|
330
332
|
};
|
|
331
333
|
const startUnit = async (r) => {
|
|
332
|
-
r.watcher = await startWatcher(r.unit
|
|
334
|
+
r.watcher = await startWatcher(r.unit, () => {
|
|
333
335
|
restart(r);
|
|
334
336
|
});
|
|
335
337
|
await bundleAndStart(r);
|
|
@@ -500,22 +502,50 @@ const spawnChild = (unit, runtimePath, bundlePath) => {
|
|
|
500
502
|
* positive would otherwise repeat the whole block for its lifetime.
|
|
501
503
|
*/
|
|
502
504
|
const reportedFindings = /* @__PURE__ */ new Map();
|
|
503
|
-
const writeBundle = async (source, bundleDir, externalPackages, label) => {
|
|
504
|
-
|
|
505
|
+
const writeBundle = async (source, bundleDir, externalPackages, label, bundler) => {
|
|
506
|
+
if (bundler !== void 0 && bundler !== "esbuild") {
|
|
507
|
+
const files = await bundleForDev(source, label, bundler);
|
|
508
|
+
return writeBundleFiles(bundleDir, files);
|
|
509
|
+
}
|
|
510
|
+
const entry = await resolveEsbuildEntry(source);
|
|
511
|
+
const { files, metafile, warnings } = await bundleEntry(entry, { ...externalPackages ? { externalPackages } : {} });
|
|
505
512
|
for (const warning of warnings) log.warning(warning);
|
|
506
513
|
const findings = findUndeclaredNativePackages({
|
|
507
514
|
metafile,
|
|
508
515
|
declared: externalPackages ?? [],
|
|
509
|
-
projectDir: dirname(
|
|
516
|
+
projectDir: dirname(entry)
|
|
510
517
|
});
|
|
511
518
|
const signature = findings.map((f) => f.name).join(",");
|
|
512
519
|
if (reportedFindings.get(source) !== signature) {
|
|
513
520
|
reportedFindings.set(source, signature);
|
|
514
521
|
for (const finding of findings) log.warning(describeNativeFinding(label ?? basename(source), finding));
|
|
515
522
|
}
|
|
523
|
+
return writeBundleFiles(bundleDir, files);
|
|
524
|
+
};
|
|
525
|
+
const bundleForDev = async (source, label, bundler) => {
|
|
526
|
+
const fn = {
|
|
527
|
+
slug: label ?? basename(source),
|
|
528
|
+
name: label ?? basename(source),
|
|
529
|
+
source,
|
|
530
|
+
env: {},
|
|
531
|
+
runtime: "nodejs24",
|
|
532
|
+
bundler
|
|
533
|
+
};
|
|
534
|
+
return bundler === "none" ? bundleAsIs(fn) : bundler(fn);
|
|
535
|
+
};
|
|
536
|
+
const writeBundleFiles = (bundleDir, files) => {
|
|
537
|
+
rmSync(bundleDir, {
|
|
538
|
+
recursive: true,
|
|
539
|
+
force: true
|
|
540
|
+
});
|
|
516
541
|
mkdirSync(bundleDir, { recursive: true });
|
|
517
|
-
for (const [name, contents] of Object.entries(files))
|
|
518
|
-
|
|
542
|
+
for (const [name, contents] of Object.entries(files)) {
|
|
543
|
+
const dest = join(bundleDir, name);
|
|
544
|
+
mkdirSync(dirname(dest), { recursive: true });
|
|
545
|
+
writeFileSync(dest, contents);
|
|
546
|
+
}
|
|
547
|
+
const entry = ["index.mjs", "index.js"].find((name) => name in files);
|
|
548
|
+
return join(bundleDir, entry ?? "index.mjs");
|
|
519
549
|
};
|
|
520
550
|
const urlFor = (port) => port === null ? chalk.red("not running") : `http://localhost:${port}`;
|
|
521
551
|
const waitForReady = (child) => new Promise((resolveReady) => {
|
|
@@ -594,11 +624,19 @@ const logUnit = (unit, message) => {
|
|
|
594
624
|
const prefix = unit.label ? chalk.dim(`[${unit.label}] `) : "";
|
|
595
625
|
log.info(`${prefix}${message}`);
|
|
596
626
|
};
|
|
597
|
-
const startWatcher = async (
|
|
627
|
+
const startWatcher = async (unit, restart) => {
|
|
598
628
|
const { default: chokidar } = await import("chokidar");
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
629
|
+
if (unit.bundler !== void 0 && unit.bundler !== "esbuild") {
|
|
630
|
+
const dir = statSync(unit.source, { throwIfNoEntry: false })?.isDirectory() === true ? unit.source : dirname(unit.source);
|
|
631
|
+
return startDirectoryWatcher(chokidar, dir, restart, { ignoreDist: false });
|
|
632
|
+
}
|
|
633
|
+
let entry = unit.source;
|
|
634
|
+
try {
|
|
635
|
+
entry = await resolveEsbuildEntry(unit.source);
|
|
636
|
+
} catch {}
|
|
637
|
+
const initialInputs = await resolveWatchInputs(entry);
|
|
638
|
+
if (initialInputs === null) return startDirectoryWatcher(chokidar, entry, restart, { ignoreDist: true });
|
|
639
|
+
return startInputWatcher(chokidar, entry, initialInputs, restart);
|
|
602
640
|
};
|
|
603
641
|
/**
|
|
604
642
|
* Watch the neon.ts file itself for changes, firing `onChange` on every save. Used by the
|
|
@@ -645,11 +683,15 @@ const startInputWatcher = async (chokidar, source, initialInputs, restart) => {
|
|
|
645
683
|
close: () => watcher.close()
|
|
646
684
|
};
|
|
647
685
|
};
|
|
648
|
-
const startDirectoryWatcher = async (chokidar, source, restart) => {
|
|
649
|
-
const watchedDir = dirname(source);
|
|
686
|
+
const startDirectoryWatcher = async (chokidar, source, restart, options) => {
|
|
687
|
+
const watchedDir = statSync(source, { throwIfNoEntry: false })?.isDirectory() ? source : dirname(source);
|
|
650
688
|
const isIgnored = (p) => {
|
|
651
|
-
const
|
|
652
|
-
|
|
689
|
+
const rel = relative(watchedDir, p);
|
|
690
|
+
if (rel === "" || rel === ".") return false;
|
|
691
|
+
if (rel.startsWith("..")) return false;
|
|
692
|
+
const segments = rel.split(/[/\\]/);
|
|
693
|
+
if (segments.includes("node_modules") || segments.includes(".git")) return true;
|
|
694
|
+
return options.ignoreDist && segments.includes("dist");
|
|
653
695
|
};
|
|
654
696
|
const watcher = chokidar.watch(watchedDir, {
|
|
655
697
|
ignoreInitial: true,
|
|
@@ -7,9 +7,10 @@ import { writer } from "../writer.js";
|
|
|
7
7
|
import { branchIdFromProps, fillSingleProject } from "../utils/enrichers.js";
|
|
8
8
|
import { bundleEntry } from "../utils/esbuild.js";
|
|
9
9
|
import { zipBundle } from "../utils/zip.js";
|
|
10
|
-
import {
|
|
11
|
-
import { dirname
|
|
12
|
-
import {
|
|
10
|
+
import { statSync } from "node:fs";
|
|
11
|
+
import { dirname } from "node:path";
|
|
12
|
+
import { FUNCTION_SOURCE_ENTRIES } from "@neon/config";
|
|
13
|
+
import { bundleAsIs, describeNativeFinding, findUndeclaredNativePackages, resolveEsbuildEntry, zipFunctionBundle } from "@neon/config-runtime";
|
|
13
14
|
//#region src/commands/functions.ts
|
|
14
15
|
var functions_exports = /* @__PURE__ */ __exportAll({
|
|
15
16
|
aliases: () => aliases,
|
|
@@ -55,11 +56,6 @@ const writeDeploymentErrorSection = (out, dep) => {
|
|
|
55
56
|
};
|
|
56
57
|
const SLUG_PATTERN = /^[a-z0-9]{1,20}$/;
|
|
57
58
|
const SLUG_HELP = "Use 1-20 lowercase letters and digits (no hyphens or other characters).";
|
|
58
|
-
const ENTRY_CANDIDATES = [
|
|
59
|
-
"index.ts",
|
|
60
|
-
"index.mjs",
|
|
61
|
-
"index.js"
|
|
62
|
-
];
|
|
63
59
|
const POLL_INTERVAL_MS = Number(process.env.NEON_FUNCTIONS_POLL_INTERVAL_MS) || 2e3;
|
|
64
60
|
const POLL_TIMEOUT_MS = Number(process.env.NEON_FUNCTIONS_POLL_TIMEOUT_MS) || 6e5;
|
|
65
61
|
const command = "functions";
|
|
@@ -80,7 +76,7 @@ const builder = (argv) => argv.usage("$0 function <sub-command> [options]").opti
|
|
|
80
76
|
demandOption: true
|
|
81
77
|
}).options({
|
|
82
78
|
src: {
|
|
83
|
-
describe: "Function source: a directory containing index.ts, index.
|
|
79
|
+
describe: "Function source: a directory containing index.ts, index.js, or index.mjs (first file match is the entry), or a path to the entry file",
|
|
84
80
|
type: "string"
|
|
85
81
|
},
|
|
86
82
|
path: {
|
|
@@ -105,6 +101,11 @@ const builder = (argv) => argv.usage("$0 function <sub-command> [options]").opti
|
|
|
105
101
|
describe: "Wait for the deployment to finish building",
|
|
106
102
|
type: "boolean",
|
|
107
103
|
default: true
|
|
104
|
+
},
|
|
105
|
+
bundle: {
|
|
106
|
+
describe: "Bundle --src with esbuild. Use --no-bundle to zip a prebuilt directory (root must contain index.mjs or index.js) or a file of that name.",
|
|
107
|
+
type: "boolean",
|
|
108
|
+
default: true
|
|
108
109
|
}
|
|
109
110
|
}), (args) => deploy(args)).command("list", "List functions on the branch", (yargs) => yargs, (args) => list(args)).command("get <slug>", "Show a function's details", (yargs) => yargs.positional("slug", {
|
|
110
111
|
describe: "Function slug",
|
|
@@ -144,24 +145,33 @@ const emitDeployResult = (props, deployment, fn) => {
|
|
|
144
145
|
};
|
|
145
146
|
const isTransient = (err) => isNeonApiError(err) && (err.status === void 0 || err.status === 404 || err.status >= 500);
|
|
146
147
|
const deploy = async (props) => {
|
|
147
|
-
if (props.path !== void 0 || props.entry !== void 0) throw new Error(
|
|
148
|
-
if (!(props.src !== void 0 || props.env !== void 0 || props.runtime !== void 0)) throw new Error(`Provide at least one option to deploy, e.g. --src or --
|
|
148
|
+
if (props.path !== void 0 || props.entry !== void 0) throw new Error(`--path and --entry were removed. Use --src <dir>; the entry point is discovered as ${FUNCTION_SOURCE_ENTRIES.join(", ")} in that directory.`);
|
|
149
|
+
if (!(props.src !== void 0 || props.env !== void 0 || props.runtime !== void 0 || props.bundle === false)) throw new Error(`Provide at least one option to deploy, e.g. --src, --env, or --no-bundle. See: ${getCliName()} function deploy --help.`);
|
|
149
150
|
if (!SLUG_PATTERN.test(props.slug)) throw new Error(`Invalid function slug "${props.slug}". ${SLUG_HELP}`);
|
|
150
151
|
const src = props.src ?? ".";
|
|
151
152
|
const runtime = props.runtime ?? "nodejs24";
|
|
152
153
|
const environment = parseEnv(props.env);
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
154
|
+
if (statSync(src, { throwIfNoEntry: false }) === void 0) throw new Error(`--src path not found: ${src}.`);
|
|
155
|
+
let zip;
|
|
156
|
+
if (!props.bundle) zip = await zipFunctionBundle(props.slug, await bundleAsIs({
|
|
157
|
+
slug: props.slug,
|
|
158
|
+
name: props.slug,
|
|
159
|
+
source: src,
|
|
160
|
+
env: {},
|
|
161
|
+
runtime: "nodejs24",
|
|
162
|
+
bundler: "none"
|
|
163
|
+
}, { via: "no-bundle" }));
|
|
164
|
+
else {
|
|
165
|
+
const source = await resolveEsbuildEntry(src);
|
|
166
|
+
const bundled = await bundleEntry(source);
|
|
167
|
+
for (const warning of bundled.warnings) log.warning(warning);
|
|
168
|
+
for (const finding of findUndeclaredNativePackages({
|
|
169
|
+
metafile: bundled.metafile,
|
|
170
|
+
declared: [],
|
|
171
|
+
projectDir: dirname(source)
|
|
172
|
+
})) log.warning(describeNativeFinding(props.slug, finding));
|
|
173
|
+
zip = zipBundle(bundled.files);
|
|
174
|
+
}
|
|
165
175
|
const branchId = await branchIdFromProps(props);
|
|
166
176
|
let before;
|
|
167
177
|
try {
|
package/dist/commands/plugins.js
CHANGED
|
@@ -13,6 +13,7 @@ import { resolvePluginsPlan } from "../plugins/plan.js";
|
|
|
13
13
|
import { confirmPluginsInstall } from "../plugins/wizard.js";
|
|
14
14
|
//#region src/commands/plugins.ts
|
|
15
15
|
var plugins_exports = /* @__PURE__ */ __exportAll({
|
|
16
|
+
aliases: () => aliases,
|
|
16
17
|
builder: () => builder,
|
|
17
18
|
command: () => command,
|
|
18
19
|
describe: () => describe,
|
|
@@ -29,6 +30,7 @@ const coerceAgents = (value) => {
|
|
|
29
30
|
};
|
|
30
31
|
const scopeLabel = (scope) => scope === "project" ? "project" : "user";
|
|
31
32
|
const command = "plugins";
|
|
33
|
+
const aliases = ["plugin"];
|
|
32
34
|
const describe = "Install the Neon plugin into coding agents";
|
|
33
35
|
const pluginProjectAgents = pluginsInstallableAgents("project");
|
|
34
36
|
const pluginGlobalOnlyAgents = pluginsInstallableAgents("global").filter((id) => !pluginProjectAgents.includes(id));
|
|
@@ -137,4 +139,4 @@ const handler = async (props) => {
|
|
|
137
139
|
throw new Error(`Failed to install the Neon plugin for: ${failed.flatMap((row) => row.agents).join(", ")}.\n${detail}\nRetry with: ${retry}`);
|
|
138
140
|
};
|
|
139
141
|
//#endregion
|
|
140
|
-
export { builder, command, describe, handler, plugins_exports as t };
|
|
142
|
+
export { aliases, builder, command, describe, handler, plugins_exports as t };
|
package/dist/commands/skills.js
CHANGED
|
@@ -13,6 +13,7 @@ import { assertSkillsCanRun, resolveSkillsPlan } from "../skills/plan.js";
|
|
|
13
13
|
import { assertSkillsNode, neonSkillsRetryCommand, neonSkillsUpdateRetryCommand, runSkillsCli, skillsAddArgs, skillsMetadata, skillsUpdateArgs, skillsUpdateDetail, skillsUpdateHadNothing } from "../skills/run.js";
|
|
14
14
|
//#region src/commands/skills.ts
|
|
15
15
|
var skills_exports = /* @__PURE__ */ __exportAll({
|
|
16
|
+
aliases: () => aliases,
|
|
16
17
|
builder: () => builder,
|
|
17
18
|
command: () => command,
|
|
18
19
|
describe: () => describe,
|
|
@@ -38,6 +39,7 @@ const coerceSkills = (value) => {
|
|
|
38
39
|
});
|
|
39
40
|
};
|
|
40
41
|
const command = "skills";
|
|
42
|
+
const aliases = ["skill"];
|
|
41
43
|
const describe = "Install Neon agent skills into coding agents";
|
|
42
44
|
const builder = (argv) => argv.usage("$0 skills [command] [options]").command("update", "Update installed skills to the latest versions", (yargs) => yargs.usage("$0 skills update [options]").options({
|
|
43
45
|
yes: { describe: "Skip the confirm prompt" },
|
|
@@ -225,4 +227,4 @@ const updateHandler = async (props) => {
|
|
|
225
227
|
if (failure !== void 0) throw new Error(failure.includes("needs npx (Node.js)") || failure.includes("needs Node.js") ? failure : `${failure}\nRetry with: ${neonSkillsUpdateRetryCommand(scope === "global")}`);
|
|
226
228
|
};
|
|
227
229
|
//#endregion
|
|
228
|
-
export { builder, command, describe, handler, skills_exports as t };
|
|
230
|
+
export { aliases, builder, command, describe, handler, skills_exports as t };
|
package/dist/context.js
CHANGED
|
@@ -52,8 +52,8 @@ const isClaimCommand = (args) => args._[0] === "claim" || args._[0] === "claimab
|
|
|
52
52
|
*/
|
|
53
53
|
const isApiKeysCommand = (args) => args._[0] === "api-keys" || args._[0] === "api-key";
|
|
54
54
|
const isMcpCommand = (args) => args._[0] === "mcp";
|
|
55
|
-
const isSkillsCommand = (args) => args._[0] === "skills";
|
|
56
|
-
const isPluginsCommand = (args) => args._[0] === "plugins";
|
|
55
|
+
const isSkillsCommand = (args) => args._[0] === "skills" || args._[0] === "skill";
|
|
56
|
+
const isPluginsCommand = (args) => args._[0] === "plugins" || args._[0] === "plugin";
|
|
57
57
|
/** Raw argv is required because auth middleware runs before MCP flags are parsed. */
|
|
58
58
|
const isMcpOauth = (args) => isMcpCommand(args) && argvEnablesMcpOauth(process.argv);
|
|
59
59
|
const OAUTH_FALSE = /* @__PURE__ */ new Set([
|
package/dist/dev/functions.js
CHANGED
|
@@ -29,7 +29,8 @@ const resolveFunctionsFromConfig = async (cwd, branchName) => {
|
|
|
29
29
|
source,
|
|
30
30
|
...devPort(fn.dev) !== void 0 ? { port: devPort(fn.dev) } : {},
|
|
31
31
|
env: { ...fn.env },
|
|
32
|
-
...fn.externalPackages ? { externalPackages: fn.externalPackages.map((pkg) => pkg.name) } : {}
|
|
32
|
+
...fn.externalPackages ? { externalPackages: fn.externalPackages.map((pkg) => pkg.name) } : {},
|
|
33
|
+
...fn.bundler !== "esbuild" ? { bundler: fn.bundler } : {}
|
|
33
34
|
};
|
|
34
35
|
})
|
|
35
36
|
};
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neon",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.12.0",
|
|
4
4
|
"description": "CLI tool for Neon, the cloud backend primitives built around Lakebase Postgres",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"neon",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"yaml": "^2.9.0",
|
|
64
64
|
"yargs": "17.7.2",
|
|
65
65
|
"yoctocolors": "^2.1.2",
|
|
66
|
-
"@neon/config
|
|
66
|
+
"@neon/config": "1.1.0",
|
|
67
67
|
"@neon/sdk": "3.0.0",
|
|
68
|
-
"@neon/config": "1.0
|
|
68
|
+
"@neon/config-runtime": "1.1.0"
|
|
69
69
|
},
|
|
70
70
|
"optionalDependencies": {
|
|
71
71
|
"@napi-rs/keyring": "1.3.0",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"typescript": "^5.9.0",
|
|
98
98
|
"vitest": "^3.0.9",
|
|
99
99
|
"@neon-internals/cli-core": "0.0.0",
|
|
100
|
-
"@neon-internals/env-core": "0.0.
|
|
100
|
+
"@neon-internals/env-core": "0.0.6",
|
|
101
101
|
"@neon/e2e-harness": "0.0.0"
|
|
102
102
|
},
|
|
103
103
|
"publishConfig": {
|