mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
submissions(#23): foundation — kind-30083 schema, builder, service + tests
First slice of structured submissions (replacing the kind-4 encrypted DM forms). Pure, hermetic core — no UI or network yet. - nostrEventSchemas.js: SUBMISSION_KIND=30083 (+ NOTE_TYPES.SUBMISSION, BASE_SCHEMAS entry) and buildSubmissionEvent(). PUBLIC + addressable; data in tags: d (id), k (type), applicant (npub), p (admin), t=bitvid-submission; free-text in content. - js/submissions/submissionService.js: SUBMISSION_TYPES + labels, parseSubmissionEvent, buildSubmission, generateSubmissionId. Pure — unit-testable with no relays/signer. - constants.js: FEATURE_SUBMISSIONS (default OFF until the admin UI + forms ship). - tests/submission-service.test.mjs: 8 scenarios (build tags/type/default, d-tag required, parse structure/reject/unknown-type→other, build→parse round-trip of every type, id generation). - check-file-size.mjs: bump nostrEventSchemas grandfather 3250→3541 (adding a new event type to the schema registry is the prescribed pattern). - docs/nostr-event-schemas.md: catalogue row. Schema validation ✨, lint, build all pass; tests 8/8. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
87e31d9853
commit
a18230eb70
6 files changed
+341
-1
No files matched your search
@@ -32,7 +32,7 @@ const GRANDFATHERED = {
|
||||
"js/channelProfile.js": 5529,
|
||||
"js/nostr/client.js": 4356,
|
||||
"js/ui/components/VideoCard.js": 3129,
|
||||
"js/nostrEventSchemas.js": 3250,
|
||||
"js/nostrEventSchemas.js": 3541,
|
||||
"js/ui/loginModalController.js": 2552,
|
||||
"js/historyView.js": 2613,
|
||||
"js/services/moderationService.js": 2512,
|
||||
|
||||
Reference in new issue
Block a user