@mindline/sync 1.0.92 → 1.0.95
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/.vs/VSWorkspaceState.json +1 -1
- package/.vs/slnx.sqlite +0 -0
- package/.vs/sync/CopilotIndices/17.14.260.54502/CodeChunks.db +0 -0
- package/.vs/sync/CopilotIndices/17.14.260.54502/SemanticSymbols.db +0 -0
- package/.vs/sync/FileContentIndex/2ba49e62-100e-498d-ab09-f417d49a9725.vsidx +0 -0
- package/.vs/sync/FileContentIndex/49e6f471-0ac6-4a06-8312-e820e7fac4c6.vsidx +0 -0
- package/.vs/sync/FileContentIndex/e0a3e09d-eab1-4de8-a273-cbf145b692b7.vsidx +0 -0
- package/.vs/sync/FileContentIndex/fbdc1c8b-cd95-4f09-8525-d6d1db68192f.vsidx +0 -0
- package/.vs/sync/v17/.wsuo +0 -0
- package/.vs/sync/v17/DocumentLayout.backup.json +89 -41
- package/.vs/sync/v17/DocumentLayout.json +101 -4
- package/dist/index.d.ts +2 -348
- package/dist/src/index.d.ts +349 -0
- package/dist/sync.es.js +42 -36
- package/dist/sync.es.js.map +1 -1
- package/dist/sync.umd.js +2 -2
- package/dist/sync.umd.js.map +1 -1
- package/index.test.ts +1 -1
- package/package.json +3 -2
- package/src/index.d.ts +1 -0
- package/src/index.ts +13 -8
- package/tsconfig.json +1 -1
- package/vite.config.ts +24 -1
- package/.vs/sync/FileContentIndex/11f04bb9-c8c3-49b8-b9b0-23b59361ea60.vsidx +0 -0
- package/.vs/sync/FileContentIndex/32415761-521c-4586-b2be-358aa800c295.vsidx +0 -0
- package/.vs/sync/FileContentIndex/5f0eff90-00ed-4490-92bb-d2c0bedd89b6.vsidx +0 -0
- package/.vs/sync/FileContentIndex/cb5cf66e-d79f-4452-9b8b-b759f711e4af.vsidx +0 -0
- /package/.vs/sync/FileContentIndex/{fee90bf7-9f86-4fc9-a06e-ccbbe7777bfe.vsidx → 29a49992-9853-4bc2-be0a-3c72e0dd42f6.vsidx} +0 -0
- /package/dist/{actors.json.d.ts → src/actors.json.d.ts} +0 -0
- /package/dist/{configs.json.d.ts → src/configs.json.d.ts} +0 -0
- /package/dist/{resources.json.d.ts → src/resources.json.d.ts} +0 -0
- /package/dist/{syncmilestones.json.d.ts → src/syncmilestones.json.d.ts} +0 -0
- /package/dist/{tenants.json.d.ts → src/tenants.json.d.ts} +0 -0
- /package/dist/{users.json.d.ts → src/users.json.d.ts} +0 -0
- /package/dist/{workspaces.json.d.ts → src/workspaces.json.d.ts} +0 -0
package/index.test.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindline/sync",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.95",
|
|
4
4
|
"description": "sync is a node.js package encapsulating JavaScript classes required for configuring Mindline sync service.",
|
|
5
5
|
"main": "dist/sync.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,11 +16,12 @@
|
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"type": "module",
|
|
18
18
|
"devDependencies": {
|
|
19
|
+
"@rollup/plugin-strip": "^3.0.4",
|
|
19
20
|
"@types/react": "^18.0.0",
|
|
20
21
|
"@types/react-dom": "^18.0.0",
|
|
21
22
|
"typescript": "^5.0.0",
|
|
22
23
|
"vite": "^6.2.5",
|
|
23
|
-
"vitest": "3.
|
|
24
|
+
"vitest": "3.1.1",
|
|
24
25
|
"@vitejs/plugin-react": "^4.3.4",
|
|
25
26
|
"vite-plugin-dts": "^4.5.3"
|
|
26
27
|
},
|
package/src/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { IPublicClientApplication } from "@azure/msal-browser";
|
|
|
2
2
|
declare module "@mindline/sync" {
|
|
3
3
|
export function sum(a: number, b: number): number;
|
|
4
4
|
export function helloNpm(): string;
|
|
5
|
+
export function getSyncVersion(): string;
|
|
5
6
|
|
|
6
7
|
export class APIResult {
|
|
7
8
|
result: boolean;
|
package/src/index.ts
CHANGED
|
@@ -3,7 +3,6 @@ import * as signalR from "@microsoft/signalr"
|
|
|
3
3
|
import { AccountInfo } from "@azure/msal-common";
|
|
4
4
|
import { IPublicClientApplication, AuthenticationResult } from "@azure/msal-browser"
|
|
5
5
|
import { deserializeArray } from 'class-transformer';
|
|
6
|
-
import { version } from '../package.json';
|
|
7
6
|
import users from "./users.json";
|
|
8
7
|
import tenants from "./tenants.json";
|
|
9
8
|
import configs from "./configs.json";
|
|
@@ -21,13 +20,18 @@ export function helloNpm(): string {
|
|
|
21
20
|
return "hello NPM";
|
|
22
21
|
}
|
|
23
22
|
// main application exports
|
|
23
|
+
declare const __SYNC_VERSION__: string
|
|
24
|
+
export function getSyncVersion(): string {
|
|
25
|
+
// injected at build time
|
|
26
|
+
return __SYNC_VERSION__;
|
|
27
|
+
}
|
|
24
28
|
export class APIResult {
|
|
25
29
|
result: boolean;
|
|
26
30
|
status: number;
|
|
27
31
|
error: string;
|
|
28
32
|
version: string;
|
|
29
33
|
array: Array<Object> | null;
|
|
30
|
-
constructor() { this.result = true; this.status = 200; this.error = ""; this.version =
|
|
34
|
+
constructor() { this.result = true; this.status = 200; this.error = ""; this.version = getSyncVersion(); this.array = null; }
|
|
31
35
|
}
|
|
32
36
|
export class azureConfig {
|
|
33
37
|
// azure graph REST API endpoints
|
|
@@ -318,7 +322,7 @@ function storageAvailable() {
|
|
|
318
322
|
}
|
|
319
323
|
}
|
|
320
324
|
export class InitInfo {
|
|
321
|
-
version: string =
|
|
325
|
+
version: string = getSyncVersion();
|
|
322
326
|
tab: number = 0;
|
|
323
327
|
us: User[] = [];
|
|
324
328
|
ts: Tenant[] = [];
|
|
@@ -351,7 +355,7 @@ export class InitInfo {
|
|
|
351
355
|
}
|
|
352
356
|
// if storage unavailable or we were just asked to clear, read defaults to enable usable UI
|
|
353
357
|
this.tab = 0;
|
|
354
|
-
this.version =
|
|
358
|
+
this.version = getSyncVersion();
|
|
355
359
|
this.configlevelconsent_configid = "";
|
|
356
360
|
this.configlevelconsent_access = TenantConfigType.sourcetarget;
|
|
357
361
|
var usersString = JSON.stringify(users);
|
|
@@ -420,7 +424,7 @@ export class InitInfo {
|
|
|
420
424
|
}
|
|
421
425
|
#initFromObjects(ii: InitInfo): void {
|
|
422
426
|
this.tab = ii.tab;
|
|
423
|
-
this.version =
|
|
427
|
+
this.version = getSyncVersion();
|
|
424
428
|
this.configlevelconsent_configid = ii.configlevelconsent_configid;
|
|
425
429
|
this.configlevelconsent_access = ii.configlevelconsent_access;
|
|
426
430
|
if (typeof ii.us === "undefined") {
|
|
@@ -2110,7 +2114,7 @@ export async function initGet(instance: IPublicClientApplication, user: User, ii
|
|
|
2110
2114
|
result = await workspaceInfoGet(instance, user, ii, debug);
|
|
2111
2115
|
tasks.setTaskEnd("GET workspaces", new Date(), result.result ? "complete" : "failed");
|
|
2112
2116
|
}
|
|
2113
|
-
console.log("initGet complete. Version: " +
|
|
2117
|
+
console.log("initGet complete. Version: " + getSyncVersion());
|
|
2114
2118
|
return result;
|
|
2115
2119
|
}
|
|
2116
2120
|
else {
|
|
@@ -2298,7 +2302,7 @@ async function workspaceInfoGet(instance: IPublicClientApplication, user: User,
|
|
|
2298
2302
|
try {
|
|
2299
2303
|
result = await workspacesGet(instance, user, debug);
|
|
2300
2304
|
if (result.result) {
|
|
2301
|
-
for (let o of result.array! as
|
|
2305
|
+
for (let o of result.array! as any[]) {
|
|
2302
2306
|
// are we already tracking this workspace?
|
|
2303
2307
|
let workspace: Workspace | null | undefined = null;
|
|
2304
2308
|
let wsIndex = ii.ws.findIndex((w) => w.id === o.id);
|
|
@@ -2347,7 +2351,8 @@ async function workspaceInfoGet(instance: IPublicClientApplication, user: User,
|
|
|
2347
2351
|
// set id and name based on returned data
|
|
2348
2352
|
workspace!.id = o.id;
|
|
2349
2353
|
workspace!.name = o.name;
|
|
2350
|
-
|
|
2354
|
+
debugger;
|
|
2355
|
+
workspace!.ownerid = o.workspaceOwnerUserId;
|
|
2351
2356
|
// parallel GET admins, tenants, configs associated with this workspace
|
|
2352
2357
|
let adminsPromise: Promise<APIResult> = adminsGet(instance, user, workspace!.id, debug);
|
|
2353
2358
|
let tenantsPromise: Promise<APIResult> = tenantsGet(instance, user, workspace!.id, debug);
|
package/tsconfig.json
CHANGED
package/vite.config.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { defineConfig } from 'vite'
|
|
1
|
+
import { defineConfig, Plugin } from 'vite'
|
|
2
|
+
import pkg from './package.json'
|
|
2
3
|
import react from '@vitejs/plugin-react'
|
|
3
4
|
import dts from 'vite-plugin-dts'
|
|
5
|
+
import strip from '@rollup/plugin-strip'
|
|
4
6
|
|
|
5
7
|
export default defineConfig({
|
|
8
|
+
define: {
|
|
9
|
+
__SYNC_VERSION__: JSON.stringify(pkg.version)
|
|
10
|
+
},
|
|
6
11
|
build: {
|
|
7
12
|
lib: {
|
|
8
13
|
entry: 'src/index.ts',
|
|
@@ -18,6 +23,24 @@ export default defineConfig({
|
|
|
18
23
|
'class-transformer',
|
|
19
24
|
'react',
|
|
20
25
|
'react-dom'
|
|
26
|
+
],
|
|
27
|
+
output: {
|
|
28
|
+
// tell Rollup what global variable each external corresponds to
|
|
29
|
+
globals: {
|
|
30
|
+
'@microsoft/signalr': 'signalR',
|
|
31
|
+
'class-transformer': 'classTransformer',
|
|
32
|
+
'react': 'React',
|
|
33
|
+
'react-dom': 'ReactDOM'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
plugins: [
|
|
37
|
+
// run this early to remove PURE annotations
|
|
38
|
+
strip({
|
|
39
|
+
include: 'node_modules/@microsoft/signalr/**',
|
|
40
|
+
comments: false,
|
|
41
|
+
functions: [], // leave functions intact
|
|
42
|
+
sourceMap: false
|
|
43
|
+
})
|
|
21
44
|
]
|
|
22
45
|
}
|
|
23
46
|
},
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|