@powerlines/plugin-env 0.15.1 → 0.15.3

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.
@@ -193,7 +193,7 @@ const envSerializerRefkey = require_refkey.refkey("EnvSerializer");
193
193
  * Generates the environment configuration module for the Powerlines project.
194
194
  */
195
195
  function EnvBuiltin(props) {
196
- const [{ defaultConfig }, rest] = (0, __alloy_js_core.splitProps)(props, ["defaultConfig"]);
196
+ const [{ defaultConfig, children }, rest] = (0, __alloy_js_core.splitProps)(props, ["defaultConfig", "children"]);
197
197
  const context = require_context.usePowerlines();
198
198
  const defaultValue = (0, __alloy_js_core.computed)(() => context && require_load.loadEnvFromContext(context, process.env));
199
199
  const reflection = require_create_reflection_resource.createReflectionResource(context);
@@ -206,9 +206,10 @@ function EnvBuiltin(props) {
206
206
  });
207
207
  const reflectionGetProperties = (0, __alloy_js_core.computed)(() => reflection.data?.getProperties().filter((property) => !property.isIgnored()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())) ?? []);
208
208
  const reflectionSetProperties = (0, __alloy_js_core.computed)(() => reflection.data?.getProperties().filter((property) => !property.isIgnored() && !property.isReadonly()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())) ?? []);
209
- return (0, __alloy_js_core_jsx_runtime.createComponent)(require_builtin_file.BuiltinFile, (0, __alloy_js_core_jsx_runtime.mergeProps)(rest, {
209
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(require_builtin_file.BuiltinFile, (0, __alloy_js_core_jsx_runtime.mergeProps)({
210
210
  id: "env",
211
- description: "The Powerlines environment configuration module provides an interface to define environment configuration parameters.",
211
+ description: "The Powerlines environment configuration module provides an interface to define environment configuration parameters."
212
+ }, rest, {
212
213
  get imports() {
213
214
  return (0, defu.default)({
214
215
  "@powerlines/deepkit/vendor/type": [
@@ -557,7 +558,13 @@ function EnvBuiltin(props) {
557
558
  initializer: __alloy_js_core.code`Boolean(isDevelopment && env.DEBUG); `
558
559
  }),
559
560
  (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
560
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
561
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
562
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
563
+ get when() {
564
+ return Boolean(children);
565
+ },
566
+ children
567
+ })
561
568
  ];
562
569
  }
563
570
  }));
@@ -191,7 +191,7 @@ const envSerializerRefkey = refkey$1("EnvSerializer");
191
191
  * Generates the environment configuration module for the Powerlines project.
192
192
  */
193
193
  function EnvBuiltin(props) {
194
- const [{ defaultConfig }, rest] = splitProps(props, ["defaultConfig"]);
194
+ const [{ defaultConfig, children }, rest] = splitProps(props, ["defaultConfig", "children"]);
195
195
  const context = usePowerlines();
196
196
  const defaultValue = computed(() => context && loadEnvFromContext(context, process.env));
197
197
  const reflection = createReflectionResource(context);
@@ -204,9 +204,10 @@ function EnvBuiltin(props) {
204
204
  });
205
205
  const reflectionGetProperties = computed(() => reflection.data?.getProperties().filter((property) => !property.isIgnored()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())) ?? []);
206
206
  const reflectionSetProperties = computed(() => reflection.data?.getProperties().filter((property) => !property.isIgnored() && !property.isReadonly()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())) ?? []);
207
- return createComponent(BuiltinFile, mergeProps(rest, {
207
+ return createComponent(BuiltinFile, mergeProps({
208
208
  id: "env",
209
- description: "The Powerlines environment configuration module provides an interface to define environment configuration parameters.",
209
+ description: "The Powerlines environment configuration module provides an interface to define environment configuration parameters."
210
+ }, rest, {
210
211
  get imports() {
211
212
  return defu({
212
213
  "@powerlines/deepkit/vendor/type": [
@@ -555,7 +556,13 @@ function EnvBuiltin(props) {
555
556
  initializer: code`Boolean(isDevelopment && env.DEBUG); `
556
557
  }),
557
558
  createIntrinsic("hbr", {}),
558
- createIntrinsic("hbr", {})
559
+ createIntrinsic("hbr", {}),
560
+ createComponent(Show, {
561
+ get when() {
562
+ return Boolean(children);
563
+ },
564
+ children
565
+ })
559
566
  ];
560
567
  }
561
568
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-env",
3
- "version": "0.15.1",
3
+ "version": "0.15.3",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for injecting static .env configuration values to the code so that they're accessible at runtime.",
6
6
  "repository": {
@@ -193,8 +193,8 @@
193
193
  "@alloy-js/json": "^0.22.0",
194
194
  "@babel/core": "^7.28.5",
195
195
  "@babel/types": "^7.28.5",
196
- "@powerlines/deepkit": "^0.5.36",
197
- "@powerlines/plugin-alloy": "^0.18.0",
196
+ "@powerlines/deepkit": "^0.5.37",
197
+ "@powerlines/plugin-alloy": "^0.18.1",
198
198
  "@powerlines/plugin-automd": "^0.1.121",
199
199
  "@powerlines/plugin-babel": "^0.12.130",
200
200
  "@powerlines/plugin-plugin": "^0.12.73",
@@ -211,5 +211,5 @@
211
211
  },
212
212
  "devDependencies": { "@types/node": "^24.10.4", "vite": "8.0.0-beta.2" },
213
213
  "publishConfig": { "access": "public" },
214
- "gitHead": "b9a0574767447bffa6549e0492812dfe64e879e3"
214
+ "gitHead": "9e66d0e1d9210071bcabcd4e4dc04ad4d2bbfe15"
215
215
  }