@powerlines/plugin-unenv 0.1.490 → 0.1.491

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
@@ -17,5 +17,5 @@ declare module "powerlines" {
17
17
  */
18
18
  declare const plugin: <TContext extends UnenvPluginContext = UnenvPluginContext>(options?: UnenvPluginOptions) => Plugin<TContext>;
19
19
  //#endregion
20
- export { UnenvPluginContext, UnenvPluginOptions, UnenvPluginResolvedConfig, UnenvPluginUserConfig, __ΩUnenvPluginContext, __ΩUnenvPluginOptions, __ΩUnenvPluginResolvedConfig, __ΩUnenvPluginUserConfig, plugin as default, plugin };
20
+ export { type UnenvPluginContext, type UnenvPluginOptions, type UnenvPluginResolvedConfig, type UnenvPluginUserConfig, type __ΩUnenvPluginContext, type __ΩUnenvPluginOptions, type __ΩUnenvPluginResolvedConfig, type __ΩUnenvPluginUserConfig, plugin as default, plugin };
21
21
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YAyBY,MAAA;IACR,KAAA,GAAQ,kBAAA;EAAA;AAAA;;;;;;;;AAYZ;cAAa,MAAA,oBACM,kBAAA,GAAqB,kBAAA,EAEtC,OAAA,GAAS,kBAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YAyBY,MAAA;IACR,KAAA,GAAQ,kBAAkB;EAAA;AAAA;;;;;;;AAAA;AAY9B;cAAa,MAAA,oBACM,kBAAA,GAAqB,kBAAA,EAEtC,OAAA,GAAS,kBAAA,KACR,MAAA,CAAO,QAAA"}
package/dist/index.d.mts CHANGED
@@ -17,5 +17,5 @@ declare module "powerlines" {
17
17
  */
18
18
  declare const plugin: <TContext extends UnenvPluginContext = UnenvPluginContext>(options?: UnenvPluginOptions) => Plugin<TContext>;
19
19
  //#endregion
20
- export { UnenvPluginContext, UnenvPluginOptions, UnenvPluginResolvedConfig, UnenvPluginUserConfig, __ΩUnenvPluginContext, __ΩUnenvPluginOptions, __ΩUnenvPluginResolvedConfig, __ΩUnenvPluginUserConfig, plugin as default, plugin };
20
+ export { type UnenvPluginContext, type UnenvPluginOptions, type UnenvPluginResolvedConfig, type UnenvPluginUserConfig, type __ΩUnenvPluginContext, type __ΩUnenvPluginOptions, type __ΩUnenvPluginResolvedConfig, type __ΩUnenvPluginUserConfig, plugin as default, plugin };
21
21
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YAyBY,MAAA;IACR,KAAA,GAAQ,kBAAA;EAAA;AAAA;;;;;;;;AAYZ;cAAa,MAAA,oBACM,kBAAA,GAAqB,kBAAA,EAEtC,OAAA,GAAS,kBAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YAyBY,MAAA;IACR,KAAA,GAAQ,kBAAkB;EAAA;AAAA;;;;;;;AAAA;AAY9B;cAAa,MAAA,oBACM,kBAAA,GAAqB,kBAAA,EAEtC,OAAA,GAAS,kBAAA,KACR,MAAA,CAAO,QAAA"}
@@ -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 type { Plugin } from \"powerlines\";\nimport { defineEnv } from \"unenv\";\nimport type { UnenvPluginContext, UnenvPluginOptions } from \"./types/plugin\";\n\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\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 };\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"}
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 type { Plugin } from \"powerlines\";\nimport { defineEnv } from \"unenv\";\nimport type { UnenvPluginContext, UnenvPluginOptions } from \"./types/plugin\";\n\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\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 };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AAsCA,MAAa,UAGX,UAA8B,CAAC,MACV;CACrB,OAAO;EACL,MAAM;EACN,MAAM,SAAS;GACb,OAAO,EACL,OAAO,QACT;EACF;EACA,iBAAiB;GACf,KAAK,QAAQ,UAAU,KAAK,OAAO,SAAS,CAAC,CAAC;GAE9C,KAAK,OAAO,QAAQ,UAAU,CAAC;GAC/B,IAAI,MAAM,QAAQ,KAAK,OAAO,QAAQ,KAAK,GACzC,KAAK,OAAO,QAAQ,QAAQ,OAAO,QAAQ,KAAK,MAAM,IAAI,KAAK,EAAE,QAC9D,SAAS,CAAC,KAAK,WAAW;IACzB,IAAI,CAAC,QAAQ,MAAK,UAAS,MAAM,SAAS,GAAG,GAC3C,QAAQ,KAAK;KAAE,MAAM;KAAK,aAAa;IAAM,CAAC;IAGhD,OAAO;GACT,GACA,KAAK,OAAO,QAAQ,KACtB;QAEA,KAAK,OAAO,QAAQ,QAAQ;IAC1B,GAAG,KAAK,MAAM,IAAI;IAClB,GAAG,KAAK,OAAO,QAAQ;GACzB;GAGF,KAAK,OAAO,QAAQ,aAAa,CAAC;GAClC,KAAK,OAAO,QAAQ,SAAS,KAAK,GAAG,KAAK,MAAM,IAAI,QAAQ;GAE5D,KAAK,OAAO,WAAW,CAAC;GACxB,KAAK,OAAO,SAAS;IACnB,GAAI,KAAK,MAAM,IAAI;IACnB,GAAG,KAAK,OAAO;GACjB;EAIF;CACF;AACF"}
@@ -1,5 +1,4 @@
1
1
  import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
2
- import * as _$unenv from "unenv";
3
2
  import { CreateEnvOptions } from "unenv";
4
3
 
5
4
  //#region src/types/plugin.d.ts
@@ -11,7 +10,7 @@ interface UnenvPluginResolvedConfig extends ResolvedConfig {
11
10
  unenv: CreateEnvOptions;
12
11
  }
13
12
  type UnenvPluginContext<TResolvedConfig extends UnenvPluginResolvedConfig = UnenvPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
14
- unenv: ReturnType<typeof _$unenv.defineEnv>;
13
+ unenv: ReturnType<typeof import("unenv").defineEnv>;
15
14
  };
16
15
  declare type __ΩUnenvPluginOptions = any[];
17
16
  declare type __ΩUnenvPluginUserConfig = any[];
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;KAqBY,kBAAA,GAAqB,OAAA,CAAQ,gBAAA;AAAA,UAExB,qBAAA,SAA8B,UAAA;EAC7C,KAAA,EAAO,kBAAA;AAAA;AAAA,UAGQ,yBAAA,SAAkC,cAAA;EACjD,KAAA,EAAO,gBAAA;AAAA;AAAA,KAGG,kBAAA,yBACc,yBAAA,GAA4B,yBAAA,IAClD,aAAA,CAAc,eAAA;EAChB,KAAA,EAAO,UAAA,QADQ,OAAA,CAC0B,SAAA;AAAA;AAAA"}
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;KAqBY,kBAAA,GAAqB,OAAO,CAAC,gBAAA;AAAA,UAExB,qBAAA,SAA8B,UAAU;EACvD,KAAA,EAAO,kBAAA;AAAA;AAAA,UAGQ,yBAAA,SAAkC,cAAc;EAC/D,KAAA,EAAO,gBAAA;AAAA;AAAA,KAGG,kBAAA,yBACc,yBAAA,GAA4B,yBAAA,IAClD,aAAA,CAAc,eAAA;EAChB,KAAA,EAAO,UAAA,wBAAkC,SAAA;AAAA;AAAA"}
@@ -1,4 +1,3 @@
1
- import * as _$unenv from "unenv";
2
1
  import { CreateEnvOptions } from "unenv";
3
2
  import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
4
3
 
@@ -11,7 +10,7 @@ interface UnenvPluginResolvedConfig extends ResolvedConfig {
11
10
  unenv: CreateEnvOptions;
12
11
  }
13
12
  type UnenvPluginContext<TResolvedConfig extends UnenvPluginResolvedConfig = UnenvPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
14
- unenv: ReturnType<typeof _$unenv.defineEnv>;
13
+ unenv: ReturnType<typeof import("unenv").defineEnv>;
15
14
  };
16
15
  declare type __ΩUnenvPluginOptions = any[];
17
16
  declare type __ΩUnenvPluginUserConfig = any[];
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;KAqBY,kBAAA,GAAqB,OAAA,CAAQ,gBAAA;AAAA,UAExB,qBAAA,SAA8B,UAAA;EAC7C,KAAA,EAAO,kBAAA;AAAA;AAAA,UAGQ,yBAAA,SAAkC,cAAA;EACjD,KAAA,EAAO,gBAAA;AAAA;AAAA,KAGG,kBAAA,yBACc,yBAAA,GAA4B,yBAAA,IAClD,aAAA,CAAc,eAAA;EAChB,KAAA,EAAO,UAAA,QADQ,OAAA,CAC0B,SAAA;AAAA;AAAA"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;KAqBY,kBAAA,GAAqB,OAAO,CAAC,gBAAA;AAAA,UAExB,qBAAA,SAA8B,UAAU;EACvD,KAAA,EAAO,kBAAA;AAAA;AAAA,UAGQ,yBAAA,SAAkC,cAAc;EAC/D,KAAA,EAAO,gBAAA;AAAA;AAAA,KAGG,kBAAA,yBACc,yBAAA,GAA4B,yBAAA,IAClD,aAAA,CAAc,eAAA;EAChB,KAAA,EAAO,UAAA,wBAAkC,SAAA;AAAA;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-unenv",
3
- "version": "0.1.490",
3
+ "version": "0.1.491",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to transform source code to be platform agnostic using unenv.",
6
6
  "repository": {
@@ -56,15 +56,15 @@
56
56
  "files": ["dist/**/*"],
57
57
  "keywords": ["unenv", "powerlines", "storm-software", "powerlines-plugin"],
58
58
  "dependencies": {
59
- "powerlines": "^0.47.40",
59
+ "powerlines": "^0.47.41",
60
60
  "typescript": "^6.0.3",
61
61
  "unenv": "npm:unenv-nightly@2.0.0-20251124-134829-ab99519"
62
62
  },
63
63
  "devDependencies": {
64
- "@powerlines/plugin-plugin": "^0.12.452",
64
+ "@powerlines/plugin-plugin": "^0.12.453",
65
65
  "@types/node": "^25.8.0"
66
66
  },
67
67
  "publishConfig": { "access": "public" },
68
68
  "types": "./dist/index.d.cts",
69
- "gitHead": "c5c293e753d59ab690265988c77bd535680ac71b"
69
+ "gitHead": "b5c7361d0ca942652f98baf11488435c7918fd65"
70
70
  }