@markless/bundler 0.8.0 → 0.10.0
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/build-worker.d.ts +1 -0
- package/dist/build-worker.js +59 -0
- package/dist/chunk-ast-C8zKZiam.js +1 -0
- package/dist/chunk-ast-pN_P5wIo.js +204 -0
- package/dist/chunk-tasks-BexSGNjx.js +1 -0
- package/dist/compile-store-DxF9Vj4_.js +187 -0
- package/dist/{execution-log-BL-7a77M.d.ts → execution-log-7HH5XDfA.d.ts} +2 -2
- package/dist/lazy-module-facades-qZajWDD8.js +2691 -0
- package/dist/planned-landing-BHy22Yf5.js +2291 -0
- package/dist/preload.d.ts +2 -2
- package/dist/preload.js +2 -2
- package/dist/{rolldown-BMQrr9-Y.js → rolldown-DS8OY1i9.js} +801 -4406
- package/dist/rolldown.d.ts +3 -3
- package/dist/rolldown.js +3 -2
- package/dist/{roster-resume-CpphsFl_.js → roster-resume-DXptD6DG.js} +2 -1
- package/dist/{route-pack-groups-BLS6xeVV.js → route-pack-groups-ByQmKKom.js} +892 -1004
- package/dist/{types-iOUoceJ-.d.ts → types-B8YqEscg.d.ts} +55 -2
- package/dist/vite.d.ts +6 -1
- package/dist/vite.js +798 -26
- package/package.json +6 -5
- package/dist/optimized-deps-BfzxSm6C.js +0 -89
|
@@ -1,4 +1,48 @@
|
|
|
1
|
-
import { ArtifactChildMaterialization, ModuleGraphInterfaceArtifact, SemanticGraphArtifact, SemanticGraphInput } from "@markless/compiler";
|
|
1
|
+
import { ArtifactChildMaterialization, CompilerDiagnostic, ModuleGraphInterfaceArtifact, SemanticGraphArtifact, SemanticGraphInput } from "@markless/compiler";
|
|
2
|
+
import { Plugin } from "rolldown";
|
|
3
|
+
//#region src/prop-flow.d.ts
|
|
4
|
+
type PassedProp = {
|
|
5
|
+
readonly kind: 'fixed';
|
|
6
|
+
} | {
|
|
7
|
+
readonly kind: 'changing';
|
|
8
|
+
readonly source: string;
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: 'forwarded';
|
|
11
|
+
readonly props: ReadonlyArray<string>;
|
|
12
|
+
readonly source: string;
|
|
13
|
+
} | {
|
|
14
|
+
readonly kind: 'unknown';
|
|
15
|
+
readonly source: string;
|
|
16
|
+
};
|
|
17
|
+
type ModulePropFlow = {
|
|
18
|
+
readonly components: ReadonlyArray<{
|
|
19
|
+
readonly name: string;
|
|
20
|
+
readonly exportName?: string;
|
|
21
|
+
}>;
|
|
22
|
+
readonly decided: ReadonlyArray<{
|
|
23
|
+
readonly code: string;
|
|
24
|
+
readonly componentName: string;
|
|
25
|
+
readonly props: ReadonlyArray<string>;
|
|
26
|
+
readonly message: string;
|
|
27
|
+
}>;
|
|
28
|
+
readonly edges: ReadonlyArray<{
|
|
29
|
+
readonly id: string;
|
|
30
|
+
readonly parentComponentName: string;
|
|
31
|
+
readonly childComponentName: string;
|
|
32
|
+
readonly importSource?: string;
|
|
33
|
+
readonly importedName?: string;
|
|
34
|
+
readonly props: Readonly<Record<string, PassedProp>>;
|
|
35
|
+
readonly spread?: PassedProp;
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/build/native-packing.d.ts
|
|
40
|
+
/** The pack each module was planned into, and the routes a shared pack serves. */
|
|
41
|
+
type PackOwnership = {
|
|
42
|
+
readonly packOf: (moduleId: string) => string | undefined;
|
|
43
|
+
readonly packRoutes: (pack: string) => ReadonlyArray<string> | undefined;
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
2
46
|
//#region src/types.d.ts
|
|
3
47
|
type MarklessEnvironment = 'client' | 'server' | 'lib';
|
|
4
48
|
type MarklessClientOutput = 'full' | 'symbols-only';
|
|
@@ -27,7 +71,7 @@ interface MarklessRolldownOptions {
|
|
|
27
71
|
rootDir?: string;
|
|
28
72
|
buildId?: string;
|
|
29
73
|
}
|
|
30
|
-
type MarklessVirtualModuleType = 'payload' | 'prerender-wake' | 'render-data' | 'render-data-
|
|
74
|
+
type MarklessVirtualModuleType = 'payload' | 'prerender-wake' | 'render-data' | 'render-data-served' | 'render-data-entry' | 'resolver' | 'resume' | 'settle' | 'symbol' | 'symbol-bundle' | 'trigger-group' | 'style';
|
|
31
75
|
type BuiltPrerenderRecords = {
|
|
32
76
|
readonly state: import('@markless/serializer').ProtocolStatePayload;
|
|
33
77
|
readonly view: import('@markless/serializer').ProtocolViewPayload;
|
|
@@ -57,6 +101,8 @@ interface TransformTsrxModuleInput {
|
|
|
57
101
|
serverOnlyProps?: SemanticGraphInput['serverOnlyProps'];
|
|
58
102
|
routeRoot?: SemanticGraphInput['routeRoot'];
|
|
59
103
|
renderDataImportSources?: Readonly<Record<string, string>>;
|
|
104
|
+
/** Pages are rendered on the server, so a browser-side render loads full render data only when it runs. */
|
|
105
|
+
serverRenderedPages?: boolean;
|
|
60
106
|
artifactChildMaterializations?: Readonly<Record<string, ArtifactChildMaterialization>>;
|
|
61
107
|
symbols?: import('@markless/compiler').SymbolResolverModuleInput['symbols'];
|
|
62
108
|
devResumeReexport?: boolean;
|
|
@@ -92,6 +138,7 @@ interface TransformTsrxModuleResult {
|
|
|
92
138
|
interfaceHash: string;
|
|
93
139
|
moduleImports: SemanticGraphArtifact['moduleImports'];
|
|
94
140
|
artifactChildren: ReadonlyArray<ArtifactChildCandidate>;
|
|
141
|
+
propFlow?: ModulePropFlow;
|
|
95
142
|
/** Imported constants a prop reads that this compile was not given. */
|
|
96
143
|
importedConstantRequests?: ReadonlyArray<{
|
|
97
144
|
readonly source: string;
|
|
@@ -129,6 +176,8 @@ interface MarklessTransformManifest {
|
|
|
129
176
|
resolver: MarklessBuildModuleReference;
|
|
130
177
|
symbols: MarklessSymbolManifestEntry[];
|
|
131
178
|
runtimeDemandMap?: RuntimeDemandMapManifest;
|
|
179
|
+
/** This client module mounts through the direct-DOM renderer, which never reaches render()'s other paths. */
|
|
180
|
+
directCsr?: boolean;
|
|
132
181
|
}
|
|
133
182
|
interface MarklessBuildModuleReference {
|
|
134
183
|
virtualModuleId: string;
|
|
@@ -189,12 +238,16 @@ type MarklessRolldownPluginApi = {
|
|
|
189
238
|
declareServerOnlyProps: (resolve: (moduleId: string) => SemanticGraphInput['serverOnlyProps']) => void;
|
|
190
239
|
/** A host plugin names, per root-relative module id, the modules it renders as pages. */
|
|
191
240
|
declareRouteModules: (isRoute: (moduleId: string) => boolean) => void;
|
|
241
|
+
/** The packing pass names the pack each module went into, so the import map can list only chunks several pages load. */
|
|
242
|
+
declarePackOwnership: (packs: PackOwnership) => void;
|
|
192
243
|
invalidateGeneratedModules: (parent: string, environment?: MarklessEnvironment, nextSource?: string) => string[] | Promise<string[]>;
|
|
193
244
|
runtimeDemandMaps: () => Iterable<RuntimeDemandMapManifest | undefined>;
|
|
194
245
|
runtimeDemandSources: () => Iterable<{
|
|
195
246
|
readonly source: string;
|
|
196
247
|
readonly map: RuntimeDemandMapManifest | undefined;
|
|
197
248
|
}>;
|
|
249
|
+
/** Whether every compiled module of this build mounts through the direct-DOM renderer. */
|
|
250
|
+
directCsrOnly: () => boolean;
|
|
198
251
|
};
|
|
199
252
|
//#endregion
|
|
200
253
|
export { TransformTsrxModuleInput as _, MarklessBundle as a, MarklessEnvironment as c, MarklessRolldownPluginApi as d, MarklessTransformManifest as f, PreloadGraphEntriesAdder as g, PreloadGraphEntries as h, MarklessBuildMetadata as i, MarklessManifest as l, PreloadGraphContext as m, GlobalInjections as n, MarklessBundleGraph as o, MarklessVirtualModule as p, MarklessAsset as r, MarklessDevServer as s, BundleGraphAdder as t, MarklessRolldownOptions as u, TransformTsrxModuleResult as v };
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { c as MarklessEnvironment, g as PreloadGraphEntriesAdder, h as PreloadGraphEntries, i as MarklessBuildMetadata, l as MarklessManifest, m as PreloadGraphContext, n as GlobalInjections, t as BundleGraphAdder, u as MarklessRolldownOptions } from "./types-
|
|
1
|
+
import { c as MarklessEnvironment, g as PreloadGraphEntriesAdder, h as PreloadGraphEntries, i as MarklessBuildMetadata, l as MarklessManifest, m as PreloadGraphContext, n as GlobalInjections, t as BundleGraphAdder, u as MarklessRolldownOptions } from "./types-B8YqEscg.js";
|
|
2
2
|
import { Plugin } from "vite";
|
|
3
3
|
//#region src/vite/index.d.ts
|
|
4
4
|
export interface MarklessViteOptions extends MarklessRolldownOptions {
|
|
5
5
|
clientEnvironment?: string;
|
|
6
6
|
debug?: boolean;
|
|
7
7
|
serverEnvironment?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Keep each module's compile result under Vite's `cacheDir` (`markless-compile/`), keyed by the module's
|
|
10
|
+
* source, its compile inputs and the compiler's own files, so the next build reuses it. Default `true`.
|
|
11
|
+
*/
|
|
12
|
+
compileCache?: boolean;
|
|
8
13
|
}
|
|
9
14
|
export declare function markless(options?: MarklessViteOptions): Plugin[];
|
|
10
15
|
export type MarklessVitePlugin = ReturnType<typeof markless>[number];
|