@docupace/pipeline 1.0.16 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docupace/pipeline",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -159,6 +159,8 @@ async function templateAuth0(siteUrl, coreApiContext, env, filePaths, deployUI,
159
159
  uiAllowedLogoutUrls;
160
160
  let graphqlAllowedCallbacksUrls,
161
161
  graphqlAllowedLogoutUrls;
162
+ let connectAllowedCallbacksUrls,
163
+ connectlAllowedLogoutUrls;
162
164
 
163
165
  // Configure URLs based on environment
164
166
  if (env === 'prd') {
@@ -170,8 +172,6 @@ async function templateAuth0(siteUrl, coreApiContext, env, filePaths, deployUI,
170
172
 
171
173
  connectAllowedCallbacksUrls = [`${siteUrl}/connect/samlCallback?client_name=auth0`];
172
174
  connectlAllowedLogoutUrls = [ `${siteUrl}/connect`];
173
-
174
-
175
175
  } else {
176
176
  uiAllowedCallbacksUrls = [
177
177
  `${siteUrl}/api/auth/callback`,
@@ -181,7 +181,6 @@ async function templateAuth0(siteUrl, coreApiContext, env, filePaths, deployUI,
181
181
  `${siteUrl}`,
182
182
  `http://localhost:3000`,
183
183
  ];
184
-
185
184
  graphqlAllowedCallbacksUrls = [
186
185
  `${siteUrl}/api/graphql/callback`,
187
186
  `http://localhost:4000/api/graphql/callback`,
@@ -190,7 +189,6 @@ async function templateAuth0(siteUrl, coreApiContext, env, filePaths, deployUI,
190
189
  `http://localhost:4000/api/graphql/`,
191
190
  `${siteUrl}/api/graphql/`,
192
191
  ];
193
-
194
192
  connectAllowedCallbacksUrls = [
195
193
  `${siteUrl}/connect/samlCallback?client_name=auth0`,
196
194
  `http://localhost:9000/connect/samlCallback?client_name=auth0`,
@@ -198,8 +196,6 @@ async function templateAuth0(siteUrl, coreApiContext, env, filePaths, deployUI,
198
196
  connectlAllowedLogoutUrls = [
199
197
  `${siteUrl}/connect`
200
198
  ];
201
-
202
-
203
199
  }
204
200
 
205
201
  const configureUI = deployUI === 'true';
@@ -214,11 +210,11 @@ async function templateAuth0(siteUrl, coreApiContext, env, filePaths, deployUI,
214
210
 
215
211
  //TODO: move to separate function for connect
216
212
  console.log('connect_allowed_callbacks_urls ->', connectAllowedCallbacksUrls);
217
- console.log('connect_allowed_logout_urls ->', connectAllowedLogoutUrls);
213
+ console.log('connect_allowed_logout_urls ->', connectlAllowedLogoutUrls);
218
214
 
219
215
  await updateJsonFile(filePaths.connectJson, {
220
216
  callbacks: connectAllowedCallbacksUrls,
221
- allowed_logout_urls: connectAllowedLogoutUrls,
217
+ allowed_logout_urls: connectlAllowedLogoutUrls,
222
218
  });
223
219
 
224
220
  console.log('Updated URLs for main UI...');
@@ -257,9 +253,10 @@ async function templateAuth0(siteUrl, coreApiContext, env, filePaths, deployUI,
257
253
 
258
254
  console.log('TWILIO configuration updated...');
259
255
 
256
+ const tmpSiteUrl = siteUrl.replace(/^https?:\/\//, '');
260
257
  // Database configuration
261
258
  await replaceInFile(filePaths.databaseLoginJs, [
262
- ['${docupaceHost}', siteUrl],
259
+ ['${docupaceHost}', tmpSiteUrl],
263
260
  ['${docupaceContext}', coreApiContext],
264
261
  ]);
265
262
 
@@ -274,7 +271,8 @@ async function templateAuth0(siteUrl, coreApiContext, env, filePaths, deployUI,
274
271
 
275
272
  console.log('Template configuration completed.');
276
273
  } catch (err) {
277
- console.error('Error configuring Auth0 templates:', err);
274
+ // console.error('Error configuring Auth0 templates:', err);
275
+ throw err;
278
276
  }
279
277
  }
280
278
 
@@ -574,7 +572,6 @@ export async function configureFromSite(fromSite, toSite, fromEnv,toEnv, deployU
574
572
  repoPathToEnv = await cloneEnvRepository(toEnv);
575
573
  }
576
574
 
577
-
578
575
  //TODO: clone fromEnv and toEnv. replace above with this
579
576
 
580
577
  const auth0RepoPath = await cloneRepository('auth0-site-setup');
@@ -583,7 +580,7 @@ export async function configureFromSite(fromSite, toSite, fromEnv,toEnv, deployU
583
580
  const { deployConfig: deployUIConfig } = await readDeployConfig('ui', fromEnv, fromSite, 'values');
584
581
  const uiImageTag = deployUIConfig.image.tag;
585
582
 
586
- const { deployConfig: deployGraphQLServerConfig} = await readDeployConfig('graphql-server', fromEnv, fromSite, 'values');
583
+ const { deployConfig: deployGraphQLServerConfig } = await readDeployConfig('graphql-server', fromEnv, fromSite, 'values');
587
584
  const graphqlImageTag = deployGraphQLServerConfig.image.tag;
588
585
  const graphqlStandardConfigRemoteBranch = deployGraphQLServerConfig.graphqlServer.standardConfigRemoteBranch;
589
586
 
@@ -647,4 +644,4 @@ export async function configureFromSite(fromSite, toSite, fromEnv,toEnv, deployU
647
644
  auth0AuthToken: auth0Token,
648
645
  coreApiIdentifier: commonSecrets.CORE_API_IDENTIFIER
649
646
  })
650
- }
647
+ }