@markless/bundler 0.3.1 → 0.3.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/preload.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as planModulePreloadUrls, c as prerenderWakeVirtualModuleSourceFile, m as symbolVirtualModuleSourceFile, w as planModulePreloads } from "./source-module-
|
|
1
|
+
import { C as planModulePreloadUrls, c as prerenderWakeVirtualModuleSourceFile, m as symbolVirtualModuleSourceFile, w as planModulePreloads } from "./source-module-CZFm1uWH.js";
|
|
2
2
|
//#region src/build/module-preload-dom.ts
|
|
3
3
|
const PRIORITY_RANK = {
|
|
4
4
|
high: 2,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MarklessCompileError, createCompileErrorPayload } from "./dev-error.js";
|
|
2
|
-
import { S as requalifyExecutionLogModuleHook, _ as executionLogActivationInjection, a as encodedSymbolSource, b as injectExecutionLogModuleHook, d as scopedSymbolExportName, f as settleVirtualModuleId, g as MARKLESS_EXECUTION_LOG_MODULE_ID, h as EXECUTION_LOG_DISPATCH_MODULE_IDS, i as emitSourceModule, l as resumeVirtualModuleId, m as symbolVirtualModuleSourceFile, n as emitResumeModule, o as payloadModule, p as symbolVirtualModuleId, r as emitSettleModule, s as prerenderWakeVirtualModuleId, t as MARKLESS_VIRTUAL_PREFIX, u as rewriteSymbolModuleExport, v as executionLogVirtualModuleSource, w as planModulePreloads, x as normalizeExecutionLogMode, y as hasExecutionLogModuleHook } from "./source-module-
|
|
2
|
+
import { S as requalifyExecutionLogModuleHook, _ as executionLogActivationInjection, a as encodedSymbolSource, b as injectExecutionLogModuleHook, d as scopedSymbolExportName, f as settleVirtualModuleId, g as MARKLESS_EXECUTION_LOG_MODULE_ID, h as EXECUTION_LOG_DISPATCH_MODULE_IDS, i as emitSourceModule, l as resumeVirtualModuleId, m as symbolVirtualModuleSourceFile, n as emitResumeModule, o as payloadModule, p as symbolVirtualModuleId, r as emitSettleModule, s as prerenderWakeVirtualModuleId, t as MARKLESS_VIRTUAL_PREFIX, u as rewriteSymbolModuleExport, v as executionLogVirtualModuleSource, w as planModulePreloads, x as normalizeExecutionLogMode, y as hasExecutionLogModuleHook } from "./source-module-CZFm1uWH.js";
|
|
3
3
|
import { joinURL, parsePath, withLeadingSlash, withQuery, withoutLeadingSlash } from "ufo";
|
|
4
4
|
import { PROTOCOL_EVENT_ACTION_KIND, createStorageSeedMetadataFromGraphNodeId, protocolEventActionKind } from "@markless/serializer";
|
|
5
5
|
import { existsSync, statSync } from "node:fs";
|
|
@@ -1513,6 +1513,7 @@ async function transformTsrxModuleWithPrerenderWakeClosure(input, linkedChildHas
|
|
|
1513
1513
|
needsFullResume: prerenderClosureNeedsWake,
|
|
1514
1514
|
prerenderRecords: input.prerenderRecords,
|
|
1515
1515
|
directCsr: input.directCsr,
|
|
1516
|
+
hasComputedState: compiled.payloadScripts.state.computed.length > 0,
|
|
1516
1517
|
resumeModuleUrl: input.resumeModuleUrl,
|
|
1517
1518
|
prerenderWakeModuleUrl: input.prerenderWakeModuleUrl,
|
|
1518
1519
|
publicRenderModuleSource: compiled.publicRenderModule.moduleSource,
|
package/dist/rolldown.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { l as resumeVirtualModuleId, s as prerenderWakeVirtualModuleId, t as MARKLESS_VIRTUAL_PREFIX } from "./source-module-
|
|
2
|
-
import { a as createBuildMetadata, c as collectHeadLinkInjections, d as outputDefaults, f as convertManifestToBundleGraph, i as marklessServer, l as MARKLESS_BUILD_PREFIX, n as marklessClient, p as createPreloadGraphAdder, r as marklessLib, s as transformTsrxModule, t as createMarklessRolldownPlugin, u as MARKLESS_BUNDLE_GRAPH } from "./rolldown-
|
|
1
|
+
import { l as resumeVirtualModuleId, s as prerenderWakeVirtualModuleId, t as MARKLESS_VIRTUAL_PREFIX } from "./source-module-CZFm1uWH.js";
|
|
2
|
+
import { a as createBuildMetadata, c as collectHeadLinkInjections, d as outputDefaults, f as convertManifestToBundleGraph, i as marklessServer, l as MARKLESS_BUILD_PREFIX, n as marklessClient, p as createPreloadGraphAdder, r as marklessLib, s as transformTsrxModule, t as createMarklessRolldownPlugin, u as MARKLESS_BUNDLE_GRAPH } from "./rolldown-FRjFod14.js";
|
|
3
3
|
export { MARKLESS_BUILD_PREFIX, MARKLESS_BUNDLE_GRAPH, MARKLESS_VIRTUAL_PREFIX, collectHeadLinkInjections, convertManifestToBundleGraph, createBuildMetadata, createMarklessRolldownPlugin, createPreloadGraphAdder, marklessClient, marklessLib, marklessServer, outputDefaults, prerenderWakeVirtualModuleId, resumeVirtualModuleId, transformTsrxModule };
|
|
@@ -504,6 +504,7 @@ function emitSourceModule(input) {
|
|
|
504
504
|
return [
|
|
505
505
|
!input.publicSsrModuleSource && !input.publicRenderModuleSource || symbolsOnly || !input.renderDataId || input.environment === "client" && !input.publicRenderModuleSource && !input.prerenderRecords && !input.dev && !canonicalRenderData ? "" : canonicalRenderData ? `import { marklessPrerenderData } from '${input.renderDataId}';` : `import { marklessRenderData } from '${input.renderDataId}';`,
|
|
506
506
|
symbolsOnly ? "" : `import { state as payloadState, view as payloadView, runtimeDemandMap as payloadRuntimeDemandMap } from '${input.payloadId}';`,
|
|
507
|
+
input.environment === "client" && input.directCsr === true && input.hasComputedState === true ? ["import { installMarklessDerivedReconcile } from '@markless/web/fns/reconcile-plane';", "installMarklessDerivedReconcile();"].join("\n") : null,
|
|
507
508
|
"",
|
|
508
509
|
emitLoadSymbol(input),
|
|
509
510
|
input.behaviorSymbols?.length ? emitDirectSourceSymbolLoader(input.behaviorSymbols, "readMarklessBehaviorSourceSymbol").replace("function loadSymbol(", "function loadBehaviorSymbol(") : "",
|
|
@@ -540,6 +541,15 @@ function emitSourceModule(input) {
|
|
|
540
541
|
""
|
|
541
542
|
].filter((line) => line !== null).join("\n");
|
|
542
543
|
}
|
|
544
|
+
/**
|
|
545
|
+
* Whether this app's serialized state defines any computed node. Computed
|
|
546
|
+
* definitions are what `createRuntimeGraph` turns into derived graph nodes on
|
|
547
|
+
* resume, so they are exactly the apps derived reconciliation can act on.
|
|
548
|
+
*/
|
|
549
|
+
function payloadHasComputed(payloadState) {
|
|
550
|
+
const computed = payloadState?.computed;
|
|
551
|
+
return Array.isArray(computed) && computed.length > 0;
|
|
552
|
+
}
|
|
543
553
|
function emitResumeModule(input) {
|
|
544
554
|
const routeSymbols = input.symbolRoutes.length > 0;
|
|
545
555
|
const resumeSymbolLoader = routeSymbols ? "marklessSsrLoadSymbolRoute" : "loadSymbol";
|
|
@@ -553,6 +563,7 @@ function emitResumeModule(input) {
|
|
|
553
563
|
input.prerenderDataId && !stagedPrerender && resumeContainerEvent.includes("marklessPrerenderData") ? `import { marklessPrerenderData } from '${input.prerenderDataId}';` : null,
|
|
554
564
|
stagedPrerender && input.prerenderDataId ? `async function marklessLoadPrerenderData() { const module = await import('${input.prerenderDataId}'); return module.marklessPrerenderData; }` : null,
|
|
555
565
|
`import { runtimeDemandMap as payloadRuntimeDemandMap } from '${input.payloadId}';`,
|
|
566
|
+
payloadHasComputed(input.payloadState) ? ["import { installMarklessDerivedReconcile } from '@markless/web/fns/reconcile-plane';", "installMarklessDerivedReconcile();"].join("\n") : null,
|
|
556
567
|
scalarSpecializations.length > 0 ? [
|
|
557
568
|
"import { marklessDecodeScalarCell, marklessReadScalarCell, marklessScalarSpecializedError } from '@markless/web/fns/scalar-specialized';",
|
|
558
569
|
"import { marklessWriteScalar } from '@markless/web/fns/write-scalar';",
|
package/dist/vite.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MARKLESS_DEV_ERROR_CLEAR_EVENT, MARKLESS_DEV_ERROR_CLIENT_ID, MARKLESS_DEV_ERROR_EVENT, normalizeMarklessDevError, renderMarklessDevErrorDocument } from "./dev-error.js";
|
|
2
|
-
import { _ as executionLogActivationInjection } from "./source-module-
|
|
3
|
-
import { d as outputDefaults, o as preflightTsrxModuleDiagnostics, p as createPreloadGraphAdder, t as createMarklessRolldownPlugin } from "./rolldown-
|
|
2
|
+
import { _ as executionLogActivationInjection } from "./source-module-CZFm1uWH.js";
|
|
3
|
+
import { d as outputDefaults, o as preflightTsrxModuleDiagnostics, p as createPreloadGraphAdder, t as createMarklessRolldownPlugin } from "./rolldown-FRjFod14.js";
|
|
4
4
|
import { joinURL, parsePath, withQuery } from "ufo";
|
|
5
5
|
import { ASYNC_PROTOCOL_VERSION, STORAGE_SLOT_SYMBOL_KEY, serializeRuntimeAsyncSnapshots, serializeRuntimeStateCells, storageAttributeName } from "@markless/serializer";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markless/bundler",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Markless build plugins for Rolldown and Vite.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"@thi.ng/dgraph": "^2.1.205",
|
|
40
40
|
"pathe": "^2.0.3",
|
|
41
41
|
"ufo": "^1.6.4",
|
|
42
|
-
"@markless/
|
|
43
|
-
"@markless/
|
|
44
|
-
"@markless/
|
|
42
|
+
"@markless/compiler": "0.3.3",
|
|
43
|
+
"@markless/web": "0.3.3",
|
|
44
|
+
"@markless/serializer": "0.3.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@markless/analyzer": "0.3.
|
|
47
|
+
"@markless/analyzer": "0.3.3"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"rolldown": "1.0.3",
|