@powerlines/core 0.0.9 → 0.0.11
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/lib/config.cjs +2 -1
- package/dist/lib/config.cjs.map +1 -1
- package/dist/lib/config.d.cts.map +1 -1
- package/dist/lib/config.d.mts.map +1 -1
- package/dist/lib/config.mjs +2 -1
- package/dist/lib/config.mjs.map +1 -1
- package/dist/plugin-base.cjs +6 -6
- package/dist/plugin-base.cjs.map +1 -1
- package/dist/plugin-base.d.cts.map +1 -1
- package/dist/plugin-base.d.mts.map +1 -1
- package/dist/plugin-base.mjs +6 -6
- package/dist/plugin-base.mjs.map +1 -1
- package/dist/plugin-utils/build-helpers.d.cts.map +1 -1
- package/dist/types/unplugin.d.mts.map +1 -1
- package/package.json +2 -2
package/dist/lib/config.cjs
CHANGED
|
@@ -4,6 +4,7 @@ let __stryke_fs_exists = require("@stryke/fs/exists");
|
|
|
4
4
|
let __stryke_path_append = require("@stryke/path/append");
|
|
5
5
|
let __stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
6
6
|
let __stryke_path_replace = require("@stryke/path/replace");
|
|
7
|
+
let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
|
|
7
8
|
let __stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
8
9
|
let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
9
10
|
let c12 = require("c12");
|
|
@@ -64,7 +65,7 @@ async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mod
|
|
|
64
65
|
name: framework,
|
|
65
66
|
envName: mode,
|
|
66
67
|
globalRc: true,
|
|
67
|
-
packageJson:
|
|
68
|
+
packageJson: (0, __stryke_string_format_camel_case.camelCase)(framework),
|
|
68
69
|
dotenv: true,
|
|
69
70
|
jiti
|
|
70
71
|
});
|
package/dist/lib/config.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.cjs","names":["resolvedUserConfig: Partial<ParsedUserConfig>","resolvedUserConfigFile: string | undefined"],"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 { getWorkspaceConfig } from \"@storm-software/config-tools/get-config\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { loadConfig as loadConfigC12 } from \"c12\";\nimport defu from \"defu\";\nimport type { Jiti } from \"jiti\";\nimport type {\n ParsedUserConfig,\n PowerlinesCommand,\n UserConfig,\n WorkspaceConfig\n} from \"../types/config\";\nimport { AnyUserConfig } from \"../types/config\";\nimport { Context } from \"../types/context\";\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 workspaceRoot - The root directory of the workspace.\n * @param cwd - 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 workspaceRoot: string,\n cwd: string\n): Promise<WorkspaceConfig> {\n return defu(\n {\n workspaceRoot\n },\n await getWorkspaceConfig(true, {\n cwd,\n workspaceRoot,\n useDefault: true\n })\n );\n}\n\n/**\n * Loads the user configuration file for the project.\n *\n * @param projectRoot - The root directory of the project.\n * @param workspaceRoot - The root directory of the workspace.\n * @param jiti - An instance of Jiti to resolve modules from\n * @param command - The {@link PowerlinesCommand} string associated with the current running process\n * @param mode - The mode in which the project is running (default is \"production\").\n * @param configFile - An optional path to a specific configuration file.\n * @param framework - The framework name to use for default configuration file names.\n * @returns A promise that resolves to the resolved user configuration.\n */\nexport async function loadUserConfigFile(\n projectRoot: string,\n workspaceRoot: string,\n jiti: Jiti,\n command?: PowerlinesCommand,\n mode = \"production\",\n configFile?: string,\n framework = \"powerlines\"\n): Promise<ParsedUserConfig> {\n let resolvedUserConfig: Partial<ParsedUserConfig> = {};\n\n let resolvedUserConfigFile: string | undefined;\n if (configFile) {\n resolvedUserConfigFile = existsSync(replacePath(configFile, projectRoot))\n ? replacePath(configFile, projectRoot)\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n replacePath(configFile, projectRoot)\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n replacePath(configFile, projectRoot)\n )\n : existsSync(\n joinPaths(appendPath(projectRoot, workspaceRoot), configFile)\n )\n ? joinPaths(appendPath(projectRoot, workspaceRoot), configFile)\n : undefined;\n }\n\n if (!resolvedUserConfigFile) {\n resolvedUserConfigFile = existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.ts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.ts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.js`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.js`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mjs`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.ts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.ts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.js`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.js`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mjs`\n )\n : undefined;\n }\n\n if (resolvedUserConfigFile) {\n const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));\n if (resolved) {\n let config = {};\n if (isFunction(resolved)) {\n config = await Promise.resolve(\n resolved({\n command,\n mode,\n isSsrBuild: false,\n isPreview: false\n })\n );\n }\n\n if (isSetObject(config)) {\n resolvedUserConfig = {\n ...config,\n config: config as UserConfig,\n configFile: resolvedUserConfigFile\n };\n }\n }\n }\n\n const result = await loadConfigC12({\n cwd: projectRoot,\n name: framework,\n envName: mode,\n globalRc: true,\n packageJson: true,\n dotenv: true,\n jiti\n });\n\n return defu(\n resolvedUserConfig,\n isSetObject(result?.config) ? { ...result.config, ...result } : {}\n ) as ParsedUserConfig;\n}\n\n/**\n * A type helper to make it easier to use `powerlines.config.ts` files.\n *\n * @remarks\n * The function accepts a direct {@link AnyUserConfig} object and returns it typed as a {@link UserConfig} object.\n */\nexport function defineConfig(config: AnyUserConfig): UserConfig {\n return config as any;\n}\n"],"mappings":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a,cAAc,EACtC,GAAG,UAAU,aACd,mHAGgB,aAAa,cAAc,EACtC,GAAG,UAAU,aACd,CACF,gFAEY,aAAa,cAAc,EACtC,GAAG,UAAU,aACd,GACD;AAGpB,KAAI,wBAAwB;EAC1B,MAAM,WAAW,MAAM,KAAK,OAAO,KAAK,WAAW,uBAAuB,CAAC;AAC3E,MAAI,UAAU;GACZ,IAAI,SAAS,EAAE;AACf,wDAAe,SAAS,CACtB,UAAS,MAAM,QAAQ,QACrB,SAAS;IACP;IACA;IACA,YAAY;IACZ,WAAW;IACZ,CAAC,CACH;AAGH,2DAAgB,OAAO,CACrB,sBAAqB;IACnB,GAAG;IACK;IACR,YAAY;IACb;;;CAKP,MAAM,SAAS,0BAAoB;EACjC,KAAK;EACL,MAAM;EACN,SAAS;EACT,UAAU;EACV,aAAa;EACb,QAAQ;EACR;EACD,CAAC;AAEF,0BACE,wEACY,QAAQ,OAAO,GAAG;EAAE,GAAG,OAAO;EAAQ,GAAG;EAAQ,GAAG,EAAE,CACnE;;;;;;;;AASH,SAAgB,aAAa,QAAmC;AAC9D,QAAO"}
|
|
1
|
+
{"version":3,"file":"config.cjs","names":["resolvedUserConfig: Partial<ParsedUserConfig>","resolvedUserConfigFile: string | undefined"],"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 { getWorkspaceConfig } from \"@storm-software/config-tools/get-config\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { loadConfig as loadConfigC12 } from \"c12\";\nimport defu from \"defu\";\nimport type { Jiti } from \"jiti\";\nimport type {\n ParsedUserConfig,\n PowerlinesCommand,\n UserConfig,\n WorkspaceConfig\n} from \"../types/config\";\nimport { AnyUserConfig } from \"../types/config\";\nimport { Context } from \"../types/context\";\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 workspaceRoot - The root directory of the workspace.\n * @param cwd - 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 workspaceRoot: string,\n cwd: string\n): Promise<WorkspaceConfig> {\n return defu(\n {\n workspaceRoot\n },\n await getWorkspaceConfig(true, {\n cwd,\n workspaceRoot,\n useDefault: true\n })\n );\n}\n\n/**\n * Loads the user configuration file for the project.\n *\n * @param projectRoot - The root directory of the project.\n * @param workspaceRoot - The root directory of the workspace.\n * @param jiti - An instance of Jiti to resolve modules from\n * @param command - The {@link PowerlinesCommand} string associated with the current running process\n * @param mode - The mode in which the project is running (default is \"production\").\n * @param configFile - An optional path to a specific configuration file.\n * @param framework - The framework name to use for default configuration file names.\n * @returns A promise that resolves to the resolved user configuration.\n */\nexport async function loadUserConfigFile(\n projectRoot: string,\n workspaceRoot: string,\n jiti: Jiti,\n command?: PowerlinesCommand,\n mode = \"production\",\n configFile?: string,\n framework = \"powerlines\"\n): Promise<ParsedUserConfig> {\n let resolvedUserConfig: Partial<ParsedUserConfig> = {};\n\n let resolvedUserConfigFile: string | undefined;\n if (configFile) {\n resolvedUserConfigFile = existsSync(replacePath(configFile, projectRoot))\n ? replacePath(configFile, projectRoot)\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n replacePath(configFile, projectRoot)\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n replacePath(configFile, projectRoot)\n )\n : existsSync(\n joinPaths(appendPath(projectRoot, workspaceRoot), configFile)\n )\n ? joinPaths(appendPath(projectRoot, workspaceRoot), configFile)\n : undefined;\n }\n\n if (!resolvedUserConfigFile) {\n resolvedUserConfigFile = existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.ts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.ts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.js`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.js`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mjs`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.ts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.ts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.js`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.js`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mjs`\n )\n : undefined;\n }\n\n if (resolvedUserConfigFile) {\n const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));\n if (resolved) {\n let config = {};\n if (isFunction(resolved)) {\n config = await Promise.resolve(\n resolved({\n command,\n mode,\n isSsrBuild: false,\n isPreview: false\n })\n );\n }\n\n if (isSetObject(config)) {\n resolvedUserConfig = {\n ...config,\n config: config as UserConfig,\n configFile: resolvedUserConfigFile\n };\n }\n }\n }\n\n const result = await loadConfigC12({\n cwd: projectRoot,\n name: framework,\n envName: mode,\n globalRc: true,\n packageJson: camelCase(framework),\n dotenv: true,\n jiti\n });\n\n return defu(\n resolvedUserConfig,\n isSetObject(result?.config) ? { ...result.config, ...result } : {}\n ) as ParsedUserConfig;\n}\n\n/**\n * A type helper to make it easier to use `powerlines.config.ts` files.\n *\n * @remarks\n * The function accepts a direct {@link AnyUserConfig} object and returns it typed as a {@link UserConfig} object.\n */\nexport function defineConfig(config: AnyUserConfig): UserConfig {\n return config as any;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqDA,eAAsB,oBACpB,eACA,KAC0B;AAC1B,0BACE,EACE,eACD,EACD,uEAAyB,MAAM;EAC7B;EACA;EACA,YAAY;EACb,CAAC,CACH;;;;;;;;;;;;;;AAeH,eAAsB,mBACpB,aACA,eACA,MACA,SACA,OAAO,cACP,YACA,YAAY,cACe;CAC3B,IAAIA,qBAAgD,EAAE;CAEtD,IAAIC;AACJ,KAAI,WACF,oGAAgD,YAAY,YAAY,CAAC,0CACzD,YAAY,YAAY,mHAGnB,aAAa,cAAc,yCAC1B,YAAY,YAAY,CACrC,CACF,gFAEY,aAAa,cAAc,yCAC1B,YAAY,YAAY,CACrC,mHAEwB,aAAa,cAAc,EAAE,WAAW,CAC9D,gFACoB,aAA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AAM;EACN,SAAS;EACT,UAAU;EACV,8DAAuB,UAAU;EACjC,QAAQ;EACR;EACD,CAAC;AAEF,0BACE,wEACY,QAAQ,OAAO,GAAG;EAAE,GAAG,OAAO;EAAQ,GAAG;EAAQ,GAAG,EAAE,CACnE;;;;;;;;AASH,SAAgB,aAAa,QAAmC;AAC9D,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.cts","names":[],"sources":["../../src/lib/config.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"config.d.cts","names":[],"sources":["../../src/lib/config.ts"],"sourcesContent":[],"mappings":";;;;;KAsCY,0CAA0C,UAAU,WAAW,KACzE,8EAGA,QAAQ;EAJE,MAAA,EAKA,QALA,CAAA,QAAA,CAAA;CAA0C;;;;;;;;AAehC,iBAAA,mBAAA,CAGX,aAAR,EAAA,MAAO,EAAA,GAAA,EAAA,MAAA,CAAA,EAAP,OAAO,CAAC,eAAD,CAAA;AAyBV;;;;;;AAmKA;;;;;;iBAnKsB,kBAAA,mDAGd,gBACI,4EAIT,QAAQ;;;;;;;iBA2JK,YAAA,SAAqB,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/lib/config.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/lib/config.ts"],"sourcesContent":[],"mappings":";;;;;KAsCY,0CAA0C,UAAU,WAAW,KACzE,8EAGA,QAAQ;EAJE,MAAA,EAKA,QALA,CAAA,QAAA,CAAA;CAA0C;;;;;;;;AAehC,iBAAA,mBAAA,CAGX,aAAR,EAAA,MAAO,EAAA,GAAA,EAAA,MAAA,CAAA,EAAP,OAAO,CAAC,eAAD,CAAA;AAyBV;;;;;;AAmKA;;;;;;iBAnKsB,kBAAA,mDAGd,gBACI,4EAIT,QAAQ;;;;;;;iBA2JK,YAAA,SAAqB,gBAAgB"}
|
package/dist/lib/config.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import { existsSync } from "@stryke/fs/exists";
|
|
|
3
3
|
import { appendPath } from "@stryke/path/append";
|
|
4
4
|
import { joinPaths } from "@stryke/path/join-paths";
|
|
5
5
|
import { replacePath } from "@stryke/path/replace";
|
|
6
|
+
import { camelCase } from "@stryke/string-format/camel-case";
|
|
6
7
|
import { isFunction } from "@stryke/type-checks/is-function";
|
|
7
8
|
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
8
9
|
import { loadConfig } from "c12";
|
|
@@ -62,7 +63,7 @@ async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mod
|
|
|
62
63
|
name: framework,
|
|
63
64
|
envName: mode,
|
|
64
65
|
globalRc: true,
|
|
65
|
-
packageJson:
|
|
66
|
+
packageJson: camelCase(framework),
|
|
66
67
|
dotenv: true,
|
|
67
68
|
jiti
|
|
68
69
|
});
|
package/dist/lib/config.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.mjs","names":["defu","resolvedUserConfig: Partial<ParsedUserConfig>","resolvedUserConfigFile: string | undefined","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 { getWorkspaceConfig } from \"@storm-software/config-tools/get-config\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { loadConfig as loadConfigC12 } from \"c12\";\nimport defu from \"defu\";\nimport type { Jiti } from \"jiti\";\nimport type {\n ParsedUserConfig,\n PowerlinesCommand,\n UserConfig,\n WorkspaceConfig\n} from \"../types/config\";\nimport { AnyUserConfig } from \"../types/config\";\nimport { Context } from \"../types/context\";\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 workspaceRoot - The root directory of the workspace.\n * @param cwd - 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 workspaceRoot: string,\n cwd: string\n): Promise<WorkspaceConfig> {\n return defu(\n {\n workspaceRoot\n },\n await getWorkspaceConfig(true, {\n cwd,\n workspaceRoot,\n useDefault: true\n })\n );\n}\n\n/**\n * Loads the user configuration file for the project.\n *\n * @param projectRoot - The root directory of the project.\n * @param workspaceRoot - The root directory of the workspace.\n * @param jiti - An instance of Jiti to resolve modules from\n * @param command - The {@link PowerlinesCommand} string associated with the current running process\n * @param mode - The mode in which the project is running (default is \"production\").\n * @param configFile - An optional path to a specific configuration file.\n * @param framework - The framework name to use for default configuration file names.\n * @returns A promise that resolves to the resolved user configuration.\n */\nexport async function loadUserConfigFile(\n projectRoot: string,\n workspaceRoot: string,\n jiti: Jiti,\n command?: PowerlinesCommand,\n mode = \"production\",\n configFile?: string,\n framework = \"powerlines\"\n): Promise<ParsedUserConfig> {\n let resolvedUserConfig: Partial<ParsedUserConfig> = {};\n\n let resolvedUserConfigFile: string | undefined;\n if (configFile) {\n resolvedUserConfigFile = existsSync(replacePath(configFile, projectRoot))\n ? replacePath(configFile, projectRoot)\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n replacePath(configFile, projectRoot)\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n replacePath(configFile, projectRoot)\n )\n : existsSync(\n joinPaths(appendPath(projectRoot, workspaceRoot), configFile)\n )\n ? joinPaths(appendPath(projectRoot, workspaceRoot), configFile)\n : undefined;\n }\n\n if (!resolvedUserConfigFile) {\n resolvedUserConfigFile = existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.ts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.ts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.js`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.js`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mjs`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.ts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.ts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.js`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.js`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mjs`\n )\n : undefined;\n }\n\n if (resolvedUserConfigFile) {\n const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));\n if (resolved) {\n let config = {};\n if (isFunction(resolved)) {\n config = await Promise.resolve(\n resolved({\n command,\n mode,\n isSsrBuild: false,\n isPreview: false\n })\n );\n }\n\n if (isSetObject(config)) {\n resolvedUserConfig = {\n ...config,\n config: config as UserConfig,\n configFile: resolvedUserConfigFile\n };\n }\n }\n }\n\n const result = await loadConfigC12({\n cwd: projectRoot,\n name: framework,\n envName: mode,\n globalRc: true,\n packageJson: true,\n dotenv: true,\n jiti\n });\n\n return defu(\n resolvedUserConfig,\n isSetObject(result?.config) ? { ...result.config, ...result } : {}\n ) as ParsedUserConfig;\n}\n\n/**\n * A type helper to make it easier to use `powerlines.config.ts` files.\n *\n * @remarks\n * The function accepts a direct {@link AnyUserConfig} object and returns it typed as a {@link UserConfig} object.\n */\nexport function defineConfig(config: AnyUserConfig): UserConfig {\n return config as any;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAoDA,eAAsB,oBACpB,eACA,KAC0B;AAC1B,QAAOA,OACL,EACE,eACD,EACD,MAAM,mBAAmB,MAAM;EAC7B;EACA;EACA,YAAY;EACb,CAAC,CACH;;;;;;;;;;;;;;AAeH,eAAsB,mBACpB,aACA,eACA,MACA,SACA,OAAO,cACP,YACA,YAAY,cACe;CAC3B,IAAIC,qBAAgD,EAAE;CAEtD,IAAIC;AACJ,KAAI,WACF,0BAAyB,WAAW,YAAY,YAAY,YAAY,CAAC,GACrE,YAAY,YAAY,YAAY,GACpC,WACI,UACE,WAAW,aAAa,cAAc,EACtC,YAAY,YAAY,YAAY,CACrC,CACF,GACD,UACE,WAAW,aAAa,cAAc,EACtC,YAAY,YAAY,YAAY,CACrC,GACD,WACI,UAAU,WAAW,aAAa,cAAc,EAAE,WAAW,CAC9D,GACD,UAAU,WAAW,aAAa,cAAc,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;IACP;IACA;IACA,YAAY;IACZ,WAAW;IACZ,CAAC,CACH;AAGH,OAAI,YAAY,OAAO,CACrB,sBAAqB;IACnB,GAAG;IACK;IACR,YAAY;IACb;;;CAKP,MAAM,SAAS,MAAMC,WAAc;EACjC,KAAK;EACL,MAAM;EACN,SAAS;EACT,UAAU;EACV,aAAa;EACb,QAAQ;EACR;EACD,CAAC;AAEF,QAAOH,OACL,oBACA,YAAY,QAAQ,OAAO,GAAG;EAAE,GAAG,OAAO;EAAQ,GAAG;EAAQ,GAAG,EAAE,CACnE;;;;;;;;AASH,SAAgB,aAAa,QAAmC;AAC9D,QAAO"}
|
|
1
|
+
{"version":3,"file":"config.mjs","names":["defu","resolvedUserConfig: Partial<ParsedUserConfig>","resolvedUserConfigFile: string | undefined","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 { getWorkspaceConfig } from \"@storm-software/config-tools/get-config\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { loadConfig as loadConfigC12 } from \"c12\";\nimport defu from \"defu\";\nimport type { Jiti } from \"jiti\";\nimport type {\n ParsedUserConfig,\n PowerlinesCommand,\n UserConfig,\n WorkspaceConfig\n} from \"../types/config\";\nimport { AnyUserConfig } from \"../types/config\";\nimport { Context } from \"../types/context\";\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 workspaceRoot - The root directory of the workspace.\n * @param cwd - 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 workspaceRoot: string,\n cwd: string\n): Promise<WorkspaceConfig> {\n return defu(\n {\n workspaceRoot\n },\n await getWorkspaceConfig(true, {\n cwd,\n workspaceRoot,\n useDefault: true\n })\n );\n}\n\n/**\n * Loads the user configuration file for the project.\n *\n * @param projectRoot - The root directory of the project.\n * @param workspaceRoot - The root directory of the workspace.\n * @param jiti - An instance of Jiti to resolve modules from\n * @param command - The {@link PowerlinesCommand} string associated with the current running process\n * @param mode - The mode in which the project is running (default is \"production\").\n * @param configFile - An optional path to a specific configuration file.\n * @param framework - The framework name to use for default configuration file names.\n * @returns A promise that resolves to the resolved user configuration.\n */\nexport async function loadUserConfigFile(\n projectRoot: string,\n workspaceRoot: string,\n jiti: Jiti,\n command?: PowerlinesCommand,\n mode = \"production\",\n configFile?: string,\n framework = \"powerlines\"\n): Promise<ParsedUserConfig> {\n let resolvedUserConfig: Partial<ParsedUserConfig> = {};\n\n let resolvedUserConfigFile: string | undefined;\n if (configFile) {\n resolvedUserConfigFile = existsSync(replacePath(configFile, projectRoot))\n ? replacePath(configFile, projectRoot)\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n replacePath(configFile, projectRoot)\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n replacePath(configFile, projectRoot)\n )\n : existsSync(\n joinPaths(appendPath(projectRoot, workspaceRoot), configFile)\n )\n ? joinPaths(appendPath(projectRoot, workspaceRoot), configFile)\n : undefined;\n }\n\n if (!resolvedUserConfigFile) {\n resolvedUserConfigFile = existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.ts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.ts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.js`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.js`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.${mode}.config.mjs`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.ts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.ts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.js`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.js`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mts`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mts`\n )\n : existsSync(\n joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mjs`\n )\n )\n ? joinPaths(\n appendPath(projectRoot, workspaceRoot),\n `${framework}.config.mjs`\n )\n : undefined;\n }\n\n if (resolvedUserConfigFile) {\n const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));\n if (resolved) {\n let config = {};\n if (isFunction(resolved)) {\n config = await Promise.resolve(\n resolved({\n command,\n mode,\n isSsrBuild: false,\n isPreview: false\n })\n );\n }\n\n if (isSetObject(config)) {\n resolvedUserConfig = {\n ...config,\n config: config as UserConfig,\n configFile: resolvedUserConfigFile\n };\n }\n }\n }\n\n const result = await loadConfigC12({\n cwd: projectRoot,\n name: framework,\n envName: mode,\n globalRc: true,\n packageJson: camelCase(framework),\n dotenv: true,\n jiti\n });\n\n return defu(\n resolvedUserConfig,\n isSetObject(result?.config) ? { ...result.config, ...result } : {}\n ) as ParsedUserConfig;\n}\n\n/**\n * A type helper to make it easier to use `powerlines.config.ts` files.\n *\n * @remarks\n * The function accepts a direct {@link AnyUserConfig} object and returns it typed as a {@link UserConfig} object.\n */\nexport function defineConfig(config: AnyUserConfig): UserConfig {\n return config as any;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqDA,eAAsB,oBACpB,eACA,KAC0B;AAC1B,QAAOA,OACL,EACE,eACD,EACD,MAAM,mBAAmB,MAAM;EAC7B;EACA;EACA,YAAY;EACb,CAAC,CACH;;;;;;;;;;;;;;AAeH,eAAsB,mBACpB,aACA,eACA,MACA,SACA,OAAO,cACP,YACA,YAAY,cACe;CAC3B,IAAIC,qBAAgD,EAAE;CAEtD,IAAIC;AACJ,KAAI,WACF,0BAAyB,WAAW,YAAY,YAAY,YAAY,CAAC,GACrE,YAAY,YAAY,YAAY,GACpC,WACI,UACE,WAAW,aAAa,cAAc,EACtC,YAAY,YAAY,YAAY,CACrC,CACF,GACD,UACE,WAAW,aAAa,cAAc,EACtC,YAAY,YAAY,YAAY,CACrC,GACD,WACI,UAAU,WAAW,aAAa,cAAc,EAAE,WAAW,CAC9D,GACD,UAAU,WAAW,aAAa,cAAc,EAAE,WAAW,GAC7D;AAGV,KAAI,CAAC,uBACH,0BAAyB,WACvB,UACE,WAAW,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,YACtB,CACF,GACG,UACE,WAAW,aAAa,cAAc,EACtC,GAAG,UAAU,GAAG,KAAK,YACtB,GACD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EACT,UAAU;EACV,aAAa,UAAU,UAAU;EACjC,QAAQ;EACR;EACD,CAAC;AAEF,QAAOH,OACL,oBACA,YAAY,QAAQ,OAAO,GAAG;EAAE,GAAG,OAAO;EAAQ,GAAG;EAAQ,GAAG,EAAE,CACnE;;;;;;;;AASH,SAAgB,aAAa,QAAmC;AAC9D,QAAO"}
|
package/dist/plugin-base.cjs
CHANGED
|
@@ -25,11 +25,6 @@ const plugin = (options = {}) => {
|
|
|
25
25
|
format: ["cjs", "esm"],
|
|
26
26
|
dts: false
|
|
27
27
|
},
|
|
28
|
-
resolve: { external: [
|
|
29
|
-
"powerlines",
|
|
30
|
-
/^powerlines\/.*$/,
|
|
31
|
-
/^@powerlines\//
|
|
32
|
-
] },
|
|
33
28
|
platform: "node",
|
|
34
29
|
tsdown: {
|
|
35
30
|
format: ["cjs", "esm"],
|
|
@@ -45,8 +40,13 @@ const plugin = (options = {}) => {
|
|
|
45
40
|
shims: true,
|
|
46
41
|
outDir: "dist",
|
|
47
42
|
clean: true,
|
|
43
|
+
external: [
|
|
44
|
+
"powerlines",
|
|
45
|
+
/^powerlines\/.*$/,
|
|
46
|
+
/^@powerlines\//
|
|
47
|
+
],
|
|
48
48
|
skipNodeModulesBundle: true,
|
|
49
|
-
unbundle:
|
|
49
|
+
unbundle: false,
|
|
50
50
|
...options.tsdown
|
|
51
51
|
}
|
|
52
52
|
};
|
package/dist/plugin-base.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-base.cjs","names":["formatPackageJson"],"sources":["../src/plugin-base.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { build, UserConfig as BuildOptions } from \"tsdown\";\nimport { formatPackageJson } from \"./plugin-utils/format-package-json\";\nimport { ResolvedConfig, UserConfig } from \"./types/config\";\nimport { PluginContext } from \"./types/context\";\nimport { Plugin } from \"./types/plugin\";\n\nexport interface BasePluginOptions {\n tsdown?: Partial<BuildOptions>;\n}\n\nexport type BasePluginUserConfig = UserConfig & {\n tsdown: BasePluginOptions;\n};\n\nexport type BasePluginResolvedConfig = ResolvedConfig & {\n tsdown: Required<BasePluginOptions>;\n};\n\nexport type BasePluginContext<\n TResolvedConfig extends BasePluginResolvedConfig = BasePluginResolvedConfig\n> = PluginContext<TResolvedConfig>;\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <TContext extends BasePluginContext = BasePluginContext>(\n options: BasePluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"base\",\n config() {\n return {\n projectType: \"library\",\n input: [\"src/index.ts\", \"src/types/*.ts\", \"src/helpers/*.ts\"],\n output: {\n format: [\"cjs\", \"esm\"],\n dts: false\n },\n
|
|
1
|
+
{"version":3,"file":"plugin-base.cjs","names":["formatPackageJson"],"sources":["../src/plugin-base.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { build, UserConfig as BuildOptions } from \"tsdown\";\nimport { formatPackageJson } from \"./plugin-utils/format-package-json\";\nimport { ResolvedConfig, UserConfig } from \"./types/config\";\nimport { PluginContext } from \"./types/context\";\nimport { Plugin } from \"./types/plugin\";\n\nexport interface BasePluginOptions {\n tsdown?: Partial<BuildOptions>;\n}\n\nexport type BasePluginUserConfig = UserConfig & {\n tsdown: BasePluginOptions;\n};\n\nexport type BasePluginResolvedConfig = ResolvedConfig & {\n tsdown: Required<BasePluginOptions>;\n};\n\nexport type BasePluginContext<\n TResolvedConfig extends BasePluginResolvedConfig = BasePluginResolvedConfig\n> = PluginContext<TResolvedConfig>;\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <TContext extends BasePluginContext = BasePluginContext>(\n options: BasePluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"base\",\n config() {\n return {\n projectType: \"library\",\n input: [\"src/index.ts\", \"src/types/*.ts\", \"src/helpers/*.ts\"],\n output: {\n format: [\"cjs\", \"esm\"],\n dts: false\n },\n platform: \"node\",\n tsdown: {\n format: [\"cjs\", \"esm\"],\n logLevel: \"silent\",\n target: \"node22\",\n cjsDefault: true,\n treeshake: true,\n exports: {\n all: true\n },\n fixedExtension: true,\n nodeProtocol: true,\n minify: false,\n dts: true,\n shims: true,\n outDir: \"dist\",\n clean: true,\n external: [\"powerlines\", /^powerlines\\/.*$/, /^@powerlines\\//],\n skipNodeModulesBundle: true,\n unbundle: false,\n ...options.tsdown\n }\n };\n },\n async build() {\n await build({\n name: this.config.name,\n cwd: appendPath(this.config.root, this.workspaceConfig.workspaceRoot),\n entry:\n this.entry.filter(entry => entry?.file).length > 0\n ? Object.fromEntries(\n this.entry\n .filter(entry => entry?.file)\n .map(entry => [\n entry.output ||\n replaceExtension(\n replacePath(\n replacePath(\n entry.file,\n joinPaths(this.config.root, \"src\")\n ),\n this.entryPath\n )\n ),\n entry.file\n ])\n )\n : [\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"src\",\n \"**/*.ts\"\n ),\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"src\",\n \"**/*.tsx\"\n )\n ],\n platform: this.config.platform,\n tsconfig: this.tsconfig.tsconfigFilePath,\n outDir: this.config.output.buildPath,\n ...this.config.tsdown\n });\n\n await formatPackageJson(this);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;AA8CA,MAAa,UACX,UAA6B,EAAE,KACV;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO;IACL,aAAa;IACb,OAAO;KAAC;KAAgB;KAAkB;KAAmB;IAC7D,QAAQ;KACN,QAAQ,CAAC,OAAO,MAAM;KACtB,KAAK;KACN;IACD,UAAU;IACV,QAAQ;KACN,QAAQ,CAAC,OAAO,MAAM;KACtB,UAAU;KACV,QAAQ;KACR,YAAY;KACZ,WAAW;KACX,SAAS,EACP,KAAK,MACN;KACD,gBAAgB;KAChB,cAAc;KACd,QAAQ;KACR,KAAK;KACL,OAAO;KACP,QAAQ;KACR,OAAO;KACP,UAAU;MAAC;MAAc;MAAoB;MAAiB;KAC9D,uBAAuB;KACvB,UAAU;KACV,GAAG,QAAQ;KACZ;IACF;;EAEH,MAAM,QAAQ;AACZ,2BAAY;IACV,MAAM,KAAK,OAAO;IAClB,0CAAgB,KAAK,OAAO,MAAM,KAAK,gBAAgB,cAAc;IACrE,OACE,KAAK,MAAM,QAAO,UAAS,OAAO,KAAK,CAAC,SAAS,IAC7C,OAAO,YACL,KAAK,MACF,QAAO,UAAS,OAAO,KAAK,CAC5B,KAAI,UAAS,CACZ,MAAM,oIAIE,MAAM,wCACI,KAAK,OAAO,MAAM,MAAM,CACnC,EACD,KAAK,UACN,CACF,EACH,MAAM,KACP,CAAC,CACL,GACD,mCAEI,KAAK,gBAAgB,eACrB,KAAK,OAAO,MACZ,OACA,UACD,oCAEC,KAAK,gBAAgB,eACrB,KAAK,OAAO,MACZ,OACA,WACD,CACF;IACP,UAAU,KAAK,OAAO;IACtB,UAAU,KAAK,SAAS;IACxB,QAAQ,KAAK,OAAO,OAAO;IAC3B,GAAG,KAAK,OAAO;IAChB,CAAC;AAEF,SAAMA,2DAAkB,KAAK;;EAEhC;;AAGH,0BAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-base.d.cts","names":[],"sources":["../src/plugin-base.ts"],"sourcesContent":[],"mappings":";;;;;;UA2BiB,iBAAA;WACN,QAAQ;AADnB;AAIY,KAAA,oBAAA,GAAuB,YAAA,GAAA;EAIvB,MAAA,EAHF,iBAGE;CAA2B;AACpB,KADP,wBAAA,GAA2B,cACpB,GAAA;EAAT,MAAA,EAAA,QAAA,CAAS,iBAAT,CAAA;CAAQ;AAGN,KAAA,iBAAiB,CAAA,wBACH,wBADG,GACwB,wBADxB,CAAA,GAEzB,aAFyB,CAEX,eAFW,CAAA;;;;AAEzB,cAKS,MALT,EAAA,CAAA,iBAKoC,iBALpC,GAKwD,iBALxD,CAAA,CAAA,OAAA,CAAA,EAMO,iBANP,EAAA,GAOD,MAPC,CAOM,QAPN,CAAA;AAKS,
|
|
1
|
+
{"version":3,"file":"plugin-base.d.cts","names":[],"sources":["../src/plugin-base.ts"],"sourcesContent":[],"mappings":";;;;;;UA2BiB,iBAAA;WACN,QAAQ;AADnB;AAIY,KAAA,oBAAA,GAAuB,YAAA,GAAA;EAIvB,MAAA,EAHF,iBAGE;CAA2B;AACpB,KADP,wBAAA,GAA2B,cACpB,GAAA;EAAT,MAAA,EAAA,QAAA,CAAS,iBAAT,CAAA;CAAQ;AAGN,KAAA,iBAAiB,CAAA,wBACH,wBADG,GACwB,wBADxB,CAAA,GAEzB,aAFyB,CAEX,eAFW,CAAA;;;;AAEzB,cAKS,MALT,EAAA,CAAA,iBAKoC,iBALpC,GAKwD,iBALxD,CAAA,CAAA,OAAA,CAAA,EAMO,iBANP,EAAA,GAOD,MAPC,CAOM,QAPN,CAAA;AAKS,oCAmFZ,GAAA,EAAA;AAnFuC,uCAAA,GAAA,EAAA;AAAoB,2CAAA,GAAA,EAAA;AACjD,oCAAA,GAAA,EAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-base.d.mts","names":[],"sources":["../src/plugin-base.ts"],"sourcesContent":[],"mappings":";;;;;;UA2BiB,iBAAA;WACN,QAAQ;AADnB;AAIY,KAAA,oBAAA,GAAuB,YAAA,GAAA;EAIvB,MAAA,EAHF,iBAGE;CAA2B;AACpB,KADP,wBAAA,GAA2B,cACpB,GAAA;EAAT,MAAA,EAAA,QAAA,CAAS,iBAAT,CAAA;CAAQ;AAGN,KAAA,iBAAiB,CAAA,wBACH,wBADG,GACwB,wBADxB,CAAA,GAEzB,aAFyB,CAEX,eAFW,CAAA;;;;AAEzB,cAKS,MALT,EAAA,CAAA,iBAKoC,iBALpC,GAKwD,iBALxD,CAAA,CAAA,OAAA,CAAA,EAMO,iBANP,EAAA,GAOD,MAPC,CAOM,QAPN,CAAA;AAKS,
|
|
1
|
+
{"version":3,"file":"plugin-base.d.mts","names":[],"sources":["../src/plugin-base.ts"],"sourcesContent":[],"mappings":";;;;;;UA2BiB,iBAAA;WACN,QAAQ;AADnB;AAIY,KAAA,oBAAA,GAAuB,YAAA,GAAA;EAIvB,MAAA,EAHF,iBAGE;CAA2B;AACpB,KADP,wBAAA,GAA2B,cACpB,GAAA;EAAT,MAAA,EAAA,QAAA,CAAS,iBAAT,CAAA;CAAQ;AAGN,KAAA,iBAAiB,CAAA,wBACH,wBADG,GACwB,wBADxB,CAAA,GAEzB,aAFyB,CAEX,eAFW,CAAA;;;;AAEzB,cAKS,MALT,EAAA,CAAA,iBAKoC,iBALpC,GAKwD,iBALxD,CAAA,CAAA,OAAA,CAAA,EAMO,iBANP,EAAA,GAOD,MAPC,CAOM,QAPN,CAAA;AAKS,oCAmFZ,GAAA,EAAA;AAnFuC,uCAAA,GAAA,EAAA;AAAoB,2CAAA,GAAA,EAAA;AACjD,oCAAA,GAAA,EAAA"}
|
package/dist/plugin-base.mjs
CHANGED
|
@@ -23,11 +23,6 @@ const plugin = (options = {}) => {
|
|
|
23
23
|
format: ["cjs", "esm"],
|
|
24
24
|
dts: false
|
|
25
25
|
},
|
|
26
|
-
resolve: { external: [
|
|
27
|
-
"powerlines",
|
|
28
|
-
/^powerlines\/.*$/,
|
|
29
|
-
/^@powerlines\//
|
|
30
|
-
] },
|
|
31
26
|
platform: "node",
|
|
32
27
|
tsdown: {
|
|
33
28
|
format: ["cjs", "esm"],
|
|
@@ -43,8 +38,13 @@ const plugin = (options = {}) => {
|
|
|
43
38
|
shims: true,
|
|
44
39
|
outDir: "dist",
|
|
45
40
|
clean: true,
|
|
41
|
+
external: [
|
|
42
|
+
"powerlines",
|
|
43
|
+
/^powerlines\/.*$/,
|
|
44
|
+
/^@powerlines\//
|
|
45
|
+
],
|
|
46
46
|
skipNodeModulesBundle: true,
|
|
47
|
-
unbundle:
|
|
47
|
+
unbundle: false,
|
|
48
48
|
...options.tsdown
|
|
49
49
|
}
|
|
50
50
|
};
|
package/dist/plugin-base.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-base.mjs","names":[],"sources":["../src/plugin-base.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { build, UserConfig as BuildOptions } from \"tsdown\";\nimport { formatPackageJson } from \"./plugin-utils/format-package-json\";\nimport { ResolvedConfig, UserConfig } from \"./types/config\";\nimport { PluginContext } from \"./types/context\";\nimport { Plugin } from \"./types/plugin\";\n\nexport interface BasePluginOptions {\n tsdown?: Partial<BuildOptions>;\n}\n\nexport type BasePluginUserConfig = UserConfig & {\n tsdown: BasePluginOptions;\n};\n\nexport type BasePluginResolvedConfig = ResolvedConfig & {\n tsdown: Required<BasePluginOptions>;\n};\n\nexport type BasePluginContext<\n TResolvedConfig extends BasePluginResolvedConfig = BasePluginResolvedConfig\n> = PluginContext<TResolvedConfig>;\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <TContext extends BasePluginContext = BasePluginContext>(\n options: BasePluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"base\",\n config() {\n return {\n projectType: \"library\",\n input: [\"src/index.ts\", \"src/types/*.ts\", \"src/helpers/*.ts\"],\n output: {\n format: [\"cjs\", \"esm\"],\n dts: false\n },\n
|
|
1
|
+
{"version":3,"file":"plugin-base.mjs","names":[],"sources":["../src/plugin-base.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { build, UserConfig as BuildOptions } from \"tsdown\";\nimport { formatPackageJson } from \"./plugin-utils/format-package-json\";\nimport { ResolvedConfig, UserConfig } from \"./types/config\";\nimport { PluginContext } from \"./types/context\";\nimport { Plugin } from \"./types/plugin\";\n\nexport interface BasePluginOptions {\n tsdown?: Partial<BuildOptions>;\n}\n\nexport type BasePluginUserConfig = UserConfig & {\n tsdown: BasePluginOptions;\n};\n\nexport type BasePluginResolvedConfig = ResolvedConfig & {\n tsdown: Required<BasePluginOptions>;\n};\n\nexport type BasePluginContext<\n TResolvedConfig extends BasePluginResolvedConfig = BasePluginResolvedConfig\n> = PluginContext<TResolvedConfig>;\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <TContext extends BasePluginContext = BasePluginContext>(\n options: BasePluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"base\",\n config() {\n return {\n projectType: \"library\",\n input: [\"src/index.ts\", \"src/types/*.ts\", \"src/helpers/*.ts\"],\n output: {\n format: [\"cjs\", \"esm\"],\n dts: false\n },\n platform: \"node\",\n tsdown: {\n format: [\"cjs\", \"esm\"],\n logLevel: \"silent\",\n target: \"node22\",\n cjsDefault: true,\n treeshake: true,\n exports: {\n all: true\n },\n fixedExtension: true,\n nodeProtocol: true,\n minify: false,\n dts: true,\n shims: true,\n outDir: \"dist\",\n clean: true,\n external: [\"powerlines\", /^powerlines\\/.*$/, /^@powerlines\\//],\n skipNodeModulesBundle: true,\n unbundle: false,\n ...options.tsdown\n }\n };\n },\n async build() {\n await build({\n name: this.config.name,\n cwd: appendPath(this.config.root, this.workspaceConfig.workspaceRoot),\n entry:\n this.entry.filter(entry => entry?.file).length > 0\n ? Object.fromEntries(\n this.entry\n .filter(entry => entry?.file)\n .map(entry => [\n entry.output ||\n replaceExtension(\n replacePath(\n replacePath(\n entry.file,\n joinPaths(this.config.root, \"src\")\n ),\n this.entryPath\n )\n ),\n entry.file\n ])\n )\n : [\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"src\",\n \"**/*.ts\"\n ),\n joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"src\",\n \"**/*.tsx\"\n )\n ],\n platform: this.config.platform,\n tsconfig: this.tsconfig.tsconfigFilePath,\n outDir: this.config.output.buildPath,\n ...this.config.tsdown\n });\n\n await formatPackageJson(this);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;AA8CA,MAAa,UACX,UAA6B,EAAE,KACV;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO;IACL,aAAa;IACb,OAAO;KAAC;KAAgB;KAAkB;KAAmB;IAC7D,QAAQ;KACN,QAAQ,CAAC,OAAO,MAAM;KACtB,KAAK;KACN;IACD,UAAU;IACV,QAAQ;KACN,QAAQ,CAAC,OAAO,MAAM;KACtB,UAAU;KACV,QAAQ;KACR,YAAY;KACZ,WAAW;KACX,SAAS,EACP,KAAK,MACN;KACD,gBAAgB;KAChB,cAAc;KACd,QAAQ;KACR,KAAK;KACL,OAAO;KACP,QAAQ;KACR,OAAO;KACP,UAAU;MAAC;MAAc;MAAoB;MAAiB;KAC9D,uBAAuB;KACvB,UAAU;KACV,GAAG,QAAQ;KACZ;IACF;;EAEH,MAAM,QAAQ;AACZ,SAAM,MAAM;IACV,MAAM,KAAK,OAAO;IAClB,KAAK,WAAW,KAAK,OAAO,MAAM,KAAK,gBAAgB,cAAc;IACrE,OACE,KAAK,MAAM,QAAO,UAAS,OAAO,KAAK,CAAC,SAAS,IAC7C,OAAO,YACL,KAAK,MACF,QAAO,UAAS,OAAO,KAAK,CAC5B,KAAI,UAAS,CACZ,MAAM,UACJ,iBACE,YACE,YACE,MAAM,MACN,UAAU,KAAK,OAAO,MAAM,MAAM,CACnC,EACD,KAAK,UACN,CACF,EACH,MAAM,KACP,CAAC,CACL,GACD,CACE,UACE,KAAK,gBAAgB,eACrB,KAAK,OAAO,MACZ,OACA,UACD,EACD,UACE,KAAK,gBAAgB,eACrB,KAAK,OAAO,MACZ,OACA,WACD,CACF;IACP,UAAU,KAAK,OAAO;IACtB,UAAU,KAAK,SAAS;IACxB,QAAQ,KAAK,OAAO,OAAO;IAC3B,GAAG,KAAK,OAAO;IAChB,CAAC;AAEF,SAAM,kBAAkB,KAAK;;EAEhC;;AAGH,0BAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-helpers.d.cts","names":[],"sources":["../../src/plugin-utils/build-helpers.ts"],"sourcesContent":[],"mappings":";;;;UAyBiB,yBAAA;YACL;EADK,UAAA,EAEH,aAFG,CAAA,YAAyB,
|
|
1
|
+
{"version":3,"file":"build-helpers.d.cts","names":[],"sources":["../../src/plugin-utils/build-helpers.ts"],"sourcesContent":[],"mappings":";;;;UAyBiB,yBAAA;YACL;EADK,UAAA,EAEH,aAFG,CAAA,YAAyB,CAAA;AAW1C;;;;;;;iBAAgB,mBAAA,UACL,UACR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin.d.mts","names":[],"sources":["../../src/types/unplugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;KA6BY,sBAAA;cAWC,2BAA2B;AAX5B,KAuBA,cAAA,GACR,sBAxB8B,GAAA,MAAA,GAAA,QAAA,GAAA,SAAA;AAWrB,cAkBA,gBARH,EAQqB,cAlBS,EAAA;AAY5B,KAaA,oBAbc,
|
|
1
|
+
{"version":3,"file":"unplugin.d.mts","names":[],"sources":["../../src/types/unplugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;KA6BY,sBAAA;cAWC,2BAA2B;AAX5B,KAuBA,cAAA,GACR,sBAxB8B,GAAA,MAAA,GAAA,QAAA,GAAA,SAAA;AAWrB,cAkBA,gBARH,EAQqB,cAlBS,EAAA;AAY5B,KAaA,oBAbc,CACtB,sBAYmD,cAZ7B,CAAA,GAaxB,aAbwB,SAAA,MAAA,GAAA,SAAA,GAepB,aAfoB,SAAA,QAAA,GAAA,UAAA,GAiBlB,aAjBkB,SAAA,SAAA,GAAA,QAAA,GAmBhB,aAnBgB;AA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A,CAAA,OAAA,EAoChC,OApCgC,CAoCxB,QApCwB,CAAA,QAAA,CAAA,CAAA,YAAA,CAAA,CAAA,EAAA,IAAA,EAqCnC,mBArCmC,EAAA,GAsCtC,eAtCsC,CAsCtB,QAtCsB,CAAA;AACK,yCAAA,GAAA,EAAA;AAArB,iCAAA,GAAA,EAAA;AACF,uCAAA,GAAA,EAAA;AAArB,kCAAA,GAAA,EAAA;AAGgB,uCAAA,GAAA,EAAA;AAAhB,qCAAA,GAAA,EAAA;AADa,kCAAA,GAAA,EAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
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",
|
|
@@ -234,5 +234,5 @@
|
|
|
234
234
|
"typescript": "^5.9.3"
|
|
235
235
|
},
|
|
236
236
|
"publishConfig": { "access": "public" },
|
|
237
|
-
"gitHead": "
|
|
237
|
+
"gitHead": "645a902416b92ae709b2ae786c21d3ec0be09258"
|
|
238
238
|
}
|