naro-cli 0.17.0 → 0.19.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/dist/prompt.d.ts CHANGED
@@ -3,11 +3,25 @@ export interface Prompter {
3
3
  ask(question: string): Promise<string>;
4
4
  /** Question with hidden echo (secrets). */
5
5
  askHidden(question: string): Promise<string>;
6
- /** y/N confirmation, defaults to No. */
7
- confirm(question: string): Promise<boolean>;
6
+ /**
7
+ * y/n confirmation. Enter gives `defaultYes` (No unless said otherwise),
8
+ * and the hint capitalises that answer: `(y/N)` or `(Y/n)`.
9
+ */
10
+ confirm(question: string, options?: {
11
+ defaultYes?: boolean;
12
+ }): Promise<boolean>;
8
13
  /** Pick one option by number; returns its index. */
9
14
  select(question: string, options: string[]): Promise<number>;
10
15
  }
16
+ /** The hint after a confirmation, capitalising what Enter answers. */
17
+ export declare function confirmHint(defaultYes: boolean): string;
18
+ /**
19
+ * Reads a confirmation answer. Enter gives the default. With No as the default
20
+ * anything but yes is No, as it always was; with Yes as the default only no
21
+ * declines, and an unreadable answer is null — ask again, because declining
22
+ * is the costly path there.
23
+ */
24
+ export declare function readConfirmAnswer(answer: string, defaultYes: boolean): boolean | null;
11
25
  export declare function isInteractive(): boolean;
12
26
  /** Reads all of stdin — the CI path for piped secret values. */
13
27
  export declare function readStdin(): Promise<string>;
@@ -0,0 +1,74 @@
1
+ export interface WorkingTreeCopy {
2
+ /**
3
+ * Env files in the working tree that are not in the commit, relative to the
4
+ * source directory — what the build goes without.
5
+ */
6
+ leftOut: string[];
7
+ /**
8
+ * Committed env files whose working-tree copy differs or is gone: the build
9
+ * has the committed version.
10
+ */
11
+ committedVersion: string[];
12
+ /**
13
+ * Committed env files not written because they would land outside the
14
+ * checkout — under a directory symlinked out of it, or a symlink pointing
15
+ * out of it — or where nothing can be found: under a folder link to
16
+ * nothing, or a symlink that resolves to nothing.
17
+ */
18
+ outsideProject: string[];
19
+ /**
20
+ * Symlinks not copied because their target is an absolute path, relative
21
+ * to the source directory (known-issues #176). A git deploy has the link
22
+ * and not the place it points to, so it cannot follow them either.
23
+ */
24
+ absoluteLinks: string[];
25
+ /**
26
+ * Relative symlinks not copied because they lead out of the source
27
+ * directory. A git deploy clones the whole repository, so one between the
28
+ * repository's folders resolves there; deployed from the repository root
29
+ * with `--root`, it is inside and kept here too (PR #241 review).
30
+ */
31
+ linksOutside: string[];
32
+ /**
33
+ * Links whose text stays inside but whose real target does not — a
34
+ * `self -> .` chain, a loop, `..` up to `/` and back down the source's
35
+ * absolute path — or cannot be resolved with `..` in the text (PR #243
36
+ * review). `--root` would not bring them in.
37
+ */
38
+ linksElsewhere: string[];
39
+ /** git could not be run, so no committed env file is known. */
40
+ gitUnavailable: boolean;
41
+ }
42
+ /**
43
+ * Copies the local working directory into the build checkout, so uncommitted
44
+ * changes are deployed — as `git clone` would have laid out the repository.
45
+ *
46
+ * Env files are the exception to "uncommitted changes". None is copied from
47
+ * the working tree; the ones in the commit are written with their committed
48
+ * content, which is what a git deploy of the same commit builds with. A local
49
+ * edit to a committed `.env`, one hidden behind `skip-worktree`, one only
50
+ * staged, and an untracked `.env.local` all stay on the machine. `next build`
51
+ * reads those files on its own and inlines NEXT_PUBLIC_* into the bundle, and
52
+ * OpenNext bundles every value they hold into the Worker, so a file copied
53
+ * here would ship values the developer declined to send. The env consent
54
+ * prompt is the only way local values reach a build (known-issues #7,
55
+ * CLI-DEPLOY-011).
56
+ *
57
+ * Nothing is written outside the checkout: a directory symlinked out of the
58
+ * tree would otherwise carry a committed `.env` onto the developer's real
59
+ * file.
60
+ *
61
+ * Nor is anything read from outside it. A symlink whose target is absolute,
62
+ * or relative but out of the source directory, is left out (known-issues
63
+ * #176): copied as it is, it led the build to the developer's real files —
64
+ * whatever the app imports through it is bundled, and an app folder linked
65
+ * from elsewhere had its own `.env.local` read by `next build`. A git deploy
66
+ * of the same commit cannot follow an absolute one either: the clone has the
67
+ * link and not the place it points to. A relative link that stays inside is
68
+ * kept, so a monorepo's links between its own packages work. "Inside" is
69
+ * judged on the real path as well as on the link's text, from the source and
70
+ * again from the checkout: `self -> .` makes `self/..` leave the folder while
71
+ * it reads as staying in (PR #241 review), and `..` up to `/` and back down
72
+ * the source's absolute path leads to the source from anywhere (PR #243).
73
+ */
74
+ export declare function copyWorkingTree(source: string, checkout: string): Promise<WorkingTreeCopy>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naro-cli",
3
- "version": "0.17.0",
3
+ "version": "0.19.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "naro": "./dist/index.js"
@@ -22,11 +22,11 @@
22
22
  }
23
23
  },
24
24
  "dependencies": {
25
- "@opennextjs/cloudflare": "1.20.2",
25
+ "@opennextjs/cloudflare": "1.20.12",
26
26
  "@supabase/supabase-js": "2.112.3",
27
27
  "@vercel/frameworks": "3.34.0",
28
28
  "vinext": "1.1.0",
29
- "wrangler": "4.124.0"
29
+ "wrangler": "4.148.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "tsup": "8.5.0",
@@ -34,11 +34,11 @@
34
34
  "typescript": "7.0.2",
35
35
  "vitest": "3.2.7",
36
36
  "naro-js": "0.5.0",
37
- "@next-deploy/config": "0.1.0",
37
+ "@next-deploy/sdk": "0.1.0",
38
38
  "@next-deploy/core": "0.1.0",
39
+ "@next-deploy/config": "0.1.0",
39
40
  "@next-deploy/build": "0.1.0",
40
- "@next-deploy/data-core": "0.1.0",
41
- "@next-deploy/sdk": "0.1.0"
41
+ "@next-deploy/data-core": "0.1.0"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "tsup && pnpm build:types",