@gesslar/toolkit 3.21.0 → 3.22.0

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/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "gesslar",
6
6
  "url": "https://gesslar.dev"
7
7
  },
8
- "version": "3.21.0",
8
+ "version": "3.22.0",
9
9
  "license": "Unlicense",
10
10
  "homepage": "https://github.com/gesslar/toolkit#readme",
11
11
  "repository": {
@@ -9,8 +9,8 @@ import path from "node:path"
9
9
  import {URL} from "node:url"
10
10
 
11
11
  import Data from "../../browser/lib/Data.js"
12
- import FS from "./FileSystem.js"
13
12
  import FileObject from "./FileObject.js"
13
+ import FS from "./FileSystem.js"
14
14
  import Sass from "./Sass.js"
15
15
  import Valid from "./Valid.js"
16
16
  import VFileObject from "./VFileObject.js"
@@ -531,6 +531,60 @@ export default class DirectoryObject extends FS {
531
531
  return candidateDir === this.path
532
532
  }
533
533
 
534
+ /**
535
+ * Resolves an absolute virtual path from cap root and validates it stays within cap boundary.
536
+ *
537
+ * @private
538
+ * @param {string} absolutePath - Absolute virtual path starting with separator
539
+ * @returns {string} Normalized resolved virtual path
540
+ * @throws {Sass} If path would be out of bounds
541
+ */
542
+ #resolveAndValidateFromCap(absolutePath) {
543
+ const relativeFromCap = Data.chopLeft(absolutePath, this.sep)
544
+ const resolvedVirtualPath = FS.resolvePath(this.cap.path, relativeFromCap)
545
+ const normalized = FS.fixSlashes(resolvedVirtualPath)
546
+
547
+ // Validate cap boundary using real paths
548
+ const relativeFromCapForReal = normalized.startsWith(this.sep)
549
+ ? Data.chopLeft(normalized, this.sep)
550
+ : normalized
551
+ const resolvedRealPath = FS.resolvePath(
552
+ this.cap.real.path,
553
+ relativeFromCapForReal
554
+ )
555
+
556
+ if(!FS.pathContains(this.cap.real.path, resolvedRealPath)) {
557
+ throw Sass.new(`${normalized} would be out of bounds (cap: ${this.cap.path}).`)
558
+ }
559
+
560
+ return normalized
561
+ }
562
+
563
+ /**
564
+ * Validates that a resolved virtual path stays within the cap boundary.
565
+ *
566
+ * @private
567
+ * @param {string} virtualPath - Resolved virtual path
568
+ * @returns {string} Normalized virtual path
569
+ * @throws {Sass} If path would be out of bounds
570
+ */
571
+ #validateCapBoundary(virtualPath) {
572
+ const normalized = FS.fixSlashes(virtualPath)
573
+ const relativeFromCap = normalized.startsWith(this.sep)
574
+ ? Data.chopLeft(normalized, this.sep)
575
+ : normalized
576
+ const resolvedRealPath = FS.resolvePath(
577
+ this.cap.real.path,
578
+ relativeFromCap
579
+ )
580
+
581
+ if(!FS.pathContains(this.cap.real.path, resolvedRealPath)) {
582
+ throw Sass.new(`${normalized} would be out of bounds (cap: ${this.cap.path}).`)
583
+ }
584
+
585
+ return normalized
586
+ }
587
+
534
588
  /**
535
589
  * Creates a new DirectoryObject by extending this directory's path.
536
590
  *
@@ -555,11 +609,34 @@ export default class DirectoryObject extends FS {
555
609
  getDirectory(dir) {
556
610
  Valid.type(dir, "String", {allowEmpty: false})
557
611
 
612
+ // Handle VDirectoryObject with absolute virtual paths (starting with "/")
613
+ if(this.isVirtual && dir.startsWith(this.sep)) {
614
+ const normalized = this.#resolveAndValidateFromCap(dir)
615
+
616
+ return new this.constructor(normalized, this)
617
+ }
618
+
619
+ // Regular resolution
558
620
  const newPath = FS.resolvePath(this.path, dir)
559
621
 
560
- Valid.assert(this.#isLocal(newPath), `${newPath} would be out of bounds.`)
622
+ // Validate bounds
623
+ if(!this.isVirtual) {
624
+ // Regular DO: enforce local-only constraint
625
+ Valid.assert(this.#isLocal(newPath), `${newPath} would be out of bounds.`)
626
+
627
+ return new this.constructor(newPath, this)
628
+ }
629
+
630
+ // VDO relative paths: only allow nested if explicitly prefixed with ./
631
+ // This maintains security while allowing explicit relative navigation
632
+ if(dir.includes(this.sep) && !dir.startsWith(`.${this.sep}`)) {
633
+ throw Sass.new(`${dir} would be out of bounds. Use "./${dir}" for nested paths or chain getDirectory() calls.`)
634
+ }
635
+
636
+ // VDO relative paths: validate cap boundary and pass resolved path
637
+ const normalized = this.#validateCapBoundary(newPath)
561
638
 
562
- return new this.constructor(newPath, this)
639
+ return new this.constructor(normalized, this)
563
640
  }
564
641
 
565
642
  /**
@@ -569,31 +646,58 @@ export default class DirectoryObject extends FS {
569
646
  * duplication. The resulting FileObject can be used for reading, writing,
570
647
  * and other file operations.
571
648
  *
649
+ * For regular DirectoryObject: only allows direct children (local only).
650
+ * For VDirectoryObject: supports absolute virtual paths (starting with "/")
651
+ * which resolve from cap root, and relative paths from current directory.
652
+ *
572
653
  * When called on a VDirectoryObject, returns a VFileObject to maintain
573
654
  * virtual path semantics.
574
655
  *
575
- * @param {string} file - The filename to append (can include subdirectories like "src/index.js")
656
+ * @param {string} file - The filename to append
576
657
  * @returns {FileObject|VFileObject} A new FileObject (or VFileObject if virtual)
577
658
  * @throws {Sass} If filename is not a string
659
+ * @throws {Sass} If path would be out of bounds
578
660
  * @example
579
661
  * const dir = new DirectoryObject("/projects/git/toolkit")
580
662
  * const file = dir.getFile("package.json")
581
663
  * console.log(file.path) // "/projects/git/toolkit/package.json"
582
664
  *
583
665
  * @example
584
- * // Can include nested paths
585
- * const file = dir.getFile("src/index.js")
586
- * const data = await file.read()
666
+ * // VDirectoryObject with absolute virtual path
667
+ * const vdo = new TempDirectoryObject("myapp")
668
+ * const file = vdo.getFile("/config/settings.json")
669
+ * // Virtual path: /config/settings.json, Real path: {vdo.real.path}/config/settings.json
587
670
  */
588
671
  getFile(file) {
589
672
  Valid.type(file, "String", {allowEmpty: false})
590
673
 
591
- const newPath = FS.resolvePath(this.path, file)
674
+ // Handle VDirectoryObject with absolute virtual paths (starting with "/")
675
+ if(this.isVirtual && file.startsWith(this.sep)) {
676
+ const normalized = this.#resolveAndValidateFromCap(file)
592
677
 
593
- Valid.assert(this.#isLocal(newPath), `${newPath} would be out of bounds.`)
678
+ return new VFileObject(normalized, this)
679
+ }
594
680
 
595
- return this.isVirtual
596
- ? new VFileObject(file, this)
597
- : new FileObject(file, this)
681
+ // Regular resolution
682
+ const resolvedPath = FS.resolvePath(this.path, file)
683
+
684
+ // Validate bounds
685
+ if(!this.isVirtual) {
686
+ // Regular DO: enforce local-only constraint
687
+ Valid.assert(this.#isLocal(resolvedPath), `${resolvedPath} would be out of bounds.`)
688
+
689
+ return new FileObject(file, this)
690
+ }
691
+
692
+ // VDO relative paths: only allow nested if explicitly prefixed with ./
693
+ // This maintains security while allowing explicit relative navigation
694
+ if(file.includes(this.sep) && !file.startsWith(`.${this.sep}`)) {
695
+ throw Sass.new(`${file} would be out of bounds. Use "./${file}" for nested paths or chain getFile() calls.`)
696
+ }
697
+
698
+ // VDO relative paths: validate cap boundary and pass resolved path
699
+ const normalized = this.#validateCapBoundary(resolvedPath)
700
+
701
+ return new VFileObject(normalized, this)
598
702
  }
599
703
  }
@@ -149,7 +149,13 @@ class Glog {
149
149
  this.#logLevel = options.debugLevel ?? options.logLevel ?? this.#logLevel
150
150
  this.#logPrefix = options.prefix ?? this.#logPrefix
151
151
  this.#colours = options.colours ?? this.#colours
152
- this.#symbols = options.symbols ?? this.#symbols
152
+
153
+ if(options.symbols) {
154
+ const base = this.#symbols ?? logSymbols
155
+
156
+ this.#symbols = Object.assign({}, base, options.symbols)
157
+ }
158
+
153
159
  this.#stackTrace = options.stackTrace ?? this.#stackTrace
154
160
  this.#tagsAsStrings = options.tagsAsStrings ?? this.#tagsAsStrings
155
161
  this.#displayName = options.displayName ?? this.#displayName
@@ -4,6 +4,7 @@
4
4
  * Extends FileObject with virtual path support and real filesystem mapping.
5
5
  */
6
6
 
7
+ import DirectoryObject from "./DirectoryObject.js"
7
8
  import FileObject from "./FileObject.js"
8
9
  import FS from "./FileSystem.js"
9
10
  import Valid from "./Valid.js"
@@ -34,20 +35,55 @@ export default class VFileObject extends FileObject {
34
35
  /**
35
36
  * Constructs a VFileObject instance.
36
37
  *
37
- * @param {string} fileName - The file path
38
- * @param {VDirectoryObject} parent - The parent virtual directory (required)
38
+ * @param {string} virtualPath - The virtual file path (already resolved, can be nested like "/path/to/file.ext")
39
+ * @param {VDirectoryObject} parent - The parent virtual directory (required, used for cap reference)
39
40
  */
40
- constructor(fileName, parent) {
41
- Valid.type(fileName, "String", {allowEmpty: false})
41
+ constructor(virtualPath, parent) {
42
+ Valid.type(virtualPath, "String", {allowEmpty: false})
42
43
  Valid.type(parent, "VDirectoryObject")
43
44
 
44
- super(fileName, parent)
45
+ // Normalize the virtual path
46
+ const normalizedVirtual = FS.fixSlashes(virtualPath)
45
47
 
46
- const parentRealPath = this.parent.real.path
47
- const resolved = FS.resolvePath(this.parent.path, fileName)
48
- const {base} = FS.pathParts(resolved)
48
+ // Extract the directory and filename from the virtual path
49
+ const {dir: virtualDir, base} = FS.pathParts(normalizedVirtual)
49
50
 
50
- this.#real = new FileObject(base, parentRealPath)
51
+ // Determine the virtual parent directory
52
+ // If virtualDir is "/" or empty or equals cap path, use the cap root
53
+ // Otherwise, construct the parent directory path relative to cap
54
+ let virtualParent
55
+ if(!virtualDir || virtualDir === "/" || virtualDir === parent.cap.path) {
56
+ virtualParent = parent.cap
57
+ } else {
58
+ // virtualDir is something like "/path/to" - we need to create a VDirectoryObject for it
59
+ // Strip leading "/" if present to make it relative to cap
60
+ const dirRelativeToCap = virtualDir.startsWith("/") ? virtualDir.slice(1) : virtualDir
61
+ // Use the VDirectoryObject constructor to create the parent directory
62
+ virtualParent = new parent.constructor(dirRelativeToCap, parent.cap)
63
+ }
64
+
65
+ // Call super with just the filename and the virtual parent
66
+ // This ensures FileObject sets up the virtual path correctly
67
+ super(base, virtualParent)
68
+
69
+ // Convert virtual path to real path
70
+ // The virtual path is relative to the cap root, so we resolve it relative to cap's real path
71
+ const capRealPath = parent.cap.real.path
72
+
73
+ // Strip leading "/" from virtual path if present to make it relative
74
+ const relativeFromCap = normalizedVirtual.startsWith("/")
75
+ ? normalizedVirtual.slice(1)
76
+ : normalizedVirtual
77
+
78
+ // Resolve the real filesystem path
79
+ const realPath = FS.resolvePath(capRealPath, relativeFromCap)
80
+
81
+ // Create FileObject with the full real path
82
+ // Extract directory and filename parts
83
+ const {dir: realDir, base: realBase} = FS.pathParts(realPath)
84
+ const realParentDir = new DirectoryObject(realDir)
85
+
86
+ this.#real = new FileObject(realBase, realParentDir)
51
87
  }
52
88
 
53
89
  get isVirtual() {
@@ -276,21 +276,27 @@ export default class DirectoryObject extends FS {
276
276
  * duplication. The resulting FileObject can be used for reading, writing,
277
277
  * and other file operations.
278
278
  *
279
+ * For regular DirectoryObject: only allows direct children (local only).
280
+ * For VDirectoryObject: supports absolute virtual paths (starting with "/")
281
+ * which resolve from cap root, and relative paths from current directory.
282
+ *
279
283
  * When called on a VDirectoryObject, returns a VFileObject to maintain
280
284
  * virtual path semantics.
281
285
  *
282
- * @param {string} file - The filename to append (can include subdirectories like "src/index.js")
286
+ * @param {string} file - The filename to append
283
287
  * @returns {FileObject|VFileObject} A new FileObject (or VFileObject if virtual)
284
288
  * @throws {Sass} If filename is not a string
289
+ * @throws {Sass} If path would be out of bounds
285
290
  * @example
286
291
  * const dir = new DirectoryObject("/projects/git/toolkit")
287
292
  * const file = dir.getFile("package.json")
288
293
  * console.log(file.path) // "/projects/git/toolkit/package.json"
289
294
  *
290
295
  * @example
291
- * // Can include nested paths
292
- * const file = dir.getFile("src/index.js")
293
- * const data = await file.read()
296
+ * // VDirectoryObject with absolute virtual path
297
+ * const vdo = new TempDirectoryObject("myapp")
298
+ * const file = vdo.getFile("/config/settings.json")
299
+ * // Virtual path: /config/settings.json, Real path: {vdo.real.path}/config/settings.json
294
300
  */
295
301
  getFile(file: string): FileObject | VFileObject;
296
302
  #private;
@@ -1 +1 @@
1
- {"version":3,"file":"DirectoryObject.d.ts","sourceRoot":"","sources":["../../../src/node/lib/DirectoryObject.js"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH;IA2DE;;;;;;;;;OASG;IACH,kBALa,eAAe,CAO3B;IA3CD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ED;;;;;OAKG;IACH,sBAHW,MAAM,GACJ,OAAO,CAAC,OAAO,CAAC,CAO5B;IAUD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,kBAdW,MAAM,GACJ,eAAe,CAqB3B;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,cAbW,MAAM,GACJ,UAAU,GAAC,WAAW,CAsBlC;;CACF;eA3kBc,iBAAiB;uBACT,iBAAiB;wBAGhB,kBAAkB"}
1
+ {"version":3,"file":"DirectoryObject.d.ts","sourceRoot":"","sources":["../../../src/node/lib/DirectoryObject.js"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH;IA2DE;;;;;;;;;OASG;IACH,kBALa,eAAe,CAO3B;IA3CD;;;;OAIG;IACH,uBAFW,MAAM,OAAC,EA0BjB;IA2BD;;;;OAIG;IACH,cAFa,OAAO,CAAC,OAAO,CAAC,CAI5B;IAED;;;;OAIG;IACH,gBAFa,MAAM,CAIlB;IAED;;;;OAIG;IACH,YAFa,MAAM,CAIlB;IAED;;;;OAIG;IACH,WAFa,GAAG,CAIf;IAED;;;;OAIG;IACH,YAFa,MAAM,CAIlB;IAED;;;;OAIG;IACH,cAFa,MAAM,CAIlB;IAED;;;;OAIG;IACH,iBAFa,MAAM,CAIlB;IAED;;;;OAIG;IACH,WAFa,MAAM,CAIlB;IAED;;;;;;;OAOG;IACH,aALa,KAAK,CAAC,MAAM,CAAC,CAOzB;IAED;;;;;;;;;;;;OAYG;IACH,cARa,eAAe,GAAC,IAAI,CAsBhC;IAED;;;;OAIG;IACH,mBAFa,OAAO,CAInB;IAmBD;;;;;;;;;;;;;;;;;;OAkBG;IACH,WAZW,MAAM,GACJ,OAAO,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC,UAAU,GAAC,WAAW,CAAC,CAAC;QAAC,WAAW,EAAE,KAAK,CAAC,eAAe,GAAC,gBAAgB,CAAC,CAAA;KAAC,CAAC,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cAHW,MAAM,UACH,OAAO,EAAA,QAKpB;IAED;;;;;OAKG;IACH,eAHW,MAAM,UACH,OAAO,EAAA,QAKpB;IA8BD;;;;;OAKG;IACH,iBAFc,OAAO,EAAA,QAIpB;IAID;;;;;;OAMG;IACH,mBAJW,KAAK,CAAC,MAAM,CAAC,aACV,OAAO,EAAA,QAQpB;IAeD;;;;;OAKG;IACH,iBAHW,MAAM,WACH,OAAO,EAAA,QAIpB;IAgGD;;;;OAIG;IACH,eAFc,OAAO,EAAA,QASpB;IAED;;OAEG;IACH,iBAEC;IAED;;;;;OAKG;IACH,oBAHW,MAAM,UACN,MAAM,QAIhB;IAED;;;;OAIG;IACH,mBAFW,MAAM,QAIhB;IAED;;;;OAIG;IACH,sBAFW,MAAM,QAchB;IAED;;;;;;;;;OASG;IACH,YAPW,MAAM,QAAQ,mBACd,MAAM,GAAG,MAAM,YAEvB;QAAgC,UAAU,GAAlC,KAAK,CAAC,MAAM,CAAC;QACK,UAAU,GAA5B,OAAO;QACW,aAAa,GAA/B,OAAO;KACjB,QAkBA;IA4CD;;;;OAIG;IACH,mBAEC;IAED;;;;;;;;;;;;;OAaG;IACH,WAXa,MAAM,CAuBlB;;CA6BF"}
1
+ {"version":3,"file":"Glog.d.ts","sourceRoot":"","sources":["../../../src/node/lib/Glog.js"],"names":[],"mappings":"AAmBA;;;;;;;;;;GAUG;AACH,4BARU,MAAM,CAqBf;AAED;;;;;;;;;GASG;AACH,yBAPU,MAAM,CAaf;;;AAYD;IAEE,wBAAmB;IACnB,yBAAqB;IACrB,oBAAqB;IACrB,2BAAyB;IACzB,oBAAgB;IAChB,8BAA4B;IAC5B,oBAAqB;IAsFrB;;;;;OAKG;IACH,4BAHW,MAAM,GACJ,OAAO,IAAI,CAMvB;IAED;;;;;OAKG;IACH,0BAHW,MAAM,GACJ,OAAO,IAAI,CAMvB;IAED;;;;;OAKG;IACH,sBAHW,MAAM,GACJ,OAAO,IAAI,CAMvB;IAED;;;;;;;;;;OAUG;IAC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H,eAHW,MAAM,UACH,OAAO,EAAA,QAKpB;IA8BD;;;;;OAKG;IACH,iBAFc,OAAO,EAAA,QAIpB;IAID;;;;;;OAMG;IACH,mBAJW,KAAK,CAAC,MAAM,CAAC,aACV,OAAO,EAAA,QAQpB;IAeD;;;;;OAKG;IACH,iBAHW,MAAM,WACH,OAAO,EAAA,QAIpB;IAgGD;;;;OAIG;IACH,eAFc,OAAO,EAAA,QASpB;IAED;;OAEG;IACH,iBAEC;IAED;;;;;OAKG;IACH,oBAHW,MAAM,UACN,MAAM,QAIhB;IAED;;;;OAIG;IACH,mBAFW,MAAM,QAIhB;IAED;;;;OAIG;IACH,sBAFW,MAAM,QAchB;IAED;;;;;;;;;OASG;IACH,YAPW,MAAM,QAAQ,mBACd,MAAM,GAAG,MAAM,YAEvB;QAAgC,UAAU,GAAlC,KAAK,CAAC,MAAM,CAAC;QACK,UAAU,GAA5B,OAAO;QACW,aAAa,GAA/B,OAAO;KACjB,QAkBA;IA4CD;;;;OAIG;IACH,mBAEC;IAED;;;;;;;;;;;;;OAaG;IACH,WAXa,MAAM,CAuBlB;;CA6BF"}
@@ -21,10 +21,10 @@ export default class VFileObject extends FileObject {
21
21
  /**
22
22
  * Constructs a VFileObject instance.
23
23
  *
24
- * @param {string} fileName - The file path
25
- * @param {VDirectoryObject} parent - The parent virtual directory (required)
24
+ * @param {string} virtualPath - The virtual file path (already resolved, can be nested like "/path/to/file.ext")
25
+ * @param {VDirectoryObject} parent - The parent virtual directory (required, used for cap reference)
26
26
  */
27
- constructor(fileName: string, parent: VDirectoryObject);
27
+ constructor(virtualPath: string, parent: VDirectoryObject);
28
28
  get isVirtual(): boolean;
29
29
  get real(): FileObject;
30
30
  #private;
@@ -1 +1 @@
1
- {"version":3,"file":"VFileObject.d.ts","sourceRoot":"","sources":["../../../src/node/lib/VFileObject.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;IAGE;;;;;OAKG;IACH,sBAHW,MAAM,UACN,gBAAgB,EAa1B;IAED,yBAEC;IAED,uBAEC;;CACF;uBArDsB,iBAAiB"}
1
+ {"version":3,"file":"VFileObject.d.ts","sourceRoot":"","sources":["../../../src/node/lib/VFileObject.js"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;IAGE;;;;;OAKG;IACH,yBAHW,MAAM,UACN,gBAAgB,EAgD1B;IAED,yBAEC;IAED,uBAEC;;CACF;uBAxFsB,iBAAiB"}