@moku-labs/web 0.1.0-alpha.1 → 0.1.0-alpha.3
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/bin/moku.cjs +575 -1
- package/dist/bin/moku.mjs +576 -2
- package/dist/{factory-CixCpR9C.cjs → factory-DVcAQYEZ.cjs} +1 -1
- package/dist/{index-CWdZdegx.d.mts → index-CddOHo8I.d.mts} +115 -51
- package/dist/index.cjs +4 -3
- package/dist/index.d.cts +37 -37
- package/dist/index.d.mts +39 -39
- package/dist/index.mjs +3 -2
- package/dist/plugins/head/build.d.mts +1 -1
- package/dist/plugins/spa/index.cjs +1 -1
- package/dist/plugins/spa/index.d.mts +1 -1
- package/dist/{project-C1vtMxE8.cjs → project-1pAh4RxJ.cjs} +194 -5
- package/dist/{project-BTNUWbGQ.mjs → project-BaG_ipVz.mjs} +190 -7
- package/dist/{route-builder-Lv6HUVvP.d.cts → route-builder-CKvvehVO.d.cts} +113 -49
- package/dist/test.cjs +2 -2
- package/dist/test.d.cts +1 -1
- package/dist/test.d.mts +1 -1
- package/dist/test.mjs +1 -1
- package/dist/wrangler-BHdkyMRj.cjs +423 -0
- package/dist/wrangler-Coyrznz4.mjs +369 -0
- package/package.json +9 -1
- /package/dist/{factory-BBVQO5ZG.d.mts → factory-BHhulW27.d.mts} +0 -0
- /package/dist/{primitives-kuZFxqV7.d.mts → primitives-Dlfi3JTx.d.mts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as OGImageConfig } from "./primitives-
|
|
2
|
-
import { n as ComponentDef } from "./factory-
|
|
1
|
+
import { p as OGImageConfig } from "./primitives-Dlfi3JTx.mjs";
|
|
2
|
+
import { n as ComponentDef } from "./factory-BHhulW27.mjs";
|
|
3
3
|
import { Processor } from "unified";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/log/types.d.ts
|
|
@@ -150,6 +150,54 @@ type I18nApi<TLocales extends readonly string[] = readonly string[]> = {
|
|
|
150
150
|
t(locale: TLocales[number], key: string): string;
|
|
151
151
|
};
|
|
152
152
|
//#endregion
|
|
153
|
+
//#region src/plugins/content/types.d.ts
|
|
154
|
+
type Frontmatter = {
|
|
155
|
+
title: string;
|
|
156
|
+
date: string;
|
|
157
|
+
description: string;
|
|
158
|
+
tags: string[];
|
|
159
|
+
language: string;
|
|
160
|
+
author?: string;
|
|
161
|
+
draft?: boolean;
|
|
162
|
+
[key: string]: unknown;
|
|
163
|
+
};
|
|
164
|
+
type ComputedFields = {
|
|
165
|
+
contentId: string;
|
|
166
|
+
readingTimeMinutes: number;
|
|
167
|
+
wordCount: number;
|
|
168
|
+
};
|
|
169
|
+
type Article = {
|
|
170
|
+
slug: string;
|
|
171
|
+
locale: string;
|
|
172
|
+
frontmatter: Frontmatter;
|
|
173
|
+
html: string;
|
|
174
|
+
computed: ComputedFields;
|
|
175
|
+
};
|
|
176
|
+
type RehypePluginEntry = readonly [unknown, Record<string, unknown>?];
|
|
177
|
+
type RemarkPluginEntry = readonly [unknown, Record<string, unknown>?];
|
|
178
|
+
type ContentConfig = {
|
|
179
|
+
dir: string;
|
|
180
|
+
defaultAuthor?: string;
|
|
181
|
+
trustedContent: boolean;
|
|
182
|
+
rehypePlugins?: RehypePluginEntry[];
|
|
183
|
+
remarkPlugins?: RemarkPluginEntry[];
|
|
184
|
+
};
|
|
185
|
+
type ContentState = {
|
|
186
|
+
processor: Processor | null;
|
|
187
|
+
articles: Map<string, Map<string, Article>>;
|
|
188
|
+
slugs: string[] | null;
|
|
189
|
+
lastPaths: Set<string>; /** Paths marked stale by `invalidate()` — re-read on next `loadAll()` then cleared. */
|
|
190
|
+
dirtyPaths: Set<string>;
|
|
191
|
+
};
|
|
192
|
+
type ContentApi = {
|
|
193
|
+
loadAll(): Promise<Map<string, Article[]>>;
|
|
194
|
+
load(slug: string, locale: string): Promise<Article | null>;
|
|
195
|
+
discoverSlugs(): Promise<string[]>;
|
|
196
|
+
render(markdown: string): Promise<string>;
|
|
197
|
+
invalidate(paths: string[]): void;
|
|
198
|
+
reset(): void;
|
|
199
|
+
};
|
|
200
|
+
//#endregion
|
|
153
201
|
//#region src/plugins/router/types.d.ts
|
|
154
202
|
/** @file router plugin types — RouteSpec (non-accumulating), RouteBuilder, RouterApi. */
|
|
155
203
|
/** Render context passed to route handlers. */
|
|
@@ -222,54 +270,6 @@ type RouterApi<Routes extends Record<string, RouteSpec> = Record<string, RouteSp
|
|
|
222
270
|
entries(): ReadonlyArray<RouteEntry>;
|
|
223
271
|
};
|
|
224
272
|
//#endregion
|
|
225
|
-
//#region src/plugins/content/types.d.ts
|
|
226
|
-
type Frontmatter = {
|
|
227
|
-
title: string;
|
|
228
|
-
date: string;
|
|
229
|
-
description: string;
|
|
230
|
-
tags: string[];
|
|
231
|
-
language: string;
|
|
232
|
-
author?: string;
|
|
233
|
-
draft?: boolean;
|
|
234
|
-
[key: string]: unknown;
|
|
235
|
-
};
|
|
236
|
-
type ComputedFields = {
|
|
237
|
-
contentId: string;
|
|
238
|
-
readingTimeMinutes: number;
|
|
239
|
-
wordCount: number;
|
|
240
|
-
};
|
|
241
|
-
type Article = {
|
|
242
|
-
slug: string;
|
|
243
|
-
locale: string;
|
|
244
|
-
frontmatter: Frontmatter;
|
|
245
|
-
html: string;
|
|
246
|
-
computed: ComputedFields;
|
|
247
|
-
};
|
|
248
|
-
type RehypePluginEntry = readonly [unknown, Record<string, unknown>?];
|
|
249
|
-
type RemarkPluginEntry = readonly [unknown, Record<string, unknown>?];
|
|
250
|
-
type ContentConfig = {
|
|
251
|
-
dir: string;
|
|
252
|
-
defaultAuthor?: string;
|
|
253
|
-
trustedContent: boolean;
|
|
254
|
-
rehypePlugins?: RehypePluginEntry[];
|
|
255
|
-
remarkPlugins?: RemarkPluginEntry[];
|
|
256
|
-
};
|
|
257
|
-
type ContentState = {
|
|
258
|
-
processor: Processor | null;
|
|
259
|
-
articles: Map<string, Map<string, Article>>;
|
|
260
|
-
slugs: string[] | null;
|
|
261
|
-
lastPaths: Set<string>; /** Paths marked stale by `invalidate()` — re-read on next `loadAll()` then cleared. */
|
|
262
|
-
dirtyPaths: Set<string>;
|
|
263
|
-
};
|
|
264
|
-
type ContentApi = {
|
|
265
|
-
loadAll(): Promise<Map<string, Article[]>>;
|
|
266
|
-
load(slug: string, locale: string): Promise<Article | null>;
|
|
267
|
-
discoverSlugs(): Promise<string[]>;
|
|
268
|
-
render(markdown: string): Promise<string>;
|
|
269
|
-
invalidate(paths: string[]): void;
|
|
270
|
-
reset(): void;
|
|
271
|
-
};
|
|
272
|
-
//#endregion
|
|
273
273
|
//#region src/plugins/build/types.d.ts
|
|
274
274
|
type BuildConfig = {
|
|
275
275
|
outdir: string;
|
|
@@ -299,6 +299,70 @@ type BuildApi = {
|
|
|
299
299
|
getManifest(): Readonly<BundleManifest> | null;
|
|
300
300
|
};
|
|
301
301
|
//#endregion
|
|
302
|
+
//#region src/plugins/deploy/types.d.ts
|
|
303
|
+
/** @file deploy plugin types — DeployConfig, DeployState, DeployResult, RunOptions, DeployApi. */
|
|
304
|
+
/**
|
|
305
|
+
* Deployment target. Phase 1 ships `'pages'` only; `'workers'` is reserved
|
|
306
|
+
* for the Workers Static Assets expansion path and `buildWranglerArgs`
|
|
307
|
+
* throws "not implemented in Phase 1" if invoked with it.
|
|
308
|
+
*/
|
|
309
|
+
type DeployTarget = 'pages' | 'workers';
|
|
310
|
+
/**
|
|
311
|
+
* deploy plugin config.
|
|
312
|
+
*
|
|
313
|
+
* `outdir` precedence at deploy time: `wrangler.jsonc#pages_build_output_dir`
|
|
314
|
+
* (written by `moku deploy init`) — this is the deploy-time single source of
|
|
315
|
+
* truth, NOT `DeployConfig.outdir`. The config field is the *init-time* default;
|
|
316
|
+
* once `wrangler.jsonc` exists, it owns the value.
|
|
317
|
+
*
|
|
318
|
+
* Forbidden: reading the `build` plugin's config via `ctx.has(build)` /
|
|
319
|
+
* `ctx.require(build).config.outdir`. The core `HasFunction` takes a name
|
|
320
|
+
* string and returns a non-narrowing boolean; `RequireFunction` returns the
|
|
321
|
+
* API surface only (`BuildApi = { run, getManifest }`). The optional coupling
|
|
322
|
+
* is a `ctx.log.warn` at init time when divergence is detectable through the
|
|
323
|
+
* directly-imported `build` plugin instance, never via the core API.
|
|
324
|
+
*/
|
|
325
|
+
type DeployConfig = {
|
|
326
|
+
/** Deployment target. Default: `'pages'`. */target: DeployTarget; /** Build output directory used at init only. Default: `'dist'` (matches build plugin default). */
|
|
327
|
+
outdir: string; /** Production branch name. Default: `'main'`. Overwritten by `init` via `git symbolic-ref`. */
|
|
328
|
+
productionBranch: string; /** Optional explicit override for the Cloudflare Pages project name. Default: derived from `site.name`. */
|
|
329
|
+
projectName?: string;
|
|
330
|
+
};
|
|
331
|
+
/**
|
|
332
|
+
* In-memory deploy plugin state.
|
|
333
|
+
*
|
|
334
|
+
* `lastDeployment` is reset per `createApp()` call and captures the most
|
|
335
|
+
* recent deploy's metadata (URL, deployment ID, branch, duration). Used by
|
|
336
|
+
* the future REST-API-based rollback command (deferred from Phase 1).
|
|
337
|
+
*/
|
|
338
|
+
type DeployState = {
|
|
339
|
+
lastDeployment: DeployResult | null;
|
|
340
|
+
};
|
|
341
|
+
/** Result of a successful `app.deploy.run()` invocation. */
|
|
342
|
+
type DeployResult = {
|
|
343
|
+
/** Production URL (e.g., `https://<project>.pages.dev`) or branch-alias preview URL. */url: string; /** Cloudflare deployment ID — captured for future rollback support. */
|
|
344
|
+
deploymentId: string; /** Branch the deploy was published to. */
|
|
345
|
+
branch: string; /** Total subprocess duration in milliseconds (init + upload + finalize). */
|
|
346
|
+
durationMs: number;
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* Options accepted by `app.deploy.run()`.
|
|
350
|
+
*
|
|
351
|
+
* `branch` overrides the production branch from wrangler.jsonc (defaults to
|
|
352
|
+
* `DeployConfig.productionBranch`). `build` runs `app.build.run()` first
|
|
353
|
+
* when true — used only for local convenience; the generated CI workflow
|
|
354
|
+
* always issues the two-step `moku build` then `moku deploy` pattern.
|
|
355
|
+
*/
|
|
356
|
+
type RunOptions = {
|
|
357
|
+
/** Override the production branch for this deploy. */branch?: string; /** Run `app.build.run()` first (local convenience). Default: `false`. */
|
|
358
|
+
build?: boolean;
|
|
359
|
+
};
|
|
360
|
+
/** Public deploy plugin API surface, attached as `app.deploy`. */
|
|
361
|
+
type DeployApi = {
|
|
362
|
+
/** Run a deploy. Reads outdir from wrangler.jsonc; errors if missing. */run(options?: RunOptions): Promise<DeployResult>; /** Read the last deployment result without re-running. */
|
|
363
|
+
getLastDeployment(): Readonly<DeployResult> | null;
|
|
364
|
+
};
|
|
365
|
+
//#endregion
|
|
302
366
|
//#region src/project.d.ts
|
|
303
367
|
/**
|
|
304
368
|
* Map each consumer `RouteBuilder` to the `RouteSpec` shape the router stores.
|
|
@@ -346,4 +410,4 @@ type WebAppConfig<Routes extends Record<string, RouteBuilder>> = {
|
|
|
346
410
|
*/
|
|
347
411
|
declare function route(pattern: string): RouteBuilder;
|
|
348
412
|
//#endregion
|
|
349
|
-
export {
|
|
413
|
+
export { EnvVarSpec as A, SiteState as C, EnvConfig as D, EnvApi as E, LogState as M, EnvProvider as O, SiteApi as S, Events as T, ContentConfig as _, DeployConfig as a, I18nConfig as b, BuildConfig as c, RouteSpec as d, RouterApi as f, ContentApi as g, Article as h, DeployApi as i, LogApi as j, EnvState as k, BuildState as l, RouterState as m, RouteSpecMap as n, DeployState as o, RouterConfig as p, WebAppConfig as r, BuildApi as s, route as t, RouteBuilder as u, ContentState as v, Config as w, I18nState as x, I18nApi as y };
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_project = require('./project-
|
|
3
|
-
const require_factory = require('./factory-
|
|
2
|
+
const require_project = require('./project-1pAh4RxJ.cjs');
|
|
3
|
+
const require_factory = require('./factory-DVcAQYEZ.cjs');
|
|
4
4
|
const require_primitives = require('./primitives-BYUp6kae.cjs');
|
|
5
5
|
const require_plugins_spa_index = require('./plugins/spa/index.cjs');
|
|
6
6
|
|
|
@@ -13,7 +13,8 @@ const { createApp: kernelCreateApp } = require_factory.createCore(require_factor
|
|
|
13
13
|
require_factory.router,
|
|
14
14
|
require_factory.head,
|
|
15
15
|
require_project.build,
|
|
16
|
-
require_plugins_spa_index.spa
|
|
16
|
+
require_plugins_spa_index.spa,
|
|
17
|
+
require_project.deploy
|
|
17
18
|
] });
|
|
18
19
|
/**
|
|
19
20
|
* Layer-2 createApp wrapper — generic-preserving signature.
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { C as SiteState, E as EnvApi, M as LogState, S as SiteApi, T as Events, _ as ContentConfig, a as DeployConfig, b as I18nConfig, c as BuildConfig, d as RouteSpec, f as RouterApi, g as ContentApi, h as Article, i as DeployApi, j as LogApi, k as EnvState, l as BuildState, m as RouterState, n as RouteSpecMap, o as DeployState, p as RouterConfig, r as WebAppConfig, s as BuildApi, t as route, u as RouteBuilder, v as ContentState, w as Config, x as I18nState, y as I18nApi } from "./route-builder-CKvvehVO.cjs";
|
|
2
2
|
import { a as meta, d as HeadPluginConfig, f as HeadState, i as jsonLd, l as HeadApi, n as feedLink, o as og, r as hreflang, s as twitter, t as canonical } from "./primitives-BBo4wxUL.cjs";
|
|
3
3
|
import { a as SpaConfig, i as SpaApi, n as ComponentDef, o as SpaState, r as ComponentHooks, t as createComponent } from "./factory-D0m7Xil2.cjs";
|
|
4
4
|
import * as _moku_labs_core0 from "@moku-labs/core";
|
|
@@ -9,11 +9,26 @@ declare const kernelCreateApp: <const ExtraPlugins extends readonly _moku_labs_c
|
|
|
9
9
|
url: string;
|
|
10
10
|
author: string;
|
|
11
11
|
description: string;
|
|
12
|
-
}, SiteState, SiteApi, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"i18n", I18nConfig, I18nState<readonly string[]>, I18nApi<readonly string[]>, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"
|
|
12
|
+
}, SiteState, SiteApi, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"i18n", I18nConfig, I18nState<readonly string[]>, I18nApi<readonly string[]>, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"content", ContentConfig, ContentState, ContentApi, {
|
|
13
|
+
'content:ready': {
|
|
14
|
+
articles: Map<string, Article[]>;
|
|
15
|
+
};
|
|
16
|
+
'content:invalidated': {
|
|
17
|
+
paths: string[];
|
|
18
|
+
};
|
|
19
|
+
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"router", RouterConfig, RouterState, RouterApi, {
|
|
13
20
|
'router:registered': {
|
|
14
21
|
routeCount: number;
|
|
15
22
|
};
|
|
16
|
-
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"head", HeadPluginConfig, HeadState, HeadApi, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"
|
|
23
|
+
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"head", HeadPluginConfig, HeadState, HeadApi, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"build", BuildConfig, BuildState, BuildApi, {
|
|
24
|
+
'build:phase': {
|
|
25
|
+
phase: "bundle" | "content" | "pages" | "feeds" | "sitemap" | "og" | "images";
|
|
26
|
+
};
|
|
27
|
+
'build:complete': {
|
|
28
|
+
pages: number;
|
|
29
|
+
durationMs: number;
|
|
30
|
+
};
|
|
31
|
+
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"spa", SpaConfig, SpaState, SpaApi, {
|
|
17
32
|
'component:create': {
|
|
18
33
|
name: string;
|
|
19
34
|
element: Element;
|
|
@@ -36,22 +51,7 @@ declare const kernelCreateApp: <const ExtraPlugins extends readonly _moku_labs_c
|
|
|
36
51
|
'nav:end': {
|
|
37
52
|
url: string;
|
|
38
53
|
};
|
|
39
|
-
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"
|
|
40
|
-
'content:ready': {
|
|
41
|
-
articles: Map<string, Article[]>;
|
|
42
|
-
};
|
|
43
|
-
'content:invalidated': {
|
|
44
|
-
paths: string[];
|
|
45
|
-
};
|
|
46
|
-
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"build", BuildConfig, BuildState, BuildApi, {
|
|
47
|
-
'build:phase': {
|
|
48
|
-
phase: "bundle" | "content" | "pages" | "feeds" | "sitemap" | "og" | "images";
|
|
49
|
-
};
|
|
50
|
-
'build:complete': {
|
|
51
|
-
pages: number;
|
|
52
|
-
durationMs: number;
|
|
53
|
-
};
|
|
54
|
-
}> & Record<never, never>) | ExtraPlugins[number], [...ExtraPlugins], _moku_labs_core0.CoreApisFromTuple<[_moku_labs_core0.CorePluginInstance<"log", {
|
|
54
|
+
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"deploy", DeployConfig, DeployState, DeployApi, {}> & Record<never, never>) | ExtraPlugins[number], [...ExtraPlugins], _moku_labs_core0.CoreApisFromTuple<[_moku_labs_core0.CorePluginInstance<"log", {
|
|
55
55
|
level: "info";
|
|
56
56
|
mode: "auto";
|
|
57
57
|
}, LogState, LogApi>, _moku_labs_core0.CorePluginInstance<"env", {
|
|
@@ -63,11 +63,26 @@ declare const kernelCreateApp: <const ExtraPlugins extends readonly _moku_labs_c
|
|
|
63
63
|
url: string;
|
|
64
64
|
author: string;
|
|
65
65
|
description: string;
|
|
66
|
-
}, SiteState, SiteApi, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"i18n", I18nConfig, I18nState<readonly string[]>, I18nApi<readonly string[]>, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"
|
|
66
|
+
}, SiteState, SiteApi, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"i18n", I18nConfig, I18nState<readonly string[]>, I18nApi<readonly string[]>, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"content", ContentConfig, ContentState, ContentApi, {
|
|
67
|
+
'content:ready': {
|
|
68
|
+
articles: Map<string, Article[]>;
|
|
69
|
+
};
|
|
70
|
+
'content:invalidated': {
|
|
71
|
+
paths: string[];
|
|
72
|
+
};
|
|
73
|
+
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"router", RouterConfig, RouterState, RouterApi, {
|
|
67
74
|
'router:registered': {
|
|
68
75
|
routeCount: number;
|
|
69
76
|
};
|
|
70
|
-
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"head", HeadPluginConfig, HeadState, HeadApi, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"
|
|
77
|
+
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"head", HeadPluginConfig, HeadState, HeadApi, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"build", BuildConfig, BuildState, BuildApi, {
|
|
78
|
+
'build:phase': {
|
|
79
|
+
phase: "bundle" | "content" | "pages" | "feeds" | "sitemap" | "og" | "images";
|
|
80
|
+
};
|
|
81
|
+
'build:complete': {
|
|
82
|
+
pages: number;
|
|
83
|
+
durationMs: number;
|
|
84
|
+
};
|
|
85
|
+
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"spa", SpaConfig, SpaState, SpaApi, {
|
|
71
86
|
'component:create': {
|
|
72
87
|
name: string;
|
|
73
88
|
element: Element;
|
|
@@ -90,22 +105,7 @@ declare const kernelCreateApp: <const ExtraPlugins extends readonly _moku_labs_c
|
|
|
90
105
|
'nav:end': {
|
|
91
106
|
url: string;
|
|
92
107
|
};
|
|
93
|
-
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"
|
|
94
|
-
'content:ready': {
|
|
95
|
-
articles: Map<string, Article[]>;
|
|
96
|
-
};
|
|
97
|
-
'content:invalidated': {
|
|
98
|
-
paths: string[];
|
|
99
|
-
};
|
|
100
|
-
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"build", BuildConfig, BuildState, BuildApi, {
|
|
101
|
-
'build:phase': {
|
|
102
|
-
phase: "bundle" | "content" | "pages" | "feeds" | "sitemap" | "og" | "images";
|
|
103
|
-
};
|
|
104
|
-
'build:complete': {
|
|
105
|
-
pages: number;
|
|
106
|
-
durationMs: number;
|
|
107
|
-
};
|
|
108
|
-
}> & Record<never, never>) | ExtraPlugins[number], _moku_labs_core0.CoreApisFromTuple<[_moku_labs_core0.CorePluginInstance<"log", {
|
|
108
|
+
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"deploy", DeployConfig, DeployState, DeployApi, {}> & Record<never, never>) | ExtraPlugins[number], _moku_labs_core0.CoreApisFromTuple<[_moku_labs_core0.CorePluginInstance<"log", {
|
|
109
109
|
level: "info";
|
|
110
110
|
mode: "auto";
|
|
111
111
|
}, LogState, LogApi>, _moku_labs_core0.CorePluginInstance<"env", {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { a as meta, d as HeadPluginConfig, f as HeadState, i as jsonLd, l as HeadApi, n as feedLink, o as og, r as hreflang, s as twitter, t as canonical } from "./primitives-
|
|
3
|
-
import { a as SpaConfig, i as SpaApi, n as ComponentDef, o as SpaState, r as ComponentHooks, t as createComponent } from "./factory-
|
|
1
|
+
import { C as SiteState, E as EnvApi, M as LogState, S as SiteApi, T as Events, _ as ContentConfig, a as DeployConfig, b as I18nConfig, c as BuildConfig, d as RouteSpec, f as RouterApi, g as ContentApi, h as Article, i as DeployApi, j as LogApi, k as EnvState, l as BuildState, m as RouterState, n as RouteSpecMap, o as DeployState, p as RouterConfig, r as WebAppConfig, s as BuildApi, t as route, u as RouteBuilder, v as ContentState, w as Config, x as I18nState, y as I18nApi } from "./index-CddOHo8I.mjs";
|
|
2
|
+
import { a as meta, d as HeadPluginConfig, f as HeadState, i as jsonLd, l as HeadApi, n as feedLink, o as og, r as hreflang, s as twitter, t as canonical } from "./primitives-Dlfi3JTx.mjs";
|
|
3
|
+
import { a as SpaConfig, i as SpaApi, n as ComponentDef, o as SpaState, r as ComponentHooks, t as createComponent } from "./factory-BHhulW27.mjs";
|
|
4
4
|
import * as _moku_labs_core0 from "@moku-labs/core";
|
|
5
5
|
|
|
6
6
|
//#region src/index.d.ts
|
|
@@ -9,11 +9,26 @@ declare const kernelCreateApp: <const ExtraPlugins extends readonly _moku_labs_c
|
|
|
9
9
|
url: string;
|
|
10
10
|
author: string;
|
|
11
11
|
description: string;
|
|
12
|
-
}, SiteState, SiteApi, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"i18n", I18nConfig, I18nState<readonly string[]>, I18nApi<readonly string[]>, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"
|
|
12
|
+
}, SiteState, SiteApi, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"i18n", I18nConfig, I18nState<readonly string[]>, I18nApi<readonly string[]>, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"content", ContentConfig, ContentState, ContentApi, {
|
|
13
|
+
'content:ready': {
|
|
14
|
+
articles: Map<string, Article[]>;
|
|
15
|
+
};
|
|
16
|
+
'content:invalidated': {
|
|
17
|
+
paths: string[];
|
|
18
|
+
};
|
|
19
|
+
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"router", RouterConfig, RouterState, RouterApi, {
|
|
13
20
|
'router:registered': {
|
|
14
21
|
routeCount: number;
|
|
15
22
|
};
|
|
16
|
-
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"head", HeadPluginConfig, HeadState, HeadApi, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"
|
|
23
|
+
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"head", HeadPluginConfig, HeadState, HeadApi, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"build", BuildConfig, BuildState, BuildApi, {
|
|
24
|
+
'build:phase': {
|
|
25
|
+
phase: "bundle" | "content" | "pages" | "feeds" | "sitemap" | "og" | "images";
|
|
26
|
+
};
|
|
27
|
+
'build:complete': {
|
|
28
|
+
pages: number;
|
|
29
|
+
durationMs: number;
|
|
30
|
+
};
|
|
31
|
+
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"spa", SpaConfig, SpaState, SpaApi, {
|
|
17
32
|
'component:create': {
|
|
18
33
|
name: string;
|
|
19
34
|
element: Element;
|
|
@@ -36,22 +51,7 @@ declare const kernelCreateApp: <const ExtraPlugins extends readonly _moku_labs_c
|
|
|
36
51
|
'nav:end': {
|
|
37
52
|
url: string;
|
|
38
53
|
};
|
|
39
|
-
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"
|
|
40
|
-
'content:ready': {
|
|
41
|
-
articles: Map<string, Article[]>;
|
|
42
|
-
};
|
|
43
|
-
'content:invalidated': {
|
|
44
|
-
paths: string[];
|
|
45
|
-
};
|
|
46
|
-
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"build", BuildConfig, BuildState, BuildApi, {
|
|
47
|
-
'build:phase': {
|
|
48
|
-
phase: "bundle" | "content" | "pages" | "feeds" | "sitemap" | "og" | "images";
|
|
49
|
-
};
|
|
50
|
-
'build:complete': {
|
|
51
|
-
pages: number;
|
|
52
|
-
durationMs: number;
|
|
53
|
-
};
|
|
54
|
-
}> & Record<never, never>) | ExtraPlugins[number], [...ExtraPlugins], _moku_labs_core0.CoreApisFromTuple<[_moku_labs_core0.CorePluginInstance<"log", {
|
|
54
|
+
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"deploy", DeployConfig, DeployState, DeployApi, {}> & Record<never, never>) | ExtraPlugins[number], [...ExtraPlugins], _moku_labs_core0.CoreApisFromTuple<[_moku_labs_core0.CorePluginInstance<"log", {
|
|
55
55
|
level: "info";
|
|
56
56
|
mode: "auto";
|
|
57
57
|
}, LogState, LogApi>, _moku_labs_core0.CorePluginInstance<"env", {
|
|
@@ -63,11 +63,26 @@ declare const kernelCreateApp: <const ExtraPlugins extends readonly _moku_labs_c
|
|
|
63
63
|
url: string;
|
|
64
64
|
author: string;
|
|
65
65
|
description: string;
|
|
66
|
-
}, SiteState, SiteApi, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"i18n", I18nConfig, I18nState<readonly string[]>, I18nApi<readonly string[]>, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"
|
|
66
|
+
}, SiteState, SiteApi, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"i18n", I18nConfig, I18nState<readonly string[]>, I18nApi<readonly string[]>, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"content", ContentConfig, ContentState, ContentApi, {
|
|
67
|
+
'content:ready': {
|
|
68
|
+
articles: Map<string, Article[]>;
|
|
69
|
+
};
|
|
70
|
+
'content:invalidated': {
|
|
71
|
+
paths: string[];
|
|
72
|
+
};
|
|
73
|
+
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"router", RouterConfig, RouterState, RouterApi, {
|
|
67
74
|
'router:registered': {
|
|
68
75
|
routeCount: number;
|
|
69
76
|
};
|
|
70
|
-
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"head", HeadPluginConfig, HeadState, HeadApi, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"
|
|
77
|
+
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"head", HeadPluginConfig, HeadState, HeadApi, {}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"build", BuildConfig, BuildState, BuildApi, {
|
|
78
|
+
'build:phase': {
|
|
79
|
+
phase: "bundle" | "content" | "pages" | "feeds" | "sitemap" | "og" | "images";
|
|
80
|
+
};
|
|
81
|
+
'build:complete': {
|
|
82
|
+
pages: number;
|
|
83
|
+
durationMs: number;
|
|
84
|
+
};
|
|
85
|
+
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"spa", SpaConfig, SpaState, SpaApi, {
|
|
71
86
|
'component:create': {
|
|
72
87
|
name: string;
|
|
73
88
|
element: Element;
|
|
@@ -90,22 +105,7 @@ declare const kernelCreateApp: <const ExtraPlugins extends readonly _moku_labs_c
|
|
|
90
105
|
'nav:end': {
|
|
91
106
|
url: string;
|
|
92
107
|
};
|
|
93
|
-
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"
|
|
94
|
-
'content:ready': {
|
|
95
|
-
articles: Map<string, Article[]>;
|
|
96
|
-
};
|
|
97
|
-
'content:invalidated': {
|
|
98
|
-
paths: string[];
|
|
99
|
-
};
|
|
100
|
-
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"build", BuildConfig, BuildState, BuildApi, {
|
|
101
|
-
'build:phase': {
|
|
102
|
-
phase: "bundle" | "content" | "pages" | "feeds" | "sitemap" | "og" | "images";
|
|
103
|
-
};
|
|
104
|
-
'build:complete': {
|
|
105
|
-
pages: number;
|
|
106
|
-
durationMs: number;
|
|
107
|
-
};
|
|
108
|
-
}> & Record<never, never>) | ExtraPlugins[number], _moku_labs_core0.CoreApisFromTuple<[_moku_labs_core0.CorePluginInstance<"log", {
|
|
108
|
+
}> & Record<never, never>) | (_moku_labs_core0.PluginInstance<"deploy", DeployConfig, DeployState, DeployApi, {}> & Record<never, never>) | ExtraPlugins[number], _moku_labs_core0.CoreApisFromTuple<[_moku_labs_core0.CorePluginInstance<"log", {
|
|
109
109
|
level: "info";
|
|
110
110
|
mode: "auto";
|
|
111
111
|
}, LogState, LogApi>, _moku_labs_core0.CorePluginInstance<"env", {
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as route, d as coreConfig, f as createCore, l as site, o as head, s as router, t as createComponent, u as i18n } from "./factory-DwpBwjDk.mjs";
|
|
2
|
-
import { n as
|
|
2
|
+
import { i as content, n as deploy, r as build, t as project } from "./project-BaG_ipVz.mjs";
|
|
3
3
|
import { a as meta, i as jsonLd, n as feedLink, o as og, r as hreflang, s as twitter, t as canonical } from "./primitives-gO5i1tD8.mjs";
|
|
4
4
|
import { spa } from "./plugins/spa/index.mjs";
|
|
5
5
|
|
|
@@ -12,7 +12,8 @@ const { createApp: kernelCreateApp } = createCore(coreConfig, { plugins: [
|
|
|
12
12
|
router,
|
|
13
13
|
head,
|
|
14
14
|
build,
|
|
15
|
-
spa
|
|
15
|
+
spa,
|
|
16
|
+
deploy
|
|
16
17
|
] });
|
|
17
18
|
/**
|
|
18
19
|
* Layer-2 createApp wrapper — generic-preserving signature.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as meta, c as ArticleMeta, i as jsonLd, n as feedLink, o as og, r as hreflang, s as twitter, t as canonical, u as HeadElement } from "../../primitives-
|
|
1
|
+
import { a as meta, c as ArticleMeta, i as jsonLd, n as feedLink, o as og, r as hreflang, s as twitter, t as canonical, u as HeadElement } from "../../primitives-Dlfi3JTx.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/head/build.d.ts
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_factory = require('../../factory-
|
|
2
|
+
const require_factory = require('../../factory-DVcAQYEZ.cjs');
|
|
3
3
|
|
|
4
4
|
//#region src/plugins/spa/index.ts
|
|
5
5
|
/** @file spa plugin: Very Complex tier — router + head + progress + components sub-modules. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as SpaConfig, i as SpaApi, o as SpaState, t as createComponent } from "../../factory-
|
|
1
|
+
import { a as SpaConfig, i as SpaApi, o as SpaState, t as createComponent } from "../../factory-BHhulW27.mjs";
|
|
2
2
|
import * as _moku_labs_core0 from "@moku-labs/core";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins/spa/index.d.ts
|