@incajs/cli 0.0.10 → 0.0.12

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.
@@ -15,4 +15,4 @@ export type { IncaConfig } from './types.mts';
15
15
  * });
16
16
  * ```
17
17
  */
18
- export declare const defineConfig: import('c12').DefineConfig<IncaConfig, import('c12').ConfigLayerMeta>;
18
+ export declare const defineConfig: (config: IncaConfig) => IncaConfig;
@@ -56,7 +56,7 @@ export declare function resolveBuildConfig(cwd: string): Promise<ResolvedBuildCo
56
56
  *
57
57
  * @param cwd - the app's root directory
58
58
  * @returns the resolved config
59
- * @throws if `package.json` is missing, has neither a `name` nor a
59
+ * @throws if `package.json` is missing, holds malformed JSON, has neither a `name` nor a
60
60
  * `productName`, an `icon` doesn't resolve to a real file, or `outDir`
61
61
  * would hold the app's own files
62
62
  */
@@ -75,5 +75,6 @@ export declare function runtimeConfigOf(config: ResolvedAppConfig): RuntimeConfi
75
75
  *
76
76
  * @param cwd - the app's root directory
77
77
  * @returns the config, or `undefined` when the app declares none of it
78
+ * @throws if `package.json` exists and holds malformed JSON
78
79
  */
79
80
  export declare function resolveRuntimeConfig(cwd: string): Promise<RuntimeConfig | undefined>;
@@ -23,8 +23,9 @@ 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`, or
27
- * `src/App.vue` wrapped in a synthesized one
26
+ * @default resolved automatically — a committed `src/main.mts`,
27
+ * `src/main.ts` or `src/main.js`, or `src/App.vue` wrapped in a
28
+ * synthesized one
28
29
  */
29
30
  entry?: string;
30
31
  /**
package/dist/config.js CHANGED
@@ -1,5 +1,5 @@
1
- import { a as e, t } from "./chunks/defaults-CKuLLRFh.js";
1
+ import { t as e } from "./chunks/defaults-TOBTBbDy.js";
2
2
  //#region src/config/index.mts
3
- var n = e();
3
+ var t = (e) => e;
4
4
  //#endregion
5
- export { t as defaultConfig, n as defineConfig };
5
+ export { e as defaultConfig, t as defineConfig };
@@ -2,6 +2,7 @@ import { Bundler } from './adapter/types.mts';
2
2
  /**
3
3
  * `adapter/vite` wired in as the one adapter `dev` and `build` share by
4
4
  * default — a single place to swap bundlers, and the reason they can't
5
- * drift onto different ones.
5
+ * drift onto different ones. Compiled `.vue` templates import their helpers
6
+ * from `incajs/vue/runtime`.
6
7
  */
7
8
  export declare const defaultBundler: Bundler;
package/dist/dev.d.mts CHANGED
@@ -4,7 +4,7 @@ export interface DevOptions {
4
4
  cwd?: string;
5
5
  /**
6
6
  * The app's entry point. Defaults to resolving it automatically: a
7
- * committed `src/main.mts`, or `src/App.vue` wrapped in a synthesized one.
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
10
  /** Overrides the bundler — see {@link defaultBundler} for what's wired in by default. */
package/dist/entry.d.mts CHANGED
@@ -1,8 +1,14 @@
1
+ export declare const MAIN_FILES: string[];
1
2
  /**
2
- * Resolves an app's entry point. `src/main.mts`, committed by the app,
3
- * wins outright and is used verbatim — full control over bootstrapping.
4
- * Otherwise `src/App.vue` is wrapped in a synthesized entry equivalent to
3
+ * Resolves an app's entry point. A `src/main.mts`, `src/main.ts` or
4
+ * `src/main.js` committed by the app wins outright, in that order, and is
5
+ * used verbatim for full control over bootstrapping. Otherwise
6
+ * `src/App.vue` is wrapped in a synthesized entry equivalent to
5
7
  * `createIncaApp(App).mount()`, so a plain `.vue` file is a whole app
6
8
  * with no configuration at all.
9
+ *
10
+ * @param cwd - the app's root directory
11
+ * @returns the path of the entry file
12
+ * @throws if none of the main files and no `src/App.vue` exists
7
13
  */
8
14
  export declare function resolveEntry(cwd: string): Promise<string>;
@@ -7,7 +7,7 @@ export interface PackageAppOptions {
7
7
  cwd?: string;
8
8
  /**
9
9
  * The app's entry point. Defaults to resolving it the same way `inca
10
- * dev`/`build` do: a committed `src/main.mts`, or `src/App.vue` wrapped
10
+ * dev`/`build` do: a committed `src/main.mts`, `src/main.ts` or `src/main.js`, or `src/App.vue` wrapped
11
11
  * in a synthesized one.
12
12
  */
13
13
  entry?: string;
@@ -9,7 +9,7 @@ export interface EditWatch {
9
9
  }
10
10
  /**
11
11
  * Watches the files that decide whether an app can start: `inca.config.*`
12
- * and `package.json` in `cwd`, `src/main.mts` and `src/App.vue`, and every
12
+ * and `package.json` in `cwd`, `src/main.mts`, `src/main.ts`, `src/main.js` and `src/App.vue`, and every
13
13
  * file passed to {@link EditWatch.add}. Creating, deleting, changing or
14
14
  * renaming one of them counts as an edit. Edits to other files are ignored.
15
15
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incajs/cli",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "Dev server, bundler, and packager for Incarnative.js apps.",
5
5
  "keywords": [
6
6
  "bundler",
@@ -70,10 +70,10 @@
70
70
  }
71
71
  },
72
72
  "optionalDependencies": {
73
- "@incajs/host-darwin-arm64": "0.0.10",
74
- "@incajs/host-darwin-x64": "0.0.10",
75
- "@incajs/host-linux-arm64": "0.0.10",
76
- "@incajs/host-linux-x64": "0.0.10"
73
+ "@incajs/host-darwin-arm64": "0.0.12",
74
+ "@incajs/host-darwin-x64": "0.0.12",
75
+ "@incajs/host-linux-arm64": "0.0.12",
76
+ "@incajs/host-linux-x64": "0.0.12"
77
77
  },
78
78
  "engines": {
79
79
  "node": ">=22.18"