From 8d831b52c2185a7341af708f51afa4fc64ad902f Mon Sep 17 00:00:00 2001 From: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Date: Tue, 7 Jun 2022 23:16:10 +0000 Subject: [PATCH 01/16] docs: Simplify type docs --- packages/drivers/routerlicious-driver/src/tokens.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/drivers/routerlicious-driver/src/tokens.ts b/packages/drivers/routerlicious-driver/src/tokens.ts index 5b1f2a296efc..165843f07a26 100644 --- a/packages/drivers/routerlicious-driver/src/tokens.ts +++ b/packages/drivers/routerlicious-driver/src/tokens.ts @@ -21,8 +21,7 @@ export interface ITokenResponse { } /** - * The ITokenProvider abstracts the token fetching mechanism for a host. Host will be responsible for - * implementing the interfaces. + * Abstracts the token fetching mechanism for a host. Host will be responsible for implementing the interfaces. */ export interface ITokenProvider { /** From eedecd3b3a04bca53addfe4c23f65b724a04e472 Mon Sep 17 00:00:00 2001 From: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Date: Tue, 7 Jun 2022 23:18:45 +0000 Subject: [PATCH 02/16] docs: API doc improvements and TODOs --- .../test-client-utils/src/generateTestUser.ts | 4 +++- .../src/insecureTokenProvider.ts | 18 ++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/framework/test-client-utils/src/generateTestUser.ts b/packages/framework/test-client-utils/src/generateTestUser.ts index e3169bbac64b..89efe7ce902b 100644 --- a/packages/framework/test-client-utils/src/generateTestUser.ts +++ b/packages/framework/test-client-utils/src/generateTestUser.ts @@ -7,7 +7,9 @@ import generateName from "sillyname"; import { v4 as uuid } from "uuid"; /** - * Create a new user object with a unique id (uuid) and random name (FIRST LAST) + * Create a new user object with a unique id + * ({@link https://en.wikipedia.org/wiki/Universally_unique_identifier | uuid}) and random name (FIRST LAST) + * * @returns a user object with a name and id property */ export const generateTestUser = (): IUser & { name: string; } => { diff --git a/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts b/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts index de4dfd12e03a..5f89a5b51b4f 100644 --- a/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts +++ b/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts @@ -8,17 +8,28 @@ import { ITokenProvider, ITokenResponse } from "@fluidframework/routerlicious-dr import { generateToken } from "./generateToken"; /** - * As the name implies this is not secure and should not be used in production. It simply makes the example easier - * to get up and running. + * {@link @fluidframework/routerlicious-driver#ITokenProvider} intended for **test use only**. + * As the name implies this is not secure and should not be used in production. + * It simply makes the example easier to get up and running. */ export class InsecureTokenProvider implements ITokenProvider { constructor( + /** + * TODO + */ private readonly tenantKey: string, + + /** + * TODO + */ private readonly user: IUser, ) { } + /** + * {@inheritDoc @fluidframework/routerlicious-driver#ITokenProvider.fetchOrdererToken} + */ public async fetchOrdererToken(tenantId: string, documentId?: string): Promise { return { fromCache: true, @@ -36,6 +47,9 @@ export class InsecureTokenProvider implements ITokenProvider { }; } + /** + * {@inheritDoc @fluidframework/routerlicious-driver#ITokenProvider.fetchStorageToken} + */ public async fetchStorageToken(tenantId: string, documentId: string): Promise { return { fromCache: true, From d65419ca1fdb364f2d960ae8c23ad60e6f5a9aca Mon Sep 17 00:00:00 2001 From: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Date: Tue, 7 Jun 2022 23:20:06 +0000 Subject: [PATCH 03/16] docs: Add TODO --- common/lib/protocol-definitions/src/users.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/lib/protocol-definitions/src/users.ts b/common/lib/protocol-definitions/src/users.ts index 223b6c85e162..6612bf2fe9e0 100644 --- a/common/lib/protocol-definitions/src/users.ts +++ b/common/lib/protocol-definitions/src/users.ts @@ -7,5 +7,8 @@ * Base user definition. It is valid to extend this interface when adding new details to the user object. */ export interface IUser { + /** + * TODO + */ id: string; } From ca108543d3c7cce7014842cb168e9a2bd64935c6 Mon Sep 17 00:00:00 2001 From: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Date: Tue, 7 Jun 2022 23:41:32 +0000 Subject: [PATCH 04/16] docs: Fill in TODO --- .../runtime/test-runtime-utils/src/insecureTokenProvider.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts b/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts index 5f89a5b51b4f..e1c9a89d93f7 100644 --- a/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts +++ b/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts @@ -20,7 +20,8 @@ export class InsecureTokenProvider implements ITokenProvider { private readonly tenantKey: string, /** - * TODO + * User with whom generated tokens will be associated. + * @see {@link generateToken}. */ private readonly user: IUser, ) { From 781a79aff303eedef7e545c6f2e33e5138134745 Mon Sep 17 00:00:00 2001 From: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Date: Wed, 8 Jun 2022 00:04:57 +0000 Subject: [PATCH 05/16] docs: Remove bad link --- packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts b/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts index e1c9a89d93f7..d94943e541aa 100644 --- a/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts +++ b/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts @@ -21,7 +21,6 @@ export class InsecureTokenProvider implements ITokenProvider { /** * User with whom generated tokens will be associated. - * @see {@link generateToken}. */ private readonly user: IUser, ) { From 1204d4f593e059ace6f8d0d81b2ab52f5cfb5dc3 Mon Sep 17 00:00:00 2001 From: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Date: Wed, 8 Jun 2022 00:08:28 +0000 Subject: [PATCH 06/16] docs: Update API report --- api-report/test-runtime-utils.api.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api-report/test-runtime-utils.api.md b/api-report/test-runtime-utils.api.md index 93828c699737..b4aa49f52a66 100644 --- a/api-report/test-runtime-utils.api.md +++ b/api-report/test-runtime-utils.api.md @@ -67,7 +67,9 @@ export interface IMockContainerRuntimePendingMessage { // @public export class InsecureTokenProvider implements ITokenProvider { - constructor(tenantKey: string, user: IUser); + constructor( + tenantKey: string, + user: IUser); // (undocumented) fetchOrdererToken(tenantId: string, documentId?: string): Promise; // (undocumented) From 1df0c15fc12d61dae10cd6fd4ded6f926102a75d Mon Sep 17 00:00:00 2001 From: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Date: Wed, 8 Jun 2022 18:42:31 +0000 Subject: [PATCH 07/16] docs: Update API report --- .../protocol-definitions/api-report/protocol-definitions.api.md | 1 - 1 file changed, 1 deletion(-) diff --git a/common/lib/protocol-definitions/api-report/protocol-definitions.api.md b/common/lib/protocol-definitions/api-report/protocol-definitions.api.md index 77d7d3f3aa63..bae43d077168 100644 --- a/common/lib/protocol-definitions/api-report/protocol-definitions.api.md +++ b/common/lib/protocol-definitions/api-report/protocol-definitions.api.md @@ -590,7 +590,6 @@ export interface IUploadedSummaryDetails { // @public export interface IUser { - // (undocumented) id: string; } From 68ca660b80a258472624b959c23d1dbaba968a3b Mon Sep 17 00:00:00 2001 From: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Date: Mon, 13 Jun 2022 13:20:40 -0700 Subject: [PATCH 08/16] docs: Update comment (code review suggestion) Co-authored-by: Skyler Jokiel --- common/lib/protocol-definitions/src/users.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/protocol-definitions/src/users.ts b/common/lib/protocol-definitions/src/users.ts index 6612bf2fe9e0..b166f89613b6 100644 --- a/common/lib/protocol-definitions/src/users.ts +++ b/common/lib/protocol-definitions/src/users.ts @@ -8,7 +8,7 @@ */ export interface IUser { /** - * TODO + * Unique identifier of the user session. This id is established on each connection with the service. */ id: string; } From e9c69bc891ce24465128e6f84e21b7db17961aaa Mon Sep 17 00:00:00 2001 From: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Date: Mon, 13 Jun 2022 15:41:45 -0700 Subject: [PATCH 09/16] docs: Update capitalization (code review suggestion) Co-authored-by: Tyler Butler --- common/lib/protocol-definitions/src/users.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/protocol-definitions/src/users.ts b/common/lib/protocol-definitions/src/users.ts index b166f89613b6..4da364589db2 100644 --- a/common/lib/protocol-definitions/src/users.ts +++ b/common/lib/protocol-definitions/src/users.ts @@ -8,7 +8,7 @@ */ export interface IUser { /** - * Unique identifier of the user session. This id is established on each connection with the service. + * Unique identifier of the user session. This ID is established on each connection with the service. */ id: string; } From 61bb9b4a7c5713530a43503a8127f6a45e0d46b6 Mon Sep 17 00:00:00 2001 From: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Date: Mon, 13 Jun 2022 15:42:39 -0700 Subject: [PATCH 10/16] docs: Update comment (code review suggestion) Co-authored-by: Tyler Butler --- .../runtime/test-runtime-utils/src/insecureTokenProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts b/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts index d94943e541aa..b323210487bc 100644 --- a/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts +++ b/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts @@ -10,7 +10,7 @@ import { generateToken } from "./generateToken"; /** * {@link @fluidframework/routerlicious-driver#ITokenProvider} intended for **test use only**. * As the name implies this is not secure and should not be used in production. - * It simply makes the example easier to get up and running. + * It simply makes examples where authentication is not relevant easier to bootstrap. */ export class InsecureTokenProvider implements ITokenProvider { constructor( From 3e31eba54da544745b160b33e0f5fba41d535fb5 Mon Sep 17 00:00:00 2001 From: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Date: Fri, 17 Jun 2022 20:24:42 +0000 Subject: [PATCH 11/16] docs: Add `routerlicious-driver` to published docs to allow inheritDoc tags to pull in contents as desired. --- docs/rollup-api-data.js | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/rollup-api-data.js b/docs/rollup-api-data.js index 1dfc386ca24f..d2d0c968ae07 100644 --- a/docs/rollup-api-data.js +++ b/docs/rollup-api-data.js @@ -20,6 +20,7 @@ const websitePackages = [ "@fluidframework/map", "@fluidframework/sequence", "@fluidframework/fluid-static", + "@fluidframework/routerlicious-driver", "@fluidframework/test-client-utils", "@fluidframework/tinylicious-client", ]; From d992104dd136fd7f2d95e7646b2c84fc232818d2 Mon Sep 17 00:00:00 2001 From: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Date: Fri, 17 Jun 2022 15:00:18 -0700 Subject: [PATCH 12/16] docs: Clarify type docs (code review feedback) Co-authored-by: Skyler Jokiel --- packages/drivers/routerlicious-driver/src/tokens.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/drivers/routerlicious-driver/src/tokens.ts b/packages/drivers/routerlicious-driver/src/tokens.ts index 165843f07a26..b58a480170e8 100644 --- a/packages/drivers/routerlicious-driver/src/tokens.ts +++ b/packages/drivers/routerlicious-driver/src/tokens.ts @@ -21,7 +21,7 @@ export interface ITokenResponse { } /** - * Abstracts the token fetching mechanism for a host. Host will be responsible for implementing the interfaces. + * Abstracts the token fetching mechanism for a hosting application. The hosting application will be responsible for providing an implementation. */ export interface ITokenProvider { /** From 8d7c4aa7c57d196481c3c733cd7d6427a27bf464 Mon Sep 17 00:00:00 2001 From: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Date: Mon, 20 Jun 2022 15:54:55 -0700 Subject: [PATCH 13/16] docs: Update comment (code review feedback) Co-authored-by: Skyler Jokiel --- .../runtime/test-runtime-utils/src/insecureTokenProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts b/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts index b323210487bc..5befe173a538 100644 --- a/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts +++ b/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts @@ -15,7 +15,7 @@ import { generateToken } from "./generateToken"; export class InsecureTokenProvider implements ITokenProvider { constructor( /** - * TODO + * Private server tenantKey for generating tokens. */ private readonly tenantKey: string, From 6c191a66563f5638085a7fedd954d09793100b17 Mon Sep 17 00:00:00 2001 From: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Date: Thu, 23 Jun 2022 17:11:41 -0700 Subject: [PATCH 14/16] docs: Expand type documentation (code review suggestion) Co-authored-by: Skyler Jokiel --- packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts b/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts index 5befe173a538..c87ba8576aa6 100644 --- a/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts +++ b/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts @@ -9,6 +9,7 @@ import { generateToken } from "./generateToken"; /** * {@link @fluidframework/routerlicious-driver#ITokenProvider} intended for **test use only**. + * Provides an in memory implementation of the ITokenProvider interface that can be used to insecurely connect to Azure Fluid Relay (and other routerlicious based fluid relays). * As the name implies this is not secure and should not be used in production. * It simply makes examples where authentication is not relevant easier to bootstrap. */ From 2a3d1a75eca9f9c30036421eb748e6c66e1262b2 Mon Sep 17 00:00:00 2001 From: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Date: Fri, 24 Jun 2022 20:28:34 +0000 Subject: [PATCH 15/16] docs: Update comment --- .../test-runtime-utils/src/insecureTokenProvider.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts b/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts index c87ba8576aa6..0e3161ae2ed8 100644 --- a/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts +++ b/packages/runtime/test-runtime-utils/src/insecureTokenProvider.ts @@ -8,9 +8,10 @@ import { ITokenProvider, ITokenResponse } from "@fluidframework/routerlicious-dr import { generateToken } from "./generateToken"; /** - * {@link @fluidframework/routerlicious-driver#ITokenProvider} intended for **test use only**. - * Provides an in memory implementation of the ITokenProvider interface that can be used to insecurely connect to Azure Fluid Relay (and other routerlicious based fluid relays). - * As the name implies this is not secure and should not be used in production. + * Provides an in memory implementation of {@link @fluidframework/routerlicious-driver#ITokenProvider} that can be + * used to insecurely connect to the Fluid Relay. + * + * As the name implies, this is not secure and should not be used in production. * It simply makes examples where authentication is not relevant easier to bootstrap. */ export class InsecureTokenProvider implements ITokenProvider { From cfe519df3ef186f5ebc72fc99f2667dbdb9042da Mon Sep 17 00:00:00 2001 From: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Date: Fri, 24 Jun 2022 21:00:45 +0000 Subject: [PATCH 16/16] docs: Update comment --- packages/drivers/routerlicious-driver/src/tokens.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/drivers/routerlicious-driver/src/tokens.ts b/packages/drivers/routerlicious-driver/src/tokens.ts index b58a480170e8..4ef77d8534f3 100644 --- a/packages/drivers/routerlicious-driver/src/tokens.ts +++ b/packages/drivers/routerlicious-driver/src/tokens.ts @@ -21,7 +21,8 @@ export interface ITokenResponse { } /** - * Abstracts the token fetching mechanism for a hosting application. The hosting application will be responsible for providing an implementation. + * Abstracts the token fetching mechanism for a hosting application. + * The hosting application is responsible for providing an implementation. */ export interface ITokenProvider { /**