@powerlines/plugin-date 0.12.136 → 0.12.138

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.
Files changed (38) hide show
  1. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +20 -0
  2. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +19 -0
  3. package/dist/plugin-alloy/src/core/components/source-file.cjs +60 -0
  4. package/dist/plugin-alloy/src/core/components/source-file.mjs +58 -0
  5. package/dist/plugin-alloy/src/core/contexts/context.cjs +50 -1
  6. package/dist/plugin-alloy/src/core/contexts/context.mjs +46 -2
  7. package/dist/plugin-alloy/src/core/contexts/index.cjs +2 -0
  8. package/dist/plugin-alloy/src/core/contexts/index.mjs +4 -0
  9. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +46 -0
  10. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +42 -0
  11. package/dist/plugin-alloy/src/helpers/refkey.cjs +16 -0
  12. package/dist/plugin-alloy/src/helpers/refkey.mjs +15 -0
  13. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +7 -0
  14. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +9 -0
  15. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +5 -0
  16. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +7 -0
  17. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +17 -0
  18. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +17 -0
  19. package/dist/plugin-alloy/src/types/components.d.mts +1 -1
  20. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +47 -0
  21. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +46 -0
  22. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +75 -0
  23. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +73 -0
  24. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +359 -0
  25. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +350 -0
  26. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +142 -0
  27. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +139 -0
  28. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +53 -0
  29. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +52 -0
  30. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +94 -0
  31. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +93 -0
  32. package/dist/plugin-env/src/components/docs.cjs +3 -3
  33. package/dist/plugin-env/src/components/docs.mjs +3 -3
  34. package/dist/plugin-env/src/components/env.cjs +151 -40
  35. package/dist/plugin-env/src/components/env.mjs +126 -15
  36. package/dist/powerlines/src/lib/build/esbuild.mjs +1 -1
  37. package/dist/powerlines/src/lib/entry.mjs +1 -1
  38. package/package.json +5 -5
@@ -1,4 +1,10 @@
1
1
  import { type_exports } from "../../../deepkit/src/vendor/type.mjs";
2
+ import { usePowerlines } from "../../../plugin-alloy/src/core/contexts/context.mjs";
3
+ import { refkey as refkey$1 } from "../../../plugin-alloy/src/helpers/refkey.mjs";
4
+ import { TSDoc, TSDocExample, TSDocLink, TSDocParam, TSDocRemarks, TSDocReturns, TSDocThrows } from "../../../plugin-alloy/src/typescript/components/tsdoc.mjs";
5
+ import { BuiltinFile } from "../../../plugin-alloy/src/typescript/components/builtin-file.mjs";
6
+ import { TypeScriptInterface } from "../../../plugin-alloy/src/typescript/components/typescript-interface.mjs";
7
+ import { TypescriptObject } from "../../../plugin-alloy/src/typescript/components/typescript-object.mjs";
2
8
  import { loadEnvFromContext } from "../helpers/load.mjs";
3
9
  import { createReflectionResource } from "../helpers/create-reflection-resource.mjs";
4
10
  import { For, Show, code, computed, splitProps } from "@alloy-js/core";
@@ -7,12 +13,6 @@ import defu from "defu";
7
13
  import { titleCase } from "@stryke/string-format/title-case";
8
14
  import { isNull } from "@stryke/type-checks/is-null";
9
15
  import { ClassDeclaration, ClassMethod, ElseIfClause, FunctionDeclaration, IfStatement, NewExpression, TypeDeclaration, VarDeclaration } from "@alloy-js/typescript";
10
- import { usePowerlines } from "@powerlines/alloy/core/contexts/context";
11
- import { refkey } from "@powerlines/alloy/helpers/refkey";
12
- import { BuiltinFile } from "@powerlines/alloy/typescript/components/builtin-file";
13
- import { TSDoc, TSDocExample, TSDocLink, TSDocParam, TSDocRemarks, TSDocReturns, TSDocThrows } from "@powerlines/alloy/typescript/components/tsdoc";
14
- import { TypeScriptInterface } from "@powerlines/alloy/typescript/components/typescript-interface";
15
- import { TypescriptObject } from "@powerlines/alloy/typescript/components/typescript-object";
16
16
 
17
17
  //#region ../plugin-env/src/components/env.tsx
18
18
  /**
@@ -134,9 +134,9 @@ function ConfigPropertySet(props) {
134
134
  `
135
135
  }) });
136
136
  }
137
- const createEnvRefkey = refkey("createEnv");
138
- const envRefkey = refkey("env");
139
- const envSerializerRefkey = refkey("EnvSerializer");
137
+ const createEnvRefkey = refkey$1("createEnv");
138
+ const envRefkey = refkey$1("env");
139
+ const envSerializerRefkey = refkey$1("EnvSerializer");
140
140
  /**
141
141
  * Generates the environment configuration module for the Powerlines project.
142
142
  */
@@ -355,12 +355,123 @@ function EnvBuiltin(props) {
355
355
  type: "Env",
356
356
  export: true,
357
357
  const: true,
358
- initializer: /* @__PURE__ */ jsxs(Fragment, { children: [
359
- code`createEnv(`,
360
- defaultConfig || "{}",
361
- code` as Partial<Env>)`
362
- ] })
363
- })
358
+ initializer: /* @__PURE__ */ jsx(Fragment, { children: code`createEnv(${defaultConfig || "{}"} as Partial<Env>);` })
359
+ }),
360
+ /* @__PURE__ */ jsx("hbr", {}),
361
+ /* @__PURE__ */ jsx("hbr", {}),
362
+ /* @__PURE__ */ jsx(VarDeclaration, {
363
+ export: true,
364
+ const: true,
365
+ name: "isCI",
366
+ doc: "Detect if the application is running in a CI environment.",
367
+ initializer: code`Boolean(
368
+ env.CI ||
369
+ env.RUN_ID ||
370
+ env.AGOLA_GIT_REF ||
371
+ env.AC_APPCIRCLE ||
372
+ env.APPVEYOR ||
373
+ env.CODEBUILD ||
374
+ env.TF_BUILD ||
375
+ env.bamboo_planKey ||
376
+ env.BITBUCKET_COMMIT ||
377
+ env.BITRISE_IO ||
378
+ env.BUDDY_WORKSPACE_ID ||
379
+ env.BUILDKITE ||
380
+ env.CIRCLECI ||
381
+ env.CIRRUS_CI ||
382
+ env.CF_BUILD_ID ||
383
+ env.CM_BUILD_ID ||
384
+ env.CI_NAME ||
385
+ env.DRONE ||
386
+ env.DSARI ||
387
+ env.EARTHLY_CI ||
388
+ env.EAS_BUILD ||
389
+ env.GERRIT_PROJECT ||
390
+ env.GITEA_ACTIONS ||
391
+ env.GITHUB_ACTIONS ||
392
+ env.GITLAB_CI ||
393
+ env.GOCD ||
394
+ env.BUILDER_OUTPUT ||
395
+ env.HARNESS_BUILD_ID ||
396
+ env.JENKINS_URL ||
397
+ env.LAYERCI ||
398
+ env.MAGNUM ||
399
+ env.NETLIFY ||
400
+ env.NEVERCODE ||
401
+ env.PROW_JOB_ID ||
402
+ env.RELEASE_BUILD_ID ||
403
+ env.RENDER ||
404
+ env.SAILCI ||
405
+ env.HUDSON ||
406
+ env.SCREWDRIVER ||
407
+ env.SEMAPHORE ||
408
+ env.SOURCEHUT ||
409
+ env.STRIDER ||
410
+ env.TASK_ID ||
411
+ env.RUN_ID ||
412
+ env.TEAMCITY_VERSION ||
413
+ env.TRAVIS ||
414
+ env.VELA ||
415
+ env.NOW_BUILDER ||
416
+ env.APPCENTER_BUILD_ID ||
417
+ env.CI_XCODE_PROJECT ||
418
+ env.XCS || false
419
+ );
420
+ `
421
+ }),
422
+ /* @__PURE__ */ jsx("hbr", {}),
423
+ /* @__PURE__ */ jsx("hbr", {}),
424
+ /* @__PURE__ */ jsx(TSDoc, {
425
+ heading: "Detect the \\`mode\\` of the current runtime environment.",
426
+ children: /* @__PURE__ */ jsx(TSDocRemarks, { children: 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, Storm Software generally only allows a value in the following list:
427
+ - \`production\`
428
+ - \`test\`
429
+ - \`development\`` })
430
+ }),
431
+ /* @__PURE__ */ jsx(VarDeclaration, {
432
+ export: true,
433
+ const: true,
434
+ name: "mode",
435
+ initializer: code`String(env.MODE) || "production"; `
436
+ }),
437
+ /* @__PURE__ */ jsx("hbr", {}),
438
+ /* @__PURE__ */ jsx("hbr", {}),
439
+ /* @__PURE__ */ jsx(VarDeclaration, {
440
+ export: true,
441
+ const: true,
442
+ name: "isProduction",
443
+ doc: "Detect if the application is running in \\\"production\\\\\" mode",
444
+ initializer: code`["prd", "prod", "production"].includes(mode.toLowerCase()); `
445
+ }),
446
+ /* @__PURE__ */ jsx("hbr", {}),
447
+ /* @__PURE__ */ jsx("hbr", {}),
448
+ /* @__PURE__ */ jsx(VarDeclaration, {
449
+ export: true,
450
+ const: true,
451
+ name: "isTest",
452
+ doc: "Detect if the application is running in \"test\" mode",
453
+ initializer: code`["tst", "test", "testing", "stg", "stage", "staging"].includes(mode.toLowerCase()) || env.TEST; `
454
+ }),
455
+ /* @__PURE__ */ jsx("hbr", {}),
456
+ /* @__PURE__ */ jsx("hbr", {}),
457
+ /* @__PURE__ */ jsx(VarDeclaration, {
458
+ export: true,
459
+ const: true,
460
+ name: "isDevelopment",
461
+ doc: "Detect if the application is running in \"development\" mode",
462
+ initializer: code`["dev", "development"].includes(mode.toLowerCase()); `
463
+ }),
464
+ /* @__PURE__ */ jsx("hbr", {}),
465
+ /* @__PURE__ */ jsx("hbr", {}),
466
+ /* @__PURE__ */ jsx(VarDeclaration, {
467
+ export: true,
468
+ const: true,
469
+ name: "isDebug",
470
+ doc: "Detect if the application is running in \"debug\" mode",
471
+ initializer: code`Boolean(isDevelopment && env.DEBUG); `
472
+ }),
473
+ /* @__PURE__ */ jsx("hbr", {}),
474
+ /* @__PURE__ */ jsx("hbr", {})
364
475
  ]
365
476
  });
366
477
  }
@@ -1,5 +1,5 @@
1
1
  import "../entry.mjs";
2
- import { replacePath } from "@stryke/path/replace";
2
+ import { replaceExtension, replacePath } from "@stryke/path/replace";
3
3
  import { joinPaths } from "@stryke/path/join-paths";
4
4
  import defu from "defu";
5
5
  import { isString } from "@stryke/type-checks/is-string";
@@ -1,5 +1,5 @@
1
1
  import "../plugin-utils/paths.mjs";
2
- import { replacePath } from "@stryke/path/replace";
2
+ import { replaceExtension, replacePath } from "@stryke/path/replace";
3
3
  import { toArray } from "@stryke/convert/to-array";
4
4
  import "@stryke/fs/is-file";
5
5
  import { listFiles } from "@stryke/fs/list-files";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-date",
3
- "version": "0.12.136",
3
+ "version": "0.12.138",
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": {
@@ -128,15 +128,15 @@
128
128
  "files": ["dist/**/*"],
129
129
  "keywords": ["powerlines", "storm-software", "powerlines-plugin"],
130
130
  "dependencies": {
131
- "@powerlines/plugin-env": "^0.14.26",
131
+ "@powerlines/plugin-env": "^0.15.0",
132
132
  "@storm-software/config-tools": "^1.188.75",
133
133
  "@stryke/path": "^0.24.1",
134
- "powerlines": "^0.36.25"
134
+ "powerlines": "^0.36.26"
135
135
  },
136
136
  "devDependencies": {
137
- "@powerlines/nx": "^0.11.51",
137
+ "@powerlines/nx": "^0.11.52",
138
138
  "@types/node": "^24.10.4"
139
139
  },
140
140
  "publishConfig": { "access": "public" },
141
- "gitHead": "63a6c6a06f250bbb7d2a4576ae1706bb07e0c652"
141
+ "gitHead": "41988f81e266a609148fcac22a535e5f12bbeb5f"
142
142
  }