@fluidframework/fluid-static 2.51.0 → 2.52.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,9 @@
1
1
  # @fluidframework/fluid-static
2
2
 
3
+ ## 2.52.0
4
+
5
+ Dependency updates only.
6
+
3
7
  ## 2.51.0
4
8
 
5
9
  ### Minor Changes
package/README.md CHANGED
@@ -23,6 +23,15 @@ To get started, install the package by running the following command:
23
23
  npm i @fluidframework/fluid-static
24
24
  ```
25
25
 
26
+ ## Importing from this package
27
+
28
+ This package leverages [package.json exports](https://nodejs.org/api/packages.html#exports) to separate its APIs by support level.
29
+ For more information on the related support guarantees, see [API Support Levels](https://fluidframework.com/docs/build/releases-and-apitags/#api-support-levels).
30
+
31
+ To access the `public` ([SemVer](https://semver.org/)) APIs, import via `@fluidframework/fluid-static` like normal.
32
+
33
+ To access the `legacy` APIs, import via `@fluidframework/fluid-static/legacy`.
34
+
26
35
  ## API Documentation
27
36
 
28
37
  API documentation for **@fluidframework/fluid-static** is available at <https://fluidframework.com/docs/apis/fluid-static>.
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/dist/legacy.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/lib/legacy.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-report.esm.current.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/lib/public.d.ts"
5
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-report.esm.legacy.json"
4
+ }
@@ -0,0 +1,100 @@
1
+ ## Alpha API Report File for "@fluidframework/fluid-static"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ // @public
8
+ export type CompatibilityMode = "1" | "2";
9
+
10
+ // @public
11
+ export type ContainerAttachProps<T = unknown> = T;
12
+
13
+ // @public
14
+ export interface ContainerSchema {
15
+ readonly dynamicObjectTypes?: readonly SharedObjectKind[];
16
+ readonly initialObjects: Record<string, SharedObjectKind>;
17
+ }
18
+
19
+ // @alpha @legacy
20
+ export function createTreeContainerRuntimeFactory(props: {
21
+ readonly schema: TreeContainerSchema;
22
+ readonly compatibilityMode: CompatibilityMode;
23
+ readonly rootDataStoreRegistry?: IFluidDataStoreRegistry;
24
+ readonly runtimeOptionOverrides?: Partial<IContainerRuntimeOptions>;
25
+ readonly minVersionForCollabOverride?: MinimumVersionForCollab;
26
+ }): IRuntimeFactory;
27
+
28
+ // @public
29
+ export interface IConnection {
30
+ readonly id: string;
31
+ readonly mode: "write" | "read";
32
+ }
33
+
34
+ // @public @sealed
35
+ export interface IFluidContainer<TContainerSchema extends ContainerSchema = ContainerSchema> extends IEventProvider<IFluidContainerEvents> {
36
+ attach(props?: ContainerAttachProps): Promise<string>;
37
+ readonly attachState: AttachState;
38
+ connect(): void;
39
+ readonly connectionState: ConnectionState;
40
+ create<T extends IFluidLoadable>(objectClass: SharedObjectKind<T>): Promise<T>;
41
+ disconnect(): void;
42
+ dispose(): void;
43
+ readonly disposed: boolean;
44
+ readonly initialObjects: InitialObjects<TContainerSchema>;
45
+ readonly isDirty: boolean;
46
+ }
47
+
48
+ // @public @sealed
49
+ export interface IFluidContainerEvents extends IEvent {
50
+ (event: "connected", listener: () => void): void;
51
+ (event: "disconnected", listener: () => void): void;
52
+ (event: "saved", listener: () => void): void;
53
+ (event: "dirty", listener: () => void): void;
54
+ (event: "disposed", listener: (error?: ICriticalContainerError) => void): any;
55
+ }
56
+
57
+ // @public
58
+ export interface IMember {
59
+ readonly connections: IConnection[];
60
+ readonly id: string;
61
+ }
62
+
63
+ // @public
64
+ export type InitialObjects<T extends ContainerSchema> = {
65
+ [K in keyof T["initialObjects"]]: T["initialObjects"][K] extends SharedObjectKind<infer TChannel> ? TChannel : never;
66
+ };
67
+
68
+ // @public
69
+ export interface IServiceAudience<M extends IMember> extends IEventProvider<IServiceAudienceEvents<M>> {
70
+ getMembers(): ReadonlyMap<string, M>;
71
+ getMyself(): Myself<M> | undefined;
72
+ }
73
+
74
+ // @public
75
+ export interface IServiceAudienceEvents<M extends IMember> extends IEvent {
76
+ // @eventProperty
77
+ (event: "membersChanged", listener: () => void): void;
78
+ // @eventProperty
79
+ (event: "memberAdded", listener: MemberChangedListener<M>): void;
80
+ // @eventProperty
81
+ (event: "memberRemoved", listener: MemberChangedListener<M>): void;
82
+ }
83
+
84
+ // @public
85
+ export type MemberChangedListener<M extends IMember> = (clientId: string, member: M) => void;
86
+
87
+ // @public
88
+ export type Myself<M extends IMember = IMember> = M & {
89
+ readonly currentConnection: string;
90
+ };
91
+
92
+ // @alpha @legacy
93
+ export interface TreeContainerSchema extends ContainerSchema {
94
+ // (undocumented)
95
+ readonly initialObjects: {
96
+ readonly tree: SharedObjectKind<ITree>;
97
+ };
98
+ }
99
+
100
+ ```
@@ -0,0 +1,83 @@
1
+ ## Public API Report File for "@fluidframework/fluid-static"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ // @public
8
+ export type CompatibilityMode = "1" | "2";
9
+
10
+ // @public
11
+ export type ContainerAttachProps<T = unknown> = T;
12
+
13
+ // @public
14
+ export interface ContainerSchema {
15
+ readonly dynamicObjectTypes?: readonly SharedObjectKind[];
16
+ readonly initialObjects: Record<string, SharedObjectKind>;
17
+ }
18
+
19
+ // @public
20
+ export interface IConnection {
21
+ readonly id: string;
22
+ readonly mode: "write" | "read";
23
+ }
24
+
25
+ // @public @sealed
26
+ export interface IFluidContainer<TContainerSchema extends ContainerSchema = ContainerSchema> extends IEventProvider<IFluidContainerEvents> {
27
+ attach(props?: ContainerAttachProps): Promise<string>;
28
+ readonly attachState: AttachState;
29
+ connect(): void;
30
+ readonly connectionState: ConnectionState;
31
+ create<T extends IFluidLoadable>(objectClass: SharedObjectKind<T>): Promise<T>;
32
+ disconnect(): void;
33
+ dispose(): void;
34
+ readonly disposed: boolean;
35
+ readonly initialObjects: InitialObjects<TContainerSchema>;
36
+ readonly isDirty: boolean;
37
+ }
38
+
39
+ // @public @sealed
40
+ export interface IFluidContainerEvents extends IEvent {
41
+ (event: "connected", listener: () => void): void;
42
+ (event: "disconnected", listener: () => void): void;
43
+ (event: "saved", listener: () => void): void;
44
+ (event: "dirty", listener: () => void): void;
45
+ (event: "disposed", listener: (error?: ICriticalContainerError) => void): any;
46
+ }
47
+
48
+ // @public
49
+ export interface IMember {
50
+ readonly connections: IConnection[];
51
+ readonly id: string;
52
+ }
53
+
54
+ // @public
55
+ export type InitialObjects<T extends ContainerSchema> = {
56
+ [K in keyof T["initialObjects"]]: T["initialObjects"][K] extends SharedObjectKind<infer TChannel> ? TChannel : never;
57
+ };
58
+
59
+ // @public
60
+ export interface IServiceAudience<M extends IMember> extends IEventProvider<IServiceAudienceEvents<M>> {
61
+ getMembers(): ReadonlyMap<string, M>;
62
+ getMyself(): Myself<M> | undefined;
63
+ }
64
+
65
+ // @public
66
+ export interface IServiceAudienceEvents<M extends IMember> extends IEvent {
67
+ // @eventProperty
68
+ (event: "membersChanged", listener: () => void): void;
69
+ // @eventProperty
70
+ (event: "memberAdded", listener: MemberChangedListener<M>): void;
71
+ // @eventProperty
72
+ (event: "memberRemoved", listener: MemberChangedListener<M>): void;
73
+ }
74
+
75
+ // @public
76
+ export type MemberChangedListener<M extends IMember> = (clientId: string, member: M) => void;
77
+
78
+ // @public
79
+ export type Myself<M extends IMember = IMember> = M & {
80
+ readonly currentConnection: string;
81
+ };
82
+
83
+ ```
@@ -0,0 +1,35 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
9
+ */
10
+
11
+ /**
12
+ * Provides a simple and powerful way to consume collaborative Fluid data.
13
+ *
14
+ * @packageDocumentation
15
+ */
16
+
17
+ export {
18
+ // @public APIs
19
+ CompatibilityMode,
20
+ ContainerAttachProps,
21
+ ContainerSchema,
22
+ IConnection,
23
+ IFluidContainer,
24
+ IFluidContainerEvents,
25
+ IMember,
26
+ IServiceAudience,
27
+ IServiceAudienceEvents,
28
+ InitialObjects,
29
+ MemberChangedListener,
30
+ Myself,
31
+
32
+ // @legacy APIs
33
+ TreeContainerSchema,
34
+ createTreeContainerRuntimeFactory
35
+ } from "./index.js";
package/legacy.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
9
+ */
10
+
11
+ export * from "./lib/legacy.js";
@@ -0,0 +1,35 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
9
+ */
10
+
11
+ /**
12
+ * Provides a simple and powerful way to consume collaborative Fluid data.
13
+ *
14
+ * @packageDocumentation
15
+ */
16
+
17
+ export {
18
+ // @public APIs
19
+ CompatibilityMode,
20
+ ContainerAttachProps,
21
+ ContainerSchema,
22
+ IConnection,
23
+ IFluidContainer,
24
+ IFluidContainerEvents,
25
+ IMember,
26
+ IServiceAudience,
27
+ IServiceAudienceEvents,
28
+ InitialObjects,
29
+ MemberChangedListener,
30
+ Myself,
31
+
32
+ // @legacy APIs
33
+ TreeContainerSchema,
34
+ createTreeContainerRuntimeFactory
35
+ } from "./index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/fluid-static",
3
- "version": "2.51.0",
3
+ "version": "2.52.0",
4
4
  "description": "A tool to enable consumption of Fluid Data Objects without requiring custom container code.",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -23,6 +23,16 @@
23
23
  "default": "./dist/index.js"
24
24
  }
25
25
  },
26
+ "./legacy": {
27
+ "import": {
28
+ "types": "./lib/legacy.d.ts",
29
+ "default": "./lib/index.js"
30
+ },
31
+ "require": {
32
+ "types": "./dist/legacy.d.ts",
33
+ "default": "./dist/index.js"
34
+ }
35
+ },
26
36
  "./internal": {
27
37
  "import": {
28
38
  "types": "./lib/index.d.ts",
@@ -59,34 +69,34 @@
59
69
  "temp-directory": "nyc/.nyc_output"
60
70
  },
61
71
  "dependencies": {
62
- "@fluid-internal/client-utils": "~2.51.0",
63
- "@fluidframework/aqueduct": "~2.51.0",
64
- "@fluidframework/container-definitions": "~2.51.0",
65
- "@fluidframework/container-loader": "~2.51.0",
66
- "@fluidframework/container-runtime": "~2.51.0",
67
- "@fluidframework/container-runtime-definitions": "~2.51.0",
68
- "@fluidframework/core-interfaces": "~2.51.0",
69
- "@fluidframework/core-utils": "~2.51.0",
70
- "@fluidframework/datastore-definitions": "~2.51.0",
71
- "@fluidframework/driver-definitions": "~2.51.0",
72
- "@fluidframework/request-handler": "~2.51.0",
73
- "@fluidframework/runtime-definitions": "~2.51.0",
74
- "@fluidframework/runtime-utils": "~2.51.0",
75
- "@fluidframework/shared-object-base": "~2.51.0",
76
- "@fluidframework/telemetry-utils": "~2.51.0",
77
- "@fluidframework/tree": "~2.51.0"
72
+ "@fluid-internal/client-utils": "~2.52.0",
73
+ "@fluidframework/aqueduct": "~2.52.0",
74
+ "@fluidframework/container-definitions": "~2.52.0",
75
+ "@fluidframework/container-loader": "~2.52.0",
76
+ "@fluidframework/container-runtime": "~2.52.0",
77
+ "@fluidframework/container-runtime-definitions": "~2.52.0",
78
+ "@fluidframework/core-interfaces": "~2.52.0",
79
+ "@fluidframework/core-utils": "~2.52.0",
80
+ "@fluidframework/datastore-definitions": "~2.52.0",
81
+ "@fluidframework/driver-definitions": "~2.52.0",
82
+ "@fluidframework/request-handler": "~2.52.0",
83
+ "@fluidframework/runtime-definitions": "~2.52.0",
84
+ "@fluidframework/runtime-utils": "~2.52.0",
85
+ "@fluidframework/shared-object-base": "~2.52.0",
86
+ "@fluidframework/telemetry-utils": "~2.52.0",
87
+ "@fluidframework/tree": "~2.52.0"
78
88
  },
79
89
  "devDependencies": {
80
90
  "@arethetypeswrong/cli": "^0.17.1",
81
91
  "@biomejs/biome": "~1.9.3",
82
- "@fluid-internal/mocha-test-setup": "~2.51.0",
83
- "@fluid-tools/build-cli": "^0.56.0",
92
+ "@fluid-internal/mocha-test-setup": "~2.52.0",
93
+ "@fluid-tools/build-cli": "^0.57.0",
84
94
  "@fluidframework/build-common": "^2.0.3",
85
- "@fluidframework/build-tools": "^0.56.0",
95
+ "@fluidframework/build-tools": "^0.57.0",
86
96
  "@fluidframework/eslint-config-fluid": "^5.7.4",
87
- "@fluidframework/fluid-static-previous": "npm:@fluidframework/fluid-static@2.50.0",
88
- "@fluidframework/map": "~2.51.0",
89
- "@fluidframework/sequence": "~2.51.0",
97
+ "@fluidframework/fluid-static-previous": "npm:@fluidframework/fluid-static@2.51.0",
98
+ "@fluidframework/map": "~2.52.0",
99
+ "@fluidframework/sequence": "~2.52.0",
90
100
  "@microsoft/api-extractor": "7.52.8",
91
101
  "@types/mocha": "^10.0.10",
92
102
  "@types/node": "^18.19.0",
@@ -109,6 +119,9 @@
109
119
  "api-extractor:commonjs": "flub generate entrypoints --outDir ./dist",
110
120
  "api-extractor:esnext": "flub generate entrypoints --outDir ./lib --node10TypeCompat",
111
121
  "build": "fluid-build . --task build",
122
+ "build:api-reports": "concurrently \"npm:build:api-reports:*\"",
123
+ "build:api-reports:current": "api-extractor run --local --config api-extractor/api-extractor.current.json",
124
+ "build:api-reports:legacy": "api-extractor run --local --config api-extractor/api-extractor.legacy.json",
112
125
  "build:commonjs": "fluid-build . --task commonjs",
113
126
  "build:compile": "fluid-build . --task compile",
114
127
  "build:docs": "api-extractor run --local",
@@ -120,9 +133,14 @@
120
133
  "check:biome": "biome check .",
121
134
  "check:exports": "concurrently \"npm:check:exports:*\"",
122
135
  "check:exports:bundle-release-tags": "api-extractor run --config api-extractor/api-extractor-lint-bundle.json",
136
+ "check:exports:cjs:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.cjs.json",
123
137
  "check:exports:cjs:public": "api-extractor run --config api-extractor/api-extractor-lint-public.cjs.json",
138
+ "check:exports:esm:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.esm.json",
124
139
  "check:exports:esm:public": "api-extractor run --config api-extractor/api-extractor-lint-public.esm.json",
125
140
  "check:format": "npm run check:biome",
141
+ "ci:build:api-reports": "concurrently \"npm:ci:build:api-reports:*\"",
142
+ "ci:build:api-reports:current": "api-extractor run --config api-extractor/api-extractor.current.json",
143
+ "ci:build:api-reports:legacy": "api-extractor run --config api-extractor/api-extractor.legacy.json",
126
144
  "ci:build:docs": "api-extractor run",
127
145
  "clean": "rimraf --glob dist lib {alpha,beta,internal,legacy}.d.ts \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
128
146
  "eslint": "eslint --format stylish src",