@powerlines/plugin-nodejs 0.1.393 → 0.1.397

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
@@ -2,13 +2,13 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
2
2
  const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  const require_components_env_builtin = require('./components/env-builtin.cjs');
4
4
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
5
+ let _powerlines_core_lib_typescript = require("@powerlines/core/lib/typescript");
5
6
  let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
6
7
  let _powerlines_plugin_babel = require("@powerlines/plugin-babel");
7
8
  _powerlines_plugin_babel = require_runtime.__toESM(_powerlines_plugin_babel);
8
9
  let _powerlines_plugin_env = require("@powerlines/plugin-env");
9
10
  _powerlines_plugin_env = require_runtime.__toESM(_powerlines_plugin_env);
10
11
  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,7 +24,7 @@ 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, powerlines_typescript.isMatchFound)("node", this.tsconfig.tsconfigJson.compilerOptions.types)) this.tsconfig.tsconfigJson.compilerOptions.types.push("node");
27
+ if (!(0, _powerlines_core_lib_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;
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import { NodeJsEnvBuiltin } from "./components/env-builtin.mjs";
2
2
  import { createComponent } from "@alloy-js/core/jsx-runtime";
3
+ import { isMatchFound } from "@powerlines/core/lib/typescript";
3
4
  import { render } from "@powerlines/plugin-alloy/render";
4
5
  import babel from "@powerlines/plugin-babel";
5
6
  import env from "@powerlines/plugin-env";
6
7
  import { readEnvTypeReflection } from "@powerlines/plugin-env/helpers/persistence";
7
- import { isMatchFound } from "powerlines/typescript";
8
8
 
9
9
  //#region src/index.tsx
10
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"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-builtin\";\nimport { NodeJsPluginContext, NodeJsPluginOptions } from \"./types/plugin\";\n\ndeclare module \"powerlines\" {\n interface Config {\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":";;;;;;;;;;;;AA8BA,MAAE,UAAA,UAAA,EAAA,KAAA;AACF,QAAA;EAAA,MAAA,QAAA,MAAA;EAAA,IAAA,QAAA,IAAA;EAAA;;GAEE,iBAAA;AACG,SAAA,gBAAqB,iBAAkB;AAC1C,SAAA,SAAA,aAAA,oBAAA,EAAA;AACI,SAAC,SAAa,aAAE,gBAAA,UAAA,EAAA;AACpB,QAAQ,CAAC,aAAQ,QAAA,KAAA,SAAsB,aAAA,gBAAA,MAAA,CACxC,MAAA,SAAA,aAAA,gBAAA,MAAA,KAAA,OAAA;;GAGC,MAAO,UAAA;IACL,MAAM,SAAQ;IACd,MAAI,SAAY,MAAA,sBAAA,MAAA,MAAA;AAChB,WAAA,OAAA,MAAA,gBAAA,kBAAA;KACE,IAAM,gBAAQ;AACd,aAAA,OAAiB,OAAA,IAAA;;;KAGhB,CAAC,CAAA;;GAEL;EAAC"}
1
+ {"version":3,"file":"index.mjs","names":[],"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 { isMatchFound } from \"@powerlines/core/lib/typescript\";\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 { NodeJsEnvBuiltin } from \"./components/env-builtin\";\nimport { NodeJsPluginContext, NodeJsPluginOptions } from \"./types/plugin\";\n\ndeclare module \"powerlines\" {\n interface Config {\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":";;;;;;;;;;;;AA8BA,MAAE,UAAA,UAAA,EAAA,KAAA;AACF,QAAA;EAAA,MAAA,QAAA,MAAA;EAAA,IAAA,QAAA,IAAA;EAAA;;GAEE,iBAAA;AACG,SAAA,gBAAqB,iBAAkB;AAC1C,SAAA,SAAA,aAAA,oBAAA,EAAA;AACI,SAAC,SAAa,aAAE,gBAAA,UAAA,EAAA;AACpB,QAAQ,CAAC,aAAQ,QAAA,KAAA,SAAsB,aAAA,gBAAA,MAAA,CACxC,MAAA,SAAA,aAAA,gBAAA,MAAA,KAAA,OAAA;;GAGC,MAAO,UAAA;IACL,MAAM,SAAQ;IACd,MAAI,SAAY,MAAA,sBAAA,MAAA,MAAA;AAChB,WAAA,OAAA,MAAA,gBAAA,kBAAA;KACE,IAAM,gBAAQ;AACd,aAAA,OAAiB,OAAA,IAAA;;;KAGhB,CAAC,CAAA;;GAEL;EAAC"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-nodejs",
3
- "version": "0.1.393",
3
+ "version": "0.1.397",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for building a Node.js application.",
6
6
  "repository": {
7
7
  "type": "github",
8
8
  "url": "https://github.com/storm-software/powerlines.git",
9
- "directory": "packages/plugin-nodejs"
9
+ "directory": "packages/plugins/plugin-nodejs"
10
10
  },
11
11
  "homepage": "https://stormsoftware.com",
12
12
  "bugs": {
@@ -41,77 +41,24 @@
41
41
  "main": "./dist/index.cjs",
42
42
  "module": "./dist/index.mjs",
43
43
  "exports": {
44
- ".": {
45
- "require": {
46
- "types": "./dist/index.d.cts",
47
- "default": "./dist/index.cjs"
48
- },
49
- "import": {
50
- "types": "./dist/index.d.mts",
51
- "default": "./dist/index.mjs"
52
- },
53
- "default": {
54
- "types": "./dist/index.d.mts",
55
- "default": "./dist/index.mjs"
56
- }
57
- },
44
+ ".": { "import": "./dist/index.mjs", "require": "./dist/index.cjs" },
58
45
  "./components": {
59
- "require": {
60
- "types": "./dist/components/index.d.cts",
61
- "default": "./dist/components/index.cjs"
62
- },
63
- "import": {
64
- "types": "./dist/components/index.d.mts",
65
- "default": "./dist/components/index.mjs"
66
- },
67
- "default": {
68
- "types": "./dist/components/index.d.mts",
69
- "default": "./dist/components/index.mjs"
70
- }
46
+ "import": "./dist/components/index.mjs",
47
+ "require": "./dist/components/index.cjs"
71
48
  },
72
49
  "./components/env-builtin": {
73
- "require": {
74
- "types": "./dist/components/env-builtin.d.cts",
75
- "default": "./dist/components/env-builtin.cjs"
76
- },
77
- "import": {
78
- "types": "./dist/components/env-builtin.d.mts",
79
- "default": "./dist/components/env-builtin.mjs"
80
- },
81
- "default": {
82
- "types": "./dist/components/env-builtin.d.mts",
83
- "default": "./dist/components/env-builtin.mjs"
84
- }
50
+ "import": "./dist/components/env-builtin.mjs",
51
+ "require": "./dist/components/env-builtin.cjs"
85
52
  },
86
- "./package.json": "./package.json",
87
53
  "./types": {
88
- "require": {
89
- "types": "./dist/types/index.d.cts",
90
- "default": "./dist/types/index.cjs"
91
- },
92
- "import": {
93
- "types": "./dist/types/index.d.mts",
94
- "default": "./dist/types/index.mjs"
95
- },
96
- "default": {
97
- "types": "./dist/types/index.d.mts",
98
- "default": "./dist/types/index.mjs"
99
- }
54
+ "import": "./dist/types/index.mjs",
55
+ "require": "./dist/types/index.cjs"
100
56
  },
101
57
  "./types/plugin": {
102
- "require": {
103
- "types": "./dist/types/plugin.d.cts",
104
- "default": "./dist/types/plugin.cjs"
105
- },
106
- "import": {
107
- "types": "./dist/types/plugin.d.mts",
108
- "default": "./dist/types/plugin.mjs"
109
- },
110
- "default": {
111
- "types": "./dist/types/plugin.d.mts",
112
- "default": "./dist/types/plugin.mjs"
113
- }
114
- }
58
+ "import": "./dist/types/plugin.mjs",
59
+ "require": "./dist/types/plugin.cjs"
60
+ },
61
+ "./package.json": "./package.json"
115
62
  },
116
63
  "typings": "dist/index.d.mts",
117
64
  "files": ["dist/**/*"],
@@ -119,17 +66,17 @@
119
66
  "dependencies": {
120
67
  "@alloy-js/core": "0.23.0-dev.8",
121
68
  "@alloy-js/typescript": "0.23.0-dev.4",
122
- "@powerlines/plugin-alloy": "^0.26.84",
123
- "@powerlines/plugin-babel": "^0.13.1",
124
- "@powerlines/plugin-env": "^0.16.192",
125
- "@powerlines/plugin-plugin": "^0.12.416",
126
- "@storm-software/config-tools": "^1.190.1",
127
- "@stryke/string-format": "^0.17.13",
69
+ "@powerlines/plugin-alloy": "^0.26.88",
70
+ "@powerlines/plugin-babel": "^0.13.4",
71
+ "@powerlines/plugin-env": "^0.16.196",
72
+ "@powerlines/plugin-plugin": "^0.12.419",
73
+ "@storm-software/config-tools": "^1.190.2",
74
+ "@stryke/string-format": "^0.17.17",
128
75
  "defu": "^6.1.7",
129
- "powerlines": "^0.47.4"
76
+ "powerlines": "^0.47.7"
130
77
  },
131
- "devDependencies": { "@types/node": "^25.6.0" },
78
+ "devDependencies": { "@types/node": "^25.7.0" },
132
79
  "publishConfig": { "access": "public" },
133
80
  "types": "./dist/index.d.cts",
134
- "gitHead": "af32ddb830394bb40196113171aa009dd5b7e28a"
81
+ "gitHead": "10ae97e8d61da05b4b1d8791677b0128331b1067"
135
82
  }