@powerlines/plugin-env 0.15.59 → 0.15.61
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/babel/plugin.cjs +6 -6
- package/dist/babel/plugin.mjs +6 -6
- package/dist/components/docs.cjs +4 -4
- package/dist/components/docs.mjs +4 -4
- package/dist/components/env.cjs +2 -2
- package/dist/components/env.mjs +2 -2
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/helpers/automd-generator.cjs +2 -2
- package/dist/helpers/automd-generator.mjs +2 -2
- package/dist/helpers/index.cjs +1 -1
- package/dist/helpers/index.mjs +1 -1
- package/dist/helpers/load.cjs +4 -4
- package/dist/helpers/load.mjs +4 -4
- package/dist/helpers/persistence.cjs +6 -6
- package/dist/helpers/persistence.mjs +6 -6
- package/dist/helpers/reflect.cjs +4 -4
- package/dist/helpers/reflect.mjs +4 -4
- package/dist/index.cjs +25 -25
- package/dist/index.mjs +25 -25
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/parse-type-definition.cjs +37 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/parse-type-definition.mjs +37 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/to-array.cjs +15 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/to-array.mjs +14 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +15 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +14 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +6 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +6 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +19 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +19 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +63 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +63 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +12 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +11 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +15 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +16 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/is-parent-path.cjs +32 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/is-parent-path.mjs +32 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/is-type.cjs +28 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/is-type.mjs +28 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.cjs +106 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.mjs +106 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/regex.cjs +12 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/regex.mjs +8 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/slash.cjs +15 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/slash.mjs +14 -0
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.cjs +1 -1
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.mjs +1 -1
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.cjs +1 -1
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +1 -1
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.cjs +1 -1
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs +1 -1
- package/dist/packages/powerlines/src/types/config.d.mts +1 -1
- package/package.json +16 -16
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/parse-type-definition.cjs +0 -31
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/parse-type-definition.mjs +0 -31
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/to-array.cjs +0 -8
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/to-array.mjs +0 -7
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +0 -6
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +0 -5
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +0 -6
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +0 -6
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +0 -13
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +0 -13
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +0 -13
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +0 -13
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +0 -11
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +0 -11
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/is-parent-path.cjs +0 -10
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/is-parent-path.mjs +0 -10
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/is-type.cjs +0 -13
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/is-type.mjs +0 -13
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/join-paths.cjs +0 -49
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/join-paths.mjs +0 -49
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/regex.cjs +0 -9
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/regex.mjs +0 -5
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/slash.cjs +0 -8
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/slash.mjs +0 -7
- /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.32 → @stryke_convert@0.6.34}/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.32 → @stryke_convert@0.6.34}/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +0 -0
- /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.32 → @stryke_convert@0.6.34}/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.32 → @stryke_convert@0.6.34}/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +0 -0
package/dist/babel/plugin.cjs
CHANGED
|
@@ -2,18 +2,18 @@ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
|
2
2
|
const require_types_plugin = require('../types/plugin.cjs');
|
|
3
3
|
const require_helpers_persistence = require('../helpers/persistence.cjs');
|
|
4
4
|
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
5
|
-
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
6
|
-
let powerlines_types_babel = require("powerlines/types/babel");
|
|
7
|
-
let __babel_core = require("@babel/core");
|
|
8
5
|
let __powerlines_deepkit_capnp = require("@powerlines/deepkit/capnp");
|
|
9
6
|
let __powerlines_deepkit_schemas_reflection = require("@powerlines/deepkit/schemas/reflection");
|
|
10
|
-
let __powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
|
|
11
|
-
let __powerlines_plugin_babel_helpers_create_plugin = require("@powerlines/plugin-babel/helpers/create-plugin");
|
|
12
|
-
let __powerlines_plugin_babel_helpers_module_helpers = require("@powerlines/plugin-babel/helpers/module-helpers");
|
|
13
7
|
let __stryke_capnp = require("@stryke/capnp");
|
|
14
8
|
__stryke_capnp = require_rolldown_runtime.__toESM(__stryke_capnp);
|
|
15
9
|
let __stryke_fs_buffer = require("@stryke/fs/buffer");
|
|
16
10
|
let node_fs = require("node:fs");
|
|
11
|
+
let powerlines_types_babel = require("powerlines/types/babel");
|
|
12
|
+
let __babel_core = require("@babel/core");
|
|
13
|
+
let __powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
|
|
14
|
+
let __powerlines_plugin_babel_helpers_create_plugin = require("@powerlines/plugin-babel/helpers/create-plugin");
|
|
15
|
+
let __powerlines_plugin_babel_helpers_module_helpers = require("@powerlines/plugin-babel/helpers/module-helpers");
|
|
16
|
+
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
17
17
|
|
|
18
18
|
//#region src/babel/plugin.ts
|
|
19
19
|
function __assignType(fn, args) {
|
package/dist/babel/plugin.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { __ΩEnvPluginContext } from "../types/plugin.mjs";
|
|
2
2
|
import { getEnvReflectionsPath } from "../helpers/persistence.mjs";
|
|
3
3
|
import { ReflectionClass, ReflectionKind, deserializeType, resolveClassType } from "@powerlines/deepkit/vendor/type";
|
|
4
|
-
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
5
|
-
import { __ΩBabelPluginPass } from "powerlines/types/babel";
|
|
6
|
-
import { NodePath } from "@babel/core";
|
|
7
4
|
import { convertFromCapnp } from "@powerlines/deepkit/capnp";
|
|
8
5
|
import { SerializedTypes } from "@powerlines/deepkit/schemas/reflection";
|
|
9
|
-
import { stringifyDefaultValue } from "@powerlines/deepkit/utilities";
|
|
10
|
-
import { createBabelPlugin } from "@powerlines/plugin-babel/helpers/create-plugin";
|
|
11
|
-
import { addImport } from "@powerlines/plugin-babel/helpers/module-helpers";
|
|
12
6
|
import * as capnp from "@stryke/capnp";
|
|
13
7
|
import { readFileBufferSync } from "@stryke/fs/buffer";
|
|
14
8
|
import { existsSync } from "node:fs";
|
|
9
|
+
import { __ΩBabelPluginPass } from "powerlines/types/babel";
|
|
10
|
+
import { NodePath } from "@babel/core";
|
|
11
|
+
import { stringifyDefaultValue } from "@powerlines/deepkit/utilities";
|
|
12
|
+
import { createBabelPlugin } from "@powerlines/plugin-babel/helpers/create-plugin";
|
|
13
|
+
import { addImport } from "@powerlines/plugin-babel/helpers/module-helpers";
|
|
14
|
+
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
15
15
|
|
|
16
16
|
//#region src/babel/plugin.ts
|
|
17
17
|
function __assignType(fn, args) {
|
package/dist/components/docs.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.
|
|
2
|
+
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
3
3
|
const require_helpers_create_reflection_resource = require('../helpers/create-reflection-resource.cjs');
|
|
4
|
-
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
4
|
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
6
5
|
let __alloy_js_core = require("@alloy-js/core");
|
|
7
|
-
let
|
|
6
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
8
7
|
let __alloy_js_markdown = require("@alloy-js/markdown");
|
|
8
|
+
let __powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
9
9
|
let __powerlines_plugin_alloy_markdown_components_markdown_file = require("@powerlines/plugin-alloy/markdown/components/markdown-file");
|
|
10
10
|
let __powerlines_plugin_alloy_markdown_components_markdown_table = require("@powerlines/plugin-alloy/markdown/components/markdown-table");
|
|
11
11
|
|
|
@@ -19,7 +19,7 @@ function EnvDocs() {
|
|
|
19
19
|
const reflection = require_helpers_create_reflection_resource.createReflectionResource(context);
|
|
20
20
|
return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_markdown_components_markdown_file.MarkdownFile, {
|
|
21
21
|
get path() {
|
|
22
|
-
return require_join_paths.
|
|
22
|
+
return require_join_paths.joinPaths(context.config.projectRoot, "docs", "generated", "env.md");
|
|
23
23
|
},
|
|
24
24
|
get children() {
|
|
25
25
|
return [
|
package/dist/components/docs.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
2
2
|
import { createReflectionResource } from "../helpers/create-reflection-resource.mjs";
|
|
3
|
-
import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
4
3
|
import { stringifyType } from "@powerlines/deepkit/vendor/type";
|
|
5
4
|
import { Show, code } from "@alloy-js/core";
|
|
6
|
-
import {
|
|
5
|
+
import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
7
6
|
import { Heading, Link } from "@alloy-js/markdown";
|
|
7
|
+
import { usePowerlinesSafe } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
8
8
|
import { MarkdownFile } from "@powerlines/plugin-alloy/markdown/components/markdown-file";
|
|
9
9
|
import { MarkdownTable } from "@powerlines/plugin-alloy/markdown/components/markdown-table";
|
|
10
10
|
|
|
@@ -18,7 +18,7 @@ function EnvDocs() {
|
|
|
18
18
|
const reflection = createReflectionResource(context);
|
|
19
19
|
return createComponent(MarkdownFile, {
|
|
20
20
|
get path() {
|
|
21
|
-
return
|
|
21
|
+
return joinPaths(context.config.projectRoot, "docs", "generated", "env.md");
|
|
22
22
|
},
|
|
23
23
|
get children() {
|
|
24
24
|
return [
|
package/dist/components/env.cjs
CHANGED
|
@@ -2,12 +2,12 @@ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
|
2
2
|
const require_defu = require('../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs');
|
|
3
3
|
const require_helpers_load = require('../helpers/load.cjs');
|
|
4
4
|
const require_helpers_create_reflection_resource = require('../helpers/create-reflection-resource.cjs');
|
|
5
|
-
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
5
|
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
7
6
|
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
8
7
|
let __alloy_js_core = require("@alloy-js/core");
|
|
9
|
-
let
|
|
8
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
10
9
|
let __powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
10
|
+
let __alloy_js_typescript = require("@alloy-js/typescript");
|
|
11
11
|
let __powerlines_plugin_alloy_helpers_refkey = require("@powerlines/plugin-alloy/helpers/refkey");
|
|
12
12
|
let __powerlines_plugin_alloy_typescript_components_builtin_file = require("@powerlines/plugin-alloy/typescript/components/builtin-file");
|
|
13
13
|
let __powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
package/dist/components/env.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defu } from "../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs";
|
|
2
2
|
import { loadEnvFromContext } from "../helpers/load.mjs";
|
|
3
3
|
import { createReflectionResource } from "../helpers/create-reflection-resource.mjs";
|
|
4
|
-
import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
5
4
|
import { ReflectionClass, ReflectionKind } from "@powerlines/deepkit/vendor/type";
|
|
6
5
|
import { titleCase } from "@stryke/string-format/title-case";
|
|
7
6
|
import { For, Show, code, computed, splitProps } from "@alloy-js/core";
|
|
8
|
-
import {
|
|
7
|
+
import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
9
8
|
import { usePowerlinesSafe } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
9
|
+
import { ClassDeclaration, ClassMethod, ElseIfClause, FunctionDeclaration, IfStatement, NewExpression, TypeDeclaration, VarDeclaration } from "@alloy-js/typescript";
|
|
10
10
|
import { refkey } from "@powerlines/plugin-alloy/helpers/refkey";
|
|
11
11
|
import { BuiltinFile } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
|
|
12
12
|
import { TSDoc, TSDocExample, TSDocLink, TSDocParam, TSDocRemarks, TSDocReturns, TSDocThrows } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_components_env = require('./env.cjs');
|
|
2
1
|
const require_components_docs = require('./docs.cjs');
|
|
2
|
+
const require_components_env = require('./env.cjs');
|
|
3
3
|
|
|
4
4
|
exports.EnvBuiltin = require_components_env.EnvBuiltin;
|
|
5
5
|
exports.EnvDocs = require_components_docs.EnvDocs;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.
|
|
2
|
+
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
3
3
|
let powerlines_types_context = require("powerlines/types/context");
|
|
4
4
|
let automd = require("automd");
|
|
5
5
|
|
|
@@ -17,7 +17,7 @@ function __assignType(fn, args) {
|
|
|
17
17
|
const env = __assignType((context) => (0, automd.defineGenerator)({
|
|
18
18
|
name: "env",
|
|
19
19
|
generate: __assignType(async function generate() {
|
|
20
|
-
const envDocFile = require_join_paths.
|
|
20
|
+
const envDocFile = require_join_paths.joinPaths(context.config.projectRoot, "docs", "generated", "env.md");
|
|
21
21
|
if (!context.fs.existsSync(envDocFile)) return { contents: "" };
|
|
22
22
|
return { contents: await context.fs.read(envDocFile) || "" };
|
|
23
23
|
}, ["generate", "P\"/!"])
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
2
2
|
import { __ΩUnresolvedContext } from "powerlines/types/context";
|
|
3
3
|
import { defineGenerator } from "automd";
|
|
4
4
|
|
|
@@ -16,7 +16,7 @@ function __assignType(fn, args) {
|
|
|
16
16
|
const env = __assignType((context) => defineGenerator({
|
|
17
17
|
name: "env",
|
|
18
18
|
generate: __assignType(async function generate() {
|
|
19
|
-
const envDocFile =
|
|
19
|
+
const envDocFile = joinPaths(context.config.projectRoot, "docs", "generated", "env.md");
|
|
20
20
|
if (!context.fs.existsSync(envDocFile)) return { contents: "" };
|
|
21
21
|
return { contents: await context.fs.read(envDocFile) || "" };
|
|
22
22
|
}, ["generate", "P\"/!"])
|
package/dist/helpers/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_helpers_reflect = require('./reflect.cjs');
|
|
2
2
|
const require_helpers_persistence = require('./persistence.cjs');
|
|
3
|
+
const require_helpers_template_helpers = require('./template-helpers.cjs');
|
|
3
4
|
const require_helpers_source_file_env = require('./source-file-env.cjs');
|
|
4
5
|
const require_helpers_load = require('./load.cjs');
|
|
5
6
|
const require_helpers_create_reflection_resource = require('./create-reflection-resource.cjs');
|
|
6
|
-
const require_helpers_template_helpers = require('./template-helpers.cjs');
|
|
7
7
|
|
|
8
8
|
exports.BaseEnv = require_helpers_reflect.BaseEnv;
|
|
9
9
|
exports.BaseSecrets = require_helpers_reflect.BaseSecrets;
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseEnv, BaseSecrets, __ΩCreateEnvReflectionOptions, createEnvReflection, createSecretsReflection, mergeEnvReflections, mergeSecretsReflections, reflectEnv, reflectSecrets } from "./reflect.mjs";
|
|
2
2
|
import { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, readEnvReflection, readEnvTypeReflection, readSecretsReflection, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection } from "./persistence.mjs";
|
|
3
|
+
import { createTemplateReflection } from "./template-helpers.mjs";
|
|
3
4
|
import { formatEnvField, removeEnvPrefix } from "./source-file-env.mjs";
|
|
4
5
|
import { loadEnv, loadEnvFromContext } from "./load.mjs";
|
|
5
6
|
import { createReflectionResource } from "./create-reflection-resource.mjs";
|
|
6
|
-
import { createTemplateReflection } from "./template-helpers.mjs";
|
|
7
7
|
|
|
8
8
|
export { BaseEnv, BaseSecrets, __ΩCreateEnvReflectionOptions, createEnvReflection, createReflectionResource, createSecretsReflection, createTemplateReflection, formatEnvField, getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, loadEnv, loadEnvFromContext, mergeEnvReflections, mergeSecretsReflections, readEnvReflection, readEnvTypeReflection, readSecretsReflection, reflectEnv, reflectSecrets, removeEnvPrefix, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
|
package/dist/helpers/load.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
3
|
-
const require_defu = require('../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs');
|
|
4
2
|
const require_types_plugin = require('../types/plugin.cjs');
|
|
5
|
-
const
|
|
3
|
+
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
6
4
|
const require_helpers_source_file_env = require('./source-file-env.cjs');
|
|
5
|
+
const require_defu = require('../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs');
|
|
6
|
+
const require_index = require('../node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.cjs');
|
|
7
7
|
let powerlines_types_config = require("powerlines/types/config");
|
|
8
8
|
let __stryke_env_load_env = require("@stryke/env/load-env");
|
|
9
9
|
let __stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
|
|
@@ -49,7 +49,7 @@ async function loadEnvDirectory(options, directory, mode, cacheDir, packageJson,
|
|
|
49
49
|
packageJson: true,
|
|
50
50
|
dotenv: true,
|
|
51
51
|
jitiOptions: {
|
|
52
|
-
fsCache: require_join_paths.
|
|
52
|
+
fsCache: require_join_paths.joinPaths(cacheDir, "jiti"),
|
|
53
53
|
moduleCache: true
|
|
54
54
|
}
|
|
55
55
|
})]);
|
package/dist/helpers/load.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { o } from "../node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
2
|
-
import { defu } from "../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs";
|
|
3
1
|
import { __ΩEnvPluginContext, __ΩEnvPluginOptions } from "../types/plugin.mjs";
|
|
4
|
-
import {
|
|
2
|
+
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
5
3
|
import { removeEnvPrefix } from "./source-file-env.mjs";
|
|
4
|
+
import { defu } from "../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs";
|
|
5
|
+
import { loadConfig } from "../node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.mjs";
|
|
6
6
|
import { __ΩWorkspaceConfig } from "powerlines/types/config";
|
|
7
7
|
import { loadEnv as loadEnv$1, loadEnvFile } from "@stryke/env/load-env";
|
|
8
8
|
import { kebabCase } from "@stryke/string-format/kebab-case";
|
|
@@ -48,7 +48,7 @@ async function loadEnvDirectory(options, directory, mode, cacheDir, packageJson,
|
|
|
48
48
|
packageJson: true,
|
|
49
49
|
dotenv: true,
|
|
50
50
|
jitiOptions: {
|
|
51
|
-
fsCache:
|
|
51
|
+
fsCache: joinPaths(cacheDir, "jiti"),
|
|
52
52
|
moduleCache: true
|
|
53
53
|
}
|
|
54
54
|
})]);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
3
2
|
const require_types_plugin = require('../types/plugin.cjs');
|
|
3
|
+
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
4
4
|
const require_helpers_reflect = require('./reflect.cjs');
|
|
5
5
|
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
6
|
+
let powerlines_types_context = require("powerlines/types/context");
|
|
6
7
|
let __powerlines_deepkit_capnp = require("@powerlines/deepkit/capnp");
|
|
8
|
+
let __powerlines_deepkit_resolve_reflections = require("@powerlines/deepkit/resolve-reflections");
|
|
7
9
|
let __powerlines_deepkit_schemas_reflection = require("@powerlines/deepkit/schemas/reflection");
|
|
8
10
|
let __stryke_capnp = require("@stryke/capnp");
|
|
9
11
|
__stryke_capnp = require_rolldown_runtime.__toESM(__stryke_capnp);
|
|
10
12
|
let __stryke_fs_buffer = require("@stryke/fs/buffer");
|
|
11
|
-
let node_fs = require("node:fs");
|
|
12
|
-
let powerlines_types_context = require("powerlines/types/context");
|
|
13
|
-
let __powerlines_deepkit_resolve_reflections = require("@powerlines/deepkit/resolve-reflections");
|
|
14
13
|
let __stryke_type_checks_is_empty_object = require("@stryke/type-checks/is-empty-object");
|
|
14
|
+
let node_fs = require("node:fs");
|
|
15
15
|
|
|
16
16
|
//#region src/helpers/persistence.ts
|
|
17
17
|
/**
|
|
@@ -79,7 +79,7 @@ getSecretsDefaultTypeDefinition.__type = [
|
|
|
79
79
|
* @returns The path to the environment type reflections.
|
|
80
80
|
*/
|
|
81
81
|
function getEnvTypeReflectionsPath(context, name = "env") {
|
|
82
|
-
return require_join_paths.
|
|
82
|
+
return require_join_paths.joinPaths((0, __powerlines_deepkit_resolve_reflections.getReflectionsPath)(context), "env", `${name}-types.bin`);
|
|
83
83
|
}
|
|
84
84
|
getEnvTypeReflectionsPath.__type = [
|
|
85
85
|
() => powerlines_types_context.__ΩContext,
|
|
@@ -157,7 +157,7 @@ writeEnvTypeReflection.__type = [
|
|
|
157
157
|
"Pn!2\"P\"7#2$n%2&>'\"/(?)"
|
|
158
158
|
];
|
|
159
159
|
function getEnvReflectionsPath(context, name) {
|
|
160
|
-
return require_join_paths.
|
|
160
|
+
return require_join_paths.joinPaths((0, __powerlines_deepkit_resolve_reflections.getReflectionsPath)(context), "env", `${name}.bin`);
|
|
161
161
|
}
|
|
162
162
|
getEnvReflectionsPath.__type = [
|
|
163
163
|
() => require_types_plugin.__ΩEnvPluginContext,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { o } from "../node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
2
1
|
import { __ΩEnvPluginContext, __ΩEnvPluginResolvedConfig, __ΩEnvType } from "../types/plugin.mjs";
|
|
2
|
+
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
3
3
|
import { createEnvReflection } from "./reflect.mjs";
|
|
4
4
|
import { ReflectionClass, ReflectionKind, deserializeType, resolveClassType } from "@powerlines/deepkit/vendor/type";
|
|
5
|
+
import { __ΩContext, __ΩUnresolvedContext } from "powerlines/types/context";
|
|
5
6
|
import { convertFromCapnp, convertToCapnp } from "@powerlines/deepkit/capnp";
|
|
7
|
+
import { getReflectionsPath } from "@powerlines/deepkit/resolve-reflections";
|
|
6
8
|
import { SerializedTypes } from "@powerlines/deepkit/schemas/reflection";
|
|
7
9
|
import * as capnp from "@stryke/capnp";
|
|
8
10
|
import { readFileBuffer, writeFileBuffer, writeFileBufferSync } from "@stryke/fs/buffer";
|
|
9
|
-
import { existsSync } from "node:fs";
|
|
10
|
-
import { __ΩContext, __ΩUnresolvedContext } from "powerlines/types/context";
|
|
11
|
-
import { getReflectionsPath } from "@powerlines/deepkit/resolve-reflections";
|
|
12
11
|
import { isEmptyObject } from "@stryke/type-checks/is-empty-object";
|
|
12
|
+
import { existsSync } from "node:fs";
|
|
13
13
|
|
|
14
14
|
//#region src/helpers/persistence.ts
|
|
15
15
|
/**
|
|
@@ -77,7 +77,7 @@ getSecretsDefaultTypeDefinition.__type = [
|
|
|
77
77
|
* @returns The path to the environment type reflections.
|
|
78
78
|
*/
|
|
79
79
|
function getEnvTypeReflectionsPath(context, name = "env") {
|
|
80
|
-
return
|
|
80
|
+
return joinPaths(getReflectionsPath(context), "env", `${name}-types.bin`);
|
|
81
81
|
}
|
|
82
82
|
getEnvTypeReflectionsPath.__type = [
|
|
83
83
|
() => __ΩContext,
|
|
@@ -155,7 +155,7 @@ writeEnvTypeReflection.__type = [
|
|
|
155
155
|
"Pn!2\"P\"7#2$n%2&>'\"/(?)"
|
|
156
156
|
];
|
|
157
157
|
function getEnvReflectionsPath(context, name) {
|
|
158
|
-
return
|
|
158
|
+
return joinPaths(getReflectionsPath(context), "env", `${name}.bin`);
|
|
159
159
|
}
|
|
160
160
|
getEnvReflectionsPath.__type = [
|
|
161
161
|
() => __ΩEnvPluginContext,
|
package/dist/helpers/reflect.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_is_parent_path = require('../node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/is-parent-path.cjs');
|
|
3
|
-
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
4
2
|
const require_types_runtime = require('../types/runtime.cjs');
|
|
5
3
|
const require_types_plugin = require('../types/plugin.cjs');
|
|
4
|
+
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
5
|
+
const require_is_parent_path = require('../node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/is-parent-path.cjs');
|
|
6
6
|
const require_helpers_persistence = require('./persistence.cjs');
|
|
7
7
|
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
8
8
|
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
@@ -211,7 +211,7 @@ createSecretsReflection.__type = [
|
|
|
211
211
|
async function reflectEnv(context, file, name) {
|
|
212
212
|
let config;
|
|
213
213
|
if (file) config = (0, __powerlines_deepkit_vendor_type.resolveClassType)(await (0, __powerlines_deepkit_reflect_type.reflectType)(context, {
|
|
214
|
-
file: !require_is_parent_path.
|
|
214
|
+
file: !require_is_parent_path.isParentPath(file, context.workspaceConfig.workspaceRoot) ? require_join_paths.joinPaths(context.workspaceConfig.workspaceRoot, file) : file,
|
|
215
215
|
name
|
|
216
216
|
}));
|
|
217
217
|
const defaultConfigType = await (0, __powerlines_deepkit_reflect_type.reflectType)(context, await require_helpers_persistence.getEnvDefaultTypeDefinition(context));
|
|
@@ -232,7 +232,7 @@ reflectEnv.__type = [
|
|
|
232
232
|
async function reflectSecrets(context, file, name) {
|
|
233
233
|
let config;
|
|
234
234
|
if (file) config = (0, __powerlines_deepkit_vendor_type.resolveClassType)(await (0, __powerlines_deepkit_reflect_type.reflectType)(context, {
|
|
235
|
-
file: !require_is_parent_path.
|
|
235
|
+
file: !require_is_parent_path.isParentPath(file, context.workspaceConfig.workspaceRoot) ? require_join_paths.joinPaths(context.workspaceConfig.workspaceRoot, file) : file,
|
|
236
236
|
name
|
|
237
237
|
}));
|
|
238
238
|
const defaultSecretsType = await (0, __powerlines_deepkit_reflect_type.reflectType)(context, await require_helpers_persistence.getSecretsDefaultTypeDefinition(context));
|
package/dist/helpers/reflect.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t } from "../node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/is-parent-path.mjs";
|
|
2
|
-
import { o } from "../node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
3
1
|
import { __ΩEnvInterface, __ΩSecretsInterface } from "../types/runtime.mjs";
|
|
4
2
|
import { __ΩEnvPluginContext } from "../types/plugin.mjs";
|
|
3
|
+
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
4
|
+
import { isParentPath } from "../node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/is-parent-path.mjs";
|
|
5
5
|
import { getEnvDefaultTypeDefinition, getSecretsDefaultTypeDefinition, readEnvTypeReflection, readSecretsReflection } from "./persistence.mjs";
|
|
6
6
|
import { ReflectionClass, ReflectionKind, __ΩTypeClass, __ΩTypeObjectLiteral, merge, resolveClassType } from "@powerlines/deepkit/vendor/type";
|
|
7
7
|
import { titleCase } from "@stryke/string-format/title-case";
|
|
@@ -210,7 +210,7 @@ createSecretsReflection.__type = [
|
|
|
210
210
|
async function reflectEnv(context, file, name) {
|
|
211
211
|
let config;
|
|
212
212
|
if (file) config = resolveClassType(await reflectType(context, {
|
|
213
|
-
file: !
|
|
213
|
+
file: !isParentPath(file, context.workspaceConfig.workspaceRoot) ? joinPaths(context.workspaceConfig.workspaceRoot, file) : file,
|
|
214
214
|
name
|
|
215
215
|
}));
|
|
216
216
|
const defaultConfigType = await reflectType(context, await getEnvDefaultTypeDefinition(context));
|
|
@@ -231,7 +231,7 @@ reflectEnv.__type = [
|
|
|
231
231
|
async function reflectSecrets(context, file, name) {
|
|
232
232
|
let config;
|
|
233
233
|
if (file) config = resolveClassType(await reflectType(context, {
|
|
234
|
-
file: !
|
|
234
|
+
file: !isParentPath(file, context.workspaceConfig.workspaceRoot) ? joinPaths(context.workspaceConfig.workspaceRoot, file) : file,
|
|
235
235
|
name
|
|
236
236
|
}));
|
|
237
237
|
const defaultSecretsType = await reflectType(context, await getSecretsDefaultTypeDefinition(context));
|
package/dist/index.cjs
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
3
|
-
const require_parse_type_definition = require('./node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/parse-type-definition.cjs');
|
|
4
|
-
const require_to_array = require('./node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/to-array.cjs');
|
|
5
|
-
const require_is_parent_path = require('./node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/is-parent-path.cjs');
|
|
6
|
-
const require_join_paths = require('./node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
7
|
-
const require_defu = require('./node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs');
|
|
8
3
|
const require_types_runtime = require('./types/runtime.cjs');
|
|
9
4
|
const require_types_plugin = require('./types/plugin.cjs');
|
|
5
|
+
require('./types/index.cjs');
|
|
6
|
+
const require_join_paths = require('./node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
7
|
+
const require_is_parent_path = require('./node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/is-parent-path.cjs');
|
|
10
8
|
const require_helpers_reflect = require('./helpers/reflect.cjs');
|
|
11
9
|
const require_helpers_persistence = require('./helpers/persistence.cjs');
|
|
12
|
-
const
|
|
10
|
+
const require_helpers_template_helpers = require('./helpers/template-helpers.cjs');
|
|
13
11
|
const require_helpers_source_file_env = require('./helpers/source-file-env.cjs');
|
|
12
|
+
const require_defu = require('./node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs');
|
|
14
13
|
const require_helpers_load = require('./helpers/load.cjs');
|
|
15
14
|
const require_helpers_create_reflection_resource = require('./helpers/create-reflection-resource.cjs');
|
|
16
|
-
|
|
15
|
+
require('./helpers/index.cjs');
|
|
17
16
|
const require_helpers_automd_generator = require('./helpers/automd-generator.cjs');
|
|
18
|
-
require('./babel/index.cjs');
|
|
19
17
|
const require_components_docs = require('./components/docs.cjs');
|
|
18
|
+
const require_components_env = require('./components/env.cjs');
|
|
20
19
|
require('./components/index.cjs');
|
|
21
|
-
const
|
|
22
|
-
require('./
|
|
23
|
-
require('./
|
|
24
|
-
|
|
20
|
+
const require_babel_plugin = require('./babel/plugin.cjs');
|
|
21
|
+
require('./babel/index.cjs');
|
|
22
|
+
const require_parse_type_definition = require('./node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/parse-type-definition.cjs');
|
|
23
|
+
const require_to_array = require('./node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/to-array.cjs');
|
|
25
24
|
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
25
|
+
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
26
|
+
let __stryke_env_types = require("@stryke/env/types");
|
|
27
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
28
|
+
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
26
29
|
let __powerlines_plugin_alloy = require("@powerlines/plugin-alloy");
|
|
27
30
|
__powerlines_plugin_alloy = require_rolldown_runtime.__toESM(__powerlines_plugin_alloy);
|
|
28
31
|
let __powerlines_plugin_automd = require("@powerlines/plugin-automd");
|
|
29
32
|
__powerlines_plugin_automd = require_rolldown_runtime.__toESM(__powerlines_plugin_automd);
|
|
30
33
|
let __powerlines_plugin_babel = require("@powerlines/plugin-babel");
|
|
31
34
|
__powerlines_plugin_babel = require_rolldown_runtime.__toESM(__powerlines_plugin_babel);
|
|
32
|
-
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
33
|
-
let __stryke_env_types = require("@stryke/env/types");
|
|
34
35
|
let __stryke_fs_exists = require("@stryke/fs/exists");
|
|
35
36
|
let __stryke_fs_helpers = require("@stryke/fs/helpers");
|
|
36
37
|
let __stryke_string_format_constant_case = require("@stryke/string-format/constant-case");
|
|
37
|
-
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
38
38
|
|
|
39
39
|
//#region src/index.tsx
|
|
40
40
|
/**
|
|
@@ -55,18 +55,18 @@ const plugin = (options = {}) => {
|
|
|
55
55
|
}),
|
|
56
56
|
transform: { babel: { plugins: [require_babel_plugin.envBabelPlugin] } }
|
|
57
57
|
};
|
|
58
|
-
if (config.env.types) config.env.types = require_parse_type_definition.
|
|
58
|
+
if (config.env.types) config.env.types = require_parse_type_definition.parseTypeDefinition(config.env.types);
|
|
59
59
|
else {
|
|
60
60
|
this.log(__storm_software_config_tools_types.LogLevelLabel.WARN, "The `env.types` configuration parameter was not provided. Please ensure this is expected.");
|
|
61
61
|
const envDefaultTypeDefinition = await require_helpers_persistence.getEnvDefaultTypeDefinition(this);
|
|
62
|
-
config.env.types = require_parse_type_definition.
|
|
62
|
+
config.env.types = require_parse_type_definition.parseTypeDefinition(`${envDefaultTypeDefinition.file}#${envDefaultTypeDefinition.name}`);
|
|
63
63
|
}
|
|
64
|
-
if (config.env.secrets) config.env.secrets = require_parse_type_definition.
|
|
64
|
+
if (config.env.secrets) config.env.secrets = require_parse_type_definition.parseTypeDefinition(config.env.secrets);
|
|
65
65
|
else {
|
|
66
66
|
const secretsDefaultTypeDefinition = await require_helpers_persistence.getSecretsDefaultTypeDefinition(this);
|
|
67
|
-
config.env.secrets = require_parse_type_definition.
|
|
67
|
+
config.env.secrets = require_parse_type_definition.parseTypeDefinition(`${secretsDefaultTypeDefinition.file}#${secretsDefaultTypeDefinition.name}`);
|
|
68
68
|
}
|
|
69
|
-
config.env.prefix = require_to_array.
|
|
69
|
+
config.env.prefix = require_to_array.toArray(config.env.prefix ?? []).reduce((ret, prefix) => {
|
|
70
70
|
const formattedPrefix = (0, __stryke_string_format_constant_case.constantCase)(prefix);
|
|
71
71
|
if (!ret.includes(formattedPrefix)) ret.push(formattedPrefix);
|
|
72
72
|
return ret;
|
|
@@ -75,7 +75,7 @@ const plugin = (options = {}) => {
|
|
|
75
75
|
"POWERLINES_",
|
|
76
76
|
this.config.framework && this.config.framework !== "powerlines" && `${(0, __stryke_string_format_constant_case.constantCase)(this.config.framework)}_`
|
|
77
77
|
].filter(Boolean));
|
|
78
|
-
config.env.prefix = require_to_array.
|
|
78
|
+
config.env.prefix = require_to_array.toArray(config.env.prefix).reduce((ret, prefix) => {
|
|
79
79
|
if (!ret.includes(prefix.replace(/_$/g, ""))) ret.push(prefix.replace(/_$/g, ""));
|
|
80
80
|
return ret;
|
|
81
81
|
}, []);
|
|
@@ -100,10 +100,10 @@ const plugin = (options = {}) => {
|
|
|
100
100
|
if ((0, __stryke_fs_exists.existsSync)(require_helpers_persistence.getEnvTypeReflectionsPath(this, "secrets"))) this.env.types.secrets = await require_helpers_persistence.readEnvTypeReflection(this, "secrets");
|
|
101
101
|
if ((0, __stryke_fs_exists.existsSync)(require_helpers_persistence.getEnvReflectionsPath(this, "secrets"))) this.env.used.secrets = await require_helpers_persistence.readSecretsReflection(this);
|
|
102
102
|
} else {
|
|
103
|
-
this.env.types.env = await require_helpers_reflect.reflectEnv(this, this.config.env.types?.file ? require_is_parent_path.
|
|
103
|
+
this.env.types.env = await require_helpers_reflect.reflectEnv(this, this.config.env.types?.file ? require_is_parent_path.isParentPath(this.config.env.types?.file, this.workspaceConfig.workspaceRoot) ? this.config.env.types?.file : require_join_paths.joinPaths(this.config.projectRoot, this.config.env.types?.file) : void 0, this.config.env.types?.name);
|
|
104
104
|
if (!this.env.types.env) throw new Error("Failed to find the environment configuration type reflection in the context.");
|
|
105
105
|
await require_helpers_persistence.writeEnvTypeReflection(this, this.env.types.env, "env");
|
|
106
|
-
this.env.types.secrets = await require_helpers_reflect.reflectSecrets(this, this.config.env.secrets?.file ? require_is_parent_path.
|
|
106
|
+
this.env.types.secrets = await require_helpers_reflect.reflectSecrets(this, this.config.env.secrets?.file ? require_is_parent_path.isParentPath(this.config.env.secrets?.file, this.workspaceConfig.workspaceRoot) ? this.config.env.secrets?.file : require_join_paths.joinPaths(this.config.projectRoot, this.config.env.secrets?.file) : void 0, this.config.env.secrets?.name);
|
|
107
107
|
if (!this.env.types.secrets) throw new Error("Failed to find the secrets configuration type reflection in the context.");
|
|
108
108
|
await require_helpers_persistence.writeEnvTypeReflection(this, this.env.types.secrets, "secrets");
|
|
109
109
|
this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Resolved ${this.env.types.env.getProperties().length ?? 0} environment configuration parameters and ${this.env.types.secrets?.getProperties().length ?? 0} secret configuration parameters`);
|
|
@@ -144,10 +144,10 @@ const plugin = (options = {}) => {
|
|
|
144
144
|
},
|
|
145
145
|
async docs() {
|
|
146
146
|
this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, "Writing Environment documentation for the Powerlines project artifacts.");
|
|
147
|
-
const outputPath = require_join_paths.
|
|
147
|
+
const outputPath = require_join_paths.joinPaths(this.config.projectRoot, "docs", "generated");
|
|
148
148
|
if (!(0, __stryke_fs_exists.existsSync)(outputPath)) await (0, __stryke_fs_helpers.createDirectory)(outputPath);
|
|
149
149
|
const reflection = await require_helpers_persistence.readEnvTypeReflection(this, "env");
|
|
150
|
-
const envDocFile = require_join_paths.
|
|
150
|
+
const envDocFile = require_join_paths.joinPaths(outputPath, "env.md");
|
|
151
151
|
this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Documenting environment variables configuration in "${envDocFile}"`);
|
|
152
152
|
await this.fs.write(envDocFile, `<!-- Generated by ${(0, __stryke_string_format_title_case.titleCase)(this.config.framework) || "Powerlines"} -->
|
|
153
153
|
|