Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fluidframework/core-interfaces

Package Overview
Dependencies
Maintainers
2
Versions
466
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluidframework/core-interfaces - npm Package Compare versions

Comparing version 2.0.0-internal.6.4.0 to 2.0.0-internal.7.0.0

30

CHANGELOG.md
# @fluidframework/core-interfaces
## 2.0.0-internal.7.0.0
### Major Changes
- test-utils: provideEntryPoint is required [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
The optional `provideEntryPoint` method has become required on a number of constructors. A value will need to be provided to the following classes:
- `BaseContainerRuntimeFactory`
- `RuntimeFactory`
- `ContainerRuntime` (constructor and `loadRuntime`)
- `FluidDataStoreRuntime`
See [testContainerRuntimeFactoryWithDefaultDataStore.ts](https://github.com/microsoft/FluidFramework/tree/main/packages/test/test-utils/src/testContainerRuntimeFactoryWithDefaultDataStore.ts) for an example implemtation of `provideEntryPoint` for ContainerRuntime.
See [pureDataObjectFactory.ts](https://github.com/microsoft/FluidFramework/tree/main/packages/framework/aqueduct/src/data-object-factories/pureDataObjectFactory.ts#L83) for an example implementation of `provideEntryPoint` for DataStoreRuntime.
Subsequently, various `entryPoint` and `getEntryPoint()` endpoints have become required. Please see [containerRuntime.ts](https://github.com/microsoft/FluidFramework/tree/main/packages/runtime/container-runtime/src/containerRuntime.ts) for example implementations of these APIs.
For more details, see [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md)
- DEPRECATED: core-interfaces: IFluidRouter and IProvideFluidRouter deprecated [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
`IFluidRouter` and `IProvideFluidRouter` have been deprecated. Please remove all usages of these interfaces and migrate to the new `entryPoint` pattern.
See [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md) for more details.
- Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
## 2.0.0-internal.6.4.0

@@ -4,0 +34,0 @@

2

dist/error.d.ts

@@ -31,3 +31,3 @@ /*!

};
export declare type FluidErrorTypes = typeof FluidErrorTypes[keyof typeof FluidErrorTypes];
export type FluidErrorTypes = typeof FluidErrorTypes[keyof typeof FluidErrorTypes];
/**

@@ -34,0 +34,0 @@ * Base interface for all errors and warnings emitted the container.

@@ -73,7 +73,7 @@ /*!

*/
export declare type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;
export type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;
/**
* The placeholder type that should be used instead of `this` in events.
*/
export declare type IEventThisPlaceHolder = {
export type IEventThisPlaceHolder = {
thisPlaceHolder: "thisPlaceHolder";

@@ -84,3 +84,3 @@ };

*/
export declare type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {
export type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {
[K in keyof L]: L[K] extends IEventThisPlaceHolder ? TThis : L[K];

@@ -92,3 +92,3 @@ } : L;

*/
export declare type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
export type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
/**

@@ -103,3 +103,3 @@ * This type is a conditional type for transforming all the overloads provided in `TEvent`.

*/
export declare type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {
export type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;

@@ -106,0 +106,0 @@ (event: infer E1, listener: (...args: infer A1) => void): any;

@@ -21,5 +21,9 @@ /*!

}
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare const IFluidRouter: keyof IProvideFluidRouter;
/**
* Request routing
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/

@@ -29,2 +33,5 @@ export interface IProvideFluidRouter {

}
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export interface IFluidRouter extends IProvideFluidRouter {

@@ -31,0 +38,0 @@ request(request: IRequest): Promise<IResponse>;

@@ -8,3 +8,6 @@ "use strict";

exports.IFluidRouter = void 0;
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
exports.IFluidRouter = "IFluidRouter";
//# sourceMappingURL=fluidRouter.js.map

@@ -10,3 +10,3 @@ /*!

*/
export declare type TelemetryEventCategory = "generic" | "error" | "performance";
export type TelemetryEventCategory = "generic" | "error" | "performance";
/**

@@ -19,3 +19,3 @@ * Property types that can be logged.

*/
export declare type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;
export type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;
/**

@@ -26,3 +26,3 @@ * {@inheritDoc TelemetryBaseEventPropertyType}

*/
export declare type TelemetryEventPropertyType = string | number | boolean | undefined;
export type TelemetryEventPropertyType = string | number | boolean | undefined;
/**

@@ -51,3 +51,3 @@ * A property to be logged to telemetry may require a tag indicating the value may contain sensitive data.

*/
export declare type ITelemetryBaseProperties = ITelemetryProperties;
export type ITelemetryBaseProperties = ITelemetryProperties;
/**

@@ -82,3 +82,3 @@ * {@inheritDoc ITelemetryBaseProperties}

*/
export declare type LogLevel = typeof LogLevel[keyof typeof LogLevel];
export type LogLevel = typeof LogLevel[keyof typeof LogLevel];
/**

@@ -85,0 +85,0 @@ * Interface to output telemetry events.

@@ -30,3 +30,3 @@ /*!

*/
export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
/**

@@ -65,3 +65,3 @@ * This utility type take interface(s) that follow the FluidObject pattern, and produces

*/
export declare type FluidObject<T = unknown> = {
export type FluidObject<T = unknown> = {
[P in FluidObjectProviderKeys<T>]?: T[P];

@@ -78,3 +78,3 @@ };

*/
export declare type FluidObjectKeys<T> = keyof FluidObject<T>;
export type FluidObjectKeys<T> = keyof FluidObject<T>;
//# sourceMappingURL=provider.d.ts.map

@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.

"packageName": "@microsoft/api-extractor",
"packageVersion": "7.34.9"
"packageVersion": "7.37.0"
}
]
}

@@ -31,3 +31,3 @@ /*!

};
export declare type FluidErrorTypes = typeof FluidErrorTypes[keyof typeof FluidErrorTypes];
export type FluidErrorTypes = typeof FluidErrorTypes[keyof typeof FluidErrorTypes];
/**

@@ -34,0 +34,0 @@ * Base interface for all errors and warnings emitted the container.

@@ -73,7 +73,7 @@ /*!

*/
export declare type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;
export type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;
/**
* The placeholder type that should be used instead of `this` in events.
*/
export declare type IEventThisPlaceHolder = {
export type IEventThisPlaceHolder = {
thisPlaceHolder: "thisPlaceHolder";

@@ -84,3 +84,3 @@ };

*/
export declare type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {
export type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {
[K in keyof L]: L[K] extends IEventThisPlaceHolder ? TThis : L[K];

@@ -92,3 +92,3 @@ } : L;

*/
export declare type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
export type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
/**

@@ -103,3 +103,3 @@ * This type is a conditional type for transforming all the overloads provided in `TEvent`.

*/
export declare type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {
export type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {
(event: infer E0, listener: (...args: infer A0) => void): any;

@@ -106,0 +106,0 @@ (event: infer E1, listener: (...args: infer A1) => void): any;

@@ -21,5 +21,9 @@ /*!

}
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export declare const IFluidRouter: keyof IProvideFluidRouter;
/**
* Request routing
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/

@@ -29,2 +33,5 @@ export interface IProvideFluidRouter {

}
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export interface IFluidRouter extends IProvideFluidRouter {

@@ -31,0 +38,0 @@ request(request: IRequest): Promise<IResponse>;

@@ -5,3 +5,6 @@ /*!

*/
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export const IFluidRouter = "IFluidRouter";
//# sourceMappingURL=fluidRouter.js.map

@@ -10,3 +10,3 @@ /*!

*/
export declare type TelemetryEventCategory = "generic" | "error" | "performance";
export type TelemetryEventCategory = "generic" | "error" | "performance";
/**

@@ -19,3 +19,3 @@ * Property types that can be logged.

*/
export declare type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;
export type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;
/**

@@ -26,3 +26,3 @@ * {@inheritDoc TelemetryBaseEventPropertyType}

*/
export declare type TelemetryEventPropertyType = string | number | boolean | undefined;
export type TelemetryEventPropertyType = string | number | boolean | undefined;
/**

@@ -51,3 +51,3 @@ * A property to be logged to telemetry may require a tag indicating the value may contain sensitive data.

*/
export declare type ITelemetryBaseProperties = ITelemetryProperties;
export type ITelemetryBaseProperties = ITelemetryProperties;
/**

@@ -82,3 +82,3 @@ * {@inheritDoc ITelemetryBaseProperties}

*/
export declare type LogLevel = typeof LogLevel[keyof typeof LogLevel];
export type LogLevel = typeof LogLevel[keyof typeof LogLevel];
/**

@@ -85,0 +85,0 @@ * Interface to output telemetry events.

@@ -30,3 +30,3 @@ /*!

*/
export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
/**

@@ -65,3 +65,3 @@ * This utility type take interface(s) that follow the FluidObject pattern, and produces

*/
export declare type FluidObject<T = unknown> = {
export type FluidObject<T = unknown> = {
[P in FluidObjectProviderKeys<T>]?: T[P];

@@ -78,3 +78,3 @@ };

*/
export declare type FluidObjectKeys<T> = keyof FluidObject<T>;
export type FluidObjectKeys<T> = keyof FluidObject<T>;
//# sourceMappingURL=provider.d.ts.map
{
"name": "@fluidframework/core-interfaces",
"version": "2.0.0-internal.6.4.0",
"version": "2.0.0-internal.7.0.0",
"description": "Fluid object interfaces",

@@ -18,8 +18,8 @@ "homepage": "https://fluidframework.com",

"devDependencies": {
"@fluid-tools/build-cli": "^0.22.0",
"@fluid-tools/build-cli": "^0.24.0",
"@fluidframework/build-common": "^2.0.0",
"@fluidframework/build-tools": "^0.22.0",
"@fluidframework/build-tools": "^0.24.0",
"@fluidframework/core-interfaces-previous": "npm:@fluidframework/core-interfaces@2.0.0-internal.6.3.0",
"@fluidframework/eslint-config-fluid": "^2.1.0",
"@microsoft/api-extractor": "^7.34.4",
"@microsoft/api-extractor": "^7.37.0",
"@types/node": "^16.18.38",

@@ -30,3 +30,3 @@ "copyfiles": "^2.4.1",

"rimraf": "^4.4.0",
"typescript": "~4.5.5"
"typescript": "~5.1.6"
},

@@ -33,0 +33,0 @@ "typeValidation": {

@@ -49,3 +49,3 @@ # Removing IFluidRouter

```ts
getEntryPoint?(): Promise<FluidObject | undefined>;
getEntryPoint(): Promise<FluidObject | undefined>;
```

@@ -56,8 +56,11 @@

```ts
readonly entryPoint?: IFluidHandle<FluidObject>;
readonly entryPoint: IFluidHandle<FluidObject>;
```
So how does an application specify what the Container or DataStore's entry point is?
Via a parameter `initializeEntryPoint` that's found on `ContainerRuntime.loadRuntime` and `FluidDataStoreRuntime`'s constructor.
Via a parameter `provideEntryPoint` that's found on `ContainerRuntime.loadRuntime` and `FluidDataStoreRuntime`'s constructor.
See [testContainerRuntimeFactoryWithDefaultDataStore.ts](https://github.com/microsoft/FluidFramework/tree/main/packages/test/test-utils/src/testContainerRuntimeFactoryWithDefaultDataStore.ts) for an example implemtation of `provideEntryPoint` for ContainerRuntime.
See [pureDataObjectFactory.ts](https://github.com/microsoft/FluidFramework/tree/main/packages/framework/aqueduct/src/data-object-factories/pureDataObjectFactory.ts#L83) for an example implementation of `provideEntryPoint` for DataStoreRuntime.
### ILoader request pattern

@@ -67,8 +70,6 @@

**Note:** The `IContainer.request(...)` method will be deprecated in an upcoming release, so do not rely on this method for a long-term solution (the APIs around `entryPoint` and `getEntryPoint()` will become required and available for usage in its place).
After calling `ILoader.resolve(...)`, call the `request(...)` method on the returned `IContainer` with a corresponding request URL. For converting a request URL from `Loader` to `Container`, use the `IUrlResolver` passed into the `Loader`'s constructor.
After calling `ILoader.resolve(...)`, call the `getEntryPoint()` method on the returned `IContainer`.
The following is an example of what this change may look like:
```
```ts
// OLD

@@ -83,3 +84,3 @@ const request: IRequest;

```
```ts
// NEW

@@ -91,8 +92,3 @@ const request: IRequest;

const container = await loader.resolve(request);
const resolvedUrl: IRequest = urlResolver.resolve(request);
// Parse the `resolvedUrl.url` property as necessary before passing to `container.request(...)`
// For an example, see the `Loader.resolveCore(...)` method
const parsedResolvedUrl = // implement parse logic here
const response = container.request(parsedResolvedUrl);
const entryPoint = await container.getEntryPoint();
```

@@ -107,13 +103,23 @@

<!-- prettier-ignore-start -->
| API | Deprecated in | Removed in |
| ------------------------------------------------------------------------------------ | -------------------- | -------------------- |
| `IContainer.request` (except calling with "/") | 2.0.0-internal.6.0.0 | |
| `IDataStore.request` (except calling with "/") | 2.0.0-internal.6.0.0 | |
| `IContainer.IFluidRouter` | 2.0.0-internal.6.0.0 | |
| `IDataStore.IFluidRouter` | 2.0.0-internal.6.0.0 | |
| `request` and `IFluidRouter` on `ILoader` and `Loader` | 2.0.0-internal.6.0.0 | |
| `request` and `IFluidRouter` on `IRuntime` and `ContainerRuntime` | 2.0.0-internal.6.0.0 | |
| `request` and `IFluidRouter` on `IFluidDataStoreRuntime` and `FluidDataStoreRuntime` | 2.0.0-internal.6.0.0 | |
| `request` and `IFluidRouter` on `IFluidDataStoreChannel` | 2.0.0-internal.6.0.0 | |
| `getRootDataStore` on `IContainerRuntime` and `ContainerRuntime` | 2.0.0-internal.6.0.0 | |
| API | Deprecated in | Removed in |
| -------------------------------------------------------------------------------------------- | -------------------- | -------------------- |
| `IContainer.request` (except calling with "/") | 2.0.0-internal.6.0.0 | |
| `IDataStore.request` (except calling with "/") | 2.0.0-internal.6.0.0 | |
| `IContainer.IFluidRouter` | 2.0.0-internal.6.0.0 | |
| `IDataStore.IFluidRouter` | 2.0.0-internal.6.0.0 | |
| `request` and `IFluidRouter` on `ILoader` and `Loader` | 2.0.0-internal.6.0.0 | |
| `request` and `IFluidRouter` on `IRuntime` and `ContainerRuntime` | 2.0.0-internal.6.0.0 | |
| `request` and `IFluidRouter` on `IFluidDataStoreRuntime` and `FluidDataStoreRuntime` | 2.0.0-internal.6.0.0 | |
| `request` and `IFluidRouter` on `IFluidDataStoreChannel` | 2.0.0-internal.6.0.0 | |
| `getRootDataStore` on `IContainerRuntime` and `ContainerRuntime` | 2.0.0-internal.6.0.0 | |
| `resolveHandle` on `IContainerRuntime` | 2.0.0-internal.7.0.0 | |
| `IFluidHandleContext` on `IContainerRuntimeBase` | 2.0.0-internal.7.0.0 | |
| `requestHandler` property in `ContainerRuntime.loadRuntime(...)` | 2.0.0-internal.7.0.0 | |
| `RuntimeRequestHandler` and `RuntimeRequestHandlerBuilder` | 2.0.0-internal.7.0.0 | |
| `request` and `IFluidRouter` on `IContainer` and `Container` | 2.0.0-internal.7.0.0 | |
| `request` and `IFluidRouter` on `IDataStore` | 2.0.0-internal.7.0.0 | |
| `IFluidRouter` and `IProvideFluidRouter` | 2.0.0-internal.7.0.0 | |
| `requestFluidObject` | 2.0.0-internal.7.0.0 | |
| `requestResolvedObjectFromContainer` | 2.0.0-internal.7.0.0 | |
| `getDefaultObjectFromContainer`, `getObjectWithIdFromContainer` and `getObjectFromContainer` | 2.0.0-internal.7.0.0 | |
<!-- prettier-ignore-end -->

@@ -29,2 +29,5 @@ /*!

/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export const IFluidRouter: keyof IProvideFluidRouter = "IFluidRouter";

@@ -34,2 +37,3 @@

* Request routing
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/

@@ -39,4 +43,8 @@ export interface IProvideFluidRouter {

}
/**
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
*/
export interface IFluidRouter extends IProvideFluidRouter {
request(request: IRequest): Promise<IResponse>;
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc