@powerlines/plugin-env 0.15.9 → 0.15.11
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/index.cjs +3 -1
- package/dist/babel/index.d.cts +2 -1
- package/dist/babel/index.d.mts +2 -1
- package/dist/babel/index.mjs +1 -1
- package/dist/babel/plugin.cjs +7 -7
- package/dist/babel/plugin.mjs +6 -6
- package/dist/components/docs.cjs +4 -4
- package/dist/components/docs.mjs +3 -3
- package/dist/components/env.cjs +8 -8
- package/dist/components/env.mjs +6 -6
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/deepkit/src/utilities.cjs +2 -2
- package/dist/deepkit/src/utilities.mjs +2 -2
- package/dist/helpers/automd-generator.d.cts +14 -0
- package/dist/helpers/automd-generator.d.mts +14 -0
- package/dist/helpers/create-reflection-resource.cjs +5 -5
- package/dist/helpers/create-reflection-resource.d.cts +2 -2
- package/dist/helpers/create-reflection-resource.d.mts +2 -2
- package/dist/helpers/create-reflection-resource.mjs +1 -1
- package/dist/helpers/index.cjs +33 -6
- package/dist/helpers/index.d.cts +2 -1
- package/dist/helpers/index.d.mts +2 -1
- package/dist/helpers/index.mjs +2 -2
- package/dist/helpers/load.cjs +5 -5
- package/dist/helpers/load.mjs +7 -7
- package/dist/helpers/persistence.cjs +7 -7
- package/dist/helpers/persistence.mjs +3 -3
- package/dist/helpers/reflect.cjs +6 -6
- package/dist/helpers/reflect.mjs +1 -1
- package/dist/helpers/source-file-env.cjs +1 -1
- package/dist/helpers/source-file-env.mjs +1 -1
- package/dist/helpers/template-helpers.cjs +2 -2
- package/dist/index.cjs +68 -68
- package/dist/index.d.cts +5 -5
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +14 -14
- package/dist/plugin-alloy/src/core/components/output.cjs +2 -2
- package/dist/plugin-alloy/src/core/components/output.mjs +2 -2
- package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +1 -1
- package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +1 -1
- package/dist/plugin-alloy/src/core/components/source-file.cjs +3 -3
- package/dist/plugin-alloy/src/core/components/source-file.mjs +3 -3
- package/dist/plugin-alloy/src/index.cjs +14 -7
- package/dist/plugin-alloy/src/index.mjs +14 -7
- package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +2 -2
- package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +2 -2
- package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +2 -2
- package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +2 -2
- package/dist/plugin-alloy/src/types/components.d.cts +1 -3
- package/dist/plugin-alloy/src/types/components.d.mts +2 -3
- package/dist/plugin-alloy/src/types/plugin.cjs +1 -1
- package/dist/plugin-alloy/src/types/plugin.d.cts +2 -2
- package/dist/plugin-alloy/src/types/plugin.d.mts +2 -2
- package/dist/plugin-alloy/src/types/plugin.mjs +1 -1
- package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +2 -2
- package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +2 -2
- package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +5 -5
- package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +5 -5
- package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +2 -2
- package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +2 -2
- package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +20 -14
- package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +1 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +1 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +20 -14
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +2 -2
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.cts +1 -1
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +2 -2
- package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +4 -4
- package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +4 -4
- package/dist/plugin-automd/src/index.cjs +5 -5
- package/dist/plugin-automd/src/index.mjs +6 -6
- package/dist/plugin-automd/src/types/plugin.d.mts +2 -2
- package/dist/plugin-babel/src/helpers/create-plugin.cjs +1 -1
- package/dist/plugin-babel/src/helpers/create-plugin.mjs +1 -1
- package/dist/plugin-babel/src/helpers/filters.cjs +1 -1
- package/dist/plugin-babel/src/helpers/filters.mjs +1 -1
- package/dist/plugin-babel/src/helpers/index.cjs +3 -3
- package/dist/plugin-babel/src/helpers/index.mjs +3 -3
- package/dist/plugin-babel/src/helpers/module-helpers.cjs +1 -1
- package/dist/plugin-babel/src/helpers/module-helpers.mjs +1 -1
- package/dist/plugin-babel/src/helpers/options.cjs +1 -1
- package/dist/plugin-babel/src/helpers/options.mjs +1 -1
- package/dist/plugin-babel/src/index.cjs +8 -11
- package/dist/plugin-babel/src/index.mjs +6 -9
- package/dist/plugin-babel/src/types/plugin.cjs +1 -1
- package/dist/plugin-babel/src/types/plugin.d.cts +2 -2
- package/dist/plugin-babel/src/types/plugin.d.mts +2 -2
- package/dist/plugin-babel/src/types/plugin.mjs +1 -1
- package/dist/powerlines/src/api.d.mts +2 -2
- package/dist/powerlines/src/index.d.mts +9 -6
- package/dist/powerlines/src/internal/helpers/hooks.cjs +39 -21
- package/dist/powerlines/src/internal/helpers/hooks.d.cts +47 -0
- package/dist/powerlines/src/internal/helpers/hooks.d.mts +47 -3
- package/dist/powerlines/src/internal/helpers/hooks.mjs +39 -22
- package/dist/powerlines/src/lib/build/esbuild.cjs +2 -2
- package/dist/powerlines/src/lib/build/esbuild.mjs +2 -2
- package/dist/powerlines/src/lib/entry.cjs +6 -6
- package/dist/powerlines/src/lib/entry.mjs +6 -6
- package/dist/powerlines/src/lib/logger.cjs +2 -2
- package/dist/powerlines/src/lib/logger.mjs +2 -2
- package/dist/powerlines/src/lib/utilities/resolve.cjs +1 -1
- package/dist/powerlines/src/lib/utilities/resolve.mjs +1 -1
- package/dist/powerlines/src/types/api.cjs +62 -1
- package/dist/powerlines/src/types/api.d.cts +104 -0
- package/dist/powerlines/src/types/api.d.mts +104 -5
- package/dist/powerlines/src/types/api.mjs +61 -2
- package/dist/powerlines/src/types/babel.d.cts +1 -1
- package/dist/powerlines/src/types/babel.d.mts +1 -1
- package/dist/powerlines/src/types/build.cjs +26 -4
- package/dist/powerlines/src/types/build.d.cts +43 -3
- package/dist/powerlines/src/types/build.d.mts +42 -4
- package/dist/powerlines/src/types/build.mjs +23 -3
- package/dist/powerlines/src/types/config.cjs +107 -0
- package/dist/powerlines/src/types/config.d.cts +64 -8
- package/dist/powerlines/src/types/config.d.mts +65 -9
- package/dist/powerlines/src/types/config.mjs +99 -1
- package/dist/powerlines/src/types/context.cjs +57 -0
- package/dist/powerlines/src/types/context.d.cts +114 -2
- package/dist/powerlines/src/types/context.d.mts +114 -4
- package/dist/powerlines/src/types/context.mjs +54 -1
- package/dist/powerlines/src/types/fs.d.cts +1 -1
- package/dist/powerlines/src/types/fs.d.mts +1 -1
- package/dist/powerlines/src/types/hooks.cjs +33 -14
- package/dist/powerlines/src/types/hooks.d.cts +32 -0
- package/dist/powerlines/src/types/hooks.d.mts +32 -2
- package/dist/powerlines/src/types/hooks.mjs +32 -12
- package/dist/powerlines/src/types/index.cjs +5 -5
- package/dist/powerlines/src/types/index.d.mts +9 -9
- package/dist/powerlines/src/types/index.mjs +8 -8
- package/dist/powerlines/src/types/plugin.cjs +40 -105
- package/dist/powerlines/src/types/plugin.d.cts +37 -63
- package/dist/powerlines/src/types/plugin.d.mts +37 -63
- package/dist/powerlines/src/types/plugin.mjs +40 -102
- package/dist/powerlines/src/types/resolved.d.cts +17 -5
- package/dist/powerlines/src/types/resolved.d.mts +17 -6
- package/dist/powerlines/src/types/unplugin.cjs +47 -1
- package/dist/powerlines/src/types/unplugin.d.cts +22 -0
- package/dist/powerlines/src/types/unplugin.d.mts +22 -6
- package/dist/powerlines/src/types/unplugin.mjs +45 -2
- package/dist/types/plugin.cjs +8 -8
- package/dist/types/plugin.d.mts +1 -1
- package/dist/types/plugin.mjs +2 -2
- package/package.json +9 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
|
|
2
3
|
let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
3
4
|
let __stryke_env_types = require("@stryke/env/types");
|
|
4
|
-
let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
|
|
5
5
|
|
|
6
6
|
//#region src/helpers/source-file-env.ts
|
|
7
7
|
function __assignType(fn, args) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { camelCase } from "@stryke/string-format/camel-case";
|
|
1
2
|
import { isString } from "@stryke/type-checks/is-string";
|
|
2
3
|
import { ENV_PREFIXES } from "@stryke/env/types";
|
|
3
|
-
import { camelCase } from "@stryke/string-format/camel-case";
|
|
4
4
|
|
|
5
5
|
//#region src/helpers/source-file-env.ts
|
|
6
6
|
function __assignType(fn, args) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_types_plugin = require('../types/plugin.cjs');
|
|
3
|
-
const
|
|
3
|
+
const require_helpers_persistence = require('./persistence.cjs');
|
|
4
4
|
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
5
5
|
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
6
6
|
|
|
@@ -17,7 +17,7 @@ function __assignType(fn, args) {
|
|
|
17
17
|
* @returns The reflection for the specified configuration template.
|
|
18
18
|
*/
|
|
19
19
|
async function createTemplateReflection(context, name) {
|
|
20
|
-
const reflection = await
|
|
20
|
+
const reflection = await require_helpers_persistence.readEnvTypeReflection(context, name);
|
|
21
21
|
reflection.getProperties().forEach(__assignType((prop) => {
|
|
22
22
|
prop.getAlias().filter(Boolean).forEach(__assignType((alias) => {
|
|
23
23
|
reflection.addProperty({
|
package/dist/index.cjs
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
3
|
-
const require_index = require('./plugin-alloy/src/index.cjs');
|
|
4
|
-
const require_index$1 = require('./plugin-automd/src/index.cjs');
|
|
5
|
-
const require_index$2 = require('./plugin-babel/src/index.cjs');
|
|
6
3
|
const require_types_runtime = require('./types/runtime.cjs');
|
|
7
4
|
const require_types_plugin = require('./types/plugin.cjs');
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
require('./
|
|
5
|
+
require('./types/index.cjs');
|
|
6
|
+
const require_helpers_reflect = require('./helpers/reflect.cjs');
|
|
7
|
+
const require_helpers_persistence = require('./helpers/persistence.cjs');
|
|
8
|
+
const require_helpers_template_helpers = require('./helpers/template-helpers.cjs');
|
|
9
|
+
const require_helpers_source_file_env = require('./helpers/source-file-env.cjs');
|
|
10
|
+
const require_helpers_load = require('./helpers/load.cjs');
|
|
11
|
+
const require_helpers_create_reflection_resource = require('./helpers/create-reflection-resource.cjs');
|
|
12
|
+
require('./helpers/index.cjs');
|
|
13
|
+
const require_helpers_automd_generator = require('./helpers/automd-generator.cjs');
|
|
17
14
|
const require_components_docs = require('./components/docs.cjs');
|
|
15
|
+
const require_components_env = require('./components/env.cjs');
|
|
18
16
|
require('./components/index.cjs');
|
|
19
|
-
const
|
|
20
|
-
require('./
|
|
21
|
-
require('./
|
|
22
|
-
|
|
17
|
+
const require_babel_plugin = require('./babel/plugin.cjs');
|
|
18
|
+
require('./babel/index.cjs');
|
|
19
|
+
const require_index = require('./plugin-alloy/src/index.cjs');
|
|
20
|
+
const require_index$1 = require('./plugin-automd/src/index.cjs');
|
|
21
|
+
const require_index$2 = require('./plugin-babel/src/index.cjs');
|
|
23
22
|
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
24
|
-
let
|
|
23
|
+
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
25
24
|
let defu = require("defu");
|
|
26
25
|
defu = require_rolldown_runtime.__toESM(defu);
|
|
26
|
+
let __stryke_convert_parse_type_definition = require("@stryke/convert/parse-type-definition");
|
|
27
27
|
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
28
|
+
let __stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
28
29
|
let __stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
|
|
29
|
-
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
30
|
-
let __stryke_convert_parse_type_definition = require("@stryke/convert/parse-type-definition");
|
|
31
30
|
let __stryke_env_types = require("@stryke/env/types");
|
|
31
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
32
|
+
let __stryke_path_join = require("@stryke/path/join");
|
|
32
33
|
let __stryke_fs_exists = require("@stryke/fs/exists");
|
|
33
34
|
let __stryke_fs_helpers = require("@stryke/fs/helpers");
|
|
34
|
-
let __stryke_path_join = require("@stryke/path/join");
|
|
35
35
|
let __stryke_string_format_constant_case = require("@stryke/string-format/constant-case");
|
|
36
36
|
|
|
37
37
|
//#region src/index.tsx
|
|
@@ -51,17 +51,17 @@ const plugin = (options = {}) => {
|
|
|
51
51
|
types: {},
|
|
52
52
|
prefix: []
|
|
53
53
|
}),
|
|
54
|
-
transform: { babel: { plugins: [
|
|
54
|
+
transform: { babel: { plugins: [require_babel_plugin.envBabelPlugin] } }
|
|
55
55
|
};
|
|
56
56
|
if (config.env.types) config.env.types = (0, __stryke_convert_parse_type_definition.parseTypeDefinition)(config.env.types);
|
|
57
57
|
else {
|
|
58
58
|
this.log(__storm_software_config_tools_types.LogLevelLabel.WARN, "The `env.types` configuration parameter was not provided. Please ensure this is expected.");
|
|
59
|
-
const envDefaultTypeDefinition = await
|
|
59
|
+
const envDefaultTypeDefinition = await require_helpers_persistence.getEnvDefaultTypeDefinition(this);
|
|
60
60
|
config.env.types = (0, __stryke_convert_parse_type_definition.parseTypeDefinition)(`${envDefaultTypeDefinition.file}#${envDefaultTypeDefinition.name}`);
|
|
61
61
|
}
|
|
62
62
|
if (config.env.secrets) config.env.secrets = (0, __stryke_convert_parse_type_definition.parseTypeDefinition)(config.env.secrets);
|
|
63
63
|
else {
|
|
64
|
-
const secretsDefaultTypeDefinition = await
|
|
64
|
+
const secretsDefaultTypeDefinition = await require_helpers_persistence.getSecretsDefaultTypeDefinition(this);
|
|
65
65
|
config.env.secrets = (0, __stryke_convert_parse_type_definition.parseTypeDefinition)(`${secretsDefaultTypeDefinition.file}#${secretsDefaultTypeDefinition.name}`);
|
|
66
66
|
}
|
|
67
67
|
config.env.prefix = (0, __stryke_convert_to_array.toArray)(config.env.prefix ?? []).reduce((ret, prefix) => {
|
|
@@ -78,7 +78,7 @@ const plugin = (options = {}) => {
|
|
|
78
78
|
async configResolved() {
|
|
79
79
|
this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Environment plugin configuration has been resolved for the Powerlines project.`);
|
|
80
80
|
this.config.env.inject ??= this.config.projectType === "application";
|
|
81
|
-
this.env = (0, defu.default)({ parsed: await
|
|
81
|
+
this.env = (0, defu.default)({ parsed: await require_helpers_load.loadEnv(this, this.config.env) }, this.env ?? {}, {
|
|
82
82
|
types: { env: {} },
|
|
83
83
|
used: {
|
|
84
84
|
env: {},
|
|
@@ -87,22 +87,22 @@ const plugin = (options = {}) => {
|
|
|
87
87
|
parsed: {},
|
|
88
88
|
injected: {}
|
|
89
89
|
});
|
|
90
|
-
if (this.config.command !== "prepare" && this.persistedMeta?.checksum === this.meta.checksum && (0, __stryke_fs_exists.existsSync)(
|
|
90
|
+
if (this.config.command !== "prepare" && this.persistedMeta?.checksum === this.meta.checksum && (0, __stryke_fs_exists.existsSync)(require_helpers_persistence.getEnvTypeReflectionsPath(this, "env"))) {
|
|
91
91
|
this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Skipping reflection initialization as the meta checksum has not changed.`);
|
|
92
|
-
this.env.types.env = await
|
|
93
|
-
if ((0, __stryke_fs_exists.existsSync)(
|
|
94
|
-
if ((0, __stryke_fs_exists.existsSync)(
|
|
95
|
-
if ((0, __stryke_fs_exists.existsSync)(
|
|
92
|
+
this.env.types.env = await require_helpers_persistence.readEnvTypeReflection(this, "env");
|
|
93
|
+
if ((0, __stryke_fs_exists.existsSync)(require_helpers_persistence.getEnvReflectionsPath(this, "env"))) this.env.used.env = await require_helpers_persistence.readEnvReflection(this);
|
|
94
|
+
if ((0, __stryke_fs_exists.existsSync)(require_helpers_persistence.getEnvTypeReflectionsPath(this, "secrets"))) this.env.types.secrets = await require_helpers_persistence.readEnvTypeReflection(this, "secrets");
|
|
95
|
+
if ((0, __stryke_fs_exists.existsSync)(require_helpers_persistence.getEnvReflectionsPath(this, "secrets"))) this.env.used.secrets = await require_helpers_persistence.readSecretsReflection(this);
|
|
96
96
|
} else {
|
|
97
|
-
this.env.types.env = await
|
|
97
|
+
this.env.types.env = await require_helpers_reflect.reflectEnv(this, this.config.env.types?.file ? (0, __stryke_path_is_parent_path.isParentPath)(this.config.env.types?.file, this.workspaceConfig.workspaceRoot) ? this.config.env.types?.file : (0, __stryke_path_join.joinPaths)(this.config.projectRoot, this.config.env.types?.file) : void 0, this.config.env.types?.name);
|
|
98
98
|
if (!this.env.types.env) throw new Error("Failed to find the environment configuration type reflection in the context.");
|
|
99
|
-
await
|
|
100
|
-
this.env.types.secrets = await
|
|
99
|
+
await require_helpers_persistence.writeEnvTypeReflection(this, this.env.types.env, "env");
|
|
100
|
+
this.env.types.secrets = await require_helpers_reflect.reflectSecrets(this, this.config.env.secrets?.file ? (0, __stryke_path_is_parent_path.isParentPath)(this.config.env.secrets?.file, this.workspaceConfig.workspaceRoot) ? this.config.env.secrets?.file : (0, __stryke_path_join.joinPaths)(this.config.projectRoot, this.config.env.secrets?.file) : void 0, this.config.env.secrets?.name);
|
|
101
101
|
if (!this.env.types.secrets) throw new Error("Failed to find the secrets configuration type reflection in the context.");
|
|
102
|
-
await
|
|
102
|
+
await require_helpers_persistence.writeEnvTypeReflection(this, this.env.types.secrets, "secrets");
|
|
103
103
|
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`);
|
|
104
104
|
const envWithAlias = this.env.types.env.getProperties().filter((prop) => prop.getAlias().length > 0);
|
|
105
|
-
Object.entries(await
|
|
105
|
+
Object.entries(await require_helpers_load.loadEnv(this, this.config.env)).forEach(([key, value]) => {
|
|
106
106
|
const unprefixedKey = this.config.env.prefix.reduce((ret, prefix) => {
|
|
107
107
|
if (key.replace(/_$/g, "").startsWith(prefix)) return key.replace(/_$/g, "").slice(prefix.length);
|
|
108
108
|
return ret;
|
|
@@ -116,16 +116,16 @@ const plugin = (options = {}) => {
|
|
|
116
116
|
description: `An object containing the environment configuration parameters used by the ${this.config.name ? `${this.config.name} application` : "application"}.`,
|
|
117
117
|
types: []
|
|
118
118
|
}, this.env.types.env);
|
|
119
|
-
await
|
|
119
|
+
await require_helpers_persistence.writeEnvReflection(this, this.env.used.env, "env");
|
|
120
120
|
if (this.env.types.secrets) {
|
|
121
|
-
await
|
|
121
|
+
await require_helpers_persistence.writeEnvTypeReflection(this, this.env.types.secrets, "secrets");
|
|
122
122
|
this.env.used.secrets = new __powerlines_deepkit_vendor_type.ReflectionClass({
|
|
123
123
|
kind: __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
|
|
124
124
|
typeName: "Secrets",
|
|
125
125
|
description: `An object containing the secret configuration parameters used by the ${this.config.name ? `${this.config.name} application` : "application"}.`,
|
|
126
126
|
types: []
|
|
127
127
|
}, this.env.types.secrets);
|
|
128
|
-
await
|
|
128
|
+
await require_helpers_persistence.writeEnvReflection(this, this.env.used.secrets, "secrets");
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
},
|
|
@@ -140,7 +140,7 @@ const plugin = (options = {}) => {
|
|
|
140
140
|
this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, "Writing Environment documentation for the Powerlines project artifacts.");
|
|
141
141
|
const outputPath = (0, __stryke_path_join.joinPaths)(this.config.projectRoot, "docs", "generated");
|
|
142
142
|
if (!(0, __stryke_fs_exists.existsSync)(outputPath)) await (0, __stryke_fs_helpers.createDirectory)(outputPath);
|
|
143
|
-
const reflection = await
|
|
143
|
+
const reflection = await require_helpers_persistence.readEnvTypeReflection(this, "env");
|
|
144
144
|
const envDocFile = (0, __stryke_path_join.joinPaths)(outputPath, "env.md");
|
|
145
145
|
this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Documenting environment variables configuration in "${envDocFile}"`);
|
|
146
146
|
await this.fs.write(envDocFile, `<!-- Generated by ${(0, __stryke_string_format_title_case.titleCase)(this.config.framework) || "Powerlines"} -->
|
|
@@ -155,15 +155,15 @@ ${reflection.getProperties().filter((property) => property.getNameAsString() !==
|
|
|
155
155
|
`);
|
|
156
156
|
},
|
|
157
157
|
async buildEnd() {
|
|
158
|
-
const reflectionPath =
|
|
158
|
+
const reflectionPath = require_helpers_persistence.getEnvReflectionsPath(this, "env");
|
|
159
159
|
this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Writing env reflection types to ${reflectionPath}.`);
|
|
160
|
-
await
|
|
160
|
+
await require_helpers_persistence.writeEnvReflection(this, this.env.used.env, "env");
|
|
161
161
|
}
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
name: "env:automd-generator",
|
|
165
165
|
config() {
|
|
166
|
-
return { automd: (0, defu.default)(options.automd ?? {}, { generators: { "env":
|
|
166
|
+
return { automd: (0, defu.default)(options.automd ?? {}, { generators: { "env": require_helpers_automd_generator.env(this) } }) };
|
|
167
167
|
}
|
|
168
168
|
},
|
|
169
169
|
{
|
|
@@ -178,12 +178,12 @@ ${reflection.getProperties().filter((property) => property.getNameAsString() !==
|
|
|
178
178
|
var src_default = plugin;
|
|
179
179
|
|
|
180
180
|
//#endregion
|
|
181
|
-
exports.BaseEnv =
|
|
182
|
-
exports.BaseSecrets =
|
|
181
|
+
exports.BaseEnv = require_helpers_reflect.BaseEnv;
|
|
182
|
+
exports.BaseSecrets = require_helpers_reflect.BaseSecrets;
|
|
183
183
|
exports.EnvBuiltin = require_components_env.EnvBuiltin;
|
|
184
184
|
exports.EnvDocs = require_components_docs.EnvDocs;
|
|
185
185
|
exports.EnvTypeDefinition = require_components_env.EnvTypeDefinition;
|
|
186
|
-
exports.__ΩCreateEnvReflectionOptions =
|
|
186
|
+
exports.__ΩCreateEnvReflectionOptions = require_helpers_reflect.__ΩCreateEnvReflectionOptions;
|
|
187
187
|
exports.__ΩEnvInterface = require_types_runtime.__ΩEnvInterface;
|
|
188
188
|
exports.__ΩEnvPluginContext = require_types_plugin.__ΩEnvPluginContext;
|
|
189
189
|
exports.__ΩEnvPluginOptions = require_types_plugin.__ΩEnvPluginOptions;
|
|
@@ -191,29 +191,29 @@ exports.__ΩEnvPluginResolvedConfig = require_types_plugin.__ΩEnvPluginResolved
|
|
|
191
191
|
exports.__ΩEnvPluginUserConfig = require_types_plugin.__ΩEnvPluginUserConfig;
|
|
192
192
|
exports.__ΩEnvType = require_types_plugin.__ΩEnvType;
|
|
193
193
|
exports.__ΩSecretsInterface = require_types_runtime.__ΩSecretsInterface;
|
|
194
|
-
exports.createEnvReflection =
|
|
195
|
-
exports.createReflectionResource =
|
|
196
|
-
exports.createSecretsReflection =
|
|
197
|
-
exports.createTemplateReflection =
|
|
194
|
+
exports.createEnvReflection = require_helpers_reflect.createEnvReflection;
|
|
195
|
+
exports.createReflectionResource = require_helpers_create_reflection_resource.createReflectionResource;
|
|
196
|
+
exports.createSecretsReflection = require_helpers_reflect.createSecretsReflection;
|
|
197
|
+
exports.createTemplateReflection = require_helpers_template_helpers.createTemplateReflection;
|
|
198
198
|
exports.default = src_default;
|
|
199
|
-
exports.envBabelPlugin =
|
|
200
|
-
exports.formatEnvField =
|
|
201
|
-
exports.getEnvDefaultTypeDefinition =
|
|
202
|
-
exports.getEnvReflectionsPath =
|
|
203
|
-
exports.getEnvTypeReflectionsPath =
|
|
204
|
-
exports.getSecretsDefaultTypeDefinition =
|
|
205
|
-
exports.loadEnv =
|
|
206
|
-
exports.loadEnvFromContext =
|
|
207
|
-
exports.mergeEnvReflections =
|
|
208
|
-
exports.mergeSecretsReflections =
|
|
199
|
+
exports.envBabelPlugin = require_babel_plugin.envBabelPlugin;
|
|
200
|
+
exports.formatEnvField = require_helpers_source_file_env.formatEnvField;
|
|
201
|
+
exports.getEnvDefaultTypeDefinition = require_helpers_persistence.getEnvDefaultTypeDefinition;
|
|
202
|
+
exports.getEnvReflectionsPath = require_helpers_persistence.getEnvReflectionsPath;
|
|
203
|
+
exports.getEnvTypeReflectionsPath = require_helpers_persistence.getEnvTypeReflectionsPath;
|
|
204
|
+
exports.getSecretsDefaultTypeDefinition = require_helpers_persistence.getSecretsDefaultTypeDefinition;
|
|
205
|
+
exports.loadEnv = require_helpers_load.loadEnv;
|
|
206
|
+
exports.loadEnvFromContext = require_helpers_load.loadEnvFromContext;
|
|
207
|
+
exports.mergeEnvReflections = require_helpers_reflect.mergeEnvReflections;
|
|
208
|
+
exports.mergeSecretsReflections = require_helpers_reflect.mergeSecretsReflections;
|
|
209
209
|
exports.plugin = plugin;
|
|
210
|
-
exports.readEnvReflection =
|
|
211
|
-
exports.readEnvTypeReflection =
|
|
212
|
-
exports.readSecretsReflection =
|
|
213
|
-
exports.reflectEnv =
|
|
214
|
-
exports.reflectSecrets =
|
|
215
|
-
exports.removeEnvPrefix =
|
|
216
|
-
exports.resolveRuntimeTypeFile =
|
|
217
|
-
exports.writeEnvReflection =
|
|
218
|
-
exports.writeEnvReflectionSync =
|
|
219
|
-
exports.writeEnvTypeReflection =
|
|
210
|
+
exports.readEnvReflection = require_helpers_persistence.readEnvReflection;
|
|
211
|
+
exports.readEnvTypeReflection = require_helpers_persistence.readEnvTypeReflection;
|
|
212
|
+
exports.readSecretsReflection = require_helpers_persistence.readSecretsReflection;
|
|
213
|
+
exports.reflectEnv = require_helpers_reflect.reflectEnv;
|
|
214
|
+
exports.reflectSecrets = require_helpers_reflect.reflectSecrets;
|
|
215
|
+
exports.removeEnvPrefix = require_helpers_source_file_env.removeEnvPrefix;
|
|
216
|
+
exports.resolveRuntimeTypeFile = require_helpers_persistence.resolveRuntimeTypeFile;
|
|
217
|
+
exports.writeEnvReflection = require_helpers_persistence.writeEnvReflection;
|
|
218
|
+
exports.writeEnvReflectionSync = require_helpers_persistence.writeEnvReflectionSync;
|
|
219
|
+
exports.writeEnvTypeReflection = require_helpers_persistence.writeEnvTypeReflection;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { EnvDocs } from "./components/docs.cjs";
|
|
2
1
|
import { Plugin } from "./powerlines/src/types/plugin.cjs";
|
|
3
|
-
import { EnvBuiltin, EnvBuiltinProps, EnvTypeDefinition, __ΩEnvBuiltinProps } from "./components/env.cjs";
|
|
4
|
-
import "./components/index.cjs";
|
|
5
2
|
import { EnvInterface, SecretsInterface, __ΩEnvInterface, __ΩSecretsInterface } from "./types/runtime.cjs";
|
|
6
3
|
import { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType } from "./types/plugin.cjs";
|
|
7
|
-
import {
|
|
8
|
-
import "./
|
|
4
|
+
import { EnvDocs } from "./components/docs.cjs";
|
|
5
|
+
import { EnvBuiltin, EnvBuiltinProps, EnvTypeDefinition, __ΩEnvBuiltinProps } from "./components/env.cjs";
|
|
6
|
+
import "./components/index.cjs";
|
|
9
7
|
import { createReflectionResource } from "./helpers/create-reflection-resource.cjs";
|
|
10
8
|
import { loadEnv, loadEnvFromContext } from "./helpers/load.cjs";
|
|
11
9
|
import { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, readEnvReflection, readEnvTypeReflection, readSecretsReflection, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection } from "./helpers/persistence.cjs";
|
|
@@ -14,6 +12,8 @@ import { formatEnvField, removeEnvPrefix } from "./helpers/source-file-env.cjs";
|
|
|
14
12
|
import { createTemplateReflection } from "./helpers/template-helpers.cjs";
|
|
15
13
|
import "./helpers/index.cjs";
|
|
16
14
|
import "./types/index.cjs";
|
|
15
|
+
import { envBabelPlugin } from "./babel/plugin.cjs";
|
|
16
|
+
import "./babel/index.cjs";
|
|
17
17
|
|
|
18
18
|
//#region src/index.d.ts
|
|
19
19
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { EnvDocs } from "./components/docs.mjs";
|
|
2
1
|
import { Plugin } from "./powerlines/src/types/plugin.mjs";
|
|
3
|
-
import { EnvBuiltin, EnvBuiltinProps, EnvTypeDefinition, __ΩEnvBuiltinProps } from "./components/env.mjs";
|
|
4
|
-
import "./components/index.mjs";
|
|
5
2
|
import "./powerlines/src/index.mjs";
|
|
6
3
|
import { EnvInterface, SecretsInterface, __ΩEnvInterface, __ΩSecretsInterface } from "./types/runtime.mjs";
|
|
7
4
|
import { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType } from "./types/plugin.mjs";
|
|
8
|
-
import {
|
|
9
|
-
import "./
|
|
5
|
+
import { EnvDocs } from "./components/docs.mjs";
|
|
6
|
+
import { EnvBuiltin, EnvBuiltinProps, EnvTypeDefinition, __ΩEnvBuiltinProps } from "./components/env.mjs";
|
|
7
|
+
import "./components/index.mjs";
|
|
10
8
|
import { createReflectionResource } from "./helpers/create-reflection-resource.mjs";
|
|
11
9
|
import { loadEnv, loadEnvFromContext } from "./helpers/load.mjs";
|
|
12
10
|
import { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, readEnvReflection, readEnvTypeReflection, readSecretsReflection, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection } from "./helpers/persistence.mjs";
|
|
@@ -15,6 +13,8 @@ import { formatEnvField, removeEnvPrefix } from "./helpers/source-file-env.mjs";
|
|
|
15
13
|
import { createTemplateReflection } from "./helpers/template-helpers.mjs";
|
|
16
14
|
import "./helpers/index.mjs";
|
|
17
15
|
import "./types/index.mjs";
|
|
16
|
+
import { envBabelPlugin } from "./babel/plugin.mjs";
|
|
17
|
+
import "./babel/index.mjs";
|
|
18
18
|
|
|
19
19
|
//#region src/index.d.ts
|
|
20
20
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import src_default$1 from "./plugin-alloy/src/index.mjs";
|
|
2
|
-
import src_default$2 from "./plugin-automd/src/index.mjs";
|
|
3
|
-
import src_default$3 from "./plugin-babel/src/index.mjs";
|
|
4
1
|
import { __ΩEnvInterface, __ΩSecretsInterface } from "./types/runtime.mjs";
|
|
5
2
|
import { __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType } from "./types/plugin.mjs";
|
|
3
|
+
import "./types/index.mjs";
|
|
6
4
|
import { BaseEnv, BaseSecrets, __ΩCreateEnvReflectionOptions, createEnvReflection, createSecretsReflection, mergeEnvReflections, mergeSecretsReflections, reflectEnv, reflectSecrets } from "./helpers/reflect.mjs";
|
|
7
5
|
import { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, readEnvReflection, readEnvTypeReflection, readSecretsReflection, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection } from "./helpers/persistence.mjs";
|
|
8
|
-
import {
|
|
6
|
+
import { createTemplateReflection } from "./helpers/template-helpers.mjs";
|
|
9
7
|
import { formatEnvField, removeEnvPrefix } from "./helpers/source-file-env.mjs";
|
|
10
8
|
import { loadEnv, loadEnvFromContext } from "./helpers/load.mjs";
|
|
11
9
|
import { createReflectionResource } from "./helpers/create-reflection-resource.mjs";
|
|
12
|
-
import
|
|
10
|
+
import "./helpers/index.mjs";
|
|
13
11
|
import { env } from "./helpers/automd-generator.mjs";
|
|
14
|
-
import "./babel/index.mjs";
|
|
15
12
|
import { EnvDocs } from "./components/docs.mjs";
|
|
13
|
+
import { EnvBuiltin, EnvTypeDefinition } from "./components/env.mjs";
|
|
16
14
|
import "./components/index.mjs";
|
|
17
|
-
import {
|
|
18
|
-
import "./
|
|
19
|
-
import "./
|
|
20
|
-
import
|
|
15
|
+
import { envBabelPlugin } from "./babel/plugin.mjs";
|
|
16
|
+
import "./babel/index.mjs";
|
|
17
|
+
import src_default$1 from "./plugin-alloy/src/index.mjs";
|
|
18
|
+
import src_default$2 from "./plugin-automd/src/index.mjs";
|
|
19
|
+
import src_default$3 from "./plugin-babel/src/index.mjs";
|
|
21
20
|
import { ReflectionClass, ReflectionKind, stringifyType } from "@powerlines/deepkit/vendor/type";
|
|
22
|
-
import {
|
|
21
|
+
import { titleCase } from "@stryke/string-format/title-case";
|
|
23
22
|
import defu$1 from "defu";
|
|
23
|
+
import { parseTypeDefinition } from "@stryke/convert/parse-type-definition";
|
|
24
24
|
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
25
|
+
import { toArray } from "@stryke/convert/to-array";
|
|
25
26
|
import { isParentPath } from "@stryke/path/is-parent-path";
|
|
26
|
-
import { titleCase } from "@stryke/string-format/title-case";
|
|
27
|
-
import { parseTypeDefinition } from "@stryke/convert/parse-type-definition";
|
|
28
27
|
import { ENV_PREFIXES } from "@stryke/env/types";
|
|
28
|
+
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
29
|
+
import { joinPaths } from "@stryke/path/join";
|
|
29
30
|
import { existsSync } from "@stryke/fs/exists";
|
|
30
31
|
import { createDirectory } from "@stryke/fs/helpers";
|
|
31
|
-
import { joinPaths } from "@stryke/path/join";
|
|
32
32
|
import { constantCase } from "@stryke/string-format/constant-case";
|
|
33
33
|
|
|
34
34
|
//#region src/index.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_context = require('../contexts/context.cjs');
|
|
3
|
-
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
|
-
let __alloy_js_core = require("@alloy-js/core");
|
|
5
3
|
let __stryke_path_replace = require("@stryke/path/replace");
|
|
4
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
5
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
6
|
|
|
7
7
|
//#region ../plugin-alloy/src/core/components/output.tsx
|
|
8
8
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PowerlinesContext } from "../contexts/context.mjs";
|
|
2
|
-
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
3
|
-
import { Output, Show, computed, ref, splitProps } from "@alloy-js/core";
|
|
4
2
|
import { replacePath } from "@stryke/path/replace";
|
|
3
|
+
import { Output, Show, computed, ref, splitProps } from "@alloy-js/core";
|
|
4
|
+
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region ../plugin-alloy/src/core/components/output.tsx
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
3
2
|
let __alloy_js_core = require("@alloy-js/core");
|
|
3
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
4
|
|
|
5
5
|
//#region ../plugin-alloy/src/core/components/single-line-comment.tsx
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
2
1
|
import { Prose } from "@alloy-js/core";
|
|
2
|
+
import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region ../plugin-alloy/src/core/components/single-line-comment.tsx
|
|
5
5
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_context = require('../contexts/context.cjs');
|
|
3
3
|
require('../contexts/index.cjs');
|
|
4
|
-
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
|
-
let __alloy_js_core = require("@alloy-js/core");
|
|
6
|
-
let __stryke_path_append = require("@stryke/path/append");
|
|
7
4
|
let defu = require("defu");
|
|
8
5
|
defu = require_rolldown_runtime.__toESM(defu);
|
|
6
|
+
let __stryke_path_append = require("@stryke/path/append");
|
|
7
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
8
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
9
9
|
|
|
10
10
|
//#region ../plugin-alloy/src/core/components/source-file.tsx
|
|
11
11
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useMeta } from "../contexts/context.mjs";
|
|
2
2
|
import "../contexts/index.mjs";
|
|
3
|
-
import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
4
|
-
import { Show, SourceDirectoryContext, SourceFileContext, getContext, splitProps, useContext, useFormatOptions } from "@alloy-js/core";
|
|
5
|
-
import { appendPath } from "@stryke/path/append";
|
|
6
3
|
import defu$1 from "defu";
|
|
4
|
+
import { appendPath } from "@stryke/path/append";
|
|
5
|
+
import { Show, SourceDirectoryContext, SourceFileContext, getContext, splitProps, useContext, useFormatOptions } from "@alloy-js/core";
|
|
6
|
+
import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region ../plugin-alloy/src/core/components/source-file.tsx
|
|
9
9
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_output = require('./core/components/output.cjs');
|
|
3
|
-
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
3
|
let __alloy_js_core = require("@alloy-js/core");
|
|
4
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
|
+
let __stryke_json_storm_json = require("@stryke/json/storm-json");
|
|
5
6
|
let __alloy_js_rollup_plugin = require("@alloy-js/rollup-plugin");
|
|
6
7
|
__alloy_js_rollup_plugin = require_rolldown_runtime.__toESM(__alloy_js_rollup_plugin);
|
|
7
|
-
let __stryke_json_storm_json = require("@stryke/json/storm-json");
|
|
8
8
|
|
|
9
9
|
//#region ../plugin-alloy/src/index.tsx
|
|
10
10
|
/**
|
|
@@ -23,11 +23,18 @@ const plugin = (options = {}) => {
|
|
|
23
23
|
...options
|
|
24
24
|
},
|
|
25
25
|
build: {
|
|
26
|
-
inputOptions: { transform: {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
inputOptions: { transform: {
|
|
27
|
+
typescript: {
|
|
28
|
+
jsxPragma: "Alloy.createElement",
|
|
29
|
+
jsxPragmaFrag: "Alloy.Fragment"
|
|
30
|
+
},
|
|
31
|
+
jsx: {
|
|
32
|
+
runtime: "classic",
|
|
33
|
+
pragma: "Alloy.createElement",
|
|
34
|
+
pragmaFrag: "Alloy.Fragment",
|
|
35
|
+
importSource: "@alloy-js/core"
|
|
36
|
+
}
|
|
37
|
+
} },
|
|
31
38
|
plugins: [(0, __alloy_js_rollup_plugin.default)()],
|
|
32
39
|
external: [
|
|
33
40
|
"@alloy-js/core",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Output as Output$1 } from "./core/components/output.mjs";
|
|
2
|
-
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
3
2
|
import { renderAsync, traverseOutput } from "@alloy-js/core";
|
|
4
|
-
import
|
|
3
|
+
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
5
4
|
import { StormJSON } from "@stryke/json/storm-json";
|
|
5
|
+
import alloy from "@alloy-js/rollup-plugin";
|
|
6
6
|
|
|
7
7
|
//#region ../plugin-alloy/src/index.tsx
|
|
8
8
|
/**
|
|
@@ -21,11 +21,18 @@ const plugin = (options = {}) => {
|
|
|
21
21
|
...options
|
|
22
22
|
},
|
|
23
23
|
build: {
|
|
24
|
-
inputOptions: { transform: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
inputOptions: { transform: {
|
|
25
|
+
typescript: {
|
|
26
|
+
jsxPragma: "Alloy.createElement",
|
|
27
|
+
jsxPragmaFrag: "Alloy.Fragment"
|
|
28
|
+
},
|
|
29
|
+
jsx: {
|
|
30
|
+
runtime: "classic",
|
|
31
|
+
pragma: "Alloy.createElement",
|
|
32
|
+
pragmaFrag: "Alloy.Fragment",
|
|
33
|
+
importSource: "@alloy-js/core"
|
|
34
|
+
}
|
|
35
|
+
} },
|
|
29
36
|
plugins: [alloy()],
|
|
30
37
|
external: [
|
|
31
38
|
"@alloy-js/core",
|
|
@@ -2,9 +2,9 @@ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.
|
|
|
2
2
|
const require_context = require('../../core/contexts/context.cjs');
|
|
3
3
|
const require_single_line_comment = require('../../core/components/single-line-comment.cjs');
|
|
4
4
|
const require_source_file = require('../../core/components/source-file.cjs');
|
|
5
|
-
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
|
-
let __alloy_js_core = require("@alloy-js/core");
|
|
7
5
|
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
6
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
7
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
8
8
|
let __alloy_js_markdown = require("@alloy-js/markdown");
|
|
9
9
|
|
|
10
10
|
//#region ../plugin-alloy/src/markdown/components/markdown-file.tsx
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { usePowerlines } from "../../core/contexts/context.mjs";
|
|
2
2
|
import { SingleLineComment } from "../../core/components/single-line-comment.mjs";
|
|
3
3
|
import { SourceFile } from "../../core/components/source-file.mjs";
|
|
4
|
-
import { createComponent, createIntrinsic, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
5
|
-
import { Show, code, splitProps } from "@alloy-js/core";
|
|
6
4
|
import { titleCase } from "@stryke/string-format/title-case";
|
|
5
|
+
import { Show, code, splitProps } from "@alloy-js/core";
|
|
6
|
+
import { createComponent, createIntrinsic, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
7
7
|
import { Link } from "@alloy-js/markdown";
|
|
8
8
|
|
|
9
9
|
//#region ../plugin-alloy/src/markdown/components/markdown-file.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_markdown_table = require('../contexts/markdown-table.cjs');
|
|
3
|
-
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
|
-
let __alloy_js_core = require("@alloy-js/core");
|
|
5
3
|
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
4
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
5
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
6
|
let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
7
7
|
|
|
8
8
|
//#region ../plugin-alloy/src/markdown/components/markdown-table.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MarkdownTableContext } from "../contexts/markdown-table.mjs";
|
|
2
|
-
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
3
|
-
import { Prose, Show, code, computed, splitProps } from "@alloy-js/core";
|
|
4
2
|
import { titleCase } from "@stryke/string-format/title-case";
|
|
3
|
+
import { Prose, Show, code, computed, splitProps } from "@alloy-js/core";
|
|
4
|
+
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
5
5
|
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
6
6
|
|
|
7
7
|
//#region ../plugin-alloy/src/markdown/components/markdown-table.tsx
|
|
@@ -15,8 +15,6 @@ interface TypescriptFileImportItem {
|
|
|
15
15
|
alias?: string;
|
|
16
16
|
type?: boolean;
|
|
17
17
|
}
|
|
18
|
-
type TypescriptFileImports = Record<string, null | Array<TypescriptFileImportItem | string
|
|
19
|
-
$builtins?: Record<string, null | Array<TypescriptFileImportItem | string>>;
|
|
20
|
-
};
|
|
18
|
+
type TypescriptFileImports = Record<string, null | Array<TypescriptFileImportItem | string>>;
|
|
21
19
|
//#endregion
|
|
22
20
|
export { ComponentProps, TypescriptFileImportItem, TypescriptFileImports };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "../../../powerlines/src/types/fs.mjs";
|
|
1
2
|
import "../../../powerlines/src/types/resolved.mjs";
|
|
2
3
|
import { Children } from "@alloy-js/core";
|
|
3
4
|
import { SourceFileContext as SourceFileContext$1 } from "@alloy-js/typescript";
|
|
@@ -16,8 +17,6 @@ interface TypescriptFileImportItem {
|
|
|
16
17
|
alias?: string;
|
|
17
18
|
type?: boolean;
|
|
18
19
|
}
|
|
19
|
-
type TypescriptFileImports = Record<string, null | Array<TypescriptFileImportItem | string
|
|
20
|
-
$builtins?: Record<string, null | Array<TypescriptFileImportItem | string>>;
|
|
21
|
-
};
|
|
20
|
+
type TypescriptFileImports = Record<string, null | Array<TypescriptFileImportItem | string>>;
|
|
22
21
|
//#endregion
|
|
23
22
|
export { ComponentProps, TypescriptFileImportItem, TypescriptFileImports };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
const require_context = require('../../../powerlines/src/types/context.cjs');
|
|
1
2
|
const require_config = require('../../../powerlines/src/types/config.cjs');
|
|
2
3
|
const require_resolved = require('../../../powerlines/src/types/resolved.cjs');
|
|
3
|
-
const require_context = require('../../../powerlines/src/types/context.cjs');
|
|
4
4
|
|
|
5
5
|
//#region ../plugin-alloy/src/types/plugin.ts
|
|
6
6
|
const __ΩPartial = [
|