@moku-labs/web 1.15.0 → 1.15.1
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/index.cjs +28 -0
- package/dist/index.d.cts +33 -1
- package/dist/index.d.mts +33 -1
- package/dist/index.mjs +28 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -8024,6 +8024,34 @@ function createApi$1(ctx) {
|
|
|
8024
8024
|
return result;
|
|
8025
8025
|
},
|
|
8026
8026
|
/**
|
|
8027
|
+
* Incremental dev rebuild from a set of changed paths — the fast counterpart to
|
|
8028
|
+
* `build()` for an external dev driver (e.g. the worker's `dev({ onChange })`). Skips
|
|
8029
|
+
* the destructive clean, scopes the rebuild to `changes`, and applies the same dev
|
|
8030
|
+
* overrides `serve()` uses (minify off; OG/sitemap/feeds off unless re-enabled). Renders
|
|
8031
|
+
* no header and skips the not-found assertion — the driver owns the dev TUI and the cold
|
|
8032
|
+
* build already asserted. Live per-phase progress still streams via the build hooks (as
|
|
8033
|
+
* the cold `build()` does today).
|
|
8034
|
+
*
|
|
8035
|
+
* @param changes - The paths changed since the last build (incremental rebuild hint).
|
|
8036
|
+
* @param options - Optional per-session dev-output opt-ins (default all off).
|
|
8037
|
+
* @returns The rebuild summary (`outDir`, `pageCount`, `durationMs`).
|
|
8038
|
+
* @throws {Error} When the underlying incremental build fails.
|
|
8039
|
+
* @example
|
|
8040
|
+
* await api.update(["src/islands/board.ts"]);
|
|
8041
|
+
*/
|
|
8042
|
+
update(changes, options = {}) {
|
|
8043
|
+
const overrides = devBuildOverrides({
|
|
8044
|
+
og: options.og ?? false,
|
|
8045
|
+
sitemap: options.sitemap ?? false,
|
|
8046
|
+
feeds: options.feeds ?? false
|
|
8047
|
+
});
|
|
8048
|
+
return ctx.require(buildPlugin).run({
|
|
8049
|
+
skipClean: true,
|
|
8050
|
+
overrides,
|
|
8051
|
+
changed: changes
|
|
8052
|
+
});
|
|
8053
|
+
},
|
|
8054
|
+
/**
|
|
8027
8055
|
* Dev loop: build once, serve `dist/` in-process (live-reload injected), watch
|
|
8028
8056
|
* `watchDirs`, debounced + incremental rebuild + reload. For a fast rebuild the dev
|
|
8029
8057
|
* build disables minification + expensive, NON-navigational outputs (feeds / sitemap /
|
package/dist/index.d.cts
CHANGED
|
@@ -1856,7 +1856,7 @@ type Api$2 = {
|
|
|
1856
1856
|
createProject(): Promise<CreateProjectResult>;
|
|
1857
1857
|
};
|
|
1858
1858
|
declare namespace types_d_exports$1 {
|
|
1859
|
-
export { Api$1 as Api, BuildOptions, BuildSummary, CliErrorCode, CliRenderer, Command, Config$1 as Config, DeployOptions, DeployOutcome, FileResponseFunction, PreviewOptions, ReloadInfo, ServeOptions, ServeStaticFunction, ServeStaticOptions, ServerHandle, ServerInfo, State$1 as State, WatchHandle };
|
|
1859
|
+
export { Api$1 as Api, BuildOptions, BuildSummary, CliErrorCode, CliRenderer, Command, Config$1 as Config, DeployOptions, DeployOutcome, FileResponseFunction, PreviewOptions, ReloadInfo, ServeOptions, ServeStaticFunction, ServeStaticOptions, ServerHandle, ServerInfo, State$1 as State, UpdateOptions, WatchHandle };
|
|
1860
1860
|
}
|
|
1861
1861
|
/**
|
|
1862
1862
|
* A cli error `code` from the config-validation and runtime taxonomy. Mirrors the
|
|
@@ -2269,6 +2269,20 @@ type DeployOutcome = {
|
|
|
2269
2269
|
type BuildOptions = {
|
|
2270
2270
|
/** Assert `outDir/notFoundFile` exists after the build. Defaults to `true`. */assertNotFound?: boolean;
|
|
2271
2271
|
};
|
|
2272
|
+
/**
|
|
2273
|
+
* Options for `cli.update()` — the per-session dev-output opt-ins, mirroring the
|
|
2274
|
+
* relevant subset of {@link ServeOptions}. Each defaults to `false`: an incremental
|
|
2275
|
+
* rebuild skips expensive, preview-irrelevant outputs (OG images / sitemap / feeds)
|
|
2276
|
+
* for speed, and a flag re-enables that one output for the rebuild.
|
|
2277
|
+
*
|
|
2278
|
+
* @example
|
|
2279
|
+
* await app.cli.update(["src/styles.css"], { feeds: true });
|
|
2280
|
+
*/
|
|
2281
|
+
type UpdateOptions = {
|
|
2282
|
+
/** Re-enable OG-image generation for this rebuild. Defaults to `false`. */og?: boolean; /** Re-enable `sitemap.xml` + `robots.txt` for this rebuild. Defaults to `false`. */
|
|
2283
|
+
sitemap?: boolean; /** Re-enable RSS/Atom/JSON feeds for this rebuild. Defaults to `false`. */
|
|
2284
|
+
feeds?: boolean;
|
|
2285
|
+
};
|
|
2272
2286
|
/**
|
|
2273
2287
|
* Options for `cli.serve()`.
|
|
2274
2288
|
*
|
|
@@ -2330,6 +2344,24 @@ type Api$1 = {
|
|
|
2330
2344
|
* const summary = await app.cli.build();
|
|
2331
2345
|
*/
|
|
2332
2346
|
build(options?: BuildOptions): Promise<BuildSummary>;
|
|
2347
|
+
/**
|
|
2348
|
+
* Incremental dev rebuild from a set of changed paths — the fast counterpart to
|
|
2349
|
+
* {@link build} for a long-lived EXTERNAL dev loop (e.g. an `@moku-labs/worker` dev
|
|
2350
|
+
* session driving the composed web client via `dev({ onChange })`). Reuses the build
|
|
2351
|
+
* plugin's incremental engine: skips the destructive clean, scopes the rebuild to
|
|
2352
|
+
* `changes` (re-reads only changed Markdown, reuses cached page renders whose data is
|
|
2353
|
+
* unchanged), and applies the dev overrides (minify off; OG/sitemap/feeds off unless
|
|
2354
|
+
* re-enabled per {@link UpdateOptions}). An unclassifiable path forces a full rebuild.
|
|
2355
|
+
* Unlike {@link build} it renders no command header and skips the not-found assertion
|
|
2356
|
+
* (it's a per-change dev rebuild, not a release build).
|
|
2357
|
+
*
|
|
2358
|
+
* @param changes - The paths changed since the last build (the incremental hint).
|
|
2359
|
+
* @param options - Optional per-session dev-output opt-ins.
|
|
2360
|
+
* @returns The rebuild summary (`outDir`, `pageCount`, `durationMs`).
|
|
2361
|
+
* @example
|
|
2362
|
+
* await app.cli.update(["src/islands/board.ts"]);
|
|
2363
|
+
*/
|
|
2364
|
+
update(changes: readonly string[], options?: UpdateOptions): Promise<BuildSummary>;
|
|
2333
2365
|
/**
|
|
2334
2366
|
* Dev loop: build once, serve `dist/` in-process (live-reload injected), watch
|
|
2335
2367
|
* `watchDirs`, debounced rebuild + reload. Resolves when SIGINT/SIGTERM tears down.
|
package/dist/index.d.mts
CHANGED
|
@@ -1854,7 +1854,7 @@ type Api$2 = {
|
|
|
1854
1854
|
createProject(): Promise<CreateProjectResult>;
|
|
1855
1855
|
};
|
|
1856
1856
|
declare namespace types_d_exports$1 {
|
|
1857
|
-
export { Api$1 as Api, BuildOptions, BuildSummary, CliErrorCode, CliRenderer, Command, Config$1 as Config, DeployOptions, DeployOutcome, FileResponseFunction, PreviewOptions, ReloadInfo, ServeOptions, ServeStaticFunction, ServeStaticOptions, ServerHandle, ServerInfo, State$1 as State, WatchHandle };
|
|
1857
|
+
export { Api$1 as Api, BuildOptions, BuildSummary, CliErrorCode, CliRenderer, Command, Config$1 as Config, DeployOptions, DeployOutcome, FileResponseFunction, PreviewOptions, ReloadInfo, ServeOptions, ServeStaticFunction, ServeStaticOptions, ServerHandle, ServerInfo, State$1 as State, UpdateOptions, WatchHandle };
|
|
1858
1858
|
}
|
|
1859
1859
|
/**
|
|
1860
1860
|
* A cli error `code` from the config-validation and runtime taxonomy. Mirrors the
|
|
@@ -2267,6 +2267,20 @@ type DeployOutcome = {
|
|
|
2267
2267
|
type BuildOptions = {
|
|
2268
2268
|
/** Assert `outDir/notFoundFile` exists after the build. Defaults to `true`. */assertNotFound?: boolean;
|
|
2269
2269
|
};
|
|
2270
|
+
/**
|
|
2271
|
+
* Options for `cli.update()` — the per-session dev-output opt-ins, mirroring the
|
|
2272
|
+
* relevant subset of {@link ServeOptions}. Each defaults to `false`: an incremental
|
|
2273
|
+
* rebuild skips expensive, preview-irrelevant outputs (OG images / sitemap / feeds)
|
|
2274
|
+
* for speed, and a flag re-enables that one output for the rebuild.
|
|
2275
|
+
*
|
|
2276
|
+
* @example
|
|
2277
|
+
* await app.cli.update(["src/styles.css"], { feeds: true });
|
|
2278
|
+
*/
|
|
2279
|
+
type UpdateOptions = {
|
|
2280
|
+
/** Re-enable OG-image generation for this rebuild. Defaults to `false`. */og?: boolean; /** Re-enable `sitemap.xml` + `robots.txt` for this rebuild. Defaults to `false`. */
|
|
2281
|
+
sitemap?: boolean; /** Re-enable RSS/Atom/JSON feeds for this rebuild. Defaults to `false`. */
|
|
2282
|
+
feeds?: boolean;
|
|
2283
|
+
};
|
|
2270
2284
|
/**
|
|
2271
2285
|
* Options for `cli.serve()`.
|
|
2272
2286
|
*
|
|
@@ -2328,6 +2342,24 @@ type Api$1 = {
|
|
|
2328
2342
|
* const summary = await app.cli.build();
|
|
2329
2343
|
*/
|
|
2330
2344
|
build(options?: BuildOptions): Promise<BuildSummary>;
|
|
2345
|
+
/**
|
|
2346
|
+
* Incremental dev rebuild from a set of changed paths — the fast counterpart to
|
|
2347
|
+
* {@link build} for a long-lived EXTERNAL dev loop (e.g. an `@moku-labs/worker` dev
|
|
2348
|
+
* session driving the composed web client via `dev({ onChange })`). Reuses the build
|
|
2349
|
+
* plugin's incremental engine: skips the destructive clean, scopes the rebuild to
|
|
2350
|
+
* `changes` (re-reads only changed Markdown, reuses cached page renders whose data is
|
|
2351
|
+
* unchanged), and applies the dev overrides (minify off; OG/sitemap/feeds off unless
|
|
2352
|
+
* re-enabled per {@link UpdateOptions}). An unclassifiable path forces a full rebuild.
|
|
2353
|
+
* Unlike {@link build} it renders no command header and skips the not-found assertion
|
|
2354
|
+
* (it's a per-change dev rebuild, not a release build).
|
|
2355
|
+
*
|
|
2356
|
+
* @param changes - The paths changed since the last build (the incremental hint).
|
|
2357
|
+
* @param options - Optional per-session dev-output opt-ins.
|
|
2358
|
+
* @returns The rebuild summary (`outDir`, `pageCount`, `durationMs`).
|
|
2359
|
+
* @example
|
|
2360
|
+
* await app.cli.update(["src/islands/board.ts"]);
|
|
2361
|
+
*/
|
|
2362
|
+
update(changes: readonly string[], options?: UpdateOptions): Promise<BuildSummary>;
|
|
2331
2363
|
/**
|
|
2332
2364
|
* Dev loop: build once, serve `dist/` in-process (live-reload injected), watch
|
|
2333
2365
|
* `watchDirs`, debounced rebuild + reload. Resolves when SIGINT/SIGTERM tears down.
|
package/dist/index.mjs
CHANGED
|
@@ -8011,6 +8011,34 @@ function createApi$1(ctx) {
|
|
|
8011
8011
|
return result;
|
|
8012
8012
|
},
|
|
8013
8013
|
/**
|
|
8014
|
+
* Incremental dev rebuild from a set of changed paths — the fast counterpart to
|
|
8015
|
+
* `build()` for an external dev driver (e.g. the worker's `dev({ onChange })`). Skips
|
|
8016
|
+
* the destructive clean, scopes the rebuild to `changes`, and applies the same dev
|
|
8017
|
+
* overrides `serve()` uses (minify off; OG/sitemap/feeds off unless re-enabled). Renders
|
|
8018
|
+
* no header and skips the not-found assertion — the driver owns the dev TUI and the cold
|
|
8019
|
+
* build already asserted. Live per-phase progress still streams via the build hooks (as
|
|
8020
|
+
* the cold `build()` does today).
|
|
8021
|
+
*
|
|
8022
|
+
* @param changes - The paths changed since the last build (incremental rebuild hint).
|
|
8023
|
+
* @param options - Optional per-session dev-output opt-ins (default all off).
|
|
8024
|
+
* @returns The rebuild summary (`outDir`, `pageCount`, `durationMs`).
|
|
8025
|
+
* @throws {Error} When the underlying incremental build fails.
|
|
8026
|
+
* @example
|
|
8027
|
+
* await api.update(["src/islands/board.ts"]);
|
|
8028
|
+
*/
|
|
8029
|
+
update(changes, options = {}) {
|
|
8030
|
+
const overrides = devBuildOverrides({
|
|
8031
|
+
og: options.og ?? false,
|
|
8032
|
+
sitemap: options.sitemap ?? false,
|
|
8033
|
+
feeds: options.feeds ?? false
|
|
8034
|
+
});
|
|
8035
|
+
return ctx.require(buildPlugin).run({
|
|
8036
|
+
skipClean: true,
|
|
8037
|
+
overrides,
|
|
8038
|
+
changed: changes
|
|
8039
|
+
});
|
|
8040
|
+
},
|
|
8041
|
+
/**
|
|
8014
8042
|
* Dev loop: build once, serve `dist/` in-process (live-reload injected), watch
|
|
8015
8043
|
* `watchDirs`, debounced + incremental rebuild + reload. For a fast rebuild the dev
|
|
8016
8044
|
* build disables minification + expensive, NON-navigational outputs (feeds / sitemap /
|
package/package.json
CHANGED