@gesslar/toolkit 0.7.1 → 0.8.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 +7 -7
- package/src/lib/Data.js +24 -0
- package/src/lib/FileObject.js +70 -13
- package/src/types/lib/Data.d.ts +17 -0
- package/src/types/lib/Data.d.ts.map +1 -1
- package/src/types/lib/FileObject.d.ts +31 -1
- package/src/types/lib/FileObject.d.ts.map +1 -1
- package/src/types/lib/Util.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gesslar/toolkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Get in, bitches, we're going toolkitting.",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"sideEffects": false,
|
|
19
19
|
"engines": {
|
|
20
|
-
"node": ">=
|
|
20
|
+
"node": ">=20"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"types:build": "tsc -p tsconfig.types.json",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@stylistic/eslint-plugin": "^5.5.0",
|
|
61
|
-
"@types/node": "^24.
|
|
62
|
-
"@typescript-eslint/eslint-plugin": "^8.46.
|
|
63
|
-
"@typescript-eslint/parser": "^8.46.
|
|
64
|
-
"eslint": "^9.
|
|
65
|
-
"eslint-plugin-jsdoc": "^61.1.
|
|
61
|
+
"@types/node": "^24.10.0",
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "^8.46.3",
|
|
63
|
+
"@typescript-eslint/parser": "^8.46.3",
|
|
64
|
+
"eslint": "^9.39.1",
|
|
65
|
+
"eslint-plugin-jsdoc": "^61.1.12"
|
|
66
66
|
}
|
|
67
67
|
}
|
package/src/lib/Data.js
CHANGED
|
@@ -410,4 +410,28 @@ export default class Data {
|
|
|
410
410
|
|
|
411
411
|
return proto === current
|
|
412
412
|
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Checks if a value is binary data.
|
|
416
|
+
* Returns true for ArrayBuffer, TypedArrays (Uint8Array, Int16Array, etc.),
|
|
417
|
+
* Blob, and Node Buffer instances.
|
|
418
|
+
*
|
|
419
|
+
* @param {unknown} value - The value to check
|
|
420
|
+
* @returns {boolean} True if the value is binary data, false otherwise
|
|
421
|
+
* @example
|
|
422
|
+
* Data.isBinary(new Uint8Array([1, 2, 3])) // true
|
|
423
|
+
* Data.isBinary(new ArrayBuffer(10)) // true
|
|
424
|
+
* Data.isBinary(Buffer.from('hello')) // true
|
|
425
|
+
* Data.isBinary(new Blob(['text'])) // true
|
|
426
|
+
* Data.isBinary('string') // false
|
|
427
|
+
* Data.isBinary({}) // false
|
|
428
|
+
* Data.isBinary(undefined) // false
|
|
429
|
+
*/
|
|
430
|
+
static isBinary(value) {
|
|
431
|
+
return (value !== undefined) &&
|
|
432
|
+
(
|
|
433
|
+
ArrayBuffer.isView(value) ||
|
|
434
|
+
Data.isType(value, "ArrayBuffer|Blob|Buffer")
|
|
435
|
+
)
|
|
436
|
+
}
|
|
413
437
|
}
|
package/src/lib/FileObject.js
CHANGED
|
@@ -355,15 +355,39 @@ export default class FileObject extends FS {
|
|
|
355
355
|
* @returns {Promise<string>} The file contents
|
|
356
356
|
*/
|
|
357
357
|
async read(encoding="utf8") {
|
|
358
|
-
const
|
|
358
|
+
const url = this.url
|
|
359
|
+
|
|
360
|
+
if(!url)
|
|
361
|
+
throw Sass.new("No URL in file map")
|
|
362
|
+
|
|
363
|
+
if(!(await this.exists))
|
|
364
|
+
throw Sass.new(`No such file '${url.href}'`)
|
|
365
|
+
|
|
366
|
+
return await fs.readFile(url, encoding)
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Reads binary data from a file asynchronously.
|
|
371
|
+
* Returns the file contents as a Buffer (Node.js binary data type).
|
|
372
|
+
*
|
|
373
|
+
* @returns {Promise<Buffer>} The file contents as a Buffer
|
|
374
|
+
* @throws {Sass} If the file URL is invalid
|
|
375
|
+
* @throws {Sass} If the file does not exist
|
|
376
|
+
* @example
|
|
377
|
+
* const file = new FileObject('./image.png')
|
|
378
|
+
* const buffer = await file.readBinary()
|
|
379
|
+
* // Use the buffer (e.g., send in HTTP response, process image, etc.)
|
|
380
|
+
*/
|
|
381
|
+
async readBinary() {
|
|
382
|
+
const url = this.url
|
|
359
383
|
|
|
360
|
-
if(!
|
|
361
|
-
throw Sass.new("No
|
|
384
|
+
if(!url)
|
|
385
|
+
throw Sass.new("No URL in file map")
|
|
362
386
|
|
|
363
387
|
if(!(await this.exists))
|
|
364
|
-
throw Sass.new(`No such file '${
|
|
388
|
+
throw Sass.new(`No such file '${url.href}'`)
|
|
365
389
|
|
|
366
|
-
return await fs.readFile(
|
|
390
|
+
return await fs.readFile(url)
|
|
367
391
|
}
|
|
368
392
|
|
|
369
393
|
/**
|
|
@@ -373,22 +397,55 @@ export default class FileObject extends FS {
|
|
|
373
397
|
* @param {string} content - The content to write
|
|
374
398
|
* @param {string} [encoding] - The encoding in which to write (default: "utf8")
|
|
375
399
|
* @returns {Promise<void>}
|
|
376
|
-
* @throws {Sass} If the file
|
|
400
|
+
* @throws {Sass} If the file URL is invalid or the parent directory doesn't exist
|
|
377
401
|
* @example
|
|
378
402
|
* const file = new FileObject('./output/data.json')
|
|
379
403
|
* await file.write(JSON.stringify({key: 'value'}))
|
|
380
404
|
*/
|
|
381
405
|
async write(content, encoding="utf8") {
|
|
382
|
-
if(!this.
|
|
383
|
-
throw Sass.new("No
|
|
406
|
+
if(!this.url)
|
|
407
|
+
throw Sass.new("No URL in file")
|
|
384
408
|
|
|
385
409
|
if(await this.directory.exists)
|
|
386
|
-
await fs.writeFile(this.
|
|
410
|
+
await fs.writeFile(this.url, content, encoding)
|
|
387
411
|
|
|
388
412
|
else
|
|
389
413
|
throw Sass.new(`Invalid directory, ${this.directory.url.href}`)
|
|
390
414
|
}
|
|
391
415
|
|
|
416
|
+
/**
|
|
417
|
+
* Writes binary data to a file asynchronously.
|
|
418
|
+
* Validates that the parent directory exists and that the data is valid binary format.
|
|
419
|
+
* Supports ArrayBuffer, TypedArrays (Uint8Array, etc.), Blob, and Node Buffer types.
|
|
420
|
+
*
|
|
421
|
+
* @param {ArrayBuffer|Blob|Buffer} data - The binary data to write
|
|
422
|
+
* @returns {Promise<void>}
|
|
423
|
+
* @throws {Sass} If the file URL is invalid
|
|
424
|
+
* @throws {Sass} If the parent directory doesn't exist
|
|
425
|
+
* @throws {Sass} If the data is not a valid binary type
|
|
426
|
+
* @example
|
|
427
|
+
* const file = new FileObject('./output/image.png')
|
|
428
|
+
* const response = await fetch('https://example.com/image.png')
|
|
429
|
+
* const buffer = await response.arrayBuffer()
|
|
430
|
+
* await file.writeBinary(buffer)
|
|
431
|
+
*/
|
|
432
|
+
async writeBinary(data) {
|
|
433
|
+
if(!this.url)
|
|
434
|
+
throw Sass.new("No URL in file")
|
|
435
|
+
|
|
436
|
+
const exists = await this.directory.exists
|
|
437
|
+
Valid.assert(exists, `Invalid directory, ${this.directory.url.href}`)
|
|
438
|
+
|
|
439
|
+
Valid.assert(Data.isBinary(data), "Data must be binary (ArrayBuffer, TypedArray, Blob, or Buffer)")
|
|
440
|
+
|
|
441
|
+
// Convert ArrayBuffer to Buffer if needed (fs.writeFile doesn't accept ArrayBuffer directly)
|
|
442
|
+
const bufferData = data instanceof ArrayBuffer ? Buffer.from(data) : data
|
|
443
|
+
|
|
444
|
+
// According to the internet, if it's already binary, I don't need
|
|
445
|
+
// an encoding. 🤷
|
|
446
|
+
return await fs.writeFile(this.url, bufferData)
|
|
447
|
+
}
|
|
448
|
+
|
|
392
449
|
/**
|
|
393
450
|
* Loads an object from JSON or YAML file.
|
|
394
451
|
* Attempts to parse content as JSON5 first, then falls back to YAML if specified.
|
|
@@ -459,14 +516,14 @@ export default class FileObject extends FS {
|
|
|
459
516
|
* await file.delete()
|
|
460
517
|
*/
|
|
461
518
|
async delete() {
|
|
462
|
-
const
|
|
519
|
+
const url = this.url
|
|
463
520
|
|
|
464
|
-
if(!
|
|
521
|
+
if(!url)
|
|
465
522
|
throw Sass.new("This object does not represent a valid resource.")
|
|
466
523
|
|
|
467
524
|
if(!(await this.exists))
|
|
468
|
-
throw Sass.new(`No such resource '${
|
|
525
|
+
throw Sass.new(`No such resource '${url.href}'`)
|
|
469
526
|
|
|
470
|
-
return await fs.unlink(
|
|
527
|
+
return await fs.unlink(url)
|
|
471
528
|
}
|
|
472
529
|
}
|
package/src/types/lib/Data.d.ts
CHANGED
|
@@ -184,6 +184,23 @@ export default class Data {
|
|
|
184
184
|
* isPlainObject(class Person{}) // false
|
|
185
185
|
*/
|
|
186
186
|
static isPlainObject(value: unknown): boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Checks if a value is binary data.
|
|
189
|
+
* Returns true for ArrayBuffer, TypedArrays (Uint8Array, Int16Array, etc.),
|
|
190
|
+
* Blob, and Node Buffer instances.
|
|
191
|
+
*
|
|
192
|
+
* @param {unknown} value - The value to check
|
|
193
|
+
* @returns {boolean} True if the value is binary data, false otherwise
|
|
194
|
+
* @example
|
|
195
|
+
* Data.isBinary(new Uint8Array([1, 2, 3])) // true
|
|
196
|
+
* Data.isBinary(new ArrayBuffer(10)) // true
|
|
197
|
+
* Data.isBinary(Buffer.from('hello')) // true
|
|
198
|
+
* Data.isBinary(new Blob(['text'])) // true
|
|
199
|
+
* Data.isBinary('string') // false
|
|
200
|
+
* Data.isBinary({}) // false
|
|
201
|
+
* Data.isBinary(undefined) // false
|
|
202
|
+
*/
|
|
203
|
+
static isBinary(value: unknown): boolean;
|
|
187
204
|
}
|
|
188
205
|
import TypeSpec from "./TypeSpec.js";
|
|
189
206
|
//# sourceMappingURL=Data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file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AO,oBACP,OAAO,GAEL,OAAO,CA2BnB;IAED;;;;;OAKG;IACH,6BAHW,MAAM,GACJ,MAAM,CAmBlB;IAED;;;;;;;OAOG;IACH,6BAJW,MAAM,QACN,KAAK,CAAC,MAAM,CAAC,GACX,MAAM,CAiBlB;IAED;;;;;;;OAOG;IACH,2BAJW,MAAM,QACN,KAAK,CAAC,MAAM,CAAC,SACb,OAAO,QAMjB;IAED;;;;;OAKG;IACH,+BAHc,MAAM,EAAA,GACP,MAAM,CAqBlB;IAED;;;;;;;OAOG;IACH,wBAJW,KAAK,CAAC,OAAO,CAAC,aACd,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,GAClC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAMnC;IAED;;;;;;;OAOG;IACH,kBALW,MAAM,OACN,MAAM,OACN,MAAM,GACJ,MAAM,CAIlB;IAED;;;;;;;OAOG;IACH,oBALW,MAAM,OACN,MAAM,OACN,MAAM,GACJ,OAAO,CAInB;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,4BAbW,OAAO,GACL,OAAO,CA+BnB;IAED;;;;;;;;;;;;;;;OAeG;IACH,uBAXW,OAAO,GACL,OAAO,CAgBnB;CACF;qBA5aoB,eAAe"}
|
|
@@ -138,6 +138,19 @@ export default class FileObject extends FS {
|
|
|
138
138
|
* @returns {Promise<string>} The file contents
|
|
139
139
|
*/
|
|
140
140
|
read(encoding?: string): Promise<string>;
|
|
141
|
+
/**
|
|
142
|
+
* Reads binary data from a file asynchronously.
|
|
143
|
+
* Returns the file contents as a Buffer (Node.js binary data type).
|
|
144
|
+
*
|
|
145
|
+
* @returns {Promise<Buffer>} The file contents as a Buffer
|
|
146
|
+
* @throws {Sass} If the file URL is invalid
|
|
147
|
+
* @throws {Sass} If the file does not exist
|
|
148
|
+
* @example
|
|
149
|
+
* const file = new FileObject('./image.png')
|
|
150
|
+
* const buffer = await file.readBinary()
|
|
151
|
+
* // Use the buffer (e.g., send in HTTP response, process image, etc.)
|
|
152
|
+
*/
|
|
153
|
+
readBinary(): Promise<Buffer>;
|
|
141
154
|
/**
|
|
142
155
|
* Writes content to a file asynchronously.
|
|
143
156
|
* Validates that the parent directory exists before writing.
|
|
@@ -145,12 +158,29 @@ export default class FileObject extends FS {
|
|
|
145
158
|
* @param {string} content - The content to write
|
|
146
159
|
* @param {string} [encoding] - The encoding in which to write (default: "utf8")
|
|
147
160
|
* @returns {Promise<void>}
|
|
148
|
-
* @throws {Sass} If the file
|
|
161
|
+
* @throws {Sass} If the file URL is invalid or the parent directory doesn't exist
|
|
149
162
|
* @example
|
|
150
163
|
* const file = new FileObject('./output/data.json')
|
|
151
164
|
* await file.write(JSON.stringify({key: 'value'}))
|
|
152
165
|
*/
|
|
153
166
|
write(content: string, encoding?: string): Promise<void>;
|
|
167
|
+
/**
|
|
168
|
+
* Writes binary data to a file asynchronously.
|
|
169
|
+
* Validates that the parent directory exists and that the data is valid binary format.
|
|
170
|
+
* Supports ArrayBuffer, TypedArrays (Uint8Array, etc.), Blob, and Node Buffer types.
|
|
171
|
+
*
|
|
172
|
+
* @param {ArrayBuffer|Blob|Buffer} data - The binary data to write
|
|
173
|
+
* @returns {Promise<void>}
|
|
174
|
+
* @throws {Sass} If the file URL is invalid
|
|
175
|
+
* @throws {Sass} If the parent directory doesn't exist
|
|
176
|
+
* @throws {Sass} If the data is not a valid binary type
|
|
177
|
+
* @example
|
|
178
|
+
* const file = new FileObject('./output/image.png')
|
|
179
|
+
* const response = await fetch('https://example.com/image.png')
|
|
180
|
+
* const buffer = await response.arrayBuffer()
|
|
181
|
+
* await file.writeBinary(buffer)
|
|
182
|
+
*/
|
|
183
|
+
writeBinary(data: ArrayBuffer | Blob | Buffer): Promise<void>;
|
|
154
184
|
/**
|
|
155
185
|
* Loads an object from JSON or YAML file.
|
|
156
186
|
* Attempts to parse content as JSON5 first, then falls back to YAML if specified.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file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,CAY3B;IAED;;;;;;;;;;;OAWG;IACH,cARa,OAAO,CAAC,MAAM,CAAC,CAkB3B;IAED;;;;;;;;;;;OAWG;IACH,eARW,MAAM,aACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAezB;IAED;;;;;;;;;;;;;;;OAeG;IACH,kBAXW,WAAW,GAAC,IAAI,GAAC,MAAM,GACrB,OAAO,CAAC,IAAI,CAAC,CAyBzB;IAED;;;;;;;;;;;;;;OAcG;IACH,gBAXW,MAAM,aACN,MAAM,GACJ,OAAO,CAAC,OAAO,CAAC,CAkC5B;IAED;;;;OAIG;IACH,UAFa,OAAO,CAAC,MAAM,CAAC,CAY3B;IAED;;;;;;;;;OASG;IACH,UAPa,OAAO,CAAC,IAAI,CAAC,CAiBzB;IA7XD;;;;OAIG;IACH,yBAFa,MAAM,CAIlB;;CAuXF;eAjgBc,SAAS;oBAJN,UAAU;4BAGA,sBAAsB;iBALjC,WAAW;kBAHV,OAAO;iBAIR,MAAM"}
|
package/src/types/lib/Util.d.ts
CHANGED
|
@@ -171,7 +171,7 @@ export default class Util {
|
|
|
171
171
|
* @param {object} emitter - Any object with EventEmitter-like interface
|
|
172
172
|
* @param {string} event - The event name to emit
|
|
173
173
|
* @param {...unknown} args - Arguments to pass to event listeners
|
|
174
|
-
* @returns {Promise<void>} Resolves when all listeners have completed
|
|
174
|
+
* @returns {Promise<void>} Resolves when all listeners have completed, but no grapes.
|
|
175
175
|
*/
|
|
176
176
|
static asyncEmitQuack(emitter: object, event: string, ...args: unknown[]): Promise<void>;
|
|
177
177
|
/**
|