@powerlines/core 0.48.24 → 0.48.25
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 +8 -0
- package/dist/context/context.d.mts +2 -0
- package/dist/context/context.d.mts.map +1 -1
- package/dist/context/context.mjs +8 -0
- package/dist/context/context.mjs.map +1 -1
- package/dist/context/environment-context.cjs +8 -0
- 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 +8 -0
- 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 +8 -0
- 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.mts +2 -0
- 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 +8 -0
- package/dist/plugin-utils/context-helpers.d.mts +2 -0
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs +8 -0
- 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 +8 -0
- package/dist/plugin-utils/index.d.mts +2 -0
- package/dist/plugin-utils/index.mjs +8 -0
- 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.mts +2 -0
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/context.d.mts +2 -0
- 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,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_plugin_utils_merge = require('./merge.cjs');
|
|
3
11
|
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combine-plugins.d.mts","names":[],"sources":["../../src/plugin-utils/combine-plugins.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"combine-plugins.d.mts","names":[],"sources":["../../src/plugin-utils/combine-plugins.ts"],"mappings":";;;;;;;;;;;;iBAkCgB,oBAAA,CACd,aAAA,EAAe,uBAAA;;;;;;;;;UAoCA,qBAAA;EACf,IAAA;EACA,OAAA,EAAS,aAAa;AAAA;;;;;;;iBASR,cAAA,CAAe,OAAA,EAAS,qBAAA"}
|
|
@@ -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 { merge } from "./merge.mjs";
|
|
2
10
|
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
3
11
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combine-plugins.mjs","names":[],"sources":["../../src/plugin-utils/combine-plugins.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 { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport {\n createCombinePlugin,\n OptionsPlugin,\n UnpluginCombineInstance\n} from \"unplugin-combine\";\nimport { Plugin } from \"../types/plugin\";\nimport { merge } from \"./merge\";\n\n/**\n * Combines multiple plugins into a single plugin instance. This is useful for creating meta-plugins that encapsulate the functionality of multiple plugins, allowing users to easily include a set of related plugins with a single import.\n *\n * @param pluginOptions - The plugin options to combine, which can be a single plugin instance or an object containing plugin instances for different build tools.\n * @returns A single plugin instance that combines the functionality of the provided plugin options.\n */\nexport function combinePluginOptions(\n pluginOptions: UnpluginCombineInstance<any>\n) {\n return {\n async rollup() {\n return (await pluginOptions.rollup()).reduce(\n (ret, plugin) => merge(ret, plugin as Plugin<any>) as Plugin<any>,\n {} as Plugin<any>\n );\n },\n async rolldown() {\n return (await pluginOptions.rolldown()).reduce(\n (ret, plugin) => merge(ret, plugin as Plugin<any>) as Plugin<any>,\n {} as Plugin<any>\n );\n },\n async vite() {\n return (await pluginOptions.vite()).reduce(\n (ret, plugin) => merge(ret, plugin as Plugin<any>) as Plugin<any>,\n {} as Plugin<any>\n );\n },\n async esbuild() {\n return pluginOptions.esbuild();\n },\n async webpack() {\n return pluginOptions.webpack();\n },\n async rspack() {\n return pluginOptions.rspack();\n },\n get raw() {\n return pluginOptions;\n }\n };\n}\n\nexport interface CombinePluginsOptions {\n name?: string;\n plugins: OptionsPlugin[];\n}\n\n/**\n * Combines multiple plugins into a single plugin. This is useful for creating meta-plugins that encapsulate the functionality of multiple plugins, allowing users to easily include a set of related plugins with a single import.\n *\n * @param options - The options for combining plugins, including the name and the plugins to combine.\n * @returns A single plugin that combines the functionality of the provided plugins.\n */\nexport function combinePlugins(options: CombinePluginsOptions) {\n const {\n plugins,\n name = `powerlines-${plugins\n .filter(p => isSetObject(p) && \"name\" in p && isSetString(p.name))\n .map(p =>\n (p as { name: string }).name\n .replace(/^powerlines[\\-_:]?/, \"\")\n .replace(/[\\-_:]?powerlines$/, \"\")\n )\n .join(\"-\")}`\n } = options;\n\n return combinePluginOptions(\n createCombinePlugin(() => {\n return {\n name,\n plugins\n };\n })\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"combine-plugins.mjs","names":[],"sources":["../../src/plugin-utils/combine-plugins.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 { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport {\n createCombinePlugin,\n OptionsPlugin,\n UnpluginCombineInstance\n} from \"unplugin-combine\";\nimport { Plugin } from \"../types/plugin\";\nimport { merge } from \"./merge\";\n\n/**\n * Combines multiple plugins into a single plugin instance. This is useful for creating meta-plugins that encapsulate the functionality of multiple plugins, allowing users to easily include a set of related plugins with a single import.\n *\n * @param pluginOptions - The plugin options to combine, which can be a single plugin instance or an object containing plugin instances for different build tools.\n * @returns A single plugin instance that combines the functionality of the provided plugin options.\n */\nexport function combinePluginOptions(\n pluginOptions: UnpluginCombineInstance<any>\n) {\n return {\n async rollup() {\n return (await pluginOptions.rollup()).reduce(\n (ret, plugin) => merge(ret, plugin as Plugin<any>) as Plugin<any>,\n {} as Plugin<any>\n );\n },\n async rolldown() {\n return (await pluginOptions.rolldown()).reduce(\n (ret, plugin) => merge(ret, plugin as Plugin<any>) as Plugin<any>,\n {} as Plugin<any>\n );\n },\n async vite() {\n return (await pluginOptions.vite()).reduce(\n (ret, plugin) => merge(ret, plugin as Plugin<any>) as Plugin<any>,\n {} as Plugin<any>\n );\n },\n async esbuild() {\n return pluginOptions.esbuild();\n },\n async webpack() {\n return pluginOptions.webpack();\n },\n async rspack() {\n return pluginOptions.rspack();\n },\n get raw() {\n return pluginOptions;\n }\n };\n}\n\nexport interface CombinePluginsOptions {\n name?: string;\n plugins: OptionsPlugin[];\n}\n\n/**\n * Combines multiple plugins into a single plugin. This is useful for creating meta-plugins that encapsulate the functionality of multiple plugins, allowing users to easily include a set of related plugins with a single import.\n *\n * @param options - The options for combining plugins, including the name and the plugins to combine.\n * @returns A single plugin that combines the functionality of the provided plugins.\n */\nexport function combinePlugins(options: CombinePluginsOptions) {\n const {\n plugins,\n name = `powerlines-${plugins\n .filter(p => isSetObject(p) && \"name\" in p && isSetString(p.name))\n .map(p =>\n (p as { name: string }).name\n .replace(/^powerlines[\\-_:]?/, \"\")\n .replace(/[\\-_:]?powerlines$/, \"\")\n )\n .join(\"-\")}`\n } = options;\n\n return combinePluginOptions(\n createCombinePlugin(() => {\n return {\n name,\n plugins\n };\n })\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkCA,SAAgB,qBACd,eACA;CACA,OAAO;EACL,MAAM,SAAS;GACb,QAAQ,MAAM,cAAc,OAAO,GAAG,QACnC,KAAK,WAAW,MAAM,KAAK,MAAqB,GACjD,CAAC,CACH;EACF;EACA,MAAM,WAAW;GACf,QAAQ,MAAM,cAAc,SAAS,GAAG,QACrC,KAAK,WAAW,MAAM,KAAK,MAAqB,GACjD,CAAC,CACH;EACF;EACA,MAAM,OAAO;GACX,QAAQ,MAAM,cAAc,KAAK,GAAG,QACjC,KAAK,WAAW,MAAM,KAAK,MAAqB,GACjD,CAAC,CACH;EACF;EACA,MAAM,UAAU;GACd,OAAO,cAAc,QAAQ;EAC/B;EACA,MAAM,UAAU;GACd,OAAO,cAAc,QAAQ;EAC/B;EACA,MAAM,SAAS;GACb,OAAO,cAAc,OAAO;EAC9B;EACA,IAAI,MAAM;GACR,OAAO;EACT;CACF;AACF;;;;;;;AAaA,SAAgB,eAAe,SAAgC;CAC7D,MAAM,EACJ,SACA,OAAO,cAAc,QAClB,QAAO,MAAK,YAAY,CAAC,KAAK,UAAU,KAAK,YAAY,EAAE,IAAI,CAAC,EAChE,KAAI,MACF,EAAuB,KACrB,QAAQ,sBAAsB,EAAE,EAChC,QAAQ,sBAAsB,EAAE,CACrC,EACC,KAAK,GAAG,QACT;CAEJ,OAAO,qBACL,0BAA0B;EACxB,OAAO;GACL;GACA;EACF;CACF,CAAC,CACH;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
|
let _storm_software_config_tools_get_config = require("@storm-software/config-tools/get-config");
|
|
3
11
|
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-helpers.d.mts","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context-helpers.d.mts","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"mappings":";;;;;;;;;;;;iBA8BgB,mBAAA,CACd,OAA0B,EAAjB,iBAAiB;;;;AAD5B;;;iBAgBgB,0BAAA,CACd,WAAwB,EAAX,WAAW;AAhBE;AAe5B;;;;AAC0B;AAhBE,iBA6EN,gBAAA,CACpB,OAAA,EAAS,iBAAA,GACR,OAAO"}
|
|
@@ -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 { tryGetWorkspaceConfig } from "@storm-software/config-tools/get-config";
|
|
2
10
|
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
3
11
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-helpers.mjs","names":[],"sources":["../../src/plugin-utils/context-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 { tryGetWorkspaceConfig } from \"@storm-software/config-tools/get-config\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { PackageJson } from \"@stryke/types/package-json\";\nimport { UnresolvedContext } from \"../types/context\";\n\n/**\n * Get the organization name from the context\n *\n * @param context - The Powerlines plugin context.\n * @returns The organization name or undefined if not found.\n */\nexport function getOrganizationName(\n context: UnresolvedContext\n): string | undefined {\n if (isSetString(context.config.organization)) {\n return context.config.organization;\n }\n\n return getPackageJsonOrganization(context.packageJson);\n}\n\n/**\n * Get the organization name from the `package.json` file\n *\n * @param packageJson - The `package.json` object to extract the organization name from.\n * @returns The organization name or undefined if not found.\n */\nexport function getPackageJsonOrganization(\n packageJson: PackageJson\n): string | undefined {\n let result: string | undefined;\n if (\n Array.isArray(packageJson.maintainers) &&\n packageJson.maintainers.length > 0\n ) {\n if (isSetObject(packageJson.maintainers[0])) {\n result = (packageJson.maintainers[0] as { name: string }).name;\n }\n\n if (!result && isSetString(packageJson.maintainers[0])) {\n result = packageJson.maintainers[0];\n }\n }\n\n if (\n !result &&\n Array.isArray(packageJson.author) &&\n packageJson.author.length > 0\n ) {\n if (isSetObject(packageJson.author[0])) {\n result = (packageJson.author[0] as { name: string }).name;\n }\n\n if (!result && isSetString(packageJson.author[0])) {\n result = packageJson.author[0];\n }\n }\n\n if (\n !result &&\n Array.isArray(packageJson.contributors) &&\n packageJson.contributors.length > 0\n ) {\n if (isSetObject(packageJson.contributors[0])) {\n result = (packageJson.contributors[0] as { name: string }).name;\n }\n\n if (!result && isSetString(packageJson.contributors[0])) {\n result = packageJson.contributors[0];\n }\n }\n\n if (!result && isSetString(packageJson.namespace)) {\n result = packageJson.namespace?.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(packageJson.name)) {\n result = packageJson.name.replace(/^@/, \"\").replace(/\\/.*$/, \"\");\n }\n\n return result;\n}\n\n/**\n * Get the organization name from the context\n *\n * @param context - The Powerlines plugin context.\n * @returns The organization name or undefined if not found.\n */\nexport async function getWorkspaceName(\n context: UnresolvedContext\n): Promise<string | undefined> {\n let result: string | undefined;\n\n const workspaceConfig = await tryGetWorkspaceConfig(true);\n if (workspaceConfig) {\n if (isSetString(workspaceConfig.name)) {\n result = workspaceConfig.name;\n }\n\n if (!result && isSetString(workspaceConfig.namespace)) {\n result = workspaceConfig.namespace.replace(/^@/, \"\");\n }\n }\n\n if (!result && isSetString(context.packageJson.namespace)) {\n result = context.packageJson.namespace.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(context.packageJson.name)) {\n result = context.packageJson.name.replace(/^@/, \"\").replace(/\\/.*$/, \"\");\n }\n\n return result;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context-helpers.mjs","names":[],"sources":["../../src/plugin-utils/context-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 { tryGetWorkspaceConfig } from \"@storm-software/config-tools/get-config\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { PackageJson } from \"@stryke/types/package-json\";\nimport { UnresolvedContext } from \"../types/context\";\n\n/**\n * Get the organization name from the context\n *\n * @param context - The Powerlines plugin context.\n * @returns The organization name or undefined if not found.\n */\nexport function getOrganizationName(\n context: UnresolvedContext\n): string | undefined {\n if (isSetString(context.config.organization)) {\n return context.config.organization;\n }\n\n return getPackageJsonOrganization(context.packageJson);\n}\n\n/**\n * Get the organization name from the `package.json` file\n *\n * @param packageJson - The `package.json` object to extract the organization name from.\n * @returns The organization name or undefined if not found.\n */\nexport function getPackageJsonOrganization(\n packageJson: PackageJson\n): string | undefined {\n let result: string | undefined;\n if (\n Array.isArray(packageJson.maintainers) &&\n packageJson.maintainers.length > 0\n ) {\n if (isSetObject(packageJson.maintainers[0])) {\n result = (packageJson.maintainers[0] as { name: string }).name;\n }\n\n if (!result && isSetString(packageJson.maintainers[0])) {\n result = packageJson.maintainers[0];\n }\n }\n\n if (\n !result &&\n Array.isArray(packageJson.author) &&\n packageJson.author.length > 0\n ) {\n if (isSetObject(packageJson.author[0])) {\n result = (packageJson.author[0] as { name: string }).name;\n }\n\n if (!result && isSetString(packageJson.author[0])) {\n result = packageJson.author[0];\n }\n }\n\n if (\n !result &&\n Array.isArray(packageJson.contributors) &&\n packageJson.contributors.length > 0\n ) {\n if (isSetObject(packageJson.contributors[0])) {\n result = (packageJson.contributors[0] as { name: string }).name;\n }\n\n if (!result && isSetString(packageJson.contributors[0])) {\n result = packageJson.contributors[0];\n }\n }\n\n if (!result && isSetString(packageJson.namespace)) {\n result = packageJson.namespace?.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(packageJson.name)) {\n result = packageJson.name.replace(/^@/, \"\").replace(/\\/.*$/, \"\");\n }\n\n return result;\n}\n\n/**\n * Get the organization name from the context\n *\n * @param context - The Powerlines plugin context.\n * @returns The organization name or undefined if not found.\n */\nexport async function getWorkspaceName(\n context: UnresolvedContext\n): Promise<string | undefined> {\n let result: string | undefined;\n\n const workspaceConfig = await tryGetWorkspaceConfig(true);\n if (workspaceConfig) {\n if (isSetString(workspaceConfig.name)) {\n result = workspaceConfig.name;\n }\n\n if (!result && isSetString(workspaceConfig.namespace)) {\n result = workspaceConfig.namespace.replace(/^@/, \"\");\n }\n }\n\n if (!result && isSetString(context.packageJson.namespace)) {\n result = context.packageJson.namespace.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(context.packageJson.name)) {\n result = context.packageJson.name.replace(/^@/, \"\").replace(/\\/.*$/, \"\");\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA8BA,SAAgB,oBACd,SACoB;CACpB,IAAI,YAAY,QAAQ,OAAO,YAAY,GACzC,OAAO,QAAQ,OAAO;CAGxB,OAAO,2BAA2B,QAAQ,WAAW;AACvD;;;;;;;AAQA,SAAgB,2BACd,aACoB;CACpB,IAAI;CACJ,IACE,MAAM,QAAQ,YAAY,WAAW,KACrC,YAAY,YAAY,SAAS,GACjC;EACA,IAAI,YAAY,YAAY,YAAY,EAAE,GACxC,SAAU,YAAY,YAAY,GAAwB;EAG5D,IAAI,CAAC,UAAU,YAAY,YAAY,YAAY,EAAE,GACnD,SAAS,YAAY,YAAY;CAErC;CAEA,IACE,CAAC,UACD,MAAM,QAAQ,YAAY,MAAM,KAChC,YAAY,OAAO,SAAS,GAC5B;EACA,IAAI,YAAY,YAAY,OAAO,EAAE,GACnC,SAAU,YAAY,OAAO,GAAwB;EAGvD,IAAI,CAAC,UAAU,YAAY,YAAY,OAAO,EAAE,GAC9C,SAAS,YAAY,OAAO;CAEhC;CAEA,IACE,CAAC,UACD,MAAM,QAAQ,YAAY,YAAY,KACtC,YAAY,aAAa,SAAS,GAClC;EACA,IAAI,YAAY,YAAY,aAAa,EAAE,GACzC,SAAU,YAAY,aAAa,GAAwB;EAG7D,IAAI,CAAC,UAAU,YAAY,YAAY,aAAa,EAAE,GACpD,SAAS,YAAY,aAAa;CAEtC;CAEA,IAAI,CAAC,UAAU,YAAY,YAAY,SAAS,GAC9C,SAAS,YAAY,WAAW,QAAQ,MAAM,EAAE;CAGlD,IAAI,CAAC,UAAU,YAAY,YAAY,IAAI,GACzC,SAAS,YAAY,KAAK,QAAQ,MAAM,EAAE,EAAE,QAAQ,SAAS,EAAE;CAGjE,OAAO;AACT;;;;;;;AAQA,eAAsB,iBACpB,SAC6B;CAC7B,IAAI;CAEJ,MAAM,kBAAkB,MAAM,sBAAsB,IAAI;CACxD,IAAI,iBAAiB;EACnB,IAAI,YAAY,gBAAgB,IAAI,GAClC,SAAS,gBAAgB;EAG3B,IAAI,CAAC,UAAU,YAAY,gBAAgB,SAAS,GAClD,SAAS,gBAAgB,UAAU,QAAQ,MAAM,EAAE;CAEvD;CAEA,IAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,SAAS,GACtD,SAAS,QAAQ,YAAY,UAAU,QAAQ,MAAM,EAAE;CAGzD,IAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,IAAI,GACjD,SAAS,QAAQ,YAAY,KAAK,QAAQ,MAAM,EAAE,EAAE,QAAQ,SAAS,EAAE;CAGzE,OAAO;AACT"}
|
|
@@ -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_path_join = require("@stryke/path/join");
|
|
3
11
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-helper.d.mts","names":[],"sources":["../../src/plugin-utils/docs-helper.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"docs-helper.d.mts","names":[],"sources":["../../src/plugin-utils/docs-helper.ts"],"mappings":";;;;;;;;;iBA0BgB,iBAAA,CAAkB,IAAY"}
|
|
@@ -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 { joinPaths } from "@stryke/path/join";
|
|
2
10
|
|
|
3
11
|
//#region src/plugin-utils/docs-helper.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-helper.mjs","names":[],"sources":["../../src/plugin-utils/docs-helper.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 { joinPaths } from \"@stryke/path/join\";\n\n/**\n * Gets the output path for the generated environment documentation.\n *\n * @param root - The root directory of the project.\n * @returns The output path for the generated environment documentation.\n */\nexport function getDocsOutputPath(root: string): string {\n return joinPaths(root, \"docs\", \"reference\");\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"docs-helper.mjs","names":[],"sources":["../../src/plugin-utils/docs-helper.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 { joinPaths } from \"@stryke/path/join\";\n\n/**\n * Gets the output path for the generated environment documentation.\n *\n * @param root - The root directory of the project.\n * @returns The output path for the generated environment documentation.\n */\nexport function getDocsOutputPath(root: string): string {\n return joinPaths(root, \"docs\", \"reference\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,SAAgB,kBAAkB,MAAsB;CACtD,OAAO,UAAU,MAAM,QAAQ,WAAW;AAC5C"}
|
|
@@ -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_function = require("@stryke/type-checks/is-function");
|
|
3
11
|
let _stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enable-plugin.d.mts","names":[],"sources":["../../src/plugin-utils/enable-plugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"enable-plugin.d.mts","names":[],"sources":["../../src/plugin-utils/enable-plugin.ts"],"mappings":";;;;;;;;;;;;;;;;AA6CA;;;;;;;;;;;iBAAgB,MAAA,kBAAwB,aAAA,GAAgB,aAAA,CAAA,CACtD,MAAA,EAAQ,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA,KAClC,SAAA,+BACC,MAAA,CAAO,QAAA"}
|
|
@@ -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 { isFunction } from "@stryke/type-checks/is-function";
|
|
2
10
|
import { toArray } from "@stryke/convert/to-array";
|
|
3
11
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enable-plugin.mjs","names":[],"sources":["../../src/plugin-utils/enable-plugin.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 { toArray } from \"@stryke/convert/to-array\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { Plugin } from \"../types\";\nimport { PluginContext } from \"../types/context\";\n\n/**\n * Utility function to conditionally enable plugins based on a boolean value or a function that returns a boolean. This is useful for scenarios where you want to enable certain plugins only in specific environments (e.g., development vs production) or based on certain conditions (e.g., presence of environment variables).\n *\n * @example\n * ```ts\n * const somePlugin = <TContext extends PluginContext = PluginContext>(options: { enableThirdPlugin: boolean }) => {\n * return [\n * ...enable<TContext>(anotherPlugin, () => process.env.NODE_ENV === \"development\"),\n * ...enable<TContext>(yetAnotherPlugin, process.env.ENABLE_YET_ANOTHER_PLUGIN === \"true\"),\n * ...enable<TContext>(thirdPlugin, options.enableThirdPlugin),\n * {\n * name: \"some-plugin\",\n * ...\n * }\n * ];\n * };\n * ```\n *\n * @param plugin - A single plugin or an array of plugins to conditionally enable.\n * @param condition - A boolean value or a function that returns a boolean. If it's a function, it will be executed to determine whether to enable the plugin(s). If it's a boolean, it will be used directly.\n * @returns An array of plugins that should be enabled based on the provided condition. If the condition is false, an empty array will be returned.\n */\nexport function enable<TContext extends PluginContext = PluginContext>(\n plugin: Plugin<TContext> | Plugin<TContext>[],\n condition: boolean | (() => boolean) = true\n): Plugin<TContext>[] {\n return (isFunction(condition) && condition()) ||\n (!isFunction(condition) && condition)\n ? toArray(plugin).filter(Boolean)\n : [];\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"enable-plugin.mjs","names":[],"sources":["../../src/plugin-utils/enable-plugin.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 { toArray } from \"@stryke/convert/to-array\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { Plugin } from \"../types\";\nimport { PluginContext } from \"../types/context\";\n\n/**\n * Utility function to conditionally enable plugins based on a boolean value or a function that returns a boolean. This is useful for scenarios where you want to enable certain plugins only in specific environments (e.g., development vs production) or based on certain conditions (e.g., presence of environment variables).\n *\n * @example\n * ```ts\n * const somePlugin = <TContext extends PluginContext = PluginContext>(options: { enableThirdPlugin: boolean }) => {\n * return [\n * ...enable<TContext>(anotherPlugin, () => process.env.NODE_ENV === \"development\"),\n * ...enable<TContext>(yetAnotherPlugin, process.env.ENABLE_YET_ANOTHER_PLUGIN === \"true\"),\n * ...enable<TContext>(thirdPlugin, options.enableThirdPlugin),\n * {\n * name: \"some-plugin\",\n * ...\n * }\n * ];\n * };\n * ```\n *\n * @param plugin - A single plugin or an array of plugins to conditionally enable.\n * @param condition - A boolean value or a function that returns a boolean. If it's a function, it will be executed to determine whether to enable the plugin(s). If it's a boolean, it will be used directly.\n * @returns An array of plugins that should be enabled based on the provided condition. If the condition is false, an empty array will be returned.\n */\nexport function enable<TContext extends PluginContext = PluginContext>(\n plugin: Plugin<TContext> | Plugin<TContext>[],\n condition: boolean | (() => boolean) = true\n): Plugin<TContext>[] {\n return (isFunction(condition) && condition()) ||\n (!isFunction(condition) && condition)\n ? toArray(plugin).filter(Boolean)\n : [];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,SAAgB,OACd,QACA,YAAuC,MACnB;CACpB,OAAQ,WAAW,SAAS,KAAK,UAAU,KACxC,CAAC,WAAW,SAAS,KAAK,YACzB,QAAQ,MAAM,EAAE,OAAO,OAAO,IAC9B,CAAC;AACP"}
|
|
@@ -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_plugin_utils_merge = require('./merge.cjs');
|
|
3
11
|
let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
1
3
|
import { Plugin } from "../types/plugin.mjs";
|
|
2
4
|
import { PluginContext } from "../types/context.mjs";
|
|
3
5
|
import { PartialPlugin, PartialPluginFactory, PluginFactory } from "../types/config.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extend.d.mts","names":[],"sources":["../../src/plugin-utils/extend.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"extend.d.mts","names":[],"sources":["../../src/plugin-utils/extend.ts"],"mappings":";;;;;;;;;;;;;;iBAoCgB,MAAA,kBACG,aAAA,GAAgB,aAAA,wDAAA,CAIjC,MAAA,EAAQ,aAAA,CAAc,QAAA,EAAU,cAAA,GAChC,SAAA,EAAW,oBAAA,CAAqB,QAAA,EAAU,iBAAA,IACzC,aAAA,CAAc,QAAA,EAAU,cAAA,GAAiB,iBAAA;AAAA,iBAC5B,MAAA,kBACG,aAAA,GAAgB,aAAA,2BAAA,CAGjC,MAAA,EAAQ,aAAA,CAAc,QAAA,EAAU,cAAA,GAChC,SAAA,EAAW,aAAA,CAAc,QAAA,IACxB,aAAA,CAAc,QAAA,EAAU,cAAA;AAAA,iBACX,MAAA,kBACG,aAAA,GAAgB,aAAA,8BAAA,CAGjC,MAAA,EAAQ,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA,KAClC,SAAA,EAAW,oBAAA,CAAqB,QAAA,EAAU,iBAAA,IACzC,aAAA,CAAc,QAAA,EAAU,iBAAA;AAAA,iBACX,MAAA,kBAAwB,aAAA,GAAgB,aAAA,CAAA,CACtD,MAAA,EAAQ,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA,KAClC,SAAA,EAAW,aAAA,CAAc,QAAA,IACxB,MAAA,CAAO,QAAA"}
|
|
@@ -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 { merge } from "./merge.mjs";
|
|
2
10
|
import { isFunction } from "@stryke/type-checks/is-function";
|
|
3
11
|
import { toArray } from "@stryke/convert/to-array";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extend.mjs","names":[],"sources":["../../src/plugin-utils/extend.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 { toArray } from \"@stryke/convert/to-array\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport {\n PartialPlugin,\n PartialPluginFactory,\n PluginFactory\n} from \"../types/config\";\nimport { PluginContext } from \"../types/context\";\nimport { Plugin } from \"../types/plugin\";\nimport { merge } from \"./merge\";\n\n/**\n * Adds additional helper functionality to a plugin via a plugin builder function.\n *\n * @param plugin - The base plugin object or factory function to extend.\n * @param extension - The plugin extension object or factory function. This function receives the plugin options and returns a plugin object.\n * @returns A function accepting the plugin options and returning the extended plugin.\n */\nexport function extend<\n TContext extends PluginContext = PluginContext,\n TPluginOptions = unknown,\n TExtensionOptions = unknown\n>(\n plugin: PluginFactory<TContext, TPluginOptions>,\n extension: PartialPluginFactory<TContext, TExtensionOptions>\n): PluginFactory<TContext, TPluginOptions & TExtensionOptions>;\nexport function extend<\n TContext extends PluginContext = PluginContext,\n TPluginOptions = unknown\n>(\n plugin: PluginFactory<TContext, TPluginOptions>,\n extension: PartialPlugin<TContext>\n): PluginFactory<TContext, TPluginOptions>;\nexport function extend<\n TContext extends PluginContext = PluginContext,\n TExtensionOptions = unknown\n>(\n plugin: Plugin<TContext> | Plugin<TContext>[],\n extension: PartialPluginFactory<TContext, TExtensionOptions>\n): PluginFactory<TContext, TExtensionOptions>;\nexport function extend<TContext extends PluginContext = PluginContext>(\n plugin: Plugin<TContext> | Plugin<TContext>[],\n extension: PartialPlugin<TContext>\n): Plugin<TContext>[];\nexport function extend<TContext extends PluginContext = PluginContext>(\n plugin: Plugin<TContext> | Plugin<TContext>[] | PluginFactory<TContext, any>,\n extension: PartialPlugin<TContext> | PartialPluginFactory<TContext, any>\n): PluginFactory<TContext, any> | Plugin<TContext>[] {\n if (isFunction(plugin)) {\n if (isFunction(extension)) {\n return async (options: any) => {\n const pluginResult = toArray(await Promise.resolve(plugin(options)));\n const extensionResult = toArray(\n await Promise.resolve(extension(options))\n );\n\n return pluginResult\n .map(p => extensionResult.map(e => merge(p, e) as Plugin<TContext>))\n .flat();\n };\n }\n\n return async (options: any) => {\n const result = toArray(await Promise.resolve(plugin(options)));\n\n return result.map(p => merge(p, extension) as Plugin<TContext>);\n };\n } else if (isFunction(extension)) {\n return async (options: any) => {\n const result = toArray(await Promise.resolve(extension(options)));\n\n return result\n .map(e => toArray(plugin).map(p => merge(p, e) as Plugin<TContext>))\n .flat();\n };\n }\n\n return toArray(plugin).map(p => merge(p, extension) as Plugin<TContext>);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"extend.mjs","names":[],"sources":["../../src/plugin-utils/extend.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 { toArray } from \"@stryke/convert/to-array\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport {\n PartialPlugin,\n PartialPluginFactory,\n PluginFactory\n} from \"../types/config\";\nimport { PluginContext } from \"../types/context\";\nimport { Plugin } from \"../types/plugin\";\nimport { merge } from \"./merge\";\n\n/**\n * Adds additional helper functionality to a plugin via a plugin builder function.\n *\n * @param plugin - The base plugin object or factory function to extend.\n * @param extension - The plugin extension object or factory function. This function receives the plugin options and returns a plugin object.\n * @returns A function accepting the plugin options and returning the extended plugin.\n */\nexport function extend<\n TContext extends PluginContext = PluginContext,\n TPluginOptions = unknown,\n TExtensionOptions = unknown\n>(\n plugin: PluginFactory<TContext, TPluginOptions>,\n extension: PartialPluginFactory<TContext, TExtensionOptions>\n): PluginFactory<TContext, TPluginOptions & TExtensionOptions>;\nexport function extend<\n TContext extends PluginContext = PluginContext,\n TPluginOptions = unknown\n>(\n plugin: PluginFactory<TContext, TPluginOptions>,\n extension: PartialPlugin<TContext>\n): PluginFactory<TContext, TPluginOptions>;\nexport function extend<\n TContext extends PluginContext = PluginContext,\n TExtensionOptions = unknown\n>(\n plugin: Plugin<TContext> | Plugin<TContext>[],\n extension: PartialPluginFactory<TContext, TExtensionOptions>\n): PluginFactory<TContext, TExtensionOptions>;\nexport function extend<TContext extends PluginContext = PluginContext>(\n plugin: Plugin<TContext> | Plugin<TContext>[],\n extension: PartialPlugin<TContext>\n): Plugin<TContext>[];\nexport function extend<TContext extends PluginContext = PluginContext>(\n plugin: Plugin<TContext> | Plugin<TContext>[] | PluginFactory<TContext, any>,\n extension: PartialPlugin<TContext> | PartialPluginFactory<TContext, any>\n): PluginFactory<TContext, any> | Plugin<TContext>[] {\n if (isFunction(plugin)) {\n if (isFunction(extension)) {\n return async (options: any) => {\n const pluginResult = toArray(await Promise.resolve(plugin(options)));\n const extensionResult = toArray(\n await Promise.resolve(extension(options))\n );\n\n return pluginResult\n .map(p => extensionResult.map(e => merge(p, e) as Plugin<TContext>))\n .flat();\n };\n }\n\n return async (options: any) => {\n const result = toArray(await Promise.resolve(plugin(options)));\n\n return result.map(p => merge(p, extension) as Plugin<TContext>);\n };\n } else if (isFunction(extension)) {\n return async (options: any) => {\n const result = toArray(await Promise.resolve(extension(options)));\n\n return result\n .map(e => toArray(plugin).map(p => merge(p, e) as Plugin<TContext>))\n .flat();\n };\n }\n\n return toArray(plugin).map(p => merge(p, extension) as Plugin<TContext>);\n}\n"],"mappings":";;;;;;;;;;;;;AA8DA,SAAgB,OACd,QACA,WACmD;CACnD,IAAI,WAAW,MAAM,GAAG;EACtB,IAAI,WAAW,SAAS,GACtB,OAAO,OAAO,YAAiB;GAC7B,MAAM,eAAe,QAAQ,MAAM,QAAQ,QAAQ,OAAO,OAAO,CAAC,CAAC;GACnE,MAAM,kBAAkB,QACtB,MAAM,QAAQ,QAAQ,UAAU,OAAO,CAAC,CAC1C;GAEA,OAAO,aACJ,KAAI,MAAK,gBAAgB,KAAI,MAAK,MAAM,GAAG,CAAC,CAAqB,CAAC,EAClE,KAAK;EACV;EAGF,OAAO,OAAO,YAAiB;GAG7B,OAFe,QAAQ,MAAM,QAAQ,QAAQ,OAAO,OAAO,CAAC,CAEhD,EAAE,KAAI,MAAK,MAAM,GAAG,SAAS,CAAqB;EAChE;CACF,OAAO,IAAI,WAAW,SAAS,GAC7B,OAAO,OAAO,YAAiB;EAG7B,OAFe,QAAQ,MAAM,QAAQ,QAAQ,UAAU,OAAO,CAAC,CAEnD,EACT,KAAI,MAAK,QAAQ,MAAM,EAAE,KAAI,MAAK,MAAM,GAAG,CAAC,CAAqB,CAAC,EAClE,KAAK;CACV;CAGF,OAAO,QAAQ,MAAM,EAAE,KAAI,MAAK,MAAM,GAAG,SAAS,CAAqB;AACzE"}
|
|
@@ -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_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
11
|
const require_plugin_utils_virtual = require('./virtual.cjs');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.d.mts","names":[],"sources":["../../src/plugin-utils/filter.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"filter.d.mts","names":[],"sources":["../../src/plugin-utils/filter.ts"],"mappings":";;;;;;iBA+CgB,iBAAA,CAAkB,OAAA,EAAS,cAAA,GAAiB,YAAY;AAAA,iBAoBxD,mBAAA,CAAoB,OAAA,EAAS,cAAA,GAAiB,YAAY;AAAA,iBAW1D,YAAA,CACd,OAAA,EAAS,YAAA,gBACT,OAAA,EAAS,YAAA,iBACR,YAAA;AAAA,iBAgBa,qBAAA,CACd,MAAA,WAAiB,MAAA,YACP,MAAM;AAAA,iBAQF,eAAA,CAAgB,MAAA,EAAQ,YAAA,GAAe,sBAAsB;AAAA,iBAuB7D,cAAA,CACd,MAAA,EAAQ,YAAA,eACP,YAAY;AAAA,iBASC,gBAAA,CACd,MAAA,EAAQ,YAAA,eACP,YAAY;AAAA,iBASC,iBAAA,CACd,MAAA,EAAQ,YAAA,eACP,YAAY;AAAA,iBAMC,wBAAA,CACd,QAAA,EAAU,YAAA,cACV,UAAA,EAAY,YAAA,eACX,mBAAA"}
|
|
@@ -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 { removeVirtualPrefix } from "./virtual.mjs";
|
|
2
10
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
3
11
|
import { toArray } from "@stryke/convert/to-array";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.mjs","names":[],"sources":["../../src/plugin-utils/filter.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 { toArray } from \"@stryke/convert/to-array\";\nimport { isAbsolutePath } from \"@stryke/path/is-type\";\nimport { isRegExp } from \"@stryke/type-checks/is-regexp\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { resolve } from \"node:path\";\nimport picomatch from \"picomatch\";\nimport type { StringFilter, StringOrRegExp } from \"unplugin\";\nimport {\n NormalizedStringFilter,\n PluginFilter,\n TransformHookFilter\n} from \"../types/hooks\";\nimport { removeVirtualPrefix } from \"./virtual\";\n\nconst BACKSLASH_REGEX = /\\\\/g;\nfunction normalize(path: string): string {\n return removeVirtualPrefix(path).replace(BACKSLASH_REGEX, \"/\");\n}\n\nfunction getMatcherString(glob: string, cwd: string) {\n if (glob.startsWith(\"**\") || isAbsolutePath(glob)) {\n return normalize(glob);\n }\n\n const resolved = resolve(cwd, glob);\n\n return normalize(resolved);\n}\n\nexport function patternToIdFilter(pattern: StringOrRegExp): PluginFilter {\n if (pattern instanceof RegExp) {\n return (id: string) => {\n const normalizedId = normalize(id);\n const result = pattern.test(normalizedId);\n pattern.lastIndex = 0;\n return result;\n };\n }\n const cwd = process.cwd();\n const glob = getMatcherString(pattern, cwd);\n const matcher = picomatch(glob, { dot: true });\n\n return (id: string) => {\n const normalizedId = normalize(id);\n\n return matcher(normalizedId);\n };\n}\n\nexport function patternToCodeFilter(pattern: StringOrRegExp): PluginFilter {\n if (pattern instanceof RegExp) {\n return (code: string) => {\n const result = pattern.test(code);\n pattern.lastIndex = 0;\n return result;\n };\n }\n return (code: string) => code.includes(pattern);\n}\n\nexport function createFilter(\n exclude: PluginFilter[] | undefined,\n include: PluginFilter[] | undefined\n): PluginFilter | undefined {\n if (!exclude && !include) {\n return;\n }\n\n return input => {\n if (exclude?.some(filter => filter(input))) {\n return false;\n }\n if (include?.some(filter => filter(input))) {\n return true;\n }\n return !(include && include.length > 0);\n };\n}\n\nexport function normalizeSingleFilter(\n filter: string | RegExp\n): string | RegExp {\n if (isSetString(filter)) {\n return removeVirtualPrefix(filter);\n }\n\n return filter;\n}\n\nexport function normalizeFilter(filter: StringFilter): NormalizedStringFilter {\n if (isSetString(filter) || isRegExp(filter)) {\n return {\n include: [normalizeSingleFilter(filter)]\n };\n }\n\n if (Array.isArray(filter)) {\n return {\n include: filter.map(normalizeSingleFilter)\n };\n }\n\n return {\n exclude: filter.exclude\n ? toArray(filter.exclude).map(normalizeSingleFilter)\n : undefined,\n include: filter.include\n ? toArray(filter.include).map(normalizeSingleFilter)\n : undefined\n };\n}\n\nexport function createIdFilter(\n filter: StringFilter | undefined\n): PluginFilter | undefined {\n if (!filter) return;\n const { exclude, include } = normalizeFilter(filter);\n const excludeFilter = exclude?.map(patternToIdFilter);\n const includeFilter = include?.map(patternToIdFilter);\n\n return createFilter(excludeFilter, includeFilter);\n}\n\nexport function createCodeFilter(\n filter: StringFilter | undefined\n): PluginFilter | undefined {\n if (!filter) return;\n const { exclude, include } = normalizeFilter(filter);\n const excludeFilter = exclude?.map(patternToCodeFilter);\n const includeFilter = include?.map(patternToCodeFilter);\n\n return createFilter(excludeFilter, includeFilter);\n}\n\nexport function createFilterForId(\n filter: StringFilter | undefined\n): PluginFilter | undefined {\n const filterFunction = createIdFilter(filter);\n\n return filterFunction ? id => !!filterFunction(id) : undefined;\n}\n\nexport function createFilterForTransform(\n idFilter: StringFilter | undefined,\n codeFilter: StringFilter | undefined\n): TransformHookFilter | undefined {\n if (!idFilter && !codeFilter) return;\n const idFilterFunction = createIdFilter(idFilter);\n const codeFilterFunction = createCodeFilter(codeFilter);\n\n return (id, code) => {\n let fallback = true;\n if (idFilterFunction) {\n fallback &&= idFilterFunction(id);\n }\n if (!fallback) {\n return false;\n }\n\n if (codeFilterFunction) {\n fallback &&= codeFilterFunction(code);\n }\n return fallback;\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"filter.mjs","names":[],"sources":["../../src/plugin-utils/filter.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 { toArray } from \"@stryke/convert/to-array\";\nimport { isAbsolutePath } from \"@stryke/path/is-type\";\nimport { isRegExp } from \"@stryke/type-checks/is-regexp\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { resolve } from \"node:path\";\nimport picomatch from \"picomatch\";\nimport type { StringFilter, StringOrRegExp } from \"unplugin\";\nimport {\n NormalizedStringFilter,\n PluginFilter,\n TransformHookFilter\n} from \"../types/hooks\";\nimport { removeVirtualPrefix } from \"./virtual\";\n\nconst BACKSLASH_REGEX = /\\\\/g;\nfunction normalize(path: string): string {\n return removeVirtualPrefix(path).replace(BACKSLASH_REGEX, \"/\");\n}\n\nfunction getMatcherString(glob: string, cwd: string) {\n if (glob.startsWith(\"**\") || isAbsolutePath(glob)) {\n return normalize(glob);\n }\n\n const resolved = resolve(cwd, glob);\n\n return normalize(resolved);\n}\n\nexport function patternToIdFilter(pattern: StringOrRegExp): PluginFilter {\n if (pattern instanceof RegExp) {\n return (id: string) => {\n const normalizedId = normalize(id);\n const result = pattern.test(normalizedId);\n pattern.lastIndex = 0;\n return result;\n };\n }\n const cwd = process.cwd();\n const glob = getMatcherString(pattern, cwd);\n const matcher = picomatch(glob, { dot: true });\n\n return (id: string) => {\n const normalizedId = normalize(id);\n\n return matcher(normalizedId);\n };\n}\n\nexport function patternToCodeFilter(pattern: StringOrRegExp): PluginFilter {\n if (pattern instanceof RegExp) {\n return (code: string) => {\n const result = pattern.test(code);\n pattern.lastIndex = 0;\n return result;\n };\n }\n return (code: string) => code.includes(pattern);\n}\n\nexport function createFilter(\n exclude: PluginFilter[] | undefined,\n include: PluginFilter[] | undefined\n): PluginFilter | undefined {\n if (!exclude && !include) {\n return;\n }\n\n return input => {\n if (exclude?.some(filter => filter(input))) {\n return false;\n }\n if (include?.some(filter => filter(input))) {\n return true;\n }\n return !(include && include.length > 0);\n };\n}\n\nexport function normalizeSingleFilter(\n filter: string | RegExp\n): string | RegExp {\n if (isSetString(filter)) {\n return removeVirtualPrefix(filter);\n }\n\n return filter;\n}\n\nexport function normalizeFilter(filter: StringFilter): NormalizedStringFilter {\n if (isSetString(filter) || isRegExp(filter)) {\n return {\n include: [normalizeSingleFilter(filter)]\n };\n }\n\n if (Array.isArray(filter)) {\n return {\n include: filter.map(normalizeSingleFilter)\n };\n }\n\n return {\n exclude: filter.exclude\n ? toArray(filter.exclude).map(normalizeSingleFilter)\n : undefined,\n include: filter.include\n ? toArray(filter.include).map(normalizeSingleFilter)\n : undefined\n };\n}\n\nexport function createIdFilter(\n filter: StringFilter | undefined\n): PluginFilter | undefined {\n if (!filter) return;\n const { exclude, include } = normalizeFilter(filter);\n const excludeFilter = exclude?.map(patternToIdFilter);\n const includeFilter = include?.map(patternToIdFilter);\n\n return createFilter(excludeFilter, includeFilter);\n}\n\nexport function createCodeFilter(\n filter: StringFilter | undefined\n): PluginFilter | undefined {\n if (!filter) return;\n const { exclude, include } = normalizeFilter(filter);\n const excludeFilter = exclude?.map(patternToCodeFilter);\n const includeFilter = include?.map(patternToCodeFilter);\n\n return createFilter(excludeFilter, includeFilter);\n}\n\nexport function createFilterForId(\n filter: StringFilter | undefined\n): PluginFilter | undefined {\n const filterFunction = createIdFilter(filter);\n\n return filterFunction ? id => !!filterFunction(id) : undefined;\n}\n\nexport function createFilterForTransform(\n idFilter: StringFilter | undefined,\n codeFilter: StringFilter | undefined\n): TransformHookFilter | undefined {\n if (!idFilter && !codeFilter) return;\n const idFilterFunction = createIdFilter(idFilter);\n const codeFilterFunction = createCodeFilter(codeFilter);\n\n return (id, code) => {\n let fallback = true;\n if (idFilterFunction) {\n fallback &&= idFilterFunction(id);\n }\n if (!fallback) {\n return false;\n }\n\n if (codeFilterFunction) {\n fallback &&= codeFilterFunction(code);\n }\n return fallback;\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAgCA,MAAM,kBAAkB;AACxB,SAAS,UAAU,MAAsB;CACvC,OAAO,oBAAoB,IAAI,EAAE,QAAQ,iBAAiB,GAAG;AAC/D;AAEA,SAAS,iBAAiB,MAAc,KAAa;CACnD,IAAI,KAAK,WAAW,IAAI,KAAK,eAAe,IAAI,GAC9C,OAAO,UAAU,IAAI;CAKvB,OAAO,UAFU,QAAQ,KAAK,IAEN,CAAC;AAC3B;AAEA,SAAgB,kBAAkB,SAAuC;CACvE,IAAI,mBAAmB,QACrB,QAAQ,OAAe;EACrB,MAAM,eAAe,UAAU,EAAE;EACjC,MAAM,SAAS,QAAQ,KAAK,YAAY;EACxC,QAAQ,YAAY;EACpB,OAAO;CACT;CAIF,MAAM,UAAU,UADH,iBAAiB,SADlB,QAAQ,IACqB,CACZ,GAAG,EAAE,KAAK,KAAK,CAAC;CAE7C,QAAQ,OAAe;EAGrB,OAAO,QAFc,UAAU,EAEL,CAAC;CAC7B;AACF;AAEA,SAAgB,oBAAoB,SAAuC;CACzE,IAAI,mBAAmB,QACrB,QAAQ,SAAiB;EACvB,MAAM,SAAS,QAAQ,KAAK,IAAI;EAChC,QAAQ,YAAY;EACpB,OAAO;CACT;CAEF,QAAQ,SAAiB,KAAK,SAAS,OAAO;AAChD;AAEA,SAAgB,aACd,SACA,SAC0B;CAC1B,IAAI,CAAC,WAAW,CAAC,SACf;CAGF,QAAO,UAAS;EACd,IAAI,SAAS,MAAK,WAAU,OAAO,KAAK,CAAC,GACvC,OAAO;EAET,IAAI,SAAS,MAAK,WAAU,OAAO,KAAK,CAAC,GACvC,OAAO;EAET,OAAO,EAAE,WAAW,QAAQ,SAAS;CACvC;AACF;AAEA,SAAgB,sBACd,QACiB;CACjB,IAAI,YAAY,MAAM,GACpB,OAAO,oBAAoB,MAAM;CAGnC,OAAO;AACT;AAEA,SAAgB,gBAAgB,QAA8C;CAC5E,IAAI,YAAY,MAAM,KAAK,SAAS,MAAM,GACxC,OAAO,EACL,SAAS,CAAC,sBAAsB,MAAM,CAAC,EACzC;CAGF,IAAI,MAAM,QAAQ,MAAM,GACtB,OAAO,EACL,SAAS,OAAO,IAAI,qBAAqB,EAC3C;CAGF,OAAO;EACL,SAAS,OAAO,UACZ,QAAQ,OAAO,OAAO,EAAE,IAAI,qBAAqB,IACjD;EACJ,SAAS,OAAO,UACZ,QAAQ,OAAO,OAAO,EAAE,IAAI,qBAAqB,IACjD;CACN;AACF;AAEA,SAAgB,eACd,QAC0B;CAC1B,IAAI,CAAC,QAAQ;CACb,MAAM,EAAE,SAAS,YAAY,gBAAgB,MAAM;CACnD,MAAM,gBAAgB,SAAS,IAAI,iBAAiB;CACpD,MAAM,gBAAgB,SAAS,IAAI,iBAAiB;CAEpD,OAAO,aAAa,eAAe,aAAa;AAClD;AAEA,SAAgB,iBACd,QAC0B;CAC1B,IAAI,CAAC,QAAQ;CACb,MAAM,EAAE,SAAS,YAAY,gBAAgB,MAAM;CACnD,MAAM,gBAAgB,SAAS,IAAI,mBAAmB;CACtD,MAAM,gBAAgB,SAAS,IAAI,mBAAmB;CAEtD,OAAO,aAAa,eAAe,aAAa;AAClD;AAEA,SAAgB,kBACd,QAC0B;CAC1B,MAAM,iBAAiB,eAAe,MAAM;CAE5C,OAAO,kBAAiB,OAAM,CAAC,CAAC,eAAe,EAAE,IAAI;AACvD;AAEA,SAAgB,yBACd,UACA,YACiC;CACjC,IAAI,CAAC,YAAY,CAAC,YAAY;CAC9B,MAAM,mBAAmB,eAAe,QAAQ;CAChD,MAAM,qBAAqB,iBAAiB,UAAU;CAEtD,QAAQ,IAAI,SAAS;EACnB,IAAI,WAAW;EACf,IAAI,kBACF,aAAa,iBAAiB,EAAE;EAElC,IAAI,CAAC,UACH,OAAO;EAGT,IAAI,oBACF,aAAa,mBAAmB,IAAI;EAEtC,OAAO;CACT;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_format = require('../lib/utilities/format.cjs');
|
|
3
11
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-package-json.d.mts","names":[],"sources":["../../src/plugin-utils/format-package-json.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"format-package-json.d.mts","names":[],"sources":["../../src/plugin-utils/format-package-json.ts"],"mappings":";;;;;;;;;;iBA4BsB,iBAAA,CAAkB,OAAA,EAAS,OAAA,GAAO,OAAA"}
|
|
@@ -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 { format } from "../lib/utilities/format.mjs";
|
|
2
10
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
3
11
|
import { joinPaths } from "@stryke/path/join";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-package-json.mjs","names":[],"sources":["../../src/plugin-utils/format-package-json.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 { joinPaths } from \"@stryke/path/join\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { format } from \"../lib/utilities/format\";\nimport { Context } from \"../types/context\";\n\n/**\n * Formats the `package.json` file in the project root.\n *\n * @param context - The powerlines context.\n */\nexport async function formatPackageJson(context: Context) {\n const packageJsonPath = joinPaths(\n context.config.cwd,\n context.config.root,\n \"package.json\"\n );\n\n const packageJsonFile = await context.fs.read(packageJsonPath);\n if (isSetString(packageJsonFile)) {\n await context.fs.write(\n packageJsonPath,\n await format(context, packageJsonPath, packageJsonFile)\n );\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"format-package-json.mjs","names":[],"sources":["../../src/plugin-utils/format-package-json.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 { joinPaths } from \"@stryke/path/join\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { format } from \"../lib/utilities/format\";\nimport { Context } from \"../types/context\";\n\n/**\n * Formats the `package.json` file in the project root.\n *\n * @param context - The powerlines context.\n */\nexport async function formatPackageJson(context: Context) {\n const packageJsonPath = joinPaths(\n context.config.cwd,\n context.config.root,\n \"package.json\"\n );\n\n const packageJsonFile = await context.fs.read(packageJsonPath);\n if (isSetString(packageJsonFile)) {\n await context.fs.write(\n packageJsonPath,\n await format(context, packageJsonPath, packageJsonFile)\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA4BA,eAAsB,kBAAkB,SAAkB;CACxD,MAAM,kBAAkB,UACtB,QAAQ,OAAO,KACf,QAAQ,OAAO,MACf,cACF;CAEA,MAAM,kBAAkB,MAAM,QAAQ,GAAG,KAAK,eAAe;CAC7D,IAAI,YAAY,eAAe,GAC7B,MAAM,QAAQ,GAAG,MACf,iBACA,MAAM,OAAO,SAAS,iBAAiB,eAAe,CACxD;AAEJ"}
|
|
@@ -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_set_object = require("@stryke/type-checks/is-set-object");
|
|
3
11
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
1
3
|
//#region src/plugin-utils/format.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* Formats a configuration object into a human-readable string, omitting certain properties and simplifying others for better readability.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.mts","names":[],"sources":["../../src/plugin-utils/format.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"format.d.mts","names":[],"sources":["../../src/plugin-utils/format.ts"],"mappings":";;;;;;;;;iBAgCgB,YAAA,CAAa,MAA2B,EAAnB,MAAM"}
|
|
@@ -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 { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
2
10
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
3
11
|
import { toArray } from "@stryke/convert/to-array";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.mjs","names":[],"sources":["../../src/plugin-utils/format.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 { toArray } from \"@stryke/convert/to-array\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { isRegExp } from \"@stryke/type-checks/is-regexp\";\nimport { isSetArray } from \"@stryke/type-checks/is-set-array\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { ResolveConfig, ResolvedConfig } from \"../types/config\";\n\n/**\n * Formats a configuration object into a human-readable string, omitting certain properties and simplifying others for better readability.\n *\n * @param config - The configuration object to format.\n * @returns A formatted string representation of the configuration.\n */\nexport function formatConfig(config: Record<string, any>): string {\n return JSON.stringify(\n Object.fromEntries(\n Object.entries({\n ...omit(config, [\n \"deps\",\n \"resolve\",\n \"plugins\",\n \"initialConfig\",\n \"userConfig\",\n \"inlineConfig\",\n \"pluginConfig\",\n \"environmentConfig\"\n ]),\n deps: isSetObject(config.deps)\n ? {\n alwaysBundle: isSetArray(\n (config.deps as { alwaysBundle?: unknown[] })?.alwaysBundle\n )\n ? (\n (config.deps as { alwaysBundle?: unknown[] })\n ?.alwaysBundle ?? []\n )\n .filter(Boolean)\n .map(alwaysBundle =>\n isSetString(alwaysBundle)\n ? alwaysBundle\n : isRegExp(alwaysBundle)\n ? alwaysBundle.source\n : \"<unknown-bundle>\"\n )\n : undefined,\n onlyBundle: isSetArray(\n (config.deps as { onlyBundle?: unknown[] })?.onlyBundle\n )\n ? (\n (config.deps as { onlyBundle?: unknown[] })?.onlyBundle ??\n []\n )\n .filter(Boolean)\n .map(onlyBundle =>\n isSetString(onlyBundle)\n ? onlyBundle\n : isRegExp(onlyBundle)\n ? onlyBundle.source\n : \"<unknown-bundle>\"\n )\n : undefined,\n neverBundle: isSetArray(\n (config.deps as { neverBundle?: unknown[] })?.neverBundle\n )\n ? (\n (config.deps as { neverBundle?: unknown[] })?.neverBundle ??\n []\n )\n .filter(Boolean)\n .map(neverBundle =>\n isSetString(neverBundle)\n ? neverBundle\n : isRegExp(neverBundle)\n ? neverBundle.source\n : \"<unknown-bundle>\"\n )\n : undefined\n }\n : undefined,\n\n resolve: isSetObject(config.resolve)\n ? {\n ...config.resolve,\n external: isSetArray((config.resolve as ResolveConfig)?.external)\n ? ((config.resolve as ResolveConfig)?.external ?? [])\n .filter(Boolean)\n .map(external =>\n isSetString(external)\n ? external\n : isRegExp(external)\n ? external.source\n : \"<unknown-bundle>\"\n )\n : undefined,\n noExternal: isSetArray(\n (config.resolve as ResolveConfig)?.noExternal\n )\n ? ((config.resolve as ResolveConfig)?.noExternal ?? [])\n .filter(Boolean)\n .map(noExternal =>\n isSetString(noExternal)\n ? noExternal\n : isRegExp(noExternal)\n ? noExternal.source\n : \"<unknown-bundle>\"\n )\n : undefined\n }\n : undefined,\n plugins: isSetArray(config.plugins)\n ? (toArray(config.plugins) as ResolvedConfig[\"plugins\"])\n ?.flatMap(plugin => toArray(plugin))\n ?.map(plugin =>\n String(\n isSetString(plugin)\n ? plugin\n : isSetObject(plugin) &&\n isSetString((plugin as { name: string }).name)\n ? (plugin as { name: string }).name\n : Array.isArray(plugin) && isSetString(plugin[0])\n ? plugin[0]\n : \"<function-plugin>\"\n )\n )\n : undefined\n }).sort(([key1], [key2]) => key1.localeCompare(key2))\n ),\n null,\n 4\n )\n .replace(/\"([^\"]+)\":/g, \"$1:\")\n .replace(/,\\s*$/g, \"\");\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"format.mjs","names":[],"sources":["../../src/plugin-utils/format.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 { toArray } from \"@stryke/convert/to-array\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { isRegExp } from \"@stryke/type-checks/is-regexp\";\nimport { isSetArray } from \"@stryke/type-checks/is-set-array\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { ResolveConfig, ResolvedConfig } from \"../types/config\";\n\n/**\n * Formats a configuration object into a human-readable string, omitting certain properties and simplifying others for better readability.\n *\n * @param config - The configuration object to format.\n * @returns A formatted string representation of the configuration.\n */\nexport function formatConfig(config: Record<string, any>): string {\n return JSON.stringify(\n Object.fromEntries(\n Object.entries({\n ...omit(config, [\n \"deps\",\n \"resolve\",\n \"plugins\",\n \"initialConfig\",\n \"userConfig\",\n \"inlineConfig\",\n \"pluginConfig\",\n \"environmentConfig\"\n ]),\n deps: isSetObject(config.deps)\n ? {\n alwaysBundle: isSetArray(\n (config.deps as { alwaysBundle?: unknown[] })?.alwaysBundle\n )\n ? (\n (config.deps as { alwaysBundle?: unknown[] })\n ?.alwaysBundle ?? []\n )\n .filter(Boolean)\n .map(alwaysBundle =>\n isSetString(alwaysBundle)\n ? alwaysBundle\n : isRegExp(alwaysBundle)\n ? alwaysBundle.source\n : \"<unknown-bundle>\"\n )\n : undefined,\n onlyBundle: isSetArray(\n (config.deps as { onlyBundle?: unknown[] })?.onlyBundle\n )\n ? (\n (config.deps as { onlyBundle?: unknown[] })?.onlyBundle ??\n []\n )\n .filter(Boolean)\n .map(onlyBundle =>\n isSetString(onlyBundle)\n ? onlyBundle\n : isRegExp(onlyBundle)\n ? onlyBundle.source\n : \"<unknown-bundle>\"\n )\n : undefined,\n neverBundle: isSetArray(\n (config.deps as { neverBundle?: unknown[] })?.neverBundle\n )\n ? (\n (config.deps as { neverBundle?: unknown[] })?.neverBundle ??\n []\n )\n .filter(Boolean)\n .map(neverBundle =>\n isSetString(neverBundle)\n ? neverBundle\n : isRegExp(neverBundle)\n ? neverBundle.source\n : \"<unknown-bundle>\"\n )\n : undefined\n }\n : undefined,\n\n resolve: isSetObject(config.resolve)\n ? {\n ...config.resolve,\n external: isSetArray((config.resolve as ResolveConfig)?.external)\n ? ((config.resolve as ResolveConfig)?.external ?? [])\n .filter(Boolean)\n .map(external =>\n isSetString(external)\n ? external\n : isRegExp(external)\n ? external.source\n : \"<unknown-bundle>\"\n )\n : undefined,\n noExternal: isSetArray(\n (config.resolve as ResolveConfig)?.noExternal\n )\n ? ((config.resolve as ResolveConfig)?.noExternal ?? [])\n .filter(Boolean)\n .map(noExternal =>\n isSetString(noExternal)\n ? noExternal\n : isRegExp(noExternal)\n ? noExternal.source\n : \"<unknown-bundle>\"\n )\n : undefined\n }\n : undefined,\n plugins: isSetArray(config.plugins)\n ? (toArray(config.plugins) as ResolvedConfig[\"plugins\"])\n ?.flatMap(plugin => toArray(plugin))\n ?.map(plugin =>\n String(\n isSetString(plugin)\n ? plugin\n : isSetObject(plugin) &&\n isSetString((plugin as { name: string }).name)\n ? (plugin as { name: string }).name\n : Array.isArray(plugin) && isSetString(plugin[0])\n ? plugin[0]\n : \"<function-plugin>\"\n )\n )\n : undefined\n }).sort(([key1], [key2]) => key1.localeCompare(key2))\n ),\n null,\n 4\n )\n .replace(/\"([^\"]+)\":/g, \"$1:\")\n .replace(/,\\s*$/g, \"\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAgB,aAAa,QAAqC;CAChE,OAAO,KAAK,UACV,OAAO,YACL,OAAO,QAAQ;EACb,GAAG,KAAK,QAAQ;GACd;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,YAAY,OAAO,IAAI,IACzB;GACE,cAAc,WACX,OAAO,MAAuC,YACjD,KAEO,OAAO,MACJ,gBAAgB,CAAC,GAEpB,OAAO,OAAO,EACd,KAAI,iBACH,YAAY,YAAY,IACpB,eACA,SAAS,YAAY,IACnB,aAAa,SACb,kBACR,IACF;GACJ,YAAY,WACT,OAAO,MAAqC,UAC/C,KAEO,OAAO,MAAqC,cAC7C,CAAC,GAEA,OAAO,OAAO,EACd,KAAI,eACH,YAAY,UAAU,IAClB,aACA,SAAS,UAAU,IACjB,WAAW,SACX,kBACR,IACF;GACJ,aAAa,WACV,OAAO,MAAsC,WAChD,KAEO,OAAO,MAAsC,eAC9C,CAAC,GAEA,OAAO,OAAO,EACd,KAAI,gBACH,YAAY,WAAW,IACnB,cACA,SAAS,WAAW,IAClB,YAAY,SACZ,kBACR,IACF;EACN,IACA;EAEJ,SAAS,YAAY,OAAO,OAAO,IAC/B;GACE,GAAG,OAAO;GACV,UAAU,WAAY,OAAO,SAA2B,QAAQ,KAC1D,OAAO,SAA2B,YAAY,CAAC,GAC9C,OAAO,OAAO,EACd,KAAI,aACH,YAAY,QAAQ,IAChB,WACA,SAAS,QAAQ,IACf,SAAS,SACT,kBACR,IACF;GACJ,YAAY,WACT,OAAO,SAA2B,UACrC,KACM,OAAO,SAA2B,cAAc,CAAC,GAChD,OAAO,OAAO,EACd,KAAI,eACH,YAAY,UAAU,IAClB,aACA,SAAS,UAAU,IACjB,WAAW,SACX,kBACR,IACF;EACN,IACA;EACJ,SAAS,WAAW,OAAO,OAAO,IAC7B,QAAQ,OAAO,OAAO,GACnB,SAAQ,WAAU,QAAQ,MAAM,CAAC,GACjC,KAAI,WACJ,OACE,YAAY,MAAM,IACd,SACA,YAAY,MAAM,KAChB,YAAa,OAA4B,IAAI,IAC5C,OAA4B,OAC7B,MAAM,QAAQ,MAAM,KAAK,YAAY,OAAO,EAAE,IAC5C,OAAO,KACP,mBACV,CACF,IACF;CACN,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,KAAK,cAAc,IAAI,CAAC,CACtD,GACA,MACA,CACF,EACG,QAAQ,eAAe,KAAK,EAC5B,QAAQ,UAAU,EAAE;AACzB"}
|
|
@@ -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_path_join = require("@stryke/path/join");
|
|
3
11
|
let node_fs = require("node:fs");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-config-path.d.mts","names":[],"sources":["../../src/plugin-utils/get-config-path.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-config-path.d.mts","names":[],"sources":["../../src/plugin-utils/get-config-path.ts"],"mappings":";;;;;;;;;;;;iBA6BgB,aAAA,CACd,OAAA,EAAS,iBAAiB;EAAK,GAAA;EAAc,IAAA;AAAA,GAC7C,IAAA"}
|
|
@@ -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 { joinPaths } from "@stryke/path/join";
|
|
2
10
|
import { existsSync } from "node:fs";
|
|
3
11
|
|