@incajs/cli 0.0.15 → 0.0.17

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.
@@ -1,7 +1,7 @@
1
1
  import { IncaConfig } from './types.mts';
2
2
  /**
3
3
  * The `IncaConfig` fields whose default is a fixed value rather than one
4
- * derived from `package.json` or the filesystem — importable alongside
4
+ * derived from `package.json` or the filesystem. Importable alongside
5
5
  * `defineConfig` for an app that wants to inherit or reference them.
6
6
  *
7
7
  * @example
@@ -34,8 +34,8 @@ export declare function unscopedName(name: string): string;
34
34
  export declare function slugify(name: string): string;
35
35
  /**
36
36
  * @param pkgName - `package.json`'s own `"name"`, if it has one
37
- * @returns the `productName` a plain `package.json` implies — its name with
38
- * any scope stripped — or `undefined` if it has none
37
+ * @returns the `productName` a plain `package.json` implies: its name with
38
+ * any scope stripped, or `undefined` if it has none
39
39
  */
40
40
  export declare function defaultProductName(pkgName: string | undefined): string | undefined;
41
41
  /**
@@ -2,8 +2,8 @@ import { IncaConfig } from './types.mts';
2
2
  export { defaultConfig } from './defaults.mts';
3
3
  export type { IncaConfig } from './types.mts';
4
4
  /**
5
- * Type-completion helper for `inca.config.ts` — an identity function at
6
- * runtime, the same way `defineConfig` from `vite` or `vitest/config` works.
5
+ * Type-completion helper for `inca.config.ts`. An identity function at
6
+ * runtime.
7
7
  *
8
8
  * @example
9
9
  * ```ts
@@ -1,5 +1,5 @@
1
1
  import { WindowConfig } from './types.mts';
2
- /** `entry`/`outDir` only — what `build()`/`dev()` need, with no `package.json` requirement. */
2
+ /** `entry`/`outDir` only: what `build()`/`dev()` need, with no `package.json` requirement. */
3
3
  export interface ResolvedBuildConfig {
4
4
  /** Absolute path, if `inca.config.ts` set one. */
5
5
  entry?: string;
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * An app's own `inca.config.ts` (or `.js`/`.json`), loaded by `@incajs/cli`.
3
3
  * `package.json`'s `"inca"` key still works as a fallback, but is
4
- * deprecated — this file wins where both are present.
4
+ * deprecated. This file wins where both are present.
5
5
  */
6
6
  export interface IncaConfig {
7
7
  /** Path to an icon file, resolved from the app's root directory. */
8
8
  icon?: string;
9
9
  /**
10
- * A reverse-DNS-style unique id — e.g. macOS's `CFBundleIdentifier`.
10
+ * A reverse-DNS-style unique id, e.g. macOS's `CFBundleIdentifier`.
11
11
  * @default a generated `org.inca.<slug>`
12
12
  */
13
13
  identifier?: string;
@@ -23,7 +23,7 @@ export interface IncaConfig {
23
23
  version?: string;
24
24
  /**
25
25
  * The app's entry point.
26
- * @default resolved automatically — a committed `src/main.mts`,
26
+ * @default resolved automatically: a committed `src/main.mts`,
27
27
  * `src/main.ts` or `src/main.js`, or `src/App.vue` wrapped in a
28
28
  * synthesized one
29
29
  */
@@ -42,7 +42,7 @@ export interface IncaConfig {
42
42
  /** The window the app opens in. */
43
43
  window?: WindowConfig;
44
44
  }
45
- /** What an app declares about its window — see {@link IncaConfig.window}. */
45
+ /** What an app declares about its window. See {@link IncaConfig.window}. */
46
46
  export interface WindowConfig {
47
47
  /**
48
48
  * Initial width, in pixels. Falls back to the width the app's root
@@ -1,8 +1,7 @@
1
- import { Bundler } from './adapter/types.mts';
1
+ import { Bundler } from './types.mts';
2
2
  /**
3
- * `adapter/vite` wired in as the one adapter `dev` and `build` share by
4
- * default — a single place to swap bundlers, and the reason they can't
5
- * drift onto different ones. Compiled `.vue` templates import their helpers
6
- * from `incajs/vue/runtime`.
3
+ * `vite/` wired in as the one adapter `dev` and `build` share by
4
+ * default: a single place to swap bundlers. Compiled `.vue` templates import
5
+ * their helpers from `incajs/vue/runtime`.
7
6
  */
8
7
  export declare const defaultBundler: Bundler;
@@ -2,7 +2,7 @@
2
2
  * Where `inca-host` itself lives: `INCA_HOST_BIN` if set, otherwise the
3
3
  * per-platform npm package for this OS/arch (`@incajs/host-<os>-<arch>`, an
4
4
  * `optionalDependency` of this package).
5
- * @throws if neither resolves — no override is set, and either this
5
+ * @throws if neither resolves: no override is set, and either this
6
6
  * platform has no published binary, or the optional dependency carrying
7
7
  * it failed to install.
8
8
  */
@@ -28,16 +28,15 @@ export interface HostClientOptions {
28
28
  onExit?: (code: number | null, signal: NodeJS.Signals | null) => void;
29
29
  /**
30
30
  * Handlers for notification `method`s this package doesn't implement
31
- * itself (e.g. a future Vite integration), keyed by method name —
32
- * `params` forwarded untouched.
31
+ * itself (e.g. a future Vite integration), keyed by method name.
32
+ * `params` are forwarded untouched.
33
33
  */
34
34
  integrations?: Record<string, (params: unknown) => void>;
35
35
  }
36
36
  /**
37
37
  * Spawns `inca-host --dev <entryFile>` and speaks newline-delimited
38
38
  * JSON-RPC 2.0 on its stdin/stdout. One instance owns exactly one child
39
- * process for its whole lifetime — a reload is a `reload` call on the same
40
- * child, never a respawn.
39
+ * process for its whole lifetime. A reload is a `reload` call on that child.
41
40
  */
42
41
  export declare class HostClient {
43
42
  #private;
@@ -51,22 +50,21 @@ export declare class HostClient {
51
50
  start(): Promise<void>;
52
51
  /**
53
52
  * Sends a request and resolves with its result once the host answers.
54
- * With `timeoutMs`, rejects once that much time passes with no answer —
55
- * the host answers on the same thread that runs the app's JS, so a
56
- * wedged app leaves a call pending forever otherwise.
53
+ * With `timeoutMs`, rejects once that much time passes with no answer.
54
+ * The host answers on the same thread that runs the app's JS, so a
55
+ * wedged app never answers.
57
56
  */
58
57
  call(method: string, params?: unknown, timeoutMs?: number): Promise<unknown>;
59
58
  /**
60
- * Sends a fire-and-forget notification — no `id`, so no reply is ever
59
+ * Sends a fire-and-forget notification: no `id`, so no reply is ever
61
60
  * awaited. Used for traffic a bundler integration owns (e.g. Vite's HMR
62
- * payloads), which answers itself over the same named channel rather than
63
- * through this client's request/reply bookkeeping.
61
+ * payloads).
64
62
  */
65
63
  notify(method: string, params?: unknown): void;
66
64
  /**
67
- * Asks the host to `shutdown` and waits for the child to actually exit —
68
- * that exit is the real acknowledgement, not the response. Kills it once
69
- * `timeoutMs` passes without that, so a wedged app can't block teardown.
65
+ * Asks the host to `shutdown` and waits for the child to actually exit.
66
+ * That exit is the acknowledgement. Kills it once `timeoutMs` passes without
67
+ * that, so a wedged app can't block teardown.
70
68
  */
71
69
  stop(timeoutMs?: number): Promise<void>;
72
70
  }
@@ -1,7 +1,7 @@
1
1
  export declare const JSONRPC = "2.0";
2
2
  /**
3
3
  * The host method-set revision this package expects, checked against
4
- * `ready`'s `params.protocol` — a mismatch means an incompatible host
4
+ * `ready`'s `params.protocol`: a mismatch means an incompatible host
5
5
  * build.
6
6
  */
7
7
  export declare const HOST_PROTOCOL_VERSION = 0;
package/dist/dev.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Bundler } from './adapter/types.mts';
1
+ import { Bundler } from './types.mts';
2
2
  export interface DevOptions {
3
3
  /** The app's root directory. Defaults to `process.cwd()`. */
4
4
  cwd?: string;
@@ -7,11 +7,11 @@ export interface DevOptions {
7
7
  * committed `src/main.mts`, `src/main.ts` or `src/main.js`, or `src/App.vue` wrapped in a synthesized one.
8
8
  */
9
9
  entry?: string;
10
- /** Overrides the bundler — see {@link defaultBundler} for what's wired in by default. */
10
+ /** Overrides the bundler. See {@link defaultBundler} for what's wired in by default. */
11
11
  bundler?: Bundler;
12
12
  /**
13
13
  * Delivers module-granular updates instead of a full reload on every
14
- * change, over `bundler.hmr` — see `--experimental-hmr`.
14
+ * change, over `bundler.hmr`. See `--experimental-hmr`.
15
15
  */
16
16
  experimentalHmr?: boolean;
17
17
  /**
package/dist/log.d.mts CHANGED
@@ -9,6 +9,8 @@ export declare const STAMPED: {
9
9
  };
10
10
  /** Writes one `[inca] <message>` line to `stream`. */
11
11
  export declare function log(stream: NodeJS.WritableStream, message: string, options?: LogOptions): void;
12
+ /** Writes one `[inca] <message>` line to `stream`, with the tag in yellow. */
13
+ export declare function warn(stream: NodeJS.WritableStream, message: string, options?: LogOptions): void;
12
14
  /** A failure reduced to the message and stack worth printing. */
13
15
  export interface Fault {
14
16
  message: string;
@@ -17,8 +19,8 @@ export interface Fault {
17
19
  code?: string | null;
18
20
  }
19
21
  /**
20
- * Reduces an error a bundler re-wrapped: its text is kept whole — the
21
- * excerpt a compiler points at is the useful part — while the error class
22
+ * Reduces an error a bundler re-wrapped: its text is kept whole. The
23
+ * excerpt a compiler points at is the useful part, while the error class
22
24
  * and any `ERR_INCA_*` marker are lifted off the first line, the latter
23
25
  * into the fault's code.
24
26
  */
@@ -27,7 +29,7 @@ export declare function bundlerFault(message: string): Fault;
27
29
  export declare function toFault(error: unknown): Fault;
28
30
  /**
29
31
  * Writes the stack (when there is one) followed by `[inca] <label>
30
- * (<code>): <message>` to `stream` — the code only when the failure
32
+ * (<code>): <message>` to `stream`. The code appears only when the failure
31
33
  * carries one. The tagged line goes last so it stays the thing visible
32
34
  * without scrolling back through the stack above it.
33
35
  */
@@ -1,4 +1,4 @@
1
- import { Bundler } from './adapter/types.mts';
1
+ import { Bundler } from './types.mts';
2
2
  /** A platform `inca package` can emit a distributable application for. */
3
3
  export type PackageTarget = "macos" | "linux";
4
4
  /** Options for {@link packageApp}. */
@@ -11,12 +11,12 @@ export interface PackageAppOptions {
11
11
  * in a synthesized one.
12
12
  */
13
13
  entry?: string;
14
- /** Overrides the bundler — see {@link build}'s default. */
14
+ /** Overrides the bundler. See {@link build}'s default. */
15
15
  bundler?: Bundler;
16
16
  /**
17
17
  * Overrides which `inca-host` binary gets embedded in the packaged
18
18
  * app, in place of automatic resolution (`INCA_HOST_BIN`, then the
19
- * per-platform `@incajs/host-*` package — see {@link resolveHostBin}).
19
+ * per-platform `@incajs/host-*` package. See {@link resolveHostBin}).
20
20
  */
21
21
  hostBin?: string;
22
22
  /** Writes `bundle.js.map` beside the bundle. Overrides the config's `sourcemap` when set. */
@@ -33,13 +33,13 @@ export interface PackageAppOptions {
33
33
  }
34
34
  /** The result of a successful {@link packageApp} call. */
35
35
  export interface PackageResult {
36
- /** The packaged app's path — a `.app` directory on macOS, a plain directory on Linux. */
36
+ /** The packaged app's path: a `.app` directory on macOS, a plain directory on Linux. */
37
37
  appPath: string;
38
38
  }
39
39
  /**
40
40
  * Builds the app and pairs it with the prebuilt `inca-host` into a
41
- * distributable, platform-native application — a `.app` on macOS, a plain
42
- * directory on Linux — written alongside the build output, under the
41
+ * distributable, platform-native application: a `.app` on macOS, a plain
42
+ * directory on Linux, written alongside the build output, under the
43
43
  * app's own `dist/`. The app launches with no arguments and no terminal,
44
44
  * since `inca-host` finds its own bundle beside its executable.
45
45
  *
package/dist/plist.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- /** A macOS `Info.plist`'s value types — the only ones `inca package` writes. */
1
+ /** A macOS `Info.plist`'s value types. These are the only ones `inca package` writes. */
2
2
  export type PlistValue = string | boolean;
3
3
  /** Encodes a flat key/value dict as an `Info.plist` XML document. */
4
4
  export declare function encodePlist(dict: Record<string, PlistValue>): string;
@@ -1,18 +1,18 @@
1
- /** A running build watch — the value {@link Bundler.watch} resolves to. */
1
+ /** A running build watch. {@link Bundler.watch} resolves to this value. */
2
2
  export interface Watcher {
3
3
  /** Stops watching and releases the underlying build process. */
4
4
  close(): Promise<void>;
5
5
  }
6
6
  /** Options for {@link Bundler.build}. */
7
7
  export interface BuildOptions {
8
- /** The app's own entry point — may import `.vue` files. */
8
+ /** The app's own entry point. It may import `.vue` files. */
9
9
  entry: string;
10
10
  /** Where the build's output is written. */
11
11
  outDir: string;
12
12
  /** Writes `bundle.js.map` beside the bundle. Defaults to `false`. */
13
13
  sourcemap?: boolean;
14
14
  /**
15
- * Values the built app carries for `inca-host` to read — its name, id
15
+ * Values the built app carries for `inca-host` to read: its name, id
16
16
  * and window. Any JSON-serializable object.
17
17
  */
18
18
  runtimeConfig?: unknown;
@@ -44,13 +44,19 @@ export interface BuildFailure {
44
44
  /** An `ERR_INCA_*` identifier, when the failure has one to look up. */
45
45
  code?: string | null;
46
46
  }
47
- /** What a build wrote — the result of {@link Bundler.build}, and every {@link BundlerOptions.onBuild} call. */
47
+ /**
48
+ * What a build wrote. It is the result of {@link Bundler.build} and of every
49
+ * {@link BundlerOptions.onBuild} call.
50
+ */
48
51
  export interface BuildOutput {
49
52
  /** Directory holding every file this build emitted. */
50
53
  outDir: string;
51
54
  /** Absolute path to the entry module `inca-host` evaluates. */
52
55
  entryFile: string;
53
- /** Every file this build emitted, relative to `outDir` — may include chunks and assets besides the entry itself. */
56
+ /**
57
+ * Every file this build emitted, relative to `outDir`. It may include chunks and assets besides
58
+ * the entry itself.
59
+ */
54
60
  files: readonly string[];
55
61
  /** The change that triggered this rebuild. Absent from a one-shot build and a watch's first build. */
56
62
  changed?: {
@@ -60,16 +66,16 @@ export interface BuildOutput {
60
66
  }
61
67
  /** Options for {@link Bundler.hmr}. */
62
68
  export interface HmrOptions {
63
- /** The app's own entry point — may import `.vue` files. */
69
+ /** The app's own entry point. It may import `.vue` files. */
64
70
  entry: string;
65
- /** The app's root directory — where its dev-only scratch files are written. */
71
+ /** The app's root directory, where its dev-only scratch files are written. */
66
72
  cwd: string;
67
73
  /**
68
- * Values the built app carries for `inca-host` to read — its name, id
74
+ * Values the built app carries for `inca-host` to read: its name, id
69
75
  * and window. Any JSON-serializable object.
70
76
  */
71
77
  runtimeConfig?: unknown;
72
- /** Overrides where the synthesized entry imports `hmr-runtime.js` from. Test-only. */
78
+ /** Overrides where the synthesized entry imports `vite-runtime.js` from. Test-only. */
73
79
  runtimePath?: string;
74
80
  /** Where the bundler's own output goes. Defaults to `process.stdout`. */
75
81
  stdout?: NodeJS.WritableStream;
@@ -89,7 +95,7 @@ export interface HmrOptions {
89
95
  took: number;
90
96
  }) => void;
91
97
  }
92
- /** A running HMR session — the value {@link Bundler.hmr} resolves to. */
98
+ /** A running HMR session. {@link Bundler.hmr} resolves to this value. */
93
99
  export interface HmrChannel extends Watcher {
94
100
  /** The synthesized entry `inca-host` evaluates for this session. */
95
101
  entryFile: string;
@@ -98,16 +104,15 @@ export interface HmrChannel extends Watcher {
98
104
  }
99
105
  /**
100
106
  * The contract a bundler adapter satisfies. Supporting another bundler
101
- * means adding a sibling adapter module and injecting its `Bundler` here —
102
- * never editing this package's own types.
107
+ * means adding a sibling adapter module and injecting its `Bundler` here.
103
108
  */
104
109
  export interface Bundler {
105
110
  watch(options: BundlerOptions): Promise<Watcher>;
106
- /** One-shot production build, used by `inca build` — rejects on failure. */
111
+ /** One-shot production build, used by `inca build`. Rejects on failure. */
107
112
  build(options: BuildOptions): Promise<BuildOutput>;
108
113
  /**
109
114
  * Module-granular dev updates, used by `inca dev --experimental-hmr`.
110
- * Optional — a bundler adapter with no HMR support simply omits it.
115
+ * Optional: omit it when the adapter has no HMR support.
111
116
  */
112
117
  hmr?(options: HmrOptions): Promise<HmrChannel>;
113
118
  }
@@ -1,8 +1,6 @@
1
- import { AdapterCore } from '../../adapterCore.mts';
2
- import { BuildOptions, BuildOutput } from '../types.mts';
1
+ import { AdapterCore, BuildOptions, BuildOutput } from '../adapterCore.mts';
3
2
  /**
4
3
  * Builds `entry` into a minified, production build under `outDir` once, and
5
- * rejects on failure rather than reporting it through a callback. Never
6
- * starts or talks to `inca-host` — that's `dev.mts`'s job.
4
+ * rejects on failure. Never starts or talks to `inca-host`.
7
5
  */
8
6
  export declare function build(core: AdapterCore, runtimeModuleName: string, { entry, outDir, sourcemap, runtimeConfig, stdout, stderr, quiet, }: BuildOptions): Promise<BuildOutput>;
@@ -1,6 +1,5 @@
1
1
  import { Plugin } from 'vite';
2
- import { AdapterCore } from '../../adapterCore.mts';
3
- import { BuildOutput } from '../types.mts';
2
+ import { AdapterCore, BuildOutput } from '../adapterCore.mts';
4
3
  /** What one (re)build actually wrote, relative to its own `outDir`. */
5
4
  export interface CapturedOutput {
6
5
  /** The emitted chunk marked as this build's entry. */
@@ -12,8 +11,7 @@ export interface CapturedOutput {
12
11
  export declare function toBuildOutput(outDir: string, captured: CapturedOutput, changed?: BuildOutput["changed"]): BuildOutput;
13
12
  /**
14
13
  * A Vite plugin reporting `sink` the files a build wrote once they land on
15
- * disk, via `writeBundle` — the one hook that fires uniformly for a
16
- * one-shot build and every watch rebuild, so both read the bundler's real
17
- * output instead of assuming a file name or layout.
14
+ * disk, via `writeBundle`, the one hook that fires uniformly for a
15
+ * one-shot build and every watch rebuild.
18
16
  */
19
17
  export declare function captureOutput(core: AdapterCore, sink: (output: CapturedOutput) => void): Plugin;
@@ -1,12 +1,12 @@
1
1
  import { InlineConfig } from 'vite';
2
- import { AdapterCore } from '../../adapterCore.mts';
2
+ import { AdapterCore } from '../adapterCore.mts';
3
3
  import { CapturedOutput } from './captureOutput.mts';
4
4
  export declare const BUNDLE_FILE_NAME = "bundle.js";
5
5
  export interface ResolveConfigOptions {
6
6
  core: AdapterCore;
7
7
  /** The module compiled `.vue` templates import their helpers from. */
8
8
  runtimeModuleName: string;
9
- /** The app's own entry point — may import `.vue` files. */
9
+ /** The app's own entry point. It may import `.vue` files. */
10
10
  entry: string;
11
11
  /** Where the build's output is written. */
12
12
  outDir: string;
@@ -22,9 +22,9 @@ export interface ResolveConfigOptions {
22
22
  stdout: NodeJS.WritableStream;
23
23
  /** Where Vite's warnings and errors go. */
24
24
  stderr: NodeJS.WritableStream;
25
- /** Silences the bundler's progress output — see the `quiet` option in `../types.mts`. */
25
+ /** Silences the bundler's progress output. See the `quiet` option in `../types.mts`. */
26
26
  quiet: boolean;
27
- /** Written beside the entry — see the `runtimeConfig` option in `../types.mts`. */
27
+ /** Written beside the entry. See the `runtimeConfig` option in `../types.mts`. */
28
28
  runtimeConfig?: unknown;
29
29
  }
30
30
  /**
@@ -32,9 +32,8 @@ export interface ResolveConfigOptions {
32
32
  * files via `@vitejs/plugin-vue`. Compiled templates import their helpers
33
33
  * from `runtimeModuleName`.
34
34
  *
35
- * An import the entry doesn't inline — a dynamic `import()`, or a `.vue`
36
- * file's own `<style>` block — lands as its own chunk or asset alongside
37
- * the entry, named by `chunkFileNames`/`assetFileNames` below, rather than
38
- * failing the build.
35
+ * An import the entry doesn't inline (a dynamic `import()`, or a `.vue`
36
+ * file's own `<style>` block) lands as its own chunk or asset alongside
37
+ * the entry, named by `chunkFileNames`/`assetFileNames` below.
39
38
  */
40
39
  export declare function resolveViteConfig({ core, runtimeModuleName, entry, outDir, mode, sourcemap, watch, onOutput, stdout, stderr, quiet, runtimeConfig, }: ResolveConfigOptions): InlineConfig;
@@ -1,5 +1,4 @@
1
- import { AdapterCore } from '../../adapterCore.mts';
2
- import { Bundler } from '../types.mts';
1
+ import { AdapterCore, Bundler } from '../adapterCore.mts';
3
2
  /**
4
3
  * The Vite adapter.
5
4
  * @param core - the CLI logic the adapter uses
@@ -3,7 +3,7 @@ import { Plugin } from 'vite';
3
3
  export declare const CONFIG_FILE_NAME = "inca.json";
4
4
  /**
5
5
  * Serializes `config` the way `inca.json` is written: `undefined` for
6
- * anything that shouldn't produce a file — `undefined` itself, or an
6
+ * anything that shouldn't produce a file: `undefined` itself, or an
7
7
  * object with no keys.
8
8
  */
9
9
  export declare function serializeConfig(config: unknown): string | undefined;
@@ -1,7 +1,6 @@
1
- import { AdapterCore } from '../../adapterCore.mts';
2
- import { BuildFailure, HmrChannel, HmrOptions } from '../types.mts';
1
+ import { AdapterCore, BuildFailure, HmrChannel, HmrOptions } from '../adapterCore.mts';
3
2
  /**
4
- * A failed update's detail — the same fields a Rollup/Vite plugin
3
+ * A failed update's detail: the same fields a Rollup/Vite plugin
5
4
  * error carries beyond `message`/`stack`, when it has them.
6
5
  */
7
6
  interface UpdateError {
@@ -1,7 +1,7 @@
1
1
  import { Logger } from 'vite';
2
2
  /**
3
3
  * A Vite {@link Logger} writing to the given streams: `info` to `stdout`,
4
- * `warn`/`error` to `stderr`, all unfiltered by Vite's own `LogOptions` — a
4
+ * `warn`/`error` to `stderr`, all unfiltered by Vite's own `LogOptions`. A
5
5
  * custom logger bypasses those. `quiet` drops `info` only; `warn`/`error`
6
6
  * still write, since they report something broken, not just what changed.
7
7
  */
@@ -1,5 +1,5 @@
1
1
  import { Plugin } from 'vite';
2
- import { AdapterCore } from '../../adapterCore.mts';
2
+ import { AdapterCore } from '../adapterCore.mts';
3
3
  /** Something an app can write that the engine can't run yet. */
4
4
  export interface UnsupportedFeature {
5
5
  /** The `ERR_INCA_*` identifier this failure is looked up by. */
@@ -8,7 +8,7 @@ export interface UnsupportedFeature {
8
8
  name: string;
9
9
  /** Whether a module id is a use of the feature. */
10
10
  matches: (id: string) => boolean;
11
- /** What happens instead, and what to reach for — appended to the error. */
11
+ /** What happens instead, and what to reach for. Appended to the error. */
12
12
  hint: string;
13
13
  }
14
14
  /**
@@ -1,8 +1,7 @@
1
- import { AdapterCore } from '../../adapterCore.mts';
2
- import { BundlerOptions, Watcher } from '../types.mts';
1
+ import { AdapterCore, BundlerOptions, Watcher } from '../adapterCore.mts';
3
2
  /**
4
3
  * Builds `entry` into a build under `outDir` and rebuilds it on every
5
4
  * change, calling `onBuild` with what each rebuild wrote. Never starts,
6
- * reloads, or talks to `inca-host` — that's `dev.mts`'s job.
5
+ * reloads, or talks to `inca-host`.
7
6
  */
8
7
  export declare function watch(core: AdapterCore, runtimeModuleName: string, { onBuild, onError, stdout, stderr, quiet, ...buildOptions }: BundlerOptions): Promise<Watcher>;
@@ -1108,12 +1108,13 @@ function bt(e, t) {
1108
1108
  }
1109
1109
  }
1110
1110
  //#endregion
1111
- //#region src/adapter/vite/runtime/createIncaDevTransport.mts
1112
- function xt(e) {
1111
+ //#region src/vite/runtime/createIncaDevTransport.mts
1112
+ var xt = "this code needs a host that serves the development protocol. start the app with `inca dev`.";
1113
+ function St(e) {
1113
1114
  return {
1114
1115
  connect({ onMessage: t }) {
1115
1116
  let n = globalThis.__inca_dev__;
1116
- if (!n) throw Error("__inca_dev__ is not installed — this build is not a dev build");
1117
+ if (!n) throw Error(xt);
1117
1118
  n.receive = (n, r) => {
1118
1119
  if (n !== "vite") return;
1119
1120
  let i = JSON.parse(r);
@@ -1122,18 +1123,18 @@ function xt(e) {
1122
1123
  },
1123
1124
  send(e) {
1124
1125
  let t = globalThis.__inca_dev__;
1125
- if (!t) throw Error("__inca_dev__ is not installed — this build is not a dev build");
1126
+ if (!t) throw Error(xt);
1126
1127
  t.send("vite", JSON.stringify(e));
1127
1128
  }
1128
1129
  };
1129
1130
  }
1130
1131
  //#endregion
1131
- //#region src/adapter/vite/runtime/createIncaEvaluator.mts
1132
- var St = class extends H {
1132
+ //#region src/vite/runtime/createIncaEvaluator.mts
1133
+ var Ct = class extends H {
1133
1134
  startOffset = 1;
1134
1135
  async runInlinedModule(e, t, n) {
1135
1136
  let r = globalThis.__inca_dev__;
1136
- if (!r?.compile) throw Error("__inca_dev__.compile is not installed");
1137
+ if (!r?.compile) throw Error("this code needs a host that compiles modules for the development protocol. start the app with `inca dev`.");
1137
1138
  let i = [
1138
1139
  F,
1139
1140
  B,
@@ -1145,18 +1146,18 @@ var St = class extends H {
1145
1146
  await r.compile(i, t.replaceAll("\0", "\\u0000"), n.id.replaceAll("\0", "\\u0000"))(...i.map((t) => e[t])), Object.seal(e[F]);
1146
1147
  }
1147
1148
  };
1148
- function Ct() {
1149
- return new St();
1149
+ function wt() {
1150
+ return new Ct();
1150
1151
  }
1151
1152
  //#endregion
1152
- //#region src/adapter/vite/runtime/start.mts
1153
- function wt(e) {
1153
+ //#region src/vite/runtime/start.mts
1154
+ function Tt(e) {
1154
1155
  return typeof e == "object" && !!e && "runnerError" in e;
1155
1156
  }
1156
- async function Tt(e) {
1157
+ async function Et(e) {
1157
1158
  let t = () => {}, n = new yt({
1158
1159
  transport: {
1159
- ...xt(() => t()),
1160
+ ...St(() => t()),
1160
1161
  timeout: 0
1161
1162
  },
1162
1163
  hmr: { logger: {
@@ -1164,7 +1165,7 @@ async function Tt(e) {
1164
1165
  error: () => {}
1165
1166
  } },
1166
1167
  sourcemapInterceptor: !1
1167
- }, Ct());
1168
+ }, wt());
1168
1169
  for (;;) {
1169
1170
  let r = new Promise((e) => {
1170
1171
  t = e;
@@ -1172,10 +1173,10 @@ async function Tt(e) {
1172
1173
  try {
1173
1174
  return await n.import(e);
1174
1175
  } catch (e) {
1175
- wt(e) || Promise.reject(e), globalThis.__inca_dev__?.setLoadFailed?.(!0);
1176
+ Tt(e) || Promise.reject(e), globalThis.__inca_dev__?.setLoadFailed?.(!0);
1176
1177
  }
1177
1178
  await r, n.clearCache(), globalThis.__inca_dev__?.setLoadFailed?.(!1);
1178
1179
  }
1179
1180
  }
1180
1181
  //#endregion
1181
- export { Tt as start };
1182
+ export { Et as start };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incajs/cli",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "description": "Commands to develop, bundle, and package Incarnative.js apps.",
5
5
  "keywords": [
6
6
  "bundler",
@@ -31,7 +31,7 @@
31
31
  ],
32
32
  "type": "module",
33
33
  "sideEffects": [
34
- "src/adapter/vite/runtime/globals.mts"
34
+ "src/vite/runtime/globals.mts"
35
35
  ],
36
36
  "main": "./dist/index.js",
37
37
  "types": "./dist/index.d.mts",
@@ -56,9 +56,11 @@
56
56
  "@types/node": "^26.6.4",
57
57
  "@vue/runtime-core": "^3.5.43",
58
58
  "c12": "4.0.0-rc.2",
59
+ "citty": "0.2.2",
59
60
  "oxfmt": "^0.72.0",
60
61
  "oxlint": "^1.87.0",
61
62
  "rolldown": "~1.2.13",
63
+ "ts-dedent": "2.3.0",
62
64
  "vue": "^3.5.43"
63
65
  },
64
66
  "peerDependencies": {
@@ -70,10 +72,10 @@
70
72
  }
71
73
  },
72
74
  "optionalDependencies": {
73
- "@incajs/host-darwin-arm64": "0.0.15",
74
- "@incajs/host-darwin-x64": "0.0.15",
75
- "@incajs/host-linux-arm64": "0.0.15",
76
- "@incajs/host-linux-x64": "0.0.15"
75
+ "@incajs/host-darwin-arm64": "0.0.17",
76
+ "@incajs/host-darwin-x64": "0.0.17",
77
+ "@incajs/host-linux-arm64": "0.0.17",
78
+ "@incajs/host-linux-x64": "0.0.17"
77
79
  },
78
80
  "engines": {
79
81
  "node": ">=22.18"
File without changes