@powerlines/plugin-nodejs 0.1.261 → 0.1.263
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.cjs → _rolldown/runtime.cjs} +1 -1
- package/dist/_virtual/_rolldown/runtime.mjs +3 -0
- package/dist/components/env-builtin.cjs +78 -77
- package/dist/components/env-builtin.d.cts.map +1 -1
- package/dist/components/env-builtin.d.mts.map +1 -1
- package/dist/components/index.cjs +1 -0
- package/dist/index.cjs +14 -15
- package/dist/index.d.cts.map +1 -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.map +1 -1
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +9 -9
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 a Powerlines plugin for building a React application.
|
|
|
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
|
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
let
|
|
4
|
-
let
|
|
5
|
-
let
|
|
6
|
-
let
|
|
7
|
-
let
|
|
8
|
-
let
|
|
9
|
-
let
|
|
10
|
-
let
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
|
+
let _alloy_js_core = require("@alloy-js/core");
|
|
5
|
+
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
6
|
+
let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
|
|
7
|
+
let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
8
|
+
let _powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
|
9
|
+
let _powerlines_plugin_env_components_env_builtin = require("@powerlines/plugin-env/components/env-builtin");
|
|
10
|
+
let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
|
|
11
|
+
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
11
12
|
let defu = require("defu");
|
|
12
|
-
defu =
|
|
13
|
+
defu = require_runtime.__toESM(defu);
|
|
13
14
|
|
|
14
15
|
//#region src/components/env-builtin.tsx
|
|
15
16
|
/**
|
|
16
17
|
* Generates the NodeJs environment configuration module for the Powerlines project.
|
|
17
18
|
*/
|
|
18
19
|
function NodeJsEnvBuiltin(props) {
|
|
19
|
-
const [{ children }, rest] = (0,
|
|
20
|
-
const context = (0,
|
|
21
|
-
return (0,
|
|
20
|
+
const [{ children }, rest] = (0, _alloy_js_core.splitProps)(props, ["children"]);
|
|
21
|
+
const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
|
|
22
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_env_components_env_builtin.EnvBuiltin, (0, _alloy_js_core_jsx_runtime.mergeProps)({ defaultConfig: _alloy_js_core.code`process.env` }, rest, {
|
|
22
23
|
get imports() {
|
|
23
24
|
return (0, defu.default)({
|
|
24
25
|
"node:os": "os",
|
|
@@ -27,144 +28,144 @@ function NodeJsEnvBuiltin(props) {
|
|
|
27
28
|
},
|
|
28
29
|
get children() {
|
|
29
30
|
return [
|
|
30
|
-
(0,
|
|
31
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
31
32
|
"export": true,
|
|
32
33
|
"const": true,
|
|
33
34
|
name: "isWindows",
|
|
34
35
|
doc: "An indicator specifying whether the current operating system is MacOS (darwin kernel).",
|
|
35
|
-
initializer:
|
|
36
|
+
initializer: _alloy_js_core.code`/^win/i.test(process.platform); `
|
|
36
37
|
}),
|
|
37
|
-
(0,
|
|
38
|
-
(0,
|
|
38
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
39
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
39
40
|
"export": true,
|
|
40
41
|
"const": true,
|
|
41
42
|
name: "isLinux",
|
|
42
43
|
doc: "An indicator specifying whether the current operating system is Linux.",
|
|
43
|
-
initializer:
|
|
44
|
+
initializer: _alloy_js_core.code`/^linux/i.test(process.platform); `
|
|
44
45
|
}),
|
|
45
|
-
(0,
|
|
46
|
-
(0,
|
|
46
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
47
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
47
48
|
"export": true,
|
|
48
49
|
"const": true,
|
|
49
50
|
name: "isMacOS",
|
|
50
51
|
doc: "An indicator specifying whether the current operating system is MacOS (darwin kernel).",
|
|
51
|
-
initializer:
|
|
52
|
+
initializer: _alloy_js_core.code`/^darwin/i.test(process.platform); `
|
|
52
53
|
}),
|
|
53
|
-
(0,
|
|
54
|
-
(0,
|
|
54
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
55
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
55
56
|
"const": true,
|
|
56
57
|
name: "homedir",
|
|
57
|
-
initializer:
|
|
58
|
+
initializer: _alloy_js_core.code`os.homedir(); `
|
|
58
59
|
}),
|
|
59
|
-
(0,
|
|
60
|
-
(0,
|
|
60
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
61
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
61
62
|
"const": true,
|
|
62
63
|
name: "tmpdir",
|
|
63
|
-
initializer:
|
|
64
|
+
initializer: _alloy_js_core.code`os.tmpdir(); `
|
|
64
65
|
}),
|
|
65
|
-
(0,
|
|
66
|
-
(0,
|
|
66
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
67
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
|
|
67
68
|
heading: "The environment path types for storing things like data, config, logs, and cache in the current runtime environment.",
|
|
68
69
|
get children() {
|
|
69
|
-
return (0,
|
|
70
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `These environment path types are accessed in the {@link EnvPaths} type. ` });
|
|
70
71
|
}
|
|
71
72
|
}),
|
|
72
|
-
(0,
|
|
73
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.TypeDeclaration, {
|
|
73
74
|
"export": true,
|
|
74
75
|
name: "EnvPathType",
|
|
75
|
-
children:
|
|
76
|
+
children: _alloy_js_core.code`"data" | "config" | "cache" | "log" | "temp"; `
|
|
76
77
|
}),
|
|
77
|
-
(0,
|
|
78
|
-
(0,
|
|
79
|
-
(0,
|
|
78
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
79
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, { heading: "The environment paths for storing things like data, config, logs, and cache in the current runtime environment." }),
|
|
80
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.TypeDeclaration, {
|
|
80
81
|
"export": true,
|
|
81
82
|
name: "EnvPaths",
|
|
82
|
-
children:
|
|
83
|
+
children: _alloy_js_core.code`Record<EnvPathType, string>; `
|
|
83
84
|
}),
|
|
84
|
-
(0,
|
|
85
|
-
(0,
|
|
85
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
86
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
|
|
86
87
|
heading: "The resolved application directories based on the current operating system and environment variables.",
|
|
87
88
|
get children() {
|
|
88
|
-
return (0,
|
|
89
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: _alloy_js_core.code`If the \`DATA_DIR\`, \`CONFIG_DIR\`, \`CACHE_DIR\`, \`LOG_DIR\`, or \`TEMP_DIR\` environment variables are set, they will be treated as overrides and used by default. If the environment variables are not set, the paths are determined based on the specific conventions for each operating system (with additional overrides available through operating system specific environment variables):
|
|
89
90
|
- **Linux**: directories are generally created in \`~/.config/<name>\` (this is determined via the [XDG Base Directory spec](https://specifications.freedesktop.org/basedir-spec/latest/))
|
|
90
91
|
- **Windows**: directories are generally created in \`%AppData%/<name>\`
|
|
91
92
|
- **MacOS**: directories are generally created in \`~/Library/Application Support/<name>\`
|
|
92
93
|
` });
|
|
93
94
|
}
|
|
94
95
|
}),
|
|
95
|
-
(0,
|
|
96
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
96
97
|
"export": true,
|
|
97
98
|
"const": true,
|
|
98
99
|
name: "paths",
|
|
99
100
|
get initializer() {
|
|
100
|
-
return
|
|
101
|
+
return _alloy_js_core.code`isMacOS
|
|
101
102
|
? {
|
|
102
103
|
data: env.DATA_DIR
|
|
103
|
-
? join(String(env.DATA_DIR), "${(0,
|
|
104
|
-
: join(homedir, "Library", "Application Support", "${(0,
|
|
104
|
+
? join(String(env.DATA_DIR), "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}")
|
|
105
|
+
: join(homedir, "Library", "Application Support", "${(0, _stryke_string_format_title_case.titleCase)(context.config.organization)}", "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}"),
|
|
105
106
|
config: env.CONFIG_DIR
|
|
106
|
-
? join(String(env.CONFIG_DIR), "${(0,
|
|
107
|
-
: join(homedir, "Library", "Preferences", "${(0,
|
|
107
|
+
? join(String(env.CONFIG_DIR), "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}")
|
|
108
|
+
: join(homedir, "Library", "Preferences", "${(0, _stryke_string_format_title_case.titleCase)(context.config.organization)}", "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}"),
|
|
108
109
|
cache: env.CACHE_DIR
|
|
109
|
-
? join(String(env.CACHE_DIR), "${(0,
|
|
110
|
-
: join(homedir, "Library", "Caches", "${(0,
|
|
110
|
+
? join(String(env.CACHE_DIR), "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}")
|
|
111
|
+
: join(homedir, "Library", "Caches", "${(0, _stryke_string_format_title_case.titleCase)(context.config.organization)}", "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}"),
|
|
111
112
|
log: env.LOG_DIR
|
|
112
|
-
? join(String(env.LOG_DIR), "${(0,
|
|
113
|
-
: join(homedir, "Library", "Logs", "${(0,
|
|
113
|
+
? join(String(env.LOG_DIR), "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}")
|
|
114
|
+
: join(homedir, "Library", "Logs", "${(0, _stryke_string_format_title_case.titleCase)(context.config.organization)}", "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}"),
|
|
114
115
|
temp: env.TEMP_DIR
|
|
115
|
-
? join(String(env.TEMP_DIR), "${(0,
|
|
116
|
-
: join(tmpdir, "${(0,
|
|
116
|
+
? join(String(env.TEMP_DIR), "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}")
|
|
117
|
+
: join(tmpdir, "${(0, _stryke_string_format_title_case.titleCase)(context.config.organization)}", "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}")
|
|
117
118
|
}
|
|
118
119
|
: isWindows
|
|
119
120
|
? {
|
|
120
121
|
data: env.DATA_DIR
|
|
121
|
-
? join(String(env.DATA_DIR), "${(0,
|
|
122
|
-
: join(env.LOCALAPPDATA || join(homedir, "AppData", "Local"), "${(0,
|
|
122
|
+
? join(String(env.DATA_DIR), "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}")
|
|
123
|
+
: join(env.LOCALAPPDATA || join(homedir, "AppData", "Local"), "${(0, _stryke_string_format_title_case.titleCase)(context.config.organization)}", "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}", "Data"),
|
|
123
124
|
config: env.CONFIG_DIR
|
|
124
|
-
? join(env.CONFIG_DIR!, "${(0,
|
|
125
|
-
: join(env.APPDATA || join(homedir, "AppData", "Roaming"), "${(0,
|
|
125
|
+
? join(env.CONFIG_DIR!, "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}")
|
|
126
|
+
: join(env.APPDATA || join(homedir, "AppData", "Roaming"), "${(0, _stryke_string_format_title_case.titleCase)(context.config.organization)}", "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}", "Config"),
|
|
126
127
|
cache: env.CACHE_DIR
|
|
127
|
-
? join(String(env.CACHE_DIR), "${(0,
|
|
128
|
-
: join(env.LOCALAPPDATA || join(homedir, "AppData", "Local"), "Cache", "${(0,
|
|
128
|
+
? join(String(env.CACHE_DIR), "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}")
|
|
129
|
+
: join(env.LOCALAPPDATA || join(homedir, "AppData", "Local"), "Cache", "${(0, _stryke_string_format_title_case.titleCase)(context.config.organization)}", "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}"),
|
|
129
130
|
log: env.LOG_DIR
|
|
130
|
-
? join(String(env.LOG_DIR), "${(0,
|
|
131
|
-
: join(env.LOCALAPPDATA || join(homedir, "AppData", "Local"), "${(0,
|
|
131
|
+
? join(String(env.LOG_DIR), "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}")
|
|
132
|
+
: join(env.LOCALAPPDATA || join(homedir, "AppData", "Local"), "${(0, _stryke_string_format_title_case.titleCase)(context.config.organization)}", "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}", "Log"),
|
|
132
133
|
temp: env.TEMP_DIR
|
|
133
|
-
? join(String(env.TEMP_DIR), "${(0,
|
|
134
|
-
: join(tmpdir, "${(0,
|
|
134
|
+
? join(String(env.TEMP_DIR), "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}")
|
|
135
|
+
: join(tmpdir, "${(0, _stryke_string_format_title_case.titleCase)(context.config.organization)}", "${(0, _stryke_string_format_title_case.titleCase)(context.config.name)}")
|
|
135
136
|
}
|
|
136
137
|
:
|
|
137
138
|
{
|
|
138
139
|
data: env.DATA_DIR
|
|
139
|
-
? join(String(env.DATA_DIR), "${(0,
|
|
140
|
+
? join(String(env.DATA_DIR), "${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.name)}")
|
|
140
141
|
: join(
|
|
141
142
|
env.XDG_DATA_HOME || join(homedir, ".local", "share"),
|
|
142
|
-
"${(0,
|
|
143
|
-
"${(0,
|
|
143
|
+
"${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.organization)}",
|
|
144
|
+
"${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.name)}"
|
|
144
145
|
),
|
|
145
146
|
config: env.CONFIG_DIR
|
|
146
|
-
? join(String(env.CONFIG_DIR), "${(0,
|
|
147
|
+
? join(String(env.CONFIG_DIR), "${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.name)}")
|
|
147
148
|
: join(
|
|
148
149
|
env.XDG_CONFIG_HOME || join(homedir, ".config"),
|
|
149
|
-
"${(0,
|
|
150
|
-
"${(0,
|
|
150
|
+
"${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.organization)}",
|
|
151
|
+
"${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.name)}"
|
|
151
152
|
),
|
|
152
153
|
cache: env.CACHE_DIR
|
|
153
|
-
? join(String(env.CACHE_DIR), "${(0,
|
|
154
|
-
: join(env.XDG_CACHE_HOME || join(homedir, ".cache"), "${(0,
|
|
154
|
+
? join(String(env.CACHE_DIR), "${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.name)}")
|
|
155
|
+
: join(env.XDG_CACHE_HOME || join(homedir, ".cache"), "${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.organization)}", "${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.name)}"),
|
|
155
156
|
log: env.LOG_DIR
|
|
156
|
-
? join(String(env.LOG_DIR), "${(0,
|
|
157
|
-
: join(env.XDG_STATE_HOME || join(homedir, ".local", "state"), "${(0,
|
|
157
|
+
? join(String(env.LOG_DIR), "${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.name)}")
|
|
158
|
+
: join(env.XDG_STATE_HOME || join(homedir, ".local", "state"), "${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.organization)}", "${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.name)}"),
|
|
158
159
|
temp: env.TEMP_DIR
|
|
159
|
-
? join(String(env.TEMP_DIR), "${(0,
|
|
160
|
+
? join(String(env.TEMP_DIR), "${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.name)}")
|
|
160
161
|
: (env.DEVENV_RUNTIME || env.XDG_RUNTIME_DIR
|
|
161
|
-
? join((env.DEVENV_RUNTIME || env.XDG_RUNTIME_DIR)!, "${(0,
|
|
162
|
-
: join(tmpdir, basename(homedir), "${(0,
|
|
162
|
+
? join((env.DEVENV_RUNTIME || env.XDG_RUNTIME_DIR)!, "${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.organization)}", "${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.name)}")
|
|
163
|
+
: join(tmpdir, basename(homedir), "${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.organization)}", "${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.name)}"))
|
|
163
164
|
} as EnvPaths; `;
|
|
164
165
|
}
|
|
165
166
|
}),
|
|
166
|
-
(0,
|
|
167
|
-
(0,
|
|
167
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
168
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
168
169
|
get when() {
|
|
169
170
|
return Boolean(children);
|
|
170
171
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-builtin.d.cts","names":[],"sources":["../../src/components/env-builtin.tsx"],"
|
|
1
|
+
{"version":3,"file":"env-builtin.d.cts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":";;;;;;;iBAsCgB,gBAAA,CAAiB,KAAA,EAAO,eAAA,GAAe,eAAA,CAAA,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-builtin.d.mts","names":[],"sources":["../../src/components/env-builtin.tsx"],"
|
|
1
|
+
{"version":3,"file":"env-builtin.d.mts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":";;;;;;;iBAsCgB,gBAAA,CAAiB,KAAA,EAAO,eAAA,GAAe,eAAA,CAAA,QAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
const
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_components_env_builtin = require('./components/env-builtin.cjs');
|
|
4
|
-
let
|
|
5
|
-
let
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
let
|
|
4
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
|
+
let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
6
|
+
let _powerlines_plugin_babel = require("@powerlines/plugin-babel");
|
|
7
|
+
_powerlines_plugin_babel = require_runtime.__toESM(_powerlines_plugin_babel);
|
|
8
|
+
let _powerlines_plugin_env = require("@powerlines/plugin-env");
|
|
9
|
+
_powerlines_plugin_env = require_runtime.__toESM(_powerlines_plugin_env);
|
|
10
|
+
let _powerlines_plugin_env_helpers_persistence = require("@powerlines/plugin-env/helpers/persistence");
|
|
11
11
|
let powerlines_typescript = require("powerlines/typescript");
|
|
12
12
|
|
|
13
13
|
//#region src/index.tsx
|
|
@@ -16,8 +16,8 @@ let powerlines_typescript = require("powerlines/typescript");
|
|
|
16
16
|
*/
|
|
17
17
|
const plugin = (options = {}) => {
|
|
18
18
|
return [
|
|
19
|
-
(0,
|
|
20
|
-
(0,
|
|
19
|
+
(0, _powerlines_plugin_babel.default)(options.babel),
|
|
20
|
+
(0, _powerlines_plugin_env.default)(options.env),
|
|
21
21
|
{
|
|
22
22
|
name: "nodejs",
|
|
23
23
|
configResolved() {
|
|
@@ -28,8 +28,8 @@ const plugin = (options = {}) => {
|
|
|
28
28
|
},
|
|
29
29
|
async prepare() {
|
|
30
30
|
const _self$ = this;
|
|
31
|
-
const result = await (0,
|
|
32
|
-
return (0,
|
|
31
|
+
const result = await (0, _powerlines_plugin_env_helpers_persistence.readEnvTypeReflection)(this, "env");
|
|
32
|
+
return (0, _powerlines_plugin_alloy_render.render)(this, (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_env_builtin.NodeJsEnvBuiltin, {
|
|
33
33
|
get defaultConfig() {
|
|
34
34
|
return _self$.config.env.defaultConfig;
|
|
35
35
|
},
|
|
@@ -39,8 +39,7 @@ const plugin = (options = {}) => {
|
|
|
39
39
|
}
|
|
40
40
|
];
|
|
41
41
|
};
|
|
42
|
-
var src_default = plugin;
|
|
43
42
|
|
|
44
43
|
//#endregion
|
|
45
|
-
exports.default =
|
|
44
|
+
exports.default = plugin;
|
|
46
45
|
exports.plugin = plugin;
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;YA4BY,MAAA;IACR,MAAA,GAAS,mBAAA;EAAA;AAAA;;;;cAOA,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;YA4BY,MAAA;IACR,MAAA,GAAS,mBAAA;EAAA;AAAA;;;;cAOA,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs
CHANGED
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 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":";;;;;;;;;;;;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
|
|
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-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":";;;;;;;;;;;;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"}
|
|
@@ -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":";;;;UA0BiB,mBAAA;;AAAjB;;EAIE,KAAA,GAAQ,OAAA,CAAQ,kBAAA;EAAA;;;EAKhB,GAAA,GAAM,OAAA,CAAQ,IAAA,CAAK,gBAAA;AAAA;AAAA,KAGT,sBAAA,GAAyB,mBAAA;AAAA,KAEzB,0BAAA,GAA6B,uBAAA;AAAA,KAE7B,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,gBAAA,CAAiB,eAAA;AAAA"}
|
|
@@ -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":";;;;UA0BiB,mBAAA;;AAAjB;;EAIE,KAAA,GAAQ,OAAA,CAAQ,kBAAA;EAAA;;;EAKhB,GAAA,GAAM,OAAA,CAAQ,IAAA,CAAK,gBAAA;AAAA;AAAA,KAGT,sBAAA,GAAyB,mBAAA;AAAA,KAEzB,0BAAA,GAA6B,uBAAA;AAAA,KAE7B,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,gBAAA,CAAiB,eAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-nodejs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.263",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for building a Node.js application.",
|
|
6
6
|
"repository": {
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
"default": "./dist/index.mjs"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
"./*": "./*",
|
|
59
58
|
"./components": {
|
|
60
59
|
"require": {
|
|
61
60
|
"types": "./dist/components/index.d.cts",
|
|
@@ -84,6 +83,7 @@
|
|
|
84
83
|
"default": "./dist/components/env-builtin.mjs"
|
|
85
84
|
}
|
|
86
85
|
},
|
|
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.25.
|
|
123
|
-
"@powerlines/plugin-babel": "^0.12.
|
|
124
|
-
"@powerlines/plugin-env": "^0.16.
|
|
125
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
126
|
-
"@storm-software/config-tools": "
|
|
122
|
+
"@powerlines/plugin-alloy": "^0.25.27",
|
|
123
|
+
"@powerlines/plugin-babel": "^0.12.346",
|
|
124
|
+
"@powerlines/plugin-env": "^0.16.62",
|
|
125
|
+
"@powerlines/plugin-plugin": "^0.12.294",
|
|
126
|
+
"@storm-software/config-tools": "1.189.28",
|
|
127
127
|
"@stryke/string-format": "^0.17.3",
|
|
128
128
|
"defu": "^6.1.4",
|
|
129
|
-
"powerlines": "^0.41.
|
|
129
|
+
"powerlines": "^0.41.8"
|
|
130
130
|
},
|
|
131
131
|
"devDependencies": { "@types/node": "^25.4.0" },
|
|
132
132
|
"publishConfig": { "access": "public" },
|
|
133
133
|
"types": "./dist/index.d.cts",
|
|
134
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "40d1f94407720be23c3801f9145fdad1fe27dfb2"
|
|
135
135
|
}
|