This new package takes the place of the FS reads that happens in the tests package, and takes the place of the raw YAML loading that happens via webpack customization in the docusaurus package.
Export list of schema IDs
Export describeSchema function that takes a schema ID (or a schema ID and pointer) and returns information about that schema (including raw schema object and source YAML)
Use prepare step for generating a TS file with the full contents of all the schemas, so that nothing requires fs or any of that garbage
Ensure this runs by adding a postinstall hook inside the root package.json
Update web package to use new @ethdebug/format's describeSchema function (and get rid of the ever-growing list of yaml imports)
Get rid of custom webpack shenanigans inside docusaurus config, since we won't need to import raw yaml anymore. x fingers crossed x
Update tests package to remove all the fs.readFileSync nonsense
Oh yeah, also get rid of all explicit listing of files... switch schema reading to do recursive fs.readdirSync for great less typing
Generally clean up unused dependencies/imports (probably incompletely)
Add a yarn start command in the repo root (and a bunch of other watchers), to accommodate the chain of dependent rebuilds this setup now effects.
This new package takes the place of the FS reads that happens in the tests package, and takes the place of the raw YAML loading that happens via webpack customization in the docusaurus package.
Export list of schema IDs
Export
describeSchema
function that takes a schema ID (or a schema ID and pointer) and returns information about that schema (including raw schema object and source YAML)Use
prepare
step for generating a TS file with the full contents of all the schemas, so that nothing requiresfs
or any of that garbageEnsure this runs by adding a
postinstall
hook inside the root package.jsonUpdate web package to use new @ethdebug/format's
describeSchema
function (and get rid of the ever-growing list of yaml imports)Get rid of custom webpack shenanigans inside docusaurus config, since we won't need to import raw yaml anymore. x fingers crossed x
Update tests package to remove all the
fs.readFileSync
nonsenseOh yeah, also get rid of all explicit listing of files... switch schema reading to do recursive
fs.readdirSync
for great less typingGenerally clean up unused dependencies/imports (probably incompletely)
Add a
yarn start
command in the repo root (and a bunch of other watchers), to accommodate the chain of dependent rebuilds this setup now effects.