@riboseinc/anafero-cli 0.0.22 → 0.0.24

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.
@@ -112,7 +112,11 @@ 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
+ debug: {
116
+ dumpCache: debug || false,
117
+ reactDevTools: debug || false,
118
+ reactStrictMode: debug || false,
119
+ },
116
120
  });
117
121
  const [writeProgress, writingSubtask] = onProgress('build site|write files');
118
122
  for await (const blobchunk of generator) {
@@ -350,7 +354,14 @@ async function getRefsToBuild(revisionsToBuild: VersionBuildConfig) {
350
354
  async function * generateSite(
351
355
  revisionsToBuild: VersionBuildConfig | undefined,
352
356
  onProgress: TaskProgressCallback,
353
- opts?: { pathPrefix?: string | undefined, dumpCache?: boolean },
357
+ opts?: {
358
+ pathPrefix?: string | undefined;
359
+ debug?: {
360
+ dumpCache?: boolean;
361
+ reactDevTools?: boolean;
362
+ reactStrictMode?: boolean;
363
+ };
364
+ },
354
365
  ) {
355
366
  if (revisionsToBuild !== undefined) {
356
367
 
@@ -417,6 +428,10 @@ async function * generateSite(
417
428
  },
418
429
  getDOMStub: (() => (new JSDOM('<html></html>')).window.document),
419
430
  cache,
431
+ debug: {
432
+ reactStrictMode: opts?.debug?.reactStrictMode || false,
433
+ reactDevTools: opts?.debug?.reactDevTools || false,
434
+ },
420
435
  pathPrefix: opts?.pathPrefix,
421
436
  decodeXML: (blob) =>
422
437
  new JSDOM(
@@ -427,7 +442,7 @@ async function * generateSite(
427
442
  },
428
443
  );
429
444
  } finally {
430
- if (opts?.dumpCache) {
445
+ if (opts?.debug?.dumpCache) {
431
446
  try {
432
447
  fs.writeFileSync(
433
448
  'cacheDump.json',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@riboseinc/anafero-cli",
3
3
  "type": "module",
4
- "version": "0.0.22",
4
+ "version": "0.0.24",
5
5
  "packageManager": "yarn@4.5.0",
6
6
  "bin": {
7
7
  "build-site": "build-site.mjs"
Binary file
Binary file