@fluidframework/tinylicious-driver 2.0.0-dev-rc.5.0.0.265721 → 2.0.0-dev-rc.5.0.0.268409
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/api-report/tinylicious-driver.alpha.api.md +16 -0
- package/api-report/tinylicious-driver.beta.api.md +16 -0
- package/api-report/tinylicious-driver.public.api.md +16 -0
- package/dist/insecureTinyliciousTokenProvider.d.ts +1 -1
- package/dist/insecureTinyliciousTokenProvider.d.ts.map +1 -1
- package/dist/insecureTinyliciousTokenProvider.js +2 -2
- package/dist/insecureTinyliciousTokenProvider.js.map +1 -1
- package/lib/insecureTinyliciousTokenProvider.d.ts +1 -1
- package/lib/insecureTinyliciousTokenProvider.d.ts.map +1 -1
- package/lib/insecureTinyliciousTokenProvider.js +1 -1
- package/lib/insecureTinyliciousTokenProvider.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +10 -11
- package/src/insecureTinyliciousTokenProvider.ts +1 -1
- package/api-report/tinylicious-driver.api.md +0 -44
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
## Alpha API Report File for "@fluidframework/tinylicious-driver"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
8
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
|
|
9
|
+
import { ITokenProvider } from '@fluidframework/routerlicious-driver';
|
|
10
|
+
import { ITokenResponse } from '@fluidframework/routerlicious-driver';
|
|
11
|
+
import { IUrlResolver } from '@fluidframework/driver-definitions/internal';
|
|
12
|
+
import { ScopeType } from '@fluidframework/driver-definitions/internal';
|
|
13
|
+
|
|
14
|
+
// (No @packageDocumentation comment for this package)
|
|
15
|
+
|
|
16
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
## Beta API Report File for "@fluidframework/tinylicious-driver"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
8
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
|
|
9
|
+
import { ITokenProvider } from '@fluidframework/routerlicious-driver';
|
|
10
|
+
import { ITokenResponse } from '@fluidframework/routerlicious-driver';
|
|
11
|
+
import { IUrlResolver } from '@fluidframework/driver-definitions/internal';
|
|
12
|
+
import { ScopeType } from '@fluidframework/driver-definitions/internal';
|
|
13
|
+
|
|
14
|
+
// (No @packageDocumentation comment for this package)
|
|
15
|
+
|
|
16
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
## Public API Report File for "@fluidframework/tinylicious-driver"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
8
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
|
|
9
|
+
import { ITokenProvider } from '@fluidframework/routerlicious-driver';
|
|
10
|
+
import { ITokenResponse } from '@fluidframework/routerlicious-driver';
|
|
11
|
+
import { IUrlResolver } from '@fluidframework/driver-definitions/internal';
|
|
12
|
+
import { ScopeType } from '@fluidframework/driver-definitions/internal';
|
|
13
|
+
|
|
14
|
+
// (No @packageDocumentation comment for this package)
|
|
15
|
+
|
|
16
|
+
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { ScopeType } from "@fluidframework/
|
|
5
|
+
import { ScopeType } from "@fluidframework/driver-definitions/internal";
|
|
6
6
|
import { ITokenProvider, ITokenResponse } from "@fluidframework/routerlicious-driver";
|
|
7
7
|
/**
|
|
8
8
|
* As the name implies this is not secure and should not be used in production. It simply makes the example easier
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insecureTinyliciousTokenProvider.d.ts","sourceRoot":"","sources":["../src/insecureTinyliciousTokenProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAgB,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"insecureTinyliciousTokenProvider.d.ts","sourceRoot":"","sources":["../src/insecureTinyliciousTokenProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAgB,SAAS,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAItF;;;;GAIG;AACH,qBAAa,gCAAiC,YAAW,cAAc;IAErE;;;;;;;OAOG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;;IARxB;;;;;;;OAOG;IACc,MAAM,CAAC,yBAAa;IAGzB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAOjF,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAO7F,OAAO,CAAC,cAAc;CAkCtB"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.InsecureTinyliciousTokenProvider = void 0;
|
|
8
|
-
const
|
|
8
|
+
const internal_1 = require("@fluidframework/driver-definitions/internal");
|
|
9
9
|
const jsrsasign_1 = require("jsrsasign");
|
|
10
10
|
const uuid_1 = require("uuid");
|
|
11
11
|
/**
|
|
@@ -47,7 +47,7 @@ class InsecureTinyliciousTokenProvider {
|
|
|
47
47
|
const user = { id: userId, name: userName };
|
|
48
48
|
const claims = {
|
|
49
49
|
documentId: documentId ?? "",
|
|
50
|
-
scopes: this.scopes ?? [
|
|
50
|
+
scopes: this.scopes ?? [internal_1.ScopeType.DocRead, internal_1.ScopeType.DocWrite, internal_1.ScopeType.SummaryWrite],
|
|
51
51
|
tenantId,
|
|
52
52
|
user,
|
|
53
53
|
iat: now,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insecureTinyliciousTokenProvider.js","sourceRoot":"","sources":["../src/insecureTinyliciousTokenProvider.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH
|
|
1
|
+
{"version":3,"file":"insecureTinyliciousTokenProvider.js","sourceRoot":"","sources":["../src/insecureTinyliciousTokenProvider.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,0EAAsF;AAEtF,yCAA8C;AAC9C,+BAAkC;AAElC;;;;GAIG;AACH,MAAa,gCAAgC;IAC5C;IACC;;;;;;;OAOG;IACc,MAAoB;QAApB,WAAM,GAAN,MAAM,CAAc;IACnC,CAAC;IAEG,KAAK,CAAC,iBAAiB,CAAC,QAAgB,EAAE,UAAmB;QACnE,OAAO;YACN,SAAS,EAAE,IAAI;YACf,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,UAAU,CAAC;SAC9C,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAAC,QAAgB,EAAE,UAAkB;QAClE,OAAO;YACN,SAAS,EAAE,IAAI;YACf,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,UAAU,CAAC;SAC9C,CAAC;IACH,CAAC;IAEO,cAAc,CACrB,QAAgB,EAChB,UAA8B,EAC9B,WAAmB,EAAE,GAAG,EAAE,EAC1B,MAAc,KAAK;QAEnB,MAAM,MAAM,GAAG,IAAA,SAAI,GAAE,CAAC;QACtB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QACzD,MAAM,QAAQ,GAAG,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,uEAAuE;QAE5H,0BAA0B;QAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;QAC1C,MAAM,IAAI,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAE5C,MAAM,MAAM,GAAiB;YAC5B,UAAU,EAAE,UAAU,IAAI,EAAE;YAC5B,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,CAAC,oBAAS,CAAC,OAAO,EAAE,oBAAS,CAAC,QAAQ,EAAE,oBAAS,CAAC,YAAY,CAAC;YACtF,QAAQ;YACR,IAAI;YACJ,GAAG,EAAE,GAAG;YACR,GAAG,EAAE,GAAG,GAAG,QAAQ;YACnB,GAAG;SACH,CAAC;QAEF,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QAClC,OAAO,gBAAS,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI;QAC5B,2BAA2B;QAC3B,2CAA2C;QAC3C,IAAI,EACJ,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAC5C,MAAM,EACN,OAAO,CACP,CAAC;IACH,CAAC;CACD;AA7DD,4EA6DC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITokenClaims, ScopeType } from \"@fluidframework/driver-definitions/internal\";\nimport { ITokenProvider, ITokenResponse } from \"@fluidframework/routerlicious-driver\";\nimport { KJUR as jsrsasign } from \"jsrsasign\";\nimport { v4 as uuid } from \"uuid\";\n\n/**\n * As the name implies this is not secure and should not be used in production. It simply makes the example easier\n * to get up and running.\n * @internal\n */\nexport class InsecureTinyliciousTokenProvider implements ITokenProvider {\n\tconstructor(\n\t\t/**\n\t\t * Optional. Override of scopes. If a param is not provided, InsecureTinyliciousTokenProvider\n\t\t * will use the default scopes which are document read, write and summarizer write.\n\t\t *\n\t\t * @param scopes - See {@link @fluidframework/protocol-definitions#ITokenClaims.scopes}\n\t\t *\n\t\t * @defaultValue [ ScopeType.DocRead, ScopeType.DocWrite, ScopeType.SummaryWrite ]\n\t\t */\n\t\tprivate readonly scopes?: ScopeType[],\n\t) {}\n\n\tpublic async fetchOrdererToken(tenantId: string, documentId?: string): Promise<ITokenResponse> {\n\t\treturn {\n\t\t\tfromCache: true,\n\t\t\tjwt: this.getSignedToken(tenantId, documentId),\n\t\t};\n\t}\n\n\tpublic async fetchStorageToken(tenantId: string, documentId: string): Promise<ITokenResponse> {\n\t\treturn {\n\t\t\tfromCache: true,\n\t\t\tjwt: this.getSignedToken(tenantId, documentId),\n\t\t};\n\t}\n\n\tprivate getSignedToken(\n\t\ttenantId: string,\n\t\tdocumentId: string | undefined,\n\t\tlifetime: number = 60 * 60,\n\t\tver: string = \"1.0\",\n\t): string {\n\t\tconst userId = uuid();\n\t\tconst match = userId.match(/^([\\da-f]{8})-([\\da-f]{4})/);\n\t\tconst userName = match === null ? userId : match[0]; // Just use the first two segments of the (fake) userId as a fake name.\n\n\t\t// Current time in seconds\n\t\tconst now = Math.round(Date.now() / 1000);\n\t\tconst user = { id: userId, name: userName };\n\n\t\tconst claims: ITokenClaims = {\n\t\t\tdocumentId: documentId ?? \"\",\n\t\t\tscopes: this.scopes ?? [ScopeType.DocRead, ScopeType.DocWrite, ScopeType.SummaryWrite],\n\t\t\ttenantId,\n\t\t\tuser,\n\t\t\tiat: now,\n\t\t\texp: now + lifetime,\n\t\t\tver,\n\t\t};\n\n\t\tconst utf8Key = { utf8: \"12345\" };\n\t\treturn jsrsasign.jws.JWS.sign(\n\t\t\t// External API uses `null`\n\t\t\t// eslint-disable-next-line unicorn/no-null\n\t\t\tnull,\n\t\t\tJSON.stringify({ alg: \"HS256\", typ: \"JWT\" }),\n\t\t\tclaims,\n\t\t\tutf8Key,\n\t\t);\n\t}\n}\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { ScopeType } from "@fluidframework/
|
|
5
|
+
import { ScopeType } from "@fluidframework/driver-definitions/internal";
|
|
6
6
|
import { ITokenProvider, ITokenResponse } from "@fluidframework/routerlicious-driver";
|
|
7
7
|
/**
|
|
8
8
|
* As the name implies this is not secure and should not be used in production. It simply makes the example easier
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insecureTinyliciousTokenProvider.d.ts","sourceRoot":"","sources":["../src/insecureTinyliciousTokenProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAgB,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"insecureTinyliciousTokenProvider.d.ts","sourceRoot":"","sources":["../src/insecureTinyliciousTokenProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAgB,SAAS,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAItF;;;;GAIG;AACH,qBAAa,gCAAiC,YAAW,cAAc;IAErE;;;;;;;OAOG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;;IARxB;;;;;;;OAOG;IACc,MAAM,CAAC,yBAAa;IAGzB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAOjF,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAO7F,OAAO,CAAC,cAAc;CAkCtB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { ScopeType } from "@fluidframework/
|
|
5
|
+
import { ScopeType } from "@fluidframework/driver-definitions/internal";
|
|
6
6
|
import { KJUR as jsrsasign } from "jsrsasign";
|
|
7
7
|
import { v4 as uuid } from "uuid";
|
|
8
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insecureTinyliciousTokenProvider.js","sourceRoot":"","sources":["../src/insecureTinyliciousTokenProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAgB,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"insecureTinyliciousTokenProvider.js","sourceRoot":"","sources":["../src/insecureTinyliciousTokenProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAgB,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAEtF,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAElC;;;;GAIG;AACH,MAAM,OAAO,gCAAgC;IAC5C;IACC;;;;;;;OAOG;IACc,MAAoB;QAApB,WAAM,GAAN,MAAM,CAAc;IACnC,CAAC;IAEG,KAAK,CAAC,iBAAiB,CAAC,QAAgB,EAAE,UAAmB;QACnE,OAAO;YACN,SAAS,EAAE,IAAI;YACf,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,UAAU,CAAC;SAC9C,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAAC,QAAgB,EAAE,UAAkB;QAClE,OAAO;YACN,SAAS,EAAE,IAAI;YACf,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,UAAU,CAAC;SAC9C,CAAC;IACH,CAAC;IAEO,cAAc,CACrB,QAAgB,EAChB,UAA8B,EAC9B,WAAmB,EAAE,GAAG,EAAE,EAC1B,MAAc,KAAK;QAEnB,MAAM,MAAM,GAAG,IAAI,EAAE,CAAC;QACtB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QACzD,MAAM,QAAQ,GAAG,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,uEAAuE;QAE5H,0BAA0B;QAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;QAC1C,MAAM,IAAI,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAE5C,MAAM,MAAM,GAAiB;YAC5B,UAAU,EAAE,UAAU,IAAI,EAAE;YAC5B,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,YAAY,CAAC;YACtF,QAAQ;YACR,IAAI;YACJ,GAAG,EAAE,GAAG;YACR,GAAG,EAAE,GAAG,GAAG,QAAQ;YACnB,GAAG;SACH,CAAC;QAEF,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QAClC,OAAO,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI;QAC5B,2BAA2B;QAC3B,2CAA2C;QAC3C,IAAI,EACJ,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAC5C,MAAM,EACN,OAAO,CACP,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITokenClaims, ScopeType } from \"@fluidframework/driver-definitions/internal\";\nimport { ITokenProvider, ITokenResponse } from \"@fluidframework/routerlicious-driver\";\nimport { KJUR as jsrsasign } from \"jsrsasign\";\nimport { v4 as uuid } from \"uuid\";\n\n/**\n * As the name implies this is not secure and should not be used in production. It simply makes the example easier\n * to get up and running.\n * @internal\n */\nexport class InsecureTinyliciousTokenProvider implements ITokenProvider {\n\tconstructor(\n\t\t/**\n\t\t * Optional. Override of scopes. If a param is not provided, InsecureTinyliciousTokenProvider\n\t\t * will use the default scopes which are document read, write and summarizer write.\n\t\t *\n\t\t * @param scopes - See {@link @fluidframework/protocol-definitions#ITokenClaims.scopes}\n\t\t *\n\t\t * @defaultValue [ ScopeType.DocRead, ScopeType.DocWrite, ScopeType.SummaryWrite ]\n\t\t */\n\t\tprivate readonly scopes?: ScopeType[],\n\t) {}\n\n\tpublic async fetchOrdererToken(tenantId: string, documentId?: string): Promise<ITokenResponse> {\n\t\treturn {\n\t\t\tfromCache: true,\n\t\t\tjwt: this.getSignedToken(tenantId, documentId),\n\t\t};\n\t}\n\n\tpublic async fetchStorageToken(tenantId: string, documentId: string): Promise<ITokenResponse> {\n\t\treturn {\n\t\t\tfromCache: true,\n\t\t\tjwt: this.getSignedToken(tenantId, documentId),\n\t\t};\n\t}\n\n\tprivate getSignedToken(\n\t\ttenantId: string,\n\t\tdocumentId: string | undefined,\n\t\tlifetime: number = 60 * 60,\n\t\tver: string = \"1.0\",\n\t): string {\n\t\tconst userId = uuid();\n\t\tconst match = userId.match(/^([\\da-f]{8})-([\\da-f]{4})/);\n\t\tconst userName = match === null ? userId : match[0]; // Just use the first two segments of the (fake) userId as a fake name.\n\n\t\t// Current time in seconds\n\t\tconst now = Math.round(Date.now() / 1000);\n\t\tconst user = { id: userId, name: userName };\n\n\t\tconst claims: ITokenClaims = {\n\t\t\tdocumentId: documentId ?? \"\",\n\t\t\tscopes: this.scopes ?? [ScopeType.DocRead, ScopeType.DocWrite, ScopeType.SummaryWrite],\n\t\t\ttenantId,\n\t\t\tuser,\n\t\t\tiat: now,\n\t\t\texp: now + lifetime,\n\t\t\tver,\n\t\t};\n\n\t\tconst utf8Key = { utf8: \"12345\" };\n\t\treturn jsrsasign.jws.JWS.sign(\n\t\t\t// External API uses `null`\n\t\t\t// eslint-disable-next-line unicorn/no-null\n\t\t\tnull,\n\t\t\tJSON.stringify({ alg: \"HS256\", typ: \"JWT\" }),\n\t\t\tclaims,\n\t\t\tutf8Key,\n\t\t);\n\t}\n}\n"]}
|
package/lib/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/tinylicious-driver",
|
|
3
|
-
"version": "2.0.0-dev-rc.5.0.0.
|
|
3
|
+
"version": "2.0.0-dev-rc.5.0.0.268409",
|
|
4
4
|
"description": "Driver for tinylicious",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -36,24 +36,23 @@
|
|
|
36
36
|
"main": "lib/index.js",
|
|
37
37
|
"types": "lib/public.d.ts",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@fluidframework/core-interfaces": "2.0.0-dev-rc.5.0.0.
|
|
40
|
-
"@fluidframework/driver-definitions": "2.0.0-dev-rc.5.0.0.
|
|
41
|
-
"@fluidframework/driver-utils": "2.0.0-dev-rc.5.0.0.
|
|
42
|
-
"@fluidframework/
|
|
43
|
-
"@fluidframework/routerlicious-driver": "2.0.0-dev-rc.5.0.0.265721",
|
|
39
|
+
"@fluidframework/core-interfaces": "2.0.0-dev-rc.5.0.0.268409",
|
|
40
|
+
"@fluidframework/driver-definitions": "2.0.0-dev-rc.5.0.0.268409",
|
|
41
|
+
"@fluidframework/driver-utils": "2.0.0-dev-rc.5.0.0.268409",
|
|
42
|
+
"@fluidframework/routerlicious-driver": "2.0.0-dev-rc.5.0.0.268409",
|
|
44
43
|
"jsrsasign": "^11.0.0",
|
|
45
44
|
"uuid": "^9.0.0"
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|
|
48
47
|
"@arethetypeswrong/cli": "^0.15.2",
|
|
49
|
-
"@biomejs/biome": "^1.
|
|
50
|
-
"@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.5.0.0.
|
|
48
|
+
"@biomejs/biome": "^1.7.3",
|
|
49
|
+
"@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.5.0.0.268409",
|
|
51
50
|
"@fluid-tools/build-cli": "^0.39.0-264124",
|
|
52
51
|
"@fluidframework/build-common": "^2.0.3",
|
|
53
52
|
"@fluidframework/build-tools": "^0.39.0-264124",
|
|
54
|
-
"@fluidframework/eslint-config-fluid": "^5.
|
|
53
|
+
"@fluidframework/eslint-config-fluid": "^5.3.0",
|
|
55
54
|
"@fluidframework/tinylicious-driver-previous": "npm:@fluidframework/tinylicious-driver@2.0.0-rc.4.0.0",
|
|
56
|
-
"@microsoft/api-extractor": "^7.
|
|
55
|
+
"@microsoft/api-extractor": "^7.45.1",
|
|
57
56
|
"@types/jsrsasign": "^10.5.12",
|
|
58
57
|
"@types/mocha": "^9.1.1",
|
|
59
58
|
"@types/node": "^18.19.0",
|
|
@@ -64,7 +63,7 @@
|
|
|
64
63
|
"mocha": "^10.2.0",
|
|
65
64
|
"prettier": "~3.0.3",
|
|
66
65
|
"rimraf": "^4.4.0",
|
|
67
|
-
"typescript": "~5.
|
|
66
|
+
"typescript": "~5.4.5"
|
|
68
67
|
},
|
|
69
68
|
"typeValidation": {
|
|
70
69
|
"broken": {}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ITokenClaims, ScopeType } from "@fluidframework/
|
|
6
|
+
import { ITokenClaims, ScopeType } from "@fluidframework/driver-definitions/internal";
|
|
7
7
|
import { ITokenProvider, ITokenResponse } from "@fluidframework/routerlicious-driver";
|
|
8
8
|
import { KJUR as jsrsasign } from "jsrsasign";
|
|
9
9
|
import { v4 as uuid } from "uuid";
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
## API Report File for "@fluidframework/tinylicious-driver"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import { IRequest } from '@fluidframework/core-interfaces';
|
|
8
|
-
import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
|
|
9
|
-
import { ITokenProvider } from '@fluidframework/routerlicious-driver';
|
|
10
|
-
import { ITokenResponse } from '@fluidframework/routerlicious-driver';
|
|
11
|
-
import { IUrlResolver } from '@fluidframework/driver-definitions/internal';
|
|
12
|
-
import { ScopeType } from '@fluidframework/protocol-definitions';
|
|
13
|
-
|
|
14
|
-
// @internal
|
|
15
|
-
export const createTinyliciousCreateNewRequest: (documentId?: string) => IRequest;
|
|
16
|
-
|
|
17
|
-
// @internal
|
|
18
|
-
export const defaultTinyliciousEndpoint = "http://localhost";
|
|
19
|
-
|
|
20
|
-
// @internal
|
|
21
|
-
export const defaultTinyliciousPort = 7070;
|
|
22
|
-
|
|
23
|
-
// @internal
|
|
24
|
-
export class InsecureTinyliciousTokenProvider implements ITokenProvider {
|
|
25
|
-
constructor(
|
|
26
|
-
scopes?: ScopeType[] | undefined);
|
|
27
|
-
// (undocumented)
|
|
28
|
-
fetchOrdererToken(tenantId: string, documentId?: string): Promise<ITokenResponse>;
|
|
29
|
-
// (undocumented)
|
|
30
|
-
fetchStorageToken(tenantId: string, documentId: string): Promise<ITokenResponse>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// @internal
|
|
34
|
-
export class InsecureTinyliciousUrlResolver implements IUrlResolver {
|
|
35
|
-
constructor(port?: number, endpoint?: string);
|
|
36
|
-
// (undocumented)
|
|
37
|
-
getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string): Promise<string>;
|
|
38
|
-
// (undocumented)
|
|
39
|
-
resolve(request: IRequest): Promise<IResolvedUrl>;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// (No @packageDocumentation comment for this package)
|
|
43
|
-
|
|
44
|
-
```
|