@powerlines/plugin-alloy 0.26.237 → 0.26.238
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/core/components/index.cjs +1 -9
- package/dist/core/components/index.d.cts +1 -5
- package/dist/core/components/index.d.mts +1 -5
- package/dist/core/components/index.mjs +1 -5
- package/dist/core/components/infrastructure-file.cjs +6 -3
- package/dist/core/components/infrastructure-file.d.cts +1 -1
- package/dist/core/components/infrastructure-file.d.cts.map +1 -1
- package/dist/core/components/infrastructure-file.d.mts +1 -1
- package/dist/core/components/infrastructure-file.mjs +5 -2
- package/dist/core/contexts/index.cjs +1 -11
- package/dist/core/contexts/index.d.cts +1 -3
- package/dist/core/contexts/index.d.mts +1 -3
- package/dist/core/contexts/index.mjs +1 -3
- package/dist/core/index.cjs +2 -23
- package/dist/core/index.d.cts +2 -10
- package/dist/core/index.d.mts +2 -10
- package/dist/core/index.mjs +2 -10
- package/dist/helpers/capnp.cjs +2 -2
- package/dist/helpers/capnp.mjs +2 -2
- package/dist/index.cjs +10 -2
- package/dist/index.d.cts +10 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +10 -4
- package/dist/index.mjs +10 -2
- package/dist/render.cjs +67 -48
- package/dist/render.d.cts +33 -2
- package/dist/render.d.cts.map +1 -1
- package/dist/render.d.mts +33 -2
- package/dist/render.mjs +68 -49
- package/dist/types/index.d.cts +2 -3
- package/dist/types/index.d.mts +2 -3
- package/dist/types/plugin.d.cts +7 -4
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +7 -4
- package/dist/typescript/components/builtin-file.cjs +6 -6
- package/dist/typescript/components/builtin-file.d.cts +2 -2
- package/dist/typescript/components/builtin-file.d.cts.map +1 -1
- package/dist/typescript/components/builtin-file.d.mts +2 -2
- package/dist/typescript/components/builtin-file.mjs +2 -2
- package/dist/typescript/components/entry-file.cjs +2 -2
- package/dist/typescript/components/entry-file.d.cts +1 -1
- package/dist/typescript/components/entry-file.d.cts.map +1 -1
- package/dist/typescript/components/entry-file.d.mts +1 -1
- package/dist/typescript/components/entry-file.mjs +1 -1
- package/dist/typescript/components/index.cjs +1 -56
- package/dist/typescript/components/index.d.cts +1 -12
- package/dist/typescript/components/index.d.mts +1 -12
- package/dist/typescript/components/index.mjs +1 -12
- package/dist/typescript/index.cjs +1 -64
- package/dist/typescript/index.d.cts +1 -17
- package/dist/typescript/index.d.mts +1 -17
- package/dist/typescript/index.mjs +1 -17
- package/package.json +18 -639
- package/dist/core/components/output.cjs +0 -40
- package/dist/core/components/output.d.cts +0 -22
- package/dist/core/components/output.d.cts.map +0 -1
- package/dist/core/components/output.d.mts +0 -22
- package/dist/core/components/output.d.mts.map +0 -1
- package/dist/core/components/output.mjs +0 -40
- package/dist/core/components/output.mjs.map +0 -1
- package/dist/core/components/single-line-comment.cjs +0 -22
- package/dist/core/components/single-line-comment.d.cts +0 -19
- package/dist/core/components/single-line-comment.d.cts.map +0 -1
- package/dist/core/components/single-line-comment.d.mts +0 -19
- package/dist/core/components/single-line-comment.d.mts.map +0 -1
- package/dist/core/components/single-line-comment.mjs +0 -22
- package/dist/core/components/single-line-comment.mjs.map +0 -1
- package/dist/core/components/source-file.cjs +0 -64
- package/dist/core/components/source-file.d.cts +0 -30
- package/dist/core/components/source-file.d.cts.map +0 -1
- package/dist/core/components/source-file.d.mts +0 -30
- package/dist/core/components/source-file.d.mts.map +0 -1
- package/dist/core/components/source-file.mjs +0 -62
- package/dist/core/components/source-file.mjs.map +0 -1
- package/dist/core/components/spacing.cjs +0 -19
- package/dist/core/components/spacing.d.cts +0 -19
- package/dist/core/components/spacing.d.cts.map +0 -1
- package/dist/core/components/spacing.d.mts +0 -19
- package/dist/core/components/spacing.d.mts.map +0 -1
- package/dist/core/components/spacing.mjs +0 -19
- package/dist/core/components/spacing.mjs.map +0 -1
- package/dist/core/contexts/meta.cjs +0 -40
- package/dist/core/contexts/meta.d.cts +0 -46
- package/dist/core/contexts/meta.d.cts.map +0 -1
- package/dist/core/contexts/meta.d.mts +0 -46
- package/dist/core/contexts/meta.d.mts.map +0 -1
- package/dist/core/contexts/meta.mjs +0 -37
- package/dist/core/contexts/meta.mjs.map +0 -1
- package/dist/core/contexts/schema.cjs +0 -38
- package/dist/core/contexts/schema.d.cts +0 -26
- package/dist/core/contexts/schema.d.cts.map +0 -1
- package/dist/core/contexts/schema.d.mts +0 -26
- package/dist/core/contexts/schema.d.mts.map +0 -1
- package/dist/core/contexts/schema.mjs +0 -35
- package/dist/core/contexts/schema.mjs.map +0 -1
- package/dist/core/helpers/code.cjs +0 -33
- package/dist/core/helpers/code.d.cts +0 -28
- package/dist/core/helpers/code.d.cts.map +0 -1
- package/dist/core/helpers/code.d.mts +0 -28
- package/dist/core/helpers/code.d.mts.map +0 -1
- package/dist/core/helpers/code.mjs +0 -33
- package/dist/core/helpers/code.mjs.map +0 -1
- package/dist/core/helpers/index.cjs +0 -4
- package/dist/core/helpers/index.d.cts +0 -2
- package/dist/core/helpers/index.d.mts +0 -2
- package/dist/core/helpers/index.mjs +0 -3
- package/dist/hcl/components/block-declaration.cjs +0 -33
- package/dist/hcl/components/block-declaration.d.cts +0 -19
- package/dist/hcl/components/block-declaration.d.cts.map +0 -1
- package/dist/hcl/components/block-declaration.d.mts +0 -19
- package/dist/hcl/components/block-declaration.d.mts.map +0 -1
- package/dist/hcl/components/block-declaration.mjs +0 -33
- package/dist/hcl/components/block-declaration.mjs.map +0 -1
- package/dist/hcl/components/hcl-file.cjs +0 -82
- package/dist/hcl/components/hcl-file.d.cts +0 -25
- package/dist/hcl/components/hcl-file.d.cts.map +0 -1
- package/dist/hcl/components/hcl-file.d.mts +0 -25
- package/dist/hcl/components/hcl-file.d.mts.map +0 -1
- package/dist/hcl/components/hcl-file.mjs +0 -81
- package/dist/hcl/components/hcl-file.mjs.map +0 -1
- package/dist/hcl/components/index.cjs +0 -11
- package/dist/hcl/components/index.d.cts +0 -5
- package/dist/hcl/components/index.d.mts +0 -5
- package/dist/hcl/components/index.mjs +0 -6
- package/dist/hcl/components/packer-file.cjs +0 -28
- package/dist/hcl/components/packer-file.d.cts +0 -16
- package/dist/hcl/components/packer-file.d.cts.map +0 -1
- package/dist/hcl/components/packer-file.d.mts +0 -16
- package/dist/hcl/components/packer-file.d.mts.map +0 -1
- package/dist/hcl/components/packer-file.mjs +0 -28
- package/dist/hcl/components/packer-file.mjs.map +0 -1
- package/dist/hcl/components/terraform-file.cjs +0 -29
- package/dist/hcl/components/terraform-file.d.cts +0 -17
- package/dist/hcl/components/terraform-file.d.cts.map +0 -1
- package/dist/hcl/components/terraform-file.d.mts +0 -17
- package/dist/hcl/components/terraform-file.d.mts.map +0 -1
- package/dist/hcl/components/terraform-file.mjs +0 -29
- package/dist/hcl/components/terraform-file.mjs.map +0 -1
- package/dist/hcl/index.cjs +0 -12
- package/dist/hcl/index.d.cts +0 -6
- package/dist/hcl/index.d.mts +0 -6
- package/dist/hcl/index.mjs +0 -7
- package/dist/markdown/components/alert.cjs +0 -74
- package/dist/markdown/components/alert.d.cts +0 -52
- package/dist/markdown/components/alert.d.cts.map +0 -1
- package/dist/markdown/components/alert.d.mts +0 -52
- package/dist/markdown/components/alert.d.mts.map +0 -1
- package/dist/markdown/components/alert.mjs +0 -69
- package/dist/markdown/components/alert.mjs.map +0 -1
- package/dist/markdown/components/front-matter.cjs +0 -30
- package/dist/markdown/components/front-matter.d.cts +0 -13
- package/dist/markdown/components/front-matter.d.cts.map +0 -1
- package/dist/markdown/components/front-matter.d.mts +0 -13
- package/dist/markdown/components/front-matter.d.mts.map +0 -1
- package/dist/markdown/components/front-matter.mjs +0 -30
- package/dist/markdown/components/front-matter.mjs.map +0 -1
- package/dist/markdown/components/heading.cjs +0 -23
- package/dist/markdown/components/heading.d.cts +0 -17
- package/dist/markdown/components/heading.d.cts.map +0 -1
- package/dist/markdown/components/heading.d.mts +0 -17
- package/dist/markdown/components/heading.d.mts.map +0 -1
- package/dist/markdown/components/heading.mjs +0 -23
- package/dist/markdown/components/heading.mjs.map +0 -1
- package/dist/markdown/components/index.cjs +0 -20
- package/dist/markdown/components/index.d.cts +0 -6
- package/dist/markdown/components/index.d.mts +0 -6
- package/dist/markdown/components/index.mjs +0 -7
- package/dist/markdown/components/markdown-file.cjs +0 -146
- package/dist/markdown/components/markdown-file.d.cts +0 -25
- package/dist/markdown/components/markdown-file.d.cts.map +0 -1
- package/dist/markdown/components/markdown-file.d.mts +0 -25
- package/dist/markdown/components/markdown-file.d.mts.map +0 -1
- package/dist/markdown/components/markdown-file.mjs +0 -145
- package/dist/markdown/components/markdown-file.mjs.map +0 -1
- package/dist/markdown/components/markdown-table.cjs +0 -106
- package/dist/markdown/components/markdown-table.d.cts +0 -37
- package/dist/markdown/components/markdown-table.d.cts.map +0 -1
- package/dist/markdown/components/markdown-table.d.mts +0 -37
- package/dist/markdown/components/markdown-table.d.mts.map +0 -1
- package/dist/markdown/components/markdown-table.mjs +0 -104
- package/dist/markdown/components/markdown-table.mjs.map +0 -1
- package/dist/markdown/contexts/index.cjs +0 -7
- package/dist/markdown/contexts/index.d.cts +0 -2
- package/dist/markdown/contexts/index.d.mts +0 -2
- package/dist/markdown/contexts/index.mjs +0 -3
- package/dist/markdown/contexts/markdown-table.cjs +0 -37
- package/dist/markdown/contexts/markdown-table.d.cts +0 -35
- package/dist/markdown/contexts/markdown-table.d.cts.map +0 -1
- package/dist/markdown/contexts/markdown-table.d.mts +0 -35
- package/dist/markdown/contexts/markdown-table.d.mts.map +0 -1
- package/dist/markdown/contexts/markdown-table.mjs +0 -34
- package/dist/markdown/contexts/markdown-table.mjs.map +0 -1
- package/dist/markdown/index.cjs +0 -27
- package/dist/markdown/index.d.cts +0 -9
- package/dist/markdown/index.d.mts +0 -9
- package/dist/markdown/index.mjs +0 -10
- package/dist/types/components.cjs +0 -9
- package/dist/types/components.d.cts +0 -137
- package/dist/types/components.d.cts.map +0 -1
- package/dist/types/components.d.mts +0 -137
- package/dist/types/components.d.mts.map +0 -1
- package/dist/types/components.mjs +0 -10
- package/dist/types/components.mjs.map +0 -1
- package/dist/typescript/components/class-declaration.cjs +0 -305
- package/dist/typescript/components/class-declaration.d.cts +0 -139
- package/dist/typescript/components/class-declaration.d.cts.map +0 -1
- package/dist/typescript/components/class-declaration.d.mts +0 -139
- package/dist/typescript/components/class-declaration.d.mts.map +0 -1
- package/dist/typescript/components/class-declaration.mjs +0 -300
- package/dist/typescript/components/class-declaration.mjs.map +0 -1
- package/dist/typescript/components/dynamic-import-statement.cjs +0 -25
- package/dist/typescript/components/dynamic-import-statement.d.cts +0 -30
- package/dist/typescript/components/dynamic-import-statement.d.cts.map +0 -1
- package/dist/typescript/components/dynamic-import-statement.d.mts +0 -30
- package/dist/typescript/components/dynamic-import-statement.d.mts.map +0 -1
- package/dist/typescript/components/dynamic-import-statement.mjs +0 -25
- package/dist/typescript/components/dynamic-import-statement.mjs.map +0 -1
- package/dist/typescript/components/interface-declaration.cjs +0 -257
- package/dist/typescript/components/interface-declaration.d.cts +0 -78
- package/dist/typescript/components/interface-declaration.d.cts.map +0 -1
- package/dist/typescript/components/interface-declaration.d.mts +0 -78
- package/dist/typescript/components/interface-declaration.d.mts.map +0 -1
- package/dist/typescript/components/interface-declaration.mjs +0 -254
- package/dist/typescript/components/interface-declaration.mjs.map +0 -1
- package/dist/typescript/components/object-declaration.cjs +0 -131
- package/dist/typescript/components/object-declaration.d.cts +0 -24
- package/dist/typescript/components/object-declaration.d.cts.map +0 -1
- package/dist/typescript/components/object-declaration.d.mts +0 -24
- package/dist/typescript/components/object-declaration.d.mts.map +0 -1
- package/dist/typescript/components/object-declaration.mjs +0 -130
- package/dist/typescript/components/object-declaration.mjs.map +0 -1
- package/dist/typescript/components/property-name.cjs +0 -31
- package/dist/typescript/components/property-name.d.cts +0 -21
- package/dist/typescript/components/property-name.d.cts.map +0 -1
- package/dist/typescript/components/property-name.d.mts +0 -21
- package/dist/typescript/components/property-name.d.mts.map +0 -1
- package/dist/typescript/components/property-name.mjs +0 -31
- package/dist/typescript/components/property-name.mjs.map +0 -1
- package/dist/typescript/components/record-expression.cjs +0 -12
- package/dist/typescript/components/record-expression.d.cts +0 -9
- package/dist/typescript/components/record-expression.d.cts.map +0 -1
- package/dist/typescript/components/record-expression.d.mts +0 -9
- package/dist/typescript/components/record-expression.d.mts.map +0 -1
- package/dist/typescript/components/record-expression.mjs +0 -12
- package/dist/typescript/components/record-expression.mjs.map +0 -1
- package/dist/typescript/components/tsdoc-schema.cjs +0 -166
- package/dist/typescript/components/tsdoc-schema.d.cts +0 -21
- package/dist/typescript/components/tsdoc-schema.d.cts.map +0 -1
- package/dist/typescript/components/tsdoc-schema.d.mts +0 -21
- package/dist/typescript/components/tsdoc-schema.d.mts.map +0 -1
- package/dist/typescript/components/tsdoc-schema.mjs +0 -165
- package/dist/typescript/components/tsdoc-schema.mjs.map +0 -1
- package/dist/typescript/components/tsdoc.cjs +0 -486
- package/dist/typescript/components/tsdoc.d.cts +0 -163
- package/dist/typescript/components/tsdoc.d.cts.map +0 -1
- package/dist/typescript/components/tsdoc.d.mts +0 -163
- package/dist/typescript/components/tsdoc.d.mts.map +0 -1
- package/dist/typescript/components/tsdoc.mjs +0 -465
- package/dist/typescript/components/tsdoc.mjs.map +0 -1
- package/dist/typescript/components/type-declaration.cjs +0 -38
- package/dist/typescript/components/type-declaration.d.cts +0 -15
- package/dist/typescript/components/type-declaration.d.cts.map +0 -1
- package/dist/typescript/components/type-declaration.d.mts +0 -15
- package/dist/typescript/components/type-declaration.d.mts.map +0 -1
- package/dist/typescript/components/type-declaration.mjs +0 -38
- package/dist/typescript/components/type-declaration.mjs.map +0 -1
- package/dist/typescript/components/type-parameters.cjs +0 -82
- package/dist/typescript/components/type-parameters.d.cts +0 -22
- package/dist/typescript/components/type-parameters.d.cts.map +0 -1
- package/dist/typescript/components/type-parameters.d.mts +0 -22
- package/dist/typescript/components/type-parameters.d.mts.map +0 -1
- package/dist/typescript/components/type-parameters.mjs +0 -82
- package/dist/typescript/components/type-parameters.mjs.map +0 -1
- package/dist/typescript/components/typescript-file.cjs +0 -231
- package/dist/typescript/components/typescript-file.d.cts +0 -46
- package/dist/typescript/components/typescript-file.d.cts.map +0 -1
- package/dist/typescript/components/typescript-file.d.mts +0 -46
- package/dist/typescript/components/typescript-file.d.mts.map +0 -1
- package/dist/typescript/components/typescript-file.mjs +0 -229
- package/dist/typescript/components/typescript-file.mjs.map +0 -1
- package/dist/typescript/contexts/index.cjs +0 -4
- package/dist/typescript/contexts/index.d.cts +0 -2
- package/dist/typescript/contexts/index.d.mts +0 -2
- package/dist/typescript/contexts/index.mjs +0 -3
- package/dist/typescript/contexts/lexical-scope.cjs +0 -25
- package/dist/typescript/contexts/lexical-scope.d.cts +0 -12
- package/dist/typescript/contexts/lexical-scope.d.cts.map +0 -1
- package/dist/typescript/contexts/lexical-scope.d.mts +0 -12
- package/dist/typescript/contexts/lexical-scope.d.mts.map +0 -1
- package/dist/typescript/contexts/lexical-scope.mjs +0 -25
- package/dist/typescript/contexts/lexical-scope.mjs.map +0 -1
- package/dist/typescript/contexts/member-scope.cjs +0 -23
- package/dist/typescript/contexts/member-scope.d.cts +0 -18
- package/dist/typescript/contexts/member-scope.d.cts.map +0 -1
- package/dist/typescript/contexts/member-scope.d.mts +0 -18
- package/dist/typescript/contexts/member-scope.d.mts.map +0 -1
- package/dist/typescript/contexts/member-scope.mjs +0 -23
- package/dist/typescript/contexts/member-scope.mjs.map +0 -1
- package/dist/typescript/helpers/get-call-signature-props.cjs +0 -25
- package/dist/typescript/helpers/get-call-signature-props.d.cts +0 -13
- package/dist/typescript/helpers/get-call-signature-props.d.cts.map +0 -1
- package/dist/typescript/helpers/get-call-signature-props.d.mts +0 -13
- package/dist/typescript/helpers/get-call-signature-props.d.mts.map +0 -1
- package/dist/typescript/helpers/get-call-signature-props.mjs +0 -25
- package/dist/typescript/helpers/get-call-signature-props.mjs.map +0 -1
- package/dist/typescript/helpers/index.cjs +0 -6
- package/dist/typescript/helpers/index.d.cts +0 -3
- package/dist/typescript/helpers/index.d.mts +0 -3
- package/dist/typescript/helpers/index.mjs +0 -4
- package/dist/typescript/helpers/utilities.cjs +0 -15
- package/dist/typescript/helpers/utilities.d.cts +0 -11
- package/dist/typescript/helpers/utilities.d.cts.map +0 -1
- package/dist/typescript/helpers/utilities.d.mts +0 -11
- package/dist/typescript/helpers/utilities.d.mts.map +0 -1
- package/dist/typescript/helpers/utilities.mjs +0 -14
- package/dist/typescript/helpers/utilities.mjs.map +0 -1
- package/dist/yaml/components/index.cjs +0 -5
- package/dist/yaml/components/index.d.cts +0 -2
- package/dist/yaml/components/index.d.mts +0 -2
- package/dist/yaml/components/index.mjs +0 -3
- package/dist/yaml/components/yaml-file.cjs +0 -148
- package/dist/yaml/components/yaml-file.d.cts +0 -31
- package/dist/yaml/components/yaml-file.d.cts.map +0 -1
- package/dist/yaml/components/yaml-file.d.mts +0 -31
- package/dist/yaml/components/yaml-file.d.mts.map +0 -1
- package/dist/yaml/components/yaml-file.mjs +0 -147
- package/dist/yaml/components/yaml-file.mjs.map +0 -1
- package/dist/yaml/index.cjs +0 -6
- package/dist/yaml/index.d.cts +0 -3
- package/dist/yaml/index.d.mts +0 -3
- package/dist/yaml/index.mjs +0 -4
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ComponentContext } from "@alloy-js/core";
|
|
2
|
-
import { StoragePreset } from "powerlines";
|
|
3
|
-
//#region src/core/contexts/meta.d.ts
|
|
4
|
-
interface MetaItem {
|
|
5
|
-
/**
|
|
6
|
-
* The kind of metadata item.
|
|
7
|
-
*/
|
|
8
|
-
kind?: "builtin" | "entry" | string;
|
|
9
|
-
/**
|
|
10
|
-
* Whether to skip formatting for this output.
|
|
11
|
-
*/
|
|
12
|
-
skipFormat?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* The storage preset or adapter name for the output files.
|
|
15
|
-
*
|
|
16
|
-
* @remarks
|
|
17
|
-
* If not specified, the output mode will be determined by the provided `output.mode` value.
|
|
18
|
-
*/
|
|
19
|
-
storage?: StoragePreset | string;
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* The Powerlines meta context used to determine metadata of files generated during rendering.
|
|
24
|
-
*/
|
|
25
|
-
declare const MetaContext: ComponentContext<Record<string, MetaItem>>;
|
|
26
|
-
/**
|
|
27
|
-
* Hook to access the Powerlines Context.
|
|
28
|
-
*
|
|
29
|
-
* @returns The Context.
|
|
30
|
-
*/
|
|
31
|
-
declare function useMetaContext(): Record<string, MetaItem> | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* Hook to safely access the render context's metadata.
|
|
34
|
-
*
|
|
35
|
-
* @returns The Powerlines context or undefined if not set.
|
|
36
|
-
*/
|
|
37
|
-
declare function useMetaSafe(): Record<string, MetaItem> | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Hook to access the render context's metadata.
|
|
40
|
-
*
|
|
41
|
-
* @returns The Powerlines context.
|
|
42
|
-
*/
|
|
43
|
-
declare function useMeta(): Record<string, MetaItem>;
|
|
44
|
-
//#endregion
|
|
45
|
-
export { MetaContext, MetaItem, useMeta, useMetaContext, useMetaSafe };
|
|
46
|
-
//# sourceMappingURL=meta.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.mts","names":[],"sources":["../../../src/core/contexts/meta.ts"],"mappings":""}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { createNamedContext, useContext } from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region src/core/contexts/meta.ts
|
|
4
|
-
/**
|
|
5
|
-
* The Powerlines meta context used to determine metadata of files generated during rendering.
|
|
6
|
-
*/
|
|
7
|
-
const MetaContext = createNamedContext("Meta");
|
|
8
|
-
/**
|
|
9
|
-
* Hook to access the Powerlines Context.
|
|
10
|
-
*
|
|
11
|
-
* @returns The Context.
|
|
12
|
-
*/
|
|
13
|
-
function useMetaContext() {
|
|
14
|
-
return useContext(MetaContext);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Hook to safely access the render context's metadata.
|
|
18
|
-
*
|
|
19
|
-
* @returns The Powerlines context or undefined if not set.
|
|
20
|
-
*/
|
|
21
|
-
function useMetaSafe() {
|
|
22
|
-
return useMetaContext() ?? void 0;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Hook to access the render context's metadata.
|
|
26
|
-
*
|
|
27
|
-
* @returns The Powerlines context.
|
|
28
|
-
*/
|
|
29
|
-
function useMeta() {
|
|
30
|
-
const meta = useMetaSafe();
|
|
31
|
-
if (!meta) throw new Error("Powerlines metadata is not available in the rendering context. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
32
|
-
return meta;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
//#endregion
|
|
36
|
-
export { MetaContext, useMeta, useMetaContext, useMetaSafe };
|
|
37
|
-
//# sourceMappingURL=meta.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
let _alloy_js_core = require("@alloy-js/core");
|
|
3
|
-
|
|
4
|
-
//#region src/core/contexts/schema.ts
|
|
5
|
-
/**
|
|
6
|
-
* The reflection class context used in template rendering.
|
|
7
|
-
*/
|
|
8
|
-
const SchemaContext = (0, _alloy_js_core.createContext)();
|
|
9
|
-
/**
|
|
10
|
-
* Hook to access the schema context.
|
|
11
|
-
*
|
|
12
|
-
* @returns A reactive version of the current schema.
|
|
13
|
-
*/
|
|
14
|
-
function useSchema() {
|
|
15
|
-
const context = (0, _alloy_js_core.useContext)(SchemaContext);
|
|
16
|
-
if (!context) throw new Error("Powerlines - Schema Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
17
|
-
return context;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* The schema property context used in template rendering.
|
|
21
|
-
*/
|
|
22
|
-
const SchemaPropertyContext = (0, _alloy_js_core.createNamedContext)("SchemaProperty");
|
|
23
|
-
/**
|
|
24
|
-
* Hook to access the Schema Property context.
|
|
25
|
-
*
|
|
26
|
-
* @returns A reactive version of the current schema property.
|
|
27
|
-
*/
|
|
28
|
-
function useSchemaProperty() {
|
|
29
|
-
const context = (0, _alloy_js_core.useContext)(SchemaPropertyContext);
|
|
30
|
-
if (!context) throw new Error("Powerlines - Schema Property Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
31
|
-
return context;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
//#endregion
|
|
35
|
-
exports.SchemaContext = SchemaContext;
|
|
36
|
-
exports.SchemaPropertyContext = SchemaPropertyContext;
|
|
37
|
-
exports.useSchema = useSchema;
|
|
38
|
-
exports.useSchemaProperty = useSchemaProperty;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ComponentContext } from "@alloy-js/core";
|
|
2
|
-
import { JsonSchemaLike } from "@powerlines/schema";
|
|
3
|
-
//#region src/core/contexts/schema.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* The reflection class context used in template rendering.
|
|
6
|
-
*/
|
|
7
|
-
declare const SchemaContext: ComponentContext<JsonSchemaLike>;
|
|
8
|
-
/**
|
|
9
|
-
* Hook to access the schema context.
|
|
10
|
-
*
|
|
11
|
-
* @returns A reactive version of the current schema.
|
|
12
|
-
*/
|
|
13
|
-
declare function useSchema(): JsonSchemaLike;
|
|
14
|
-
/**
|
|
15
|
-
* The schema property context used in template rendering.
|
|
16
|
-
*/
|
|
17
|
-
declare const SchemaPropertyContext: ComponentContext<JsonSchemaLike>;
|
|
18
|
-
/**
|
|
19
|
-
* Hook to access the Schema Property context.
|
|
20
|
-
*
|
|
21
|
-
* @returns A reactive version of the current schema property.
|
|
22
|
-
*/
|
|
23
|
-
declare function useSchemaProperty(): JsonSchemaLike;
|
|
24
|
-
//#endregion
|
|
25
|
-
export { SchemaContext, SchemaPropertyContext, useSchema, useSchemaProperty };
|
|
26
|
-
//# sourceMappingURL=schema.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.cts","names":[],"sources":["../../../src/core/contexts/schema.ts"],"mappings":";;;;;;cAyBa,eAAe,iBAAiB;;;;;;iBAQ7B,aAAS;;;;cAeZ,uBAAuB,iBAAiB;;;;;;iBAQrC,qBAAiB"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ComponentContext } from "@alloy-js/core";
|
|
2
|
-
import { JsonSchemaLike } from "@powerlines/schema";
|
|
3
|
-
//#region src/core/contexts/schema.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* The reflection class context used in template rendering.
|
|
6
|
-
*/
|
|
7
|
-
declare const SchemaContext: ComponentContext<JsonSchemaLike>;
|
|
8
|
-
/**
|
|
9
|
-
* Hook to access the schema context.
|
|
10
|
-
*
|
|
11
|
-
* @returns A reactive version of the current schema.
|
|
12
|
-
*/
|
|
13
|
-
declare function useSchema(): JsonSchemaLike;
|
|
14
|
-
/**
|
|
15
|
-
* The schema property context used in template rendering.
|
|
16
|
-
*/
|
|
17
|
-
declare const SchemaPropertyContext: ComponentContext<JsonSchemaLike>;
|
|
18
|
-
/**
|
|
19
|
-
* Hook to access the Schema Property context.
|
|
20
|
-
*
|
|
21
|
-
* @returns A reactive version of the current schema property.
|
|
22
|
-
*/
|
|
23
|
-
declare function useSchemaProperty(): JsonSchemaLike;
|
|
24
|
-
//#endregion
|
|
25
|
-
export { SchemaContext, SchemaPropertyContext, useSchema, useSchemaProperty };
|
|
26
|
-
//# sourceMappingURL=schema.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.mts","names":[],"sources":["../../../src/core/contexts/schema.ts"],"mappings":""}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { createContext, createNamedContext, useContext } from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region src/core/contexts/schema.ts
|
|
4
|
-
/**
|
|
5
|
-
* The reflection class context used in template rendering.
|
|
6
|
-
*/
|
|
7
|
-
const SchemaContext = createContext();
|
|
8
|
-
/**
|
|
9
|
-
* Hook to access the schema context.
|
|
10
|
-
*
|
|
11
|
-
* @returns A reactive version of the current schema.
|
|
12
|
-
*/
|
|
13
|
-
function useSchema() {
|
|
14
|
-
const context = useContext(SchemaContext);
|
|
15
|
-
if (!context) throw new Error("Powerlines - Schema Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
16
|
-
return context;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* The schema property context used in template rendering.
|
|
20
|
-
*/
|
|
21
|
-
const SchemaPropertyContext = createNamedContext("SchemaProperty");
|
|
22
|
-
/**
|
|
23
|
-
* Hook to access the Schema Property context.
|
|
24
|
-
*
|
|
25
|
-
* @returns A reactive version of the current schema property.
|
|
26
|
-
*/
|
|
27
|
-
function useSchemaProperty() {
|
|
28
|
-
const context = useContext(SchemaPropertyContext);
|
|
29
|
-
if (!context) throw new Error("Powerlines - Schema Property Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
30
|
-
return context;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
//#endregion
|
|
34
|
-
export { SchemaContext, SchemaPropertyContext, useSchema, useSchemaProperty };
|
|
35
|
-
//# sourceMappingURL=schema.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
let _alloy_js_core = require("@alloy-js/core");
|
|
3
|
-
|
|
4
|
-
//#region src/core/helpers/code.ts
|
|
5
|
-
/**
|
|
6
|
-
* Turn the provided string template into Children by replacing literal line
|
|
7
|
-
* breaks with hardlines and automatically indenting indented content. Similar
|
|
8
|
-
* in spirit to the `<code>` element in HTML.
|
|
9
|
-
*
|
|
10
|
-
* @see {@link text} for a similar function which treats whitespace similar to
|
|
11
|
-
* JSX template bodies.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* code`
|
|
16
|
-
* function greet(name: string) {
|
|
17
|
-
* console.log("Hello, " + name + "!");
|
|
18
|
-
* }
|
|
19
|
-
* `
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* @param template - The template string to be processed into Children.
|
|
23
|
-
* @param substitutions - Any interpolated values within the template, which will be treated as Children and properly indented.
|
|
24
|
-
* @returns A Children representation of the provided template string, with proper handling of line breaks and indentation.
|
|
25
|
-
* @throws Will throw an error if the provided template contains only whitespace, as this is likely a mistake and would cause a less recognizable "Cannot read properties of undefined" exception later in the processing.
|
|
26
|
-
*/
|
|
27
|
-
function code(template, ...substitutions) {
|
|
28
|
-
if (template.filter((seg) => seg.trim()).length === 0 && substitutions.length === 0) throw new Error("The `code` function cannot be used with a template that contains only whitespace. Please provide a non-empty template.");
|
|
29
|
-
return (0, _alloy_js_core.code)(template, ...substitutions);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
//#endregion
|
|
33
|
-
exports.code = code;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Children } from "@alloy-js/core";
|
|
2
|
-
//#region src/core/helpers/code.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Turn the provided string template into Children by replacing literal line
|
|
5
|
-
* breaks with hardlines and automatically indenting indented content. Similar
|
|
6
|
-
* in spirit to the `<code>` element in HTML.
|
|
7
|
-
*
|
|
8
|
-
* @see {@link text} for a similar function which treats whitespace similar to
|
|
9
|
-
* JSX template bodies.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* code`
|
|
14
|
-
* function greet(name: string) {
|
|
15
|
-
* console.log("Hello, " + name + "!");
|
|
16
|
-
* }
|
|
17
|
-
* `
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* @param template - The template string to be processed into Children.
|
|
21
|
-
* @param substitutions - Any interpolated values within the template, which will be treated as Children and properly indented.
|
|
22
|
-
* @returns A Children representation of the provided template string, with proper handling of line breaks and indentation.
|
|
23
|
-
* @throws Will throw an error if the provided template contains only whitespace, as this is likely a mistake and would cause a less recognizable "Cannot read properties of undefined" exception later in the processing.
|
|
24
|
-
*/
|
|
25
|
-
declare function code(template: TemplateStringsArray, ...substitutions: Children[]): Children;
|
|
26
|
-
//#endregion
|
|
27
|
-
export { code };
|
|
28
|
-
//# sourceMappingURL=code.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"code.d.cts","names":[],"sources":["../../../src/core/helpers/code.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;iBA0CgB,KACd,UAAU,yBACP,eAAe,aACjB"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Children } from "@alloy-js/core";
|
|
2
|
-
//#region src/core/helpers/code.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Turn the provided string template into Children by replacing literal line
|
|
5
|
-
* breaks with hardlines and automatically indenting indented content. Similar
|
|
6
|
-
* in spirit to the `<code>` element in HTML.
|
|
7
|
-
*
|
|
8
|
-
* @see {@link text} for a similar function which treats whitespace similar to
|
|
9
|
-
* JSX template bodies.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* code`
|
|
14
|
-
* function greet(name: string) {
|
|
15
|
-
* console.log("Hello, " + name + "!");
|
|
16
|
-
* }
|
|
17
|
-
* `
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* @param template - The template string to be processed into Children.
|
|
21
|
-
* @param substitutions - Any interpolated values within the template, which will be treated as Children and properly indented.
|
|
22
|
-
* @returns A Children representation of the provided template string, with proper handling of line breaks and indentation.
|
|
23
|
-
* @throws Will throw an error if the provided template contains only whitespace, as this is likely a mistake and would cause a less recognizable "Cannot read properties of undefined" exception later in the processing.
|
|
24
|
-
*/
|
|
25
|
-
declare function code(template: TemplateStringsArray, ...substitutions: Children[]): Children;
|
|
26
|
-
//#endregion
|
|
27
|
-
export { code };
|
|
28
|
-
//# sourceMappingURL=code.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"code.d.mts","names":[],"sources":["../../../src/core/helpers/code.ts"],"mappings":""}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { code as code$1 } from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region src/core/helpers/code.ts
|
|
4
|
-
/**
|
|
5
|
-
* Turn the provided string template into Children by replacing literal line
|
|
6
|
-
* breaks with hardlines and automatically indenting indented content. Similar
|
|
7
|
-
* in spirit to the `<code>` element in HTML.
|
|
8
|
-
*
|
|
9
|
-
* @see {@link text} for a similar function which treats whitespace similar to
|
|
10
|
-
* JSX template bodies.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* code`
|
|
15
|
-
* function greet(name: string) {
|
|
16
|
-
* console.log("Hello, " + name + "!");
|
|
17
|
-
* }
|
|
18
|
-
* `
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @param template - The template string to be processed into Children.
|
|
22
|
-
* @param substitutions - Any interpolated values within the template, which will be treated as Children and properly indented.
|
|
23
|
-
* @returns A Children representation of the provided template string, with proper handling of line breaks and indentation.
|
|
24
|
-
* @throws Will throw an error if the provided template contains only whitespace, as this is likely a mistake and would cause a less recognizable "Cannot read properties of undefined" exception later in the processing.
|
|
25
|
-
*/
|
|
26
|
-
function code(template, ...substitutions) {
|
|
27
|
-
if (template.filter((seg) => seg.trim()).length === 0 && substitutions.length === 0) throw new Error("The `code` function cannot be used with a template that contains only whitespace. Please provide a non-empty template.");
|
|
28
|
-
return code$1(template, ...substitutions);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
export { code };
|
|
33
|
-
//# sourceMappingURL=code.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"code.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_core_helpers_code = require('../../core/helpers/code.cjs');
|
|
3
|
-
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
|
-
let _alloy_js_core = require("@alloy-js/core");
|
|
5
|
-
|
|
6
|
-
//#region src/hcl/components/block-declaration.tsx
|
|
7
|
-
/**
|
|
8
|
-
* A base component representing a block declaration in HCL. The children are rendered as a prose element, which means that they are broken into multiple lines. This component can be used to create more specific block declaration components, such as resource blocks, provider blocks, etc.
|
|
9
|
-
*
|
|
10
|
-
* @see https://developer.hashicorp.com/terraform/language#about-the-terraform-language
|
|
11
|
-
* @see https://opentofu.org/docs/language/attr-as-blocks/#summary
|
|
12
|
-
*
|
|
13
|
-
* @param props - The properties for the source file.
|
|
14
|
-
* @returns The rendered source file component.
|
|
15
|
-
*/
|
|
16
|
-
function BlockDeclaration(props) {
|
|
17
|
-
const { children, type, label } = props;
|
|
18
|
-
return [
|
|
19
|
-
(0, _alloy_js_core_jsx_runtime.memo)(() => require_core_helpers_code.code`${type} ${Array.isArray(label) ? label.join(" ") : label} {`),
|
|
20
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Prose, { get children() {
|
|
21
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
22
|
-
get when() {
|
|
23
|
-
return Boolean(children);
|
|
24
|
-
},
|
|
25
|
-
children
|
|
26
|
-
});
|
|
27
|
-
} }),
|
|
28
|
-
require_core_helpers_code.code`} `
|
|
29
|
-
];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
//#endregion
|
|
33
|
-
exports.BlockDeclaration = BlockDeclaration;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from "../../types/components.cjs";
|
|
2
|
-
//#region src/hcl/components/block-declaration.d.ts
|
|
3
|
-
interface BlockDeclarationProps extends ComponentProps {
|
|
4
|
-
type: string;
|
|
5
|
-
label: string | string[];
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* A base component representing a block declaration in HCL. The children are rendered as a prose element, which means that they are broken into multiple lines. This component can be used to create more specific block declaration components, such as resource blocks, provider blocks, etc.
|
|
9
|
-
*
|
|
10
|
-
* @see https://developer.hashicorp.com/terraform/language#about-the-terraform-language
|
|
11
|
-
* @see https://opentofu.org/docs/language/attr-as-blocks/#summary
|
|
12
|
-
*
|
|
13
|
-
* @param props - The properties for the source file.
|
|
14
|
-
* @returns The rendered source file component.
|
|
15
|
-
*/
|
|
16
|
-
declare function BlockDeclaration(props: BlockDeclarationProps): import("@alloy-js/core").Children;
|
|
17
|
-
//#endregion
|
|
18
|
-
export { BlockDeclaration, BlockDeclarationProps };
|
|
19
|
-
//# sourceMappingURL=block-declaration.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"block-declaration.d.cts","names":[],"sources":["../../../src/hcl/components/block-declaration.tsx"],"mappings":";;UAsBiB,8BAA8B;EAC7C;EACA;;;;;;;;;;;iBAYc,iBAAiB,OAAO,iDAAqB"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from "../../types/components.mjs";
|
|
2
|
-
//#region src/hcl/components/block-declaration.d.ts
|
|
3
|
-
interface BlockDeclarationProps extends ComponentProps {
|
|
4
|
-
type: string;
|
|
5
|
-
label: string | string[];
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* A base component representing a block declaration in HCL. The children are rendered as a prose element, which means that they are broken into multiple lines. This component can be used to create more specific block declaration components, such as resource blocks, provider blocks, etc.
|
|
9
|
-
*
|
|
10
|
-
* @see https://developer.hashicorp.com/terraform/language#about-the-terraform-language
|
|
11
|
-
* @see https://opentofu.org/docs/language/attr-as-blocks/#summary
|
|
12
|
-
*
|
|
13
|
-
* @param props - The properties for the source file.
|
|
14
|
-
* @returns The rendered source file component.
|
|
15
|
-
*/
|
|
16
|
-
declare function BlockDeclaration(props: BlockDeclarationProps): import("@alloy-js/core").Children;
|
|
17
|
-
//#endregion
|
|
18
|
-
export { BlockDeclaration, BlockDeclarationProps };
|
|
19
|
-
//# sourceMappingURL=block-declaration.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"block-declaration.d.mts","names":[],"sources":["../../../src/hcl/components/block-declaration.tsx"],"mappings":""}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { code as code$1 } from "../../core/helpers/code.mjs";
|
|
2
|
-
import { createComponent, memo } from "@alloy-js/core/jsx-runtime";
|
|
3
|
-
import { Prose, Show } from "@alloy-js/core";
|
|
4
|
-
|
|
5
|
-
//#region src/hcl/components/block-declaration.tsx
|
|
6
|
-
/**
|
|
7
|
-
* A base component representing a block declaration in HCL. The children are rendered as a prose element, which means that they are broken into multiple lines. This component can be used to create more specific block declaration components, such as resource blocks, provider blocks, etc.
|
|
8
|
-
*
|
|
9
|
-
* @see https://developer.hashicorp.com/terraform/language#about-the-terraform-language
|
|
10
|
-
* @see https://opentofu.org/docs/language/attr-as-blocks/#summary
|
|
11
|
-
*
|
|
12
|
-
* @param props - The properties for the source file.
|
|
13
|
-
* @returns The rendered source file component.
|
|
14
|
-
*/
|
|
15
|
-
function BlockDeclaration(props) {
|
|
16
|
-
const { children, type, label } = props;
|
|
17
|
-
return [
|
|
18
|
-
memo(() => code$1`${type} ${Array.isArray(label) ? label.join(" ") : label} {`),
|
|
19
|
-
createComponent(Prose, { get children() {
|
|
20
|
-
return createComponent(Show, {
|
|
21
|
-
get when() {
|
|
22
|
-
return Boolean(children);
|
|
23
|
-
},
|
|
24
|
-
children
|
|
25
|
-
});
|
|
26
|
-
} }),
|
|
27
|
-
code$1`} `
|
|
28
|
-
];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
export { BlockDeclaration };
|
|
33
|
-
//# sourceMappingURL=block-declaration.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"block-declaration.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_core_contexts_context = require('../../core/contexts/context.cjs');
|
|
3
|
-
const require_core_components_infrastructure_file = require('../../core/components/infrastructure-file.cjs');
|
|
4
|
-
const require_core_components_single_line_comment = require('../../core/components/single-line-comment.cjs');
|
|
5
|
-
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
6
|
-
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
7
|
-
let _alloy_js_core = require("@alloy-js/core");
|
|
8
|
-
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
9
|
-
let powerlines_utils = require("powerlines/utils");
|
|
10
|
-
|
|
11
|
-
//#region src/hcl/components/hcl-file.tsx
|
|
12
|
-
/**
|
|
13
|
-
* A base component representing a Powerlines generated HCL source file.
|
|
14
|
-
*
|
|
15
|
-
* @param props - The properties for the source file.
|
|
16
|
-
* @returns The rendered source file component.
|
|
17
|
-
*/
|
|
18
|
-
function HCLFile(props) {
|
|
19
|
-
const [{ children, storage, header, filetype: _filetype, id }, rest] = (0, _alloy_js_core.splitProps)(props, [
|
|
20
|
-
"children",
|
|
21
|
-
"storage",
|
|
22
|
-
"header",
|
|
23
|
-
"filetype",
|
|
24
|
-
"id"
|
|
25
|
-
]);
|
|
26
|
-
const filetype = (0, _alloy_js_core.computed)(() => _filetype || (0, _stryke_path_file_path_fns.findFileExtension)(id) || "hcl");
|
|
27
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_infrastructure_file.InfrastructureFile, (0, _alloy_js_core_jsx_runtime.mergeProps)({ get header() {
|
|
28
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(HCLFileHeader, { children: header });
|
|
29
|
-
} }, rest, {
|
|
30
|
-
id,
|
|
31
|
-
get filetype() {
|
|
32
|
-
return filetype.value;
|
|
33
|
-
},
|
|
34
|
-
storage: storage || "fs",
|
|
35
|
-
get children() {
|
|
36
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
37
|
-
get when() {
|
|
38
|
-
return Boolean(children);
|
|
39
|
-
},
|
|
40
|
-
children
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}));
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Renders the header for a Powerlines HCL source file.
|
|
47
|
-
*
|
|
48
|
-
* @param props - The properties for the source file header.
|
|
49
|
-
* @returns The rendered source file header.
|
|
50
|
-
*/
|
|
51
|
-
function HCLFileHeader(props) {
|
|
52
|
-
const [{ children }] = (0, _alloy_js_core.splitProps)(props, ["children"]);
|
|
53
|
-
const context = require_core_contexts_context.usePowerlines();
|
|
54
|
-
return [
|
|
55
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
56
|
-
get when() {
|
|
57
|
-
return Boolean(children);
|
|
58
|
-
},
|
|
59
|
-
get children() {
|
|
60
|
-
return [children, (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
61
|
-
}
|
|
62
|
-
}),
|
|
63
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_single_line_comment.SingleLineComment, {
|
|
64
|
-
variant: "hcl",
|
|
65
|
-
get children() {
|
|
66
|
-
return `Generated by ${(0, _stryke_string_format_title_case.titleCase)(context?.config?.framework?.name) || "Powerlines"}`;
|
|
67
|
-
}
|
|
68
|
-
}),
|
|
69
|
-
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
70
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_single_line_comment.SingleLineComment, {
|
|
71
|
-
variant: "hcl",
|
|
72
|
-
get children() {
|
|
73
|
-
return (0, powerlines_utils.getFileHeaderWarning)(context);
|
|
74
|
-
}
|
|
75
|
-
}),
|
|
76
|
-
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
77
|
-
];
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
//#endregion
|
|
81
|
-
exports.HCLFile = HCLFile;
|
|
82
|
-
exports.HCLFileHeader = HCLFileHeader;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from "../../types/components.cjs";
|
|
2
|
-
import { InfrastructureFileProps } from "../../core/components/infrastructure-file.cjs";
|
|
3
|
-
import { Children } from "@alloy-js/core";
|
|
4
|
-
//#region src/hcl/components/hcl-file.d.ts
|
|
5
|
-
type HCLFileProps = Omit<InfrastructureFileProps, "header" | "filetype"> & ComponentProps & {
|
|
6
|
-
header?: Children;
|
|
7
|
-
filetype?: "hcl" | "tf" | `${string}.hcl` | `${string}.tf`;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* A base component representing a Powerlines generated HCL source file.
|
|
11
|
-
*
|
|
12
|
-
* @param props - The properties for the source file.
|
|
13
|
-
* @returns The rendered source file component.
|
|
14
|
-
*/
|
|
15
|
-
declare function HCLFile(props: HCLFileProps): Children;
|
|
16
|
-
/**
|
|
17
|
-
* Renders the header for a Powerlines HCL source file.
|
|
18
|
-
*
|
|
19
|
-
* @param props - The properties for the source file header.
|
|
20
|
-
* @returns The rendered source file header.
|
|
21
|
-
*/
|
|
22
|
-
declare function HCLFileHeader(props: ComponentProps): Children;
|
|
23
|
-
//#endregion
|
|
24
|
-
export { HCLFile, HCLFileHeader, HCLFileProps };
|
|
25
|
-
//# sourceMappingURL=hcl-file.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hcl-file.d.cts","names":[],"sources":["../../../src/hcl/components/hcl-file.tsx"],"mappings":";;;;KA8BY,eAAe,KACzB,kDAGA;EACE,SAAS;EACT;;;;;;;;iBASY,QAAQ,OAAO,eAAY;;;;;;;iBAwB3B,cAAc,OAAO,iBAAc"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from "../../types/components.mjs";
|
|
2
|
-
import { InfrastructureFileProps } from "../../core/components/infrastructure-file.mjs";
|
|
3
|
-
import { Children } from "@alloy-js/core";
|
|
4
|
-
//#region src/hcl/components/hcl-file.d.ts
|
|
5
|
-
type HCLFileProps = Omit<InfrastructureFileProps, "header" | "filetype"> & ComponentProps & {
|
|
6
|
-
header?: Children;
|
|
7
|
-
filetype?: "hcl" | "tf" | `${string}.hcl` | `${string}.tf`;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* A base component representing a Powerlines generated HCL source file.
|
|
11
|
-
*
|
|
12
|
-
* @param props - The properties for the source file.
|
|
13
|
-
* @returns The rendered source file component.
|
|
14
|
-
*/
|
|
15
|
-
declare function HCLFile(props: HCLFileProps): Children;
|
|
16
|
-
/**
|
|
17
|
-
* Renders the header for a Powerlines HCL source file.
|
|
18
|
-
*
|
|
19
|
-
* @param props - The properties for the source file header.
|
|
20
|
-
* @returns The rendered source file header.
|
|
21
|
-
*/
|
|
22
|
-
declare function HCLFileHeader(props: ComponentProps): Children;
|
|
23
|
-
//#endregion
|
|
24
|
-
export { HCLFile, HCLFileHeader, HCLFileProps };
|
|
25
|
-
//# sourceMappingURL=hcl-file.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hcl-file.d.mts","names":[],"sources":["../../../src/hcl/components/hcl-file.tsx"],"mappings":""}
|