@burakboduroglu/nors 0.1.2 → 0.1.4
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/README.md +7 -4
- package/bin/nors.js +4 -1
- package/package.json +1 -1
- package/pb_hooks/nors.pb.js +4 -1
- package/pb_public/nors/assets/{abnfDiagram-VCTEODGH-BjNTd20L.js → abnfDiagram-VCTEODGH-DNndQzWL.js} +1 -1
- package/pb_public/nors/assets/architecture-7GRP2DOG-CRalLC6q.js +1 -0
- package/pb_public/nors/assets/{architectureDiagram-5GKGNRK7-DFNV5SNP.js → architectureDiagram-5GKGNRK7-DvzC6fQm.js} +1 -1
- package/pb_public/nors/assets/{blockDiagram-I7D4REHJ-DNijD6G8.js → blockDiagram-I7D4REHJ-BFaVhNuD.js} +1 -1
- package/pb_public/nors/assets/{c4Diagram-7LVT6UL2-DLW_Vk73.js → c4Diagram-7LVT6UL2-DTMycEah.js} +1 -1
- package/pb_public/nors/assets/channel-Cd0UXp2x.js +1 -0
- package/pb_public/nors/assets/{chunk-4HAMMTFA-CQW8auRW.js → chunk-4HAMMTFA-Cvo56g-z.js} +1 -1
- package/pb_public/nors/assets/{chunk-75Z2AOVW-OUM6F-Z2.js → chunk-75Z2AOVW-LW4FaixB.js} +1 -1
- package/pb_public/nors/assets/{chunk-DU6HZSFF-DdkkHC2K.js → chunk-DU6HZSFF-DryrSPb1.js} +1 -1
- package/pb_public/nors/assets/{chunk-F27PBJKO-D4tBKW95.js → chunk-F27PBJKO-C_xYca_6.js} +1 -1
- package/pb_public/nors/assets/{chunk-GMAD6QVW-CZU7s-_u.js → chunk-GMAD6QVW-Cp7hNYJZ.js} +1 -1
- package/pb_public/nors/assets/{chunk-GVQU2GXP-BQGI6BgU.js → chunk-GVQU2GXP-C_cC2nJk.js} +1 -1
- package/pb_public/nors/assets/{chunk-IMKFNOWR-BRvu8wxF.js → chunk-IMKFNOWR-qof_NoSn.js} +1 -1
- package/pb_public/nors/assets/{chunk-L3NEJ4N5-OjXnRmPt.js → chunk-L3NEJ4N5-C5_1i29s.js} +1 -1
- package/pb_public/nors/assets/{chunk-OSK3NFVY-puWVIqFn.js → chunk-OSK3NFVY-X_U_SaBm.js} +1 -1
- package/pb_public/nors/assets/{chunk-P2QGCYS3-BH6JrbP_.js → chunk-P2QGCYS3-VWs361To.js} +1 -1
- package/pb_public/nors/assets/{chunk-POPQ4Y6H-XJIxFdlK.js → chunk-POPQ4Y6H-D8oFfj_L.js} +1 -1
- package/pb_public/nors/assets/{chunk-PWAF6VOD-B__l-VgZ.js → chunk-PWAF6VOD-DQEgoOPv.js} +1 -1
- package/pb_public/nors/assets/{chunk-SHT3W25Y-B8vLWnR_.js → chunk-SHT3W25Y-tCDON2-U.js} +1 -1
- package/pb_public/nors/assets/{chunk-SVP7TREG-Cjv1tk7U.js → chunk-SVP7TREG-C31OP90L.js} +1 -1
- package/pb_public/nors/assets/{chunk-TICWLB2K-B5znima5.js → chunk-TICWLB2K-DXTAHHwe.js} +1 -1
- package/pb_public/nors/assets/classDiagram-ZZMXUADV-DaK4uxjZ.js +1 -0
- package/pb_public/nors/assets/classDiagram-v2-VYDZK3BY-DaK4uxjZ.js +1 -0
- package/pb_public/nors/assets/{cynefin-OW5HDTMX-CG0jDjpt.js → cynefin-OW5HDTMX-CNJq1lyc.js} +1 -1
- package/pb_public/nors/assets/{cynefinDiagram-5FMLGOSQ-C_Ir6oea.js → cynefinDiagram-5FMLGOSQ-CRHccJD4.js} +1 -1
- package/pb_public/nors/assets/{dagre-GXQ25YYZ-D8QhYxWu.js → dagre-GXQ25YYZ-BL5fkZKb.js} +1 -1
- package/pb_public/nors/assets/{diagram-S7CK7UJ4-BpLSV2IE.js → diagram-S7CK7UJ4-DZHxwPG5.js} +1 -1
- package/pb_public/nors/assets/{diagram-UQ7AKVKN-CZdWRYnI.js → diagram-UQ7AKVKN-Z0HadPCT.js} +1 -1
- package/pb_public/nors/assets/{diagram-VSXAHHWV-DumOz0aB.js → diagram-VSXAHHWV-CylZhSqd.js} +1 -1
- package/pb_public/nors/assets/{diagram-VX7I27RA-FEvMg4vC.js → diagram-VX7I27RA-BANNUIaD.js} +1 -1
- package/pb_public/nors/assets/{diagram-Z3DM3KII-B0wSI-7M.js → diagram-Z3DM3KII-DCZptWai.js} +1 -1
- package/pb_public/nors/assets/{ebnfDiagram-PWID7BFC-DnVv0Jr0.js → ebnfDiagram-PWID7BFC-C1mpuM8s.js} +1 -1
- package/pb_public/nors/assets/{erDiagram-RLTQ6QDP-DRrBeVO-.js → erDiagram-RLTQ6QDP-Z_Ata3eY.js} +1 -1
- package/pb_public/nors/assets/eventmodeling-NTZA5JFV-C5A3kkE1.js +1 -0
- package/pb_public/nors/assets/flowDiagram-HODETNUW-_tgNpani.js +1 -0
- package/pb_public/nors/assets/{ganttDiagram-EL5Y4UJY-Boo75Thn.js → ganttDiagram-EL5Y4UJY-DKK8_Wf4.js} +1 -1
- package/pb_public/nors/assets/{gitGraph-4MIJSDKK-DkHL0Vmb.js → gitGraph-4MIJSDKK-BhUCE0ML.js} +1 -1
- package/pb_public/nors/assets/{gitGraphDiagram-WWUBYQGX-BxbzXOHt.js → gitGraphDiagram-WWUBYQGX-D48svfM6.js} +1 -1
- package/pb_public/nors/assets/index-BoqKEmPH.css +1 -0
- package/pb_public/nors/assets/index-DvF8sdFd.js +82 -0
- package/pb_public/nors/assets/{info-A6RAGUB7-Dm0lTq1F.js → info-A6RAGUB7-DnYeGjcU.js} +1 -1
- package/pb_public/nors/assets/{infoDiagram-27XIBGKW-DqVr5vns.js → infoDiagram-27XIBGKW-7hyugKrX.js} +1 -1
- package/pb_public/nors/assets/{ishikawaDiagram-5VMMS53U-D9UPVhhC.js → ishikawaDiagram-5VMMS53U-C9SEgyFD.js} +1 -1
- package/pb_public/nors/assets/{journeyDiagram-3NMN7TZE-B_TT0UBS.js → journeyDiagram-3NMN7TZE-DInvra38.js} +1 -1
- package/pb_public/nors/assets/{kanban-definition-UXKFOSKX-CYxipC8k.js → kanban-definition-UXKFOSKX-DVg-vBIX.js} +1 -1
- package/pb_public/nors/assets/{line-CeGn86Ww.js → line-yFFq1TcN.js} +1 -1
- package/pb_public/nors/assets/{mermaid-parser.core-Bh2pMn-f.js → mermaid-parser.core-cDotXjEj.js} +3 -3
- package/pb_public/nors/assets/{mermaid.core-CL8sN1KK.js → mermaid.core-Cjiz9dvF.js} +4 -4
- package/pb_public/nors/assets/{mindmap-definition-YA3MSWOX-DACQFk4_.js → mindmap-definition-YA3MSWOX-zyjedg88.js} +1 -1
- package/pb_public/nors/assets/{packet-AYTQ26CC-6s6XRIHO.js → packet-AYTQ26CC-C_-vJgPl.js} +1 -1
- package/pb_public/nors/assets/{pegDiagram-XKGWAZYB-3cpO6gJW.js → pegDiagram-XKGWAZYB-BntIuEmE.js} +1 -1
- package/pb_public/nors/assets/{pie-WAS4IAKB-BNoU8wOh.js → pie-WAS4IAKB-B5QJCFjh.js} +1 -1
- package/pb_public/nors/assets/{pieDiagram-E7YTZNPT-BCVRuVsN.js → pieDiagram-E7YTZNPT-dYkNcl9u.js} +1 -1
- package/pb_public/nors/assets/{quadrantDiagram-AXDQQJYC-B5ib9c-g.js → quadrantDiagram-AXDQQJYC-CDkWdw25.js} +1 -1
- package/pb_public/nors/assets/{radar-RG4KPBEZ-7fT-y4bj.js → radar-RG4KPBEZ-CH7LBkdl.js} +1 -1
- package/pb_public/nors/assets/{railroad-74A4TZTK-DfD5x0yO.js → railroad-74A4TZTK-DTc6Dm-U.js} +1 -1
- package/pb_public/nors/assets/railroad-abnf-HS5TGJTU-CANOerR9.js +1 -0
- package/pb_public/nors/assets/railroad-ebnf-LZEXJU2U-B61JFSxw.js +1 -0
- package/pb_public/nors/assets/railroad-peg-WCYAUIDC-lb0eaawO.js +1 -0
- package/pb_public/nors/assets/{railroadDiagram-O6MQD6OU-JtCr1lo_.js → railroadDiagram-O6MQD6OU-CUpL471x.js} +1 -1
- package/pb_public/nors/assets/{requirementDiagram-BXWQKSXE-BqStJCDF.js → requirementDiagram-BXWQKSXE-BiaNiOAt.js} +1 -1
- package/pb_public/nors/assets/{sankeyDiagram-P5KCCOFB-CX_LZnAD.js → sankeyDiagram-P5KCCOFB-B-o3klA-.js} +1 -1
- package/pb_public/nors/assets/{sequenceDiagram-WJ2MYXX4-BCudH1Kz.js → sequenceDiagram-WJ2MYXX4-38rNDJ8n.js} +1 -1
- package/pb_public/nors/assets/{stateDiagram-D77RDMKH-rGlSUlYz.js → stateDiagram-D77RDMKH-D0jikw7s.js} +1 -1
- package/pb_public/nors/assets/stateDiagram-v2-MP3YSRHH-B4oJB7Xx.js +1 -0
- package/pb_public/nors/assets/{swimlanes-42K2YHIH-DKvSloZp.js → swimlanes-42K2YHIH-Df5twpLQ.js} +1 -1
- package/pb_public/nors/assets/swimlanesDiagram-VR7AAH4N-GIWyLX6a.js +8 -0
- package/pb_public/nors/assets/{timeline-definition-24CTP7MA-CELuFcfA.js → timeline-definition-24CTP7MA-GVU127eA.js} +1 -1
- package/pb_public/nors/assets/{treeView-Q6P3EWNA-D5E6rNip.js → treeView-Q6P3EWNA-BRGYhv4N.js} +1 -1
- package/pb_public/nors/assets/{treemap-WGGIJYW6-CdXHwdKK.js → treemap-WGGIJYW6-BadhmEqA.js} +1 -1
- package/pb_public/nors/assets/{vennDiagram-4TSXK5OY-ByJmWaze.js → vennDiagram-4TSXK5OY-ovFvZB1s.js} +1 -1
- package/pb_public/nors/assets/{wardley-WFR3VGLG-Bb28LKxc.js → wardley-WFR3VGLG-_TLVxueV.js} +1 -1
- package/pb_public/nors/assets/{wardleyDiagram-VM6X3IG4-CZbfB95E.js → wardleyDiagram-VM6X3IG4-k-pgEIG4.js} +1 -1
- package/pb_public/nors/assets/{xychartDiagram-S5SC5T6Z-BzhKhU_k.js → xychartDiagram-S5SC5T6Z-CrZyCR-2.js} +1 -1
- package/pb_public/nors/index.html +2 -2
- package/pb_public/nors/assets/architecture-7GRP2DOG-CszbBaLG.js +0 -1
- package/pb_public/nors/assets/channel-BBJC6jlq.js +0 -1
- package/pb_public/nors/assets/classDiagram-ZZMXUADV-CflNlJhy.js +0 -1
- package/pb_public/nors/assets/classDiagram-v2-VYDZK3BY-CflNlJhy.js +0 -1
- package/pb_public/nors/assets/eventmodeling-NTZA5JFV-CHTuxREV.js +0 -1
- package/pb_public/nors/assets/flowDiagram-HODETNUW-GyQBSUMm.js +0 -1
- package/pb_public/nors/assets/index-B1thqj8h.css +0 -1
- package/pb_public/nors/assets/index-CHyIcFAa.js +0 -71
- package/pb_public/nors/assets/railroad-abnf-HS5TGJTU-b8Cz753z.js +0 -1
- package/pb_public/nors/assets/railroad-ebnf-LZEXJU2U-B_O77J7F.js +0 -1
- package/pb_public/nors/assets/railroad-peg-WCYAUIDC-DY-15zgB.js +0 -1
- package/pb_public/nors/assets/stateDiagram-v2-MP3YSRHH-BYqH8M1b.js +0 -1
- package/pb_public/nors/assets/swimlanesDiagram-VR7AAH4N-XbCiub0l.js +0 -8
package/README.md
CHANGED
|
@@ -51,8 +51,8 @@ Measured with `du`:
|
|
|
51
51
|
|
|
52
52
|
| | |
|
|
53
53
|
| --- | --- |
|
|
54
|
-
| Installed files | **3.
|
|
55
|
-
| First visit | **~
|
|
54
|
+
| Installed files | **3.6 MB** — migration 4 KB, page the rest |
|
|
55
|
+
| First visit | **~138 KB** — entry JS ~121 KB (gzip ~41 KB, including the DOMPurify sanitiser), CSS ~17 KB |
|
|
56
56
|
| The other 3.4 MB | Mermaid diagram chunks, fetched only when a reader page holds a fence |
|
|
57
57
|
| Database growth | one `nors_notes` row per note, inside the existing `pb_data` |
|
|
58
58
|
| Extra processes | none |
|
|
@@ -74,9 +74,10 @@ before copying and start it afterwards** — PocketBase watches its directories
|
|
|
74
74
|
and can race a service manager doing the same.
|
|
75
75
|
|
|
76
76
|
For a source checkout and remote host, the `deploy/` installer performs the
|
|
77
|
-
stop → copy → start sequence:
|
|
77
|
+
stop → copy → start sequence. The page is not committed, so build it first:
|
|
78
78
|
|
|
79
79
|
```bash
|
|
80
|
+
bun --cwd web install && bun run build
|
|
80
81
|
scp -r pb_migrations pb_hooks pb_public deploy/install.sh host:/tmp/nors-stage/
|
|
81
82
|
ssh host
|
|
82
83
|
sudo /tmp/nors-stage/install.sh /tmp/nors-stage
|
|
@@ -131,7 +132,9 @@ CSS library, no UI server. Bun as the package manager.
|
|
|
131
132
|
|
|
132
133
|
## Develop the UI
|
|
133
134
|
|
|
134
|
-
Source lives in `web/`. The shipped page is built output
|
|
135
|
+
Source lives in `web/`. The shipped page is built output — `pb_public/nors/`
|
|
136
|
+
is not committed; `prepack` builds it into the npm tarball, and a `v*` tag push
|
|
137
|
+
publishes through `.github/workflows/release.yml`.
|
|
135
138
|
|
|
136
139
|
```bash
|
|
137
140
|
bun --cwd web install
|
package/bin/nors.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// steps that cannot be copied for you. It never touches pb_data, never starts
|
|
4
4
|
// or stops anything, and never talks to the network.
|
|
5
5
|
|
|
6
|
-
import { readFile, mkdir, cp, access } from "node:fs/promises"
|
|
6
|
+
import { readFile, mkdir, cp, rm, access } from "node:fs/promises"
|
|
7
7
|
import { constants } from "node:fs"
|
|
8
8
|
import { join, dirname, resolve } from "node:path"
|
|
9
9
|
import { fileURLToPath } from "node:url"
|
|
@@ -58,6 +58,9 @@ async function install(dir, force) {
|
|
|
58
58
|
for (const [from, to] of parts) {
|
|
59
59
|
const dest = join(target, to)
|
|
60
60
|
await mkdir(dirname(dest), { recursive: true })
|
|
61
|
+
// The page directory belongs to Nors alone; clearing it drops the previous
|
|
62
|
+
// build's hashed assets instead of piling them up on every upgrade.
|
|
63
|
+
if (to.startsWith("pb_public")) await rm(dest, { recursive: true, force: true })
|
|
61
64
|
await cp(join(ROOT, from), dest, { recursive: true })
|
|
62
65
|
console.log(` wrote ${to}/`)
|
|
63
66
|
}
|
package/package.json
CHANGED
package/pb_hooks/nors.pb.js
CHANGED
|
@@ -24,11 +24,14 @@ routerAdd("GET", "/api/nors/summary", (e) => {
|
|
|
24
24
|
if (record.getBool("pinned")) pinned++
|
|
25
25
|
|
|
26
26
|
if (recent.length < 5) {
|
|
27
|
+
// Same labels as KIND_LABELS in web/src/lib/pb.ts. Defined inside the
|
|
28
|
+
// handler because a hook callback cannot see its file's top-level scope.
|
|
29
|
+
const labels = { diagram: "Diagram", runbook: "Runbook", reference: "Reference", scratch: "Scratch" }
|
|
27
30
|
const kind = record.getString("kind")
|
|
28
31
|
recent.push({
|
|
29
32
|
title: record.getString("title"),
|
|
30
33
|
slug: record.getString("slug"),
|
|
31
|
-
kind: kind
|
|
34
|
+
kind: labels[kind] || kind,
|
|
32
35
|
status: status,
|
|
33
36
|
updated: record.getString("updated").substring(0, 10)
|
|
34
37
|
})
|
package/pb_public/nors/assets/{abnfDiagram-VCTEODGH-BjNTd20L.js → abnfDiagram-VCTEODGH-DNndQzWL.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./src-BH-TyZbA.js";import{m as t,t as n}from"./mermaid-parser.core-
|
|
1
|
+
import{m as e}from"./src-BH-TyZbA.js";import{m as t,t as n}from"./mermaid-parser.core-cDotXjEj.js";import{n as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-DryrSPb1.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-C31OP90L.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-Cjiz9dvF.js";var c=t().RailroadAbnf.parser.LangiumParser,l=r(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=r(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=r(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=r(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=r(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=r(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=r(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:r(t=>{o.clear(),e.debug(`[ABNF Parser] Starting Langium parse`);let r=c.parse(t);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new n(r);let i=r.value;e.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),e.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-FOHPRMQF-DzxwRta7.js";import{M as e}from"./mermaid-parser.core-cDotXjEj.js";export{e as createArchitectureServices};
|