@incajs/cli 0.0.16 → 0.0.18
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/{src/adapterCore.d.mts → adapterCore.d.mts} +1 -0
- package/dist/{src/build.d.mts → build.d.mts} +1 -1
- package/dist/cli.js +627 -659
- package/dist/{src/defaultBundler.d.mts → defaultBundler.d.mts} +2 -2
- package/dist/{src/dev.d.mts → dev.d.mts} +1 -1
- package/dist/{src/package.d.mts → package.d.mts} +1 -1
- package/dist/{src/adapter/types.d.mts → types.d.mts} +1 -1
- package/dist/{src/adapter/vite → vite}/build.d.mts +1 -2
- package/dist/{src/adapter/vite → vite}/captureOutput.d.mts +1 -2
- package/dist/{src/adapter/vite → vite}/config.d.mts +1 -1
- package/dist/{src/adapter/vite → vite}/createBundler.d.mts +1 -2
- package/dist/{src/adapter/vite → vite}/hmr.d.mts +9 -2
- package/dist/{src/adapter/vite → vite}/unsupported.d.mts +1 -1
- package/dist/{src/adapter/vite → vite}/watch.d.mts +1 -2
- package/dist/{hmr-runtime.js → vite-runtime.js} +11 -10
- package/package.json +7 -6
- /package/dist/{src/cli.d.mts → cli.d.mts} +0 -0
- /package/dist/{src/config → config}/defaults.d.mts +0 -0
- /package/dist/{src/config → config}/index.d.mts +0 -0
- /package/dist/{src/config → config}/loader.d.mts +0 -0
- /package/dist/{src/config → config}/types.d.mts +0 -0
- /package/dist/{src/dev-client → dev-client}/hostBin.d.mts +0 -0
- /package/dist/{src/dev-client → dev-client}/hostClient.d.mts +0 -0
- /package/dist/{src/dev-client → dev-client}/hostError.d.mts +0 -0
- /package/dist/{src/dev-client → dev-client}/index.d.mts +0 -0
- /package/dist/{src/dev-client → dev-client}/protocol.d.mts +0 -0
- /package/dist/{src/devLock.d.mts → devLock.d.mts} +0 -0
- /package/dist/{src/entry.d.mts → entry.d.mts} +0 -0
- /package/dist/{src/error.d.mts → error.d.mts} +0 -0
- /package/dist/{src/index.d.mts → index.d.mts} +0 -0
- /package/dist/{src/log.d.mts → log.d.mts} +0 -0
- /package/dist/{src/macosApp.d.mts → macosApp.d.mts} +0 -0
- /package/dist/{src/plist.d.mts → plist.d.mts} +0 -0
- /package/dist/{src/retryOnEdit.d.mts → retryOnEdit.d.mts} +0 -0
- /package/dist/{src/adapter/vite → vite}/emitConfig.d.mts +0 -0
- /package/dist/{src/adapter/vite → vite}/index.d.mts +0 -0
- /package/dist/{src/adapter/vite → vite}/logger.d.mts +0 -0
- /package/dist/{src/watchForEdit.d.mts → watchForEdit.d.mts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Bundler } from './
|
|
1
|
+
import { Bundler } from './types.mts';
|
|
2
2
|
/**
|
|
3
|
-
* `
|
|
3
|
+
* `vite/` wired in as the one adapter `dev` and `build` share by
|
|
4
4
|
* default: a single place to swap bundlers. Compiled `.vue` templates import
|
|
5
5
|
* their helpers from `incajs/vue/runtime`.
|
|
6
6
|
*/
|
|
@@ -75,7 +75,7 @@ export interface HmrOptions {
|
|
|
75
75
|
* and window. Any JSON-serializable object.
|
|
76
76
|
*/
|
|
77
77
|
runtimeConfig?: unknown;
|
|
78
|
-
/** Overrides where the synthesized entry imports `
|
|
78
|
+
/** Overrides where the synthesized entry imports `vite-runtime.js` from. Test-only. */
|
|
79
79
|
runtimePath?: string;
|
|
80
80
|
/** Where the bundler's own output goes. Defaults to `process.stdout`. */
|
|
81
81
|
stdout?: NodeJS.WritableStream;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { AdapterCore } from '
|
|
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
4
|
* rejects on failure. Never starts or talks to `inca-host`.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
|
-
import { AdapterCore } from '
|
|
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. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InlineConfig } from 'vite';
|
|
2
|
-
import { AdapterCore } from '
|
|
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 {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { AdapterCore } from '
|
|
2
|
-
import { BuildFailure, HmrChannel, HmrOptions } from '../types.mts';
|
|
1
|
+
import { AdapterCore, BuildFailure, HmrChannel, HmrOptions } from '../adapterCore.mts';
|
|
3
2
|
/**
|
|
4
3
|
* A failed update's detail: the same fields a Rollup/Vite plugin
|
|
5
4
|
* error carries beyond `message`/`stack`, when it has them.
|
|
@@ -21,6 +20,14 @@ interface UpdateError {
|
|
|
21
20
|
* `buildErrorMessage` follows the stack.
|
|
22
21
|
*/
|
|
23
22
|
export declare function faultOfUpdate(core: AdapterCore, error: UpdateError): BuildFailure;
|
|
23
|
+
/**
|
|
24
|
+
* The `define` entries set on `globalThis` in the development window, as values: those whose
|
|
25
|
+
* key is a plain identifier and whose code is a JSON literal. A string value is code, and any
|
|
26
|
+
* other value is read as its JSON form.
|
|
27
|
+
* @param define - the development server's resolved `define`
|
|
28
|
+
* @returns the values by key
|
|
29
|
+
*/
|
|
30
|
+
export declare function globalsOfDefine(define: Record<string, unknown> | undefined): Record<string, unknown>;
|
|
24
31
|
/**
|
|
25
32
|
* Starts a Vite dev server driving the app over its dev channel instead of
|
|
26
33
|
* a browser: a `"client"` environment with a custom {@link HotChannel}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
|
-
import { AdapterCore } from '
|
|
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. */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { AdapterCore } from '
|
|
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,
|
|
@@ -1108,7 +1108,7 @@ function bt(e, t) {
|
|
|
1108
1108
|
}
|
|
1109
1109
|
}
|
|
1110
1110
|
//#endregion
|
|
1111
|
-
//#region src/
|
|
1111
|
+
//#region src/vite/runtime/createIncaDevTransport.mts
|
|
1112
1112
|
var xt = "this code needs a host that serves the development protocol. start the app with `inca dev`.";
|
|
1113
1113
|
function St(e) {
|
|
1114
1114
|
return {
|
|
@@ -1129,7 +1129,7 @@ function St(e) {
|
|
|
1129
1129
|
};
|
|
1130
1130
|
}
|
|
1131
1131
|
//#endregion
|
|
1132
|
-
//#region src/
|
|
1132
|
+
//#region src/vite/runtime/createIncaEvaluator.mts
|
|
1133
1133
|
var Ct = class extends H {
|
|
1134
1134
|
startOffset = 1;
|
|
1135
1135
|
async runInlinedModule(e, t, n) {
|
|
@@ -1150,14 +1150,15 @@ function wt() {
|
|
|
1150
1150
|
return new Ct();
|
|
1151
1151
|
}
|
|
1152
1152
|
//#endregion
|
|
1153
|
-
//#region src/
|
|
1153
|
+
//#region src/vite/runtime/start.mts
|
|
1154
1154
|
function Tt(e) {
|
|
1155
1155
|
return typeof e == "object" && !!e && "runnerError" in e;
|
|
1156
1156
|
}
|
|
1157
|
-
async function Et(e) {
|
|
1158
|
-
|
|
1157
|
+
async function Et(e, t = {}) {
|
|
1158
|
+
Object.assign(globalThis, t);
|
|
1159
|
+
let n = () => {}, r = new yt({
|
|
1159
1160
|
transport: {
|
|
1160
|
-
...St(() =>
|
|
1161
|
+
...St(() => n()),
|
|
1161
1162
|
timeout: 0
|
|
1162
1163
|
},
|
|
1163
1164
|
hmr: { logger: {
|
|
@@ -1167,15 +1168,15 @@ async function Et(e) {
|
|
|
1167
1168
|
sourcemapInterceptor: !1
|
|
1168
1169
|
}, wt());
|
|
1169
1170
|
for (;;) {
|
|
1170
|
-
let
|
|
1171
|
-
|
|
1171
|
+
let t = new Promise((e) => {
|
|
1172
|
+
n = e;
|
|
1172
1173
|
});
|
|
1173
1174
|
try {
|
|
1174
|
-
return await
|
|
1175
|
+
return await r.import(e);
|
|
1175
1176
|
} catch (e) {
|
|
1176
1177
|
Tt(e) || Promise.reject(e), globalThis.__inca_dev__?.setLoadFailed?.(!0);
|
|
1177
1178
|
}
|
|
1178
|
-
await
|
|
1179
|
+
await t, r.clearCache(), globalThis.__inca_dev__?.setLoadFailed?.(!1);
|
|
1179
1180
|
}
|
|
1180
1181
|
}
|
|
1181
1182
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incajs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
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/
|
|
34
|
+
"src/vite/runtime/globals.mts"
|
|
35
35
|
],
|
|
36
36
|
"main": "./dist/index.js",
|
|
37
37
|
"types": "./dist/index.d.mts",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"oxfmt": "^0.72.0",
|
|
61
61
|
"oxlint": "^1.87.0",
|
|
62
62
|
"rolldown": "~1.2.13",
|
|
63
|
+
"ts-dedent": "2.3.0",
|
|
63
64
|
"vue": "^3.5.43"
|
|
64
65
|
},
|
|
65
66
|
"peerDependencies": {
|
|
@@ -71,10 +72,10 @@
|
|
|
71
72
|
}
|
|
72
73
|
},
|
|
73
74
|
"optionalDependencies": {
|
|
74
|
-
"@incajs/host-darwin-arm64": "0.0.
|
|
75
|
-
"@incajs/host-darwin-x64": "0.0.
|
|
76
|
-
"@incajs/host-linux-arm64": "0.0.
|
|
77
|
-
"@incajs/host-linux-x64": "0.0.
|
|
75
|
+
"@incajs/host-darwin-arm64": "0.0.18",
|
|
76
|
+
"@incajs/host-darwin-x64": "0.0.18",
|
|
77
|
+
"@incajs/host-linux-arm64": "0.0.18",
|
|
78
|
+
"@incajs/host-linux-x64": "0.0.18"
|
|
78
79
|
},
|
|
79
80
|
"engines": {
|
|
80
81
|
"node": ">=22.18"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|