Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Difference From v0.21.0 To trunk
2025-05-09
| ||
16:34 | Add loopback device authentication ... (Leaf check-in: 90dbaa8009 user: stern tags: trunk) | |
12:43 | Omit rporting frozen config error ... (check-in: 336d20b3e4 user: stern tags: trunk) | |
2025-04-26
| ||
15:13 | WebUI: move context link from info page to zettel page ... (check-in: 7ae5e31c4a user: stern tags: trunk) | |
2025-04-17
| ||
15:29 | Version 0.21.0 ... (check-in: 7220c2d479 user: stern tags: trunk, release, v0.21.0) | |
09:24 | Update to zsc, to fix a panic ... (check-in: b3283fc6d6 user: stern tags: trunk) | |
Changes to VERSION.
| 1 | - + |
|
Changes to cmd/main.go.
︙ | |||
167 168 169 170 171 172 173 174 175 176 177 178 179 180 | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | + + | keyBoxOneURI = kernel.BoxURIs + "1" keyDebug = "debug-mode" keyDefaultDirBoxType = "default-dir-box-type" keyInsecureCookie = "insecure-cookie" keyInsecureHTML = "insecure-html" keyListenAddr = "listen-addr" keyLogLevel = "log-level" keyLoopbackIdent = "loopback-ident" keyLoopbackZid = "loopback-zid" keyMaxRequestSize = "max-request-size" keyOwner = "owner" keyPersistentCookie = "persistent-cookie" keyReadOnly = "read-only-mode" keyRuntimeProfiling = "runtime-profiling" keyTokenLifetimeHTML = "token-lifetime-html" keyTokenLifetimeAPI = "token-lifetime-api" |
︙ | |||
213 214 215 216 217 218 219 220 221 222 223 224 225 226 | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | + + | } err = setConfigValue( err, kernel.ConfigService, kernel.ConfigInsecureHTML, cfg.GetDefault(keyInsecureHTML, kernel.ConfigSecureHTML)) err = setConfigValue( err, kernel.WebService, kernel.WebListenAddress, cfg.GetDefault(keyListenAddr, "127.0.0.1:23123")) err = setConfigValue(err, kernel.WebService, kernel.WebLoopbackIdent, cfg.GetDefault(keyLoopbackIdent, "")) err = setConfigValue(err, kernel.WebService, kernel.WebLoopbackZid, cfg.GetDefault(keyLoopbackZid, "")) if val, found := cfg.Get(keyBaseURL); found { err = setConfigValue(err, kernel.WebService, kernel.WebBaseURL, val) } if val, found := cfg.Get(keyURLPrefix); found { err = setConfigValue(err, kernel.WebService, kernel.WebURLPrefix, val) } err = setConfigValue(err, kernel.WebService, kernel.WebSecureCookie, !cfg.GetBool(keyInsecureCookie)) |
︙ | |||
293 294 295 296 297 298 299 | 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | - + + + + | func(srv server.Server, plMgr box.Manager, authMgr auth.Manager, rtConfig config.Config) error { setupRouting(srv, plMgr, authMgr, rtConfig) return nil }, ) if command.Simple { |
︙ | |||
331 332 333 334 335 336 337 338 | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | + - + - + + + + + + - + + + + | fullVersion := info.revision if info.dirty { fullVersion += "-dirty" } kernel.Main.Setup(progName, fullVersion, info.time) flag.Parse() if *cpuprofile != "" || *memprofile != "" { var err error if *cpuprofile != "" { |
︙ |
Changes to docs/manual/00001004010000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | id: 00001004010000 title: Zettelstore startup configuration role: manual tags: #configuration #manual #zettelstore syntax: zmk created: 20210126175322 |
︙ | |||
91 92 93 94 95 96 97 98 99 100 101 102 103 104 | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | + + + + + + + + + + + + | Default: ""info"". Examples: ""error"" will produce just error messages (e.g. no ""info"" messages). ""error;web:debug"" will emit debugging messages for the web component of Zettelstore while still producing error messages for all other components. When you are familiar with operating the Zettelstore, you might set the level to ""error"" to receive fewer noisy messages from it. ; [!loopback-ident|''loopback-ident''], [!loopback-zid|''loopback-zid''] : These keys are effective only if [[authentication is enabled|00001010000000]]. They must specify the user ID and zettel ID of a [[user zettel|00001010040200]]. When these keys are set and an HTTP request originates from the loopback device, no further authentication is required. The loopback device typically uses the IP address ''127.0.0.1'' (IPv4) or ''::1'' (IPv6). This configuration allows client software running on the same computer as the Zettelstore to access it through its API or web user interface. However, this setup is not recommended if the Zettelstore is running on a computer shared with untrusted or unknown users. Default: (empty string)/00000000000000 ; [!max-request-size|''max-request-size''] : It limits the maximum byte size of a web request body to prevent clients from accidentally or maliciously sending a large request and wasting server resources. The minimum value is 1024. Default: 16777216 (16 MiB). ; [!owner|''owner''] : [[Identifier|00001006050000]] of a zettel that contains data about the owner of the Zettelstore. |
︙ |
Changes to docs/manual/00001010040100.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + + | id: 00001010040100 title: Enable authentication role: manual tags: #authentication #configuration #manual #security #zettelstore syntax: zmk created: 20210126175322 |
Changes to go.mod.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | - - - - - - - - - + + + + + + + + + - + | module zettelstore.de/z go 1.24 require ( github.com/fsnotify/fsnotify v1.9.0 |
Changes to go.sum.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + | github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= |
Changes to internal/auth/impl/impl.go.
︙ | |||
55 56 57 58 59 60 61 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - + - + | kernel.CoreGoArch, kernel.CoreVersion, } func calcSecret(extSecret string) []byte { h := fnv.New128() if extSecret != "" { |
︙ |
Changes to internal/box/constbox/constbox.go.
︙ | |||
256 257 258 259 260 261 262 | 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | - - - - - - - - - - - - | meta.KeyTitle: "Zettelstore Sxn Base Code", meta.KeyRole: meta.ValueRoleConfiguration, meta.KeySyntax: meta.ValueSyntaxSxn, meta.KeyCreated: "20230619132800", meta.KeyModified: "20241118173500", meta.KeyReadOnly: meta.ValueTrue, meta.KeyVisibility: meta.ValueVisibilityExpert, |
︙ | |||
466 467 468 469 470 471 472 | 454 455 456 457 458 459 460 461 462 463 464 465 466 467 | - - - | //go:embed start.sxn var contentStartCodeSxn []byte //go:embed wuicode.sxn var contentBaseCodeSxn []byte |
︙ |
Changes to internal/box/constbox/info.sxn.
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - - + + - | ;;; SPDX-FileCopyrightText: 2023-present Detlef Stern ;;;---------------------------------------------------------------------------- `(article (header (h1 "Information for Zettel " ,zid) (p (a (@ (href ,web-url)) "Web") |
︙ |
Deleted internal/box/constbox/prelude.sxn.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to internal/box/constbox/zettel.sxn.
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | + | ,zid (@H " · ") (a (@ (href ,info-url)) "Info") (@H " · ") "(" ,@(if (bound? 'role-url) `((a (@ (href ,role-url)) ,meta-role))) ,@(if (and (bound? 'folge-role-url) (bound? 'meta-folge-role)) `((@H " → ") (a (@ (href ,folge-role-url)) ,meta-folge-role))) ")" ,@(if tag-refs `((@H " · ") ,@tag-refs)) (@H " · ") (a (@ (href ,context-url)) "Context") ,@(ROLE-DEFAULT-actions (current-binding)) ,@(if superior-refs `((br) "Superior: " ,superior-refs)) ,@(if predecessor-refs `((br) "Predecessor: " ,predecessor-refs)) ,@(if prequel-refs `((br) "Prequel: " ,prequel-refs)) ,@(if precursor-refs `((br) "Precursor: " ,precursor-refs)) ,@(ROLE-DEFAULT-heading (current-binding)) ) |
︙ |
Changes to internal/box/dirbox/dirbox.go.
︙ | |||
310 311 312 313 314 315 316 | 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 | - - + + + + + | } entry := dp.dirSrv.GetDirEntry(zid) if !entry.IsValid() { // Existing zettel, but new in this box. entry = ¬ify.DirEntry{Zid: zid} } dp.updateEntryFromMetaContent(entry, meta, zettel.Content) |
︙ |
Changes to internal/box/filebox/zipbox.go.
︙ | |||
66 67 68 69 70 71 72 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | - + + + | } func (zb *zipBox) Start(context.Context) error { reader, err := zip.OpenReader(zb.name) if err != nil { return err } |
︙ | |||
92 93 94 95 96 97 98 | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | - + | if !entry.IsValid() { return zettel.Zettel{}, box.ErrZettelNotFound{Zid: zid} } reader, err := zip.OpenReader(zb.name) if err != nil { return zettel.Zettel{}, err } |
︙ | |||
152 153 154 155 156 157 158 | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | - - + | } func (zb *zipBox) ApplyMeta(ctx context.Context, handle box.MetaFunc, constraint query.RetrievePredicate) error { reader, err := zip.OpenReader(zb.name) if err != nil { return err } |
︙ | |||
222 223 224 225 226 227 228 | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | + - - + + + + + | } func readZipFileContent(reader *zip.ReadCloser, name string) ([]byte, error) { f, err := reader.Open(name) if err != nil { return nil, err } data, err := io.ReadAll(f) |
Changes to internal/box/manager/mapstore/mapstore.go.
︙ | |||
579 580 581 582 583 584 585 | 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 | - + - + - + - + - + - + - - + + - + - - + + - + - + - + - + - - + + | ms.mxStats.Unlock() } func (ms *mapStore) Dump(w io.Writer) { ms.mx.RLock() defer ms.mx.RUnlock() |
Changes to internal/box/notify/fsdir.go.
︙ | |||
51 52 53 54 55 56 57 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | - + | err = watcher.Add(absPath) if errParent != nil { if err != nil { log.Error(). Str("parentDir", absParentDir).Err(errParent). Str("path", absPath).Err(err). Msg("Unable to access Zettel directory and its parent directory") |
︙ | |||
86 87 88 89 90 91 92 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | - + | } func (fsdn *fsdirNotifier) Refresh() { fsdn.refresh <- struct{}{} } func (fsdn *fsdirNotifier) eventLoop() { |
︙ | |||
152 153 154 155 156 157 158 | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | - + | fsdn.log.Trace().Str("path", fsdn.path).Str("name", ev.Name).Str("op", ev.Op.String()).Msg("event does not match") return true } func (fsdn *fsdirNotifier) processDirEvent(ev *fsnotify.Event) bool { if ev.Has(fsnotify.Remove) || ev.Has(fsnotify.Rename) { fsdn.log.Debug().Str("name", fsdn.path).Msg("Directory removed") |
︙ |
Changes to internal/box/notify/helper.go.
︙ | |||
53 54 55 56 57 58 59 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - + - + | func newZipPathFetcher(zipPath string) EntryFetcher { return &zipPathFetcher{zipPath} } func (zpf *zipPathFetcher) Fetch() ([]string, error) { reader, err := zip.OpenReader(zpf.zipPath) if err != nil { return nil, err } |
︙ |
Changes to internal/encoder/htmlenc.go.
︙ | |||
66 67 68 69 70 71 72 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - + | head.AddN( shtml.SymHead, sx.Nil().Cons(sx.Nil().Cons(sx.Cons(sx.MakeSymbol("charset"), sx.MakeString("utf-8"))).Cons(sxhtml.SymAttr)).Cons(shtml.SymMeta), ) head.ExtendBang(hm) var sb strings.Builder if hasTitle { |
︙ |
Changes to internal/encoder/mdenc.go.
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - + | // WriteZettel writes the encoded zettel to the writer. func (me *mdEncoder) WriteZettel(w io.Writer, zn *ast.ZettelNode) (int, error) { v := newMDVisitor(w, me.lang) v.acceptMeta(zn.InhMeta) if zn.InhMeta.YamlSep { v.b.WriteString("---\n") } else { |
︙ | |||
153 154 155 156 157 158 159 | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | - + - + | return } v.writeSpaces(4) lcm1 := lc - 1 for i := 0; i < lc; i++ { b := vn.Content[i] if b != '\n' && b != '\r' { |
︙ | |||
221 222 223 224 225 226 227 | 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | - + - + - + - + - + | func (v *mdVisitor) writeNestedList(ln *ast.NestedListNode, enum string) { v.listInfo = append(v.listInfo, len(enum)) regIndent := 4*len(v.listInfo) - 4 paraIndent := regIndent + len(enum) for i, item := range ln.Items { if i > 0 { |
︙ | |||
292 293 294 295 296 297 298 | 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | - + - + - + - + - + - + - + | v.writeReference(ln.Ref, ln.Inlines) } func (v *mdVisitor) visitEmbedRef(en *ast.EmbedRefNode) { v.pushAttributes(en.Attrs) defer v.popAttributes() |
︙ | |||
363 364 365 366 367 368 369 | 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | - - - + + + - + - + | } v.b.WriteString(rightQ) } func (v *mdVisitor) visitLiteral(ln *ast.LiteralNode) { switch ln.Kind { case ast.LiteralCode, ast.LiteralInput, ast.LiteralOutput: |
Changes to internal/encoder/textenc.go.
︙ | |||
27 28 29 30 31 32 33 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | - + - + - + | // TextEncoder encodes just the text and ignores any formatting. type TextEncoder struct{} // WriteZettel writes metadata and content. func (te *TextEncoder) WriteZettel(w io.Writer, zn *ast.ZettelNode) (int, error) { v := newTextVisitor(w) |
︙ | |||
100 101 102 103 104 105 106 | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | - + | return nil case *ast.VerbatimNode: v.visitVerbatim(n) return nil case *ast.RegionNode: v.visitBlockSlice(&n.Blocks) if len(n.Inlines) > 0 { |
︙ | |||
122 123 124 125 126 127 128 | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | - + - + - + - + - - + + - - + - + | case *ast.BLOBNode: return nil case *ast.TextNode: v.visitText(n.Text) return nil case *ast.BreakNode: if n.Hard { |
︙ | |||
219 220 221 222 223 224 225 | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | - + - + | } func (v *textVisitor) visitText(s string) { spaceFound := false for _, ch := range s { if input.IsSpace(ch) { if !spaceFound { |
Changes to internal/encoder/write.go.
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + - - | type encWriter struct { w io.Writer // The io.Writer to write to err error // Collect error length int // Collected length } // newEncWriter creates a new encWriter |
︙ | |||
62 63 64 65 66 67 68 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | - + - - + + + + + + + + + + + + + + | var l int l, w.err = w.Write([]byte{b}) w.length += l return w.err } // WriteBytes writes the content of bs. |
Changes to internal/encoder/zmkenc.go.
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - + | // WriteZettel writes the encoded zettel to the writer. func (*zmkEncoder) WriteZettel(w io.Writer, zn *ast.ZettelNode) (int, error) { v := newZmkVisitor(w) v.acceptMeta(zn.InhMeta) if zn.InhMeta.YamlSep { v.b.WriteString("---\n") } else { |
︙ | |||
118 119 120 121 122 123 124 | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | - + - + - + | case *ast.EmbedBLOBNode: v.visitEmbedBLOB(n) case *ast.CiteNode: v.visitCite(n) case *ast.FootnoteNode: v.b.WriteString("[^") ast.Walk(v, &n.Inlines) |
︙ | |||
170 171 172 173 174 175 176 | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | - - - + + + - + - + - + | if vn.Kind == ast.VerbatimHTML { attrs = syntaxToHTML(attrs) } // TODO: scan cn.Lines to find embedded kind[0]s at beginning v.b.WriteString(kind) v.visitAttributes(attrs) |
︙ | |||
220 221 222 223 224 225 226 | 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | - + - - + + - + - + - + | ast.NestedListQuote: '>', } func (v *zmkVisitor) visitNestedList(ln *ast.NestedListNode) { v.prefix = append(v.prefix, mapNestedListKind[ln.Kind]) for i, item := range ln.Items { if i > 0 { |
︙ | |||
275 276 277 278 279 280 281 | 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | - + - + | ast.AlignCenter: ":", ast.AlignRight: ">", } func (v *zmkVisitor) visitTable(tn *ast.TableNode) { if header := tn.Header; len(header) > 0 { v.writeTableHeader(header, tn.Align) |
︙ | |||
301 302 303 304 305 306 307 | 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | - + - + - + | v.b.WriteString(alignCode[colAlign]) } } } func (v *zmkVisitor) writeTableRow(row ast.TableRow, align []ast.Alignment) { for pos, cell := range row { |
︙ | |||
354 355 356 357 358 359 360 | 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 | - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + | v.b.WriteString(tn.Text[last:]) } func (v *zmkVisitor) visitBreak(bn *ast.BreakNode) { if bn.Hard { v.b.WriteString("\\\n") } else { |
︙ |
Changes to internal/evaluator/evaluator.go.
︙ | |||
65 66 67 68 69 70 71 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | - + | if vn, isVerbatim := bs[0].(*ast.VerbatimNode); isVerbatim && vn.Kind == ast.VerbatimCode { if classAttr, hasClass := vn.Attrs.Get(""); hasClass && classAttr == meta.ValueSyntaxSxn { rd := sxreader.MakeReader(bytes.NewReader(vn.Content)) if objs, err := rd.ReadAll(); err == nil { result := make(ast.BlockSlice, len(objs)) for i, obj := range objs { var buf bytes.Buffer |
︙ |
Changes to internal/kernel/cfg.go.
︙ | |||
170 171 172 173 174 175 176 177 | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | + - + - + + + + - + + - + - + + + + | cs.logger.Trace().Err(err).Msg("got config meta") if err != nil { return err } m := z.Meta cs.mxService.Lock() for key := range cs.orig.All() { var setErr error if val, ok := m.Get(key); ok { |
︙ |
Changes to internal/kernel/cmd.go.
︙ | |||
58 59 60 61 62 63 64 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | - + - - + + - + | sess.println("Unknown command:", cmd, strings.Join(args, " ")) sess.println("-- Enter 'help' go get a list of valid commands.") return true } func (sess *cmdSession) println(args ...string) { if len(args) > 0 { |
︙ | |||
106 107 108 109 110 111 112 | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | - + - + - + | } } return maxLen } func (sess *cmdSession) printRow(row []string, maxLen []int, prefix, delim string, pad rune) { for colno, column := range row { |
︙ | |||
500 501 502 503 504 505 506 | 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 | - + + + | sess.kern.dumpIndex(sess.w) return true } func cmdRefresh(sess *cmdSession, _ string, _ []string) bool { kern := sess.kern kern.logger.Mandatory().Msg("Refresh") |
︙ |
Changes to internal/kernel/config.go.
︙ | |||
57 58 59 60 61 62 63 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + | text = text + " (list)" } result = append(result, serviceConfigDescription{Key: k, Descr: text}) } return result } |
︙ |
Changes to internal/kernel/kernel.go.
︙ | |||
202 203 204 205 206 207 208 209 210 211 212 213 214 215 | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | + + | ) // Constants for web service keys. const ( WebAssetDir = "asset-dir" WebBaseURL = "base-url" WebListenAddress = "listen" WebLoopbackIdent = "loopback-ident" WebLoopbackZid = "loopback-zid" WebPersistentCookie = "persistent" WebProfiling = "profiling" WebMaxRequestSize = "max-request-size" WebSecureCookie = "secure" WebTokenLifetimeAPI = "api-lifetime" WebTokenLifetimeHTML = "html-lifetime" WebURLPrefix = "prefix" |
︙ | |||
251 252 253 254 255 256 257 | 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | - - - + + + | defaultNormalLogLevel = logger.InfoLevel defaultSimpleLogLevel = logger.ErrorLevel ) // Setup sets the most basic data of a software: its name, its version, // and when the version was created. func (kern *Kernel) Setup(progname, version string, versionTime time.Time) { |
︙ | |||
276 277 278 279 280 281 282 | 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | - + | if strSig := sig.String(); strSig != "" { kern.logger.Info().Str("signal", strSig).Msg("Shut down Zettelstore") } kern.doShutdown() kern.wg.Done() }() |
︙ | |||
306 307 308 309 310 311 312 | 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | - + - + | logger.Info().Msg("Read-only mode") } } if lineServer { port := kern.core.GetNextConfig(CorePort).(int) if port > 0 { listenAddr := net.JoinHostPort("127.0.0.1", strconv.Itoa(port)) |
︙ | |||
437 438 439 440 441 442 443 | 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 | - + - - + - + - | return errProfileInWork } if profileName == ProfileCPU { f, err := os.Create(fileName) if err != nil { return err } |
︙ |
Changes to internal/kernel/server.go.
︙ | |||
43 44 45 46 47 48 49 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | - + | if err != nil { // handle error kern.logger.Error().Err(err).Msg("Unable to accept connection") break } go handleLineConnection(conn, kern) } |
︙ | |||
65 66 67 68 69 70 71 | 65 66 67 68 69 70 71 72 73 | - + | s := bufio.NewScanner(conn) for s.Scan() { line := s.Text() if !cmds.executeLine(line) { break } } |
Changes to internal/kernel/web.go.
︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | + + | "net/url" "os" "path/filepath" "strconv" "strings" "sync" "time" "t73f.de/r/zsc/domain/id" "zettelstore.de/z/internal/logger" "zettelstore.de/z/internal/web/server" ) type webService struct { srvConfig |
︙ | |||
74 75 76 77 78 79 80 81 82 83 84 85 86 87 | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | + + | ap, err := netip.ParseAddrPort(val) if err != nil { return "", err } return ap.String(), nil }, true}, WebLoopbackIdent: {"Loopback user ident", ws.noFrozen(parseString), true}, WebLoopbackZid: {"Loopback user zettel identifier", ws.noFrozen(parseInvalidZid), true}, WebMaxRequestSize: {"Max Request Size", parseInt64, true}, WebPersistentCookie: {"Persistent cookie", parseBool, true}, WebProfiling: {"Runtime profiling", parseBool, true}, WebSecureCookie: {"Secure cookie", parseBool, true}, WebTokenLifetimeAPI: { "Token lifetime API", makeDurationParser(10*time.Minute, 0, 1*time.Hour), |
︙ | |||
103 104 105 106 107 108 109 110 111 112 113 114 115 116 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | + + | true, }, } ws.next = interfaceMap{ WebAssetDir: "", WebBaseURL: "http://127.0.0.1:23123/", WebListenAddress: "127.0.0.1:23123", WebLoopbackIdent: "", WebLoopbackZid: id.Invalid, WebMaxRequestSize: int64(16 * 1024 * 1024), WebPersistentCookie: false, WebSecureCookie: true, WebProfiling: false, WebTokenLifetimeAPI: 1 * time.Hour, WebTokenLifetimeHTML: 10 * time.Minute, WebURLPrefix: "/", |
︙ | |||
136 137 138 139 140 141 142 143 144 145 146 147 148 149 | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | + + | var errWrongBasePrefix = errors.New(WebURLPrefix + " does not match " + WebBaseURL) func (ws *webService) GetLogger() *logger.Logger { return ws.logger } func (ws *webService) Start(kern *Kernel) error { baseURL := ws.GetNextConfig(WebBaseURL).(string) listenAddr := ws.GetNextConfig(WebListenAddress).(string) loopbackIdent := ws.GetNextConfig(WebLoopbackIdent).(string) loopbackZid := ws.GetNextConfig(WebLoopbackZid).(id.Zid) urlPrefix := ws.GetNextConfig(WebURLPrefix).(string) persistentCookie := ws.GetNextConfig(WebPersistentCookie).(bool) secureCookie := ws.GetNextConfig(WebSecureCookie).(bool) profile := ws.GetNextConfig(WebProfiling).(bool) maxRequestSize := max(ws.GetNextConfig(WebMaxRequestSize).(int64), 1024) if !strings.HasSuffix(baseURL, urlPrefix) { |
︙ | |||
159 160 161 162 163 164 165 166 167 168 169 170 171 172 | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | + + | sd := server.ConfigData{ Log: ws.logger, ListenAddr: listenAddr, BaseURL: baseURL, URLPrefix: urlPrefix, MaxRequestSize: maxRequestSize, Auth: kern.auth.manager, LoopbackIdent: loopbackIdent, LoopbackZid: loopbackZid, PersistentCookie: persistentCookie, SecureCookie: secureCookie, Profiling: profile, } srvw := server.New(sd) err := kern.web.setupServer(srvw, kern.box.manager, kern.auth.manager, &kern.cfg) if err != nil { |
︙ |
Changes to internal/logger/message.go.
︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | + | import ( "context" "net/http" "strconv" "sync" "t73f.de/r/webs/ip" "t73f.de/r/zsc/domain/id" "t73f.de/r/zsc/domain/meta" ) // Message presents a message to log. type Message struct { logger *Logger |
︙ | |||
123 124 125 126 127 128 129 | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | - - - + + + + - - + - - - + | } } } } return m } |
Changes to internal/parser/cleaner.go.
︙ | |||
159 160 161 162 163 164 165 | 159 160 161 162 163 164 165 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | return newID } } } cv.ids[id] = node return id } |
Changes to internal/query/print.go.
︙ | |||
92 93 94 95 96 97 98 | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | - + - - + + - + | space bool } var bsSpace = []byte{' '} func (pe *PrintEnv) printSpace() { if pe.space { |
︙ |
Changes to internal/usecase/authenticate.go.
︙ | |||
48 49 50 51 52 53 54 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - + - + - + - + | // Parameter "r" is just included to produce better logging messages. It may be nil. Do not use it // for other purposes. func (uc *Authenticate) Run(ctx context.Context, r *http.Request, ident, credential string, d time.Duration, k auth.TokenKind) ([]byte, error) { identMeta, err := uc.ucGetUser.Run(ctx, ident) defer addDelay(time.Now(), 500*time.Millisecond, 100*time.Millisecond) if identMeta == nil || err != nil { |
︙ |
Changes to internal/web/adapter/api/request.go.
︙ | |||
81 82 83 84 85 86 87 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | - - - - - - - - - - - - - - - - - - - - + - + | func getPart(q url.Values, defPart partType) partType { if part, ok := partMap[q.Get(api.QueryKeyPart)]; ok { return part } return defPart } |
︙ |
Changes to internal/web/adapter/webui/favicon.go.
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + | filename := filepath.Join(baseDir, "favicon.ico") f, err := os.Open(filename) if err != nil { wui.log.Debug().Err(err).Msg("Favicon not found") http.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound) return } |
︙ |
Changes to internal/web/adapter/webui/forms.go.
︙ | |||
103 104 105 106 107 108 109 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | - + | } return nil } func uploadedContent(r *http.Request, m *meta.Meta) ([]byte, *meta.Meta) { file, fh, err := r.FormFile("file") if file != nil { |
︙ |
Changes to internal/web/adapter/webui/htmlgen.go.
︙ | |||
271 272 273 274 275 276 277 | 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | - - - - - - - - | sh, err := g.th.Evaluate(sx, &env) if err != nil { return nil, nil, err } return sh, shtml.Endnotes(&env), nil } |
︙ |
Changes to internal/web/adapter/webui/htmlmeta.go.
︙ | |||
110 111 112 113 114 115 116 | 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | - + + - + | return lb.List() } return nil } func (wui *WebUI) transformTagSet(key string, tags []string) *sx.Pair { var lb sx.ListBuilder |
︙ |
Changes to internal/web/adapter/webui/sxn_code.go.
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | - | return z.Meta, nil } dg := buildSxnCodeDigraph(ctx, id.ZidSxnStart, getMeta) if dg == nil { return nil, wui.rootBinding, nil } dg = dg.AddVertex(id.ZidSxnBase).AddEdge(id.ZidSxnStart, id.ZidSxnBase) |
︙ |
Changes to internal/web/adapter/webui/template.go.
︙ | |||
37 38 39 40 41 42 43 | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | - + + - - | "zettelstore.de/z/internal/parser" "zettelstore.de/z/internal/web/adapter" "zettelstore.de/z/internal/web/server" "zettelstore.de/z/internal/zettel" ) func (wui *WebUI) createRenderBinding() *sxeval.Binding { |
︙ | |||
98 99 100 101 102 103 104 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | - - - - - + + + + + + | var ( specials = []*sxeval.Special{ &sxbuiltins.QuoteS, &sxbuiltins.QuasiquoteS, // quote, quasiquote &sxbuiltins.UnquoteS, &sxbuiltins.UnquoteSplicingS, // unquote, unquote-splicing &sxbuiltins.DefVarS, // defvar &sxbuiltins.DefunS, &sxbuiltins.LambdaS, // defun, lambda |
︙ | |||
405 406 407 408 409 410 411 | 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 | - + + + | return wui.renderSxnTemplateStatus(ctx, w, http.StatusOK, templateID, bind) } func (wui *WebUI) renderSxnTemplateStatus(ctx context.Context, w http.ResponseWriter, code int, templateID id.Zid, bind *sxeval.Binding) error { detailObj, err := wui.evalSxnTemplate(ctx, templateID, bind) if err != nil { return err } |
︙ | |||
452 453 454 455 456 457 458 | 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 | - + | if errSx == nil { return } wui.log.Error().Err(errSx).Msg("while rendering error message") // if errBind != nil, the HTTP header was not written wui.prepareAndWriteHeader(w, http.StatusInternalServerError) |
︙ |
Changes to internal/web/server/http.go.
︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + + | import ( "context" "net" "net/http" "time" "t73f.de/r/zsc/api" "t73f.de/r/zsc/domain/id" "t73f.de/r/zsc/domain/meta" "zettelstore.de/z/internal/auth" "zettelstore.de/z/internal/logger" ) type webServer struct { log *logger.Logger baseURL string |
︙ | |||
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | + + + + | type ConfigData struct { Log *logger.Logger ListenAddr string BaseURL string URLPrefix string MaxRequestSize int64 Auth auth.TokenManager LoopbackIdent string LoopbackZid id.Zid PersistentCookie bool SecureCookie bool Profiling bool } // New creates a new web server. func New(sd ConfigData) Server { srv := webServer{ log: sd.Log, baseURL: sd.BaseURL, persistentCookie: sd.PersistentCookie, secureCookie: sd.SecureCookie, } rd := routerData{ log: sd.Log, urlPrefix: sd.URLPrefix, maxRequestSize: sd.MaxRequestSize, auth: sd.Auth, loopbackIdent: sd.LoopbackIdent, loopbackZid: sd.LoopbackZid, profiling: sd.Profiling, } srv.router.initializeRouter(rd) srv.httpServer.initializeHTTPServer(sd.ListenAddr, &srv.router) return &srv } |
︙ | |||
166 167 168 169 170 171 172 | 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | - + - + | // start the web server, but does not wait for its completion. func (srv *httpServer) start() error { ln, err := net.Listen("tcp", srv.Addr) if err != nil { return err } |
Changes to internal/web/server/router.go.
︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + | "io" "net/http" "net/http/pprof" "regexp" rtprf "runtime/pprof" "strings" "t73f.de/r/webs/ip" "t73f.de/r/zsc/domain/id" "zettelstore.de/z/internal/auth" "zettelstore.de/z/internal/logger" ) type ( methodHandler [methodLAST]http.Handler routingTable [256]*methodHandler ) var mapMethod = map[string]Method{ http.MethodHead: MethodHead, http.MethodGet: MethodGet, http.MethodPost: MethodPost, http.MethodPut: MethodPut, http.MethodDelete: MethodDelete, } // httpRouter handles all routing for zettelstore. type httpRouter struct { |
︙ | |||
131 132 133 134 135 136 137 | 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | - + | } func (rt *httpRouter) ServeHTTP(w http.ResponseWriter, r *http.Request) { var withDebug bool if msg := rt.log.Debug(); msg.Enabled() { withDebug = true w = &traceResponseWriter{original: w} |
︙ | |||
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | + + + + + + + + + + + + + - + - - + | } func (rt *httpRouter) addUserContext(r *http.Request) *http.Request { if rt.ur == nil { // No auth needed return r } ctx := r.Context() if rt.loopbackZid.IsValid() { if remoteAddr := ip.GetRemoteAddr(r); ip.IsLoopbackAddr(remoteAddr) { if user, err := rt.ur.GetUser(ctx, rt.loopbackZid, rt.loopbackIdent); err == nil { if user != nil { return r.WithContext(updateContext(ctx, user, nil)) } rt.log.Error().Str("loopback-ident", rt.loopbackIdent).Msg("No match to loopback-zid") } } } k := auth.KindAPI t := getHeaderToken(r) if len(t) == 0 { rt.log.Debug().Msg("no jwt token found") // IP already logged: ServeHTTP k = auth.KindwebUI t = getSessionToken(r) } if len(t) == 0 { rt.log.Debug().Msg("no auth token found in request") // IP already logged: ServeHTTP return r } tokenData, err := rt.auth.CheckToken(t, k) if err != nil { |
︙ |
Changes to tests/client/client_test.go.
︙ | |||
46 47 48 49 50 51 52 | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | - - - - + + + + | } } } func TestListZettel(t *testing.T) { const ( |
︙ | |||
438 439 440 441 442 443 444 | 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 | - + - + | search := "emoji" + api.ActionSeparator + api.RedirectAction ub := c.NewURLBuilder('z').AppendQuery(search) respRedirect, err := http.Get(ub.String()) if err != nil { t.Error(err) return } |
︙ |
Changes to tests/markdown_test.go.
︙ | |||
78 79 80 81 82 83 84 | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | - + - + - + - + - + | } func testAllEncodings(t *testing.T, tc markdownTestCase, ast *ast.BlockSlice) { var sb strings.Builder testID := tc.Example*100 + 1 for _, enc := range encodings { t.Run(fmt.Sprintf("Encode %v %v", enc, testID), func(*testing.T) { |
Changes to tests/naughtystrings_test.go.
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | - + | func getNaughtyStrings() (result []string, err error) { fpath := filepath.Join("..", "testdata", "naughty", "blns.txt") file, err := os.Open(fpath) if err != nil { return nil, err } |
︙ |
Changes to tests/regression_test.go.
︙ | |||
91 92 93 94 95 96 97 | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | - + + + + | } func resultFile(file string) (data string, err error) { f, err := os.Open(file) if err != nil { return "", err } |
︙ | |||
123 124 125 126 127 128 129 | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | - + | } func checkMetaFile(t *testing.T, resultName string, zn *ast.ZettelNode, enc api.EncodingEnum) { t.Helper() if enc := encoder.Create(enc, &encoder.CreateParameter{Lang: meta.ValueLangEN}); enc != nil { var sf strings.Builder |
︙ |
Changes to tools/build/build.go.
︙ | |||
166 167 168 169 170 171 172 | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | - + - + | return err } zipName := filepath.Join(path, "manual-"+base+".zip") zipFile, err := os.OpenFile(zipName, os.O_RDWR|os.O_CREATE, 0600) if err != nil { return err } |
︙ | |||
200 201 202 203 204 205 206 | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | - + | if err != nil { return err } manualFile, err := os.Open(filepath.Join(path, name)) if err != nil { return err } |
︙ | |||
222 223 224 225 226 227 228 | 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | - - + | var buf bytes.Buffer if _, err = fmt.Fprintf(&buf, "id: %s\n", versionZid); err != nil { return err } if _, err = m.WriteComputed(&buf); err != nil { return err } |
︙ | |||
286 287 288 289 290 291 292 | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | - + - - + + - - + - - + - - + | } func createReleaseZip(zsName, zipName, fileName string) error { zipFile, err := os.OpenFile(filepath.Join("releases", zipName), os.O_RDWR|os.O_CREATE, 0600) if err != nil { return err } |
︙ |
Changes to tools/testapi/testapi.go.
︙ | |||
88 89 90 91 92 93 94 | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | - - - + + + + + - + | func stopZettelstore(i *zsInfo) error { conn, err := net.Dial("tcp", i.adminAddress) if err != nil { fmt.Println("Unable to stop Zettelstore") return err } |
Changes to tools/tools.go.
︙ | |||
93 94 95 96 97 98 99 100 101 102 103 104 105 106 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | + + + | return err } if err := checkUnparam(forRelease); err != nil { return err } if err := checkRevive(); err != nil { return err } if err := checkErrCheck(); err != nil { return err } if forRelease { if err := checkGoVulncheck(); err != nil { return err } } return checkFossilExtra() |
︙ | |||
164 165 166 167 168 169 170 171 172 173 174 175 176 177 | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | + + + + + + + + + + + | func checkRevive() error { out, err := ExecuteCommand(EnvGoVCS, "revive", "./...") if err != nil || out != "" { fmt.Fprintln(os.Stderr, "Some revive problems found") if len(out) > 0 { fmt.Fprintln(os.Stderr, out) } } return err } func checkErrCheck() error { out, err := ExecuteCommand(EnvGoVCS, "errcheck", "./...") if err != nil || out != "" { fmt.Fprintln(os.Stderr, "Some errcheck problems found") if len(out) > 0 { fmt.Fprintln(os.Stderr, out) } } return err } func checkUnparam(forRelease bool) error { path, err := findExecStrict("unparam", forRelease) if path == "" { |
︙ |
Changes to www/changes.wiki.
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | + + + + + + + + | <title>Change Log</title> <a id="0_22"></a> <h2>Changes for Version 0.22.0 (pending)</h2> * Remove zettel for Sx prelude. Luckily, it was never documented. So nobody used this zettel. Now the prelude is a constant string in Sx. (breaking) * If authentication is enabled, allow to access Zettelstore from loopback device without logging in / get an access token. (major: api, webui) * Move context link to zettel page. (minor: webui) <a id="0_21"></a> <h2>Changes for Version 0.21.0 (2025-04-17)</h2> * Zettel identifier of Zettelstore Log, Zettelstore Memory, and Zettelstore Sx Engine changed. See manual for new identifier. (breaking) * Sz encodings of links were simplified into one <code>LINK</code> symbol. |
︙ |