@useparagon/cli 0.0.1-canary.39 → 0.0.1-canary.4

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 (180) hide show
  1. package/dist/apis/api.types.d.ts +8 -71
  2. package/dist/apis/auth.api.js +7 -5
  3. package/dist/apis/auth.api.js.map +1 -1
  4. package/dist/apis/base.api.d.ts +0 -3
  5. package/dist/apis/base.api.js +52 -51
  6. package/dist/apis/base.api.js.map +1 -1
  7. package/dist/apis/event.api.d.ts +2 -0
  8. package/dist/apis/event.api.js +10 -0
  9. package/dist/apis/event.api.js.map +1 -0
  10. package/dist/apis/index.d.ts +2 -0
  11. package/dist/apis/index.js +2 -0
  12. package/dist/apis/index.js.map +1 -1
  13. package/dist/apis/integration.api.d.ts +3 -3
  14. package/dist/apis/integration.api.js +10 -18
  15. package/dist/apis/integration.api.js.map +1 -1
  16. package/dist/apis/project.api.d.ts +1 -1
  17. package/dist/apis/project.api.js +17 -40
  18. package/dist/apis/project.api.js.map +1 -1
  19. package/dist/apis/workflow.api.d.ts +2 -0
  20. package/dist/apis/workflow.api.js +10 -0
  21. package/dist/apis/workflow.api.js.map +1 -0
  22. package/dist/codegen/codegen.types.d.ts +4 -12
  23. package/dist/codegen/codegen.utils.d.ts +1 -2
  24. package/dist/codegen/codegen.utils.js +28 -63
  25. package/dist/codegen/codegen.utils.js.map +1 -1
  26. package/dist/codegen/codegens/condition.codegen.js +35 -38
  27. package/dist/codegen/codegens/condition.codegen.js.map +1 -1
  28. package/dist/codegen/codegens/event.codegen.js +3 -4
  29. package/dist/codegen/codegens/event.codegen.js.map +1 -1
  30. package/dist/codegen/codegens/integration.codegen.d.ts +3 -3
  31. package/dist/codegen/codegens/integration.codegen.js +32 -138
  32. package/dist/codegen/codegens/integration.codegen.js.map +1 -1
  33. package/dist/codegen/codegens/source.codegen.d.ts +1 -3
  34. package/dist/codegen/codegens/source.codegen.js +31 -120
  35. package/dist/codegen/codegens/source.codegen.js.map +1 -1
  36. package/dist/codegen/codegens/workflow.codegen.js +111 -253
  37. package/dist/codegen/codegens/workflow.codegen.js.map +1 -1
  38. package/dist/commands/auth/login/login.action.js +31 -28
  39. package/dist/commands/auth/login/login.action.js.map +1 -1
  40. package/dist/commands/auth/login/login.command.js +4 -5
  41. package/dist/commands/auth/login/login.command.js.map +1 -1
  42. package/dist/commands/auth/login/login.utils.js +19 -26
  43. package/dist/commands/auth/login/login.utils.js.map +1 -1
  44. package/dist/commands/auth/logout/logout.action.js +5 -3
  45. package/dist/commands/auth/logout/logout.action.js.map +1 -1
  46. package/dist/commands/auth/logout/logout.command.js +3 -3
  47. package/dist/commands/auth/logout/logout.command.js.map +1 -1
  48. package/dist/commands/auth/me/me.action.js +6 -10
  49. package/dist/commands/auth/me/me.action.js.map +1 -1
  50. package/dist/commands/auth/me/me.command.js +3 -3
  51. package/dist/commands/auth/me/me.command.js.map +1 -1
  52. package/dist/commands/build/build.action.js +27 -27
  53. package/dist/commands/build/build.action.js.map +1 -1
  54. package/dist/commands/build/build.command.js +5 -9
  55. package/dist/commands/build/build.command.js.map +1 -1
  56. package/dist/commands/build/build.types.d.ts +0 -1
  57. package/dist/commands/build/build.utils.d.ts +1 -1
  58. package/dist/commands/build/build.utils.js +9 -11
  59. package/dist/commands/build/build.utils.js.map +1 -1
  60. package/dist/commands/command.loader.js +8 -10
  61. package/dist/commands/command.loader.js.map +1 -1
  62. package/dist/commands/init/init.action.d.ts +1 -1
  63. package/dist/commands/init/init.action.js +68 -93
  64. package/dist/commands/init/init.action.js.map +1 -1
  65. package/dist/commands/init/init.command.js +8 -14
  66. package/dist/commands/init/init.command.js.map +1 -1
  67. package/dist/commands/init/init.constants.js +23 -0
  68. package/dist/commands/init/init.constants.js.map +1 -0
  69. package/dist/commands/init/init.types.d.ts +0 -1
  70. package/dist/commands/init/init.utils.d.ts +11 -0
  71. package/dist/commands/init/init.utils.js +50 -0
  72. package/dist/commands/init/init.utils.js.map +1 -0
  73. package/dist/commands/push/push.action.js +11 -9
  74. package/dist/commands/push/push.action.js.map +1 -1
  75. package/dist/commands/push/push.command.js +4 -4
  76. package/dist/commands/push/push.command.js.map +1 -1
  77. package/dist/compiler/compiler.types.d.ts +2 -3
  78. package/dist/compiler/compiler.utils.d.ts +1 -1
  79. package/dist/compiler/compiler.utils.js +4 -8
  80. package/dist/compiler/compiler.utils.js.map +1 -1
  81. package/dist/compiler/compilers/events.compiler.js +28 -24
  82. package/dist/compiler/compilers/events.compiler.js.map +1 -1
  83. package/dist/compiler/compilers/integrations.compiler.js +52 -148
  84. package/dist/compiler/compilers/integrations.compiler.js.map +1 -1
  85. package/dist/compiler/compilers/persona.compiler.js +11 -4
  86. package/dist/compiler/compilers/persona.compiler.js.map +1 -1
  87. package/dist/compiler/compilers/project.compiler.d.ts +0 -1
  88. package/dist/compiler/compilers/project.compiler.js +23 -49
  89. package/dist/compiler/compilers/project.compiler.js.map +1 -1
  90. package/dist/compiler/compilers/workflows.compiler.js +33 -46
  91. package/dist/compiler/compilers/workflows.compiler.js.map +1 -1
  92. package/dist/compiler/ts.compiler.d.ts +3 -1
  93. package/dist/compiler/ts.compiler.js +18 -18
  94. package/dist/compiler/ts.compiler.js.map +1 -1
  95. package/dist/config/config.constants.d.ts +0 -1
  96. package/dist/config/config.constants.js +1 -2
  97. package/dist/config/config.constants.js.map +1 -1
  98. package/dist/config/config.types.d.ts +0 -4
  99. package/dist/config/config.utils.d.ts +3 -4
  100. package/dist/config/config.utils.js +37 -65
  101. package/dist/config/config.utils.js.map +1 -1
  102. package/dist/helpers/constants.d.ts +0 -1
  103. package/dist/helpers/constants.js +1 -2
  104. package/dist/helpers/constants.js.map +1 -1
  105. package/dist/helpers/file.d.ts +1 -3
  106. package/dist/helpers/file.js +15 -44
  107. package/dist/helpers/file.js.map +1 -1
  108. package/dist/helpers/strings.d.ts +0 -1
  109. package/dist/helpers/strings.js +1 -34
  110. package/dist/helpers/strings.js.map +1 -1
  111. package/dist/index.js +0 -10
  112. package/dist/index.js.map +1 -1
  113. package/dist/logger/logger.js +1 -5
  114. package/dist/logger/logger.js.map +1 -1
  115. package/dist/templates/configurations/typescript/tsconfig.json +2 -3
  116. package/dist/templates/javascript/src/events/hello-world.js +13 -0
  117. package/dist/templates/javascript/src/integrations/slack/config.js +11 -0
  118. package/dist/templates/javascript/src/integrations/slack/workflows/example-workflow.js +30 -0
  119. package/dist/templates/typescript/src/events/hello-world.ts +21 -0
  120. package/dist/templates/typescript/src/integrations/slack/config.ts +18 -0
  121. package/dist/templates/typescript/src/integrations/slack/workflows/example-workflow.ts +30 -0
  122. package/dist/templates/typescript/tsconfig.json +31 -0
  123. package/package.json +16 -20
  124. package/dist/codegen/codegens/intent.codegen.d.ts +0 -5
  125. package/dist/codegen/codegens/intent.codegen.js +0 -179
  126. package/dist/codegen/codegens/intent.codegen.js.map +0 -1
  127. package/dist/commands/install/index.d.ts +0 -1
  128. package/dist/commands/install/index.js +0 -5
  129. package/dist/commands/install/index.js.map +0 -1
  130. package/dist/commands/install/install.action.d.ts +0 -5
  131. package/dist/commands/install/install.action.js +0 -15
  132. package/dist/commands/install/install.action.js.map +0 -1
  133. package/dist/commands/install/install.command.d.ts +0 -8
  134. package/dist/commands/install/install.command.js +0 -24
  135. package/dist/commands/install/install.command.js.map +0 -1
  136. package/dist/commands/install/install.constants.js +0 -68
  137. package/dist/commands/install/install.constants.js.map +0 -1
  138. package/dist/commands/install/install.types.d.ts +0 -7
  139. package/dist/commands/install/install.types.js +0 -3
  140. package/dist/commands/install/install.types.js.map +0 -1
  141. package/dist/commands/install/install.utils.d.ts +0 -8
  142. package/dist/commands/install/install.utils.js +0 -130
  143. package/dist/commands/install/install.utils.js.map +0 -1
  144. package/dist/commands/new/index.d.ts +0 -1
  145. package/dist/commands/new/index.js +0 -5
  146. package/dist/commands/new/index.js.map +0 -1
  147. package/dist/commands/new/integration/index.d.ts +0 -1
  148. package/dist/commands/new/integration/index.js +0 -5
  149. package/dist/commands/new/integration/index.js.map +0 -1
  150. package/dist/commands/new/integration/integration.action.d.ts +0 -5
  151. package/dist/commands/new/integration/integration.action.js +0 -52
  152. package/dist/commands/new/integration/integration.action.js.map +0 -1
  153. package/dist/commands/new/integration/integration.command.d.ts +0 -8
  154. package/dist/commands/new/integration/integration.command.js +0 -26
  155. package/dist/commands/new/integration/integration.command.js.map +0 -1
  156. package/dist/commands/new/integration/integration.types.d.ts +0 -1
  157. package/dist/commands/new/integration/integration.types.js +0 -3
  158. package/dist/commands/new/integration/integration.types.js.map +0 -1
  159. package/dist/commands/new/new.command.d.ts +0 -5
  160. package/dist/commands/new/new.command.js +0 -16
  161. package/dist/commands/new/new.command.js.map +0 -1
  162. package/dist/commands/new/new.utils.d.ts +0 -1
  163. package/dist/commands/new/new.utils.js +0 -18
  164. package/dist/commands/new/new.utils.js.map +0 -1
  165. package/dist/commands/new/workflow/index.d.ts +0 -1
  166. package/dist/commands/new/workflow/index.js +0 -5
  167. package/dist/commands/new/workflow/index.js.map +0 -1
  168. package/dist/commands/new/workflow/workflow.action.d.ts +0 -5
  169. package/dist/commands/new/workflow/workflow.action.js +0 -94
  170. package/dist/commands/new/workflow/workflow.action.js.map +0 -1
  171. package/dist/commands/new/workflow/workflow.command.d.ts +0 -8
  172. package/dist/commands/new/workflow/workflow.command.js +0 -25
  173. package/dist/commands/new/workflow/workflow.command.js.map +0 -1
  174. package/dist/commands/new/workflow/workflow.types.d.ts +0 -3
  175. package/dist/commands/new/workflow/workflow.types.js +0 -3
  176. package/dist/commands/new/workflow/workflow.types.js.map +0 -1
  177. package/dist/helpers/sets.d.ts +0 -1
  178. package/dist/helpers/sets.js +0 -10
  179. package/dist/helpers/sets.js.map +0 -1
  180. /package/dist/commands/{install/install.constants.d.ts → init/init.constants.d.ts} +0 -0
@@ -4,167 +4,71 @@ exports.IntegrationsCompiler = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const glob_1 = require("glob");
6
6
  const path_1 = tslib_1.__importDefault(require("path"));
7
- const uuid_1 = require("uuid");
8
7
  const inputs_1 = require("@useparagon/core/inputs");
9
- const integration_1 = require("@useparagon/core/integration");
10
- const resolvers_1 = require("@useparagon/core/resolvers");
11
- const request_1 = require("@useparagon/core/steps/library/request");
12
8
  const utils_1 = require("@useparagon/core/utils");
13
9
  const compiler_utils_1 = require("../compiler.utils");
14
10
  const workflows_compiler_1 = require("./workflows.compiler");
15
11
  class IntegrationsCompiler {
16
- workflowsCompiler;
17
12
  constructor() {
18
13
  this.workflowsCompiler = new workflows_compiler_1.WorkflowsCompiler();
19
14
  }
20
- async compile(options) {
21
- const { events, projectRoot, previousProjectBuild } = options;
22
- const userIntegrationPaths = await (0, glob_1.glob)('integrations/*/', {
23
- cwd: projectRoot,
24
- });
25
- const integrationOutputs = [];
26
- const usersIntegrations = new Set();
27
- for (const userIntegraitonPath of userIntegrationPaths) {
28
- let integrationName = (0, compiler_utils_1.extractKeyFromPath)(userIntegraitonPath);
29
- const previousIntegrationBuild = previousProjectBuild.integrations[integrationName];
30
- const userDefinedInputs = (0, compiler_utils_1.requireSafe)(path_1.default.join(projectRoot, userIntegraitonPath, 'inputs.js'));
31
- const output = (0, compiler_utils_1.requireSafe)(path_1.default.join(projectRoot, userIntegraitonPath, 'config.js'), false);
32
- let customIntegration;
33
- if ((0, integration_1.isCustomIntegration)(integrationName)) {
34
- const customIntegrationConfig = output.default;
35
- const inputs = output.inputs;
36
- integrationName = (0, integration_1.generateSlugForIntegration)(customIntegrationConfig);
37
- customIntegration = {
38
- id: previousIntegrationBuild?.customIntegration?.id || (0, uuid_1.v4)(),
39
- name: customIntegrationConfig.name,
40
- inputFields: Object.values(inputs),
41
- isPublished: true,
42
- };
43
- switch (customIntegrationConfig.authenticationType) {
44
- case integration_1.AuthenticationScheme.BASIC:
45
- customIntegration = {
46
- ...customIntegration,
47
- apiBaseUrl: (0, resolvers_1.resolveToTokenizedSource)(customIntegrationConfig.apiBaseUrl, resolvers_1.DataType.STRING),
48
- testEndpointPath: (0, resolvers_1.resolveToTokenizedSource)(customIntegrationConfig.testEndpointPath, resolvers_1.DataType.STRING),
49
- apiAuthorization: (() => {
50
- let authorization;
51
- const userDefinedAuthorization = customIntegrationConfig.authorization;
52
- switch (userDefinedAuthorization?.type) {
53
- case request_1.RequestAuthorizationType.BASIC:
54
- authorization = {
55
- type: request_1.RequestAuthorizationType.BASIC,
56
- username: (0, resolvers_1.resolveToTokenizedSource)(userDefinedAuthorization.userName, resolvers_1.DataType.STRING),
57
- password: (0, resolvers_1.resolveToTokenizedSource)(userDefinedAuthorization.password, resolvers_1.DataType.STRING),
58
- };
59
- break;
60
- case request_1.RequestAuthorizationType.AUTH_HEADER:
61
- authorization = {
62
- type: request_1.RequestAuthorizationType.AUTH_HEADER,
63
- headers: (0, resolvers_1.resolveParamsToSources)(userDefinedAuthorization.headers || {}, resolvers_1.DataType.STRING),
64
- };
65
- break;
66
- case request_1.RequestAuthorizationType.BEARER_TOKEN:
67
- authorization = {
68
- type: request_1.RequestAuthorizationType.BEARER_TOKEN,
69
- token: (0, resolvers_1.resolveToTokenizedSource)(userDefinedAuthorization.token, resolvers_1.DataType.STRING),
70
- };
71
- break;
72
- case request_1.RequestAuthorizationType.CLIENT_CREDENTIAL:
73
- authorization = {
74
- type: request_1.RequestAuthorizationType.CLIENT_CREDENTIAL,
75
- };
76
- break;
77
- case request_1.RequestAuthorizationType.QUERY_PARAMS:
78
- authorization = {
79
- type: request_1.RequestAuthorizationType.QUERY_PARAMS,
80
- params: (0, resolvers_1.resolveParamsToSources)(userDefinedAuthorization.params || {}, resolvers_1.DataType.STRING),
81
- };
82
- break;
83
- default:
84
- break;
85
- }
86
- return authorization;
87
- })(),
88
- };
89
- break;
90
- case integration_1.AuthenticationScheme.OAUTH:
91
- customIntegration = {
92
- ...customIntegration,
93
- authenticationType: integration_1.AuthenticationScheme.OAUTH,
94
- oauthAuthorizationUrl: (0, resolvers_1.resolveToTokenizedSource)(customIntegrationConfig.authorizationUrl, resolvers_1.DataType.STRING),
95
- oauthAccessTokenUrl: (0, resolvers_1.resolveToTokenizedSource)(customIntegrationConfig.accessTokenUrl, resolvers_1.DataType.STRING),
96
- oauthScopes: customIntegration.oauthScopes || '',
97
- oauthIncludeClientAuthorizationHeader: customIntegrationConfig.includeClientIdAndSecrets ?? true,
98
- usePKCEInCodeExchange: customIntegrationConfig.usePKCEInCodeExchange ?? false,
99
- };
100
- break;
101
- case integration_1.AuthenticationScheme.OAUTH_CLIENT_CREDENTIAL:
102
- customIntegration = {
103
- ...customIntegration,
104
- authenticationType: integration_1.AuthenticationScheme.OAUTH_CLIENT_CREDENTIAL,
105
- oauthAccessTokenUrl: (0, resolvers_1.resolveToTokenizedSource)(customIntegrationConfig.accessTokenUrl, resolvers_1.DataType.STRING),
106
- };
107
- break;
108
- default:
109
- break;
110
- }
111
- }
112
- if (usersIntegrations.has(integrationName)) {
113
- throw new Error(`Integration with name "${integrationName}" is already defined.`);
114
- }
115
- usersIntegrations.add(integrationName);
116
- const integrationConfig = output.default;
117
- const inputSources = previousIntegrationBuild?.dependencies?.inputs ?? [];
118
- const previousConfig = previousIntegrationBuild?.config;
119
- const serializedInputs = (0, inputs_1.convertUserDefinedInputsToSerializedInputs)(Object.values(userDefinedInputs), inputSources);
120
- const modalConfig = {
121
- values: {
122
- paragonLink: integrationConfig['showWatermark'] || true,
123
- description: integrationConfig.description,
124
- overview: integrationConfig['overviewText'] || '',
125
- accentColor: integrationConfig['accentColor'] ||
126
- previousConfig?.values?.accentColor,
127
- workflowMeta: {},
128
- sharedMeta: {
129
- inputs: serializedInputs,
15
+ compile(options) {
16
+ var _a;
17
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
18
+ const { events, projectRoot, previousProjectBuild } = options;
19
+ const userIntegrationPaths = yield (0, glob_1.glob)(path_1.default.join(projectRoot, 'integrations/*/'));
20
+ const integrationOutputs = [];
21
+ for (const userIntegraitonPath of userIntegrationPaths) {
22
+ const integration = (0, compiler_utils_1.extractKeyFromPath)(userIntegraitonPath);
23
+ const userDefinedInputs = (0, compiler_utils_1.requireSafe)(path_1.default.join(userIntegraitonPath, 'inputs.js'));
24
+ const integrationConfig = (0, compiler_utils_1.requireSafe)(path_1.default.join(userIntegraitonPath, 'config.js'));
25
+ const previousIntegrationBuild = previousProjectBuild.integrations[integration];
26
+ const inputSources = (_a = previousIntegrationBuild === null || previousIntegrationBuild === void 0 ? void 0 : previousIntegrationBuild.inputs) !== null && _a !== void 0 ? _a : [];
27
+ const serializedInputs = (0, inputs_1.convertUserDefinedInputsToSerializedInputs)(userDefinedInputs, inputSources);
28
+ const modalConfig = {
29
+ values: {
30
+ paragonLink: integrationConfig.showWatermark || true,
31
+ description: integrationConfig.description,
32
+ overview: integrationConfig.overviewText,
33
+ workflowMeta: {},
34
+ sharedMeta: {
35
+ inputs: serializedInputs,
36
+ },
130
37
  },
131
- },
132
- };
133
- const compiledWorkflows = await this.workflowsCompiler.compile({
134
- projectRoot,
135
- integration: integrationName,
136
- events,
137
- sharedInputs: serializedInputs,
138
- inputSources,
139
- previousProjectBuild,
140
- });
141
- const workflowBuilds = [];
142
- for (const compiledWorkflow of compiledWorkflows) {
143
- workflowBuilds.push({
144
- id: compiledWorkflow.id,
145
- name: compiledWorkflow.name,
146
- steps: compiledWorkflow.steps,
38
+ };
39
+ const compiledWorkflows = yield this.workflowsCompiler.compile({
40
+ projectRoot,
41
+ integration,
42
+ events,
43
+ sharedInputs: serializedInputs,
44
+ inputSources,
45
+ previousProjectBuild,
147
46
  });
148
- if (modalConfig.values.workflowMeta) {
149
- modalConfig.values.workflowMeta[compiledWorkflow.id] = {
47
+ const workflowBuilds = [];
48
+ for (const compiledWorkflow of compiledWorkflows) {
49
+ workflowBuilds.push({
150
50
  id: compiledWorkflow.id,
151
- hidden: compiledWorkflow.hidden,
152
- defaultEnabled: compiledWorkflow.defaultEnable,
153
- inputs: compiledWorkflow.inputs,
154
- infoText: compiledWorkflow.description,
155
- permissions: compiledWorkflow.permissions,
156
- };
51
+ name: compiledWorkflow.name,
52
+ steps: compiledWorkflow.steps,
53
+ });
54
+ if (modalConfig.values.workflowMeta) {
55
+ modalConfig.values.workflowMeta[compiledWorkflow.id] = {
56
+ id: compiledWorkflow.id,
57
+ hidden: compiledWorkflow.hidden,
58
+ defaultEnabled: compiledWorkflow.defaultEnable,
59
+ inputs: compiledWorkflow.inputs,
60
+ infoText: compiledWorkflow.description,
61
+ };
62
+ }
157
63
  }
64
+ integrationOutputs.push({
65
+ name: integration,
66
+ workflows: (0, utils_1.indexBy)('id', workflowBuilds),
67
+ config: modalConfig,
68
+ });
158
69
  }
159
- integrationOutputs.push({
160
- id: previousIntegrationBuild?.id ?? (0, uuid_1.v4)(),
161
- name: integrationName,
162
- workflows: (0, utils_1.indexBy)('id', workflowBuilds),
163
- config: modalConfig,
164
- customIntegration,
165
- });
166
- }
167
- return integrationOutputs;
70
+ return integrationOutputs;
71
+ });
168
72
  }
169
73
  }
170
74
  exports.IntegrationsCompiler = IntegrationsCompiler;
@@ -1 +1 @@
1
- {"version":3,"file":"integrations.compiler.js","sourceRoot":"","sources":["../../../src/compiler/compilers/integrations.compiler.ts"],"names":[],"mappings":";;;;AAAA,+BAA4B;AAC5B,wDAAwB;AACxB,+BAA0B;AAG1B,oDAKiC;AACjC,8DAMsC;AACtC,0DAIoC;AACpC,oEAIgD;AAChD,kDAAiD;AAQjD,sDAAoE;AACpE,6DAA2E;AAe3E,MAAa,oBAAoB;IAGvB,iBAAiB,CAAoB;IAE7C;QACE,IAAI,CAAC,iBAAiB,GAAG,IAAI,sCAAiB,EAAE,CAAC;IACnD,CAAC;IAOD,KAAK,CAAC,OAAO,CACX,OAAkC;QAElC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC;QAE9D,MAAM,oBAAoB,GAAa,MAAM,IAAA,WAAI,EAAC,iBAAiB,EAAE;YACnE,GAAG,EAAE,WAAW;SACjB,CAAC,CAAC;QAEH,MAAM,kBAAkB,GAAiC,EAAE,CAAC;QA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,MAAM,EAAE,gBAAgB,CAAC,MAAM;wBAC/B,cAAc,EAAE,gBAAgB,CAAC,aAAa;wBAC9C,MAAM,EAAE,gBAAgB,CAAC,MAAM;wBAC/B,QAAQ,EAAE,gBAAgB,CAAC,WAAW;wBACtC,WAAW,EAAE,gBAAgB,CAAC,WAAW;qBAC1C,CAAC;gBACJ,CAAC;YACH,CAAC;YAED,kBAAkB,CAAC,IAAI,CAAC;gBACtB,EAAE,EAAE,wBAAwB,EAAE,EAAE,IAAI,IAAA,SAAE,GAAE;gBACxC,IAAI,EAAE,eAAe;gBACrB,SAAS,EAAE,IAAA,eAAO,EAAC,IAAI,EAAE,cAAc,CAAC;gBACxC,MAAM,EAAE,WAAW;gBACnB,iBAAiB;aAClB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,kBAAkB,CAAC;IAC5B,CAAC;CACF;AAlPD,oDAkPC"}
1
+ {"version":3,"file":"integrations.compiler.js","sourceRoot":"","sources":["../../../src/compiler/compilers/integrations.compiler.ts"],"names":[],"mappings":";;;;AAAA,+BAA4B;AAC5B,wDAAwB;AAGxB,oDAKiC;AAEjC,kDAAiD;AAQjD,sDAAoE;AACpE,6DAA2E;AAe3E,MAAa,oBAAoB;IAK/B;QACE,IAAI,CAAC,iBAAiB,GAAG,IAAI,sCAAiB,EAAE,CAAC;IACnD,CAAC;IAOK,OAAO,CACX,OAAkC;;;YAElC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC;YAE9D,MAAM,oBAAoB,GAAa,MAAM,IAAA,WAAI,EAC/C,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAC1C,CAAC;YAEF,MAAM,kBAAkB,GAAiC,EAAE,CAAC;YAE5D,KAAK,MAAM,mBAAmB,IAAI,oBAAoB,EAAE,CAAC;gBACvD,MAAM,WAAW,GAAW,IAAA,mCAAkB,EAAC,mBAAmB,CAAC,CAAC;gBAEpE,MAAM,iBAAiB,G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AAE,CAAC;wBACpC,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,gBAAgB,CAAC,EAAE,CAAC,GAAG;4BACrD,EAAE,EAAE,gBAAgB,CAAC,EAAE;4BACvB,MAAM,EAAE,gBAAgB,CAAC,MAAM;4BAC/B,cAAc,EAAE,gBAAgB,CAAC,aAAa;4BAC9C,MAAM,EAAE,gBAAgB,CAAC,MAAM;4BAC/B,QAAQ,EAAE,gBAAgB,CAAC,WAAW;yBACvC,CAAC;oBACJ,CAAC;gBACH,CAAC;gBAED,kBAAkB,CAAC,IAAI,CAAC;oBACtB,IAAI,EAAE,WAAW;oBACjB,SAAS,EAAE,IAAA,eAAO,EAAC,IAAI,EAAE,cAAc,CAAC;oBACxC,MAAM,EAAE,WAAW;iBACpB,CAAC,CAAC;YACL,CAAC;YAED,OAAO,kBAAkB,CAAC;;KAC3B;CACF;AAlGD,oDAkGC"}
@@ -2,13 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PersonaCompiler = void 0;
4
4
  const tslib_1 = require("tslib");
5
+ const glob_1 = require("glob");
5
6
  const path_1 = tslib_1.__importDefault(require("path"));
6
7
  const compiler_utils_1 = require("../compiler.utils");
7
8
  class PersonaCompiler {
8
- async compile(options) {
9
- const { projectRoot } = options;
10
- const personaMeta = (0, compiler_utils_1.requireSafe)(path_1.default.join(projectRoot, 'persona.meta.js'));
11
- return { meta: personaMeta };
9
+ compile(options) {
10
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
11
+ const { projectRoot } = options;
12
+ const peraonaMeta = yield (0, glob_1.glob)(path_1.default.join(projectRoot, '**/persona.meta.js'));
13
+ if (!peraonaMeta.length) {
14
+ return { meta: {} };
15
+ }
16
+ const personaMeta = (0, compiler_utils_1.requireSafe)(peraonaMeta[0]);
17
+ return { meta: personaMeta };
18
+ });
12
19
  }
13
20
  }
14
21
  exports.PersonaCompiler = PersonaCompiler;
@@ -1 +1 @@
1
- {"version":3,"file":"persona.compiler.js","sourceRoot":"","sources":["../../../src/compiler/compilers/persona.compiler.ts"],"names":[],"mappings":";;;;AAAA,wDAAwB;AAKxB,sDAAgD;AAOhD,MAAa,eAAe;IAQ1B,KAAK,CAAC,OAAO,CAAC,OAA6B;QACzC,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;QAEhC,MAAM,WAAW,GAAqB,IAAA,4BAAW,EAC/C,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAC1C,CAAC;QAEF,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IAC/B,CAAC;CACF;AAjBD,0CAiBC"}
1
+ {"version":3,"file":"persona.compiler.js","sourceRoot":"","sources":["../../../src/compiler/compilers/persona.compiler.ts"],"names":[],"mappings":";;;;AAAA,+BAA4B;AAC5B,wDAAwB;AAKxB,sDAAgD;AAOhD,MAAa,eAAe;IAQpB,OAAO,CAAC,OAA6B;;YACzC,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;YAEhC,MAAM,WAAW,GAAa,MAAM,IAAA,WAAI,EACtC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAC7C,CAAC;YAEF,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;gBACxB,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;YACtB,CAAC;YAED,MAAM,WAAW,GAAqB,IAAA,4BAAW,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;YAElE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;QAC/B,CAAC;KAAA;CACF;AAvBD,0CAuBC"}
@@ -2,7 +2,6 @@ import { ProjectBuild } from '../../apis';
2
2
  import { ICompiler } from '../compiler.interface';
3
3
  type ProjectCompilerInput = {
4
4
  projectRoot: string;
5
- projectBuildRoot: string;
6
5
  projectId: string;
7
6
  };
8
7
  export declare class ProjectCompiler implements ICompiler<ProjectCompilerInput, ProjectBuild> {
@@ -1,67 +1,41 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProjectCompiler = void 0;
4
- const uuid_1 = require("uuid");
5
- const integration_1 = require("@useparagon/core/integration");
4
+ const tslib_1 = require("tslib");
6
5
  const utils_1 = require("@useparagon/core/utils");
7
6
  const apis_1 = require("../../apis");
8
- const new_utils_1 = require("../../commands/new/new.utils");
9
7
  const events_compiler_1 = require("./events.compiler");
10
8
  const integrations_compiler_1 = require("./integrations.compiler");
11
9
  const persona_compiler_1 = require("./persona.compiler");
12
10
  class ProjectCompiler {
13
- eventsCompiler;
14
- integrationsCompiler;
15
- personaCompiler;
16
11
  constructor() {
17
12
  this.eventsCompiler = new events_compiler_1.EventsCompiler();
18
13
  this.integrationsCompiler = new integrations_compiler_1.IntegrationsCompiler();
19
14
  this.personaCompiler = new persona_compiler_1.PersonaCompiler();
20
15
  }
21
- async compile(options) {
22
- const { projectRoot, projectId, projectBuildRoot } = options;
23
- const previousProjectBuild = await (0, apis_1.getProjectBuild)(projectId);
24
- const currentActiveIntegrations = await (0, new_utils_1.getCurrentActiveIntegrations)(projectRoot);
25
- for (const integration of currentActiveIntegrations) {
26
- if ((0, integration_1.isCustomIntegration)(integration)) {
27
- continue;
28
- }
29
- if (!previousProjectBuild.integrations[integration]) {
30
- const integrationModulePath = require.resolve(`@useparagon/types/${integration}`, {
31
- paths: [process.cwd()],
32
- });
33
- const { inputs, triggers, intents } = require(integrationModulePath);
34
- previousProjectBuild.integrations[integration] = {
35
- id: (0, uuid_1.v4)(),
36
- config: { values: {} },
37
- dependencies: {
38
- inputs,
39
- triggers,
40
- intents,
41
- },
42
- workflows: {},
43
- };
44
- }
45
- }
46
- const persona = await this.personaCompiler.compile({
47
- projectRoot: projectBuildRoot,
16
+ compile(options) {
17
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
18
+ const { projectRoot, projectId } = options;
19
+ const previousProjectBuild = yield (0, apis_1.getProjectBuild)(projectId);
20
+ const persona = yield this.personaCompiler.compile({
21
+ projectRoot,
22
+ });
23
+ const userEvents = yield this.eventsCompiler.compile({
24
+ projectRoot,
25
+ previousEvents: Object.values(previousProjectBuild.events),
26
+ });
27
+ const integrations = yield this.integrationsCompiler.compile({
28
+ projectRoot,
29
+ events: userEvents,
30
+ previousProjectBuild,
31
+ });
32
+ return {
33
+ events: (0, utils_1.indexBy)('id', userEvents),
34
+ integrations: (0, utils_1.indexBy)('name', integrations),
35
+ projectId,
36
+ persona,
37
+ };
48
38
  });
49
- const userEvents = await this.eventsCompiler.compile({
50
- projectRoot: projectBuildRoot,
51
- previousEvents: Object.values(previousProjectBuild.events),
52
- });
53
- const integrations = await this.integrationsCompiler.compile({
54
- projectRoot: projectBuildRoot,
55
- events: userEvents,
56
- previousProjectBuild,
57
- });
58
- return {
59
- secrets: [],
60
- events: (0, utils_1.indexBy)('id', userEvents),
61
- integrations: (0, utils_1.indexBy)('name', integrations),
62
- projectId,
63
- persona,
64
- };
65
39
  }
66
40
  }
67
41
  exports.ProjectCompiler = ProjectCompiler;
@@ -1 +1 @@
1
- {"version":3,"file":"project.compiler.js","sourceRoot":"","sources":["../../../src/compiler/compilers/project.compiler.ts"],"names":[],"mappings":";;;AAAA,+BAA0B;AAG1B,8DAAmE;AAEnE,kDAAiD;AAEjD,qCAA2D;AAC3D,4DAA4E;AAE5E,uDAAmD;AACnD,mEAGiC;AACjC,yDAAqD;AAsBrD,MAAa,eAAe;IAGlB,cAAc,CAAiB;IAC/B,oBAAoB,CAAuB;IAC3C,eAAe,CAAkB;IAEzC;QACE,IAAI,CAAC,cAAc,GAAG,IAAI,gCAAc,EAAE,CAAC;QAC3C,IAAI,CAAC,oBAAoB,GAAG,IAAI,4CAAoB,EAAE,CAAC;QACvD,IAAI,CAAC,eAAe,GAAG,IAAI,kCAAe,EAAE,CAAC;IAC/C,CAAC;IAOD,KAAK,CAAC,OAAO,CAAC,OAA6B;QACzC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,gBAAg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oB;aACrB,CAAC,CAAC;YAEL,OAAO;gBACL,MAAM,EAAE,IAAA,eAAO,EAAC,IAAI,EAAE,UAAU,CAAC;gBACjC,YAAY,EAAE,IAAA,eAAO,EAAC,MAAM,EAAE,YAAY,CAAC;gBAC3C,SAAS;gBACT,OAAO;aACR,CAAC;QACJ,CAAC;KAAA;CACF;AA9CD,0CA8CC"}
@@ -4,60 +4,47 @@ exports.WorkflowsCompiler = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const glob_1 = require("glob");
6
6
  const path_1 = tslib_1.__importDefault(require("path"));
7
- const core_1 = require("@useparagon/core");
8
7
  const execution_1 = require("@useparagon/core/execution");
9
8
  const inputs_1 = require("@useparagon/core/inputs");
10
- const integration_1 = require("@useparagon/core/integration");
11
9
  const stateMachine_1 = require("@useparagon/core/stateMachine");
12
10
  const conditional_1 = require("@useparagon/core/steps/library/conditional");
13
- const utils_1 = require("@useparagon/core/utils");
14
11
  const compiler_utils_1 = require("../compiler.utils");
15
12
  class WorkflowsCompiler {
16
- async compile(options) {
17
- const { integration, projectRoot, events, previousProjectBuild, sharedInputs, inputSources, } = options;
18
- const currentIntegrationPath = path_1.default.join(projectRoot, 'integrations', integration);
19
- const workflowPaths = await (0, glob_1.glob)('workflows/*.js', {
20
- nodir: true,
21
- cwd: currentIntegrationPath,
22
- });
23
- const workflowOutputs = [];
24
- const previousIntegrationBuild = previousProjectBuild.integrations?.[integration];
25
- const intents = (previousIntegrationBuild?.dependencies?.intents ?? []).map((intent) => intent.name);
26
- const triggers = (previousIntegrationBuild?.dependencies?.triggers ?? []).map((intent) => intent.name);
27
- for (const workflowPath of workflowPaths) {
28
- const workflowAbsolutePath = path_1.default.join(currentIntegrationPath, workflowPath);
29
- const Workflow = (0, compiler_utils_1.requireSafe)(workflowAbsolutePath);
30
- const workflowInstance = new Workflow({
31
- events,
32
- sharedInputs,
33
- inputSources,
34
- secrets: previousProjectBuild.secrets,
35
- integrationType: (0, integration_1.isCustomIntegration)(integration) ? 'custom' : integration
13
+ compile(options) {
14
+ var _a, _b;
15
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
16
+ const { integration, projectRoot, events, previousProjectBuild, sharedInputs, inputSources, } = options;
17
+ const workflowPaths = yield (0, glob_1.glob)(path_1.default.join(projectRoot, 'integrations', integration, `workflows/*.js`), {
18
+ nodir: true,
36
19
  });
37
- if (!(0, utils_1.isUUID)(workflowInstance.id)) {
38
- throw new Error(`Workflow id defined in file (${workflowAbsolutePath}) must be UUId.`);
20
+ const workflowOutputs = [];
21
+ for (const workflowPath of workflowPaths) {
22
+ const Workflow = (0, compiler_utils_1.requireSafe)(workflowPath);
23
+ const workflowInstance = new Workflow({
24
+ events,
25
+ sharedInputs,
26
+ inputSources,
27
+ });
28
+ const previousWorkflowBuild = (_a = previousProjectBuild.integrations) === null || _a === void 0 ? void 0 : _a[integration].workflows[workflowInstance.id];
29
+ workflowInstance.setPreviousStateMachine((0, stateMachine_1.workflowStepsToStateMachine)((_b = previousWorkflowBuild.steps) !== null && _b !== void 0 ? _b : []));
30
+ const context = new execution_1.Context();
31
+ const stateMachine = yield workflowInstance.define({}, context, {});
32
+ const workflowPermissions = workflowInstance.definePermissions(context);
33
+ workflowOutputs.push({
34
+ id: workflowInstance.id,
35
+ steps: Object.values(stateMachine.stepMap),
36
+ name: (0, compiler_utils_1.extractKeyFromPath)(workflowPath),
37
+ description: workflowInstance.description,
38
+ permissions: workflowPermissions
39
+ ? (0, conditional_1.parseConditionInput)(workflowPermissions)
40
+ : undefined,
41
+ inputs: (0, inputs_1.convertUserDefinedInputsToSerializedInputs)(Object.values(workflowInstance.inputs), []),
42
+ defaultEnable: workflowInstance.defaultEnabled,
43
+ hidden: workflowInstance.hidden,
44
+ });
39
45
  }
40
- const previousWorkflowBuild = previousIntegrationBuild?.workflows?.[workflowInstance.id];
41
- workflowInstance.setPreviousStateMachine((0, stateMachine_1.workflowStepsToStateMachine)(previousWorkflowBuild?.steps ?? []));
42
- const integrationInstance = new integration_1.Integration(integration, intents, triggers);
43
- const context = new execution_1.Context();
44
- const connectUser = new core_1.ConnectUser();
45
- const stateMachine = await workflowInstance.define(integrationInstance, context, connectUser);
46
- const workflowPermissions = workflowInstance.definePermissions(connectUser);
47
- workflowOutputs.push({
48
- id: workflowInstance.id,
49
- steps: Object.values(stateMachine.stepMap),
50
- name: workflowInstance.name,
51
- description: workflowInstance.description,
52
- permissions: workflowPermissions
53
- ? (0, conditional_1.parseConditionInput)(workflowPermissions)
54
- : undefined,
55
- inputs: (0, inputs_1.convertUserDefinedInputsToSerializedInputs)(Object.values(workflowInstance.inputs), inputSources),
56
- defaultEnable: workflowInstance.defaultEnabled,
57
- hidden: workflowInstance.hidden,
58
- });
59
- }
60
- return workflowOutputs;
46
+ return workflowOutputs;
47
+ });
61
48
  }
62
49
  }
63
50
  exports.WorkflowsCompiler = WorkflowsCompiler;
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.compiler.js","sourceRoot":"","sources":["../../../src/compiler/compilers/workflows.compiler.ts"],"names":[],"mappings":";;;;AAAA,+BAA4B;AAC5B,wDAAwB;AAExB,2CAK0B;AAE1B,0DAAqD;AACrD,oDAIiC;AACjC,8DAAgF;AAEhF,gEAA4E;AAC5E,4EAGoD;AACpD,kDAAgD;AAIhD,sDAAgD;AA0BhD,MAAa,iBAAiB;IAQ5B,KAAK,CAAC,OAAO,CAAC,OAA+B;QAC3C,MAAM,EACJ,WAAW,EACX,WAAW,EACX,MAAM,EACN,oBAAoB,EACpB,YAAY,EACZ,YAAY,GACb,GAAG,OAAO,CAAC;QAEZ,MAAM,sBAAsB,GAAW,cAAI,CAAC,IAAI,CAC9C,WAAW,EACX,cAAc,EACd,WAAW,CACZ,CAAC;QAEF,MAAM,aAAa,GAAa,MAAM,IAAA,WAAI,EAAC,gBAAgB,EAAE;YAC3D,KAAK,EAAE,IAAI;YACX,GAAG,EAAE,sBAAsB;SAC5B,CAAC,CAAC;QAEH,MAAM,eAAe,GAAuB,EAAE,CAAC;QAE/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CACtD,WAAW,EACX,OAAO,EACP,QAAQ,CACT,CAAC;YAEF,MAAM,OAAO,GAAY,IAAI,mBAAO,EAAE,CAAC;YACvC,MAAM,WAAW,GAAgB,IAAI,kBAAW,EAAE,CAAC;YACnD,MAAM,YAAY,GAAiB,MAAM,gBAAgB,CAAC,MAAM,CAC9D,mBAAmB,EACnB,OAAO,EACP,WAAW,CACZ,CAAC;YACF,MAAM,mBAAmB,GACvB,gBAAgB,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;YAElD,eAAe,CAAC,IAAI,CAAC;gBACnB,EAAE,EAAE,gBAAgB,CAAC,EAAE;gBACvB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC;gBAC1C,IAAI,EAAE,gBAAgB,CAAC,IAAI;gBAC3B,WAAW,EAAE,gBAAgB,CAAC,WAAW;gBACzC,WAAW,EAAE,mBAAmB;oBAC9B,CAAC,CAAE,IAAA,iCAAmB,EAAC,mBAAmB,CAAkB;oBAC5D,CAAC,CAAC,SAAS;gBACb,MAAM,EAAE,IAAA,mDAA0C,EAChD,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,EACtC,YAAY,CACb;gBACD,aAAa,EAAE,gBAAgB,CAAC,cAAc;gBAC9C,MAAM,EAAE,gBAAgB,CAAC,MAAM;aAChC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,eAAe,CAAC;IACzB,CAAC;CACF;AA3GD,8CA2GC"}
1
+ {"version":3,"file":"workflows.compiler.js","sourceRoot":"","sources":["../../../src/compiler/compilers/workflows.compiler.ts"],"names":[],"mappings":";;;;AAAA,+BAA4B;AAC5B,wDAAwB;AASxB,0DAAqD;AACrD,oDAIiC;AAEjC,gEAA4E;AAC5E,4EAGoD;AAIpD,sDAAoE;AA0BpE,MAAa,iBAAiB;IAQtB,OAAO,CAAC,OAA+B;;;YAC3C,MAAM,EACJ,WAAW,EACX,WAAW,EACX,MAAM,EACN,oBAAoB,E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C,mBAAmB,CAAkB;wBAC5D,CAAC,CAAC,SAAS;oBACb,MAAM,EAAE,IAAA,mDAA0C,EAChD,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,EACtC,EAAE,CACH;oBACD,aAAa,EAAE,gBAAgB,CAAC,cAAc;oBAC9C,MAAM,EAAE,gBAAgB,CAAC,MAAM;iBAChC,CAAC,CAAC;YACL,CAAC;YAED,OAAO,eAAe,CAAC;;KACxB;CACF;AA1ED,8CA0EC"}
@@ -1,6 +1,8 @@
1
1
  export declare class TsCompiler {
2
2
  private tsBinary;
3
- run(rootPath: string, skipTypeErrors?: boolean): void;
3
+ run({ configPath }: {
4
+ configPath?: string;
5
+ }): void;
4
6
  private getDefaultTsconfigPath;
5
7
  private getTsBinary;
6
8
  transpileToJSCode(code: string): string;
@@ -2,14 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TsCompiler = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const path_1 = tslib_1.__importDefault(require("path"));
6
- const typescript_1 = tslib_1.__importDefault(require("typescript"));
5
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
6
+ const path_1 = require("path");
7
+ const ts = tslib_1.__importStar(require("typescript"));
7
8
  const logger_1 = tslib_1.__importDefault(require("../logger"));
8
9
  class TsCompiler {
9
- tsBinary;
10
- run(rootPath, skipTypeErrors = false) {
10
+ run({ configPath }) {
11
11
  const tsBinary = this.getTsBinary();
12
- const tsConfigPath = this.getDefaultTsconfigPath(rootPath);
12
+ const tsConfigPath = configPath !== null && configPath !== void 0 ? configPath : this.getDefaultTsconfigPath();
13
13
  const formatHost = {
14
14
  getCanonicalFileName: (path) => path,
15
15
  getCurrentDirectory: tsBinary.sys.getCurrentDirectory,
@@ -18,13 +18,10 @@ class TsCompiler {
18
18
  const parsedCmd = tsBinary.getParsedCommandLineOfConfigFile(tsConfigPath, undefined, tsBinary.sys);
19
19
  const { options, fileNames, projectReferences } = parsedCmd;
20
20
  const createProgram = tsBinary.createIncrementalProgram || tsBinary.createProgram;
21
- const program = createProgram.call(typescript_1.default, {
21
+ const program = createProgram.call(ts, {
22
22
  rootNames: fileNames,
23
23
  projectReferences,
24
- options: {
25
- ...options,
26
- noEmitOnError: !skipTypeErrors,
27
- },
24
+ options,
28
25
  });
29
26
  const emitResult = program.emit();
30
27
  const diagnostics = tsBinary
@@ -33,13 +30,16 @@ class TsCompiler {
33
30
  if (diagnostics.length > 0) {
34
31
  console.error(tsBinary.formatDiagnosticsWithColorAndContext(diagnostics, formatHost));
35
32
  console.info(`Found ${diagnostics.length} error(s).` + tsBinary.sys.newLine);
36
- if (!skipTypeErrors) {
37
- process.exit(1);
38
- }
33
+ }
34
+ if (diagnostics.length) {
35
+ process.exit(1);
39
36
  }
40
37
  }
41
- getDefaultTsconfigPath(rootPath) {
42
- return path_1.default.join(rootPath, 'tsconfig.json');
38
+ getDefaultTsconfigPath() {
39
+ const tsConfigFileName = fs_extra_1.default.existsSync((0, path_1.join)(process.cwd(), 'tsconfig.build.json'))
40
+ ? 'tsconfig.build.json'
41
+ : 'tsconfig.json';
42
+ return (0, path_1.join)(process.cwd(), tsConfigFileName);
43
43
  }
44
44
  getTsBinary() {
45
45
  if (this.tsBinary) {
@@ -52,13 +52,13 @@ class TsCompiler {
52
52
  this.tsBinary = require(tsBinaryPath);
53
53
  return this.tsBinary;
54
54
  }
55
- catch {
55
+ catch (_a) {
56
56
  logger_1.default.fatal('TypeScript could not be found! Please, install "typescript" package.');
57
57
  }
58
58
  }
59
59
  transpileToJSCode(code) {
60
- const result = typescript_1.default.transpileModule(code, {
61
- compilerOptions: { module: typescript_1.default.ModuleKind.ES2015 },
60
+ const result = ts.transpileModule(code, {
61
+ compilerOptions: { module: ts.ModuleKind.ES2015 },
62
62
  });
63
63
  return result.outputText;
64
64
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ts.compiler.js","sourceRoot":"","sources":["../../src/compiler/ts.compiler.ts"],"names":[],"mappings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CAAC"}
@@ -1,3 +1,2 @@
1
1
  export declare const SYSTEM_CONFIG_DIR_PATH: string;
2
2
  export declare const DEFAULT_PROFILE: string;
3
- export declare const PROJECT_CONFIG_FILE_NAME: string;
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PROJECT_CONFIG_FILE_NAME = exports.DEFAULT_PROFILE = exports.SYSTEM_CONFIG_DIR_PATH = void 0;
3
+ exports.DEFAULT_PROFILE = exports.SYSTEM_CONFIG_DIR_PATH = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const node_os_1 = require("node:os");
6
6
  const path = tslib_1.__importStar(require("node:path"));
7
7
  exports.SYSTEM_CONFIG_DIR_PATH = path.resolve((0, node_os_1.homedir)(), '.paragon');
8
8
  exports.DEFAULT_PROFILE = 'default';
9
- exports.PROJECT_CONFIG_FILE_NAME = 'project.json';
10
9
  //# sourceMappingURL=config.constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.constants.js","sourceRoot":"","sources":["../../src/config/config.constants.ts"],"names":[],"mappings":";;;;AAAA,qCAAkC;AAClC,wDAAkC;AAKrB,QAAA,sBAAsB,GAAW,IAAI,CAAC,OAAO,CACxD,IAAA,iBAAO,GAAE,EACT,UAAU,CACX,CAAC;AAKW,QAAA,eAAe,GAAW,SAAS,CAAC;AAKpC,QAAA,wBAAwB,GAAW,cAAc,CAAC"}
1
+ {"version":3,"file":"config.constants.js","sourceRoot":"","sources":["../../src/config/config.constants.ts"],"names":[],"mappings":";;;;AAAA,qCAAkC;AAClC,wDAAkC;AAKrB,QAAA,sBAAsB,GAAW,IAAI,CAAC,OAAO,CACxD,IAAA,iBAAO,GAAE,EACT,UAAU,CACX,CAAC;AAKW,QAAA,eAAe,GAAW,SAAS,CAAC"}