@powerlines/plugin-alloy 0.14.0
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/LICENSE +201 -0
- package/README.md +304 -0
- package/dist/builtin-file-BU93ve2k.d.cts +34 -0
- package/dist/builtin-file-CG53y-09.d.mts +34 -0
- package/dist/builtin-file-CkwxD4el.mjs +37 -0
- package/dist/builtin-file-DLVCgiye.cjs +43 -0
- package/dist/capnp-8yVLwAox.cjs +364 -0
- package/dist/capnp-CKLYTfgy.d.mts +87 -0
- package/dist/capnp-CNythuSw.mjs +267 -0
- package/dist/capnp-wJ2_HpAN.d.cts +87 -0
- package/dist/chunk-CbDLau6x.cjs +34 -0
- package/dist/components-B0A7LpQD.d.cts +142 -0
- package/dist/components-B2kXCrty.d.mts +142 -0
- package/dist/components-BOkkDhM9.cjs +0 -0
- package/dist/components-BXrpeD8J.cjs +0 -0
- package/dist/components-C3qpgLKV.mjs +1 -0
- package/dist/components-CBtEhH9k.mjs +1 -0
- package/dist/components-Cj5gaIV0.cjs +0 -0
- package/dist/components-HMVhsFQl.mjs +1 -0
- package/dist/components-I0ydtjfW.cjs +0 -0
- package/dist/components-ajocJcib.mjs +1 -0
- package/dist/context-BIduC1bB.cjs +44 -0
- package/dist/context-BO25KgR_.d.cts +1668 -0
- package/dist/context-CBG6Pv09.d.cts +26 -0
- package/dist/context-Cx38_mgI.mjs +26 -0
- package/dist/context-DzaJOnXh.d.mts +26 -0
- package/dist/context-GtZoIVx8.d.mts +1670 -0
- package/dist/contexts-BSRk0whx.cjs +0 -0
- package/dist/contexts-X44bRyOp.mjs +1 -0
- package/dist/contexts-XuEdvZdE.mjs +1 -0
- package/dist/contexts-uXFW3CIa.cjs +0 -0
- package/dist/core/components/index.cjs +9 -0
- package/dist/core/components/index.d.cts +7 -0
- package/dist/core/components/index.d.mts +7 -0
- package/dist/core/components/index.mjs +7 -0
- package/dist/core/components/output.cjs +4 -0
- package/dist/core/components/output.d.cts +3 -0
- package/dist/core/components/output.d.mts +3 -0
- package/dist/core/components/output.mjs +4 -0
- package/dist/core/components/single-line-comment.cjs +3 -0
- package/dist/core/components/single-line-comment.d.cts +4 -0
- package/dist/core/components/single-line-comment.d.mts +4 -0
- package/dist/core/components/single-line-comment.mjs +3 -0
- package/dist/core/components/source-file.cjs +3 -0
- package/dist/core/components/source-file.d.cts +4 -0
- package/dist/core/components/source-file.d.mts +4 -0
- package/dist/core/components/source-file.mjs +3 -0
- package/dist/core/contexts/context.cjs +5 -0
- package/dist/core/contexts/context.d.cts +3 -0
- package/dist/core/contexts/context.d.mts +3 -0
- package/dist/core/contexts/context.mjs +3 -0
- package/dist/core/contexts/index.cjs +15 -0
- package/dist/core/contexts/index.d.cts +6 -0
- package/dist/core/contexts/index.d.mts +6 -0
- package/dist/core/contexts/index.mjs +5 -0
- package/dist/core/contexts/reflection.cjs +10 -0
- package/dist/core/contexts/reflection.d.cts +4 -0
- package/dist/core/contexts/reflection.d.mts +4 -0
- package/dist/core/contexts/reflection.mjs +3 -0
- package/dist/core/index.cjs +23 -0
- package/dist/core/index.d.cts +11 -0
- package/dist/core/index.d.mts +11 -0
- package/dist/core/index.mjs +10 -0
- package/dist/core-B57eQAue.mjs +1 -0
- package/dist/core-DzEmU6tL.cjs +0 -0
- package/dist/create-builtin-Bpswa0ZT.d.cts +15 -0
- package/dist/create-builtin-CP9mN5P-.mjs +18 -0
- package/dist/create-builtin-_3GNADDt.cjs +24 -0
- package/dist/create-builtin-wEbNOWNw.d.mts +15 -0
- package/dist/dynamic-import-statement-BhY2a13r.d.cts +32 -0
- package/dist/dynamic-import-statement-DoTHSt57.mjs +28 -0
- package/dist/dynamic-import-statement-DyVWBclX.d.mts +32 -0
- package/dist/dynamic-import-statement-JVLyMPXr.cjs +34 -0
- package/dist/entry-file-B159R5XY.d.cts +27 -0
- package/dist/entry-file-BA75rAwb.cjs +41 -0
- package/dist/entry-file-Bw1mgMP3.mjs +34 -0
- package/dist/entry-file-DfFhEkLi.d.mts +27 -0
- package/dist/helpers/capnp.cjs +19 -0
- package/dist/helpers/capnp.d.cts +3 -0
- package/dist/helpers/capnp.d.mts +3 -0
- package/dist/helpers/capnp.mjs +4 -0
- package/dist/helpers/create-builtin.cjs +3 -0
- package/dist/helpers/create-builtin.d.cts +2 -0
- package/dist/helpers/create-builtin.d.mts +2 -0
- package/dist/helpers/create-builtin.mjs +3 -0
- package/dist/helpers/index.cjs +26 -0
- package/dist/helpers/index.d.cts +7 -0
- package/dist/helpers/index.d.mts +7 -0
- package/dist/helpers/index.mjs +8 -0
- package/dist/helpers/refkey.cjs +3 -0
- package/dist/helpers/refkey.d.cts +2 -0
- package/dist/helpers/refkey.d.mts +2 -0
- package/dist/helpers/refkey.mjs +3 -0
- package/dist/helpers/typescript.cjs +4 -0
- package/dist/helpers/typescript.d.cts +2 -0
- package/dist/helpers/typescript.d.mts +2 -0
- package/dist/helpers/typescript.mjs +4 -0
- package/dist/helpers-BrA1Dy07.mjs +1 -0
- package/dist/helpers-Cten3PJk.cjs +0 -0
- package/dist/index-BINnViIh.d.mts +1 -0
- package/dist/index-BJ8-FA6N.d.cts +1 -0
- package/dist/index-BRJ_6A42.d.mts +1 -0
- package/dist/index-BXpMZvwA.d.cts +1 -0
- package/dist/index-Bi0Yc4v2.d.cts +1 -0
- package/dist/index-BrGZHEgX.d.mts +1 -0
- package/dist/index-BwFl_eS0.d.mts +1 -0
- package/dist/index-C1ihAKnV.d.cts +1 -0
- package/dist/index-CLTQPxoD.d.mts +1 -0
- package/dist/index-CoUVmp_Q.d.mts +1 -0
- package/dist/index-D1aKd2tO.d.cts +1 -0
- package/dist/index-D4d_pZLu.d.cts +1 -0
- package/dist/index-DBGd4WeR.d.mts +1 -0
- package/dist/index-DdxxIAKU.d.cts +1 -0
- package/dist/index-Deol7ZWO.d.mts +1 -0
- package/dist/index-DpEKQcoR.d.cts +1 -0
- package/dist/index-DrZ2Dh-H.d.cts +1 -0
- package/dist/index-MEuojd-r.d.cts +1 -0
- package/dist/index-bHnO4ZKt.d.mts +1 -0
- package/dist/index-lIMqGGJz.d.mts +1 -0
- package/dist/index.cjs +446 -0
- package/dist/index.d.cts +45 -0
- package/dist/index.d.mts +45 -0
- package/dist/index.mjs +361 -0
- package/dist/markdown/components/index.cjs +13 -0
- package/dist/markdown/components/index.d.cts +8 -0
- package/dist/markdown/components/index.d.mts +8 -0
- package/dist/markdown/components/index.mjs +9 -0
- package/dist/markdown/components/markdown-file.cjs +7 -0
- package/dist/markdown/components/markdown-file.d.cts +5 -0
- package/dist/markdown/components/markdown-file.d.mts +5 -0
- package/dist/markdown/components/markdown-file.mjs +6 -0
- package/dist/markdown/components/markdown-table.cjs +6 -0
- package/dist/markdown/components/markdown-table.d.cts +5 -0
- package/dist/markdown/components/markdown-table.d.mts +5 -0
- package/dist/markdown/components/markdown-table.mjs +4 -0
- package/dist/markdown/contexts/index.cjs +7 -0
- package/dist/markdown/contexts/index.d.cts +3 -0
- package/dist/markdown/contexts/index.d.mts +3 -0
- package/dist/markdown/contexts/index.mjs +4 -0
- package/dist/markdown/contexts/markdown-table.cjs +6 -0
- package/dist/markdown/contexts/markdown-table.d.cts +2 -0
- package/dist/markdown/contexts/markdown-table.d.mts +2 -0
- package/dist/markdown/contexts/markdown-table.mjs +3 -0
- package/dist/markdown/index.cjs +19 -0
- package/dist/markdown/index.d.cts +10 -0
- package/dist/markdown/index.d.mts +10 -0
- package/dist/markdown/index.mjs +11 -0
- package/dist/markdown-BTQE0AI9.cjs +0 -0
- package/dist/markdown-DMddlO1y.mjs +1 -0
- package/dist/markdown-file-BFbbzD59.mjs +90 -0
- package/dist/markdown-file-Bsuu9aIk.d.cts +23 -0
- package/dist/markdown-file-CB6u4Cp1.d.mts +23 -0
- package/dist/markdown-file-CzGNj_Ex.cjs +102 -0
- package/dist/markdown-table-2qP_4eLk.mjs +33 -0
- package/dist/markdown-table-BOWM26Kb.cjs +57 -0
- package/dist/markdown-table-BUxH6aRh.mjs +77 -0
- package/dist/markdown-table-CMaQVkwJ.d.mts +27 -0
- package/dist/markdown-table-CZMEY6IR.d.cts +37 -0
- package/dist/markdown-table-DFaNSBRn.cjs +95 -0
- package/dist/markdown-table-SvbpUdq-.d.cts +27 -0
- package/dist/markdown-table-kFQoqKQt.d.mts +37 -0
- package/dist/output-ChpN7bQM.d.cts +18 -0
- package/dist/output-CnofBsl0.cjs +38 -0
- package/dist/output-D9RlZeCO.d.mts +18 -0
- package/dist/output-DEdXZ94G.mjs +32 -0
- package/dist/plugin-C0DspKAF.d.mts +34 -0
- package/dist/plugin-DU0K2-Om.mjs +1 -0
- package/dist/plugin-DYBdUgTF.d.cts +34 -0
- package/dist/plugin-Fx-uJ4It.cjs +0 -0
- package/dist/record-expression-BOCZ9iqR.d.mts +12 -0
- package/dist/record-expression-DM_zSqE_.d.cts +12 -0
- package/dist/record-expression-DNVzCKgo.cjs +17 -0
- package/dist/record-expression-DxS_DiPc.mjs +11 -0
- package/dist/refkey-B0XSqdGY.d.mts +13 -0
- package/dist/refkey-B6A9kh_u.cjs +21 -0
- package/dist/refkey-CP7MJMac.d.cts +13 -0
- package/dist/refkey-CV0mIj0Y.mjs +15 -0
- package/dist/reflection-BSbFFYZO.cjs +108 -0
- package/dist/reflection-Bka9prwJ.d.mts +52 -0
- package/dist/reflection-CBMQ1FQo.mjs +60 -0
- package/dist/reflection-CkVyW69y.d.cts +52 -0
- package/dist/single-line-comment-BMPq6OR0.cjs +25 -0
- package/dist/single-line-comment-BjL_Z4Qn.d.cts +22 -0
- package/dist/single-line-comment-C5CtHQhi.mjs +19 -0
- package/dist/single-line-comment-DZAmp_BZ.d.mts +22 -0
- package/dist/source-file-4J1OvLed.d.cts +31 -0
- package/dist/source-file-BBbuhOKz.d.mts +31 -0
- package/dist/source-file-CCYwl5pI.mjs +52 -0
- package/dist/source-file-DTd1KgD5.cjs +59 -0
- package/dist/tsdoc-BFPYF-Fh.cjs +487 -0
- package/dist/tsdoc-BmyOQBxT.mjs +367 -0
- package/dist/tsdoc-C39LB5Mn.d.cts +152 -0
- package/dist/tsdoc-OE37Ht2l.d.mts +152 -0
- package/dist/tsdoc-reflection-3ZoV_Mjz.d.cts +18 -0
- package/dist/tsdoc-reflection-3hSdGY1e.mjs +97 -0
- package/dist/tsdoc-reflection-BQN8iUG1.cjs +115 -0
- package/dist/tsdoc-reflection-BtEk3cDW.d.mts +18 -0
- package/dist/types/components.cjs +1 -0
- package/dist/types/components.d.cts +3 -0
- package/dist/types/components.d.mts +3 -0
- package/dist/types/components.mjs +3 -0
- package/dist/types/index.cjs +3 -0
- package/dist/types/index.d.cts +5 -0
- package/dist/types/index.d.mts +5 -0
- package/dist/types/index.mjs +5 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +3 -0
- package/dist/types/plugin.d.mts +3 -0
- package/dist/types/plugin.mjs +3 -0
- package/dist/types-BBEDEYnP.cjs +0 -0
- package/dist/types-BWlfXHs2.mjs +1 -0
- package/dist/typescript/components/builtin-file.cjs +9 -0
- package/dist/typescript/components/builtin-file.d.cts +7 -0
- package/dist/typescript/components/builtin-file.d.mts +7 -0
- package/dist/typescript/components/builtin-file.mjs +9 -0
- package/dist/typescript/components/dynamic-import-statement.cjs +3 -0
- package/dist/typescript/components/dynamic-import-statement.d.cts +2 -0
- package/dist/typescript/components/dynamic-import-statement.d.mts +2 -0
- package/dist/typescript/components/dynamic-import-statement.mjs +3 -0
- package/dist/typescript/components/entry-file.cjs +7 -0
- package/dist/typescript/components/entry-file.d.cts +6 -0
- package/dist/typescript/components/entry-file.d.mts +6 -0
- package/dist/typescript/components/entry-file.mjs +7 -0
- package/dist/typescript/components/index.cjs +50 -0
- package/dist/typescript/components/index.d.cts +14 -0
- package/dist/typescript/components/index.d.mts +14 -0
- package/dist/typescript/components/index.mjs +17 -0
- package/dist/typescript/components/record-expression.cjs +3 -0
- package/dist/typescript/components/record-expression.d.cts +2 -0
- package/dist/typescript/components/record-expression.d.mts +2 -0
- package/dist/typescript/components/record-expression.mjs +3 -0
- package/dist/typescript/components/tsdoc-reflection.cjs +9 -0
- package/dist/typescript/components/tsdoc-reflection.d.cts +5 -0
- package/dist/typescript/components/tsdoc-reflection.d.mts +5 -0
- package/dist/typescript/components/tsdoc-reflection.mjs +7 -0
- package/dist/typescript/components/tsdoc.cjs +24 -0
- package/dist/typescript/components/tsdoc.d.cts +4 -0
- package/dist/typescript/components/tsdoc.d.mts +4 -0
- package/dist/typescript/components/tsdoc.mjs +5 -0
- package/dist/typescript/components/typescript-file.cjs +8 -0
- package/dist/typescript/components/typescript-file.d.cts +5 -0
- package/dist/typescript/components/typescript-file.d.mts +5 -0
- package/dist/typescript/components/typescript-file.mjs +6 -0
- package/dist/typescript/components/typescript-interface.cjs +9 -0
- package/dist/typescript/components/typescript-interface.d.cts +4 -0
- package/dist/typescript/components/typescript-interface.d.mts +4 -0
- package/dist/typescript/components/typescript-interface.mjs +8 -0
- package/dist/typescript/components/typescript-object.cjs +9 -0
- package/dist/typescript/components/typescript-object.d.cts +4 -0
- package/dist/typescript/components/typescript-object.d.mts +4 -0
- package/dist/typescript/components/typescript-object.mjs +8 -0
- package/dist/typescript/index.cjs +51 -0
- package/dist/typescript/index.d.cts +15 -0
- package/dist/typescript/index.d.mts +15 -0
- package/dist/typescript/index.mjs +18 -0
- package/dist/typescript-45caIUPa.mjs +1 -0
- package/dist/typescript-BrZsJqvc.mjs +45 -0
- package/dist/typescript-CXP7Oa6_.d.cts +25 -0
- package/dist/typescript-DG1-qdBQ.d.mts +25 -0
- package/dist/typescript-DV5akLQO.cjs +0 -0
- package/dist/typescript-DcqKlMoH.cjs +51 -0
- package/dist/typescript-file-6Y81yLyB.cjs +157 -0
- package/dist/typescript-file-BR9I7R1v.d.cts +47 -0
- package/dist/typescript-file-BWq9GIUt.d.mts +47 -0
- package/dist/typescript-file-y6oF016h.mjs +139 -0
- package/dist/typescript-interface-AydoCmGY.mjs +52 -0
- package/dist/typescript-interface-CKjljRFu.d.mts +25 -0
- package/dist/typescript-interface-Codd49Sl.cjs +64 -0
- package/dist/typescript-interface-fGS4VBnW.d.cts +25 -0
- package/dist/typescript-object-C-BmpHfk.mjs +93 -0
- package/dist/typescript-object-CxC5Qo5P.d.cts +26 -0
- package/dist/typescript-object-DOrJkpcM.cjs +105 -0
- package/dist/typescript-object-I6Huh12F.d.mts +26 -0
- package/dist/utilities-CnaPrauh.mjs +109 -0
- package/dist/utilities-llRqOC4l.cjs +133 -0
- package/package.json +411 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { ReflectionKind } from "@powerlines/deepkit/vendor/type";
|
|
2
|
+
import { getUniqueBy } from "@stryke/helpers/get-unique";
|
|
3
|
+
import { StormJSON } from "@stryke/json/storm-json";
|
|
4
|
+
import { isNull } from "@stryke/type-checks/is-null";
|
|
5
|
+
import { isString } from "@stryke/type-checks/is-string";
|
|
6
|
+
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
7
|
+
|
|
8
|
+
//#region ../deepkit/src/utilities.ts
|
|
9
|
+
/**
|
|
10
|
+
* Converts any {@link ReflectionProperty} or {@link ReflectionParameter}'s value to string representation.
|
|
11
|
+
*
|
|
12
|
+
* @param property - The {@link ReflectionProperty} or {@link ReflectionParameter} containing the value to stringify.
|
|
13
|
+
* @param value - The value to stringify.
|
|
14
|
+
* @returns A string representation of the value.
|
|
15
|
+
*/
|
|
16
|
+
function stringifyDefaultValue(property, value) {
|
|
17
|
+
return stringifyValue(property.type, value ?? property.getDefaultValue());
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Stringifies a value as a string.
|
|
21
|
+
*
|
|
22
|
+
* @param value - The value to stringify.
|
|
23
|
+
* @returns A string representation of the value.
|
|
24
|
+
*/
|
|
25
|
+
function stringifyStringValue(value) {
|
|
26
|
+
return `"${String(value).replaceAll("\"", "\\\"")}"`;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Converts any {@link Type}'s actual value to string representation.
|
|
30
|
+
*
|
|
31
|
+
* @param type - The {@link Type} of the value to stringify.
|
|
32
|
+
* @param value - The value to stringify.
|
|
33
|
+
* @returns A string representation of the value.
|
|
34
|
+
*/
|
|
35
|
+
function stringifyValue(type, value) {
|
|
36
|
+
return isUndefined(value) ? "undefined" : isNull(value) ? "null" : type.kind === ReflectionKind.boolean ? String(value).trim().toLowerCase() === "true" ? "true" : "false" : type.kind === ReflectionKind.string || type.kind === ReflectionKind.literal && isString(type.literal) ? stringifyStringValue(value) : type.kind === ReflectionKind.enum ? getEnumReflectionType(type).kind === ReflectionKind.string ? stringifyStringValue(value) : `${String(value)}` : type.kind === ReflectionKind.union ? isStringUnion(type) ? stringifyStringValue(value) : `${String(value)}` : type.kind === ReflectionKind.array ? stringifyStringValue(StormJSON.stringify(value)) : type.kind === ReflectionKind.object || type.kind === ReflectionKind.objectLiteral ? StormJSON.stringify(value) : type.kind === ReflectionKind.property || type.kind === ReflectionKind.parameter ? stringifyValue(type.type, value) : String(value);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Converts a {@link TypeEnum} to its underlying primitive type representation.
|
|
40
|
+
*
|
|
41
|
+
* @param type - The {@link TypeEnum} to evaluate.
|
|
42
|
+
* @returns A string representation of the primitive type.
|
|
43
|
+
*/
|
|
44
|
+
function getEnumReflectionType(type) {
|
|
45
|
+
if (type.kind !== ReflectionKind.enum) throw new Error(`Expected a TypeEnum, but received ${type.kind}.`);
|
|
46
|
+
const unique = getUniqueBy(type.values.filter((value) => value !== void 0 && value !== null), (enumMember) => isString(enumMember) ? { kind: ReflectionKind.string } : { kind: ReflectionKind.number });
|
|
47
|
+
if (unique.length === 0) throw new Error(`No valid enum members could be found.`);
|
|
48
|
+
return unique[0] && isString(unique[0]) ? { kind: ReflectionKind.string } : { kind: ReflectionKind.number };
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Converts a {@link TypeUnion} to its underlying primitive type representation.
|
|
52
|
+
*
|
|
53
|
+
* @param type - The {@link TypeUnion} to evaluate.
|
|
54
|
+
* @returns A string representation of the primitive type.
|
|
55
|
+
*/
|
|
56
|
+
function getUnionTypes(type) {
|
|
57
|
+
if (type.kind === ReflectionKind.union && type.types.length > 0) return getUniqueBy(type.types, (member) => member.kind);
|
|
58
|
+
throw new Error(`Expected a TypeUnion, but received ${type.kind}.`);
|
|
59
|
+
}
|
|
60
|
+
function isStringUnion(type) {
|
|
61
|
+
return getUnionTypes(type).some((member) => member.kind === ReflectionKind.string || member.kind === ReflectionKind.literal && isString(member.literal));
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Converts a ReflectionKind to its string representation.
|
|
65
|
+
*
|
|
66
|
+
* @param kind - The {@link ReflectionKind} to convert.
|
|
67
|
+
* @returns A string representation of the kind.
|
|
68
|
+
*/
|
|
69
|
+
function kindToName(kind) {
|
|
70
|
+
if (kind === ReflectionKind.void) return "void";
|
|
71
|
+
else if (kind === ReflectionKind.never) return "never";
|
|
72
|
+
else if (kind === ReflectionKind.null) return "null";
|
|
73
|
+
else if (kind === ReflectionKind.undefined) return "undefined";
|
|
74
|
+
else if (kind === ReflectionKind.symbol) return "symbol";
|
|
75
|
+
else if (kind === ReflectionKind.bigint) return "bigint";
|
|
76
|
+
else if (kind === ReflectionKind.number) return "number";
|
|
77
|
+
else if (kind === ReflectionKind.string) return "string";
|
|
78
|
+
else if (kind === ReflectionKind.boolean) return "boolean";
|
|
79
|
+
else if (kind === ReflectionKind.literal) return "literal";
|
|
80
|
+
else if (kind === ReflectionKind.class) return "class";
|
|
81
|
+
else if (kind === ReflectionKind.array) return "array";
|
|
82
|
+
else if (kind === ReflectionKind.object) return "object";
|
|
83
|
+
else if (kind === ReflectionKind.objectLiteral) return "objectLiteral";
|
|
84
|
+
else if (kind === ReflectionKind.union) return "union";
|
|
85
|
+
else if (kind === ReflectionKind.enum) return "enum";
|
|
86
|
+
else if (kind === ReflectionKind.regexp) return "regexp";
|
|
87
|
+
else if (kind === ReflectionKind.templateLiteral) return "templateLiteral";
|
|
88
|
+
else if (kind === ReflectionKind.property) return "property";
|
|
89
|
+
else if (kind === ReflectionKind.method) return "method";
|
|
90
|
+
else if (kind === ReflectionKind.function) return "function";
|
|
91
|
+
else if (kind === ReflectionKind.parameter) return "parameter";
|
|
92
|
+
else if (kind === ReflectionKind.promise) return "promise";
|
|
93
|
+
else if (kind === ReflectionKind.typeParameter) return "typeParameter";
|
|
94
|
+
else if (kind === ReflectionKind.tuple) return "tuple";
|
|
95
|
+
else if (kind === ReflectionKind.tupleMember) return "tupleMember";
|
|
96
|
+
else if (kind === ReflectionKind.enumMember) return "enumMember";
|
|
97
|
+
else if (kind === ReflectionKind.rest) return "rest";
|
|
98
|
+
else if (kind === ReflectionKind.indexSignature) return "indexSignature";
|
|
99
|
+
else if (kind === ReflectionKind.propertySignature) return "propertySignature";
|
|
100
|
+
else if (kind === ReflectionKind.methodSignature) return "methodSignature";
|
|
101
|
+
else if (kind === ReflectionKind.infer) return "infer";
|
|
102
|
+
else if (kind === ReflectionKind.callSignature) return "callSignature";
|
|
103
|
+
else if (kind === ReflectionKind.any) return "any";
|
|
104
|
+
else if (kind === ReflectionKind.intersection) return "intersection";
|
|
105
|
+
return "unknown";
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
//#endregion
|
|
109
|
+
export { stringifyValue as i, kindToName as n, stringifyDefaultValue as r, getUnionTypes as t };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CbDLau6x.cjs');
|
|
2
|
+
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
3
|
+
let __stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
|
|
4
|
+
let __stryke_json_storm_json = require("@stryke/json/storm-json");
|
|
5
|
+
let __stryke_type_checks_is_null = require("@stryke/type-checks/is-null");
|
|
6
|
+
let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
7
|
+
let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
8
|
+
|
|
9
|
+
//#region ../deepkit/src/utilities.ts
|
|
10
|
+
/**
|
|
11
|
+
* Converts any {@link ReflectionProperty} or {@link ReflectionParameter}'s value to string representation.
|
|
12
|
+
*
|
|
13
|
+
* @param property - The {@link ReflectionProperty} or {@link ReflectionParameter} containing the value to stringify.
|
|
14
|
+
* @param value - The value to stringify.
|
|
15
|
+
* @returns A string representation of the value.
|
|
16
|
+
*/
|
|
17
|
+
function stringifyDefaultValue(property, value) {
|
|
18
|
+
return stringifyValue(property.type, value ?? property.getDefaultValue());
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Stringifies a value as a string.
|
|
22
|
+
*
|
|
23
|
+
* @param value - The value to stringify.
|
|
24
|
+
* @returns A string representation of the value.
|
|
25
|
+
*/
|
|
26
|
+
function stringifyStringValue(value) {
|
|
27
|
+
return `"${String(value).replaceAll("\"", "\\\"")}"`;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Converts any {@link Type}'s actual value to string representation.
|
|
31
|
+
*
|
|
32
|
+
* @param type - The {@link Type} of the value to stringify.
|
|
33
|
+
* @param value - The value to stringify.
|
|
34
|
+
* @returns A string representation of the value.
|
|
35
|
+
*/
|
|
36
|
+
function stringifyValue(type, value) {
|
|
37
|
+
return (0, __stryke_type_checks_is_undefined.isUndefined)(value) ? "undefined" : (0, __stryke_type_checks_is_null.isNull)(value) ? "null" : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.boolean ? String(value).trim().toLowerCase() === "true" ? "true" : "false" : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string || type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.literal && (0, __stryke_type_checks_is_string.isString)(type.literal) ? stringifyStringValue(value) : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.enum ? getEnumReflectionType(type).kind === __powerlines_deepkit_vendor_type.ReflectionKind.string ? stringifyStringValue(value) : `${String(value)}` : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.union ? isStringUnion(type) ? stringifyStringValue(value) : `${String(value)}` : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.array ? stringifyStringValue(__stryke_json_storm_json.StormJSON.stringify(value)) : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.object || type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral ? __stryke_json_storm_json.StormJSON.stringify(value) : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.property || type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.parameter ? stringifyValue(type.type, value) : String(value);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Converts a {@link TypeEnum} to its underlying primitive type representation.
|
|
41
|
+
*
|
|
42
|
+
* @param type - The {@link TypeEnum} to evaluate.
|
|
43
|
+
* @returns A string representation of the primitive type.
|
|
44
|
+
*/
|
|
45
|
+
function getEnumReflectionType(type) {
|
|
46
|
+
if (type.kind !== __powerlines_deepkit_vendor_type.ReflectionKind.enum) throw new Error(`Expected a TypeEnum, but received ${type.kind}.`);
|
|
47
|
+
const unique = (0, __stryke_helpers_get_unique.getUniqueBy)(type.values.filter((value) => value !== void 0 && value !== null), (enumMember) => (0, __stryke_type_checks_is_string.isString)(enumMember) ? { kind: __powerlines_deepkit_vendor_type.ReflectionKind.string } : { kind: __powerlines_deepkit_vendor_type.ReflectionKind.number });
|
|
48
|
+
if (unique.length === 0) throw new Error(`No valid enum members could be found.`);
|
|
49
|
+
return unique[0] && (0, __stryke_type_checks_is_string.isString)(unique[0]) ? { kind: __powerlines_deepkit_vendor_type.ReflectionKind.string } : { kind: __powerlines_deepkit_vendor_type.ReflectionKind.number };
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Converts a {@link TypeUnion} to its underlying primitive type representation.
|
|
53
|
+
*
|
|
54
|
+
* @param type - The {@link TypeUnion} to evaluate.
|
|
55
|
+
* @returns A string representation of the primitive type.
|
|
56
|
+
*/
|
|
57
|
+
function getUnionTypes(type) {
|
|
58
|
+
if (type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.union && type.types.length > 0) return (0, __stryke_helpers_get_unique.getUniqueBy)(type.types, (member) => member.kind);
|
|
59
|
+
throw new Error(`Expected a TypeUnion, but received ${type.kind}.`);
|
|
60
|
+
}
|
|
61
|
+
function isStringUnion(type) {
|
|
62
|
+
return getUnionTypes(type).some((member) => member.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string || member.kind === __powerlines_deepkit_vendor_type.ReflectionKind.literal && (0, __stryke_type_checks_is_string.isString)(member.literal));
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Converts a ReflectionKind to its string representation.
|
|
66
|
+
*
|
|
67
|
+
* @param kind - The {@link ReflectionKind} to convert.
|
|
68
|
+
* @returns A string representation of the kind.
|
|
69
|
+
*/
|
|
70
|
+
function kindToName(kind) {
|
|
71
|
+
if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.void) return "void";
|
|
72
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.never) return "never";
|
|
73
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.null) return "null";
|
|
74
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.undefined) return "undefined";
|
|
75
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.symbol) return "symbol";
|
|
76
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.bigint) return "bigint";
|
|
77
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.number) return "number";
|
|
78
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.string) return "string";
|
|
79
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.boolean) return "boolean";
|
|
80
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.literal) return "literal";
|
|
81
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.class) return "class";
|
|
82
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.array) return "array";
|
|
83
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.object) return "object";
|
|
84
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral) return "objectLiteral";
|
|
85
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.union) return "union";
|
|
86
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.enum) return "enum";
|
|
87
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.regexp) return "regexp";
|
|
88
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.templateLiteral) return "templateLiteral";
|
|
89
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.property) return "property";
|
|
90
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.method) return "method";
|
|
91
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.function) return "function";
|
|
92
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.parameter) return "parameter";
|
|
93
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.promise) return "promise";
|
|
94
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.typeParameter) return "typeParameter";
|
|
95
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.tuple) return "tuple";
|
|
96
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.tupleMember) return "tupleMember";
|
|
97
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.enumMember) return "enumMember";
|
|
98
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.rest) return "rest";
|
|
99
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.indexSignature) return "indexSignature";
|
|
100
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.propertySignature) return "propertySignature";
|
|
101
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.methodSignature) return "methodSignature";
|
|
102
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.infer) return "infer";
|
|
103
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.callSignature) return "callSignature";
|
|
104
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.any) return "any";
|
|
105
|
+
else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.intersection) return "intersection";
|
|
106
|
+
return "unknown";
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
//#endregion
|
|
110
|
+
Object.defineProperty(exports, 'getUnionTypes', {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: function () {
|
|
113
|
+
return getUnionTypes;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
Object.defineProperty(exports, 'kindToName', {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function () {
|
|
119
|
+
return kindToName;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
Object.defineProperty(exports, 'stringifyDefaultValue', {
|
|
123
|
+
enumerable: true,
|
|
124
|
+
get: function () {
|
|
125
|
+
return stringifyDefaultValue;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
Object.defineProperty(exports, 'stringifyValue', {
|
|
129
|
+
enumerable: true,
|
|
130
|
+
get: function () {
|
|
131
|
+
return stringifyValue;
|
|
132
|
+
}
|
|
133
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@powerlines/plugin-alloy",
|
|
3
|
+
"version": "0.14.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "A package containing various Alloy framework components and helper utilities.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "github",
|
|
8
|
+
"url": "https://github.com/storm-software/powerlines.git",
|
|
9
|
+
"directory": "packages/plugin-alloy"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://stormsoftware.com",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://stormsoftware.com/support",
|
|
14
|
+
"email": "support@stormsoftware.com"
|
|
15
|
+
},
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "Storm Software",
|
|
18
|
+
"email": "contact@stormsoftware.com",
|
|
19
|
+
"url": "https://stormsoftware.com"
|
|
20
|
+
},
|
|
21
|
+
"maintainers": [
|
|
22
|
+
{
|
|
23
|
+
"name": "Storm Software",
|
|
24
|
+
"email": "contact@stormsoftware.com",
|
|
25
|
+
"url": "https://stormsoftware.com"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"contributors": [
|
|
29
|
+
{
|
|
30
|
+
"name": "Storm Software",
|
|
31
|
+
"email": "contact@stormsoftware.com",
|
|
32
|
+
"url": "https://stormsoftware.com"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"funding": {
|
|
36
|
+
"type": "github",
|
|
37
|
+
"url": "https://github.com/sponsors/storm-software"
|
|
38
|
+
},
|
|
39
|
+
"license": "Apache-2.0",
|
|
40
|
+
"private": false,
|
|
41
|
+
"main": "./dist/index.cjs",
|
|
42
|
+
"module": "./dist/index.mjs",
|
|
43
|
+
"typings": "./dist/index.d.mts",
|
|
44
|
+
"exports": {
|
|
45
|
+
"./package.json": "./package.json",
|
|
46
|
+
".": {
|
|
47
|
+
"import": {
|
|
48
|
+
"types": "./dist/index.d.mts",
|
|
49
|
+
"default": "./dist/index.mjs"
|
|
50
|
+
},
|
|
51
|
+
"require": {
|
|
52
|
+
"types": "./dist/index.d.cts",
|
|
53
|
+
"default": "./dist/index.cjs"
|
|
54
|
+
},
|
|
55
|
+
"default": {
|
|
56
|
+
"types": "./dist/index.d.mts",
|
|
57
|
+
"default": "./dist/index.mjs"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"./index": {
|
|
61
|
+
"import": {
|
|
62
|
+
"types": "./dist/index.d.mts",
|
|
63
|
+
"default": "./dist/index.mjs"
|
|
64
|
+
},
|
|
65
|
+
"require": {
|
|
66
|
+
"types": "./dist/index.d.cts",
|
|
67
|
+
"default": "./dist/index.cjs"
|
|
68
|
+
},
|
|
69
|
+
"default": {
|
|
70
|
+
"types": "./dist/index.d.mts",
|
|
71
|
+
"default": "./dist/index.mjs"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"./create-plugin": {
|
|
75
|
+
"import": {
|
|
76
|
+
"types": "./dist/create-plugin.d.mts",
|
|
77
|
+
"default": "./dist/create-plugin.mjs"
|
|
78
|
+
},
|
|
79
|
+
"require": {
|
|
80
|
+
"types": "./dist/create-plugin.d.cts",
|
|
81
|
+
"default": "./dist/create-plugin.cjs"
|
|
82
|
+
},
|
|
83
|
+
"default": {
|
|
84
|
+
"types": "./dist/create-plugin.d.mts",
|
|
85
|
+
"default": "./dist/create-plugin.mjs"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"./types": {
|
|
89
|
+
"import": {
|
|
90
|
+
"types": "./dist/types/index.d.mts",
|
|
91
|
+
"default": "./dist/types/index.mjs"
|
|
92
|
+
},
|
|
93
|
+
"require": {
|
|
94
|
+
"types": "./dist/types/index.d.cts",
|
|
95
|
+
"default": "./dist/types/index.cjs"
|
|
96
|
+
},
|
|
97
|
+
"default": {
|
|
98
|
+
"types": "./dist/types/index.d.mts",
|
|
99
|
+
"default": "./dist/types/index.mjs"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"./types/*": {
|
|
103
|
+
"import": {
|
|
104
|
+
"types": "./dist/types/*.d.mts",
|
|
105
|
+
"default": "./dist/types/*.mjs"
|
|
106
|
+
},
|
|
107
|
+
"require": {
|
|
108
|
+
"types": "./dist/types/*.d.cts",
|
|
109
|
+
"default": "./dist/types/*.cjs"
|
|
110
|
+
},
|
|
111
|
+
"default": {
|
|
112
|
+
"types": "./dist/types/*.d.mts",
|
|
113
|
+
"default": "./dist/types/*.mjs"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"./helpers": {
|
|
117
|
+
"import": {
|
|
118
|
+
"types": "./dist/helpers/index.d.mts",
|
|
119
|
+
"default": "./dist/helpers/index.mjs"
|
|
120
|
+
},
|
|
121
|
+
"require": {
|
|
122
|
+
"types": "./dist/helpers/index.d.cts",
|
|
123
|
+
"default": "./dist/helpers/index.cjs"
|
|
124
|
+
},
|
|
125
|
+
"default": {
|
|
126
|
+
"types": "./dist/helpers/index.d.mts",
|
|
127
|
+
"default": "./dist/helpers/index.mjs"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"./helpers/*": {
|
|
131
|
+
"import": {
|
|
132
|
+
"types": "./dist/helpers/*.d.mts",
|
|
133
|
+
"default": "./dist/helpers/*.mjs"
|
|
134
|
+
},
|
|
135
|
+
"require": {
|
|
136
|
+
"types": "./dist/helpers/*.d.cts",
|
|
137
|
+
"default": "./dist/helpers/*.cjs"
|
|
138
|
+
},
|
|
139
|
+
"default": {
|
|
140
|
+
"types": "./dist/helpers/*.d.mts",
|
|
141
|
+
"default": "./dist/helpers/*.mjs"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"./core": {
|
|
145
|
+
"import": {
|
|
146
|
+
"types": "./dist/core/index.d.mts",
|
|
147
|
+
"default": "./dist/core/index.mjs"
|
|
148
|
+
},
|
|
149
|
+
"require": {
|
|
150
|
+
"types": "./dist/core/index.d.cts",
|
|
151
|
+
"default": "./dist/core/index.cjs"
|
|
152
|
+
},
|
|
153
|
+
"default": {
|
|
154
|
+
"types": "./dist/core/index.d.mts",
|
|
155
|
+
"default": "./dist/core/index.mjs"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"./core/*": {
|
|
159
|
+
"import": {
|
|
160
|
+
"types": "./dist/core/*.d.mts",
|
|
161
|
+
"default": "./dist/core/*.mjs"
|
|
162
|
+
},
|
|
163
|
+
"require": {
|
|
164
|
+
"types": "./dist/core/*.d.cts",
|
|
165
|
+
"default": "./dist/core/*.cjs"
|
|
166
|
+
},
|
|
167
|
+
"default": {
|
|
168
|
+
"types": "./dist/core/*.d.mts",
|
|
169
|
+
"default": "./dist/core/*.mjs"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"./core/components": {
|
|
173
|
+
"import": {
|
|
174
|
+
"types": "./dist/core/components/index.d.mts",
|
|
175
|
+
"default": "./dist/core/components/index.mjs"
|
|
176
|
+
},
|
|
177
|
+
"require": {
|
|
178
|
+
"types": "./dist/core/components/index.d.cts",
|
|
179
|
+
"default": "./dist/core/components/index.cjs"
|
|
180
|
+
},
|
|
181
|
+
"default": {
|
|
182
|
+
"types": "./dist/core/components/index.d.mts",
|
|
183
|
+
"default": "./dist/core/components/index.mjs"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"./core/components/*": {
|
|
187
|
+
"import": {
|
|
188
|
+
"types": "./dist/core/components/*.d.mts",
|
|
189
|
+
"default": "./dist/core/components/*.mjs"
|
|
190
|
+
},
|
|
191
|
+
"require": {
|
|
192
|
+
"types": "./dist/core/components/*.d.cts",
|
|
193
|
+
"default": "./dist/core/components/*.cjs"
|
|
194
|
+
},
|
|
195
|
+
"default": {
|
|
196
|
+
"types": "./dist/core/components/*.d.mts",
|
|
197
|
+
"default": "./dist/core/components/*.mjs"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"./core/contexts": {
|
|
201
|
+
"import": {
|
|
202
|
+
"types": "./dist/core/contexts/index.d.mts",
|
|
203
|
+
"default": "./dist/core/contexts/index.mjs"
|
|
204
|
+
},
|
|
205
|
+
"require": {
|
|
206
|
+
"types": "./dist/core/contexts/index.d.cts",
|
|
207
|
+
"default": "./dist/core/contexts/index.cjs"
|
|
208
|
+
},
|
|
209
|
+
"default": {
|
|
210
|
+
"types": "./dist/core/contexts/index.d.mts",
|
|
211
|
+
"default": "./dist/core/contexts/index.mjs"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"./core/contexts/*": {
|
|
215
|
+
"import": {
|
|
216
|
+
"types": "./dist/core/contexts/*.d.mts",
|
|
217
|
+
"default": "./dist/core/contexts/*.mjs"
|
|
218
|
+
},
|
|
219
|
+
"require": {
|
|
220
|
+
"types": "./dist/core/contexts/*.d.cts",
|
|
221
|
+
"default": "./dist/core/contexts/*.cjs"
|
|
222
|
+
},
|
|
223
|
+
"default": {
|
|
224
|
+
"types": "./dist/core/contexts/*.d.mts",
|
|
225
|
+
"default": "./dist/core/contexts/*.mjs"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"./markdown": {
|
|
229
|
+
"import": {
|
|
230
|
+
"types": "./dist/markdown/index.d.mts",
|
|
231
|
+
"default": "./dist/markdown/index.mjs"
|
|
232
|
+
},
|
|
233
|
+
"require": {
|
|
234
|
+
"types": "./dist/markdown/index.d.cts",
|
|
235
|
+
"default": "./dist/markdown/index.cjs"
|
|
236
|
+
},
|
|
237
|
+
"default": {
|
|
238
|
+
"types": "./dist/markdown/index.d.mts",
|
|
239
|
+
"default": "./dist/markdown/index.mjs"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"./markdown/*": {
|
|
243
|
+
"import": {
|
|
244
|
+
"types": "./dist/markdown/*.d.mts",
|
|
245
|
+
"default": "./dist/markdown/*.mjs"
|
|
246
|
+
},
|
|
247
|
+
"require": {
|
|
248
|
+
"types": "./dist/markdown/*.d.cts",
|
|
249
|
+
"default": "./dist/markdown/*.cjs"
|
|
250
|
+
},
|
|
251
|
+
"default": {
|
|
252
|
+
"types": "./dist/markdown/*.d.mts",
|
|
253
|
+
"default": "./dist/markdown/*.mjs"
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"./markdown/components": {
|
|
257
|
+
"import": {
|
|
258
|
+
"types": "./dist/markdown/components/index.d.mts",
|
|
259
|
+
"default": "./dist/markdown/components/index.mjs"
|
|
260
|
+
},
|
|
261
|
+
"require": {
|
|
262
|
+
"types": "./dist/markdown/components/index.d.cts",
|
|
263
|
+
"default": "./dist/markdown/components/index.cjs"
|
|
264
|
+
},
|
|
265
|
+
"default": {
|
|
266
|
+
"types": "./dist/markdown/components/index.d.mts",
|
|
267
|
+
"default": "./dist/markdown/components/index.mjs"
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"./markdown/components/*": {
|
|
271
|
+
"import": {
|
|
272
|
+
"types": "./dist/markdown/components/*.d.mts",
|
|
273
|
+
"default": "./dist/markdown/components/*.mjs"
|
|
274
|
+
},
|
|
275
|
+
"require": {
|
|
276
|
+
"types": "./dist/markdown/components/*.d.cts",
|
|
277
|
+
"default": "./dist/markdown/components/*.cjs"
|
|
278
|
+
},
|
|
279
|
+
"default": {
|
|
280
|
+
"types": "./dist/markdown/components/*.d.mts",
|
|
281
|
+
"default": "./dist/markdown/components/*.mjs"
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"./markdown/contexts": {
|
|
285
|
+
"import": {
|
|
286
|
+
"types": "./dist/markdown/contexts/index.d.mts",
|
|
287
|
+
"default": "./dist/markdown/contexts/index.mjs"
|
|
288
|
+
},
|
|
289
|
+
"require": {
|
|
290
|
+
"types": "./dist/markdown/contexts/index.d.cts",
|
|
291
|
+
"default": "./dist/markdown/contexts/index.cjs"
|
|
292
|
+
},
|
|
293
|
+
"default": {
|
|
294
|
+
"types": "./dist/markdown/contexts/index.d.mts",
|
|
295
|
+
"default": "./dist/markdown/contexts/index.mjs"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"./markdown/contexts/*": {
|
|
299
|
+
"import": {
|
|
300
|
+
"types": "./dist/markdown/contexts/*.d.mts",
|
|
301
|
+
"default": "./dist/markdown/contexts/*.mjs"
|
|
302
|
+
},
|
|
303
|
+
"require": {
|
|
304
|
+
"types": "./dist/markdown/contexts/*.d.cts",
|
|
305
|
+
"default": "./dist/markdown/contexts/*.cjs"
|
|
306
|
+
},
|
|
307
|
+
"default": {
|
|
308
|
+
"types": "./dist/markdown/contexts/*.d.mts",
|
|
309
|
+
"default": "./dist/markdown/contexts/*.mjs"
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"./typescript": {
|
|
313
|
+
"import": {
|
|
314
|
+
"types": "./dist/typescript/index.d.mts",
|
|
315
|
+
"default": "./dist/typescript/index.mjs"
|
|
316
|
+
},
|
|
317
|
+
"require": {
|
|
318
|
+
"types": "./dist/typescript/index.d.cts",
|
|
319
|
+
"default": "./dist/typescript/index.cjs"
|
|
320
|
+
},
|
|
321
|
+
"default": {
|
|
322
|
+
"types": "./dist/typescript/index.d.mts",
|
|
323
|
+
"default": "./dist/typescript/index.mjs"
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"./typescript/*": {
|
|
327
|
+
"import": {
|
|
328
|
+
"types": "./dist/typescript/*.d.mts",
|
|
329
|
+
"default": "./dist/typescript/*.mjs"
|
|
330
|
+
},
|
|
331
|
+
"require": {
|
|
332
|
+
"types": "./dist/typescript/*.d.cts",
|
|
333
|
+
"default": "./dist/typescript/*.cjs"
|
|
334
|
+
},
|
|
335
|
+
"default": {
|
|
336
|
+
"types": "./dist/typescript/*.d.mts",
|
|
337
|
+
"default": "./dist/typescript/*.mjs"
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"./typescript/components": {
|
|
341
|
+
"import": {
|
|
342
|
+
"types": "./dist/typescript/components/index.d.mts",
|
|
343
|
+
"default": "./dist/typescript/components/index.mjs"
|
|
344
|
+
},
|
|
345
|
+
"require": {
|
|
346
|
+
"types": "./dist/typescript/components/index.d.cts",
|
|
347
|
+
"default": "./dist/typescript/components/index.cjs"
|
|
348
|
+
},
|
|
349
|
+
"default": {
|
|
350
|
+
"types": "./dist/typescript/components/index.d.mts",
|
|
351
|
+
"default": "./dist/typescript/components/index.mjs"
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
"./typescript/components/*": {
|
|
355
|
+
"import": {
|
|
356
|
+
"types": "./dist/typescript/components/*.d.mts",
|
|
357
|
+
"default": "./dist/typescript/components/*.mjs"
|
|
358
|
+
},
|
|
359
|
+
"require": {
|
|
360
|
+
"types": "./dist/typescript/components/*.d.cts",
|
|
361
|
+
"default": "./dist/typescript/components/*.cjs"
|
|
362
|
+
},
|
|
363
|
+
"default": {
|
|
364
|
+
"types": "./dist/typescript/components/*.d.mts",
|
|
365
|
+
"default": "./dist/typescript/components/*.mjs"
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"files": ["dist/**/*"],
|
|
370
|
+
"keywords": ["alloy-js", "powerlines", "storm-software", "powerlines-plugin"],
|
|
371
|
+
"dependencies": {
|
|
372
|
+
"@alloy-js/rollup-plugin": "^0.1.0",
|
|
373
|
+
"@alloy-js/babel-plugin": "^0.2.1",
|
|
374
|
+
"@alloy-js/babel-plugin-jsx-dom-expressions": "^0.39.1",
|
|
375
|
+
"@alloy-js/core": "^0.21.0",
|
|
376
|
+
"@alloy-js/json": "^0.21.0",
|
|
377
|
+
"@alloy-js/markdown": "^0.21.0",
|
|
378
|
+
"@alloy-js/typescript": "^0.21.0",
|
|
379
|
+
"@babel/plugin-syntax-jsx": "^7.27.1",
|
|
380
|
+
"@babel/plugin-syntax-typescript": "^7.27.1",
|
|
381
|
+
"@babel/plugin-transform-typescript": "^7.28.5",
|
|
382
|
+
"@powerlines/deepkit": "^0.5.17",
|
|
383
|
+
"@powerlines/plugin-plugin": "^0.12.54",
|
|
384
|
+
"@powerlines/plugin-babel": "^0.12.111",
|
|
385
|
+
"@storm-software/config-tools": "^1.188.74",
|
|
386
|
+
"@stryke/capnp": "^0.12.51",
|
|
387
|
+
"@stryke/convert": "^0.6.29",
|
|
388
|
+
"@stryke/fs": "^0.33.26",
|
|
389
|
+
"@stryke/helpers": "^0.9.31",
|
|
390
|
+
"@stryke/json": "^0.9.32",
|
|
391
|
+
"@stryke/path": "^0.24.0",
|
|
392
|
+
"@stryke/string-format": "^0.12.29",
|
|
393
|
+
"@stryke/type-checks": "^0.5.14",
|
|
394
|
+
"@stryke/types": "^0.10.28",
|
|
395
|
+
"@stryke/unique-id": "^0.3.37",
|
|
396
|
+
"@vue/reactivity": "^3.5.26",
|
|
397
|
+
"defu": "^6.1.4",
|
|
398
|
+
"jiti": "^2.6.1",
|
|
399
|
+
"powerlines": "^0.36.7",
|
|
400
|
+
"prettier": "^3.7.4"
|
|
401
|
+
},
|
|
402
|
+
"devDependencies": {
|
|
403
|
+
"@babel/core": "^7.28.5",
|
|
404
|
+
"@powerlines/nx": "^0.11.33",
|
|
405
|
+
"@storm-software/tsup": "^0.2.72",
|
|
406
|
+
"@rollup/plugin-babel": "^6.1.0",
|
|
407
|
+
"@types/node": "^24.10.4"
|
|
408
|
+
},
|
|
409
|
+
"publishConfig": { "access": "public" },
|
|
410
|
+
"gitHead": "abbf694ae460ab6f58ae645a000cabf4a4fdac80"
|
|
411
|
+
}
|