@powerlines/plugin-nodejs 0.1.10 → 0.1.11

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.
@@ -20,7 +20,7 @@ function NodeJsEnvBuiltin(props) {
20
20
  return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_env_components_env.EnvBuiltin, (0, __alloy_js_core_jsx_runtime.mergeProps)(rest, {
21
21
  get imports() {
22
22
  return (0, defu.default)({
23
- "node:os": ["homedir", "tmpdir"],
23
+ "node:os": "os",
24
24
  "node:path": ["basename", "join"]
25
25
  }, rest.imports ?? {});
26
26
  },
@@ -56,14 +56,14 @@ function NodeJsEnvBuiltin(props) {
56
56
  (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
57
57
  "const": true,
58
58
  name: "homedir",
59
- initializer: __alloy_js_core.code`homedir(); `
59
+ initializer: __alloy_js_core.code`os.homedir(); `
60
60
  }),
61
61
  (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
62
62
  (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
63
63
  (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
64
64
  "const": true,
65
65
  name: "tmpdir",
66
- initializer: __alloy_js_core.code`tmpdir(); `
66
+ initializer: __alloy_js_core.code`os.tmpdir(); `
67
67
  }),
68
68
  (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
69
69
  (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
@@ -104,7 +104,6 @@ function NodeJsEnvBuiltin(props) {
104
104
  "export": true,
105
105
  "const": true,
106
106
  name: "paths",
107
- type: "EnvPaths",
108
107
  get initializer() {
109
108
  return __alloy_js_core.code`isMacOS
110
109
  ? {
@@ -169,7 +168,7 @@ function NodeJsEnvBuiltin(props) {
169
168
  : (env.DEVENV_RUNTIME || env.XDG_RUNTIME_DIR
170
169
  ? 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)}")
171
170
  : join(tmpdir, basename(homedir), "${(0, __stryke_string_format_kebab_case.kebabCase)(context.config.organization)}", "${(0, __stryke_string_format_kebab_case.kebabCase)(context.config.name)}"))
172
- } as StormEnvPaths; `;
171
+ } as EnvPaths; `;
173
172
  }
174
173
  }),
175
174
  (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
@@ -18,7 +18,7 @@ function NodeJsEnvBuiltin(props) {
18
18
  return createComponent(EnvBuiltin, mergeProps(rest, {
19
19
  get imports() {
20
20
  return defu({
21
- "node:os": ["homedir", "tmpdir"],
21
+ "node:os": "os",
22
22
  "node:path": ["basename", "join"]
23
23
  }, rest.imports ?? {});
24
24
  },
@@ -54,14 +54,14 @@ function NodeJsEnvBuiltin(props) {
54
54
  createComponent(VarDeclaration, {
55
55
  "const": true,
56
56
  name: "homedir",
57
- initializer: code`homedir(); `
57
+ initializer: code`os.homedir(); `
58
58
  }),
59
59
  createIntrinsic("hbr", {}),
60
60
  createIntrinsic("hbr", {}),
61
61
  createComponent(VarDeclaration, {
62
62
  "const": true,
63
63
  name: "tmpdir",
64
- initializer: code`tmpdir(); `
64
+ initializer: code`os.tmpdir(); `
65
65
  }),
66
66
  createIntrinsic("hbr", {}),
67
67
  createIntrinsic("hbr", {}),
@@ -102,7 +102,6 @@ function NodeJsEnvBuiltin(props) {
102
102
  "export": true,
103
103
  "const": true,
104
104
  name: "paths",
105
- type: "EnvPaths",
106
105
  get initializer() {
107
106
  return code`isMacOS
108
107
  ? {
@@ -167,7 +166,7 @@ function NodeJsEnvBuiltin(props) {
167
166
  : (env.DEVENV_RUNTIME || env.XDG_RUNTIME_DIR
168
167
  ? join((env.DEVENV_RUNTIME || env.XDG_RUNTIME_DIR)!, "${kebabCase(context.config.organization)}", "${kebabCase(context.config.name)}")
169
168
  : join(tmpdir, basename(homedir), "${kebabCase(context.config.organization)}", "${kebabCase(context.config.name)}"))
170
- } as StormEnvPaths; `;
169
+ } as EnvPaths; `;
171
170
  }
172
171
  }),
173
172
  createIntrinsic("hbr", {}),
@@ -15,6 +15,6 @@ interface TypescriptFileImportItem {
15
15
  alias?: string;
16
16
  type?: boolean;
17
17
  }
18
- type TypescriptFileImports = Record<string, null | Array<TypescriptFileImportItem | string>>;
18
+ type TypescriptFileImports = Record<string, null | string | Array<TypescriptFileImportItem | string>>;
19
19
  //#endregion
20
20
  export { ComponentProps, TypescriptFileImportItem, TypescriptFileImports };
@@ -15,6 +15,6 @@ interface TypescriptFileImportItem {
15
15
  alias?: string;
16
16
  type?: boolean;
17
17
  }
18
- type TypescriptFileImports = Record<string, null | Array<TypescriptFileImportItem | string>>;
18
+ type TypescriptFileImports = Record<string, null | string | Array<TypescriptFileImportItem | string>>;
19
19
  //#endregion
20
20
  export { ComponentProps, TypescriptFileImportItem, TypescriptFileImports };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-nodejs",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for building a Node.js application.",
6
6
  "repository": {
@@ -133,19 +133,19 @@
133
133
  "dependencies": {
134
134
  "@alloy-js/core": "^0.22.0",
135
135
  "@alloy-js/typescript": "^0.22.0",
136
- "@powerlines/plugin-alloy": "^0.18.12",
137
- "@powerlines/plugin-babel": "^0.12.139",
138
- "@powerlines/plugin-env": "^0.15.15",
136
+ "@powerlines/plugin-alloy": "^0.18.13",
137
+ "@powerlines/plugin-babel": "^0.12.140",
138
+ "@powerlines/plugin-env": "^0.15.16",
139
139
  "@storm-software/config-tools": "^1.188.75",
140
140
  "@stryke/string-format": "^0.12.30",
141
141
  "defu": "^6.1.4",
142
- "powerlines": "^0.37.4"
142
+ "powerlines": "^0.37.5"
143
143
  },
144
144
  "devDependencies": {
145
145
  "@babel/core": "^7.28.5",
146
- "@powerlines/plugin-plugin": "^0.12.82",
146
+ "@powerlines/plugin-plugin": "^0.12.83",
147
147
  "@types/node": "^24.10.4"
148
148
  },
149
149
  "publishConfig": { "access": "public" },
150
- "gitHead": "48a35579bd5535a267a420c160c273899920b2e7"
150
+ "gitHead": "cde0a30e0b06424661720ed40b29ae6f67a9ebcc"
151
151
  }