@fluidframework/azure-service-utils 2.0.2 → 2.1.0-276326
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-extractor/api-extractor.legacy.json +4 -0
- package/api-report/azure-service-utils.beta.api.md +0 -3
- package/api-report/{azure-service-utils.alpha.api.md → azure-service-utils.legacy.alpha.api.md} +2 -3
- package/api-report/azure-service-utils.public.api.md +0 -3
- package/dist/generateToken.d.ts +1 -0
- package/dist/generateToken.d.ts.map +1 -1
- package/dist/generateToken.js +1 -0
- package/dist/generateToken.js.map +1 -1
- package/dist/legacy.d.ts +1 -1
- package/lib/generateToken.d.ts +1 -0
- package/lib/generateToken.d.ts.map +1 -1
- package/lib/generateToken.js +1 -0
- package/lib/generateToken.js.map +1 -1
- package/lib/legacy.d.ts +1 -1
- package/package.json +13 -9
- package/src/generateToken.ts +1 -0
package/api-report/{azure-service-utils.alpha.api.md → azure-service-utils.legacy.alpha.api.md}
RENAMED
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
|
-
import { IUser } from '@fluidframework/driver-definitions';
|
|
8
|
-
import { ScopeType } from '@fluidframework/driver-definitions/internal';
|
|
9
|
-
|
|
10
7
|
// @alpha
|
|
11
8
|
export function generateToken(tenantId: string, key: string, scopes: ScopeType[], documentId?: string, user?: IUser, lifetime?: number, ver?: string): string;
|
|
12
9
|
|
|
@@ -14,4 +11,6 @@ export { IUser }
|
|
|
14
11
|
|
|
15
12
|
export { ScopeType }
|
|
16
13
|
|
|
14
|
+
// (No @packageDocumentation comment for this package)
|
|
15
|
+
|
|
17
16
|
```
|
package/dist/generateToken.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ import type { ScopeType } from "@fluidframework/driver-definitions/internal";
|
|
|
44
44
|
* @param ver - See {@link @fluidframework/protocol-definitions#ITokenClaims.ver}.
|
|
45
45
|
* Default: `1.0`.
|
|
46
46
|
*
|
|
47
|
+
* @legacy
|
|
47
48
|
* @alpha
|
|
48
49
|
*/
|
|
49
50
|
export declare function generateToken(tenantId: string, key: string, scopes: ScopeType[], documentId?: string, user?: IUser, lifetime?: number, ver?: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateToken.d.ts","sourceRoot":"","sources":["../src/generateToken.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAI3F;;;;;;;;;;;;;;;GAeG;AAEH
|
|
1
|
+
{"version":3,"file":"generateToken.d.ts","sourceRoot":"","sources":["../src/generateToken.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAI3F;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,aAAa,CAC5B,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,SAAS,EAAE,EACnB,UAAU,CAAC,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,KAAK,EACZ,QAAQ,GAAE,MAAgB,EAG1B,GAAG,GAAE,MAAc,GACjB,MAAM,CA8BR;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,KAAK,CAOpC"}
|
package/dist/generateToken.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateToken.js","sourceRoot":"","sources":["../src/generateToken.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,yCAA8C;AAC9C,+BAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH
|
|
1
|
+
{"version":3,"file":"generateToken.js","sourceRoot":"","sources":["../src/generateToken.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,yCAA8C;AAC9C,+BAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,SAAgB,aAAa,CAC5B,QAAgB,EAChB,GAAW,EACX,MAAmB,EACnB,UAAmB,EACnB,IAAY,EACZ,WAAmB,EAAE,GAAG,EAAE;AAC1B,8CAA8C;AAC9C,yDAAyD;AACzD,MAAc,KAAK;IAEnB,IAAI,SAAS,GAAG,IAAI,IAAI,YAAY,EAAE,CAAC;IACvC,IAAI,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,SAAS,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;QACvD,SAAS,GAAG,YAAY,EAAE,CAAC;IAC5B,CAAC;IAED,0BAA0B;IAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;IAE1C,MAAM,MAAM,GAAmC;QAC9C,UAAU,EAAE,UAAU,IAAI,EAAE;QAC5B,MAAM;QACN,QAAQ;QACR,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG,GAAG,QAAQ;QACnB,GAAG;QACH,GAAG,EAAE,IAAA,SAAI,GAAE;KACX,CAAC;IAEF,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;IAE9B,OAAO,gBAAS,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI;IAC5B,yBAAyB;IACzB,2CAA2C;IAC3C,IAAI,EACJ,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAC5C,MAAM,EACN,OAAO,CACP,CAAC;AACH,CAAC;AAxCD,sCAwCC;AAED;;;GAGG;AACH,SAAgB,YAAY;IAC3B,MAAM,UAAU,GAAG;QAClB,EAAE,EAAE,IAAA,SAAI,GAAE;QACV,IAAI,EAAE,IAAA,SAAI,GAAE;KACZ,CAAC;IAEF,OAAO,UAAU,CAAC;AACnB,CAAC;AAPD,oCAOC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IUser } from \"@fluidframework/driver-definitions\";\nimport type { ITokenClaims, ScopeType } from \"@fluidframework/driver-definitions/internal\";\nimport { KJUR as jsrsasign } from \"jsrsasign\";\nimport { v4 as uuid } from \"uuid\";\n\n/**\n * IMPORTANT: This function is duplicated in ./packages/runtime/test-runtime-utils/src/generateToken.ts. There is no\n * need for different implementations, so they should be kept in sync if changes are needed.\n *\n * The reason they are duplicated is because we don't want the core Fluid libraries depending on the Azure libraries\n * (enforced by layer-check), but both need to expose this function. The test-runtime-utils library is a test lib, which\n * layer-check (correctly) reuires only be used as a dev dependency. But in the azure case, we want the function\n * exported, so it needs to be sourced from either the package itself or a non-dev dependency.\n *\n * The previous solution to this was to import the function from azure-service-utils into test-runtime-utils, but that\n * no longer works because the azure packages are in a separate release group.\n *\n * If a token needs to be generated on the client side, you should re-use this function. If you need service-side token\n * generation, you should use the function available in the server-services-client package in order to avoid\n * interdependencies between service and client packages.\n */\n\n/**\n * Generates a {@link https://en.wikipedia.org/wiki/JSON_Web_Token | JSON Web Token} (JWT)\n * to authorize access to a Routerlicious-based Fluid service.\n *\n * @remarks Note: this function uses a browser friendly auth library\n * ({@link https://www.npmjs.com/package/jsrsasign | jsrsasign}) and may only be used in client (browser) context.\n * It is **not** Node.js-compatible.\n *\n * @param tenantId - See {@link @fluidframework/protocol-definitions#ITokenClaims.tenantId}\n * @param key - API key to authenticate user. Must be {@link https://en.wikipedia.org/wiki/UTF-8 | UTF-8}-encoded.\n * @param scopes - See {@link @fluidframework/protocol-definitions#ITokenClaims.scopes}\n * @param documentId - See {@link @fluidframework/protocol-definitions#ITokenClaims.documentId}.\n * If not specified, the token will not be associated with a document, and an empty string will be used.\n * @param user - User with whom generated tokens will be associated.\n * If not specified, the token will not be associated with a user, and a randomly generated mock user will be\n * used instead.\n * See {@link @fluidframework/protocol-definitions#ITokenClaims.user}\n * @param lifetime - Used to generate the {@link @fluidframework/protocol-definitions#ITokenClaims.exp | expiration}.\n * Expiration = now + lifetime.\n * Expressed in seconds.\n * Default: 3600 (1 hour).\n * @param ver - See {@link @fluidframework/protocol-definitions#ITokenClaims.ver}.\n * Default: `1.0`.\n *\n * @legacy\n * @alpha\n */\nexport function generateToken(\n\ttenantId: string,\n\tkey: string,\n\tscopes: ScopeType[],\n\tdocumentId?: string,\n\tuser?: IUser,\n\tlifetime: number = 60 * 60,\n\t// Naming intended to match `ITokenClaims.ver`\n\t// eslint-disable-next-line unicorn/prevent-abbreviations\n\tver: string = \"1.0\",\n): string {\n\tlet userClaim = user ?? generateUser();\n\tif (userClaim.id === \"\" || userClaim.id === undefined) {\n\t\tuserClaim = generateUser();\n\t}\n\n\t// Current time in seconds\n\tconst now = Math.round(Date.now() / 1000);\n\n\tconst claims: ITokenClaims & { jti: string } = {\n\t\tdocumentId: documentId ?? \"\",\n\t\tscopes,\n\t\ttenantId,\n\t\tuser: userClaim,\n\t\tiat: now,\n\t\texp: now + lifetime,\n\t\tver,\n\t\tjti: uuid(),\n\t};\n\n\tconst utf8Key = { utf8: key };\n\n\treturn jsrsasign.jws.JWS.sign(\n\t\t// External API uses null\n\t\t// eslint-disable-next-line unicorn/no-null\n\t\tnull,\n\t\tJSON.stringify({ alg: \"HS256\", typ: \"JWT\" }),\n\t\tclaims,\n\t\tutf8Key,\n\t);\n}\n\n/**\n * Generates an arbitrary (\"random\") {@link @fluidframework/protocol-definitions#IUser} by generating a\n * random UUID for its {@link @fluidframework/protocol-definitions#IUser.id} and `name` properties.\n */\nexport function generateUser(): IUser {\n\tconst randomUser = {\n\t\tid: uuid(),\n\t\tname: uuid(),\n\t};\n\n\treturn randomUser;\n}\n"]}
|
package/dist/legacy.d.ts
CHANGED
package/lib/generateToken.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ import type { ScopeType } from "@fluidframework/driver-definitions/internal";
|
|
|
44
44
|
* @param ver - See {@link @fluidframework/protocol-definitions#ITokenClaims.ver}.
|
|
45
45
|
* Default: `1.0`.
|
|
46
46
|
*
|
|
47
|
+
* @legacy
|
|
47
48
|
* @alpha
|
|
48
49
|
*/
|
|
49
50
|
export declare function generateToken(tenantId: string, key: string, scopes: ScopeType[], documentId?: string, user?: IUser, lifetime?: number, ver?: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateToken.d.ts","sourceRoot":"","sources":["../src/generateToken.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAI3F;;;;;;;;;;;;;;;GAeG;AAEH
|
|
1
|
+
{"version":3,"file":"generateToken.d.ts","sourceRoot":"","sources":["../src/generateToken.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAI3F;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,aAAa,CAC5B,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,SAAS,EAAE,EACnB,UAAU,CAAC,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,KAAK,EACZ,QAAQ,GAAE,MAAgB,EAG1B,GAAG,GAAE,MAAc,GACjB,MAAM,CA8BR;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,KAAK,CAOpC"}
|
package/lib/generateToken.js
CHANGED
|
@@ -44,6 +44,7 @@ import { v4 as uuid } from "uuid";
|
|
|
44
44
|
* @param ver - See {@link @fluidframework/protocol-definitions#ITokenClaims.ver}.
|
|
45
45
|
* Default: `1.0`.
|
|
46
46
|
*
|
|
47
|
+
* @legacy
|
|
47
48
|
* @alpha
|
|
48
49
|
*/
|
|
49
50
|
export function generateToken(tenantId, key, scopes, documentId, user, lifetime = 60 * 60,
|
package/lib/generateToken.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateToken.js","sourceRoot":"","sources":["../src/generateToken.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH
|
|
1
|
+
{"version":3,"file":"generateToken.js","sourceRoot":"","sources":["../src/generateToken.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,aAAa,CAC5B,QAAgB,EAChB,GAAW,EACX,MAAmB,EACnB,UAAmB,EACnB,IAAY,EACZ,WAAmB,EAAE,GAAG,EAAE;AAC1B,8CAA8C;AAC9C,yDAAyD;AACzD,MAAc,KAAK;IAEnB,IAAI,SAAS,GAAG,IAAI,IAAI,YAAY,EAAE,CAAC;IACvC,IAAI,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,SAAS,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;QACvD,SAAS,GAAG,YAAY,EAAE,CAAC;IAC5B,CAAC;IAED,0BAA0B;IAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;IAE1C,MAAM,MAAM,GAAmC;QAC9C,UAAU,EAAE,UAAU,IAAI,EAAE;QAC5B,MAAM;QACN,QAAQ;QACR,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,GAAG,GAAG,QAAQ;QACnB,GAAG;QACH,GAAG,EAAE,IAAI,EAAE;KACX,CAAC;IAEF,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;IAE9B,OAAO,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI;IAC5B,yBAAyB;IACzB,2CAA2C;IAC3C,IAAI,EACJ,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAC5C,MAAM,EACN,OAAO,CACP,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY;IAC3B,MAAM,UAAU,GAAG;QAClB,EAAE,EAAE,IAAI,EAAE;QACV,IAAI,EAAE,IAAI,EAAE;KACZ,CAAC;IAEF,OAAO,UAAU,CAAC;AACnB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IUser } from \"@fluidframework/driver-definitions\";\nimport type { ITokenClaims, ScopeType } from \"@fluidframework/driver-definitions/internal\";\nimport { KJUR as jsrsasign } from \"jsrsasign\";\nimport { v4 as uuid } from \"uuid\";\n\n/**\n * IMPORTANT: This function is duplicated in ./packages/runtime/test-runtime-utils/src/generateToken.ts. There is no\n * need for different implementations, so they should be kept in sync if changes are needed.\n *\n * The reason they are duplicated is because we don't want the core Fluid libraries depending on the Azure libraries\n * (enforced by layer-check), but both need to expose this function. The test-runtime-utils library is a test lib, which\n * layer-check (correctly) reuires only be used as a dev dependency. But in the azure case, we want the function\n * exported, so it needs to be sourced from either the package itself or a non-dev dependency.\n *\n * The previous solution to this was to import the function from azure-service-utils into test-runtime-utils, but that\n * no longer works because the azure packages are in a separate release group.\n *\n * If a token needs to be generated on the client side, you should re-use this function. If you need service-side token\n * generation, you should use the function available in the server-services-client package in order to avoid\n * interdependencies between service and client packages.\n */\n\n/**\n * Generates a {@link https://en.wikipedia.org/wiki/JSON_Web_Token | JSON Web Token} (JWT)\n * to authorize access to a Routerlicious-based Fluid service.\n *\n * @remarks Note: this function uses a browser friendly auth library\n * ({@link https://www.npmjs.com/package/jsrsasign | jsrsasign}) and may only be used in client (browser) context.\n * It is **not** Node.js-compatible.\n *\n * @param tenantId - See {@link @fluidframework/protocol-definitions#ITokenClaims.tenantId}\n * @param key - API key to authenticate user. Must be {@link https://en.wikipedia.org/wiki/UTF-8 | UTF-8}-encoded.\n * @param scopes - See {@link @fluidframework/protocol-definitions#ITokenClaims.scopes}\n * @param documentId - See {@link @fluidframework/protocol-definitions#ITokenClaims.documentId}.\n * If not specified, the token will not be associated with a document, and an empty string will be used.\n * @param user - User with whom generated tokens will be associated.\n * If not specified, the token will not be associated with a user, and a randomly generated mock user will be\n * used instead.\n * See {@link @fluidframework/protocol-definitions#ITokenClaims.user}\n * @param lifetime - Used to generate the {@link @fluidframework/protocol-definitions#ITokenClaims.exp | expiration}.\n * Expiration = now + lifetime.\n * Expressed in seconds.\n * Default: 3600 (1 hour).\n * @param ver - See {@link @fluidframework/protocol-definitions#ITokenClaims.ver}.\n * Default: `1.0`.\n *\n * @legacy\n * @alpha\n */\nexport function generateToken(\n\ttenantId: string,\n\tkey: string,\n\tscopes: ScopeType[],\n\tdocumentId?: string,\n\tuser?: IUser,\n\tlifetime: number = 60 * 60,\n\t// Naming intended to match `ITokenClaims.ver`\n\t// eslint-disable-next-line unicorn/prevent-abbreviations\n\tver: string = \"1.0\",\n): string {\n\tlet userClaim = user ?? generateUser();\n\tif (userClaim.id === \"\" || userClaim.id === undefined) {\n\t\tuserClaim = generateUser();\n\t}\n\n\t// Current time in seconds\n\tconst now = Math.round(Date.now() / 1000);\n\n\tconst claims: ITokenClaims & { jti: string } = {\n\t\tdocumentId: documentId ?? \"\",\n\t\tscopes,\n\t\ttenantId,\n\t\tuser: userClaim,\n\t\tiat: now,\n\t\texp: now + lifetime,\n\t\tver,\n\t\tjti: uuid(),\n\t};\n\n\tconst utf8Key = { utf8: key };\n\n\treturn jsrsasign.jws.JWS.sign(\n\t\t// External API uses null\n\t\t// eslint-disable-next-line unicorn/no-null\n\t\tnull,\n\t\tJSON.stringify({ alg: \"HS256\", typ: \"JWT\" }),\n\t\tclaims,\n\t\tutf8Key,\n\t);\n}\n\n/**\n * Generates an arbitrary (\"random\") {@link @fluidframework/protocol-definitions#IUser} by generating a\n * random UUID for its {@link @fluidframework/protocol-definitions#IUser.id} and `name` properties.\n */\nexport function generateUser(): IUser {\n\tconst randomUser = {\n\t\tid: uuid(),\n\t\tname: uuid(),\n\t};\n\n\treturn randomUser;\n}\n"]}
|
package/lib/legacy.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/azure-service-utils",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0-276326",
|
|
4
4
|
"description": "Helper service-side utilities for connecting to Azure Fluid Relay service",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/microsoft/FluidFramework.git",
|
|
9
|
-
"directory": "packages/
|
|
9
|
+
"directory": "azure/packages/azure-service-utils"
|
|
10
10
|
},
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"author": "Microsoft and contributors",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"main": "lib/index.js",
|
|
48
48
|
"types": "lib/public.d.ts",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@fluidframework/driver-definitions": "
|
|
50
|
+
"@fluidframework/driver-definitions": "2.1.0-276326",
|
|
51
51
|
"jsrsasign": "^11.0.0",
|
|
52
52
|
"uuid": "^9.0.0"
|
|
53
53
|
},
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@arethetypeswrong/cli": "^0.15.2",
|
|
56
56
|
"@biomejs/biome": "^1.7.3",
|
|
57
57
|
"@fluid-tools/build-cli": "^0.39.0",
|
|
58
|
-
"@fluidframework/azure-service-utils-previous": "npm:@fluidframework/azure-service-utils@2.0.0-rc.
|
|
58
|
+
"@fluidframework/azure-service-utils-previous": "npm:@fluidframework/azure-service-utils@2.0.0-rc.5.0.0",
|
|
59
59
|
"@fluidframework/build-common": "^2.0.3",
|
|
60
60
|
"@fluidframework/build-tools": "^0.39.0",
|
|
61
61
|
"@fluidframework/eslint-config-fluid": "^5.3.0",
|
|
@@ -75,12 +75,14 @@
|
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"api": "fluid-build . --task api",
|
|
78
|
-
"api-extractor:commonjs": "flub generate entrypoints --
|
|
79
|
-
"api-extractor:esnext": "flub generate entrypoints --
|
|
78
|
+
"api-extractor:commonjs": "flub generate entrypoints --outDir ./dist",
|
|
79
|
+
"api-extractor:esnext": "flub generate entrypoints --outDir ./lib --node10TypeCompat",
|
|
80
80
|
"build": "fluid-build . --task build",
|
|
81
81
|
"build:commonjs": "fluid-build . --task commonjs",
|
|
82
82
|
"build:compile": "fluid-build . --task compile",
|
|
83
|
-
"build:docs": "
|
|
83
|
+
"build:docs": "concurrently \"npm:build:docs:*\"",
|
|
84
|
+
"build:docs:current": "api-extractor run --local",
|
|
85
|
+
"build:docs:legacy": "api-extractor run --local --config api-extractor/api-extractor.legacy.json",
|
|
84
86
|
"build:esnext": "tsc --project ./tsconfig.json",
|
|
85
87
|
"build:test": "npm run build:test:esm && npm run build:test:cjs",
|
|
86
88
|
"build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
|
|
@@ -95,7 +97,9 @@
|
|
|
95
97
|
"check:exports:esm:public": "api-extractor run --config api-extractor/api-extractor-lint-public.esm.json",
|
|
96
98
|
"check:format": "npm run check:biome",
|
|
97
99
|
"check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
|
|
98
|
-
"ci:build:docs": "
|
|
100
|
+
"ci:build:docs": "concurrently \"npm:ci:build:docs:*\"",
|
|
101
|
+
"ci:build:docs:current": "api-extractor run",
|
|
102
|
+
"ci:build:docs:legacy": "api-extractor run --config api-extractor/api-extractor.legacy.json",
|
|
99
103
|
"clean": "rimraf --glob dist lib \"*.d.ts\" \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp",
|
|
100
104
|
"eslint": "eslint --format stylish src",
|
|
101
105
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
@@ -106,7 +110,7 @@
|
|
|
106
110
|
"lint:fix": "fluid-build . --task eslint:fix --task format",
|
|
107
111
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
108
112
|
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
|
|
109
|
-
"typetests:gen": "flub generate typetests --dir . -v
|
|
113
|
+
"typetests:gen": "flub generate typetests --dir . -v",
|
|
110
114
|
"typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
|
|
111
115
|
}
|
|
112
116
|
}
|