@powerlines/plugin-nodejs 0.1.208 → 0.1.210
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.cjs +4 -5
- package/dist/index.d.cts +8 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +8 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
package/dist/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
3
3
|
const require_components_env = require('./components/env.cjs');
|
|
4
|
-
require('./components/index.cjs');
|
|
5
4
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
5
|
let __powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
7
6
|
let __powerlines_plugin_babel = require("@powerlines/plugin-babel");
|
|
8
7
|
__powerlines_plugin_babel = require_rolldown_runtime.__toESM(__powerlines_plugin_babel);
|
|
9
8
|
let __powerlines_plugin_env = require("@powerlines/plugin-env");
|
|
10
9
|
__powerlines_plugin_env = require_rolldown_runtime.__toESM(__powerlines_plugin_env);
|
|
11
|
-
let
|
|
10
|
+
let __powerlines_plugin_env_helpers_persistence = require("@powerlines/plugin-env/helpers/persistence");
|
|
11
|
+
let powerlines_typescript = require("powerlines/typescript");
|
|
12
12
|
|
|
13
13
|
//#region src/index.tsx
|
|
14
14
|
/**
|
|
@@ -24,11 +24,11 @@ const plugin = (options = {}) => {
|
|
|
24
24
|
this.devDependencies["@types/node"] = "^22.14.6";
|
|
25
25
|
this.tsconfig.tsconfigJson.compilerOptions ??= {};
|
|
26
26
|
this.tsconfig.tsconfigJson.compilerOptions.types ??= [];
|
|
27
|
-
if (!(0,
|
|
27
|
+
if (!(0, powerlines_typescript.isMatchFound)("node", this.tsconfig.tsconfigJson.compilerOptions.types)) this.tsconfig.tsconfigJson.compilerOptions.types.push("node");
|
|
28
28
|
},
|
|
29
29
|
async prepare() {
|
|
30
30
|
const _self$ = this;
|
|
31
|
-
const result = await (0,
|
|
31
|
+
const result = await (0, __powerlines_plugin_env_helpers_persistence.readEnvTypeReflection)(this, "env");
|
|
32
32
|
return (0, __powerlines_plugin_alloy_render.render)(this, (0, __alloy_js_core_jsx_runtime.createComponent)(require_components_env.NodeJsEnvBuiltin, {
|
|
33
33
|
get defaultConfig() {
|
|
34
34
|
return _self$.config.env.defaultConfig;
|
|
@@ -42,6 +42,5 @@ const plugin = (options = {}) => {
|
|
|
42
42
|
var src_default = plugin;
|
|
43
43
|
|
|
44
44
|
//#endregion
|
|
45
|
-
exports.NodeJsEnvBuiltin = require_components_env.NodeJsEnvBuiltin;
|
|
46
45
|
exports.default = src_default;
|
|
47
46
|
exports.plugin = plugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import { NodeJsPluginContext, NodeJsPluginOptions, NodeJsPluginResolvedConfig, NodeJsPluginUserConfig, __ΩNodeJsPluginContext, __ΩNodeJsPluginOptions, __ΩNodeJsPluginResolvedConfig, __ΩNodeJsPluginUserConfig } from "./types/plugin.cjs";
|
|
4
|
-
import "./types/index.cjs";
|
|
5
|
-
import { Plugin } from "powerlines/types/plugin";
|
|
1
|
+
import { NodeJsPluginContext, NodeJsPluginOptions } from "./types/plugin.cjs";
|
|
2
|
+
import { Plugin } from "powerlines";
|
|
6
3
|
|
|
7
4
|
//#region src/index.d.ts
|
|
5
|
+
declare module "powerlines" {
|
|
6
|
+
interface UserConfig {
|
|
7
|
+
nodejs?: NodeJsPluginOptions;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
8
10
|
/**
|
|
9
11
|
* A package containing a Powerlines plugin for building a NodeJs application.
|
|
10
12
|
*/
|
|
11
13
|
declare const plugin: <TContext extends NodeJsPluginContext = NodeJsPluginContext>(options?: NodeJsPluginOptions) => Plugin<TContext>[];
|
|
12
14
|
//#endregion
|
|
13
|
-
export {
|
|
15
|
+
export { plugin as default, plugin };
|
|
14
16
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;;IAyB0E,MAAA,CAAA,EAI7D,mBAJ6D;EAAA;;;;AAW1E;AACmB,cADN,MACM,EAAA,CAAA,iBAAA,mBAAA,GAAsB,mBAAtB,CAAA,CAAA,OAAA,CAAA,EAER,mBAFQ,EAAA,GAGhB,MAHgB,CAGT,QAHS,CAAA,EAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import { NodeJsPluginContext, NodeJsPluginOptions, NodeJsPluginResolvedConfig, NodeJsPluginUserConfig, __ΩNodeJsPluginContext, __ΩNodeJsPluginOptions, __ΩNodeJsPluginResolvedConfig, __ΩNodeJsPluginUserConfig } from "./types/plugin.mjs";
|
|
4
|
-
import "./types/index.mjs";
|
|
5
|
-
import { Plugin } from "powerlines/types/plugin";
|
|
1
|
+
import { NodeJsPluginContext, NodeJsPluginOptions } from "./types/plugin.mjs";
|
|
2
|
+
import { Plugin } from "powerlines";
|
|
6
3
|
|
|
7
4
|
//#region src/index.d.ts
|
|
5
|
+
declare module "powerlines" {
|
|
6
|
+
interface UserConfig {
|
|
7
|
+
nodejs?: NodeJsPluginOptions;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
8
10
|
/**
|
|
9
11
|
* A package containing a Powerlines plugin for building a NodeJs application.
|
|
10
12
|
*/
|
|
11
13
|
declare const plugin: <TContext extends NodeJsPluginContext = NodeJsPluginContext>(options?: NodeJsPluginOptions) => Plugin<TContext>[];
|
|
12
14
|
//#endregion
|
|
13
|
-
export {
|
|
15
|
+
export { plugin as default, plugin };
|
|
14
16
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;;IAyB0E,MAAA,CAAA,EAI7D,mBAJ6D;EAAA;;;;AAW1E;AACmB,cADN,MACM,EAAA,CAAA,iBAAA,mBAAA,GAAsB,mBAAtB,CAAA,CAAA,OAAA,CAAA,EAER,mBAFQ,EAAA,GAGhB,MAHgB,CAGT,QAHS,CAAA,EAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { NodeJsEnvBuiltin } from "./components/env.mjs";
|
|
2
|
-
import "./components/index.mjs";
|
|
3
2
|
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
4
3
|
import { render } from "@powerlines/plugin-alloy/render";
|
|
5
4
|
import babel from "@powerlines/plugin-babel";
|
|
6
|
-
import env
|
|
7
|
-
import {
|
|
5
|
+
import env from "@powerlines/plugin-env";
|
|
6
|
+
import { readEnvTypeReflection } from "@powerlines/plugin-env/helpers/persistence";
|
|
7
|
+
import { isMatchFound } from "powerlines/typescript";
|
|
8
8
|
|
|
9
9
|
//#region src/index.tsx
|
|
10
10
|
/**
|
|
@@ -38,5 +38,5 @@ const plugin = (options = {}) => {
|
|
|
38
38
|
var src_default = plugin;
|
|
39
39
|
|
|
40
40
|
//#endregion
|
|
41
|
-
export {
|
|
41
|
+
export { src_default as default, plugin };
|
|
42
42
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["render","babel","env","readEnvTypeReflection","isMatchFound","NodeJsEnvBuiltin","plugin","options","name","configResolved","devDependencies","tsconfig","tsconfigJson","compilerOptions","types","push","prepare","_self$","result","_$createComponent","defaultConfig","config","reflection"],"sources":["../src/index.tsx"],"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 { render } from \"@powerlines/plugin-alloy/render\";\nimport babel from \"@powerlines/plugin-babel\";\nimport env
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["render","babel","env","readEnvTypeReflection","isMatchFound","NodeJsEnvBuiltin","plugin","options","name","configResolved","devDependencies","tsconfig","tsconfigJson","compilerOptions","types","push","prepare","_self$","result","_$createComponent","defaultConfig","config","reflection"],"sources":["../src/index.tsx"],"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 { render } from \"@powerlines/plugin-alloy/render\";\nimport babel from \"@powerlines/plugin-babel\";\nimport env from \"@powerlines/plugin-env\";\nimport { readEnvTypeReflection } from \"@powerlines/plugin-env/helpers/persistence\";\nimport { Plugin } from \"powerlines\";\nimport { isMatchFound } from \"powerlines/typescript\";\nimport { NodeJsEnvBuiltin } from \"./components/env\";\nimport { NodeJsPluginContext, NodeJsPluginOptions } from \"./types/plugin\";\n\ndeclare module \"powerlines\" {\n export interface UserConfig {\n nodejs?: NodeJsPluginOptions;\n }\n}\n\n/**\n * A package containing a Powerlines plugin for building a NodeJs application.\n */\nexport const plugin = <\n TContext extends NodeJsPluginContext = NodeJsPluginContext\n>(\n options: NodeJsPluginOptions = {}\n): Plugin<TContext>[] => {\n return [\n babel(options.babel),\n env(options.env),\n {\n name: \"nodejs\",\n configResolved() {\n this.devDependencies[\"@types/node\"] = \"^22.14.6\";\n\n this.tsconfig.tsconfigJson.compilerOptions ??= {};\n this.tsconfig.tsconfigJson.compilerOptions.types ??= [];\n if (\n !isMatchFound(\n \"node\",\n this.tsconfig.tsconfigJson.compilerOptions.types\n )\n ) {\n this.tsconfig.tsconfigJson.compilerOptions.types.push(\"node\");\n }\n },\n async prepare() {\n const result = await readEnvTypeReflection(this, \"env\");\n\n return render(\n this,\n <NodeJsEnvBuiltin\n defaultConfig={this.config.env.defaultConfig}\n reflection={result}\n />\n );\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;AAoCA,MAAaM,UAGXC,UAA+B,EAAE,KACV;AACvB,QAAO;EACLN,MAAMM,QAAQN,MAAM;EACpBC,IAAIK,QAAQL,IAAI;EAChB;GACEM,MAAM;GACNC,iBAAiB;AACf,SAAKC,gBAAgB,iBAAiB;AAEtC,SAAKC,SAASC,aAAaC,oBAAoB,EAAE;AACjD,SAAKF,SAASC,aAAaC,gBAAgBC,UAAU,EAAE;AACvD,QACE,CAACV,aACC,QACA,KAAKO,SAASC,aAAaC,gBAAgBC,MAC5C,CAED,MAAKH,SAASC,aAAaC,gBAAgBC,MAAMC,KAAK,OAAO;;GAGjE,MAAMC,UAAU;IAAA,MAAAC,SAAA;IACd,MAAMC,SAAS,MAAMf,sBAAsB,MAAM,MAAM;AAEvD,WAAOH,OACL,MAAImB,gBACHd,kBAAgB;KAAA,IACfe,gBAAa;AAAA,aAAEH,OAAKI,OAAOnB,IAAIkB;;KAC/BE,YAAYJ;KAAM,CAEtB,CAAC;;GAEJ;EACF;;AAGH,kBAAeZ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-nodejs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.210",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for building a Node.js application.",
|
|
6
6
|
"repository": {
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"default": "./dist/index.mjs"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
+
"./*": "./*",
|
|
58
59
|
"./components": {
|
|
59
60
|
"require": {
|
|
60
61
|
"types": "./dist/components/index.d.cts",
|
|
@@ -83,7 +84,6 @@
|
|
|
83
84
|
"default": "./dist/components/env.mjs"
|
|
84
85
|
}
|
|
85
86
|
},
|
|
86
|
-
"./package.json": "./package.json",
|
|
87
87
|
"./types": {
|
|
88
88
|
"require": {
|
|
89
89
|
"types": "./dist/types/index.d.cts",
|
|
@@ -119,17 +119,17 @@
|
|
|
119
119
|
"dependencies": {
|
|
120
120
|
"@alloy-js/core": "0.23.0-dev.8",
|
|
121
121
|
"@alloy-js/typescript": "0.23.0-dev.4",
|
|
122
|
-
"@powerlines/plugin-alloy": "^0.23.
|
|
123
|
-
"@powerlines/plugin-babel": "^0.12.
|
|
124
|
-
"@powerlines/plugin-env": "^0.16.
|
|
125
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
126
|
-
"@storm-software/config-tools": "^1.189.
|
|
122
|
+
"@powerlines/plugin-alloy": "^0.23.22",
|
|
123
|
+
"@powerlines/plugin-babel": "^0.12.301",
|
|
124
|
+
"@powerlines/plugin-env": "^0.16.9",
|
|
125
|
+
"@powerlines/plugin-plugin": "^0.12.243",
|
|
126
|
+
"@storm-software/config-tools": "^1.189.10",
|
|
127
127
|
"@stryke/string-format": "^0.14.2",
|
|
128
128
|
"defu": "^6.1.4",
|
|
129
|
-
"powerlines": "^0.
|
|
129
|
+
"powerlines": "^0.39.1"
|
|
130
130
|
},
|
|
131
|
-
"devDependencies": { "@types/node": "^25.3.
|
|
131
|
+
"devDependencies": { "@types/node": "^25.3.3" },
|
|
132
132
|
"publishConfig": { "access": "public" },
|
|
133
133
|
"types": "./dist/index.d.cts",
|
|
134
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "30a096fed42d3462dbc028b16145250c373f3d99"
|
|
135
135
|
}
|