@powerlines/core 0.48.24 → 0.48.26
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/_virtual/_rolldown/runtime.cjs +8 -0
- package/dist/constants/api.cjs +8 -0
- package/dist/constants/api.d.mts +2 -0
- package/dist/constants/api.d.mts.map +1 -1
- package/dist/constants/api.mjs +8 -0
- package/dist/constants/api.mjs.map +1 -1
- package/dist/constants/commands.cjs +8 -0
- package/dist/constants/commands.d.mts +2 -0
- package/dist/constants/commands.d.mts.map +1 -1
- package/dist/constants/commands.mjs +8 -0
- package/dist/constants/commands.mjs.map +1 -1
- package/dist/constants/devtools.cjs +8 -0
- package/dist/constants/devtools.d.mts +2 -0
- package/dist/constants/devtools.d.mts.map +1 -1
- package/dist/constants/devtools.mjs +8 -0
- package/dist/constants/devtools.mjs.map +1 -1
- package/dist/constants/environments.cjs +8 -0
- package/dist/constants/environments.d.mts +2 -0
- package/dist/constants/environments.d.mts.map +1 -1
- package/dist/constants/environments.mjs +8 -0
- package/dist/constants/environments.mjs.map +1 -1
- package/dist/constants/extensions.cjs +8 -0
- package/dist/constants/extensions.d.mts +2 -0
- package/dist/constants/extensions.d.mts.map +1 -1
- package/dist/constants/extensions.mjs +8 -0
- package/dist/constants/extensions.mjs.map +1 -1
- package/dist/constants/fs.cjs +8 -0
- package/dist/constants/fs.d.mts +2 -0
- package/dist/constants/fs.d.mts.map +1 -1
- package/dist/constants/fs.mjs +8 -0
- package/dist/constants/fs.mjs.map +1 -1
- package/dist/constants/hooks.cjs +8 -0
- package/dist/constants/hooks.d.mts +2 -0
- package/dist/constants/hooks.d.mts.map +1 -1
- package/dist/constants/hooks.mjs +8 -0
- package/dist/constants/hooks.mjs.map +1 -1
- package/dist/constants/index.cjs +8 -0
- package/dist/constants/index.d.mts +2 -0
- package/dist/constants/index.mjs +8 -0
- package/dist/constants/log-level.cjs +8 -0
- package/dist/constants/log-level.d.mts +2 -0
- package/dist/constants/log-level.d.mts.map +1 -1
- package/dist/constants/log-level.mjs +8 -0
- package/dist/constants/log-level.mjs.map +1 -1
- package/dist/constants/meta.cjs +8 -0
- package/dist/constants/meta.d.mts +2 -0
- package/dist/constants/meta.d.mts.map +1 -1
- package/dist/constants/meta.mjs +8 -0
- package/dist/constants/meta.mjs.map +1 -1
- package/dist/constants/plugin.cjs +8 -0
- package/dist/constants/plugin.d.mts +2 -0
- package/dist/constants/plugin.d.mts.map +1 -1
- package/dist/constants/plugin.mjs +8 -0
- package/dist/constants/plugin.mjs.map +1 -1
- package/dist/context/base-context.cjs +8 -0
- package/dist/context/base-context.d.mts +2 -0
- package/dist/context/base-context.d.mts.map +1 -1
- package/dist/context/base-context.mjs +8 -0
- package/dist/context/base-context.mjs.map +1 -1
- package/dist/context/context.cjs +18 -2
- package/dist/context/context.d.cts +4 -0
- package/dist/context/context.d.cts.map +1 -1
- package/dist/context/context.d.mts +6 -0
- package/dist/context/context.d.mts.map +1 -1
- package/dist/context/context.mjs +19 -3
- package/dist/context/context.mjs.map +1 -1
- package/dist/context/environment-context.cjs +8 -0
- package/dist/context/environment-context.d.cts.map +1 -1
- package/dist/context/environment-context.d.mts +2 -0
- package/dist/context/environment-context.d.mts.map +1 -1
- package/dist/context/environment-context.mjs +8 -0
- package/dist/context/environment-context.mjs.map +1 -1
- package/dist/context/execution-context.cjs +9 -1
- package/dist/context/execution-context.d.mts +2 -0
- package/dist/context/execution-context.d.mts.map +1 -1
- package/dist/context/execution-context.mjs +9 -1
- package/dist/context/execution-context.mjs.map +1 -1
- package/dist/context/index.cjs +8 -0
- package/dist/context/index.d.mts +2 -0
- package/dist/context/index.mjs +8 -0
- package/dist/context/plugin-context.cjs +8 -0
- package/dist/context/plugin-context.d.mts +2 -0
- package/dist/context/plugin-context.d.mts.map +1 -1
- package/dist/context/plugin-context.mjs +8 -0
- package/dist/context/plugin-context.mjs.map +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +4 -2
- package/dist/index.mjs +8 -0
- package/dist/lib/config.cjs +8 -0
- package/dist/lib/config.d.mts +2 -0
- package/dist/lib/config.d.mts.map +1 -1
- package/dist/lib/config.mjs +8 -0
- package/dist/lib/config.mjs.map +1 -1
- package/dist/lib/context-helpers.cjs +8 -0
- package/dist/lib/context-helpers.d.cts +4 -4
- package/dist/lib/context-helpers.d.mts +6 -4
- package/dist/lib/context-helpers.d.mts.map +1 -1
- package/dist/lib/context-helpers.mjs +8 -0
- package/dist/lib/context-helpers.mjs.map +1 -1
- package/dist/lib/entry.cjs +8 -0
- package/dist/lib/entry.d.mts +2 -0
- package/dist/lib/entry.d.mts.map +1 -1
- package/dist/lib/entry.mjs +8 -0
- package/dist/lib/entry.mjs.map +1 -1
- package/dist/lib/environment.cjs +8 -0
- package/dist/lib/environment.d.mts +2 -0
- package/dist/lib/environment.d.mts.map +1 -1
- package/dist/lib/environment.mjs +8 -0
- package/dist/lib/environment.mjs.map +1 -1
- package/dist/lib/events.cjs +8 -0
- package/dist/lib/events.d.mts +2 -0
- package/dist/lib/events.d.mts.map +1 -1
- package/dist/lib/events.mjs +8 -0
- package/dist/lib/events.mjs.map +1 -1
- package/dist/lib/generate-types.cjs +8 -0
- package/dist/lib/generate-types.d.mts +2 -0
- package/dist/lib/generate-types.d.mts.map +1 -1
- package/dist/lib/generate-types.mjs +8 -0
- package/dist/lib/generate-types.mjs.map +1 -1
- package/dist/lib/hooks.cjs +8 -0
- package/dist/lib/hooks.d.mts +2 -0
- package/dist/lib/hooks.d.mts.map +1 -1
- package/dist/lib/hooks.mjs +8 -0
- package/dist/lib/hooks.mjs.map +1 -1
- package/dist/lib/index.cjs +8 -0
- package/dist/lib/index.d.mts +2 -0
- package/dist/lib/index.mjs +8 -0
- package/dist/lib/install-dependencies.cjs +8 -0
- package/dist/lib/install-dependencies.d.mts +2 -0
- package/dist/lib/install-dependencies.d.mts.map +1 -1
- package/dist/lib/install-dependencies.mjs +8 -0
- package/dist/lib/install-dependencies.mjs.map +1 -1
- package/dist/lib/meta.cjs +8 -0
- package/dist/lib/meta.d.mts +2 -0
- package/dist/lib/meta.d.mts.map +1 -1
- package/dist/lib/meta.mjs +8 -0
- package/dist/lib/meta.mjs.map +1 -1
- package/dist/lib/plugins.cjs +8 -0
- package/dist/lib/plugins.d.mts +2 -0
- package/dist/lib/plugins.d.mts.map +1 -1
- package/dist/lib/plugins.mjs +8 -0
- package/dist/lib/plugins.mjs.map +1 -1
- package/dist/lib/resolver.cjs +8 -0
- package/dist/lib/resolver.d.mts +2 -0
- package/dist/lib/resolver.d.mts.map +1 -1
- package/dist/lib/resolver.mjs +8 -0
- package/dist/lib/resolver.mjs.map +1 -1
- package/dist/lib/schemas.cjs +8 -0
- package/dist/lib/schemas.d.mts +2 -0
- package/dist/lib/schemas.mjs +8 -0
- package/dist/lib/streaming-channel.cjs +8 -0
- package/dist/lib/streaming-channel.d.mts +2 -0
- package/dist/lib/streaming-channel.d.mts.map +1 -1
- package/dist/lib/streaming-channel.mjs +8 -0
- package/dist/lib/streaming-channel.mjs.map +1 -1
- package/dist/lib/typescript/index.cjs +8 -0
- package/dist/lib/typescript/index.d.mts +2 -0
- package/dist/lib/typescript/index.mjs +8 -0
- package/dist/lib/typescript/ts-morph.cjs +8 -0
- package/dist/lib/typescript/ts-morph.d.mts +2 -0
- package/dist/lib/typescript/ts-morph.d.mts.map +1 -1
- package/dist/lib/typescript/ts-morph.mjs +8 -0
- package/dist/lib/typescript/ts-morph.mjs.map +1 -1
- package/dist/lib/typescript/tsconfig.cjs +8 -0
- package/dist/lib/typescript/tsconfig.d.mts +2 -0
- package/dist/lib/typescript/tsconfig.d.mts.map +1 -1
- package/dist/lib/typescript/tsconfig.mjs +8 -0
- package/dist/lib/typescript/tsconfig.mjs.map +1 -1
- package/dist/lib/unplugin/helpers.cjs +8 -0
- package/dist/lib/unplugin/helpers.d.mts +2 -0
- package/dist/lib/unplugin/helpers.d.mts.map +1 -1
- package/dist/lib/unplugin/helpers.mjs +8 -0
- package/dist/lib/unplugin/helpers.mjs.map +1 -1
- package/dist/lib/unplugin/index.cjs +8 -0
- package/dist/lib/unplugin/index.d.mts +2 -0
- package/dist/lib/unplugin/index.mjs +8 -0
- package/dist/lib/unplugin/module-resolution.cjs +8 -0
- package/dist/lib/unplugin/module-resolution.d.mts +2 -0
- package/dist/lib/unplugin/module-resolution.d.mts.map +1 -1
- package/dist/lib/unplugin/module-resolution.mjs +8 -0
- package/dist/lib/unplugin/module-resolution.mjs.map +1 -1
- package/dist/lib/unplugin/plugin.cjs +8 -0
- package/dist/lib/unplugin/plugin.d.mts +2 -0
- package/dist/lib/unplugin/plugin.d.mts.map +1 -1
- package/dist/lib/unplugin/plugin.mjs +8 -0
- package/dist/lib/unplugin/plugin.mjs.map +1 -1
- package/dist/lib/utilities/file-header.cjs +8 -0
- package/dist/lib/utilities/file-header.d.mts +2 -0
- package/dist/lib/utilities/file-header.d.mts.map +1 -1
- package/dist/lib/utilities/file-header.mjs +8 -0
- package/dist/lib/utilities/file-header.mjs.map +1 -1
- package/dist/lib/utilities/format.cjs +8 -0
- package/dist/lib/utilities/format.d.mts +2 -0
- package/dist/lib/utilities/format.d.mts.map +1 -1
- package/dist/lib/utilities/format.mjs +8 -0
- package/dist/lib/utilities/format.mjs.map +1 -1
- package/dist/lib/utilities/index.cjs +8 -0
- package/dist/lib/utilities/index.d.mts +2 -0
- package/dist/lib/utilities/index.mjs +8 -0
- package/dist/lib/utilities/source-file.cjs +8 -0
- package/dist/lib/utilities/source-file.d.mts +2 -0
- package/dist/lib/utilities/source-file.d.mts.map +1 -1
- package/dist/lib/utilities/source-file.mjs +8 -0
- package/dist/lib/utilities/source-file.mjs.map +1 -1
- package/dist/lib/utilities/source-map.cjs +8 -0
- package/dist/lib/utilities/source-map.d.mts +2 -0
- package/dist/lib/utilities/source-map.d.mts.map +1 -1
- package/dist/lib/utilities/source-map.mjs +8 -0
- package/dist/lib/utilities/source-map.mjs.map +1 -1
- package/dist/lib/utilities/write-file.cjs +8 -0
- package/dist/lib/utilities/write-file.d.mts +2 -0
- package/dist/lib/utilities/write-file.d.mts.map +1 -1
- package/dist/lib/utilities/write-file.mjs +8 -0
- package/dist/lib/utilities/write-file.mjs.map +1 -1
- package/dist/lib/vfs.cjs +8 -0
- package/dist/lib/vfs.d.mts +2 -0
- package/dist/lib/vfs.d.mts.map +1 -1
- package/dist/lib/vfs.mjs +8 -0
- package/dist/lib/vfs.mjs.map +1 -1
- package/dist/plugin-base.cjs +8 -0
- package/dist/plugin-base.d.mts +2 -0
- package/dist/plugin-base.d.mts.map +1 -1
- package/dist/plugin-base.mjs +8 -0
- package/dist/plugin-base.mjs.map +1 -1
- package/dist/plugin-utils/build-helpers.cjs +8 -0
- package/dist/plugin-utils/build-helpers.d.mts +2 -0
- package/dist/plugin-utils/build-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/build-helpers.mjs +8 -0
- package/dist/plugin-utils/build-helpers.mjs.map +1 -1
- package/dist/plugin-utils/combine-plugins.cjs +8 -0
- package/dist/plugin-utils/combine-plugins.d.mts +2 -0
- package/dist/plugin-utils/combine-plugins.d.mts.map +1 -1
- package/dist/plugin-utils/combine-plugins.mjs +8 -0
- package/dist/plugin-utils/combine-plugins.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +35 -0
- package/dist/plugin-utils/context-helpers.d.cts +25 -1
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/context-helpers.d.mts +27 -1
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs +35 -1
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/docs-helper.cjs +8 -0
- package/dist/plugin-utils/docs-helper.d.mts +2 -0
- package/dist/plugin-utils/docs-helper.d.mts.map +1 -1
- package/dist/plugin-utils/docs-helper.mjs +8 -0
- package/dist/plugin-utils/docs-helper.mjs.map +1 -1
- package/dist/plugin-utils/enable-plugin.cjs +8 -0
- package/dist/plugin-utils/enable-plugin.d.mts +2 -0
- package/dist/plugin-utils/enable-plugin.d.mts.map +1 -1
- package/dist/plugin-utils/enable-plugin.mjs +8 -0
- package/dist/plugin-utils/enable-plugin.mjs.map +1 -1
- package/dist/plugin-utils/extend.cjs +8 -0
- package/dist/plugin-utils/extend.d.mts +2 -0
- package/dist/plugin-utils/extend.d.mts.map +1 -1
- package/dist/plugin-utils/extend.mjs +8 -0
- package/dist/plugin-utils/extend.mjs.map +1 -1
- package/dist/plugin-utils/filter.cjs +8 -0
- package/dist/plugin-utils/filter.d.mts +2 -0
- package/dist/plugin-utils/filter.d.mts.map +1 -1
- package/dist/plugin-utils/filter.mjs +8 -0
- package/dist/plugin-utils/filter.mjs.map +1 -1
- package/dist/plugin-utils/format-package-json.cjs +8 -0
- package/dist/plugin-utils/format-package-json.d.mts +2 -0
- package/dist/plugin-utils/format-package-json.d.mts.map +1 -1
- package/dist/plugin-utils/format-package-json.mjs +8 -0
- package/dist/plugin-utils/format-package-json.mjs.map +1 -1
- package/dist/plugin-utils/format.cjs +8 -0
- package/dist/plugin-utils/format.d.mts +2 -0
- package/dist/plugin-utils/format.d.mts.map +1 -1
- package/dist/plugin-utils/format.mjs +8 -0
- package/dist/plugin-utils/format.mjs.map +1 -1
- package/dist/plugin-utils/get-config-path.cjs +8 -0
- package/dist/plugin-utils/get-config-path.d.mts +2 -0
- package/dist/plugin-utils/get-config-path.d.mts.map +1 -1
- package/dist/plugin-utils/get-config-path.mjs +8 -0
- package/dist/plugin-utils/get-config-path.mjs.map +1 -1
- package/dist/plugin-utils/helpers.cjs +8 -0
- package/dist/plugin-utils/helpers.d.mts +2 -0
- package/dist/plugin-utils/helpers.d.mts.map +1 -1
- package/dist/plugin-utils/helpers.mjs +8 -0
- package/dist/plugin-utils/helpers.mjs.map +1 -1
- package/dist/plugin-utils/index.cjs +9 -0
- package/dist/plugin-utils/index.d.cts +2 -2
- package/dist/plugin-utils/index.d.mts +4 -2
- package/dist/plugin-utils/index.mjs +10 -2
- package/dist/plugin-utils/install.cjs +8 -0
- package/dist/plugin-utils/install.d.mts +2 -0
- package/dist/plugin-utils/install.d.mts.map +1 -1
- package/dist/plugin-utils/install.mjs +8 -0
- package/dist/plugin-utils/install.mjs.map +1 -1
- package/dist/plugin-utils/logging.cjs +8 -0
- package/dist/plugin-utils/logging.d.mts +2 -0
- package/dist/plugin-utils/logging.d.mts.map +1 -1
- package/dist/plugin-utils/logging.mjs +8 -0
- package/dist/plugin-utils/logging.mjs.map +1 -1
- package/dist/plugin-utils/merge.cjs +8 -0
- package/dist/plugin-utils/merge.d.mts +2 -0
- package/dist/plugin-utils/merge.d.mts.map +1 -1
- package/dist/plugin-utils/merge.mjs +8 -0
- package/dist/plugin-utils/merge.mjs.map +1 -1
- package/dist/plugin-utils/modules.cjs +8 -0
- package/dist/plugin-utils/modules.d.mts +2 -0
- package/dist/plugin-utils/modules.d.mts.map +1 -1
- package/dist/plugin-utils/modules.mjs +8 -0
- package/dist/plugin-utils/modules.mjs.map +1 -1
- package/dist/plugin-utils/paths.cjs +8 -0
- package/dist/plugin-utils/paths.d.mts +2 -0
- package/dist/plugin-utils/paths.d.mts.map +1 -1
- package/dist/plugin-utils/paths.mjs +8 -0
- package/dist/plugin-utils/paths.mjs.map +1 -1
- package/dist/plugin-utils/virtual.cjs +8 -0
- package/dist/plugin-utils/virtual.d.mts +2 -0
- package/dist/plugin-utils/virtual.d.mts.map +1 -1
- package/dist/plugin-utils/virtual.mjs +8 -0
- package/dist/plugin-utils/virtual.mjs.map +1 -1
- package/dist/schemas/fs.cjs +8 -0
- package/dist/schemas/fs.d.mts +2 -0
- package/dist/schemas/fs.d.mts.map +1 -1
- package/dist/schemas/fs.mjs +8 -0
- package/dist/schemas/fs.mjs.map +1 -1
- package/dist/storage/base.cjs +8 -0
- package/dist/storage/base.d.mts +2 -0
- package/dist/storage/base.d.mts.map +1 -1
- package/dist/storage/base.mjs +8 -0
- package/dist/storage/base.mjs.map +1 -1
- package/dist/storage/file-system.cjs +8 -0
- package/dist/storage/file-system.d.mts +2 -0
- package/dist/storage/file-system.d.mts.map +1 -1
- package/dist/storage/file-system.mjs +8 -0
- package/dist/storage/file-system.mjs.map +1 -1
- package/dist/storage/helpers.cjs +8 -0
- package/dist/storage/helpers.d.mts +2 -0
- package/dist/storage/helpers.d.mts.map +1 -1
- package/dist/storage/helpers.mjs +8 -0
- package/dist/storage/helpers.mjs.map +1 -1
- package/dist/storage/index.cjs +8 -0
- package/dist/storage/index.d.mts +2 -0
- package/dist/storage/index.mjs +8 -0
- package/dist/storage/virtual.cjs +8 -0
- package/dist/storage/virtual.d.mts +2 -0
- package/dist/storage/virtual.d.mts.map +1 -1
- package/dist/storage/virtual.mjs +8 -0
- package/dist/storage/virtual.mjs.map +1 -1
- package/dist/types/api.d.cts +3 -3
- package/dist/types/api.d.cts.map +1 -1
- package/dist/types/api.d.mts +5 -3
- package/dist/types/api.d.mts.map +1 -1
- package/dist/types/config.d.cts +2 -2
- package/dist/types/config.d.mts +4 -2
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/context.d.cts +7 -3
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +9 -3
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/fs.d.mts +2 -0
- package/dist/types/fs.d.mts.map +1 -1
- package/dist/types/hooks.d.mts +2 -0
- package/dist/types/hooks.d.mts.map +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +3 -1
- package/dist/types/logging.d.mts +2 -0
- package/dist/types/logging.d.mts.map +1 -1
- package/dist/types/plugin.d.mts +2 -0
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/tsconfig.d.mts +2 -0
- package/dist/types/tsconfig.d.mts.map +1 -1
- package/dist/types/unplugin.d.mts +2 -0
- package/dist/types/unplugin.d.mts.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.mjs","names":["#isDisposed"],"sources":["../../src/storage/base.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 { appendPath } from \"@stryke/path/append\";\nimport { correctPath } from \"@stryke/path/correct-path\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { MaybePromise } from \"@stryke/types/base\";\nimport { resolve } from \"node:path\";\nimport { Context } from \"../types/context\";\nimport { StorageAdapter, StoragePreset } from \"../types/fs\";\n\nexport interface StorageAdapterOptions {\n base: string;\n isReadOnly?: boolean;\n ignore?: string | string[];\n}\n\n/**\n * Abstract base class for storage adapters, providing a template for storage operations.\n */\nexport abstract class BaseStorageAdapter<\n TOptions extends StorageAdapterOptions = StorageAdapterOptions\n> implements StorageAdapter {\n /**\n * Indicates whether the storage adapter has been disposed.\n */\n #isDisposed = false;\n\n /**\n * A name identifying the storage adapter type.\n */\n public abstract name: string;\n\n /**\n * Configuration options for the storage adapter.\n */\n public options: TOptions;\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 readonly preset?: StoragePreset | null = null;\n\n /**\n * Constructor for the BaseStorageAdapter.\n *\n * @param context - The Powerlines context.\n * @param options - Configuration options for the storage adapter.\n */\n public constructor(\n protected context: Context,\n options: TOptions = { base: \"/\" } as TOptions\n ) {\n this.options = options;\n this.options.base = resolve(options.base);\n this.options.isReadOnly = !!options.isReadOnly;\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 abstract existsSync(key: string): boolean;\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 async exists(key: string): Promise<boolean> {\n return this.existsSync(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 abstract getSync(key: string): string | null;\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 async get(key: string): Promise<string | null> {\n return this.getSync(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 abstract setSync(key: string, value: string): void;\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 async set(key: string, value: string): Promise<void> {\n if (!this.isReadOnly && (!this.existsSync(key) || this.overwrite)) {\n this.setSync(key, value);\n }\n }\n\n /**\n * Synchronously creates a directory at the specified path.\n *\n * @param _ - The path of the directory to create.\n */\n public mkdirSync(_: string) {}\n\n /**\n * Creates a directory at the specified path.\n *\n * @param dirPath - The path of the directory to create.\n */\n public async mkdir(dirPath: string): Promise<void> {\n return Promise.resolve(this.mkdirSync(dirPath));\n }\n\n /**\n * Synchronously removes a key from the storage.\n *\n * @param key - The key to remove.\n */\n public abstract removeSync(key: string): void;\n\n /**\n * Asynchronously removes a key from the storage.\n *\n * @param key - The key to remove.\n */\n public async remove(key: string): Promise<void> {\n if (!this.isReadOnly && this.overwrite) {\n this.removeSync(key);\n }\n }\n\n /**\n * Synchronously removes all entries from the storage that match the provided base path.\n *\n * @param base - The base path to clear keys from.\n */\n public clearSync(base?: string) {\n if (!this.isReadOnly && this.overwrite) {\n const keys = this.listSync(base || this.options.base);\n if (!keys.length) {\n return;\n }\n\n keys.map(key =>\n this.removeSync(\n base && !key.startsWith(base) ? joinPaths(base, key) : key\n )\n );\n }\n }\n\n /**\n * Asynchronously removes all entries from the storage that match the provided base path.\n *\n * @param base - The base path to clear keys from.\n * @returns A promise that resolves when the operation is complete.\n */\n public async clear(base?: string): Promise<void> {\n if (!this.isReadOnly && this.overwrite) {\n const keys = await this.list(base || this.options.base);\n if (!keys.length) {\n return;\n }\n\n await Promise.all(\n keys.map(async key =>\n this.remove(\n base && !key.startsWith(base) ? joinPaths(base, key) : key\n )\n )\n );\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 abstract listSync(base?: string): string[];\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 async list(base?: string): Promise<string[]> {\n return this.listSync(base);\n }\n\n /**\n * Synchronously checks if the given key is a directory.\n *\n * @param _ - The key to check.\n * @returns `true` if the key is a directory, otherwise `false`.\n */\n public isDirectorySync(_: string): boolean {\n return false;\n }\n\n /**\n * Checks if the given key is a directory.\n *\n * @param key - The key to check.\n * @returns A promise that resolves to `true` if the key is a directory, otherwise `false`.\n */\n public async isDirectory(key: string) {\n return Promise.resolve(this.isDirectorySync(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 isFileSync(key: string): boolean {\n return this.existsSync(key) && !this.isDirectorySync(key);\n }\n\n /**\n * Checks if the given key is a file.\n *\n * @param key - The key to check.\n * @returns A promise that resolves to `true` if the key is a file, otherwise `false`.\n */\n public async isFile(key: string) {\n return Promise.resolve(this.isFileSync(key));\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 dispose(): MaybePromise<void> {\n return Promise.resolve();\n }\n\n /**\n * Async dispose method to clean up resources.\n *\n * @returns A promise that resolves when disposal is complete.\n */\n public async [Symbol.asyncDispose]() {\n return this._dispose();\n }\n\n /**\n * Determines if the storage adapter is read-only based on the provided options.\n *\n * @returns `true` if the storage adapter is read-only, otherwise `false`.\n */\n protected get isReadOnly() {\n return !!this.options.isReadOnly;\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 get overwrite() {\n return !this.isReadOnly && this.context.config.output.overwrite !== false;\n }\n\n /**\n * Resolves a given key to its full path within the storage adapter.\n *\n * @param key - The key to resolve.\n * @returns The resolved full path for the key.\n */\n protected resolve(key?: string) {\n if (!key) {\n return this.options.base;\n }\n\n if (/\\.\\.:|\\.\\.$/.test(key)) {\n throw new Error(\n `[${this.name}]: Invalid key: ${JSON.stringify(key)} provided to storage adapter.`\n );\n }\n\n return appendPath(correctPath(key).replace(/:/g, \"/\"), this.options.base);\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 protected async _dispose(): Promise<void> {\n if (!this.#isDisposed) {\n await Promise.resolve(this.dispose());\n this.#isDisposed = true;\n }\n }\n}\n"],"mappings":";;;;;;;;;AAmCA,IAAsB,qBAAtB,MAE4B;CA+Bd;;;;CA3BZ,cAAc;;;;CAUd,AAAO;;;;;;;CAQP,AAAgB,SAAgC;;;;;;;CAQhD,AAAO,YACL,AAAU,SACV,UAAoB,EAAE,MAAM,IAAI,GAChC;EAFU;EAGV,KAAK,UAAU;EACf,KAAK,QAAQ,OAAO,QAAQ,QAAQ,IAAI;EACxC,KAAK,QAAQ,aAAa,CAAC,CAAC,QAAQ;CACtC;;;;;;;CAgBA,MAAa,OAAO,KAA+B;EACjD,OAAO,KAAK,WAAW,GAAG;CAC5B;;;;;;;CAgBA,MAAa,IAAI,KAAqC;EACpD,OAAO,KAAK,QAAQ,GAAG;CACzB;;;;;;;CAgBA,MAAa,IAAI,KAAa,OAA8B;EAC1D,IAAI,CAAC,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a,OAAO,KAAa;EAC/B,OAAO,QAAQ,QAAQ,KAAK,WAAW,GAAG,CAAC;CAC7C;;;;;;CAOA,AAAO,UAA8B;EACnC,OAAO,QAAQ,QAAQ;CACzB;;;;;;CAOA,OAAc,OAAO,gBAAgB;EACnC,OAAO,KAAK,SAAS;CACvB;;;;;;CAOA,IAAc,aAAa;EACzB,OAAO,CAAC,CAAC,KAAK,QAAQ;CACxB;;;;;;CAOA,IAAc,YAAY;EACxB,OAAO,CAAC,KAAK,cAAc,KAAK,QAAQ,OAAO,OAAO,cAAc;CACtE;;;;;;;CAQA,AAAU,QAAQ,KAAc;EAC9B,IAAI,CAAC,KACH,OAAO,KAAK,QAAQ;EAGtB,IAAI,cAAc,KAAK,GAAG,GACxB,MAAM,IAAI,MACR,IAAI,KAAK,KAAK,kBAAkB,KAAK,UAAU,GAAG,EAAE,8BACtD;EAGF,OAAO,WAAW,YAAY,GAAG,EAAE,QAAQ,MAAM,GAAG,GAAG,KAAK,QAAQ,IAAI;CAC1E;;;;;;CAOA,MAAgB,WAA0B;EACxC,IAAI,CAAC,KAAKA,aAAa;GACrB,MAAM,QAAQ,QAAQ,KAAK,QAAQ,CAAC;GACpC,KAAKA,cAAc;EACrB;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"base.mjs","names":["#isDisposed"],"sources":["../../src/storage/base.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 { appendPath } from \"@stryke/path/append\";\nimport { correctPath } from \"@stryke/path/correct-path\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { MaybePromise } from \"@stryke/types/base\";\nimport { resolve } from \"node:path\";\nimport { Context } from \"../types/context\";\nimport { StorageAdapter, StoragePreset } from \"../types/fs\";\n\nexport interface StorageAdapterOptions {\n base: string;\n isReadOnly?: boolean;\n ignore?: string | string[];\n}\n\n/**\n * Abstract base class for storage adapters, providing a template for storage operations.\n */\nexport abstract class BaseStorageAdapter<\n TOptions extends StorageAdapterOptions = StorageAdapterOptions\n> implements StorageAdapter {\n /**\n * Indicates whether the storage adapter has been disposed.\n */\n #isDisposed = false;\n\n /**\n * A name identifying the storage adapter type.\n */\n public abstract name: string;\n\n /**\n * Configuration options for the storage adapter.\n */\n public options: TOptions;\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 readonly preset?: StoragePreset | null = null;\n\n /**\n * Constructor for the BaseStorageAdapter.\n *\n * @param context - The Powerlines context.\n * @param options - Configuration options for the storage adapter.\n */\n public constructor(\n protected context: Context,\n options: TOptions = { base: \"/\" } as TOptions\n ) {\n this.options = options;\n this.options.base = resolve(options.base);\n this.options.isReadOnly = !!options.isReadOnly;\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 abstract existsSync(key: string): boolean;\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 async exists(key: string): Promise<boolean> {\n return this.existsSync(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 abstract getSync(key: string): string | null;\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 async get(key: string): Promise<string | null> {\n return this.getSync(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 abstract setSync(key: string, value: string): void;\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 async set(key: string, value: string): Promise<void> {\n if (!this.isReadOnly && (!this.existsSync(key) || this.overwrite)) {\n this.setSync(key, value);\n }\n }\n\n /**\n * Synchronously creates a directory at the specified path.\n *\n * @param _ - The path of the directory to create.\n */\n public mkdirSync(_: string) {}\n\n /**\n * Creates a directory at the specified path.\n *\n * @param dirPath - The path of the directory to create.\n */\n public async mkdir(dirPath: string): Promise<void> {\n return Promise.resolve(this.mkdirSync(dirPath));\n }\n\n /**\n * Synchronously removes a key from the storage.\n *\n * @param key - The key to remove.\n */\n public abstract removeSync(key: string): void;\n\n /**\n * Asynchronously removes a key from the storage.\n *\n * @param key - The key to remove.\n */\n public async remove(key: string): Promise<void> {\n if (!this.isReadOnly && this.overwrite) {\n this.removeSync(key);\n }\n }\n\n /**\n * Synchronously removes all entries from the storage that match the provided base path.\n *\n * @param base - The base path to clear keys from.\n */\n public clearSync(base?: string) {\n if (!this.isReadOnly && this.overwrite) {\n const keys = this.listSync(base || this.options.base);\n if (!keys.length) {\n return;\n }\n\n keys.map(key =>\n this.removeSync(\n base && !key.startsWith(base) ? joinPaths(base, key) : key\n )\n );\n }\n }\n\n /**\n * Asynchronously removes all entries from the storage that match the provided base path.\n *\n * @param base - The base path to clear keys from.\n * @returns A promise that resolves when the operation is complete.\n */\n public async clear(base?: string): Promise<void> {\n if (!this.isReadOnly && this.overwrite) {\n const keys = await this.list(base || this.options.base);\n if (!keys.length) {\n return;\n }\n\n await Promise.all(\n keys.map(async key =>\n this.remove(\n base && !key.startsWith(base) ? joinPaths(base, key) : key\n )\n )\n );\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 abstract listSync(base?: string): string[];\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 async list(base?: string): Promise<string[]> {\n return this.listSync(base);\n }\n\n /**\n * Synchronously checks if the given key is a directory.\n *\n * @param _ - The key to check.\n * @returns `true` if the key is a directory, otherwise `false`.\n */\n public isDirectorySync(_: string): boolean {\n return false;\n }\n\n /**\n * Checks if the given key is a directory.\n *\n * @param key - The key to check.\n * @returns A promise that resolves to `true` if the key is a directory, otherwise `false`.\n */\n public async isDirectory(key: string) {\n return Promise.resolve(this.isDirectorySync(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 isFileSync(key: string): boolean {\n return this.existsSync(key) && !this.isDirectorySync(key);\n }\n\n /**\n * Checks if the given key is a file.\n *\n * @param key - The key to check.\n * @returns A promise that resolves to `true` if the key is a file, otherwise `false`.\n */\n public async isFile(key: string) {\n return Promise.resolve(this.isFileSync(key));\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 dispose(): MaybePromise<void> {\n return Promise.resolve();\n }\n\n /**\n * Async dispose method to clean up resources.\n *\n * @returns A promise that resolves when disposal is complete.\n */\n public async [Symbol.asyncDispose]() {\n return this._dispose();\n }\n\n /**\n * Determines if the storage adapter is read-only based on the provided options.\n *\n * @returns `true` if the storage adapter is read-only, otherwise `false`.\n */\n protected get isReadOnly() {\n return !!this.options.isReadOnly;\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 get overwrite() {\n return !this.isReadOnly && this.context.config.output.overwrite !== false;\n }\n\n /**\n * Resolves a given key to its full path within the storage adapter.\n *\n * @param key - The key to resolve.\n * @returns The resolved full path for the key.\n */\n protected resolve(key?: string) {\n if (!key) {\n return this.options.base;\n }\n\n if (/\\.\\.:|\\.\\.$/.test(key)) {\n throw new Error(\n `[${this.name}]: Invalid key: ${JSON.stringify(key)} provided to storage adapter.`\n );\n }\n\n return appendPath(correctPath(key).replace(/:/g, \"/\"), this.options.base);\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 protected async _dispose(): Promise<void> {\n if (!this.#isDisposed) {\n await Promise.resolve(this.dispose());\n this.#isDisposed = true;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmCA,IAAsB,qBAAtB,MAE4B;CA+Bd;;;;CA3BZ,cAAc;;;;CAUd,AAAO;;;;;;;CAQP,AAAgB,SAAgC;;;;;;;CAQhD,AAAO,YACL,AAAU,SACV,UAAoB,EAAE,MAAM,IAAI,GAChC;EAFU;EAGV,KAAK,UAAU;EACf,KAAK,QAAQ,OAAO,QAAQ,QAAQ,IAAI;EACxC,KAAK,QAAQ,aAAa,CAAC,CAAC,QAAQ;CACtC;;;;;;;CAgBA,MAAa,OAAO,KAA+B;EACjD,OAAO,KAAK,WAAW,GAAG;CAC5B;;;;;;;CAgBA,MAAa,IAAI,KAAqC;EACpD,OAAO,KAAK,QAAQ,GAAG;CACzB;;;;;;;CAgBA,MAAa,IAAI,KAAa,OAA8B;EAC1D,IAAI,CAAC,KAAK,eAAe,CAAC,KAAK,WAAW,GAAG,KAAK,KAAK,YACrD,KAAK,QAAQ,KAAK,KAAK;CAE3B;;;;;;CAOA,AAAO,UAAU,GAAW,CAAC;;;;;;CAO7B,MAAa,MAAM,SAAgC;EACjD,OAAO,QAAQ,QAAQ,KAAK,UAAU,OAAO,CAAC;CAChD;;;;;;CAcA,MAAa,OAAO,KAA4B;EAC9C,IAAI,CAAC,KAAK,cAAc,KAAK,WAC3B,KAAK,WAAW,GAAG;CAEvB;;;;;;CAOA,AAAO,UAAU,MAAe;EAC9B,IAAI,CAAC,KAAK,cAAc,KAAK,WAAW;GACtC,MAAM,OAAO,KAA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,OAAO,KAAK,QAAQ;EAGtB,IAAI,cAAc,KAAK,GAAG,GACxB,MAAM,IAAI,MACR,IAAI,KAAK,KAAK,kBAAkB,KAAK,UAAU,GAAG,EAAE,8BACtD;EAGF,OAAO,WAAW,YAAY,GAAG,EAAE,QAAQ,MAAM,GAAG,GAAG,KAAK,QAAQ,IAAI;CAC1E;;;;;;CAOA,MAAgB,WAA0B;EACxC,IAAI,CAAC,KAAKA,aAAa;GACrB,MAAM,QAAQ,QAAQ,KAAK,QAAQ,CAAC;GACpC,KAAKA,cAAc;EACrB;CACF;AACF"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import __tsdown_shims_path from 'node:path'
|
|
4
|
+
import __tsdown_shims_url from 'node:url'
|
|
5
|
+
|
|
6
|
+
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
7
|
+
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
|
+
|
|
1
9
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
10
|
const require_lib_utilities_file_header = require('../lib/utilities/file-header.cjs');
|
|
3
11
|
const require_storage_base = require('./base.cjs');
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
1
3
|
import { Context } from "../types/context.mjs";
|
|
2
4
|
import { BaseStorageAdapter, StorageAdapterOptions } from "./base.mjs";
|
|
3
5
|
import { writeFile, writeFileSync } from "@stryke/fs/write-file";
|
|
@@ -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":";;;;;;;KAgCY,cAAA,GAAiB,UAAU,QAAQ,aAAA;AAAA,KACnC,UAAA,GAAa,UAAU,QAAQ,SAAA;;;;cAK9B,wBAAA,SAAiC,kBAAA;;;;EAIrC,IAAA;EAVG;;;;AAAgD;AAC5D;EADY,SAkBe,MAAA;;;AAjByB;AAKpD;;;cAoBqB,OAAA,EAAS,OAAA,EAAS,OAAA,GAAU,qBAAA;EAAA;;;;;;EAUxC,UAAA,CAAW,GAAA;EA9B0B;;;;;;EAwCtB,MAAA,CAAO,GAAA,WAAc,OAAA;EApBf;;;;;;EA8BrB,OAAA,CAAQ,GAAA;EAVc;;;;;;EAoBP,GAAA,CAAI,GAAA,WAAc,OAAA;EAUjC;;;;;;EAAA,OAAA,CAAQ,GAAA,UAAa,KAAA;EA6ErB;;;;;;EAtCe,GAAA,CAAI,GAAA,UAAa,KAAA,WAAgB,OAAA;EAyEjC;;;;;EAnCf,UAAA,CAAW,GAAA;EA6DS;;;;;EA9CL,MAAA,CAAO,GAAA,WAAc,OAAA;EAsEL;AAAA;;;;EA3DtB,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"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import __tsdown_shims_path from 'node:path'
|
|
4
|
+
import __tsdown_shims_url from 'node:url'
|
|
5
|
+
|
|
6
|
+
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
7
|
+
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
|
+
|
|
1
9
|
import { getFileHeaderWarningText } from "../lib/utilities/file-header.mjs";
|
|
2
10
|
import { BaseStorageAdapter } from "./base.mjs";
|
|
3
11
|
import { ignoreNotfound } from "./helpers.mjs";
|
|
@@ -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;;;;;;;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,OAAe;EACzC,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,QACZ,yBACE,MACA,KAAK,QAAQ,OAAO,WAAW,QAAQ,YACzC,GACA,yBACE,OACA,KAAK,QAAQ,OAAO,WAAW,QAAQ,YACzC,C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,eAAe,GAAG,KAAK,CAAC;EACjC;CACF;;;;;;;CAQA,MAAsB,KAAK,MAAkC;EAC3D,OAAO,UAAU,KAAK,QAAQ,IAAI,GAAG,EACnC,QAAQ,KAAK,QAAQ,OACvB,CAAC,EACE,MAAM,cAAc,EACpB,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 { 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;;;;;;;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,OAAe;EACzC,IAAI,CAAC,KAAK,YACR,IAAI,KAAK,WAAW,KAAK,QAAQ,GAAG,CAAC,KAAK,CAAC,KAAK,WAAW;GACzD,MAAM,gBAAgB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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,EACE,MAAM,cAAc,EACpB,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"}
|
package/dist/storage/helpers.cjs
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import __tsdown_shims_path from 'node:path'
|
|
4
|
+
import __tsdown_shims_url from 'node:url'
|
|
5
|
+
|
|
6
|
+
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
7
|
+
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
|
+
|
|
1
9
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
10
|
let _stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
|
|
3
11
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.mts","names":[],"sources":["../../src/storage/helpers.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.mts","names":[],"sources":["../../src/storage/helpers.ts"],"mappings":";;;;;;;;;iBA0BgB,WAAA,CAAY,GAAQ;;;AAApC;;;;iBAUgB,cAAA,CAAe,GAAQ;AAAvC;;;;AAAuC;AAavC;AAbA,iBAagB,YAAA,CAAa,GAAQ"}
|
package/dist/storage/helpers.mjs
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import __tsdown_shims_path from 'node:path'
|
|
4
|
+
import __tsdown_shims_url from 'node:url'
|
|
5
|
+
|
|
6
|
+
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
7
|
+
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
|
+
|
|
1
9
|
import { isError } from "@stryke/type-checks/is-error";
|
|
2
10
|
|
|
3
11
|
//#region src/storage/helpers.ts
|
|
@@ -1 +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":"
|
|
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;CACpC,OAAO,QAAQ,GAAG,KAAK,UAAU,OAAO,IAAI;AAC9C;;;;;;;AAQA,SAAgB,eAAe,KAAU;CACvC,OACE,YAAY,GAAG,MACd,IAAI,SAAS,YAAY,IAAI,SAAS,WAAW,OAAO;AAE7D;;;;;;;AAQA,SAAgB,aAAa,KAAU;CACrC,OAAO,YAAY,GAAG,KAAK,IAAI,SAAS,WAAW,OAAO;AAC5D"}
|
package/dist/storage/index.cjs
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import __tsdown_shims_path from 'node:path'
|
|
4
|
+
import __tsdown_shims_url from 'node:url'
|
|
5
|
+
|
|
6
|
+
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
7
|
+
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
|
+
|
|
1
9
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
10
|
const require_storage_base = require('./base.cjs');
|
|
3
11
|
const require_storage_helpers = require('./helpers.cjs');
|
package/dist/storage/index.d.mts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
1
3
|
import { BaseStorageAdapter, StorageAdapterOptions } from "./base.mjs";
|
|
2
4
|
import { FileSystemStorageAdapter, SetOptions, SetSyncOptions } from "./file-system.mjs";
|
|
3
5
|
import { ignoreExists, ignoreNotfound, isFileError } from "./helpers.mjs";
|
package/dist/storage/index.mjs
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import __tsdown_shims_path from 'node:path'
|
|
4
|
+
import __tsdown_shims_url from 'node:url'
|
|
5
|
+
|
|
6
|
+
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
7
|
+
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
|
+
|
|
1
9
|
import { BaseStorageAdapter } from "./base.mjs";
|
|
2
10
|
import { ignoreExists, ignoreNotfound, isFileError } from "./helpers.mjs";
|
|
3
11
|
import { FileSystemStorageAdapter } from "./file-system.mjs";
|
package/dist/storage/virtual.cjs
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import __tsdown_shims_path from 'node:path'
|
|
4
|
+
import __tsdown_shims_url from 'node:url'
|
|
5
|
+
|
|
6
|
+
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
7
|
+
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
|
+
|
|
1
9
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
10
|
const require_storage_base = require('./base.cjs');
|
|
3
11
|
let _stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual.d.mts","names":[],"sources":["../../src/storage/virtual.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"virtual.d.mts","names":[],"sources":["../../src/storage/virtual.ts"],"mappings":";;;;;;;;;cAyBa,qBAAA,SAA8B,kBAAA;;;;EAIlC,IAAA;;;AAJT;;;;WAY2B,MAAA;EAasB;;;EAAA,UARrC,IAAA,EAAI,GAAA;EAjB6C;;;;;;cAyBxC,OAAA,EAAS,OAAA,EAAS,OAAA,GAAU,qBAAA;EAAnB;;;;;;EAUrB,UAAA,CAAW,GAAA;EAUH;;;;;;EAAR,OAAA,CAAQ,GAAA;EAiCC;;;;;AAsBgB;EA7CzB,OAAA,CAAQ,GAAA,UAAa,KAAA;;;;;;EAWrB,UAAA,CAAW,GAAA;;;;;;;EAYX,QAAA,CAAS,IAAA;;;;;;EAaM,OAAA,CAAA,GAAW,OAAA;;;;;;gBASV,SAAA,CAAA;AAAA"}
|
package/dist/storage/virtual.mjs
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import __tsdown_shims_path from 'node:path'
|
|
4
|
+
import __tsdown_shims_url from 'node:url'
|
|
5
|
+
|
|
6
|
+
const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
|
|
7
|
+
const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
|
|
8
|
+
|
|
1
9
|
import { BaseStorageAdapter } from "./base.mjs";
|
|
2
10
|
import { isParentPath } from "@stryke/path/is-parent-path";
|
|
3
11
|
|
|
@@ -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":"
|
|
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,KAA4B;EACzC,OAAO,KAAK,KAAK,IAAI,KAAK,QAAQ,GAAG,CAAC,KAAK;CAC7C;;;;;;;CAQA,AAAO,QAAQ,KAAa,OAAe;EACzC,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,EACL,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/api.d.cts
CHANGED
|
@@ -8,9 +8,9 @@ import { ArrayValues } from "@stryke/types/array";
|
|
|
8
8
|
type BaseCommandType = ArrayValues<typeof BASE_EXECUTION_API_METHODS> | "finalize";
|
|
9
9
|
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
|
10
10
|
type Commands<TContext extends Context = Context> = Record<CommandType, (this: TContext) => MaybePromise<void>>;
|
|
11
|
-
type
|
|
12
|
-
type
|
|
11
|
+
type BaseExecutionApiMethods = (typeof BASE_EXECUTION_API_METHODS)[number];
|
|
12
|
+
type ExecutionApiMethods = (typeof EXECUTION_API_METHODS)[number];
|
|
13
13
|
type SupportedCommands = (typeof SUPPORTED_COMMANDS)[number];
|
|
14
14
|
//#endregion
|
|
15
|
-
export { BaseCommandType,
|
|
15
|
+
export { BaseCommandType, BaseExecutionApiMethods, CommandType, Commands, ExecutionApiMethods, SupportedCommands };
|
|
16
16
|
//# sourceMappingURL=api.d.cts.map
|
package/dist/types/api.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.cts","names":[],"sources":["../../src/types/api.ts"],"mappings":";;;;;;;KA2BY,eAAA,GACR,WAAW,QAAQ,0BAAA;AAAA,KAGX,WAAA,GAAc,WAAW,QAAQ,kBAAA;AAAA,KACjC,QAAA,kBAA0B,OAAA,GAAU,OAAA,IAAW,MAAA,CACzD,WAAA,GACC,IAAA,EAAM,QAAA,KAAa,YAAA;AAAA,KAGV,uBAAA,WACF,0BAA0B;AAAA,KACxB,
|
|
1
|
+
{"version":3,"file":"api.d.cts","names":[],"sources":["../../src/types/api.ts"],"mappings":";;;;;;;KA2BY,eAAA,GACR,WAAW,QAAQ,0BAAA;AAAA,KAGX,WAAA,GAAc,WAAW,QAAQ,kBAAA;AAAA,KACjC,QAAA,kBAA0B,OAAA,GAAU,OAAA,IAAW,MAAA,CACzD,WAAA,GACC,IAAA,EAAM,QAAA,KAAa,YAAA;AAAA,KAGV,uBAAA,WACF,0BAA0B;AAAA,KACxB,mBAAA,WAA8B,qBAAqB;AAAA,KACnD,iBAAA,WAA4B,kBAAkB"}
|
package/dist/types/api.d.mts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
1
3
|
import { BASE_EXECUTION_API_METHODS, EXECUTION_API_METHODS } from "../constants/api.mjs";
|
|
2
4
|
import { SUPPORTED_COMMANDS } from "../constants/commands.mjs";
|
|
3
5
|
import { Context } from "./context.mjs";
|
|
@@ -8,9 +10,9 @@ import { ArrayValues } from "@stryke/types/array";
|
|
|
8
10
|
type BaseCommandType = ArrayValues<typeof BASE_EXECUTION_API_METHODS> | "finalize";
|
|
9
11
|
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
|
10
12
|
type Commands<TContext extends Context = Context> = Record<CommandType, (this: TContext) => MaybePromise<void>>;
|
|
11
|
-
type
|
|
12
|
-
type
|
|
13
|
+
type BaseExecutionApiMethods = (typeof BASE_EXECUTION_API_METHODS)[number];
|
|
14
|
+
type ExecutionApiMethods = (typeof EXECUTION_API_METHODS)[number];
|
|
13
15
|
type SupportedCommands = (typeof SUPPORTED_COMMANDS)[number];
|
|
14
16
|
//#endregion
|
|
15
|
-
export { BaseCommandType,
|
|
17
|
+
export { BaseCommandType, BaseExecutionApiMethods, CommandType, Commands, ExecutionApiMethods, SupportedCommands };
|
|
16
18
|
//# sourceMappingURL=api.d.mts.map
|
package/dist/types/api.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.mts","names":[],"sources":["../../src/types/api.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"api.d.mts","names":[],"sources":["../../src/types/api.ts"],"mappings":";;;;;;;;;KA2BY,eAAA,GACR,WAAW,QAAQ,0BAAA;AAAA,KAGX,WAAA,GAAc,WAAW,QAAQ,kBAAA;AAAA,KACjC,QAAA,kBAA0B,OAAA,GAAU,OAAA,IAAW,MAAA,CACzD,WAAA,GACC,IAAA,EAAM,QAAA,KAAa,YAAA;AAAA,KAGV,uBAAA,WACF,0BAA0B;AAAA,KACxB,mBAAA,WAA8B,qBAAqB;AAAA,KACnD,iBAAA,WAA4B,kBAAkB"}
|
package/dist/types/config.d.cts
CHANGED
|
@@ -303,11 +303,11 @@ interface ExecutionOptions extends BaseExecutionOptions {
|
|
|
303
303
|
/**
|
|
304
304
|
* A unique identifier for the current execution instance, which can be used for logging and other purposes to distinguish between different executions in the same process.
|
|
305
305
|
*/
|
|
306
|
-
executionId
|
|
306
|
+
executionId?: string;
|
|
307
307
|
/**
|
|
308
308
|
* The index of the current execution instance among all configured instances in the Powerlines process
|
|
309
309
|
*/
|
|
310
|
-
configIndex
|
|
310
|
+
configIndex?: number;
|
|
311
311
|
/**
|
|
312
312
|
* A path to a custom configuration file to be used instead of the default `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
|
|
313
313
|
*
|
package/dist/types/config.d.mts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
1
3
|
import { StoragePort, StoragePreset } from "./fs.mjs";
|
|
2
4
|
import { Plugin } from "./plugin.mjs";
|
|
3
5
|
import { LogFn, LogLevelResolvedConfig, LogLevelUserConfig } from "./logging.mjs";
|
|
@@ -303,11 +305,11 @@ interface ExecutionOptions extends BaseExecutionOptions {
|
|
|
303
305
|
/**
|
|
304
306
|
* A unique identifier for the current execution instance, which can be used for logging and other purposes to distinguish between different executions in the same process.
|
|
305
307
|
*/
|
|
306
|
-
executionId
|
|
308
|
+
executionId?: string;
|
|
307
309
|
/**
|
|
308
310
|
* The index of the current execution instance among all configured instances in the Powerlines process
|
|
309
311
|
*/
|
|
310
|
-
configIndex
|
|
312
|
+
configIndex?: number;
|
|
311
313
|
/**
|
|
312
314
|
* A path to a custom configuration file to be used instead of the default `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
|
|
313
315
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;KAyCY,eAAA,GAAkB,OAAA,CAAQ,oBAAA,IACpC,QAAA,CAAS,IAAA,CAAK,oBAAA;AAAA,KAEJ,aAAA,yBACc,aAAA,GAAgB,aAAA,qBAErC,OAAA,EAAS,QAAA,KAAa,YAAA,CAAa,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA;;;;KAKtD,iBAAA,kBACO,aAAA,GAAgB,aAAA,8BAErB,aAAA,CAAc,QAAA,EAAU,QAAA,GAAW,QAAA,KAAa,MAAA,CAAO,QAAA;;AAdrE;;KAmBY,kBAAA,kBACO,aAAA,GAAgB,aAAA;EAI7B,MAAA,WAAiB,aAAA,CAAc,QAAA,EAAU,QAAA;EACzC,OAAA,EAAS,QAAA;AAAA;EAGT,MAAA,EAAQ,MAAA,CAAO,QAAA;EACf,OAAA;AAAA;;;;KAMM,YAAA,kBAA8B,aAAA,GAAgB,aAAA,aAEtD,aAAA,CAAc,QAAA,UACd,MAAA,CAAO,QAAA,IACP,iBAAA,CAAkB,QAAA,IAClB,kBAAA,CAAmB,QAAA,IACnB,OAAA,CAAQ,YAAA,CAAa,QAAA,KACrB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
|
24
24
|
/**
|
|
25
|
-
* The execution
|
|
25
|
+
* The unique identifier of the execution, which can be used for logging and other purposes to distinguish between different executions in the same process.
|
|
26
26
|
*/
|
|
27
27
|
executionId: string;
|
|
28
28
|
/**
|
|
29
|
-
* The
|
|
29
|
+
* The build id, which is a unique identifier for the current build process. This can be used for logging and other purposes to distinguish between different builds in the same process.
|
|
30
|
+
*/
|
|
31
|
+
buildId: string;
|
|
32
|
+
/**
|
|
33
|
+
* The release id, which is a unique identifier for the current release. This can be used for logging and other purposes to distinguish between different releases in the same process.
|
|
30
34
|
*/
|
|
31
35
|
releaseId: string;
|
|
32
36
|
/**
|
|
33
|
-
* The execution
|
|
37
|
+
* The timestamp when the execution context was initialized
|
|
34
38
|
*/
|
|
35
39
|
timestamp: number;
|
|
36
40
|
/**
|
|
@@ -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,
|
|
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,KAG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AAQ,yBAAA,CAA0B,eAAA,GAAkB,cAAA;EApC3C;;;EAAA,SAwCR,EAAA;EA9BW;;;EAAA,SAmCX,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/context.d.mts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
1
3
|
import { ResolveOptions, VirtualFile, VirtualFileSystemInterface, WriteOptions } from "./fs.mjs";
|
|
2
4
|
import { Plugin } from "./plugin.mjs";
|
|
3
5
|
import { CallHookOptions, HooksList, HooksListItem, InferHookParameters, InferHookReturnType } from "./hooks.mjs";
|
|
@@ -22,15 +24,19 @@ type MetaInfo = Record<string, any> & {
|
|
|
22
24
|
*/
|
|
23
25
|
checksum: string;
|
|
24
26
|
/**
|
|
25
|
-
* The execution
|
|
27
|
+
* The unique identifier of the execution, which can be used for logging and other purposes to distinguish between different executions in the same process.
|
|
26
28
|
*/
|
|
27
29
|
executionId: string;
|
|
28
30
|
/**
|
|
29
|
-
* The
|
|
31
|
+
* The build id, which is a unique identifier for the current build process. This can be used for logging and other purposes to distinguish between different builds in the same process.
|
|
32
|
+
*/
|
|
33
|
+
buildId: string;
|
|
34
|
+
/**
|
|
35
|
+
* The release id, which is a unique identifier for the current release. This can be used for logging and other purposes to distinguish between different releases in the same process.
|
|
30
36
|
*/
|
|
31
37
|
releaseId: string;
|
|
32
38
|
/**
|
|
33
|
-
* The execution
|
|
39
|
+
* The timestamp when the execution context was initialized
|
|
34
40
|
*/
|
|
35
41
|
timestamp: number;
|
|
36
42
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.mts","names":[],"sources":["../../src/types/context.ts"],"mappings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;EAfA;;;;;;EAuBT,OAAA,EAAS,iBAAA,CAAkB,eAAA,EAAiB,cAAA;EAxB5B;;;EA6BhB,KAAA,EAAO,SAAA,CAAU,aAAA,CAAc,eAAA,EAAiB,cAAA;EA5B/B;AAAA;AAGnB;;;;;;EAmCE,kBAAA,EAAoB,gBAAA,CAAiB,eAAA,EAAiB,cAAA;EAhChC;;;EAqCtB,WAAA,wBACE,GAAA,EAAK,IAAA,EACL,OAAA,GAAU,kBAAA,KACP,gBAAA,CAAiB,aAAA,CAAc,eAAA,EAAiB,cAAA,GAAiB,IAAA;EAzCtE;;;;;AACqC;AAEvC;;EAgDE,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;EArDlB;;;EAAA,SAyDjC,EAAA;EA7CmC;;;EAAA,SAkDnC,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.mts
CHANGED
package/dist/types/fs.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.mts","names":[],"sources":["../../src/types/fs.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"fs.d.mts","names":[],"sources":["../../src/types/fs.ts"],"mappings":";;;;;;;KAsBY,oBAAA;AAAA,KAEA,aAAA;;;;UAKK,cAAA;;;;EAIf,IAAA;EAXU;;;;AAAoB;AAEhC;EAiBE,MAAA,GAAS,aAAA;;;AAjBc;AAKzB;;;EAoBE,MAAA,GAAS,GAAA,aAAgB,OAAA;EAAA;;;;;;EAQzB,UAAA,GAAa,GAAA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