@fluidframework/tool-utils 2.0.0-dev.7.3.0.211848 → 2.0.0-dev.7.4.0.214930
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/CHANGELOG.md +4 -0
- package/api-extractor.json +9 -2
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/tool-utils-alpha.d.ts +92 -0
- package/dist/tool-utils-beta.d.ts +92 -0
- package/dist/tool-utils-public.d.ts +92 -0
- package/dist/tool-utils-untrimmed.d.ts +92 -0
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/tool-utils-alpha.d.ts +92 -0
- package/lib/tool-utils-beta.d.ts +92 -0
- package/lib/tool-utils-public.d.ts +92 -0
- package/lib/tool-utils-untrimmed.d.ts +92 -0
- package/package.json +26 -10
- package/src/packageVersion.ts +1 -1
package/CHANGELOG.md
CHANGED
package/api-extractor.json
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-base.json",
|
|
4
4
|
"messages": {
|
|
5
5
|
"extractorMessageReporting": {
|
|
6
|
+
// TODO: Fix violations and remove this rule override
|
|
6
7
|
"ae-missing-release-tag": {
|
|
7
|
-
|
|
8
|
+
"logLevel": "none"
|
|
9
|
+
},
|
|
10
|
+
// TODO: Add missing documentation and remove this rule override
|
|
11
|
+
"ae-undocumented": {
|
|
8
12
|
"logLevel": "none"
|
|
9
13
|
}
|
|
10
14
|
}
|
|
15
|
+
},
|
|
16
|
+
"dtsRollup": {
|
|
17
|
+
"enabled": true
|
|
11
18
|
}
|
|
12
19
|
}
|
package/dist/packageVersion.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export declare const pkgName = "@fluidframework/tool-utils";
|
|
8
|
-
export declare const pkgVersion = "2.0.0-dev.7.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-dev.7.4.0.214930";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/dist/packageVersion.js
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.pkgVersion = exports.pkgName = void 0;
|
|
10
10
|
exports.pkgName = "@fluidframework/tool-utils";
|
|
11
|
-
exports.pkgVersion = "2.0.0-dev.7.
|
|
11
|
+
exports.pkgVersion = "2.0.0-dev.7.4.0.214930";
|
|
12
12
|
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,4BAA4B,CAAC;AACvC,QAAA,UAAU,GAAG,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/tool-utils\";\nexport const pkgVersion = \"2.0.0-dev.7.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,4BAA4B,CAAC;AACvC,QAAA,UAAU,GAAG,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/tool-utils\";\nexport const pkgVersion = \"2.0.0-dev.7.4.0.214930\";\n"]}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { IClientConfig } from '@fluidframework/odsp-doclib-utils';
|
|
2
|
+
import { IOdspTokens } from '@fluidframework/odsp-doclib-utils';
|
|
3
|
+
import { ITree } from '@fluidframework/protocol-definitions';
|
|
4
|
+
|
|
5
|
+
/** The prefix that all GC blob names start with. */
|
|
6
|
+
export declare const gcBlobPrefix = "__gc";
|
|
7
|
+
|
|
8
|
+
export declare const getMicrosoftConfiguration: () => IClientConfig;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Helper function that normalizes the given snapshot tree. It sorts objects and arrays in the snapshot. It also
|
|
12
|
+
* normalizes certain blob contents for which the order of content does not matter. For example, garbage collection
|
|
13
|
+
* blobs contains objects / arrays whose element order do not matter.
|
|
14
|
+
* @param snapshot - The snapshot tree to normalize.
|
|
15
|
+
* @param config - Configs to use when normalizing snapshot. For example, it can contain paths of blobs whose contents
|
|
16
|
+
* should be normalized as well.
|
|
17
|
+
* @returns a copy of the normalized snapshot tree.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getNormalizedSnapshot(snapshot: ITree, config?: ISnapshotNormalizerConfig): ITree;
|
|
20
|
+
|
|
21
|
+
export declare interface IAsyncCache<TKey, TValue> {
|
|
22
|
+
get(key: TKey): Promise<TValue | undefined>;
|
|
23
|
+
save(key: TKey, value: TValue): Promise<void>;
|
|
24
|
+
lock<T>(callback: () => Promise<T>): Promise<T>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export declare interface IOdspTokenManagerCacheKey {
|
|
28
|
+
readonly isPush: boolean;
|
|
29
|
+
readonly userOrServer: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare interface IResources {
|
|
33
|
+
tokens?: {
|
|
34
|
+
version?: number;
|
|
35
|
+
data: {
|
|
36
|
+
[key: string]: {
|
|
37
|
+
storage?: IOdspTokens;
|
|
38
|
+
push?: IOdspTokens;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export declare interface ISnapshotNormalizerConfig {
|
|
45
|
+
blobsToNormalize?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* channel types who's content (non-attribute) blobs will be excluded.
|
|
48
|
+
* this is used to exclude the content of channels who's content cannot be compared
|
|
49
|
+
* as the content is non-deterministic between snapshot at the same sequence number.
|
|
50
|
+
*/
|
|
51
|
+
excludedChannelContentTypes?: string[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export declare function loadRC(): Promise<IResources>;
|
|
55
|
+
|
|
56
|
+
export declare function lockRC(): Promise<any>;
|
|
57
|
+
|
|
58
|
+
export declare type OdspTokenConfig = {
|
|
59
|
+
type: "password";
|
|
60
|
+
username: string;
|
|
61
|
+
password: string;
|
|
62
|
+
} | {
|
|
63
|
+
type: "browserLogin";
|
|
64
|
+
navigator: (url: string) => void;
|
|
65
|
+
redirectUriCallback?: (tokens: IOdspTokens) => Promise<string>;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export declare class OdspTokenManager {
|
|
69
|
+
private readonly tokenCache?;
|
|
70
|
+
private readonly storageCache;
|
|
71
|
+
private readonly pushCache;
|
|
72
|
+
private readonly cacheMutex;
|
|
73
|
+
constructor(tokenCache?: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens> | undefined);
|
|
74
|
+
updateTokensCache(key: IOdspTokenManagerCacheKey, value: IOdspTokens): Promise<void>;
|
|
75
|
+
private updateTokensCacheWithoutLock;
|
|
76
|
+
getOdspTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;
|
|
77
|
+
getPushTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;
|
|
78
|
+
private getTokenFromCache;
|
|
79
|
+
private static getCacheKey;
|
|
80
|
+
private getTokens;
|
|
81
|
+
private getTokensCore;
|
|
82
|
+
private acquireTokensWithPassword;
|
|
83
|
+
private acquireTokensViaBrowserLogin;
|
|
84
|
+
private onTokenRetrievalFromCache;
|
|
85
|
+
private extractAuthorizationCode;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export declare const odspTokensCache: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens>;
|
|
89
|
+
|
|
90
|
+
export declare function saveRC(rc: IResources): Promise<void>;
|
|
91
|
+
|
|
92
|
+
export { }
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { IClientConfig } from '@fluidframework/odsp-doclib-utils';
|
|
2
|
+
import { IOdspTokens } from '@fluidframework/odsp-doclib-utils';
|
|
3
|
+
import { ITree } from '@fluidframework/protocol-definitions';
|
|
4
|
+
|
|
5
|
+
/** The prefix that all GC blob names start with. */
|
|
6
|
+
export declare const gcBlobPrefix = "__gc";
|
|
7
|
+
|
|
8
|
+
export declare const getMicrosoftConfiguration: () => IClientConfig;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Helper function that normalizes the given snapshot tree. It sorts objects and arrays in the snapshot. It also
|
|
12
|
+
* normalizes certain blob contents for which the order of content does not matter. For example, garbage collection
|
|
13
|
+
* blobs contains objects / arrays whose element order do not matter.
|
|
14
|
+
* @param snapshot - The snapshot tree to normalize.
|
|
15
|
+
* @param config - Configs to use when normalizing snapshot. For example, it can contain paths of blobs whose contents
|
|
16
|
+
* should be normalized as well.
|
|
17
|
+
* @returns a copy of the normalized snapshot tree.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getNormalizedSnapshot(snapshot: ITree, config?: ISnapshotNormalizerConfig): ITree;
|
|
20
|
+
|
|
21
|
+
export declare interface IAsyncCache<TKey, TValue> {
|
|
22
|
+
get(key: TKey): Promise<TValue | undefined>;
|
|
23
|
+
save(key: TKey, value: TValue): Promise<void>;
|
|
24
|
+
lock<T>(callback: () => Promise<T>): Promise<T>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export declare interface IOdspTokenManagerCacheKey {
|
|
28
|
+
readonly isPush: boolean;
|
|
29
|
+
readonly userOrServer: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare interface IResources {
|
|
33
|
+
tokens?: {
|
|
34
|
+
version?: number;
|
|
35
|
+
data: {
|
|
36
|
+
[key: string]: {
|
|
37
|
+
storage?: IOdspTokens;
|
|
38
|
+
push?: IOdspTokens;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export declare interface ISnapshotNormalizerConfig {
|
|
45
|
+
blobsToNormalize?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* channel types who's content (non-attribute) blobs will be excluded.
|
|
48
|
+
* this is used to exclude the content of channels who's content cannot be compared
|
|
49
|
+
* as the content is non-deterministic between snapshot at the same sequence number.
|
|
50
|
+
*/
|
|
51
|
+
excludedChannelContentTypes?: string[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export declare function loadRC(): Promise<IResources>;
|
|
55
|
+
|
|
56
|
+
export declare function lockRC(): Promise<any>;
|
|
57
|
+
|
|
58
|
+
export declare type OdspTokenConfig = {
|
|
59
|
+
type: "password";
|
|
60
|
+
username: string;
|
|
61
|
+
password: string;
|
|
62
|
+
} | {
|
|
63
|
+
type: "browserLogin";
|
|
64
|
+
navigator: (url: string) => void;
|
|
65
|
+
redirectUriCallback?: (tokens: IOdspTokens) => Promise<string>;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export declare class OdspTokenManager {
|
|
69
|
+
private readonly tokenCache?;
|
|
70
|
+
private readonly storageCache;
|
|
71
|
+
private readonly pushCache;
|
|
72
|
+
private readonly cacheMutex;
|
|
73
|
+
constructor(tokenCache?: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens> | undefined);
|
|
74
|
+
updateTokensCache(key: IOdspTokenManagerCacheKey, value: IOdspTokens): Promise<void>;
|
|
75
|
+
private updateTokensCacheWithoutLock;
|
|
76
|
+
getOdspTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;
|
|
77
|
+
getPushTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;
|
|
78
|
+
private getTokenFromCache;
|
|
79
|
+
private static getCacheKey;
|
|
80
|
+
private getTokens;
|
|
81
|
+
private getTokensCore;
|
|
82
|
+
private acquireTokensWithPassword;
|
|
83
|
+
private acquireTokensViaBrowserLogin;
|
|
84
|
+
private onTokenRetrievalFromCache;
|
|
85
|
+
private extractAuthorizationCode;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export declare const odspTokensCache: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens>;
|
|
89
|
+
|
|
90
|
+
export declare function saveRC(rc: IResources): Promise<void>;
|
|
91
|
+
|
|
92
|
+
export { }
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { IClientConfig } from '@fluidframework/odsp-doclib-utils';
|
|
2
|
+
import { IOdspTokens } from '@fluidframework/odsp-doclib-utils';
|
|
3
|
+
import { ITree } from '@fluidframework/protocol-definitions';
|
|
4
|
+
|
|
5
|
+
/** The prefix that all GC blob names start with. */
|
|
6
|
+
export declare const gcBlobPrefix = "__gc";
|
|
7
|
+
|
|
8
|
+
export declare const getMicrosoftConfiguration: () => IClientConfig;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Helper function that normalizes the given snapshot tree. It sorts objects and arrays in the snapshot. It also
|
|
12
|
+
* normalizes certain blob contents for which the order of content does not matter. For example, garbage collection
|
|
13
|
+
* blobs contains objects / arrays whose element order do not matter.
|
|
14
|
+
* @param snapshot - The snapshot tree to normalize.
|
|
15
|
+
* @param config - Configs to use when normalizing snapshot. For example, it can contain paths of blobs whose contents
|
|
16
|
+
* should be normalized as well.
|
|
17
|
+
* @returns a copy of the normalized snapshot tree.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getNormalizedSnapshot(snapshot: ITree, config?: ISnapshotNormalizerConfig): ITree;
|
|
20
|
+
|
|
21
|
+
export declare interface IAsyncCache<TKey, TValue> {
|
|
22
|
+
get(key: TKey): Promise<TValue | undefined>;
|
|
23
|
+
save(key: TKey, value: TValue): Promise<void>;
|
|
24
|
+
lock<T>(callback: () => Promise<T>): Promise<T>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export declare interface IOdspTokenManagerCacheKey {
|
|
28
|
+
readonly isPush: boolean;
|
|
29
|
+
readonly userOrServer: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare interface IResources {
|
|
33
|
+
tokens?: {
|
|
34
|
+
version?: number;
|
|
35
|
+
data: {
|
|
36
|
+
[key: string]: {
|
|
37
|
+
storage?: IOdspTokens;
|
|
38
|
+
push?: IOdspTokens;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export declare interface ISnapshotNormalizerConfig {
|
|
45
|
+
blobsToNormalize?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* channel types who's content (non-attribute) blobs will be excluded.
|
|
48
|
+
* this is used to exclude the content of channels who's content cannot be compared
|
|
49
|
+
* as the content is non-deterministic between snapshot at the same sequence number.
|
|
50
|
+
*/
|
|
51
|
+
excludedChannelContentTypes?: string[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export declare function loadRC(): Promise<IResources>;
|
|
55
|
+
|
|
56
|
+
export declare function lockRC(): Promise<any>;
|
|
57
|
+
|
|
58
|
+
export declare type OdspTokenConfig = {
|
|
59
|
+
type: "password";
|
|
60
|
+
username: string;
|
|
61
|
+
password: string;
|
|
62
|
+
} | {
|
|
63
|
+
type: "browserLogin";
|
|
64
|
+
navigator: (url: string) => void;
|
|
65
|
+
redirectUriCallback?: (tokens: IOdspTokens) => Promise<string>;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export declare class OdspTokenManager {
|
|
69
|
+
private readonly tokenCache?;
|
|
70
|
+
private readonly storageCache;
|
|
71
|
+
private readonly pushCache;
|
|
72
|
+
private readonly cacheMutex;
|
|
73
|
+
constructor(tokenCache?: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens> | undefined);
|
|
74
|
+
updateTokensCache(key: IOdspTokenManagerCacheKey, value: IOdspTokens): Promise<void>;
|
|
75
|
+
private updateTokensCacheWithoutLock;
|
|
76
|
+
getOdspTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;
|
|
77
|
+
getPushTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;
|
|
78
|
+
private getTokenFromCache;
|
|
79
|
+
private static getCacheKey;
|
|
80
|
+
private getTokens;
|
|
81
|
+
private getTokensCore;
|
|
82
|
+
private acquireTokensWithPassword;
|
|
83
|
+
private acquireTokensViaBrowserLogin;
|
|
84
|
+
private onTokenRetrievalFromCache;
|
|
85
|
+
private extractAuthorizationCode;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export declare const odspTokensCache: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens>;
|
|
89
|
+
|
|
90
|
+
export declare function saveRC(rc: IResources): Promise<void>;
|
|
91
|
+
|
|
92
|
+
export { }
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { IClientConfig } from '@fluidframework/odsp-doclib-utils';
|
|
2
|
+
import { IOdspTokens } from '@fluidframework/odsp-doclib-utils';
|
|
3
|
+
import { ITree } from '@fluidframework/protocol-definitions';
|
|
4
|
+
|
|
5
|
+
/** The prefix that all GC blob names start with. */
|
|
6
|
+
export declare const gcBlobPrefix = "__gc";
|
|
7
|
+
|
|
8
|
+
export declare const getMicrosoftConfiguration: () => IClientConfig;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Helper function that normalizes the given snapshot tree. It sorts objects and arrays in the snapshot. It also
|
|
12
|
+
* normalizes certain blob contents for which the order of content does not matter. For example, garbage collection
|
|
13
|
+
* blobs contains objects / arrays whose element order do not matter.
|
|
14
|
+
* @param snapshot - The snapshot tree to normalize.
|
|
15
|
+
* @param config - Configs to use when normalizing snapshot. For example, it can contain paths of blobs whose contents
|
|
16
|
+
* should be normalized as well.
|
|
17
|
+
* @returns a copy of the normalized snapshot tree.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getNormalizedSnapshot(snapshot: ITree, config?: ISnapshotNormalizerConfig): ITree;
|
|
20
|
+
|
|
21
|
+
export declare interface IAsyncCache<TKey, TValue> {
|
|
22
|
+
get(key: TKey): Promise<TValue | undefined>;
|
|
23
|
+
save(key: TKey, value: TValue): Promise<void>;
|
|
24
|
+
lock<T>(callback: () => Promise<T>): Promise<T>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export declare interface IOdspTokenManagerCacheKey {
|
|
28
|
+
readonly isPush: boolean;
|
|
29
|
+
readonly userOrServer: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare interface IResources {
|
|
33
|
+
tokens?: {
|
|
34
|
+
version?: number;
|
|
35
|
+
data: {
|
|
36
|
+
[key: string]: {
|
|
37
|
+
storage?: IOdspTokens;
|
|
38
|
+
push?: IOdspTokens;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export declare interface ISnapshotNormalizerConfig {
|
|
45
|
+
blobsToNormalize?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* channel types who's content (non-attribute) blobs will be excluded.
|
|
48
|
+
* this is used to exclude the content of channels who's content cannot be compared
|
|
49
|
+
* as the content is non-deterministic between snapshot at the same sequence number.
|
|
50
|
+
*/
|
|
51
|
+
excludedChannelContentTypes?: string[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export declare function loadRC(): Promise<IResources>;
|
|
55
|
+
|
|
56
|
+
export declare function lockRC(): Promise<any>;
|
|
57
|
+
|
|
58
|
+
export declare type OdspTokenConfig = {
|
|
59
|
+
type: "password";
|
|
60
|
+
username: string;
|
|
61
|
+
password: string;
|
|
62
|
+
} | {
|
|
63
|
+
type: "browserLogin";
|
|
64
|
+
navigator: (url: string) => void;
|
|
65
|
+
redirectUriCallback?: (tokens: IOdspTokens) => Promise<string>;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export declare class OdspTokenManager {
|
|
69
|
+
private readonly tokenCache?;
|
|
70
|
+
private readonly storageCache;
|
|
71
|
+
private readonly pushCache;
|
|
72
|
+
private readonly cacheMutex;
|
|
73
|
+
constructor(tokenCache?: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens> | undefined);
|
|
74
|
+
updateTokensCache(key: IOdspTokenManagerCacheKey, value: IOdspTokens): Promise<void>;
|
|
75
|
+
private updateTokensCacheWithoutLock;
|
|
76
|
+
getOdspTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;
|
|
77
|
+
getPushTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;
|
|
78
|
+
private getTokenFromCache;
|
|
79
|
+
private static getCacheKey;
|
|
80
|
+
private getTokens;
|
|
81
|
+
private getTokensCore;
|
|
82
|
+
private acquireTokensWithPassword;
|
|
83
|
+
private acquireTokensViaBrowserLogin;
|
|
84
|
+
private onTokenRetrievalFromCache;
|
|
85
|
+
private extractAuthorizationCode;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export declare const odspTokensCache: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens>;
|
|
89
|
+
|
|
90
|
+
export declare function saveRC(rc: IResources): Promise<void>;
|
|
91
|
+
|
|
92
|
+
export { }
|
package/lib/packageVersion.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export declare const pkgName = "@fluidframework/tool-utils";
|
|
8
|
-
export declare const pkgVersion = "2.0.0-dev.7.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-dev.7.4.0.214930";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/lib/packageVersion.js
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export const pkgName = "@fluidframework/tool-utils";
|
|
8
|
-
export const pkgVersion = "2.0.0-dev.7.
|
|
8
|
+
export const pkgVersion = "2.0.0-dev.7.4.0.214930";
|
|
9
9
|
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,4BAA4B,CAAC;AACpD,MAAM,CAAC,MAAM,UAAU,GAAG,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/tool-utils\";\nexport const pkgVersion = \"2.0.0-dev.7.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,4BAA4B,CAAC;AACpD,MAAM,CAAC,MAAM,UAAU,GAAG,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/tool-utils\";\nexport const pkgVersion = \"2.0.0-dev.7.4.0.214930\";\n"]}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { IClientConfig } from '@fluidframework/odsp-doclib-utils';
|
|
2
|
+
import { IOdspTokens } from '@fluidframework/odsp-doclib-utils';
|
|
3
|
+
import { ITree } from '@fluidframework/protocol-definitions';
|
|
4
|
+
|
|
5
|
+
/** The prefix that all GC blob names start with. */
|
|
6
|
+
export declare const gcBlobPrefix = "__gc";
|
|
7
|
+
|
|
8
|
+
export declare const getMicrosoftConfiguration: () => IClientConfig;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Helper function that normalizes the given snapshot tree. It sorts objects and arrays in the snapshot. It also
|
|
12
|
+
* normalizes certain blob contents for which the order of content does not matter. For example, garbage collection
|
|
13
|
+
* blobs contains objects / arrays whose element order do not matter.
|
|
14
|
+
* @param snapshot - The snapshot tree to normalize.
|
|
15
|
+
* @param config - Configs to use when normalizing snapshot. For example, it can contain paths of blobs whose contents
|
|
16
|
+
* should be normalized as well.
|
|
17
|
+
* @returns a copy of the normalized snapshot tree.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getNormalizedSnapshot(snapshot: ITree, config?: ISnapshotNormalizerConfig): ITree;
|
|
20
|
+
|
|
21
|
+
export declare interface IAsyncCache<TKey, TValue> {
|
|
22
|
+
get(key: TKey): Promise<TValue | undefined>;
|
|
23
|
+
save(key: TKey, value: TValue): Promise<void>;
|
|
24
|
+
lock<T>(callback: () => Promise<T>): Promise<T>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export declare interface IOdspTokenManagerCacheKey {
|
|
28
|
+
readonly isPush: boolean;
|
|
29
|
+
readonly userOrServer: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare interface IResources {
|
|
33
|
+
tokens?: {
|
|
34
|
+
version?: number;
|
|
35
|
+
data: {
|
|
36
|
+
[key: string]: {
|
|
37
|
+
storage?: IOdspTokens;
|
|
38
|
+
push?: IOdspTokens;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export declare interface ISnapshotNormalizerConfig {
|
|
45
|
+
blobsToNormalize?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* channel types who's content (non-attribute) blobs will be excluded.
|
|
48
|
+
* this is used to exclude the content of channels who's content cannot be compared
|
|
49
|
+
* as the content is non-deterministic between snapshot at the same sequence number.
|
|
50
|
+
*/
|
|
51
|
+
excludedChannelContentTypes?: string[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export declare function loadRC(): Promise<IResources>;
|
|
55
|
+
|
|
56
|
+
export declare function lockRC(): Promise<any>;
|
|
57
|
+
|
|
58
|
+
export declare type OdspTokenConfig = {
|
|
59
|
+
type: "password";
|
|
60
|
+
username: string;
|
|
61
|
+
password: string;
|
|
62
|
+
} | {
|
|
63
|
+
type: "browserLogin";
|
|
64
|
+
navigator: (url: string) => void;
|
|
65
|
+
redirectUriCallback?: (tokens: IOdspTokens) => Promise<string>;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export declare class OdspTokenManager {
|
|
69
|
+
private readonly tokenCache?;
|
|
70
|
+
private readonly storageCache;
|
|
71
|
+
private readonly pushCache;
|
|
72
|
+
private readonly cacheMutex;
|
|
73
|
+
constructor(tokenCache?: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens> | undefined);
|
|
74
|
+
updateTokensCache(key: IOdspTokenManagerCacheKey, value: IOdspTokens): Promise<void>;
|
|
75
|
+
private updateTokensCacheWithoutLock;
|
|
76
|
+
getOdspTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;
|
|
77
|
+
getPushTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;
|
|
78
|
+
private getTokenFromCache;
|
|
79
|
+
private static getCacheKey;
|
|
80
|
+
private getTokens;
|
|
81
|
+
private getTokensCore;
|
|
82
|
+
private acquireTokensWithPassword;
|
|
83
|
+
private acquireTokensViaBrowserLogin;
|
|
84
|
+
private onTokenRetrievalFromCache;
|
|
85
|
+
private extractAuthorizationCode;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export declare const odspTokensCache: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens>;
|
|
89
|
+
|
|
90
|
+
export declare function saveRC(rc: IResources): Promise<void>;
|
|
91
|
+
|
|
92
|
+
export { }
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { IClientConfig } from '@fluidframework/odsp-doclib-utils';
|
|
2
|
+
import { IOdspTokens } from '@fluidframework/odsp-doclib-utils';
|
|
3
|
+
import { ITree } from '@fluidframework/protocol-definitions';
|
|
4
|
+
|
|
5
|
+
/** The prefix that all GC blob names start with. */
|
|
6
|
+
export declare const gcBlobPrefix = "__gc";
|
|
7
|
+
|
|
8
|
+
export declare const getMicrosoftConfiguration: () => IClientConfig;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Helper function that normalizes the given snapshot tree. It sorts objects and arrays in the snapshot. It also
|
|
12
|
+
* normalizes certain blob contents for which the order of content does not matter. For example, garbage collection
|
|
13
|
+
* blobs contains objects / arrays whose element order do not matter.
|
|
14
|
+
* @param snapshot - The snapshot tree to normalize.
|
|
15
|
+
* @param config - Configs to use when normalizing snapshot. For example, it can contain paths of blobs whose contents
|
|
16
|
+
* should be normalized as well.
|
|
17
|
+
* @returns a copy of the normalized snapshot tree.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getNormalizedSnapshot(snapshot: ITree, config?: ISnapshotNormalizerConfig): ITree;
|
|
20
|
+
|
|
21
|
+
export declare interface IAsyncCache<TKey, TValue> {
|
|
22
|
+
get(key: TKey): Promise<TValue | undefined>;
|
|
23
|
+
save(key: TKey, value: TValue): Promise<void>;
|
|
24
|
+
lock<T>(callback: () => Promise<T>): Promise<T>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export declare interface IOdspTokenManagerCacheKey {
|
|
28
|
+
readonly isPush: boolean;
|
|
29
|
+
readonly userOrServer: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare interface IResources {
|
|
33
|
+
tokens?: {
|
|
34
|
+
version?: number;
|
|
35
|
+
data: {
|
|
36
|
+
[key: string]: {
|
|
37
|
+
storage?: IOdspTokens;
|
|
38
|
+
push?: IOdspTokens;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export declare interface ISnapshotNormalizerConfig {
|
|
45
|
+
blobsToNormalize?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* channel types who's content (non-attribute) blobs will be excluded.
|
|
48
|
+
* this is used to exclude the content of channels who's content cannot be compared
|
|
49
|
+
* as the content is non-deterministic between snapshot at the same sequence number.
|
|
50
|
+
*/
|
|
51
|
+
excludedChannelContentTypes?: string[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export declare function loadRC(): Promise<IResources>;
|
|
55
|
+
|
|
56
|
+
export declare function lockRC(): Promise<any>;
|
|
57
|
+
|
|
58
|
+
export declare type OdspTokenConfig = {
|
|
59
|
+
type: "password";
|
|
60
|
+
username: string;
|
|
61
|
+
password: string;
|
|
62
|
+
} | {
|
|
63
|
+
type: "browserLogin";
|
|
64
|
+
navigator: (url: string) => void;
|
|
65
|
+
redirectUriCallback?: (tokens: IOdspTokens) => Promise<string>;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export declare class OdspTokenManager {
|
|
69
|
+
private readonly tokenCache?;
|
|
70
|
+
private readonly storageCache;
|
|
71
|
+
private readonly pushCache;
|
|
72
|
+
private readonly cacheMutex;
|
|
73
|
+
constructor(tokenCache?: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens> | undefined);
|
|
74
|
+
updateTokensCache(key: IOdspTokenManagerCacheKey, value: IOdspTokens): Promise<void>;
|
|
75
|
+
private updateTokensCacheWithoutLock;
|
|
76
|
+
getOdspTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;
|
|
77
|
+
getPushTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;
|
|
78
|
+
private getTokenFromCache;
|
|
79
|
+
private static getCacheKey;
|
|
80
|
+
private getTokens;
|
|
81
|
+
private getTokensCore;
|
|
82
|
+
private acquireTokensWithPassword;
|
|
83
|
+
private acquireTokensViaBrowserLogin;
|
|
84
|
+
private onTokenRetrievalFromCache;
|
|
85
|
+
private extractAuthorizationCode;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export declare const odspTokensCache: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens>;
|
|
89
|
+
|
|
90
|
+
export declare function saveRC(rc: IResources): Promise<void>;
|
|
91
|
+
|
|
92
|
+
export { }
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { IClientConfig } from '@fluidframework/odsp-doclib-utils';
|
|
2
|
+
import { IOdspTokens } from '@fluidframework/odsp-doclib-utils';
|
|
3
|
+
import { ITree } from '@fluidframework/protocol-definitions';
|
|
4
|
+
|
|
5
|
+
/** The prefix that all GC blob names start with. */
|
|
6
|
+
export declare const gcBlobPrefix = "__gc";
|
|
7
|
+
|
|
8
|
+
export declare const getMicrosoftConfiguration: () => IClientConfig;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Helper function that normalizes the given snapshot tree. It sorts objects and arrays in the snapshot. It also
|
|
12
|
+
* normalizes certain blob contents for which the order of content does not matter. For example, garbage collection
|
|
13
|
+
* blobs contains objects / arrays whose element order do not matter.
|
|
14
|
+
* @param snapshot - The snapshot tree to normalize.
|
|
15
|
+
* @param config - Configs to use when normalizing snapshot. For example, it can contain paths of blobs whose contents
|
|
16
|
+
* should be normalized as well.
|
|
17
|
+
* @returns a copy of the normalized snapshot tree.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getNormalizedSnapshot(snapshot: ITree, config?: ISnapshotNormalizerConfig): ITree;
|
|
20
|
+
|
|
21
|
+
export declare interface IAsyncCache<TKey, TValue> {
|
|
22
|
+
get(key: TKey): Promise<TValue | undefined>;
|
|
23
|
+
save(key: TKey, value: TValue): Promise<void>;
|
|
24
|
+
lock<T>(callback: () => Promise<T>): Promise<T>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export declare interface IOdspTokenManagerCacheKey {
|
|
28
|
+
readonly isPush: boolean;
|
|
29
|
+
readonly userOrServer: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare interface IResources {
|
|
33
|
+
tokens?: {
|
|
34
|
+
version?: number;
|
|
35
|
+
data: {
|
|
36
|
+
[key: string]: {
|
|
37
|
+
storage?: IOdspTokens;
|
|
38
|
+
push?: IOdspTokens;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export declare interface ISnapshotNormalizerConfig {
|
|
45
|
+
blobsToNormalize?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* channel types who's content (non-attribute) blobs will be excluded.
|
|
48
|
+
* this is used to exclude the content of channels who's content cannot be compared
|
|
49
|
+
* as the content is non-deterministic between snapshot at the same sequence number.
|
|
50
|
+
*/
|
|
51
|
+
excludedChannelContentTypes?: string[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export declare function loadRC(): Promise<IResources>;
|
|
55
|
+
|
|
56
|
+
export declare function lockRC(): Promise<any>;
|
|
57
|
+
|
|
58
|
+
export declare type OdspTokenConfig = {
|
|
59
|
+
type: "password";
|
|
60
|
+
username: string;
|
|
61
|
+
password: string;
|
|
62
|
+
} | {
|
|
63
|
+
type: "browserLogin";
|
|
64
|
+
navigator: (url: string) => void;
|
|
65
|
+
redirectUriCallback?: (tokens: IOdspTokens) => Promise<string>;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export declare class OdspTokenManager {
|
|
69
|
+
private readonly tokenCache?;
|
|
70
|
+
private readonly storageCache;
|
|
71
|
+
private readonly pushCache;
|
|
72
|
+
private readonly cacheMutex;
|
|
73
|
+
constructor(tokenCache?: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens> | undefined);
|
|
74
|
+
updateTokensCache(key: IOdspTokenManagerCacheKey, value: IOdspTokens): Promise<void>;
|
|
75
|
+
private updateTokensCacheWithoutLock;
|
|
76
|
+
getOdspTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;
|
|
77
|
+
getPushTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;
|
|
78
|
+
private getTokenFromCache;
|
|
79
|
+
private static getCacheKey;
|
|
80
|
+
private getTokens;
|
|
81
|
+
private getTokensCore;
|
|
82
|
+
private acquireTokensWithPassword;
|
|
83
|
+
private acquireTokensViaBrowserLogin;
|
|
84
|
+
private onTokenRetrievalFromCache;
|
|
85
|
+
private extractAuthorizationCode;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export declare const odspTokensCache: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens>;
|
|
89
|
+
|
|
90
|
+
export declare function saveRC(rc: IResources): Promise<void>;
|
|
91
|
+
|
|
92
|
+
export { }
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { IClientConfig } from '@fluidframework/odsp-doclib-utils';
|
|
2
|
+
import { IOdspTokens } from '@fluidframework/odsp-doclib-utils';
|
|
3
|
+
import { ITree } from '@fluidframework/protocol-definitions';
|
|
4
|
+
|
|
5
|
+
/** The prefix that all GC blob names start with. */
|
|
6
|
+
export declare const gcBlobPrefix = "__gc";
|
|
7
|
+
|
|
8
|
+
export declare const getMicrosoftConfiguration: () => IClientConfig;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Helper function that normalizes the given snapshot tree. It sorts objects and arrays in the snapshot. It also
|
|
12
|
+
* normalizes certain blob contents for which the order of content does not matter. For example, garbage collection
|
|
13
|
+
* blobs contains objects / arrays whose element order do not matter.
|
|
14
|
+
* @param snapshot - The snapshot tree to normalize.
|
|
15
|
+
* @param config - Configs to use when normalizing snapshot. For example, it can contain paths of blobs whose contents
|
|
16
|
+
* should be normalized as well.
|
|
17
|
+
* @returns a copy of the normalized snapshot tree.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getNormalizedSnapshot(snapshot: ITree, config?: ISnapshotNormalizerConfig): ITree;
|
|
20
|
+
|
|
21
|
+
export declare interface IAsyncCache<TKey, TValue> {
|
|
22
|
+
get(key: TKey): Promise<TValue | undefined>;
|
|
23
|
+
save(key: TKey, value: TValue): Promise<void>;
|
|
24
|
+
lock<T>(callback: () => Promise<T>): Promise<T>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export declare interface IOdspTokenManagerCacheKey {
|
|
28
|
+
readonly isPush: boolean;
|
|
29
|
+
readonly userOrServer: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare interface IResources {
|
|
33
|
+
tokens?: {
|
|
34
|
+
version?: number;
|
|
35
|
+
data: {
|
|
36
|
+
[key: string]: {
|
|
37
|
+
storage?: IOdspTokens;
|
|
38
|
+
push?: IOdspTokens;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export declare interface ISnapshotNormalizerConfig {
|
|
45
|
+
blobsToNormalize?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* channel types who's content (non-attribute) blobs will be excluded.
|
|
48
|
+
* this is used to exclude the content of channels who's content cannot be compared
|
|
49
|
+
* as the content is non-deterministic between snapshot at the same sequence number.
|
|
50
|
+
*/
|
|
51
|
+
excludedChannelContentTypes?: string[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export declare function loadRC(): Promise<IResources>;
|
|
55
|
+
|
|
56
|
+
export declare function lockRC(): Promise<any>;
|
|
57
|
+
|
|
58
|
+
export declare type OdspTokenConfig = {
|
|
59
|
+
type: "password";
|
|
60
|
+
username: string;
|
|
61
|
+
password: string;
|
|
62
|
+
} | {
|
|
63
|
+
type: "browserLogin";
|
|
64
|
+
navigator: (url: string) => void;
|
|
65
|
+
redirectUriCallback?: (tokens: IOdspTokens) => Promise<string>;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export declare class OdspTokenManager {
|
|
69
|
+
private readonly tokenCache?;
|
|
70
|
+
private readonly storageCache;
|
|
71
|
+
private readonly pushCache;
|
|
72
|
+
private readonly cacheMutex;
|
|
73
|
+
constructor(tokenCache?: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens> | undefined);
|
|
74
|
+
updateTokensCache(key: IOdspTokenManagerCacheKey, value: IOdspTokens): Promise<void>;
|
|
75
|
+
private updateTokensCacheWithoutLock;
|
|
76
|
+
getOdspTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;
|
|
77
|
+
getPushTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;
|
|
78
|
+
private getTokenFromCache;
|
|
79
|
+
private static getCacheKey;
|
|
80
|
+
private getTokens;
|
|
81
|
+
private getTokensCore;
|
|
82
|
+
private acquireTokensWithPassword;
|
|
83
|
+
private acquireTokensViaBrowserLogin;
|
|
84
|
+
private onTokenRetrievalFromCache;
|
|
85
|
+
private extractAuthorizationCode;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export declare const odspTokensCache: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens>;
|
|
89
|
+
|
|
90
|
+
export declare function saveRC(rc: IResources): Promise<void>;
|
|
91
|
+
|
|
92
|
+
export { }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/tool-utils",
|
|
3
|
-
"version": "2.0.0-dev.7.
|
|
3
|
+
"version": "2.0.0-dev.7.4.0.214930",
|
|
4
4
|
"description": "Common utilities for Fluid tools",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"temp-directory": "nyc/.nyc_output"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@fluidframework/core-utils": "2.0.0-dev.7.
|
|
39
|
-
"@fluidframework/driver-utils": "2.0.0-dev.7.
|
|
40
|
-
"@fluidframework/odsp-doclib-utils": "2.0.0-dev.7.
|
|
38
|
+
"@fluidframework/core-utils": "2.0.0-dev.7.4.0.214930",
|
|
39
|
+
"@fluidframework/driver-utils": "2.0.0-dev.7.4.0.214930",
|
|
40
|
+
"@fluidframework/odsp-doclib-utils": "2.0.0-dev.7.4.0.214930",
|
|
41
41
|
"@fluidframework/protocol-definitions": "^3.0.0",
|
|
42
42
|
"async-mutex": "^0.3.1",
|
|
43
43
|
"debug": "^4.3.4",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"proper-lockfile": "^4.1.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@fluid-tools/build-cli": "0.28.0
|
|
48
|
+
"@fluid-tools/build-cli": "^0.28.0",
|
|
49
49
|
"@fluidframework/build-common": "^2.0.3",
|
|
50
|
-
"@fluidframework/build-tools": "0.28.0
|
|
50
|
+
"@fluidframework/build-tools": "^0.28.0",
|
|
51
51
|
"@fluidframework/eslint-config-fluid": "^3.1.0",
|
|
52
|
-
"@fluidframework/mocha-test-setup": "2.0.0-dev.7.
|
|
52
|
+
"@fluidframework/mocha-test-setup": "2.0.0-dev.7.4.0.214930",
|
|
53
53
|
"@fluidframework/tool-utils-previous": "npm:@fluidframework/tool-utils@2.0.0-internal.7.2.0",
|
|
54
54
|
"@microsoft/api-extractor": "^7.38.3",
|
|
55
55
|
"@types/debug": "^4.1.5",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"@types/mocha": "^9.1.1",
|
|
58
58
|
"@types/node": "^16.18.38",
|
|
59
59
|
"c8": "^7.7.1",
|
|
60
|
+
"copyfiles": "^2.4.1",
|
|
60
61
|
"cross-env": "^7.0.3",
|
|
61
62
|
"eslint": "~8.50.0",
|
|
62
63
|
"mocha": "^10.2.0",
|
|
@@ -67,14 +68,29 @@
|
|
|
67
68
|
"rimraf": "^4.4.0",
|
|
68
69
|
"typescript": "~5.1.6"
|
|
69
70
|
},
|
|
71
|
+
"fluidBuild": {
|
|
72
|
+
"tasks": {
|
|
73
|
+
"build:docs": {
|
|
74
|
+
"dependsOn": [
|
|
75
|
+
"...",
|
|
76
|
+
"api-extractor:commonjs",
|
|
77
|
+
"api-extractor:esnext"
|
|
78
|
+
],
|
|
79
|
+
"script": false
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
70
83
|
"typeValidation": {
|
|
71
84
|
"broken": {}
|
|
72
85
|
},
|
|
73
86
|
"scripts": {
|
|
87
|
+
"api": "fluid-build . --task api",
|
|
88
|
+
"api-extractor:commonjs": "api-extractor run --local",
|
|
89
|
+
"api-extractor:esnext": "copyfiles -u 1 \"dist/**/*-@(alpha|beta|public|untrimmed).d.ts\" lib",
|
|
74
90
|
"build": "fluid-build . --task build",
|
|
75
91
|
"build:commonjs": "fluid-build . --task commonjs",
|
|
76
92
|
"build:compile": "fluid-build . --task compile",
|
|
77
|
-
"build:docs": "
|
|
93
|
+
"build:docs": "fluid-build . --task api",
|
|
78
94
|
"build:esnext": "tsc --project ./tsconfig.esnext.json",
|
|
79
95
|
"build:genver": "gen-version",
|
|
80
96
|
"build:test": "tsc --project ./src/test/tsconfig.json",
|
|
@@ -85,8 +101,8 @@
|
|
|
85
101
|
"format": "npm run prettier:fix",
|
|
86
102
|
"lint": "npm run prettier && npm run eslint",
|
|
87
103
|
"lint:fix": "npm run prettier:fix && npm run eslint:fix",
|
|
88
|
-
"prettier": "prettier --check . --ignore-path ../../../.prettierignore",
|
|
89
|
-
"prettier:fix": "prettier --write . --ignore-path ../../../.prettierignore",
|
|
104
|
+
"prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
|
|
105
|
+
"prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
|
|
90
106
|
"test": "npm run test:mocha",
|
|
91
107
|
"test:coverage": "c8 npm test",
|
|
92
108
|
"test:mocha": "mocha --ignore \"dist/test/types/*\" --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup",
|
package/src/packageVersion.ts
CHANGED