@powerlines/plugin-nodejs 0.1.10 → 0.1.12
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/components/env.cjs +4 -5
- package/dist/components/env.mjs +4 -5
- package/dist/plugin-alloy/src/types/components.d.cts +1 -1
- package/dist/plugin-alloy/src/types/components.d.mts +1 -1
- package/dist/powerlines/src/types/context.d.cts +2 -11
- package/dist/powerlines/src/types/context.d.mts +2 -11
- package/package.json +7 -7
package/dist/components/env.cjs
CHANGED
|
@@ -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":
|
|
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
|
|
171
|
+
} as EnvPaths; `;
|
|
173
172
|
}
|
|
174
173
|
}),
|
|
175
174
|
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
package/dist/components/env.mjs
CHANGED
|
@@ -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":
|
|
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
|
|
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 };
|
|
@@ -22,13 +22,6 @@ import { ExternalIdResult, UnpluginBuildContext, UnpluginContext, UnpluginMessag
|
|
|
22
22
|
* The severity level of a log message.
|
|
23
23
|
*/
|
|
24
24
|
type LogLevel = "debug" | "info" | "warning" | "error" | "fatal";
|
|
25
|
-
declare const LogLevel: {
|
|
26
|
-
DEBUG: LogLevel;
|
|
27
|
-
INFO: LogLevel;
|
|
28
|
-
WARNING: LogLevel;
|
|
29
|
-
ERROR: LogLevel;
|
|
30
|
-
FATAL: LogLevel;
|
|
31
|
-
};
|
|
32
25
|
interface MetaInfo {
|
|
33
26
|
/**
|
|
34
27
|
* The checksum generated from the resolved options
|
|
@@ -337,19 +330,17 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
337
330
|
*
|
|
338
331
|
* @param code - The source code of the builtin file
|
|
339
332
|
* @param id - The unique identifier of the builtin file
|
|
340
|
-
* @param path - An optional path to write the builtin file to
|
|
341
333
|
* @param options - Additional options for writing the builtin file
|
|
342
334
|
*/
|
|
343
|
-
emitBuiltin: (code: string, id: string,
|
|
335
|
+
emitBuiltin: (code: string, id: string, options?: EmitOptions) => Promise<void>;
|
|
344
336
|
/**
|
|
345
337
|
* Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
346
338
|
*
|
|
347
339
|
* @param code - The source code of the builtin file
|
|
348
340
|
* @param id - The unique identifier of the builtin file
|
|
349
|
-
* @param path - An optional path to write the builtin file to
|
|
350
341
|
* @param options - Additional options for writing the builtin file
|
|
351
342
|
*/
|
|
352
|
-
emitBuiltinSync: (code: string, id: string,
|
|
343
|
+
emitBuiltinSync: (code: string, id: string, options?: EmitOptions) => void;
|
|
353
344
|
/**
|
|
354
345
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
355
346
|
*
|
|
@@ -22,13 +22,6 @@ import { ExternalIdResult, UnpluginBuildContext, UnpluginContext, UnpluginMessag
|
|
|
22
22
|
* The severity level of a log message.
|
|
23
23
|
*/
|
|
24
24
|
type LogLevel = "debug" | "info" | "warning" | "error" | "fatal";
|
|
25
|
-
declare const LogLevel: {
|
|
26
|
-
DEBUG: LogLevel;
|
|
27
|
-
INFO: LogLevel;
|
|
28
|
-
WARNING: LogLevel;
|
|
29
|
-
ERROR: LogLevel;
|
|
30
|
-
FATAL: LogLevel;
|
|
31
|
-
};
|
|
32
25
|
interface MetaInfo {
|
|
33
26
|
/**
|
|
34
27
|
* The checksum generated from the resolved options
|
|
@@ -337,19 +330,17 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
337
330
|
*
|
|
338
331
|
* @param code - The source code of the builtin file
|
|
339
332
|
* @param id - The unique identifier of the builtin file
|
|
340
|
-
* @param path - An optional path to write the builtin file to
|
|
341
333
|
* @param options - Additional options for writing the builtin file
|
|
342
334
|
*/
|
|
343
|
-
emitBuiltin: (code: string, id: string,
|
|
335
|
+
emitBuiltin: (code: string, id: string, options?: EmitOptions) => Promise<void>;
|
|
344
336
|
/**
|
|
345
337
|
* Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
346
338
|
*
|
|
347
339
|
* @param code - The source code of the builtin file
|
|
348
340
|
* @param id - The unique identifier of the builtin file
|
|
349
|
-
* @param path - An optional path to write the builtin file to
|
|
350
341
|
* @param options - Additional options for writing the builtin file
|
|
351
342
|
*/
|
|
352
|
-
emitBuiltinSync: (code: string, id: string,
|
|
343
|
+
emitBuiltinSync: (code: string, id: string, options?: EmitOptions) => void;
|
|
353
344
|
/**
|
|
354
345
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
355
346
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-nodejs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
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.
|
|
137
|
-
"@powerlines/plugin-babel": "^0.12.
|
|
138
|
-
"@powerlines/plugin-env": "^0.15.
|
|
136
|
+
"@powerlines/plugin-alloy": "^0.18.14",
|
|
137
|
+
"@powerlines/plugin-babel": "^0.12.141",
|
|
138
|
+
"@powerlines/plugin-env": "^0.15.17",
|
|
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.
|
|
142
|
+
"powerlines": "^0.37.6"
|
|
143
143
|
},
|
|
144
144
|
"devDependencies": {
|
|
145
145
|
"@babel/core": "^7.28.5",
|
|
146
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
146
|
+
"@powerlines/plugin-plugin": "^0.12.84",
|
|
147
147
|
"@types/node": "^24.10.4"
|
|
148
148
|
},
|
|
149
149
|
"publishConfig": { "access": "public" },
|
|
150
|
-
"gitHead": "
|
|
150
|
+
"gitHead": "4f4e84adc19aadfea6a385968266306934c1ee08"
|
|
151
151
|
}
|