@bagelink/blox 1.15.549 → 1.15.552
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/{shard-runner-C8zwo_6O.js → shard-runner-C0zS2ZjC.js} +8 -0
- package/dist/{shard-runner-BwSs_Ws5.cjs → shard-runner-CYE0JuX0.cjs} +8 -0
- package/dist/ssg/cli.cjs +4 -3
- package/dist/ssg/cli.mjs +4 -3
- package/dist/ssg/shard-runner.d.ts.map +1 -1
- package/dist/vite-plugin.cjs +1 -0
- package/dist/vite-plugin.d.ts.map +1 -1
- package/dist/vite-plugin.mjs +1 -0
- package/package.json +1 -1
|
@@ -113,15 +113,23 @@ async function runSharded(opts) {
|
|
|
113
113
|
appPaths: routerPaths
|
|
114
114
|
}), "utf8");
|
|
115
115
|
const start = Date.now();
|
|
116
|
+
const indexPath = path.resolve("dist", "index.html");
|
|
117
|
+
const pristineTemplate = await fs.readFile(indexPath, "utf8");
|
|
116
118
|
let codes;
|
|
117
119
|
if (total === 1) {
|
|
118
120
|
codes = [await runShard(0, 1, [], opts, llmPartsDir, routePartsDir, siteDataFile)];
|
|
119
121
|
} else if (SEQUENTIAL_SHARDS) {
|
|
120
122
|
codes = [];
|
|
123
|
+
let renderedRoot = null;
|
|
121
124
|
for (let index = 0; index < total; index++) {
|
|
125
|
+
await fs.writeFile(indexPath, pristineTemplate, "utf8");
|
|
122
126
|
codes.push(await runShard(index, total, [], opts, llmPartsDir, routePartsDir, siteDataFile));
|
|
127
|
+
if (index === 0 && codes[index] === 0) {
|
|
128
|
+
renderedRoot = await fs.readFile(indexPath, "utf8");
|
|
129
|
+
}
|
|
123
130
|
if (codes[index] !== 0) break;
|
|
124
131
|
}
|
|
132
|
+
if (renderedRoot != null) await fs.writeFile(indexPath, renderedRoot, "utf8");
|
|
125
133
|
} else {
|
|
126
134
|
codes = await Promise.all(Array.from({ length: total }, (_, i) => runShard(i, total, [], opts, llmPartsDir, routePartsDir, siteDataFile)));
|
|
127
135
|
}
|
|
@@ -137,15 +137,23 @@ async function runSharded(opts) {
|
|
|
137
137
|
appPaths: routerPaths
|
|
138
138
|
}), "utf8");
|
|
139
139
|
const start = Date.now();
|
|
140
|
+
const indexPath = path.resolve("dist", "index.html");
|
|
141
|
+
const pristineTemplate = await fs.readFile(indexPath, "utf8");
|
|
140
142
|
let codes;
|
|
141
143
|
if (total === 1) {
|
|
142
144
|
codes = [await runShard(0, 1, [], opts, llmPartsDir, routePartsDir, siteDataFile)];
|
|
143
145
|
} else if (SEQUENTIAL_SHARDS) {
|
|
144
146
|
codes = [];
|
|
147
|
+
let renderedRoot = null;
|
|
145
148
|
for (let index = 0; index < total; index++) {
|
|
149
|
+
await fs.writeFile(indexPath, pristineTemplate, "utf8");
|
|
146
150
|
codes.push(await runShard(index, total, [], opts, llmPartsDir, routePartsDir, siteDataFile));
|
|
151
|
+
if (index === 0 && codes[index] === 0) {
|
|
152
|
+
renderedRoot = await fs.readFile(indexPath, "utf8");
|
|
153
|
+
}
|
|
147
154
|
if (codes[index] !== 0) break;
|
|
148
155
|
}
|
|
156
|
+
if (renderedRoot != null) await fs.writeFile(indexPath, renderedRoot, "utf8");
|
|
149
157
|
} else {
|
|
150
158
|
codes = await Promise.all(Array.from({ length: total }, (_, i) => runShard(i, total, [], opts, llmPartsDir, routePartsDir, siteDataFile)));
|
|
151
159
|
}
|
package/dist/ssg/cli.cjs
CHANGED
|
@@ -141,7 +141,7 @@ Environment:
|
|
|
141
141
|
if (shardsOpt !== null || routesCmd) {
|
|
142
142
|
const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
|
|
143
143
|
const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
|
|
144
|
-
const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-
|
|
144
|
+
const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-CYE0JuX0.cjs"));
|
|
145
145
|
const code = await runSharded({
|
|
146
146
|
shards: shardsOpt ?? "auto",
|
|
147
147
|
mode,
|
|
@@ -154,11 +154,12 @@ Environment:
|
|
|
154
154
|
});
|
|
155
155
|
if (code === 0 && (process.env.NODE_ENV === "production" || mode === "production")) {
|
|
156
156
|
const uploadWebsiteId = (_a = process.env.BLOX_WEBSITE_ID) == null ? void 0 : _a.trim();
|
|
157
|
-
|
|
157
|
+
const manifestExists = await fs.stat("dist/.blox-manifest.json").then(() => true, () => false);
|
|
158
|
+
if (uploadWebsiteId && manifestExists) {
|
|
158
159
|
await llmArtifacts.uploadBloxManifest(apiBase2, uploadWebsiteId, buildRequest);
|
|
159
160
|
console.log("Uploaded .blox-manifest.json with Git provenance");
|
|
160
161
|
} else {
|
|
161
|
-
console.log("Skipped Blox manifest upload (
|
|
162
|
+
console.log("Skipped Blox manifest upload (website ID or manifest is unavailable)");
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
165
|
process.exitCode = code;
|
package/dist/ssg/cli.mjs
CHANGED
|
@@ -140,7 +140,7 @@ Environment:
|
|
|
140
140
|
if (shardsOpt !== null || routesCmd) {
|
|
141
141
|
const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
|
|
142
142
|
const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
|
|
143
|
-
const { runSharded } = await import("../shard-runner-
|
|
143
|
+
const { runSharded } = await import("../shard-runner-C0zS2ZjC.js");
|
|
144
144
|
const code = await runSharded({
|
|
145
145
|
shards: shardsOpt ?? "auto",
|
|
146
146
|
mode,
|
|
@@ -153,11 +153,12 @@ Environment:
|
|
|
153
153
|
});
|
|
154
154
|
if (code === 0 && (process.env.NODE_ENV === "production" || mode === "production")) {
|
|
155
155
|
const uploadWebsiteId = (_a = process.env.BLOX_WEBSITE_ID) == null ? void 0 : _a.trim();
|
|
156
|
-
|
|
156
|
+
const manifestExists = await fs.stat("dist/.blox-manifest.json").then(() => true, () => false);
|
|
157
|
+
if (uploadWebsiteId && manifestExists) {
|
|
157
158
|
await uploadBloxManifest(apiBase2, uploadWebsiteId, buildRequest);
|
|
158
159
|
console.log("Uploaded .blox-manifest.json with Git provenance");
|
|
159
160
|
} else {
|
|
160
|
-
console.log("Skipped Blox manifest upload (
|
|
161
|
+
console.log("Skipped Blox manifest upload (website ID or manifest is unavailable)");
|
|
161
162
|
}
|
|
162
163
|
}
|
|
163
164
|
process.exitCode = code;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shard-runner.d.ts","sourceRoot":"","sources":["../../src/ssg/shard-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAQH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAI9D,MAAM,WAAW,kBAAkB;IAClC,qDAAqD;IACrD,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAA;IACZ,uDAAuD;IACvD,OAAO,EAAE,MAAM,CAAA;IACf,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAA;IACnB,yEAAyE;IACzE,YAAY,CAAC,EAAE,uBAAuB,CAAA;IACtC,iFAAiF;IACjF,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,8FAA8F;IAC9F,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAyFD;;GAEG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"shard-runner.d.ts","sourceRoot":"","sources":["../../src/ssg/shard-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAQH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAI9D,MAAM,WAAW,kBAAkB;IAClC,qDAAqD;IACrD,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAA;IACZ,uDAAuD;IACvD,OAAO,EAAE,MAAM,CAAA;IACf,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAA;IACnB,yEAAyE;IACzE,YAAY,CAAC,EAAE,uBAAuB,CAAA;IACtC,iFAAiF;IACjF,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,8FAA8F;IAC9F,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAyFD;;GAEG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAqJ1E"}
|
package/dist/vite-plugin.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../src/vite-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAc,MAAM,MAAM,CAAA;AAM9C,MAAM,WAAW,iBAAiB;IACjC;;;;;OAKG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IACb;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../src/vite-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAc,MAAM,MAAM,CAAA;AAM9C,MAAM,WAAW,iBAAiB;IACjC;;;;;OAKG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IACb;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,MAAM,EAAE,CAwgBpE"}
|
package/dist/vite-plugin.mjs
CHANGED
package/package.json
CHANGED