@powerlines/plugin-nodejs 0.1.144 → 0.1.146

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 CHANGED
@@ -27,16 +27,14 @@ const plugin = (options = {}) => {
27
27
  if (!(0, powerlines_lib_typescript_tsconfig.isMatchFound)("node", this.tsconfig.tsconfigJson.compilerOptions.types)) this.tsconfig.tsconfigJson.compilerOptions.types.push("node");
28
28
  },
29
29
  async prepare() {
30
+ const _self$ = this;
30
31
  const result = await (0, __powerlines_plugin_env.readEnvTypeReflection)(this, "env");
31
- await this.render(() => {
32
- const _self$ = this;
33
- return (0, __alloy_js_core_jsx_runtime.createComponent)(require_env.NodeJsEnvBuiltin, {
34
- get defaultConfig() {
35
- return _self$.config.env.defaultConfig;
36
- },
37
- reflection: result
38
- });
39
- });
32
+ await this.render((0, __alloy_js_core_jsx_runtime.createComponent)(require_env.NodeJsEnvBuiltin, {
33
+ get defaultConfig() {
34
+ return _self$.config.env.defaultConfig;
35
+ },
36
+ reflection: result
37
+ }));
40
38
  }
41
39
  }
42
40
  ];
package/dist/index.mjs CHANGED
@@ -24,16 +24,14 @@ const plugin = (options = {}) => {
24
24
  if (!isMatchFound("node", this.tsconfig.tsconfigJson.compilerOptions.types)) this.tsconfig.tsconfigJson.compilerOptions.types.push("node");
25
25
  },
26
26
  async prepare() {
27
+ const _self$ = this;
27
28
  const result = await readEnvTypeReflection(this, "env");
28
- await this.render(() => {
29
- const _self$ = this;
30
- return createComponent(NodeJsEnvBuiltin, {
31
- get defaultConfig() {
32
- return _self$.config.env.defaultConfig;
33
- },
34
- reflection: result
35
- });
36
- });
29
+ await this.render(createComponent(NodeJsEnvBuiltin, {
30
+ get defaultConfig() {
31
+ return _self$.config.env.defaultConfig;
32
+ },
33
+ reflection: result
34
+ }));
37
35
  }
38
36
  }
39
37
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["babel","env","readEnvTypeReflection","isMatchFound","NodeJsEnvBuiltin","plugin","options","name","configResolved","devDependencies","tsconfig","tsconfigJson","compilerOptions","types","push","prepare","result","render","_self$","_$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 babel from \"@powerlines/plugin-babel\";\nimport env, { readEnvTypeReflection } from \"@powerlines/plugin-env\";\nimport { isMatchFound } from \"powerlines/lib/typescript/tsconfig\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport { NodeJsEnvBuiltin } from \"./components/env\";\nimport { NodeJsPluginContext, NodeJsPluginOptions } from \"./types/plugin\";\n\nexport * from \"./components\";\nexport * from \"./types\";\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) => {\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 await this.render(() => (\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":";;;;;;;;;;;;;AA+BA,MAAaK,UAGXC,UAA+B,EAAE,KAC9B;AACH,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;IACd,MAAMC,SAAS,MAAMd,sBAAsB,MAAM,MAAM;AACvD,UAAM,KAAKe,aAAO;KAAA,MAAAC,SAAA;AAAA,YAAAC,gBACff,kBAAgB;MAAA,IACfgB,gBAAa;AAAA,cAAEF,OAAKG,OAAOpB,IAAImB;;MAC/BE,YAAYN;MAAM,CAAA;MAEpB;;GAEL;EACF;;AAGH,kBAAeX"}
1
+ {"version":3,"file":"index.mjs","names":["babel","env","readEnvTypeReflection","isMatchFound","NodeJsEnvBuiltin","plugin","options","name","configResolved","devDependencies","tsconfig","tsconfigJson","compilerOptions","types","push","prepare","_self$","result","render","_$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 babel from \"@powerlines/plugin-babel\";\nimport env, { readEnvTypeReflection } from \"@powerlines/plugin-env\";\nimport { isMatchFound } from \"powerlines/lib/typescript/tsconfig\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport { NodeJsEnvBuiltin } from \"./components/env\";\nimport { NodeJsPluginContext, NodeJsPluginOptions } from \"./types/plugin\";\n\nexport * from \"./components\";\nexport * from \"./types\";\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) => {\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 await this.render(\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":";;;;;;;;;;;;;AA+BA,MAAaK,UAGXC,UAA+B,EAAE,KAC9B;AACH,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;AACvD,UAAM,KAAKgB,OAAMC,gBACdf,kBAAgB;KAAA,IACfgB,gBAAa;AAAA,aAAEJ,OAAKK,OAAOpB,IAAImB;;KAC/BE,YAAYL;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.144",
3
+ "version": "0.1.146",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for building a Node.js application.",
6
6
  "repository": {
@@ -116,28 +116,21 @@
116
116
  "typings": "dist/index.d.mts",
117
117
  "files": ["dist/**/*"],
118
118
  "keywords": ["nodejs", "powerlines", "storm-software", "powerlines-plugin"],
119
- "peerDependencies": {
120
- "@alloy-js/core": ">=0.22.0",
121
- "@alloy-js/typescript": ">=0.22.0"
122
- },
123
- "peerDependenciesMeta": {
124
- "@alloy-js/core": { "optional": false },
125
- "@alloy-js/typescript": { "optional": false }
126
- },
119
+ "peerDependencies": { "@powerlines/plugin-alloy": "*" },
120
+ "peerDependenciesMeta": { "@powerlines/plugin-alloy": { "optional": false } },
127
121
  "dependencies": {
128
122
  "@alloy-js/core": "^0.22.0",
129
123
  "@alloy-js/typescript": "^0.22.0",
130
- "@powerlines/plugin-alloy": "^0.19.21",
131
- "@powerlines/plugin-babel": "^0.12.254",
132
- "@powerlines/plugin-env": "^0.15.149",
133
- "@powerlines/plugin-plugin": "^0.12.196",
124
+ "@powerlines/plugin-babel": "^0.12.256",
125
+ "@powerlines/plugin-env": "^0.15.151",
126
+ "@powerlines/plugin-plugin": "^0.12.198",
134
127
  "@storm-software/config-tools": "^1.189.0",
135
128
  "@stryke/string-format": "^0.13.6",
136
129
  "defu": "^6.1.4",
137
- "powerlines": "^0.38.12"
130
+ "powerlines": "^0.38.14"
138
131
  },
139
132
  "devDependencies": { "@types/node": "^24.10.9" },
140
133
  "publishConfig": { "access": "public" },
141
134
  "types": "./dist/index.d.cts",
142
- "gitHead": "88803dd52e1cf64679d36eb93edaf56a2f80a8ef"
135
+ "gitHead": "1acb301f822c9c1e37ac7dfeed3c2253b1f16b3e"
143
136
  }