@fluidframework/azure-end-to-end-tests 2.41.0-338401 → 2.42.0

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @fluidframework/azure-end-to-end-tests
2
2
 
3
+ ## 2.42.0
4
+
5
+ Dependency updates only.
6
+
7
+ ## 2.41.0
8
+
9
+ Dependency updates only.
10
+
3
11
  ## 2.40.0
4
12
 
5
13
  Dependency updates only.
@@ -6,7 +6,7 @@ import { strict as assert } from "node:assert";
6
6
  import { AzureClient, } from "@fluidframework/azure-client";
7
7
  import { AttachState } from "@fluidframework/container-definitions";
8
8
  import { ConnectionState } from "@fluidframework/container-loader";
9
- import { getPresenceViaDataObject, ExperimentalPresenceManager,
9
+ import { getPresence, ExperimentalPresenceManager,
10
10
  // eslint-disable-next-line import/no-internal-modules
11
11
  } from "@fluidframework/presence/alpha";
12
12
  import { InsecureTokenProvider } from "@fluidframework/test-runtime-utils/internal";
@@ -44,7 +44,8 @@ const getOrCreatePresenceContainer = async (id, user, config, scopes) => {
44
44
  const client = new AzureClient({ connection: connectionProps });
45
45
  const schema = {
46
46
  initialObjects: {
47
- presence: ExperimentalPresenceManager,
47
+ // A DataObject is added as otherwise fluid-static complains "Container cannot be initialized without any DataTypes"
48
+ _unused: ExperimentalPresenceManager,
48
49
  },
49
50
  };
50
51
  let services;
@@ -64,7 +65,7 @@ const getOrCreatePresenceContainer = async (id, user, config, scopes) => {
64
65
  });
65
66
  }
66
67
  assert.strictEqual(container.attachState, AttachState.Attached, "Container is not attached after attach is called");
67
- const presence = getPresenceViaDataObject(container.initialObjects.presence);
68
+ const presence = getPresence(container);
68
69
  return {
69
70
  client,
70
71
  container,
@@ -1 +1 @@
1
- {"version":3,"file":"childClient.js","sourceRoot":"","sources":["../../../src/test/multiprocess/childClient.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI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AC9E,MAAM;gBACP,CAAC;gBAED,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;gBAC5B,IAAI,CAAC;oBACJ,KAAK,EAAE,kBAAkB;oBACzB,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,UAAU;iBAC1D,CAAC,CAAC;gBAEH,MAAM;YACP,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACT,OAAO,CAAC,KAAK,CAAC,GAAG,UAAU,mBAAmB,CAAC,CAAC;gBAChD,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,UAAU,kBAAkB,EAAE,CAAC,CAAC;gBACjE,MAAM;YACP,CAAC;QACF,CAAC;IACF,CAAC;CACD;AAED,SAAS,mBAAmB;IAC3B,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;IAC5C,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,GAAsB,EAAE,EAAE;QAChD,cAAc,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,KAAY,EAAE,EAAE;YACpD,OAAO,CAAC,KAAK,CAAC,mBAAmB,UAAU,EAAE,EAAE,KAAK,CAAC,CAAC;YACtD,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,UAAU,KAAK,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACpE,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,mBAAmB,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { strict as assert } from \"node:assert\";\n\nimport {\n\tAzureClient,\n\ttype AzureContainerServices,\n\tAzureLocalConnectionConfig,\n\tAzureRemoteConnectionConfig,\n} from \"@fluidframework/azure-client\";\nimport { AttachState } from \"@fluidframework/container-definitions\";\nimport { ConnectionState } from \"@fluidframework/container-loader\";\nimport { ContainerSchema, type IFluidContainer } from \"@fluidframework/fluid-static\";\nimport {\n\tgetPresenceViaDataObject,\n\tExperimentalPresenceManager,\n\ttype ExperimentalPresenceDO,\n\ttype Presence,\n\ttype Attendee,\n\t// eslint-disable-next-line import/no-internal-modules\n} from \"@fluidframework/presence/alpha\";\nimport { InsecureTokenProvider } from \"@fluidframework/test-runtime-utils/internal\";\nimport { timeoutPromise } from \"@fluidframework/test-utils/internal\";\n\nimport { ScopeType } from \"../AzureClientFactory.js\";\nimport { createAzureTokenProvider } from \"../AzureTokenFactory.js\";\nimport { configProvider } from \"../utils.js\";\n\nimport { MessageFromChild, MessageToChild } from \"./messageTypes.js\";\n\ntype MessageFromParent = MessageToChild;\ntype MessageToParent = Required<MessageFromChild>;\ninterface UserIdAndName {\n\tid: string;\n\tname: string;\n}\n\nconst connectTimeoutMs = 10_000;\n// Identifier given to child process\nconst process_id = process.argv[2];\n\nconst useAzure = process.env.FLUID_CLIENT === \"azure\";\nconst tenantId = useAzure\n\t? (process.env.azure__fluid__relay__service__tenantId as string)\n\t: \"frs-client-tenant\";\nconst endPoint = process.env.azure__fluid__relay__service__endpoint as string;\nif (useAzure && endPoint === undefined) {\n\tthrow new Error(\"Azure Fluid Relay service endpoint is missing\");\n}\n\n/**\n * Get or create a Fluid container with Presence in initialObjects.\n */\nconst getOrCreatePresenceContainer = async (\n\tid: string | undefined,\n\tuser: UserIdAndName,\n\tconfig?: ReturnType<typeof configProvider>,\n\tscopes?: ScopeType[],\n): Promise<{\n\tcontainer: IFluidContainer;\n\tpresence: Presence;\n\tservices: AzureContainerServices;\n\tclient: AzureClient;\n\tcontainerId: string;\n}> => {\n\tlet container: IFluidContainer;\n\tlet containerId: string;\n\tconst connectionProps: AzureRemoteConnectionConfig | AzureLocalConnectionConfig = useAzure\n\t\t? {\n\t\t\t\ttenantId,\n\t\t\t\ttokenProvider: createAzureTokenProvider(user.id ?? \"foo\", user.name ?? \"bar\", scopes),\n\t\t\t\tendpoint: endPoint,\n\t\t\t\ttype: \"remote\",\n\t\t\t}\n\t\t: {\n\t\t\t\ttokenProvider: new InsecureTokenProvider(\"fooBar\", user, scopes),\n\t\t\t\tendpoint: \"http://localhost:7071\",\n\t\t\t\ttype: \"local\",\n\t\t\t};\n\tconst client = new AzureClient({ connection: connectionProps });\n\tconst schema: ContainerSchema = {\n\t\tinitialObjects: {\n\t\t\tpresence: ExperimentalPresenceManager,\n\t\t},\n\t};\n\tlet services: AzureContainerServices;\n\tif (id === undefined) {\n\t\t({ container, services } = await client.createContainer(schema, \"2\"));\n\t\tcontainerId = await container.attach();\n\t} else {\n\t\tcontainerId = id;\n\t\t({ container, services } = await client.getContainer(containerId, schema, \"2\"));\n\t}\n\t// wait for 'ConnectionState.Connected' so we return with client connected to container\n\tif (container.connectionState !== ConnectionState.Connected) {\n\t\tawait timeoutPromise((resolve) => container.once(\"connected\", () => resolve()), {\n\t\t\tdurationMs: connectTimeoutMs,\n\t\t\terrorMsg: \"container connect() timeout\",\n\t\t});\n\t}\n\tassert.strictEqual(\n\t\tcontainer.attachState,\n\t\tAttachState.Attached,\n\t\t\"Container is not attached after attach is called\",\n\t);\n\n\tconst presence = getPresenceViaDataObject(\n\t\tcontainer.initialObjects.presence as ExperimentalPresenceDO,\n\t);\n\treturn {\n\t\tclient,\n\t\tcontainer,\n\t\tpresence,\n\t\tservices,\n\t\tcontainerId,\n\t};\n};\nfunction createSendFunction(): (msg: MessageToParent) => void {\n\tif (process.send) {\n\t\treturn process.send.bind(process);\n\t}\n\tthrow new Error(\"process.send is not defined\");\n}\n\nconst send = createSendFunction();\n\nfunction isConnected(container: IFluidContainer | undefined): boolean {\n\treturn container !== undefined && container.connectionState === ConnectionState.Connected;\n}\n\nclass MessageHandler {\n\tpublic presence: Presence | undefined;\n\tpublic container: IFluidContainer | undefined;\n\tpublic containerId: string | undefined;\n\n\tpublic async onMessage(msg: MessageFromParent): Promise<void> {\n\t\tswitch (msg.command) {\n\t\t\t// Respond to connect command by connecting to Fluid container with the provided user information.\n\t\t\tcase \"connect\": {\n\t\t\t\t// Check if valid user information has been provided by parent/orchestrator\n\t\t\t\tif (!msg.user) {\n\t\t\t\t\tsend({ event: \"error\", error: `${process_id}: No azure user information given` });\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// Check if already connected to container\n\t\t\t\tif (isConnected(this.container)) {\n\t\t\t\t\tsend({ event: \"error\", error: `${process_id}: Already connected to container` });\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tconst { container, presence, containerId } = await getOrCreatePresenceContainer(\n\t\t\t\t\tmsg.containerId,\n\t\t\t\t\tmsg.user,\n\t\t\t\t);\n\t\t\t\tthis.container = container;\n\t\t\t\tthis.presence = presence;\n\t\t\t\tthis.containerId = containerId;\n\n\t\t\t\t// Listen for presence events to notify parent/orchestrator when a new attendee joins or leaves the session.\n\t\t\t\tpresence.attendees.events.on(\"attendeeConnected\", (attendee: Attendee) => {\n\t\t\t\t\tconst m: MessageToParent = {\n\t\t\t\t\t\tevent: \"attendeeConnected\",\n\t\t\t\t\t\tattendeeId: attendee.attendeeId,\n\t\t\t\t\t};\n\t\t\t\t\tsend(m);\n\t\t\t\t});\n\t\t\t\tpresence.attendees.events.on(\"attendeeDisconnected\", (attendee: Attendee) => {\n\t\t\t\t\tconst m: MessageToParent = {\n\t\t\t\t\t\tevent: \"attendeeDisconnected\",\n\t\t\t\t\t\tattendeeId: attendee.attendeeId,\n\t\t\t\t\t};\n\t\t\t\t\tsend(m);\n\t\t\t\t});\n\t\t\t\tsend({\n\t\t\t\t\tevent: \"ready\",\n\t\t\t\t\tcontainerId,\n\t\t\t\t\tattendeeId: presence.attendees.getMyself().attendeeId,\n\t\t\t\t});\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Respond to disconnect command by disconnecting self from Fluid container.\n\t\t\tcase \"disconnectSelf\": {\n\t\t\t\tif (!this.container) {\n\t\t\t\t\tsend({ event: \"error\", error: `${process_id} is not connected to container` });\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!this.presence) {\n\t\t\t\t\tsend({ event: \"error\", error: `${process_id} is not connected to presence` });\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis.container.disconnect();\n\t\t\t\tsend({\n\t\t\t\t\tevent: \"disconnectedSelf\",\n\t\t\t\t\tattendeeId: this.presence.attendees.getMyself().attendeeId,\n\t\t\t\t});\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tconsole.error(`${process_id}: Unknown command`);\n\t\t\t\tsend({ event: \"error\", error: `${process_id} Unknown command` });\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction setupMessageHandler(): void {\n\tconst messageHandler = new MessageHandler();\n\tprocess.on(\"message\", (msg: MessageFromParent) => {\n\t\tmessageHandler.onMessage(msg).catch((error: Error) => {\n\t\t\tconsole.error(`Error in client ${process_id}`, error);\n\t\t\tsend({ event: \"error\", error: `${process_id}: ${error.message}` });\n\t\t});\n\t});\n}\n\nsetupMessageHandler();\n"]}
1
+ {"version":3,"file":"childClient.js","sourceRoot":"","sources":["../../../src/test/multiprocess/childClient.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EACN,WAAW,GAIX,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,OAAO,EACN,WAAW,EAEX,2BAA2B;AAE3B,sDAAsD;EACtD,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAGrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,y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CAAC,CAAC;gBACjE,MAAM;YACP,CAAC;QACF,CAAC;IACF,CAAC;CACD;AAED,SAAS,mBAAmB;IAC3B,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;IAC5C,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,GAAsB,EAAE,EAAE;QAChD,cAAc,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,KAAY,EAAE,EAAE;YACpD,OAAO,CAAC,KAAK,CAAC,mBAAmB,UAAU,EAAE,EAAE,KAAK,CAAC,CAAC;YACtD,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,UAAU,KAAK,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACpE,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,mBAAmB,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { strict as assert } from \"node:assert\";\n\nimport {\n\tAzureClient,\n\ttype AzureContainerServices,\n\tAzureLocalConnectionConfig,\n\tAzureRemoteConnectionConfig,\n} from \"@fluidframework/azure-client\";\nimport { AttachState } from \"@fluidframework/container-definitions\";\nimport { ConnectionState } from \"@fluidframework/container-loader\";\nimport { ContainerSchema, type IFluidContainer } from \"@fluidframework/fluid-static\";\nimport {\n\tgetPresence,\n\ttype Attendee,\n\tExperimentalPresenceManager,\n\ttype Presence,\n\t// eslint-disable-next-line import/no-internal-modules\n} from \"@fluidframework/presence/alpha\";\nimport { InsecureTokenProvider } from \"@fluidframework/test-runtime-utils/internal\";\nimport { timeoutPromise } from \"@fluidframework/test-utils/internal\";\n\nimport { ScopeType } from \"../AzureClientFactory.js\";\nimport { createAzureTokenProvider } from \"../AzureTokenFactory.js\";\nimport { configProvider } from \"../utils.js\";\n\nimport { MessageFromChild, MessageToChild } from \"./messageTypes.js\";\n\ntype MessageFromParent = MessageToChild;\ntype MessageToParent = Required<MessageFromChild>;\ninterface UserIdAndName {\n\tid: string;\n\tname: string;\n}\n\nconst connectTimeoutMs = 10_000;\n// Identifier given to child process\nconst process_id = process.argv[2];\n\nconst useAzure = process.env.FLUID_CLIENT === \"azure\";\nconst tenantId = useAzure\n\t? (process.env.azure__fluid__relay__service__tenantId as string)\n\t: \"frs-client-tenant\";\nconst endPoint = process.env.azure__fluid__relay__service__endpoint as string;\nif (useAzure && endPoint === undefined) {\n\tthrow new Error(\"Azure Fluid Relay service endpoint is missing\");\n}\n\n/**\n * Get or create a Fluid container with Presence in initialObjects.\n */\nconst getOrCreatePresenceContainer = async (\n\tid: string | undefined,\n\tuser: UserIdAndName,\n\tconfig?: ReturnType<typeof configProvider>,\n\tscopes?: ScopeType[],\n): Promise<{\n\tcontainer: IFluidContainer;\n\tpresence: Presence;\n\tservices: AzureContainerServices;\n\tclient: AzureClient;\n\tcontainerId: string;\n}> => {\n\tlet container: IFluidContainer;\n\tlet containerId: string;\n\tconst connectionProps: AzureRemoteConnectionConfig | AzureLocalConnectionConfig = useAzure\n\t\t? {\n\t\t\t\ttenantId,\n\t\t\t\ttokenProvider: createAzureTokenProvider(user.id ?? \"foo\", user.name ?? \"bar\", scopes),\n\t\t\t\tendpoint: endPoint,\n\t\t\t\ttype: \"remote\",\n\t\t\t}\n\t\t: {\n\t\t\t\ttokenProvider: new InsecureTokenProvider(\"fooBar\", user, scopes),\n\t\t\t\tendpoint: \"http://localhost:7071\",\n\t\t\t\ttype: \"local\",\n\t\t\t};\n\tconst client = new AzureClient({ connection: connectionProps });\n\tconst schema: ContainerSchema = {\n\t\tinitialObjects: {\n\t\t\t// A DataObject is added as otherwise fluid-static complains \"Container cannot be initialized without any DataTypes\"\n\t\t\t_unused: ExperimentalPresenceManager,\n\t\t},\n\t};\n\tlet services: AzureContainerServices;\n\tif (id === undefined) {\n\t\t({ container, services } = await client.createContainer(schema, \"2\"));\n\t\tcontainerId = await container.attach();\n\t} else {\n\t\tcontainerId = id;\n\t\t({ container, services } = await client.getContainer(containerId, schema, \"2\"));\n\t}\n\t// wait for 'ConnectionState.Connected' so we return with client connected to container\n\tif (container.connectionState !== ConnectionState.Connected) {\n\t\tawait timeoutPromise((resolve) => container.once(\"connected\", () => resolve()), {\n\t\t\tdurationMs: connectTimeoutMs,\n\t\t\terrorMsg: \"container connect() timeout\",\n\t\t});\n\t}\n\tassert.strictEqual(\n\t\tcontainer.attachState,\n\t\tAttachState.Attached,\n\t\t\"Container is not attached after attach is called\",\n\t);\n\n\tconst presence = getPresence(container);\n\treturn {\n\t\tclient,\n\t\tcontainer,\n\t\tpresence,\n\t\tservices,\n\t\tcontainerId,\n\t};\n};\nfunction createSendFunction(): (msg: MessageToParent) => void {\n\tif (process.send) {\n\t\treturn process.send.bind(process);\n\t}\n\tthrow new Error(\"process.send is not defined\");\n}\n\nconst send = createSendFunction();\n\nfunction isConnected(container: IFluidContainer | undefined): boolean {\n\treturn container !== undefined && container.connectionState === ConnectionState.Connected;\n}\n\nclass MessageHandler {\n\tpublic presence: Presence | undefined;\n\tpublic container: IFluidContainer | undefined;\n\tpublic containerId: string | undefined;\n\n\tpublic async onMessage(msg: MessageFromParent): Promise<void> {\n\t\tswitch (msg.command) {\n\t\t\t// Respond to connect command by connecting to Fluid container with the provided user information.\n\t\t\tcase \"connect\": {\n\t\t\t\t// Check if valid user information has been provided by parent/orchestrator\n\t\t\t\tif (!msg.user) {\n\t\t\t\t\tsend({ event: \"error\", error: `${process_id}: No azure user information given` });\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// Check if already connected to container\n\t\t\t\tif (isConnected(this.container)) {\n\t\t\t\t\tsend({ event: \"error\", error: `${process_id}: Already connected to container` });\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tconst { container, presence, containerId } = await getOrCreatePresenceContainer(\n\t\t\t\t\tmsg.containerId,\n\t\t\t\t\tmsg.user,\n\t\t\t\t);\n\t\t\t\tthis.container = container;\n\t\t\t\tthis.presence = presence;\n\t\t\t\tthis.containerId = containerId;\n\n\t\t\t\t// Listen for presence events to notify parent/orchestrator when a new attendee joins or leaves the session.\n\t\t\t\tpresence.attendees.events.on(\"attendeeConnected\", (attendee: Attendee) => {\n\t\t\t\t\tconst m: MessageToParent = {\n\t\t\t\t\t\tevent: \"attendeeConnected\",\n\t\t\t\t\t\tattendeeId: attendee.attendeeId,\n\t\t\t\t\t};\n\t\t\t\t\tsend(m);\n\t\t\t\t});\n\t\t\t\tpresence.attendees.events.on(\"attendeeDisconnected\", (attendee: Attendee) => {\n\t\t\t\t\tconst m: MessageToParent = {\n\t\t\t\t\t\tevent: \"attendeeDisconnected\",\n\t\t\t\t\t\tattendeeId: attendee.attendeeId,\n\t\t\t\t\t};\n\t\t\t\t\tsend(m);\n\t\t\t\t});\n\t\t\t\tsend({\n\t\t\t\t\tevent: \"ready\",\n\t\t\t\t\tcontainerId,\n\t\t\t\t\tattendeeId: presence.attendees.getMyself().attendeeId,\n\t\t\t\t});\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Respond to disconnect command by disconnecting self from Fluid container.\n\t\t\tcase \"disconnectSelf\": {\n\t\t\t\tif (!this.container) {\n\t\t\t\t\tsend({ event: \"error\", error: `${process_id} is not connected to container` });\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!this.presence) {\n\t\t\t\t\tsend({ event: \"error\", error: `${process_id} is not connected to presence` });\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis.container.disconnect();\n\t\t\t\tsend({\n\t\t\t\t\tevent: \"disconnectedSelf\",\n\t\t\t\t\tattendeeId: this.presence.attendees.getMyself().attendeeId,\n\t\t\t\t});\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tconsole.error(`${process_id}: Unknown command`);\n\t\t\t\tsend({ event: \"error\", error: `${process_id} Unknown command` });\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction setupMessageHandler(): void {\n\tconst messageHandler = new MessageHandler();\n\tprocess.on(\"message\", (msg: MessageFromParent) => {\n\t\tmessageHandler.onMessage(msg).catch((error: Error) => {\n\t\t\tconsole.error(`Error in client ${process_id}`, error);\n\t\t\tsend({ event: \"error\", error: `${process_id}: ${error.message}` });\n\t\t});\n\t});\n}\n\nsetupMessageHandler();\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"messageTypes.js","sourceRoot":"","sources":["../../../src/test/multiprocess/messageTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { AzureUser } from \"@fluidframework/azure-client/internal\";\n// eslint-disable-next-line import/no-internal-modules\nimport type { AttendeeId } from \"@fluidframework/presence/alpha\";\n\nexport type MessageToChild = ConnectCommand | DisconnectSelfCommand;\ninterface ConnectCommand {\n\tcommand: \"connect\";\n\tuser: AzureUser;\n\tcontainerId?: string;\n}\n\ninterface DisconnectSelfCommand {\n\tcommand: \"disconnectSelf\";\n}\n\nexport type MessageFromChild =\n\t| AttendeeDisconnectedEvent\n\t| attendeeConnectedEvent\n\t| ReadyEvent\n\t| DisconnectedSelfEvent\n\t| ErrorEvent;\ninterface AttendeeDisconnectedEvent {\n\tevent: \"attendeeDisconnected\";\n\tattendeeId: AttendeeId;\n}\n\ninterface attendeeConnectedEvent {\n\tevent: \"attendeeConnected\";\n\tattendeeId: AttendeeId;\n}\n\ninterface ReadyEvent {\n\tevent: \"ready\";\n\tcontainerId: string;\n\tattendeeId: AttendeeId;\n}\n\ninterface DisconnectedSelfEvent {\n\tevent: \"disconnectedSelf\";\n\tattendeeId: AttendeeId;\n}\ninterface ErrorEvent {\n\tevent: \"error\";\n\terror: string;\n}\n"]}
1
+ {"version":3,"file":"messageTypes.js","sourceRoot":"","sources":["../../../src/test/multiprocess/messageTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { AzureUser } from \"@fluidframework/azure-client/internal\";\n// eslint-disable-next-line import/no-internal-modules\nimport type { AttendeeId } from \"@fluidframework/presence/beta\";\n\nexport type MessageToChild = ConnectCommand | DisconnectSelfCommand;\ninterface ConnectCommand {\n\tcommand: \"connect\";\n\tuser: AzureUser;\n\tcontainerId?: string;\n}\n\ninterface DisconnectSelfCommand {\n\tcommand: \"disconnectSelf\";\n}\n\nexport type MessageFromChild =\n\t| AttendeeDisconnectedEvent\n\t| attendeeConnectedEvent\n\t| ReadyEvent\n\t| DisconnectedSelfEvent\n\t| ErrorEvent;\ninterface AttendeeDisconnectedEvent {\n\tevent: \"attendeeDisconnected\";\n\tattendeeId: AttendeeId;\n}\n\ninterface attendeeConnectedEvent {\n\tevent: \"attendeeConnected\";\n\tattendeeId: AttendeeId;\n}\n\ninterface ReadyEvent {\n\tevent: \"ready\";\n\tcontainerId: string;\n\tattendeeId: AttendeeId;\n}\n\ninterface DisconnectedSelfEvent {\n\tevent: \"disconnectedSelf\";\n\tattendeeId: AttendeeId;\n}\ninterface ErrorEvent {\n\tevent: \"error\";\n\terror: string;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/azure-end-to-end-tests",
3
- "version": "2.41.0-338401",
3
+ "version": "2.42.0",
4
4
  "description": "Azure client end to end tests",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -33,29 +33,29 @@
33
33
  "temp-directory": "nyc/.nyc_output"
34
34
  },
35
35
  "dependencies": {
36
- "@fluid-experimental/data-objects": "2.41.0-338401",
37
- "@fluid-internal/client-utils": "2.41.0-338401",
38
- "@fluid-internal/mocha-test-setup": "2.41.0-338401",
39
- "@fluid-private/test-version-utils": "2.41.0-338401",
40
- "@fluidframework/aqueduct": "2.41.0-338401",
41
- "@fluidframework/azure-client": "2.41.0-338401",
36
+ "@fluid-experimental/data-objects": "~2.42.0",
37
+ "@fluid-internal/client-utils": "~2.42.0",
38
+ "@fluid-internal/mocha-test-setup": "~2.42.0",
39
+ "@fluid-private/test-version-utils": "~2.42.0",
40
+ "@fluidframework/aqueduct": "~2.42.0",
41
+ "@fluidframework/azure-client": "~2.42.0",
42
42
  "@fluidframework/azure-client-legacy": "npm:@fluidframework/azure-client@^1.2.0",
43
- "@fluidframework/container-definitions": "2.41.0-338401",
44
- "@fluidframework/container-loader": "2.41.0-338401",
45
- "@fluidframework/core-interfaces": "2.41.0-338401",
46
- "@fluidframework/counter": "2.41.0-338401",
47
- "@fluidframework/datastore-definitions": "2.41.0-338401",
48
- "@fluidframework/fluid-static": "2.41.0-338401",
49
- "@fluidframework/map": "2.41.0-338401",
43
+ "@fluidframework/container-definitions": "~2.42.0",
44
+ "@fluidframework/container-loader": "~2.42.0",
45
+ "@fluidframework/core-interfaces": "~2.42.0",
46
+ "@fluidframework/counter": "~2.42.0",
47
+ "@fluidframework/datastore-definitions": "~2.42.0",
48
+ "@fluidframework/fluid-static": "~2.42.0",
49
+ "@fluidframework/map": "~2.42.0",
50
50
  "@fluidframework/map-legacy": "npm:@fluidframework/map@^1.4.0",
51
- "@fluidframework/matrix": "2.41.0-338401",
52
- "@fluidframework/presence": "2.41.0-338401",
53
- "@fluidframework/runtime-definitions": "2.41.0-338401",
54
- "@fluidframework/sequence": "2.41.0-338401",
55
- "@fluidframework/telemetry-utils": "2.41.0-338401",
56
- "@fluidframework/test-runtime-utils": "2.41.0-338401",
57
- "@fluidframework/test-utils": "2.41.0-338401",
58
- "@fluidframework/tree": "2.41.0-338401",
51
+ "@fluidframework/matrix": "~2.42.0",
52
+ "@fluidframework/presence": "~2.42.0",
53
+ "@fluidframework/runtime-definitions": "~2.42.0",
54
+ "@fluidframework/sequence": "~2.42.0",
55
+ "@fluidframework/telemetry-utils": "~2.42.0",
56
+ "@fluidframework/test-runtime-utils": "~2.42.0",
57
+ "@fluidframework/test-utils": "~2.42.0",
58
+ "@fluidframework/tree": "~2.42.0",
59
59
  "axios": "^1.8.4",
60
60
  "cross-env": "^7.0.3",
61
61
  "mocha": "^10.8.2",
@@ -69,8 +69,8 @@
69
69
  "@biomejs/biome": "~1.9.3",
70
70
  "@fluidframework/build-common": "^2.0.3",
71
71
  "@fluidframework/build-tools": "^0.55.0",
72
- "@fluidframework/driver-definitions": "2.41.0-338401",
73
- "@fluidframework/eslint-config-fluid": "^5.7.3",
72
+ "@fluidframework/driver-definitions": "~2.42.0",
73
+ "@fluidframework/eslint-config-fluid": "^5.7.4",
74
74
  "@types/mocha": "^10.0.10",
75
75
  "@types/nock": "^9.3.0",
76
76
  "@types/node": "^18.19.0",
@@ -15,11 +15,10 @@ import { AttachState } from "@fluidframework/container-definitions";
15
15
  import { ConnectionState } from "@fluidframework/container-loader";
16
16
  import { ContainerSchema, type IFluidContainer } from "@fluidframework/fluid-static";
17
17
  import {
18
- getPresenceViaDataObject,
18
+ getPresence,
19
+ type Attendee,
19
20
  ExperimentalPresenceManager,
20
- type ExperimentalPresenceDO,
21
21
  type Presence,
22
- type Attendee,
23
22
  // eslint-disable-next-line import/no-internal-modules
24
23
  } from "@fluidframework/presence/alpha";
25
24
  import { InsecureTokenProvider } from "@fluidframework/test-runtime-utils/internal";
@@ -83,7 +82,8 @@ const getOrCreatePresenceContainer = async (
83
82
  const client = new AzureClient({ connection: connectionProps });
84
83
  const schema: ContainerSchema = {
85
84
  initialObjects: {
86
- presence: ExperimentalPresenceManager,
85
+ // A DataObject is added as otherwise fluid-static complains "Container cannot be initialized without any DataTypes"
86
+ _unused: ExperimentalPresenceManager,
87
87
  },
88
88
  };
89
89
  let services: AzureContainerServices;
@@ -107,9 +107,7 @@ const getOrCreatePresenceContainer = async (
107
107
  "Container is not attached after attach is called",
108
108
  );
109
109
 
110
- const presence = getPresenceViaDataObject(
111
- container.initialObjects.presence as ExperimentalPresenceDO,
112
- );
110
+ const presence = getPresence(container);
113
111
  return {
114
112
  client,
115
113
  container,
@@ -5,7 +5,7 @@
5
5
 
6
6
  import type { AzureUser } from "@fluidframework/azure-client/internal";
7
7
  // eslint-disable-next-line import/no-internal-modules
8
- import type { AttendeeId } from "@fluidframework/presence/alpha";
8
+ import type { AttendeeId } from "@fluidframework/presence/beta";
9
9
 
10
10
  export type MessageToChild = ConnectCommand | DisconnectSelfCommand;
11
11
  interface ConnectCommand {