@powerlines/plugin-nodejs 0.1.432 → 0.1.434
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-builtin.d.cts +1 -2
- package/dist/components/env-builtin.d.cts.map +1 -1
- package/dist/components/env-builtin.d.mts +1 -2
- package/dist/components/env-builtin.d.mts.map +1 -1
- package/dist/components/env-builtin.mjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- 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 +8 -8
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
2
1
|
import { EnvBuiltinProps } from "@powerlines/plugin-env/components/env-builtin";
|
|
3
2
|
|
|
4
3
|
//#region src/components/env-builtin.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Generates the NodeJs environment configuration module for the Powerlines project.
|
|
7
6
|
*/
|
|
8
|
-
declare function NodeJsEnvBuiltin(props: EnvBuiltinProps):
|
|
7
|
+
declare function NodeJsEnvBuiltin(props: EnvBuiltinProps): import("@alloy-js/core").Children;
|
|
9
8
|
//#endregion
|
|
10
9
|
export { NodeJsEnvBuiltin };
|
|
11
10
|
//# sourceMappingURL=env-builtin.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-builtin.d.cts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"env-builtin.d.cts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":";;;;;AAsCA;iBAAgB,gBAAA,CAAiB,KAAA,EAAO,eAAe,4BAAA,QAAA"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
2
1
|
import { EnvBuiltinProps } from "@powerlines/plugin-env/components/env-builtin";
|
|
3
2
|
|
|
4
3
|
//#region src/components/env-builtin.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Generates the NodeJs environment configuration module for the Powerlines project.
|
|
7
6
|
*/
|
|
8
|
-
declare function NodeJsEnvBuiltin(props: EnvBuiltinProps):
|
|
7
|
+
declare function NodeJsEnvBuiltin(props: EnvBuiltinProps): import("@alloy-js/core").Children;
|
|
9
8
|
//#endregion
|
|
10
9
|
export { NodeJsEnvBuiltin };
|
|
11
10
|
//# sourceMappingURL=env-builtin.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-builtin.d.mts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"env-builtin.d.mts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":";;;;;AAsCA;iBAAgB,gBAAA,CAAiB,KAAA,EAAO,eAAe,4BAAA,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-builtin.mjs","names":[],"sources":["../../src/components/env-builtin.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 { code, Show, splitProps } from \"@alloy-js/core\";\nimport { TypeDeclaration, VarDeclaration } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport {\n TSDoc,\n TSDocRemarks\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport {\n EnvBuiltin,\n EnvBuiltinProps\n} from \"@powerlines/plugin-env/components/env-builtin\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport defu from \"defu\";\nimport { NodeJsPluginContext } from \"../types\";\n\n/**\n * Generates the NodeJs environment configuration module for the Powerlines project.\n */\nexport function NodeJsEnvBuiltin(props: EnvBuiltinProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n const context = usePowerlines<NodeJsPluginContext>();\n\n return (\n <EnvBuiltin\n defaultConfig={code`process.env`}\n {...rest}\n imports={defu(\n {\n \"node:os\": \"os\",\n \"node:path\": [\"basename\", \"join\"]\n },\n rest.imports ?? {}\n )}>\n <VarDeclaration\n export\n const\n name=\"isWindows\"\n doc=\"An indicator specifying whether the current operating system is MacOS (darwin kernel).\"\n initializer={code`/^win/i.test(process.platform); `}\n />\n <Spacing />\n <VarDeclaration\n export\n const\n name=\"isLinux\"\n doc=\"An indicator specifying whether the current operating system is Linux.\"\n initializer={code`/^linux/i.test(process.platform); `}\n />\n <Spacing />\n <VarDeclaration\n export\n const\n name=\"isMacOS\"\n doc=\"An indicator specifying whether the current operating system is MacOS (darwin kernel).\"\n initializer={code`/^darwin/i.test(process.platform); `}\n />\n <Spacing />\n <VarDeclaration const name=\"homedir\" initializer={code`os.homedir(); `} />\n <Spacing />\n <VarDeclaration const name=\"tmpdir\" initializer={code`os.tmpdir(); `} />\n <Spacing />\n <TSDoc heading=\"The environment path types for storing things like data, config, logs, and cache in the current runtime environment.\">\n <TSDocRemarks>\n {`These environment path types are accessed in the {@link EnvPaths} type. `}\n </TSDocRemarks>\n </TSDoc>\n <TypeDeclaration export name=\"EnvPathType\">\n {code`\"data\" | \"config\" | \"cache\" | \"log\" | \"temp\"; `}\n </TypeDeclaration>\n <Spacing />\n <TSDoc heading=\"The environment paths for storing things like data, config, logs, and cache in the current runtime environment.\" />\n <TypeDeclaration export name=\"EnvPaths\">\n {code`Record<EnvPathType, string>; `}\n </TypeDeclaration>\n <Spacing />\n <TSDoc heading=\"The resolved application directories based on the current operating system and environment variables.\">\n <TSDocRemarks>\n {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):\n - **Linux**: directories are generally created in \\`~/.config/<name>\\` (this is determined via the [XDG Base Directory spec](https://specifications.freedesktop.org/basedir-spec/latest/))\n - **Windows**: directories are generally created in \\`%AppData%/<name>\\`\n - **MacOS**: directories are generally created in \\`~/Library/Application Support/<name>\\`\n `}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n export\n const\n name=\"paths\"\n initializer={code`isMacOS\n ? {\n data: env.DATA_DIR\n ? join(String(env.DATA_DIR), \"${titleCase(\n context.config.name\n )}\")\n : join(homedir, \"Library\", \"Application Support\", \"${titleCase(\n context.config.organization\n )}\", \"${titleCase(context.config.name)}\"),\n config: env.CONFIG_DIR\n ? join(String(env.CONFIG_DIR), \"${titleCase(\n context.config.name\n )}\")\n : join(homedir, \"Library\", \"Preferences\", \"${titleCase(\n context.config.organization\n )}\", \"${titleCase(context.config.name)}\"),\n cache: env.CACHE_DIR\n ? join(String(env.CACHE_DIR), \"${titleCase(\n context.config.name\n )}\")\n : join(homedir, \"Library\", \"Caches\", \"${titleCase(\n context.config.organization\n )}\", \"${titleCase(context.config.name)}\"),\n log: env.LOG_DIR\n ? join(String(env.LOG_DIR), \"${titleCase(context.config.name)}\")\n : join(homedir, \"Library\", \"Logs\", \"${titleCase(\n context.config.organization\n )}\", \"${titleCase(context.config.name)}\"),\n temp: env.TEMP_DIR\n ? join(String(env.TEMP_DIR), \"${titleCase(\n context.config.name\n )}\")\n : join(tmpdir, \"${titleCase(\n context.config.organization\n )}\", \"${titleCase(context.config.name)}\")\n }\n : isWindows\n ? {\n data: env.DATA_DIR\n ? join(String(env.DATA_DIR), \"${titleCase(context.config.name)}\")\n : join(env.LOCALAPPDATA || join(homedir, \"AppData\", \"Local\"), \"${titleCase(context.config.organization)}\", \"${titleCase(\n context.config.name\n )}\", \"Data\"),\n config: env.CONFIG_DIR\n ? join(env.CONFIG_DIR!, \"${titleCase(context.config.name)}\")\n : join(env.APPDATA || join(homedir, \"AppData\", \"Roaming\"), \"${titleCase(context.config.organization)}\", \"${titleCase(\n context.config.name\n )}\", \"Config\"),\n cache: env.CACHE_DIR\n ? join(String(env.CACHE_DIR), \"${titleCase(context.config.name)}\")\n : join(env.LOCALAPPDATA || join(homedir, \"AppData\", \"Local\"), \"Cache\", \"${titleCase(context.config.organization)}\", \"${titleCase(\n context.config.name\n )}\"),\n log: env.LOG_DIR\n ? join(String(env.LOG_DIR), \"${titleCase(context.config.name)}\")\n : join(env.LOCALAPPDATA || join(homedir, \"AppData\", \"Local\"), \"${titleCase(context.config.organization)}\", \"${titleCase(\n context.config.name\n )}\", \"Log\"),\n temp: env.TEMP_DIR\n ? join(String(env.TEMP_DIR), \"${titleCase(context.config.name)}\")\n : join(tmpdir, \"${titleCase(context.config.organization)}\", \"${titleCase(context.config.name)}\")\n }\n :\n {\n data: env.DATA_DIR\n ? join(String(env.DATA_DIR), \"${kebabCase(context.config.name)}\")\n : join(\n env.XDG_DATA_HOME || join(homedir, \".local\", \"share\"),\n \"${kebabCase(context.config.organization)}\",\n \"${kebabCase(context.config.name)}\"\n ),\n config: env.CONFIG_DIR\n ? join(String(env.CONFIG_DIR), \"${kebabCase(context.config.name)}\")\n : join(\n env.XDG_CONFIG_HOME || join(homedir, \".config\"),\n \"${kebabCase(context.config.organization)}\",\n \"${kebabCase(context.config.name)}\"\n ),\n cache: env.CACHE_DIR\n ? join(String(env.CACHE_DIR), \"${kebabCase(context.config.name)}\")\n : join(env.XDG_CACHE_HOME || join(homedir, \".cache\"), \"${kebabCase(context.config.organization)}\", \"${kebabCase(\n context.config.name\n )}\"),\n log: env.LOG_DIR\n ? join(String(env.LOG_DIR), \"${kebabCase(context.config.name)}\")\n : join(env.XDG_STATE_HOME || join(homedir, \".local\", \"state\"), \"${kebabCase(context.config.organization)}\", \"${kebabCase(\n context.config.name\n )}\"),\n temp: env.TEMP_DIR\n ? join(String(env.TEMP_DIR), \"${kebabCase(context.config.name)}\")\n : (env.DEVENV_RUNTIME || env.XDG_RUNTIME_DIR\n ? join((env.DEVENV_RUNTIME || env.XDG_RUNTIME_DIR)!, \"${kebabCase(context.config.organization)}\", \"${kebabCase(\n context.config.name\n )}\")\n : join(tmpdir, basename(homedir), \"${kebabCase(context.config.organization)}\", \"${kebabCase(context.config.name)}\"))\n } as EnvPaths; `}\n />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </EnvBuiltin>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiCA,SAAS,iBAAsB,OAAS;UAEtC,YACC,QAAU,WAAW,OAAA,CAAA,WAAY,CAAA;CAClC,MAAA,UAAA,eAAA;AACF,QAAO,gBAAS,YAAuB,WAAC,EACtC,eAAiB,IAAI;EAErB,IAAM,UAAU;;IAEV,WAAC;IACJ,aAAA,CAAA,YAAA,OAAA;IACC,EAAA,KAAA,WAAmB,EAAC,CAAA;;EAEtB,IAAE,WAAa;AACb,UAAE;IAAA,gBAAA,gBAAA;KACA,UAAU;KACV,SAAQ;KACR,MAAC;KACD,KAAK;KACL,aAAA,IAAA;KACD,CAAA;IAAA,gBAAA,SAAA,EAAA,CAAA;IAAA,gBAAA,gBAAA;KACC,UAAA;KACA,SAAA;KACA,MAAM;KACN,KAAK;KACL,aAAa,IAAI;KAClB,CAAA;IAAA,gBAAA,SAAA,EAAA,CAAA;IAAA,gBAAA,gBAAA;KACA,UAAS;KACT,SAAA;KACC,MAAA;KACA,KAAA;KACA,aAAa,IAAA;KACd,CAAC;IAAA,gBAAkB,SAAW,EAAA,CAAA;IAAA,gBAAoB,gBAAmB;KACpE,SAAA;KACD,MAAA;KACA,aAAS,I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,MAAC,UAAc,QAAA,OAAA,KAAA,CAAA;;;KAGxG,CAAC;IAAE,gBAAE,SAAA,EAAA,CAAA;IAAA,gBAAA,MAAA;KACJ,IAAI,OAAO;AACT,aAAO,QAAM,SAAW;;KAEhB;KACX,CAAC;IAAC;;EAEN,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"env-builtin.mjs","names":[],"sources":["../../src/components/env-builtin.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 { code, Show, splitProps } from \"@alloy-js/core\";\nimport { TypeDeclaration, VarDeclaration } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport {\n TSDoc,\n TSDocRemarks\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport {\n EnvBuiltin,\n EnvBuiltinProps\n} from \"@powerlines/plugin-env/components/env-builtin\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport defu from \"defu\";\nimport { NodeJsPluginContext } from \"../types\";\n\n/**\n * Generates the NodeJs environment configuration module for the Powerlines project.\n */\nexport function NodeJsEnvBuiltin(props: EnvBuiltinProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n const context = usePowerlines<NodeJsPluginContext>();\n\n return (\n <EnvBuiltin\n defaultConfig={code`process.env`}\n {...rest}\n imports={defu(\n {\n \"node:os\": \"os\",\n \"node:path\": [\"basename\", \"join\"]\n },\n rest.imports ?? {}\n )}>\n <VarDeclaration\n export\n const\n name=\"isWindows\"\n doc=\"An indicator specifying whether the current operating system is MacOS (darwin kernel).\"\n initializer={code`/^win/i.test(process.platform); `}\n />\n <Spacing />\n <VarDeclaration\n export\n const\n name=\"isLinux\"\n doc=\"An indicator specifying whether the current operating system is Linux.\"\n initializer={code`/^linux/i.test(process.platform); `}\n />\n <Spacing />\n <VarDeclaration\n export\n const\n name=\"isMacOS\"\n doc=\"An indicator specifying whether the current operating system is MacOS (darwin kernel).\"\n initializer={code`/^darwin/i.test(process.platform); `}\n />\n <Spacing />\n <VarDeclaration const name=\"homedir\" initializer={code`os.homedir(); `} />\n <Spacing />\n <VarDeclaration const name=\"tmpdir\" initializer={code`os.tmpdir(); `} />\n <Spacing />\n <TSDoc heading=\"The environment path types for storing things like data, config, logs, and cache in the current runtime environment.\">\n <TSDocRemarks>\n {`These environment path types are accessed in the {@link EnvPaths} type. `}\n </TSDocRemarks>\n </TSDoc>\n <TypeDeclaration export name=\"EnvPathType\">\n {code`\"data\" | \"config\" | \"cache\" | \"log\" | \"temp\"; `}\n </TypeDeclaration>\n <Spacing />\n <TSDoc heading=\"The environment paths for storing things like data, config, logs, and cache in the current runtime environment.\" />\n <TypeDeclaration export name=\"EnvPaths\">\n {code`Record<EnvPathType, string>; `}\n </TypeDeclaration>\n <Spacing />\n <TSDoc heading=\"The resolved application directories based on the current operating system and environment variables.\">\n <TSDocRemarks>\n {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):\n - **Linux**: directories are generally created in \\`~/.config/<name>\\` (this is determined via the [XDG Base Directory spec](https://specifications.freedesktop.org/basedir-spec/latest/))\n - **Windows**: directories are generally created in \\`%AppData%/<name>\\`\n - **MacOS**: directories are generally created in \\`~/Library/Application Support/<name>\\`\n `}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n export\n const\n name=\"paths\"\n initializer={code`isMacOS\n ? {\n data: env.DATA_DIR\n ? join(String(env.DATA_DIR), \"${titleCase(\n context.config.name\n )}\")\n : join(homedir, \"Library\", \"Application Support\", \"${titleCase(\n context.config.organization\n )}\", \"${titleCase(context.config.name)}\"),\n config: env.CONFIG_DIR\n ? join(String(env.CONFIG_DIR), \"${titleCase(\n context.config.name\n )}\")\n : join(homedir, \"Library\", \"Preferences\", \"${titleCase(\n context.config.organization\n )}\", \"${titleCase(context.config.name)}\"),\n cache: env.CACHE_DIR\n ? join(String(env.CACHE_DIR), \"${titleCase(\n context.config.name\n )}\")\n : join(homedir, \"Library\", \"Caches\", \"${titleCase(\n context.config.organization\n )}\", \"${titleCase(context.config.name)}\"),\n log: env.LOG_DIR\n ? join(String(env.LOG_DIR), \"${titleCase(context.config.name)}\")\n : join(homedir, \"Library\", \"Logs\", \"${titleCase(\n context.config.organization\n )}\", \"${titleCase(context.config.name)}\"),\n temp: env.TEMP_DIR\n ? join(String(env.TEMP_DIR), \"${titleCase(\n context.config.name\n )}\")\n : join(tmpdir, \"${titleCase(\n context.config.organization\n )}\", \"${titleCase(context.config.name)}\")\n }\n : isWindows\n ? {\n data: env.DATA_DIR\n ? join(String(env.DATA_DIR), \"${titleCase(context.config.name)}\")\n : join(env.LOCALAPPDATA || join(homedir, \"AppData\", \"Local\"), \"${titleCase(context.config.organization)}\", \"${titleCase(\n context.config.name\n )}\", \"Data\"),\n config: env.CONFIG_DIR\n ? join(env.CONFIG_DIR!, \"${titleCase(context.config.name)}\")\n : join(env.APPDATA || join(homedir, \"AppData\", \"Roaming\"), \"${titleCase(context.config.organization)}\", \"${titleCase(\n context.config.name\n )}\", \"Config\"),\n cache: env.CACHE_DIR\n ? join(String(env.CACHE_DIR), \"${titleCase(context.config.name)}\")\n : join(env.LOCALAPPDATA || join(homedir, \"AppData\", \"Local\"), \"Cache\", \"${titleCase(context.config.organization)}\", \"${titleCase(\n context.config.name\n )}\"),\n log: env.LOG_DIR\n ? join(String(env.LOG_DIR), \"${titleCase(context.config.name)}\")\n : join(env.LOCALAPPDATA || join(homedir, \"AppData\", \"Local\"), \"${titleCase(context.config.organization)}\", \"${titleCase(\n context.config.name\n )}\", \"Log\"),\n temp: env.TEMP_DIR\n ? join(String(env.TEMP_DIR), \"${titleCase(context.config.name)}\")\n : join(tmpdir, \"${titleCase(context.config.organization)}\", \"${titleCase(context.config.name)}\")\n }\n :\n {\n data: env.DATA_DIR\n ? join(String(env.DATA_DIR), \"${kebabCase(context.config.name)}\")\n : join(\n env.XDG_DATA_HOME || join(homedir, \".local\", \"share\"),\n \"${kebabCase(context.config.organization)}\",\n \"${kebabCase(context.config.name)}\"\n ),\n config: env.CONFIG_DIR\n ? join(String(env.CONFIG_DIR), \"${kebabCase(context.config.name)}\")\n : join(\n env.XDG_CONFIG_HOME || join(homedir, \".config\"),\n \"${kebabCase(context.config.organization)}\",\n \"${kebabCase(context.config.name)}\"\n ),\n cache: env.CACHE_DIR\n ? join(String(env.CACHE_DIR), \"${kebabCase(context.config.name)}\")\n : join(env.XDG_CACHE_HOME || join(homedir, \".cache\"), \"${kebabCase(context.config.organization)}\", \"${kebabCase(\n context.config.name\n )}\"),\n log: env.LOG_DIR\n ? join(String(env.LOG_DIR), \"${kebabCase(context.config.name)}\")\n : join(env.XDG_STATE_HOME || join(homedir, \".local\", \"state\"), \"${kebabCase(context.config.organization)}\", \"${kebabCase(\n context.config.name\n )}\"),\n temp: env.TEMP_DIR\n ? join(String(env.TEMP_DIR), \"${kebabCase(context.config.name)}\")\n : (env.DEVENV_RUNTIME || env.XDG_RUNTIME_DIR\n ? join((env.DEVENV_RUNTIME || env.XDG_RUNTIME_DIR)!, \"${kebabCase(context.config.organization)}\", \"${kebabCase(\n context.config.name\n )}\")\n : join(tmpdir, basename(homedir), \"${kebabCase(context.config.organization)}\", \"${kebabCase(context.config.name)}\"))\n } as EnvPaths; `}\n />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </EnvBuiltin>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiCA,SAAS,iBAAsB,OAAS;UAEtC,YACC,QAAU,WAAW,OAAA,CAAA,UAAY,CAAA;CAClC,MAAA,UAAA,cAAA;CACF,OAAO,gBAAS,YAAuB,WAAC,EACtC,eAAiB,IAAI;EAErB,IAAM,UAAU;;IAEV,WAAC;IACJ,aAAA,CAAA,YAAA,MAAA;GACC,GAAA,KAAA,WAAmB,CAAC,CAAA;EACtB;EACA,IAAE,WAAa;GACb,OAAE;IAAA,gBAAA,gBAAA;KACA,UAAU;KACV,SAAQ;KACR,MAAC;KACD,KAAK;KACL,aAAA,IAAA;IACF,CAAC;IAAA,gBAAA,SAAA,CAAA,CAAA;IAAA,gBAAA,gBAAA;KACC,UAAA;KACA,SAAA;KACA,MAAM;KACN,KAAK;KACL,aAAa,IAAI;IACnB,CAAC;IAAA,gBAAA,SAAA,CAAA,CAAA;IAAA,gBAAA,gBAAA;KACA,UAAS;KACT,SAAA;KACC,MAAA;KACA,KAAA;KACA,aAAa,IAAA;IACf,CAAC;IAAC,gBAAkB,SAAW,CAAA,CAAA;IAAA,gBAAoB,gBAAmB;KACpE,SAAA;KACD,MAAA;KACA,aAAS,IAAA;IACV,CAAC;IAAA,gBAAA,SAAA,CAAA,CAAA;IAAA,gBAAA,gBAAA;KACC,SAAA;KACA,MAAA;KACA,aAAa,IAAA;IACf,CAAC;IAAC,gBAAkB,SAAW,CAAA,CAAA;IAAA,gBAAoB,OAAU;KAC3D,SAAA;KACD,IAAA,WAAA;MACA,OAAS,gBAAA,cAAA,EACT,UAAe,2EACf,CAAA;KACA;IACD,CAAC;IAAA,gBAAS,iBAAA;KACT,UAAM;KACL,MAAC;KACD,UAAU,IAAA;IACZ,CAAC;IAAG,gBAAY,SAAA,CAAA,CAAA;IAAA,gBAAA,OAAA,EACd,SAAK,kHACP,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["../src/index.tsx"],"mappings":";;;;;YA4BY,MAAA;IACR,MAAA,GAAS,mBAAmB;EAAA;AAAA;;;;cAOnB,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"],"mappings":";;;;;YA4BY,MAAA;IACR,MAAA,GAAS,
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;YA4BY,MAAA;IACR,MAAA,GAAS,mBAAmB;EAAA;AAAA;;;;cAOnB,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs.map
CHANGED
|
@@ -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 { 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,
|
|
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,CAAA,MAAA;CACF,OAAA;EAAA,MAAA,QAAA,KAAA;EAAA,IAAA,QAAA,GAAA;EAAA;;GAEE,iBAAA;IACG,KAAA,gBAAqB,iBAAkB;IAC1C,KAAA,SAAA,aAAA,oBAAA,CAAA;IACI,KAAC,SAAa,aAAE,gBAAA,UAAA,CAAA;IACpB,IAAQ,CAAC,aAAQ,QAAA,KAAA,SAAsB,aAAA,gBAAA,KAAA,GACxC,KAAA,SAAA,aAAA,gBAAA,MAAA,KAAA,MAAA;GAEE;GACD,MAAO,UAAA;IACL,MAAM,SAAQ;IACd,MAAI,SAAY,MAAA,sBAAA,MAAA,KAAA;IAChB,OAAA,OAAA,MAAA,gBAAA,kBAAA;KACE,IAAM,gBAAQ;MACd,OAAA,OAAiB,OAAA,IAAA;KACf;;IAEF,CAAC,CAAC;GACJ;EACF;CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,mBAAmB;AAAA,KAE5C,0BAAA,GAA6B,uBAAuB;AAAA,KAEpD,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"],"mappings":";;;;UA0BiB,mBAAA;;AAAjB;;EAIE,KAAA,GAAQ,OAAA,CAAQ,kBAAA;EAAA;;;EAKhB,GAAA,GAAM,OAAA,CAAQ,IAAA,CAAK,gBAAA;AAAA;AAAA,KAGT,sBAAA,GAAyB,
|
|
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,mBAAmB;AAAA,KAE5C,0BAAA,GAA6B,uBAAuB;AAAA,KAEpD,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.434",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for building a Node.js application.",
|
|
6
6
|
"repository": {
|
|
@@ -66,17 +66,17 @@
|
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@alloy-js/core": "^0.23.1",
|
|
68
68
|
"@alloy-js/typescript": "^0.23.0",
|
|
69
|
-
"@powerlines/plugin-alloy": "^0.26.
|
|
70
|
-
"@powerlines/plugin-babel": "^0.13.
|
|
71
|
-
"@powerlines/plugin-env": "^0.16.
|
|
72
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
69
|
+
"@powerlines/plugin-alloy": "^0.26.125",
|
|
70
|
+
"@powerlines/plugin-babel": "^0.13.38",
|
|
71
|
+
"@powerlines/plugin-env": "^0.16.233",
|
|
72
|
+
"@powerlines/plugin-plugin": "^0.12.454",
|
|
73
73
|
"@storm-software/config-tools": "^1.190.20",
|
|
74
74
|
"@stryke/string-format": "^0.17.18",
|
|
75
75
|
"defu": "^6.1.7",
|
|
76
|
-
"powerlines": "^0.47.
|
|
76
|
+
"powerlines": "^0.47.42"
|
|
77
77
|
},
|
|
78
|
-
"devDependencies": { "@types/node": "^25.
|
|
78
|
+
"devDependencies": { "@types/node": "^25.9.0" },
|
|
79
79
|
"publishConfig": { "access": "public" },
|
|
80
80
|
"types": "./dist/index.d.cts",
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "2dbbdb2f6fde8f0f49208757c7c1b18deb96ff97"
|
|
82
82
|
}
|