From 23c2373b25dafc5952203352abb58eb1ed175de6 Mon Sep 17 00:00:00 2001 From: Sonali Deshpande <48232592+sonalideshpandemsft@users.noreply.github.com> Date: Mon, 3 Jun 2024 20:12:29 -0700 Subject: [PATCH] RC3.0: Make using API trimming optional (#21285) [AB#8158](https://dev.azure.com/fluidframework/internal/_workitems/edit/8158) --- .../packages/azure-service-utils/package.json | 6 +- common/lib/protocol-definitions/package.json | 6 +- .../common/container-definitions/package.json | 6 +- ...eContainerDefinitionsPrevious.generated.ts | 72 + packages/common/core-interfaces/package.json | 6 +- packages/common/core-utils/package.json | 6 +- .../common/driver-definitions/package.json | 6 +- packages/dds/cell/package.json | 14 +- packages/dds/counter/package.json | 6 +- packages/dds/map/package.json | 6 +- packages/dds/matrix/package.json | 6 +- packages/dds/merge-tree/package.json | 6 +- packages/dds/ordered-collection/package.json | 6 +- packages/dds/register-collection/package.json | 6 +- packages/dds/sequence/package.json | 6 +- .../validateSequencePrevious.generated.ts | 360 ++++ packages/dds/shared-object-base/package.json | 6 +- .../dds/shared-summary-block/package.json | 6 +- packages/dds/task-manager/package.json | 6 +- packages/dds/tree/package.json | 6 +- packages/drivers/debugger/package.json | 6 +- packages/drivers/driver-base/package.json | 14 +- .../drivers/driver-web-cache/package.json | 6 +- packages/drivers/file-driver/package.json | 14 +- packages/drivers/local-driver/package.json | 6 +- .../odsp-driver-definitions/package.json | 6 +- packages/drivers/odsp-driver/package.json | 6 +- .../drivers/odsp-urlResolver/package.json | 14 +- packages/drivers/replay-driver/package.json | 14 +- .../drivers/routerlicious-driver/package.json | 6 +- .../routerlicious-urlResolver/package.json | 14 +- .../drivers/tinylicious-driver/package.json | 14 +- .../framework/agent-scheduler/package.json | 6 +- packages/framework/aqueduct/package.json | 6 +- .../app-insights-logger/package.json | 6 +- .../fluid-telemetry/package.json | 4 +- .../api-report/fluid-framework.api.md | 1694 +++++++++++++++++ .../framework/fluid-framework/package.json | 6 +- packages/framework/fluid-static/package.json | 14 +- .../oldest-client-observer/package.json | 6 +- .../framework/request-handler/package.json | 6 +- packages/framework/synthesize/package.json | 6 +- packages/framework/undo-redo/package.json | 14 +- packages/loader/container-loader/package.json | 6 +- packages/loader/driver-utils/package.json | 6 +- .../package.json | 6 +- .../api-report/container-runtime.api.md | 12 +- .../runtime/container-runtime/package.json | 6 +- ...idateContainerRuntimePrevious.generated.ts | 36 + .../datastore-definitions/package.json | 6 +- packages/runtime/datastore/package.json | 6 +- packages/runtime/id-compressor/package.json | 6 +- .../runtime/runtime-definitions/package.json | 6 +- ...ateRuntimeDefinitionsPrevious.generated.ts | 120 ++ packages/runtime/runtime-utils/package.json | 6 +- .../runtime/test-runtime-utils/package.json | 6 +- .../service-clients/azure-client/package.json | 6 +- .../tinylicious-client/package.json | 14 +- packages/test/test-utils/package.json | 6 +- .../tools/devtools/devtools-core/package.json | 6 +- packages/tools/devtools/devtools/package.json | 6 +- packages/tools/fluid-runner/package.json | 4 +- packages/utils/odsp-doclib-utils/package.json | 6 +- packages/utils/telemetry-utils/package.json | 6 +- packages/utils/tool-utils/package.json | 14 +- 65 files changed, 2552 insertions(+), 180 deletions(-) diff --git a/azure/packages/azure-service-utils/package.json b/azure/packages/azure-service-utils/package.json index 99d42f514102..5d1c1ea0b0c9 100644 --- a/azure/packages/azure-service-utils/package.json +++ b/azure/packages/azure-service-utils/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/common/lib/protocol-definitions/package.json b/common/lib/protocol-definitions/package.json index 5e22be5a8620..8fd4b0f9c943 100644 --- a/common/lib/protocol-definitions/package.json +++ b/common/lib/protocol-definitions/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/common/container-definitions/package.json b/packages/common/container-definitions/package.json index ab015d518184..7440741c22f7 100644 --- a/packages/common/container-definitions/package.json +++ b/packages/common/container-definitions/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/common/container-definitions/src/test/types/validateContainerDefinitionsPrevious.generated.ts b/packages/common/container-definitions/src/test/types/validateContainerDefinitionsPrevious.generated.ts index b448cddc072b..df6d6b610917 100644 --- a/packages/common/container-definitions/src/test/types/validateContainerDefinitionsPrevious.generated.ts +++ b/packages/common/container-definitions/src/test/types/validateContainerDefinitionsPrevious.generated.ts @@ -902,6 +902,30 @@ declare function use_old_InterfaceDeclaration_IFluidPackageEnvironment( use_old_InterfaceDeclaration_IFluidPackageEnvironment( get_current_InterfaceDeclaration_IFluidPackageEnvironment()); +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "InterfaceDeclaration_IGenericError": {"forwardCompat": false} +*/ +declare function get_old_InterfaceDeclaration_IGenericError(): + TypeOnly; +declare function use_current_InterfaceDeclaration_IGenericError( + use: TypeOnly): void; +use_current_InterfaceDeclaration_IGenericError( + get_old_InterfaceDeclaration_IGenericError()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "InterfaceDeclaration_IGenericError": {"backCompat": false} +*/ +declare function get_current_InterfaceDeclaration_IGenericError(): + TypeOnly; +declare function use_old_InterfaceDeclaration_IGenericError( + use: TypeOnly): void; +use_old_InterfaceDeclaration_IGenericError( + get_current_InterfaceDeclaration_IGenericError()); + /* * Validate forward compat by using old type in place of current type * If breaking change required, add in package.json under typeValidation.broken: @@ -1214,6 +1238,54 @@ declare function use_old_InterfaceDeclaration_ISnapshotTreeWithBlobContents( use_old_InterfaceDeclaration_ISnapshotTreeWithBlobContents( get_current_InterfaceDeclaration_ISnapshotTreeWithBlobContents()); +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "InterfaceDeclaration_IThrottlingWarning": {"forwardCompat": false} +*/ +declare function get_old_InterfaceDeclaration_IThrottlingWarning(): + TypeOnly; +declare function use_current_InterfaceDeclaration_IThrottlingWarning( + use: TypeOnly): void; +use_current_InterfaceDeclaration_IThrottlingWarning( + get_old_InterfaceDeclaration_IThrottlingWarning()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "InterfaceDeclaration_IThrottlingWarning": {"backCompat": false} +*/ +declare function get_current_InterfaceDeclaration_IThrottlingWarning(): + TypeOnly; +declare function use_old_InterfaceDeclaration_IThrottlingWarning( + use: TypeOnly): void; +use_old_InterfaceDeclaration_IThrottlingWarning( + get_current_InterfaceDeclaration_IThrottlingWarning()); + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "InterfaceDeclaration_IUsageError": {"forwardCompat": false} +*/ +declare function get_old_InterfaceDeclaration_IUsageError(): + TypeOnly; +declare function use_current_InterfaceDeclaration_IUsageError( + use: TypeOnly): void; +use_current_InterfaceDeclaration_IUsageError( + get_old_InterfaceDeclaration_IUsageError()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "InterfaceDeclaration_IUsageError": {"backCompat": false} +*/ +declare function get_current_InterfaceDeclaration_IUsageError(): + TypeOnly; +declare function use_old_InterfaceDeclaration_IUsageError( + use: TypeOnly): void; +use_old_InterfaceDeclaration_IUsageError( + get_current_InterfaceDeclaration_IUsageError()); + /* * Validate forward compat by using old type in place of current type * If breaking change required, add in package.json under typeValidation.broken: diff --git a/packages/common/core-interfaces/package.json b/packages/common/core-interfaces/package.json index 71614759d431..66163a0f83d7 100644 --- a/packages/common/core-interfaces/package.json +++ b/packages/common/core-interfaces/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/common/core-utils/package.json b/packages/common/core-utils/package.json index 20dfeb09e6a9..4ce9a7b6525b 100644 --- a/packages/common/core-utils/package.json +++ b/packages/common/core-utils/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/common/driver-definitions/package.json b/packages/common/driver-definitions/package.json index 2966e6460ce4..dea019d4f07a 100644 --- a/packages/common/driver-definitions/package.json +++ b/packages/common/driver-definitions/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/dds/cell/package.json b/packages/dds/cell/package.json index 68a75b21ea4b..687bc167315e 100644 --- a/packages/dds/cell/package.json +++ b/packages/dds/cell/package.json @@ -14,12 +14,20 @@ "type": "module", "exports": { ".": { + "trimmedAPI": { + "import": { + "types": "./lib/public.d.ts" + }, + "require": { + "types": "./dist/public.d.ts" + } + }, "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -35,7 +43,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/dds/counter/package.json b/packages/dds/counter/package.json index 2eb6e204ab3a..ee5e6d1adc65 100644 --- a/packages/dds/counter/package.json +++ b/packages/dds/counter/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/dds/map/package.json b/packages/dds/map/package.json index bbd95415bb30..a5f02f76c75d 100644 --- a/packages/dds/map/package.json +++ b/packages/dds/map/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/dds/matrix/package.json b/packages/dds/matrix/package.json index ee026cf4475d..f571c0cfc3ed 100644 --- a/packages/dds/matrix/package.json +++ b/packages/dds/matrix/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/dds/merge-tree/package.json b/packages/dds/merge-tree/package.json index b96c79f2fbef..9c86de3efc62 100644 --- a/packages/dds/merge-tree/package.json +++ b/packages/dds/merge-tree/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -57,7 +57,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/dds/ordered-collection/package.json b/packages/dds/ordered-collection/package.json index d4b2b7aca21d..c34d88e40ade 100644 --- a/packages/dds/ordered-collection/package.json +++ b/packages/dds/ordered-collection/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/dds/register-collection/package.json b/packages/dds/register-collection/package.json index 56d01664488e..8295531e591e 100644 --- a/packages/dds/register-collection/package.json +++ b/packages/dds/register-collection/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/dds/sequence/package.json b/packages/dds/sequence/package.json index dc2854952056..32c793c942f0 100644 --- a/packages/dds/sequence/package.json +++ b/packages/dds/sequence/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -65,7 +65,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/dds/sequence/src/test/types/validateSequencePrevious.generated.ts b/packages/dds/sequence/src/test/types/validateSequencePrevious.generated.ts index 194154a331de..8c05f3b3b86b 100644 --- a/packages/dds/sequence/src/test/types/validateSequencePrevious.generated.ts +++ b/packages/dds/sequence/src/test/types/validateSequencePrevious.generated.ts @@ -23,6 +23,30 @@ type TypeOnly = T extends number [P in keyof T]: TypeOnly; }; +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "ClassDeclaration_BaseSegment": {"forwardCompat": false} +*/ +declare function get_old_ClassDeclaration_BaseSegment(): + TypeOnly; +declare function use_current_ClassDeclaration_BaseSegment( + use: TypeOnly): void; +use_current_ClassDeclaration_BaseSegment( + get_old_ClassDeclaration_BaseSegment()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "ClassDeclaration_BaseSegment": {"backCompat": false} +*/ +declare function get_current_ClassDeclaration_BaseSegment(): + TypeOnly; +declare function use_old_ClassDeclaration_BaseSegment( + use: TypeOnly): void; +use_old_ClassDeclaration_BaseSegment( + get_current_ClassDeclaration_BaseSegment()); + /* * Validate forward compat by using old type in place of current type * If breaking change required, add in package.json under typeValidation.broken: @@ -288,6 +312,30 @@ declare function use_old_InterfaceDeclaration_IOverlappingIntervalsIndex( use_old_InterfaceDeclaration_IOverlappingIntervalsIndex( get_current_InterfaceDeclaration_IOverlappingIntervalsIndex()); +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "InterfaceDeclaration_ISegment": {"forwardCompat": false} +*/ +declare function get_old_InterfaceDeclaration_ISegment(): + TypeOnly; +declare function use_current_InterfaceDeclaration_ISegment( + use: TypeOnly): void; +use_current_InterfaceDeclaration_ISegment( + get_old_InterfaceDeclaration_ISegment()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "InterfaceDeclaration_ISegment": {"backCompat": false} +*/ +declare function get_current_InterfaceDeclaration_ISegment(): + TypeOnly; +declare function use_old_InterfaceDeclaration_ISegment( + use: TypeOnly): void; +use_old_InterfaceDeclaration_ISegment( + get_current_InterfaceDeclaration_ISegment()); + /* * Validate forward compat by using old type in place of current type * If breaking change required, add in package.json under typeValidation.broken: @@ -720,6 +768,198 @@ declare function use_old_EnumDeclaration_IntervalType( use_old_EnumDeclaration_IntervalType( get_current_EnumDeclaration_IntervalType()); +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "InterfaceDeclaration_LocalReferencePosition": {"forwardCompat": false} +*/ +declare function get_old_InterfaceDeclaration_LocalReferencePosition(): + TypeOnly; +declare function use_current_InterfaceDeclaration_LocalReferencePosition( + use: TypeOnly): void; +use_current_InterfaceDeclaration_LocalReferencePosition( + get_old_InterfaceDeclaration_LocalReferencePosition()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "InterfaceDeclaration_LocalReferencePosition": {"backCompat": false} +*/ +declare function get_current_InterfaceDeclaration_LocalReferencePosition(): + TypeOnly; +declare function use_old_InterfaceDeclaration_LocalReferencePosition( + use: TypeOnly): void; +use_old_InterfaceDeclaration_LocalReferencePosition( + get_current_InterfaceDeclaration_LocalReferencePosition()); + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "InterfaceDeclaration_MapLike": {"forwardCompat": false} +*/ +declare function get_old_InterfaceDeclaration_MapLike(): + TypeOnly>; +declare function use_current_InterfaceDeclaration_MapLike( + use: TypeOnly>): void; +use_current_InterfaceDeclaration_MapLike( + get_old_InterfaceDeclaration_MapLike()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "InterfaceDeclaration_MapLike": {"backCompat": false} +*/ +declare function get_current_InterfaceDeclaration_MapLike(): + TypeOnly>; +declare function use_old_InterfaceDeclaration_MapLike( + use: TypeOnly>): void; +use_old_InterfaceDeclaration_MapLike( + get_current_InterfaceDeclaration_MapLike()); + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "ClassDeclaration_Marker": {"forwardCompat": false} +*/ +declare function get_old_ClassDeclaration_Marker(): + TypeOnly; +declare function use_current_ClassDeclaration_Marker( + use: TypeOnly): void; +use_current_ClassDeclaration_Marker( + get_old_ClassDeclaration_Marker()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "ClassDeclaration_Marker": {"backCompat": false} +*/ +declare function get_current_ClassDeclaration_Marker(): + TypeOnly; +declare function use_old_ClassDeclaration_Marker( + use: TypeOnly): void; +use_old_ClassDeclaration_Marker( + get_current_ClassDeclaration_Marker()); + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "VariableDeclaration_MergeTreeDeltaType": {"forwardCompat": false} +*/ +declare function get_old_VariableDeclaration_MergeTreeDeltaType(): + TypeOnly; +declare function use_current_VariableDeclaration_MergeTreeDeltaType( + use: TypeOnly): void; +use_current_VariableDeclaration_MergeTreeDeltaType( + get_old_VariableDeclaration_MergeTreeDeltaType()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "VariableDeclaration_MergeTreeDeltaType": {"backCompat": false} +*/ +declare function get_current_VariableDeclaration_MergeTreeDeltaType(): + TypeOnly; +declare function use_old_VariableDeclaration_MergeTreeDeltaType( + use: TypeOnly): void; +use_old_VariableDeclaration_MergeTreeDeltaType( + get_current_VariableDeclaration_MergeTreeDeltaType()); + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "TypeAliasDeclaration_MergeTreeDeltaType": {"forwardCompat": false} +*/ +declare function get_old_TypeAliasDeclaration_MergeTreeDeltaType(): + TypeOnly; +declare function use_current_TypeAliasDeclaration_MergeTreeDeltaType( + use: TypeOnly): void; +use_current_TypeAliasDeclaration_MergeTreeDeltaType( + get_old_TypeAliasDeclaration_MergeTreeDeltaType()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "TypeAliasDeclaration_MergeTreeDeltaType": {"backCompat": false} +*/ +declare function get_current_TypeAliasDeclaration_MergeTreeDeltaType(): + TypeOnly; +declare function use_old_TypeAliasDeclaration_MergeTreeDeltaType( + use: TypeOnly): void; +use_old_TypeAliasDeclaration_MergeTreeDeltaType( + get_current_TypeAliasDeclaration_MergeTreeDeltaType()); + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "TypeAliasDeclaration_PropertySet": {"forwardCompat": false} +*/ +declare function get_old_TypeAliasDeclaration_PropertySet(): + TypeOnly; +declare function use_current_TypeAliasDeclaration_PropertySet( + use: TypeOnly): void; +use_current_TypeAliasDeclaration_PropertySet( + get_old_TypeAliasDeclaration_PropertySet()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "TypeAliasDeclaration_PropertySet": {"backCompat": false} +*/ +declare function get_current_TypeAliasDeclaration_PropertySet(): + TypeOnly; +declare function use_old_TypeAliasDeclaration_PropertySet( + use: TypeOnly): void; +use_old_TypeAliasDeclaration_PropertySet( + get_current_TypeAliasDeclaration_PropertySet()); + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "InterfaceDeclaration_ReferencePosition": {"forwardCompat": false} +*/ +declare function get_old_InterfaceDeclaration_ReferencePosition(): + TypeOnly; +declare function use_current_InterfaceDeclaration_ReferencePosition( + use: TypeOnly): void; +use_current_InterfaceDeclaration_ReferencePosition( + get_old_InterfaceDeclaration_ReferencePosition()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "InterfaceDeclaration_ReferencePosition": {"backCompat": false} +*/ +declare function get_current_InterfaceDeclaration_ReferencePosition(): + TypeOnly; +declare function use_old_InterfaceDeclaration_ReferencePosition( + use: TypeOnly): void; +use_old_InterfaceDeclaration_ReferencePosition( + get_current_InterfaceDeclaration_ReferencePosition()); + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "EnumDeclaration_ReferenceType": {"forwardCompat": false} +*/ +declare function get_old_EnumDeclaration_ReferenceType(): + TypeOnly; +declare function use_current_EnumDeclaration_ReferenceType( + use: TypeOnly): void; +use_current_EnumDeclaration_ReferenceType( + get_old_EnumDeclaration_ReferenceType()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "EnumDeclaration_ReferenceType": {"backCompat": false} +*/ +declare function get_current_EnumDeclaration_ReferenceType(): + TypeOnly; +declare function use_old_EnumDeclaration_ReferenceType( + use: TypeOnly): void; +use_old_EnumDeclaration_ReferenceType( + get_current_EnumDeclaration_ReferenceType()); + /* * Validate forward compat by using old type in place of current type * If breaking change required, add in package.json under typeValidation.broken: @@ -1153,6 +1393,54 @@ declare function use_old_ClassDeclaration_SubSequence( use_old_ClassDeclaration_SubSequence( get_current_ClassDeclaration_SubSequence()); +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "ClassDeclaration_TextSegment": {"forwardCompat": false} +*/ +declare function get_old_ClassDeclaration_TextSegment(): + TypeOnly; +declare function use_current_ClassDeclaration_TextSegment( + use: TypeOnly): void; +use_current_ClassDeclaration_TextSegment( + get_old_ClassDeclaration_TextSegment()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "ClassDeclaration_TextSegment": {"backCompat": false} +*/ +declare function get_current_ClassDeclaration_TextSegment(): + TypeOnly; +declare function use_old_ClassDeclaration_TextSegment( + use: TypeOnly): void; +use_old_ClassDeclaration_TextSegment( + get_current_ClassDeclaration_TextSegment()); + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "ClassDeclaration_TrackingGroup": {"forwardCompat": false} +*/ +declare function get_old_ClassDeclaration_TrackingGroup(): + TypeOnly; +declare function use_current_ClassDeclaration_TrackingGroup( + use: TypeOnly): void; +use_current_ClassDeclaration_TrackingGroup( + get_old_ClassDeclaration_TrackingGroup()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "ClassDeclaration_TrackingGroup": {"backCompat": false} +*/ +declare function get_current_ClassDeclaration_TrackingGroup(): + TypeOnly; +declare function use_old_ClassDeclaration_TrackingGroup( + use: TypeOnly): void; +use_old_ClassDeclaration_TrackingGroup( + get_current_ClassDeclaration_TrackingGroup()); + /* * Validate forward compat by using old type in place of current type * If breaking change required, add in package.json under typeValidation.broken: @@ -1489,6 +1777,78 @@ declare function use_old_FunctionDeclaration_intervalLocatorFromEndpoint( use_old_FunctionDeclaration_intervalLocatorFromEndpoint( get_current_FunctionDeclaration_intervalLocatorFromEndpoint()); +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "VariableDeclaration_reservedMarkerIdKey": {"forwardCompat": false} +*/ +declare function get_old_VariableDeclaration_reservedMarkerIdKey(): + TypeOnly; +declare function use_current_VariableDeclaration_reservedMarkerIdKey( + use: TypeOnly): void; +use_current_VariableDeclaration_reservedMarkerIdKey( + get_old_VariableDeclaration_reservedMarkerIdKey()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "VariableDeclaration_reservedMarkerIdKey": {"backCompat": false} +*/ +declare function get_current_VariableDeclaration_reservedMarkerIdKey(): + TypeOnly; +declare function use_old_VariableDeclaration_reservedMarkerIdKey( + use: TypeOnly): void; +use_old_VariableDeclaration_reservedMarkerIdKey( + get_current_VariableDeclaration_reservedMarkerIdKey()); + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "VariableDeclaration_reservedRangeLabelsKey": {"forwardCompat": false} +*/ +declare function get_old_VariableDeclaration_reservedRangeLabelsKey(): + TypeOnly; +declare function use_current_VariableDeclaration_reservedRangeLabelsKey( + use: TypeOnly): void; +use_current_VariableDeclaration_reservedRangeLabelsKey( + get_old_VariableDeclaration_reservedRangeLabelsKey()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "VariableDeclaration_reservedRangeLabelsKey": {"backCompat": false} +*/ +declare function get_current_VariableDeclaration_reservedRangeLabelsKey(): + TypeOnly; +declare function use_old_VariableDeclaration_reservedRangeLabelsKey( + use: TypeOnly): void; +use_old_VariableDeclaration_reservedRangeLabelsKey( + get_current_VariableDeclaration_reservedRangeLabelsKey()); + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "VariableDeclaration_reservedTileLabelsKey": {"forwardCompat": false} +*/ +declare function get_old_VariableDeclaration_reservedTileLabelsKey(): + TypeOnly; +declare function use_current_VariableDeclaration_reservedTileLabelsKey( + use: TypeOnly): void; +use_current_VariableDeclaration_reservedTileLabelsKey( + get_old_VariableDeclaration_reservedTileLabelsKey()); + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "VariableDeclaration_reservedTileLabelsKey": {"backCompat": false} +*/ +declare function get_current_VariableDeclaration_reservedTileLabelsKey(): + TypeOnly; +declare function use_old_VariableDeclaration_reservedTileLabelsKey( + use: TypeOnly): void; +use_old_VariableDeclaration_reservedTileLabelsKey( + get_current_VariableDeclaration_reservedTileLabelsKey()); + /* * Validate forward compat by using old type in place of current type * If breaking change required, add in package.json under typeValidation.broken: diff --git a/packages/dds/shared-object-base/package.json b/packages/dds/shared-object-base/package.json index 4e67467fd9d2..8ff485329bf8 100644 --- a/packages/dds/shared-object-base/package.json +++ b/packages/dds/shared-object-base/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/dds/shared-summary-block/package.json b/packages/dds/shared-summary-block/package.json index ddb61b944831..85c7a78fd4ab 100644 --- a/packages/dds/shared-summary-block/package.json +++ b/packages/dds/shared-summary-block/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/dds/task-manager/package.json b/packages/dds/task-manager/package.json index 3338824993e1..a9b3f9bbad86 100644 --- a/packages/dds/task-manager/package.json +++ b/packages/dds/task-manager/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/dds/tree/package.json b/packages/dds/tree/package.json index 8c90512b9f2f..db386cf5ec33 100644 --- a/packages/dds/tree/package.json +++ b/packages/dds/tree/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/drivers/debugger/package.json b/packages/drivers/debugger/package.json index 6f8ce9ecd51d..053d70f8598f 100644 --- a/packages/drivers/debugger/package.json +++ b/packages/drivers/debugger/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/drivers/driver-base/package.json b/packages/drivers/driver-base/package.json index 904f7971f99e..cab08ec2908f 100644 --- a/packages/drivers/driver-base/package.json +++ b/packages/drivers/driver-base/package.json @@ -14,12 +14,20 @@ "type": "module", "exports": { ".": { + "trimmedAPI": { + "import": { + "types": "./lib/public.d.ts" + }, + "require": { + "types": "./dist/public.d.ts" + } + }, "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -35,7 +43,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/drivers/driver-web-cache/package.json b/packages/drivers/driver-web-cache/package.json index f65f9628b0cf..b4934c023360 100644 --- a/packages/drivers/driver-web-cache/package.json +++ b/packages/drivers/driver-web-cache/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/drivers/file-driver/package.json b/packages/drivers/file-driver/package.json index 6f0bc2cc7a81..39d3992dd7ec 100644 --- a/packages/drivers/file-driver/package.json +++ b/packages/drivers/file-driver/package.json @@ -14,12 +14,20 @@ "type": "module", "exports": { ".": { + "trimmedAPI": { + "import": { + "types": "./lib/public.d.ts" + }, + "require": { + "types": "./dist/public.d.ts" + } + }, "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -35,7 +43,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/drivers/local-driver/package.json b/packages/drivers/local-driver/package.json index 0ef56f740068..edf061040cb6 100644 --- a/packages/drivers/local-driver/package.json +++ b/packages/drivers/local-driver/package.json @@ -14,11 +14,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -47,7 +47,7 @@ "browser": { "moniker": "@fluidframework/server-services-client/dist/generateNames.js" }, - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/drivers/odsp-driver-definitions/package.json b/packages/drivers/odsp-driver-definitions/package.json index 7ac7a1114216..3384abb3ca5b 100644 --- a/packages/drivers/odsp-driver-definitions/package.json +++ b/packages/drivers/odsp-driver-definitions/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -55,7 +55,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/drivers/odsp-driver/package.json b/packages/drivers/odsp-driver/package.json index b46006860a22..493d6b60eb73 100644 --- a/packages/drivers/odsp-driver/package.json +++ b/packages/drivers/odsp-driver/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -55,7 +55,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/drivers/odsp-urlResolver/package.json b/packages/drivers/odsp-urlResolver/package.json index 03f1dcd88f70..095fc7046230 100644 --- a/packages/drivers/odsp-urlResolver/package.json +++ b/packages/drivers/odsp-urlResolver/package.json @@ -14,12 +14,20 @@ "type": "module", "exports": { ".": { + "trimmedAPI": { + "import": { + "types": "./lib/public.d.ts" + }, + "require": { + "types": "./dist/public.d.ts" + } + }, "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -35,7 +43,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/drivers/replay-driver/package.json b/packages/drivers/replay-driver/package.json index 69f188a7a384..a043b509cd91 100644 --- a/packages/drivers/replay-driver/package.json +++ b/packages/drivers/replay-driver/package.json @@ -14,12 +14,20 @@ "type": "module", "exports": { ".": { + "trimmedAPI": { + "import": { + "types": "./lib/public.d.ts" + }, + "require": { + "types": "./dist/public.d.ts" + } + }, "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -35,7 +43,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/drivers/routerlicious-driver/package.json b/packages/drivers/routerlicious-driver/package.json index fc7cda3d06df..afa05b7057dc 100644 --- a/packages/drivers/routerlicious-driver/package.json +++ b/packages/drivers/routerlicious-driver/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -55,7 +55,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/drivers/routerlicious-urlResolver/package.json b/packages/drivers/routerlicious-urlResolver/package.json index e2f9a760cf3c..62f1a0ae4e7e 100644 --- a/packages/drivers/routerlicious-urlResolver/package.json +++ b/packages/drivers/routerlicious-urlResolver/package.json @@ -14,12 +14,20 @@ "type": "module", "exports": { ".": { + "trimmedAPI": { + "import": { + "types": "./lib/public.d.ts" + }, + "require": { + "types": "./dist/public.d.ts" + } + }, "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -35,7 +43,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/drivers/tinylicious-driver/package.json b/packages/drivers/tinylicious-driver/package.json index f55add37199f..3366178e5697 100644 --- a/packages/drivers/tinylicious-driver/package.json +++ b/packages/drivers/tinylicious-driver/package.json @@ -13,12 +13,20 @@ "type": "module", "exports": { ".": { + "trimmedAPI": { + "import": { + "types": "./lib/public.d.ts" + }, + "require": { + "types": "./dist/public.d.ts" + } + }, "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -34,7 +42,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/framework/agent-scheduler/package.json b/packages/framework/agent-scheduler/package.json index 291aa582ac2a..d858a60f9ef1 100644 --- a/packages/framework/agent-scheduler/package.json +++ b/packages/framework/agent-scheduler/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/framework/aqueduct/package.json b/packages/framework/aqueduct/package.json index 6103bf20df72..160b852b52a1 100644 --- a/packages/framework/aqueduct/package.json +++ b/packages/framework/aqueduct/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/framework/client-logger/app-insights-logger/package.json b/packages/framework/client-logger/app-insights-logger/package.json index f4134e81de1a..58103de8d34c 100644 --- a/packages/framework/client-logger/app-insights-logger/package.json +++ b/packages/framework/client-logger/app-insights-logger/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/framework/client-logger/fluid-telemetry/package.json b/packages/framework/client-logger/fluid-telemetry/package.json index cd11ac46ed07..87d17381bcb4 100644 --- a/packages/framework/client-logger/fluid-telemetry/package.json +++ b/packages/framework/client-logger/fluid-telemetry/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, diff --git a/packages/framework/fluid-framework/api-report/fluid-framework.api.md b/packages/framework/fluid-framework/api-report/fluid-framework.api.md index decc1a2f6c7f..b64813fee53c 100644 --- a/packages/framework/fluid-framework/api-report/fluid-framework.api.md +++ b/packages/framework/fluid-framework/api-report/fluid-framework.api.md @@ -6,8 +6,10 @@ import { Client } from '@fluidframework/merge-tree/internal'; import { Deferred } from '@fluidframework/core-utils/internal'; +import type { ErasedType } from '@fluidframework/core-interfaces'; import { FieldSchemaUnsafe as FieldSchemaUnsafe_2 } from './typesUnsafe.js'; import { FluidObject } from '@fluidframework/core-interfaces'; +import { Forbidden as Forbidden_2 } from '../default-schema/defaultFieldKinds.js'; import { IChannel } from '@fluidframework/datastore-definitions'; import { IChannelAttributes } from '@fluidframework/datastore-definitions'; import { IChannelFactory } from '@fluidframework/datastore-definitions'; @@ -27,6 +29,7 @@ import { IMergeTreeDeltaCallbackArgs } from '@fluidframework/merge-tree/internal import { IMergeTreeDeltaOpArgs } from '@fluidframework/merge-tree/internal'; import { IMergeTreeGroupMsg } from '@fluidframework/merge-tree/internal'; import { IMergeTreeMaintenanceCallbackArgs } from '@fluidframework/merge-tree/internal'; +import { InsertableObjectFromSchemaRecordUnsafe as InsertableObjectFromSchemaRecordUnsafe_2 } from './typesUnsafe.js'; import { IRelativePosition } from '@fluidframework/merge-tree/internal'; import { ISegment } from '@fluidframework/merge-tree/internal'; import { ISegmentAction } from '@fluidframework/merge-tree/internal'; @@ -36,6 +39,7 @@ import { ISharedObjectEvents } from '@fluidframework/shared-object-base'; import { ISharedObjectKind } from '@fluidframework/shared-object-base'; import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions'; import { ITelemetryContext } from '@fluidframework/runtime-definitions'; +import { LeafNodeSchema as LeafNodeSchema_2 } from '../feature-libraries/index.js'; import { LocalReferencePosition } from '@fluidframework/merge-tree/internal'; import { Marker } from '@fluidframework/merge-tree/internal'; import { MergeTreeDeltaOperationType } from '@fluidframework/merge-tree/internal'; @@ -46,17 +50,161 @@ import { PropertiesManager } from '@fluidframework/merge-tree/internal'; import { PropertySet } from '@fluidframework/merge-tree/internal'; import { ReferencePosition } from '@fluidframework/merge-tree/internal'; import { ReferenceType } from '@fluidframework/merge-tree/internal'; +import { SchemaLibrary as SchemaLibrary_2 } from '../feature-libraries/schemaBuilderBase.js'; +import { SessionSpaceCompressedId } from '@fluidframework/id-compressor'; import { SharedObject } from '@fluidframework/shared-object-base/internal'; import { SlidingPreference } from '@fluidframework/merge-tree/internal'; +import { StableId } from '@fluidframework/id-compressor'; +import type { Static } from '@sinclair/typebox'; import { TextSegment } from '@fluidframework/merge-tree/internal'; +import { TreeNodeSchema as TreeNodeSchema_2 } from './schemaTypes.js'; +import { TreeNodeSchemaClass as TreeNodeSchemaClass_2 } from './schemaTypes.js'; +import { TreeObjectNodeUnsafe as TreeObjectNodeUnsafe_2 } from './typesUnsafe.js'; +import type { TSchema } from '@sinclair/typebox'; import { TypedEventEmitter } from '@fluid-internal/client-utils'; +// @internal +export function adaptEnum>(factory: SchemaFactory, members: TEnum): ((value: TValue) => object & TreeNode & ObjectFromSchemaRecord & { + readonly value: TValue; +}) & { readonly [Property in keyof TEnum]: TreeNodeSchemaClass, NodeKind.Object, object & TreeNode & ObjectFromSchemaRecord & { + readonly value: TEnum[Property]; + }, object & InsertableObjectFromSchemaRecord, true, unknown> & (new () => object & TreeNode & ObjectFromSchemaRecord & { + readonly value: TEnum[Property]; + }); }; + +// @internal +export interface Adapters { + // (undocumented) + readonly tree?: readonly TreeAdapter[]; +} + // @public export type AllowedTypes = readonly LazyItem[]; +// @internal +export type AllowedTypeSet = Any | ReadonlySet; + +// @internal +export type AllowedTypesToFlexInsertableTree = [ +T extends readonly LazyItem[] ? InsertableFlexNode, FlexTreeNodeSchema>> : ContextuallyTypedNodeData +][_InlineTrick]; + +// @internal +export enum AllowedUpdateType { + Initialize = 1, + None = 0, + SchemaCompatible = 2 +} + +// @internal +export type AllowOptional = [FlattenKeys & OptionalFields>][_InlineTrick]; + +// @internal +export type AllowOptionalNotFlattened = [RequiredFields & OptionalFields][_InlineTrick]; + +// @internal +export type Anchor = Brand; + +// @internal +export interface AnchorEvents { + afterDestroy(anchor: AnchorNode): void; + childrenChanged(anchor: AnchorNode): void; + childrenChanging(anchor: AnchorNode): void; + subtreeChanged(anchor: AnchorNode): void; + subtreeChanging(anchor: AnchorNode): PathVisitor | void; + valueChanging(anchor: AnchorNode, value: Value): void; +} + +// @internal +export interface AnchorLocator { + locate(anchor: Anchor): AnchorNode | undefined; +} + +// @internal +export interface AnchorNode extends UpPath, ISubscribable { + readonly anchorSet: AnchorSet; + child(key: FieldKey, index: number): UpPath; + getOrCreateChildRef(key: FieldKey, index: number): [Anchor, AnchorNode]; + readonly slots: BrandedMapSubset>; +} + +// @internal @sealed +export class AnchorSet implements ISubscribable, AnchorLocator { + constructor(); + acquireVisitor(): AnnouncedVisitor & DeltaVisitor; + // (undocumented) + forget(anchor: Anchor): void; + generationNumber: number; + internalizePath(originalPath: UpPath): UpPath; + isEmpty(): boolean; + // (undocumented) + locate(anchor: Anchor): AnchorNode | undefined; + // (undocumented) + on(eventName: K, listener: AnchorSetRootEvents[K]): () => void; + get slots(): BrandedMapSubset>; + track(path: UpPath | null): Anchor; +} + +// @internal +export interface AnchorSetRootEvents { + childrenChanging(anchors: AnchorSet): void; + treeChanging(anchors: AnchorSet): void; +} + +// @internal +export type AnchorSlot = BrandedKey>, TContent>; + +// @internal +export function anchorSlot(): AnchorSlot; + +// @internal +export interface AnnouncedVisitor extends DeltaVisitor { + // (undocumented) + afterAttach(source: FieldKey, destination: Range_2): void; + afterCreate(content: ProtoNodes, destination: FieldKey): void; + // (undocumented) + afterDetach(source: PlaceIndex, count: number, destination: FieldKey): void; + // (undocumented) + afterReplace(newContentSource: FieldKey, newContent: Range_2, oldContent: FieldKey): void; + // (undocumented) + beforeAttach(source: FieldKey, count: number, destination: PlaceIndex): void; + // (undocumented) + beforeDestroy(field: FieldKey, count: number): void; + // (undocumented) + beforeDetach(source: Range_2, destination: FieldKey): void; + // (undocumented) + beforeReplace(newContent: FieldKey, oldContent: Range_2, oldContentDestination: FieldKey): void; +} + +// @internal +export const Any: "Any"; + +// @internal +export type Any = typeof Any; + // @public export type ApplyKind = Kind extends FieldKind.Required ? T : undefined | T; +// @internal +export type ApplyMultiplicity = { + [Multiplicity.Forbidden]: undefined; + [Multiplicity.Optional]: undefined | TypedChild; + [Multiplicity.Sequence]: TypedChild[]; + [Multiplicity.Single]: TypedChild; +}[TMultiplicity]; + +// @internal +export interface ArrayLikeMut extends ArrayLike { + // (undocumented) + [n: number]: TSet; +} + +// @internal +export type AssignableFieldKinds = typeof FieldKinds.optional | typeof FieldKinds.required; + +// @internal +export type Assume = [TInput] extends [TAssumeToBe] ? TInput : TAssumeToBe; + // @public export enum AttachState { Attached = "Attached", @@ -64,6 +212,71 @@ export enum AttachState { Detached = "Detached" } +// @internal +export type Brand = ValueType & BrandedType; + +// @internal +export function brand(value: T extends BrandedType ? ValueType : never): T; + +// @internal +export type BrandedKey = TKey & Invariant; + +// @internal (undocumented) +export type BrandedKeyContent> = TKey extends BrandedKey ? TContent : never; + +// @internal +export interface BrandedMapSubset> { + // (undocumented) + delete(key: K): boolean; + // (undocumented) + get(key: K2): BrandedKeyContent | undefined; + // (undocumented) + has(key: K): boolean; + // (undocumented) + set(key: K2, value: BrandedKeyContent): this; +} + +// @internal @sealed +export abstract class BrandedType { + static [Symbol.hasInstance](value: never): value is never; + protected abstract brand(dummy: never): Name; + // (undocumented) + protected _typeCheck?: Covariant; +} + +// @internal +export function buildTreeConfiguration(config: InitializeAndSchematizeConfiguration): InitializeAndSchematizeConfiguration; + +// @internal +export type ChangesetLocalId = Brand; + +// @internal +export interface CheckoutEvents { + afterBatch(): void; + commitApplied(data: CommitMetadata, getRevertible?: RevertibleFactory): void; +} + +// @internal +export type CheckTypesOverlap = [Extract extends never ? never : T][0]; + +// @internal +export type ChildCollection = FieldKey | RootField; + +// @internal +export interface ChildLocation { + // (undocumented) + readonly container: ChildCollection; + // (undocumented) + readonly index: number; +} + +// @internal +export type CollectOptions = TValueSchema extends undefined ? FlattenKeys<{ + [typeNameSymbol]?: UnbrandedName; +} & (TValueSchema extends ValueSchema ? { + [valueSymbol]: TreeValue; +} : EmptyObject)> & TTypedFields : TValueSchema extends ValueSchema ? TreeValue : undefined; + // @public export enum CommitKind { Default = 0, @@ -77,6 +290,12 @@ export interface CommitMetadata { readonly kind: CommitKind; } +// @internal +export function compareLocalNodeKeys(a: LocalNodeKey, b: LocalNodeKey): -1 | 0 | 1; + +// @internal +export function configuredSharedTree(options: SharedTreeOptions): ISharedObjectKind; + // @public export enum ConnectionState { CatchingUp = 1, @@ -118,6 +337,68 @@ export interface ContainerSchema { readonly initialObjects: LoadableObjectClassRecord; } +// @internal +export type ContextuallyTypedFieldData = ContextuallyTypedNodeData | undefined; + +// @internal +export type ContextuallyTypedNodeData = ContextuallyTypedNodeDataObject | number | string | boolean | null | readonly ContextuallyTypedNodeData[] | MarkedArrayLike; + +// @internal +export interface ContextuallyTypedNodeDataObject { + readonly [typeNameSymbol]?: string; + readonly [valueSymbol]?: Value; + [key: FieldKey]: ContextuallyTypedFieldData; + [key: string]: ContextuallyTypedFieldData; +} + +// @internal +export interface Contravariant { + // (undocumented) + _removeCovariance?: (_: T) => void; +} + +// @internal +export interface Covariant { + // (undocumented) + _removeContravariance?: T; +} + +// @internal +export function createEmitter>(noListeners?: NoListenersCallback): ISubscribable & IEmitter & HasListeners; + +// @internal +export interface CursorAdapter { + // (undocumented) + getFieldFromNode(node: TNode, key: FieldKey): readonly TNode[]; + // (undocumented) + keysFromNode(node: TNode): readonly FieldKey[]; + // (undocumented) + type(node: TNode): TreeType; + // (undocumented) + value(node: TNode): Value; +} + +// @internal +export function cursorForJsonableTreeNode(root: JsonableTree): ITreeCursorSynchronous; + +// @internal +export function cursorForTypedTreeData(context: TreeDataContext, schema: T, data: InsertableFlexNode): ITreeCursorSynchronous; + +// @internal +export function cursorFromContextualData(context: TreeDataContext, typeSet: AllowedTypeSet, data: ContextuallyTypedNodeData): ITreeCursorSynchronous; + +// @internal (undocumented) +export const enum CursorLocationType { + Fields = 1, + Nodes = 0 +} + +// @internal +export interface CursorWithNode extends ITreeCursorSynchronous { + fork(): CursorWithNode; + getNode(): TNode; +} + // @public export type DataObjectClass = { readonly factory: { @@ -125,9 +406,107 @@ export type DataObjectClass = { }; } & (new (...args: any[]) => T); +// @internal +export const defaultSchemaPolicy: FullSchemaPolicy; + +// @internal +export interface DeltaDetachedNodeBuild { + // (undocumented) + readonly id: DeltaDetachedNodeId; + // (undocumented) + readonly trees: readonly TTree[]; +} + +// @internal +export interface DeltaDetachedNodeChanges { + // (undocumented) + readonly fields: DeltaFieldMap; + // (undocumented) + readonly id: DeltaDetachedNodeId; +} + +// @internal +export interface DeltaDetachedNodeDestruction { + // (undocumented) + readonly count: number; + // (undocumented) + readonly id: DeltaDetachedNodeId; +} + +// @internal +export interface DeltaDetachedNodeId { + // (undocumented) + readonly major?: RevisionTag; + // (undocumented) + readonly minor: number; +} + +// @internal +export interface DeltaDetachedNodeRename { + // (undocumented) + readonly count: number; + // (undocumented) + readonly newId: DeltaDetachedNodeId; + // (undocumented) + readonly oldId: DeltaDetachedNodeId; +} + +// @internal +export interface DeltaFieldChanges { + readonly global?: readonly DeltaDetachedNodeChanges[]; + readonly local?: readonly DeltaMark[]; + readonly rename?: readonly DeltaDetachedNodeRename[]; +} + +// @internal (undocumented) +export type DeltaFieldMap = ReadonlyMap; + +// @internal +export interface DeltaMark { + readonly attach?: DeltaDetachedNodeId; + readonly count: number; + readonly detach?: DeltaDetachedNodeId; + readonly fields?: DeltaFieldMap; +} + +// @internal +export type DeltaProtoNode = ITreeCursorSynchronous; + +// @internal +export interface DeltaRoot { + readonly build?: readonly DeltaDetachedNodeBuild[]; + readonly destroy?: readonly DeltaDetachedNodeDestruction[]; + readonly fields?: DeltaFieldMap; + readonly refreshers?: readonly DeltaDetachedNodeBuild[]; +} + +// @internal +export interface DeltaVisitor { + attach(source: FieldKey, count: number, destination: PlaceIndex): void; + create(content: ProtoNodes, destination: FieldKey): void; + destroy(detachedField: FieldKey, count: number): void; + detach(source: Range_2, destination: FieldKey): void; + enterField(key: FieldKey): void; + enterNode(index: NodeIndex): void; + exitField(key: FieldKey): void; + exitNode(index: NodeIndex): void; + free(): void; + replace(newContentSource: FieldKey, range: Range_2, oldContentDestination: FieldKey): void; +} + // @alpha (undocumented) export type DeserializeCallback = (properties: PropertySet) => void; +// @internal +export interface DetachedField extends Opaque> { +} + +// @internal +export type DetachedPlaceUpPath = Brand, "DetachedRangeUpPath">; + +// @internal +export type DetachedRangeUpPath = Brand, "DetachedRangeUpPath">; + // @alpha @sealed export class DirectoryFactory implements IChannelFactory { static readonly Attributes: IChannelAttributes; @@ -166,20 +545,99 @@ export const DriverErrorTypes: { // @public export type DriverErrorTypes = (typeof DriverErrorTypes)[keyof typeof DriverErrorTypes]; +// @internal +export const EmptyKey: FieldKey; + +// @internal +export type EmptyObject = {}; + +// @internal +export function encodeTreeSchema(schema: TreeStoredSchema): JsonCompatible; + +// @internal +export function enumFromStrings(factory: SchemaFactory, members: Members[]): ((value: TValue) => object & TreeNode & ObjectFromSchemaRecord & { + readonly value: TValue; +}) & Record, NodeKind.Object, object & TreeNode & ObjectFromSchemaRecord & { + readonly value: Members; +}, object & InsertableObjectFromSchemaRecord, true, unknown> & (new () => object & TreeNode & ObjectFromSchemaRecord & { + readonly value: Members; +})>; + +// @internal +export interface ErasedTreeNodeSchemaDataFormat extends ErasedType<"TreeNodeSchemaDataFormat"> { +} + // @public export type Events = { [P in (string | symbol) & keyof E as IsEvent extends true ? P : never]: E[P]; }; +// @internal +export type ExtractFromOpaque> = TOpaque extends BrandedType ? isAny extends true ? unknown : Brand : never; + +// @internal +export function extractFromOpaque>(value: TOpaque): ExtractFromOpaque; + // @public export type ExtractItemType = Item extends () => infer Result ? Result : Item; +// @internal (undocumented) +export function fail(message: string): never; + +// @internal +export interface FieldAnchor { + // (undocumented) + fieldKey: FieldKey; + parent: Anchor | undefined; +} + +// @internal +export type FieldGenerator = () => MapTree[]; + +// @internal +export type FieldKey = Brand; + // @public export enum FieldKind { Optional = 0, Required = 1 } +// @internal +export interface FieldKindData { + // (undocumented) + readonly identifier: FieldKindIdentifier; + // (undocumented) + readonly multiplicity: Multiplicity; +} + +// @internal +export type FieldKindIdentifier = Brand; + +// @internal +export const FieldKinds: { + readonly required: Required_2; + readonly optional: Optional; + readonly sequence: Sequence; + readonly nodeKey: NodeKeyFieldKind; + readonly identifier: Identifier; + readonly forbidden: Forbidden; +}; + +// @internal +export interface FieldLocation { + // (undocumented) + readonly key: FieldKey; + // (undocumented) + readonly parent: ForestLocation; +} + +// @internal +export interface FieldMapObject { + // (undocumented) + [key: string]: TChild[]; +} + // @public export interface FieldProps { readonly key?: string; @@ -205,12 +663,397 @@ export interface FieldSchemaUnsafe { + readonly field: FieldKey; + readonly parent: TUpPath | undefined; +} + +// @internal +export type FlattenKeys = [{ + [Property in keyof T]: T[Property]; +}][_InlineTrick]; + +// @internal +export type FlexAllowedTypes = readonly [Any] | readonly LazyItem[]; + +// @internal @sealed +export abstract class FlexFieldKind implements FieldKindData { + protected constructor(identifier: TName & FieldKindIdentifier, multiplicity: TMultiplicity); + // (undocumented) + readonly identifier: TName & FieldKindIdentifier; + // (undocumented) + readonly multiplicity: TMultiplicity; +} + +// @internal +export class FlexFieldNodeSchema = FlexFieldSchema> extends TreeNodeSchemaBase { + // (undocumented) + static create(builder: Named, name: TreeNodeSchemaIdentifier, specification: Specification): FlexFieldNodeSchema; + // (undocumented) + getFieldSchema(field?: FieldKey): FlexFieldSchema; + // (undocumented) + protected _typeCheck2?: MakeNominal; +} + +// @internal @sealed +export class FlexFieldSchema = FlexAllowedTypes> { + // (undocumented) + readonly allowedTypes: TTypes; + get allowedTypeSet(): AllowedTypeSet; + static create(kind: TKind, allowedTypes: Types): FlexFieldSchema; + static createUnsafe>(kind: TKind, allowedTypes: Types): FlexFieldSchema; + static readonly empty: FlexFieldSchema; + equals(other: FlexFieldSchema): boolean; + // (undocumented) + readonly kind: TKind; + get monomorphicChildType(): FlexTreeNodeSchema | undefined; + // (undocumented) + readonly stored: TreeFieldStoredSchema; + // (undocumented) + protected _typeCheck?: MakeNominal; + get types(): TreeTypeSet; +} + +// @internal +export type FlexibleFieldContent = InsertableFlexField | ITreeCursorSynchronous; + +// @internal +export type FlexibleNodeContent = AllowedTypesToFlexInsertableTree | ITreeCursorSynchronous; + +// @internal +export type FlexibleNodeSubSequence = Iterable> | ITreeCursorSynchronous; + +// @internal +export type FlexImplicitAllowedTypes = FlexAllowedTypes | FlexTreeNodeSchema | Any; + +// @internal +export type FlexImplicitFieldSchema = FlexFieldSchema | FlexImplicitAllowedTypes; + // @public export type FlexList = readonly LazyItem[]; // @public export type FlexListToUnion = ExtractItemType; +// @internal +export type FlexMapFieldSchema = FlexFieldSchema; + +// @internal (undocumented) +export class FlexMapNodeSchema = FlexMapFieldSchema> extends TreeNodeSchemaBase { + // (undocumented) + static create(builder: Named, name: TreeNodeSchemaIdentifier, specification: Specification): FlexMapNodeSchema; + // (undocumented) + getFieldSchema(field: FieldKey): FlexMapFieldSchema; + // (undocumented) + get mapFields(): FlexMapFieldSchema; + // (undocumented) + protected _typeCheck2?: MakeNominal; +} + +// @internal (undocumented) +export interface FlexObjectNodeFields { + // (undocumented) + readonly [key: string]: FlexFieldSchema; +} + +// @internal (undocumented) +export class FlexObjectNodeSchema = FlexObjectNodeFields> extends TreeNodeSchemaBase { + // (undocumented) + static create(builder: Named, name: TreeNodeSchemaIdentifier, specification: Specification): FlexObjectNodeSchema; + // (undocumented) + getFieldSchema(field: FieldKey): FlexFieldSchema; + // (undocumented) + readonly objectNodeFields: ReadonlyMap; + // (undocumented) + readonly objectNodeFieldsObject: NormalizeObjectNodeFields>; + // (undocumented) + protected _typeCheck2?: MakeNominal; +} + +// @internal +export interface FlexTreeContext extends ISubscribable { + readonly forest: IForestSubscription; + // (undocumented) + readonly nodeKeys: NodeKeys; + get root(): FlexTreeField; + readonly schema: FlexTreeSchema; +} + +// @internal +export interface FlexTreeEntity { + readonly [flexTreeMarker]: FlexTreeEntityKind; + boxedIterator(): IterableIterator; + readonly context: FlexTreeContext; + readonly schema: TSchema; + treeStatus(): TreeStatus; +} + +// @internal (undocumented) +export enum FlexTreeEntityKind { + // (undocumented) + Field = 1, + // (undocumented) + Node = 0 +} + +// @internal +export interface FlexTreeField extends FlexTreeEntity { + // (undocumented) + readonly [flexTreeMarker]: FlexTreeEntityKind.Field; + boxedAt(index: number): FlexTreeNode | undefined; + // (undocumented) + boxedIterator(): IterableIterator; + is(schema: TSchema): this is FlexTreeTypedField; + isSameAs(other: FlexTreeField): boolean; + readonly key: FieldKey; + readonly parent?: FlexTreeNode; +} + +// @internal +export interface FlexTreeFieldNode extends FlexTreeNode { + readonly boxedContent: FlexTreeTypedField; + readonly content: FlexTreeUnboxField; + // (undocumented) + readonly schema: TSchema; +} + +// @internal +export interface FlexTreeLeafNode extends FlexTreeNode { + // (undocumented) + readonly schema: TSchema; + readonly value: TreeValue; +} + +// @internal +export interface FlexTreeMapNode extends FlexTreeNode { + // (undocumented) + [Symbol.iterator](): IterableIterator<[ + FieldKey, + FlexTreeUnboxField + ]>; + boxedIterator(): IterableIterator>; + delete(key: string): void; + entries(): IterableIterator<[FieldKey, FlexTreeUnboxField]>; + forEach(callbackFn: (value: FlexTreeUnboxField, key: FieldKey, map: FlexTreeMapNode) => void, thisArg?: any): void; + get(key: string): FlexTreeUnboxField; + getBoxed(key: string): FlexTreeTypedField; + has(key: string): boolean; + keys(): IterableIterator; + // (undocumented) + readonly schema: TSchema; + set(key: string, value: FlexibleFieldContent): void; + readonly size: number; + values(): IterableIterator>; +} + +// @internal +export const flexTreeMarker: unique symbol; + +// @internal +export interface FlexTreeNode extends FlexTreeEntity { + // (undocumented) + readonly [flexTreeMarker]: FlexTreeEntityKind.Node; + readonly anchorNode: AnchorNode; + // (undocumented) + boxedIterator(): IterableIterator; + getBoxed(key: FieldKey): FlexTreeField; + is(schema: TSchema): this is FlexTreeTypedNode; + on(eventName: K, listener: FlexTreeNodeEvents[K]): () => void; + readonly parentField: { + readonly parent: FlexTreeField; + readonly index: number; + }; + tryGetField(key: FieldKey): undefined | FlexTreeField; + readonly value?: TreeValue; +} + +// @internal +export interface FlexTreeNodeEvents { + changing(upPath: UpPath): void; + subtreeChanging(upPath: UpPath): PathVisitor | void; +} + +// @internal +export interface FlexTreeNodeKeyField extends FlexTreeField { + // (undocumented) + readonly localNodeKey: LocalNodeKey; + // (undocumented) + readonly stableNodeKey: StableNodeKey; +} + +// @internal (undocumented) +export type FlexTreeNodeSchema = TreeNodeSchemaBase; + +// @internal +export interface FlexTreeObjectNode extends FlexTreeNode { + readonly localNodeKey?: LocalNodeKey; + // (undocumented) + readonly schema: FlexObjectNodeSchema; +} + +// @internal +export type FlexTreeObjectNodeFields = FlexTreeObjectNodeFieldsInner ? key : never]: TFields[key]; +} & { + [key in keyof TFields as key extends PropertyNameFromFieldKey ? never : PropertyNameFromFieldKey]: TFields[key]; +}>>; + +// @internal +export type FlexTreeObjectNodeFieldsInner = FlattenKeys<{ + readonly [key in keyof TFields as `boxed${Capitalize}`]: FlexTreeTypedField; +} & { + readonly [key in keyof TFields as TFields[key]["kind"] extends AssignableFieldKinds ? never : key]: FlexTreeUnboxField; +} & { + -readonly [key in keyof TFields as TFields[key]["kind"] extends AssignableFieldKinds ? key : never]: FlexTreeUnboxField; +} & { + readonly [key in keyof TFields as TFields[key]["kind"] extends AssignableFieldKinds ? `set${Capitalize}` : never]: (content: FlexibleFieldContent) => void; +}>; + +// @internal +export type FlexTreeObjectNodeTyped = FlexObjectNodeSchema extends TSchema ? FlexTreeObjectNode : FlexTreeObjectNode & FlexTreeObjectNodeFields; + +// @internal +export interface FlexTreeOptionalField extends FlexTreeField { + // (undocumented) + readonly boxedContent?: FlexTreeTypedNodeUnion; + // (undocumented) + get content(): FlexTreeUnboxNodeUnion | undefined; + set content(newContent: FlexibleNodeContent | undefined); +} + +// @internal +export interface FlexTreeRequiredField extends FlexTreeField { + // (undocumented) + readonly boxedContent: FlexTreeTypedNodeUnion; + // (undocumented) + get content(): FlexTreeUnboxNodeUnion; + set content(content: FlexibleNodeContent); +} + +// @internal +export interface FlexTreeSchema extends SchemaCollection { + readonly adapters: Adapters; + readonly policy: FullSchemaPolicy; + readonly rootFieldSchema: T; +} + +// @internal +export interface FlexTreeSequenceField extends FlexTreeField { + // (undocumented) + [Symbol.iterator](): IterableIterator>; + at(index: number): FlexTreeUnboxNodeUnion | undefined; + boxedAt(index: number): FlexTreeTypedNodeUnion | undefined; + // (undocumented) + boxedIterator(): IterableIterator>; + insertAt(index: number, value: FlexibleNodeSubSequence): void; + insertAtEnd(value: FlexibleNodeSubSequence): void; + insertAtStart(value: FlexibleNodeSubSequence): void; + // (undocumented) + readonly length: number; + map(callbackfn: (value: FlexTreeUnboxNodeUnion, index: number) => U): U[]; + mapBoxed(callbackfn: (value: FlexTreeTypedNodeUnion, index: number) => U): U[]; + moveRangeToEnd(sourceStart: number, sourceEnd: number): void; + moveRangeToEnd(sourceStart: number, sourceEnd: number, source: FlexTreeSequenceField): void; + moveRangeToIndex(index: number, sourceStart: number, sourceEnd: number): void; + moveRangeToIndex(index: number, sourceStart: number, sourceEnd: number, source: FlexTreeSequenceField): void; + moveRangeToStart(sourceStart: number, sourceEnd: number): void; + moveRangeToStart(sourceStart: number, sourceEnd: number, source: FlexTreeSequenceField): void; + moveToEnd(sourceIndex: number): void; + moveToEnd(sourceIndex: number, source: FlexTreeSequenceField): void; + moveToIndex(index: number, sourceIndex: number): void; + moveToIndex(index: number, sourceIndex: number, source: FlexTreeSequenceField): void; + moveToStart(sourceIndex: number): void; + moveToStart(sourceIndex: number, source: FlexTreeSequenceField): void; + removeAt(index: number): void; + removeRange(start?: number, end?: number): void; +} + +// @internal +export type FlexTreeTypedField = FlexTreeTypedFieldInner; + +// @internal +export type FlexTreeTypedFieldInner = Kind extends typeof FieldKinds.sequence ? FlexTreeSequenceField : Kind extends typeof FieldKinds.required ? FlexTreeRequiredField : Kind extends typeof FieldKinds.optional ? FlexTreeOptionalField : Kind extends typeof FieldKinds.nodeKey ? FlexTreeNodeKeyField : FlexTreeField; + +// @internal +export type FlexTreeTypedNode = TSchema extends LeafNodeSchema ? FlexTreeLeafNode : TSchema extends FlexMapNodeSchema ? FlexTreeMapNode : TSchema extends FlexFieldNodeSchema ? FlexTreeFieldNode : TSchema extends FlexObjectNodeSchema ? FlexTreeObjectNodeTyped : FlexTreeNode; + +// @internal +export type FlexTreeTypedNodeUnion = T extends FlexList ? FlexTreeTypedNode, FlexTreeNodeSchema>> : FlexTreeNode; + +// @internal +export type FlexTreeUnboxField = FlexTreeUnboxFieldInner; + +// @internal +export type FlexTreeUnboxFieldInner = Kind extends typeof FieldKinds.sequence ? FlexTreeSequenceField : Kind extends typeof FieldKinds.required ? FlexTreeUnboxNodeUnion : Kind extends typeof FieldKinds.optional ? FlexTreeUnboxNodeUnion | (Emptiness extends "notEmpty" ? never : undefined) : Kind extends typeof FieldKinds.nodeKey ? FlexTreeNodeKeyField : unknown; + +// @internal +export type FlexTreeUnboxNode = TSchema extends LeafNodeSchema ? TreeValue : TSchema extends FlexMapNodeSchema ? FlexTreeMapNode : TSchema extends FlexFieldNodeSchema ? FlexTreeFieldNode : TSchema extends FlexObjectNodeSchema ? FlexTreeObjectNodeTyped : FlexTreeUnknownUnboxed; + +// @internal +export type FlexTreeUnboxNodeUnion = TTypes extends readonly [ +LazyItem +] ? InnerType extends FlexTreeNodeSchema ? FlexTreeUnboxNode : InnerType extends Any ? FlexTreeNode : unknown : boolean extends IsArrayOfOne ? FlexTreeUnknownUnboxed : FlexTreeTypedNodeUnion; + +// @internal +export type FlexTreeUnknownUnboxed = TreeValue | FlexTreeNode; + +// @internal +export interface FlexTreeView extends IDisposable { + readonly checkout: ITreeCheckout; + readonly context: FlexTreeContext; + readonly flexTree: FlexTreeTypedField; + fork(): ITreeViewFork; +} + +// @internal (undocumented) +export interface Forbidden extends FlexFieldKind { +} + +// @internal +export const forbiddenFieldKindIdentifier = "Forbidden"; + +// @internal +export interface ForestEvents { + afterChange(): void; + afterRootFieldCreated(key: FieldKey): void; + beforeChange(): void; +} + +// @internal +export type ForestLocation = ITreeSubscriptionCursor | Anchor; + +// @internal +export enum ForestType { + Optimized = 1, + Reference = 0 +} + +// @internal +export interface FullSchemaPolicy extends SchemaPolicy { + readonly fieldKinds: ReadonlyMap; +} + +// @internal +export interface GenericFieldsNode { + // (undocumented) + fields?: FieldMapObject; +} + +// @internal +export interface GenericTreeNode extends GenericFieldsNode, NodeData { +} + +// @internal (undocumented) +export interface HasListeners> { + hasListeners(eventName?: keyof Events): boolean; +} + +// @internal +export interface ICodecOptions { + readonly jsonValidator: JsonValidator; +} + // @public export interface IConnection { readonly id: string; @@ -220,6 +1063,30 @@ export interface IConnection { // @public export type ICriticalContainerError = IErrorBase; +// @internal +export interface IdAllocator { + allocate: (count?: number) => TId; + // (undocumented) + getMaxId: () => TId; +} + +// @internal +export interface IDefaultEditBuilder { + // (undocumented) + addNodeExistsConstraint(path: UpPath): void; + move(sourceField: FieldUpPath, sourceIndex: number, count: number, destinationField: FieldUpPath, destinationIndex: number): void; + // (undocumented) + optionalField(field: FieldUpPath): OptionalFieldEditBuilder; + // (undocumented) + sequenceField(field: FieldUpPath): SequenceFieldEditBuilder; + // (undocumented) + valueField(field: FieldUpPath): ValueFieldEditBuilder; +} + +// @internal (undocumented) +export interface Identifier extends FlexFieldKind<"Identifier", Multiplicity.Single> { +} + // @alpha export interface IDirectory extends Map, IEventProvider, Partial { readonly absolutePath: string; @@ -253,6 +1120,17 @@ export interface IDisposable { [disposeSymbol](): void; } +// @internal +export interface IEditableForest extends IForestSubscription { + acquireVisitor(): DeltaVisitor; +} + +// @internal +export interface IEmitter> { + emit>(eventName: K, ...args: Parameters): void; + emitAndCollect>(eventName: K, ...args: Parameters): ReturnType[]; +} + // @public @sealed export interface IFluidContainer extends IEventProvider { attach(props?: ContainerAttachProps): Promise; @@ -276,6 +1154,19 @@ export interface IFluidContainerEvents extends IEvent { (event: "disposed", listener: (error?: ICriticalContainerError) => void): any; } +// @internal +export interface IForestSubscription extends ISubscribable { + allocateCursor(): ITreeSubscriptionCursor; + readonly anchors: AnchorSet; + clone(schema: TreeStoredSchemaSubscription, anchors: AnchorSet): IEditableForest; + forgetAnchor(anchor: Anchor): void; + getCursorAboveDetachedFields(): ITreeCursorSynchronous; + readonly isEmpty: boolean; + moveCursorToPath(destination: UpPath, cursorToMove: ITreeSubscriptionCursor): void; + tryMoveCursorToField(destination: FieldAnchor, cursorToMove: ITreeSubscriptionCursor): TreeNavigationResult; + tryMoveCursorToNode(destination: Anchor, cursorToMove: ITreeSubscriptionCursor): TreeNavigationResult; +} + // @alpha export interface IInterval { // (undocumented) @@ -350,11 +1241,28 @@ export type ImplicitAllowedTypes = AllowedTypes | TreeNodeSchema; // @public export type ImplicitFieldSchema = FieldSchema | ImplicitAllowedTypes; +// @internal +export interface InitializeAndSchematizeConfiguration extends TreeContent, SchematizeConfiguration { +} + // @public export type InitialObjects = { [K in keyof T["initialObjects"]]: T["initialObjects"][K] extends LoadableObjectClass ? TChannel : never; }; +// @internal +export type _InlineTrick = 0; + +// @internal +export type InsertableFlexField = [ +ApplyMultiplicity> +][_InlineTrick]; + +// @internal +export type InsertableFlexNode = FlattenKeys ? TypedFields : TSchema extends FlexFieldNodeSchema ? InsertableFlexField : TSchema extends FlexMapNodeSchema ? { + readonly [P in string]: InsertableFlexField; +} : EmptyObject, TSchema extends LeafNodeSchema ? TValueSchema : undefined, TSchema["name"]>>; + // @public export type InsertableObjectFromSchemaRecord> = { readonly [Property in keyof T]: InsertableTreeFieldFromImplicitField; @@ -421,6 +1329,24 @@ export enum IntervalType { Transient = 4 } +// @internal +export interface Invariant extends Contravariant, Covariant { +} + +// @internal +export type isAny = boolean extends (T extends never ? true : false) ? true : false; + +// @internal +export type IsArrayOfOne = T["length"] extends 1 ? true : 1 extends T["length"] ? boolean : false; + +// @internal +export interface ISchemaEditor { + setStoredSchema(oldSchema: TreeStoredSchema, newSchema: TreeStoredSchema): void; +} + +// @internal +export function isContextuallyTypedNodeDataObject(data: ContextuallyTypedNodeData | undefined): data is ContextuallyTypedNodeDataObject; + // @alpha export interface ISequenceDeltaRange { operation: TOperation; @@ -525,6 +1451,20 @@ export interface ISharedString extends SharedSegmentSequence(config: InitializeAndSchematizeConfiguration, onDispose: () => void): FlexTreeView | undefined; +} + +// @internal +export interface ISharedTreeEditor extends IDefaultEditBuilder { + schema: ISchemaEditor; +} + +// @internal (undocumented) +export function isNeverField(policy: FullSchemaPolicy, originalData: TreeStoredSchema, field: TreeFieldStoredSchema): boolean; + // @public export interface ISubscribable> { on>(eventName: K, listener: E[K]): () => void; @@ -535,26 +1475,178 @@ export class IterableTreeArrayContent implements Iterable { [Symbol.iterator](): Iterator; } +// @internal +export interface ITransaction { + abort(): TransactionResult.Abort; + commit(): TransactionResult.Commit; + inProgress(): boolean; + start(): void; +} + // @public export interface ITree extends IChannel { schematize(config: TreeConfiguration): TreeView; } +// @internal +export interface ITreeCheckout extends AnchorLocator { + readonly editor: ISharedTreeEditor; + readonly events: ISubscribable; + readonly forest: IForestSubscription; + fork(): ITreeCheckoutFork; + getRemovedRoots(): [string | number | undefined, number, JsonableTree][]; + merge(view: ITreeCheckoutFork): void; + merge(view: ITreeCheckoutFork, disposeView: boolean): void; + rebase(view: ITreeCheckoutFork): void; + readonly rootEvents: ISubscribable; + readonly storedSchema: TreeStoredSchemaSubscription; + readonly transaction: ITransaction; + updateSchema(newSchema: TreeStoredSchema): void; +} + +// @internal +export interface ITreeCheckoutFork extends ITreeCheckout, IDisposable { + rebaseOnto(view: ITreeCheckout): void; +} + +// @internal +export interface ITreeCursor { + readonly [CursorMarker]: true; + readonly chunkLength: number; + readonly chunkStart: number; + enterField(key: FieldKey): void; + enterNode(childIndex: number): void; + exitField(): void; + exitNode(): void; + readonly fieldIndex: number; + firstField(): boolean; + firstNode(): boolean; + getFieldKey(): FieldKey; + // (undocumented) + getFieldLength(): number; + getFieldPath(prefix?: PathRootPrefix): FieldUpPath; + getPath(prefix?: PathRootPrefix): UpPath | undefined; + readonly mode: CursorLocationType; + nextField(): boolean; + nextNode(): boolean; + // (undocumented) + readonly pending: boolean; + seekNodes(offset: number): boolean; + skipPendingFields(): boolean; + readonly type: TreeType; + readonly value: Value; +} + +// @internal +export interface ITreeCursorSynchronous extends ITreeCursor { + // (undocumented) + readonly pending: false; +} + +// @internal +export interface ITreeSubscriptionCursor extends ITreeCursor { + buildAnchor(): Anchor; + buildFieldAnchor(): FieldAnchor; + clear(): void; + // (undocumented) + fork(): ITreeSubscriptionCursor; + free(): void; + readonly state: ITreeSubscriptionCursorState; +} + +// @internal (undocumented) +export enum ITreeSubscriptionCursorState { + Cleared = 1, + Current = 0, + Freed = 2 +} + +// @internal +export interface ITreeViewFork extends FlexTreeView { + // (undocumented) + readonly checkout: ITreeCheckoutFork; +} + // @alpha @sealed export interface IValueChanged { readonly key: string; readonly previousValue: any; } +// @internal +export interface JsonableTree extends GenericTreeNode { +} + +// @internal +export function jsonableTreeFromCursor(cursor: ITreeCursor): JsonableTree; + +// @internal +export type JsonCompatible = string | number | boolean | null | JsonCompatible[] | JsonCompatibleObject; + +// @internal +export type JsonCompatibleObject = { + [P in string]?: JsonCompatible; +}; + +// @internal +export type JsonCompatibleReadOnly = string | number | boolean | null | readonly JsonCompatibleReadOnly[] | { + readonly [P in string]?: JsonCompatibleReadOnly; +}; + +// @internal +export interface JsonValidator { + compile(schema: Schema): SchemaValidationFunction; +} + // @public export type LazyItem = Item | (() => Item); +// @internal +export type LazyTreeNodeSchema = FlexTreeNodeSchema | (() => FlexTreeNodeSchema); + +// @internal +export const leaf: { + number: LeafNodeSchema_2<"com.fluidframework.leaf.number", ValueSchema.Number>; + boolean: LeafNodeSchema_2<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>; + string: LeafNodeSchema_2<"com.fluidframework.leaf.string", ValueSchema.String>; + handle: LeafNodeSchema_2<"com.fluidframework.leaf.handle", ValueSchema.FluidHandle>; + null: LeafNodeSchema_2<"com.fluidframework.leaf.null", ValueSchema.Null>; + primitives: readonly [LeafNodeSchema_2<"com.fluidframework.leaf.number", ValueSchema.Number>, LeafNodeSchema_2<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>, LeafNodeSchema_2<"com.fluidframework.leaf.string", ValueSchema.String>]; + all: readonly [LeafNodeSchema_2<"com.fluidframework.leaf.handle", ValueSchema.FluidHandle>, LeafNodeSchema_2<"com.fluidframework.leaf.null", ValueSchema.Null>, LeafNodeSchema_2<"com.fluidframework.leaf.number", ValueSchema.Number>, LeafNodeSchema_2<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>, LeafNodeSchema_2<"com.fluidframework.leaf.string", ValueSchema.String>]; + library: SchemaLibrary_2; +}; + +// @internal (undocumented) +export class LeafNodeSchema = ValueSchema> extends TreeNodeSchemaBase { + // (undocumented) + static create(builder: Named, name: TreeNodeSchemaIdentifier, specification: Specification): LeafNodeSchema; + // (undocumented) + getFieldSchema(field: FieldKey): FlexFieldSchema; + // (undocumented) + get leafValue(): ValueSchema; + // (undocumented) + protected _typeCheck2?: MakeNominal; +} + +// @internal (undocumented) +export class LeafNodeStoredSchema extends TreeNodeStoredSchema { + constructor(leafValue: ValueSchema); + // (undocumented) + encode(): ErasedTreeNodeSchemaDataFormat; + // (undocumented) + readonly leafValue: ValueSchema; +} + // @public export type LoadableObjectClass = ISharedObjectKind | DataObjectClass; // @public export type LoadableObjectClassRecord = Record; +// @internal +export interface LocalNodeKey extends Opaque> { +} + // @public export interface MakeNominal { } @@ -569,26 +1661,87 @@ export class MapFactory implements IChannelFactory { get type(): string; } +// @internal (undocumented) +export class MapNodeStoredSchema extends TreeNodeStoredSchema { + constructor(mapFields: TreeFieldStoredSchema); + // (undocumented) + encode(): ErasedTreeNodeSchemaDataFormat; + // (undocumented) + readonly mapFields: TreeFieldStoredSchema; +} + +// @internal +export interface MapTree extends NodeData { + // (undocumented) + fields: Map; +} + +// @internal +export interface MarkedArrayLike extends ArrayLikeMut { + // (undocumented) + readonly [arrayLikeMarkerSymbol]: true; + // (undocumented) + [Symbol.iterator](): IterableIterator; +} + // @public export type MemberChangedListener = (clientId: string, member: M) => void; +// @internal +export enum Multiplicity { + Forbidden = 3, + Optional = 1, + Sequence = 2, + Single = 0 +} + // @public export type Myself = M & { readonly currentConnection: string; }; +// @internal +export interface Named { + // (undocumented) + readonly name: TName; +} + +// @internal +export type NameFromBranded> = T extends BrandedType ? Name : never; + +// @internal +export type NestedMap = Map>; + +// @internal +export type NewFieldContent = ITreeCursorSynchronous | readonly ITreeCursorSynchronous[] | ContextuallyTypedFieldData; + // @public export type NodeBuilderData = T extends TreeNodeSchema ? TBuild : never; // @public export type NodeBuilderDataUnsafe> = T extends TreeNodeSchema ? TBuild : never; +// @internal +export interface NodeData { + readonly type: TreeNodeSchemaIdentifier; + value?: TreeValue; +} + +// @internal (undocumented) +export interface NodeExistsConstraint { + // (undocumented) + violated: boolean; +} + // @public export type NodeFromSchema = T extends TreeNodeSchema ? TNode : never; // @public export type NodeFromSchemaUnsafe> = T extends TreeNodeSchema ? TNode : never; +// @internal +export type NodeIndex = number; + // @public export interface NodeInDocumentConstraint { // (undocumented) @@ -597,6 +1750,21 @@ export interface NodeInDocumentConstraint { type: "nodeInDocument"; } +// @internal +export const nodeKeyFieldKey = "__n_id__"; + +// @internal (undocumented) +export interface NodeKeyFieldKind extends FlexFieldKind<"NodeKey", Multiplicity.Single> { +} + +// @internal +export interface NodeKeys { + generate(): LocalNodeKey; + localize(key: StableNodeKey): LocalNodeKey; + readonly map: ReadonlyMap; + stabilize(key: LocalNodeKey): StableNodeKey; +} + // @public export enum NodeKind { Array = 1, @@ -605,6 +1773,26 @@ export enum NodeKind { Object = 2 } +// @internal +export type NoListenersCallback> = (eventName: keyof Events) => void; + +// @internal +export const noopValidator: JsonValidator; + +// @internal +export type NormalizeAllowedTypes = TSchema extends FlexTreeNodeSchema ? readonly [TSchema] : TSchema extends Any ? readonly [Any] : TSchema; + +// @internal +export type NormalizeField = TSchema extends FlexFieldSchema ? TSchema : FlexFieldSchema>>; + +// @internal +export type NormalizeFieldSchema = T extends FlexFieldSchema ? T : FlexFieldSchema; + +// @internal (undocumented) +export type NormalizeObjectNodeFields = { + readonly [Property in keyof T]: NormalizeFieldSchema; +}; + // @public export type ObjectFromSchemaRecord> = { -readonly [Property in keyof T]: TreeFieldFromImplicitField; @@ -615,6 +1803,124 @@ export type ObjectFromSchemaRecordUnsafe; }; +// @internal (undocumented) +export class ObjectNodeStoredSchema extends TreeNodeStoredSchema { + constructor(objectNodeFields: ReadonlyMap); + // (undocumented) + encode(): ErasedTreeNodeSchemaDataFormat; + // (undocumented) + readonly objectNodeFields: ReadonlyMap; +} + +// @internal +export function oneFromSet(set: ReadonlySet | undefined): T | undefined; + +// @internal +export type Opaque> = T extends BrandedType ? BrandedType : never; + +// @internal (undocumented) +export interface Optional extends FlexFieldKind<"Optional", Multiplicity.Optional> { +} + +// @internal (undocumented) +export interface OptionalFieldEditBuilder { + set(newContent: ITreeCursorSynchronous | undefined, wasEmpty: boolean): void; +} + +// @internal +export type OptionalFields = [ + { + [P in keyof T as undefined extends T[P] ? T[P] extends undefined ? never : P : never]?: T[P]; +} +][_InlineTrick]; + +// @internal +export interface PathRootPrefix { + indexOffset?: number; + parent?: UpPath | undefined; + rootFieldOverride?: FieldKey; +} + +// @internal +export interface PathVisitor { + afterAttach(source: DetachedPlaceUpPath, destination: RangeUpPath): void; + afterCreate(content: DetachedRangeUpPath): void; + afterDetach(source: PlaceUpPath, destination: DetachedRangeUpPath): void; + afterReplace(newContentSource: DetachedPlaceUpPath, newContent: RangeUpPath, oldContent: DetachedRangeUpPath): void; + beforeAttach(source: DetachedRangeUpPath, destination: PlaceUpPath): void; + beforeDestroy(content: DetachedRangeUpPath): void; + beforeDetach(source: RangeUpPath, destination: DetachedPlaceUpPath): void; + beforeReplace(newContent: DetachedRangeUpPath, oldContent: RangeUpPath, oldContentDestination: DetachedPlaceUpPath): void; + // @deprecated (undocumented) + onInsert(path: UpPath, content: ProtoNodes): void; + // @deprecated + onRemove(path: UpPath, count: number): void; +} + +// @internal +export type PlaceIndex = number; + +// @internal +export interface PlaceUpPath extends FieldUpPath { + readonly index: PlaceIndex; +} + +// @internal +export function prefixFieldPath(prefix: PathRootPrefix | undefined, path: FieldUpPath): FieldUpPath; + +// @internal +export function prefixPath(prefix: PathRootPrefix | undefined, path: UpPath | undefined): UpPath | undefined; + +// @internal +export type PropertyNameFromFieldKey = T extends ReservedObjectNodeFieldPropertyNames ? `field${Capitalize}` : T extends `${ReservedObjectNodeFieldPropertyNamePrefixes}${Capitalize}` ? `field${Capitalize}` : T; + +// @internal +export type ProtoNodes = readonly DeltaProtoNode[]; + +// @internal +interface Range_2 { + readonly end: PlaceIndex; + readonly start: PlaceIndex; +} +export { Range_2 as Range } + +// @internal +export interface RangeQueryResult { + length: number; + value: T | undefined; +} + +// @internal +export interface RangeUpPath extends FieldUpPath, Range_2 { +} + +// @internal +export type _RecursiveTrick = never; + +// @internal (undocumented) +interface Required_2 extends FlexFieldKind<"Value", Multiplicity.Single> { +} +export { Required_2 as Required } + +// @internal +export type RequiredFields = [ + { + [P in keyof T as undefined extends T[P] ? never : P]: T[P]; +} +][_InlineTrick]; + +// @internal +export type ReservedObjectNodeFieldPropertyNamePrefixes = (typeof reservedObjectNodeFieldPropertyNamePrefixes)[number]; + +// @internal +export const reservedObjectNodeFieldPropertyNamePrefixes: readonly ["set", "boxed", "field", "Field"]; + +// @internal +export type ReservedObjectNodeFieldPropertyNames = (typeof reservedObjectNodeFieldPropertyNames)[number]; + +// @internal +export const reservedObjectNodeFieldPropertyNames: readonly ["anchorNode", "constructor", "context", "is", "on", "parentField", "schema", "treeStatus", "tryGetField", "type", "value", "localNodeKey", "boxedIterator", "iterator", "getBoxed"]; + // @public export type RestrictiveReadonlyRecord = { readonly [P in symbol | string]: P extends K ? T : never; @@ -637,6 +1943,72 @@ export enum RevertibleStatus { Valid = 0 } +// @internal +export type RevisionTag = SessionSpaceCompressedId | "root"; + +// @internal +export interface RootField { + // (undocumented) + readonly key: DetachedField; +} + +// @internal (undocumented) +export const rootField: DetachedField; + +// @internal +export const rootFieldKey: FieldKey; + +// @internal +export function runSynchronous(view: ITreeCheckout, transaction: (view: ITreeCheckout) => TransactionResult | void): TransactionResult; + +// @internal +export class SchemaBuilderBase { + constructor(defaultKind: TDefaultKind, options: SchemaBuilderOptions); + // (undocumented) + protected addNodeSchema(schema: T): void; + static field(kind: Kind, allowedTypes: T): FlexFieldSchema>; + fieldNode(name: Name, fieldSchema: T): FlexFieldNodeSchema<`${TScope}.${Name}`, NormalizeField>; + fieldNodeRecursive>(name: Name, t: T): FlexFieldNodeSchema<`${TScope}.${Name}`, T>; + static fieldRecursive>>(kind: Kind, ...allowedTypes: T): FlexFieldSchema; + intoLibrary(): SchemaLibrary; + intoSchema(root: TSchema): FlexTreeSchema>; + map(name: Name, fieldSchema: T): FlexMapNodeSchema<`${TScope}.${Name}`, T>; + mapRecursive>(name: Name, t: T): FlexMapNodeSchema<`${TScope}.${Name}`, T>; + readonly name: string; + protected normalizeField(schema: TSchema): NormalizeField; + object>(name: Name, t: T): FlexObjectNodeSchema<`${TScope}.${Name}`, { + [key in keyof T]: NormalizeField; + }>; + objectRecursive>>(name: Name, t: T): FlexObjectNodeSchema<`${TScope}.${Name}`, T>; + readonly scope: TScope; + // (undocumented) + protected scoped(name: Name): TreeNodeSchemaIdentifier<`${TScope}.${Name}`>; +} + +// @internal +export interface SchemaBuilderOptions { + libraries?: SchemaLibrary[]; + lint?: Partial; + name?: string; + scope: TScope; +} + +// @internal +export interface SchemaCollection { + readonly nodeSchema: ReadonlyMap; +} + +// @internal +export interface SchemaConfiguration { + readonly schema: FlexTreeSchema; +} + +// @internal +export interface SchemaEvents { + afterSchemaChange(newSchema: TreeStoredSchema): void; + beforeSchemaChange(newSchema: TreeStoredSchema): void; +} + // @public @sealed export class SchemaFactory { constructor(scope: TScope); @@ -672,9 +2044,62 @@ export interface SchemaIncompatible { readonly canUpgrade: boolean; } +// @internal +export function schemaIsFieldNode(schema: FlexTreeNodeSchema): schema is FlexFieldNodeSchema; + +// @internal +export function schemaIsLeaf(schema: FlexTreeNodeSchema): schema is LeafNodeSchema; + +// @internal +export function schemaIsMap(schema: FlexTreeNodeSchema): schema is FlexMapNodeSchema; + +// @internal +export function schemaIsObjectNode(schema: FlexTreeNodeSchema): schema is FlexObjectNodeSchema; + +// @internal +export interface SchemaLibrary extends SchemaCollection { + readonly libraries: ReadonlySet; +} + +// @internal +export interface SchemaLibraryData extends SchemaCollection { + // (undocumented) + readonly adapters: Adapters; + // (undocumented) + readonly name: string; +} + +// @internal +export interface SchemaLintConfiguration { + // (undocumented) + readonly rejectEmpty: boolean; + // (undocumented) + readonly rejectForbidden: boolean; +} + +// @internal +export interface SchemaPolicy { + readonly fieldKinds: ReadonlyMap; +} + +// @internal +export interface SchematizeConfiguration extends SchemaConfiguration { + readonly allowedSchemaModifications: AllowedUpdateType; +} + +// @internal +export interface SchemaValidationFunction { + // (undocumented) + check(data: unknown): data is Static; +} + // @public export type ScopedSchemaName = TScope extends undefined ? `${TName}` : `${TScope}.${TName}`; +// @internal (undocumented) +export interface Sequence extends FlexFieldKind<"Sequence", Multiplicity.Sequence> { +} + // @alpha export class SequenceDeltaEvent extends SequenceEvent { constructor(opArgs: IMergeTreeDeltaOpArgs, deltaArgs: IMergeTreeDeltaCallbackArgs, mergeTreeClient: Client); @@ -696,6 +2121,13 @@ export abstract class SequenceEvent>[]; } +// @internal (undocumented) +export interface SequenceFieldEditBuilder { + insert(index: number, newContent: ITreeCursorSynchronous): void; + move(sourceIndex: number, count: number, destIndex: number): void; + remove(index: number, count: number): void; +} + // @alpha export class SequenceInterval implements ISerializableInterval { constructor(client: Client, @@ -861,6 +2293,46 @@ export type SharedStringSegment = TextSegment | Marker; // @public export const SharedTree: ISharedObjectKind; +// @internal +export interface SharedTreeContentSnapshot { + readonly removed: [string | number | undefined, number, JsonableTree][]; + readonly schema: TreeStoredSchema; + readonly tree: JsonableTree[]; +} + +// @internal +export class SharedTreeFactory implements IChannelFactory { + constructor(options?: SharedTreeOptions); + // (undocumented) + readonly attributes: IChannelAttributes; + // (undocumented) + create(runtime: IFluidDataStoreRuntime, id: string): ISharedTree; + // (undocumented) + load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, channelAttributes: Readonly): Promise; + // (undocumented) + readonly type: string; +} + +// @internal +export interface SharedTreeFormatOptions { + formatVersion: SharedTreeFormatVersion[keyof SharedTreeFormatVersion]; + treeEncodeType: TreeCompressionStrategy; +} + +// @internal +export const SharedTreeFormatVersion: { + readonly v1: 1; + readonly v2: 2; +}; + +// @internal +export type SharedTreeFormatVersion = typeof SharedTreeFormatVersion; + +// @internal (undocumented) +export type SharedTreeOptions = Partial & Partial & { + forest?: ForestType; +}; + // @alpha export enum Side { // (undocumented) @@ -869,12 +2341,75 @@ export enum Side { Before = 0 } +// @internal +export function singletonSchema(factory: SchemaFactory, name: TName): TreeNodeSchemaClass, NodeKind.Object, object & TreeNode & ObjectFromSchemaRecord & { + readonly value: TName; +}, object & InsertableObjectFromSchemaRecord, true, unknown> & (new () => object & TreeNode & ObjectFromSchemaRecord & { + readonly value: TName; +}); + +// @internal +export type StableNodeKey = Brand; + +// @internal +export function stackTreeFieldCursor(adapter: CursorAdapter, root: TNode, detachedField?: DetachedField): CursorWithNode; + +// @internal +export function stackTreeNodeCursor(adapter: CursorAdapter, root: TNode): CursorWithNode; + +// @internal +export interface StoredSchemaCollection { + readonly nodeSchema: ReadonlyMap; +} + +// @internal (undocumented) +export class test_RecursiveObject extends test_RecursiveObject_base { +} + +// @internal +export const test_RecursiveObject_base: TreeNodeSchemaClass_2<"Test Recursive Domain.testObject", NodeKind.Object, TreeObjectNodeUnsafe_2< { +readonly recursive: FieldSchemaUnsafe_2 typeof test_RecursiveObject]>; +readonly number: TreeNodeSchema_2<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number>; +}, "Test Recursive Domain.testObject">, object & InsertableObjectFromSchemaRecordUnsafe_2< { +readonly recursive: FieldSchemaUnsafe_2 typeof test_RecursiveObject]>; +readonly number: TreeNodeSchema_2<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number>; +}>, false, { +readonly recursive: FieldSchemaUnsafe_2 typeof test_RecursiveObject]>; +readonly number: TreeNodeSchema_2<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number>; +}>; + +// @internal +export const test_RecursiveObjectPojoMode: TreeNodeSchemaClass_2<"Test Recursive Domain.testPOJOObject", NodeKind.Object, TreeObjectNodeUnsafe_2< { +readonly recursive: FieldSchemaUnsafe_2 TreeNodeSchemaClass_2<"Test Recursive Domain.testPOJOObject", NodeKind.Object, TreeObjectNodeUnsafe_2, object & InsertableObjectFromSchemaRecordUnsafe_2, false, any>]>; +readonly number: TreeNodeSchema_2<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number>; +}, "Test Recursive Domain.testPOJOObject">, object & InsertableObjectFromSchemaRecordUnsafe_2< { +readonly recursive: FieldSchemaUnsafe_2 TreeNodeSchemaClass_2<"Test Recursive Domain.testPOJOObject", NodeKind.Object, TreeObjectNodeUnsafe_2, object & InsertableObjectFromSchemaRecordUnsafe_2, false, any>]>; +readonly number: TreeNodeSchema_2<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number>; +}>, false, { +readonly recursive: FieldSchemaUnsafe_2 TreeNodeSchemaClass_2<"Test Recursive Domain.testPOJOObject", NodeKind.Object, TreeObjectNodeUnsafe_2, object & InsertableObjectFromSchemaRecordUnsafe_2, false, any>]>; +readonly number: TreeNodeSchema_2<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number>; +}>; + // @public export type TransactionConstraint = NodeInDocumentConstraint; +// @internal +export enum TransactionResult { + Abort = 0, + Commit = 1 +} + // @public export const Tree: TreeApi; +// @internal (undocumented) +export interface TreeAdapter { + // (undocumented) + readonly input: TreeNodeSchemaIdentifier; + // (undocumented) + readonly output: TreeNodeSchemaIdentifier; +} + // @public export interface TreeApi extends TreeNodeApi { contains(node: TreeNode, other: TreeNode): boolean; @@ -924,6 +2459,12 @@ export interface TreeChangeEvents { treeChanged(): void; } +// @internal +export enum TreeCompressionStrategy { + Compressed = 0, + Uncompressed = 1 +} + // @public export class TreeConfiguration { constructor(schema: TSchema, initialTree: () => InsertableTreeFieldFromImplicitField); @@ -933,15 +2474,41 @@ export class TreeConfiguration extends SchemaConfiguration { + readonly initialTree: InsertableFlexField | readonly ITreeCursorSynchronous[] | ITreeCursorSynchronous; +} + +// @internal +export interface TreeDataContext { + fieldSource?(key: FieldKey, schema: TreeFieldStoredSchema): undefined | FieldGenerator; + readonly schema: FlexTreeSchema; +} + // @public export type TreeFieldFromImplicitField = TSchema extends FieldSchema ? ApplyKind, Kind> : TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes : unknown; // @public export type TreeFieldFromImplicitFieldUnsafe> = TSchema extends FieldSchemaUnsafe ? ApplyKind, Kind> : TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypesUnsafe : unknown; +// @internal +export interface TreeFieldStoredSchema { + // (undocumented) + readonly kind: FieldKindIdentifier; + readonly types?: TreeTypeSet; +} + // @public export type TreeLeafValue = number | string | boolean | IFluidHandle | null; +// @internal (undocumented) +export interface TreeLocation { + // (undocumented) + readonly index: number; + // (undocumented) + readonly range: FieldLocation | DetachedField; +} + // @public export interface TreeMapNode extends ReadonlyMap>, TreeNode { delete(key: string): void; @@ -954,6 +2521,13 @@ export interface TreeMapNodeUnsafe> e set(key: string, value: InsertableTreeNodeFromImplicitAllowedTypesUnsafe | undefined): void; } +// @internal (undocumented) +export const enum TreeNavigationResult { + NotFound = -1, + Ok = 1, + Pending = 0 +} + // @public export abstract class TreeNode implements WithType { abstract get [type](): string; @@ -978,6 +2552,23 @@ export type TreeNodeFromImplicitAllowedTypesUnsafe = TreeNodeSchemaClass | TreeNodeSchemaNonClass; +// @internal +export abstract class TreeNodeSchemaBase { + protected constructor(builder: Named, name: TreeNodeSchemaIdentifier, info: Specification, stored: TreeNodeStoredSchema); + // (undocumented) + readonly builder: Named; + // (undocumented) + abstract getFieldSchema(field: FieldKey): FlexFieldSchema; + // (undocumented) + readonly info: Specification; + // (undocumented) + readonly name: TreeNodeSchemaIdentifier; + // (undocumented) + readonly stored: TreeNodeStoredSchema; + // (undocumented) + protected _typeCheck?: MakeNominal; +} + // @public export interface TreeNodeSchemaClass extends TreeNodeSchemaCore { // @sealed @@ -994,18 +2585,32 @@ export interface TreeNodeSchemaCore = Brand; + // @public export interface TreeNodeSchemaNonClass extends TreeNodeSchemaCore { // (undocumented) create(data: TInsertable): TNode; } +// @internal (undocumented) +export abstract class TreeNodeStoredSchema { + // (undocumented) + abstract encode(): ErasedTreeNodeSchemaDataFormat; + // (undocumented) + protected _typeCheck: MakeNominal; +} + // @public export type TreeObjectNode, TypeName extends string = string> = TreeNode & ObjectFromSchemaRecord & WithType; // @public export type TreeObjectNodeUnsafe>, TypeName extends string = string> = TreeNode & ObjectFromSchemaRecordUnsafe & WithType; +// @internal +export function treeSchemaFromStoredSchema(schema: TreeStoredSchema): FlexTreeSchema; + // @public export enum TreeStatus { Deleted = 2, @@ -1013,6 +2618,32 @@ export enum TreeStatus { Removed = 1 } +// @internal +export interface TreeStoredSchema extends StoredSchemaCollection { + readonly rootFieldSchema: TreeFieldStoredSchema; +} + +// @internal +export interface TreeStoredSchemaSubscription extends ISubscribable, TreeStoredSchema { +} + +// @internal (undocumented) +export type TreeType = TreeNodeSchemaIdentifier; + +// @internal +export type TreeTypeSet = ReadonlySet | undefined; + +// @internal +export type TreeValue = [ + { + [ValueSchema.Number]: number; + [ValueSchema.String]: string; + [ValueSchema.Boolean]: boolean; + [ValueSchema.FluidHandle]: IFluidHandle; + [ValueSchema.Null]: null; +}[TSchema] +][_InlineTrick]; + // @public export interface TreeView extends IDisposable { readonly error?: SchemaIncompatible; @@ -1032,12 +2663,47 @@ export interface TreeViewEvents { // @public export const type: unique symbol; +// @internal +export const typeboxValidator: JsonValidator; + +// @internal +export type TypedFields = [ +TFields extends { + [key: string]: FlexFieldSchema; +} ? { + -readonly [key in keyof TFields]: InsertableFlexField; +} : EmptyObject +][_InlineTrick]; + +// @internal +export function typedObjectValues(object: Record): TValues[]; + +// @internal +export const typeNameSymbol: unique symbol; + +// @internal +export type UnbrandedName = [ +TName extends TreeNodeSchemaIdentifier ? S : string +][_InlineTrick]; + // @public export type Unenforced<_DesiredExtendsConstraint> = unknown; // @public export type Unhydrated = T; +// @internal +export interface UpPath { + readonly parent: TParent | undefined; + readonly parentField: FieldKey; + readonly parentIndex: NodeIndex; +} + +// @internal +export type UpPathDefault = UpPath; + // @public export type ValidateRecursiveSchema, { [NodeKind.Object]: T["info"] extends RestrictiveReadonlyRecord ? InsertableObjectFromSchemaRecord : unknown; @@ -1049,6 +2715,34 @@ export type ValidateRecursiveSchema> = true; +// @internal +export type Value = undefined | TreeValue; + +// @internal (undocumented) +export interface ValueFieldEditBuilder { + set(newContent: ITreeCursorSynchronous): void; +} + +// @internal +export type ValueFromBranded> = T extends BrandedType ? ValueType : never; + +// @internal +export enum ValueSchema { + // (undocumented) + Boolean = 2, + // (undocumented) + FluidHandle = 3, + // (undocumented) + Null = 4, + // (undocumented) + Number = 0, + // (undocumented) + String = 1 +} + +// @internal +export const valueSymbol: unique symbol; + // @public export interface WithType { get [type](): TName; diff --git a/packages/framework/fluid-framework/package.json b/packages/framework/fluid-framework/package.json index fff865c39a49..16f92e1043f6 100644 --- a/packages/framework/fluid-framework/package.json +++ b/packages/framework/fluid-framework/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -35,7 +35,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/framework/fluid-static/package.json b/packages/framework/fluid-static/package.json index bdcad9d39556..2a8bd718cd01 100644 --- a/packages/framework/fluid-static/package.json +++ b/packages/framework/fluid-static/package.json @@ -14,12 +14,20 @@ "type": "module", "exports": { ".": { + "trimmedAPI": { + "import": { + "types": "./lib/public.d.ts" + }, + "require": { + "types": "./dist/public.d.ts" + } + }, "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -35,7 +43,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/framework/oldest-client-observer/package.json b/packages/framework/oldest-client-observer/package.json index d1b2076d2961..b393e9cf94f6 100644 --- a/packages/framework/oldest-client-observer/package.json +++ b/packages/framework/oldest-client-observer/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/framework/request-handler/package.json b/packages/framework/request-handler/package.json index fb86c8422e13..4b9ea8c8e637 100644 --- a/packages/framework/request-handler/package.json +++ b/packages/framework/request-handler/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/framework/synthesize/package.json b/packages/framework/synthesize/package.json index 43ed49da57c8..b254aae11b94 100644 --- a/packages/framework/synthesize/package.json +++ b/packages/framework/synthesize/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/framework/undo-redo/package.json b/packages/framework/undo-redo/package.json index eec5b148b228..e7f01e2b1342 100644 --- a/packages/framework/undo-redo/package.json +++ b/packages/framework/undo-redo/package.json @@ -14,12 +14,20 @@ "type": "module", "exports": { ".": { + "trimmedAPI": { + "import": { + "types": "./lib/public.d.ts" + }, + "require": { + "types": "./dist/public.d.ts" + } + }, "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -35,7 +43,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/loader/container-loader/package.json b/packages/loader/container-loader/package.json index bd6e1183e625..dffd0cdac6fb 100644 --- a/packages/loader/container-loader/package.json +++ b/packages/loader/container-loader/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -95,7 +95,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/loader/driver-utils/package.json b/packages/loader/driver-utils/package.json index 495aae36de91..b46c4b54f0a1 100644 --- a/packages/loader/driver-utils/package.json +++ b/packages/loader/driver-utils/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/runtime/container-runtime-definitions/package.json b/packages/runtime/container-runtime-definitions/package.json index 0fa816cd5a15..99fbedbc879c 100644 --- a/packages/runtime/container-runtime-definitions/package.json +++ b/packages/runtime/container-runtime-definitions/package.json @@ -15,10 +15,10 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts" + "types": "./lib/index.d.ts" }, "require": { - "types": "./dist/public.d.ts" + "types": "./dist/index.d.ts" } }, "./legacy": { @@ -39,7 +39,7 @@ } }, "main": "", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/runtime/container-runtime/api-report/container-runtime.api.md b/packages/runtime/container-runtime/api-report/container-runtime.api.md index 3767e3f8ed52..a233748bdf64 100644 --- a/packages/runtime/container-runtime/api-report/container-runtime.api.md +++ b/packages/runtime/container-runtime/api-report/container-runtime.api.md @@ -30,7 +30,8 @@ import { IEventProvider } from '@fluidframework/core-interfaces'; import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions/internal'; import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions/internal'; import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions/internal'; -import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions/internal'; +import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions'; +import { IFluidDataStoreFactory as IFluidDataStoreFactory_2 } from '@fluidframework/runtime-definitions/internal'; import { IFluidDataStoreRegistry } from '@fluidframework/runtime-definitions/internal'; import { IFluidHandle } from '@fluidframework/core-interfaces'; import { IFluidHandleContext } from '@fluidframework/core-interfaces'; @@ -50,7 +51,8 @@ import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions' import { ISignalMessage } from '@fluidframework/protocol-definitions'; import { ISnapshotTree } from '@fluidframework/protocol-definitions'; import { ISummarizeResult } from '@fluidframework/runtime-definitions/internal'; -import { ISummarizerNodeWithGC } from '@fluidframework/runtime-definitions/internal'; +import { ISummarizerNodeWithGC } from '@fluidframework/runtime-definitions'; +import { ISummarizerNodeWithGC as ISummarizerNodeWithGC_2 } from '@fluidframework/runtime-definitions/internal'; import { ISummaryAck } from '@fluidframework/protocol-definitions'; import { ISummaryContent } from '@fluidframework/protocol-definitions'; import { ISummaryNack } from '@fluidframework/protocol-definitions'; @@ -161,7 +163,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable { } // @internal (undocumented) -export class ChannelCollectionFactory implements IFluidDataStoreFactory { +export class ChannelCollectionFactory implements IFluidDataStoreFactory_2 { constructor(registryEntries: NamedFluidDataStoreRegistryEntries, provideEntryPoint: (runtime: IFluidDataStoreChannel) => Promise, ctor: (...args: ConstructorParameters) => T); // (undocumented) get IFluidDataStoreFactory(): this; @@ -498,7 +500,7 @@ export abstract class FluidDataStoreContext extends TypedEventEmitter; // (undocumented) - getCreateChildSummarizerNodeFn(id: string, createParam: CreateChildSummarizerNodeParam): (summarizeInternal: SummarizeInternalFn, getGCDataFn: (fullGC?: boolean) => Promise) => ISummarizerNodeWithGC; + getCreateChildSummarizerNodeFn(id: string, createParam: CreateChildSummarizerNodeParam): (summarizeInternal: SummarizeInternalFn, getGCDataFn: (fullGC?: boolean) => Promise) => ISummarizerNodeWithGC_2; getGCData(fullGC?: boolean): Promise; // (undocumented) abstract getInitialSnapshotDetails(): Promise; @@ -567,7 +569,7 @@ export abstract class FluidDataStoreContext extends TypedEventEmitter; // (undocumented) - protected readonly summarizerNode: ISummarizerNodeWithGC; + protected readonly summarizerNode: ISummarizerNodeWithGC_2; // (undocumented) get tombstoned(): boolean; updateUsedRoutes(usedRoutes: string[]): void; diff --git a/packages/runtime/container-runtime/package.json b/packages/runtime/container-runtime/package.json index 21876fc14791..2fc50f83576a 100644 --- a/packages/runtime/container-runtime/package.json +++ b/packages/runtime/container-runtime/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -105,7 +105,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/runtime/container-runtime/src/test/types/validateContainerRuntimePrevious.generated.ts b/packages/runtime/container-runtime/src/test/types/validateContainerRuntimePrevious.generated.ts index 47a953d86a11..58f06067fe43 100644 --- a/packages/runtime/container-runtime/src/test/types/validateContainerRuntimePrevious.generated.ts +++ b/packages/runtime/container-runtime/src/test/types/validateContainerRuntimePrevious.generated.ts @@ -1962,6 +1962,30 @@ declare function use_old_VariableDeclaration_agentSchedulerId( use_old_VariableDeclaration_agentSchedulerId( get_current_VariableDeclaration_agentSchedulerId()); +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedFunctionDeclaration_assertIsStableId": {"forwardCompat": false} +*/ + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedFunctionDeclaration_assertIsStableId": {"backCompat": false} +*/ + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedFunctionDeclaration_generateStableId": {"forwardCompat": false} +*/ + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedFunctionDeclaration_generateStableId": {"backCompat": false} +*/ + /* * Validate forward compat by using old type in place of current type * If breaking change required, add in package.json under typeValidation.broken: @@ -1986,6 +2010,18 @@ declare function use_old_FunctionDeclaration_isRuntimeMessage( use_old_FunctionDeclaration_isRuntimeMessage( get_current_FunctionDeclaration_isRuntimeMessage()); +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedFunctionDeclaration_isStableId": {"forwardCompat": false} +*/ + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedFunctionDeclaration_isStableId": {"backCompat": false} +*/ + /* * Validate forward compat by using old type in place of current type * If breaking change required, add in package.json under typeValidation.broken: diff --git a/packages/runtime/datastore-definitions/package.json b/packages/runtime/datastore-definitions/package.json index 09bf7822152b..bad6b3434947 100644 --- a/packages/runtime/datastore-definitions/package.json +++ b/packages/runtime/datastore-definitions/package.json @@ -15,10 +15,10 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts" + "types": "./lib/index.d.ts" }, "require": { - "types": "./dist/public.d.ts" + "types": "./dist/index.d.ts" } }, "./legacy": { @@ -39,7 +39,7 @@ } }, "main": "", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/runtime/datastore/package.json b/packages/runtime/datastore/package.json index c03b992d35e6..e4e3d0037052 100644 --- a/packages/runtime/datastore/package.json +++ b/packages/runtime/datastore/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/runtime/id-compressor/package.json b/packages/runtime/id-compressor/package.json index 5a1f9bbd682f..dc8ca4c8f520 100644 --- a/packages/runtime/id-compressor/package.json +++ b/packages/runtime/id-compressor/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -57,7 +57,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/runtime/runtime-definitions/package.json b/packages/runtime/runtime-definitions/package.json index 5c6261509664..1cc160fc2f45 100644 --- a/packages/runtime/runtime-definitions/package.json +++ b/packages/runtime/runtime-definitions/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/runtime/runtime-definitions/src/test/types/validateRuntimeDefinitionsPrevious.generated.ts b/packages/runtime/runtime-definitions/src/test/types/validateRuntimeDefinitionsPrevious.generated.ts index a2db9f296aa5..e421ab5e03b6 100644 --- a/packages/runtime/runtime-definitions/src/test/types/validateRuntimeDefinitionsPrevious.generated.ts +++ b/packages/runtime/runtime-definitions/src/test/types/validateRuntimeDefinitionsPrevious.generated.ts @@ -642,6 +642,30 @@ declare function use_old_InterfaceDeclaration_IGarbageCollectionDetailsBase( use_old_InterfaceDeclaration_IGarbageCollectionDetailsBase( get_current_InterfaceDeclaration_IGarbageCollectionDetailsBase()); +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedInterfaceDeclaration_IIdCompressor": {"forwardCompat": false} +*/ + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedInterfaceDeclaration_IIdCompressor": {"backCompat": false} +*/ + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedInterfaceDeclaration_IIdCompressorCore": {"forwardCompat": false} +*/ + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedInterfaceDeclaration_IIdCompressorCore": {"backCompat": false} +*/ + /* * Validate forward compat by using old type in place of current type * If breaking change required, add in package.json under typeValidation.broken: @@ -954,6 +978,18 @@ declare function use_old_InterfaceDeclaration_ITelemetryContext( use_old_InterfaceDeclaration_ITelemetryContext( get_current_InterfaceDeclaration_ITelemetryContext()); +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedInterfaceDeclaration_IdCreationRange": {"forwardCompat": false} +*/ + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedInterfaceDeclaration_IdCreationRange": {"backCompat": false} +*/ + /* * Validate forward compat by using old type in place of current type * If breaking change required, add in package.json under typeValidation.broken: @@ -1074,6 +1110,90 @@ declare function use_old_InterfaceDeclaration_OpAttributionKey( use_old_InterfaceDeclaration_OpAttributionKey( get_current_InterfaceDeclaration_OpAttributionKey()); +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedTypeAliasDeclaration_OpSpaceCompressedId": {"forwardCompat": false} +*/ + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedTypeAliasDeclaration_OpSpaceCompressedId": {"backCompat": false} +*/ + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedTypeAliasDeclaration_SerializedIdCompressor": {"forwardCompat": false} +*/ + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedTypeAliasDeclaration_SerializedIdCompressor": {"backCompat": false} +*/ + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedTypeAliasDeclaration_SerializedIdCompressorWithNoSession": {"forwardCompat": false} +*/ + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedTypeAliasDeclaration_SerializedIdCompressorWithNoSession": {"backCompat": false} +*/ + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedTypeAliasDeclaration_SerializedIdCompressorWithOngoingSession": {"forwardCompat": false} +*/ + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedTypeAliasDeclaration_SerializedIdCompressorWithOngoingSession": {"backCompat": false} +*/ + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedTypeAliasDeclaration_SessionId": {"forwardCompat": false} +*/ + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedTypeAliasDeclaration_SessionId": {"backCompat": false} +*/ + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedTypeAliasDeclaration_SessionSpaceCompressedId": {"forwardCompat": false} +*/ + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedTypeAliasDeclaration_SessionSpaceCompressedId": {"backCompat": false} +*/ + +/* +* Validate forward compat by using old type in place of current type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedTypeAliasDeclaration_StableId": {"forwardCompat": false} +*/ + +/* +* Validate back compat by using current type in place of old type +* If breaking change required, add in package.json under typeValidation.broken: +* "RemovedTypeAliasDeclaration_StableId": {"backCompat": false} +*/ + /* * Validate forward compat by using old type in place of current type * If breaking change required, add in package.json under typeValidation.broken: diff --git a/packages/runtime/runtime-utils/package.json b/packages/runtime/runtime-utils/package.json index 1a0bdfd15d4d..e62f0a2a10f3 100644 --- a/packages/runtime/runtime-utils/package.json +++ b/packages/runtime/runtime-utils/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/runtime/test-runtime-utils/package.json b/packages/runtime/test-runtime-utils/package.json index 68725defe624..313ace43e5ae 100644 --- a/packages/runtime/test-runtime-utils/package.json +++ b/packages/runtime/test-runtime-utils/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/service-clients/azure-client/package.json b/packages/service-clients/azure-client/package.json index cb6177a1311f..bbb061662e31 100644 --- a/packages/service-clients/azure-client/package.json +++ b/packages/service-clients/azure-client/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -55,7 +55,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/service-clients/tinylicious-client/package.json b/packages/service-clients/tinylicious-client/package.json index 3b4968848db3..c92f5d8d0e08 100644 --- a/packages/service-clients/tinylicious-client/package.json +++ b/packages/service-clients/tinylicious-client/package.json @@ -14,12 +14,20 @@ "type": "module", "exports": { ".": { + "trimmedAPI": { + "import": { + "types": "./lib/public.d.ts" + }, + "require": { + "types": "./dist/public.d.ts" + } + }, "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -35,7 +43,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/test/test-utils/package.json b/packages/test/test-utils/package.json index a528c26b7917..5b30ba3d51dc 100644 --- a/packages/test/test-utils/package.json +++ b/packages/test/test-utils/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/tools/devtools/devtools-core/package.json b/packages/tools/devtools/devtools-core/package.json index 5d0a41b154a4..95d2b2d5ebcc 100644 --- a/packages/tools/devtools/devtools-core/package.json +++ b/packages/tools/devtools/devtools-core/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/tools/devtools/devtools/package.json b/packages/tools/devtools/devtools/package.json index 5d186f91b1d7..aa363ef31fae 100644 --- a/packages/tools/devtools/devtools/package.json +++ b/packages/tools/devtools/devtools/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -55,7 +55,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/tools/fluid-runner/package.json b/packages/tools/fluid-runner/package.json index 620dae82a210..e4c87bb98b73 100644 --- a/packages/tools/fluid-runner/package.json +++ b/packages/tools/fluid-runner/package.json @@ -14,11 +14,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, diff --git a/packages/utils/odsp-doclib-utils/package.json b/packages/utils/odsp-doclib-utils/package.json index 3289413eac7c..2c5657ce18e7 100644 --- a/packages/utils/odsp-doclib-utils/package.json +++ b/packages/utils/odsp-doclib-utils/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/utils/telemetry-utils/package.json b/packages/utils/telemetry-utils/package.json index ea43d174cd3e..86c275b4d129 100644 --- a/packages/utils/telemetry-utils/package.json +++ b/packages/utils/telemetry-utils/package.json @@ -15,11 +15,11 @@ "exports": { ".": { "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -45,7 +45,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist", diff --git a/packages/utils/tool-utils/package.json b/packages/utils/tool-utils/package.json index 67910fa865f4..af13256f2f9a 100644 --- a/packages/utils/tool-utils/package.json +++ b/packages/utils/tool-utils/package.json @@ -14,12 +14,20 @@ "type": "module", "exports": { ".": { + "trimmedAPI": { + "import": { + "types": "./lib/public.d.ts" + }, + "require": { + "types": "./dist/public.d.ts" + } + }, "import": { - "types": "./lib/public.d.ts", + "types": "./lib/index.d.ts", "default": "./lib/index.js" }, "require": { - "types": "./dist/public.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, @@ -35,7 +43,7 @@ } }, "main": "lib/index.js", - "types": "lib/public.d.ts", + "types": "lib/index.d.ts", "scripts": { "api": "fluid-build . --task api", "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist",