@brandon_m_behring/book-scaffold-astro 5.0.0 → 5.2.0
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/CLAUDE.md +46 -3
- package/README.md +55 -0
- package/assets/og-fonts/Inter-Bold.ttf +0 -0
- package/assets/og-fonts/Inter-Regular.ttf +0 -0
- package/assets/og-fonts/LICENSE.txt +89 -0
- package/assets/og-fonts/SOURCE.md +13 -0
- package/bin/book-scaffold.mjs +4 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +894 -8
- package/dist/schemas.d.ts +1 -1
- package/dist/{types-D1QZgKMO.d.ts → types-DjqMnwHw.d.ts} +22 -4
- package/layouts/Base.astro +101 -3
- package/package.json +5 -1
- package/recipes/25-qa-readiness.md +197 -0
- package/recipes/26-generated-og-cards.md +205 -0
- package/recipes/README.md +2 -0
- package/scripts/init-qa.mjs +209 -0
- package/scripts/qa-core.mjs +1511 -0
- package/scripts/qa.mjs +293 -0
- package/scripts/resolve-book-config.mjs +39 -0
- package/scripts/validate-core.mjs +1675 -0
- package/scripts/validate.mjs +18 -1492
- package/scripts/validation-artifacts.mjs +23 -0
- package/src/lib/og-cards.ts +1135 -0
- package/src/types.ts +22 -3
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared generated-artifact regeneration adapter for validation callers.
|
|
3
|
+
*
|
|
4
|
+
* The validation core remains process-independent. CLI adapters inject this
|
|
5
|
+
* callback when they want the historical missing-labels/bibliography
|
|
6
|
+
* self-heal behavior. It launches only the named producer, never a second
|
|
7
|
+
* validate or QA process.
|
|
8
|
+
*/
|
|
9
|
+
import { spawnSync } from 'node:child_process';
|
|
10
|
+
import { dirname, join } from 'node:path';
|
|
11
|
+
import { fileURLToPath } from 'node:url';
|
|
12
|
+
|
|
13
|
+
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
|
14
|
+
|
|
15
|
+
export function regenerateValidationArtifact({ scriptName, book, root, env }) {
|
|
16
|
+
const childArgs = [join(scriptDir, scriptName)];
|
|
17
|
+
if (book) childArgs.push('--book', book);
|
|
18
|
+
return spawnSync(process.execPath, childArgs, {
|
|
19
|
+
cwd: root,
|
|
20
|
+
env,
|
|
21
|
+
encoding: 'utf8',
|
|
22
|
+
});
|
|
23
|
+
}
|