@riboseinc/anafero-cli 0.0.33 → 0.0.35
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/bootstrap.js +378 -364
- package/bootstrap.js.map +3 -3
- package/build-generator.mts +13 -0
- package/build-site.mjs +16 -3
- package/dependencies.mts +4 -1
- package/generate-to-filesystem.tsx +10 -1
- package/package.json +1 -1
- package/riboseinc-anafero-cli-0.0.35.tgz +0 -0
- package/riboseinc-anafero-cli-0.0.33.tgz +0 -0
package/build-generator.mts
CHANGED
|
@@ -91,6 +91,19 @@ async function buildBootstrapScript(opts: ReportingOptions) {
|
|
|
91
91
|
// '.png': 'file',
|
|
92
92
|
},
|
|
93
93
|
logLevel,
|
|
94
|
+
plugins: [{
|
|
95
|
+
name: 'lunr-patch',
|
|
96
|
+
setup(build) {
|
|
97
|
+
build.onLoad({ filter: /lunr\.js$/ }, async (args) => {
|
|
98
|
+
let contents = await readFile(args.path, 'utf8');
|
|
99
|
+
contents = contents.replace(
|
|
100
|
+
'if (global.console && console.warn)',
|
|
101
|
+
'if (window.console && console.warn)',
|
|
102
|
+
);
|
|
103
|
+
return { contents, loader: 'js' };
|
|
104
|
+
});
|
|
105
|
+
},
|
|
106
|
+
}],
|
|
94
107
|
});
|
|
95
108
|
}
|
|
96
109
|
|
package/build-site.mjs
CHANGED
|
@@ -321470,10 +321470,13 @@ var fetchDependency = async function fetchDependency2(moduleRef, onProgress) {
|
|
|
321470
321470
|
console,
|
|
321471
321471
|
Function,
|
|
321472
321472
|
setTimeout,
|
|
321473
|
-
setInterval
|
|
321473
|
+
setInterval,
|
|
321474
|
+
TextEncoder
|
|
321474
321475
|
});
|
|
321475
321476
|
const mod = new vm.SourceTextModule(code2, {
|
|
321476
|
-
|
|
321477
|
+
// TODO: Try moduleRef as VM module identifier?
|
|
321478
|
+
// Take care of special characters, though.
|
|
321479
|
+
identifier: "anafero-dependency",
|
|
321477
321480
|
context: context9
|
|
321478
321481
|
});
|
|
321479
321482
|
async function link4(specifier, referencingModule) {
|
|
@@ -321803,6 +321806,16 @@ async function* generateSite(revisionsToBuild, onProgress, cache3, opts) {
|
|
|
321803
321806
|
join8(PACKAGE_ROOT, "./bootstrap.css")
|
|
321804
321807
|
)
|
|
321805
321808
|
};
|
|
321809
|
+
if (opts?.debug) {
|
|
321810
|
+
yield {
|
|
321811
|
+
"/bootstrap.js.map": await readFile4(
|
|
321812
|
+
join8(PACKAGE_ROOT, "./bootstrap.js.map")
|
|
321813
|
+
),
|
|
321814
|
+
"/bootstrap.css.map": await readFile4(
|
|
321815
|
+
join8(PACKAGE_ROOT, "./bootstrap.css.map")
|
|
321816
|
+
)
|
|
321817
|
+
};
|
|
321818
|
+
}
|
|
321806
321819
|
yield* generateStaticSiteAssets(
|
|
321807
321820
|
refsToBuild,
|
|
321808
321821
|
revisionsToBuild.currentRevision,
|
|
@@ -321850,7 +321863,7 @@ async function writeBlobs(root, blobs) {
|
|
|
321850
321863
|
}
|
|
321851
321864
|
var copyBootstrapScript = (packagePath, outdir) => Effect_exports.gen(function* (_) {
|
|
321852
321865
|
const fs5 = yield* _(FileSystem_exports.FileSystem);
|
|
321853
|
-
const bootstrapFiles = ["bootstrap.js", "bootstrap.css"];
|
|
321866
|
+
const bootstrapFiles = ["bootstrap.js", "bootstrap.css", "bootstrap.js.map", "bootstrap.css.map"];
|
|
321854
321867
|
yield* _(
|
|
321855
321868
|
Console_exports.withTime(`Copy generator package from ${packagePath} into ${outdir}`)(
|
|
321856
321869
|
Effect_exports.all(bootstrapFiles.map(
|
package/dependencies.mts
CHANGED
|
@@ -259,9 +259,12 @@ async function fetchDependency(
|
|
|
259
259
|
Function,
|
|
260
260
|
setTimeout,
|
|
261
261
|
setInterval,
|
|
262
|
+
TextEncoder,
|
|
262
263
|
});
|
|
263
264
|
const mod = new vm.SourceTextModule(code, {
|
|
264
|
-
|
|
265
|
+
// TODO: Try moduleRef as VM module identifier?
|
|
266
|
+
// Take care of special characters, though.
|
|
267
|
+
identifier: 'anafero-dependency',
|
|
265
268
|
context,
|
|
266
269
|
});
|
|
267
270
|
|
|
@@ -437,6 +437,15 @@ async function * generateSite(
|
|
|
437
437
|
join(PACKAGE_ROOT, './bootstrap.css')),
|
|
438
438
|
};
|
|
439
439
|
|
|
440
|
+
if (opts?.debug) {
|
|
441
|
+
yield {
|
|
442
|
+
'/bootstrap.js.map': await readFile(
|
|
443
|
+
join(PACKAGE_ROOT, './bootstrap.js.map')),
|
|
444
|
+
'/bootstrap.css.map': await readFile(
|
|
445
|
+
join(PACKAGE_ROOT, './bootstrap.css.map')),
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
|
|
440
449
|
yield * generateStaticSiteAssets(
|
|
441
450
|
refsToBuild,
|
|
442
451
|
revisionsToBuild.currentRevision,
|
|
@@ -490,7 +499,7 @@ async function writeBlobs(root: string, blobs: Record<string, Uint8Array>) {
|
|
|
490
499
|
const copyBootstrapScript = (packagePath: string, outdir: string) =>
|
|
491
500
|
Effect.gen(function * (_) {
|
|
492
501
|
const fs = yield * _(FileSystem.FileSystem);
|
|
493
|
-
const bootstrapFiles = ['bootstrap.js', 'bootstrap.css'];
|
|
502
|
+
const bootstrapFiles = ['bootstrap.js', 'bootstrap.css', 'bootstrap.js.map', 'bootstrap.css.map'];
|
|
494
503
|
yield * _(
|
|
495
504
|
Console.withTime(`Copy generator package from ${packagePath} into ${outdir}`)(
|
|
496
505
|
Effect.all(bootstrapFiles.map(fn =>
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|