@powerlines/core 0.48.56 → 0.48.58
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/dist/constants/log-level.d.cts +1 -1
- package/dist/constants/log-level.d.mts +1 -1
- package/dist/context/context.cjs +4 -2
- package/dist/context/context.d.cts +3 -3
- package/dist/context/context.d.cts.map +1 -1
- package/dist/context/context.d.mts +3 -3
- package/dist/context/context.d.mts.map +1 -1
- package/dist/context/context.mjs +4 -2
- package/dist/context/context.mjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/lib/vfs.cjs +45 -8
- package/dist/lib/vfs.d.cts +16 -2
- package/dist/lib/vfs.d.cts.map +1 -1
- package/dist/lib/vfs.d.mts +16 -2
- package/dist/lib/vfs.d.mts.map +1 -1
- package/dist/lib/vfs.mjs +45 -8
- package/dist/lib/vfs.mjs.map +1 -1
- package/dist/storage/base.d.cts +4 -4
- package/dist/storage/base.d.cts.map +1 -1
- package/dist/storage/base.d.mts +4 -4
- package/dist/storage/base.d.mts.map +1 -1
- package/dist/storage/base.mjs.map +1 -1
- package/dist/storage/file-system.cjs +6 -2
- package/dist/storage/file-system.d.cts +2 -2
- package/dist/storage/file-system.d.cts.map +1 -1
- package/dist/storage/file-system.d.mts +2 -2
- package/dist/storage/file-system.d.mts.map +1 -1
- package/dist/storage/file-system.mjs +6 -2
- package/dist/storage/file-system.mjs.map +1 -1
- package/dist/storage/virtual.d.cts +2 -2
- package/dist/storage/virtual.d.cts.map +1 -1
- package/dist/storage/virtual.d.mts +2 -2
- package/dist/storage/virtual.d.mts.map +1 -1
- package/dist/storage/virtual.mjs.map +1 -1
- package/dist/types/context.d.cts +15 -3
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +15 -3
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/fs.d.cts +19 -6
- package/dist/types/fs.d.cts.map +1 -1
- package/dist/types/fs.d.mts +19 -6
- package/dist/types/fs.d.mts.map +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/package.json +7 -7
|
@@ -5,10 +5,12 @@ const require_storage_helpers = require('./helpers.cjs');
|
|
|
5
5
|
let _stryke_fs_exists = require("@stryke/fs/exists");
|
|
6
6
|
let _stryke_fs_is_file = require("@stryke/fs/is-file");
|
|
7
7
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
8
|
+
let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
8
9
|
let _stryke_fs_list_files = require("@stryke/fs/list-files");
|
|
9
10
|
let node_fs = require("node:fs");
|
|
10
11
|
let _stryke_fs_read_file = require("@stryke/fs/read-file");
|
|
11
12
|
let _stryke_fs_write_file = require("@stryke/fs/write-file");
|
|
13
|
+
let _stryke_fs_buffer = require("@stryke/fs/buffer");
|
|
12
14
|
let _stryke_fs_helpers = require("@stryke/fs/helpers");
|
|
13
15
|
let node_fs_promises = require("node:fs/promises");
|
|
14
16
|
|
|
@@ -83,7 +85,8 @@ var FileSystemStorageAdapter = class extends require_storage_base.BaseStorageAda
|
|
|
83
85
|
if (!this.isReadOnly) if (this.existsSync(this.resolve(key)) && !this.overwrite) {
|
|
84
86
|
const existingValue = this.getSync(this.resolve(key));
|
|
85
87
|
if ((0, _stryke_type_checks_is_set_string.isSetString)(existingValue) && existingValue.includes(require_lib_utilities_file_header.getFileHeaderWarningText(true, this.context.config.framework?.name || "powerlines"))) return (0, _stryke_fs_write_file.writeFileSync)(this.resolve(key), existingValue.replace(require_lib_utilities_file_header.getFileHeaderWarningText(true, this.context.config.framework?.name || "powerlines"), require_lib_utilities_file_header.getFileHeaderWarningText(false, this.context.config.framework?.name || "powerlines")));
|
|
86
|
-
} else return (0, _stryke_fs_write_file.writeFileSync)(this.resolve(key), value);
|
|
88
|
+
} else if ((0, _stryke_type_checks_is_string.isString)(value)) return (0, _stryke_fs_write_file.writeFileSync)(this.resolve(key), value);
|
|
89
|
+
else return (0, _stryke_fs_buffer.writeFileBufferSync)(this.resolve(key), value.buffer.slice(value.byteOffset, value.byteOffset + value.byteLength));
|
|
87
90
|
}
|
|
88
91
|
/**
|
|
89
92
|
* Asynchronously sets the value for a given key.
|
|
@@ -95,7 +98,8 @@ var FileSystemStorageAdapter = class extends require_storage_base.BaseStorageAda
|
|
|
95
98
|
if (!this.isReadOnly) if (this.existsSync(this.resolve(key)) && !this.overwrite) {
|
|
96
99
|
const existingValue = await this.get(this.resolve(key));
|
|
97
100
|
if ((0, _stryke_type_checks_is_set_string.isSetString)(existingValue) && existingValue.includes(require_lib_utilities_file_header.getFileHeaderWarningText(true, this.context.config.framework?.name || "powerlines"))) return (0, _stryke_fs_write_file.writeFile)(this.resolve(key), existingValue.replace(require_lib_utilities_file_header.getFileHeaderWarningText(true, this.context.config.framework?.name || "powerlines"), require_lib_utilities_file_header.getFileHeaderWarningText(false, this.context.config.framework?.name || "powerlines")));
|
|
98
|
-
} else return (0, _stryke_fs_write_file.writeFile)(this.resolve(key), value);
|
|
101
|
+
} else if ((0, _stryke_type_checks_is_string.isString)(value)) return (0, _stryke_fs_write_file.writeFile)(this.resolve(key), value);
|
|
102
|
+
else return (0, _stryke_fs_buffer.writeFileBuffer)(this.resolve(key), value.buffer.slice(value.byteOffset, value.byteOffset + value.byteLength));
|
|
99
103
|
}
|
|
100
104
|
/**
|
|
101
105
|
* Synchronously removes a key from the storage.
|
|
@@ -61,14 +61,14 @@ declare class FileSystemStorageAdapter extends BaseStorageAdapter {
|
|
|
61
61
|
* @param key - The key to set the value for.
|
|
62
62
|
* @param value - The value to set.
|
|
63
63
|
*/
|
|
64
|
-
setSync(key: string, value: string): void;
|
|
64
|
+
setSync(key: string, value: string | NodeJS.ArrayBufferView): void;
|
|
65
65
|
/**
|
|
66
66
|
* Asynchronously sets the value for a given key.
|
|
67
67
|
*
|
|
68
68
|
* @param key - The key to set the value for.
|
|
69
69
|
* @param value - The value to set.
|
|
70
70
|
*/
|
|
71
|
-
set(key: string, value: string): Promise<void>;
|
|
71
|
+
set(key: string, value: string | NodeJS.ArrayBufferView): Promise<void>;
|
|
72
72
|
/**
|
|
73
73
|
* Synchronously removes a key from the storage.
|
|
74
74
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-system.d.cts","names":[],"sources":["../../src/storage/file-system.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"file-system.d.cts","names":[],"sources":["../../src/storage/file-system.ts"],"mappings":";;;;;KAkCY,cAAA,GAAiB,UAAU,QAAQ,aAAA;AAAA,KACnC,UAAA,GAAa,UAAU,QAAQ,SAAA;AAD3C;;;AAAA,cAMa,wBAAA,SAAiC,kBAAA;EANc;AAC5D;;EASS,IAAA;EATgB;AAA2B;AAKpD;;;;EALyB,SAiBE,MAAA;EA4BkB;;;;;;cApBxB,OAAA,EAAS,OAAA,EAAS,OAAA,GAAU,qBAAA;EA+MJ;;;;;;EArMpC,UAAA,CAAW,GAAA;;;;;;;EAUI,MAAA,CAAO,GAAA,WAAc,OAAA;EAArB;;;;;;EAUf,OAAA,CAAQ,GAAA;EAUyB;;;;;;EAAlB,GAAA,CAAI,GAAA,WAAc,OAAA;EA0DtC;;;;;;EAhDK,OAAA,CAAQ,GAAA,UAAa,KAAA,WAAgB,MAAA,CAAO,eAAA;EA+G7B;;;;;;EAhEA,GAAA,CACpB,GAAA,UACA,KAAA,WAAgB,MAAA,CAAO,eAAA,GACtB,OAAA;EAiF2C;;;;;EAnCvC,UAAA,CAAW,GAAA;EA2EF;;;;;EA5DM,MAAA,CAAO,GAAA,WAAc,OAAA;;;;;;EAW3B,SAAA,CAAU,OAAA;;;;;;EASJ,KAAA,CAAM,OAAA,WAAkB,OAAA;;;;;;;EAUvC,QAAA,CAAS,IAAA;;;;;;;EAgBM,IAAA,CAAK,IAAA,YAAgB,OAAA;;;;;;;EAc3B,eAAA,CAAgB,GAAA;;;;;;;EAUhB,UAAA,CAAW,GAAA;AAAA"}
|
|
@@ -61,14 +61,14 @@ declare class FileSystemStorageAdapter extends BaseStorageAdapter {
|
|
|
61
61
|
* @param key - The key to set the value for.
|
|
62
62
|
* @param value - The value to set.
|
|
63
63
|
*/
|
|
64
|
-
setSync(key: string, value: string): void;
|
|
64
|
+
setSync(key: string, value: string | NodeJS.ArrayBufferView): void;
|
|
65
65
|
/**
|
|
66
66
|
* Asynchronously sets the value for a given key.
|
|
67
67
|
*
|
|
68
68
|
* @param key - The key to set the value for.
|
|
69
69
|
* @param value - The value to set.
|
|
70
70
|
*/
|
|
71
|
-
set(key: string, value: string): Promise<void>;
|
|
71
|
+
set(key: string, value: string | NodeJS.ArrayBufferView): Promise<void>;
|
|
72
72
|
/**
|
|
73
73
|
* Synchronously removes a key from the storage.
|
|
74
74
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-system.d.mts","names":[],"sources":["../../src/storage/file-system.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"file-system.d.mts","names":[],"sources":["../../src/storage/file-system.ts"],"mappings":";;;;;KAkCY,cAAA,GAAiB,UAAU,QAAQ,aAAA;AAAA,KACnC,UAAA,GAAa,UAAU,QAAQ,SAAA;AAD3C;;;AAAA,cAMa,wBAAA,SAAiC,kBAAA;EANc;AAC5D;;EASS,IAAA;EATgB;AAA2B;AAKpD;;;;EALyB,SAiBE,MAAA;EA4BkB;;;;;;cApBxB,OAAA,EAAS,OAAA,EAAS,OAAA,GAAU,qBAAA;EA+MJ;;;;;;EArMpC,UAAA,CAAW,GAAA;;;;;;;EAUI,MAAA,CAAO,GAAA,WAAc,OAAA;EAArB;;;;;;EAUf,OAAA,CAAQ,GAAA;EAUyB;;;;;;EAAlB,GAAA,CAAI,GAAA,WAAc,OAAA;EA0DtC;;;;;;EAhDK,OAAA,CAAQ,GAAA,UAAa,KAAA,WAAgB,MAAA,CAAO,eAAA;EA+G7B;;;;;;EAhEA,GAAA,CACpB,GAAA,UACA,KAAA,WAAgB,MAAA,CAAO,eAAA,GACtB,OAAA;EAiF2C;;;;;EAnCvC,UAAA,CAAW,GAAA;EA2EF;;;;;EA5DM,MAAA,CAAO,GAAA,WAAc,OAAA;;;;;;EAW3B,SAAA,CAAU,OAAA;;;;;;EASJ,KAAA,CAAM,OAAA,WAAkB,OAAA;;;;;;;EAUvC,QAAA,CAAS,IAAA;;;;;;;EAgBM,IAAA,CAAK,IAAA,YAAgB,OAAA;;;;;;;EAc3B,eAAA,CAAgB,GAAA;;;;;;;EAUhB,UAAA,CAAW,GAAA;AAAA"}
|
|
@@ -4,10 +4,12 @@ import { ignoreNotfound } from "./helpers.mjs";
|
|
|
4
4
|
import { exists, existsSync } from "@stryke/fs/exists";
|
|
5
5
|
import { isDirectory, isFile } from "@stryke/fs/is-file";
|
|
6
6
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
7
|
+
import { isString } from "@stryke/type-checks/is-string";
|
|
7
8
|
import { listFiles, listFilesSync } from "@stryke/fs/list-files";
|
|
8
9
|
import { unlinkSync } from "node:fs";
|
|
9
10
|
import { readFile, readFileSync } from "@stryke/fs/read-file";
|
|
10
11
|
import { writeFile, writeFileSync } from "@stryke/fs/write-file";
|
|
12
|
+
import { writeFileBuffer, writeFileBufferSync } from "@stryke/fs/buffer";
|
|
11
13
|
import { createDirectory, createDirectorySync } from "@stryke/fs/helpers";
|
|
12
14
|
import { unlink } from "node:fs/promises";
|
|
13
15
|
|
|
@@ -82,7 +84,8 @@ var FileSystemStorageAdapter = class extends BaseStorageAdapter {
|
|
|
82
84
|
if (!this.isReadOnly) if (this.existsSync(this.resolve(key)) && !this.overwrite) {
|
|
83
85
|
const existingValue = this.getSync(this.resolve(key));
|
|
84
86
|
if (isSetString(existingValue) && existingValue.includes(getFileHeaderWarningText(true, this.context.config.framework?.name || "powerlines"))) return writeFileSync(this.resolve(key), existingValue.replace(getFileHeaderWarningText(true, this.context.config.framework?.name || "powerlines"), getFileHeaderWarningText(false, this.context.config.framework?.name || "powerlines")));
|
|
85
|
-
} else return writeFileSync(this.resolve(key), value);
|
|
87
|
+
} else if (isString(value)) return writeFileSync(this.resolve(key), value);
|
|
88
|
+
else return writeFileBufferSync(this.resolve(key), value.buffer.slice(value.byteOffset, value.byteOffset + value.byteLength));
|
|
86
89
|
}
|
|
87
90
|
/**
|
|
88
91
|
* Asynchronously sets the value for a given key.
|
|
@@ -94,7 +97,8 @@ var FileSystemStorageAdapter = class extends BaseStorageAdapter {
|
|
|
94
97
|
if (!this.isReadOnly) if (this.existsSync(this.resolve(key)) && !this.overwrite) {
|
|
95
98
|
const existingValue = await this.get(this.resolve(key));
|
|
96
99
|
if (isSetString(existingValue) && existingValue.includes(getFileHeaderWarningText(true, this.context.config.framework?.name || "powerlines"))) return writeFile(this.resolve(key), existingValue.replace(getFileHeaderWarningText(true, this.context.config.framework?.name || "powerlines"), getFileHeaderWarningText(false, this.context.config.framework?.name || "powerlines")));
|
|
97
|
-
} else return writeFile(this.resolve(key), value);
|
|
100
|
+
} else if (isString(value)) return writeFile(this.resolve(key), value);
|
|
101
|
+
else return writeFileBuffer(this.resolve(key), value.buffer.slice(value.byteOffset, value.byteOffset + value.byteLength));
|
|
98
102
|
}
|
|
99
103
|
/**
|
|
100
104
|
* Synchronously removes a key from the storage.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-system.mjs","names":[],"sources":["../../src/storage/file-system.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n 🗲 Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { exists, existsSync } from \"@stryke/fs/exists\";\nimport { createDirectory, createDirectorySync } from \"@stryke/fs/helpers\";\nimport { isDirectory, isFile } from \"@stryke/fs/is-file\";\nimport { listFiles, listFilesSync } from \"@stryke/fs/list-files\";\nimport { readFile, readFileSync } from \"@stryke/fs/read-file\";\nimport { writeFile, writeFileSync } from \"@stryke/fs/write-file\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { unlinkSync } from \"node:fs\";\nimport { unlink } from \"node:fs/promises\";\nimport { getFileHeaderWarningText } from \"../lib/utilities/file-header\";\nimport type { Context } from \"../types/context\";\nimport { BaseStorageAdapter, StorageAdapterOptions } from \"./base\";\nimport { ignoreNotfound } from \"./helpers\";\n\nexport type SetSyncOptions = Parameters<typeof writeFileSync>[2];\nexport type SetOptions = Parameters<typeof writeFile>[2];\n\n/**\n * File system storage adapter implementation.\n */\nexport class FileSystemStorageAdapter extends BaseStorageAdapter {\n /**\n * A name identifying the storage adapter type.\n */\n public name = \"file-system\";\n\n /**\n * The storage preset for the adapter.\n *\n * @remarks\n * This can be used as an alternate way to identify the type of storage being used.\n */\n public override readonly preset = \"fs\";\n\n /**\n * Constructor for the FileSystemStorageAdapter.\n *\n * @param context - The Powerlines context.\n * @param options - Configuration options for the storage adapter.\n */\n public constructor(context: Context, options?: StorageAdapterOptions) {\n super(context, options);\n }\n\n /**\n * Synchronously checks if a key exists in the storage.\n *\n * @param key - The key to check for existence.\n * @returns Returns `true` if the key exists, otherwise `false`.\n */\n public existsSync(key: string): boolean {\n return existsSync(this.resolve(key));\n }\n\n /**\n * Asynchronously checks if a key exists in the storage.\n *\n * @param key - The key to check for existence.\n * @returns A promise that resolves to `true` if the key exists, otherwise `false`.\n */\n public override async exists(key: string): Promise<boolean> {\n return exists(this.resolve(key));\n }\n\n /**\n * Synchronously retrieves the value associated with a given key.\n *\n * @param key - The key whose value is to be retrieved.\n * @returns The value associated with the key, or `null` if the key does not exist.\n */\n public getSync(key: string): string | null {\n return readFileSync(this.resolve(key));\n }\n\n /**\n * Asynchronously retrieves the value associated with a given key.\n *\n * @param key - The key whose value is to be retrieved.\n * @returns A promise that resolves to the value associated with the key, or `null` if the key does not exist.\n */\n public override async get(key: string): Promise<string | null> {\n return readFile(this.resolve(key));\n }\n\n /**\n * Synchronously sets the value for a given key.\n *\n * @param key - The key to set the value for.\n * @param value - The value to set.\n */\n public setSync(key: string, value: string) {\n if (!this.isReadOnly) {\n if (this.existsSync(this.resolve(key)) && !this.overwrite) {\n const existingValue = this.getSync(this.resolve(key));\n if (\n isSetString(existingValue) &&\n existingValue.includes(\n getFileHeaderWarningText(\n true,\n this.context.config.framework?.name || \"powerlines\"\n )\n )\n ) {\n return writeFileSync(\n this.resolve(key),\n existingValue.replace(\n getFileHeaderWarningText(\n true,\n this.context.config.framework?.name || \"powerlines\"\n ),\n getFileHeaderWarningText(\n false,\n this.context.config.framework?.name || \"powerlines\"\n )\n )\n );\n }\n } else {\n return writeFileSync(this.resolve(key), value);\n }\n }\n }\n\n /**\n * Asynchronously sets the value for a given key.\n *\n * @param key - The key to set the value for.\n * @param value - The value to set.\n */\n public override async set(key: string, value: string): Promise<void> {\n if (!this.isReadOnly) {\n if (this.existsSync(this.resolve(key)) && !this.overwrite) {\n const existingValue = await this.get(this.resolve(key));\n if (\n isSetString(existingValue) &&\n existingValue.includes(\n getFileHeaderWarningText(\n true,\n this.context.config.framework?.name || \"powerlines\"\n )\n )\n ) {\n return writeFile(\n this.resolve(key),\n existingValue.replace(\n getFileHeaderWarningText(\n true,\n this.context.config.framework?.name || \"powerlines\"\n ),\n getFileHeaderWarningText(\n false,\n this.context.config.framework?.name || \"powerlines\"\n )\n )\n );\n }\n } else {\n return writeFile(this.resolve(key), value);\n }\n }\n }\n\n /**\n * Synchronously removes a key from the storage.\n *\n * @param key - The key to remove.\n */\n public removeSync(key: string) {\n if (!this.isReadOnly && this.overwrite) {\n try {\n return unlinkSync(this.resolve(key));\n } catch (err) {\n return ignoreNotfound(err);\n }\n }\n }\n\n /**\n * Asynchronously removes a key from the storage.\n *\n * @param key - The key to remove.\n */\n public override async remove(key: string): Promise<void> {\n if (!this.isReadOnly && this.overwrite) {\n return unlink(this.resolve(key)).catch(ignoreNotfound);\n }\n }\n\n /**\n * Synchronously creates a directory at the specified path.\n *\n * @param dirPath - The path of the directory to create.\n */\n public override mkdirSync(dirPath: string) {\n createDirectorySync(this.resolve(dirPath));\n }\n\n /**\n * Creates a directory at the specified path.\n *\n * @param dirPath - The path of the directory to create.\n */\n public override async mkdir(dirPath: string): Promise<void> {\n await createDirectory(this.resolve(dirPath));\n }\n\n /**\n * Lists all keys under a given base path synchronously.\n *\n * @param base - The base path to list keys from.\n * @returns An array of keys under the specified base path.\n */\n public listSync(base?: string): string[] {\n try {\n return listFilesSync(this.resolve(base), {\n ignore: this.options.ignore\n });\n } catch (err) {\n return ignoreNotfound(err) ?? [];\n }\n }\n\n /**\n * Asynchronously lists all keys under a given base path.\n *\n * @param base - The base path to list keys from.\n * @returns A promise that resolves to an array of keys under the specified base path.\n */\n public override async list(base?: string): Promise<string[]> {\n return listFiles(this.resolve(base), {\n ignore: this.options.ignore\n })\n .catch(ignoreNotfound)\n .then(r => r || []);\n }\n\n /**\n * Synchronously checks if the given key is a directory.\n *\n * @param key - The key to check.\n * @returns `true` if the key is a directory, otherwise `false`.\n */\n public override isDirectorySync(key: string): boolean {\n return isDirectory(this.resolve(key));\n }\n\n /**\n * Synchronously checks if the given key is a file.\n *\n * @param key - The key to check.\n * @returns `true` if the key is a file, otherwise `false`.\n */\n public override isFileSync(key: string): boolean {\n return isFile(this.resolve(key));\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAsCA,IAAa,2BAAb,cAA8C,mBAAmB;;;;CAI/D,AAAO,OAAO;;;;;;;CAQd,AAAyB,SAAS;;;;;;;CAQlC,AAAO,YAAY,SAAkB,SAAiC;EACpE,MAAM,SAAS,OAAO;CACxB;;;;;;;CAQA,AAAO,WAAW,KAAsB;EACtC,OAAO,WAAW,KAAK,QAAQ,GAAG,CAAC;CACrC;;;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EJ,OACE,OAAO,UAAU,KAAK,QAAQ,GAAG,GAAG,KAAK;CAG/C;;;;;;CAOA,AAAO,WAAW,KAAa;EAC7B,IAAI,CAAC,KAAK,cAAc,KAAK,WAC3B,IAAI;GACF,OAAO,WAAW,KAAK,QAAQ,GAAG,CAAC;EACrC,SAAS,KAAK;GACZ,OAAO,eAAe,GAAG;EAC3B;CAEJ;;;;;;CAOA,MAAsB,OAAO,KAA4B;EACvD,IAAI,CAAC,KAAK,cAAc,KAAK,WAC3B,OAAO,OAAO,KAAK,QAAQ,GAAG,CAAC,CAAC,CAAC,MAAM,cAAc;CAEzD;;;;;;CAOA,AAAgB,UAAU,SAAiB;EACzC,oBAAoB,KAAK,QAAQ,OAAO,CAAC;CAC3C;;;;;;CAOA,MAAsB,MAAM,SAAgC;EAC1D,MAAM,gBAAgB,KAAK,QAAQ,OAAO,CAAC;CAC7C;;;;;;;CAQA,AAAO,SAAS,MAAyB;EACvC,IAAI;GACF,OAAO,cAAc,KAAK,QAAQ,IAAI,GAAG,EACvC,QAAQ,KAAK,QAAQ,OACvB,CAAC;EACH,SAAS,KAAK;GACZ,OAAO,eAAe,GAAG,KAAK,CAAC;EACjC;CACF;;;;;;;CAQA,MAAsB,KAAK,MAAkC;EAC3D,OAAO,UAAU,KAAK,QAAQ,IAAI,GAAG,EACnC,QAAQ,KAAK,QAAQ,OACvB,CAAC,CAAC,CACC,MAAM,cAAc,CAAC,CACrB,MAAK,MAAK,KAAK,CAAC,CAAC;CACtB;;;;;;;CAQA,AAAgB,gBAAgB,KAAsB;EACpD,OAAO,YAAY,KAAK,QAAQ,GAAG,CAAC;CACtC;;;;;;;CAQA,AAAgB,WAAW,KAAsB;EAC/C,OAAO,OAAO,KAAK,QAAQ,GAAG,CAAC;CACjC;AACF"}
|
|
1
|
+
{"version":3,"file":"file-system.mjs","names":[],"sources":["../../src/storage/file-system.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n 🗲 Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { writeFileBuffer, writeFileBufferSync } from \"@stryke/fs/buffer\";\nimport { exists, existsSync } from \"@stryke/fs/exists\";\nimport { createDirectory, createDirectorySync } from \"@stryke/fs/helpers\";\nimport { isDirectory, isFile } from \"@stryke/fs/is-file\";\nimport { listFiles, listFilesSync } from \"@stryke/fs/list-files\";\nimport { readFile, readFileSync } from \"@stryke/fs/read-file\";\nimport { writeFile, writeFileSync } from \"@stryke/fs/write-file\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { unlinkSync } from \"node:fs\";\nimport { unlink } from \"node:fs/promises\";\nimport { getFileHeaderWarningText } from \"../lib/utilities/file-header\";\nimport type { Context } from \"../types/context\";\nimport { BaseStorageAdapter, StorageAdapterOptions } from \"./base\";\nimport { ignoreNotfound } from \"./helpers\";\n\nexport type SetSyncOptions = Parameters<typeof writeFileSync>[2];\nexport type SetOptions = Parameters<typeof writeFile>[2];\n\n/**\n * File system storage adapter implementation.\n */\nexport class FileSystemStorageAdapter extends BaseStorageAdapter {\n /**\n * A name identifying the storage adapter type.\n */\n public name = \"file-system\";\n\n /**\n * The storage preset for the adapter.\n *\n * @remarks\n * This can be used as an alternate way to identify the type of storage being used.\n */\n public override readonly preset = \"fs\";\n\n /**\n * Constructor for the FileSystemStorageAdapter.\n *\n * @param context - The Powerlines context.\n * @param options - Configuration options for the storage adapter.\n */\n public constructor(context: Context, options?: StorageAdapterOptions) {\n super(context, options);\n }\n\n /**\n * Synchronously checks if a key exists in the storage.\n *\n * @param key - The key to check for existence.\n * @returns Returns `true` if the key exists, otherwise `false`.\n */\n public existsSync(key: string): boolean {\n return existsSync(this.resolve(key));\n }\n\n /**\n * Asynchronously checks if a key exists in the storage.\n *\n * @param key - The key to check for existence.\n * @returns A promise that resolves to `true` if the key exists, otherwise `false`.\n */\n public override async exists(key: string): Promise<boolean> {\n return exists(this.resolve(key));\n }\n\n /**\n * Synchronously retrieves the value associated with a given key.\n *\n * @param key - The key whose value is to be retrieved.\n * @returns The value associated with the key, or `null` if the key does not exist.\n */\n public getSync(key: string): string | null {\n return readFileSync(this.resolve(key));\n }\n\n /**\n * Asynchronously retrieves the value associated with a given key.\n *\n * @param key - The key whose value is to be retrieved.\n * @returns A promise that resolves to the value associated with the key, or `null` if the key does not exist.\n */\n public override async get(key: string): Promise<string | null> {\n return readFile(this.resolve(key));\n }\n\n /**\n * Synchronously sets the value for a given key.\n *\n * @param key - The key to set the value for.\n * @param value - The value to set.\n */\n public setSync(key: string, value: string | NodeJS.ArrayBufferView): void {\n if (!this.isReadOnly) {\n if (this.existsSync(this.resolve(key)) && !this.overwrite) {\n const existingValue = this.getSync(this.resolve(key));\n if (\n isSetString(existingValue) &&\n existingValue.includes(\n getFileHeaderWarningText(\n true,\n this.context.config.framework?.name || \"powerlines\"\n )\n )\n ) {\n return writeFileSync(\n this.resolve(key),\n existingValue.replace(\n getFileHeaderWarningText(\n true,\n this.context.config.framework?.name || \"powerlines\"\n ),\n getFileHeaderWarningText(\n false,\n this.context.config.framework?.name || \"powerlines\"\n )\n )\n );\n }\n } else if (isString(value)) {\n return writeFileSync(this.resolve(key), value);\n } else {\n return writeFileBufferSync(\n this.resolve(key),\n value.buffer.slice(\n value.byteOffset,\n value.byteOffset + value.byteLength\n ) as ArrayBuffer\n );\n }\n }\n }\n\n /**\n * Asynchronously sets the value for a given key.\n *\n * @param key - The key to set the value for.\n * @param value - The value to set.\n */\n public override async set(\n key: string,\n value: string | NodeJS.ArrayBufferView\n ): Promise<void> {\n if (!this.isReadOnly) {\n if (this.existsSync(this.resolve(key)) && !this.overwrite) {\n const existingValue = await this.get(this.resolve(key));\n if (\n isSetString(existingValue) &&\n existingValue.includes(\n getFileHeaderWarningText(\n true,\n this.context.config.framework?.name || \"powerlines\"\n )\n )\n ) {\n return writeFile(\n this.resolve(key),\n existingValue.replace(\n getFileHeaderWarningText(\n true,\n this.context.config.framework?.name || \"powerlines\"\n ),\n getFileHeaderWarningText(\n false,\n this.context.config.framework?.name || \"powerlines\"\n )\n )\n );\n }\n } else if (isString(value)) {\n return writeFile(this.resolve(key), value);\n } else {\n return writeFileBuffer(\n this.resolve(key),\n value.buffer.slice(\n value.byteOffset,\n value.byteOffset + value.byteLength\n ) as ArrayBuffer\n );\n }\n }\n }\n\n /**\n * Synchronously removes a key from the storage.\n *\n * @param key - The key to remove.\n */\n public removeSync(key: string) {\n if (!this.isReadOnly && this.overwrite) {\n try {\n return unlinkSync(this.resolve(key));\n } catch (err) {\n return ignoreNotfound(err);\n }\n }\n }\n\n /**\n * Asynchronously removes a key from the storage.\n *\n * @param key - The key to remove.\n */\n public override async remove(key: string): Promise<void> {\n if (!this.isReadOnly && this.overwrite) {\n return unlink(this.resolve(key)).catch(ignoreNotfound);\n }\n }\n\n /**\n * Synchronously creates a directory at the specified path.\n *\n * @param dirPath - The path of the directory to create.\n */\n public override mkdirSync(dirPath: string) {\n createDirectorySync(this.resolve(dirPath));\n }\n\n /**\n * Creates a directory at the specified path.\n *\n * @param dirPath - The path of the directory to create.\n */\n public override async mkdir(dirPath: string): Promise<void> {\n await createDirectory(this.resolve(dirPath));\n }\n\n /**\n * Lists all keys under a given base path synchronously.\n *\n * @param base - The base path to list keys from.\n * @returns An array of keys under the specified base path.\n */\n public listSync(base?: string): string[] {\n try {\n return listFilesSync(this.resolve(base), {\n ignore: this.options.ignore\n });\n } catch (err) {\n return ignoreNotfound(err) ?? [];\n }\n }\n\n /**\n * Asynchronously lists all keys under a given base path.\n *\n * @param base - The base path to list keys from.\n * @returns A promise that resolves to an array of keys under the specified base path.\n */\n public override async list(base?: string): Promise<string[]> {\n return listFiles(this.resolve(base), {\n ignore: this.options.ignore\n })\n .catch(ignoreNotfound)\n .then(r => r || []);\n }\n\n /**\n * Synchronously checks if the given key is a directory.\n *\n * @param key - The key to check.\n * @returns `true` if the key is a directory, otherwise `false`.\n */\n public override isDirectorySync(key: string): boolean {\n return isDirectory(this.resolve(key));\n }\n\n /**\n * Synchronously checks if the given key is a file.\n *\n * @param key - The key to check.\n * @returns `true` if the key is a file, otherwise `false`.\n */\n public override isFileSync(key: string): boolean {\n return isFile(this.resolve(key));\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAwCA,IAAa,2BAAb,cAA8C,mBAAmB;;;;CAI/D,AAAO,OAAO;;;;;;;CAQd,AAAyB,SAAS;;;;;;;CAQlC,AAAO,YAAY,SAAkB,SAAiC;EACpE,MAAM,SAAS,OAAO;CACxB;;;;;;;CAQA,AAAO,WAAW,KAAsB;EACtC,OAAO,WAAW,KAAK,QAAQ,GAAG,CAAC;CACrC;;;;;;;CAQA,MAAsB,OAAO,KAA+B;EAC1D,OAAO,OAAO,KAAK,QAAQ,GAAG,CAAC;CACjC;;;;;;;CAQA,AAAO,QAAQ,KAA4B;EACzC,OAAO,aAAa,KAAK,QAAQ,GAAG,CAAC;CACvC;;;;;;;CAQA,MAAsB,IAAI,KAAqC;EAC7D,OAAO,SAAS,KAAK,QAAQ,GAAG,CAAC;CACnC;;;;;;;CAQA,AAAO,QAAQ,KAAa,OAA8C;EACxE,IAAI,CAAC,KAAK,YACR,IAAI,KAAK,WAAW,KAAK,QAAQ,GAAG,CAAC,KAAK,CAAC,KAAK,WAAW;GACzD,MAAM,gBAAgB,KAAK,QAAQ,KAAK,QAAQ,GAAG,CAAC;GACpD,IACE,YAAY,aAAa,KACzB,cAAc,SACZ,yBACE,MACA,KAAK,QAAQ,OAAO,WAAW,QAAQ,YACzC,CACF,GAEA,OAAO,cACL,KAAK,QAAQ,GAAG,GAChB,cAAc,QAC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GAAG,CAAC,CAAC,CAAC,MAAM,cAAc;CAEzD;;;;;;CAOA,AAAgB,UAAU,SAAiB;EACzC,oBAAoB,KAAK,QAAQ,OAAO,CAAC;CAC3C;;;;;;CAOA,MAAsB,MAAM,SAAgC;EAC1D,MAAM,gBAAgB,KAAK,QAAQ,OAAO,CAAC;CAC7C;;;;;;;CAQA,AAAO,SAAS,MAAyB;EACvC,IAAI;GACF,OAAO,cAAc,KAAK,QAAQ,IAAI,GAAG,EACvC,QAAQ,KAAK,QAAQ,OACvB,CAAC;EACH,SAAS,KAAK;GACZ,OAAO,eAAe,GAAG,KAAK,CAAC;EACjC;CACF;;;;;;;CAQA,MAAsB,KAAK,MAAkC;EAC3D,OAAO,UAAU,KAAK,QAAQ,IAAI,GAAG,EACnC,QAAQ,KAAK,QAAQ,OACvB,CAAC,CAAC,CACC,MAAM,cAAc,CAAC,CACrB,MAAK,MAAK,KAAK,CAAC,CAAC;CACtB;;;;;;;CAQA,AAAgB,gBAAgB,KAAsB;EACpD,OAAO,YAAY,KAAK,QAAQ,GAAG,CAAC;CACtC;;;;;;;CAQA,AAAgB,WAAW,KAAsB;EAC/C,OAAO,OAAO,KAAK,QAAQ,GAAG,CAAC;CACjC;AACF"}
|
|
@@ -41,14 +41,14 @@ declare class VirtualStorageAdapter extends BaseStorageAdapter {
|
|
|
41
41
|
* @param key - The key whose value is to be retrieved.
|
|
42
42
|
* @returns The value associated with the key, or `null` if the key does not exist.
|
|
43
43
|
*/
|
|
44
|
-
getSync(key: string): string | null;
|
|
44
|
+
getSync(key: string): string | NodeJS.ArrayBufferView | null;
|
|
45
45
|
/**
|
|
46
46
|
* Synchronously sets the value for a given key.
|
|
47
47
|
*
|
|
48
48
|
* @param key - The key to set the value for.
|
|
49
49
|
* @param value - The value to set.
|
|
50
50
|
*/
|
|
51
|
-
setSync(key: string, value: string): void;
|
|
51
|
+
setSync(key: string, value: string | NodeJS.ArrayBufferView): void;
|
|
52
52
|
/**
|
|
53
53
|
* Synchronously removes a key from the storage.
|
|
54
54
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual.d.cts","names":[],"sources":["../../src/storage/virtual.ts"],"mappings":";;;;;;AAyBA;cAAa,qBAAA,SAA8B,kBAAA;;;;EAIlC,IAAA;
|
|
1
|
+
{"version":3,"file":"virtual.d.cts","names":[],"sources":["../../src/storage/virtual.ts"],"mappings":";;;;;;AAyBA;cAAa,qBAAA,SAA8B,kBAAA;;;;EAIlC,IAAA;EAyC+B;;;;;;EAAA,SAjCb,MAAA;EARlB;;;EAAA,UAaG,IAAA,EAAI,GAAA;;;;;;;cAQK,OAAA,EAAS,OAAA,EAAS,OAAA,GAAU,qBAAA;EAoBxC;;;;;;EAVA,UAAA,CAAW,GAAA;EAoBiC;;;;;;EAV5C,OAAA,CAAQ,GAAA,oBAAuB,MAAA,CAAO,eAAA;EA8CZ;;;AASD;;;EA7CzB,OAAA,CAAQ,GAAA,UAAa,KAAA,WAAgB,MAAA,CAAO,eAAA;;;;;;EAW5C,UAAA,CAAW,GAAA;;;;;;;EAYX,QAAA,CAAS,IAAA;;;;;;EAaM,OAAA,IAAW,OAAA;;;;;;gBASV,SAAA;AAAA"}
|
|
@@ -41,14 +41,14 @@ declare class VirtualStorageAdapter extends BaseStorageAdapter {
|
|
|
41
41
|
* @param key - The key whose value is to be retrieved.
|
|
42
42
|
* @returns The value associated with the key, or `null` if the key does not exist.
|
|
43
43
|
*/
|
|
44
|
-
getSync(key: string): string | null;
|
|
44
|
+
getSync(key: string): string | NodeJS.ArrayBufferView | null;
|
|
45
45
|
/**
|
|
46
46
|
* Synchronously sets the value for a given key.
|
|
47
47
|
*
|
|
48
48
|
* @param key - The key to set the value for.
|
|
49
49
|
* @param value - The value to set.
|
|
50
50
|
*/
|
|
51
|
-
setSync(key: string, value: string): void;
|
|
51
|
+
setSync(key: string, value: string | NodeJS.ArrayBufferView): void;
|
|
52
52
|
/**
|
|
53
53
|
* Synchronously removes a key from the storage.
|
|
54
54
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual.d.mts","names":[],"sources":["../../src/storage/virtual.ts"],"mappings":";;;;;;AAyBA;cAAa,qBAAA,SAA8B,kBAAA;;;;EAIlC,IAAA;
|
|
1
|
+
{"version":3,"file":"virtual.d.mts","names":[],"sources":["../../src/storage/virtual.ts"],"mappings":";;;;;;AAyBA;cAAa,qBAAA,SAA8B,kBAAA;;;;EAIlC,IAAA;EAyC+B;;;;;;EAAA,SAjCb,MAAA;EARlB;;;EAAA,UAaG,IAAA,EAAI,GAAA;;;;;;;cAQK,OAAA,EAAS,OAAA,EAAS,OAAA,GAAU,qBAAA;EAoBxC;;;;;;EAVA,UAAA,CAAW,GAAA;EAoBiC;;;;;;EAV5C,OAAA,CAAQ,GAAA,oBAAuB,MAAA,CAAO,eAAA;EA8CZ;;;AASD;;;EA7CzB,OAAA,CAAQ,GAAA,UAAa,KAAA,WAAgB,MAAA,CAAO,eAAA;;;;;;EAW5C,UAAA,CAAW,GAAA;;;;;;;EAYX,QAAA,CAAS,IAAA;;;;;;EAaM,OAAA,IAAW,OAAA;;;;;;gBASV,SAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual.mjs","names":[],"sources":["../../src/storage/virtual.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n 🗲 Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport type { Context } from \"../types/context\";\nimport { BaseStorageAdapter, StorageAdapterOptions } from \"./base\";\n\n/**\n * Virtual/in-memory storage adapter implementation.\n */\nexport class VirtualStorageAdapter extends BaseStorageAdapter {\n /**\n * A name identifying the storage adapter type.\n */\n public name = \"virtual\";\n\n /**\n * The storage preset for the adapter.\n *\n * @remarks\n * This can be used as an alternate way to identify the type of storage being used.\n */\n public override readonly preset = \"virtual\";\n\n /**\n * In-memory data storage.\n */\n protected data = new Map<string, any>();\n\n /**\n * Constructor for the VirtualStorageAdapter.\n *\n * @param context - The Powerlines context.\n * @param options - Configuration options for the storage adapter.\n */\n public constructor(context: Context, options?: StorageAdapterOptions) {\n super(context, options);\n }\n\n /**\n * Synchronously checks if a key exists in the storage.\n *\n * @param key - The key to check for existence.\n * @returns Returns `true` if the key exists, otherwise `false`.\n */\n public existsSync(key: string): boolean {\n return this.data.has(this.resolve(key));\n }\n\n /**\n * Synchronously retrieves the value associated with a given key.\n *\n * @param key - The key whose value is to be retrieved.\n * @returns The value associated with the key, or `null` if the key does not exist.\n */\n public getSync(key: string): string | null {\n return this.data.get(this.resolve(key)) ?? null;\n }\n\n /**\n * Synchronously sets the value for a given key.\n *\n * @param key - The key to set the value for.\n * @param value - The value to set.\n */\n public setSync(key: string, value: string) {\n if (!this.isReadOnly && (!this.existsSync(key) || this.overwrite)) {\n this.data.set(this.resolve(key), value);\n }\n }\n\n /**\n * Synchronously removes a key from the storage.\n *\n * @param key - The key to remove.\n */\n public removeSync(key: string) {\n if (!this.isReadOnly && this.overwrite) {\n this.data.delete(this.resolve(key));\n }\n }\n\n /**\n * Lists all keys under a given base path synchronously.\n *\n * @param base - The base path to list keys from.\n * @returns An array of keys under the specified base path.\n */\n public listSync(base?: string): string[] {\n return [\n ...this.data\n .keys()\n .filter(key => (!base ? true : isParentPath(key, this.resolve(base))))\n ];\n }\n\n /**\n * Disposes of the storage adapter, releasing any held resources.\n *\n * @returns A promise that resolves when the disposal is complete.\n */\n public override async dispose(): Promise<void> {\n return this.clear();\n }\n\n /**\n * Determines if the storage adapter should overwrite existing keys based on the provided options and context configuration.\n *\n * @returns `true` if the storage adapter should overwrite existing keys, otherwise `false`.\n */\n protected override get overwrite() {\n return !this.isReadOnly;\n }\n}\n"],"mappings":";;;;;;;AAyBA,IAAa,wBAAb,cAA2C,mBAAmB;;;;CAI5D,AAAO,OAAO;;;;;;;CAQd,AAAyB,SAAS;;;;CAKlC,AAAU,uBAAO,IAAI,IAAiB;;;;;;;CAQtC,AAAO,YAAY,SAAkB,SAAiC;EACpE,MAAM,SAAS,OAAO;CACxB;;;;;;;CAQA,AAAO,WAAW,KAAsB;EACtC,OAAO,KAAK,KAAK,IAAI,KAAK,QAAQ,GAAG,CAAC;CACxC;;;;;;;CAQA,AAAO,QAAQ,
|
|
1
|
+
{"version":3,"file":"virtual.mjs","names":[],"sources":["../../src/storage/virtual.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n 🗲 Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport type { Context } from \"../types/context\";\nimport { BaseStorageAdapter, StorageAdapterOptions } from \"./base\";\n\n/**\n * Virtual/in-memory storage adapter implementation.\n */\nexport class VirtualStorageAdapter extends BaseStorageAdapter {\n /**\n * A name identifying the storage adapter type.\n */\n public name = \"virtual\";\n\n /**\n * The storage preset for the adapter.\n *\n * @remarks\n * This can be used as an alternate way to identify the type of storage being used.\n */\n public override readonly preset = \"virtual\";\n\n /**\n * In-memory data storage.\n */\n protected data = new Map<string, any>();\n\n /**\n * Constructor for the VirtualStorageAdapter.\n *\n * @param context - The Powerlines context.\n * @param options - Configuration options for the storage adapter.\n */\n public constructor(context: Context, options?: StorageAdapterOptions) {\n super(context, options);\n }\n\n /**\n * Synchronously checks if a key exists in the storage.\n *\n * @param key - The key to check for existence.\n * @returns Returns `true` if the key exists, otherwise `false`.\n */\n public existsSync(key: string): boolean {\n return this.data.has(this.resolve(key));\n }\n\n /**\n * Synchronously retrieves the value associated with a given key.\n *\n * @param key - The key whose value is to be retrieved.\n * @returns The value associated with the key, or `null` if the key does not exist.\n */\n public getSync(key: string): string | NodeJS.ArrayBufferView | null {\n return this.data.get(this.resolve(key)) ?? null;\n }\n\n /**\n * Synchronously sets the value for a given key.\n *\n * @param key - The key to set the value for.\n * @param value - The value to set.\n */\n public setSync(key: string, value: string | NodeJS.ArrayBufferView) {\n if (!this.isReadOnly && (!this.existsSync(key) || this.overwrite)) {\n this.data.set(this.resolve(key), value);\n }\n }\n\n /**\n * Synchronously removes a key from the storage.\n *\n * @param key - The key to remove.\n */\n public removeSync(key: string) {\n if (!this.isReadOnly && this.overwrite) {\n this.data.delete(this.resolve(key));\n }\n }\n\n /**\n * Lists all keys under a given base path synchronously.\n *\n * @param base - The base path to list keys from.\n * @returns An array of keys under the specified base path.\n */\n public listSync(base?: string): string[] {\n return [\n ...this.data\n .keys()\n .filter(key => (!base ? true : isParentPath(key, this.resolve(base))))\n ];\n }\n\n /**\n * Disposes of the storage adapter, releasing any held resources.\n *\n * @returns A promise that resolves when the disposal is complete.\n */\n public override async dispose(): Promise<void> {\n return this.clear();\n }\n\n /**\n * Determines if the storage adapter should overwrite existing keys based on the provided options and context configuration.\n *\n * @returns `true` if the storage adapter should overwrite existing keys, otherwise `false`.\n */\n protected override get overwrite() {\n return !this.isReadOnly;\n }\n}\n"],"mappings":";;;;;;;AAyBA,IAAa,wBAAb,cAA2C,mBAAmB;;;;CAI5D,AAAO,OAAO;;;;;;;CAQd,AAAyB,SAAS;;;;CAKlC,AAAU,uBAAO,IAAI,IAAiB;;;;;;;CAQtC,AAAO,YAAY,SAAkB,SAAiC;EACpE,MAAM,SAAS,OAAO;CACxB;;;;;;;CAQA,AAAO,WAAW,KAAsB;EACtC,OAAO,KAAK,KAAK,IAAI,KAAK,QAAQ,GAAG,CAAC;CACxC;;;;;;;CAQA,AAAO,QAAQ,KAAqD;EAClE,OAAO,KAAK,KAAK,IAAI,KAAK,QAAQ,GAAG,CAAC,KAAK;CAC7C;;;;;;;CAQA,AAAO,QAAQ,KAAa,OAAwC;EAClE,IAAI,CAAC,KAAK,eAAe,CAAC,KAAK,WAAW,GAAG,KAAK,KAAK,YACrD,KAAK,KAAK,IAAI,KAAK,QAAQ,GAAG,GAAG,KAAK;CAE1C;;;;;;CAOA,AAAO,WAAW,KAAa;EAC7B,IAAI,CAAC,KAAK,cAAc,KAAK,WAC3B,KAAK,KAAK,OAAO,KAAK,QAAQ,GAAG,CAAC;CAEtC;;;;;;;CAQA,AAAO,SAAS,MAAyB;EACvC,OAAO,CACL,GAAG,KAAK,KACL,KAAK,CAAC,CACN,QAAO,QAAQ,CAAC,OAAO,OAAO,aAAa,KAAK,KAAK,QAAQ,IAAI,CAAC,CAAE,CACzE;CACF;;;;;;CAOA,MAAsB,UAAyB;EAC7C,OAAO,KAAK,MAAM;CACpB;;;;;;CAOA,IAAuB,YAAY;EACjC,OAAO,CAAC,KAAK;CACf;AACF"}
|
package/dist/types/context.d.cts
CHANGED
|
@@ -133,6 +133,18 @@ interface EmitOptions extends WriteOptions {
|
|
|
133
133
|
* Options for emitting entry virtual files
|
|
134
134
|
*/
|
|
135
135
|
type EmitEntryOptions = EmitOptions & Omit<ResolvedEntryFileReference, "file">;
|
|
136
|
+
/**
|
|
137
|
+
* Options for emitting entry virtual files
|
|
138
|
+
*/
|
|
139
|
+
type EmitBuiltinOptions = EmitOptions & {
|
|
140
|
+
/**
|
|
141
|
+
* An indicator specifying that the emitted builtin file should be treated as an internal module, which means it will not be exposed to the user and can only be imported by other virtual files within the Powerlines runtime.
|
|
142
|
+
*
|
|
143
|
+
* @remarks
|
|
144
|
+
* This is useful for built-in modules that are meant to be used internally by the Powerlines engine and should not be accessible to user code.
|
|
145
|
+
*/
|
|
146
|
+
internal?: boolean;
|
|
147
|
+
};
|
|
136
148
|
interface ResolveResult extends ExternalIdResult {
|
|
137
149
|
/**
|
|
138
150
|
* A flag indicating whether the resolved module is part of the generated runtime modules
|
|
@@ -436,7 +448,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
436
448
|
* @param id - The unique identifier of the builtin file
|
|
437
449
|
* @param options - Additional options for writing the builtin file
|
|
438
450
|
*/
|
|
439
|
-
emitBuiltin: (code: string, id: string, options?:
|
|
451
|
+
emitBuiltin: (code: string, id: string, options?: EmitBuiltinOptions) => Promise<void>;
|
|
440
452
|
/**
|
|
441
453
|
* Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
442
454
|
*
|
|
@@ -444,7 +456,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
444
456
|
* @param id - The unique identifier of the builtin file
|
|
445
457
|
* @param options - Additional options for writing the builtin file
|
|
446
458
|
*/
|
|
447
|
-
emitBuiltinSync: (code: string, id: string, options?:
|
|
459
|
+
emitBuiltinSync: (code: string, id: string, options?: EmitBuiltinOptions) => void;
|
|
448
460
|
/**
|
|
449
461
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
450
462
|
*
|
|
@@ -678,5 +690,5 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
678
690
|
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
|
|
679
691
|
type WithUnpluginBuildContext<TContext extends PluginContext> = UnpluginBuildContext & TContext;
|
|
680
692
|
//#endregion
|
|
681
|
-
export { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentPlugin, ExecutionContext, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult$1 as TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext };
|
|
693
|
+
export { BaseContext, BuildPluginContext, Context, EmitBuiltinOptions, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentPlugin, ExecutionContext, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult$1 as TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext };
|
|
682
694
|
//# sourceMappingURL=context.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.cts","names":[],"sources":["../../src/types/context.ts"],"mappings":";;;;;;;;;;;;;;;;;;KAuDY,QAAA,GAAW,MAAM;EAAjB;;;EAIV,QAAA;EAJqB;;;EASrB,WAAA;EAUA;;;EALA,OAAA;EAoBU;AAAA;AAGZ;EAlBE,SAAA;;;;EAKA,SAAA;EAcQ;;AAAI;EATZ,QAAA;EAY8B;;;EAP9B,UAAA;AAAA;AAAA,UAGe,QAAA,SAAiB,IAAI;EACpC,MAAA,EAAQ,IAAA;AAAA;AAAA,UAGO,iBAAA;EACf,IAAA;EACA,GAAA,EAAK,SAAS;AAAA;;;;UAMC,UAAA;EAmBf;;;EAfA,EAAA;EAkBU;;;EAbV,IAAA,EAAM,WAAA;EAasB;;;EAR5B,GAAA;EAUuC;;;EALvC,MAAA,GAAS,iBAAe;AAAA;AAAA,KAGd,eAAA,GAAkB,IAAA,CAAK,QAAA;EACjC,WAAA,QAAmB,OAAA;EACnB,aAAA,GAAgB,MAAA,EAAQ,UAAA,KAAe,OAAA,CAAQ,UAAA;EAC/C,qBAAA,QAA6B,OAAA;AAAA;AAAA,UAGd,kBAAA;EACf,KAAK;AAAA;;;;UAMU,kBAAA;EAPA;;;;AACV;EAYL,cAAc;AAAA;;;AAAA;UAMC,YAAA,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AAA,GAAuB,QAAA"}
|
package/dist/types/context.d.mts
CHANGED
|
@@ -133,6 +133,18 @@ interface EmitOptions extends WriteOptions {
|
|
|
133
133
|
* Options for emitting entry virtual files
|
|
134
134
|
*/
|
|
135
135
|
type EmitEntryOptions = EmitOptions & Omit<ResolvedEntryFileReference, "file">;
|
|
136
|
+
/**
|
|
137
|
+
* Options for emitting entry virtual files
|
|
138
|
+
*/
|
|
139
|
+
type EmitBuiltinOptions = EmitOptions & {
|
|
140
|
+
/**
|
|
141
|
+
* An indicator specifying that the emitted builtin file should be treated as an internal module, which means it will not be exposed to the user and can only be imported by other virtual files within the Powerlines runtime.
|
|
142
|
+
*
|
|
143
|
+
* @remarks
|
|
144
|
+
* This is useful for built-in modules that are meant to be used internally by the Powerlines engine and should not be accessible to user code.
|
|
145
|
+
*/
|
|
146
|
+
internal?: boolean;
|
|
147
|
+
};
|
|
136
148
|
interface ResolveResult extends ExternalIdResult {
|
|
137
149
|
/**
|
|
138
150
|
* A flag indicating whether the resolved module is part of the generated runtime modules
|
|
@@ -436,7 +448,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
436
448
|
* @param id - The unique identifier of the builtin file
|
|
437
449
|
* @param options - Additional options for writing the builtin file
|
|
438
450
|
*/
|
|
439
|
-
emitBuiltin: (code: string, id: string, options?:
|
|
451
|
+
emitBuiltin: (code: string, id: string, options?: EmitBuiltinOptions) => Promise<void>;
|
|
440
452
|
/**
|
|
441
453
|
* Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
442
454
|
*
|
|
@@ -444,7 +456,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
444
456
|
* @param id - The unique identifier of the builtin file
|
|
445
457
|
* @param options - Additional options for writing the builtin file
|
|
446
458
|
*/
|
|
447
|
-
emitBuiltinSync: (code: string, id: string, options?:
|
|
459
|
+
emitBuiltinSync: (code: string, id: string, options?: EmitBuiltinOptions) => void;
|
|
448
460
|
/**
|
|
449
461
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
450
462
|
*
|
|
@@ -678,5 +690,5 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
678
690
|
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
|
|
679
691
|
type WithUnpluginBuildContext<TContext extends PluginContext> = UnpluginBuildContext & TContext;
|
|
680
692
|
//#endregion
|
|
681
|
-
export { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentPlugin, ExecutionContext, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult$1 as TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext };
|
|
693
|
+
export { BaseContext, BuildPluginContext, Context, EmitBuiltinOptions, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentPlugin, ExecutionContext, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult$1 as TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext };
|
|
682
694
|
//# sourceMappingURL=context.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.mts","names":[],"sources":["../../src/types/context.ts"],"mappings":";;;;;;;;;;;;;;;;;;KAuDY,QAAA,GAAW,MAAM;EAAjB;;;EAIV,QAAA;EAJqB;;;EASrB,WAAA;EAUA;;;EALA,OAAA;EAoBU;AAAA;AAGZ;EAlBE,SAAA;;;;EAKA,SAAA;EAcQ;;AAAI;EATZ,QAAA;EAY8B;;;EAP9B,UAAA;AAAA;AAAA,UAGe,QAAA,SAAiB,IAAI;EACpC,MAAA,EAAQ,IAAA;AAAA;AAAA,UAGO,iB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eAAA,EAAiB,cAAA,GAAiB,IAAA;EAvB1B;;;;;;;;EAiC5C,kBAAA,GACE,MAAA,EAAQ,YAAA,CAAa,aAAA,CAAc,eAAA,EAAiB,cAAA,OACjD,OAAA;AAAA;AAAA,UAGU,aAAA,6BACa,cAAA,GAAiB,cAAA,gCAErC,OAAA,CAAQ,yBAAA,CAA0B,eAAA,GAAkB,cAAA;EAlBxB;;;EAAA,SAsB3B,EAAA;EAtBJ;;;EAAA,SA2BI,WAAA,EAAa,kBAAA;AAAA;AAAA,KAGZ,kBAAA,yBACc,cAAA,GAAiB,cAAA,IACvC,oBAAA,GAAuB,aAAA,CAAc,eAAA;AAAA,KAE7B,wBAAA,kBAA0C,aAAA,IACpD,oBAAA,GAAuB,QAAA"}
|
package/dist/types/fs.d.cts
CHANGED
|
@@ -40,28 +40,28 @@ interface StorageAdapter {
|
|
|
40
40
|
* @param key - The key to read the value for.
|
|
41
41
|
* @returns A promise that resolves to the value if found, otherwise `null`.
|
|
42
42
|
*/
|
|
43
|
-
get: (key: string) => Promise<string | null>;
|
|
43
|
+
get: (key: string) => Promise<string | NodeJS.ArrayBufferView | null>;
|
|
44
44
|
/**
|
|
45
45
|
* Synchronously reads the value associated with a key from the storage.
|
|
46
46
|
*
|
|
47
47
|
* @param key - The key to read the value for.
|
|
48
48
|
* @returns The value if found, otherwise `null`.
|
|
49
49
|
*/
|
|
50
|
-
getSync: (key: string) => string | null;
|
|
50
|
+
getSync: (key: string) => string | NodeJS.ArrayBufferView | null;
|
|
51
51
|
/**
|
|
52
52
|
* Writes a value to the storage for the given key.
|
|
53
53
|
*
|
|
54
54
|
* @param key - The key to associate the value with.
|
|
55
55
|
* @param value - The value to store.
|
|
56
56
|
*/
|
|
57
|
-
set: (key: string, value: string) => Promise<void>;
|
|
57
|
+
set: (key: string, value: string | NodeJS.ArrayBufferView) => Promise<void>;
|
|
58
58
|
/**
|
|
59
59
|
* Synchronously writes a value to the storage for the given key.
|
|
60
60
|
*
|
|
61
61
|
* @param key - The key to associate the value with.
|
|
62
62
|
* @param value - The value to store.
|
|
63
63
|
*/
|
|
64
|
-
setSync: (key: string, value: string) => void;
|
|
64
|
+
setSync: (key: string, value: string | NodeJS.ArrayBufferView) => void;
|
|
65
65
|
/**
|
|
66
66
|
* Removes a value from the storage.
|
|
67
67
|
*
|
|
@@ -413,6 +413,19 @@ interface VirtualFileSystemInterface {
|
|
|
413
413
|
* @param path - The path or id of the file.
|
|
414
414
|
*/
|
|
415
415
|
readSync: (path: string) => string | undefined;
|
|
416
|
+
/**
|
|
417
|
+
* Reads a file from the virtual file system (VFS).
|
|
418
|
+
*
|
|
419
|
+
* @param path - The path or id of the file.
|
|
420
|
+
* @returns The contents of the file if it exists, otherwise undefined.
|
|
421
|
+
*/
|
|
422
|
+
readBuffer: (path: string) => Promise<NodeJS.ArrayBufferView | undefined>;
|
|
423
|
+
/**
|
|
424
|
+
* Reads a file from the virtual file system (VFS).
|
|
425
|
+
*
|
|
426
|
+
* @param path - The path or id of the file.
|
|
427
|
+
*/
|
|
428
|
+
readBufferSync: (path: string) => NodeJS.ArrayBufferView | undefined;
|
|
416
429
|
/**
|
|
417
430
|
* Writes a file to the virtual file system (VFS).
|
|
418
431
|
*
|
|
@@ -421,7 +434,7 @@ interface VirtualFileSystemInterface {
|
|
|
421
434
|
* @param options - Options for writing the file.
|
|
422
435
|
* @returns A promise that resolves when the file is written.
|
|
423
436
|
*/
|
|
424
|
-
write: (path: string, data: string, options?: WriteOptions) => Promise<void>;
|
|
437
|
+
write: (path: string, data: string | NodeJS.ArrayBufferView, options?: WriteOptions) => Promise<void>;
|
|
425
438
|
/**
|
|
426
439
|
* Writes a file to the virtual file system (VFS).
|
|
427
440
|
*
|
|
@@ -429,7 +442,7 @@ interface VirtualFileSystemInterface {
|
|
|
429
442
|
* @param data - The contents of the file.
|
|
430
443
|
* @param options - Options for writing the file.
|
|
431
444
|
*/
|
|
432
|
-
writeSync: (path: string, data: string, options?: WriteOptions) => void;
|
|
445
|
+
writeSync: (path: string, data: string | NodeJS.ArrayBufferView, options?: WriteOptions) => void;
|
|
433
446
|
/**
|
|
434
447
|
* Creates a directory at the specified path.
|
|
435
448
|
*
|
package/dist/types/fs.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.cts","names":[],"sources":["../../src/types/fs.ts"],"mappings":";;;;;KAsBY,oBAAA;AAAA,KAEA,aAAA;AAFZ;;;AAAA,UAOiB,cAAA;EAPe;AAEhC;;EASE,IAAA;EATuB;AAAA;AAKzB;;;;EAYE,MAAA,GAAS,aAAA;
|
|
1
|
+
{"version":3,"file":"fs.d.cts","names":[],"sources":["../../src/types/fs.ts"],"mappings":";;;;;KAsBY,oBAAA;AAAA,KAEA,aAAA;AAFZ;;;AAAA,UAOiB,cAAA;EAPe;AAEhC;;EASE,IAAA;EATuB;AAAA;AAKzB;;;;EAYE,MAAA,GAAS,aAAA;EAwB8B;;;;;;EAhBvC,MAAA,GAAS,GAAA,aAAgB,OAAA;EA6DG;;;;;;EArD5B,UAAA,GAAa,GAAA;EA+Hc;;;;;;EAvH3B,GAAA,GAAM,GAAA,aAAgB,OAAA,UAAiB,MAAA,CAAO,eAAA;EAR9C;;;;;;EAgBA,OAAA,GAAU,GAAA,sBAAyB,MAAA,CAAO,eAAA;EAA1C;;;;;;EAQA,GAAA,GAAM,GAAA,UAAa,KAAA,WAAgB,MAAA,CAAO,eAAA,KAAoB,OAAA;EAApB;;;;;;EAQ1C,OAAA,GAAU,GAAA,UAAa,KAAA,WAAgB,MAAA,CAAO,eAAA;EAAvB;;;;;EAOvB,MAAA,GAAS,GAAA,aAAgB,OAAA;EAczB;;;;;EAPA,UAAA,GAAa,GAAA;EAqBL;;;;;EAdR,KAAA,GAAQ,OAAA,aAAoB,OAAA;EA6BH;;;;;EAtBzB,SAAA,GAAY,OAAA;EA8CZ;;;;;EAvCA,KAAA,GAAQ,IAAA,cAAkB,OAAA;EAuDb;;;;AAKc;EArD3B,SAAA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AO,eAAA;;;;;;EAO7C,cAAA,GAAiB,IAAA,aAAiB,MAAA,CAAO,eAAA;;;;;;;;;EAUzC,KAAA,GACE,IAAA,UACA,IAAA,WAAe,MAAA,CAAO,eAAA,EACtB,OAAA,GAAU,YAAA,KACP,OAAA;;;;;;;;EASL,SAAA,GACE,IAAA,UACA,IAAA,WAAe,MAAA,CAAO,eAAA,EACtB,OAAA,GAAU,YAAA;;;;;;EAQZ,KAAA,GAAQ,OAAA,aAAoB,OAAA;;;;;;EAO5B,SAAA,GAAY,OAAA;;;;;;;EAQZ,IAAA,GAAO,OAAA,UAAiB,QAAA,aAAqB,OAAA;;;;;;;EAQ7C,QAAA,GAAW,OAAA,UAAiB,QAAA;;;;;;;EAQ5B,IAAA,GACE,OAAA,WAAkB,GAAA,GAAM,IAAA,CAAK,SAAA,aAC7B,QAAA,WAAmB,GAAA,KAChB,OAAA;;;;;;;EAQL,QAAA,GACE,OAAA,WAAkB,GAAA,GAAM,IAAA,CAAK,SAAA,aAC7B,QAAA,WAAmB,GAAA;;;;;;;EASrB,IAAA,GACE,QAAA,WAEI,IAAA,CAAK,SAAA,wBACK,IAAA,CAAK,SAAA,mBAChB,OAAA;;;;;;;EAQL,QAAA,GACE,QAAA,WAEI,IAAA,CAAK,SAAA,wBACK,IAAA,CAAK,SAAA;;;;;;;;;;;;;;;;;EAmBrB,OAAA,GACE,EAAA,UACA,QAAA,WACA,OAAA,GAAU,gBAAA,KACP,OAAA;;;;;;;;;;;;;;;;;EAkBL,WAAA,GACE,EAAA,UACA,QAAA,WACA,OAAA,GAAU,gBAAA;;;;;;;;;;EAYZ,YAAA,GAAe,EAAA;;;;EAKf,OAAA,QAAe,OAAA;AAAA"}
|
package/dist/types/fs.d.mts
CHANGED
|
@@ -40,28 +40,28 @@ interface StorageAdapter {
|
|
|
40
40
|
* @param key - The key to read the value for.
|
|
41
41
|
* @returns A promise that resolves to the value if found, otherwise `null`.
|
|
42
42
|
*/
|
|
43
|
-
get: (key: string) => Promise<string | null>;
|
|
43
|
+
get: (key: string) => Promise<string | NodeJS.ArrayBufferView | null>;
|
|
44
44
|
/**
|
|
45
45
|
* Synchronously reads the value associated with a key from the storage.
|
|
46
46
|
*
|
|
47
47
|
* @param key - The key to read the value for.
|
|
48
48
|
* @returns The value if found, otherwise `null`.
|
|
49
49
|
*/
|
|
50
|
-
getSync: (key: string) => string | null;
|
|
50
|
+
getSync: (key: string) => string | NodeJS.ArrayBufferView | null;
|
|
51
51
|
/**
|
|
52
52
|
* Writes a value to the storage for the given key.
|
|
53
53
|
*
|
|
54
54
|
* @param key - The key to associate the value with.
|
|
55
55
|
* @param value - The value to store.
|
|
56
56
|
*/
|
|
57
|
-
set: (key: string, value: string) => Promise<void>;
|
|
57
|
+
set: (key: string, value: string | NodeJS.ArrayBufferView) => Promise<void>;
|
|
58
58
|
/**
|
|
59
59
|
* Synchronously writes a value to the storage for the given key.
|
|
60
60
|
*
|
|
61
61
|
* @param key - The key to associate the value with.
|
|
62
62
|
* @param value - The value to store.
|
|
63
63
|
*/
|
|
64
|
-
setSync: (key: string, value: string) => void;
|
|
64
|
+
setSync: (key: string, value: string | NodeJS.ArrayBufferView) => void;
|
|
65
65
|
/**
|
|
66
66
|
* Removes a value from the storage.
|
|
67
67
|
*
|
|
@@ -413,6 +413,19 @@ interface VirtualFileSystemInterface {
|
|
|
413
413
|
* @param path - The path or id of the file.
|
|
414
414
|
*/
|
|
415
415
|
readSync: (path: string) => string | undefined;
|
|
416
|
+
/**
|
|
417
|
+
* Reads a file from the virtual file system (VFS).
|
|
418
|
+
*
|
|
419
|
+
* @param path - The path or id of the file.
|
|
420
|
+
* @returns The contents of the file if it exists, otherwise undefined.
|
|
421
|
+
*/
|
|
422
|
+
readBuffer: (path: string) => Promise<NodeJS.ArrayBufferView | undefined>;
|
|
423
|
+
/**
|
|
424
|
+
* Reads a file from the virtual file system (VFS).
|
|
425
|
+
*
|
|
426
|
+
* @param path - The path or id of the file.
|
|
427
|
+
*/
|
|
428
|
+
readBufferSync: (path: string) => NodeJS.ArrayBufferView | undefined;
|
|
416
429
|
/**
|
|
417
430
|
* Writes a file to the virtual file system (VFS).
|
|
418
431
|
*
|
|
@@ -421,7 +434,7 @@ interface VirtualFileSystemInterface {
|
|
|
421
434
|
* @param options - Options for writing the file.
|
|
422
435
|
* @returns A promise that resolves when the file is written.
|
|
423
436
|
*/
|
|
424
|
-
write: (path: string, data: string, options?: WriteOptions) => Promise<void>;
|
|
437
|
+
write: (path: string, data: string | NodeJS.ArrayBufferView, options?: WriteOptions) => Promise<void>;
|
|
425
438
|
/**
|
|
426
439
|
* Writes a file to the virtual file system (VFS).
|
|
427
440
|
*
|
|
@@ -429,7 +442,7 @@ interface VirtualFileSystemInterface {
|
|
|
429
442
|
* @param data - The contents of the file.
|
|
430
443
|
* @param options - Options for writing the file.
|
|
431
444
|
*/
|
|
432
|
-
writeSync: (path: string, data: string, options?: WriteOptions) => void;
|
|
445
|
+
writeSync: (path: string, data: string | NodeJS.ArrayBufferView, options?: WriteOptions) => void;
|
|
433
446
|
/**
|
|
434
447
|
* Creates a directory at the specified path.
|
|
435
448
|
*
|
package/dist/types/fs.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.mts","names":[],"sources":["../../src/types/fs.ts"],"mappings":";;;;;KAsBY,oBAAA;AAAA,KAEA,aAAA;AAFZ;;;AAAA,UAOiB,cAAA;EAPe;AAEhC;;EASE,IAAA;EATuB;AAAA;AAKzB;;;;EAYE,MAAA,GAAS,aAAA;
|
|
1
|
+
{"version":3,"file":"fs.d.mts","names":[],"sources":["../../src/types/fs.ts"],"mappings":";;;;;KAsBY,oBAAA;AAAA,KAEA,aAAA;AAFZ;;;AAAA,UAOiB,cAAA;EAPe;AAEhC;;EASE,IAAA;EATuB;AAAA;AAKzB;;;;EAYE,MAAA,GAAS,aAAA;EAwB8B;;;;;;EAhBvC,MAAA,GAAS,GAAA,aAAgB,OAAA;EA6DG;;;;;;EArD5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