@docupace/pipeline 1.0.39-newrelease.12 → 1.0.39-newrelease.14

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.
@@ -0,0 +1,58 @@
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ ENV=$1
5
+
6
+ if [ -z "$ENV" ]; then
7
+ echo "Usage: $0 <environment>"
8
+ exit 1
9
+ fi
10
+
11
+ TENANT_ID="docupace.onmicrosoft.com"
12
+ CLIENT_ID=$ARM_CLIENT_ID
13
+ CLIENT_SECRET=$ARM_CLIENT_SECRET
14
+ NEW_REDIRECT="https://docupace-$ENV-$SITE_NAME.us.auth0.com/login/callback"
15
+ APP_ID="auth0-$ENV-docupace"
16
+ APP_SCOPE="https://graph.microsoft.com/.default"
17
+ GRAPH_API="https://graph.microsoft.com/v1.0"
18
+
19
+ ACCESS_TOKEN=$(curl -s -X POST \
20
+ -H "Content-Type: application/x-www-form-urlencoded" \
21
+ -d "grant_type=client_credentials&client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET&scope=$APP_SCOPE" \
22
+ https://login.microsoftonline.com/$TENANT_ID/oauth2/v2.0/token | jq -r '.access_token')
23
+
24
+ APP_DETAILS=$(curl -s -G "https://graph.microsoft.com/v1.0/applications" \
25
+ -H "Authorization: Bearer $ACCESS_TOKEN" \
26
+ -H "Content-Type: application/json" \
27
+ --data-urlencode "\$filter=appId eq '$CLIENT_ID'")
28
+
29
+ APP_ID=$(echo "$APP_DETAILS" | jq -r '.value[0].id')
30
+ echo "Application ID: $APP_ID"
31
+
32
+ CURRENT_REDIRECTS=$(echo "$APP_DETAILS" | jq -r '.value[0].web.redirectUris // []')
33
+ echo "Current redirect URIs: $CURRENT_REDIRECTS"
34
+
35
+ if echo "$CURRENT_REDIRECTS" | jq -e --arg uri "$NEW_REDIRECT" 'index($uri)' > /dev/null; then
36
+ echo "Redirect URI '$NEW_REDIRECT' already exists. No update needed."
37
+ else
38
+ UPDATED_REDIRECTS=$(echo "$CURRENT_REDIRECTS" | jq --arg uri "$NEW_REDIRECT" '. + [$uri]')
39
+ echo "Updated redirect URIs: $UPDATED_REDIRECTS"
40
+
41
+ UPDATE_REDIRECTS=$(curl -fs -X PATCH \
42
+ -H "Authorization: Bearer $ACCESS_TOKEN" \
43
+ -H "Content-Type: application/json" \
44
+ -d "{
45
+ \"web\": {
46
+ \"redirectUris\": $UPDATED_REDIRECTS
47
+ }
48
+ }" \
49
+ "https://graph.microsoft.com/v1.0/applications/$APP_ID")
50
+
51
+ if [ $? -eq 0 ]; then
52
+ echo "Successfully updated redirect URIs"
53
+ echo $UPDATE_REDIRECTS
54
+ else
55
+ echo "Failed to update redirect URIs"
56
+ echo $UPDATE_REDIRECTS
57
+ fi
58
+ fi
package/eslint.config.js CHANGED
@@ -10,7 +10,7 @@ export default [
10
10
  globals: {
11
11
  ...globals.browser,
12
12
  ...globals.node, // Add Node.js globals
13
- },
13
+ },g
14
14
  },
15
15
  },
16
16
  pluginJs.configs.recommended,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docupace/pipeline",
3
- "version": "1.0.39-newrelease.12",
3
+ "version": "1.0.39-newrelease.14",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/src/auth0/cli.js CHANGED
@@ -15,7 +15,7 @@ const program = new Command();
15
15
 
16
16
  program
17
17
  .command(
18
- 'configureFromSite <fromSite> <toSite> <fromEnv> <toEnv> <deployUI> <deployGraphQLServer> <useNewDomain> <useS3>',
18
+ 'configureFromSite <fromSite> <toSite> <fromEnv> <toEnv> <deployUI> <deployGraphQLServer> <useNewDomain> <useS3Ui> <deployCCUI> <useS3Gq> ',
19
19
  )
20
20
  .description('Configure the Auth0 tenants in env for the given site')
21
21
  .action(
@@ -27,7 +27,9 @@ program
27
27
  deployUI,
28
28
  deployGraphQLServer,
29
29
  useNewDomain,
30
- useS3,
30
+ useS3Ui,
31
+ deployCCUI,
32
+ useS3Gq,
31
33
  ) => {
32
34
  await configureFromSite(
33
35
  fromSite,
@@ -37,7 +39,9 @@ program
37
39
  deployUI,
38
40
  deployGraphQLServer,
39
41
  useNewDomain,
40
- useS3 === 'true' || useS3 === true,
42
+ useS3Ui === 'true' || useS3Ui === true,
43
+ deployCCUI,
44
+ useS3Gq === 'true' || useS3Gq === true,
41
45
  );
42
46
  },
43
47
  );