@useparagon/cli 1.0.9-canary.3 → 1.0.9

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 (107) hide show
  1. package/dist/apis/{types/integration.types.d.ts → api.types.d.ts} +74 -32
  2. package/dist/apis/api.types.js +14 -0
  3. package/dist/apis/api.types.js.map +1 -0
  4. package/dist/apis/auth.api.d.ts +1 -1
  5. package/dist/apis/auth.api.js.map +1 -1
  6. package/dist/apis/index.d.ts +1 -1
  7. package/dist/apis/index.js +1 -1
  8. package/dist/apis/index.js.map +1 -1
  9. package/dist/apis/integration.api.d.ts +1 -1
  10. package/dist/apis/integration.api.js +2 -5
  11. package/dist/apis/integration.api.js.map +1 -1
  12. package/dist/apis/project.api.d.ts +2 -1
  13. package/dist/apis/project.api.js +11 -1
  14. package/dist/apis/project.api.js.map +1 -1
  15. package/dist/codegen/codegen.types.d.ts +4 -6
  16. package/dist/codegen/codegen.utils.d.ts +1 -1
  17. package/dist/codegen/codegen.utils.js +5 -31
  18. package/dist/codegen/codegen.utils.js.map +1 -1
  19. package/dist/codegen/codegens/integration.codegen.d.ts +2 -3
  20. package/dist/codegen/codegens/integration.codegen.js +11 -43
  21. package/dist/codegen/codegens/integration.codegen.js.map +1 -1
  22. package/dist/codegen/codegens/intent.codegen.d.ts +1 -1
  23. package/dist/codegen/codegens/intent.codegen.js +0 -3
  24. package/dist/codegen/codegens/intent.codegen.js.map +1 -1
  25. package/dist/codegen/codegens/source.codegen.d.ts +1 -1
  26. package/dist/codegen/codegens/source.codegen.js +10 -33
  27. package/dist/codegen/codegens/source.codegen.js.map +1 -1
  28. package/dist/codegen/codegens/workflow.codegen.d.ts +1 -1
  29. package/dist/codegen/codegens/workflow.codegen.js +22 -40
  30. package/dist/codegen/codegens/workflow.codegen.js.map +1 -1
  31. package/dist/commands/auth/login/login.types.d.ts +1 -1
  32. package/dist/commands/build/build.action.js +1 -1
  33. package/dist/commands/build/build.action.js.map +1 -1
  34. package/dist/commands/build/build.types.d.ts +9 -0
  35. package/dist/commands/init/init.action.js.map +1 -1
  36. package/dist/commands/new/new.command.js +1 -3
  37. package/dist/commands/new/new.command.js.map +1 -1
  38. package/dist/commands/new/workflow/workflow.action.js +1 -2
  39. package/dist/commands/new/workflow/workflow.action.js.map +1 -1
  40. package/dist/commands/push/push.action.d.ts +13 -1
  41. package/dist/commands/push/push.action.js +163 -5
  42. package/dist/commands/push/push.action.js.map +1 -1
  43. package/dist/commands/push/push.command.js +1 -0
  44. package/dist/commands/push/push.command.js.map +1 -1
  45. package/dist/commands/push/push.types.d.ts +3 -1
  46. package/dist/commands/push/push.utils.d.ts +5 -0
  47. package/dist/commands/push/push.utils.js +24 -0
  48. package/dist/commands/push/push.utils.js.map +1 -0
  49. package/dist/compiler/compiler.types.d.ts +37 -2
  50. package/dist/compiler/compiler.types.js +1 -0
  51. package/dist/compiler/compiler.types.js.map +1 -1
  52. package/dist/compiler/compiler.utils.d.ts +7 -0
  53. package/dist/compiler/compiler.utils.js +72 -1
  54. package/dist/compiler/compiler.utils.js.map +1 -1
  55. package/dist/compiler/compilers/changeLog.compiler.d.ts +22 -0
  56. package/dist/compiler/compilers/changeLog.compiler.js +199 -0
  57. package/dist/compiler/compilers/changeLog.compiler.js.map +1 -0
  58. package/dist/compiler/compilers/integrations.compiler.d.ts +1 -2
  59. package/dist/compiler/compilers/integrations.compiler.js +1 -57
  60. package/dist/compiler/compilers/integrations.compiler.js.map +1 -1
  61. package/dist/compiler/compilers/project.compiler.d.ts +3 -3
  62. package/dist/compiler/compilers/project.compiler.js +11 -1
  63. package/dist/compiler/compilers/project.compiler.js.map +1 -1
  64. package/dist/compiler/compilers/workflows.compiler.d.ts +1 -2
  65. package/dist/compiler/compilers/workflows.compiler.js +8 -1
  66. package/dist/compiler/compilers/workflows.compiler.js.map +1 -1
  67. package/dist/config/config.utils.d.ts +2 -2
  68. package/dist/config/config.utils.js.map +1 -1
  69. package/dist/helpers/file.d.ts +2 -1
  70. package/dist/helpers/file.js +14 -9
  71. package/dist/helpers/file.js.map +1 -1
  72. package/package.json +4 -2
  73. package/dist/apis/types/customTrigger.types.d.ts +0 -56
  74. package/dist/apis/types/customTrigger.types.js +0 -3
  75. package/dist/apis/types/customTrigger.types.js.map +0 -1
  76. package/dist/apis/types/index.d.ts +0 -5
  77. package/dist/apis/types/index.js +0 -9
  78. package/dist/apis/types/index.js.map +0 -1
  79. package/dist/apis/types/integration.types.js +0 -3
  80. package/dist/apis/types/integration.types.js.map +0 -1
  81. package/dist/apis/types/project.types.d.ts +0 -12
  82. package/dist/apis/types/project.types.js +0 -3
  83. package/dist/apis/types/project.types.js.map +0 -1
  84. package/dist/apis/types/user.types.d.ts +0 -6
  85. package/dist/apis/types/user.types.js +0 -3
  86. package/dist/apis/types/user.types.js.map +0 -1
  87. package/dist/apis/types/workflow.types.d.ts +0 -8
  88. package/dist/apis/types/workflow.types.js +0 -3
  89. package/dist/apis/types/workflow.types.js.map +0 -1
  90. package/dist/codegen/codegens/trigger.codegen.d.ts +0 -3
  91. package/dist/codegen/codegens/trigger.codegen.js +0 -290
  92. package/dist/codegen/codegens/trigger.codegen.js.map +0 -1
  93. package/dist/commands/new/trigger/index.d.ts +0 -1
  94. package/dist/commands/new/trigger/index.js +0 -5
  95. package/dist/commands/new/trigger/index.js.map +0 -1
  96. package/dist/commands/new/trigger/trigger.action.d.ts +0 -5
  97. package/dist/commands/new/trigger/trigger.action.js +0 -116
  98. package/dist/commands/new/trigger/trigger.action.js.map +0 -1
  99. package/dist/commands/new/trigger/trigger.command.d.ts +0 -8
  100. package/dist/commands/new/trigger/trigger.command.js +0 -25
  101. package/dist/commands/new/trigger/trigger.command.js.map +0 -1
  102. package/dist/commands/new/trigger/trigger.types.d.ts +0 -3
  103. package/dist/commands/new/trigger/trigger.types.js +0 -3
  104. package/dist/commands/new/trigger/trigger.types.js.map +0 -1
  105. package/dist/compiler/compilers/triggers.compiler.d.ts +0 -12
  106. package/dist/compiler/compilers/triggers.compiler.js +0 -166
  107. package/dist/compiler/compilers/triggers.compiler.js.map +0 -1
@@ -1,3 +0,0 @@
1
- import { ICustomTrigger } from '../../apis/types';
2
- import { StepDependencies } from '../codegen.types';
3
- export declare const triggerToCode: (trigger: ICustomTrigger, dependencies: StepDependencies) => string;
@@ -1,290 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.triggerToCode = void 0;
4
- const customTrigger_1 = require("@useparagon/core/triggers/customTrigger");
5
- const strings_1 = require("../../helpers/strings");
6
- const source_codegen_1 = require("./source.codegen");
7
- const triggerToCode = (trigger, dependencies) => {
8
- const { integration } = dependencies;
9
- const isCustomIntegration = integration.name.startsWith('custom');
10
- const triggerSubscription = trigger.options.triggerSubscription;
11
- const triggerLevel = trigger.options.triggerLevel;
12
- if (triggerSubscription === customTrigger_1.TriggerSubscription.MANUAL) {
13
- return `
14
- import {
15
- ManualWebhookTrigger,
16
- CustomTriggerSetupResponse,
17
- TriggerPayloadValidationOption,
18
- ISetupTriggerResponseContext,
19
- IPayloadValidationContext
20
- } from '@useparagon/core/triggers/customTrigger';
21
- ${isCustomIntegration
22
- ? `import {
23
- DefaultInputToResultMap,
24
- } from '@useparagon/core/inputs';`
25
- : `import { InputResultMap } from '@useparagon/integrations/${integration.name}';`}
26
-
27
- /**
28
- * "${trigger.name}" custom trigger
29
- */
30
- export default class extends ManualWebhookTrigger<"${triggerLevel}","${triggerLevel}","${isCustomIntegration ? 'custom' : 'default'}",${isCustomIntegration ? 'DefaultInputToResultMap' : 'InputResultMap'}> {
31
- /**
32
- * This property is maintained by Paragon. Do not edit this property.
33
- */
34
- readonly id = '${trigger.id}';
35
-
36
- /**
37
- * define whether trigger is app level or user level
38
- */
39
- readonly triggerLevel = "${triggerLevel}";
40
-
41
- /**
42
- * The name of the custom trigger
43
- */
44
- name = ${(0, strings_1.sanitizeString)(trigger.name)};
45
-
46
- /**
47
- * The description of custom trigger
48
- */
49
- description = ${(0, strings_1.sanitizeString)(trigger.description)};
50
-
51
- /**
52
- * if true user can use this in workflow
53
- */
54
- isConfigured = ${trigger.isConfigured};
55
-
56
- /**
57
- * for app level trigger,
58
- * we need a way to map payload data to paragon connected user
59
- */
60
- mapPayload = ${(() => {
61
- if (triggerLevel === 'USER') {
62
- return 'undefined';
63
- }
64
- else if (isCustomIntegration) {
65
- return `{
66
- providerId: (context: IProviderIdContext) => ${(0, source_codegen_1.convertSourceToCode)(trigger.options.providerId || source_codegen_1.EMPTY_TOKENIZED_SOURCE, dependencies)},
67
- profileConfigKey: (context:IProfileConfigContext) => ${(0, source_codegen_1.convertSourceToCode)(trigger.options.profileConfigKey || source_codegen_1.EMPTY_TOKENIZED_SOURCE, dependencies)}
68
- }`;
69
- }
70
- return `{
71
- providerId: (context: IProviderIdContext) => ${(0, source_codegen_1.convertSourceToCode)(trigger.options.providerId || source_codegen_1.EMPTY_TOKENIZED_SOURCE, dependencies)},
72
- }`;
73
- })()}
74
-
75
- /**
76
- * setup response
77
- * @param context
78
- * @returns
79
- */
80
- setupResponse(context: ISetupTriggerResponseContext<${isCustomIntegration ? 'DefaultInputToResultMap' : 'InputResultMap'}>): CustomTriggerSetupResponse{
81
- return {
82
- ${(() => {
83
- const setupResponse = trigger.options.setup.response;
84
- switch (setupResponse?.type) {
85
- case customTrigger_1.SetupResponseType.CUSTOM_CODE:
86
- return `
87
- type: "${setupResponse.type}",
88
- parameters: ${(0, source_codegen_1.convertKeyedSourceParamsToCode)(setupResponse.parameters || [], dependencies)},
89
- code: ${setupResponse.code}
90
- `;
91
- case customTrigger_1.SetupResponseType.ECHO_REQUEST_BODY:
92
- return `type: "${customTrigger_1.SetupResponseInitType.ECHO_REQUEST_BODY}"`;
93
- case customTrigger_1.SetupResponseType.DEFAULT:
94
- default:
95
- return `type: "${customTrigger_1.SetupResponseInitType.RESPOND_WITH_200}"`;
96
- }
97
- })()}
98
- }
99
- }
100
-
101
- /**
102
- * validate payload
103
- * @param context
104
- * @returns
105
- */
106
- validatePayload(context: IPayloadValidationContext<${isCustomIntegration ? 'DefaultInputToResultMap' : 'InputResultMap'}>): TriggerPayloadValidationOption{
107
- return {
108
- ${(() => {
109
- const payloadValidationOptions = trigger.options.payloadValidationOptions;
110
- if (!payloadValidationOptions?.scheme) {
111
- return 'scheme: "NONE"';
112
- }
113
- switch (payloadValidationOptions.scheme) {
114
- case customTrigger_1.CustomTriggerPayloadValidationScheme.CUSTOM:
115
- return `
116
- scheme: "${payloadValidationOptions.scheme}",
117
- parameters: ${(0, source_codegen_1.convertKeyedSourceParamsToCode)(payloadValidationOptions.parameters || [], dependencies)},
118
- code: ${payloadValidationOptions.code}
119
- `;
120
- default:
121
- return `scheme: "${payloadValidationOptions.scheme}"`;
122
- }
123
- })()}
124
- }
125
- }
126
- }
127
- `;
128
- }
129
- const setupOptions = trigger.options.setup;
130
- const teardownOptions = trigger.options.tearDown;
131
- const setupBodyType = setupOptions?.bodyType ?? 'json';
132
- const teardownBodyType = teardownOptions?.bodyType ?? 'json';
133
- return `
134
- import {
135
- ApiEndpointWebhookTrigger,
136
- ICreateTriggerContext,
137
- ITeardownTriggerContext,
138
- ICreateTriggerSetup,
139
- ITeardownTriggerSetup,
140
- CustomTriggerSetupResponse,
141
- TriggerPayloadValidationOption,
142
- ISetupTriggerResponseContext,
143
- IPayloadValidationContext,
144
- IProfileConfigContext,
145
- IProviderIdContext
146
- } from '@useparagon/core/triggers/customTrigger';
147
- ${isCustomIntegration
148
- ? `import {
149
- DefaultInputToResultMap,
150
- } from '@useparagon/core/inputs';`
151
- : `import { InputResultMap } from '@useparagon/integrations/${integration.name}';`}
152
-
153
- /**
154
- * "${trigger.name}" custom trigger
155
- */
156
- export default class extends ApiEndpointWebhookTrigger<"${triggerLevel}","${isCustomIntegration ? 'custom' : 'default'}",${isCustomIntegration ? 'DefaultInputToResultMap' : 'InputResultMap'}> {
157
- /**
158
- * This property is maintained by Paragon. Do not edit this property.
159
- */
160
- readonly id = '${trigger.id}';
161
-
162
- /**
163
- * define whether trigger is app level or user level
164
- */
165
- readonly triggerLevel = "${triggerLevel}";
166
-
167
- /**
168
- * The name of the custom trigger
169
- */
170
- name = ${(0, strings_1.sanitizeString)(trigger.name)};
171
-
172
- /**
173
- * The description of custom trigger
174
- */
175
- description = ${(0, strings_1.sanitizeString)(trigger.description)};
176
-
177
- /**
178
- * if true user can use this in workflow
179
- */
180
- isConfigured = ${trigger.isConfigured};
181
-
182
- /**
183
- * for app level trigger,
184
- * we need a way to map payload data to paragon connected user
185
- */
186
- mapPayload = ${(() => {
187
- if (triggerLevel === 'USER') {
188
- return 'undefined';
189
- }
190
- else if (isCustomIntegration) {
191
- return `{
192
- providerId: (context: IProviderIdContext) => ${(0, source_codegen_1.convertSourceToCode)(trigger.options.providerId || source_codegen_1.EMPTY_TOKENIZED_SOURCE, dependencies)},
193
- profileConfigKey: (context:IProfileConfigContext) => ${(0, source_codegen_1.convertSourceToCode)(trigger.options.profileConfigKey || source_codegen_1.EMPTY_TOKENIZED_SOURCE, dependencies)}
194
- }`;
195
- }
196
- return `{
197
- providerId: (context: IProviderIdContext) => ${(0, source_codegen_1.convertSourceToCode)(trigger.options.providerId || source_codegen_1.EMPTY_TOKENIZED_SOURCE, dependencies)},
198
- }`;
199
- })()}
200
-
201
- /**
202
- * describe setup configuration of custom trigger
203
- * @param context
204
- * @returns
205
- */
206
- create(context: ICreateTriggerContext<${isCustomIntegration ? 'DefaultInputToResultMap' : 'InputResultMap'}>): ICreateTriggerSetup {
207
- return {
208
- url: ${(0, source_codegen_1.convertSourceToCode)(setupOptions?.url || source_codegen_1.EMPTY_TOKENIZED_SOURCE, dependencies)},
209
- bodyType: '${setupBodyType}',
210
- body: ${['xml', 'raw'].includes(setupBodyType)
211
- ? (0, source_codegen_1.convertSourceToCode)(setupOptions?.rawBody || source_codegen_1.EMPTY_TOKENIZED_SOURCE, dependencies)
212
- : (0, source_codegen_1.convertKeyedSourceParamsToCode)(setupOptions?.body || [], dependencies)},
213
- params: ${(0, source_codegen_1.convertKeyedSourceParamsToCode)(setupOptions?.params || [], dependencies)},
214
- headers: ${(0, source_codegen_1.convertKeyedSourceParamsToCode)(setupOptions?.headers || [], dependencies)},
215
- };
216
- }
217
-
218
- /**
219
- * describe teardown configuration of custom trigger
220
- * @param context
221
- * @returns
222
- */
223
- teardown(context: ITeardownTriggerContext<${isCustomIntegration ? 'DefaultInputToResultMap' : 'InputResultMap'}>): ITeardownTriggerSetup {
224
- return {
225
- url: ${(0, source_codegen_1.convertSourceToCode)(teardownOptions?.url || source_codegen_1.EMPTY_TOKENIZED_SOURCE, dependencies)},
226
- bodyType: '${teardownBodyType}',
227
- body: ${['xml', 'raw'].includes(teardownBodyType)
228
- ? (0, source_codegen_1.convertSourceToCode)(teardownOptions?.rawBody || source_codegen_1.EMPTY_TOKENIZED_SOURCE, dependencies)
229
- : (0, source_codegen_1.convertKeyedSourceParamsToCode)(teardownOptions?.body || [], dependencies)},
230
- params: ${(0, source_codegen_1.convertKeyedSourceParamsToCode)(teardownOptions?.params || [], dependencies)},
231
- headers: ${(0, source_codegen_1.convertKeyedSourceParamsToCode)(teardownOptions?.headers || [], dependencies)},
232
- }
233
- }
234
-
235
- /**
236
- * setup response
237
- * @param context
238
- * @returns
239
- */
240
- setupResponse(context: ISetupTriggerResponseContext<${isCustomIntegration ? 'DefaultInputToResultMap' : 'InputResultMap'}>): CustomTriggerSetupResponse{
241
- return {
242
- ${(() => {
243
- const setupResponse = trigger.options.setup.response;
244
- switch (setupResponse?.type) {
245
- case customTrigger_1.SetupResponseType.CUSTOM_CODE:
246
- return `
247
- type: "${setupResponse.type}",
248
- parameters: ${(0, source_codegen_1.convertKeyedSourceParamsToCode)(setupResponse.parameters || [], dependencies)},
249
- code: ${setupResponse.code}
250
- `;
251
- case customTrigger_1.SetupResponseType.ECHO_REQUEST_BODY:
252
- return `type: "${customTrigger_1.SetupResponseInitType.ECHO_REQUEST_BODY}"`;
253
- case customTrigger_1.SetupResponseType.DEFAULT:
254
- default:
255
- return `type: "${customTrigger_1.SetupResponseInitType.RESPOND_WITH_200}"`;
256
- }
257
- })()}
258
- }
259
- }
260
-
261
- /**
262
- * validate payload
263
- * @param context
264
- * @returns
265
- */
266
- validatePayload(context: IPayloadValidationContext<${isCustomIntegration ? 'DefaultInputToResultMap' : 'InputResultMap'}>): TriggerPayloadValidationOption{
267
- return {
268
- ${(() => {
269
- const payloadValidationOptions = trigger.options.payloadValidationOptions;
270
- if (!payloadValidationOptions?.scheme) {
271
- return 'scheme: "NONE"';
272
- }
273
- switch (payloadValidationOptions.scheme) {
274
- case customTrigger_1.CustomTriggerPayloadValidationScheme.CUSTOM:
275
- return `
276
- scheme: "${payloadValidationOptions.scheme}",
277
- parameters: ${(0, source_codegen_1.convertKeyedSourceParamsToCode)(payloadValidationOptions.parameters || [], dependencies)},
278
- code: ${payloadValidationOptions.code}
279
- `;
280
- default:
281
- return `scheme: "${payloadValidationOptions.scheme}"`;
282
- }
283
- })()}
284
- }
285
- }
286
- }
287
- `;
288
- };
289
- exports.triggerToCode = triggerToCode;
290
- //# sourceMappingURL=trigger.codegen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trigger.codegen.js","sourceRoot":"","sources":["../../../src/codegen/codegens/trigger.codegen.ts"],"names":[],"mappings":";;;AAAA,2EAMiD;AAGjD,mDAAuD;AAGvD,qDAI0B;AAOnB,MAAM,aAAa,GAAG,CAC3B,OAAuB,EACvB,YAA8B,EACtB,EAAE;IACV,MAAM,EAAE,WAAW,EAAE,GAAG,YAAY,CAAC;IACrC,MAAM,mBAAmB,GAAY,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAE3E,MAAM,mBAAmB,GACvB,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC;IACtC,MAAM,YAAY,GAAwB,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC;IAEvE,IAAI,mBAAmB,KAAK,mCAAmB,CAAC,MAAM,EAAE,CAAC;QACvD,OAAO;;;;;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,EAC9B,YAAY,CACb;0BACO,aAAa,CAAC,IAAI;iBAC3B,CAAC;YACJ,KAAK,iCAAiB,CAAC,iBAAiB;gBACtC,OAAO,UAAU,qCAAqB,CAAC,iBAAiB,GAAG,CAAC;YAC9D,KAAK,iCAAiB,CAAC,OAAO,CAAC;YAC/B;gBACE,OAAO,UAAU,qCAAqB,CAAC,gBAAgB,GAAG,CAAC;QAC/D,CAAC;IACH,CAAC,CAAC,EAAE;;;;;;;;;2DAUN,mBAAmB,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,gBACpD;;YAEM,CAAC,GAAG,EAAE;QACN,MAAM,wBAAwB,GAC5B,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC;QAC3C,IAAI,CAAC,wBAAwB,EAAE,MAAM,EAAE,CAAC;YACtC,OAAO,gBAAgB,CAAC;QAC1B,CAAC;QAED,QAAQ,wBAAwB,CAAC,MAAM,EAAE,CAAC;YACxC,KAAK,oDAAoC,CAAC,MAAM;gBAC9C,OAAO;6BACM,wBAAwB,CAAC,MAAM;gCAC5B,IAAA,+CAA8B,EAC1C,wBAAwB,CAAC,UAAU,IAAI,EAAE,EACzC,YAAY,CACb;0BACO,wBAAwB,CAAC,IAAI;iBACtC,CAAC;YACJ;gBACE,OAAO,YAAY,wBAAwB,CAAC,MAAM,GAAG,CAAC;QAC1D,CAAC;IACH,CAAC,CAAC,EAAE;;;;GAIX,CAAC;AACJ,CAAC,CAAC;AA5XW,QAAA,aAAa,iBA4XxB"}
@@ -1 +0,0 @@
1
- export * from './trigger.command';
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./trigger.command"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/new/trigger/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC"}
@@ -1,5 +0,0 @@
1
- import { IAction } from '../../command.interface';
2
- import { TriggerCommandOptions } from './trigger.types';
3
- export declare class TriggerAction implements IAction<TriggerCommandOptions, void> {
4
- handle({ integration }: TriggerCommandOptions): Promise<void>;
5
- }
@@ -1,116 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TriggerAction = void 0;
4
- const tslib_1 = require("tslib");
5
- const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
6
- const glob_1 = require("glob");
7
- const path_1 = tslib_1.__importDefault(require("path"));
8
- const prompts_1 = tslib_1.__importDefault(require("prompts"));
9
- const uuid_1 = require("uuid");
10
- const request_1 = require("@useparagon/core/steps/library/request");
11
- const base_api_1 = require("../../../apis/base.api");
12
- const source_codegen_1 = require("../../../codegen/codegens/source.codegen");
13
- const trigger_codegen_1 = require("../../../codegen/codegens/trigger.codegen");
14
- const compiler_utils_1 = require("../../../compiler/compiler.utils");
15
- const config_1 = require("../../../config");
16
- const file_1 = require("../../../helpers/file");
17
- const logger_1 = tslib_1.__importDefault(require("../../../logger"));
18
- const new_utils_1 = require("../new.utils");
19
- class TriggerAction {
20
- async handle({ integration }) {
21
- const { rootPath } = await (0, config_1.getParagraphProjectDetails)();
22
- await (0, base_api_1.getToken)();
23
- const currentActiveIntegrations = await (0, new_utils_1.getCurrentActiveIntegrations)(rootPath);
24
- if (!currentActiveIntegrations.length) {
25
- logger_1.default.fatal('No integration present.');
26
- }
27
- if (!currentActiveIntegrations.some((currentIntegration) => currentIntegration === integration)) {
28
- logger_1.default.fatal(`${integration} does not match with current integrations - ${currentActiveIntegrations.join(', ')}`);
29
- }
30
- const { triggerName } = await (0, prompts_1.default)({
31
- type: 'text',
32
- name: 'triggerName',
33
- message: 'Please enter name of your trigger.',
34
- });
35
- if (!triggerName) {
36
- logger_1.default.fatal('trigger name not passed.');
37
- }
38
- const { triggerSubscription } = await (0, prompts_1.default)({
39
- type: 'autocomplete',
40
- name: 'triggerSubscription',
41
- message: 'Select trigger subscription type',
42
- choices: [
43
- { title: 'Api endpoint trigger', value: 'PROGRAMMATIC' },
44
- { title: 'Manual trigger', value: 'MANUAL' },
45
- ],
46
- });
47
- if (!triggerSubscription) {
48
- logger_1.default.fatal('Trigger type not selected.');
49
- }
50
- const { triggerLevel } = await (0, prompts_1.default)({
51
- type: 'autocomplete',
52
- name: 'triggerLevel',
53
- message: 'Select how trigger will be used',
54
- choices: [
55
- { title: 'App level', value: 'APP' },
56
- { title: 'User level', value: 'USER' },
57
- ],
58
- });
59
- if (!triggerLevel) {
60
- logger_1.default.fatal('trigger level not selected.');
61
- }
62
- const defaultOptions = {
63
- url: source_codegen_1.EMPTY_TOKENIZED_SOURCE,
64
- params: [],
65
- headers: [],
66
- body: [],
67
- bodyType: request_1.RequestBodyType.JSON,
68
- rawBody: source_codegen_1.EMPTY_TOKENIZED_SOURCE,
69
- };
70
- const newTrigger = {
71
- id: (0, uuid_1.v4)(),
72
- name: triggerName,
73
- description: '',
74
- isConfigured: false,
75
- options: {
76
- triggerSubscription,
77
- triggerLevel,
78
- setup: {
79
- httpMethod: request_1.HttpMethod.POST,
80
- ...defaultOptions,
81
- },
82
- tearDown: {
83
- httpMethod: request_1.HttpMethod.DELETE,
84
- ...defaultOptions,
85
- },
86
- },
87
- };
88
- const triggerCode = (0, trigger_codegen_1.triggerToCode)(newTrigger, {
89
- stepIdToVariableMap: {},
90
- eventIdToNameMap: {},
91
- inputs: [],
92
- sharedInputs: [],
93
- inputSources: [],
94
- stepIdToStepMap: {},
95
- secrets: [],
96
- upstreamStepIds: new Set(),
97
- customTriggerIdToNameMap: {},
98
- integration: { name: integration },
99
- });
100
- const triggersPath = path_1.default.join(rootPath, 'src', 'integrations', integration, 'triggers');
101
- const currentTriggers = (await (0, glob_1.glob)(path_1.default.join(triggersPath, '*.ts'), {
102
- nodir: true,
103
- })).map(compiler_utils_1.extractKeyFromPath);
104
- if (!currentTriggers.length) {
105
- await fs_extra_1.default.promises.mkdir(triggersPath, {
106
- recursive: true,
107
- });
108
- }
109
- const generateTriggerName = (0, file_1.withUniqueFileNames)(currentTriggers);
110
- const sanitizeNewTriggerName = generateTriggerName(triggerName);
111
- await (0, file_1.writeSourceToFile)(triggersPath, sanitizeNewTriggerName, triggerCode);
112
- logger_1.default.success(`Trigger with name ${sanitizeNewTriggerName} created.`);
113
- }
114
- }
115
- exports.TriggerAction = TriggerAction;
116
- //# sourceMappingURL=trigger.action.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trigger.action.js","sourceRoot":"","sources":["../../../../src/commands/new/trigger/trigger.action.ts"],"names":[],"mappings":";;;;AAAA,gEAA0B;AAC1B,+BAA4B;AAC5B,wDAAwB;AACxB,8DAA8B;AAC9B,+BAA0B;AAG1B,oEAGgD;AAEhD,qDAAkD;AAKlD,6EAAkF;AAClF,+EAA0E;AAC1E,qEAAsE;AACtE,4CAA6D;AAC7D,gDAA+E;AAC/E,qEAAqC;AAErC,4CAA4D;AAM5D,MAAa,aAAa;IAIxB,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAyB;QAEjD,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAA,mCAA0B,GAAE,CAAC;QAGxD,MAAM,IAAA,mBAAQ,GAAE,CAAC;QAEjB,MAAM,yBAAyB,GAC7B,MAAM,IAAA,wCAA4B,EAAC,QAAQ,CAAC,CAAC;QAE/C,IAAI,CAAC,yBAAyB,CAAC,MAAM,EAAE,CAAC;YACtC,gBAAM,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC1C,CAAC;QAED,IACE,CAAC,yBAAyB,CAAC,IAAI,CAC7B,CAAC,kBAAkB,EAAE,EAAE,CAAC,kBAAkB,KAAK,WAAW,CAC3D,EACD,CAAC;YACD,gBAAM,CAAC,KAAK,CACV,GAAG,WAAW,+CAA+C,yBAAyB,CAAC,IAAI,CACzF,IAAI,CACL,EAAE,CACJ,CAAC;QACJ,CAAC;QAED,MAAM,EAAE,WAAW,EAAE,GAA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AmB,EAAC,eAAe,CAAC,CAAC;QAEjE,MAAM,sBAAsB,GAAW,mBAAmB,CAAC,WAAW,CAAC,CAAC;QAExE,MAAM,IAAA,wBAAiB,EAAC,YAAY,EAAE,sBAAsB,EAAE,WAAW,CAAC,CAAC;QAE3E,gBAAM,CAAC,OAAO,CAAC,qBAAqB,sBAAsB,WAAW,CAAC,CAAC;IACzE,CAAC;CACF;AAzID,sCAyIC"}
@@ -1,8 +0,0 @@
1
- import { Command } from 'commander';
2
- import { ICommand } from '../../command.interface';
3
- export declare class TriggerCommand implements ICommand {
4
- private actionHandler;
5
- constructor();
6
- load(program: Command): void;
7
- private sanitizeOptions;
8
- }
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TriggerCommand = void 0;
4
- const trigger_action_1 = require("./trigger.action");
5
- class TriggerCommand {
6
- actionHandler;
7
- constructor() {
8
- this.actionHandler = new trigger_action_1.TriggerAction();
9
- }
10
- load(program) {
11
- program
12
- .command('trigger')
13
- .description('Create new trigger')
14
- .requiredOption('--integration [integration]', 'Integration under which new trigger will be created')
15
- .action((options) => {
16
- const sanitizedOptions = this.sanitizeOptions(options);
17
- return this.actionHandler.handle(sanitizedOptions);
18
- });
19
- }
20
- sanitizeOptions(rawOptions) {
21
- return rawOptions;
22
- }
23
- }
24
- exports.TriggerCommand = TriggerCommand;
25
- //# sourceMappingURL=trigger.command.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trigger.command.js","sourceRoot":"","sources":["../../../../src/commands/new/trigger/trigger.command.ts"],"names":[],"mappings":";;;AAGA,qDAAiD;AAMjD,MAAa,cAAc;IACjB,aAAa,CAAgB;IAErC;QACE,IAAI,CAAC,aAAa,GAAG,IAAI,8BAAa,EAAE,CAAC;IAC3C,CAAC;IAKD,IAAI,CAAC,OAAgB;QACnB,OAAO;aACJ,OAAO,CAAC,SAAS,CAAC;aAClB,WAAW,CAAC,oBAAoB,CAAC;aACjC,cAAc,CACb,6BAA6B,EAC7B,qDAAqD,CACtD;aACA,MAAM,CAAC,CAAC,OAA8B,EAAE,EAAE;YACzC,MAAM,gBAAgB,GACpB,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YAChC,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;IACP,CAAC;IAOO,eAAe,CACrB,UAAiC;QAEjC,OAAO,UAAU,CAAC;IACpB,CAAC;CACF;AAnCD,wCAmCC"}
@@ -1,3 +0,0 @@
1
- export type TriggerCommandOptions = {
2
- integration: string;
3
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=trigger.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trigger.types.js","sourceRoot":"","sources":["../../../../src/commands/new/trigger/trigger.types.ts"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
1
- import { StepDependencies } from '@useparagon/core';
2
- import { ICustomTrigger } from '../../apis';
3
- import { ICompiler } from '../compiler.interface';
4
- type TriggersCompilerInput = {
5
- projectRoot: string;
6
- integration: string;
7
- dependencies: StepDependencies;
8
- };
9
- export declare class TriggersCompiler implements ICompiler<TriggersCompilerInput, ICustomTrigger[]> {
10
- compile(options: TriggersCompilerInput): Promise<ICustomTrigger[]>;
11
- }
12
- export {};