137086109c
Stands up the shared browser-helpers package (consumed by public/vendor/admin via the Gitea npm registry) to de-duplicate copy-pasted frontend code: - format.js: formatLabel/formatStatus/formatTimeline/formatBudget (single source of truth — these had drifted, see SEV-310). - markdown.js: renderMarkdown (marked + strict DOMPurify; both peer deps). - wait-image.js: waitForImage (was byte-identical in public + vendor). ESM source package (no build step — Vite consumers import directly). publishConfig points at the Gitea npm registry. node --test green (formatters). Next: publish v0.1.0, then migrate each site to consume it and delete the copies. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
33 lines
738 B
JSON
33 lines
738 B
JSON
{
|
|
"name": "@switchev/web-shared",
|
|
"version": "0.1.0",
|
|
"description": "Shared browser helpers (formatters, markdown, image polling) for the SwitchEV frontends",
|
|
"type": "module",
|
|
"exports": {
|
|
".": "./src/index.js",
|
|
"./format": "./src/format.js",
|
|
"./markdown": "./src/markdown.js",
|
|
"./wait-image": "./src/wait-image.js"
|
|
},
|
|
"files": [
|
|
"src"
|
|
],
|
|
"sideEffects": [
|
|
"./src/markdown.js"
|
|
],
|
|
"peerDependencies": {
|
|
"dompurify": ">=3",
|
|
"marked": ">=12"
|
|
},
|
|
"scripts": {
|
|
"test": "node --test"
|
|
},
|
|
"publishConfig": {
|
|
"registry": "https://git.debyl.io/api/packages/SwitchEV/npm/"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://git.debyl.io/SwitchEV/shared.git"
|
|
}
|
|
}
|