@mindline/sync 1.0.63 → 1.0.64

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.
@@ -2,6 +2,5 @@
2
2
  "ExpandedNodes": [
3
3
  ""
4
4
  ],
5
- "SelectedNode": "\\configs.json",
6
5
  "PreviewInSolutionExplorer": false
7
6
  }
package/.vs/slnx.sqlite CHANGED
Binary file
Binary file
@@ -0,0 +1,55 @@
1
+ {
2
+ "Version": 1,
3
+ "WorkspaceRootPath": "C:\\Users\\ArvindSuthar\\source\\repos\\front\\sync\\",
4
+ "Documents": [],
5
+ "DocumentGroupContainers": [
6
+ {
7
+ "Orientation": 0,
8
+ "VerticalTabListWidth": 256,
9
+ "DocumentGroups": [
10
+ {
11
+ "DockedWidth": 200,
12
+ "SelectedChildIndex": -1,
13
+ "Children": [
14
+ {
15
+ "$type": "Bookmark",
16
+ "Name": "ST:0:0:{e506b91c-c606-466a-90a9-123d1d1e12b3}"
17
+ },
18
+ {
19
+ "$type": "Bookmark",
20
+ "Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
21
+ },
22
+ {
23
+ "$type": "Bookmark",
24
+ "Name": "ST:129:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
25
+ },
26
+ {
27
+ "$type": "Bookmark",
28
+ "Name": "ST:131:0:{75188d03-9892-4ae2-abf1-207126247ce5}"
29
+ },
30
+ {
31
+ "$type": "Bookmark",
32
+ "Name": "ST:130:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
33
+ },
34
+ {
35
+ "$type": "Bookmark",
36
+ "Name": "ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}"
37
+ },
38
+ {
39
+ "$type": "Bookmark",
40
+ "Name": "ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}"
41
+ },
42
+ {
43
+ "$type": "Bookmark",
44
+ "Name": "ST:1:0:{d212f56b-c48a-434c-a121-1c5d80b59b9f}"
45
+ },
46
+ {
47
+ "$type": "Bookmark",
48
+ "Name": "ST:0:0:{633c14d1-94e6-4de0-b649-bde18d3de13d}"
49
+ }
50
+ ]
51
+ }
52
+ ]
53
+ }
54
+ ]
55
+ }
package/index.ts CHANGED
@@ -1365,8 +1365,19 @@ export async function signIn(user: User, tasks: TaskArray): Promise<boolean> {
1365
1365
  window.location.assign(urlUS.href);
1366
1366
  return true;
1367
1367
  case graphConfig.authorityCN:
1368
- // unsupported
1369
- break;
1368
+ // retrieve controller protected by USGov authorization
1369
+ let chinaURL: string = window.location.href;
1370
+ chinaURL += "China";
1371
+ let urlChina: URL = new URL(chinaURL);
1372
+ urlChina.searchParams.append("redirectUri", window.location.origin);
1373
+ urlChina.searchParams.append("domainHint", user.companyDomain);
1374
+ if (user.oid !== "1") {
1375
+ urlChina.searchParams.append("loginHint", user.mail);
1376
+ }
1377
+ tasks.setTaskStart("initialization", new Date());
1378
+ tasks.setTaskStart("authenticate user", new Date());
1379
+ window.location.assign(urlChina.href);
1380
+ return true;
1370
1381
  default:
1371
1382
  // unknown authority
1372
1383
  debugger;
@@ -1564,11 +1575,16 @@ export async function tenantUnauthenticatedLookup(tenant: Tenant, debug: boolean
1564
1575
  if (data) {
1565
1576
  // store tenant ID and authority
1566
1577
  var tenantAuthEndpoint = data.authorization_endpoint;
1567
- var authMatches = tenantAuthEndpoint.match(regexes[j]);
1568
- tenant.tid = authMatches[2];
1569
- tenant.authority = authMatches[1]; // USGov tenants are registered in WW with USGov authority values!
1570
- console.log(`Successful GET from openid well-known endpoint: tid: ${tenant.tid} authority: ${tenant.authority}`);
1571
- return true; // success, need UX to re-render
1578
+ // USGov/China tenants are registered in WW with USGov/China authority values!
1579
+ for (let k = 0; k < 3; k++) {
1580
+ var authMatches = tenantAuthEndpoint.match(regexes[k]);
1581
+ if (authMatches != null) {
1582
+ tenant.tid = authMatches[2];
1583
+ tenant.authority = authMatches[1];
1584
+ console.log(`Successful GET from openid well-known endpoint: tid: ${tenant.tid} authority: ${tenant.authority}`);
1585
+ return true; // success, need UX to re-render
1586
+ }
1587
+ }
1572
1588
  }
1573
1589
  else {
1574
1590
  console.log(`Failed JSON parse of openid well-known endpoint response ${openidEndpoint}.`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mindline/sync",
3
3
  "type": "module",
4
- "version": "1.0.63",
4
+ "version": "1.0.64",
5
5
  "types": "index.d.ts",
6
6
  "exports": "./index.ts",
7
7
  "description": "sync is a node.js package encapsulating javscript classes required for configuring Mindline sync service.",
package/tsconfig.json CHANGED
@@ -1,27 +1,27 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ESNext",
4
- "lib": [ "DOM", "DOM.Iterable", "ESNext" ],
5
- "types": [ "vite/client", "vite-plugin-svgr/client", "node", "jest" ],
6
- "allowJs": false,
7
- "skipLibCheck": false,
8
- "esModuleInterop": false,
9
- "allowSyntheticDefaultImports": true,
10
- "forceConsistentCasingInFileNames": true,
11
- "module": "esnext",
12
- "moduleResolution": "node",
13
- "resolveJsonModule": true,
14
- "isolatedModules": true,
15
- "noEmit": true,
16
- "jsx": "react-jsx",
17
- "composite": false,
18
-
19
- /* Linting */
20
- "strict": true,
21
- "noUnusedLocals": true,
22
- "noUnusedParameters": true,
23
- "noFallthroughCasesInSwitch": true
24
- },
25
- "include": ["src"],
26
- "references": [{ "path": "./tsconfig.node.json" }]
27
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "lib": [ "DOM", "DOM.Iterable", "ESNext" ],
5
+ "types": [ "vite/client", "vite-plugin-svgr/client", "node", "jest" ],
6
+ "allowJs": false,
7
+ "skipLibCheck": false,
8
+ "esModuleInterop": false,
9
+ "allowSyntheticDefaultImports": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "module": "esnext",
12
+ "moduleResolution": "node",
13
+ "resolveJsonModule": true,
14
+ "isolatedModules": true,
15
+ "noEmit": true,
16
+ "jsx": "react-jsx",
17
+ "composite": false,
18
+
19
+ /* Linting */
20
+ "strict": true,
21
+ "noUnusedLocals": true,
22
+ "noUnusedParameters": true,
23
+ "noFallthroughCasesInSwitch": true
24
+ },
25
+ "include": ["src"],
26
+ "references": [{ "path": "./tsconfig.node.json" }]
27
+ }
@@ -1,9 +1,9 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "skipLibCheck": true,
5
- "module": "ESNext",
6
- "moduleResolution": "node",
7
- "allowSyntheticDefaultImports": true
8
- }
9
- }
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "skipLibCheck": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "node",
7
+ "allowSyntheticDefaultImports": true
8
+ }
9
+ }
@@ -1,3 +0,0 @@
1
- {
2
- "CurrentProjectSetting": null
3
- }