@powerlines/plugin-env 0.15.191 → 0.15.193

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.
@@ -7,6 +7,7 @@ let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
7
7
  let __alloy_js_core = require("@alloy-js/core");
8
8
  let __powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
9
9
  let __alloy_js_typescript = require("@alloy-js/typescript");
10
+ let __powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
10
11
  let __powerlines_plugin_alloy_helpers_refkey = require("@powerlines/plugin-alloy/helpers/refkey");
11
12
  let __powerlines_plugin_alloy_typescript_components_builtin_file = require("@powerlines/plugin-alloy/typescript/components/builtin-file");
12
13
  let __powerlines_plugin_alloy_typescript_components_interface_declaration = require("@powerlines/plugin-alloy/typescript/components/interface-declaration");
@@ -27,8 +28,7 @@ function EnvTypeDefinition(props) {
27
28
  reflection,
28
29
  "export": true
29
30
  }),
30
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
31
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
31
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
32
32
  (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
33
33
  heading: "The environment configuration object with prefixed keys.",
34
34
  get children() {
@@ -45,8 +45,7 @@ function EnvTypeDefinition(props) {
45
45
  `;
46
46
  }
47
47
  }),
48
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
49
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
48
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {})
50
49
  ];
51
50
  }
52
51
  function ConfigPropertyConditional(props) {
@@ -256,8 +255,7 @@ function EnvBuiltin(props) {
256
255
  "const": true,
257
256
  doc: "The initial environment configuration object values for the runtime."
258
257
  }),
259
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
260
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
258
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
261
259
  (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
262
260
  heading: "The environment configuration serializer for the Powerlines application.",
263
261
  get children() {
@@ -293,8 +291,7 @@ function EnvBuiltin(props) {
293
291
  });
294
292
  }
295
293
  }),
296
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
297
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
294
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
298
295
  (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
299
296
  heading: "A {@link EnvSerializer | environment configuration serializer} instance for the Powerlines application.",
300
297
  get children() {
@@ -316,8 +313,7 @@ function EnvBuiltin(props) {
316
313
  });
317
314
  }
318
315
  }),
319
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
320
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
316
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
321
317
  (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
322
318
  heading: "Serialize a environment configuration object to JSON data objects (not a JSON string).",
323
319
  get children() {
@@ -334,8 +330,7 @@ function EnvBuiltin(props) {
334
330
  "const": true,
335
331
  initializer: "serializeFunction<EnvBase>(envSerializer)"
336
332
  }),
337
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
338
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
333
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
339
334
  (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
340
335
  heading: "Deserialize a environment configuration object from JSON data objects to JavaScript objects, without running any validators.",
341
336
  get children() {
@@ -352,8 +347,7 @@ function EnvBuiltin(props) {
352
347
  "const": true,
353
348
  initializer: "deserializeFunction<EnvBase>(envSerializer)"
354
349
  }),
355
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
356
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
350
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
357
351
  (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
358
352
  heading: "Initializes the Powerlines environment configuration module.",
359
353
  get children() {
@@ -406,8 +400,7 @@ function EnvBuiltin(props) {
406
400
  __alloy_js_core.code`
407
401
  return undefined;
408
402
  }, `,
409
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
410
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
403
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
411
404
  __alloy_js_core.code` set: (target: EnvBase, propertyName: string, newValue: any) => { `,
412
405
  (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
413
406
  (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
@@ -430,8 +423,7 @@ function EnvBuiltin(props) {
430
423
  });
431
424
  }
432
425
  }),
433
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
434
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
426
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
435
427
  (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
436
428
  (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
437
429
  heading: "The environment configuration object.",
@@ -449,8 +441,7 @@ function EnvBuiltin(props) {
449
441
  return [__alloy_js_core.code`createEnv(${defaultConfig || "{}"} as Partial<Env>);`];
450
442
  }
451
443
  }),
452
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
453
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
444
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
454
445
  (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
455
446
  "export": true,
456
447
  "const": true,
@@ -511,8 +502,7 @@ function EnvBuiltin(props) {
511
502
  );
512
503
  `
513
504
  }),
514
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
515
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
505
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
516
506
  (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
517
507
  heading: "Detect the \\`mode\\` of the current runtime environment.",
518
508
  get children() {
@@ -529,8 +519,7 @@ function EnvBuiltin(props) {
529
519
  name: "mode",
530
520
  initializer: __alloy_js_core.code`String(env.MODE) || "production"; `
531
521
  }),
532
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
533
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
522
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
534
523
  (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
535
524
  "export": true,
536
525
  "const": true,
@@ -538,8 +527,7 @@ function EnvBuiltin(props) {
538
527
  doc: "Detect if the application is running in `\"production\"` mode",
539
528
  initializer: __alloy_js_core.code`["prd", "prod", "production"].includes(mode.toLowerCase()); `
540
529
  }),
541
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
542
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
530
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
543
531
  (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
544
532
  "export": true,
545
533
  "const": true,
@@ -547,8 +535,7 @@ function EnvBuiltin(props) {
547
535
  doc: "Detect if the application is running in `\"test\"` mode",
548
536
  initializer: __alloy_js_core.code`["tst", "test", "testing", "stg", "stage", "staging"].includes(mode.toLowerCase()) || env.TEST; `
549
537
  }),
550
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
551
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
538
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
552
539
  (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
553
540
  "export": true,
554
541
  "const": true,
@@ -556,8 +543,7 @@ function EnvBuiltin(props) {
556
543
  doc: "Detect if the application is running in `\"development\"` mode",
557
544
  initializer: __alloy_js_core.code`["dev", "development"].includes(mode.toLowerCase()); `
558
545
  }),
559
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
560
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
546
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
561
547
  (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
562
548
  "export": true,
563
549
  "const": true,
@@ -565,8 +551,7 @@ function EnvBuiltin(props) {
565
551
  doc: "Detect if the application is currently being debugged",
566
552
  initializer: __alloy_js_core.code`Boolean(isDevelopment && env.DEBUG); `
567
553
  }),
568
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
569
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
554
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
570
555
  (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
571
556
  get when() {
572
557
  return Boolean(children);
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.cts","names":[],"sources":["../../src/components/env.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAoEA;AACc,iBADE,iBAAA,CACF,KAAA,EAAL,IAAK,CAAA,yBAAA,EAAA,MAAA,CAAA,CAAA,EAAkC,QAAlC;AAAL,UAqLQ,eAAA,SAAwB,IArLhC,CAqLqC,gBArLrC,EAAA,IAAA,CAAA,CAAA;EAAuC,aAAA,CAAA,EAsL9B,QAtL8B;EAAA,UAAA,EAuLlC,eAvLkC,CAAA,GAAA,CAAA;AAqLhD;;;;AAAyC,iBAYzB,UAAA,CAZyB,KAAA,EAYP,eAZO,CAAA,EAYQ,QAZR;AAAI,kCAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"env.d.cts","names":[],"sources":["../../src/components/env.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAqEA;AACc,iBADE,iBAAA,CACF,KAAA,EAAL,IAAK,CAAA,yBAAA,EAAA,MAAA,CAAA,CAAA,EAAkC,QAAlC;AAAL,UAkLQ,eAAA,SAAwB,IAlLhC,CAkLqC,gBAlLrC,EAAA,IAAA,CAAA,CAAA;EAAuC,aAAA,CAAA,EAmL9B,QAnL8B;EAAA,UAAA,EAoLlC,eApLkC,CAAA,GAAA,CAAA;AAkLhD;;;;AAAyC,iBAYzB,UAAA,CAZyB,KAAA,EAYP,eAZO,CAAA,EAYQ,QAZR;AAAI,kCAAA,GAAA,EAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.mts","names":[],"sources":["../../src/components/env.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAoEA;AACc,iBADE,iBAAA,CACF,KAAA,EAAL,IAAK,CAAA,yBAAA,EAAA,MAAA,CAAA,CAAA,EAAkC,QAAlC;AAAL,UAqLQ,eAAA,SAAwB,IArLhC,CAqLqC,gBArLrC,EAAA,IAAA,CAAA,CAAA;EAAuC,aAAA,CAAA,EAsL9B,QAtL8B;EAAA,UAAA,EAuLlC,eAvLkC,CAAA,GAAA,CAAA;AAqLhD;;;;AAAyC,iBAYzB,UAAA,CAZyB,KAAA,EAYP,eAZO,CAAA,EAYQ,QAZR;AAAI,kCAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"env.d.mts","names":[],"sources":["../../src/components/env.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAqEA;AACc,iBADE,iBAAA,CACF,KAAA,EAAL,IAAK,CAAA,yBAAA,EAAA,MAAA,CAAA,CAAA,EAAkC,QAAlC;AAAL,UAkLQ,eAAA,SAAwB,IAlLhC,CAkLqC,gBAlLrC,EAAA,IAAA,CAAA,CAAA;EAAuC,aAAA,CAAA,EAmL9B,QAnL8B;EAAA,UAAA,EAoLlC,eApLkC,CAAA,GAAA,CAAA;AAkLhD;;;;AAAyC,iBAYzB,UAAA,CAZyB,KAAA,EAYP,eAZO,CAAA,EAYQ,QAZR;AAAI,kCAAA,GAAA,EAAA"}
@@ -6,6 +6,7 @@ import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/co
6
6
  import { For, Show, code, computed, splitProps } from "@alloy-js/core";
7
7
  import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
8
8
  import { ClassDeclaration, ClassMethod, ElseIfClause, FunctionDeclaration, IfStatement, NewExpression, TypeDeclaration, VarDeclaration } from "@alloy-js/typescript";
9
+ import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
9
10
  import { refkey } from "@powerlines/plugin-alloy/helpers/refkey";
10
11
  import { BuiltinFile } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
11
12
  import { InterfaceDeclaration } from "@powerlines/plugin-alloy/typescript/components/interface-declaration";
@@ -26,8 +27,7 @@ function EnvTypeDefinition(props) {
26
27
  reflection,
27
28
  "export": true
28
29
  }),
29
- createIntrinsic("hbr", {}),
30
- createIntrinsic("hbr", {}),
30
+ createComponent(Spacing, {}),
31
31
  createComponent(TSDoc, {
32
32
  heading: "The environment configuration object with prefixed keys.",
33
33
  get children() {
@@ -44,8 +44,7 @@ function EnvTypeDefinition(props) {
44
44
  `;
45
45
  }
46
46
  }),
47
- createIntrinsic("hbr", {}),
48
- createIntrinsic("hbr", {})
47
+ createComponent(Spacing, {})
49
48
  ];
50
49
  }
51
50
  function ConfigPropertyConditional(props) {
@@ -255,8 +254,7 @@ function EnvBuiltin(props) {
255
254
  "const": true,
256
255
  doc: "The initial environment configuration object values for the runtime."
257
256
  }),
258
- createIntrinsic("hbr", {}),
259
- createIntrinsic("hbr", {}),
257
+ createComponent(Spacing, {}),
260
258
  createComponent(TSDoc, {
261
259
  heading: "The environment configuration serializer for the Powerlines application.",
262
260
  get children() {
@@ -292,8 +290,7 @@ function EnvBuiltin(props) {
292
290
  });
293
291
  }
294
292
  }),
295
- createIntrinsic("hbr", {}),
296
- createIntrinsic("hbr", {}),
293
+ createComponent(Spacing, {}),
297
294
  createComponent(TSDoc, {
298
295
  heading: "A {@link EnvSerializer | environment configuration serializer} instance for the Powerlines application.",
299
296
  get children() {
@@ -315,8 +312,7 @@ function EnvBuiltin(props) {
315
312
  });
316
313
  }
317
314
  }),
318
- createIntrinsic("hbr", {}),
319
- createIntrinsic("hbr", {}),
315
+ createComponent(Spacing, {}),
320
316
  createComponent(TSDoc, {
321
317
  heading: "Serialize a environment configuration object to JSON data objects (not a JSON string).",
322
318
  get children() {
@@ -333,8 +329,7 @@ function EnvBuiltin(props) {
333
329
  "const": true,
334
330
  initializer: "serializeFunction<EnvBase>(envSerializer)"
335
331
  }),
336
- createIntrinsic("hbr", {}),
337
- createIntrinsic("hbr", {}),
332
+ createComponent(Spacing, {}),
338
333
  createComponent(TSDoc, {
339
334
  heading: "Deserialize a environment configuration object from JSON data objects to JavaScript objects, without running any validators.",
340
335
  get children() {
@@ -351,8 +346,7 @@ function EnvBuiltin(props) {
351
346
  "const": true,
352
347
  initializer: "deserializeFunction<EnvBase>(envSerializer)"
353
348
  }),
354
- createIntrinsic("hbr", {}),
355
- createIntrinsic("hbr", {}),
349
+ createComponent(Spacing, {}),
356
350
  createComponent(TSDoc, {
357
351
  heading: "Initializes the Powerlines environment configuration module.",
358
352
  get children() {
@@ -405,8 +399,7 @@ function EnvBuiltin(props) {
405
399
  code`
406
400
  return undefined;
407
401
  }, `,
408
- createIntrinsic("hbr", {}),
409
- createIntrinsic("hbr", {}),
402
+ createComponent(Spacing, {}),
410
403
  code` set: (target: EnvBase, propertyName: string, newValue: any) => { `,
411
404
  createIntrinsic("hbr", {}),
412
405
  createComponent(For, {
@@ -429,8 +422,7 @@ function EnvBuiltin(props) {
429
422
  });
430
423
  }
431
424
  }),
432
- createIntrinsic("hbr", {}),
433
- createIntrinsic("hbr", {}),
425
+ createComponent(Spacing, {}),
434
426
  createIntrinsic("hbr", {}),
435
427
  createComponent(TSDoc, {
436
428
  heading: "The environment configuration object.",
@@ -448,8 +440,7 @@ function EnvBuiltin(props) {
448
440
  return [code`createEnv(${defaultConfig || "{}"} as Partial<Env>);`];
449
441
  }
450
442
  }),
451
- createIntrinsic("hbr", {}),
452
- createIntrinsic("hbr", {}),
443
+ createComponent(Spacing, {}),
453
444
  createComponent(VarDeclaration, {
454
445
  "export": true,
455
446
  "const": true,
@@ -510,8 +501,7 @@ function EnvBuiltin(props) {
510
501
  );
511
502
  `
512
503
  }),
513
- createIntrinsic("hbr", {}),
514
- createIntrinsic("hbr", {}),
504
+ createComponent(Spacing, {}),
515
505
  createComponent(TSDoc, {
516
506
  heading: "Detect the \\`mode\\` of the current runtime environment.",
517
507
  get children() {
@@ -528,8 +518,7 @@ function EnvBuiltin(props) {
528
518
  name: "mode",
529
519
  initializer: code`String(env.MODE) || "production"; `
530
520
  }),
531
- createIntrinsic("hbr", {}),
532
- createIntrinsic("hbr", {}),
521
+ createComponent(Spacing, {}),
533
522
  createComponent(VarDeclaration, {
534
523
  "export": true,
535
524
  "const": true,
@@ -537,8 +526,7 @@ function EnvBuiltin(props) {
537
526
  doc: "Detect if the application is running in `\"production\"` mode",
538
527
  initializer: code`["prd", "prod", "production"].includes(mode.toLowerCase()); `
539
528
  }),
540
- createIntrinsic("hbr", {}),
541
- createIntrinsic("hbr", {}),
529
+ createComponent(Spacing, {}),
542
530
  createComponent(VarDeclaration, {
543
531
  "export": true,
544
532
  "const": true,
@@ -546,8 +534,7 @@ function EnvBuiltin(props) {
546
534
  doc: "Detect if the application is running in `\"test\"` mode",
547
535
  initializer: code`["tst", "test", "testing", "stg", "stage", "staging"].includes(mode.toLowerCase()) || env.TEST; `
548
536
  }),
549
- createIntrinsic("hbr", {}),
550
- createIntrinsic("hbr", {}),
537
+ createComponent(Spacing, {}),
551
538
  createComponent(VarDeclaration, {
552
539
  "export": true,
553
540
  "const": true,
@@ -555,8 +542,7 @@ function EnvBuiltin(props) {
555
542
  doc: "Detect if the application is running in `\"development\"` mode",
556
543
  initializer: code`["dev", "development"].includes(mode.toLowerCase()); `
557
544
  }),
558
- createIntrinsic("hbr", {}),
559
- createIntrinsic("hbr", {}),
545
+ createComponent(Spacing, {}),
560
546
  createComponent(VarDeclaration, {
561
547
  "export": true,
562
548
  "const": true,
@@ -564,8 +550,7 @@ function EnvBuiltin(props) {
564
550
  doc: "Detect if the application is currently being debugged",
565
551
  initializer: code`Boolean(isDevelopment && env.DEBUG); `
566
552
  }),
567
- createIntrinsic("hbr", {}),
568
- createIntrinsic("hbr", {}),
553
+ createComponent(Spacing, {}),
569
554
  createComponent(Show, {
570
555
  get when() {
571
556
  return Boolean(children);
@@ -1 +1 @@
1
- {"version":3,"file":"env.mjs","names":["code","computed","For","Show","splitProps","ClassDeclaration","ClassMethod","ElseIfClause","FunctionDeclaration","IfStatement","NewExpression","TypeDeclaration","VarDeclaration","ReflectionClass","ReflectionKind","usePowerlines","refkey","BuiltinFile","InterfaceDeclaration","ObjectDeclaration","TSDoc","TSDocExample","TSDocLink","TSDocParam","TSDocRemarks","TSDocReturns","TSDocThrows","titleCase","defu","loadEnvFromContext","EnvTypeDefinition","props","defaultValue","reflection","context","_$createComponent","name","_$createIntrinsic","heading","children","config","env","prefix","map","replace","join","ConfigPropertyConditional","sort","a","b","startsWith","localeCompare","toLowerCase","ConfigPropertyGet","property","index","condition","getNameAsString","when","_$memo","getAlias","length","each","joiner","alias","ConfigPropertySet","createEnvRefkey","envRefkey","envSerializerRefkey","EnvBuiltin","defaultConfig","rest","process","envInstance","result","kind","objectLiteral","description","types","reflectionGetProperties","getProperties","filter","isIgnored","reflectionSetProperties","isReadonly","_$mergeProps","id","imports","Boolean","value","type","doc","initializer","args","target","entryPath","async","parameters","optional","default","returnType","ender"],"sources":["../../src/components/env.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 {\n Children,\n code,\n computed,\n For,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n ClassDeclaration,\n ClassMethod,\n ElseIfClause,\n FunctionDeclaration,\n IfStatement,\n NewExpression,\n TypeDeclaration,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport {\n ReflectionClass,\n ReflectionKind,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { refkey } from \"@powerlines/plugin-alloy/helpers/refkey\";\nimport { ComponentProps } from \"@powerlines/plugin-alloy/types/components\";\nimport {\n BuiltinFile,\n BuiltinFileProps\n} from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport type { InterfaceDeclarationProps } from \"@powerlines/plugin-alloy/typescript/components/interface-declaration\";\nimport { InterfaceDeclaration } from \"@powerlines/plugin-alloy/typescript/components/interface-declaration\";\nimport { ObjectDeclaration } from \"@powerlines/plugin-alloy/typescript/components/object-declaration\";\nimport {\n TSDoc,\n TSDocExample,\n TSDocLink,\n TSDocParam,\n TSDocRemarks,\n TSDocReturns,\n TSDocThrows\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport defu from \"defu\";\nimport { loadEnvFromContext } from \"../helpers/load\";\nimport { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Generates the environment configuration typescript definition for the Powerlines project.\n */\nexport function EnvTypeDefinition(\n props: Omit<InterfaceDeclarationProps, \"name\">\n) {\n const [{ defaultValue, reflection }] = splitProps(props, [\n \"defaultValue\",\n \"reflection\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n\n return (\n <>\n <InterfaceDeclaration\n name=\" EnvBase\"\n defaultValue={defaultValue}\n reflection={reflection}\n export={true}\n />\n <hbr />\n <hbr />\n\n <TSDoc heading=\"The environment configuration object with prefixed keys.\">\n <TSDocRemarks>\n {`The \\`Env\\` type extends the \\`EnvBase\\` interface by including additional keys that are prefixed according to the project's configuration. This allows for flexibility in accessing environment variables with different naming conventions.`}\n </TSDocRemarks>\n </TSDoc>\n <TypeDeclaration name=\"Env\" export={true}>\n {code` {\n [Key in keyof EnvBase as Key ${context.config.env.prefix\n .map(prefix => `| \\`${prefix.replace(/_$/g, \"\")}_\\${Key}\\``)\n .join(\" \")}]: EnvBase[Key];\n}\n`}\n </TypeDeclaration>\n <hbr />\n <hbr />\n </>\n );\n}\n\ninterface ConfigPropertyConditionalProps extends ComponentProps {\n context: EnvPluginContext;\n name: string;\n}\n\nfunction ConfigPropertyConditional(props: ConfigPropertyConditionalProps) {\n const [{ context, name }] = splitProps(props, [\"context\", \"name\"]);\n\n return code`propertyName === \"${name}\" || propertyName.replace(/^(${context.config.env.prefix\n .sort((a, b) =>\n a.startsWith(b) ? -1 : b.startsWith(a) ? 1 : a.localeCompare(b)\n )\n .map(prefix => `${prefix.replace(/_$/, \"\")}_`)\n .join(\"|\")})/g, \"\").toLowerCase().replace(/[\\\\s\\\\-_]+/g, \"\") === \"${name\n .toLowerCase()\n .replace(/[\\s\\-_]+/g, \"\")}\"`;\n}\n\ninterface ConfigPropertyProps extends ComponentProps {\n index: number;\n context: EnvPluginContext;\n property: ReflectionProperty;\n}\n\nfunction ConfigPropertyGet(props: ConfigPropertyProps) {\n const [{ context, property, index }] = splitProps(props, [\n \"context\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${property.getNameAsString()}\"];`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${property.getNameAsString()}\"];`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nfunction ConfigPropertySet(props: ConfigPropertyProps) {\n const [{ context, property, index }] = splitProps(props, [\n \"context\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${property.getNameAsString()}\"] = newValue;\n return true;\n`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${property.getNameAsString()}\"] = newValue;\n return true;\n`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nexport interface EnvBuiltinProps extends Omit<BuiltinFileProps, \"id\"> {\n defaultConfig?: Children;\n reflection: ReflectionClass<any>;\n}\n\nconst createEnvRefkey = refkey(\"createEnv\");\nconst envRefkey = refkey(\"env\");\nconst envSerializerRefkey = refkey(\"EnvSerializer\");\n\n/**\n * Generates the environment configuration module for the Powerlines project.\n */\nexport function EnvBuiltin(props: EnvBuiltinProps) {\n const [{ defaultConfig, reflection, children }, rest] = splitProps(props, [\n \"defaultConfig\",\n \"reflection\",\n \"children\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n const defaultValue = computed(\n () => context && loadEnvFromContext(context, process.env)\n );\n\n const envInstance = computed(() => {\n const result = new ReflectionClass(\n {\n kind: ReflectionKind.objectLiteral,\n description: `The initial environment configuration state for the ${titleCase(\n context?.config?.name\n )} project.`,\n types: []\n },\n reflection\n );\n\n return result;\n });\n\n const reflectionGetProperties = computed(\n () =>\n reflection\n ?.getProperties()\n .filter(property => !property.isIgnored())\n .sort((a, b) =>\n a.getNameAsString().localeCompare(b.getNameAsString())\n ) ?? []\n );\n const reflectionSetProperties = computed(\n () =>\n reflection\n ?.getProperties()\n .filter(property => !property.isIgnored() && !property.isReadonly())\n .sort((a, b) =>\n a.getNameAsString().localeCompare(b.getNameAsString())\n ) ?? []\n );\n\n return (\n <BuiltinFile\n id=\"env\"\n description=\"The environment configuration module provides an interface to define environment configuration parameters.\"\n {...rest}\n imports={defu(\n {\n \"@powerlines/deepkit/vendor/type\": [\n \"stringify\",\n \"serializer\",\n \"serializeFunction\",\n \"deserializeFunction\",\n \"ReflectionKind\",\n \"Serializer\",\n \"TemplateState\",\n \"Type\",\n \"TypeProperty\",\n \"TypePropertySignature\"\n ]\n },\n rest.imports ?? {}\n )}>\n <Show when={Boolean(reflection)}>\n <EnvTypeDefinition\n defaultValue={defaultValue.value}\n reflection={reflection}\n />\n <hbr />\n <hbr />\n </Show>\n\n <ObjectDeclaration\n name=\"initialEnv\"\n type=\"Partial<EnvBase>\"\n defaultValue={defaultValue}\n reflection={envInstance}\n export={true}\n const={true}\n doc=\"The initial environment configuration object values for the runtime.\"\n />\n <hbr />\n <hbr />\n\n <TSDoc heading=\"The environment configuration serializer for the Powerlines application.\">\n <TSDocLink>\n {`https://deepkit.io/docs/serialization/serializers`}\n </TSDocLink>\n <TSDocLink>\n {`https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918`}\n </TSDocLink>\n <TSDocRemarks>\n {`This serializer is used to serialize and deserialize the Powerlines environment configuration.`}\n </TSDocRemarks>\n </TSDoc>\n <ClassDeclaration\n refkey={envSerializerRefkey}\n name=\"EnvSerializer\"\n extends=\"Serializer\"\n export={true}>\n <ClassMethod\n name=\"constructor\"\n public={true}\n doc=\"Initializes a new instance of the `EnvSerializer` class.\">\n {code`\n super(\"env\");\n\n this.deserializeRegistry.register(\n ReflectionKind.boolean,\n (type: Type, state: TemplateState) => {\n state.addSetter(\n \\`typeof \\${state.accessor.toString()} !== \"boolean\" ? \\${state.accessor.toString()} === 1 || \\${state.accessor.toString()} === \"1\" || \\${state.accessor.toString()}.toLowerCase() === \"t\" || \\${state.accessor.toString()}.toLowerCase() === \"true\" || \\${state.accessor.toString()}.toLowerCase() === \"y\" || \\${state.accessor.toString()}.toLowerCase() === \"yes\" : \\${state.accessor.toString()}\\`\n );\n }\n );\n`}\n </ClassMethod>\n </ClassDeclaration>\n <hbr />\n <hbr />\n\n <TSDoc heading=\"A {@link EnvSerializer | environment configuration serializer} instance for the Powerlines application.\">\n <TSDocLink>\n {`https://deepkit.io/docs/serialization/serializers`}\n </TSDocLink>\n <TSDocLink>\n {`https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918`}\n </TSDocLink>\n <TSDocRemarks>\n {`This serializer is used to serialize and deserialize the Powerlines environment configuration.`}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n name=\"envSerializer\"\n export={false}\n const={true}\n initializer={<NewExpression args={[]} target=\"EnvSerializer\" />}\n />\n <hbr />\n <hbr />\n\n <TSDoc heading=\"Serialize a environment configuration object to JSON data objects (not a JSON string).\">\n <TSDocRemarks>\n {`The resulting JSON object can be stringified using \\`JSON.stringify()\\`.`}\n </TSDocRemarks>\n <TSDocExample>{`const json = serializeEnv(env);`}</TSDocExample>\n <TSDocThrows>\n {`ValidationError when serialization or validation fails.`}\n </TSDocThrows>\n </TSDoc>\n <VarDeclaration\n name=\"serializeEnv\"\n export={true}\n const={true}\n initializer={\"serializeFunction<EnvBase>(envSerializer)\"}\n />\n <hbr />\n <hbr />\n\n <TSDoc heading=\"Deserialize a environment configuration object from JSON data objects to JavaScript objects, without running any validators.\">\n <TSDocRemarks>\n {`Types that are already correct will be used as-is.`}\n </TSDocRemarks>\n <TSDocExample>{`const env = deserializeEnv(json);`}</TSDocExample>\n <TSDocThrows>\n {`ValidationError when deserialization fails.`}\n </TSDocThrows>\n </TSDoc>\n <VarDeclaration\n name=\"deserializeEnv\"\n export={true}\n const={true}\n initializer=\"deserializeFunction<EnvBase>(envSerializer)\"\n />\n <hbr />\n <hbr />\n\n <TSDoc heading=\"Initializes the Powerlines environment configuration module.\">\n <TSDocRemarks>\n {`This function initializes the Powerlines environment configuration object.`}\n </TSDocRemarks>\n <TSDocParam name=\"environmentConfig\">\n {`The dynamic/runtime configuration - this could include the current environment variables or any other environment-specific settings provided by the runtime.`}\n </TSDocParam>\n <TSDocReturns>\n {`The initialized Powerlines configuration object.`}\n </TSDocReturns>\n </TSDoc>\n <Show when={Boolean(context?.entryPath)}>\n <FunctionDeclaration\n refkey={createEnvRefkey}\n async={false}\n export={true}\n name=\"createEnv\"\n parameters={[\n {\n name: \"environmentConfig\",\n type: `Partial<Env>`,\n optional: false,\n default: \"{}\"\n }\n ]}\n returnType=\"Env\">\n {code`\n return new Proxy<Env>(\n deserializeEnv({\n ...initialEnv,\n ...environmentConfig\n }) as Env,\n {\n get: (target: EnvBase, propertyName: string) => { `}\n <hbr />\n\n <For each={reflectionGetProperties}>\n {(property: ReflectionProperty, index: number) => (\n <ConfigPropertyGet\n index={index}\n context={context}\n property={property}\n />\n )}\n </For>\n {code`\n return undefined;\n }, `}\n\n <hbr />\n <hbr />\n {code` set: (target: EnvBase, propertyName: string, newValue: any) => { `}\n <hbr />\n\n <For each={reflectionSetProperties} ender={code` else `}>\n {(property: ReflectionProperty, index: number) => (\n <ConfigPropertySet\n index={index}\n context={context}\n property={property}\n />\n )}\n </For>\n\n <hbr />\n {code`return false;\n }\n }\n );\n`}\n </FunctionDeclaration>\n </Show>\n <hbr />\n <hbr />\n <hbr />\n\n <TSDoc heading=\"The environment configuration object.\">\n <TSDocRemarks>\n {`This object provides access to the environment configuration parameters in the application runtime.`}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n refkey={envRefkey}\n name=\"env\"\n type=\"Env\"\n export={true}\n const={true}\n initializer={\n <>{code`createEnv(${defaultConfig || \"{}\"} as Partial<Env>);`}</>\n }\n />\n <hbr />\n <hbr />\n\n <VarDeclaration\n export\n const\n name=\"isCI\"\n doc=\"Detect if the application is running in a continuous integration (CI) environment.\"\n initializer={code`Boolean(\n env.CI ||\n env.RUN_ID ||\n env.AGOLA_GIT_REF ||\n env.AC_APPCIRCLE ||\n env.APPVEYOR ||\n env.CODEBUILD ||\n env.TF_BUILD ||\n env.bamboo_planKey ||\n env.BITBUCKET_COMMIT ||\n env.BITRISE_IO ||\n env.BUDDY_WORKSPACE_ID ||\n env.BUILDKITE ||\n env.CIRCLECI ||\n env.CIRRUS_CI ||\n env.CF_BUILD_ID ||\n env.CM_BUILD_ID ||\n env.CI_NAME ||\n env.DRONE ||\n env.DSARI ||\n env.EARTHLY_CI ||\n env.EAS_BUILD ||\n env.GERRIT_PROJECT ||\n env.GITEA_ACTIONS ||\n env.GITHUB_ACTIONS ||\n env.GITLAB_CI ||\n env.GOCD ||\n env.BUILDER_OUTPUT ||\n env.HARNESS_BUILD_ID ||\n env.JENKINS_URL ||\n env.LAYERCI ||\n env.MAGNUM ||\n env.NETLIFY ||\n env.NEVERCODE ||\n env.PROW_JOB_ID ||\n env.RELEASE_BUILD_ID ||\n env.RENDER ||\n env.SAILCI ||\n env.HUDSON ||\n env.SCREWDRIVER ||\n env.SEMAPHORE ||\n env.SOURCEHUT ||\n env.STRIDER ||\n env.TASK_ID ||\n env.RUN_ID ||\n env.TEAMCITY_VERSION ||\n env.TRAVIS ||\n env.VELA ||\n env.NOW_BUILDER ||\n env.APPCENTER_BUILD_ID ||\n env.CI_XCODE_PROJECT ||\n env.XCS || false\n );\n `}\n />\n <hbr />\n <hbr />\n\n <TSDoc heading=\"Detect the \\`mode\\` of the current runtime environment.\">\n <TSDocRemarks>\n {code`The \\`mode\\` is determined by the \\`MODE\\` environment variable, or falls back to the \\`NEXT_PUBLIC_VERCEL_ENV\\`, \\`NODE_ENV\\`, or defaults to \\`production\\`. While the value can potentially be any string, it is generally recommended to only allow a value in the following list:\n - \\`production\\`\n - \\`test\\`\n - \\`development\\`\n `}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n export\n const\n name=\"mode\"\n initializer={code`String(env.MODE) || \"production\"; `}\n />\n <hbr />\n <hbr />\n\n <VarDeclaration\n export\n const\n name=\"isProduction\"\n doc='Detect if the application is running in `\"production\"` mode'\n initializer={code`[\"prd\", \"prod\", \"production\"].includes(mode.toLowerCase()); `}\n />\n <hbr />\n <hbr />\n\n <VarDeclaration\n export\n const\n name=\"isTest\"\n doc='Detect if the application is running in `\"test\"` mode'\n initializer={code`[\"tst\", \"test\", \"testing\", \"stg\", \"stage\", \"staging\"].includes(mode.toLowerCase()) || env.TEST; `}\n />\n <hbr />\n <hbr />\n\n <VarDeclaration\n export\n const\n name=\"isDevelopment\"\n doc='Detect if the application is running in `\"development\"` mode'\n initializer={code`[\"dev\", \"development\"].includes(mode.toLowerCase()); `}\n />\n <hbr />\n <hbr />\n\n <VarDeclaration\n export\n const\n name=\"isDebug\"\n doc=\"Detect if the application is currently being debugged\"\n initializer={code`Boolean(isDevelopment && env.DEBUG); `}\n />\n <hbr />\n <hbr />\n <Show when={Boolean(children)}>{children}</Show>\n </BuiltinFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAoEA,SAAgB8B,kBACdC,OACA;CACA,MAAM,CAAC,EAAEC,cAAcC,gBAAgB7B,WAAW2B,OAAO,CACvD,gBACA,aACD,CAAC;CAEF,MAAMG,UAAUnB,eAAiC;AAEjD,QAAA;EAAAoB,gBAEKjB,sBAAoB;GACnBkB,MAAI;GACUJ;GACFC;GAAU,UACd;GAAI,CAAA;EAAAI,gBAAA,OAAA,EAAA,CAAA;EAAAA,gBAAA,OAAA,EAAA,CAAA;EAAAF,gBAKbf,OAAK;GAACkB,SAAO;GAAA,IAAAC,WAAA;AAAA,WA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,OAAA,EAAA,CAAA;IAAAA,gBAAA,OAAA,EAAA,CAAA;IAAAF,gBAIzDhC,MAAI;KAAA,IAACuD,OAAI;AAAA,aAAE8B,QAAQjD,SAAS;;KAAGA;KAAQ,CAAA;IAAA;;EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"env.mjs","names":["code","computed","For","Show","splitProps","ClassDeclaration","ClassMethod","ElseIfClause","FunctionDeclaration","IfStatement","NewExpression","TypeDeclaration","VarDeclaration","ReflectionClass","ReflectionKind","Spacing","usePowerlines","refkey","BuiltinFile","InterfaceDeclaration","ObjectDeclaration","TSDoc","TSDocExample","TSDocLink","TSDocParam","TSDocRemarks","TSDocReturns","TSDocThrows","titleCase","defu","loadEnvFromContext","EnvTypeDefinition","props","defaultValue","reflection","context","_$createComponent","name","heading","children","config","env","prefix","map","replace","join","ConfigPropertyConditional","sort","a","b","startsWith","localeCompare","toLowerCase","ConfigPropertyGet","property","index","condition","getNameAsString","when","_$memo","getAlias","length","each","joiner","alias","ConfigPropertySet","createEnvRefkey","envRefkey","envSerializerRefkey","EnvBuiltin","defaultConfig","rest","process","envInstance","result","kind","objectLiteral","description","types","reflectionGetProperties","getProperties","filter","isIgnored","reflectionSetProperties","isReadonly","_$mergeProps","id","imports","Boolean","value","_$createIntrinsic","type","doc","initializer","args","target","entryPath","async","parameters","optional","default","returnType","ender"],"sources":["../../src/components/env.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 {\n Children,\n code,\n computed,\n For,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n ClassDeclaration,\n ClassMethod,\n ElseIfClause,\n FunctionDeclaration,\n IfStatement,\n NewExpression,\n TypeDeclaration,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport {\n ReflectionClass,\n ReflectionKind,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { refkey } from \"@powerlines/plugin-alloy/helpers/refkey\";\nimport { ComponentProps } from \"@powerlines/plugin-alloy/types/components\";\nimport {\n BuiltinFile,\n BuiltinFileProps\n} from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport type { InterfaceDeclarationProps } from \"@powerlines/plugin-alloy/typescript/components/interface-declaration\";\nimport { InterfaceDeclaration } from \"@powerlines/plugin-alloy/typescript/components/interface-declaration\";\nimport { ObjectDeclaration } from \"@powerlines/plugin-alloy/typescript/components/object-declaration\";\nimport {\n TSDoc,\n TSDocExample,\n TSDocLink,\n TSDocParam,\n TSDocRemarks,\n TSDocReturns,\n TSDocThrows\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport defu from \"defu\";\nimport { loadEnvFromContext } from \"../helpers/load\";\nimport { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Generates the environment configuration typescript definition for the Powerlines project.\n */\nexport function EnvTypeDefinition(\n props: Omit<InterfaceDeclarationProps, \"name\">\n) {\n const [{ defaultValue, reflection }] = splitProps(props, [\n \"defaultValue\",\n \"reflection\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n\n return (\n <>\n <InterfaceDeclaration\n name=\" EnvBase\"\n defaultValue={defaultValue}\n reflection={reflection}\n export={true}\n />\n <Spacing />\n <TSDoc heading=\"The environment configuration object with prefixed keys.\">\n <TSDocRemarks>\n {`The \\`Env\\` type extends the \\`EnvBase\\` interface by including additional keys that are prefixed according to the project's configuration. This allows for flexibility in accessing environment variables with different naming conventions.`}\n </TSDocRemarks>\n </TSDoc>\n <TypeDeclaration name=\"Env\" export={true}>\n {code` {\n [Key in keyof EnvBase as Key ${context.config.env.prefix\n .map(prefix => `| \\`${prefix.replace(/_$/g, \"\")}_\\${Key}\\``)\n .join(\" \")}]: EnvBase[Key];\n}\n`}\n </TypeDeclaration>\n <Spacing />\n </>\n );\n}\n\ninterface ConfigPropertyConditionalProps extends ComponentProps {\n context: EnvPluginContext;\n name: string;\n}\n\nfunction ConfigPropertyConditional(props: ConfigPropertyConditionalProps) {\n const [{ context, name }] = splitProps(props, [\"context\", \"name\"]);\n\n return code`propertyName === \"${name}\" || propertyName.replace(/^(${context.config.env.prefix\n .sort((a, b) =>\n a.startsWith(b) ? -1 : b.startsWith(a) ? 1 : a.localeCompare(b)\n )\n .map(prefix => `${prefix.replace(/_$/, \"\")}_`)\n .join(\"|\")})/g, \"\").toLowerCase().replace(/[\\\\s\\\\-_]+/g, \"\") === \"${name\n .toLowerCase()\n .replace(/[\\s\\-_]+/g, \"\")}\"`;\n}\n\ninterface ConfigPropertyProps extends ComponentProps {\n index: number;\n context: EnvPluginContext;\n property: ReflectionProperty;\n}\n\nfunction ConfigPropertyGet(props: ConfigPropertyProps) {\n const [{ context, property, index }] = splitProps(props, [\n \"context\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${property.getNameAsString()}\"];`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${property.getNameAsString()}\"];`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nfunction ConfigPropertySet(props: ConfigPropertyProps) {\n const [{ context, property, index }] = splitProps(props, [\n \"context\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${property.getNameAsString()}\"] = newValue;\n return true;\n`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${property.getNameAsString()}\"] = newValue;\n return true;\n`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nexport interface EnvBuiltinProps extends Omit<BuiltinFileProps, \"id\"> {\n defaultConfig?: Children;\n reflection: ReflectionClass<any>;\n}\n\nconst createEnvRefkey = refkey(\"createEnv\");\nconst envRefkey = refkey(\"env\");\nconst envSerializerRefkey = refkey(\"EnvSerializer\");\n\n/**\n * Generates the environment configuration module for the Powerlines project.\n */\nexport function EnvBuiltin(props: EnvBuiltinProps) {\n const [{ defaultConfig, reflection, children }, rest] = splitProps(props, [\n \"defaultConfig\",\n \"reflection\",\n \"children\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n const defaultValue = computed(\n () => context && loadEnvFromContext(context, process.env)\n );\n\n const envInstance = computed(() => {\n const result = new ReflectionClass(\n {\n kind: ReflectionKind.objectLiteral,\n description: `The initial environment configuration state for the ${titleCase(\n context?.config?.name\n )} project.`,\n types: []\n },\n reflection\n );\n\n return result;\n });\n\n const reflectionGetProperties = computed(\n () =>\n reflection\n ?.getProperties()\n .filter(property => !property.isIgnored())\n .sort((a, b) =>\n a.getNameAsString().localeCompare(b.getNameAsString())\n ) ?? []\n );\n const reflectionSetProperties = computed(\n () =>\n reflection\n ?.getProperties()\n .filter(property => !property.isIgnored() && !property.isReadonly())\n .sort((a, b) =>\n a.getNameAsString().localeCompare(b.getNameAsString())\n ) ?? []\n );\n\n return (\n <BuiltinFile\n id=\"env\"\n description=\"The environment configuration module provides an interface to define environment configuration parameters.\"\n {...rest}\n imports={defu(\n {\n \"@powerlines/deepkit/vendor/type\": [\n \"stringify\",\n \"serializer\",\n \"serializeFunction\",\n \"deserializeFunction\",\n \"ReflectionKind\",\n \"Serializer\",\n \"TemplateState\",\n \"Type\",\n \"TypeProperty\",\n \"TypePropertySignature\"\n ]\n },\n rest.imports ?? {}\n )}>\n <Show when={Boolean(reflection)}>\n <EnvTypeDefinition\n defaultValue={defaultValue.value}\n reflection={reflection}\n />\n <hbr />\n <hbr />\n </Show>\n\n <ObjectDeclaration\n name=\"initialEnv\"\n type=\"Partial<EnvBase>\"\n defaultValue={defaultValue}\n reflection={envInstance}\n export={true}\n const={true}\n doc=\"The initial environment configuration object values for the runtime.\"\n />\n <Spacing />\n\n <TSDoc heading=\"The environment configuration serializer for the Powerlines application.\">\n <TSDocLink>\n {`https://deepkit.io/docs/serialization/serializers`}\n </TSDocLink>\n <TSDocLink>\n {`https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918`}\n </TSDocLink>\n <TSDocRemarks>\n {`This serializer is used to serialize and deserialize the Powerlines environment configuration.`}\n </TSDocRemarks>\n </TSDoc>\n <ClassDeclaration\n refkey={envSerializerRefkey}\n name=\"EnvSerializer\"\n extends=\"Serializer\"\n export={true}>\n <ClassMethod\n name=\"constructor\"\n public={true}\n doc=\"Initializes a new instance of the `EnvSerializer` class.\">\n {code`\n super(\"env\");\n\n this.deserializeRegistry.register(\n ReflectionKind.boolean,\n (type: Type, state: TemplateState) => {\n state.addSetter(\n \\`typeof \\${state.accessor.toString()} !== \"boolean\" ? \\${state.accessor.toString()} === 1 || \\${state.accessor.toString()} === \"1\" || \\${state.accessor.toString()}.toLowerCase() === \"t\" || \\${state.accessor.toString()}.toLowerCase() === \"true\" || \\${state.accessor.toString()}.toLowerCase() === \"y\" || \\${state.accessor.toString()}.toLowerCase() === \"yes\" : \\${state.accessor.toString()}\\`\n );\n }\n );\n`}\n </ClassMethod>\n </ClassDeclaration>\n <Spacing />\n\n <TSDoc heading=\"A {@link EnvSerializer | environment configuration serializer} instance for the Powerlines application.\">\n <TSDocLink>\n {`https://deepkit.io/docs/serialization/serializers`}\n </TSDocLink>\n <TSDocLink>\n {`https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918`}\n </TSDocLink>\n <TSDocRemarks>\n {`This serializer is used to serialize and deserialize the Powerlines environment configuration.`}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n name=\"envSerializer\"\n export={false}\n const={true}\n initializer={<NewExpression args={[]} target=\"EnvSerializer\" />}\n />\n <Spacing />\n\n <TSDoc heading=\"Serialize a environment configuration object to JSON data objects (not a JSON string).\">\n <TSDocRemarks>\n {`The resulting JSON object can be stringified using \\`JSON.stringify()\\`.`}\n </TSDocRemarks>\n <TSDocExample>{`const json = serializeEnv(env);`}</TSDocExample>\n <TSDocThrows>\n {`ValidationError when serialization or validation fails.`}\n </TSDocThrows>\n </TSDoc>\n <VarDeclaration\n name=\"serializeEnv\"\n export={true}\n const={true}\n initializer={\"serializeFunction<EnvBase>(envSerializer)\"}\n />\n <Spacing />\n\n <TSDoc heading=\"Deserialize a environment configuration object from JSON data objects to JavaScript objects, without running any validators.\">\n <TSDocRemarks>\n {`Types that are already correct will be used as-is.`}\n </TSDocRemarks>\n <TSDocExample>{`const env = deserializeEnv(json);`}</TSDocExample>\n <TSDocThrows>\n {`ValidationError when deserialization fails.`}\n </TSDocThrows>\n </TSDoc>\n <VarDeclaration\n name=\"deserializeEnv\"\n export={true}\n const={true}\n initializer=\"deserializeFunction<EnvBase>(envSerializer)\"\n />\n <Spacing />\n\n <TSDoc heading=\"Initializes the Powerlines environment configuration module.\">\n <TSDocRemarks>\n {`This function initializes the Powerlines environment configuration object.`}\n </TSDocRemarks>\n <TSDocParam name=\"environmentConfig\">\n {`The dynamic/runtime configuration - this could include the current environment variables or any other environment-specific settings provided by the runtime.`}\n </TSDocParam>\n <TSDocReturns>\n {`The initialized Powerlines configuration object.`}\n </TSDocReturns>\n </TSDoc>\n <Show when={Boolean(context?.entryPath)}>\n <FunctionDeclaration\n refkey={createEnvRefkey}\n async={false}\n export={true}\n name=\"createEnv\"\n parameters={[\n {\n name: \"environmentConfig\",\n type: `Partial<Env>`,\n optional: false,\n default: \"{}\"\n }\n ]}\n returnType=\"Env\">\n {code`\n return new Proxy<Env>(\n deserializeEnv({\n ...initialEnv,\n ...environmentConfig\n }) as Env,\n {\n get: (target: EnvBase, propertyName: string) => { `}\n <hbr />\n\n <For each={reflectionGetProperties}>\n {(property: ReflectionProperty, index: number) => (\n <ConfigPropertyGet\n index={index}\n context={context}\n property={property}\n />\n )}\n </For>\n {code`\n return undefined;\n }, `}\n\n <Spacing />\n {code` set: (target: EnvBase, propertyName: string, newValue: any) => { `}\n <hbr />\n\n <For each={reflectionSetProperties} ender={code` else `}>\n {(property: ReflectionProperty, index: number) => (\n <ConfigPropertySet\n index={index}\n context={context}\n property={property}\n />\n )}\n </For>\n\n <hbr />\n {code`return false;\n }\n }\n );\n`}\n </FunctionDeclaration>\n </Show>\n <Spacing />\n <hbr />\n\n <TSDoc heading=\"The environment configuration object.\">\n <TSDocRemarks>\n {`This object provides access to the environment configuration parameters in the application runtime.`}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n refkey={envRefkey}\n name=\"env\"\n type=\"Env\"\n export={true}\n const={true}\n initializer={\n <>{code`createEnv(${defaultConfig || \"{}\"} as Partial<Env>);`}</>\n }\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isCI\"\n doc=\"Detect if the application is running in a continuous integration (CI) environment.\"\n initializer={code`Boolean(\n env.CI ||\n env.RUN_ID ||\n env.AGOLA_GIT_REF ||\n env.AC_APPCIRCLE ||\n env.APPVEYOR ||\n env.CODEBUILD ||\n env.TF_BUILD ||\n env.bamboo_planKey ||\n env.BITBUCKET_COMMIT ||\n env.BITRISE_IO ||\n env.BUDDY_WORKSPACE_ID ||\n env.BUILDKITE ||\n env.CIRCLECI ||\n env.CIRRUS_CI ||\n env.CF_BUILD_ID ||\n env.CM_BUILD_ID ||\n env.CI_NAME ||\n env.DRONE ||\n env.DSARI ||\n env.EARTHLY_CI ||\n env.EAS_BUILD ||\n env.GERRIT_PROJECT ||\n env.GITEA_ACTIONS ||\n env.GITHUB_ACTIONS ||\n env.GITLAB_CI ||\n env.GOCD ||\n env.BUILDER_OUTPUT ||\n env.HARNESS_BUILD_ID ||\n env.JENKINS_URL ||\n env.LAYERCI ||\n env.MAGNUM ||\n env.NETLIFY ||\n env.NEVERCODE ||\n env.PROW_JOB_ID ||\n env.RELEASE_BUILD_ID ||\n env.RENDER ||\n env.SAILCI ||\n env.HUDSON ||\n env.SCREWDRIVER ||\n env.SEMAPHORE ||\n env.SOURCEHUT ||\n env.STRIDER ||\n env.TASK_ID ||\n env.RUN_ID ||\n env.TEAMCITY_VERSION ||\n env.TRAVIS ||\n env.VELA ||\n env.NOW_BUILDER ||\n env.APPCENTER_BUILD_ID ||\n env.CI_XCODE_PROJECT ||\n env.XCS || false\n );\n `}\n />\n <Spacing />\n\n <TSDoc heading=\"Detect the \\`mode\\` of the current runtime environment.\">\n <TSDocRemarks>\n {code`The \\`mode\\` is determined by the \\`MODE\\` environment variable, or falls back to the \\`NEXT_PUBLIC_VERCEL_ENV\\`, \\`NODE_ENV\\`, or defaults to \\`production\\`. While the value can potentially be any string, it is generally recommended to only allow a value in the following list:\n - \\`production\\`\n - \\`test\\`\n - \\`development\\`\n `}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n export\n const\n name=\"mode\"\n initializer={code`String(env.MODE) || \"production\"; `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isProduction\"\n doc='Detect if the application is running in `\"production\"` mode'\n initializer={code`[\"prd\", \"prod\", \"production\"].includes(mode.toLowerCase()); `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isTest\"\n doc='Detect if the application is running in `\"test\"` mode'\n initializer={code`[\"tst\", \"test\", \"testing\", \"stg\", \"stage\", \"staging\"].includes(mode.toLowerCase()) || env.TEST; `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isDevelopment\"\n doc='Detect if the application is running in `\"development\"` mode'\n initializer={code`[\"dev\", \"development\"].includes(mode.toLowerCase()); `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isDebug\"\n doc=\"Detect if the application is currently being debugged\"\n initializer={code`Boolean(isDevelopment && env.DEBUG); `}\n />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BuiltinFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqEA,SAAgB+B,kBACdC,OACA;CACA,MAAM,CAAC,EAAEC,cAAcC,gBAAgB9B,WAAW4B,OAAO,CACvD,gBACA,aACD,CAAC;CAEF,MAAMG,UAAUnB,eAAiC;AAEjD,QAAA;EAAAoB,gBAEKjB,sBAAoB;GACnBkB,MAAI;GACUJ;GACFC;GAAU,UACd;GAAI,CAAA;EAAAE,gBAEbrB,SAAO,EAAA,CAAA;EAAAqB,gBACPf,OAAK;GAACiB,SAAO;GAAA,IAAAC,WAAA;AAAA,WAAAH,gBACXX,cAAY,EAAAc,UACV,iPAA+O,CAAA;;GAAA,CAAA;E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IJ,CAAA;;KAAA,CAAA;IAAAoC,gBAGJxB,gBAAc;KAAA,UAAA;KAAA,SAAA;KAGbyB,MAAI;KACJwD,aAAa7F,IAAI;KAAoC,CAAA;IAAAoC,gBAEtDrB,SAAO,EAAA,CAAA;IAAAqB,gBAEPxB,gBAAc;KAAA,UAAA;KAAA,SAAA;KAGbyB,MAAI;KACJuD,KAAG;KACHC,aAAa7F,IAAI;KAA8D,CAAA;IAAAoC,gBAEhFrB,SAAO,EAAA,CAAA;IAAAqB,gBAEPxB,gBAAc;KAAA,UAAA;KAAA,SAAA;KAGbyB,MAAI;KACJuD,KAAG;KACHC,aAAa7F,IAAI;KAAkG,CAAA;IAAAoC,gBAEpHrB,SAAO,EAAA,CAAA;IAAAqB,gBAEPxB,gBAAc;KAAA,UAAA;KAAA,SAAA;KAGbyB,MAAI;KACJuD,KAAG;KACHC,aAAa7F,IAAI;KAAuD,CAAA;IAAAoC,gBAEzErB,SAAO,EAAA,CAAA;IAAAqB,gBAEPxB,gBAAc;KAAA,UAAA;KAAA,SAAA;KAGbyB,MAAI;KACJuD,KAAG;KACHC,aAAa7F,IAAI;KAAuC,CAAA;IAAAoC,gBAEzDrB,SAAO,EAAA,CAAA;IAAAqB,gBACPjC,MAAI;KAAA,IAACuD,OAAI;AAAA,aAAE8B,QAAQjD,SAAS;;KAAGA;KAAQ,CAAA;IAAA;;EAAA,CAAA,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-env",
3
- "version": "0.15.191",
3
+ "version": "0.15.193",
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": {
@@ -305,10 +305,10 @@
305
305
  "@alloy-js/typescript": "0.23.0-dev.4",
306
306
  "@babel/core": "^7.29.0",
307
307
  "@babel/types": "^7.29.0",
308
- "@powerlines/plugin-alloy": "^0.23.2",
309
- "@powerlines/plugin-automd": "^0.1.277",
310
- "@powerlines/plugin-babel": "^0.12.286",
311
- "@powerlines/plugin-plugin": "^0.12.228",
308
+ "@powerlines/plugin-alloy": "^0.23.4",
309
+ "@powerlines/plugin-automd": "^0.1.278",
310
+ "@powerlines/plugin-babel": "^0.12.287",
311
+ "@powerlines/plugin-plugin": "^0.12.229",
312
312
  "@storm-software/config-tools": "^1.189.0",
313
313
  "@stryke/capnp": "^0.12.68",
314
314
  "@stryke/env": "^0.20.60",
@@ -318,15 +318,15 @@
318
318
  "@stryke/type-checks": "^0.5.25",
319
319
  "@stryke/types": "^0.10.39",
320
320
  "automd": "^0.4.3",
321
- "powerlines": "^0.38.44"
321
+ "powerlines": "^0.38.45"
322
322
  },
323
323
  "devDependencies": {
324
- "@powerlines/deepkit": "^0.6.57",
325
- "@powerlines/plugin-deepkit": "^0.11.156",
324
+ "@powerlines/deepkit": "^0.6.58",
325
+ "@powerlines/plugin-deepkit": "^0.11.157",
326
326
  "@types/node": "^24.10.13",
327
327
  "vite": "8.0.0-beta.2"
328
328
  },
329
329
  "publishConfig": { "access": "public" },
330
330
  "types": "./dist/index.d.cts",
331
- "gitHead": "576a913a82004dbcd5a7582d192fd7aac4dbbfde"
331
+ "gitHead": "1eefcb765bbae3b4b0386ac52028fdf6978d961a"
332
332
  }