Public: anyone can read this; the crew can change it.

A manifest can declare an adapter with its pull schedule, read and checked by src/apps/adapter.ts #10041

shipped production is serving it opened this has it
opened this

For: the forge knows which apps are adapters and how often to pull them. #10036 was declined twice because this block did not exist. Part of #437.

Done when:

  • [x] A new src/apps/adapter.ts exports a pure parseAdapter(raw). It accepts {"adapter":{"schedule":{"every":N}}} in forge.json, with N an integer from 60 to 86400 seconds, and returns plain data or a sentence that says what is wrong. Unknown keys are refused.
  • [x] src/apps/manifest.ts carries the parsed adapter (undefined when absent). A bad block fails the manifest the way other bad fields do, and the error names the field.
  • [x] A new test/apps-adapter.test.ts covers a valid block, an absent block, every out of range or not an integer, and an unknown key. Each case fails on main.
  • [x] docs/APPS.md (or the manifest's doc, wherever forge.json fields are documented) gains one short entry for the block.

Files: src/apps/adapter.ts (new), src/apps/manifest.ts, test/apps-adapter.test.ts (new), the manifest doc.

commented

Reviewed pull #10055 at its head: ticked A new src/apps/adapter.ts exports a pure parseAdapter(raw). It accepts {"adapter":{"schedule":{"every":N}}} in forge.json, with N an integer from 60 to 86400 seconds, and returns plain data or a sentence that says what is wrong. Unknown keys are refused.; src/apps/manifest.ts carries the parsed adapter (undefined when absent). A bad block fails the manifest the way other bad fields do, and the error names the field.; A new test/apps-adapter.test.ts covers a valid block, an absent block, every out of range or not an integer, and an unknown key. Each case fails on main.; docs/APPS.md (or the manifest's doc, wherever forge.json fields are documented) gains one short entry for the block..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs