@iyio/protogen 0.7.43 → 0.8.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.
Files changed (116) hide show
  1. package/package.json +9 -13
  2. package/src/index.d.ts +17 -17
  3. package/src/index.js +17 -20
  4. package/src/index.js.map +1 -1
  5. package/src/lib/ProtoExpressionEngine.d.ts +1 -1
  6. package/src/lib/ProtoExpressionEngine.js +26 -31
  7. package/src/lib/ProtoExpressionEngine.js.map +1 -1
  8. package/src/lib/executeProtoPipelineAsync.d.ts +1 -1
  9. package/src/lib/executeProtoPipelineAsync.js +3 -7
  10. package/src/lib/executeProtoPipelineAsync.js.map +1 -1
  11. package/src/lib/markdown.d.ts +2 -2
  12. package/src/lib/markdown.js +30 -34
  13. package/src/lib/markdown.js.map +1 -1
  14. package/src/lib/output-utils.d.ts +1 -1
  15. package/src/lib/output-utils.js +35 -38
  16. package/src/lib/output-utils.js.map +1 -1
  17. package/src/lib/protogen-cli.d.ts +1 -1
  18. package/src/lib/protogen-cli.js +7 -11
  19. package/src/lib/protogen-cli.js.map +1 -1
  20. package/src/lib/protogen-expression-ctrls.d.ts +1 -1
  21. package/src/lib/protogen-expression-ctrls.js +22 -26
  22. package/src/lib/protogen-expression-ctrls.js.map +1 -1
  23. package/src/lib/protogen-expression-lib.d.ts +1 -1
  24. package/src/lib/protogen-expression-lib.js +19 -32
  25. package/src/lib/protogen-expression-lib.js.map +1 -1
  26. package/src/lib/protogen-expression-types.d.ts +1 -1
  27. package/src/lib/protogen-expression-types.js +4 -8
  28. package/src/lib/protogen-expression-types.js.map +1 -1
  29. package/src/lib/protogen-lib.d.ts +1 -1
  30. package/src/lib/protogen-lib.js +15 -28
  31. package/src/lib/protogen-lib.js.map +1 -1
  32. package/src/lib/protogen-node.d.ts +1 -1
  33. package/src/lib/protogen-node.js +98 -119
  34. package/src/lib/protogen-node.js.map +1 -1
  35. package/src/lib/protogen-pipeline-types.d.ts +2 -2
  36. package/src/lib/protogen-pipeline-types.js +5 -8
  37. package/src/lib/protogen-pipeline-types.js.map +1 -1
  38. package/src/lib/protogen-pipeline.d.ts +1 -1
  39. package/src/lib/protogen-pipeline.js +5 -10
  40. package/src/lib/protogen-pipeline.js.map +1 -1
  41. package/src/lib/protogen-plugin-util.d.ts +2 -2
  42. package/src/lib/protogen-plugin-util.js +17 -24
  43. package/src/lib/protogen-plugin-util.js.map +1 -1
  44. package/src/lib/protogen-types.d.ts +1 -1
  45. package/src/lib/protogen-types.js +2 -7
  46. package/src/lib/protogen-types.js.map +1 -1
  47. package/src/lib/protogen-workflow-lib.d.ts +2 -2
  48. package/src/lib/protogen-workflow-lib.js +20 -26
  49. package/src/lib/protogen-workflow-lib.js.map +1 -1
  50. package/src/lib/protogen-workflow-types.d.ts +2 -2
  51. package/src/lib/protogen-workflow-types.js +1 -2
  52. package/src/lib/test-plugin.js +3 -5
  53. package/src/lib/test-plugin.js.map +1 -1
  54. package/src/lib/typescript-utils.d.ts +2 -2
  55. package/src/lib/typescript-utils.js +18 -30
  56. package/src/lib/typescript-utils.js.map +1 -1
  57. package/src/package.json +1 -4
  58. package/tsconfig.tsbuildinfo +1 -0
  59. package/esm/package.json +0 -3
  60. package/esm/src/index.d.ts +0 -17
  61. package/esm/src/index.js +0 -18
  62. package/esm/src/index.js.map +0 -1
  63. package/esm/src/lib/ProtoExpressionEngine.d.ts +0 -16
  64. package/esm/src/lib/ProtoExpressionEngine.js +0 -356
  65. package/esm/src/lib/ProtoExpressionEngine.js.map +0 -1
  66. package/esm/src/lib/executeProtoPipelineAsync.d.ts +0 -2
  67. package/esm/src/lib/executeProtoPipelineAsync.js +0 -75
  68. package/esm/src/lib/executeProtoPipelineAsync.js.map +0 -1
  69. package/esm/src/lib/markdown.d.ts +0 -6
  70. package/esm/src/lib/markdown.js +0 -291
  71. package/esm/src/lib/markdown.js.map +0 -1
  72. package/esm/src/lib/output-utils.d.ts +0 -33
  73. package/esm/src/lib/output-utils.js +0 -235
  74. package/esm/src/lib/output-utils.js.map +0 -1
  75. package/esm/src/lib/protogen-cli.d.ts +0 -17
  76. package/esm/src/lib/protogen-cli.js +0 -25
  77. package/esm/src/lib/protogen-cli.js.map +0 -1
  78. package/esm/src/lib/protogen-expression-ctrls.d.ts +0 -2
  79. package/esm/src/lib/protogen-expression-ctrls.js +0 -282
  80. package/esm/src/lib/protogen-expression-ctrls.js.map +0 -1
  81. package/esm/src/lib/protogen-expression-lib.d.ts +0 -16
  82. package/esm/src/lib/protogen-expression-lib.js +0 -103
  83. package/esm/src/lib/protogen-expression-lib.js.map +0 -1
  84. package/esm/src/lib/protogen-expression-types.d.ts +0 -160
  85. package/esm/src/lib/protogen-expression-types.js +0 -46
  86. package/esm/src/lib/protogen-expression-types.js.map +0 -1
  87. package/esm/src/lib/protogen-lib.d.ts +0 -23
  88. package/esm/src/lib/protogen-lib.js +0 -96
  89. package/esm/src/lib/protogen-lib.js.map +0 -1
  90. package/esm/src/lib/protogen-node.d.ts +0 -76
  91. package/esm/src/lib/protogen-node.js +0 -719
  92. package/esm/src/lib/protogen-node.js.map +0 -1
  93. package/esm/src/lib/protogen-pipeline-types.d.ts +0 -145
  94. package/esm/src/lib/protogen-pipeline-types.js +0 -27
  95. package/esm/src/lib/protogen-pipeline-types.js.map +0 -1
  96. package/esm/src/lib/protogen-pipeline.d.ts +0 -5
  97. package/esm/src/lib/protogen-pipeline.js +0 -88
  98. package/esm/src/lib/protogen-pipeline.js.map +0 -1
  99. package/esm/src/lib/protogen-plugin-util.d.ts +0 -29
  100. package/esm/src/lib/protogen-plugin-util.js +0 -119
  101. package/esm/src/lib/protogen-plugin-util.js.map +0 -1
  102. package/esm/src/lib/protogen-types.d.ts +0 -198
  103. package/esm/src/lib/protogen-types.js +0 -9
  104. package/esm/src/lib/protogen-types.js.map +0 -1
  105. package/esm/src/lib/protogen-workflow-lib.d.ts +0 -7
  106. package/esm/src/lib/protogen-workflow-lib.js +0 -53
  107. package/esm/src/lib/protogen-workflow-lib.js.map +0 -1
  108. package/esm/src/lib/protogen-workflow-types.d.ts +0 -95
  109. package/esm/src/lib/protogen-workflow-types.js +0 -2
  110. package/esm/src/lib/protogen-workflow-types.js.map +0 -1
  111. package/esm/src/lib/test-plugin.d.ts +0 -1
  112. package/esm/src/lib/test-plugin.js +0 -18
  113. package/esm/src/lib/test-plugin.js.map +0 -1
  114. package/esm/src/lib/typescript-utils.d.ts +0 -15
  115. package/esm/src/lib/typescript-utils.js +0 -161
  116. package/esm/src/lib/typescript-utils.js.map +0 -1
@@ -1,198 +0,0 @@
1
- import { HashMap, Point } from "@iyio/common";
2
- import { ZodError, ZodSchema } from "zod";
3
- import { ProtoPipelineConfig } from "./protogen-pipeline-types";
4
- export interface ProtoConfig {
5
- pipeline: ProtoPipelineConfig;
6
- defaultFile?: string;
7
- saveDir?: string;
8
- snapshotDir?: string;
9
- }
10
- export interface ProtoTypeInfo {
11
- type: string;
12
- isArray?: boolean;
13
- /**
14
- * If defined the type is a map or Record<mapType,type>
15
- */
16
- mapType?: string;
17
- path: string[];
18
- isRefType?: boolean;
19
- /**
20
- * modifier character = *
21
- */
22
- important?: boolean;
23
- /**
24
- * modifier character = >
25
- */
26
- source?: boolean;
27
- /**
28
- * modifier character = @
29
- */
30
- copySource?: boolean;
31
- /**
32
- * modifier character = ?
33
- */
34
- question?: boolean;
35
- /**
36
- * modifier character = #
37
- */
38
- hash?: boolean;
39
- /**
40
- * modifier character = !
41
- */
42
- ex?: boolean;
43
- /**
44
- * modifier character = ~
45
- */
46
- less?: boolean;
47
- /**
48
- * modifier character = =
49
- */
50
- equals?: boolean;
51
- /**
52
- * modifier character = .
53
- */
54
- dot?: boolean;
55
- /**
56
- * The package where the type is defined
57
- */
58
- package?: string;
59
- /**
60
- * The name used to export the type from its package
61
- */
62
- exportName?: string;
63
- /**
64
- * Set when the type is being used as a variable, arg, param etc.
65
- */
66
- varName?: string;
67
- }
68
- export type ProtoChildren = {
69
- [name: string]: ProtoNode;
70
- };
71
- export type ProtoAddressMap = {
72
- [address: string]: ProtoNode;
73
- };
74
- export interface ProtoNodeRenderData {
75
- indent?: string;
76
- input?: string;
77
- depth?: number;
78
- before?: string;
79
- }
80
- export type ProtoLinkPriority = 'low' | 'med' | 'high';
81
- export interface ProtoLink {
82
- name?: string;
83
- address: string;
84
- /**
85
- * Low priority
86
- */
87
- priority?: ProtoLinkPriority;
88
- color?: string;
89
- /**
90
- * If true the link is the reverse side of a user defined link
91
- */
92
- rev?: boolean;
93
- meta?: HashMap<string>;
94
- /**
95
- * If true the link is a source reference
96
- */
97
- src?: boolean;
98
- broken?: boolean;
99
- }
100
- export interface ProtoNode {
101
- name: string;
102
- type: string;
103
- /**
104
- * The reference or secondary type of the node. The second type in types.
105
- */
106
- refType?: ProtoTypeInfo;
107
- optional?: boolean;
108
- /**
109
- * All types the node implements
110
- */
111
- types: ProtoTypeInfo[];
112
- comment?: string;
113
- address: string;
114
- children?: ProtoChildren;
115
- value?: string;
116
- links?: ProtoLink[];
117
- /**
118
- * Used by parsing and rending systems. Generators should ignore this value
119
- */
120
- renderData?: ProtoNodeRenderData;
121
- /**
122
- * If true the node's value was defined directly and is not a direct representation of the
123
- * node's type.
124
- */
125
- valueEq?: boolean;
126
- hidden?: boolean;
127
- special?: boolean;
128
- contentFocused?: boolean;
129
- isContent?: boolean;
130
- importantContent?: boolean;
131
- section?: string;
132
- tags?: string[];
133
- sourceAddress?: string;
134
- sourceLinked?: boolean;
135
- /**
136
- * If true the value from the source of the node should be copied to the node
137
- */
138
- copySource?: boolean;
139
- /**
140
- * Address of a node that this node was inherited from
141
- */
142
- inheritedAddress?: string;
143
- }
144
- export type RelationType = 'one-one' | 'one-many' | 'many-many' | 'node-node';
145
- export interface ProtoLayout {
146
- left: number;
147
- right: number;
148
- top: number;
149
- bottom: number;
150
- y: number;
151
- disabled?: boolean;
152
- broken?: boolean;
153
- node?: ProtoNode;
154
- getOffset?: (layout: ProtoLayout) => Point;
155
- altNode?: ProtoNode;
156
- }
157
- export interface NodeAndPropName {
158
- nodeName: string;
159
- propName?: string;
160
- meta?: HashMap<string>;
161
- }
162
- export interface ProtoPosScale {
163
- x: number;
164
- y: number;
165
- width?: number;
166
- scale: number;
167
- }
168
- export interface ProtoParsingResult {
169
- rootNodes: ProtoNode[];
170
- allNodes: ProtoNode[];
171
- addressMap: ProtoAddressMap;
172
- }
173
- export interface ProtoCallable {
174
- name: string;
175
- /**
176
- * Name of the function used to invoke the callable. In some cases this will be the same as the
177
- * name property. In other cases there may be a separate client function with a different name
178
- * used to call the callable
179
- */
180
- exportName: string;
181
- package: string;
182
- args: ProtoTypeInfo[];
183
- argsExportName?: string;
184
- argsPackage?: string;
185
- returnType?: ProtoTypeInfo;
186
- isAsync?: boolean;
187
- /**
188
- * An implementation for the callable. This will typically be defined by generated code.
189
- */
190
- implementation?: (...args: any) => any;
191
- argsScheme?: ZodSchema;
192
- }
193
- export declare class ProtoCallableNotImplementedError extends Error {
194
- }
195
- export declare class InvalidProtoCallableArgsError extends Error {
196
- readonly zodError: ZodError;
197
- constructor(message: string, zodError: ZodError);
198
- }
@@ -1,9 +0,0 @@
1
- export class ProtoCallableNotImplementedError extends Error {
2
- }
3
- export class InvalidProtoCallableArgsError extends Error {
4
- constructor(message, zodError) {
5
- super(message);
6
- this.zodError = zodError;
7
- }
8
- }
9
- //# sourceMappingURL=protogen-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"protogen-types.js","sourceRoot":"","sources":["../../../../../../packages/protogen/src/lib/protogen-types.ts"],"names":[],"mappings":"AA2PA,MAAM,OAAO,gCAAiC,SAAQ,KAAK;CAAE;AAE7D,MAAM,OAAO,6BAA8B,SAAQ,KAAK;IAIpD,YAAmB,OAAc,EAAC,QAAiB;QAE/C,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,QAAQ,GAAC,QAAQ,CAAC;IAC3B,CAAC;CACJ"}
@@ -1,7 +0,0 @@
1
- import { ProtoNode } from "./protogen-types";
2
- import { ProtoAction, ProtoTimeWindow, ProtoTrigger } from "./protogen-workflow-types";
3
- export declare const protoWorkerlessNodeAddress = "_";
4
- export declare const protoWorkerlessGroupName = "_";
5
- export declare const parseProtoAction: (node: ProtoNode) => ProtoAction;
6
- export declare const parseProtoTrigger: (node: ProtoNode) => ProtoTrigger;
7
- export declare const parseProtoTimeWindow: (node: ProtoNode) => ProtoTimeWindow;
@@ -1,53 +0,0 @@
1
- import { endDateSort, safeParseDateOrUndefined, safeParseNumber } from "@iyio/common";
2
- import { parseProtoExpression } from "./protogen-expression-lib";
3
- import { protoGetChildrenByName } from "./protogen-node";
4
- export const protoWorkerlessNodeAddress = '_';
5
- export const protoWorkerlessGroupName = '_';
6
- export const parseProtoAction = (node) => {
7
- const expression = parseProtoExpression({ node, filterPaths: ['trigger'] });
8
- const workerAddresses = {};
9
- const workerNodes = node.children?.['workers']?.children;
10
- if (workerNodes) {
11
- for (const e in workerNodes) {
12
- const worker = workerNodes[e];
13
- if (!worker) {
14
- continue;
15
- }
16
- const address = worker.types[0]?.path;
17
- if (address) {
18
- workerAddresses[worker.name] = address.join('.');
19
- }
20
- }
21
- }
22
- const triggers = protoGetChildrenByName(node, 'trigger', false);
23
- const windows = protoGetChildrenByName(node, 'window', false);
24
- const order = node.children?.['order'];
25
- const maxWorkerExeCount = node.children?.['maxWorkerExeCount'];
26
- const maxGroupExeCount = node.children?.['maxGroupExeCount'];
27
- const condition = node.children?.['condition'];
28
- const exe = node.children?.['exe'];
29
- return {
30
- name: expression.name ?? 'Action',
31
- workerAddresses: workerAddresses,
32
- order: order ? safeParseNumber(node.children?.['order']?.value, 0) : endDateSort,
33
- maxWorkerExeCount: maxWorkerExeCount ? safeParseNumber(node.children?.['maxWorkerExeCount']?.value, 0) : undefined,
34
- maxGroupExeCount: maxGroupExeCount ? safeParseNumber(node.children?.['maxGroupExeCount']?.value, 0) : undefined,
35
- triggers: triggers.map(t => parseProtoTrigger(t)),
36
- windows: windows.length ? windows.map(t => parseProtoTimeWindow(t)) : undefined,
37
- condition: condition ? parseProtoExpression({ node: condition }) : undefined,
38
- exe: exe ? parseProtoExpression({ node: exe }) : undefined,
39
- };
40
- };
41
- export const parseProtoTrigger = (node) => {
42
- return {
43
- name: node.name ?? 'trigger',
44
- address: node.types?.[0]?.type ?? 'Event',
45
- };
46
- };
47
- export const parseProtoTimeWindow = (node) => {
48
- return {
49
- start: safeParseDateOrUndefined(node.children?.['start']?.value)?.getTime(),
50
- end: safeParseDateOrUndefined(node.children?.['end']?.value)?.getTime(),
51
- };
52
- };
53
- //# sourceMappingURL=protogen-workflow-lib.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"protogen-workflow-lib.js","sourceRoot":"","sources":["../../../../../../packages/protogen/src/lib/protogen-workflow-lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAIzD,MAAM,CAAC,MAAM,0BAA0B,GAAC,GAAG,CAAC;AAC5C,MAAM,CAAC,MAAM,wBAAwB,GAAC,GAAG,CAAC;AAE1C,MAAM,CAAC,MAAM,gBAAgB,GAAC,CAAC,IAAc,EAAa,EAAE;IACxD,MAAM,UAAU,GAAC,oBAAoB,CAAC,EAAC,IAAI,EAAC,WAAW,EAAC,CAAC,SAAS,CAAC,EAAC,CAAC,CAAC;IAGtE,MAAM,eAAe,GAAuB,EAAE,CAAA;IAC9C,MAAM,WAAW,GAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC;IACvD,IAAG,WAAW,EAAC,CAAC;QACZ,KAAI,MAAM,CAAC,IAAI,WAAW,EAAC,CAAC;YACxB,MAAM,MAAM,GAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC5B,IAAG,CAAC,MAAM,EAAC,CAAC;gBACR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import { ProtoExpression } from "./protogen-expression-types";
2
- import { ProtoTypeInfo } from "./protogen-types";
3
- export interface ProtoAction {
4
- name: string;
5
- /**
6
- * Determines the workers the action is executed against. When actions are stored using
7
- * ActionRecords one ActionRecord is created for every nodeAddress.
8
- */
9
- workerAddresses: Record<string, string>;
10
- /**
11
- * The order in-which actions are executed. By default actions will use the current date's
12
- * timestamp as their order so that newer actions will be executed after older ones. If you
13
- * want an action to be executed before default order actions use a negative number and if
14
- * you want an action to be executed after default order actions use a number that is more than
15
- * endDateSort. endDateSort is a constant with a value of 1,000,000,000,000,000
16
- * which when converted to a date equals 1000000000000000
17
- */
18
- order: number;
19
- /**
20
- * The max number of times the trigger can be executed for a single worker. If undefined
21
- * no limit is set.
22
- */
23
- maxWorkerExeCount?: number;
24
- /**
25
- * The max number of times the trigger can be executed for a worker group. If undefined
26
- * no limit is set.
27
- */
28
- maxGroupExeCount?: number;
29
- /**
30
- * Triggers that cause the action to be executed
31
- */
32
- triggers?: ProtoTrigger[];
33
- /**
34
- * Time windows when the trigger can be executed
35
- */
36
- windows?: ProtoTimeWindow[];
37
- /**
38
- * A condition that must be met.
39
- */
40
- condition?: ProtoExpression;
41
- /**
42
- * The expression that is executed with the action is triggered.
43
- */
44
- exe?: ProtoExpression;
45
- }
46
- export interface ProtoTrigger {
47
- /**
48
- * @default 'trigger'
49
- */
50
- name: string;
51
- /**
52
- * Name or address of the event node that triggers the trigger;
53
- */
54
- address: string;
55
- }
56
- export interface ProtoTimeWindow {
57
- start?: number;
58
- end?: number;
59
- }
60
- /**
61
- * A worker moves between nodes and executes actions
62
- */
63
- export interface ProtoWorker {
64
- /**
65
- * The current location of the worker
66
- */
67
- address: string;
68
- /**
69
- * Id of an object that the worker is attached to.
70
- */
71
- attachId?: string;
72
- /**
73
- * Data associated with the worker
74
- */
75
- data: Record<string, any>;
76
- }
77
- /**
78
- * Represents and a node dedicated to hosting workers. Any node can be a worker group since
79
- * workers are grouped by nodeAddress and nodeAddresses can point to any node. When parsed a
80
- * worker group uses the workers property to store workers buts nodes can use any property name.
81
- */
82
- export interface ProtoWorkerGroup {
83
- name: string;
84
- address: string;
85
- type?: ProtoTypeInfo;
86
- workers?: ProtoWorker[];
87
- }
88
- export interface ProtoWorkflow {
89
- actions: ProtoAction[];
90
- /**
91
- * Additional expressions that actions can call
92
- */
93
- expressions: ProtoExpression[];
94
- workerGroups: Record<string, ProtoWorkerGroup>;
95
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=protogen-workflow-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"protogen-workflow-types.js","sourceRoot":"","sources":["../../../../../../packages/protogen/src/lib/protogen-workflow-types.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export {};
@@ -1,18 +0,0 @@
1
- import { z } from "zod";
2
- const TestPluginConfig = z.object({
3
- path: z.string().optional()
4
- });
5
- const TestPlugin = {
6
- configScheme: TestPluginConfig,
7
- init(ctx, { path }) {
8
- console.log(path);
9
- }
10
- };
11
- TestPlugin.init?.(null, { path: 'ok' }, null);
12
- const NoConfigPlugin = {
13
- init(ctx) {
14
- console.log(ctx);
15
- }
16
- };
17
- NoConfigPlugin.init?.(null, null, null);
18
- //# sourceMappingURL=test-plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-plugin.js","sourceRoot":"","sources":["../../../../../../packages/protogen/src/lib/test-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,MAAM,gBAAgB,GAAC,CAAC,CAAC,MAAM,CAAC;IAC5B,IAAI,EAAC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAA;AACF,MAAM,UAAU,GAA0D;IACtE,YAAY,EAAC,gBAAgB;IAC7B,IAAI,CAAC,GAAG,EAAC,EAAC,IAAI,EAAC;QACX,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IACrB,CAAC;CACJ,CAAA;AAED,UAAU,CAAC,IAAI,EAAE,CAAC,IAAW,EAAC,EAAC,IAAI,EAAC,IAAI,EAAC,EAAC,IAAW,CAAC,CAAA;AAGtD,MAAM,cAAc,GAAqB;IACrC,IAAI,CAAC,GAAG;QACJ,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;CACJ,CAAA;AAED,cAAc,CAAC,IAAI,EAAE,CAAC,IAAW,EAAC,IAAI,EAAC,IAAW,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- import { HashMap } from "@iyio/common";
2
- import { ProtoContext, ProtoIndexGenerator, ProtoOutput } from "./protogen-pipeline-types";
3
- import { ProtoNode } from "./protogen-types";
4
- export declare const protoTsTypeMap: HashMap<string>;
5
- export declare const protoTsNumTypes: string[];
6
- export declare const protoGetTsType: (type: string | null | undefined) => string;
7
- export declare const protoTsBuiltTypes: readonly ["string", "number", "any", "bigint", "boolean", "date", "null", "void"];
8
- export declare const protoIsTsBuiltType: (type: string | null | undefined) => boolean;
9
- export declare const protoGenerateTsImports: (types: string[], importMap: HashMap<string>, localImportMap: HashMap<string>) => string[];
10
- export declare const protoPrependTsImports: (types: string[], importMap: HashMap<string>, prependTo: string[], localImportMap?: HashMap<string>) => void;
11
- export declare const protoFormatTsComment: (comment: string, tab: string) => string;
12
- export declare const protoGetFullNodeTsComment: (node: ProtoNode, tab: string) => string;
13
- export declare const protoGetFullNodeComment: (node: ProtoNode, tab: string) => string;
14
- export declare const addTsImport: (im: string, packageName: string | null | undefined, imports: string[], importMap: HashMap<string>) => void;
15
- export declare const protoGenerateTsIndex: (ctx: ProtoContext, generator: ProtoIndexGenerator, indexOutput: ProtoOutput, existing: string) => string;
@@ -1,161 +0,0 @@
1
- import { getPathNoExt } from "@iyio/common";
2
- export const protoTsTypeMap = {
3
- 'int': 'number',
4
- 'time': 'number',
5
- 'float': 'number',
6
- 'double': 'number',
7
- '': 'null'
8
- };
9
- export const protoTsNumTypes = ['number', 'bigint'];
10
- export const protoGetTsType = (type) => {
11
- if (!type) {
12
- return 'null';
13
- }
14
- return protoTsTypeMap[type] ?? type;
15
- };
16
- export const protoTsBuiltTypes = ['string', 'number', 'any', 'bigint', 'boolean', 'date', 'null', 'void'];
17
- export const protoIsTsBuiltType = (type) => protoTsBuiltTypes.includes(type);
18
- export const protoGenerateTsImports = (types, importMap, localImportMap) => {
19
- const imports = {};
20
- for (const t of types) {
21
- const key = localImportMap[t] ?? importMap[t];
22
- if (!key) {
23
- throw new Error(`Unable to find type ${t} in importMap`);
24
- }
25
- let ary = imports[key];
26
- if (!ary) {
27
- ary = [t];
28
- imports[key] = ary;
29
- }
30
- else if (!ary.includes(t)) {
31
- ary.push(t);
32
- }
33
- }
34
- return Object.keys(imports).map(path => `import { ${imports[path].join(', ')} } from '${path}';`);
35
- };
36
- export const protoPrependTsImports = (types, importMap, prependTo, localImportMap = {}) => {
37
- if (!types.length) {
38
- return;
39
- }
40
- const imports = protoGenerateTsImports(types, importMap, localImportMap);
41
- if (imports.length) {
42
- prependTo.splice(0, 0, ...imports);
43
- }
44
- };
45
- export const protoFormatTsComment = (comment, tab) => (`${tab}/**\n${tab} * ${escapeComment(comment).split('\n').join(`\n${tab} * `)}\n${tab} */`);
46
- export const protoGetFullNodeTsComment = (node, tab) => {
47
- const out = [`${tab}/**`];
48
- let comment = node.comment?.trim();
49
- if (comment) {
50
- out.push(`${tab} * ${comment.split('\n').join(`\n${tab} * `)}`);
51
- }
52
- if (node.children) {
53
- for (const c in node.children) {
54
- const child = node.children[c];
55
- if (!child) {
56
- continue;
57
- }
58
- comment = child?.comment?.trim();
59
- if (comment && !child.special && !child.isContent) {
60
- out.push(`${tab} * `);
61
- out.push(`${tab} * ${`- ${c} - ${escapeComment(comment)}`.split('\n').join(`\n${tab} * `)}`);
62
- }
63
- }
64
- }
65
- if (out.length < 2) {
66
- return '';
67
- }
68
- out.push(`${tab} */`);
69
- return out.join('\n');
70
- };
71
- export const protoGetFullNodeComment = (node, tab) => {
72
- const out = [];
73
- let comment = node.comment?.trim();
74
- if (comment) {
75
- out.push(comment);
76
- }
77
- if (node.children) {
78
- for (const c in node.children) {
79
- const child = node.children[c];
80
- if (!child) {
81
- continue;
82
- }
83
- comment = child?.comment?.trim();
84
- if (comment && !child.special && !child.isContent) {
85
- out.push('');
86
- out.push(`- ${c} - ${comment}`.split('\n').join('\n '));
87
- }
88
- }
89
- }
90
- if (out.length < 1) {
91
- return '';
92
- }
93
- out.push(`${tab} */`);
94
- return out.join('\n');
95
- };
96
- const escapeComment = (comment) => comment.replace(/\*\//g, '(star)/');
97
- export const addTsImport = (im, packageName, imports, importMap) => {
98
- if (!imports.includes(im)) {
99
- imports.push(im);
100
- }
101
- if (packageName) {
102
- importMap[im] = packageName;
103
- }
104
- };
105
- export const protoGenerateTsIndex = (ctx, generator, indexOutput, existing) => {
106
- const out = [];
107
- ctx.autoDeletePaths.push(generator.root + (generator.recursive ? (generator.root.endsWith('/') ? '*' : '/*') : ''));
108
- const exclude = generator.exclude ?? [];
109
- const root = generator.root.endsWith('/') ? generator.root : generator.root + '/';
110
- for (const o of ctx.outputs) {
111
- if (o === indexOutput || !o.path.startsWith(root) || !/.*.tsx?$/i.test(o.path)) {
112
- continue;
113
- }
114
- let executed = false;
115
- for (const ex of exclude) {
116
- if (typeof ex === 'string') {
117
- if (ex.includes('/')) {
118
- if (ex === o.path) {
119
- executed = true;
120
- break;
121
- }
122
- }
123
- else if (o.path.endsWith(ex)) {
124
- executed = true;
125
- break;
126
- }
127
- }
128
- else if (ex.test(o.path)) {
129
- executed = true;
130
- break;
131
- }
132
- }
133
- if (executed) {
134
- continue;
135
- }
136
- const name = getPathNoExt(o.path.substring(root.length));
137
- const exportPath = `./${name}`;
138
- if (o.mainExport) {
139
- out.push(`export { ${o.mainExport} as ${o.mainExportAs ?? name.replace(/\//g, '')} } from '${exportPath}'; ${generatorComment}`);
140
- }
141
- else {
142
- out.push(`export * from '${exportPath}'; ${generatorComment}`);
143
- }
144
- }
145
- out.sort();
146
- if (existing.trim()) {
147
- const lines = existing.split('\n');
148
- for (let i = 0; i < lines.length; i++) {
149
- if (generatorCommentReg.test(lines[i])) {
150
- lines.splice(i, 1);
151
- i--;
152
- }
153
- }
154
- lines.unshift(...out);
155
- return lines.join('\n').trim() + '\n';
156
- }
157
- return out.join('\n').trim() + '\n';
158
- };
159
- const generatorComment = '// auto-generated';
160
- const generatorCommentReg = /\/\/\s*auto-generated\s*$/;
161
- //# sourceMappingURL=typescript-utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typescript-utils.js","sourceRoot":"","sources":["../../../../../../packages/protogen/src/lib/typescript-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAW,MAAM,cAAc,CAAC;AAIrD,MAAM,CAAC,MAAM,cAAc,GAAiB;IACxC,KAAK,EAAC,QAAQ;IACd,MAAM,EAAC,QAAQ;IACf,OAAO,EAAC,QAAQ;IAChB,QAAQ,EAAC,QAAQ;IACjB,EAAE,EAAC,MAAM;CACH,CAAC;AAEX,MAAM,CAAC,MAAM,eAAe,GAAC,CAAC,QAAQ,EAAC,QAAQ,CAAC,CAAC;AAEjD,MAAM,CAAC,MAAM,cAAc,GAAC,CAAC,IAA0B,EAAQ,EAAE;IAC7D,IAAG,CAAC,IAAI,EAAC,CAAC;QACN,OAAO,MAAM,CAAC;IAClB,CAAC;IACD,OAAO,cAAc,CAAC,IAAI,CAAC,IAAE,IAAI,CAAC;AACtC,CAAC,CAAA;AAGD,MAAM,CAAC,MAAM,iBAAiB,GAAC,CAAC,QAAQ,EAAC,QAAQ,EAAC,KAAK,EAAC,QAAQ,EAAC,SAAS,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,CAAU,CAAC;AAE1G,MAAM,CAAC,MAAM,kBAAkB,GAAC,CAAC,IAA0B,EAAS,EAAE,CAAA,iBAAiB,CAAC,QAAQ,CAAC,IAAW,CAAC,CAAC;AAE9G,MAAM,CAAC,MAAM,sBAAsB,GAAC,CAAC,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