@powerlines/core 0.48.2 → 0.48.4
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/context/context.d.cts.map +1 -1
- package/dist/context/context.d.mts.map +1 -1
- package/dist/context/context.mjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/lib/config.d.cts +5 -5
- package/dist/lib/config.d.cts.map +1 -1
- package/dist/lib/config.d.mts +5 -5
- package/dist/lib/config.d.mts.map +1 -1
- package/dist/lib/config.mjs.map +1 -1
- package/dist/lib/entry.d.cts +2 -2
- package/dist/lib/entry.d.cts.map +1 -1
- package/dist/lib/entry.d.mts +2 -2
- package/dist/lib/entry.d.mts.map +1 -1
- package/dist/lib/entry.mjs.map +1 -1
- package/dist/types/config.d.cts +14 -11
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +14 -11
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.cts","names":[],"sources":["../../src/context/context.ts"],"mappings":";;;;;;;;;;;;;;;cA8Ja,iBAAA,yBACa,cAAA,GAAiB,cAAA,oCAGjC,qBAAA,CAAsB,cAAA,aACnB,OAAA,CAAQ,eAAA,EAAiB,cAAA;EAAA;
|
|
1
|
+
{"version":3,"file":"context.d.cts","names":[],"sources":["../../src/context/context.ts"],"mappings":";;;;;;;;;;;;;;;cA8Ja,iBAAA,yBACa,cAAA,GAAiB,cAAA,oCAGjC,qBAAA,CAAsB,cAAA,aACnB,OAAA,CAAQ,eAAA,EAAiB,cAAA;EAAA;EA8cE,OAAA,EAAS,gBAAA;EA5bxC,QAAA,EAAW,QAAA;EAvBU;;;EA4BrB,WAAA,EAAc,WAAA;EAvBF;;;EA4BZ,WAAA,EAAa,MAAA;EALC;;;EAUd,UAAA,EAAa,gBA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,GAAS,gBAAA,GACR,OAAA;EAiMU;;;;;;;EApKN,aAAA,CACL,IAAA,UACA,IAAA,UACA,OAAA,GAAS,gBAAA;EA0OD;;;;;;;EA5MG,WAAA,CACX,IAAA,UACA,EAAA,UACA,OAAA,GAAS,WAAA,GACR,OAAA;EAmlBK;;AAAiB;;;;;EAxjBlB,eAAA,CAAgB,IAAA,UAAc,EAAA,UAAY,OAAA,GAAS,WAAA;;;;;;;;EA2B7C,kBAAA,CACX,IAAA,UACA,EAAA,UACA,OAAA,GAAS,WAAA,GACR,OAAA;;;;;;;;EA2BI,sBAAA,CACL,IAAA,UACA,EAAA,UACA,OAAA,GAAS,WAAA;;;;;;;EA2BE,gBAAA,CAAiB,IAAA,YAAgB,OAAA;;;;;;;EAYjC,eAAA,CACX,MAAA,EAAQ,eAAA,mBACP,OAAA;;;;;;;EAsDU,eAAA,CACX,MAAA,EAAQ,eAAA,mBACP,OAAA;;;;;;YAeO,WAAA,CAAA,GAAe,eAAA;;;;;;;YA4BT,aAAA,CACd,MAAA,EAAQ,eAAA,iBACP,OAAA;;;;YAaa,aAAA,CAAA,GAAiB,OAAA;EAAA,QAgWzB,iBAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.mts","names":[],"sources":["../../src/context/context.ts"],"mappings":";;;;;;;;;;;;;;;cA8Ja,iBAAA,yBACa,cAAA,GAAiB,cAAA,oCAGjC,qBAAA,CAAsB,cAAA,aACnB,OAAA,CAAQ,eAAA,EAAiB,cAAA;EAAA;
|
|
1
|
+
{"version":3,"file":"context.d.mts","names":[],"sources":["../../src/context/context.ts"],"mappings":";;;;;;;;;;;;;;;cA8Ja,iBAAA,yBACa,cAAA,GAAiB,cAAA,oCAGjC,qBAAA,CAAsB,cAAA,aACnB,OAAA,CAAQ,eAAA,EAAiB,cAAA;EAAA;EA8cE,OAAA,EAAS,gBAAA;EA5bxC,QAAA,EAAW,QAAA;EAvBU;;;EA4BrB,WAAA,EAAc,W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AS,WAAA;EA+L9C;;;;;;;EA3JM,SAAA,CACX,IAAA,UACA,IAAA,UACA,OAAA,GAAS,gBAAA,GACR,OAAA;EAiMU;;;;;;;EApKN,aAAA,CACL,IAAA,UACA,IAAA,UACA,OAAA,GAAS,gBAAA;EA0OD;;;;;;;EA5MG,WAAA,CACX,IAAA,UACA,EAAA,UACA,OAAA,GAAS,WAAA,GACR,OAAA;EAmlBK;;AAAiB;;;;;EAxjBlB,eAAA,CAAgB,IAAA,UAAc,EAAA,UAAY,OAAA,GAAS,WAAA;;;;;;;;EA2B7C,kBAAA,CACX,IAAA,UACA,EAAA,UACA,OAAA,GAAS,WAAA,GACR,OAAA;;;;;;;;EA2BI,sBAAA,CACL,IAAA,UACA,EAAA,UACA,OAAA,GAAS,WAAA;;;;;;;EA2BE,gBAAA,CAAiB,IAAA,YAAgB,OAAA;;;;;;;EAYjC,eAAA,CACX,MAAA,EAAQ,eAAA,mBACP,OAAA;;;;;;;EAsDU,eAAA,CACX,MAAA,EAAQ,eAAA,mBACP,OAAA;;;;;;YAeO,WAAA,CAAA,GAAe,eAAA;;;;;;;YA4BT,aAAA,CACd,MAAA,EAAQ,eAAA,iBACP,OAAA;;;;YAaa,aAAA,CAAA,GAAiB,OAAA;EAAA,QAgWzB,iBAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.mjs","names":["#tsconfig","#fs","#checksum","#buildId","#releaseId","#configProxy","#parserCache","#requestCache"],"sources":["../../src/context/context.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 { EnvPaths, getEnvPaths } from \"@stryke/env/get-env-paths\";\nimport { relativeToWorkspaceRoot } from \"@stryke/fs/get-workspace-root\";\nimport { murmurhash } from \"@stryke/hash\";\nimport { hashDirectory } from \"@stryke/hash/node\";\nimport { getUnique, getUniqueBy } from \"@stryke/helpers/get-unique\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { fetchRequest } from \"@stryke/http/fetch\";\nimport { appendPath } from \"@stryke/path/append\";\nimport {\n findFileDotExtensionSafe,\n findFileExtensionSafe\n} from \"@stryke/path/file-path-fns\";\nimport { isEqual } from \"@stryke/path/is-equal\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { TypeDefinition } from \"@stryke/types/configuration\";\nimport { PackageJson } from \"@stryke/types/package-json\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport { match, tsconfigPathsToRegExp } from \"bundle-require\";\nimport { resolveCompatibilityDates } from \"compatx\";\nimport defu from \"defu\";\nimport { create, FlatCache } from \"flat-cache\";\nimport { existsSync } from \"node:fs\";\nimport { parse, ParseResult } from \"oxc-parser\";\nimport { Range } from \"semver\";\nimport {\n Agent,\n BodyInit,\n interceptors,\n RequestInfo,\n Response,\n setGlobalDispatcher\n} from \"undici\";\nimport { UnpluginBuildContext } from \"unplugin\";\nimport {\n CACHE_HASH_LENGTH,\n DEFAULT_DEVELOPMENT_LOG_LEVEL,\n DEFAULT_PRODUCTION_LOG_LEVEL,\n DEFAULT_TEST_LOG_LEVEL,\n ROOT_HASH_LENGTH\n} from \"../constants\";\nimport {\n getDefaultMode,\n loadParsedConfig,\n resolvePackageConfigs\n} from \"../lib/config\";\nimport { getConfigProps } from \"../lib/context-helpers\";\nimport {\n getUniqueInputs,\n isTypeDefinition,\n resolveInputsSync\n} from \"../lib/entry\";\nimport { callHook } from \"../lib/hooks\";\nimport { getPrefixedRootHash } from \"../lib/meta\";\nimport { createResolver } from \"../lib/resolver\";\nimport { getTsconfigFilePath } from \"../lib/typescript/tsconfig\";\nimport { VirtualFileSystem } from \"../lib/vfs\";\nimport {\n getPackageJsonOrganization,\n getWorkspaceName\n} from \"../plugin-utils/context-helpers\";\nimport { formatConfig } from \"../plugin-utils/format\";\nimport { isDuplicate, isPlugin } from \"../plugin-utils/helpers\";\nimport { createLogger, resolveLogLevel } from \"../plugin-utils/logging\";\nimport { mergeConfig } from \"../plugin-utils/merge\";\nimport { replacePathTokens } from \"../plugin-utils/paths\";\nimport {\n CopyConfig,\n ExecutionOptions,\n FrameworkOptions,\n InferOverridableConfig,\n ParsedUserConfig,\n PluginConfig,\n ResolvedAssetGlob,\n ResolvedConfig,\n ResolvedCopyConfig,\n ResolvedEntryTypeDefinition,\n ResolvedOutputConfig\n} from \"../types/config\";\nimport {\n Context,\n EmitEntryOptions,\n EmitOptions,\n EnvironmentContext,\n ExecutionContext,\n FetchOptions,\n MetaInfo,\n ParseOptions,\n PluginContext,\n Resolver,\n ResolveResult,\n TransformResult\n} from \"../types/context\";\nimport {\n ResolveOptions,\n VirtualFile,\n VirtualFileSystemInterface\n} from \"../types/fs\";\nimport {\n CallHookOptions,\n InferHookParameters,\n InferHookReturnType\n} from \"../types/hooks\";\nimport {\n Logger,\n LoggerOptions,\n LogLevelResolvedConfig\n} from \"../types/logging\";\nimport { ParsedTypeScriptConfig } from \"../types/tsconfig\";\nimport { PowerlinesBaseContext } from \"./base-context\";\n\nconst agent = new Agent({ keepAliveTimeout: 10000 });\nsetGlobalDispatcher(\n agent.compose(\n interceptors.retry({\n maxRetries: 3,\n minTimeout: 1000,\n maxTimeout: 10000,\n timeoutFactor: 2,\n retryAfter: true\n })\n )\n);\n\nconst UNRESOLVED_CONFIG_NAMES = [\n \"userConfig\",\n \"inlineConfig\",\n \"pluginConfig\",\n \"environmentConfig\"\n];\n\nexport class PowerlinesContext<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown\n>\n extends PowerlinesBaseContext<TSystemContext>\n implements Context<TResolvedConfig, TSystemContext>\n{\n #checksum: string | null = null;\n\n #buildId: string = uuid();\n\n #releaseId: string = uuid();\n\n #fs!: VirtualFileSystemInterface;\n\n #tsconfig!: ParsedTypeScriptConfig;\n\n #parserCache!: FlatCache;\n\n #requestCache!: FlatCache;\n\n #configProxy!: TResolvedConfig;\n\n public resolver!: Resolver;\n\n /**\n * The parsed `package.json` file for the project\n */\n public packageJson!: PackageJson;\n\n /**\n * The parsed `project.json` file for the project\n */\n public projectJson: Record<string, any> | undefined = undefined;\n\n /**\n * The parsed configuration file for the project\n */\n public configFile!: ParsedUserConfig;\n\n /**\n * An object containing the dependencies that should be installed for the project\n */\n public dependencies: Record<string, string | Range> = {};\n\n /**\n * An object containing the development dependencies that should be installed for the project\n */\n public devDependencies: Record<string, string | Range> = {};\n\n /**\n * The persisted meta information about the current build\n */\n public persistedMeta: MetaInfo | undefined = undefined;\n\n /**\n * The resolved tsconfig file paths for the project\n */\n public resolvePatterns: RegExp[] = [];\n\n /**\n * The resolved configuration for this context\n */\n protected resolvedConfig: TResolvedConfig = {} as TResolvedConfig;\n\n /**\n * The configuration options that were overridden by plugins during the build process, which may include additional properties or modifications made during the configuration loading process.\n */\n protected overriddenConfig: InferOverridableConfig<TResolvedConfig> =\n {} as InferOverridableConfig<TResolvedConfig>;\n\n /**\n * The configuration options provided inline during execution, such as CLI flags or other parameters that may be relevant to the command being executed. These options can be used to override or supplement the configuration options defined in a configuration file on disk, and are typically provided as part of the execution context when running a Powerlines command.\n */\n protected inlineConfig: TResolvedConfig[\"inlineConfig\"] =\n {} as TResolvedConfig[\"inlineConfig\"];\n\n /**\n * The configuration options read from a configuration file on disk, which may be used to resolve the final configuration for the context. This typically includes the user configuration options defined in the `powerlines.config.ts` file, as well as any inline configuration options provided during execution.\n */\n protected userConfig: TResolvedConfig[\"userConfig\"] =\n {} as TResolvedConfig[\"userConfig\"];\n\n /**\n * The configuration options provided by plugins added by the user (and other plugins)\n */\n protected pluginConfig: TResolvedConfig[\"pluginConfig\"] = {};\n\n /**\n * The configuration options provided by the environment\n */\n protected environmentConfig: any = {};\n\n /**\n * The resolved entry type definitions for the project\n */\n public get entry(): ResolvedEntryTypeDefinition[] {\n const entry = this.resolvedEntry;\n\n return resolveInputsSync(\n this,\n entry && entry.length > 0\n ? entry\n : Array.isArray(this.config.input) ||\n (isSetObject(this.config.input) &&\n !isTypeDefinition(this.config.input))\n ? this.config.input\n : toArray(this.config.input).flat()\n );\n }\n\n /**\n * The TypeScript configuration parsed from the tsconfig file\n */\n public get tsconfig(): ParsedTypeScriptConfig {\n if (!this.#tsconfig) {\n this.tsconfig = {\n tsconfigFilePath: this.config.tsconfig\n } as ParsedTypeScriptConfig;\n }\n\n return this.#tsconfig;\n }\n\n /**\n * Sets the TypeScript configuration parsed from the tsconfig file\n */\n public set tsconfig(value: ParsedTypeScriptConfig) {\n this.#tsconfig = value;\n this.resolvePatterns = tsconfigPathsToRegExp(value?.options?.paths ?? {});\n }\n\n /**\n * The virtual file system interface for the project\n */\n public get fs(): VirtualFileSystemInterface {\n if (!this.#fs) {\n this.#fs = VirtualFileSystem.createSync(this);\n }\n\n return this.#fs;\n }\n\n /**\n * Get the checksum of the project's current state\n */\n public get checksum(): string | null {\n return this.#checksum;\n }\n\n /**\n * Invokes the configured plugin hooks\n *\n * @remarks\n * By default, it will call the `\"pre\"`, `\"normal\"`, and `\"post\"` ordered hooks in sequence\n *\n * @param hook - The hook to call\n * @param options - The options to provide to the hook\n * @param args - The arguments to pass to the hook\n * @returns The result of the hook call\n */\n public callHook = async <TKey extends string>(\n hook: TKey,\n options: CallHookOptions & {\n environment?: string | EnvironmentContext<any>;\n },\n ...args: InferHookParameters<PluginContext<any>, TKey>\n ): Promise<InferHookReturnType<PluginContext<any>, TKey> | undefined> =>\n callHook<TKey, TResolvedConfig>(\n this as unknown as ExecutionContext<TResolvedConfig>,\n hook,\n options,\n ...args\n );\n\n /**\n * The meta information about the current build\n */\n public get meta() {\n return {\n executionId: this.#buildId,\n releaseId: this.#releaseId,\n checksum: this.#checksum,\n timestamp: this.timestamp,\n rootHash: murmurhash(\n {\n workspaceRoot: this.config?.cwd,\n root: this.config?.root\n },\n {\n maxLength: ROOT_HASH_LENGTH\n }\n ),\n configHash: murmurhash(this.config, {\n maxLength: CACHE_HASH_LENGTH\n })\n } as MetaInfo;\n }\n\n /**\n * The resolved configuration options\n */\n public get config(): TResolvedConfig {\n if (!this.#configProxy) {\n this.#configProxy = this.createConfigProxy();\n }\n\n return this.#configProxy;\n }\n\n /**\n * Get the path to the artifacts directory for the project\n */\n public get artifactsPath(): string {\n return joinPaths(\n this.config.cwd,\n this.config.root,\n this.config.output?.artifactsPath ||\n `.${this.config.framework?.name || \"powerlines\"}`\n );\n }\n\n /**\n * Get the path to the builtin modules used by the project\n */\n public get builtinsPath(): string {\n return joinPaths(this.artifactsPath, \"builtins\");\n }\n\n /**\n * Get the path to the entry directory for the project\n */\n public get entryPath(): string {\n return joinPaths(this.artifactsPath, \"entry\");\n }\n\n /**\n * Get the path to the infrastructure modules used by the project\n */\n public get infrastructurePath(): string {\n return joinPaths(this.artifactsPath, \"infrastructure\");\n }\n\n /**\n * Get the path to the data directory for the project\n */\n public get dataPath(): string {\n return joinPaths(\n this.envPaths.data,\n \"projects\",\n getPrefixedRootHash(this.config.name, this.meta.rootHash)\n );\n }\n\n /**\n * Get the path to the cache directory for the project\n */\n public get cachePath(): string {\n return joinPaths(\n this.envPaths.cache,\n \"projects\",\n murmurhash(\n {\n checksum: this.#checksum,\n config: this.meta.configHash\n },\n {\n maxLength: CACHE_HASH_LENGTH\n }\n )\n );\n }\n\n /**\n * Get the path to the generated declaration file for the project\n */\n public get typesPath(): string {\n return this.config.output.types\n ? appendPath(this.config.output.types, this.config.cwd)\n : joinPaths(this.config.cwd, this.config.root, \"powerlines.d.ts\");\n }\n\n /**\n * Get the project root relative to the workspace root\n */\n public get relativeToWorkspaceRoot() {\n return relativeToWorkspaceRoot(this.config.root);\n }\n\n /**\n * The builtin module id that exist in the Powerlines virtual file system\n */\n public get builtins(): string[] {\n return Object.values(this.fs.metadata)\n .filter(meta => meta && meta.type === \"builtin\")\n .map(meta => meta?.id)\n .filter(Boolean);\n }\n\n /**\n * Additional arguments provided during execution of the command, such as CLI flags or other parameters that may be relevant to the command being executed.\n */\n public get additionalArgs(): Record<string, string | string[]> {\n return Object.entries(this.config.inlineConfig.additionalArgs ?? {}).reduce(\n (ret, [key, value]) => {\n const formattedKey = key.replace(/^--?/, \"\");\n\n if (ret[formattedKey]) {\n if (Array.isArray(ret[formattedKey])) {\n if (Array.isArray(value)) {\n ret[formattedKey] = [...toArray(ret[formattedKey]), ...value];\n } else {\n ret[formattedKey] = [...toArray(ret[formattedKey]), value];\n }\n } else {\n ret[formattedKey] = [\n ret[formattedKey],\n ...(Array.isArray(value) ? value : [value])\n ];\n }\n } else {\n ret[formattedKey] = value;\n }\n return ret;\n },\n {} as Record<string, string | string[]>\n );\n }\n\n /**\n * The alias mappings for the project used during module resolution\n *\n * @remarks\n * This includes both the built-in module aliases as well as any custom aliases defined in the build configuration.\n */\n public get alias(): Record<string, string> {\n return this.builtins.reduce(\n (ret, id) => {\n const moduleId = `${\n this.config?.framework?.name || \"powerlines\"\n }:${id.replace(/^.*:/, \"\")}`;\n if (!ret[moduleId]) {\n const path = this.fs.paths[id];\n if (path) {\n ret[moduleId] = path;\n }\n }\n\n return ret;\n },\n this.config.resolve.alias\n ? Array.isArray(this.config.resolve.alias)\n ? this.config.resolve.alias.reduce(\n (ret, alias) => {\n if (!ret[alias.find.toString()]) {\n ret[alias.find.toString()] = alias.replacement;\n }\n\n return ret;\n },\n {} as Record<string, string>\n )\n : this.config.resolve.alias\n : {}\n );\n }\n\n public override get logger(): Logger {\n return this.createLogger();\n }\n\n /**\n * The log level for the context, which determines the minimum level of log messages that will be emitted by the logger. This is resolved based on the configuration options provided by the user, and can be set to different levels for development, production, and test environments. The log level can also be overridden by plugins or other parts of the build process to provide more granular control over logging output.\n */\n public get logLevel(): LogLevelResolvedConfig {\n return resolveLogLevel(this.config.logLevel, this.config.mode);\n }\n\n /**\n * The environment paths for the project, which provide the locations of various directories and files used by the Powerlines framework. These paths are resolved based on the organization ID, application ID, and workspace root directory, and can be used to access configuration files, cache directories, and other resources in a consistent manner.\n */\n public override get envPaths(): EnvPaths {\n return getEnvPaths({\n orgId: kebabCase(this.config.framework?.orgId || \"storm-software\"),\n appId: kebabCase(this.config.framework?.name || \"powerlines\"),\n workspaceRoot: this.config.cwd\n });\n }\n\n /**\n * Gets the parser cache.\n */\n protected get parserCache(): FlatCache {\n if (!this.#parserCache) {\n this.#parserCache = create({\n cacheId: \"parser\",\n cacheDir: this.cachePath,\n ttl: 2 * 60 * 60 * 1000,\n lruSize: 5000,\n persistInterval: 250\n });\n }\n\n return this.#parserCache;\n }\n\n /**\n * Gets the request cache.\n */\n protected get requestCache(): FlatCache {\n if (!this.#requestCache) {\n this.#requestCache = create({\n cacheId: \"http\",\n cacheDir: this.cachePath,\n ttl: 6 * 60 * 60 * 1000,\n lruSize: 5000,\n persistInterval: 250\n });\n }\n\n return this.#requestCache;\n }\n\n /**\n * The entry points that exist in the Powerlines virtual file system\n */\n protected get resolvedEntry(): ResolvedEntryTypeDefinition[] {\n return Object.entries(this.fs.metadata)\n .filter(([, meta]) => meta && meta.type === \"entry\")\n .map(([path, meta]) => {\n const typeDefinition = {\n file: path\n } as ResolvedEntryTypeDefinition;\n\n if (meta.properties) {\n if (isSetString(meta.properties.file)) {\n typeDefinition.file = meta.properties.file;\n }\n if (isSetString(meta.properties.name)) {\n typeDefinition.name = meta.properties.name;\n }\n if (\n isSetString(meta.properties[\"input.file\"]) ||\n isSetString(meta.properties[\"input.name\"])\n ) {\n typeDefinition.input ??= {} as TypeDefinition;\n if (isSetString(meta.properties[\"input.file\"])) {\n typeDefinition.input.file = meta.properties[\"input.file\"];\n }\n if (isSetString(meta.properties[\"input.name\"])) {\n typeDefinition.input.name = meta.properties[\"input.name\"];\n }\n }\n if (isSetString(meta.properties.output)) {\n typeDefinition.output = meta.properties.output;\n }\n }\n\n return typeDefinition;\n })\n .filter(Boolean);\n }\n\n /**\n * Creates a new Context instance.\n *\n * @param options - The options to use for creating the context, including the resolved configuration and workspace settings.\n */\n protected constructor(public override options: ExecutionOptions) {\n super(options);\n }\n\n public override createLogger(options: LoggerOptions = {}) {\n return createLogger(\n this.config.name || this.options.root,\n {\n logLevel: this.logLevel,\n ...options\n },\n this.options.logFn\n );\n }\n\n /**\n * A function to perform HTTP fetch requests\n *\n * @remarks\n * This function uses a caching layer to avoid duplicate requests during the Powerlines process.\n *\n * @example\n * ```ts\n * const response = await context.fetch(\"https://api.example.com/data\");\n * const data = await response.json();\n * ```\n *\n * @see https://github.com/nodejs/undici\n *\n * @param input - The URL to fetch.\n * @param options - The fetch request options.\n * @returns A promise that resolves to a response returned by the fetch.\n */\n public async fetch(\n input: RequestInfo,\n options: FetchOptions = {}\n ): Promise<Response> {\n const cacheKey = murmurhash({\n input: input.toString(),\n options: JSON.stringify(options)\n });\n\n if (!this.config.skipCache && !options.skipCache) {\n const cached = this.requestCache.get<\n {\n body: BodyInit;\n } & Pick<Response, \"status\" | \"statusText\" | \"headers\">\n >(cacheKey);\n if (cached) {\n return new Response(cached.body, {\n status: cached.status,\n statusText: cached.statusText,\n headers: cached.headers\n });\n }\n }\n\n const logger = this.extendLogger({ category: \"communication\" });\n const startTime = Date.now();\n\n logger.trace(\n `Sending fetch request (${\n options.method?.toUpperCase() || \"GET\"\n }): ${input.toString()}`\n );\n\n const response = await fetchRequest(input, { timeout: 12_000, ...options });\n const result = {\n body: await response.text(),\n status: response.status,\n statusText: response.statusText,\n headers: Object.fromEntries(response.headers.entries())\n };\n\n if (!this.config.skipCache && !options.skipCache) {\n try {\n this.requestCache.set(cacheKey, result);\n } catch {\n // Do nothing\n }\n }\n\n logger.trace(\n `Fetch request (${\n options.method?.toUpperCase() || \"GET\"\n }) completed in ${Date.now() - startTime}ms: ${input.toString()} - ${\n response.status\n } / ${response.statusText} \\n - Response Headers: ${JSON.stringify(\n result.headers\n )}\\n - Response Body: ${\n typeof result.body === \"string\"\n ? result.body.length > 1000\n ? `${result.body.slice(0, 1000)}... (truncated, total length: ${\n result.body.length\n })`\n : result.body\n : \"[Non-string body]\"\n }`\n );\n\n return new Response(result.body, {\n status: result.status,\n statusText: result.statusText,\n headers: result.headers\n });\n }\n\n /**\n * Parse code using [Oxc-Parser](https://github.com/oxc/oxc) into an (ESTree-compatible)[https://github.com/estree/estree] AST object.\n *\n * @remarks\n * This function can be used to parse TypeScript code into an AST for further analysis or transformation.\n *\n * @example\n * ```ts\n * const ast = context.parse(\"const x: number = 42;\");\n * ```\n *\n * @see https://rollupjs.org/plugin-development/#this-parse\n * @see https://github.com/oxc/oxc\n *\n * @param code - The source code to parse.\n * @param options - The options to pass to the parser.\n * @returns An (ESTree-compatible)[https://github.com/estree/estree] AST object.\n */\n public async parse(code: string, options: ParseOptions = {}) {\n const cacheKey = murmurhash({\n code,\n options\n });\n\n let result!: ParseResult;\n if (!this.config.skipCache) {\n result = this.parserCache.get<ParseResult>(cacheKey);\n if (result) {\n return result;\n }\n }\n\n result = await parse(`source.${options.lang || \"ts\"}`, code, {\n ...options,\n sourceType: \"module\",\n showSemanticErrors: this.config.mode === \"development\"\n });\n\n if (!this.config.skipCache) {\n this.parserCache.set(cacheKey, result);\n }\n\n return result;\n }\n\n /**\n * A helper function to resolve modules in the Virtual File System\n *\n * @remarks\n * This function can be used to resolve modules relative to the project root directory.\n *\n * @example\n * ```ts\n * const resolved = await context.resolve(\"some-module\", \"/path/to/importer\");\n * ```\n *\n * @param id - The module to resolve.\n * @param importer - An optional path to the importer module.\n * @param options - Additional resolution options.\n * @returns A promise that resolves to the resolved module path.\n */\n public async resolve(\n id: string,\n importer?: string,\n options: ResolveOptions = {}\n ): Promise<ResolveResult | undefined> {\n let moduleId = id;\n if (this.config.resolve.alias) {\n if (Array.isArray(this.config.resolve.alias)) {\n const alias = this.config.resolve.alias.find(a =>\n match(moduleId, [a.find])\n );\n if (alias) {\n moduleId = alias.replacement;\n }\n } else if (\n isSetObject(this.config.resolve.alias) &&\n this.config.resolve.alias[id]\n ) {\n moduleId = this.config.resolve.alias[id];\n }\n }\n\n if (\n this.fs.isResolvableId(moduleId) ||\n (importer && this.fs.isResolvableId(importer))\n ) {\n let resolvedImporter = importer;\n if (importer && this.fs.isResolvableId(importer)) {\n resolvedImporter = await this.fs.resolve(\n importer,\n undefined,\n defu(\n {\n conditions: this.config.resolve.conditions,\n extensions: this.config.resolve.extensions\n },\n options\n )\n );\n }\n\n const result = await this.fs.resolve(\n moduleId,\n resolvedImporter,\n defu(\n {\n conditions: this.config.resolve.conditions,\n extensions: this.config.resolve.extensions\n },\n options\n )\n );\n if (!result) {\n return undefined;\n }\n\n const external = Boolean(\n !match(moduleId, this.config.resolve.noExternal) &&\n (match(moduleId, this.config.resolve.external) ||\n moduleId.startsWith(\"node:\") ||\n ((!this.fs.isVirtual(moduleId, importer, options) ||\n (this.fs.isVirtual(moduleId, importer, options) &&\n this.config.projectType !== \"application\")) &&\n this.config.resolve.skipNodeModulesBundle &&\n !/^[A-Z]:[/\\\\]|^\\.{0,2}\\/|^\\.{1,2}$/.test(moduleId)))\n );\n\n return {\n id: result,\n external,\n virtual: !external\n };\n }\n\n if (this.config.resolve.skipNodeModulesBundle) {\n if (\n match(moduleId, this.resolvePatterns) ||\n match(moduleId, this.config.resolve.noExternal)\n ) {\n return undefined;\n }\n\n if (\n match(moduleId, this.config.resolve.external) ||\n moduleId.startsWith(\"node:\")\n ) {\n return { id: moduleId, external: true, virtual: false };\n }\n\n // Exclude any other import that looks like a Node module\n if (!/^[A-Z]:[/\\\\]|^\\.{0,2}\\/|^\\.{1,2}$/.test(moduleId)) {\n return {\n id: moduleId,\n external: true,\n virtual: false\n };\n }\n } else {\n if (match(moduleId, this.config.resolve.noExternal)) {\n return undefined;\n }\n\n if (\n match(moduleId, this.config.resolve.external) ||\n moduleId.startsWith(\"node:\")\n ) {\n return { id: moduleId, external: true, virtual: false };\n }\n }\n\n return undefined;\n }\n\n /**\n * A helper function to load modules from the Virtual File System\n *\n * @remarks\n * This function can be used to load modules relative to the project root directory.\n *\n * @example\n * ```ts\n * const module = await context.load(\"some-module\", \"/path/to/importer\");\n * ```\n *\n * @param id - The module to load.\n * @returns A promise that resolves to the loaded module.\n */\n public async load(id: string): Promise<TransformResult | undefined> {\n const resolvedId = await this.fs.resolve(id);\n if (!resolvedId) {\n return undefined;\n }\n\n const code = await this.fs.read(resolvedId);\n if (!code) {\n return undefined;\n }\n\n return { code, map: null };\n }\n\n /**\n * Get the builtin virtual files that exist in the Powerlines virtual file system\n */\n public async getBuiltins() {\n return Promise.all(\n Object.entries(this.fs.metadata)\n .filter(([, meta]) => meta && meta.type === \"builtin\")\n .map(async ([id, meta]) => {\n const code = await this.fs.read(id);\n const path = this.fs.paths[id];\n\n return { ...meta, path, code } as VirtualFile;\n })\n );\n }\n\n /**\n * Resolves a file and writes it to the VFS if it does not already exist\n *\n * @param code - The source code of the file\n * @param path - The path to write the file to\n * @param options - Additional options for writing the file\n */\n public async emit(\n code: string,\n path: string,\n options: EmitOptions = {}\n ): Promise<void> {\n const filePath = options.extension\n ? findFileExtensionSafe(path)\n ? options.extension.startsWith(\".\")\n ? path.replace(findFileDotExtensionSafe(path), options.extension)\n : path.replace(findFileExtensionSafe(path), options.extension)\n : options.extension.startsWith(\".\")\n ? `${path}${options.extension}`\n : `${path}.${options.extension}`\n : findFileExtensionSafe(path)\n ? path\n : `${path}.ts`;\n\n if (\n isFunction((this as unknown as UnpluginBuildContext).emitFile) &&\n options.emitWithBundler\n ) {\n return (this as unknown as UnpluginBuildContext).emitFile({\n needsCodeReference: options.needsCodeReference,\n originalFileName: options.originalFileName,\n fileName: filePath,\n source: code,\n type: \"asset\"\n });\n }\n\n return this.fs.write(filePath, code, options);\n }\n\n /**\n * Synchronously resolves a file and writes it to the VFS if it does not already exist\n *\n * @param code - The source code of the file\n * @param path - The path to write the file to\n * @param options - Additional options for writing the file\n */\n public emitSync(code: string, path: string, options: EmitOptions = {}) {\n const filePath = options.extension\n ? findFileExtensionSafe(path)\n ? options.extension.startsWith(\".\")\n ? path.replace(findFileDotExtensionSafe(path), options.extension)\n : path.replace(findFileExtensionSafe(path), options.extension)\n : options.extension.startsWith(\".\")\n ? `${path}${options.extension}`\n : `${path}.${options.extension}`\n : findFileExtensionSafe(path)\n ? path\n : `${path}.ts`;\n\n if (\n isFunction((this as unknown as UnpluginBuildContext).emitFile) &&\n options.emitWithBundler\n ) {\n return (this as unknown as UnpluginBuildContext).emitFile({\n needsCodeReference: options.needsCodeReference,\n originalFileName: options.originalFileName,\n fileName: filePath,\n source: code,\n type: \"asset\"\n });\n }\n\n return this.fs.writeSync(filePath, code, options);\n }\n\n /**\n * Resolves a entry virtual file and writes it to the VFS if it does not already exist\n *\n * @param code - The source code of the entry file\n * @param path - A path to write the entry file to\n * @param options - Optional write file options\n */\n public async emitEntry(\n code: string,\n path: string,\n options: EmitEntryOptions = {}\n ): Promise<void> {\n return this.emit(\n code,\n appendPath(path, this.entryPath),\n defu(\n {\n meta: {\n type: \"entry\",\n properties: {\n file: appendPath(path, this.entryPath),\n name: options?.name,\n output: options?.output,\n \"input.file\": options?.input?.file,\n \"input.name\": options?.input?.name\n }\n }\n },\n omit(options, [\"name\"])\n )\n );\n }\n\n /**\n * Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist\n *\n * @param code - The source code of the entry file\n * @param path - A path to write the entry file to\n * @param options - Optional write file options\n */\n public emitEntrySync(\n code: string,\n path: string,\n options: EmitEntryOptions = {}\n ): void {\n return this.emitSync(\n code,\n appendPath(path, this.entryPath),\n defu(\n {\n meta: {\n type: \"entry\",\n properties: {\n file: appendPath(path, this.entryPath),\n name: options?.name,\n output: options?.output,\n \"input.file\": options?.input?.file,\n \"input.name\": options?.input?.name\n }\n }\n },\n omit(options, [\"name\"])\n )\n );\n }\n\n /**\n * Resolves a builtin virtual file and writes it to the VFS if it does not already exist\n *\n * @param code - The source code of the builtin file\n * @param id - The unique identifier of the builtin file\n * @param options - Optional write file options\n */\n public async emitBuiltin(\n code: string,\n id: string,\n options: EmitOptions = {}\n ): Promise<void> {\n if (!this.builtinsPath) {\n throw new Error(\n `The builtins path is not set. Cannot emit builtin file with id \"${id}\".`\n );\n }\n\n if (!isSetString(id)) {\n throw new Error(\n `The builtin id must be a non-empty string. Received: ${String(id)}`\n );\n }\n\n return this.emit(\n code,\n appendPath(id, this.builtinsPath),\n defu(options, { meta: { type: \"builtin\", id } })\n );\n }\n\n /**\n * Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist\n *\n * @param code - The source code of the builtin file\n * @param id - The unique identifier of the builtin file\n * @param options - Optional write file options\n */\n public emitBuiltinSync(code: string, id: string, options: EmitOptions = {}) {\n if (!this.builtinsPath) {\n throw new Error(\n `The builtins path is not set. Cannot emit builtin file with id \"${id}\".`\n );\n }\n\n if (!isSetString(id)) {\n throw new Error(\n `The builtin id must be a non-empty string. Received: ${String(id)}`\n );\n }\n\n return this.emitSync(\n code,\n appendPath(id, this.builtinsPath),\n defu(options, { meta: { type: \"builtin\", id } })\n );\n }\n\n /**\n * Resolves a builtin virtual file and writes it to the VFS if it does not already exist\n *\n * @param code - The source code of the builtin file\n * @param id - The unique identifier of the builtin file\n * @param options - Optional write file options\n */\n public async emitInfrastructure(\n code: string,\n id: string,\n options: EmitOptions = {}\n ): Promise<void> {\n if (!this.infrastructurePath) {\n throw new Error(\n `The infrastructure path is not set. Cannot emit infrastructure file with id \"${id}\".`\n );\n }\n\n if (!isSetString(id)) {\n throw new Error(\n `The infrastructure id must be a non-empty string. Received: ${String(id)}`\n );\n }\n\n return this.emit(\n code,\n appendPath(id, this.infrastructurePath),\n defu(options, { meta: { type: \"infrastructure\", id } })\n );\n }\n\n /**\n * Synchronously resolves an infrastructure virtual file and writes it to the VFS if it does not already exist\n *\n * @param code - The source code of the infrastructure file\n * @param id - The unique identifier of the infrastructure file\n * @param options - Optional write file options\n */\n public emitInfrastructureSync(\n code: string,\n id: string,\n options: EmitOptions = {}\n ) {\n if (!this.infrastructurePath) {\n throw new Error(\n `The infrastructure path is not set. Cannot emit infrastructure file with id \"${id}\".`\n );\n }\n\n if (!isSetString(id)) {\n throw new Error(\n `The infrastructure id must be a non-empty string. Received: ${String(id)}`\n );\n }\n\n return this.emitSync(\n code,\n appendPath(id, this.infrastructurePath),\n defu(options, { meta: { type: \"infrastructure\", id } })\n );\n }\n\n /**\n * Generates a checksum representing the current context state\n *\n * @param path - The root directory of the project to generate the checksum for\n * @returns A promise that resolves to a string representing the checksum\n */\n public async generateChecksum(path?: string): Promise<string> {\n return hashDirectory(\n path || appendPath(this.options.root, this.options.cwd)\n );\n }\n\n /**\n * A setter function to populate the inline config values provided during execution of the command, such as CLI flags or other parameters that may be relevant to the command being executed. This function can be used to update the context with the inline configuration values, which may be used during the configuration resolution process to ensure that the final configuration reflects both the user configuration and any inline configuration provided during execution.\n *\n * @param config - The inline configuration values to set.\n * @returns A promise that resolves when the inline configuration values have been set.\n */\n public async setInlineConfig(\n config: TResolvedConfig[\"inlineConfig\"]\n ): Promise<void> {\n this.logger.debug({\n meta: { category: \"config\" },\n message: `Updating inline configuration object: \\n${formatConfig(config)}`\n });\n\n this.inlineConfig = config;\n this.#checksum = await this.generateChecksum();\n\n this.configFile = await loadParsedConfig(\n this.options.cwd,\n this.options.root,\n this.options.framework?.name || \"powerlines\",\n this.options.framework?.orgId || \"storm-software\",\n config\n );\n\n const result =\n this.configFile.config &&\n toArray(this.configFile.config).length > this.options.configIndex\n ? toArray(this.configFile.config)[this.options.configIndex]!\n : this.configFile.config;\n if (!result) {\n this.logger.warn(\n `No configuration found in ${\n this.options.configFile\n } for execution index ${this.options.configIndex}.`\n );\n } else {\n await this.setUserConfig(\n (isFunction(result)\n ? await Promise.resolve(\n result({\n cwd: this.cwd,\n root: this.options.root,\n mode:\n this.inlineConfig.mode ||\n (await getDefaultMode(this.cwd, this.options.root)),\n command: this.inlineConfig.command\n })\n )\n : result) as TResolvedConfig[\"userConfig\"]\n );\n }\n\n await this.resolveConfig();\n }\n\n /**\n * A setter function to populate the plugin config values provided during execution of the command, such as CLI flags or other parameters that may be relevant to the command being executed. This function can be used to update the context with the plugin configuration values, which may be used during the configuration resolution process to ensure that the final configuration reflects both the user configuration and any plugin configuration provided during execution.\n *\n * @param config - The plugin configuration values to set.\n * @returns A promise that resolves when the plugin configuration values have been set.\n */\n public async setPluginConfig(\n config: TResolvedConfig[\"pluginConfig\"]\n ): Promise<void> {\n this.logger.debug({\n meta: { category: \"config\" },\n message: `Updating plugin configuration object: \\n${formatConfig(config)}`\n });\n\n this.pluginConfig = config;\n await this.resolveConfig();\n }\n\n /**\n * A function to merge the various configuration objects (initial, user, inline, and plugin) into a single resolved configuration object that can be used throughout the Powerlines process. This function takes into account the different sources of configuration and their respective priorities, ensuring that the final configuration reflects the intended settings for the project. The merged configuration is then returned as a new object that can be accessed through the `config` property of the context.\n *\n * @returns The merged configuration object that combines the initial, user, inline, and plugin configurations.\n */\n protected mergeConfig(): TResolvedConfig {\n return mergeConfig(\n {\n inlineConfig: this.inlineConfig,\n userConfig: this.userConfig,\n pluginConfig: this.pluginConfig,\n environmentConfig: this.environmentConfig\n },\n getConfigProps<TResolvedConfig>(this.overriddenConfig),\n this.options,\n getConfigProps<TResolvedConfig>(this.inlineConfig),\n getConfigProps<TResolvedConfig>(this.userConfig),\n getConfigProps<TResolvedConfig>(this.pluginConfig),\n {\n version: this.packageJson?.version,\n description: this.packageJson?.description,\n environments: {},\n resolve: {}\n }\n ) as TResolvedConfig;\n }\n\n /**\n * A setter function to populate the user config values provided during execution of the command, such as CLI flags or other parameters that may be relevant to the command being executed. This function can be used to update the context with the user configuration values, which may be used during the configuration resolution process to ensure that the final configuration reflects both the user configuration and any inline configuration provided during execution.\n *\n * @param config - The user configuration values to set.\n * @returns A promise that resolves when the user configuration values have been set.\n */\n protected async setUserConfig(\n config: TResolvedConfig[\"userConfig\"]\n ): Promise<void> {\n this.logger.debug({\n meta: { category: \"config\" },\n message: `Updating user configuration object: \\n${formatConfig(config)}`\n });\n\n this.userConfig = config;\n await this.resolveConfig();\n }\n\n /**\n * Initialize the context with the provided configuration options\n */\n protected async resolveConfig(): Promise<void> {\n const mergedConfig = this.mergeConfig();\n\n this.logger.trace({\n meta: { category: \"config\" },\n message: `Pre-setup Powerlines configuration object: \\n --- Merged Config --- \\n${formatConfig(\n mergedConfig\n )} \\n\\n --- User Config --- \\n${formatConfig(\n this.userConfig\n )} \\n\\n --- Inline Config --- \\n${formatConfig(\n this.inlineConfig\n )} \\n\\n --- Plugin Config --- \\n${formatConfig(\n this.pluginConfig\n )} \\n\\n --- Environment Config --- \\n${formatConfig(\n this.environmentConfig\n )} \\n\\n --- Overridden Config --- \\n${formatConfig(\n this.overriddenConfig\n )}`\n });\n\n mergedConfig.output = defu(mergedConfig.output ?? {}, {\n copy: {\n assets: [\n {\n glob: \"LICENSE\"\n },\n {\n input: mergedConfig.root,\n glob: \"*.md\"\n },\n {\n input: mergedConfig.root,\n glob: \"package.json\"\n }\n ]\n },\n dts: true\n }) as ResolvedOutputConfig;\n\n if (isUndefined(mergedConfig.mode)) {\n mergedConfig.mode = await getDefaultMode(this.cwd, mergedConfig.root);\n }\n\n if (\n isUndefined(mergedConfig.framework) ||\n !isSetString(mergedConfig.framework.name)\n ) {\n mergedConfig.framework ??= {} as FrameworkOptions;\n mergedConfig.framework.name ??=\n (await getWorkspaceName(this)) || \"powerlines\";\n }\n\n if (isUndefined(mergedConfig.platform)) {\n mergedConfig.platform = \"neutral\";\n }\n\n mergedConfig.compatibilityDate = resolveCompatibilityDates(\n mergedConfig.compatibilityDate,\n \"latest\"\n );\n\n if (\n (!this.packageJson &&\n existsSync(\n joinPaths(\n appendPath(mergedConfig.root, mergedConfig.cwd),\n \"package.json\"\n )\n )) ||\n (!this.projectJson &&\n existsSync(\n joinPaths(\n appendPath(mergedConfig.root, mergedConfig.cwd),\n \"project.json\"\n )\n ))\n ) {\n const result = await resolvePackageConfigs(\n mergedConfig.cwd,\n mergedConfig.root\n );\n if (result) {\n if (result.packageJson) {\n this.packageJson = result.packageJson;\n }\n if (result.projectJson) {\n this.projectJson = result.projectJson;\n }\n\n if (this.packageJson) {\n mergedConfig.framework ??= {} as FrameworkOptions;\n mergedConfig.framework.name ??=\n (await getWorkspaceName(this)) || \"powerlines\";\n mergedConfig.framework.orgId ??=\n getPackageJsonOrganization(this.packageJson) || \"storm-software\";\n }\n }\n }\n\n if (isUndefined(mergedConfig.projectType)) {\n mergedConfig.projectType = this.projectJson?.projectType || \"application\";\n }\n\n this.resolvedConfig = mergedConfig;\n this.#configProxy = this.createConfigProxy();\n\n mergedConfig.input = getUniqueInputs(mergedConfig.input);\n\n if (\n mergedConfig.name?.startsWith(\"@\") &&\n mergedConfig.name.split(\"/\").filter(Boolean).length > 1\n ) {\n mergedConfig.name = mergedConfig.name.split(\"/\").filter(Boolean)[1]!;\n }\n\n mergedConfig.title ??= titleCase(mergedConfig.name);\n\n if (mergedConfig.resolve.external) {\n mergedConfig.resolve.external = getUnique(mergedConfig.resolve.external);\n }\n if (mergedConfig.resolve.noExternal) {\n mergedConfig.resolve.noExternal = getUnique(\n mergedConfig.resolve.noExternal\n );\n }\n\n mergedConfig.plugins = (mergedConfig.plugins ?? [])\n .flatMap(plugin => toArray(plugin))\n .filter(Boolean)\n .reduce((ret, plugin) => {\n if (\n isPlugin(plugin) &&\n isDuplicate(\n plugin,\n ret.filter(p => isPlugin(p))\n )\n ) {\n return ret;\n }\n\n ret.push(plugin);\n\n return ret;\n }, [] as PluginConfig[]);\n\n if (isUndefined(mergedConfig.logLevel)) {\n if (mergedConfig.mode === \"development\") {\n mergedConfig.logLevel = DEFAULT_DEVELOPMENT_LOG_LEVEL;\n } else if (mergedConfig.mode === \"test\") {\n mergedConfig.logLevel = DEFAULT_TEST_LOG_LEVEL;\n } else {\n mergedConfig.logLevel = DEFAULT_PRODUCTION_LOG_LEVEL;\n }\n }\n\n mergedConfig.logLevel = resolveLogLevel(mergedConfig.logLevel);\n\n if (isSetString(mergedConfig.tsconfig)) {\n mergedConfig.tsconfig = replacePath(\n replacePathTokens(this, mergedConfig.tsconfig),\n mergedConfig.cwd\n );\n } else {\n mergedConfig.tsconfig = getTsconfigFilePath(\n mergedConfig.cwd,\n mergedConfig.root\n );\n }\n\n // #region Configure output\n\n mergedConfig.output.format = getUnique(\n toArray(\n mergedConfig.output?.format ??\n (mergedConfig.projectType === \"library\" ? [\"cjs\", \"esm\"] : [\"esm\"])\n )\n );\n\n if (isSetString(mergedConfig.output.path)) {\n mergedConfig.output.path = appendPath(\n replacePathTokens(this, mergedConfig.output.path),\n mergedConfig.cwd\n );\n } else {\n mergedConfig.output.path = appendPath(\n joinPaths(mergedConfig.root, \"dist\"),\n mergedConfig.cwd\n );\n }\n\n mergedConfig.output.copy ??= {} as ResolvedCopyConfig;\n if (mergedConfig.output.copy !== false) {\n if (!mergedConfig.root.replace(/^\\.\\/?/, \"\")) {\n mergedConfig.output.copy.path = isSetString(\n mergedConfig.output.copy.path\n )\n ? appendPath(\n replacePathTokens(this, mergedConfig.output.copy.path),\n mergedConfig.cwd\n )\n : mergedConfig.output.path;\n } else {\n mergedConfig.output.copy.path = appendPath(\n replacePathTokens(\n this,\n isSetString(mergedConfig.output.copy.path)\n ? mergedConfig.output.copy.path\n : joinPaths(\"dist\", mergedConfig.root)\n ),\n mergedConfig.cwd\n );\n }\n }\n\n if (mergedConfig.output.types !== false) {\n mergedConfig.output.types = appendPath(\n replacePathTokens(\n this,\n mergedConfig.output.types ||\n joinPaths(\n mergedConfig.root,\n `${mergedConfig.framework?.name ?? \"powerlines\"}.d.ts`\n )\n ),\n mergedConfig.cwd\n );\n }\n\n if (\n mergedConfig.output.copy &&\n mergedConfig.output.copy.path &&\n mergedConfig.output.copy.assets &&\n Array.isArray(mergedConfig.output.copy.assets)\n ) {\n mergedConfig.output.copy.assets = getUniqueBy(\n mergedConfig.output.copy.assets.map(asset => {\n return {\n glob: isSetObject(asset) ? asset.glob : asset,\n input:\n isString(asset) ||\n !asset.input ||\n asset.input === \".\" ||\n asset.input === \"/\" ||\n asset.input === \"./\"\n ? mergedConfig.cwd\n : isParentPath(asset.input, mergedConfig.cwd) ||\n isEqual(asset.input, mergedConfig.cwd)\n ? asset.input\n : appendPath(asset.input, mergedConfig.cwd),\n output:\n isSetObject(asset) && isSetString(asset.output)\n ? isParentPath(asset.output, mergedConfig.cwd)\n ? asset.output\n : appendPath(\n joinPaths(\n (mergedConfig.output.copy as CopyConfig).path,\n replacePath(\n replacePath(\n asset.output,\n replacePath(\n (mergedConfig.output.copy as CopyConfig).path,\n mergedConfig.cwd\n )\n ),\n (mergedConfig.output.copy as CopyConfig).path\n )\n ),\n mergedConfig.cwd\n )\n : appendPath(\n (mergedConfig.output.copy as CopyConfig).path,\n mergedConfig.cwd\n ),\n ignore:\n isSetObject(asset) && asset.ignore\n ? toArray(asset.ignore)\n : undefined\n };\n }),\n (a: ResolvedAssetGlob) => `${a.input}-${a.glob}-${a.output}`\n );\n }\n\n if (isUndefined(mergedConfig.output?.sourceMap)) {\n if (mergedConfig.mode === \"development\") {\n mergedConfig.output.sourceMap = true;\n } else {\n mergedConfig.output.sourceMap = false;\n }\n }\n\n if (isUndefined(mergedConfig.output?.minify)) {\n if (mergedConfig.mode === \"production\") {\n mergedConfig.output.minify = true;\n } else {\n mergedConfig.output.minify = false;\n }\n }\n\n if (isUndefined(mergedConfig.output?.artifactsPath)) {\n mergedConfig.output.artifactsPath = `.${\n mergedConfig.framework?.name ?? \"powerlines\"\n }`;\n }\n\n if (mergedConfig.output.copy && mergedConfig.output.copy.assets) {\n mergedConfig.output.copy.assets = mergedConfig.output.copy.assets.map(\n asset => ({\n ...asset,\n glob: replacePathTokens(this, asset.glob),\n ignore: asset.ignore\n ? asset.ignore.map(ignore => replacePathTokens(this, ignore))\n : undefined,\n input: replacePathTokens(this, asset.input),\n output: replacePathTokens(this, asset.output)\n })\n );\n }\n\n if (\n (isSetString(mergedConfig.output?.storage) &&\n mergedConfig.output.storage === \"virtual\") ||\n (isSetObject(mergedConfig.output?.storage) &&\n Object.values(mergedConfig.output.storage).every(\n adapter => adapter.preset === \"virtual\"\n ))\n ) {\n mergedConfig.output.overwrite = true;\n }\n\n // #endregion Configure output\n\n this.resolvedConfig = mergedConfig;\n this.#configProxy = this.createConfigProxy();\n\n this.resolver = createResolver({\n cwd: this.resolvedConfig.cwd,\n root: this.resolvedConfig.root,\n cacheDir: this.envPaths.cache,\n mode: this.resolvedConfig.mode\n });\n\n this.logger.info({\n meta: { category: \"config\" },\n message: `Resolved Powerlines configuration object: \\n${formatConfig(\n this.resolvedConfig\n )}`\n });\n\n this.#fs ??= await VirtualFileSystem.create(this);\n }\n\n private createConfigProxy(): TResolvedConfig {\n return new Proxy(this.resolvedConfig, {\n /**\n * A trap for the `delete` operator.\n * @param target - The original object which is being proxied.\n * @param key - The name or `Symbol` of the property to delete.\n * @returns A `boolean` indicating whether or not the property was deleted.\n */\n deleteProperty: (target: TResolvedConfig, key) => {\n if (UNRESOLVED_CONFIG_NAMES.includes(key.toString())) {\n throw new Error(\n `Cannot delete property ${key.toString()} from config - it is only intended to be used as a reference.`\n );\n }\n\n Reflect.deleteProperty(this.overriddenConfig, key);\n return Reflect.deleteProperty(target, key);\n },\n\n /**\n * A trap for getting a property value.\n * @param target - The original object which is being proxied.\n * @param key - The name or `Symbol` of the property to get.\n * @param receiver - The proxy or an object that inherits from the proxy.\n */\n get: (target: TResolvedConfig, key, receiver) => {\n if (UNRESOLVED_CONFIG_NAMES.includes(key.toString())) {\n if (key === \"cwd\") {\n return this.cwd;\n }\n if (key === \"userConfig\") {\n return this.userConfig;\n }\n if (key === \"inlineConfig\") {\n return this.inlineConfig;\n }\n if (key === \"pluginConfig\") {\n return this.pluginConfig;\n }\n if (key === \"environmentConfig\") {\n return this.environmentConfig;\n }\n }\n\n return Reflect.get(target, key, receiver);\n },\n\n /**\n * A trap for the `in` operator.\n * @param target - The original object which is being proxied.\n * @param key - The name or `Symbol` of the property to check for existence.\n */\n has: (target: TResolvedConfig, key: string | symbol): boolean => {\n return (\n Reflect.has(target, key) ||\n UNRESOLVED_CONFIG_NAMES.includes(key.toString())\n );\n },\n\n /**\n * A trap for `Reflect.ownKeys()`.\n * @param target - The original object which is being proxied.\n */\n ownKeys: (target: TResolvedConfig): ArrayLike<string | symbol> => {\n return getUnique([\n ...Reflect.ownKeys(target),\n ...UNRESOLVED_CONFIG_NAMES\n ]);\n },\n\n /**\n * A trap for setting a property value.\n * @param target - The original object which is being proxied.\n * @param key - The name or `Symbol` of the property to set.\n * @param newValue - The new value to assign to the property.\n * @param receiver - The object to which the assignment was originally directed.\n * @returns A `boolean` indicating whether or not the property was set.\n */\n set: (\n target: TResolvedConfig,\n key: string | symbol,\n newValue: any,\n receiver: any\n ): boolean => {\n if (UNRESOLVED_CONFIG_NAMES.includes(key.toString())) {\n throw new Error(\n `Cannot change property ${key.toString()} from config - it is only intended to be used as a reference.`\n );\n }\n\n Reflect.set(this.overriddenConfig, key, newValue, receiver);\n return Reflect.set(target, key, newValue, receiver);\n }\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2IA,oBACE,IAFgB,MAAM,EAAE,kBAAkB,IAAM,CAE5C,EAAE,QACJ,aAAa,MAAM;CACjB,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,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
{"version":3,"file":"context.mjs","names":["#tsconfig","#fs","#checksum","#buildId","#releaseId","#configProxy","#parserCache","#requestCache"],"sources":["../../src/context/context.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 { EnvPaths, getEnvPaths } from \"@stryke/env/get-env-paths\";\nimport { relativeToWorkspaceRoot } from \"@stryke/fs/get-workspace-root\";\nimport { murmurhash } from \"@stryke/hash\";\nimport { hashDirectory } from \"@stryke/hash/node\";\nimport { getUnique, getUniqueBy } from \"@stryke/helpers/get-unique\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { fetchRequest } from \"@stryke/http/fetch\";\nimport { appendPath } from \"@stryke/path/append\";\nimport {\n findFileDotExtensionSafe,\n findFileExtensionSafe\n} from \"@stryke/path/file-path-fns\";\nimport { isEqual } from \"@stryke/path/is-equal\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { TypeDefinition } from \"@stryke/types/configuration\";\nimport { PackageJson } from \"@stryke/types/package-json\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport { match, tsconfigPathsToRegExp } from \"bundle-require\";\nimport { resolveCompatibilityDates } from \"compatx\";\nimport defu from \"defu\";\nimport { create, FlatCache } from \"flat-cache\";\nimport { existsSync } from \"node:fs\";\nimport { parse, ParseResult } from \"oxc-parser\";\nimport { Range } from \"semver\";\nimport {\n Agent,\n BodyInit,\n interceptors,\n RequestInfo,\n Response,\n setGlobalDispatcher\n} from \"undici\";\nimport { UnpluginBuildContext } from \"unplugin\";\nimport {\n CACHE_HASH_LENGTH,\n DEFAULT_DEVELOPMENT_LOG_LEVEL,\n DEFAULT_PRODUCTION_LOG_LEVEL,\n DEFAULT_TEST_LOG_LEVEL,\n ROOT_HASH_LENGTH\n} from \"../constants\";\nimport {\n getDefaultMode,\n loadParsedConfig,\n resolvePackageConfigs\n} from \"../lib/config\";\nimport { getConfigProps } from \"../lib/context-helpers\";\nimport {\n getUniqueInputs,\n isTypeDefinition,\n resolveInputsSync\n} from \"../lib/entry\";\nimport { callHook } from \"../lib/hooks\";\nimport { getPrefixedRootHash } from \"../lib/meta\";\nimport { createResolver } from \"../lib/resolver\";\nimport { getTsconfigFilePath } from \"../lib/typescript/tsconfig\";\nimport { VirtualFileSystem } from \"../lib/vfs\";\nimport {\n getPackageJsonOrganization,\n getWorkspaceName\n} from \"../plugin-utils/context-helpers\";\nimport { formatConfig } from \"../plugin-utils/format\";\nimport { isDuplicate, isPlugin } from \"../plugin-utils/helpers\";\nimport { createLogger, resolveLogLevel } from \"../plugin-utils/logging\";\nimport { mergeConfig } from \"../plugin-utils/merge\";\nimport { replacePathTokens } from \"../plugin-utils/paths\";\nimport {\n CopyConfig,\n ExecutionOptions,\n FrameworkOptions,\n InferOverridableConfig,\n ParsedUserConfig,\n PluginConfig,\n ResolvedAssetGlob,\n ResolvedConfig,\n ResolvedCopyConfig,\n ResolvedEntryTypeDefinition,\n ResolvedOutputConfig\n} from \"../types/config\";\nimport {\n Context,\n EmitEntryOptions,\n EmitOptions,\n EnvironmentContext,\n ExecutionContext,\n FetchOptions,\n MetaInfo,\n ParseOptions,\n PluginContext,\n Resolver,\n ResolveResult,\n TransformResult\n} from \"../types/context\";\nimport {\n ResolveOptions,\n VirtualFile,\n VirtualFileSystemInterface\n} from \"../types/fs\";\nimport {\n CallHookOptions,\n InferHookParameters,\n InferHookReturnType\n} from \"../types/hooks\";\nimport {\n Logger,\n LoggerOptions,\n LogLevelResolvedConfig\n} from \"../types/logging\";\nimport { ParsedTypeScriptConfig } from \"../types/tsconfig\";\nimport { PowerlinesBaseContext } from \"./base-context\";\n\nconst agent = new Agent({ keepAliveTimeout: 10000 });\nsetGlobalDispatcher(\n agent.compose(\n interceptors.retry({\n maxRetries: 3,\n minTimeout: 1000,\n maxTimeout: 10000,\n timeoutFactor: 2,\n retryAfter: true\n })\n )\n);\n\nconst UNRESOLVED_CONFIG_NAMES = [\n \"userConfig\",\n \"inlineConfig\",\n \"pluginConfig\",\n \"environmentConfig\"\n];\n\nexport class PowerlinesContext<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown\n>\n extends PowerlinesBaseContext<TSystemContext>\n implements Context<TResolvedConfig, TSystemContext>\n{\n #checksum: string | null = null;\n\n #buildId: string = uuid();\n\n #releaseId: string = uuid();\n\n #fs!: VirtualFileSystemInterface;\n\n #tsconfig!: ParsedTypeScriptConfig;\n\n #parserCache!: FlatCache;\n\n #requestCache!: FlatCache;\n\n #configProxy!: TResolvedConfig;\n\n public resolver!: Resolver;\n\n /**\n * The parsed `package.json` file for the project\n */\n public packageJson!: PackageJson;\n\n /**\n * The parsed `project.json` file for the project\n */\n public projectJson: Record<string, any> | undefined = undefined;\n\n /**\n * The parsed configuration file for the project\n */\n public configFile!: ParsedUserConfig;\n\n /**\n * An object containing the dependencies that should be installed for the project\n */\n public dependencies: Record<string, string | Range> = {};\n\n /**\n * An object containing the development dependencies that should be installed for the project\n */\n public devDependencies: Record<string, string | Range> = {};\n\n /**\n * The persisted meta information about the current build\n */\n public persistedMeta: MetaInfo | undefined = undefined;\n\n /**\n * The resolved tsconfig file paths for the project\n */\n public resolvePatterns: RegExp[] = [];\n\n /**\n * The resolved configuration for this context\n */\n protected resolvedConfig: TResolvedConfig = {} as TResolvedConfig;\n\n /**\n * The configuration options that were overridden by plugins during the build process, which may include additional properties or modifications made during the configuration loading process.\n */\n protected overriddenConfig: InferOverridableConfig<TResolvedConfig> =\n {} as InferOverridableConfig<TResolvedConfig>;\n\n /**\n * The configuration options provided inline during execution, such as CLI flags or other parameters that may be relevant to the command being executed. These options can be used to override or supplement the configuration options defined in a configuration file on disk, and are typically provided as part of the execution context when running a Powerlines command.\n */\n protected inlineConfig: TResolvedConfig[\"inlineConfig\"] =\n {} as TResolvedConfig[\"inlineConfig\"];\n\n /**\n * The configuration options read from a configuration file on disk, which may be used to resolve the final configuration for the context. This typically includes the user configuration options defined in the `powerlines.config.ts` file, as well as any inline configuration options provided during execution.\n */\n protected userConfig: TResolvedConfig[\"userConfig\"] = {};\n\n /**\n * The configuration options provided by plugins added by the user (and other plugins)\n */\n protected pluginConfig: TResolvedConfig[\"pluginConfig\"] = {};\n\n /**\n * The configuration options provided by the environment\n */\n protected environmentConfig: any = {};\n\n /**\n * The resolved entry type definitions for the project\n */\n public get entry(): ResolvedEntryTypeDefinition[] {\n const entry = this.resolvedEntry;\n\n return resolveInputsSync(\n this,\n entry && entry.length > 0\n ? entry\n : Array.isArray(this.config.input) ||\n (isSetObject(this.config.input) &&\n !isTypeDefinition(this.config.input))\n ? this.config.input\n : toArray(this.config.input).flat()\n );\n }\n\n /**\n * The TypeScript configuration parsed from the tsconfig file\n */\n public get tsconfig(): ParsedTypeScriptConfig {\n if (!this.#tsconfig) {\n this.tsconfig = {\n tsconfigFilePath: this.config.tsconfig\n } as ParsedTypeScriptConfig;\n }\n\n return this.#tsconfig;\n }\n\n /**\n * Sets the TypeScript configuration parsed from the tsconfig file\n */\n public set tsconfig(value: ParsedTypeScriptConfig) {\n this.#tsconfig = value;\n this.resolvePatterns = tsconfigPathsToRegExp(value?.options?.paths ?? {});\n }\n\n /**\n * The virtual file system interface for the project\n */\n public get fs(): VirtualFileSystemInterface {\n if (!this.#fs) {\n this.#fs = VirtualFileSystem.createSync(this);\n }\n\n return this.#fs;\n }\n\n /**\n * Get the checksum of the project's current state\n */\n public get checksum(): string | null {\n return this.#checksum;\n }\n\n /**\n * Invokes the configured plugin hooks\n *\n * @remarks\n * By default, it will call the `\"pre\"`, `\"normal\"`, and `\"post\"` ordered hooks in sequence\n *\n * @param hook - The hook to call\n * @param options - The options to provide to the hook\n * @param args - The arguments to pass to the hook\n * @returns The result of the hook call\n */\n public callHook = async <TKey extends string>(\n hook: TKey,\n options: CallHookOptions & {\n environment?: string | EnvironmentContext<any>;\n },\n ...args: InferHookParameters<PluginContext<any>, TKey>\n ): Promise<InferHookReturnType<PluginContext<any>, TKey> | undefined> =>\n callHook<TKey, TResolvedConfig>(\n this as unknown as ExecutionContext<TResolvedConfig>,\n hook,\n options,\n ...args\n );\n\n /**\n * The meta information about the current build\n */\n public get meta() {\n return {\n executionId: this.#buildId,\n releaseId: this.#releaseId,\n checksum: this.#checksum,\n timestamp: this.timestamp,\n rootHash: murmurhash(\n {\n workspaceRoot: this.config?.cwd,\n root: this.config?.root\n },\n {\n maxLength: ROOT_HASH_LENGTH\n }\n ),\n configHash: murmurhash(this.config, {\n maxLength: CACHE_HASH_LENGTH\n })\n } as MetaInfo;\n }\n\n /**\n * The resolved configuration options\n */\n public get config(): TResolvedConfig {\n if (!this.#configProxy) {\n this.#configProxy = this.createConfigProxy();\n }\n\n return this.#configProxy;\n }\n\n /**\n * Get the path to the artifacts directory for the project\n */\n public get artifactsPath(): string {\n return joinPaths(\n this.config.cwd,\n this.config.root,\n this.config.output?.artifactsPath ||\n `.${this.config.framework?.name || \"powerlines\"}`\n );\n }\n\n /**\n * Get the path to the builtin modules used by the project\n */\n public get builtinsPath(): string {\n return joinPaths(this.artifactsPath, \"builtins\");\n }\n\n /**\n * Get the path to the entry directory for the project\n */\n public get entryPath(): string {\n return joinPaths(this.artifactsPath, \"entry\");\n }\n\n /**\n * Get the path to the infrastructure modules used by the project\n */\n public get infrastructurePath(): string {\n return joinPaths(this.artifactsPath, \"infrastructure\");\n }\n\n /**\n * Get the path to the data directory for the project\n */\n public get dataPath(): string {\n return joinPaths(\n this.envPaths.data,\n \"projects\",\n getPrefixedRootHash(this.config.name, this.meta.rootHash)\n );\n }\n\n /**\n * Get the path to the cache directory for the project\n */\n public get cachePath(): string {\n return joinPaths(\n this.envPaths.cache,\n \"projects\",\n murmurhash(\n {\n checksum: this.#checksum,\n config: this.meta.configHash\n },\n {\n maxLength: CACHE_HASH_LENGTH\n }\n )\n );\n }\n\n /**\n * Get the path to the generated declaration file for the project\n */\n public get typesPath(): string {\n return this.config.output.types\n ? appendPath(this.config.output.types, this.config.cwd)\n : joinPaths(this.config.cwd, this.config.root, \"powerlines.d.ts\");\n }\n\n /**\n * Get the project root relative to the workspace root\n */\n public get relativeToWorkspaceRoot() {\n return relativeToWorkspaceRoot(this.config.root);\n }\n\n /**\n * The builtin module id that exist in the Powerlines virtual file system\n */\n public get builtins(): string[] {\n return Object.values(this.fs.metadata)\n .filter(meta => meta && meta.type === \"builtin\")\n .map(meta => meta?.id)\n .filter(Boolean);\n }\n\n /**\n * Additional arguments provided during execution of the command, such as CLI flags or other parameters that may be relevant to the command being executed.\n */\n public get additionalArgs(): Record<string, string | string[]> {\n return Object.entries(this.config.inlineConfig.additionalArgs ?? {}).reduce(\n (ret, [key, value]) => {\n const formattedKey = key.replace(/^--?/, \"\");\n\n if (ret[formattedKey]) {\n if (Array.isArray(ret[formattedKey])) {\n if (Array.isArray(value)) {\n ret[formattedKey] = [...toArray(ret[formattedKey]), ...value];\n } else {\n ret[formattedKey] = [...toArray(ret[formattedKey]), value];\n }\n } else {\n ret[formattedKey] = [\n ret[formattedKey],\n ...(Array.isArray(value) ? value : [value])\n ];\n }\n } else {\n ret[formattedKey] = value;\n }\n return ret;\n },\n {} as Record<string, string | string[]>\n );\n }\n\n /**\n * The alias mappings for the project used during module resolution\n *\n * @remarks\n * This includes both the built-in module aliases as well as any custom aliases defined in the build configuration.\n */\n public get alias(): Record<string, string> {\n return this.builtins.reduce(\n (ret, id) => {\n const moduleId = `${\n this.config?.framework?.name || \"powerlines\"\n }:${id.replace(/^.*:/, \"\")}`;\n if (!ret[moduleId]) {\n const path = this.fs.paths[id];\n if (path) {\n ret[moduleId] = path;\n }\n }\n\n return ret;\n },\n this.config.resolve.alias\n ? Array.isArray(this.config.resolve.alias)\n ? this.config.resolve.alias.reduce(\n (ret, alias) => {\n if (!ret[alias.find.toString()]) {\n ret[alias.find.toString()] = alias.replacement;\n }\n\n return ret;\n },\n {} as Record<string, string>\n )\n : this.config.resolve.alias\n : {}\n );\n }\n\n public override get logger(): Logger {\n return this.createLogger();\n }\n\n /**\n * The log level for the context, which determines the minimum level of log messages that will be emitted by the logger. This is resolved based on the configuration options provided by the user, and can be set to different levels for development, production, and test environments. The log level can also be overridden by plugins or other parts of the build process to provide more granular control over logging output.\n */\n public get logLevel(): LogLevelResolvedConfig {\n return resolveLogLevel(this.config.logLevel, this.config.mode);\n }\n\n /**\n * The environment paths for the project, which provide the locations of various directories and files used by the Powerlines framework. These paths are resolved based on the organization ID, application ID, and workspace root directory, and can be used to access configuration files, cache directories, and other resources in a consistent manner.\n */\n public override get envPaths(): EnvPaths {\n return getEnvPaths({\n orgId: kebabCase(this.config.framework?.orgId || \"storm-software\"),\n appId: kebabCase(this.config.framework?.name || \"powerlines\"),\n workspaceRoot: this.config.cwd\n });\n }\n\n /**\n * Gets the parser cache.\n */\n protected get parserCache(): FlatCache {\n if (!this.#parserCache) {\n this.#parserCache = create({\n cacheId: \"parser\",\n cacheDir: this.cachePath,\n ttl: 2 * 60 * 60 * 1000,\n lruSize: 5000,\n persistInterval: 250\n });\n }\n\n return this.#parserCache;\n }\n\n /**\n * Gets the request cache.\n */\n protected get requestCache(): FlatCache {\n if (!this.#requestCache) {\n this.#requestCache = create({\n cacheId: \"http\",\n cacheDir: this.cachePath,\n ttl: 6 * 60 * 60 * 1000,\n lruSize: 5000,\n persistInterval: 250\n });\n }\n\n return this.#requestCache;\n }\n\n /**\n * The entry points that exist in the Powerlines virtual file system\n */\n protected get resolvedEntry(): ResolvedEntryTypeDefinition[] {\n return Object.entries(this.fs.metadata)\n .filter(([, meta]) => meta && meta.type === \"entry\")\n .map(([path, meta]) => {\n const typeDefinition = {\n file: path\n } as ResolvedEntryTypeDefinition;\n\n if (meta.properties) {\n if (isSetString(meta.properties.file)) {\n typeDefinition.file = meta.properties.file;\n }\n if (isSetString(meta.properties.name)) {\n typeDefinition.name = meta.properties.name;\n }\n if (\n isSetString(meta.properties[\"input.file\"]) ||\n isSetString(meta.properties[\"input.name\"])\n ) {\n typeDefinition.input ??= {} as TypeDefinition;\n if (isSetString(meta.properties[\"input.file\"])) {\n typeDefinition.input.file = meta.properties[\"input.file\"];\n }\n if (isSetString(meta.properties[\"input.name\"])) {\n typeDefinition.input.name = meta.properties[\"input.name\"];\n }\n }\n if (isSetString(meta.properties.output)) {\n typeDefinition.output = meta.properties.output;\n }\n }\n\n return typeDefinition;\n })\n .filter(Boolean);\n }\n\n /**\n * Creates a new Context instance.\n *\n * @param options - The options to use for creating the context, including the resolved configuration and workspace settings.\n */\n protected constructor(public override options: ExecutionOptions) {\n super(options);\n }\n\n public override createLogger(options: LoggerOptions = {}) {\n return createLogger(\n this.config.name || this.options.root,\n {\n logLevel: this.logLevel,\n ...options\n },\n this.options.logFn\n );\n }\n\n /**\n * A function to perform HTTP fetch requests\n *\n * @remarks\n * This function uses a caching layer to avoid duplicate requests during the Powerlines process.\n *\n * @example\n * ```ts\n * const response = await context.fetch(\"https://api.example.com/data\");\n * const data = await response.json();\n * ```\n *\n * @see https://github.com/nodejs/undici\n *\n * @param input - The URL to fetch.\n * @param options - The fetch request options.\n * @returns A promise that resolves to a response returned by the fetch.\n */\n public async fetch(\n input: RequestInfo,\n options: FetchOptions = {}\n ): Promise<Response> {\n const cacheKey = murmurhash({\n input: input.toString(),\n options: JSON.stringify(options)\n });\n\n if (!this.config.skipCache && !options.skipCache) {\n const cached = this.requestCache.get<\n {\n body: BodyInit;\n } & Pick<Response, \"status\" | \"statusText\" | \"headers\">\n >(cacheKey);\n if (cached) {\n return new Response(cached.body, {\n status: cached.status,\n statusText: cached.statusText,\n headers: cached.headers\n });\n }\n }\n\n const logger = this.extendLogger({ category: \"communication\" });\n const startTime = Date.now();\n\n logger.trace(\n `Sending fetch request (${\n options.method?.toUpperCase() || \"GET\"\n }): ${input.toString()}`\n );\n\n const response = await fetchRequest(input, { timeout: 12_000, ...options });\n const result = {\n body: await response.text(),\n status: response.status,\n statusText: response.statusText,\n headers: Object.fromEntries(response.headers.entries())\n };\n\n if (!this.config.skipCache && !options.skipCache) {\n try {\n this.requestCache.set(cacheKey, result);\n } catch {\n // Do nothing\n }\n }\n\n logger.trace(\n `Fetch request (${\n options.method?.toUpperCase() || \"GET\"\n }) completed in ${Date.now() - startTime}ms: ${input.toString()} - ${\n response.status\n } / ${response.statusText} \\n - Response Headers: ${JSON.stringify(\n result.headers\n )}\\n - Response Body: ${\n typeof result.body === \"string\"\n ? result.body.length > 1000\n ? `${result.body.slice(0, 1000)}... (truncated, total length: ${\n result.body.length\n })`\n : result.body\n : \"[Non-string body]\"\n }`\n );\n\n return new Response(result.body, {\n status: result.status,\n statusText: result.statusText,\n headers: result.headers\n });\n }\n\n /**\n * Parse code using [Oxc-Parser](https://github.com/oxc/oxc) into an (ESTree-compatible)[https://github.com/estree/estree] AST object.\n *\n * @remarks\n * This function can be used to parse TypeScript code into an AST for further analysis or transformation.\n *\n * @example\n * ```ts\n * const ast = context.parse(\"const x: number = 42;\");\n * ```\n *\n * @see https://rollupjs.org/plugin-development/#this-parse\n * @see https://github.com/oxc/oxc\n *\n * @param code - The source code to parse.\n * @param options - The options to pass to the parser.\n * @returns An (ESTree-compatible)[https://github.com/estree/estree] AST object.\n */\n public async parse(code: string, options: ParseOptions = {}) {\n const cacheKey = murmurhash({\n code,\n options\n });\n\n let result!: ParseResult;\n if (!this.config.skipCache) {\n result = this.parserCache.get<ParseResult>(cacheKey);\n if (result) {\n return result;\n }\n }\n\n result = await parse(`source.${options.lang || \"ts\"}`, code, {\n ...options,\n sourceType: \"module\",\n showSemanticErrors: this.config.mode === \"development\"\n });\n\n if (!this.config.skipCache) {\n this.parserCache.set(cacheKey, result);\n }\n\n return result;\n }\n\n /**\n * A helper function to resolve modules in the Virtual File System\n *\n * @remarks\n * This function can be used to resolve modules relative to the project root directory.\n *\n * @example\n * ```ts\n * const resolved = await context.resolve(\"some-module\", \"/path/to/importer\");\n * ```\n *\n * @param id - The module to resolve.\n * @param importer - An optional path to the importer module.\n * @param options - Additional resolution options.\n * @returns A promise that resolves to the resolved module path.\n */\n public async resolve(\n id: string,\n importer?: string,\n options: ResolveOptions = {}\n ): Promise<ResolveResult | undefined> {\n let moduleId = id;\n if (this.config.resolve.alias) {\n if (Array.isArray(this.config.resolve.alias)) {\n const alias = this.config.resolve.alias.find(a =>\n match(moduleId, [a.find])\n );\n if (alias) {\n moduleId = alias.replacement;\n }\n } else if (\n isSetObject(this.config.resolve.alias) &&\n this.config.resolve.alias[id]\n ) {\n moduleId = this.config.resolve.alias[id];\n }\n }\n\n if (\n this.fs.isResolvableId(moduleId) ||\n (importer && this.fs.isResolvableId(importer))\n ) {\n let resolvedImporter = importer;\n if (importer && this.fs.isResolvableId(importer)) {\n resolvedImporter = await this.fs.resolve(\n importer,\n undefined,\n defu(\n {\n conditions: this.config.resolve.conditions,\n extensions: this.config.resolve.extensions\n },\n options\n )\n );\n }\n\n const result = await this.fs.resolve(\n moduleId,\n resolvedImporter,\n defu(\n {\n conditions: this.config.resolve.conditions,\n extensions: this.config.resolve.extensions\n },\n options\n )\n );\n if (!result) {\n return undefined;\n }\n\n const external = Boolean(\n !match(moduleId, this.config.resolve.noExternal) &&\n (match(moduleId, this.config.resolve.external) ||\n moduleId.startsWith(\"node:\") ||\n ((!this.fs.isVirtual(moduleId, importer, options) ||\n (this.fs.isVirtual(moduleId, importer, options) &&\n this.config.projectType !== \"application\")) &&\n this.config.resolve.skipNodeModulesBundle &&\n !/^[A-Z]:[/\\\\]|^\\.{0,2}\\/|^\\.{1,2}$/.test(moduleId)))\n );\n\n return {\n id: result,\n external,\n virtual: !external\n };\n }\n\n if (this.config.resolve.skipNodeModulesBundle) {\n if (\n match(moduleId, this.resolvePatterns) ||\n match(moduleId, this.config.resolve.noExternal)\n ) {\n return undefined;\n }\n\n if (\n match(moduleId, this.config.resolve.external) ||\n moduleId.startsWith(\"node:\")\n ) {\n return { id: moduleId, external: true, virtual: false };\n }\n\n // Exclude any other import that looks like a Node module\n if (!/^[A-Z]:[/\\\\]|^\\.{0,2}\\/|^\\.{1,2}$/.test(moduleId)) {\n return {\n id: moduleId,\n external: true,\n virtual: false\n };\n }\n } else {\n if (match(moduleId, this.config.resolve.noExternal)) {\n return undefined;\n }\n\n if (\n match(moduleId, this.config.resolve.external) ||\n moduleId.startsWith(\"node:\")\n ) {\n return { id: moduleId, external: true, virtual: false };\n }\n }\n\n return undefined;\n }\n\n /**\n * A helper function to load modules from the Virtual File System\n *\n * @remarks\n * This function can be used to load modules relative to the project root directory.\n *\n * @example\n * ```ts\n * const module = await context.load(\"some-module\", \"/path/to/importer\");\n * ```\n *\n * @param id - The module to load.\n * @returns A promise that resolves to the loaded module.\n */\n public async load(id: string): Promise<TransformResult | undefined> {\n const resolvedId = await this.fs.resolve(id);\n if (!resolvedId) {\n return undefined;\n }\n\n const code = await this.fs.read(resolvedId);\n if (!code) {\n return undefined;\n }\n\n return { code, map: null };\n }\n\n /**\n * Get the builtin virtual files that exist in the Powerlines virtual file system\n */\n public async getBuiltins() {\n return Promise.all(\n Object.entries(this.fs.metadata)\n .filter(([, meta]) => meta && meta.type === \"builtin\")\n .map(async ([id, meta]) => {\n const code = await this.fs.read(id);\n const path = this.fs.paths[id];\n\n return { ...meta, path, code } as VirtualFile;\n })\n );\n }\n\n /**\n * Resolves a file and writes it to the VFS if it does not already exist\n *\n * @param code - The source code of the file\n * @param path - The path to write the file to\n * @param options - Additional options for writing the file\n */\n public async emit(\n code: string,\n path: string,\n options: EmitOptions = {}\n ): Promise<void> {\n const filePath = options.extension\n ? findFileExtensionSafe(path)\n ? options.extension.startsWith(\".\")\n ? path.replace(findFileDotExtensionSafe(path), options.extension)\n : path.replace(findFileExtensionSafe(path), options.extension)\n : options.extension.startsWith(\".\")\n ? `${path}${options.extension}`\n : `${path}.${options.extension}`\n : findFileExtensionSafe(path)\n ? path\n : `${path}.ts`;\n\n if (\n isFunction((this as unknown as UnpluginBuildContext).emitFile) &&\n options.emitWithBundler\n ) {\n return (this as unknown as UnpluginBuildContext).emitFile({\n needsCodeReference: options.needsCodeReference,\n originalFileName: options.originalFileName,\n fileName: filePath,\n source: code,\n type: \"asset\"\n });\n }\n\n return this.fs.write(filePath, code, options);\n }\n\n /**\n * Synchronously resolves a file and writes it to the VFS if it does not already exist\n *\n * @param code - The source code of the file\n * @param path - The path to write the file to\n * @param options - Additional options for writing the file\n */\n public emitSync(code: string, path: string, options: EmitOptions = {}) {\n const filePath = options.extension\n ? findFileExtensionSafe(path)\n ? options.extension.startsWith(\".\")\n ? path.replace(findFileDotExtensionSafe(path), options.extension)\n : path.replace(findFileExtensionSafe(path), options.extension)\n : options.extension.startsWith(\".\")\n ? `${path}${options.extension}`\n : `${path}.${options.extension}`\n : findFileExtensionSafe(path)\n ? path\n : `${path}.ts`;\n\n if (\n isFunction((this as unknown as UnpluginBuildContext).emitFile) &&\n options.emitWithBundler\n ) {\n return (this as unknown as UnpluginBuildContext).emitFile({\n needsCodeReference: options.needsCodeReference,\n originalFileName: options.originalFileName,\n fileName: filePath,\n source: code,\n type: \"asset\"\n });\n }\n\n return this.fs.writeSync(filePath, code, options);\n }\n\n /**\n * Resolves a entry virtual file and writes it to the VFS if it does not already exist\n *\n * @param code - The source code of the entry file\n * @param path - A path to write the entry file to\n * @param options - Optional write file options\n */\n public async emitEntry(\n code: string,\n path: string,\n options: EmitEntryOptions = {}\n ): Promise<void> {\n return this.emit(\n code,\n appendPath(path, this.entryPath),\n defu(\n {\n meta: {\n type: \"entry\",\n properties: {\n file: appendPath(path, this.entryPath),\n name: options?.name,\n output: options?.output,\n \"input.file\": options?.input?.file,\n \"input.name\": options?.input?.name\n }\n }\n },\n omit(options, [\"name\"])\n )\n );\n }\n\n /**\n * Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist\n *\n * @param code - The source code of the entry file\n * @param path - A path to write the entry file to\n * @param options - Optional write file options\n */\n public emitEntrySync(\n code: string,\n path: string,\n options: EmitEntryOptions = {}\n ): void {\n return this.emitSync(\n code,\n appendPath(path, this.entryPath),\n defu(\n {\n meta: {\n type: \"entry\",\n properties: {\n file: appendPath(path, this.entryPath),\n name: options?.name,\n output: options?.output,\n \"input.file\": options?.input?.file,\n \"input.name\": options?.input?.name\n }\n }\n },\n omit(options, [\"name\"])\n )\n );\n }\n\n /**\n * Resolves a builtin virtual file and writes it to the VFS if it does not already exist\n *\n * @param code - The source code of the builtin file\n * @param id - The unique identifier of the builtin file\n * @param options - Optional write file options\n */\n public async emitBuiltin(\n code: string,\n id: string,\n options: EmitOptions = {}\n ): Promise<void> {\n if (!this.builtinsPath) {\n throw new Error(\n `The builtins path is not set. Cannot emit builtin file with id \"${id}\".`\n );\n }\n\n if (!isSetString(id)) {\n throw new Error(\n `The builtin id must be a non-empty string. Received: ${String(id)}`\n );\n }\n\n return this.emit(\n code,\n appendPath(id, this.builtinsPath),\n defu(options, { meta: { type: \"builtin\", id } })\n );\n }\n\n /**\n * Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist\n *\n * @param code - The source code of the builtin file\n * @param id - The unique identifier of the builtin file\n * @param options - Optional write file options\n */\n public emitBuiltinSync(code: string, id: string, options: EmitOptions = {}) {\n if (!this.builtinsPath) {\n throw new Error(\n `The builtins path is not set. Cannot emit builtin file with id \"${id}\".`\n );\n }\n\n if (!isSetString(id)) {\n throw new Error(\n `The builtin id must be a non-empty string. Received: ${String(id)}`\n );\n }\n\n return this.emitSync(\n code,\n appendPath(id, this.builtinsPath),\n defu(options, { meta: { type: \"builtin\", id } })\n );\n }\n\n /**\n * Resolves a builtin virtual file and writes it to the VFS if it does not already exist\n *\n * @param code - The source code of the builtin file\n * @param id - The unique identifier of the builtin file\n * @param options - Optional write file options\n */\n public async emitInfrastructure(\n code: string,\n id: string,\n options: EmitOptions = {}\n ): Promise<void> {\n if (!this.infrastructurePath) {\n throw new Error(\n `The infrastructure path is not set. Cannot emit infrastructure file with id \"${id}\".`\n );\n }\n\n if (!isSetString(id)) {\n throw new Error(\n `The infrastructure id must be a non-empty string. Received: ${String(id)}`\n );\n }\n\n return this.emit(\n code,\n appendPath(id, this.infrastructurePath),\n defu(options, { meta: { type: \"infrastructure\", id } })\n );\n }\n\n /**\n * Synchronously resolves an infrastructure virtual file and writes it to the VFS if it does not already exist\n *\n * @param code - The source code of the infrastructure file\n * @param id - The unique identifier of the infrastructure file\n * @param options - Optional write file options\n */\n public emitInfrastructureSync(\n code: string,\n id: string,\n options: EmitOptions = {}\n ) {\n if (!this.infrastructurePath) {\n throw new Error(\n `The infrastructure path is not set. Cannot emit infrastructure file with id \"${id}\".`\n );\n }\n\n if (!isSetString(id)) {\n throw new Error(\n `The infrastructure id must be a non-empty string. Received: ${String(id)}`\n );\n }\n\n return this.emitSync(\n code,\n appendPath(id, this.infrastructurePath),\n defu(options, { meta: { type: \"infrastructure\", id } })\n );\n }\n\n /**\n * Generates a checksum representing the current context state\n *\n * @param path - The root directory of the project to generate the checksum for\n * @returns A promise that resolves to a string representing the checksum\n */\n public async generateChecksum(path?: string): Promise<string> {\n return hashDirectory(\n path || appendPath(this.options.root, this.options.cwd)\n );\n }\n\n /**\n * A setter function to populate the inline config values provided during execution of the command, such as CLI flags or other parameters that may be relevant to the command being executed. This function can be used to update the context with the inline configuration values, which may be used during the configuration resolution process to ensure that the final configuration reflects both the user configuration and any inline configuration provided during execution.\n *\n * @param config - The inline configuration values to set.\n * @returns A promise that resolves when the inline configuration values have been set.\n */\n public async setInlineConfig(\n config: TResolvedConfig[\"inlineConfig\"]\n ): Promise<void> {\n this.logger.debug({\n meta: { category: \"config\" },\n message: `Updating inline configuration object: \\n${formatConfig(config)}`\n });\n\n this.inlineConfig = config;\n this.#checksum = await this.generateChecksum();\n\n this.configFile = await loadParsedConfig(\n this.options.cwd,\n this.options.root,\n this.options.framework?.name || \"powerlines\",\n this.options.framework?.orgId || \"storm-software\",\n config\n );\n\n const result =\n this.configFile.config &&\n toArray(this.configFile.config).length > this.options.configIndex\n ? toArray(this.configFile.config)[this.options.configIndex]!\n : this.configFile.config;\n if (!result) {\n this.logger.warn(\n `No configuration found in ${\n this.options.configFile\n } for execution index ${this.options.configIndex}.`\n );\n } else {\n await this.setUserConfig(\n (isFunction(result)\n ? await Promise.resolve(\n result({\n cwd: this.cwd,\n root: this.options.root,\n mode:\n this.inlineConfig.mode ||\n (await getDefaultMode(this.cwd, this.options.root)),\n command: this.inlineConfig.command\n })\n )\n : result) as TResolvedConfig[\"userConfig\"]\n );\n }\n\n await this.resolveConfig();\n }\n\n /**\n * A setter function to populate the plugin config values provided during execution of the command, such as CLI flags or other parameters that may be relevant to the command being executed. This function can be used to update the context with the plugin configuration values, which may be used during the configuration resolution process to ensure that the final configuration reflects both the user configuration and any plugin configuration provided during execution.\n *\n * @param config - The plugin configuration values to set.\n * @returns A promise that resolves when the plugin configuration values have been set.\n */\n public async setPluginConfig(\n config: TResolvedConfig[\"pluginConfig\"]\n ): Promise<void> {\n this.logger.debug({\n meta: { category: \"config\" },\n message: `Updating plugin configuration object: \\n${formatConfig(config)}`\n });\n\n this.pluginConfig = config;\n await this.resolveConfig();\n }\n\n /**\n * A function to merge the various configuration objects (initial, user, inline, and plugin) into a single resolved configuration object that can be used throughout the Powerlines process. This function takes into account the different sources of configuration and their respective priorities, ensuring that the final configuration reflects the intended settings for the project. The merged configuration is then returned as a new object that can be accessed through the `config` property of the context.\n *\n * @returns The merged configuration object that combines the initial, user, inline, and plugin configurations.\n */\n protected mergeConfig(): TResolvedConfig {\n return mergeConfig(\n {\n inlineConfig: this.inlineConfig,\n userConfig: this.userConfig,\n pluginConfig: this.pluginConfig,\n environmentConfig: this.environmentConfig\n },\n getConfigProps<TResolvedConfig>(this.overriddenConfig),\n this.options,\n getConfigProps<TResolvedConfig>(this.inlineConfig),\n getConfigProps<TResolvedConfig>(this.userConfig),\n getConfigProps<TResolvedConfig>(this.pluginConfig),\n {\n version: this.packageJson?.version,\n description: this.packageJson?.description,\n environments: {},\n resolve: {}\n }\n ) as TResolvedConfig;\n }\n\n /**\n * A setter function to populate the user config values provided during execution of the command, such as CLI flags or other parameters that may be relevant to the command being executed. This function can be used to update the context with the user configuration values, which may be used during the configuration resolution process to ensure that the final configuration reflects both the user configuration and any inline configuration provided during execution.\n *\n * @param config - The user configuration values to set.\n * @returns A promise that resolves when the user configuration values have been set.\n */\n protected async setUserConfig(\n config: TResolvedConfig[\"userConfig\"]\n ): Promise<void> {\n this.logger.debug({\n meta: { category: \"config\" },\n message: `Updating user configuration object: \\n${formatConfig(config)}`\n });\n\n this.userConfig = config;\n await this.resolveConfig();\n }\n\n /**\n * Initialize the context with the provided configuration options\n */\n protected async resolveConfig(): Promise<void> {\n const mergedConfig = this.mergeConfig();\n\n this.logger.trace({\n meta: { category: \"config\" },\n message: `Pre-setup Powerlines configuration object: \\n --- Merged Config --- \\n${formatConfig(\n mergedConfig\n )} \\n\\n --- User Config --- \\n${formatConfig(\n this.userConfig\n )} \\n\\n --- Inline Config --- \\n${formatConfig(\n this.inlineConfig\n )} \\n\\n --- Plugin Config --- \\n${formatConfig(\n this.pluginConfig\n )} \\n\\n --- Environment Config --- \\n${formatConfig(\n this.environmentConfig\n )} \\n\\n --- Overridden Config --- \\n${formatConfig(\n this.overriddenConfig\n )}`\n });\n\n mergedConfig.output = defu(mergedConfig.output ?? {}, {\n copy: {\n assets: [\n {\n glob: \"LICENSE\"\n },\n {\n input: mergedConfig.root,\n glob: \"*.md\"\n },\n {\n input: mergedConfig.root,\n glob: \"package.json\"\n }\n ]\n },\n dts: true\n }) as ResolvedOutputConfig;\n\n if (isUndefined(mergedConfig.mode)) {\n mergedConfig.mode = await getDefaultMode(this.cwd, mergedConfig.root);\n }\n\n if (\n isUndefined(mergedConfig.framework) ||\n !isSetString(mergedConfig.framework.name)\n ) {\n mergedConfig.framework ??= {} as FrameworkOptions;\n mergedConfig.framework.name ??=\n (await getWorkspaceName(this)) || \"powerlines\";\n }\n\n if (isUndefined(mergedConfig.platform)) {\n mergedConfig.platform = \"neutral\";\n }\n\n mergedConfig.compatibilityDate = resolveCompatibilityDates(\n mergedConfig.compatibilityDate,\n \"latest\"\n );\n\n if (\n (!this.packageJson &&\n existsSync(\n joinPaths(\n appendPath(mergedConfig.root, mergedConfig.cwd),\n \"package.json\"\n )\n )) ||\n (!this.projectJson &&\n existsSync(\n joinPaths(\n appendPath(mergedConfig.root, mergedConfig.cwd),\n \"project.json\"\n )\n ))\n ) {\n const result = await resolvePackageConfigs(\n mergedConfig.cwd,\n mergedConfig.root\n );\n if (result) {\n if (result.packageJson) {\n this.packageJson = result.packageJson;\n }\n if (result.projectJson) {\n this.projectJson = result.projectJson;\n }\n\n if (this.packageJson) {\n mergedConfig.framework ??= {} as FrameworkOptions;\n mergedConfig.framework.name ??=\n (await getWorkspaceName(this)) || \"powerlines\";\n mergedConfig.framework.orgId ??=\n getPackageJsonOrganization(this.packageJson) || \"storm-software\";\n }\n }\n }\n\n if (isUndefined(mergedConfig.projectType)) {\n mergedConfig.projectType = this.projectJson?.projectType || \"application\";\n }\n\n this.resolvedConfig = mergedConfig;\n this.#configProxy = this.createConfigProxy();\n\n mergedConfig.input = getUniqueInputs(mergedConfig.input);\n\n if (\n mergedConfig.name?.startsWith(\"@\") &&\n mergedConfig.name.split(\"/\").filter(Boolean).length > 1\n ) {\n mergedConfig.name = mergedConfig.name.split(\"/\").filter(Boolean)[1]!;\n }\n\n mergedConfig.title ??= titleCase(mergedConfig.name);\n\n if (mergedConfig.resolve.external) {\n mergedConfig.resolve.external = getUnique(mergedConfig.resolve.external);\n }\n if (mergedConfig.resolve.noExternal) {\n mergedConfig.resolve.noExternal = getUnique(\n mergedConfig.resolve.noExternal\n );\n }\n\n mergedConfig.plugins = (mergedConfig.plugins ?? [])\n .flatMap(plugin => toArray(plugin))\n .filter(Boolean)\n .reduce((ret, plugin) => {\n if (\n isPlugin(plugin) &&\n isDuplicate(\n plugin,\n ret.filter(p => isPlugin(p))\n )\n ) {\n return ret;\n }\n\n ret.push(plugin);\n\n return ret;\n }, [] as PluginConfig[]);\n\n if (isUndefined(mergedConfig.logLevel)) {\n if (mergedConfig.mode === \"development\") {\n mergedConfig.logLevel = DEFAULT_DEVELOPMENT_LOG_LEVEL;\n } else if (mergedConfig.mode === \"test\") {\n mergedConfig.logLevel = DEFAULT_TEST_LOG_LEVEL;\n } else {\n mergedConfig.logLevel = DEFAULT_PRODUCTION_LOG_LEVEL;\n }\n }\n\n mergedConfig.logLevel = resolveLogLevel(mergedConfig.logLevel);\n\n if (isSetString(mergedConfig.tsconfig)) {\n mergedConfig.tsconfig = replacePath(\n replacePathTokens(this, mergedConfig.tsconfig),\n mergedConfig.cwd\n );\n } else {\n mergedConfig.tsconfig = getTsconfigFilePath(\n mergedConfig.cwd,\n mergedConfig.root\n );\n }\n\n // #region Configure output\n\n mergedConfig.output.format = getUnique(\n toArray(\n mergedConfig.output?.format ??\n (mergedConfig.projectType === \"library\" ? [\"cjs\", \"esm\"] : [\"esm\"])\n )\n );\n\n if (isSetString(mergedConfig.output.path)) {\n mergedConfig.output.path = appendPath(\n replacePathTokens(this, mergedConfig.output.path),\n mergedConfig.cwd\n );\n } else {\n mergedConfig.output.path = appendPath(\n joinPaths(mergedConfig.root, \"dist\"),\n mergedConfig.cwd\n );\n }\n\n mergedConfig.output.copy ??= {} as ResolvedCopyConfig;\n if (mergedConfig.output.copy !== false) {\n if (!mergedConfig.root.replace(/^\\.\\/?/, \"\")) {\n mergedConfig.output.copy.path = isSetString(\n mergedConfig.output.copy.path\n )\n ? appendPath(\n replacePathTokens(this, mergedConfig.output.copy.path),\n mergedConfig.cwd\n )\n : mergedConfig.output.path;\n } else {\n mergedConfig.output.copy.path = appendPath(\n replacePathTokens(\n this,\n isSetString(mergedConfig.output.copy.path)\n ? mergedConfig.output.copy.path\n : joinPaths(\"dist\", mergedConfig.root)\n ),\n mergedConfig.cwd\n );\n }\n }\n\n if (mergedConfig.output.types !== false) {\n mergedConfig.output.types = appendPath(\n replacePathTokens(\n this,\n mergedConfig.output.types ||\n joinPaths(\n mergedConfig.root,\n `${mergedConfig.framework?.name ?? \"powerlines\"}.d.ts`\n )\n ),\n mergedConfig.cwd\n );\n }\n\n if (\n mergedConfig.output.copy &&\n mergedConfig.output.copy.path &&\n mergedConfig.output.copy.assets &&\n Array.isArray(mergedConfig.output.copy.assets)\n ) {\n mergedConfig.output.copy.assets = getUniqueBy(\n mergedConfig.output.copy.assets.map(asset => {\n return {\n glob: isSetObject(asset) ? asset.glob : asset,\n input:\n isString(asset) ||\n !asset.input ||\n asset.input === \".\" ||\n asset.input === \"/\" ||\n asset.input === \"./\"\n ? mergedConfig.cwd\n : isParentPath(asset.input, mergedConfig.cwd) ||\n isEqual(asset.input, mergedConfig.cwd)\n ? asset.input\n : appendPath(asset.input, mergedConfig.cwd),\n output:\n isSetObject(asset) && isSetString(asset.output)\n ? isParentPath(asset.output, mergedConfig.cwd)\n ? asset.output\n : appendPath(\n joinPaths(\n (mergedConfig.output.copy as CopyConfig).path,\n replacePath(\n replacePath(\n asset.output,\n replacePath(\n (mergedConfig.output.copy as CopyConfig).path,\n mergedConfig.cwd\n )\n ),\n (mergedConfig.output.copy as CopyConfig).path\n )\n ),\n mergedConfig.cwd\n )\n : appendPath(\n (mergedConfig.output.copy as CopyConfig).path,\n mergedConfig.cwd\n ),\n ignore:\n isSetObject(asset) && asset.ignore\n ? toArray(asset.ignore)\n : undefined\n };\n }),\n (a: ResolvedAssetGlob) => `${a.input}-${a.glob}-${a.output}`\n );\n }\n\n if (isUndefined(mergedConfig.output?.sourceMap)) {\n if (mergedConfig.mode === \"development\") {\n mergedConfig.output.sourceMap = true;\n } else {\n mergedConfig.output.sourceMap = false;\n }\n }\n\n if (isUndefined(mergedConfig.output?.minify)) {\n if (mergedConfig.mode === \"production\") {\n mergedConfig.output.minify = true;\n } else {\n mergedConfig.output.minify = false;\n }\n }\n\n if (isUndefined(mergedConfig.output?.artifactsPath)) {\n mergedConfig.output.artifactsPath = `.${\n mergedConfig.framework?.name ?? \"powerlines\"\n }`;\n }\n\n if (mergedConfig.output.copy && mergedConfig.output.copy.assets) {\n mergedConfig.output.copy.assets = mergedConfig.output.copy.assets.map(\n asset => ({\n ...asset,\n glob: replacePathTokens(this, asset.glob),\n ignore: asset.ignore\n ? asset.ignore.map(ignore => replacePathTokens(this, ignore))\n : undefined,\n input: replacePathTokens(this, asset.input),\n output: replacePathTokens(this, asset.output)\n })\n );\n }\n\n if (\n (isSetString(mergedConfig.output?.storage) &&\n mergedConfig.output.storage === \"virtual\") ||\n (isSetObject(mergedConfig.output?.storage) &&\n Object.values(mergedConfig.output.storage).every(\n adapter => adapter.preset === \"virtual\"\n ))\n ) {\n mergedConfig.output.overwrite = true;\n }\n\n // #endregion Configure output\n\n this.resolvedConfig = mergedConfig;\n this.#configProxy = this.createConfigProxy();\n\n this.resolver = createResolver({\n cwd: this.resolvedConfig.cwd,\n root: this.resolvedConfig.root,\n cacheDir: this.envPaths.cache,\n mode: this.resolvedConfig.mode\n });\n\n this.logger.info({\n meta: { category: \"config\" },\n message: `Resolved Powerlines configuration object: \\n${formatConfig(\n this.resolvedConfig\n )}`\n });\n\n this.#fs ??= await VirtualFileSystem.create(this);\n }\n\n private createConfigProxy(): TResolvedConfig {\n return new Proxy(this.resolvedConfig, {\n /**\n * A trap for the `delete` operator.\n * @param target - The original object which is being proxied.\n * @param key - The name or `Symbol` of the property to delete.\n * @returns A `boolean` indicating whether or not the property was deleted.\n */\n deleteProperty: (target: TResolvedConfig, key) => {\n if (UNRESOLVED_CONFIG_NAMES.includes(key.toString())) {\n throw new Error(\n `Cannot delete property ${key.toString()} from config - it is only intended to be used as a reference.`\n );\n }\n\n Reflect.deleteProperty(this.overriddenConfig, key);\n return Reflect.deleteProperty(target, key);\n },\n\n /**\n * A trap for getting a property value.\n * @param target - The original object which is being proxied.\n * @param key - The name or `Symbol` of the property to get.\n * @param receiver - The proxy or an object that inherits from the proxy.\n */\n get: (target: TResolvedConfig, key, receiver) => {\n if (UNRESOLVED_CONFIG_NAMES.includes(key.toString())) {\n if (key === \"cwd\") {\n return this.cwd;\n }\n if (key === \"userConfig\") {\n return this.userConfig;\n }\n if (key === \"inlineConfig\") {\n return this.inlineConfig;\n }\n if (key === \"pluginConfig\") {\n return this.pluginConfig;\n }\n if (key === \"environmentConfig\") {\n return this.environmentConfig;\n }\n }\n\n return Reflect.get(target, key, receiver);\n },\n\n /**\n * A trap for the `in` operator.\n * @param target - The original object which is being proxied.\n * @param key - The name or `Symbol` of the property to check for existence.\n */\n has: (target: TResolvedConfig, key: string | symbol): boolean => {\n return (\n Reflect.has(target, key) ||\n UNRESOLVED_CONFIG_NAMES.includes(key.toString())\n );\n },\n\n /**\n * A trap for `Reflect.ownKeys()`.\n * @param target - The original object which is being proxied.\n */\n ownKeys: (target: TResolvedConfig): ArrayLike<string | symbol> => {\n return getUnique([\n ...Reflect.ownKeys(target),\n ...UNRESOLVED_CONFIG_NAMES\n ]);\n },\n\n /**\n * A trap for setting a property value.\n * @param target - The original object which is being proxied.\n * @param key - The name or `Symbol` of the property to set.\n * @param newValue - The new value to assign to the property.\n * @param receiver - The object to which the assignment was originally directed.\n * @returns A `boolean` indicating whether or not the property was set.\n */\n set: (\n target: TResolvedConfig,\n key: string | symbol,\n newValue: any,\n receiver: any\n ): boolean => {\n if (UNRESOLVED_CONFIG_NAMES.includes(key.toString())) {\n throw new Error(\n `Cannot change property ${key.toString()} from config - it is only intended to be used as a reference.`\n );\n }\n\n Reflect.set(this.overriddenConfig, key, newValue, receiver);\n return Reflect.set(target, key, newValue, receiver);\n }\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2IA,oBACE,IAFgB,MAAM,EAAE,kBAAkB,IAAM,CAE5C,EAAE,QACJ,aAAa,MAAM;CACjB,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,eAAe;CACf,YAAY;AACd,CAAC,CACH,CACF;AAEA,MAAM,0BAA0B;CAC9B;CACA;CACA;CACA;AACF;AAEA,IAAa,oBAAb,cAIU,sBAEV;CA6cwC;CA5ctC,YAA2B;CAE3B,WAAmB,KAAK;CAExB,aAAqB,KAAK;CAE1B;CAEA;CAEA;CAEA;CAEA;CAEA,AAAO;;;;CAKP,AAAO;;;;CAKP,AAAO,cAA+C;;;;CAKtD,AAAO;;;;CAKP,AAAO,eAA+C,CAAC;;;;CAKvD,AAAO,kBAAkD,CAAC;;;;CAK1D,AAAO,gBAAsC;;;;CAK7C,AAAO,kBAA4B,CAAC;;;;CAKpC,AAAU,iBAAkC,CAAC;;;;CAK7C,AAAU,mBACR,CAAC;;;;CAKH,AAAU,eACR,CAAC;;;;CAKH,AAAU,aAA4C,CAAC;;;;CAKvD,AAAU,eAAgD,CAAC;;;;CAK3D,AAAU,oBAAyB,CAAC;;;;CAKpC,IAAW,QAAuC;EAChD,MAAM,QAAQ,KAAK;EAEnB,OAAO,kBACL,MACA,SAAS,MAAM,SAAS,IACpB,QACA,MAAM,QAAQ,KAAK,OAAO,KAAK,KAC5B,YAAY,KAAK,OAAO,KAAK,KAC5B,CAAC,iBAAiB,KAAK,OAAO,KAAK,IACrC,KAAK,OAAO,QACZ,QAAQ,KAAK,OAAO,KAAK,EAAE,KAAK,CACxC;CACF;;;;CAKA,I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U,WAAwD;IAChE,OAAO,UAAU,CACf,GAAG,QAAQ,QAAQ,MAAM,GACzB,GAAG,uBACL,CAAC;GACH;;;;;;;;;GAUA,MACE,QACA,KACA,UACA,aACY;IACZ,IAAI,wBAAwB,SAAS,IAAI,SAAS,CAAC,GACjD,MAAM,IAAI,MACR,0BAA0B,IAAI,SAAS,EAAE,8DAC3C;IAGF,QAAQ,IAAI,KAAK,kBAAkB,KAAK,UAAU,QAAQ;IAC1D,OAAO,QAAQ,IAAI,QAAQ,KAAK,UAAU,QAAQ;GACpD;EACF,CAAC;CACH;AACF"}
|
package/dist/index.d.cts
CHANGED
|
@@ -6,7 +6,7 @@ import { CallHookOptions, HookListOrders, HooksList, HooksListItem, InferHookFun
|
|
|
6
6
|
import { CustomLogger, CustomLoggerMessage, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, PowerlinesMessage } from "./types/logging.cjs";
|
|
7
7
|
import { DeepkitOptions, Level, ParsedTypeScriptConfig, RawReflectionMode, ReflectionMode, TSCompilerOptions, TSConfig } from "./types/tsconfig.cjs";
|
|
8
8
|
import { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentPlugin, ExecutionContext, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext } from "./types/context.cjs";
|
|
9
|
-
import { BaseExecutionOptions, BuildInlineConfig, CleanInlineConfig, Config, ConfigParams, CopyConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, FrameworkOptions, InferOverridableConfig, InlineConfig, InlineConfigPaths, LintInlineConfig, Mode, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise,
|
|
9
|
+
import { BaseExecutionOptions, BuildInlineConfig, CleanInlineConfig, Config, ConfigParams, CopyConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, FrameworkOptions, InferOverridableConfig, InlineConfig, InlineConfigPaths, LintInlineConfig, Mode, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise, WorkspaceConfig } from "./types/config.cjs";
|
|
10
10
|
import { PartiallyResolvedContext, ResolvePackageConfigsResult, defineConfig, getDefaultLogLevel, getDefaultMode, loadParsedConfig, loadUserConfigFile, loadWorkspaceConfig, normalizeBasePath, resolvePackageConfigs, resolveRoot, tryResolveWorkspaceConfig } from "./lib/config.cjs";
|
|
11
11
|
import { getConfigProps, resolvePluginConfig } from "./lib/context-helpers.cjs";
|
|
12
12
|
import { getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync } from "./lib/entry.cjs";
|
|
@@ -30,4 +30,4 @@ import { getMagicString, getSourceFile, getString } from "./lib/utilities/source
|
|
|
30
30
|
import { generateSourceMap } from "./lib/utilities/source-map.cjs";
|
|
31
31
|
import { writeFile } from "./lib/utilities/write-file.cjs";
|
|
32
32
|
import { VirtualFileSystem } from "./lib/vfs.cjs";
|
|
33
|
-
export { BaseCommandType, BaseContext, BaseExecutionAPIMethods, BaseExecutionOptions, BasePlugin, BufferedChunk, BuildInlineConfig, BuildPluginContext, BuilderVariant, CallHookOptions, CleanInlineConfig, CommandType, Commands, Config, ConfigParams, Context, CopyConfig, CreateContextOptions, CreateInlineConfig, CreateResolverOptions, CreateStreamReaderOptions, CreateStreamSinkOptions, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, CustomLogger, CustomLoggerMessage, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, EnvironmentConfig, EnvironmentContext, EnvironmentPlugin, EnvironmentResolvedConfig, ExecutionContext, ExecutionOptions, FetchOptions, FileHeaderOptions, FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, FrameworkOptions, HookFunctions, HookListOrders, Hooks, HooksList, HooksListItem, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, InferOverridableConfig, InitContextOptions, InlineConfig, InlineConfigPaths, Level, LintInlineConfig, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, MetaInfo, Mode, NormalizedStringFilter, Options, OutputConfig, ParseOptions, ParsedTypeScriptConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PartiallyResolvedContext, Plugin, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginContext, PluginFactory, PluginFilter, PluginHook, PluginHookFields, PluginHookObject, PluginHooks, PluginNonHookFields, PowerlinesExecutionAPIMethods, PowerlinesMessage, PrepareInlineConfig, ProjectType, RawReflectionMode, ReflectionMode, ResolveConfig, ResolveOptions, ResolvePackageConfigsResult, ResolvePluginsOptions, ResolveResult, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, StorageAdapter, StoragePort, StoragePreset, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, SupportedCommands, TSCompilerOptions, TSConfig, TestInlineConfig, TransformHookFilter, TransformResult, TypegenContext, TypesInlineConfig, TypesResult, UnimportContext, UnpluginBuilderVariant, UnpluginHookFunctions, UnpluginOptions, UnresolvedContext, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise,
|
|
33
|
+
export { BaseCommandType, BaseContext, BaseExecutionAPIMethods, BaseExecutionOptions, BasePlugin, BufferedChunk, BuildInlineConfig, BuildPluginContext, BuilderVariant, CallHookOptions, CleanInlineConfig, CommandType, Commands, Config, ConfigParams, Context, CopyConfig, CreateContextOptions, CreateInlineConfig, CreateResolverOptions, CreateStreamReaderOptions, CreateStreamSinkOptions, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, CustomLogger, CustomLoggerMessage, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, EnvironmentConfig, EnvironmentContext, EnvironmentPlugin, EnvironmentResolvedConfig, ExecutionContext, ExecutionOptions, FetchOptions, FileHeaderOptions, FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, FrameworkOptions, HookFunctions, HookListOrders, Hooks, HooksList, HooksListItem, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, InferOverridableConfig, InitContextOptions, InlineConfig, InlineConfigPaths, Level, LintInlineConfig, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, MetaInfo, Mode, NormalizedStringFilter, Options, OutputConfig, ParseOptions, ParsedTypeScriptConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PartiallyResolvedContext, Plugin, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginContext, PluginFactory, PluginFilter, PluginHook, PluginHookFields, PluginHookObject, PluginHooks, PluginNonHookFields, PowerlinesExecutionAPIMethods, PowerlinesMessage, PrepareInlineConfig, ProjectType, RawReflectionMode, ReflectionMode, ResolveConfig, ResolveOptions, ResolvePackageConfigsResult, ResolvePluginsOptions, ResolveResult, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, StorageAdapter, StoragePort, StoragePreset, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, SupportedCommands, TSCompilerOptions, TSConfig, TestInlineConfig, TransformHookFilter, TransformResult, TypegenContext, TypesInlineConfig, TypesResult, UnimportContext, UnpluginBuilderVariant, UnpluginHookFunctions, UnpluginOptions, UnresolvedContext, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystem, VirtualFileSystemHost, VirtualFileSystemInterface, WithUnpluginBuildContext, WorkspaceConfig, WriteData, WriteOptions, _capnpFileId, callHook, combineContexts, createEventEmitter, createProgram, createResolver, createStreamReader, createStreamSink, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, emitBuiltinTypes, extractHooks, findIncludeMatch, findMatch, format, formatFolder, formatTypes, generateSourceMap, getConfigProps, getDefaultLogLevel, getDefaultMode, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getParsedTypeScriptConfig, getPersistedMeta, getPrefixedRootHash, getSourceFile, getString, getTsconfigDtsPath, getTsconfigFilePath, getTypescriptFileHeader, getUniqueInputs, handleTypes, initPlugin, initializeTsconfig, installDependencies, isIncludeMatchFound, isMatchFound, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadParsedConfig, loadUserConfigFile, loadWorkspaceConfig, mergeConfigs, mergeResults, normalizeBasePath, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, resolvePackageConfigs, resolvePlugin, resolvePluginConfig, resolvePlugins, resolveRoot, resolveTsconfig, tryResolveWorkspaceConfig, tryTsconfigFilePath, writeFile, writeMetaFile };
|
package/dist/index.d.mts
CHANGED
|
@@ -6,7 +6,7 @@ import { CallHookOptions, HookListOrders, HooksList, HooksListItem, InferHookFun
|
|
|
6
6
|
import { CustomLogger, CustomLoggerMessage, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, PowerlinesMessage } from "./types/logging.mjs";
|
|
7
7
|
import { DeepkitOptions, Level, ParsedTypeScriptConfig, RawReflectionMode, ReflectionMode, TSCompilerOptions, TSConfig } from "./types/tsconfig.mjs";
|
|
8
8
|
import { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentPlugin, ExecutionContext, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext } from "./types/context.mjs";
|
|
9
|
-
import { BaseExecutionOptions, BuildInlineConfig, CleanInlineConfig, Config, ConfigParams, CopyConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, FrameworkOptions, InferOverridableConfig, InlineConfig, InlineConfigPaths, LintInlineConfig, Mode, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise,
|
|
9
|
+
import { BaseExecutionOptions, BuildInlineConfig, CleanInlineConfig, Config, ConfigParams, CopyConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, FrameworkOptions, InferOverridableConfig, InlineConfig, InlineConfigPaths, LintInlineConfig, Mode, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise, WorkspaceConfig } from "./types/config.mjs";
|
|
10
10
|
import { PartiallyResolvedContext, ResolvePackageConfigsResult, defineConfig, getDefaultLogLevel, getDefaultMode, loadParsedConfig, loadUserConfigFile, loadWorkspaceConfig, normalizeBasePath, resolvePackageConfigs, resolveRoot, tryResolveWorkspaceConfig } from "./lib/config.mjs";
|
|
11
11
|
import { getConfigProps, resolvePluginConfig } from "./lib/context-helpers.mjs";
|
|
12
12
|
import { getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync } from "./lib/entry.mjs";
|
|
@@ -30,4 +30,4 @@ import { getMagicString, getSourceFile, getString } from "./lib/utilities/source
|
|
|
30
30
|
import { generateSourceMap } from "./lib/utilities/source-map.mjs";
|
|
31
31
|
import { writeFile } from "./lib/utilities/write-file.mjs";
|
|
32
32
|
import { VirtualFileSystem } from "./lib/vfs.mjs";
|
|
33
|
-
export { BaseCommandType, BaseContext, BaseExecutionAPIMethods, BaseExecutionOptions, BasePlugin, BufferedChunk, BuildInlineConfig, BuildPluginContext, BuilderVariant, CallHookOptions, CleanInlineConfig, CommandType, Commands, Config, ConfigParams, Context, CopyConfig, CreateContextOptions, CreateInlineConfig, CreateResolverOptions, CreateStreamReaderOptions, CreateStreamSinkOptions, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, CustomLogger, CustomLoggerMessage, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, EnvironmentConfig, EnvironmentContext, EnvironmentPlugin, EnvironmentResolvedConfig, ExecutionContext, ExecutionOptions, FetchOptions, FileHeaderOptions, FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, FrameworkOptions, HookFunctions, HookListOrders, Hooks, HooksList, HooksListItem, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, InferOverridableConfig, InitContextOptions, InlineConfig, InlineConfigPaths, Level, LintInlineConfig, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, MetaInfo, Mode, NormalizedStringFilter, Options, OutputConfig, ParseOptions, ParsedTypeScriptConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PartiallyResolvedContext, Plugin, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginContext, PluginFactory, PluginFilter, PluginHook, PluginHookFields, PluginHookObject, PluginHooks, PluginNonHookFields, PowerlinesExecutionAPIMethods, PowerlinesMessage, PrepareInlineConfig, ProjectType, RawReflectionMode, ReflectionMode, ResolveConfig, ResolveOptions, ResolvePackageConfigsResult, ResolvePluginsOptions, ResolveResult, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, StorageAdapter, StoragePort, StoragePreset, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, SupportedCommands, TSCompilerOptions, TSConfig, TestInlineConfig, TransformHookFilter, TransformResult, TypegenContext, TypesInlineConfig, TypesResult, UnimportContext, UnpluginBuilderVariant, UnpluginHookFunctions, UnpluginOptions, UnresolvedContext, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise,
|
|
33
|
+
export { BaseCommandType, BaseContext, BaseExecutionAPIMethods, BaseExecutionOptions, BasePlugin, BufferedChunk, BuildInlineConfig, BuildPluginContext, BuilderVariant, CallHookOptions, CleanInlineConfig, CommandType, Commands, Config, ConfigParams, Context, CopyConfig, CreateContextOptions, CreateInlineConfig, CreateResolverOptions, CreateStreamReaderOptions, CreateStreamSinkOptions, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, CustomLogger, CustomLoggerMessage, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, EnvironmentConfig, EnvironmentContext, EnvironmentPlugin, EnvironmentResolvedConfig, ExecutionContext, ExecutionOptions, FetchOptions, FileHeaderOptions, FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, FrameworkOptions, HookFunctions, HookListOrders, Hooks, HooksList, HooksListItem, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, InferOverridableConfig, InitContextOptions, InlineConfig, InlineConfigPaths, Level, LintInlineConfig, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, MetaInfo, Mode, NormalizedStringFilter, Options, OutputConfig, ParseOptions, ParsedTypeScriptConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PartiallyResolvedContext, Plugin, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginContext, PluginFactory, PluginFilter, PluginHook, PluginHookFields, PluginHookObject, PluginHooks, PluginNonHookFields, PowerlinesExecutionAPIMethods, PowerlinesMessage, PrepareInlineConfig, ProjectType, RawReflectionMode, ReflectionMode, ResolveConfig, ResolveOptions, ResolvePackageConfigsResult, ResolvePluginsOptions, ResolveResult, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, StorageAdapter, StoragePort, StoragePreset, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, SupportedCommands, TSCompilerOptions, TSConfig, TestInlineConfig, TransformHookFilter, TransformResult, TypegenContext, TypesInlineConfig, TypesResult, UnimportContext, UnpluginBuilderVariant, UnpluginHookFunctions, UnpluginOptions, UnresolvedContext, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystem, VirtualFileSystemHost, VirtualFileSystemInterface, WithUnpluginBuildContext, WorkspaceConfig, WriteData, WriteOptions, _capnpFileId, callHook, combineContexts, createEventEmitter, createProgram, createResolver, createStreamReader, createStreamSink, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, emitBuiltinTypes, extractHooks, findIncludeMatch, findMatch, format, formatFolder, formatTypes, generateSourceMap, getConfigProps, getDefaultLogLevel, getDefaultMode, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getParsedTypeScriptConfig, getPersistedMeta, getPrefixedRootHash, getSourceFile, getString, getTsconfigDtsPath, getTsconfigFilePath, getTypescriptFileHeader, getUniqueInputs, handleTypes, initPlugin, initializeTsconfig, installDependencies, isIncludeMatchFound, isMatchFound, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadParsedConfig, loadUserConfigFile, loadWorkspaceConfig, mergeConfigs, mergeResults, normalizeBasePath, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, resolvePackageConfigs, resolvePlugin, resolvePluginConfig, resolvePlugins, resolveRoot, resolveTsconfig, tryResolveWorkspaceConfig, tryTsconfigFilePath, writeFile, writeMetaFile };
|
package/dist/lib/config.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LogLevelResolvedConfig } from "../types/logging.cjs";
|
|
2
2
|
import { Context } from "../types/context.cjs";
|
|
3
|
-
import { FrameworkOptions, InlineConfig, Mode, ParsedUserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise,
|
|
3
|
+
import { FrameworkOptions, InlineConfig, Mode, ParsedUserConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise, WorkspaceConfig } from "../types/config.cjs";
|
|
4
4
|
import { PartialKeys } from "@stryke/types/base";
|
|
5
5
|
import { PackageJson } from "@stryke/types/package-json";
|
|
6
6
|
|
|
@@ -127,10 +127,10 @@ declare function loadUserConfigFile(cwd: string, root: string, mode: Mode, comma
|
|
|
127
127
|
* });
|
|
128
128
|
* ```
|
|
129
129
|
*/
|
|
130
|
-
declare function defineConfig(config:
|
|
131
|
-
declare function defineConfig(config:
|
|
132
|
-
declare function defineConfig(config: Promise<
|
|
133
|
-
declare function defineConfig(config: Promise<
|
|
130
|
+
declare function defineConfig(config: UserConfig): UserConfig;
|
|
131
|
+
declare function defineConfig(config: UserConfig[]): UserConfig[];
|
|
132
|
+
declare function defineConfig(config: Promise<UserConfig>): Promise<UserConfig>;
|
|
133
|
+
declare function defineConfig(config: Promise<UserConfig[]>): Promise<UserConfig[]>;
|
|
134
134
|
declare function defineConfig(config: UserConfigFnObject): UserConfigFnObject;
|
|
135
135
|
declare function defineConfig(config: UserConfigFnPromise): UserConfigFnPromise;
|
|
136
136
|
declare function defineConfig(config: UserConfigFn): UserConfigFn;
|
|
@@ -1 +1 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A,EAAQ,UAAA,KAAe,UAAU;AAAA,iBAC9C,YAAA,CAAa,MAAA,EAAQ,OAAA,CAAQ,UAAA,IAAc,OAAA,CAAQ,UAAA;AAAA,iBACnD,YAAA,CACd,MAAA,EAAQ,OAAA,CAAQ,UAAA,MACf,OAAA,CAAQ,UAAA;AAAA,iBACK,YAAA,CAAa,MAAA,EAAQ,kBAAA,GAAqB,kBAAkB;AAAA,iBAC5D,YAAA,CAAa,MAAA,EAAQ,mBAAA,GAAsB,mBAAmB;AAAA,iBAC9D,YAAA,CAAa,MAAA,EAAQ,YAAA,GAAe,YAAY;AAAA,iBAChD,YAAA,CAAa,MAAA,EAAQ,gBAAA,GAAmB,gBAAgB"}
|
package/dist/lib/config.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LogLevelResolvedConfig } from "../types/logging.mjs";
|
|
2
2
|
import { Context } from "../types/context.mjs";
|
|
3
|
-
import { FrameworkOptions, InlineConfig, Mode, ParsedUserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise,
|
|
3
|
+
import { FrameworkOptions, InlineConfig, Mode, ParsedUserConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise, WorkspaceConfig } from "../types/config.mjs";
|
|
4
4
|
import { PartialKeys } from "@stryke/types/base";
|
|
5
5
|
import { PackageJson } from "@stryke/types/package-json";
|
|
6
6
|
|
|
@@ -127,10 +127,10 @@ declare function loadUserConfigFile(cwd: string, root: string, mode: Mode, comma
|
|
|
127
127
|
* });
|
|
128
128
|
* ```
|
|
129
129
|
*/
|
|
130
|
-
declare function defineConfig(config:
|
|
131
|
-
declare function defineConfig(config:
|
|
132
|
-
declare function defineConfig(config: Promise<
|
|
133
|
-
declare function defineConfig(config: Promise<
|
|
130
|
+
declare function defineConfig(config: UserConfig): UserConfig;
|
|
131
|
+
declare function defineConfig(config: UserConfig[]): UserConfig[];
|
|
132
|
+
declare function defineConfig(config: Promise<UserConfig>): Promise<UserConfig>;
|
|
133
|
+
declare function defineConfig(config: Promise<UserConfig[]>): Promise<UserConfig[]>;
|
|
134
134
|
declare function defineConfig(config: UserConfigFnObject): UserConfigFnObject;
|
|
135
135
|
declare function defineConfig(config: UserConfigFnPromise): UserConfigFnPromise;
|
|
136
136
|
declare function defineConfig(config: UserConfigFn): UserConfigFn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/lib/config.ts"],"mappings":";;;;;;;iBA4DgB,iBAAA,CAAkB,IAAkB;AAAA,UAMnC,2BAAA;EAND;;;EAUd,WAAA,GAAc,WAAA;EAVoC;AAMpD;;EASE,WAAA,GAAc,MAAM;AAAA;;;;;;AAAA;AAatB;;;;iBAAsB,qBAAA,CACpB,GAAA,UACA,IAAA,WACC,OAAO,CAAC,2BAAA;;;;;AAA2B;AA+BtC;;;iBAAgB,WAAA,CACd,GAAA,UACA,IAAA,WACA,UAAA;;;;;AAAmB;AAmCrB;;iBAAsB,yBAAA,CACpB,GAAA,UACA,IAAA,YACC,OAAO,CAAC,eAAA;;;;;;;AAAe;AAiB1B;;;iBAAsB,cAAA,CACpB,GAAA,UACA,IAAA,YACC,OAAO,CAAC,IAAA;;;;;;AAAI;AAsBf;;;;iBAAsB,kBAAA,CACpB,GAAA,UACA,IAAA,YACC,OAAO,CAAC,sBAAA;;;;;AAAsB;AAgCjC;;;;;;;;;iBAAsB,gBAAA,CACpB,GAAA,UACA,IAAA,UACA,SAAA,UACA,KAAA,UACA,YAAA,EAAc,YAAA,GAAY,OAAA,CAAA,gBAAA;AAAA,KAwBhB,wBAAA,kBAA0C,OAAA,GAAU,OAAA,IAAW,IAAA,CACzE,QAAA,sEAGA,OAAA,CAAQ,QAAA;EACN,MAAA,EAAQ,QAAA;AAAA;;;;;AA7BgB;AAwB5B;;iBAesB,mBAAA,CACpB,GAAA,UACA,IAAA,WACC,OAAO,CAAC,eAAA;;;;;;;;;;;;;;;iBA2BW,kBAA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ACA,IAAA,EAAM,IAAA,EACN,OAAA,UACA,SAAA,GAAY,WAAA,CAAY,gBAAA,YACxB,UAAA,YACC,OAAA,CAAQ,gBAAA;;;;;AA/CS;AAUpB;;;;;;;;;AAG0B;AA2B1B;;;;;iBA+KgB,YAAA,CAAa,MAAA,EAAQ,UAAA,GAAa,UAAU;AAAA,iBAC5C,YAAA,CAAa,MAAA,EAAQ,UAAA,KAAe,UAAU;AAAA,iBAC9C,YAAA,CAAa,MAAA,EAAQ,OAAA,CAAQ,UAAA,IAAc,OAAA,CAAQ,UAAA;AAAA,iBACnD,YAAA,CACd,MAAA,EAAQ,OAAA,CAAQ,UAAA,MACf,OAAA,CAAQ,UAAA;AAAA,iBACK,YAAA,CAAa,MAAA,EAAQ,kBAAA,GAAqB,kBAAkB;AAAA,iBAC5D,YAAA,CAAa,MAAA,EAAQ,mBAAA,GAAsB,mBAAmB;AAAA,iBAC9D,YAAA,CAAa,MAAA,EAAQ,YAAA,GAAe,YAAY;AAAA,iBAChD,YAAA,CAAa,MAAA,EAAQ,gBAAA,GAAmB,gBAAgB"}
|
package/dist/lib/config.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.mjs","names":["loadConfigC12"],"sources":["../../src/lib/config.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 {\n getWorkspaceConfig,\n tryGetWorkspaceConfig\n} from \"@storm-software/config-tools/get-config\";\nimport {\n isDevelopment,\n isProduction,\n isTest\n} from \"@stryke/env/environment-checks\";\nimport { getEnvPaths } from \"@stryke/env/get-env-paths\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { isFile } from \"@stryke/fs/is-file\";\nimport { readJsonFile } from \"@stryke/fs/json\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { findFilePath, relativePath } from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { PartialKeys } from \"@stryke/types/base\";\nimport { PackageJson } from \"@stryke/types/package-json\";\nimport { loadConfig as loadConfigC12 } from \"c12\";\nimport defu from \"defu\";\nimport { resolveLogLevel } from \"../plugin-utils/logging\";\nimport type {\n FrameworkOptions,\n InlineConfig,\n Mode,\n ParsedUserConfig,\n UserConfigExport,\n UserConfigFn,\n UserConfigFnObject,\n UserConfigFnPromise,\n UserInputConfig,\n WorkspaceConfig\n} from \"../types/config\";\nimport { Context } from \"../types/context\";\nimport { LogLevelResolvedConfig } from \"../types/logging\";\nimport { createResolver } from \"./resolver\";\n\nexport function normalizeBasePath(base: string = \"/\"): string {\n let out = base.startsWith(\"/\") ? base : `/${base}`;\n if (!out.endsWith(\"/\")) out = `${out}/`;\n return out.replace(/\\/+/g, \"/\");\n}\n\nexport interface ResolvePackageConfigsResult {\n /**\n * The parsed `package.json` file for the project, if it exists. This file typically contains metadata about the project, such as its name, version, dependencies, and other information relevant to the build process.\n */\n packageJson?: PackageJson;\n\n /**\n * The parsed `project.json` file for the project, if it exists. This file is an optional configuration file that can be used to store additional configuration or metadata specific to the project, and is not required for all projects.\n */\n projectJson?: Record<string, unknown>;\n}\n\n/**\n * Resolve the package configurations for the project by loading the `package.json` and `project.json` files, if they exist. This function will look for these files in the project root and parse their contents as JavaScript objects. The parsed contents will be stored in the context for later use by plugins and other parts of the build process.\n *\n * @remarks\n * The `package.json` file is typically used to store metadata about the project, such as its name, version, dependencies, and other information. The `project.json` file is an optional file that can be used to store additional configuration or metadata specific to the project, and is not required for all projects.\n *\n * @param cwd - The current working directory to look for the package configurations. Defaults to the `cwd` specified in the context configuration.\n * @param root - The root directory of the project to look for the package configurations. Defaults to the `root` specified in the context configuration.\n * @returns A promise that resolves when the package configurations have been loaded and stored in the context.\n */\nexport async function resolvePackageConfigs(\n cwd: string,\n root: string\n): Promise<ResolvePackageConfigsResult> {\n const result: ResolvePackageConfigsResult = {};\n if (cwd || root) {\n const projectJsonPath = joinPaths(\n appendPath(root || \".\", cwd || \".\"),\n \"project.json\"\n );\n if (existsSync(projectJsonPath)) {\n result.projectJson = await readJsonFile(projectJsonPath);\n }\n\n const packageJsonPath = joinPaths(\n appendPath(root || \".\", cwd || \".\"),\n \"package.json\"\n );\n if (existsSync(packageJsonPath)) {\n result.packageJson = await readJsonFile<PackageJson>(packageJsonPath);\n }\n }\n\n return result;\n}\n\n/**\n * Resolve the root directory for the project based on the provided options. This function will determine the root directory by checking the provided `root` option, and if it is not provided, it will look for a configuration file (such as `powerlines.config.ts`) in the current working directory. If a configuration file is found, the root directory will be set to the directory containing that file. If no configuration file is found, the root directory will default to the current working directory.\n *\n * @param cwd - The current working directory to use as the base for resolving the root directory. This is typically the directory from which the Powerlines process was executed.\n * @param root - An optional root directory to use for the project. If provided, this will be used as the root directory instead of looking for a configuration file. This can be an absolute or relative path, and if it is relative, it will be resolved based on the current working directory.\n * @param configFile - An optional path to a configuration file to look for when resolving the root directory. If provided, this file will be used to determine the root directory if the `root` option is not provided. This can be an absolute or relative path, and if it is relative, it will be resolved based on the current working directory.\n * @returns The resolved root directory for the project, which will be used as the base for resolving other paths and configurations throughout the Powerlines process. This will typically be an absolute path to the root directory of the project.\n */\nexport function resolveRoot(\n cwd: string,\n root?: string,\n configFile?: string\n): string {\n let result = root || \".\";\n if (!root) {\n if (configFile) {\n const configFilePath = appendPath(configFile, cwd);\n if (!existsSync(configFilePath)) {\n throw new Error(\n `The user-provided configuration file at \"${configFile}\" does not exist. Please ensure this path is correct and try again.`\n );\n }\n if (!isFile(configFile)) {\n throw new Error(\n `The user-provided configuration file at \"${\n configFile\n }\" is not a file. Please ensure this path is correct and try again.`\n );\n }\n\n result = relativePath(cwd, findFilePath(configFile));\n }\n } else {\n result = replacePath(root, cwd);\n }\n\n return result;\n}\n\n/**\n * Retrieve the workspace configuration for the current project, if it exists. This function will look for a configuration file in the project root and return its contents as a JavaScript object. If no configuration file is found, it will return undefined.\n *\n * @param cwd - The current working directory to start searching from. This is typically the directory from which the Powerlines process was executed.\n * @param root - An optional root directory to use as the base for searching for the configuration file. If provided, this will be used as the starting point for searching for the configuration file instead of the current working directory. This can be an absolute or relative path, and if it is relative, it will be resolved based on the current working directory.\n * @returns A promise that resolves to the workspace configuration object, or undefined if no configuration file is found.\n */\nexport async function tryResolveWorkspaceConfig(\n cwd: string,\n root?: string\n): Promise<WorkspaceConfig | undefined> {\n return tryGetWorkspaceConfig(false, {\n cwd: root ? appendPath(root, cwd) : undefined,\n workspaceRoot: cwd\n });\n}\n\n/**\n * Determine the default mode for the current execution based on the environment and workspace configuration. This function will check the `NODE_ENV` environment variable to determine if the current environment is development, production, or test. If `NODE_ENV` is not set, it will look for a `mode` property in the workspace configuration file. If no mode is specified in the workspace configuration, it will default to \"production\".\n *\n * @remarks\n * The mode is used to determine which configuration file to load (e.g., `powerlines.development.config.js` for development mode, `powerlines.production.config.js` for production mode, etc.) and can also be used by plugins and other parts of the build process to conditionally apply certain behaviors based on the current mode.\n *\n * @param cwd - The current working directory to start searching from. This is typically the directory from which the Powerlines process was executed.\n * @param root - An optional root directory to use as the base for searching for the workspace configuration. If provided, this will be used as the starting point for searching for the workspace configuration instead of the current working directory. This can be an absolute or relative path, and if it is relative, it will be resolved based on the current working directory.\n * @returns A promise that resolves to the default mode for the current execution, which can be \"development\", \"production\", or \"test\".\n */\nexport async function getDefaultMode(\n cwd: string,\n root?: string\n): Promise<Mode> {\n const workspaceConfig = await tryResolveWorkspaceConfig(cwd, root);\n\n return isProduction\n ? \"production\"\n : isDevelopment\n ? \"development\"\n : isTest\n ? \"test\"\n : workspaceConfig?.mode || \"production\";\n}\n\n/**\n * Determine the default log level for the current execution based on the environment and workspace configuration. This function will check the `logLevel` property in the workspace configuration file and resolve it to a `LogLevelResolvedConfig` value. If no log level is specified in the workspace configuration, it will default to \"info\" for development mode and \"warn\" for production mode.\n *\n * @remarks\n * The log level is used to determine which log messages should be output during the execution of the Powerlines process. For example, if the log level is set to \"warn\", only messages with a level of \"warn\", \"error\", or \"fatal\" will be output, while messages with a level of \"info\", \"debug\", or \"trace\" will be suppressed. This allows users to control the verbosity of the logs and focus on the most relevant information based on their current needs.\n *\n * @param cwd - The current working directory to start searching from. This is typically the directory from which the Powerlines process was executed.\n * @param root - An optional root directory to use as the base for searching for the workspace configuration. If provided, this will be used as the starting point for searching for the workspace configuration instead of the current working directory. This can be an absolute or relative path, and if it is relative, it will be resolved based on the current working directory.\n * @returns A promise that resolves to the default log level for the current execution, which can be \"fatal\", \"error\", \"warn\", \"info\", \"debug\", or \"trace\".\n */\nexport async function getDefaultLogLevel(\n cwd: string,\n root?: string\n): Promise<LogLevelResolvedConfig> {\n const workspaceConfig = await tryResolveWorkspaceConfig(cwd, root);\n\n return resolveLogLevel(\n workspaceConfig?.logLevel\n ? workspaceConfig.logLevel === \"success\" ||\n workspaceConfig.logLevel === \"performance\"\n ? \"info\"\n : workspaceConfig.logLevel === \"all\"\n ? \"debug\"\n : workspaceConfig.logLevel === \"fatal\"\n ? \"error\"\n : workspaceConfig.logLevel\n : undefined,\n workspaceConfig?.mode || (await getDefaultMode(cwd, root))\n );\n}\n\n/**\n * Load the user configuration file for the project and set up the context with the loaded configuration. This function will be called during the initialization of the context to load the user configuration file based on the provided options and set up the context accordingly. It will also set up the resolver for loading modules from the user configuration file and ensure that the context is properly initialized with the loaded configuration.\n *\n * @remarks\n * This method will set up the resolver and load the user configuration file based on the provided options. It is called during the construction of the context and can also be called when cloning the context to ensure that the new context has the same configuration and resolver setup.\n *\n * @param cwd - The current working directory to start searching from. This is typically the directory from which the Powerlines process was executed.\n * @param root - The root directory of the project to look for the configuration file. This is typically the root directory of the project, which may be different from the current working directory if the process was executed from a subdirectory.\n * @param framework - The name of the framework to use when looking for configuration files (default is \"powerlines\"). This is used to determine the naming convention for the configuration files to look for (e.g., `powerlines.development.config.js` for the \"powerlines\" framework in development mode).\n * @param orgId - The name of the organization to use when looking for configuration files (optional). This can be used to further customize the naming convention for the configuration files to look for (e.g., `powerlines.myorg.development.config.js` for the \"powerlines\" framework in development mode with an organization of \"myorg\").\n * @param inlineConfig - The inline configuration options provided during the execution of a Powerlines command, which can include properties such as the project root, mode, and an explicit path to a configuration file. This is used to determine how the context should be initialized and which configuration file should be loaded for the execution.\n * @returns A promise that resolves when the context has been successfully initialized with the loaded configuration and resolver setup.\n * @throws Will throw an error if no configuration file is found in the project root or current working directory. This ensures that the context cannot be initialized without a valid configuration, which is essential for the proper functioning of the Powerlines process.\n */\nexport async function loadParsedConfig(\n cwd: string,\n root: string,\n framework: string,\n orgId: string,\n inlineConfig: InlineConfig\n) {\n const mode = inlineConfig.mode || (await getDefaultMode(cwd, root));\n\n const configFile = await loadUserConfigFile(\n cwd,\n root,\n mode,\n inlineConfig.command,\n { name: framework, orgId },\n inlineConfig.configFile\n );\n if (!configFile) {\n throw new Error(\n `No configuration file found in ${appendPath(\n root,\n cwd\n )}. Please ensure you have a valid configuration file in your project.`\n );\n }\n\n return configFile;\n}\n\nexport type PartiallyResolvedContext<TContext extends Context = Context> = Omit<\n TContext,\n \"config\" | \"tsconfig\" | \"entry\" | \"fs\" | \"compiler\" | \"unimport\"\n> &\n Partial<TContext> & {\n config: TContext[\"config\"];\n };\n\n/**\n * Loads the workspace configuration.\n *\n * @param cwd - The root directory of the workspace.\n * @param root - The current working directory to start searching from.\n * @returns A promise that resolves to the loaded workspace configuration.\n */\nexport async function loadWorkspaceConfig(\n cwd: string,\n root: string\n): Promise<WorkspaceConfig> {\n return defu(\n {\n workspaceRoot: cwd\n },\n await getWorkspaceConfig(true, {\n cwd: root,\n workspaceRoot: cwd,\n useDefault: true\n })\n );\n}\n\n/**\n * Loads the user configuration file for the project.\n *\n * @remarks\n * This function will attempt to locate and load the user configuration file for the project based on the provided parameters. It will look for configuration files in various formats (e.g., `.ts`, `.js`, `.mts`, `.mjs`) and with different naming conventions (e.g., `powerlines.config.ts`, `powerlines.development.config.js`, etc.) in the project root and current working directory. If a configuration file is found, it will be loaded using a Jiti resolver, and the resulting configuration object will be returned. If no configuration file is found, an empty configuration object will be returned.\n *\n * @param cwd - The current working directory to start searching from.\n * @param root - The root directory of the project.\n * @param mode - The mode to determine which configuration file to load (e.g., \"development\", \"test\", \"production\").\n * @param command - The command being executed (e.g., \"build\", \"dev\", \"test\"), which can be used to further customize the configuration loading logic if needed.\n * @param framework - The name of the framework to use when looking for configuration files (default is \"powerlines\").\n * @param configFile - An explicit path to a configuration file to load (optional). If provided, this file will be loaded instead of searching for configuration files based on the mode and framework.\n * @returns A promise that resolves to the resolved user configuration.\n */\nexport async function loadUserConfigFile(\n cwd: string,\n root: string,\n mode: Mode,\n command: string,\n framework?: PartialKeys<FrameworkOptions, \"orgId\">,\n configFile?: string\n): Promise<ParsedUserConfig> {\n const frameworkName = kebabCase(framework?.name || \"powerlines\");\n const frameworkOrgId = kebabCase(framework?.orgId || \"storm-software\");\n\n let resolvedUserConfig: Partial<ParsedUserConfig> = {};\n\n let resolvedUserConfigFile: string | undefined;\n if (configFile) {\n resolvedUserConfigFile = existsSync(replacePath(configFile, root))\n ? replacePath(configFile, root)\n : existsSync(\n joinPaths(appendPath(root, cwd), replacePath(configFile, root))\n )\n ? joinPaths(appendPath(root, cwd), replacePath(configFile, root))\n : existsSync(joinPaths(appendPath(root, cwd), configFile))\n ? joinPaths(appendPath(root, cwd), configFile)\n : undefined;\n }\n\n if (!resolvedUserConfigFile) {\n resolvedUserConfigFile = existsSync(\n joinPaths(appendPath(root, cwd), `${frameworkName}.${mode}.config.ts`)\n )\n ? joinPaths(appendPath(root, cwd), `${frameworkName}.${mode}.config.ts`)\n : existsSync(\n joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.${mode}.config.js`\n )\n )\n ? joinPaths(appendPath(root, cwd), `${frameworkName}.${mode}.config.js`)\n : existsSync(\n joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.${mode}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.${mode}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.${mode}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.${mode}.config.mjs`\n )\n : existsSync(\n joinPaths(appendPath(root, cwd), `${frameworkName}.config.ts`)\n )\n ? joinPaths(appendPath(root, cwd), `${frameworkName}.config.ts`)\n : existsSync(\n joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.config.js`\n )\n )\n ? joinPaths(appendPath(root, cwd), `${frameworkName}.config.js`)\n : existsSync(\n joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.config.mjs`\n )\n : undefined;\n }\n\n const envPaths = getEnvPaths({\n orgId: frameworkOrgId,\n appId: frameworkName,\n workspaceRoot: cwd\n });\n\n const jiti = createResolver({\n cwd,\n root,\n cacheDir: envPaths.cache,\n mode\n });\n\n if (resolvedUserConfigFile) {\n const resolved = await jiti.import<{ default: UserConfigExport }>(\n jiti.esmResolve(resolvedUserConfigFile)\n );\n if (resolved?.default) {\n let config = {};\n if (isFunction(resolved.default)) {\n config = await Promise.resolve(\n resolved.default({ root, cwd, mode, command })\n );\n } else if (\n isSetObject(resolved.default) ||\n Array.isArray(resolved.default)\n ) {\n config = resolved.default;\n }\n\n if (isSetObject(config) || Array.isArray(config)) {\n resolvedUserConfig = {\n ...config,\n config,\n configFile: resolvedUserConfigFile\n };\n }\n }\n }\n\n const result = await loadConfigC12({\n cwd: root,\n name: frameworkName,\n envName: mode,\n globalRc: true,\n packageJson: camelCase(frameworkName),\n dotenv: true,\n jiti\n });\n\n return defu(\n {\n config: {\n root,\n cwd,\n framework\n }\n },\n resolvedUserConfig,\n isSetObject(result?.config) ? { ...result.config, ...result } : {}\n ) as ParsedUserConfig;\n}\n\n/**\n * Type helper to make it easier to use `powerlines.config.ts` files. Accepts a direct {@link UserConfig} object, or a function that returns it. The function receives a {@link ConfigParams} object.\n *\n * @example\n * ```ts\n * import { defineConfig } from 'powerlines';\n *\n * export default defineConfig({\n * // Your configuration here\n * });\n *\n * // Or with a function\n * export default defineConfig((env) => {\n * console.log(`Running command: ${env.command} in mode: ${env.mode}`);\n * return {\n * // Your configuration here\n * };\n * });\n * ```\n */\nexport function defineConfig(config: UserInputConfig): UserInputConfig;\nexport function defineConfig(config: UserInputConfig[]): UserInputConfig[];\nexport function defineConfig(\n config: Promise<UserInputConfig>\n): Promise<UserInputConfig>;\nexport function defineConfig(\n config: Promise<UserInputConfig[]>\n): Promise<UserInputConfig[]>;\nexport function defineConfig(config: UserConfigFnObject): UserConfigFnObject;\nexport function defineConfig(config: UserConfigFnPromise): UserConfigFnPromise;\nexport function defineConfig(config: UserConfigFn): UserConfigFn;\nexport function defineConfig(config: UserConfigExport): UserConfigExport;\nexport function defineConfig(config: UserConfigExport): UserConfigExport {\n return config;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4DA,SAAgB,kBAAkB,OAAe,KAAa;CAC5D,IAAI,MAAM,KAAK,WAAW,GAAG,IAAI,OAAO,IAAI;CAC5C,IAAI,CAAC,IAAI,SAAS,GAAG,GAAG,MAAM,GAAG,IAAI;CACrC,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Q,QACrB,SAAS,QAAQ;IAAE;IAAM;IAAK;IAAM;GAAQ,CAAC,CAC/C;QACK,IACL,YAAY,SAAS,OAAO,KAC5B,MAAM,QAAQ,SAAS,OAAO,GAE9B,SAAS,SAAS;GAGpB,IAAI,YAAY,MAAM,KAAK,MAAM,QAAQ,MAAM,GAC7C,qBAAqB;IACnB,GAAG;IACH;IACA,YAAY;GACd;EAEJ;CACF;CAEA,MAAM,SAAS,MAAMA,WAAc;EACjC,KAAK;EACL,MAAM;EACN,SAAS;EACT,UAAU;EACV,aAAa,UAAU,aAAa;EACpC,QAAQ;EACR;CACF,CAAC;CAED,OAAO,KACL,EACE,QAAQ;EACN;EACA;EACA;CACF,EACF,GACA,oBACA,YAAY,QAAQ,MAAM,IAAI;EAAE,GAAG,OAAO;EAAQ,GAAG;CAAO,IAAI,CAAC,CACnE;AACF;AAkCA,SAAgB,aAAa,QAA4C;CACvE,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"config.mjs","names":["loadConfigC12"],"sources":["../../src/lib/config.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 {\n getWorkspaceConfig,\n tryGetWorkspaceConfig\n} from \"@storm-software/config-tools/get-config\";\nimport {\n isDevelopment,\n isProduction,\n isTest\n} from \"@stryke/env/environment-checks\";\nimport { getEnvPaths } from \"@stryke/env/get-env-paths\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { isFile } from \"@stryke/fs/is-file\";\nimport { readJsonFile } from \"@stryke/fs/json\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { findFilePath, relativePath } from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { PartialKeys } from \"@stryke/types/base\";\nimport { PackageJson } from \"@stryke/types/package-json\";\nimport { loadConfig as loadConfigC12 } from \"c12\";\nimport defu from \"defu\";\nimport { resolveLogLevel } from \"../plugin-utils/logging\";\nimport type {\n FrameworkOptions,\n InlineConfig,\n Mode,\n ParsedUserConfig,\n UserConfig,\n UserConfigExport,\n UserConfigFn,\n UserConfigFnObject,\n UserConfigFnPromise,\n WorkspaceConfig\n} from \"../types/config\";\nimport { Context } from \"../types/context\";\nimport { LogLevelResolvedConfig } from \"../types/logging\";\nimport { createResolver } from \"./resolver\";\n\nexport function normalizeBasePath(base: string = \"/\"): string {\n let out = base.startsWith(\"/\") ? base : `/${base}`;\n if (!out.endsWith(\"/\")) out = `${out}/`;\n return out.replace(/\\/+/g, \"/\");\n}\n\nexport interface ResolvePackageConfigsResult {\n /**\n * The parsed `package.json` file for the project, if it exists. This file typically contains metadata about the project, such as its name, version, dependencies, and other information relevant to the build process.\n */\n packageJson?: PackageJson;\n\n /**\n * The parsed `project.json` file for the project, if it exists. This file is an optional configuration file that can be used to store additional configuration or metadata specific to the project, and is not required for all projects.\n */\n projectJson?: Record<string, unknown>;\n}\n\n/**\n * Resolve the package configurations for the project by loading the `package.json` and `project.json` files, if they exist. This function will look for these files in the project root and parse their contents as JavaScript objects. The parsed contents will be stored in the context for later use by plugins and other parts of the build process.\n *\n * @remarks\n * The `package.json` file is typically used to store metadata about the project, such as its name, version, dependencies, and other information. The `project.json` file is an optional file that can be used to store additional configuration or metadata specific to the project, and is not required for all projects.\n *\n * @param cwd - The current working directory to look for the package configurations. Defaults to the `cwd` specified in the context configuration.\n * @param root - The root directory of the project to look for the package configurations. Defaults to the `root` specified in the context configuration.\n * @returns A promise that resolves when the package configurations have been loaded and stored in the context.\n */\nexport async function resolvePackageConfigs(\n cwd: string,\n root: string\n): Promise<ResolvePackageConfigsResult> {\n const result: ResolvePackageConfigsResult = {};\n if (cwd || root) {\n const projectJsonPath = joinPaths(\n appendPath(root || \".\", cwd || \".\"),\n \"project.json\"\n );\n if (existsSync(projectJsonPath)) {\n result.projectJson = await readJsonFile(projectJsonPath);\n }\n\n const packageJsonPath = joinPaths(\n appendPath(root || \".\", cwd || \".\"),\n \"package.json\"\n );\n if (existsSync(packageJsonPath)) {\n result.packageJson = await readJsonFile<PackageJson>(packageJsonPath);\n }\n }\n\n return result;\n}\n\n/**\n * Resolve the root directory for the project based on the provided options. This function will determine the root directory by checking the provided `root` option, and if it is not provided, it will look for a configuration file (such as `powerlines.config.ts`) in the current working directory. If a configuration file is found, the root directory will be set to the directory containing that file. If no configuration file is found, the root directory will default to the current working directory.\n *\n * @param cwd - The current working directory to use as the base for resolving the root directory. This is typically the directory from which the Powerlines process was executed.\n * @param root - An optional root directory to use for the project. If provided, this will be used as the root directory instead of looking for a configuration file. This can be an absolute or relative path, and if it is relative, it will be resolved based on the current working directory.\n * @param configFile - An optional path to a configuration file to look for when resolving the root directory. If provided, this file will be used to determine the root directory if the `root` option is not provided. This can be an absolute or relative path, and if it is relative, it will be resolved based on the current working directory.\n * @returns The resolved root directory for the project, which will be used as the base for resolving other paths and configurations throughout the Powerlines process. This will typically be an absolute path to the root directory of the project.\n */\nexport function resolveRoot(\n cwd: string,\n root?: string,\n configFile?: string\n): string {\n let result = root || \".\";\n if (!root) {\n if (configFile) {\n const configFilePath = appendPath(configFile, cwd);\n if (!existsSync(configFilePath)) {\n throw new Error(\n `The user-provided configuration file at \"${configFile}\" does not exist. Please ensure this path is correct and try again.`\n );\n }\n if (!isFile(configFile)) {\n throw new Error(\n `The user-provided configuration file at \"${\n configFile\n }\" is not a file. Please ensure this path is correct and try again.`\n );\n }\n\n result = relativePath(cwd, findFilePath(configFile));\n }\n } else {\n result = replacePath(root, cwd);\n }\n\n return result;\n}\n\n/**\n * Retrieve the workspace configuration for the current project, if it exists. This function will look for a configuration file in the project root and return its contents as a JavaScript object. If no configuration file is found, it will return undefined.\n *\n * @param cwd - The current working directory to start searching from. This is typically the directory from which the Powerlines process was executed.\n * @param root - An optional root directory to use as the base for searching for the configuration file. If provided, this will be used as the starting point for searching for the configuration file instead of the current working directory. This can be an absolute or relative path, and if it is relative, it will be resolved based on the current working directory.\n * @returns A promise that resolves to the workspace configuration object, or undefined if no configuration file is found.\n */\nexport async function tryResolveWorkspaceConfig(\n cwd: string,\n root?: string\n): Promise<WorkspaceConfig | undefined> {\n return tryGetWorkspaceConfig(false, {\n cwd: root ? appendPath(root, cwd) : undefined,\n workspaceRoot: cwd\n });\n}\n\n/**\n * Determine the default mode for the current execution based on the environment and workspace configuration. This function will check the `NODE_ENV` environment variable to determine if the current environment is development, production, or test. If `NODE_ENV` is not set, it will look for a `mode` property in the workspace configuration file. If no mode is specified in the workspace configuration, it will default to \"production\".\n *\n * @remarks\n * The mode is used to determine which configuration file to load (e.g., `powerlines.development.config.js` for development mode, `powerlines.production.config.js` for production mode, etc.) and can also be used by plugins and other parts of the build process to conditionally apply certain behaviors based on the current mode.\n *\n * @param cwd - The current working directory to start searching from. This is typically the directory from which the Powerlines process was executed.\n * @param root - An optional root directory to use as the base for searching for the workspace configuration. If provided, this will be used as the starting point for searching for the workspace configuration instead of the current working directory. This can be an absolute or relative path, and if it is relative, it will be resolved based on the current working directory.\n * @returns A promise that resolves to the default mode for the current execution, which can be \"development\", \"production\", or \"test\".\n */\nexport async function getDefaultMode(\n cwd: string,\n root?: string\n): Promise<Mode> {\n const workspaceConfig = await tryResolveWorkspaceConfig(cwd, root);\n\n return isProduction\n ? \"production\"\n : isDevelopment\n ? \"development\"\n : isTest\n ? \"test\"\n : workspaceConfig?.mode || \"production\";\n}\n\n/**\n * Determine the default log level for the current execution based on the environment and workspace configuration. This function will check the `logLevel` property in the workspace configuration file and resolve it to a `LogLevelResolvedConfig` value. If no log level is specified in the workspace configuration, it will default to \"info\" for development mode and \"warn\" for production mode.\n *\n * @remarks\n * The log level is used to determine which log messages should be output during the execution of the Powerlines process. For example, if the log level is set to \"warn\", only messages with a level of \"warn\", \"error\", or \"fatal\" will be output, while messages with a level of \"info\", \"debug\", or \"trace\" will be suppressed. This allows users to control the verbosity of the logs and focus on the most relevant information based on their current needs.\n *\n * @param cwd - The current working directory to start searching from. This is typically the directory from which the Powerlines process was executed.\n * @param root - An optional root directory to use as the base for searching for the workspace configuration. If provided, this will be used as the starting point for searching for the workspace configuration instead of the current working directory. This can be an absolute or relative path, and if it is relative, it will be resolved based on the current working directory.\n * @returns A promise that resolves to the default log level for the current execution, which can be \"fatal\", \"error\", \"warn\", \"info\", \"debug\", or \"trace\".\n */\nexport async function getDefaultLogLevel(\n cwd: string,\n root?: string\n): Promise<LogLevelResolvedConfig> {\n const workspaceConfig = await tryResolveWorkspaceConfig(cwd, root);\n\n return resolveLogLevel(\n workspaceConfig?.logLevel\n ? workspaceConfig.logLevel === \"success\" ||\n workspaceConfig.logLevel === \"performance\"\n ? \"info\"\n : workspaceConfig.logLevel === \"all\"\n ? \"debug\"\n : workspaceConfig.logLevel === \"fatal\"\n ? \"error\"\n : workspaceConfig.logLevel\n : undefined,\n workspaceConfig?.mode || (await getDefaultMode(cwd, root))\n );\n}\n\n/**\n * Load the user configuration file for the project and set up the context with the loaded configuration. This function will be called during the initialization of the context to load the user configuration file based on the provided options and set up the context accordingly. It will also set up the resolver for loading modules from the user configuration file and ensure that the context is properly initialized with the loaded configuration.\n *\n * @remarks\n * This method will set up the resolver and load the user configuration file based on the provided options. It is called during the construction of the context and can also be called when cloning the context to ensure that the new context has the same configuration and resolver setup.\n *\n * @param cwd - The current working directory to start searching from. This is typically the directory from which the Powerlines process was executed.\n * @param root - The root directory of the project to look for the configuration file. This is typically the root directory of the project, which may be different from the current working directory if the process was executed from a subdirectory.\n * @param framework - The name of the framework to use when looking for configuration files (default is \"powerlines\"). This is used to determine the naming convention for the configuration files to look for (e.g., `powerlines.development.config.js` for the \"powerlines\" framework in development mode).\n * @param orgId - The name of the organization to use when looking for configuration files (optional). This can be used to further customize the naming convention for the configuration files to look for (e.g., `powerlines.myorg.development.config.js` for the \"powerlines\" framework in development mode with an organization of \"myorg\").\n * @param inlineConfig - The inline configuration options provided during the execution of a Powerlines command, which can include properties such as the project root, mode, and an explicit path to a configuration file. This is used to determine how the context should be initialized and which configuration file should be loaded for the execution.\n * @returns A promise that resolves when the context has been successfully initialized with the loaded configuration and resolver setup.\n * @throws Will throw an error if no configuration file is found in the project root or current working directory. This ensures that the context cannot be initialized without a valid configuration, which is essential for the proper functioning of the Powerlines process.\n */\nexport async function loadParsedConfig(\n cwd: string,\n root: string,\n framework: string,\n orgId: string,\n inlineConfig: InlineConfig\n) {\n const mode = inlineConfig.mode || (await getDefaultMode(cwd, root));\n\n const configFile = await loadUserConfigFile(\n cwd,\n root,\n mode,\n inlineConfig.command,\n { name: framework, orgId },\n inlineConfig.configFile\n );\n if (!configFile) {\n throw new Error(\n `No configuration file found in ${appendPath(\n root,\n cwd\n )}. Please ensure you have a valid configuration file in your project.`\n );\n }\n\n return configFile;\n}\n\nexport type PartiallyResolvedContext<TContext extends Context = Context> = Omit<\n TContext,\n \"config\" | \"tsconfig\" | \"entry\" | \"fs\" | \"compiler\" | \"unimport\"\n> &\n Partial<TContext> & {\n config: TContext[\"config\"];\n };\n\n/**\n * Loads the workspace configuration.\n *\n * @param cwd - The root directory of the workspace.\n * @param root - The current working directory to start searching from.\n * @returns A promise that resolves to the loaded workspace configuration.\n */\nexport async function loadWorkspaceConfig(\n cwd: string,\n root: string\n): Promise<WorkspaceConfig> {\n return defu(\n {\n workspaceRoot: cwd\n },\n await getWorkspaceConfig(true, {\n cwd: root,\n workspaceRoot: cwd,\n useDefault: true\n })\n );\n}\n\n/**\n * Loads the user configuration file for the project.\n *\n * @remarks\n * This function will attempt to locate and load the user configuration file for the project based on the provided parameters. It will look for configuration files in various formats (e.g., `.ts`, `.js`, `.mts`, `.mjs`) and with different naming conventions (e.g., `powerlines.config.ts`, `powerlines.development.config.js`, etc.) in the project root and current working directory. If a configuration file is found, it will be loaded using a Jiti resolver, and the resulting configuration object will be returned. If no configuration file is found, an empty configuration object will be returned.\n *\n * @param cwd - The current working directory to start searching from.\n * @param root - The root directory of the project.\n * @param mode - The mode to determine which configuration file to load (e.g., \"development\", \"test\", \"production\").\n * @param command - The command being executed (e.g., \"build\", \"dev\", \"test\"), which can be used to further customize the configuration loading logic if needed.\n * @param framework - The name of the framework to use when looking for configuration files (default is \"powerlines\").\n * @param configFile - An explicit path to a configuration file to load (optional). If provided, this file will be loaded instead of searching for configuration files based on the mode and framework.\n * @returns A promise that resolves to the resolved user configuration.\n */\nexport async function loadUserConfigFile(\n cwd: string,\n root: string,\n mode: Mode,\n command: string,\n framework?: PartialKeys<FrameworkOptions, \"orgId\">,\n configFile?: string\n): Promise<ParsedUserConfig> {\n const frameworkName = kebabCase(framework?.name || \"powerlines\");\n const frameworkOrgId = kebabCase(framework?.orgId || \"storm-software\");\n\n let resolvedUserConfig: Partial<ParsedUserConfig> = {};\n\n let resolvedUserConfigFile: string | undefined;\n if (configFile) {\n resolvedUserConfigFile = existsSync(replacePath(configFile, root))\n ? replacePath(configFile, root)\n : existsSync(\n joinPaths(appendPath(root, cwd), replacePath(configFile, root))\n )\n ? joinPaths(appendPath(root, cwd), replacePath(configFile, root))\n : existsSync(joinPaths(appendPath(root, cwd), configFile))\n ? joinPaths(appendPath(root, cwd), configFile)\n : undefined;\n }\n\n if (!resolvedUserConfigFile) {\n resolvedUserConfigFile = existsSync(\n joinPaths(appendPath(root, cwd), `${frameworkName}.${mode}.config.ts`)\n )\n ? joinPaths(appendPath(root, cwd), `${frameworkName}.${mode}.config.ts`)\n : existsSync(\n joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.${mode}.config.js`\n )\n )\n ? joinPaths(appendPath(root, cwd), `${frameworkName}.${mode}.config.js`)\n : existsSync(\n joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.${mode}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.${mode}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.${mode}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.${mode}.config.mjs`\n )\n : existsSync(\n joinPaths(appendPath(root, cwd), `${frameworkName}.config.ts`)\n )\n ? joinPaths(appendPath(root, cwd), `${frameworkName}.config.ts`)\n : existsSync(\n joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.config.js`\n )\n )\n ? joinPaths(appendPath(root, cwd), `${frameworkName}.config.js`)\n : existsSync(\n joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(root, cwd),\n `${frameworkName}.config.mjs`\n )\n : undefined;\n }\n\n const envPaths = getEnvPaths({\n orgId: frameworkOrgId,\n appId: frameworkName,\n workspaceRoot: cwd\n });\n\n const jiti = createResolver({\n cwd,\n root,\n cacheDir: envPaths.cache,\n mode\n });\n\n if (resolvedUserConfigFile) {\n const resolved = await jiti.import<{ default: UserConfigExport }>(\n jiti.esmResolve(resolvedUserConfigFile)\n );\n if (resolved?.default) {\n let config = {};\n if (isFunction(resolved.default)) {\n config = await Promise.resolve(\n resolved.default({ root, cwd, mode, command })\n );\n } else if (\n isSetObject(resolved.default) ||\n Array.isArray(resolved.default)\n ) {\n config = resolved.default;\n }\n\n if (isSetObject(config) || Array.isArray(config)) {\n resolvedUserConfig = {\n ...config,\n config,\n configFile: resolvedUserConfigFile\n };\n }\n }\n }\n\n const result = await loadConfigC12({\n cwd: root,\n name: frameworkName,\n envName: mode,\n globalRc: true,\n packageJson: camelCase(frameworkName),\n dotenv: true,\n jiti\n });\n\n return defu(\n {\n config: {\n root,\n cwd,\n framework\n }\n },\n resolvedUserConfig,\n isSetObject(result?.config) ? { ...result.config, ...result } : {}\n ) as ParsedUserConfig;\n}\n\n/**\n * Type helper to make it easier to use `powerlines.config.ts` files. Accepts a direct {@link UserConfig} object, or a function that returns it. The function receives a {@link ConfigParams} object.\n *\n * @example\n * ```ts\n * import { defineConfig } from 'powerlines';\n *\n * export default defineConfig({\n * // Your configuration here\n * });\n *\n * // Or with a function\n * export default defineConfig((env) => {\n * console.log(`Running command: ${env.command} in mode: ${env.mode}`);\n * return {\n * // Your configuration here\n * };\n * });\n * ```\n */\nexport function defineConfig(config: UserConfig): UserConfig;\nexport function defineConfig(config: UserConfig[]): UserConfig[];\nexport function defineConfig(config: Promise<UserConfig>): Promise<UserConfig>;\nexport function defineConfig(\n config: Promise<UserConfig[]>\n): Promise<UserConfig[]>;\nexport function defineConfig(config: UserConfigFnObject): UserConfigFnObject;\nexport function defineConfig(config: UserConfigFnPromise): UserConfigFnPromise;\nexport function defineConfig(config: UserConfigFn): UserConfigFn;\nexport function defineConfig(config: UserConfigExport): UserConfigExport;\nexport function defineConfig(config: UserConfigExport): UserConfigExport {\n return config;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4DA,SAAgB,kBAAkB,OAAe,KAAa;CAC5D,IAAI,MAAM,KAAK,WAAW,GAAG,IAAI,OAAO,IAAI;CAC5C,IAAI,CAAC,IAAI,SAAS,GAAG,GAAG,MAAM,GAAG,IAAI;CACrC,OAAO,IAAI,QAAQ,QAAQ,GAAG;AAChC;;;;;;;;;;;AAwBA,eAAsB,sBACpB,KACA,MACsC;CACtC,MAAM,SAAsC,CAAC;CAC7C,IAAI,OAAO,MAAM;EACf,MAAM,kBAAkB,UACtB,WAAW,QAAQ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M,KAAK,MAAM,QAAQ,MAAM,GAC7C,qBAAqB;IACnB,GAAG;IACH;IACA,YAAY;GACd;EAEJ;CACF;CAEA,MAAM,SAAS,MAAMA,WAAc;EACjC,KAAK;EACL,MAAM;EACN,SAAS;EACT,UAAU;EACV,aAAa,UAAU,aAAa;EACpC,QAAQ;EACR;CACF,CAAC;CAED,OAAO,KACL,EACE,QAAQ;EACN;EACA;EACA;CACF,EACF,GACA,oBACA,YAAY,QAAQ,MAAM,IAAI;EAAE,GAAG,OAAO;EAAQ,GAAG;CAAO,IAAI,CAAC,CACnE;AACF;AAgCA,SAAgB,aAAa,QAA4C;CACvE,OAAO;AACT"}
|
package/dist/lib/entry.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UnresolvedContext } from "../types/context.cjs";
|
|
2
|
-
import { Config, ResolvedEntryTypeDefinition } from "../types/config.cjs";
|
|
2
|
+
import { Config, ResolvedConfig, ResolvedEntryTypeDefinition } from "../types/config.cjs";
|
|
3
3
|
import { TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
4
4
|
|
|
5
5
|
//#region src/lib/entry.d.ts
|
|
@@ -41,7 +41,7 @@ declare function isResolvedEntryTypeDefinition(entry: TypeDefinitionParameter |
|
|
|
41
41
|
* @param inputs - The entry points to process.
|
|
42
42
|
* @returns An array of unique inputs (by file path or content hash).
|
|
43
43
|
*/
|
|
44
|
-
declare function getUniqueInputs(inputs?: Config["input"]):
|
|
44
|
+
declare function getUniqueInputs(inputs?: Config["input"]): ResolvedConfig["input"];
|
|
45
45
|
//#endregion
|
|
46
46
|
export { getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync };
|
|
47
47
|
//# sourceMappingURL=entry.d.cts.map
|
package/dist/lib/entry.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry.d.cts","names":[],"sources":["../../src/lib/entry.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"entry.d.cts","names":[],"sources":["../../src/lib/entry.ts"],"mappings":";;;;;iBAyCgB,kBAAA,kBAAoC,iBAAA,CAAA,CAClD,OAAA,EAAS,QAAA,EACT,cAAA,EAAgB,cAAA;AAAA,iBAsBF,YAAA,kBAA8B,iBAAA,CAAA,CAC5C,OAAA,EAAS,QAAA,EACT,cAAA,EAAgB,cAAA,EAChB,KAAA,GAAQ,uBAAA,EACR,MAAA,YACC,2BAAA;AA7BH;;;;;;;AAAA,iBA4CsB,aAAA,kBAA+B,iBAAA,CAAA,CACnD,OAAA,EAAS,QAAA,EACT,eAAA,EACI,uBAAA,GACA,uBAAA,KACA,MAAA,SAAe,uBAAA,GAA0B,uBAAA,MAC5C,OAAA,CAAQ,2BAAA;;;;;;;;iBAyEK,iBAAA,kBAAmC,iBAAA,CAAA,CACjD,OAAA,EAAS,QAAA,EACT,eAAA,EACI,uBAAA,GACA,uBAAA,KACA,MAAA,SAAe,uBAAA,GAA0B,uBAAA,MAC5C,2BAAA;AAzGH;;;;;;AAAA,iBAiKgB,gBAAA,CAAiB,KAAA,QAAa,KAAA,IAAS,cAAc;;;;;;;iBAUrD,6BAAA,CACd,KAAA,EAAO,uBAAA,GAA0B,2BAAA,GAChC,KAAA,IAAS,2BAAA;;;;;;;iBAaI,eAAA,CACd,MAAA,GAAQ,MAAA,YACP,cAAc"}
|
package/dist/lib/entry.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UnresolvedContext } from "../types/context.mjs";
|
|
2
|
-
import { Config, ResolvedEntryTypeDefinition } from "../types/config.mjs";
|
|
2
|
+
import { Config, ResolvedConfig, ResolvedEntryTypeDefinition } from "../types/config.mjs";
|
|
3
3
|
import { TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
4
4
|
|
|
5
5
|
//#region src/lib/entry.d.ts
|
|
@@ -41,7 +41,7 @@ declare function isResolvedEntryTypeDefinition(entry: TypeDefinitionParameter |
|
|
|
41
41
|
* @param inputs - The entry points to process.
|
|
42
42
|
* @returns An array of unique inputs (by file path or content hash).
|
|
43
43
|
*/
|
|
44
|
-
declare function getUniqueInputs(inputs?: Config["input"]):
|
|
44
|
+
declare function getUniqueInputs(inputs?: Config["input"]): ResolvedConfig["input"];
|
|
45
45
|
//#endregion
|
|
46
46
|
export { getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync };
|
|
47
47
|
//# sourceMappingURL=entry.d.mts.map
|
package/dist/lib/entry.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry.d.mts","names":[],"sources":["../../src/lib/entry.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"entry.d.mts","names":[],"sources":["../../src/lib/entry.ts"],"mappings":";;;;;iBAyCgB,kBAAA,kBAAoC,iBAAA,CAAA,CAClD,OAAA,EAAS,QAAA,EACT,cAAA,EAAgB,cAAA;AAAA,iBAsBF,YAAA,kBAA8B,iBAAA,CAAA,CAC5C,OAAA,EAAS,QAAA,EACT,cAAA,EAAgB,cAAA,EAChB,KAAA,GAAQ,uBAAA,EACR,MAAA,YACC,2BAAA;AA7BH;;;;;;;AAAA,iBA4CsB,aAAA,kBAA+B,iBAAA,CAAA,CACnD,OAAA,EAAS,QAAA,EACT,eAAA,EACI,uBAAA,GACA,uBAAA,KACA,MAAA,SAAe,uBAAA,GAA0B,uBAAA,MAC5C,OAAA,CAAQ,2BAAA;;;;;;;;iBAyEK,iBAAA,kBAAmC,iBAAA,CAAA,CACjD,OAAA,EAAS,QAAA,EACT,eAAA,EACI,uBAAA,GACA,uBAAA,KACA,MAAA,SAAe,uBAAA,GAA0B,uBAAA,MAC5C,2BAAA;AAzGH;;;;;;AAAA,iBAiKgB,gBAAA,CAAiB,KAAA,QAAa,KAAA,IAAS,cAAc;;;;;;;iBAUrD,6BAAA,CACd,KAAA,EAAO,uBAAA,GAA0B,2BAAA,GAChC,KAAA,IAAS,2BAAA;;;;;;;iBAaI,eAAA,CACd,MAAA,GAAQ,MAAA,YACP,cAAc"}
|
package/dist/lib/entry.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry.mjs","names":[],"sources":["../../src/lib/entry.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 { parseTypeDefinition } from \"@stryke/convert/parse-type-definition\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { murmurhash } from \"@stryke/hash\";\nimport { getUniqueBy } from \"@stryke/helpers/get-unique\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { isAbsolutePath } from \"@stryke/path/is-type\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { isObject } from \"@stryke/type-checks/is-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport type {\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport { replacePathTokens } from \"../plugin-utils/paths\";\nimport { Config, ResolvedEntryTypeDefinition } from \"../types/config\";\nimport type { UnresolvedContext } from \"../types/context\";\n\nexport function resolveEntryOutput<TContext extends UnresolvedContext>(\n context: TContext,\n typeDefinition: TypeDefinition\n): string {\n return replaceExtension(\n replacePath(\n replacePath(\n replacePath(\n replacePath(\n replacePath(\n typeDefinition.file,\n joinPaths(context.config.cwd, context.config.root, \"src\")\n ),\n joinPaths(context.config.cwd, context.config.root)\n ),\n joinPaths(context.config.root, \"src\")\n ),\n context.config.root\n ),\n \"src\"\n )\n );\n}\n\nexport function resolveInput<TContext extends UnresolvedContext>(\n context: TContext,\n typeDefinition: TypeDefinition,\n input?: TypeDefinitionParameter,\n output?: string\n): ResolvedEntryTypeDefinition {\n return {\n ...typeDefinition,\n input: isSetString(input) ? { file: String(input) } : typeDefinition,\n output: output || resolveEntryOutput(context, typeDefinition)\n };\n}\n\n/**\n * Resolves multiple type definitions into their corresponding resolved entry type definitions.\n *\n * @param context - The current context\n * @param typeDefinitions - The type definitions to resolve.\n * @returns A promise that resolves to an array of resolved entry type definitions.\n */\nexport async function resolveInputs<TContext extends UnresolvedContext>(\n context: TContext,\n typeDefinitions:\n | TypeDefinitionParameter\n | TypeDefinitionParameter[]\n | Record<string, TypeDefinitionParameter | TypeDefinitionParameter[]>\n): Promise<ResolvedEntryTypeDefinition[]> {\n return (\n await Promise.all(\n (isObject(typeDefinitions) && !isTypeDefinition(typeDefinitions)\n ? Object.values(typeDefinitions).flat()\n : toArray(typeDefinitions)\n )\n .map(async entry => {\n if (isResolvedEntryTypeDefinition(entry)) {\n return {\n ...entry,\n output: entry.output\n ? replacePathTokens(context, entry.output)\n : undefined,\n file: replacePathTokens(context, entry.file)\n };\n }\n\n let typeDefinition: TypeDefinition;\n if (isString(entry)) {\n typeDefinition = parseTypeDefinition(\n replacePathTokens(context, entry)\n )!;\n } else {\n typeDefinition = entry;\n typeDefinition.file = replacePathTokens(\n context,\n typeDefinition.file\n );\n }\n\n const filePath = isAbsolutePath(typeDefinition.file)\n ? typeDefinition.file\n : appendPath(typeDefinition.file, context.config.root);\n if (await context.fs.isFile(filePath)) {\n return resolveInput(\n context,\n {\n file: replacePath(filePath, context.config.root),\n name: typeDefinition.name\n },\n (entry as ResolvedEntryTypeDefinition).input,\n (entry as ResolvedEntryTypeDefinition).output\n );\n }\n\n return (\n await context.fs.glob(appendPath(filePath, context.config.cwd))\n ).map(file =>\n resolveInput(\n context,\n {\n file: replacePath(file, context.config.root),\n name: typeDefinition.name\n },\n (entry as ResolvedEntryTypeDefinition).input,\n (entry as ResolvedEntryTypeDefinition).output\n )\n );\n })\n .flat()\n .filter(Boolean)\n )\n ).flat();\n}\n\n/**\n * Resolves multiple type definitions into their corresponding resolved entry type definitions.\n *\n * @param context - The current context\n * @param typeDefinitions - The type definitions to resolve.\n * @returns A promise that resolves to an array of resolved entry type definitions.\n */\nexport function resolveInputsSync<TContext extends UnresolvedContext>(\n context: TContext,\n typeDefinitions:\n | TypeDefinitionParameter\n | TypeDefinitionParameter[]\n | Record<string, TypeDefinitionParameter | TypeDefinitionParameter[]>\n): ResolvedEntryTypeDefinition[] {\n return (\n isObject(typeDefinitions) && !isTypeDefinition(typeDefinitions)\n ? Object.values(typeDefinitions).flat()\n : toArray(typeDefinitions)\n )\n .map(entry => {\n if (isResolvedEntryTypeDefinition(entry)) {\n return {\n ...entry,\n output: entry.output\n ? replacePathTokens(context, entry.output)\n : undefined,\n file: replacePathTokens(context, entry.file)\n };\n }\n\n let typeDefinition: TypeDefinition;\n if (isString(entry)) {\n typeDefinition = parseTypeDefinition(\n replacePathTokens(context, entry)\n )!;\n } else {\n typeDefinition = entry;\n typeDefinition.file = replacePathTokens(context, typeDefinition.file);\n }\n\n const filePath = isAbsolutePath(typeDefinition.file)\n ? typeDefinition.file\n : appendPath(typeDefinition.file, context.config.root);\n if (context.fs.isFileSync(filePath)) {\n return resolveInput(context, {\n file: appendPath(filePath, context.config.cwd),\n name: typeDefinition.name\n });\n }\n\n return context.fs\n .globSync(appendPath(filePath, context.config.cwd))\n .map(file =>\n resolveInput(context, {\n file,\n name: typeDefinition.name\n })\n );\n })\n .flat()\n .filter(Boolean);\n}\n\n/**\n * Checks if the provided entry is a type definition.\n *\n * @param entry - The entry to check.\n * @returns True if the entry is a type definition, false otherwise.\n */\nexport function isTypeDefinition(entry: any): entry is TypeDefinition {\n return !isString(entry) && entry.file !== undefined;\n}\n\n/**\n * Checks if the provided entry is a resolved entry type definition.\n *\n * @param entry - The entry to check.\n * @returns True if the entry is a resolved entry type definition, false otherwise.\n */\nexport function isResolvedEntryTypeDefinition(\n entry: TypeDefinitionParameter | ResolvedEntryTypeDefinition\n): entry is ResolvedEntryTypeDefinition {\n return (\n isTypeDefinition(entry) &&\n (entry as ResolvedEntryTypeDefinition).output !== undefined\n );\n}\n\n/**\n * Get unique inputs from the provided list.\n *\n * @param inputs - The entry points to process.\n * @returns An array of unique inputs (by file path or content hash).\n */\nexport function getUniqueInputs(inputs: Config[\"input\"] = []): Config[\"input\"] {\n return isObject(inputs)\n ? inputs\n : getUniqueBy(toArray(inputs), (item: TypeDefinitionParameter) =>\n isSetString(item) ? item : murmurhash(item ?? {}, { maxLength: 24 })\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAqCA,SAAgB,mBACd,SACA,gBACQ;CACR,OAAO,iBACL,YACE,YACE,YACE,YACE,YACE,eAAe,MACf,UAAU,QAAQ,OAAO,KAAK,QAAQ,OAAO,MAAM,KAAK,CAC1D,GACA,UAAU,QAAQ,OAAO,KAAK,QAAQ,OAAO,IAAI,CACnD,GACA,UAAU,QAAQ,OAAO,MAAM,KAAK,CACtC,GACA,QAAQ,OAAO,IACjB,GACA,KACF,CACF;AACF;AAEA,SAAgB,aACd,SACA,gBACA,OACA,QAC6B;CAC7B,OAAO;EACL,GAAG;EACH,OAAO,YAAY,KAAK,IAAI,EAAE,MAAM,OAAO,KAAK,EAAE,IAAI;EACtD,QAAQ,UAAU,mBAAmB,SAAS,cAAc;CAC9D;AACF;;;;;;;;AASA,eAAsB,cACpB,SACA,iBAIwC;CACxC,QACE,MAAM,QAAQ,KACX,SAAS,eAAe,KAAK,CAAC,iBAAiB,eAAe,IAC3D,OAAO,OAAO,eAAe,EAAE,KAAK,IACpC,QAAQ,eAAe,GAExB,IAAI,OAAM,UAAS;EAClB,IAAI,8BAA8B,KAAK,GACrC,OAAO;GACL,GAAG;GAC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ACtE;EAEA,MAAM,WAAW,eAAe,eAAe,IAAI,IAC/C,eAAe,OACf,WAAW,eAAe,MAAM,QAAQ,OAAO,IAAI;EACvD,IAAI,QAAQ,GAAG,WAAW,QAAQ,GAChC,OAAO,aAAa,SAAS;GAC3B,MAAM,WAAW,UAAU,QAAQ,OAAO,GAAG;GAC7C,MAAM,eAAe;EACvB,CAAC;EAGH,OAAO,QAAQ,GACZ,SAAS,WAAW,UAAU,QAAQ,OAAO,GAAG,CAAC,EACjD,KAAI,SACH,aAAa,SAAS;GACpB;GACA,MAAM,eAAe;EACvB,CAAC,CACH;CACJ,CAAC,EACA,KAAK,EACL,OAAO,OAAO;AACnB;;;;;;;AAQA,SAAgB,iBAAiB,OAAqC;CACpE,OAAO,CAAC,SAAS,KAAK,KAAK,MAAM,SAAS;AAC5C;;;;;;;AAQA,SAAgB,8BACd,OACsC;CACtC,OACE,iBAAiB,KAAK,KACrB,MAAsC,WAAW;AAEtD;;;;;;;AAQA,SAAgB,gBAAgB,SAA0B,CAAC,GAAoB;CAC7E,OAAO,SAAS,MAAM,IAClB,SACA,YAAY,QAAQ,MAAM,IAAI,SAC5B,YAAY,IAAI,IAAI,OAAO,WAAW,QAAQ,CAAC,GAAG,EAAE,WAAW,GAAG,CAAC,CACrE;AACN"}
|
|
1
|
+
{"version":3,"file":"entry.mjs","names":[],"sources":["../../src/lib/entry.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 { parseTypeDefinition } from \"@stryke/convert/parse-type-definition\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { murmurhash } from \"@stryke/hash\";\nimport { getUniqueBy } from \"@stryke/helpers/get-unique\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { isAbsolutePath } from \"@stryke/path/is-type\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { isObject } from \"@stryke/type-checks/is-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport type {\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport { replacePathTokens } from \"../plugin-utils/paths\";\nimport {\n Config,\n ResolvedConfig,\n ResolvedEntryTypeDefinition\n} from \"../types/config\";\nimport type { UnresolvedContext } from \"../types/context\";\n\nexport function resolveEntryOutput<TContext extends UnresolvedContext>(\n context: TContext,\n typeDefinition: TypeDefinition\n): string {\n return replaceExtension(\n replacePath(\n replacePath(\n replacePath(\n replacePath(\n replacePath(\n typeDefinition.file,\n joinPaths(context.config.cwd, context.config.root, \"src\")\n ),\n joinPaths(context.config.cwd, context.config.root)\n ),\n joinPaths(context.config.root, \"src\")\n ),\n context.config.root\n ),\n \"src\"\n )\n );\n}\n\nexport function resolveInput<TContext extends UnresolvedContext>(\n context: TContext,\n typeDefinition: TypeDefinition,\n input?: TypeDefinitionParameter,\n output?: string\n): ResolvedEntryTypeDefinition {\n return {\n ...typeDefinition,\n input: isSetString(input) ? { file: String(input) } : typeDefinition,\n output: output || resolveEntryOutput(context, typeDefinition)\n };\n}\n\n/**\n * Resolves multiple type definitions into their corresponding resolved entry type definitions.\n *\n * @param context - The current context\n * @param typeDefinitions - The type definitions to resolve.\n * @returns A promise that resolves to an array of resolved entry type definitions.\n */\nexport async function resolveInputs<TContext extends UnresolvedContext>(\n context: TContext,\n typeDefinitions:\n | TypeDefinitionParameter\n | TypeDefinitionParameter[]\n | Record<string, TypeDefinitionParameter | TypeDefinitionParameter[]>\n): Promise<ResolvedEntryTypeDefinition[]> {\n return (\n await Promise.all(\n (isObject(typeDefinitions) && !isTypeDefinition(typeDefinitions)\n ? Object.values(typeDefinitions).flat()\n : toArray(typeDefinitions)\n )\n .map(async entry => {\n if (isResolvedEntryTypeDefinition(entry)) {\n return {\n ...entry,\n output: entry.output\n ? replacePathTokens(context, entry.output)\n : undefined,\n file: replacePathTokens(context, entry.file)\n };\n }\n\n let typeDefinition: TypeDefinition;\n if (isString(entry)) {\n typeDefinition = parseTypeDefinition(\n replacePathTokens(context, entry)\n )!;\n } else {\n typeDefinition = entry;\n typeDefinition.file = replacePathTokens(\n context,\n typeDefinition.file\n );\n }\n\n const filePath = isAbsolutePath(typeDefinition.file)\n ? typeDefinition.file\n : appendPath(typeDefinition.file, context.config.root);\n if (await context.fs.isFile(filePath)) {\n return resolveInput(\n context,\n {\n file: replacePath(filePath, context.config.root),\n name: typeDefinition.name\n },\n (entry as ResolvedEntryTypeDefinition).input,\n (entry as ResolvedEntryTypeDefinition).output\n );\n }\n\n return (\n await context.fs.glob(appendPath(filePath, context.config.cwd))\n ).map(file =>\n resolveInput(\n context,\n {\n file: replacePath(file, context.config.root),\n name: typeDefinition.name\n },\n (entry as ResolvedEntryTypeDefinition).input,\n (entry as ResolvedEntryTypeDefinition).output\n )\n );\n })\n .flat()\n .filter(Boolean)\n )\n ).flat();\n}\n\n/**\n * Resolves multiple type definitions into their corresponding resolved entry type definitions.\n *\n * @param context - The current context\n * @param typeDefinitions - The type definitions to resolve.\n * @returns A promise that resolves to an array of resolved entry type definitions.\n */\nexport function resolveInputsSync<TContext extends UnresolvedContext>(\n context: TContext,\n typeDefinitions:\n | TypeDefinitionParameter\n | TypeDefinitionParameter[]\n | Record<string, TypeDefinitionParameter | TypeDefinitionParameter[]>\n): ResolvedEntryTypeDefinition[] {\n return (\n isObject(typeDefinitions) && !isTypeDefinition(typeDefinitions)\n ? Object.values(typeDefinitions).flat()\n : toArray(typeDefinitions)\n )\n .map(entry => {\n if (isResolvedEntryTypeDefinition(entry)) {\n return {\n ...entry,\n output: entry.output\n ? replacePathTokens(context, entry.output)\n : undefined,\n file: replacePathTokens(context, entry.file)\n };\n }\n\n let typeDefinition: TypeDefinition;\n if (isString(entry)) {\n typeDefinition = parseTypeDefinition(\n replacePathTokens(context, entry)\n )!;\n } else {\n typeDefinition = entry;\n typeDefinition.file = replacePathTokens(context, typeDefinition.file);\n }\n\n const filePath = isAbsolutePath(typeDefinition.file)\n ? typeDefinition.file\n : appendPath(typeDefinition.file, context.config.root);\n if (context.fs.isFileSync(filePath)) {\n return resolveInput(context, {\n file: appendPath(filePath, context.config.cwd),\n name: typeDefinition.name\n });\n }\n\n return context.fs\n .globSync(appendPath(filePath, context.config.cwd))\n .map(file =>\n resolveInput(context, {\n file,\n name: typeDefinition.name\n })\n );\n })\n .flat()\n .filter(Boolean);\n}\n\n/**\n * Checks if the provided entry is a type definition.\n *\n * @param entry - The entry to check.\n * @returns True if the entry is a type definition, false otherwise.\n */\nexport function isTypeDefinition(entry: any): entry is TypeDefinition {\n return !isString(entry) && entry.file !== undefined;\n}\n\n/**\n * Checks if the provided entry is a resolved entry type definition.\n *\n * @param entry - The entry to check.\n * @returns True if the entry is a resolved entry type definition, false otherwise.\n */\nexport function isResolvedEntryTypeDefinition(\n entry: TypeDefinitionParameter | ResolvedEntryTypeDefinition\n): entry is ResolvedEntryTypeDefinition {\n return (\n isTypeDefinition(entry) &&\n (entry as ResolvedEntryTypeDefinition).output !== undefined\n );\n}\n\n/**\n * Get unique inputs from the provided list.\n *\n * @param inputs - The entry points to process.\n * @returns An array of unique inputs (by file path or content hash).\n */\nexport function getUniqueInputs(\n inputs: Config[\"input\"] = []\n): ResolvedConfig[\"input\"] {\n return isObject(inputs)\n ? inputs\n : getUniqueBy(toArray(inputs), (item: TypeDefinitionParameter) =>\n isSetString(item) ? item : murmurhash(item ?? {}, { maxLength: 24 })\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAyCA,SAAgB,mBACd,SAC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,iBAAiB,KAAK,KACrB,MAAsC,WAAW;AAEtD;;;;;;;AAQA,SAAgB,gBACd,SAA0B,CAAC,GACF;CACzB,OAAO,SAAS,MAAM,IAClB,SACA,YAAY,QAAQ,MAAM,IAAI,SAC5B,YAAY,IAAI,IAAI,OAAO,WAAW,QAAQ,CAAC,GAAG,EAAE,WAAW,GAAG,CAAC,CACrE;AACN"}
|
package/dist/types/config.d.cts
CHANGED
|
@@ -330,7 +330,7 @@ interface Config {
|
|
|
330
330
|
/**
|
|
331
331
|
* Defines entries and location(s) of entry modules for the bundle. Relative paths are resolved based on the `root` option.
|
|
332
332
|
*/
|
|
333
|
-
input
|
|
333
|
+
input?: TypeDefinitionParameter | TypeDefinitionParameter[] | Record<string, TypeDefinitionParameter | TypeDefinitionParameter[]>;
|
|
334
334
|
/**
|
|
335
335
|
* Configuration for the output files generated by processing the source code
|
|
336
336
|
*/
|
|
@@ -527,19 +527,18 @@ type ConfigParams = BaseExecutionOptions & Pick<Required<UserConfig>, "mode"> &
|
|
|
527
527
|
*/
|
|
528
528
|
command: string;
|
|
529
529
|
};
|
|
530
|
-
type
|
|
531
|
-
type
|
|
532
|
-
type
|
|
533
|
-
type
|
|
534
|
-
type
|
|
535
|
-
type ParsedUserConfig<TUserConfig extends UserConfig = UserConfig> = ResolvedConfig<UserInputConfig<TUserConfig>> & {
|
|
530
|
+
type UserConfigFnObject = (env: ConfigParams) => UserConfig | UserConfig[];
|
|
531
|
+
type UserConfigFnPromise = (env: ConfigParams) => Promise<UserConfig | UserConfig[]>;
|
|
532
|
+
type UserConfigFn = (env: ConfigParams) => UserConfig | UserConfig[] | Promise<UserConfig | UserConfig[]>;
|
|
533
|
+
type UserConfigExport = UserConfig | UserConfig[] | Promise<UserConfig | UserConfig[]> | UserConfigFnObject | UserConfigFnPromise | UserConfigFn;
|
|
534
|
+
type ParsedUserConfig = ResolvedConfig<UserConfig> & {
|
|
536
535
|
/**
|
|
537
536
|
* The path to the user configuration file, if it exists.
|
|
538
537
|
*
|
|
539
538
|
* @remarks
|
|
540
539
|
* This is typically the `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` file in the project root.
|
|
541
540
|
*/
|
|
542
|
-
configFile?: ConfigLayer<
|
|
541
|
+
configFile?: ConfigLayer<UserConfig>["configFile"];
|
|
543
542
|
};
|
|
544
543
|
type InlineConfigPaths = {
|
|
545
544
|
/**
|
|
@@ -623,7 +622,7 @@ interface ResolvedEntryTypeDefinition extends TypeDefinition {
|
|
|
623
622
|
*/
|
|
624
623
|
output?: string;
|
|
625
624
|
}
|
|
626
|
-
type ResolvedEnvironmentConfig = RequiredKeys<Omit<EnvironmentConfig, "preview">, "consumer" | "ssr"> & {
|
|
625
|
+
type ResolvedEnvironmentConfig = RequiredKeys<Omit<EnvironmentConfig, "preview">, "input" | "consumer" | "ssr"> & {
|
|
627
626
|
/**
|
|
628
627
|
* A string identifier for the environment used by the system and plugins to determine which environment-specific configuration to use during the build process.
|
|
629
628
|
*/
|
|
@@ -663,7 +662,7 @@ type ResolvedOutputConfig = Required<Omit<OutputConfig, "copy" | "storage">> & P
|
|
|
663
662
|
/**
|
|
664
663
|
* The base resolved configuration options for a Powerlines project, after being processed and normalized by the configuration loading process.
|
|
665
664
|
*/
|
|
666
|
-
type ResolvedConfig$1<TUserConfig extends UserConfig = UserConfig, TExecutionOptions extends ExecutionOptions = ExecutionOptions> = Omit<TExecutionOptions, "logLevel"> & Omit<RequiredKeys<TUserConfig, "
|
|
665
|
+
type ResolvedConfig$1<TUserConfig extends UserConfig = UserConfig, TExecutionOptions extends ExecutionOptions = ExecutionOptions> = Omit<TExecutionOptions, "logLevel"> & Omit<RequiredKeys<TUserConfig, "input" | "name" | "title" | "plugins" | "mode" | "input" | "tsconfig" | "platform" | "projectType">, "compatibilityDate" | "output" | "resolve" | "logLevel" | "environments"> & {
|
|
667
666
|
/**
|
|
668
667
|
* The configuration options read from a configuration file on disk, which may be used to resolve the final configuration for the context. This typically includes the user configuration options defined in the `powerlines.config.ts` file, as well as any inline configuration options provided during execution.
|
|
669
668
|
*/
|
|
@@ -713,6 +712,10 @@ type ResolvedConfig$1<TUserConfig extends UserConfig = UserConfig, TExecutionOpt
|
|
|
713
712
|
* The log level determines the minimum severity of messages that will be logged. For example, if the log level is set to `LogLevel.INFO`, then messages with a severity of `INFO`, `WARN`, and `ERROR` will be logged, while messages with a severity of `DEBUG` and `TRACE` will be ignored. Setting the log level to `LogLevel.SILENT` will disable all logging. Alternatively, you can provide a more detailed configuration object that allows you to specify different log levels for different categories of logs, providing granular control over the logging behavior for different aspects of the system.
|
|
714
713
|
*/
|
|
715
714
|
logLevel: LogLevelResolvedConfig;
|
|
715
|
+
/**
|
|
716
|
+
* Environment-specific configurations
|
|
717
|
+
*/
|
|
718
|
+
environments: Record<string, ResolvedEnvironmentConfig>;
|
|
716
719
|
};
|
|
717
720
|
type InferOverridableConfig<TResolvedConfig extends ResolvedConfig$1 = ResolvedConfig$1> = DeepPartial<Omit<TResolvedConfig, "userConfig" | "inlineConfig" | "pluginConfig" | "cwd" | "configFile" | "command">>;
|
|
718
721
|
/**
|
|
@@ -732,5 +735,5 @@ type EnvironmentResolvedConfig<TResolvedConfig extends ResolvedConfig$1 = Resolv
|
|
|
732
735
|
environment: ResolvedEnvironmentConfig;
|
|
733
736
|
};
|
|
734
737
|
//#endregion
|
|
735
|
-
export { BaseExecutionOptions, BuildInlineConfig, CleanInlineConfig, Config, ConfigParams, CopyConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, FrameworkOptions, InferOverridableConfig, InlineConfig, InlineConfigPaths, LintInlineConfig, Mode, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig$1 as ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise,
|
|
738
|
+
export { BaseExecutionOptions, BuildInlineConfig, CleanInlineConfig, Config, ConfigParams, CopyConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, FrameworkOptions, InferOverridableConfig, InlineConfig, InlineConfigPaths, LintInlineConfig, Mode, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig$1 as ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise, WorkspaceConfig };
|
|
736
739
|
//# sourceMappingURL=config.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.cts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;;;;;;;;;;;;;;AA4CA;KAAY,eAAA,GAAkB,OAAA,CAAQ,oBAAA,IACpC,QAAA,CAAS,IAAA,CAAK,oBAAA;AAAA,KAEJ,aAAA,yBACc,aAAA,GAAgB,aAAA,qBAErC,OAAA,EAAS,QAAA,KAAa,YAAA,CAAa,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA;;;;KAKtD,iBAAA,kBACO,aAAA,GAAgB,aAAA,8BAErB,aAAA,CAAc,QAAA,EAAU,QAAA,GAAW,QAAA,KAAa,MAAA,CAAO,QAAA;;;;KAKzD,kBAAA,kBACO,aAAA,GAAgB,aAAA;EAI7B,MAAA,WAAiB,aAAA,CAAc,QAAA,EAAU,QAAA;EACzC,OAAA,EAAS,QAAA;A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AAA,CACE,eAAA;;;;KAaQ,yBAAA,yBACc,gBAAA,GAAiB,gBAAA,IACvC,eAAA;EAzHQ;AAAA;AAGZ;;;;EAHY,SAgID,iBAAA,EAAmB,YAAA,CAAa,iBAAA;EA7HU;;;EAkInD,WAAA,EAAa,yBAAA;AAAA"}
|
package/dist/types/config.d.mts
CHANGED
|
@@ -330,7 +330,7 @@ interface Config {
|
|
|
330
330
|
/**
|
|
331
331
|
* Defines entries and location(s) of entry modules for the bundle. Relative paths are resolved based on the `root` option.
|
|
332
332
|
*/
|
|
333
|
-
input
|
|
333
|
+
input?: TypeDefinitionParameter | TypeDefinitionParameter[] | Record<string, TypeDefinitionParameter | TypeDefinitionParameter[]>;
|
|
334
334
|
/**
|
|
335
335
|
* Configuration for the output files generated by processing the source code
|
|
336
336
|
*/
|
|
@@ -527,19 +527,18 @@ type ConfigParams = BaseExecutionOptions & Pick<Required<UserConfig>, "mode"> &
|
|
|
527
527
|
*/
|
|
528
528
|
command: string;
|
|
529
529
|
};
|
|
530
|
-
type
|
|
531
|
-
type
|
|
532
|
-
type
|
|
533
|
-
type
|
|
534
|
-
type
|
|
535
|
-
type ParsedUserConfig<TUserConfig extends UserConfig = UserConfig> = ResolvedConfig<UserInputConfig<TUserConfig>> & {
|
|
530
|
+
type UserConfigFnObject = (env: ConfigParams) => UserConfig | UserConfig[];
|
|
531
|
+
type UserConfigFnPromise = (env: ConfigParams) => Promise<UserConfig | UserConfig[]>;
|
|
532
|
+
type UserConfigFn = (env: ConfigParams) => UserConfig | UserConfig[] | Promise<UserConfig | UserConfig[]>;
|
|
533
|
+
type UserConfigExport = UserConfig | UserConfig[] | Promise<UserConfig | UserConfig[]> | UserConfigFnObject | UserConfigFnPromise | UserConfigFn;
|
|
534
|
+
type ParsedUserConfig = ResolvedConfig<UserConfig> & {
|
|
536
535
|
/**
|
|
537
536
|
* The path to the user configuration file, if it exists.
|
|
538
537
|
*
|
|
539
538
|
* @remarks
|
|
540
539
|
* This is typically the `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` file in the project root.
|
|
541
540
|
*/
|
|
542
|
-
configFile?: ConfigLayer<
|
|
541
|
+
configFile?: ConfigLayer<UserConfig>["configFile"];
|
|
543
542
|
};
|
|
544
543
|
type InlineConfigPaths = {
|
|
545
544
|
/**
|
|
@@ -623,7 +622,7 @@ interface ResolvedEntryTypeDefinition extends TypeDefinition {
|
|
|
623
622
|
*/
|
|
624
623
|
output?: string;
|
|
625
624
|
}
|
|
626
|
-
type ResolvedEnvironmentConfig = RequiredKeys<Omit<EnvironmentConfig, "preview">, "consumer" | "ssr"> & {
|
|
625
|
+
type ResolvedEnvironmentConfig = RequiredKeys<Omit<EnvironmentConfig, "preview">, "input" | "consumer" | "ssr"> & {
|
|
627
626
|
/**
|
|
628
627
|
* A string identifier for the environment used by the system and plugins to determine which environment-specific configuration to use during the build process.
|
|
629
628
|
*/
|
|
@@ -663,7 +662,7 @@ type ResolvedOutputConfig = Required<Omit<OutputConfig, "copy" | "storage">> & P
|
|
|
663
662
|
/**
|
|
664
663
|
* The base resolved configuration options for a Powerlines project, after being processed and normalized by the configuration loading process.
|
|
665
664
|
*/
|
|
666
|
-
type ResolvedConfig$1<TUserConfig extends UserConfig = UserConfig, TExecutionOptions extends ExecutionOptions = ExecutionOptions> = Omit<TExecutionOptions, "logLevel"> & Omit<RequiredKeys<TUserConfig, "
|
|
665
|
+
type ResolvedConfig$1<TUserConfig extends UserConfig = UserConfig, TExecutionOptions extends ExecutionOptions = ExecutionOptions> = Omit<TExecutionOptions, "logLevel"> & Omit<RequiredKeys<TUserConfig, "input" | "name" | "title" | "plugins" | "mode" | "input" | "tsconfig" | "platform" | "projectType">, "compatibilityDate" | "output" | "resolve" | "logLevel" | "environments"> & {
|
|
667
666
|
/**
|
|
668
667
|
* The configuration options read from a configuration file on disk, which may be used to resolve the final configuration for the context. This typically includes the user configuration options defined in the `powerlines.config.ts` file, as well as any inline configuration options provided during execution.
|
|
669
668
|
*/
|
|
@@ -713,6 +712,10 @@ type ResolvedConfig$1<TUserConfig extends UserConfig = UserConfig, TExecutionOpt
|
|
|
713
712
|
* The log level determines the minimum severity of messages that will be logged. For example, if the log level is set to `LogLevel.INFO`, then messages with a severity of `INFO`, `WARN`, and `ERROR` will be logged, while messages with a severity of `DEBUG` and `TRACE` will be ignored. Setting the log level to `LogLevel.SILENT` will disable all logging. Alternatively, you can provide a more detailed configuration object that allows you to specify different log levels for different categories of logs, providing granular control over the logging behavior for different aspects of the system.
|
|
714
713
|
*/
|
|
715
714
|
logLevel: LogLevelResolvedConfig;
|
|
715
|
+
/**
|
|
716
|
+
* Environment-specific configurations
|
|
717
|
+
*/
|
|
718
|
+
environments: Record<string, ResolvedEnvironmentConfig>;
|
|
716
719
|
};
|
|
717
720
|
type InferOverridableConfig<TResolvedConfig extends ResolvedConfig$1 = ResolvedConfig$1> = DeepPartial<Omit<TResolvedConfig, "userConfig" | "inlineConfig" | "pluginConfig" | "cwd" | "configFile" | "command">>;
|
|
718
721
|
/**
|
|
@@ -732,5 +735,5 @@ type EnvironmentResolvedConfig<TResolvedConfig extends ResolvedConfig$1 = Resolv
|
|
|
732
735
|
environment: ResolvedEnvironmentConfig;
|
|
733
736
|
};
|
|
734
737
|
//#endregion
|
|
735
|
-
export { BaseExecutionOptions, BuildInlineConfig, CleanInlineConfig, Config, ConfigParams, CopyConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, FrameworkOptions, InferOverridableConfig, InlineConfig, InlineConfigPaths, LintInlineConfig, Mode, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig$1 as ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise,
|
|
738
|
+
export { BaseExecutionOptions, BuildInlineConfig, CleanInlineConfig, Config, ConfigParams, CopyConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, FrameworkOptions, InferOverridableConfig, InlineConfig, InlineConfigPaths, LintInlineConfig, Mode, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig$1 as ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise, WorkspaceConfig };
|
|
736
739
|
//# sourceMappingURL=config.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;;;;;;;;;;;;;;AA4CA;KAAY,eAAA,GAAkB,OAAA,CAAQ,oBAAA,IACpC,QAAA,CAAS,IAAA,CAAK,oBAAA;AAAA,KAEJ,aAAA,yBACc,aAAA,GAAgB,aAAA,qBAErC,OAAA,EAAS,QAAA,KAAa,YAAA,CAAa,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA;;;;KAKtD,iBAAA,kBACO,aAAA,GAAgB,aAAA,8BAErB,aAAA,CAAc,QAAA,EAAU,QAAA,GAAW,QAAA,KAAa,MAAA,CAAO,QAAA;;;;KAKzD,kBAAA,kBACO,aAAA,GAAgB,aAAA;EAI7B,MAAA,WAAiB,aAAA,CAAc,QAAA,EAAU,QAAA;EACzC,OAAA,EAAS,QAAA;AAAA;EAGT,MAAA,EAAQ,MAAA,CAAO,QAAA;EACf,OAAA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B,gBAAA,IACvC,eAAA;EAzHQ;AAAA;AAGZ;;;;EAHY,SAgID,iBAAA,EAAmB,YAAA,CAAa,iBAAA;EA7HU;;;EAkInD,WAAA,EAAa,yBAAA;AAAA"}
|
package/dist/types/index.d.cts
CHANGED
|
@@ -6,4 +6,4 @@ import { CallHookOptions, HookListOrders, HooksList, HooksListItem, InferHookFun
|
|
|
6
6
|
import { CustomLogger, CustomLoggerMessage, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, PowerlinesMessage } from "./logging.cjs";
|
|
7
7
|
import { DeepkitOptions, Level, ParsedTypeScriptConfig, RawReflectionMode, ReflectionMode, TSCompilerOptions, TSConfig } from "./tsconfig.cjs";
|
|
8
8
|
import { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentPlugin, ExecutionContext, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext } from "./context.cjs";
|
|
9
|
-
import { BaseExecutionOptions, BuildInlineConfig, CleanInlineConfig, Config, ConfigParams, CopyConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, FrameworkOptions, InferOverridableConfig, InlineConfig, InlineConfigPaths, LintInlineConfig, Mode, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise,
|
|
9
|
+
import { BaseExecutionOptions, BuildInlineConfig, CleanInlineConfig, Config, ConfigParams, CopyConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, FrameworkOptions, InferOverridableConfig, InlineConfig, InlineConfigPaths, LintInlineConfig, Mode, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise, WorkspaceConfig } from "./config.cjs";
|
package/dist/types/index.d.mts
CHANGED
|
@@ -6,4 +6,4 @@ import { CallHookOptions, HookListOrders, HooksList, HooksListItem, InferHookFun
|
|
|
6
6
|
import { CustomLogger, CustomLoggerMessage, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, PowerlinesMessage } from "./logging.mjs";
|
|
7
7
|
import { DeepkitOptions, Level, ParsedTypeScriptConfig, RawReflectionMode, ReflectionMode, TSCompilerOptions, TSConfig } from "./tsconfig.mjs";
|
|
8
8
|
import { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentPlugin, ExecutionContext, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext } from "./context.mjs";
|
|
9
|
-
import { BaseExecutionOptions, BuildInlineConfig, CleanInlineConfig, Config, ConfigParams, CopyConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, FrameworkOptions, InferOverridableConfig, InlineConfig, InlineConfigPaths, LintInlineConfig, Mode, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise,
|
|
9
|
+
import { BaseExecutionOptions, BuildInlineConfig, CleanInlineConfig, Config, ConfigParams, CopyConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, FrameworkOptions, InferOverridableConfig, InlineConfig, InlineConfigPaths, LintInlineConfig, Mode, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise, WorkspaceConfig } from "./config.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/core",
|
|
3
|
-
"version": "0.48.
|
|
3
|
+
"version": "0.48.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "An internal core package for Powerlines - please use the `powerlines` package for public usage.",
|
|
6
6
|
"homepage": "https://stormsoftware.com",
|
|
@@ -327,8 +327,8 @@
|
|
|
327
327
|
"@donedeal0/superdiff": "^3.2.0",
|
|
328
328
|
"@jridgewell/sourcemap-codec": "^1.5.5",
|
|
329
329
|
"@rolldown/pluginutils": "1.0.0-rc.18",
|
|
330
|
-
"@storm-software/config": "^1.137.
|
|
331
|
-
"@storm-software/config-tools": "^1.190.
|
|
330
|
+
"@storm-software/config": "^1.137.59",
|
|
331
|
+
"@storm-software/config-tools": "^1.190.27",
|
|
332
332
|
"@stryke/capnp": "^0.12.102",
|
|
333
333
|
"@stryke/convert": "^0.7.7",
|
|
334
334
|
"@stryke/env": "^0.20.93",
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
"unplugin-combine": "^2.4.0"
|
|
363
363
|
},
|
|
364
364
|
"devDependencies": {
|
|
365
|
-
"@storm-software/testing-tools": "^1.119.
|
|
365
|
+
"@storm-software/testing-tools": "^1.119.180",
|
|
366
366
|
"@stryke/types": "^0.12.4",
|
|
367
367
|
"@types/bun": "^1.3.14",
|
|
368
368
|
"@types/diff-match-patch": "^1.0.36",
|
|
@@ -375,5 +375,5 @@
|
|
|
375
375
|
"undici-types": "^7.25.0"
|
|
376
376
|
},
|
|
377
377
|
"publishConfig": { "access": "public" },
|
|
378
|
-
"gitHead": "
|
|
378
|
+
"gitHead": "d1ca3daf5218964ec6840bea0d066ca91601b616"
|
|
379
379
|
}
|