@powerlines/plugin-unenv 0.1.330 → 0.1.332
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/README.md +14 -16
- package/dist/_virtual/_rolldown/runtime.mjs +3 -0
- package/dist/index.cjs +2 -3
- package/dist/index.d.cts +0 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -2
- package/dist/index.mjs.map +1 -1
- package/dist/types/plugin.d.cts +2 -2
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +2 -2
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the <b>🔌 Powerlines</b> monorepo. Powerlines is the "
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://stormsoftware.com/projects/powerlines) [](http://commitizen.github.io/cz-cli/)  
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
|
@@ -58,21 +58,19 @@ A package containing the Powerlines plugin to transform source code to be platfo
|
|
|
58
58
|
|
|
59
59
|
## Table of Contents
|
|
60
60
|
|
|
61
|
-
- [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- [
|
|
65
|
-
- [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- [Contributing](#contributing)
|
|
75
|
-
- [Contributors](#contributors)
|
|
61
|
+
- [Installing](#installing)
|
|
62
|
+
- [Reduced Package Size](#reduced-package-size)
|
|
63
|
+
- [Development](#development)
|
|
64
|
+
- [Building](#building)
|
|
65
|
+
- [Running unit tests](#running-unit-tests)
|
|
66
|
+
- [Linting](#linting)
|
|
67
|
+
- [Storm Workspaces](#storm-workspaces)
|
|
68
|
+
- [Roadmap](#roadmap)
|
|
69
|
+
- [Support](#support)
|
|
70
|
+
- [License](#license)
|
|
71
|
+
- [Changelog](#changelog)
|
|
72
|
+
- [Contributing](#contributing)
|
|
73
|
+
- [Contributors](#contributors)
|
|
76
74
|
|
|
77
75
|
<!-- END doctoc -->
|
|
78
76
|
|
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
2
|
let unenv = require("unenv");
|
|
3
3
|
|
|
4
4
|
//#region src/index.ts
|
|
@@ -40,8 +40,7 @@ const plugin = (options = {}) => {
|
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
|
-
var src_default = plugin;
|
|
44
43
|
|
|
45
44
|
//#endregion
|
|
46
|
-
exports.default =
|
|
45
|
+
exports.default = plugin;
|
|
47
46
|
exports.plugin = plugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { UnenvPluginContext, UnenvPluginOptions, UnenvPluginResolvedConfig, UnenvPluginUserConfig, __ΩUnenvPluginContext, __ΩUnenvPluginOptions, __ΩUnenvPluginResolvedConfig, __ΩUnenvPluginUserConfig } from "./types/plugin.cjs";
|
|
2
|
-
import "./types/index.cjs";
|
|
3
2
|
import { Plugin } from "powerlines";
|
|
4
3
|
|
|
5
4
|
//#region src/index.d.ts
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"
|
|
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"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { UnenvPluginContext, UnenvPluginOptions, UnenvPluginResolvedConfig, UnenvPluginUserConfig, __ΩUnenvPluginContext, __ΩUnenvPluginOptions, __ΩUnenvPluginResolvedConfig, __ΩUnenvPluginUserConfig } from "./types/plugin.mjs";
|
|
2
|
-
import "./types/index.mjs";
|
|
3
2
|
import { Plugin } from "powerlines";
|
|
4
3
|
|
|
5
4
|
//#region src/index.d.ts
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"
|
|
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"}
|
package/dist/index.mjs
CHANGED
package/dist/index.mjs.map
CHANGED
|
@@ -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 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 } 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
|
|
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 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 } 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"}
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
2
|
-
import * as
|
|
2
|
+
import * as unenv from "unenv";
|
|
3
3
|
import { CreateEnvOptions } from "unenv";
|
|
4
4
|
|
|
5
5
|
//#region src/types/plugin.d.ts
|
|
@@ -11,7 +11,7 @@ interface UnenvPluginResolvedConfig extends ResolvedConfig {
|
|
|
11
11
|
unenv: CreateEnvOptions;
|
|
12
12
|
}
|
|
13
13
|
type UnenvPluginContext<TResolvedConfig extends UnenvPluginResolvedConfig = UnenvPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
14
|
-
unenv: ReturnType<typeof
|
|
14
|
+
unenv: ReturnType<typeof unenv.defineEnv>;
|
|
15
15
|
};
|
|
16
16
|
declare type __ΩUnenvPluginOptions = any[];
|
|
17
17
|
declare type __ΩUnenvPluginUserConfig = any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"
|
|
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,KAAA,CAC0B,SAAA;AAAA;AAAA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as unenv from "unenv";
|
|
2
2
|
import { CreateEnvOptions } from "unenv";
|
|
3
3
|
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
4
4
|
|
|
@@ -11,7 +11,7 @@ interface UnenvPluginResolvedConfig extends ResolvedConfig {
|
|
|
11
11
|
unenv: CreateEnvOptions;
|
|
12
12
|
}
|
|
13
13
|
type UnenvPluginContext<TResolvedConfig extends UnenvPluginResolvedConfig = UnenvPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
14
|
-
unenv: ReturnType<typeof
|
|
14
|
+
unenv: ReturnType<typeof unenv.defineEnv>;
|
|
15
15
|
};
|
|
16
16
|
declare type __ΩUnenvPluginOptions = any[];
|
|
17
17
|
declare type __ΩUnenvPluginUserConfig = any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"
|
|
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,KAAA,CAC0B,SAAA;AAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-unenv",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.332",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to transform source code to be platform agnostic using unenv.",
|
|
6
6
|
"repository": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"default": "./dist/index.mjs"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
"
|
|
58
|
+
"./package.json": "./package.json",
|
|
59
59
|
"./types": {
|
|
60
60
|
"require": {
|
|
61
61
|
"types": "./dist/types/index.d.cts",
|
|
@@ -89,15 +89,15 @@
|
|
|
89
89
|
"files": ["dist/**/*"],
|
|
90
90
|
"keywords": ["unenv", "powerlines", "storm-software", "powerlines-plugin"],
|
|
91
91
|
"dependencies": {
|
|
92
|
-
"powerlines": "^0.41.
|
|
92
|
+
"powerlines": "^0.41.8",
|
|
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.
|
|
97
|
+
"@powerlines/plugin-plugin": "^0.12.294",
|
|
98
98
|
"@types/node": "^25.4.0"
|
|
99
99
|
},
|
|
100
100
|
"publishConfig": { "access": "public" },
|
|
101
101
|
"types": "./dist/index.d.cts",
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "40d1f94407720be23c3801f9145fdad1fe27dfb2"
|
|
103
103
|
}
|