@incajs/cli 0.0.20 → 0.0.21

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/entry.d.mts CHANGED
@@ -1,4 +1,13 @@
1
1
  export declare const MAIN_FILES: string[];
2
+ /**
3
+ * The directory Vite takes as the app's root: `src` for the entry
4
+ * {@link resolveEntry} writes for `src/App.vue`, and the entry's own
5
+ * directory for any other entry.
6
+ * @param cwd - the app's root directory
7
+ * @param entry - the app's entry file
8
+ * @returns the directory
9
+ */
10
+ export declare function entryRoot(cwd: string, entry: string): string;
2
11
  /**
3
12
  * Resolves an app's entry point. A `src/main.mts`, `src/main.ts` or
4
13
  * `src/main.js` committed by the app wins outright, in that order, and is
package/dist/types.d.mts CHANGED
@@ -7,6 +7,12 @@ export interface Watcher {
7
7
  export interface BuildOptions {
8
8
  /** The app's own entry point. It may import `.vue` files. */
9
9
  entry: string;
10
+ /** The app's root directory for Vite. `envDir` and `publicDir` default to locations under it. Defaults to the entry's directory. */
11
+ root?: string;
12
+ /** The directory Vite reads `.env*` files from. Defaults to `root`. */
13
+ envDir?: string;
14
+ /** The directory of static files Vite serves and copies. Defaults to `public` under `root`. */
15
+ publicDir?: string;
10
16
  /** Where the build's output is written. */
11
17
  outDir: string;
12
18
  /** Writes `bundle.js.map` beside the bundle. Defaults to `false`. */
@@ -68,6 +74,12 @@ export interface BuildOutput {
68
74
  export interface HmrOptions {
69
75
  /** The app's own entry point. It may import `.vue` files. */
70
76
  entry: string;
77
+ /** The directory the app's module urls are relative to. Defaults to the entry's directory. */
78
+ root?: string;
79
+ /** The directory Vite reads `.env*` files from. Defaults to `root`. */
80
+ envDir?: string;
81
+ /** The directory of static files Vite serves. Defaults to `public` under `root`. */
82
+ publicDir?: string;
71
83
  /** The app's root directory, where its dev-only scratch files are written. */
72
84
  cwd: string;
73
85
  /**
@@ -3,4 +3,4 @@ import { AdapterCore, BuildOptions, BuildOutput } from '../adapterCore.mts';
3
3
  * Builds `entry` into a minified, production build under `outDir` once, and
4
4
  * rejects on failure. Never starts or talks to `inca-host`.
5
5
  */
6
- export declare function build(core: AdapterCore, runtimeModuleName: string, { entry, outDir, sourcemap, runtimeConfig, stdout, stderr, quiet, }: BuildOptions): Promise<BuildOutput>;
6
+ export declare function build(core: AdapterCore, runtimeModuleName: string, { entry, root, envDir, publicDir, outDir, sourcemap, runtimeConfig, stdout, stderr, quiet, }: BuildOptions): Promise<BuildOutput>;
@@ -8,6 +8,12 @@ export interface ResolveConfigOptions {
8
8
  runtimeModuleName: string;
9
9
  /** The app's own entry point. It may import `.vue` files. */
10
10
  entry: string;
11
+ /** See the `root` option in `../types.mts`. Defaults to the entry's directory. */
12
+ root?: string;
13
+ /** See the `envDir` option in `../types.mts`. Defaults to `root`. */
14
+ envDir?: string;
15
+ /** See the `publicDir` option in `../types.mts`. Defaults to `public` under `root`. */
16
+ publicDir?: string;
11
17
  /** Where the build's output is written. */
12
18
  outDir: string;
13
19
  /** `"development"` keeps `@vue/runtime-core`'s own warnings; `"production"` strips them. */
@@ -36,4 +42,4 @@ export interface ResolveConfigOptions {
36
42
  * file's own `<style>` block) lands as its own chunk or asset alongside
37
43
  * the entry, named by `chunkFileNames`/`assetFileNames` below.
38
44
  */
39
- export declare function resolveViteConfig({ core, runtimeModuleName, entry, outDir, mode, sourcemap, watch, onOutput, stdout, stderr, quiet, runtimeConfig, }: ResolveConfigOptions): InlineConfig;
45
+ export declare function resolveViteConfig({ core, runtimeModuleName, entry, root, envDir, publicDir, outDir, mode, sourcemap, watch, onOutput, stdout, stderr, quiet, runtimeConfig, }: ResolveConfigOptions): InlineConfig;
@@ -33,5 +33,5 @@ export declare function globalsOfDefine(define: Record<string, unknown> | undefi
33
33
  * a browser: a `"client"` environment with a custom {@link HotChannel}
34
34
  * standing in for the WebSocket server `server.ws: false` disables.
35
35
  */
36
- export declare function hmr(core: AdapterCore, runtimeModuleName: string, { entry, cwd, runtimeConfig, runtimePath, stdout, stderr, quiet, notify, reload, onError, onUpdate, }: HmrOptions): Promise<HmrChannel>;
36
+ export declare function hmr(core: AdapterCore, runtimeModuleName: string, { entry, root, envDir, publicDir, cwd, runtimeConfig, runtimePath, stdout, stderr, quiet, notify, reload, onError, onUpdate, }: HmrOptions): Promise<HmrChannel>;
37
37
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incajs/cli",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
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.20",
76
- "@incajs/host-darwin-x64": "0.0.20",
77
- "@incajs/host-linux-arm64": "0.0.20",
78
- "@incajs/host-linux-x64": "0.0.20"
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"
79
79
  },
80
80
  "engines": {
81
81
  "node": ">=22.18"