@powerlines/core 0.14.5 → 0.15.1
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/api.cjs +6 -5
- package/dist/constants/api.d.cts +3 -3
- package/dist/constants/api.d.cts.map +1 -1
- package/dist/constants/api.d.mts +3 -3
- package/dist/constants/api.d.mts.map +1 -1
- package/dist/constants/api.mjs +4 -4
- package/dist/constants/api.mjs.map +1 -1
- package/dist/constants/commands.cjs +3 -2
- package/dist/constants/commands.d.cts +1 -1
- package/dist/constants/commands.d.mts +1 -1
- package/dist/constants/commands.mjs +2 -2
- package/dist/constants/commands.mjs.map +1 -1
- package/dist/constants/devtools.cjs +23 -0
- package/dist/constants/devtools.d.cts +13 -0
- package/dist/constants/devtools.d.cts.map +1 -0
- package/dist/constants/devtools.d.mts +13 -0
- package/dist/constants/devtools.d.mts.map +1 -0
- package/dist/constants/devtools.mjs +14 -0
- package/dist/constants/devtools.mjs.map +1 -0
- package/dist/constants/environments.cjs +1 -0
- package/dist/constants/extensions.cjs +21 -0
- package/dist/constants/extensions.d.cts +5 -0
- package/dist/constants/extensions.d.cts.map +1 -0
- package/dist/constants/extensions.d.mts +5 -0
- package/dist/constants/extensions.d.mts.map +1 -0
- package/dist/constants/extensions.mjs +20 -0
- package/dist/constants/extensions.mjs.map +1 -0
- package/dist/constants/fs.cjs +1 -0
- package/dist/constants/hooks.cjs +1 -0
- package/dist/constants/index.cjs +48 -30
- package/dist/constants/index.d.cts +5 -3
- package/dist/constants/index.d.mts +5 -3
- package/dist/constants/index.mjs +5 -3
- package/dist/constants/log-level.cjs +90 -0
- package/dist/constants/log-level.d.cts +63 -0
- package/dist/constants/log-level.d.cts.map +1 -0
- package/dist/constants/log-level.d.mts +63 -0
- package/dist/constants/log-level.d.mts.map +1 -0
- package/dist/constants/log-level.mjs +82 -0
- package/dist/constants/log-level.mjs.map +1 -0
- package/dist/constants/meta.cjs +1 -0
- package/dist/constants/plugin.cjs +3 -2
- package/dist/constants/plugin.d.cts +2 -2
- package/dist/constants/plugin.d.mts +2 -2
- package/dist/context/base-context.cjs +127 -0
- package/dist/context/base-context.d.cts +81 -0
- package/dist/context/base-context.d.cts.map +1 -0
- package/dist/context/base-context.d.mts +81 -0
- package/dist/context/base-context.d.mts.map +1 -0
- package/dist/context/base-context.mjs +125 -0
- package/dist/context/base-context.mjs.map +1 -0
- package/dist/context/context.cjs +934 -0
- package/dist/context/context.d.cts +369 -0
- package/dist/context/context.d.cts.map +1 -0
- package/dist/context/context.d.mts +369 -0
- package/dist/context/context.d.mts.map +1 -0
- package/dist/context/context.mjs +932 -0
- package/dist/context/context.mjs.map +1 -0
- package/dist/context/environment-context.cjs +219 -0
- package/dist/context/environment-context.d.cts +100 -0
- package/dist/context/environment-context.d.cts.map +1 -0
- package/dist/context/environment-context.d.mts +100 -0
- package/dist/context/environment-context.d.mts.map +1 -0
- package/dist/context/environment-context.mjs +218 -0
- package/dist/context/environment-context.mjs.map +1 -0
- package/dist/context/execution-context.cjs +230 -0
- package/dist/context/execution-context.d.cts +101 -0
- package/dist/context/execution-context.d.cts.map +1 -0
- package/dist/context/execution-context.d.mts +101 -0
- package/dist/context/execution-context.d.mts.map +1 -0
- package/dist/context/execution-context.mjs +228 -0
- package/dist/context/execution-context.mjs.map +1 -0
- package/dist/context/index.cjs +12 -0
- package/dist/context/index.d.cts +6 -0
- package/dist/context/index.d.mts +6 -0
- package/dist/context/index.mjs +7 -0
- package/dist/context/plugin-context.cjs +83 -0
- package/dist/context/plugin-context.d.cts +18 -0
- package/dist/context/plugin-context.d.cts.map +1 -0
- package/dist/context/plugin-context.d.mts +18 -0
- package/dist/context/plugin-context.d.mts.map +1 -0
- package/dist/context/plugin-context.mjs +82 -0
- package/dist/context/plugin-context.mjs.map +1 -0
- package/dist/index.cjs +62 -9
- package/dist/index.d.cts +20 -9
- package/dist/index.d.mts +20 -9
- package/dist/index.mjs +17 -5
- package/dist/lib/config.cjs +160 -15
- package/dist/lib/config.d.cts +92 -6
- package/dist/lib/config.d.cts.map +1 -1
- package/dist/lib/config.d.mts +92 -6
- package/dist/lib/config.d.mts.map +1 -1
- package/dist/lib/config.mjs +154 -16
- package/dist/lib/config.mjs.map +1 -1
- package/dist/lib/context-helpers.cjs +43 -0
- package/dist/lib/context-helpers.d.cts +19 -0
- package/dist/lib/context-helpers.d.cts.map +1 -0
- package/dist/lib/context-helpers.d.mts +19 -0
- package/dist/lib/context-helpers.d.mts.map +1 -0
- package/dist/lib/context-helpers.mjs +41 -0
- package/dist/lib/context-helpers.mjs.map +1 -0
- package/dist/lib/entry.cjs +5 -5
- package/dist/lib/entry.d.cts.map +1 -1
- package/dist/lib/entry.d.mts.map +1 -1
- package/dist/lib/entry.mjs +5 -5
- package/dist/lib/entry.mjs.map +1 -1
- package/dist/lib/environment.cjs +72 -0
- package/dist/lib/environment.d.cts +12 -0
- package/dist/lib/environment.d.cts.map +1 -0
- package/dist/lib/environment.d.mts +12 -0
- package/dist/lib/environment.d.mts.map +1 -0
- package/dist/lib/environment.mjs +67 -0
- package/dist/lib/environment.mjs.map +1 -0
- package/dist/lib/events.cjs +43 -0
- package/dist/lib/events.d.cts +10 -0
- package/dist/lib/events.d.cts.map +1 -0
- package/dist/lib/events.d.mts +10 -0
- package/dist/lib/events.d.mts.map +1 -0
- package/dist/lib/events.mjs +42 -0
- package/dist/lib/events.mjs.map +1 -0
- package/dist/lib/generate-types.cjs +371 -0
- package/dist/lib/generate-types.d.cts +67 -0
- package/dist/lib/generate-types.d.cts.map +1 -0
- package/dist/lib/generate-types.d.mts +67 -0
- package/dist/lib/generate-types.d.mts.map +1 -0
- package/dist/lib/generate-types.mjs +368 -0
- package/dist/lib/generate-types.mjs.map +1 -0
- package/dist/lib/hooks.cjs +152 -0
- package/dist/lib/hooks.d.cts +28 -0
- package/dist/lib/hooks.d.cts.map +1 -0
- package/dist/lib/hooks.d.mts +28 -0
- package/dist/lib/hooks.d.mts.map +1 -0
- package/dist/lib/hooks.mjs +147 -0
- package/dist/lib/hooks.mjs.map +1 -0
- package/dist/lib/index.cjs +64 -9
- package/dist/lib/index.d.cts +15 -3
- package/dist/lib/index.d.mts +15 -3
- package/dist/lib/index.mjs +19 -5
- package/dist/lib/install-dependencies.cjs +25 -0
- package/dist/lib/install-dependencies.d.cts +12 -0
- package/dist/lib/install-dependencies.d.cts.map +1 -0
- package/dist/lib/install-dependencies.d.mts +12 -0
- package/dist/lib/install-dependencies.d.mts.map +1 -0
- package/dist/lib/install-dependencies.mjs +24 -0
- package/dist/lib/install-dependencies.mjs.map +1 -0
- package/dist/lib/meta.cjs +57 -0
- package/dist/lib/meta.d.cts +34 -0
- package/dist/lib/meta.d.cts.map +1 -0
- package/dist/lib/meta.d.mts +34 -0
- package/dist/lib/meta.d.mts.map +1 -0
- package/dist/lib/meta.mjs +54 -0
- package/dist/lib/meta.mjs.map +1 -0
- package/dist/lib/plugins.cjs +150 -0
- package/dist/lib/plugins.d.cts +40 -0
- package/dist/lib/plugins.d.cts.map +1 -0
- package/dist/lib/plugins.d.mts +40 -0
- package/dist/lib/plugins.d.mts.map +1 -0
- package/dist/lib/plugins.mjs +146 -0
- package/dist/lib/plugins.mjs.map +1 -0
- package/dist/lib/resolver.cjs +35 -0
- package/dist/lib/resolver.d.cts +21 -0
- package/dist/lib/resolver.d.cts.map +1 -0
- package/dist/lib/resolver.d.mts +21 -0
- package/dist/lib/resolver.d.mts.map +1 -0
- package/dist/lib/resolver.mjs +33 -0
- package/dist/lib/resolver.mjs.map +1 -0
- package/dist/lib/schemas.cjs +9 -0
- package/dist/lib/schemas.d.cts +2 -0
- package/dist/lib/schemas.d.mts +2 -0
- package/dist/lib/schemas.mjs +3 -0
- package/dist/lib/streaming-channel.cjs +260 -0
- package/dist/lib/streaming-channel.d.cts +133 -0
- package/dist/lib/streaming-channel.d.cts.map +1 -0
- package/dist/lib/streaming-channel.d.mts +133 -0
- package/dist/lib/streaming-channel.d.mts.map +1 -0
- package/dist/lib/streaming-channel.mjs +258 -0
- package/dist/lib/streaming-channel.mjs.map +1 -0
- package/dist/lib/typescript/index.cjs +16 -0
- package/dist/lib/typescript/index.d.cts +3 -0
- package/dist/lib/typescript/index.d.mts +3 -0
- package/dist/lib/typescript/index.mjs +4 -0
- package/dist/lib/typescript/ts-morph.cjs +105 -0
- package/dist/lib/typescript/ts-morph.d.cts +38 -0
- package/dist/lib/typescript/ts-morph.d.cts.map +1 -0
- package/dist/lib/typescript/ts-morph.d.mts +38 -0
- package/dist/lib/typescript/ts-morph.d.mts.map +1 -0
- package/dist/lib/typescript/ts-morph.mjs +102 -0
- package/dist/lib/typescript/ts-morph.mjs.map +1 -0
- package/dist/lib/typescript/tsconfig.cjs +253 -0
- package/dist/lib/typescript/tsconfig.d.cts +77 -0
- package/dist/lib/typescript/tsconfig.d.cts.map +1 -0
- package/dist/lib/typescript/tsconfig.d.mts +77 -0
- package/dist/lib/typescript/tsconfig.d.mts.map +1 -0
- package/dist/lib/typescript/tsconfig.mjs +240 -0
- package/dist/lib/typescript/tsconfig.mjs.map +1 -0
- package/dist/lib/unplugin/helpers.cjs +2 -2
- package/dist/lib/unplugin/module-resolution.cjs +18 -18
- package/dist/lib/unplugin/module-resolution.mjs +18 -18
- package/dist/lib/unplugin/module-resolution.mjs.map +1 -1
- package/dist/lib/unplugin/plugin.cjs +55 -62
- package/dist/lib/unplugin/plugin.d.cts +10 -11
- package/dist/lib/unplugin/plugin.d.cts.map +1 -1
- package/dist/lib/unplugin/plugin.d.mts +10 -11
- package/dist/lib/unplugin/plugin.d.mts.map +1 -1
- package/dist/lib/unplugin/plugin.mjs +55 -62
- package/dist/lib/unplugin/plugin.mjs.map +1 -1
- package/dist/lib/utilities/file-header.cjs +2 -2
- package/dist/lib/utilities/file-header.mjs +2 -2
- package/dist/lib/utilities/file-header.mjs.map +1 -1
- package/dist/lib/utilities/format.cjs +1 -1
- package/dist/lib/utilities/format.mjs +1 -1
- package/dist/lib/utilities/index.cjs +2 -2
- package/dist/lib/utilities/index.mjs +2 -2
- package/dist/lib/utilities/write-file.cjs +1 -2
- package/dist/lib/utilities/write-file.d.cts +1 -1
- package/dist/lib/utilities/write-file.d.cts.map +1 -1
- package/dist/lib/utilities/write-file.d.mts +1 -1
- package/dist/lib/utilities/write-file.d.mts.map +1 -1
- package/dist/lib/utilities/write-file.mjs +1 -2
- package/dist/lib/utilities/write-file.mjs.map +1 -1
- package/dist/lib/vfs.cjs +1104 -0
- package/dist/lib/vfs.d.cts +321 -0
- package/dist/lib/vfs.d.cts.map +1 -0
- package/dist/lib/vfs.d.mts +321 -0
- package/dist/lib/vfs.d.mts.map +1 -0
- package/dist/lib/vfs.mjs +1102 -0
- package/dist/lib/vfs.mjs.map +1 -0
- package/dist/plugin-base.cjs +1 -1
- package/dist/plugin-base.mjs +1 -1
- package/dist/plugin-base.mjs.map +1 -1
- package/dist/plugin-utils/build-helpers.cjs +2 -2
- package/dist/plugin-utils/build-helpers.mjs +2 -2
- package/dist/plugin-utils/build-helpers.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +22 -12
- package/dist/plugin-utils/context-helpers.d.cts +9 -1
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/context-helpers.d.mts +9 -1
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs +22 -13
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/filter.cjs +13 -5
- package/dist/plugin-utils/filter.d.cts +2 -1
- package/dist/plugin-utils/filter.d.cts.map +1 -1
- package/dist/plugin-utils/filter.d.mts +2 -1
- package/dist/plugin-utils/filter.d.mts.map +1 -1
- package/dist/plugin-utils/filter.mjs +13 -6
- package/dist/plugin-utils/filter.mjs.map +1 -1
- package/dist/plugin-utils/format.cjs +44 -0
- package/dist/plugin-utils/format.d.cts +11 -0
- package/dist/plugin-utils/format.d.cts.map +1 -0
- package/dist/plugin-utils/format.d.mts +11 -0
- package/dist/plugin-utils/format.d.mts.map +1 -0
- package/dist/plugin-utils/format.mjs +43 -0
- package/dist/plugin-utils/format.mjs.map +1 -0
- package/dist/plugin-utils/helpers.cjs +6 -6
- package/dist/plugin-utils/helpers.d.cts +15 -15
- package/dist/plugin-utils/helpers.d.cts.map +1 -1
- package/dist/plugin-utils/helpers.d.mts +15 -15
- package/dist/plugin-utils/helpers.d.mts.map +1 -1
- package/dist/plugin-utils/helpers.mjs +1 -1
- package/dist/plugin-utils/helpers.mjs.map +1 -1
- package/dist/plugin-utils/index.cjs +34 -4
- package/dist/plugin-utils/index.d.cts +7 -4
- package/dist/plugin-utils/index.d.mts +7 -4
- package/dist/plugin-utils/index.mjs +9 -6
- package/dist/plugin-utils/install.cjs +47 -0
- package/dist/plugin-utils/install.d.cts +23 -0
- package/dist/plugin-utils/install.d.cts.map +1 -0
- package/dist/plugin-utils/install.d.mts +23 -0
- package/dist/plugin-utils/install.d.mts.map +1 -0
- package/dist/plugin-utils/install.mjs +45 -0
- package/dist/plugin-utils/install.mjs.map +1 -0
- package/dist/plugin-utils/logging.cjs +588 -1
- package/dist/plugin-utils/logging.d.cts +93 -1
- package/dist/plugin-utils/logging.d.cts.map +1 -1
- package/dist/plugin-utils/logging.d.mts +93 -1
- package/dist/plugin-utils/logging.d.mts.map +1 -1
- package/dist/plugin-utils/logging.mjs +572 -1
- package/dist/plugin-utils/logging.mjs.map +1 -1
- package/dist/plugin-utils/merge.cjs +1 -1
- package/dist/plugin-utils/merge.mjs +1 -1
- package/dist/plugin-utils/modules.cjs +1 -1
- package/dist/plugin-utils/modules.mjs +1 -1
- package/dist/plugin-utils/modules.mjs.map +1 -1
- package/dist/plugin-utils/paths.cjs +6 -2
- package/dist/plugin-utils/paths.mjs +6 -2
- package/dist/plugin-utils/paths.mjs.map +1 -1
- package/dist/plugin-utils/virtual.cjs +80 -0
- package/dist/plugin-utils/virtual.d.cts +69 -0
- package/dist/plugin-utils/virtual.d.cts.map +1 -0
- package/dist/plugin-utils/virtual.d.mts +69 -0
- package/dist/plugin-utils/virtual.d.mts.map +1 -0
- package/dist/plugin-utils/virtual.mjs +73 -0
- package/dist/plugin-utils/virtual.mjs.map +1 -0
- package/dist/schemas/fs.cjs +232 -0
- package/dist/schemas/fs.d.cts +127 -0
- package/dist/schemas/fs.d.cts.map +1 -0
- package/dist/schemas/fs.d.mts +127 -0
- package/dist/schemas/fs.d.mts.map +1 -0
- package/dist/schemas/fs.mjs +226 -0
- package/dist/schemas/fs.mjs.map +1 -0
- package/dist/storage/base.cjs +216 -0
- package/dist/storage/base.d.cts +201 -0
- package/dist/storage/base.d.cts.map +1 -0
- package/dist/storage/base.d.mts +201 -0
- package/dist/storage/base.d.mts.map +1 -0
- package/dist/storage/base.mjs +215 -0
- package/dist/storage/base.mjs.map +1 -0
- package/dist/storage/file-system.cjs +180 -0
- package/dist/storage/file-system.d.cts +129 -0
- package/dist/storage/file-system.d.cts.map +1 -0
- package/dist/storage/file-system.d.mts +129 -0
- package/dist/storage/file-system.d.mts.map +1 -0
- package/dist/storage/file-system.mjs +179 -0
- package/dist/storage/file-system.mjs.map +1 -0
- package/dist/storage/helpers.cjs +37 -0
- package/dist/storage/helpers.d.cts +25 -0
- package/dist/storage/helpers.d.cts.map +1 -0
- package/dist/storage/helpers.d.mts +25 -0
- package/dist/storage/helpers.d.mts.map +1 -0
- package/dist/storage/helpers.mjs +34 -0
- package/dist/storage/helpers.mjs.map +1 -0
- package/dist/storage/index.cjs +12 -0
- package/dist/storage/index.d.cts +5 -0
- package/dist/storage/index.d.mts +5 -0
- package/dist/storage/index.mjs +6 -0
- package/dist/storage/virtual.cjs +98 -0
- package/dist/storage/virtual.d.cts +80 -0
- package/dist/storage/virtual.d.cts.map +1 -0
- package/dist/storage/virtual.d.mts +80 -0
- package/dist/storage/virtual.d.mts.map +1 -0
- package/dist/storage/virtual.mjs +97 -0
- package/dist/storage/virtual.mjs.map +1 -0
- package/dist/types/api.d.cts +18 -152
- package/dist/types/api.d.cts.map +1 -1
- package/dist/types/api.d.mts +18 -152
- package/dist/types/api.d.mts.map +1 -1
- package/dist/types/config.d.cts +194 -135
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +195 -136
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/context.d.cts +152 -128
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +155 -131
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/fs.d.mts +1 -1
- package/dist/types/index.d.cts +5 -6
- package/dist/types/index.d.mts +5 -6
- package/dist/types/logging.d.cts +161 -0
- package/dist/types/logging.d.cts.map +1 -0
- package/dist/types/logging.d.mts +161 -0
- package/dist/types/logging.d.mts.map +1 -0
- package/dist/types/plugin.d.cts +6 -9
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +6 -9
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/tsconfig.d.mts +1 -1
- package/dist/types/unplugin.d.cts +5 -26
- package/dist/types/unplugin.d.cts.map +1 -1
- package/dist/types/unplugin.d.mts +5 -26
- package/dist/types/unplugin.d.mts.map +1 -1
- package/package.json +259 -457
- package/schemas/fs.capnp +42 -0
- package/dist/constants/virtual-modules.cjs +0 -8
- package/dist/constants/virtual-modules.d.cts +0 -6
- package/dist/constants/virtual-modules.d.cts.map +0 -1
- package/dist/constants/virtual-modules.d.mts +0 -6
- package/dist/constants/virtual-modules.d.mts.map +0 -1
- package/dist/constants/virtual-modules.mjs +0 -7
- package/dist/constants/virtual-modules.mjs.map +0 -1
- package/dist/lib/logger.cjs +0 -99
- package/dist/lib/logger.d.cts +0 -53
- package/dist/lib/logger.d.cts.map +0 -1
- package/dist/lib/logger.d.mts +0 -53
- package/dist/lib/logger.d.mts.map +0 -1
- package/dist/lib/logger.mjs +0 -93
- package/dist/lib/logger.mjs.map +0 -1
- package/dist/types/_internal.cjs +0 -0
- package/dist/types/_internal.d.cts +0 -106
- package/dist/types/_internal.d.cts.map +0 -1
- package/dist/types/_internal.d.mts +0 -106
- package/dist/types/_internal.d.mts.map +0 -1
- package/dist/types/_internal.mjs +0 -1
- package/dist/types/commands.d.cts +0 -16
- package/dist/types/commands.d.cts.map +0 -1
- package/dist/types/commands.d.mts +0 -16
- package/dist/types/commands.d.mts.map +0 -1
- package/dist/types/utils.d.cts +0 -9
- package/dist/types/utils.d.cts.map +0 -1
- package/dist/types/utils.d.mts +0 -9
- package/dist/types/utils.d.mts.map +0 -1
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { getFileHeaderWarningText } from "../lib/utilities/file-header.mjs";
|
|
2
|
+
import { BaseStorageAdapter } from "./base.mjs";
|
|
3
|
+
import { ignoreNotfound } from "./helpers.mjs";
|
|
4
|
+
import { exists, existsSync } from "@stryke/fs/exists";
|
|
5
|
+
import { isDirectory, isFile } from "@stryke/fs/is-file";
|
|
6
|
+
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
7
|
+
import { listFiles, listFilesSync } from "@stryke/fs/list-files";
|
|
8
|
+
import { unlinkSync } from "node:fs";
|
|
9
|
+
import { readFile, readFileSync } from "@stryke/fs/read-file";
|
|
10
|
+
import { writeFile, writeFileSync } from "@stryke/fs/write-file";
|
|
11
|
+
import { createDirectory, createDirectorySync } from "@stryke/fs/helpers";
|
|
12
|
+
import { unlink } from "node:fs/promises";
|
|
13
|
+
|
|
14
|
+
//#region src/storage/file-system.ts
|
|
15
|
+
/**
|
|
16
|
+
* File system storage adapter implementation.
|
|
17
|
+
*/
|
|
18
|
+
var FileSystemStorageAdapter = class extends BaseStorageAdapter {
|
|
19
|
+
/**
|
|
20
|
+
* A name identifying the storage adapter type.
|
|
21
|
+
*/
|
|
22
|
+
name = "file-system";
|
|
23
|
+
/**
|
|
24
|
+
* The storage preset for the adapter.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* This can be used as an alternate way to identify the type of storage being used.
|
|
28
|
+
*/
|
|
29
|
+
preset = "fs";
|
|
30
|
+
/**
|
|
31
|
+
* Constructor for the FileSystemStorageAdapter.
|
|
32
|
+
*
|
|
33
|
+
* @param context - The Powerlines context.
|
|
34
|
+
* @param options - Configuration options for the storage adapter.
|
|
35
|
+
*/
|
|
36
|
+
constructor(context, options) {
|
|
37
|
+
super(context, options);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Synchronously checks if a key exists in the storage.
|
|
41
|
+
*
|
|
42
|
+
* @param key - The key to check for existence.
|
|
43
|
+
* @returns Returns `true` if the key exists, otherwise `false`.
|
|
44
|
+
*/
|
|
45
|
+
existsSync(key) {
|
|
46
|
+
return existsSync(this.resolve(key));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Asynchronously checks if a key exists in the storage.
|
|
50
|
+
*
|
|
51
|
+
* @param key - The key to check for existence.
|
|
52
|
+
* @returns A promise that resolves to `true` if the key exists, otherwise `false`.
|
|
53
|
+
*/
|
|
54
|
+
async exists(key) {
|
|
55
|
+
return exists(this.resolve(key));
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Synchronously retrieves the value associated with a given key.
|
|
59
|
+
*
|
|
60
|
+
* @param key - The key whose value is to be retrieved.
|
|
61
|
+
* @returns The value associated with the key, or `null` if the key does not exist.
|
|
62
|
+
*/
|
|
63
|
+
getSync(key) {
|
|
64
|
+
return readFileSync(this.resolve(key));
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Asynchronously retrieves the value associated with a given key.
|
|
68
|
+
*
|
|
69
|
+
* @param key - The key whose value is to be retrieved.
|
|
70
|
+
* @returns A promise that resolves to the value associated with the key, or `null` if the key does not exist.
|
|
71
|
+
*/
|
|
72
|
+
async get(key) {
|
|
73
|
+
return readFile(this.resolve(key));
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Synchronously sets the value for a given key.
|
|
77
|
+
*
|
|
78
|
+
* @param key - The key to set the value for.
|
|
79
|
+
* @param value - The value to set.
|
|
80
|
+
*/
|
|
81
|
+
setSync(key, value) {
|
|
82
|
+
if (!this.isReadOnly) if (this.existsSync(this.resolve(key)) && !this.overwrite) {
|
|
83
|
+
const existingValue = this.getSync(this.resolve(key));
|
|
84
|
+
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);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Asynchronously sets the value for a given key.
|
|
89
|
+
*
|
|
90
|
+
* @param key - The key to set the value for.
|
|
91
|
+
* @param value - The value to set.
|
|
92
|
+
*/
|
|
93
|
+
async set(key, value) {
|
|
94
|
+
if (!this.isReadOnly) if (this.existsSync(this.resolve(key)) && !this.overwrite) {
|
|
95
|
+
const existingValue = await this.get(this.resolve(key));
|
|
96
|
+
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);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Synchronously removes a key from the storage.
|
|
101
|
+
*
|
|
102
|
+
* @param key - The key to remove.
|
|
103
|
+
*/
|
|
104
|
+
removeSync(key) {
|
|
105
|
+
if (!this.isReadOnly && this.overwrite) try {
|
|
106
|
+
return unlinkSync(this.resolve(key));
|
|
107
|
+
} catch (err) {
|
|
108
|
+
return ignoreNotfound(err);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Asynchronously removes a key from the storage.
|
|
113
|
+
*
|
|
114
|
+
* @param key - The key to remove.
|
|
115
|
+
*/
|
|
116
|
+
async remove(key) {
|
|
117
|
+
if (!this.isReadOnly && this.overwrite) return unlink(this.resolve(key)).catch(ignoreNotfound);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Synchronously creates a directory at the specified path.
|
|
121
|
+
*
|
|
122
|
+
* @param dirPath - The path of the directory to create.
|
|
123
|
+
*/
|
|
124
|
+
mkdirSync(dirPath) {
|
|
125
|
+
createDirectorySync(this.resolve(dirPath));
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Creates a directory at the specified path.
|
|
129
|
+
*
|
|
130
|
+
* @param dirPath - The path of the directory to create.
|
|
131
|
+
*/
|
|
132
|
+
async mkdir(dirPath) {
|
|
133
|
+
await createDirectory(this.resolve(dirPath));
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Lists all keys under a given base path synchronously.
|
|
137
|
+
*
|
|
138
|
+
* @param base - The base path to list keys from.
|
|
139
|
+
* @returns An array of keys under the specified base path.
|
|
140
|
+
*/
|
|
141
|
+
listSync(base) {
|
|
142
|
+
try {
|
|
143
|
+
return listFilesSync(this.resolve(base), { ignore: this.options.ignore });
|
|
144
|
+
} catch (err) {
|
|
145
|
+
return ignoreNotfound(err) ?? [];
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Asynchronously lists all keys under a given base path.
|
|
150
|
+
*
|
|
151
|
+
* @param base - The base path to list keys from.
|
|
152
|
+
* @returns A promise that resolves to an array of keys under the specified base path.
|
|
153
|
+
*/
|
|
154
|
+
async list(base) {
|
|
155
|
+
return listFiles(this.resolve(base), { ignore: this.options.ignore }).catch(ignoreNotfound).then((r) => r || []);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Synchronously checks if the given key is a directory.
|
|
159
|
+
*
|
|
160
|
+
* @param key - The key to check.
|
|
161
|
+
* @returns `true` if the key is a directory, otherwise `false`.
|
|
162
|
+
*/
|
|
163
|
+
isDirectorySync(key) {
|
|
164
|
+
return isDirectory(this.resolve(key));
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Synchronously checks if the given key is a file.
|
|
168
|
+
*
|
|
169
|
+
* @param key - The key to check.
|
|
170
|
+
* @returns `true` if the key is a file, otherwise `false`.
|
|
171
|
+
*/
|
|
172
|
+
isFileSync(key) {
|
|
173
|
+
return isFile(this.resolve(key));
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
//#endregion
|
|
178
|
+
export { FileSystemStorageAdapter };
|
|
179
|
+
//# sourceMappingURL=file-system.mjs.map
|
|
@@ -0,0 +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;AACpE,QAAM,SAAS,QAAQ;;;;;;;;CASzB,AAAO,WAAW,KAAsB;AACtC,SAAO,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;;;;;CAStC,MAAsB,OAAO,KAA+B;AAC1D,SAAO,OAAO,KAAK,QAAQ,IAAI,CAAC;;;;;;;;CASlC,AAAO,QAAQ,KAA4B;AACzC,SAAO,aAAa,KAAK,QAAQ,IAAI,CAAC;;;;;;;;CASxC,MAAsB,IAAI,KAAqC;AAC7D,SAAO,SAAS,KAAK,QAAQ,IAAI,CAAC;;;;;;;;CASpC,AAAO,QAAQ,KAAa,OAAe;AACzC,MAAI,CAAC,KAAK,WACR,KAAI,KAAK,WAAW,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,WAAW;GACzD,MAAM,gBAAgB,KAAK,QAAQ,KAAK,QAAQ,IAAI,CAAC;AACrD,OACE,YAAY,cAAc,IAC1B,cAAc,SACZ,yBACE,MACA,KAAK,QAAQ,OAAO,WAAW,QAAQ,aACxC,CACF,CAED,QAAO,cACL,KAAK,QAAQ,IAAI,EACjB,cAAc,QACZ,yBACE,MACA,KAAK,QAAQ,OAAO,WAAW,QAAQ,aACxC,EACD,yBACE,OACA,KAAK,QAAQ,OAAO,WAAW,QAAQ,aACxC,CACF,CACF;QAGH,QAAO,cAAc,KAAK,QAAQ,IAAI,EAAE,MAAM;;;;;;;;CAWpD,MAAsB,IAAI,KAAa,OAA8B;AACnE,MAAI,CAAC,KAAK,WACR,KAAI,KAAK,WAAW,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,WAAW;GACzD,MAAM,gBAAgB,MAAM,KAAK,IAAI,KAAK,QAAQ,IAAI,CAAC;AACvD,OACE,YAAY,cAAc,IAC1B,cAAc,SACZ,yBACE,MACA,KAAK,QAAQ,OAAO,WAAW,QAAQ,aACxC,CACF,CAED,QAAO,UACL,KAAK,QAAQ,IAAI,EACjB,cAAc,QACZ,yBACE,MACA,KAAK,QAAQ,OAAO,WAAW,QAAQ,aACxC,EACD,yBACE,OACA,KAAK,QAAQ,OAAO,WAAW,QAAQ,aACxC,CACF,CACF;QAGH,QAAO,UAAU,KAAK,QAAQ,IAAI,EAAE,MAAM;;;;;;;CAUhD,AAAO,WAAW,KAAa;AAC7B,MAAI,CAAC,KAAK,cAAc,KAAK,UAC3B,KAAI;AACF,UAAO,WAAW,KAAK,QAAQ,IAAI,CAAC;WAC7B,KAAK;AACZ,UAAO,eAAe,IAAI;;;;;;;;CAUhC,MAAsB,OAAO,KAA4B;AACvD,MAAI,CAAC,KAAK,cAAc,KAAK,UAC3B,QAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,eAAe;;;;;;;CAS1D,AAAgB,UAAU,SAAiB;AACzC,sBAAoB,KAAK,QAAQ,QAAQ,CAAC;;;;;;;CAQ5C,MAAsB,MAAM,SAAgC;AAC1D,QAAM,gBAAgB,KAAK,QAAQ,QAAQ,CAAC;;;;;;;;CAS9C,AAAO,SAAS,MAAyB;AACvC,MAAI;AACF,UAAO,cAAc,KAAK,QAAQ,KAAK,EAAE,EACvC,QAAQ,KAAK,QAAQ,QACtB,CAAC;WACK,KAAK;AACZ,UAAO,eAAe,IAAI,IAAI,EAAE;;;;;;;;;CAUpC,MAAsB,KAAK,MAAkC;AAC3D,SAAO,UAAU,KAAK,QAAQ,KAAK,EAAE,EACnC,QAAQ,KAAK,QAAQ,QACtB,CAAC,CACC,MAAM,eAAe,CACrB,MAAK,MAAK,KAAK,EAAE,CAAC;;;;;;;;CASvB,AAAgB,gBAAgB,KAAsB;AACpD,SAAO,YAAY,KAAK,QAAQ,IAAI,CAAC;;;;;;;;CASvC,AAAgB,WAAW,KAAsB;AAC/C,SAAO,OAAO,KAAK,QAAQ,IAAI,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let _stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
|
|
4
|
+
|
|
5
|
+
//#region src/storage/helpers.ts
|
|
6
|
+
/**
|
|
7
|
+
* Checks if an error is a file system error.
|
|
8
|
+
*
|
|
9
|
+
* @param err - The error to check.
|
|
10
|
+
* @returns `true` if the error is a file system error, otherwise `false`.
|
|
11
|
+
*/
|
|
12
|
+
function isFileError(err) {
|
|
13
|
+
return (0, _stryke_type_checks_is_error.isError)(err) && "code" in err && err.code;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Ignores file not found errors.
|
|
17
|
+
*
|
|
18
|
+
* @param err - The error to check.
|
|
19
|
+
* @returns `null` if the error is a file not found error, otherwise returns the error.
|
|
20
|
+
*/
|
|
21
|
+
function ignoreNotfound(err) {
|
|
22
|
+
return isFileError(err) && (err.code === "ENOENT" || err.code === "EISDIR" ? null : err);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Ignores file exists errors.
|
|
26
|
+
*
|
|
27
|
+
* @param err - The error to check.
|
|
28
|
+
* @returns `null` if the error is a file exists error, otherwise returns the error.
|
|
29
|
+
*/
|
|
30
|
+
function ignoreExists(err) {
|
|
31
|
+
return isFileError(err) && err.code === "EEXIST" ? null : err;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
exports.ignoreExists = ignoreExists;
|
|
36
|
+
exports.ignoreNotfound = ignoreNotfound;
|
|
37
|
+
exports.isFileError = isFileError;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/storage/helpers.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Checks if an error is a file system error.
|
|
4
|
+
*
|
|
5
|
+
* @param err - The error to check.
|
|
6
|
+
* @returns `true` if the error is a file system error, otherwise `false`.
|
|
7
|
+
*/
|
|
8
|
+
declare function isFileError(err: any): unknown;
|
|
9
|
+
/**
|
|
10
|
+
* Ignores file not found errors.
|
|
11
|
+
*
|
|
12
|
+
* @param err - The error to check.
|
|
13
|
+
* @returns `null` if the error is a file not found error, otherwise returns the error.
|
|
14
|
+
*/
|
|
15
|
+
declare function ignoreNotfound(err: any): any;
|
|
16
|
+
/**
|
|
17
|
+
* Ignores file exists errors.
|
|
18
|
+
*
|
|
19
|
+
* @param err - The error to check.
|
|
20
|
+
* @returns `null` if the error is a file exists error, otherwise returns the error.
|
|
21
|
+
*/
|
|
22
|
+
declare function ignoreExists(err: any): any;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { ignoreExists, ignoreNotfound, isFileError };
|
|
25
|
+
//# sourceMappingURL=helpers.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.cts","names":[],"sources":["../../src/storage/helpers.ts"],"mappings":";;AA0BA;;;;;iBAAgB,WAAA,CAAY,GAAA;;;;;AAuB5B;;iBAbgB,cAAA,CAAe,GAAA;;;;;;;iBAaf,YAAA,CAAa,GAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/storage/helpers.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Checks if an error is a file system error.
|
|
4
|
+
*
|
|
5
|
+
* @param err - The error to check.
|
|
6
|
+
* @returns `true` if the error is a file system error, otherwise `false`.
|
|
7
|
+
*/
|
|
8
|
+
declare function isFileError(err: any): unknown;
|
|
9
|
+
/**
|
|
10
|
+
* Ignores file not found errors.
|
|
11
|
+
*
|
|
12
|
+
* @param err - The error to check.
|
|
13
|
+
* @returns `null` if the error is a file not found error, otherwise returns the error.
|
|
14
|
+
*/
|
|
15
|
+
declare function ignoreNotfound(err: any): any;
|
|
16
|
+
/**
|
|
17
|
+
* Ignores file exists errors.
|
|
18
|
+
*
|
|
19
|
+
* @param err - The error to check.
|
|
20
|
+
* @returns `null` if the error is a file exists error, otherwise returns the error.
|
|
21
|
+
*/
|
|
22
|
+
declare function ignoreExists(err: any): any;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { ignoreExists, ignoreNotfound, isFileError };
|
|
25
|
+
//# sourceMappingURL=helpers.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.mts","names":[],"sources":["../../src/storage/helpers.ts"],"mappings":";;AA0BA;;;;;iBAAgB,WAAA,CAAY,GAAA;;;;;AAuB5B;;iBAbgB,cAAA,CAAe,GAAA;;;;;;;iBAaf,YAAA,CAAa,GAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { isError } from "@stryke/type-checks/is-error";
|
|
2
|
+
|
|
3
|
+
//#region src/storage/helpers.ts
|
|
4
|
+
/**
|
|
5
|
+
* Checks if an error is a file system error.
|
|
6
|
+
*
|
|
7
|
+
* @param err - The error to check.
|
|
8
|
+
* @returns `true` if the error is a file system error, otherwise `false`.
|
|
9
|
+
*/
|
|
10
|
+
function isFileError(err) {
|
|
11
|
+
return isError(err) && "code" in err && err.code;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Ignores file not found errors.
|
|
15
|
+
*
|
|
16
|
+
* @param err - The error to check.
|
|
17
|
+
* @returns `null` if the error is a file not found error, otherwise returns the error.
|
|
18
|
+
*/
|
|
19
|
+
function ignoreNotfound(err) {
|
|
20
|
+
return isFileError(err) && (err.code === "ENOENT" || err.code === "EISDIR" ? null : err);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Ignores file exists errors.
|
|
24
|
+
*
|
|
25
|
+
* @param err - The error to check.
|
|
26
|
+
* @returns `null` if the error is a file exists error, otherwise returns the error.
|
|
27
|
+
*/
|
|
28
|
+
function ignoreExists(err) {
|
|
29
|
+
return isFileError(err) && err.code === "EEXIST" ? null : err;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { ignoreExists, ignoreNotfound, isFileError };
|
|
34
|
+
//# sourceMappingURL=helpers.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.mjs","names":[],"sources":["../../src/storage/helpers.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 { isError } from \"@stryke/type-checks/is-error\";\n\n/**\n * Checks if an error is a file system error.\n *\n * @param err - The error to check.\n * @returns `true` if the error is a file system error, otherwise `false`.\n */\nexport function isFileError(err: any) {\n return isError(err) && \"code\" in err && err.code;\n}\n\n/**\n * Ignores file not found errors.\n *\n * @param err - The error to check.\n * @returns `null` if the error is a file not found error, otherwise returns the error.\n */\nexport function ignoreNotfound(err: any) {\n return (\n isFileError(err) &&\n (err.code === \"ENOENT\" || err.code === \"EISDIR\" ? null : err)\n );\n}\n\n/**\n * Ignores file exists errors.\n *\n * @param err - The error to check.\n * @returns `null` if the error is a file exists error, otherwise returns the error.\n */\nexport function ignoreExists(err: any) {\n return isFileError(err) && err.code === \"EEXIST\" ? null : err;\n}\n"],"mappings":";;;;;;;;;AA0BA,SAAgB,YAAY,KAAU;AACpC,QAAO,QAAQ,IAAI,IAAI,UAAU,OAAO,IAAI;;;;;;;;AAS9C,SAAgB,eAAe,KAAU;AACvC,QACE,YAAY,IAAI,KACf,IAAI,SAAS,YAAY,IAAI,SAAS,WAAW,OAAO;;;;;;;;AAU7D,SAAgB,aAAa,KAAU;AACrC,QAAO,YAAY,IAAI,IAAI,IAAI,SAAS,WAAW,OAAO"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_storage_base = require('./base.cjs');
|
|
3
|
+
const require_storage_helpers = require('./helpers.cjs');
|
|
4
|
+
const require_storage_file_system = require('./file-system.cjs');
|
|
5
|
+
const require_storage_virtual = require('./virtual.cjs');
|
|
6
|
+
|
|
7
|
+
exports.BaseStorageAdapter = require_storage_base.BaseStorageAdapter;
|
|
8
|
+
exports.FileSystemStorageAdapter = require_storage_file_system.FileSystemStorageAdapter;
|
|
9
|
+
exports.VirtualStorageAdapter = require_storage_virtual.VirtualStorageAdapter;
|
|
10
|
+
exports.ignoreExists = require_storage_helpers.ignoreExists;
|
|
11
|
+
exports.ignoreNotfound = require_storage_helpers.ignoreNotfound;
|
|
12
|
+
exports.isFileError = require_storage_helpers.isFileError;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseStorageAdapter, StorageAdapterOptions, __ΩStorageAdapterOptions } from "./base.cjs";
|
|
2
|
+
import { FileSystemStorageAdapter, SetOptions, SetSyncOptions, __ΩSetOptions, __ΩSetSyncOptions } from "./file-system.cjs";
|
|
3
|
+
import { ignoreExists, ignoreNotfound, isFileError } from "./helpers.cjs";
|
|
4
|
+
import { VirtualStorageAdapter } from "./virtual.cjs";
|
|
5
|
+
export { BaseStorageAdapter, FileSystemStorageAdapter, SetOptions, SetSyncOptions, StorageAdapterOptions, VirtualStorageAdapter, __ΩSetOptions, __ΩSetSyncOptions, __ΩStorageAdapterOptions, ignoreExists, ignoreNotfound, isFileError };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseStorageAdapter, StorageAdapterOptions, __ΩStorageAdapterOptions } from "./base.mjs";
|
|
2
|
+
import { FileSystemStorageAdapter, SetOptions, SetSyncOptions, __ΩSetOptions, __ΩSetSyncOptions } from "./file-system.mjs";
|
|
3
|
+
import { ignoreExists, ignoreNotfound, isFileError } from "./helpers.mjs";
|
|
4
|
+
import { VirtualStorageAdapter } from "./virtual.mjs";
|
|
5
|
+
export { BaseStorageAdapter, FileSystemStorageAdapter, SetOptions, SetSyncOptions, StorageAdapterOptions, VirtualStorageAdapter, __ΩSetOptions, __ΩSetSyncOptions, __ΩStorageAdapterOptions, ignoreExists, ignoreNotfound, isFileError };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseStorageAdapter } from "./base.mjs";
|
|
2
|
+
import { ignoreExists, ignoreNotfound, isFileError } from "./helpers.mjs";
|
|
3
|
+
import { FileSystemStorageAdapter } from "./file-system.mjs";
|
|
4
|
+
import { VirtualStorageAdapter } from "./virtual.mjs";
|
|
5
|
+
|
|
6
|
+
export { BaseStorageAdapter, FileSystemStorageAdapter, VirtualStorageAdapter, ignoreExists, ignoreNotfound, isFileError };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_storage_base = require('./base.cjs');
|
|
4
|
+
let _stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
|
|
5
|
+
|
|
6
|
+
//#region src/storage/virtual.ts
|
|
7
|
+
/**
|
|
8
|
+
* Virtual/in-memory storage adapter implementation.
|
|
9
|
+
*/
|
|
10
|
+
var VirtualStorageAdapter = class extends require_storage_base.BaseStorageAdapter {
|
|
11
|
+
/**
|
|
12
|
+
* A name identifying the storage adapter type.
|
|
13
|
+
*/
|
|
14
|
+
name = "virtual";
|
|
15
|
+
/**
|
|
16
|
+
* The storage preset for the adapter.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* This can be used as an alternate way to identify the type of storage being used.
|
|
20
|
+
*/
|
|
21
|
+
preset = "virtual";
|
|
22
|
+
/**
|
|
23
|
+
* In-memory data storage.
|
|
24
|
+
*/
|
|
25
|
+
data = /* @__PURE__ */ new Map();
|
|
26
|
+
/**
|
|
27
|
+
* Constructor for the VirtualStorageAdapter.
|
|
28
|
+
*
|
|
29
|
+
* @param context - The Powerlines context.
|
|
30
|
+
* @param options - Configuration options for the storage adapter.
|
|
31
|
+
*/
|
|
32
|
+
constructor(context, options) {
|
|
33
|
+
super(context, options);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Synchronously checks if a key exists in the storage.
|
|
37
|
+
*
|
|
38
|
+
* @param key - The key to check for existence.
|
|
39
|
+
* @returns Returns `true` if the key exists, otherwise `false`.
|
|
40
|
+
*/
|
|
41
|
+
existsSync(key) {
|
|
42
|
+
return this.data.has(this.resolve(key));
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Synchronously retrieves the value associated with a given key.
|
|
46
|
+
*
|
|
47
|
+
* @param key - The key whose value is to be retrieved.
|
|
48
|
+
* @returns The value associated with the key, or `null` if the key does not exist.
|
|
49
|
+
*/
|
|
50
|
+
getSync(key) {
|
|
51
|
+
return this.data.get(this.resolve(key)) ?? null;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Synchronously sets the value for a given key.
|
|
55
|
+
*
|
|
56
|
+
* @param key - The key to set the value for.
|
|
57
|
+
* @param value - The value to set.
|
|
58
|
+
*/
|
|
59
|
+
setSync(key, value) {
|
|
60
|
+
if (!this.isReadOnly && (!this.existsSync(key) || this.overwrite)) this.data.set(this.resolve(key), value);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Synchronously removes a key from the storage.
|
|
64
|
+
*
|
|
65
|
+
* @param key - The key to remove.
|
|
66
|
+
*/
|
|
67
|
+
removeSync(key) {
|
|
68
|
+
if (!this.isReadOnly && this.overwrite) this.data.delete(this.resolve(key));
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Lists all keys under a given base path synchronously.
|
|
72
|
+
*
|
|
73
|
+
* @param base - The base path to list keys from.
|
|
74
|
+
* @returns An array of keys under the specified base path.
|
|
75
|
+
*/
|
|
76
|
+
listSync(base) {
|
|
77
|
+
return [...this.data.keys().filter((key) => !base ? true : (0, _stryke_path_is_parent_path.isParentPath)(key, this.resolve(base)))];
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Disposes of the storage adapter, releasing any held resources.
|
|
81
|
+
*
|
|
82
|
+
* @returns A promise that resolves when the disposal is complete.
|
|
83
|
+
*/
|
|
84
|
+
async dispose() {
|
|
85
|
+
return this.clear();
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Determines if the storage adapter should overwrite existing keys based on the provided options and context configuration.
|
|
89
|
+
*
|
|
90
|
+
* @returns `true` if the storage adapter should overwrite existing keys, otherwise `false`.
|
|
91
|
+
*/
|
|
92
|
+
get overwrite() {
|
|
93
|
+
return !this.isReadOnly;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
//#endregion
|
|
98
|
+
exports.VirtualStorageAdapter = VirtualStorageAdapter;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Context } from "../types/context.cjs";
|
|
2
|
+
import { BaseStorageAdapter, StorageAdapterOptions } from "./base.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/storage/virtual.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Virtual/in-memory storage adapter implementation.
|
|
7
|
+
*/
|
|
8
|
+
declare class VirtualStorageAdapter extends BaseStorageAdapter {
|
|
9
|
+
/**
|
|
10
|
+
* A name identifying the storage adapter type.
|
|
11
|
+
*/
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* The storage preset for the adapter.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* This can be used as an alternate way to identify the type of storage being used.
|
|
18
|
+
*/
|
|
19
|
+
readonly preset = "virtual";
|
|
20
|
+
/**
|
|
21
|
+
* In-memory data storage.
|
|
22
|
+
*/
|
|
23
|
+
protected data: Map<string, any>;
|
|
24
|
+
/**
|
|
25
|
+
* Constructor for the VirtualStorageAdapter.
|
|
26
|
+
*
|
|
27
|
+
* @param context - The Powerlines context.
|
|
28
|
+
* @param options - Configuration options for the storage adapter.
|
|
29
|
+
*/
|
|
30
|
+
constructor(context: Context, options?: StorageAdapterOptions);
|
|
31
|
+
/**
|
|
32
|
+
* Synchronously checks if a key exists in the storage.
|
|
33
|
+
*
|
|
34
|
+
* @param key - The key to check for existence.
|
|
35
|
+
* @returns Returns `true` if the key exists, otherwise `false`.
|
|
36
|
+
*/
|
|
37
|
+
existsSync(key: string): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Synchronously retrieves the value associated with a given key.
|
|
40
|
+
*
|
|
41
|
+
* @param key - The key whose value is to be retrieved.
|
|
42
|
+
* @returns The value associated with the key, or `null` if the key does not exist.
|
|
43
|
+
*/
|
|
44
|
+
getSync(key: string): string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Synchronously sets the value for a given key.
|
|
47
|
+
*
|
|
48
|
+
* @param key - The key to set the value for.
|
|
49
|
+
* @param value - The value to set.
|
|
50
|
+
*/
|
|
51
|
+
setSync(key: string, value: string): void;
|
|
52
|
+
/**
|
|
53
|
+
* Synchronously removes a key from the storage.
|
|
54
|
+
*
|
|
55
|
+
* @param key - The key to remove.
|
|
56
|
+
*/
|
|
57
|
+
removeSync(key: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* Lists all keys under a given base path synchronously.
|
|
60
|
+
*
|
|
61
|
+
* @param base - The base path to list keys from.
|
|
62
|
+
* @returns An array of keys under the specified base path.
|
|
63
|
+
*/
|
|
64
|
+
listSync(base?: string): string[];
|
|
65
|
+
/**
|
|
66
|
+
* Disposes of the storage adapter, releasing any held resources.
|
|
67
|
+
*
|
|
68
|
+
* @returns A promise that resolves when the disposal is complete.
|
|
69
|
+
*/
|
|
70
|
+
dispose(): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Determines if the storage adapter should overwrite existing keys based on the provided options and context configuration.
|
|
73
|
+
*
|
|
74
|
+
* @returns `true` if the storage adapter should overwrite existing keys, otherwise `false`.
|
|
75
|
+
*/
|
|
76
|
+
protected get overwrite(): boolean;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
export { VirtualStorageAdapter };
|
|
80
|
+
//# sourceMappingURL=virtual.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtual.d.cts","names":[],"sources":["../../src/storage/virtual.ts"],"mappings":";;;;;;AAyBA;cAAa,qBAAA,SAA8B,kBAAA;;;;EAIlC,IAAA;EAuF0B;;;;;;EAAA,SA/ER,MAAA;EAKf;;;EAAA,UAAA,IAAA,EAAI,GAAA;EAQK;;;;;;cAAA,OAAA,EAAS,OAAA,EAAS,OAAA,GAAU,qBAAA;EA8BxC;;;;;;EApBA,UAAA,CAAW,GAAA;EAwDI;;;;;;EA9Cf,OAAA,CAAQ,GAAA;;;;;;;EAUR,OAAA,CAAQ,GAAA,UAAa,KAAA;;;;;;EAWrB,UAAA,CAAW,GAAA;;;;;;;EAYX,QAAA,CAAS,IAAA;;;;;;EAaM,OAAA,CAAA,GAAW,OAAA;;;;;;gBASV,SAAA,CAAA;AAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Context } from "../types/context.mjs";
|
|
2
|
+
import { BaseStorageAdapter, StorageAdapterOptions } from "./base.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/storage/virtual.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Virtual/in-memory storage adapter implementation.
|
|
7
|
+
*/
|
|
8
|
+
declare class VirtualStorageAdapter extends BaseStorageAdapter {
|
|
9
|
+
/**
|
|
10
|
+
* A name identifying the storage adapter type.
|
|
11
|
+
*/
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* The storage preset for the adapter.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* This can be used as an alternate way to identify the type of storage being used.
|
|
18
|
+
*/
|
|
19
|
+
readonly preset = "virtual";
|
|
20
|
+
/**
|
|
21
|
+
* In-memory data storage.
|
|
22
|
+
*/
|
|
23
|
+
protected data: Map<string, any>;
|
|
24
|
+
/**
|
|
25
|
+
* Constructor for the VirtualStorageAdapter.
|
|
26
|
+
*
|
|
27
|
+
* @param context - The Powerlines context.
|
|
28
|
+
* @param options - Configuration options for the storage adapter.
|
|
29
|
+
*/
|
|
30
|
+
constructor(context: Context, options?: StorageAdapterOptions);
|
|
31
|
+
/**
|
|
32
|
+
* Synchronously checks if a key exists in the storage.
|
|
33
|
+
*
|
|
34
|
+
* @param key - The key to check for existence.
|
|
35
|
+
* @returns Returns `true` if the key exists, otherwise `false`.
|
|
36
|
+
*/
|
|
37
|
+
existsSync(key: string): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Synchronously retrieves the value associated with a given key.
|
|
40
|
+
*
|
|
41
|
+
* @param key - The key whose value is to be retrieved.
|
|
42
|
+
* @returns The value associated with the key, or `null` if the key does not exist.
|
|
43
|
+
*/
|
|
44
|
+
getSync(key: string): string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Synchronously sets the value for a given key.
|
|
47
|
+
*
|
|
48
|
+
* @param key - The key to set the value for.
|
|
49
|
+
* @param value - The value to set.
|
|
50
|
+
*/
|
|
51
|
+
setSync(key: string, value: string): void;
|
|
52
|
+
/**
|
|
53
|
+
* Synchronously removes a key from the storage.
|
|
54
|
+
*
|
|
55
|
+
* @param key - The key to remove.
|
|
56
|
+
*/
|
|
57
|
+
removeSync(key: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* Lists all keys under a given base path synchronously.
|
|
60
|
+
*
|
|
61
|
+
* @param base - The base path to list keys from.
|
|
62
|
+
* @returns An array of keys under the specified base path.
|
|
63
|
+
*/
|
|
64
|
+
listSync(base?: string): string[];
|
|
65
|
+
/**
|
|
66
|
+
* Disposes of the storage adapter, releasing any held resources.
|
|
67
|
+
*
|
|
68
|
+
* @returns A promise that resolves when the disposal is complete.
|
|
69
|
+
*/
|
|
70
|
+
dispose(): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Determines if the storage adapter should overwrite existing keys based on the provided options and context configuration.
|
|
73
|
+
*
|
|
74
|
+
* @returns `true` if the storage adapter should overwrite existing keys, otherwise `false`.
|
|
75
|
+
*/
|
|
76
|
+
protected get overwrite(): boolean;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
export { VirtualStorageAdapter };
|
|
80
|
+
//# sourceMappingURL=virtual.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtual.d.mts","names":[],"sources":["../../src/storage/virtual.ts"],"mappings":";;;;;;AAyBA;cAAa,qBAAA,SAA8B,kBAAA;;;;EAIlC,IAAA;EAuF0B;;;;;;EAAA,SA/ER,MAAA;EAKf;;;EAAA,UAAA,IAAA,EAAI,GAAA;EAQK;;;;;;cAAA,OAAA,EAAS,OAAA,EAAS,OAAA,GAAU,qBAAA;EA8BxC;;;;;;EApBA,UAAA,CAAW,GAAA;EAwDI;;;;;;EA9Cf,OAAA,CAAQ,GAAA;;;;;;;EAUR,OAAA,CAAQ,GAAA,UAAa,KAAA;;;;;;EAWrB,UAAA,CAAW,GAAA;;;;;;;EAYX,QAAA,CAAS,IAAA;;;;;;EAaM,OAAA,CAAA,GAAW,OAAA;;;;;;gBASV,SAAA,CAAA;AAAA"}
|