@evjs/cli 0.2.9 → 0.2.11
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 +13 -4
- package/dist/cli.js +16 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +5 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -24,7 +24,8 @@ No configuration file is needed. `ev dev` and `ev build` delegate to `@evjs/ev`
|
|
|
24
24
|
|---------|-------------|
|
|
25
25
|
| `ev dev` | Start dev server (client HMR + API watch) |
|
|
26
26
|
| `ev build` | Production build (client + server) |
|
|
27
|
-
| `ev
|
|
27
|
+
| `ev prepare` | Generate `.ev` framework IR without bundling or writing `dist` |
|
|
28
|
+
| `ev inspect` | Explain framework discovery without running a bundler or writing generated output |
|
|
28
29
|
|
|
29
30
|
> **Scaffolding:** Use `npx @evjs/create-app` to scaffold a new project.
|
|
30
31
|
|
|
@@ -43,11 +44,19 @@ Runs the production build through `@evjs/ev` with `NODE_ENV=production`:
|
|
|
43
44
|
- `dist/server/manifest.json` — lightweight server entry and route metadata.
|
|
44
45
|
- `dist/build-output.json` — canonical deployment metadata for tooling and adapters.
|
|
45
46
|
|
|
47
|
+
### `ev prepare`
|
|
48
|
+
|
|
49
|
+
Runs config resolution, file-convention discovery, generated contributions, and
|
|
50
|
+
entry facade generation without invoking the bundler. It writes `.ev/` so tools
|
|
51
|
+
and agents can inspect `.ev/manifest.json`, `.ev/framework/app-graph.json`,
|
|
52
|
+
`.ev/framework/build-plan.json`, generated entries, and plugin generated
|
|
53
|
+
modules.
|
|
54
|
+
|
|
46
55
|
### `ev inspect`
|
|
47
56
|
|
|
48
|
-
Runs the framework preflight path without bundling
|
|
49
|
-
routes, ignored/rejected route files, server
|
|
50
|
-
metadata, runtime paths, planned entries, and diagnostics. Add
|
|
57
|
+
Runs the framework preflight path without bundling and without writing `dist` or
|
|
58
|
+
`.ev`. Use it to inspect page routes, ignored/rejected route files, server
|
|
59
|
+
functions, server routes, render metadata, runtime paths, planned entries, and diagnostics. Add
|
|
51
60
|
`--json` for machine-readable output.
|
|
52
61
|
|
|
53
62
|
## Configuration
|
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ import path from "node:path";
|
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { configure, getConsoleSink, getLogger } from "@logtape/logtape";
|
|
6
6
|
import { Command } from "commander";
|
|
7
|
-
import { build, dev } from "./index.js";
|
|
7
|
+
import { build, dev, prepare } from "./index.js";
|
|
8
8
|
import { formatInspectCommandErrorJson, runInspectCommand, } from "./inspect-command.js";
|
|
9
9
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
10
|
await configure({
|
|
@@ -72,6 +72,21 @@ program
|
|
|
72
72
|
process.exit(1);
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
+
program
|
|
76
|
+
.command("prepare")
|
|
77
|
+
.description("Generate .ev framework IR without running a bundler")
|
|
78
|
+
.action(async () => {
|
|
79
|
+
const cwd = process.cwd();
|
|
80
|
+
const { loadConfig } = await import("./load-config.js");
|
|
81
|
+
const config = await loadConfig(cwd);
|
|
82
|
+
try {
|
|
83
|
+
await prepare(config ?? undefined, { cwd });
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
logger.error `Prepare failed: ${err}`;
|
|
87
|
+
process.exit(1);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
75
90
|
program
|
|
76
91
|
.command("inspect")
|
|
77
92
|
.description("Inspect evjs framework discovery without running a bundler")
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { utoopackAdapter } from "@evjs/bundler-utoopack";
|
|
2
|
-
import { type BuildOptions, type BundlerAdapter, type DevOptions } from "@evjs/ev/_internal/build";
|
|
2
|
+
import { type BuildOptions, type BundlerAdapter, type DevOptions, type PrepareFrameworkBuildOptions } from "@evjs/ev/_internal/build";
|
|
3
3
|
import type { Config } from "@evjs/ev/config";
|
|
4
|
-
export type { BuildOptions, BundlerAdapter, DevOptions, } from "@evjs/ev/_internal/build";
|
|
4
|
+
export type { BuildOptions, BundlerAdapter, DevOptions, PrepareFrameworkBuildOptions, } from "@evjs/ev/_internal/build";
|
|
5
5
|
export { CONFIG_DEFAULTS, type Config, defineConfig, type EvConfig, type ResolvedConfig, type ResolvedEvConfig, resolveConfig, } from "@evjs/ev/config";
|
|
6
|
-
export type { BuildResult, BundlerCtx, ClientManifest, EvBuildResult, EvBundlerCtx, EvDocument, EvPlugin, EvPluginConfigContext, EvPluginContext, EvPluginHooks, Plugin, PluginContext, PluginHooks, ServerManifest, } from "@evjs/ev/plugin";
|
|
6
|
+
export type { BuildResult, BundlerCtx, ClientManifest, ContributionContext, EmitApi, EvBuildResult, EvBundlerCtx, EvDocument, EvPlugin, EvPluginConfigContext, EvPluginContext, EvPluginHooks, FrameworkIRView, FrameworkSlot, FrameworkSlotInput, GeneratedModuleRef, Plugin, PluginContext, PluginHooks, ServerManifest, } from "@evjs/ev/plugin";
|
|
7
7
|
export { loadConfig } from "./load-config.js";
|
|
8
8
|
export type DefaultBundlerConfig = typeof utoopackAdapter extends BundlerAdapter<infer TBundlerCfg> ? TBundlerCfg : never;
|
|
9
9
|
export declare function dev<TBundlerCfg = DefaultBundlerConfig>(userConfig?: Config<TBundlerCfg>, options?: DevOptions<TBundlerCfg>): Promise<void>;
|
|
10
10
|
export declare function build<TBundlerCfg = DefaultBundlerConfig>(userConfig?: Config<TBundlerCfg>, options?: BuildOptions<TBundlerCfg>): Promise<void>;
|
|
11
|
+
export declare function prepare<TBundlerCfg = DefaultBundlerConfig>(userConfig?: Config<TBundlerCfg>, options?: PrepareFrameworkBuildOptions<TBundlerCfg>): Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { utoopackAdapter } from "@evjs/bundler-utoopack";
|
|
2
|
-
import { build as frameworkBuild, dev as frameworkDev, } from "@evjs/ev/_internal/build";
|
|
2
|
+
import { build as frameworkBuild, dev as frameworkDev, prepareFrameworkBuild, } from "@evjs/ev/_internal/build";
|
|
3
3
|
export { CONFIG_DEFAULTS, defineConfig, resolveConfig, } from "@evjs/ev/config";
|
|
4
4
|
export { loadConfig } from "./load-config.js";
|
|
5
5
|
const defaultBundler = utoopackAdapter;
|
|
@@ -24,3 +24,7 @@ export async function build(userConfig, options) {
|
|
|
24
24
|
bundler,
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
+
export async function prepare(userConfig, options) {
|
|
28
|
+
const prepared = await prepareFrameworkBuild(userConfig, options);
|
|
29
|
+
await prepared.dispose();
|
|
30
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evjs/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"description": "Command-line wrapper for the evjs framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"check-types": "tsc --noEmit"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@evjs/bundler-utoopack": "0.2.
|
|
32
|
-
"@evjs/ev": "0.2.
|
|
31
|
+
"@evjs/bundler-utoopack": "0.2.11",
|
|
32
|
+
"@evjs/ev": "0.2.11",
|
|
33
33
|
"@logtape/logtape": "^2.0.4",
|
|
34
34
|
"commander": "^12.1.0"
|
|
35
35
|
},
|