@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.
- package/README.md +1 -1
- package/dist/adapter/vite/build.d.mts +1 -1
- package/dist/adapter/vite/config.d.mts +5 -3
- package/dist/adapter/vite/createBundler.d.mts +6 -2
- package/dist/adapter/vite/hmr.d.mts +1 -1
- package/dist/adapter/vite/watch.d.mts +1 -1
- package/dist/build.d.mts +1 -1
- package/dist/chunks/defaults-TOBTBbDy.js +22 -0
- package/dist/chunks/dist-Bc5Uk6dY.js +733 -0
- package/dist/chunks/{dist-AuwuGWnE.js → dist-Bp_FYhnk.js} +20 -20
- package/dist/cli.js +934 -418
- package/dist/config/index.d.mts +1 -1
- package/dist/config/loader.d.mts +2 -1
- package/dist/config/types.d.mts +3 -2
- package/dist/config.js +3 -3
- package/dist/defaultBundler.d.mts +2 -1
- package/dist/dev.d.mts +1 -1
- package/dist/entry.d.mts +9 -3
- package/dist/package.d.mts +1 -1
- package/dist/watchForEdit.d.mts +1 -1
- package/package.json +5 -5
- package/dist/chunks/defaults-CKuLLRFh.js +0 -1262
- /package/dist/{dev-lock.d.mts → devLock.d.mts} +0 -0
- /package/dist/{macos-app.d.mts → macosApp.d.mts} +0 -0
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ npm i -D @incajs/cli
|
|
|
17
17
|
## App entry
|
|
18
18
|
|
|
19
19
|
No entry point is required. Drop a `src/App.vue` and that's a whole
|
|
20
|
-
app. Commit a `src/main.mts` instead for full control over
|
|
20
|
+
app. Commit a `src/main.mts`, `src/main.ts` or `src/main.js` instead for full control over
|
|
21
21
|
bootstrapping; it wins outright when both exist.
|
|
22
22
|
|
|
23
23
|
## Commands
|
|
@@ -5,4 +5,4 @@ import { BuildOptions, BuildOutput } from '../types.mts';
|
|
|
5
5
|
* rejects on failure rather than reporting it through a callback. Never
|
|
6
6
|
* starts or talks to `inca-host` — that's `dev.mts`'s job.
|
|
7
7
|
*/
|
|
8
|
-
export declare function build(core: AdapterCore, { entry, outDir, runtimeConfig, stdout, stderr, quiet, }: BuildOptions): Promise<BuildOutput>;
|
|
8
|
+
export declare function build(core: AdapterCore, runtimeModuleName: string, { entry, outDir, runtimeConfig, stdout, stderr, quiet, }: BuildOptions): Promise<BuildOutput>;
|
|
@@ -4,6 +4,8 @@ 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
|
+
/** The module compiled `.vue` templates import their helpers from. */
|
|
8
|
+
runtimeModuleName: string;
|
|
7
9
|
/** The app's own entry point — may import `.vue` files. */
|
|
8
10
|
entry: string;
|
|
9
11
|
/** Where the build's output is written. */
|
|
@@ -25,12 +27,12 @@ export interface ResolveConfigOptions {
|
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
27
29
|
* Builds the Vite config shared by `watch` and `build`, compiling `.vue`
|
|
28
|
-
* files via `@vitejs/plugin-vue
|
|
29
|
-
*
|
|
30
|
+
* files via `@vitejs/plugin-vue`. Compiled templates import their helpers
|
|
31
|
+
* from `runtimeModuleName`.
|
|
30
32
|
*
|
|
31
33
|
* An import the entry doesn't inline — a dynamic `import()`, or a `.vue`
|
|
32
34
|
* file's own `<style>` block — lands as its own chunk or asset alongside
|
|
33
35
|
* the entry, named by `chunkFileNames`/`assetFileNames` below, rather than
|
|
34
36
|
* failing the build.
|
|
35
37
|
*/
|
|
36
|
-
export declare function resolveViteConfig({ core, entry, outDir, mode, watch, onOutput, stdout, stderr, quiet, runtimeConfig, }: ResolveConfigOptions): InlineConfig;
|
|
38
|
+
export declare function resolveViteConfig({ core, runtimeModuleName, entry, outDir, mode, watch, onOutput, stdout, stderr, quiet, runtimeConfig, }: ResolveConfigOptions): InlineConfig;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { AdapterCore } from '../../adapterCore.mts';
|
|
2
2
|
import { Bundler } from '../types.mts';
|
|
3
|
-
/**
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The Vite adapter.
|
|
5
|
+
* @param core - the CLI logic the adapter uses
|
|
6
|
+
* @param runtimeModuleName - the module compiled `.vue` templates import their helpers from
|
|
7
|
+
*/
|
|
8
|
+
export declare function createViteBundler(core: AdapterCore, runtimeModuleName: string): Bundler;
|
|
@@ -26,5 +26,5 @@ export declare function faultOfUpdate(core: AdapterCore, error: UpdateError): Bu
|
|
|
26
26
|
* a browser: a `"client"` environment with a custom {@link HotChannel}
|
|
27
27
|
* standing in for the WebSocket server `server.ws: false` disables.
|
|
28
28
|
*/
|
|
29
|
-
export declare function hmr(core: AdapterCore, { entry, cwd, runtimeConfig, runtimePath, stdout, stderr, quiet, notify, reload, onError, onUpdate, }: HmrOptions): Promise<HmrChannel>;
|
|
29
|
+
export declare function hmr(core: AdapterCore, runtimeModuleName: string, { entry, cwd, runtimeConfig, runtimePath, stdout, stderr, quiet, notify, reload, onError, onUpdate, }: HmrOptions): Promise<HmrChannel>;
|
|
30
30
|
export {};
|
|
@@ -5,4 +5,4 @@ import { BundlerOptions, Watcher } from '../types.mts';
|
|
|
5
5
|
* change, calling `onBuild` with what each rebuild wrote. Never starts,
|
|
6
6
|
* reloads, or talks to `inca-host` — that's `dev.mts`'s job.
|
|
7
7
|
*/
|
|
8
|
-
export declare function watch(core: AdapterCore, { onBuild, onError, stdout, stderr, quiet, ...buildOptions }: BundlerOptions): Promise<Watcher>;
|
|
8
|
+
export declare function watch(core: AdapterCore, runtimeModuleName: string, { onBuild, onError, stdout, stderr, quiet, ...buildOptions }: BundlerOptions): Promise<Watcher>;
|
package/dist/build.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ export interface BuildAppOptions {
|
|
|
5
5
|
cwd?: string;
|
|
6
6
|
/**
|
|
7
7
|
* The app's entry point. Defaults to resolving it automatically: a
|
|
8
|
-
* committed `src/main.mts`, or `src/App.vue` wrapped in a synthesized one.
|
|
8
|
+
* committed `src/main.mts`, `src/main.ts` or `src/main.js`, or `src/App.vue` wrapped in a synthesized one.
|
|
9
9
|
*/
|
|
10
10
|
entry?: string;
|
|
11
11
|
/** Overrides the bundler — see {@link defaultBundler} for what's wired in by default. */
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/config/defaults.mts
|
|
2
|
+
var e = {
|
|
3
|
+
outDir: "dist",
|
|
4
|
+
version: "0.0.0"
|
|
5
|
+
};
|
|
6
|
+
function t(e) {
|
|
7
|
+
let t = e.indexOf("/");
|
|
8
|
+
return e.startsWith("@") && t !== -1 ? e.slice(t + 1) : e;
|
|
9
|
+
}
|
|
10
|
+
var n = "app";
|
|
11
|
+
function r(e) {
|
|
12
|
+
let t = e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
13
|
+
return t === "" ? n : t;
|
|
14
|
+
}
|
|
15
|
+
function i(e) {
|
|
16
|
+
return e ? t(e) : void 0;
|
|
17
|
+
}
|
|
18
|
+
function a(e) {
|
|
19
|
+
return `org.inca.${r(e)}`;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { r as i, a as n, i as r, e as t };
|