@riboseinc/anafero-cli 0.0.2 → 0.0.4
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/build-site.mjs +14 -7
- package/generate-to-filesystem.tsx +14 -7
- package/package.json +2 -2
- package/riboseinc-anafero-cli-0.0.4.tgz +0 -0
- package/sqlite-cache.mts +5 -0
- package/bootstrap.css +0 -31572
- package/bootstrap.css.map +0 -7
- package/bootstrap.js +0 -133202
- package/bootstrap.js.map +0 -7
- package/riboseinc-anafero-cli-0.0.2.tgz +0 -0
package/build-site.mjs
CHANGED
|
@@ -322259,7 +322259,8 @@ var build3 = Command_exports2.make(
|
|
|
322259
322259
|
omitRevisionsNewerThanCurrent: unpackOption(omitRevisionsNewerThanCurrent),
|
|
322260
322260
|
currentRevision: unpackOption(currentRevision)
|
|
322261
322261
|
}, (task, progress) => onProgress(`build site|${task}`, progress), {
|
|
322262
|
-
pathPrefix: prefix
|
|
322262
|
+
pathPrefix: prefix,
|
|
322263
|
+
dumpCache: debug3
|
|
322263
322264
|
});
|
|
322264
322265
|
const [writeProgress, writingSubtask] = onProgress("build site|write files");
|
|
322265
322266
|
for await (const blobchunk of generator) {
|
|
@@ -322506,12 +322507,18 @@ async function* generateSite(revisionsToBuild, onProgress, opts) {
|
|
|
322506
322507
|
}
|
|
322507
322508
|
);
|
|
322508
322509
|
} finally {
|
|
322509
|
-
|
|
322510
|
-
|
|
322511
|
-
|
|
322512
|
-
|
|
322513
|
-
|
|
322514
|
-
|
|
322510
|
+
if (opts?.dumpCache) {
|
|
322511
|
+
try {
|
|
322512
|
+
fs4.writeFileSync(
|
|
322513
|
+
"cacheDump.json",
|
|
322514
|
+
JSON.stringify(cache3.dump(), null, 2),
|
|
322515
|
+
{ encoding: "utf-8" }
|
|
322516
|
+
);
|
|
322517
|
+
console.info("cacheDump.json was written for content reader work inspection");
|
|
322518
|
+
} catch (e2) {
|
|
322519
|
+
console.warn("cacheDump.json could not be written");
|
|
322520
|
+
}
|
|
322521
|
+
}
|
|
322515
322522
|
}
|
|
322516
322523
|
} else {
|
|
322517
322524
|
throw new Error("Unversioned build is not supported yet");
|
|
@@ -112,6 +112,7 @@ const build = Command.
|
|
|
112
112
|
currentRevision: unpackOption(currentRevision)!,
|
|
113
113
|
}, (task, progress) => onProgress(`build site|${task}`, progress), {
|
|
114
114
|
pathPrefix: prefix,
|
|
115
|
+
dumpCache: debug,
|
|
115
116
|
});
|
|
116
117
|
const [writeProgress, writingSubtask] = onProgress('build site|write files');
|
|
117
118
|
for await (const blobchunk of generator) {
|
|
@@ -343,7 +344,7 @@ async function getRefsToBuild(revisionsToBuild: VersionBuildConfig) {
|
|
|
343
344
|
async function * generateSite(
|
|
344
345
|
revisionsToBuild: VersionBuildConfig | undefined,
|
|
345
346
|
onProgress: TaskProgressCallback,
|
|
346
|
-
opts?: { pathPrefix?: string | undefined },
|
|
347
|
+
opts?: { pathPrefix?: string | undefined, dumpCache?: boolean },
|
|
347
348
|
) {
|
|
348
349
|
if (revisionsToBuild !== undefined) {
|
|
349
350
|
|
|
@@ -420,12 +421,18 @@ async function * generateSite(
|
|
|
420
421
|
},
|
|
421
422
|
);
|
|
422
423
|
} finally {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
424
|
+
if (opts?.dumpCache) {
|
|
425
|
+
try {
|
|
426
|
+
fs.writeFileSync(
|
|
427
|
+
'cacheDump.json',
|
|
428
|
+
JSON.stringify(cache.dump(), null, 2),
|
|
429
|
+
{ encoding: 'utf-8' },
|
|
430
|
+
);
|
|
431
|
+
console.info("cacheDump.json was written for content reader work inspection");
|
|
432
|
+
} catch (e) {
|
|
433
|
+
console.warn("cacheDump.json could not be written");
|
|
434
|
+
}
|
|
435
|
+
}
|
|
429
436
|
}
|
|
430
437
|
} else {
|
|
431
438
|
throw new Error("Unversioned build is not supported yet");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riboseinc/anafero-cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.4",
|
|
5
5
|
"packageManager": "yarn@4.5.0",
|
|
6
6
|
"bin": {
|
|
7
7
|
"build-site": "build-site.mjs"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"bp": "rm -f riboseinc-anafero-*.tgz; yarn build-generator -- --debug && npm pack",
|
|
12
12
|
"build-generator-builder": "yarn esbuild build-generator.mts --log-level=debug --packages=external --platform=node --target=node18 --minify=false --bundle --format=esm --outfile=build-generator.mjs",
|
|
13
13
|
"build-generator": "yarn node build-generator.mjs --",
|
|
14
|
-
"clean-all": "rm -f anafero-*.tgz build-generator.mjs build-site.mjs bootstrap.js *.css",
|
|
14
|
+
"clean-all": "rm -f riboseinc-anafero-*.tgz build-generator.mjs build-site.mjs bootstrap.js *.css",
|
|
15
15
|
"compile": "tsc --outdir compiled"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
Binary file
|