@incajs/cli 0.0.21 → 0.0.22

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/dev.d.mts CHANGED
@@ -3,8 +3,10 @@ export interface DevOptions {
3
3
  /** The app's root directory. Defaults to `process.cwd()`. */
4
4
  cwd?: string;
5
5
  /**
6
- * The app's entry point. Defaults to resolving it automatically: a
7
- * committed `src/main.mts`, `src/main.ts` or `src/main.js`, or `src/App.vue` wrapped in a synthesized one.
6
+ * The app's entry point. Defaults to the first of `src/main.mts`, `src/main.ts` and
7
+ * `src/main.js` that exists, otherwise `src/App.vue` wrapped in a synthesized entry. An entry
8
+ * selected this way is selected again while the app runs, and the host reloads when the
9
+ * selection changes.
8
10
  */
9
11
  entry?: string;
10
12
  /** Overrides the bundler. See {@link defaultBundler} for what's wired in by default. */
@@ -35,6 +37,10 @@ export interface DevOptions {
35
37
  * `build failed`. `dev` then retries after the next edit to the config or the
36
38
  * entry.
37
39
  *
40
+ * When the entry is selected automatically, `dev` selects it again after every change to a main
41
+ * file or `src/App.vue` and reloads the development window if the selection changed. A missing
42
+ * entry prints `build failed` and keeps the running host until one exists.
43
+ *
38
44
  * @throws if another `inca dev` is already running for this app.
39
45
  * @throws if the host binary can't be resolved or isn't a file.
40
46
  * @throws if `experimentalHmr` is set and the bundler has no HMR support.
package/dist/entry.d.mts CHANGED
@@ -8,6 +8,12 @@ export declare const MAIN_FILES: string[];
8
8
  * @returns the directory
9
9
  */
10
10
  export declare function entryRoot(cwd: string, entry: string): string;
11
+ /**
12
+ * The path {@link resolveEntry} would return, without writing the synthesized entry.
13
+ * @param cwd - the app's root directory
14
+ * @returns the path of the entry file, or `undefined` when no entry exists
15
+ */
16
+ export declare function selectEntry(cwd: string): string | undefined;
11
17
  /**
12
18
  * Resolves an app's entry point. A `src/main.mts`, `src/main.ts` or
13
19
  * `src/main.js` committed by the app wins outright, in that order, and is
@@ -1,4 +1,4 @@
1
- /** A watch that resolves once, when a file that could fix a failed start is saved. */
1
+ /** A watch that resolves once, when a file that decides the app's config or entry changes. */
2
2
  export interface EditWatch {
3
3
  /** Resolves once, after a relevant change has been quiet for the debounce. */
4
4
  readonly edited: Promise<void>;
@@ -8,10 +8,10 @@ export interface EditWatch {
8
8
  close(): void;
9
9
  }
10
10
  /**
11
- * Watches the files that decide whether an app can start: `inca.config.*`
12
- * and `package.json` in `cwd`, `src/main.mts`, `src/main.ts`, `src/main.js` and `src/App.vue`, and every
13
- * file passed to {@link EditWatch.add}. Creating, deleting, changing or
14
- * renaming one of them counts as an edit. Edits to other files are ignored.
11
+ * Watches the files that decide how an app starts: `inca.config.*` and `package.json` in `cwd`,
12
+ * `src/main.mts`, `src/main.ts`, `src/main.js` and `src/App.vue`, and every file passed to
13
+ * {@link EditWatch.add}. Creating, deleting, changing or renaming one of them counts as an edit.
14
+ * Edits to other files are ignored.
15
15
  *
16
16
  * The watchers are live when this returns, so a save made while the caller
17
17
  * is working counts. An edit made before the caller awaits
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incajs/cli",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "Commands to develop, bundle, and package Incarnative.js apps.",
5
5
  "keywords": [
6
6
  "bundler",
@@ -72,10 +72,10 @@
72
72
  }
73
73
  },
74
74
  "optionalDependencies": {
75
- "@incajs/host-darwin-arm64": "0.0.21",
76
- "@incajs/host-darwin-x64": "0.0.21",
77
- "@incajs/host-linux-arm64": "0.0.21",
78
- "@incajs/host-linux-x64": "0.0.21"
75
+ "@incajs/host-darwin-arm64": "0.0.22",
76
+ "@incajs/host-darwin-x64": "0.0.22",
77
+ "@incajs/host-linux-arm64": "0.0.22",
78
+ "@incajs/host-linux-x64": "0.0.22"
79
79
  },
80
80
  "engines": {
81
81
  "node": ">=22.18"