@powerlines/plugin-unenv 0.1.290 → 0.1.292

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/index.d.cts CHANGED
@@ -3,8 +3,8 @@ import "./types/index.cjs";
3
3
  import { Plugin } from "powerlines";
4
4
 
5
5
  //#region src/index.d.ts
6
- declare module "powerlines" {
7
- interface UserConfig {
6
+ declare module "@powerlines/core" {
7
+ interface BaseConfig {
8
8
  unenv?: UnenvPluginOptions;
9
9
  }
10
10
  }
package/dist/index.d.mts CHANGED
@@ -3,8 +3,8 @@ import "./types/index.mjs";
3
3
  import { Plugin } from "powerlines";
4
4
 
5
5
  //#region src/index.d.ts
6
- declare module "powerlines" {
7
- interface UserConfig {
6
+ declare module "@powerlines/core" {
7
+ interface BaseConfig {
8
8
  unenv?: UnenvPluginOptions;
9
9
  }
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.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 { Plugin } from \"powerlines\";\nimport { defineEnv } from \"unenv\";\nimport { UnenvPluginContext, UnenvPluginOptions } from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n export interface UserConfig {\n unenv?: UnenvPluginOptions;\n }\n}\n\n/**\n * The unenv plugin for Powerlines.\n *\n * @see https://unjs.dev/packages/unenv\n *\n * @param options - The unenv plugin user configuration options.\n * @returns A Powerlines plugin to transform source code to be platform agnostic using unenv.\n */\nexport const plugin = <\n TContext extends UnenvPluginContext = UnenvPluginContext\n>(\n options: UnenvPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"unenv\",\n async config() {\n return {\n unenv: options\n };\n },\n configResolved() {\n this.unenv = defineEnv(this.config.unenv || {});\n\n this.config.resolve.alias ??= {};\n if (Array.isArray(this.config.resolve.alias)) {\n this.config.resolve.alias = Object.entries(this.unenv.env.alias).reduce(\n (aliases, [key, value]) => {\n if (!aliases.find(alias => alias.find === key)) {\n aliases.push({ find: key, replacement: value });\n }\n\n return aliases;\n },\n this.config.resolve.alias\n );\n } else {\n this.config.resolve.alias = {\n ...this.unenv.env.alias,\n ...this.config.resolve.alias\n };\n }\n\n this.config.resolve.external ??= [];\n this.config.resolve.external.push(...this.unenv.env.external);\n\n this.config.inject ??= {};\n this.config.inject = {\n ...(this.unenv.env.inject as Record<string, string | string[]>),\n ...this.config.inject\n };\n\n // this.config.build.polyfill ??= [];\n // this.config.build.polyfill.push(...this.unenv.env.polyfill);\n }\n } as Plugin<TContext>;\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AAsCA,MAAa,UAGX,UAA8B,EAAE,KACX;AACrB,QAAO;EACL,MAAM;EACN,MAAM,SAAS;AACb,UAAO,EACL,OAAO,SACR;;EAEH,iBAAiB;AACf,QAAK,QAAQ,UAAU,KAAK,OAAO,SAAS,EAAE,CAAC;AAE/C,QAAK,OAAO,QAAQ,UAAU,EAAE;AAChC,OAAI,MAAM,QAAQ,KAAK,OAAO,QAAQ,MAAM,CAC1C,MAAK,OAAO,QAAQ,QAAQ,OAAO,QAAQ,KAAK,MAAM,IAAI,MAAM,CAAC,QAC9D,SAAS,CAAC,KAAK,WAAW;AACzB,QAAI,CAAC,QAAQ,MAAK,UAAS,MAAM,SAAS,IAAI,CAC5C,SAAQ,KAAK;KAAE,MAAM;KAAK,aAAa;KAAO,CAAC;AAGjD,WAAO;MAET,KAAK,OAAO,QAAQ,MACrB;OAED,MAAK,OAAO,QAAQ,QAAQ;IAC1B,GAAG,KAAK,MAAM,IAAI;IAClB,GAAG,KAAK,OAAO,QAAQ;IACxB;AAGH,QAAK,OAAO,QAAQ,aAAa,EAAE;AACnC,QAAK,OAAO,QAAQ,SAAS,KAAK,GAAG,KAAK,MAAM,IAAI,SAAS;AAE7D,QAAK,OAAO,WAAW,EAAE;AACzB,QAAK,OAAO,SAAS;IACnB,GAAI,KAAK,MAAM,IAAI;IACnB,GAAG,KAAK,OAAO;IAChB;;EAKJ;;AAGH,kBAAe"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.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 { Plugin } from \"powerlines\";\nimport { defineEnv } from \"unenv\";\nimport { UnenvPluginContext, UnenvPluginOptions } from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface BaseConfig {\n unenv?: UnenvPluginOptions;\n }\n}\n\n/**\n * The unenv plugin for Powerlines.\n *\n * @see https://unjs.dev/packages/unenv\n *\n * @param options - The unenv plugin user configuration options.\n * @returns A Powerlines plugin to transform source code to be platform agnostic using unenv.\n */\nexport const plugin = <\n TContext extends UnenvPluginContext = UnenvPluginContext\n>(\n options: UnenvPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"unenv\",\n async config() {\n return {\n unenv: options\n };\n },\n configResolved() {\n this.unenv = defineEnv(this.config.unenv || {});\n\n this.config.resolve.alias ??= {};\n if (Array.isArray(this.config.resolve.alias)) {\n this.config.resolve.alias = Object.entries(this.unenv.env.alias).reduce(\n (aliases, [key, value]) => {\n if (!aliases.find(alias => alias.find === key)) {\n aliases.push({ find: key, replacement: value });\n }\n\n return aliases;\n },\n this.config.resolve.alias\n );\n } else {\n this.config.resolve.alias = {\n ...this.unenv.env.alias,\n ...this.config.resolve.alias\n };\n }\n\n this.config.resolve.external ??= [];\n this.config.resolve.external.push(...this.unenv.env.external);\n\n this.config.inject ??= {};\n this.config.inject = {\n ...(this.unenv.env.inject as Record<string, string | string[]>),\n ...this.config.inject\n };\n\n // this.config.build.polyfill ??= [];\n // this.config.build.polyfill.push(...this.unenv.env.polyfill);\n }\n } as Plugin<TContext>;\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AAsCA,MAAa,UAGX,UAA8B,EAAE,KACX;AACrB,QAAO;EACL,MAAM;EACN,MAAM,SAAS;AACb,UAAO,EACL,OAAO,SACR;;EAEH,iBAAiB;AACf,QAAK,QAAQ,UAAU,KAAK,OAAO,SAAS,EAAE,CAAC;AAE/C,QAAK,OAAO,QAAQ,UAAU,EAAE;AAChC,OAAI,MAAM,QAAQ,KAAK,OAAO,QAAQ,MAAM,CAC1C,MAAK,OAAO,QAAQ,QAAQ,OAAO,QAAQ,KAAK,MAAM,IAAI,MAAM,CAAC,QAC9D,SAAS,CAAC,KAAK,WAAW;AACzB,QAAI,CAAC,QAAQ,MAAK,UAAS,MAAM,SAAS,IAAI,CAC5C,SAAQ,KAAK;KAAE,MAAM;KAAK,aAAa;KAAO,CAAC;AAGjD,WAAO;MAET,KAAK,OAAO,QAAQ,MACrB;OAED,MAAK,OAAO,QAAQ,QAAQ;IAC1B,GAAG,KAAK,MAAM,IAAI;IAClB,GAAG,KAAK,OAAO,QAAQ;IACxB;AAGH,QAAK,OAAO,QAAQ,aAAa,EAAE;AACnC,QAAK,OAAO,QAAQ,SAAS,KAAK,GAAG,KAAK,MAAM,IAAI,SAAS;AAE7D,QAAK,OAAO,WAAW,EAAE;AACzB,QAAK,OAAO,SAAS;IACnB,GAAI,KAAK,MAAM,IAAI;IACnB,GAAG,KAAK,OAAO;IAChB;;EAKJ;;AAGH,kBAAe"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-unenv",
3
- "version": "0.1.290",
3
+ "version": "0.1.292",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to transform source code to be platform agnostic using unenv.",
6
6
  "repository": {
@@ -89,15 +89,15 @@
89
89
  "files": ["dist/**/*"],
90
90
  "keywords": ["unenv", "powerlines", "storm-software", "powerlines-plugin"],
91
91
  "dependencies": {
92
- "powerlines": "^0.39.9",
92
+ "powerlines": "^0.39.11",
93
93
  "typescript": "^5.9.3",
94
94
  "unenv": "npm:unenv-nightly@2.0.0-rc.24"
95
95
  },
96
96
  "devDependencies": {
97
- "@powerlines/plugin-plugin": "^0.12.252",
97
+ "@powerlines/plugin-plugin": "^0.12.254",
98
98
  "@types/node": "^25.3.3"
99
99
  },
100
100
  "publishConfig": { "access": "public" },
101
101
  "types": "./dist/index.d.cts",
102
- "gitHead": "645a902416b92ae709b2ae786c21d3ec0be09258"
102
+ "gitHead": "e63eb5a0ecd0e5ee3e030388ad1c534b3ecb2136"
103
103
  }