@fluidframework/test-runtime-utils 2.80.0 → 2.81.0-374083

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.
@@ -1 +1 @@
1
- {"version":3,"file":"generateToken.d.ts","sourceRoot":"","sources":["../src/generateToken.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAI3F,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;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,aAAa,EACpB,QAAQ,GAAE,MAAgB,EAC1B,GAAG,GAAE,MAAc,GACjB,MAAM,CA4BR;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,aAAa,CAO5C"}
1
+ {"version":3,"file":"generateToken.d.ts","sourceRoot":"","sources":["../src/generateToken.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAI3F,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;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,aAAa,EACpB,QAAQ,GAAE,MAAgB,EAC1B,GAAG,GAAE,MAAc,GACjB,MAAM,CA6BR;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,aAAa,CAO5C"}
@@ -45,6 +45,7 @@ import { v4 as uuid } from "uuid";
45
45
  * Default: `1.0`.
46
46
  */
47
47
  export function generateToken(tenantId, key, scopes, documentId, user, lifetime = 60 * 60, ver = "1.0") {
48
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- using ?? could change behavior for falsy values
48
49
  let userClaim = user ? user : generateUser();
49
50
  if (userClaim.id === "" || userClaim.id === undefined) {
50
51
  userClaim = generateUser();
@@ -1 +1 @@
1
- {"version":3,"file":"generateToken.js","sourceRoot":"","sources":["../src/generateToken.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAIlC;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,aAAa,CAC5B,QAAgB,EAChB,GAAW,EACX,MAAmB,EACnB,UAAmB,EACnB,IAAoB,EACpB,WAAmB,EAAE,GAAG,EAAE,EAC1B,MAAc,KAAK;IAEnB,IAAI,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC;IAC7C,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;IAC1C,MAAM,KAAK,GAAG,UAAU,IAAI,EAAE,CAAC;IAE/B,MAAM,MAAM,GAAmC;QAC9C,UAAU,EAAE,KAAK;QACjB,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;IAC9B,OAAO,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAC5B,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 { ITokenClaims, ScopeType } from \"@fluidframework/driver-definitions/internal\";\nimport { KJUR as jsrsasign } from \"jsrsasign\";\nimport { v4 as uuid } from \"uuid\";\n\nimport { IInsecureUser } from \"./insecureUsers.js\";\n\n/**\n * IMPORTANT: This function is duplicated in ./azure/packages/azure-service-utils/src/generateToken.ts. There is no need\n * 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 */\nexport function generateToken(\n\ttenantId: string,\n\tkey: string,\n\tscopes: ScopeType[],\n\tdocumentId?: string,\n\tuser?: IInsecureUser,\n\tlifetime: number = 60 * 60,\n\tver: string = \"1.0\",\n): string {\n\tlet userClaim = user ? 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\tconst docId = documentId ?? \"\";\n\n\tconst claims: ITokenClaims & { jti: string } = {\n\t\tdocumentId: docId,\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\treturn jsrsasign.jws.JWS.sign(\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 IInsecureUser} by generating a\n * random UUID for its {@link @fluidframework/protocol-definitions#IUser.id | id} and {@link IInsecureUser.name | name} properties.\n */\nexport function generateUser(): IInsecureUser {\n\tconst randomUser = {\n\t\tid: uuid(),\n\t\tname: uuid(),\n\t};\n\n\treturn randomUser;\n}\n"]}
1
+ {"version":3,"file":"generateToken.js","sourceRoot":"","sources":["../src/generateToken.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAIlC;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,aAAa,CAC5B,QAAgB,EAChB,GAAW,EACX,MAAmB,EACnB,UAAmB,EACnB,IAAoB,EACpB,WAAmB,EAAE,GAAG,EAAE,EAC1B,MAAc,KAAK;IAEnB,2HAA2H;IAC3H,IAAI,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC;IAC7C,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;IAC1C,MAAM,KAAK,GAAG,UAAU,IAAI,EAAE,CAAC;IAE/B,MAAM,MAAM,GAAmC;QAC9C,UAAU,EAAE,KAAK;QACjB,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;IAC9B,OAAO,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAC5B,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 { ITokenClaims, ScopeType } from \"@fluidframework/driver-definitions/internal\";\nimport { KJUR as jsrsasign } from \"jsrsasign\";\nimport { v4 as uuid } from \"uuid\";\n\nimport { IInsecureUser } from \"./insecureUsers.js\";\n\n/**\n * IMPORTANT: This function is duplicated in ./azure/packages/azure-service-utils/src/generateToken.ts. There is no need\n * 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 */\nexport function generateToken(\n\ttenantId: string,\n\tkey: string,\n\tscopes: ScopeType[],\n\tdocumentId?: string,\n\tuser?: IInsecureUser,\n\tlifetime: number = 60 * 60,\n\tver: string = \"1.0\",\n): string {\n\t// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- using ?? could change behavior for falsy values\n\tlet userClaim = user ? 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\tconst docId = documentId ?? \"\";\n\n\tconst claims: ITokenClaims & { jti: string } = {\n\t\tdocumentId: docId,\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\treturn jsrsasign.jws.JWS.sign(\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 IInsecureUser} by generating a\n * random UUID for its {@link @fluidframework/protocol-definitions#IUser.id | id} and {@link IInsecureUser.name | name} properties.\n */\nexport function generateUser(): IInsecureUser {\n\tconst randomUser = {\n\t\tid: uuid(),\n\t\tname: uuid(),\n\t};\n\n\treturn randomUser;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/test-runtime-utils",
3
- "version": "2.80.0",
3
+ "version": "2.81.0-374083",
4
4
  "description": "Fluid runtime test utilities",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -69,31 +69,31 @@
69
69
  "temp-directory": "nyc/.nyc_output"
70
70
  },
71
71
  "dependencies": {
72
- "@fluid-internal/client-utils": "~2.80.0",
73
- "@fluidframework/container-definitions": "~2.80.0",
74
- "@fluidframework/container-runtime-definitions": "~2.80.0",
75
- "@fluidframework/core-interfaces": "~2.80.0",
76
- "@fluidframework/core-utils": "~2.80.0",
77
- "@fluidframework/datastore-definitions": "~2.80.0",
78
- "@fluidframework/driver-definitions": "~2.80.0",
79
- "@fluidframework/driver-utils": "~2.80.0",
80
- "@fluidframework/id-compressor": "~2.80.0",
81
- "@fluidframework/routerlicious-driver": "~2.80.0",
82
- "@fluidframework/runtime-definitions": "~2.80.0",
83
- "@fluidframework/runtime-utils": "~2.80.0",
84
- "@fluidframework/telemetry-utils": "~2.80.0",
72
+ "@fluid-internal/client-utils": "2.81.0-374083",
73
+ "@fluidframework/container-definitions": "2.81.0-374083",
74
+ "@fluidframework/container-runtime-definitions": "2.81.0-374083",
75
+ "@fluidframework/core-interfaces": "2.81.0-374083",
76
+ "@fluidframework/core-utils": "2.81.0-374083",
77
+ "@fluidframework/datastore-definitions": "2.81.0-374083",
78
+ "@fluidframework/driver-definitions": "2.81.0-374083",
79
+ "@fluidframework/driver-utils": "2.81.0-374083",
80
+ "@fluidframework/id-compressor": "2.81.0-374083",
81
+ "@fluidframework/routerlicious-driver": "2.81.0-374083",
82
+ "@fluidframework/runtime-definitions": "2.81.0-374083",
83
+ "@fluidframework/runtime-utils": "2.81.0-374083",
84
+ "@fluidframework/telemetry-utils": "2.81.0-374083",
85
85
  "jsrsasign": "^11.0.0",
86
86
  "uuid": "^11.1.0"
87
87
  },
88
88
  "devDependencies": {
89
89
  "@arethetypeswrong/cli": "^0.18.2",
90
90
  "@biomejs/biome": "~1.9.3",
91
- "@fluid-internal/mocha-test-setup": "~2.80.0",
92
- "@fluid-tools/build-cli": "^0.62.0",
91
+ "@fluid-internal/mocha-test-setup": "2.81.0-374083",
92
+ "@fluid-tools/build-cli": "^0.63.0",
93
93
  "@fluidframework/build-common": "^2.0.3",
94
- "@fluidframework/build-tools": "^0.62.0",
95
- "@fluidframework/eslint-config-fluid": "~2.80.0",
96
- "@fluidframework/test-runtime-utils-previous": "npm:@fluidframework/test-runtime-utils@2.74.0",
94
+ "@fluidframework/build-tools": "^0.63.0",
95
+ "@fluidframework/eslint-config-fluid": "2.81.0-374083",
96
+ "@fluidframework/test-runtime-utils-previous": "npm:@fluidframework/test-runtime-utils@2.80.0",
97
97
  "@microsoft/api-extractor": "7.52.11",
98
98
  "@types/jsrsasign": "^10.5.12",
99
99
  "@types/mocha": "^10.0.10",
@@ -739,6 +739,7 @@ export const shortCodeMap = {
739
739
  "0x583": "unexpected field length",
740
740
  "0x584": "response should contain epoch",
741
741
  "0x585": "prefetched snapshot should have a valid epoch",
742
+ "0x587": "Unreachable unless manually accumulating a batch",
742
743
  "0x58a": "Batch must have a reference sequence number if non-empty",
743
744
  "0x58b": "Content offset within bounds",
744
745
  "0x58c": "Content offset equal or larger than content length",
@@ -1375,6 +1376,8 @@ export const shortCodeMap = {
1375
1376
  "0xa33": "clientId (from stateHandler) could only be undefined if we've never connected, but we have a CSN so we know that's not the case",
1376
1377
  "0xa34": "Should have found the batchId in batchIdBySeqNum map",
1377
1378
  "0xa35": "batchIdsAll and batchIdsBySeqNum should be in sync",
1379
+ "0xa3a": "Presence received signal without clientId",
1380
+ "0xa3c": "Already have entry for key in map",
1378
1381
  "0xa3d": "Partial batch should have exactly one message",
1379
1382
  "0xa3e": "Empty batch is always considered a full batch",
1380
1383
  "0xa3f": "segments cannot be undefined",
@@ -1397,6 +1400,8 @@ export const shortCodeMap = {
1397
1400
  "0xa54": "out of schema: unexpected value",
1398
1401
  "0xa55": "missing simple tree context",
1399
1402
  "0xa57": "Expected EagerMapTree required field to have a value",
1403
+ "0xa59": "Client connected without clientId",
1404
+ "0xa5a": "Mismatched SessionId",
1400
1405
  "0xa5b": "must have exactly 1 field in batch",
1401
1406
  "0xa5c": "Unexpected view implementation",
1402
1407
  "0xa5d": "Shared branches cannot be rebased onto another branch.",
@@ -1453,6 +1458,7 @@ export const shortCodeMap = {
1453
1458
  "0xaaa": "All local changes should be applied to the trunk before loading from summary",
1454
1459
  "0xaab": "must be segment leaf",
1455
1460
  "0xaac": "must have removedClient ids",
1461
+ "0xaad": "Local client should be 'Disconnected' before adding new connection.",
1456
1462
  "0xaae": "Maps should have the same behavior",
1457
1463
  "0xaaf": "Unexpected undefined code point",
1458
1464
  "0xab1": "Debug asserts cannot be configured since they have been optimized out.",
@@ -1893,5 +1899,22 @@ export const shortCodeMap = {
1893
1899
  "0xcac": "Unexpected branch implementation",
1894
1900
  "0xcad": "Unexpected branch implementation",
1895
1901
  "0xcae": "The outer transaction should be ending",
1896
- "0xcaf": "Unexpected commit in transaction"
1902
+ "0xcaf": "Unexpected commit in transaction",
1903
+ "0xcb0": "must initializeData first",
1904
+ "0xcb1": "Presence is only expected to be accessed with a single version.",
1905
+ "0xcb2": "Presence is only expected to be accessed with a single version.",
1906
+ "0xcb3": "Node cannot be raw.",
1907
+ "0xcb4": "Unexpected node kind",
1908
+ "0xcb5": "Node cannot be raw.",
1909
+ "0xcb6": "Expected node to be on new fork.",
1910
+ "0xcb7": "Unexpected node schema",
1911
+ "0xcb8": "No config map entry for version",
1912
+ "0xcb9": "Invalid package version",
1913
+ "0xcba": "Self is not in audience and no alternateProvider given",
1914
+ "0xcbb": "Client connection update missing",
1915
+ "0xcbc": "Unrecognized message type in critical message",
1916
+ "0xcbd": "Received signal without clientId",
1917
+ "0xcbe": "Acknowledgment message was requested while targeted signal capability is not supported",
1918
+ "0xcbf": "Received signal without clientId",
1919
+ "0xcc0": "Local client must be in audience for presence to handle added connection."
1897
1920
  };
@@ -59,6 +59,7 @@ export function generateToken(
59
59
  lifetime: number = 60 * 60,
60
60
  ver: string = "1.0",
61
61
  ): string {
62
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- using ?? could change behavior for falsy values
62
63
  let userClaim = user ? user : generateUser();
63
64
  if (userClaim.id === "" || userClaim.id === undefined) {
64
65
  userClaim = generateUser();
package/.eslintrc.cjs DELETED
@@ -1,32 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
-
6
- module.exports = {
7
- extends: [
8
- require.resolve("@fluidframework/eslint-config-fluid/minimal-deprecated"),
9
- "prettier",
10
- ],
11
- parserOptions: {
12
- project: ["./tsconfig.json", "./src/test/tsconfig.json"],
13
- },
14
- rules: {
15
- "@typescript-eslint/strict-boolean-expressions": "off",
16
- },
17
- overrides: [
18
- {
19
- // The assertion shortcode map file is auto-generated, so disable some rules.
20
- files: ["src/assertionShortCodesMap.ts"],
21
- rules: {
22
- "@typescript-eslint/comma-dangle": "off",
23
- },
24
- },
25
- {
26
- files: ["src/test/**"],
27
- rules: {
28
- "import-x/no-nodejs-modules": "off",
29
- },
30
- },
31
- ],
32
- };