@fluidframework/core-interfaces 2.0.0-dev.2.2.0.111723 → 2.0.0-dev.3.1.0.125672

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/.eslintrc.js +5 -5
  2. package/api-extractor.json +2 -2
  3. package/dist/fluidLoadable.d.ts.map +1 -1
  4. package/dist/fluidLoadable.js.map +1 -1
  5. package/dist/fluidPackage.d.ts +3 -3
  6. package/dist/fluidPackage.d.ts.map +1 -1
  7. package/dist/fluidPackage.js +7 -8
  8. package/dist/fluidPackage.js.map +1 -1
  9. package/dist/fluidRouter.d.ts.map +1 -1
  10. package/dist/fluidRouter.js.map +1 -1
  11. package/dist/handles.d.ts.map +1 -1
  12. package/dist/handles.js.map +1 -1
  13. package/dist/index.d.ts +1 -2
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js.map +1 -1
  16. package/dist/provider.d.ts.map +1 -1
  17. package/dist/provider.js.map +1 -1
  18. package/lib/fluidLoadable.d.ts.map +1 -1
  19. package/lib/fluidLoadable.js.map +1 -1
  20. package/lib/fluidPackage.d.ts +3 -3
  21. package/lib/fluidPackage.d.ts.map +1 -1
  22. package/lib/fluidPackage.js +7 -8
  23. package/lib/fluidPackage.js.map +1 -1
  24. package/lib/fluidRouter.d.ts.map +1 -1
  25. package/lib/fluidRouter.js.map +1 -1
  26. package/lib/handles.d.ts.map +1 -1
  27. package/lib/handles.js.map +1 -1
  28. package/lib/index.d.ts +1 -2
  29. package/lib/index.d.ts.map +1 -1
  30. package/lib/index.js.map +1 -1
  31. package/lib/provider.d.ts.map +1 -1
  32. package/lib/provider.js.map +1 -1
  33. package/package.json +15 -12
  34. package/prettier.config.cjs +1 -1
  35. package/src/fluidLoadable.ts +6 -6
  36. package/src/fluidPackage.ts +92 -91
  37. package/src/fluidRouter.ts +10 -10
  38. package/src/handles.ts +54 -55
  39. package/src/index.ts +22 -30
  40. package/src/provider.ts +10 -8
  41. package/tsconfig.esnext.json +6 -6
  42. package/tsconfig.json +8 -13
  43. package/dist/fluidObject.d.ts +0 -10
  44. package/dist/fluidObject.d.ts.map +0 -1
  45. package/dist/fluidObject.js +0 -7
  46. package/dist/fluidObject.js.map +0 -1
  47. package/lib/fluidObject.d.ts +0 -10
  48. package/lib/fluidObject.d.ts.map +0 -1
  49. package/lib/fluidObject.js +0 -6
  50. package/lib/fluidObject.js.map +0 -1
  51. package/lib/test/types/fluidObjectTypes.d.ts +0 -2
  52. package/lib/test/types/fluidObjectTypes.d.ts.map +0 -1
  53. package/lib/test/types/fluidObjectTypes.js +0 -108
  54. package/lib/test/types/fluidObjectTypes.js.map +0 -1
  55. package/lib/test/types/validateCoreInterfacesPrevious.generated.d.ts +0 -2
  56. package/lib/test/types/validateCoreInterfacesPrevious.generated.d.ts.map +0 -1
  57. package/lib/test/types/validateCoreInterfacesPrevious.generated.js +0 -64
  58. package/lib/test/types/validateCoreInterfacesPrevious.generated.js.map +0 -1
  59. package/src/fluidObject.ts +0 -12
package/.eslintrc.js CHANGED
@@ -4,8 +4,8 @@
4
4
  */
5
5
 
6
6
  module.exports = {
7
- "extends": [
8
- require.resolve("@fluidframework/eslint-config-fluid"),
9
- "prettier"
10
- ]
11
- }
7
+ extends: [require.resolve("@fluidframework/eslint-config-fluid/minimal"), "prettier"],
8
+ parserOptions: {
9
+ project: ["./tsconfig.json", "./src/test/tsconfig.json"],
10
+ },
11
+ };
@@ -1,4 +1,4 @@
1
1
  {
2
- "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "@fluidframework/build-common/api-extractor-common-strict.json"
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "@fluidframework/build-common/api-extractor-common-strict.json"
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fluidLoadable.d.ts","sourceRoot":"","sources":["../src/fluidLoadable.ts"],"names":[],"mappings":"AAAA;;;GA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5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"fluidLoadable.js","sourceRoot":"","sources":["../src/fluidLoadable.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIU,QAAA,cAAc,GAAgC,gBAAgB,CAAC;AAa/D,QAAA,cAAc,GAAgC,gBAAgB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"./handles\";\n\nexport const IFluidLoadable: keyof IProvideFluidLoadable = \"IFluidLoadable\";\n\nexport interface IProvideFluidLoadable {\n readonly IFluidLoadable: IFluidLoadable;\n}\n/**\n * A shared FluidObject has a URL from which it can be referenced\n */\nexport interface IFluidLoadable extends IProvideFluidLoadable {\n // Handle to the loadable FluidObject\n handle: IFluidHandle;\n}\n\nexport const IFluidRunnable: keyof IProvideFluidRunnable = \"IFluidRunnable\";\n\nexport interface IProvideFluidRunnable {\n readonly IFluidRunnable: IFluidRunnable;\n}\nexport interface IFluidRunnable {\n run(...args: any[]): Promise<void>;\n stop(reason?: string): void;\n}\n"]}
1
+ {"version":3,"file":"fluidLoadable.js","sourceRoot":"","sources":["../src/fluidLoadable.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIU,QAAA,cAAc,GAAgC,gBAAgB,CAAC;AAa/D,QAAA,cAAc,GAAgC,gBAAgB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"./handles\";\n\nexport const IFluidLoadable: keyof IProvideFluidLoadable = \"IFluidLoadable\";\n\nexport interface IProvideFluidLoadable {\n\treadonly IFluidLoadable: IFluidLoadable;\n}\n/**\n * A shared FluidObject has a URL from which it can be referenced\n */\nexport interface IFluidLoadable extends IProvideFluidLoadable {\n\t// Handle to the loadable FluidObject\n\thandle: IFluidHandle;\n}\n\nexport const IFluidRunnable: keyof IProvideFluidRunnable = \"IFluidRunnable\";\n\nexport interface IProvideFluidRunnable {\n\treadonly IFluidRunnable: IFluidRunnable;\n}\nexport interface IFluidRunnable {\n\trun(...args: any[]): Promise<void>;\n\tstop(reason?: string): void;\n}\n"]}
@@ -97,17 +97,17 @@ export interface IFluidCodeDetails {
97
97
  /**
98
98
  * @deprecated in favor of {@link @fluidframework/container-definitions#isFluidCodeDetails}
99
99
  * to have code loading modules in same package.
100
- */
100
+ */
101
101
  export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
102
102
  /**
103
103
  * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}
104
104
  * to have code loading modules in same package.
105
- */
105
+ */
106
106
  export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
107
107
  /**
108
108
  * @deprecated in favor of {@link @fluidframework/container-definitions#IProvideFluidCodeDetailsComparer}
109
109
  * to have code loading modules in same package.
110
- */
110
+ */
111
111
  export interface IProvideFluidCodeDetailsComparer {
112
112
  readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
113
113
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fluidPackage.d.ts","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEF;;;;;GAKG;AACJ,MAAM,WAAW,wBAAwB;IACrC;;;OAGG;IACH,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG;QAC1B;;;;WAIG;QACH,KAAK,EAAE,MAAM,EAAE,CAAC;QAEhB;;;;WAIG;QACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KAC1B,CAAC;CACL;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE;QACH;;;WAGG;QACH,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,wBAAwB,CAAC;KAC/D,CAAC;IACF;;;;OAIG;IACH,CAAC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AC,CAAC;CACjF"}
@@ -13,24 +13,23 @@ exports.IFluidCodeDetailsComparer = exports.isFluidCodeDetails = exports.isFluid
13
13
  *
14
14
  * @param pkg - The package json data to check if it is a Fluid package.
15
15
  */
16
- const isFluidPackage = (pkg) => typeof pkg === "object"
17
- && typeof (pkg === null || pkg === void 0 ? void 0 : pkg.name) === "string"
18
- && typeof (pkg === null || pkg === void 0 ? void 0 : pkg.fluid) === "object";
16
+ const isFluidPackage = (pkg) => typeof pkg === "object" && typeof (pkg === null || pkg === void 0 ? void 0 : pkg.name) === "string" && typeof (pkg === null || pkg === void 0 ? void 0 : pkg.fluid) === "object";
19
17
  exports.isFluidPackage = isFluidPackage;
20
18
  /**
21
19
  * @deprecated in favor of {@link @fluidframework/container-definitions#isFluidCodeDetails}
22
20
  * to have code loading modules in same package.
23
- */
21
+ */
24
22
  const isFluidCodeDetails = (details) => {
25
23
  const maybeCodeDetails = details;
26
- return typeof maybeCodeDetails === "object"
27
- && (typeof (maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.package) === "string" || (0, exports.isFluidPackage)(maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.package))
28
- && ((maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.config) === undefined || typeof (maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.config) === "object");
24
+ return (typeof maybeCodeDetails === "object" &&
25
+ (typeof (maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.package) === "string" ||
26
+ (0, exports.isFluidPackage)(maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.package)) &&
27
+ ((maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.config) === undefined || typeof (maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.config) === "object"));
29
28
  };
30
29
  exports.isFluidCodeDetails = isFluidCodeDetails;
31
30
  /**
32
31
  * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}
33
32
  * to have code loading modules in same package.
34
- */
33
+ */
35
34
  exports.IFluidCodeDetailsComparer = "IFluidCodeDetailsComparer";
36
35
  //# sourceMappingURL=fluidPackage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fluidPackage.js","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA8DH;;;;;;;GAOG;AACI,MAAM,cAAc,GAAG,CAAC,GAAQ,EAAkC,EAAE,CACvE,OAAO,GAAG,KAAK,QAAQ;OACpB,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,CAAA,KAAK,QAAQ;OAC7B,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,KAAK,CAAA,KAAK,QAAQ,CAAC;AAHzB,QAAA,cAAc,kBAGW;AA+BtC;;;EAGE;AACK,MAAM,kBAAkB,GAAG,CAAC,OAAgB,EAA0C,EAAE;IAC3F,MAAM,gBAAgB,GAAG,OAAiD,CAAC;IAC3E,OAAO,OAAO,gBAAgB,KAAK,QAAQ;WACpC,CAAC,OAAO,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,CAAA,KAAK,QAAQ,IAAI,IAAA,sBAAc,EAAC,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,CAAC,CAAC;WAC5F,CAAC,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,MAAK,SAAS,IAAI,OAAO,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,CAAA,KAAK,QAAQ,CAAC,CAAC;AACpG,CAAC,CAAC;AALW,QAAA,kBAAkB,sBAK7B;AAEF;;;EAGE;AACW,QAAA,yBAAyB,GAA2C,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n /**\n * Specifies an environment on Fluid property of an {@link IFluidPackage}.\n *\n * @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackageEnvironment}\n * to have code loading modules in same package.\n */\nexport interface IFluidPackageEnvironment {\n /**\n * The name of the target. For a browser environment, this could be umd for scripts\n * or css for styles.\n */\n [target: string]: undefined | {\n /**\n * List of files for the target. These can be relative or absolute.\n * The code loader should resolve relative paths, and validate all\n * full urls.\n */\n files: string[];\n\n /**\n * General access for extended fields as specific usages will\n * likely have additional infornamation like a definition\n * of Library, the entrypoint for umd packages\n */\n [key: string]: unknown;\n };\n}\n\n/**\n * Fluid-specific properties expected on a package to be loaded by the code loader.\n * While compatible with the npm package format it is not necessary that that package is an\n * npm package:\n * {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}\n *\n * @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackage}\n * to have code loading modules in same package.\n */\nexport interface IFluidPackage {\n /**\n * The name of the package that this code represnets\n */\n name: string;\n /**\n * This object represents the Fluid specific properties of the package\n */\n fluid: {\n /**\n * The name of the of the environment. This should be something like browser, or node\n * and contain the necessary targets for loading this code in that environment.\n */\n [environment: string]: undefined | IFluidPackageEnvironment;\n };\n /**\n * General access for extended fields as specific usages will\n * likely have additional infornamation like a definition of\n * compatible versions, or deployment information like rings or rollouts.\n */\n [key: string]: unknown;\n}\n\n/**\n * Check if the package.json defines a Fluid package.\n *\n * @deprecated in favor of {@link @fluidframework/container-definitions#isFluidPackage}\n * to have code loading modules in same package.\n *\n * @param pkg - The package json data to check if it is a Fluid package.\n */\nexport const isFluidPackage = (pkg: any): pkg is Readonly<IFluidPackage> =>\n typeof pkg === \"object\"\n && typeof pkg?.name === \"string\"\n && typeof pkg?.fluid === \"object\";\n\n/**\n * Package manager configuration. Provides a key value mapping of config values.\n *\n * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsConfig}\n * to have code loading modules in same package.\n */\nexport interface IFluidCodeDetailsConfig {\n readonly [key: string]: string;\n}\n\n/**\n * Data structure used to describe the code to load on the Fluid document.\n *\n * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetails}\n * to have code loading modules in same package.\n */\nexport interface IFluidCodeDetails {\n /**\n * The code package to be used on the Fluid document. This is either the package name which will be loaded\n * from a package manager. Or the expanded Fluid package.\n */\n readonly package: string | Readonly<IFluidPackage>;\n\n /**\n * Configuration details. This includes links to the package manager and base CDNs.\n */\n readonly config?: IFluidCodeDetailsConfig;\n}\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions#isFluidCodeDetails}\n * to have code loading modules in same package.\n*/\nexport const isFluidCodeDetails = (details: unknown): details is Readonly<IFluidCodeDetails> => {\n const maybeCodeDetails = details as Partial<IFluidCodeDetails> | undefined;\n return typeof maybeCodeDetails === \"object\"\n && (typeof maybeCodeDetails?.package === \"string\" || isFluidPackage(maybeCodeDetails?.package))\n && (maybeCodeDetails?.config === undefined || typeof maybeCodeDetails?.config === \"object\");\n};\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}\n * to have code loading modules in same package.\n*/\nexport const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer = \"IFluidCodeDetailsComparer\";\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions#IProvideFluidCodeDetailsComparer}\n * to have code loading modules in same package.\n*/\nexport interface IProvideFluidCodeDetailsComparer {\n readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer ;\n}\n\n/**\n * Provides capability to compare Fluid code details.\n *\n * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}\n * to have code loading modules in same package.\n */\nexport interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {\n\n /**\n * Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.\n *\n * Similar semantics to:\n * {@link https://github.com/npm/node-semver#usage}\n */\n satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;\n\n/* eslint-disable max-len */\n /**\n * Returns a number representing the ascending sort order of the `a` and `b` code details:\n *\n * - `< 0` if `a < b`.\n *\n * - `= 0` if `a === b`.\n *\n * - `> 0` if `a > b`.\n *\n * - `undefined` if `a` is not comparable to `b`.\n *\n * Similar semantics to:\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description | Array.sort}\n */\n compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;\n/* eslint-enable max-len */\n}\n"]}
1
+ {"version":3,"file":"fluidPackage.js","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAgEH;;;;;;;GAOG;AACI,MAAM,cAAc,GAAG,CAAC,GAAQ,EAAkC,EAAE,CAC1E,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,CAAA,KAAK,QAAQ,IAAI,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,KAAK,CAAA,KAAK,QAAQ,CAAC;AAD/E,QAAA,cAAc,kBACiE;AA+B5F;;;GAGG;AACI,MAAM,kBAAkB,GAAG,CAAC,OAAgB,EAA0C,EAAE;IAC9F,MAAM,gBAAgB,GAAG,OAAiD,CAAC;IAC3E,OAAO,CACN,OAAO,gBAAgB,KAAK,QAAQ;QACpC,CAAC,OAAO,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,CAAA,KAAK,QAAQ;YAC7C,IAAA,sBAAc,EAAC,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,CAAC,CAAC;QAC3C,CAAC,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,MAAK,SAAS,IAAI,OAAO,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,CAAA,KAAK,QAAQ,CAAC,CACxF,CAAC;AACH,CAAC,CAAC;AARW,QAAA,kBAAkB,sBAQ7B;AAEF;;;GAGG;AACU,QAAA,yBAAyB,GACrC,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Specifies an environment on Fluid property of an {@link IFluidPackage}.\n *\n * @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackageEnvironment}\n * to have code loading modules in same package.\n */\nexport interface IFluidPackageEnvironment {\n\t/**\n\t * The name of the target. For a browser environment, this could be umd for scripts\n\t * or css for styles.\n\t */\n\t[target: string]:\n\t\t| undefined\n\t\t| {\n\t\t\t\t/**\n\t\t\t\t * List of files for the target. These can be relative or absolute.\n\t\t\t\t * The code loader should resolve relative paths, and validate all\n\t\t\t\t * full urls.\n\t\t\t\t */\n\t\t\t\tfiles: string[];\n\n\t\t\t\t/**\n\t\t\t\t * General access for extended fields as specific usages will\n\t\t\t\t * likely have additional infornamation like a definition\n\t\t\t\t * of Library, the entrypoint for umd packages\n\t\t\t\t */\n\t\t\t\t[key: string]: unknown;\n\t\t };\n}\n\n/**\n * Fluid-specific properties expected on a package to be loaded by the code loader.\n * While compatible with the npm package format it is not necessary that that package is an\n * npm package:\n * {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}\n *\n * @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackage}\n * to have code loading modules in same package.\n */\nexport interface IFluidPackage {\n\t/**\n\t * The name of the package that this code represnets\n\t */\n\tname: string;\n\t/**\n\t * This object represents the Fluid specific properties of the package\n\t */\n\tfluid: {\n\t\t/**\n\t\t * The name of the of the environment. This should be something like browser, or node\n\t\t * and contain the necessary targets for loading this code in that environment.\n\t\t */\n\t\t[environment: string]: undefined | IFluidPackageEnvironment;\n\t};\n\t/**\n\t * General access for extended fields as specific usages will\n\t * likely have additional infornamation like a definition of\n\t * compatible versions, or deployment information like rings or rollouts.\n\t */\n\t[key: string]: unknown;\n}\n\n/**\n * Check if the package.json defines a Fluid package.\n *\n * @deprecated in favor of {@link @fluidframework/container-definitions#isFluidPackage}\n * to have code loading modules in same package.\n *\n * @param pkg - The package json data to check if it is a Fluid package.\n */\nexport const isFluidPackage = (pkg: any): pkg is Readonly<IFluidPackage> =>\n\ttypeof pkg === \"object\" && typeof pkg?.name === \"string\" && typeof pkg?.fluid === \"object\";\n\n/**\n * Package manager configuration. Provides a key value mapping of config values.\n *\n * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsConfig}\n * to have code loading modules in same package.\n */\nexport interface IFluidCodeDetailsConfig {\n\treadonly [key: string]: string;\n}\n\n/**\n * Data structure used to describe the code to load on the Fluid document.\n *\n * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetails}\n * to have code loading modules in same package.\n */\nexport interface IFluidCodeDetails {\n\t/**\n\t * The code package to be used on the Fluid document. This is either the package name which will be loaded\n\t * from a package manager. Or the expanded Fluid package.\n\t */\n\treadonly package: string | Readonly<IFluidPackage>;\n\n\t/**\n\t * Configuration details. This includes links to the package manager and base CDNs.\n\t */\n\treadonly config?: IFluidCodeDetailsConfig;\n}\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions#isFluidCodeDetails}\n * to have code loading modules in same package.\n */\nexport const isFluidCodeDetails = (details: unknown): details is Readonly<IFluidCodeDetails> => {\n\tconst maybeCodeDetails = details as Partial<IFluidCodeDetails> | undefined;\n\treturn (\n\t\ttypeof maybeCodeDetails === \"object\" &&\n\t\t(typeof maybeCodeDetails?.package === \"string\" ||\n\t\t\tisFluidPackage(maybeCodeDetails?.package)) &&\n\t\t(maybeCodeDetails?.config === undefined || typeof maybeCodeDetails?.config === \"object\")\n\t);\n};\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}\n * to have code loading modules in same package.\n */\nexport const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer =\n\t\"IFluidCodeDetailsComparer\";\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions#IProvideFluidCodeDetailsComparer}\n * to have code loading modules in same package.\n */\nexport interface IProvideFluidCodeDetailsComparer {\n\treadonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;\n}\n\n/**\n * Provides capability to compare Fluid code details.\n *\n * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}\n * to have code loading modules in same package.\n */\nexport interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {\n\t/**\n\t * Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.\n\t *\n\t * Similar semantics to:\n\t * {@link https://github.com/npm/node-semver#usage}\n\t */\n\tsatisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;\n\n\t/**\n\t * Returns a number representing the ascending sort order of the `a` and `b` code details:\n\t *\n\t * - `< 0` if `a < b`.\n\t *\n\t * - `= 0` if `a === b`.\n\t *\n\t * - `> 0` if `a > b`.\n\t *\n\t * - `undefined` if `a` is not comparable to `b`.\n\t *\n\t * Similar semantics to:\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description | Array.sort}\n\t */\n\tcompare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"fluidRouter.d.ts","sourceRoot":"","sources":["../src/fluidRouter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC3B,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC;CACxB;AAED,MAAM,WAAW,QAAQ;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,cAAc,CAAC;CAC5B;AAED,MAAM,WAAW,SAAS;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAA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sourceRoot":"","sources":["../src/fluidRouter.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAmBU,QAAA,YAAY,GAA8B,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport interface IRequestHeader {\n [index: string]: any;\n}\n\nexport interface IRequest {\n url: string;\n headers?: IRequestHeader;\n}\n\nexport interface IResponse {\n mimeType: string;\n status: number;\n value: any;\n headers?: { [key: string]: any; };\n stack?: string;\n}\n\nexport const IFluidRouter: keyof IProvideFluidRouter = \"IFluidRouter\";\n\n/**\n * Request routing\n */\nexport interface IProvideFluidRouter {\n readonly IFluidRouter: IFluidRouter;\n}\nexport interface IFluidRouter extends IProvideFluidRouter {\n request(request: IRequest): Promise<IResponse>;\n}\n"]}
1
+ {"version":3,"file":"fluidRouter.js","sourceRoot":"","sources":["../src/fluidRouter.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAmBU,QAAA,YAAY,GAA8B,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport interface IRequestHeader {\n\t[index: string]: any;\n}\n\nexport interface IRequest {\n\turl: string;\n\theaders?: IRequestHeader;\n}\n\nexport interface IResponse {\n\tmimeType: string;\n\tstatus: number;\n\tvalue: any;\n\theaders?: { [key: string]: any };\n\tstack?: string;\n}\n\nexport const IFluidRouter: keyof IProvideFluidRouter = \"IFluidRouter\";\n\n/**\n * Request routing\n */\nexport interface IProvideFluidRouter {\n\treadonly IFluidRouter: IFluidRouter;\n}\nexport interface IFluidRouter extends IProvideFluidRouter {\n\trequest(request: IRequest): Promise<IResponse>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"handles.d.ts","sourceRoot":"","sources":["../src/handles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACp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AmB,GAAqC,qBAAqB,CAAC;AAkC9E,QAAA,YAAY,GAA8B,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest, IResponse } from \"./fluidRouter\";\nimport { IFluidLoadable } from \"./fluidLoadable\";\nimport { FluidObject } from \"./provider\";\n\nexport const IFluidHandleContext: keyof IProvideFluidHandleContext = \"IFluidHandleContext\";\n\nexport interface IProvideFluidHandleContext {\n readonly IFluidHandleContext: IFluidHandleContext;\n}\n\n/**\n * Describes a routing context from which other `IFluidHandleContext`s are defined.\n */\nexport interface IFluidHandleContext extends IProvideFluidHandleContext {\n /**\n * The absolute path to the handle context from the root.\n */\n readonly absolutePath: string;\n\n /**\n * The parent IFluidHandleContext that has provided a route path to this IFluidHandleContext or undefined\n * at the root.\n */\n readonly routeContext?: IFluidHandleContext;\n\n /**\n * Flag indicating whether or not the entity has services attached.\n */\n readonly isAttached: boolean;\n\n /**\n * Runs through the graph and attach the bounded handles.\n */\n attachGraph(): void;\n\n resolveHandle(request: IRequest): Promise<IResponse>;\n}\n\nexport const IFluidHandle: keyof IProvideFluidHandle = \"IFluidHandle\";\n\nexport interface IProvideFluidHandle {\n readonly IFluidHandle: IFluidHandle;\n}\n\n/**\n * Handle to a shared {@link FluidObject}.\n */\nexport interface IFluidHandle<\n // REVIEW: Constrain `T` to something? How do we support dds and datastores safely?\n T = FluidObject & IFluidLoadable,\n > extends IProvideFluidHandle {\n\n /**\n * @deprecated Do not use handle's path for routing. Use `get` to get the underlying object.\n *\n * The absolute path to the handle context from the root.\n */\n readonly absolutePath: string;\n\n /**\n * Flag indicating whether or not the entity has services attached.\n */\n readonly isAttached: boolean;\n\n /**\n * Runs through the graph and attach the bounded handles.\n */\n attachGraph(): void;\n\n /**\n * Returns a promise to the Fluid Object referenced by the handle.\n */\n get(): Promise<T>;\n\n /**\n * Binds the given handle to this one or attach the given handle if this handle is attached.\n * A bound handle will also be attached once this handle is attached.\n */\n bind(handle: IFluidHandle): void;\n}\n"]}
1
+ {"version":3,"file":"handles.js","sourceRoot":"","sources":["../src/handles.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAMU,QAAA,mBAAmB,GAAqC,qBAAqB,CAAC;AAkC9E,QAAA,YAAY,GAA8B,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest, IResponse } from \"./fluidRouter\";\nimport { IFluidLoadable } from \"./fluidLoadable\";\nimport { FluidObject } from \"./provider\";\n\nexport const IFluidHandleContext: keyof IProvideFluidHandleContext = \"IFluidHandleContext\";\n\nexport interface IProvideFluidHandleContext {\n\treadonly IFluidHandleContext: IFluidHandleContext;\n}\n\n/**\n * Describes a routing context from which other `IFluidHandleContext`s are defined.\n */\nexport interface IFluidHandleContext extends IProvideFluidHandleContext {\n\t/**\n\t * The absolute path to the handle context from the root.\n\t */\n\treadonly absolutePath: string;\n\n\t/**\n\t * The parent IFluidHandleContext that has provided a route path to this IFluidHandleContext or undefined\n\t * at the root.\n\t */\n\treadonly routeContext?: IFluidHandleContext;\n\n\t/**\n\t * Flag indicating whether or not the entity has services attached.\n\t */\n\treadonly isAttached: boolean;\n\n\t/**\n\t * Runs through the graph and attach the bounded handles.\n\t */\n\tattachGraph(): void;\n\n\tresolveHandle(request: IRequest): Promise<IResponse>;\n}\n\nexport const IFluidHandle: keyof IProvideFluidHandle = \"IFluidHandle\";\n\nexport interface IProvideFluidHandle {\n\treadonly IFluidHandle: IFluidHandle;\n}\n\n/**\n * Handle to a shared {@link FluidObject}.\n */\nexport interface IFluidHandle<\n\t// REVIEW: Constrain `T` to something? How do we support dds and datastores safely?\n\tT = FluidObject & IFluidLoadable,\n> extends IProvideFluidHandle {\n\t/**\n\t * @deprecated Do not use handle's path for routing. Use `get` to get the underlying object.\n\t *\n\t * The absolute path to the handle context from the root.\n\t */\n\treadonly absolutePath: string;\n\n\t/**\n\t * Flag indicating whether or not the entity has services attached.\n\t */\n\treadonly isAttached: boolean;\n\n\t/**\n\t * Runs through the graph and attach the bounded handles.\n\t */\n\tattachGraph(): void;\n\n\t/**\n\t * Returns a promise to the Fluid Object referenced by the handle.\n\t */\n\tget(): Promise<T>;\n\n\t/**\n\t * Binds the given handle to this one or attach the given handle if this handle is attached.\n\t * A bound handle will also be attached once this handle is attached.\n\t */\n\tbind(handle: IFluidHandle): void;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -2,10 +2,9 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { IFluidObject } from "./fluidObject";
6
5
  export { IFluidLoadable, IProvideFluidLoadable, IFluidRunnable, IProvideFluidRunnable, } from "./fluidLoadable";
7
6
  export { IRequest, IRequestHeader, IResponse, IProvideFluidRouter, IFluidRouter, } from "./fluidRouter";
8
7
  export { IFluidHandleContext, IProvideFluidHandleContext, IFluidHandle, IProvideFluidHandle, } from "./handles";
9
8
  export { IFluidPackageEnvironment, IFluidPackage, isFluidPackage, IFluidCodeDetailsConfig, IFluidCodeDetails, isFluidCodeDetails, IFluidCodeDetailsComparer, IProvideFluidCodeDetailsComparer, } from "./fluidPackage";
10
- export { FluidObjectProviderKeys, FluidObject, FluidObjectKeys, } from "./provider";
9
+ export { FluidObjectProviderKeys, FluidObject, FluidObjectKeys } from "./provider";
11
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EACH,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,qBAAqB,GACxB,MAAM,iBAAiB,CAAC;AAKzB,OAAO,EACH,QAAQ,EACR,cAAc,EACd,SAAS,EACT,mBAAmB,EACnB,YAAY,GACf,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,mBAAmB,EACnB,0BAA0B,EAC1B,YAAY,EACZ,mBAAmB,GACtB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACH,wBAAwB,EACxB,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,EACzB,gCAAgC,GACnC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACH,uBAAuB,EACvB,WAAW,EACX,eAAe,GAClB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,qBAAqB,GACrB,MAAM,iBAAiB,CAAC;AAKzB,OAAO,EACN,QAAQ,EACR,cAAc,EACd,SAAS,EACT,mBAAmB,EACnB,YAAY,GACZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EACN,mBAAmB,EACnB,0BAA0B,EAC1B,YAAY,EACZ,mBAAmB,GACnB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACN,wBAAwB,EACxB,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,EACzB,gCAAgC,GAChC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAMH,iDAKyB;AAJrB,+GAAA,cAAc,OAAA;AAEd,+GAAA,cAAc,OAAA;AAIlB,+FAA+F;AAC/F,qDAAqD;AACrD,8EAA8E;AAC9E,6CAMuB;AADnB,2GAAA,YAAY,OAAA;AAGhB,qCAKmB;AAJf,8GAAA,mBAAmB,OAAA;AAEnB,uGAAA,YAAY,OAAA;AAIhB,+CASwB;AANpB,8GAAA,cAAc,OAAA;AAGd,kHAAA,kBAAkB,OAAA;AAClB,yHAAA,yBAAyB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// when merging declarations the module path must match exactly. Because of this we need to explicitly export\n// IFluidObject as opposed to an export *\nexport { IFluidObject } from \"./fluidObject\";\n\nexport {\n IFluidLoadable,\n IProvideFluidLoadable,\n IFluidRunnable,\n IProvideFluidRunnable,\n} from \"./fluidLoadable\";\n\n// Typescript forgets the index signature when customers augment IRequestHeader if we export *.\n// So we export the explicit members as a workaround:\n// https://github.com/microsoft/TypeScript/issues/18877#issuecomment-476921038\nexport {\n IRequest,\n IRequestHeader,\n IResponse,\n IProvideFluidRouter,\n IFluidRouter,\n} from \"./fluidRouter\";\n\nexport {\n IFluidHandleContext,\n IProvideFluidHandleContext,\n IFluidHandle,\n IProvideFluidHandle,\n} from \"./handles\";\n\nexport {\n IFluidPackageEnvironment,\n IFluidPackage,\n isFluidPackage,\n IFluidCodeDetailsConfig,\n IFluidCodeDetails,\n isFluidCodeDetails,\n IFluidCodeDetailsComparer,\n IProvideFluidCodeDetailsComparer,\n} from \"./fluidPackage\";\n\nexport {\n FluidObjectProviderKeys,\n FluidObject,\n FluidObjectKeys,\n} from \"./provider\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAKyB;AAJxB,+GAAA,cAAc,OAAA;AAEd,+GAAA,cAAc,OAAA;AAIf,+FAA+F;AAC/F,qDAAqD;AACrD,8EAA8E;AAC9E,6CAMuB;AADtB,2GAAA,YAAY,OAAA;AAGb,qCAKmB;AAJlB,8GAAA,mBAAmB,OAAA;AAEnB,uGAAA,YAAY,OAAA;AAIb,+CASwB;AANvB,8GAAA,cAAc,OAAA;AAGd,kHAAA,kBAAkB,OAAA;AAClB,yHAAA,yBAAyB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tIFluidLoadable,\n\tIProvideFluidLoadable,\n\tIFluidRunnable,\n\tIProvideFluidRunnable,\n} from \"./fluidLoadable\";\n\n// Typescript forgets the index signature when customers augment IRequestHeader if we export *.\n// So we export the explicit members as a workaround:\n// https://github.com/microsoft/TypeScript/issues/18877#issuecomment-476921038\nexport {\n\tIRequest,\n\tIRequestHeader,\n\tIResponse,\n\tIProvideFluidRouter,\n\tIFluidRouter,\n} from \"./fluidRouter\";\n\nexport {\n\tIFluidHandleContext,\n\tIProvideFluidHandleContext,\n\tIFluidHandle,\n\tIProvideFluidHandle,\n} from \"./handles\";\n\nexport {\n\tIFluidPackageEnvironment,\n\tIFluidPackage,\n\tisFluidPackage,\n\tIFluidCodeDetailsConfig,\n\tIFluidCodeDetails,\n\tisFluidCodeDetails,\n\tIFluidCodeDetailsComparer,\n\tIProvideFluidCodeDetailsComparer,\n} from \"./fluidPackage\";\n\nexport { FluidObjectProviderKeys, FluidObject, FluidObjectKeys } from \"./provider\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,oBAAY,uBAAuB,CAAC,CAAC,EAAE,KAAK,SAAS,MAAM,CAAC,GAAG,MAAM,CAAC,IAClE,MAAM,SAAS,KAAK,GAAG,KAAK,GAAG,MAAM,SAAS,KAAK,GAAE,KAAK,GAC1D,KAAK,SAAS,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAChC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAC1D,KAAK,GACL,KAAK,GACT,KAAK,CAAC;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,oBAAY,WAAW,CAAC,CAAC,GAAG,OAAO,IAAI;KAClC,CAAC,IAAI,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CAC3C,CAAC;AAEF;;;;;;;;GAQG;AACH,oBAAY,eAAe,CAAC,CAAC,IAAI,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,oBAAY,uBAAuB,CAAC,CAAC,EAAE,KAAK,SAAS,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,MAAM,SAAS,KAAK,GAC3F,KAAK,GACL,MAAM,SAAS,KAAK,GACpB,KAAK,GACL,KAAK,SAAS,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GACtC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAC7D,KAAK,GACL,KAAK,GACN,KAAK,CAAC;AAET;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,oBAAY,WAAW,CAAC,CAAC,GAAG,OAAO,IAAI;KACrC,CAAC,IAAI,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;;;GAQG;AACH,oBAAY,eAAe,CAAC,CAAC,IAAI,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * This utility type is meant for internal use by {@link FluidObject}\n * Produces a valid FluidObject key given a type and a property.\n * A valid FluidObject key is a property that exists on the incoming type\n * as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`\n * This aligns with the FluidObject pattern expected to be used with all FluidObjects.\n *\n * @example\n * ```typescript\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n * This pattern enables discovery, and delegation in a standard way which is central\n * to FluidObject pattern\n *\n * @internal\n */\nexport type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> =\n string extends TProp ? never : number extends TProp? never : // exclude indexers [key:string |number]: any\n TProp extends keyof Required<T>[TProp] // TProp is a property of T, and T[TProp]\n ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] // T[TProp] is the same type as T[TProp][TProp]\n ? TProp\n : never\n : never;\n\n/**\n * This utility type take interface(s) that follow the FluidObject pattern, and produces\n * a new type that can be used for inspection and discovery of those interfaces.\n *\n * It is meant to be used with types that are known to implement the FluidObject pattern.\n * A common way to specify a type implements the FluidObject pattern is to expose it as a\n * FluidObject without a generic argument.\n *\n * @example\n * For example, if we have an interface like below\n * ```typescript\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n *\n * and a function that returns a FluidObject. You would do the following\n *\n * `const maybeFoo: FluidObject<IFoo> = getFluidObject()`;\n *\n * Either IFoo or IProvideFoo are valid generic arguments. In both case\n * maybeFoo will be of type `{IFoo?: IFoo}`. If IFoo is not undefined,\n * then the FluidObject provides IFoo, and it can be used.\n *\n * You can inspect multiple types via a intersection. For example:\n * `FluidObject<IFoo & IBar>`\n *\n */\nexport type FluidObject<T = unknown> = {\n [P in FluidObjectProviderKeys<T>]?: T[P];\n};\n\n/**\n * This utility type creates a type that is the union of all keys on the generic type\n * which implement the FluidObject pattern.\n *\n * See {@link FluidObject}\n *\n * For example `FluidObjectKeys<IFoo & IBar>` would result in `\"IFoo\" | \"IBar\"`\n *\n */\nexport type FluidObjectKeys<T> = keyof FluidObject<T>;\n"]}
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * This utility type is meant for internal use by {@link FluidObject}\n * Produces a valid FluidObject key given a type and a property.\n * A valid FluidObject key is a property that exists on the incoming type\n * as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`\n * This aligns with the FluidObject pattern expected to be used with all FluidObjects.\n *\n * @example\n * ```typescript\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n * This pattern enables discovery, and delegation in a standard way which is central\n * to FluidObject pattern\n *\n * @internal\n */\nexport type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp\n\t? never\n\t: number extends TProp\n\t? never // exclude indexers [key:string |number]: any\n\t: TProp extends keyof Required<T>[TProp] // TProp is a property of T, and T[TProp]\n\t? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] // T[TProp] is the same type as T[TProp][TProp]\n\t\t? TProp\n\t\t: never\n\t: never;\n\n/**\n * This utility type take interface(s) that follow the FluidObject pattern, and produces\n * a new type that can be used for inspection and discovery of those interfaces.\n *\n * It is meant to be used with types that are known to implement the FluidObject pattern.\n * A common way to specify a type implements the FluidObject pattern is to expose it as a\n * FluidObject without a generic argument.\n *\n * @example\n * For example, if we have an interface like below\n * ```typescript\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n *\n * and a function that returns a FluidObject. You would do the following\n *\n * `const maybeFoo: FluidObject<IFoo> = getFluidObject()`;\n *\n * Either IFoo or IProvideFoo are valid generic arguments. In both case\n * maybeFoo will be of type `{IFoo?: IFoo}`. If IFoo is not undefined,\n * then the FluidObject provides IFoo, and it can be used.\n *\n * You can inspect multiple types via a intersection. For example:\n * `FluidObject<IFoo & IBar>`\n *\n */\nexport type FluidObject<T = unknown> = {\n\t[P in FluidObjectProviderKeys<T>]?: T[P];\n};\n\n/**\n * This utility type creates a type that is the union of all keys on the generic type\n * which implement the FluidObject pattern.\n *\n * See {@link FluidObject}\n *\n * For example `FluidObjectKeys<IFoo & IBar>` would result in `\"IFoo\" | \"IBar\"`\n *\n */\nexport type FluidObjectKeys<T> = keyof FluidObject<T>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"fluidLoadable.d.ts","sourceRoot":"","sources":["../src/fluidLoadable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,eAAO,MAAM,cAAc,EAAE,MAAM,qBAAwC,CAAC;AAE5E,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CAC3C;AACD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,qBAAqB;IAEzD,MAAM,EAAE,YAAY,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,EAAE,MAAM,qBAAwC,CAAC;AAE5E,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CAC3C;AACD,MAAM,WAAW,cAAc;IAC3B,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B"}
1
+ {"version":3,"file":"fluidLoadable.d.ts","sourceRoot":"","sources":["../src/fluidLoadable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,eAAO,MAAM,cAAc,EAAE,MAAM,qBAAwC,CAAC;AAE5E,MAAM,WAAW,qBAAqB;IACrC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CACxC;AACD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,qBAAqB;IAE5D,MAAM,EAAE,YAAY,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,EAAE,MAAM,qBAAwC,CAAC;AAE5E,MAAM,WAAW,qBAAqB;IACrC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CACxC;AACD,MAAM,WAAW,cAAc;IAC9B,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"fluidLoadable.js","sourceRoot":"","sources":["../src/fluidLoadable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,CAAC,MAAM,cAAc,GAAgC,gBAAgB,CAAC;AAa5E,MAAM,CAAC,MAAM,cAAc,GAAgC,gBAAgB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"./handles\";\n\nexport const IFluidLoadable: keyof IProvideFluidLoadable = \"IFluidLoadable\";\n\nexport interface IProvideFluidLoadable {\n readonly IFluidLoadable: IFluidLoadable;\n}\n/**\n * A shared FluidObject has a URL from which it can be referenced\n */\nexport interface IFluidLoadable extends IProvideFluidLoadable {\n // Handle to the loadable FluidObject\n handle: IFluidHandle;\n}\n\nexport const IFluidRunnable: keyof IProvideFluidRunnable = \"IFluidRunnable\";\n\nexport interface IProvideFluidRunnable {\n readonly IFluidRunnable: IFluidRunnable;\n}\nexport interface IFluidRunnable {\n run(...args: any[]): Promise<void>;\n stop(reason?: string): void;\n}\n"]}
1
+ {"version":3,"file":"fluidLoadable.js","sourceRoot":"","sources":["../src/fluidLoadable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,CAAC,MAAM,cAAc,GAAgC,gBAAgB,CAAC;AAa5E,MAAM,CAAC,MAAM,cAAc,GAAgC,gBAAgB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"./handles\";\n\nexport const IFluidLoadable: keyof IProvideFluidLoadable = \"IFluidLoadable\";\n\nexport interface IProvideFluidLoadable {\n\treadonly IFluidLoadable: IFluidLoadable;\n}\n/**\n * A shared FluidObject has a URL from which it can be referenced\n */\nexport interface IFluidLoadable extends IProvideFluidLoadable {\n\t// Handle to the loadable FluidObject\n\thandle: IFluidHandle;\n}\n\nexport const IFluidRunnable: keyof IProvideFluidRunnable = \"IFluidRunnable\";\n\nexport interface IProvideFluidRunnable {\n\treadonly IFluidRunnable: IFluidRunnable;\n}\nexport interface IFluidRunnable {\n\trun(...args: any[]): Promise<void>;\n\tstop(reason?: string): void;\n}\n"]}
@@ -97,17 +97,17 @@ export interface IFluidCodeDetails {
97
97
  /**
98
98
  * @deprecated in favor of {@link @fluidframework/container-definitions#isFluidCodeDetails}
99
99
  * to have code loading modules in same package.
100
- */
100
+ */
101
101
  export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
102
102
  /**
103
103
  * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}
104
104
  * to have code loading modules in same package.
105
- */
105
+ */
106
106
  export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
107
107
  /**
108
108
  * @deprecated in favor of {@link @fluidframework/container-definitions#IProvideFluidCodeDetailsComparer}
109
109
  * to have code loading modules in same package.
110
- */
110
+ */
111
111
  export interface IProvideFluidCodeDetailsComparer {
112
112
  readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
113
113
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fluidPackage.d.ts","sourceRoot":"","s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,eAAO,MAAM,kBAAkB,YAAa,OAAO,2CAQlD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,gCAClB,CAAC;AAE7B;;;GAGG;AACH,MAAM,WAAW,gCAAgC;IAChD,QAAQ,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;CAC9D;AAED;;;;;GAKG;AACH,MAAM,WAAW,yBAA0B,SAAQ,gCAAgC;IAClF;;;;;OAKG;IACH,SAAS,CAAC,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEzF;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACjF"}
@@ -10,22 +10,21 @@
10
10
  *
11
11
  * @param pkg - The package json data to check if it is a Fluid package.
12
12
  */
13
- export const isFluidPackage = (pkg) => typeof pkg === "object"
14
- && typeof (pkg === null || pkg === void 0 ? void 0 : pkg.name) === "string"
15
- && typeof (pkg === null || pkg === void 0 ? void 0 : pkg.fluid) === "object";
13
+ export const isFluidPackage = (pkg) => typeof pkg === "object" && typeof (pkg === null || pkg === void 0 ? void 0 : pkg.name) === "string" && typeof (pkg === null || pkg === void 0 ? void 0 : pkg.fluid) === "object";
16
14
  /**
17
15
  * @deprecated in favor of {@link @fluidframework/container-definitions#isFluidCodeDetails}
18
16
  * to have code loading modules in same package.
19
- */
17
+ */
20
18
  export const isFluidCodeDetails = (details) => {
21
19
  const maybeCodeDetails = details;
22
- return typeof maybeCodeDetails === "object"
23
- && (typeof (maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.package) === "string" || isFluidPackage(maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.package))
24
- && ((maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.config) === undefined || typeof (maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.config) === "object");
20
+ return (typeof maybeCodeDetails === "object" &&
21
+ (typeof (maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.package) === "string" ||
22
+ isFluidPackage(maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.package)) &&
23
+ ((maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.config) === undefined || typeof (maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.config) === "object"));
25
24
  };
26
25
  /**
27
26
  * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}
28
27
  * to have code loading modules in same package.
29
- */
28
+ */
30
29
  export const IFluidCodeDetailsComparer = "IFluidCodeDetailsComparer";
31
30
  //# sourceMappingURL=fluidPackage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fluidPackage.js","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA8DH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAQ,EAAkC,EAAE,CACvE,OAAO,GAAG,KAAK,QAAQ;OACpB,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,CAAA,KAAK,QAAQ;OAC7B,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,KAAK,CAAA,KAAK,QAAQ,CAAC;AA+BtC;;;EAGE;AACF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAgB,EAA0C,EAAE;IAC3F,MAAM,gBAAgB,GAAG,OAAiD,CAAC;IAC3E,OAAO,OAAO,gBAAgB,KAAK,QAAQ;WACpC,CAAC,OAAO,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,CAAA,KAAK,QAAQ,IAAI,cAAc,CAAC,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,CAAC,CAAC;WAC5F,CAAC,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,MAAK,SAAS,IAAI,OAAO,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,CAAA,KAAK,QAAQ,CAAC,CAAC;AACpG,CAAC,CAAC;AAEF;;;EAGE;AACF,MAAM,CAAC,MAAM,yBAAyB,GAA2C,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n /**\n * Specifies an environment on Fluid property of an {@link IFluidPackage}.\n *\n * @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackageEnvironment}\n * to have code loading modules in same package.\n */\nexport interface IFluidPackageEnvironment {\n /**\n * The name of the target. For a browser environment, this could be umd for scripts\n * or css for styles.\n */\n [target: string]: undefined | {\n /**\n * List of files for the target. These can be relative or absolute.\n * The code loader should resolve relative paths, and validate all\n * full urls.\n */\n files: string[];\n\n /**\n * General access for extended fields as specific usages will\n * likely have additional infornamation like a definition\n * of Library, the entrypoint for umd packages\n */\n [key: string]: unknown;\n };\n}\n\n/**\n * Fluid-specific properties expected on a package to be loaded by the code loader.\n * While compatible with the npm package format it is not necessary that that package is an\n * npm package:\n * {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}\n *\n * @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackage}\n * to have code loading modules in same package.\n */\nexport interface IFluidPackage {\n /**\n * The name of the package that this code represnets\n */\n name: string;\n /**\n * This object represents the Fluid specific properties of the package\n */\n fluid: {\n /**\n * The name of the of the environment. This should be something like browser, or node\n * and contain the necessary targets for loading this code in that environment.\n */\n [environment: string]: undefined | IFluidPackageEnvironment;\n };\n /**\n * General access for extended fields as specific usages will\n * likely have additional infornamation like a definition of\n * compatible versions, or deployment information like rings or rollouts.\n */\n [key: string]: unknown;\n}\n\n/**\n * Check if the package.json defines a Fluid package.\n *\n * @deprecated in favor of {@link @fluidframework/container-definitions#isFluidPackage}\n * to have code loading modules in same package.\n *\n * @param pkg - The package json data to check if it is a Fluid package.\n */\nexport const isFluidPackage = (pkg: any): pkg is Readonly<IFluidPackage> =>\n typeof pkg === \"object\"\n && typeof pkg?.name === \"string\"\n && typeof pkg?.fluid === \"object\";\n\n/**\n * Package manager configuration. Provides a key value mapping of config values.\n *\n * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsConfig}\n * to have code loading modules in same package.\n */\nexport interface IFluidCodeDetailsConfig {\n readonly [key: string]: string;\n}\n\n/**\n * Data structure used to describe the code to load on the Fluid document.\n *\n * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetails}\n * to have code loading modules in same package.\n */\nexport interface IFluidCodeDetails {\n /**\n * The code package to be used on the Fluid document. This is either the package name which will be loaded\n * from a package manager. Or the expanded Fluid package.\n */\n readonly package: string | Readonly<IFluidPackage>;\n\n /**\n * Configuration details. This includes links to the package manager and base CDNs.\n */\n readonly config?: IFluidCodeDetailsConfig;\n}\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions#isFluidCodeDetails}\n * to have code loading modules in same package.\n*/\nexport const isFluidCodeDetails = (details: unknown): details is Readonly<IFluidCodeDetails> => {\n const maybeCodeDetails = details as Partial<IFluidCodeDetails> | undefined;\n return typeof maybeCodeDetails === \"object\"\n && (typeof maybeCodeDetails?.package === \"string\" || isFluidPackage(maybeCodeDetails?.package))\n && (maybeCodeDetails?.config === undefined || typeof maybeCodeDetails?.config === \"object\");\n};\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}\n * to have code loading modules in same package.\n*/\nexport const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer = \"IFluidCodeDetailsComparer\";\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions#IProvideFluidCodeDetailsComparer}\n * to have code loading modules in same package.\n*/\nexport interface IProvideFluidCodeDetailsComparer {\n readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer ;\n}\n\n/**\n * Provides capability to compare Fluid code details.\n *\n * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}\n * to have code loading modules in same package.\n */\nexport interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {\n\n /**\n * Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.\n *\n * Similar semantics to:\n * {@link https://github.com/npm/node-semver#usage}\n */\n satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;\n\n/* eslint-disable max-len */\n /**\n * Returns a number representing the ascending sort order of the `a` and `b` code details:\n *\n * - `< 0` if `a < b`.\n *\n * - `= 0` if `a === b`.\n *\n * - `> 0` if `a > b`.\n *\n * - `undefined` if `a` is not comparable to `b`.\n *\n * Similar semantics to:\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description | Array.sort}\n */\n compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;\n/* eslint-enable max-len */\n}\n"]}
1
+ {"version":3,"file":"fluidPackage.js","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAQ,EAAkC,EAAE,CAC1E,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,CAAA,KAAK,QAAQ,IAAI,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,KAAK,CAAA,KAAK,QAAQ,CAAC;AA+B5F;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAgB,EAA0C,EAAE;IAC9F,MAAM,gBAAgB,GAAG,OAAiD,CAAC;IAC3E,OAAO,CACN,OAAO,gBAAgB,KAAK,QAAQ;QACpC,CAAC,OAAO,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,CAAA,KAAK,QAAQ;YAC7C,cAAc,CAAC,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,CAAC,CAAC;QAC3C,CAAC,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,MAAK,SAAS,IAAI,OAAO,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,CAAA,KAAK,QAAQ,CAAC,CACxF,CAAC;AACH,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GACrC,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Specifies an environment on Fluid property of an {@link IFluidPackage}.\n *\n * @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackageEnvironment}\n * to have code loading modules in same package.\n */\nexport interface IFluidPackageEnvironment {\n\t/**\n\t * The name of the target. For a browser environment, this could be umd for scripts\n\t * or css for styles.\n\t */\n\t[target: string]:\n\t\t| undefined\n\t\t| {\n\t\t\t\t/**\n\t\t\t\t * List of files for the target. These can be relative or absolute.\n\t\t\t\t * The code loader should resolve relative paths, and validate all\n\t\t\t\t * full urls.\n\t\t\t\t */\n\t\t\t\tfiles: string[];\n\n\t\t\t\t/**\n\t\t\t\t * General access for extended fields as specific usages will\n\t\t\t\t * likely have additional infornamation like a definition\n\t\t\t\t * of Library, the entrypoint for umd packages\n\t\t\t\t */\n\t\t\t\t[key: string]: unknown;\n\t\t };\n}\n\n/**\n * Fluid-specific properties expected on a package to be loaded by the code loader.\n * While compatible with the npm package format it is not necessary that that package is an\n * npm package:\n * {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}\n *\n * @deprecated In favor of {@link @fluidframework/container-definitions#IFluidPackage}\n * to have code loading modules in same package.\n */\nexport interface IFluidPackage {\n\t/**\n\t * The name of the package that this code represnets\n\t */\n\tname: string;\n\t/**\n\t * This object represents the Fluid specific properties of the package\n\t */\n\tfluid: {\n\t\t/**\n\t\t * The name of the of the environment. This should be something like browser, or node\n\t\t * and contain the necessary targets for loading this code in that environment.\n\t\t */\n\t\t[environment: string]: undefined | IFluidPackageEnvironment;\n\t};\n\t/**\n\t * General access for extended fields as specific usages will\n\t * likely have additional infornamation like a definition of\n\t * compatible versions, or deployment information like rings or rollouts.\n\t */\n\t[key: string]: unknown;\n}\n\n/**\n * Check if the package.json defines a Fluid package.\n *\n * @deprecated in favor of {@link @fluidframework/container-definitions#isFluidPackage}\n * to have code loading modules in same package.\n *\n * @param pkg - The package json data to check if it is a Fluid package.\n */\nexport const isFluidPackage = (pkg: any): pkg is Readonly<IFluidPackage> =>\n\ttypeof pkg === \"object\" && typeof pkg?.name === \"string\" && typeof pkg?.fluid === \"object\";\n\n/**\n * Package manager configuration. Provides a key value mapping of config values.\n *\n * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsConfig}\n * to have code loading modules in same package.\n */\nexport interface IFluidCodeDetailsConfig {\n\treadonly [key: string]: string;\n}\n\n/**\n * Data structure used to describe the code to load on the Fluid document.\n *\n * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetails}\n * to have code loading modules in same package.\n */\nexport interface IFluidCodeDetails {\n\t/**\n\t * The code package to be used on the Fluid document. This is either the package name which will be loaded\n\t * from a package manager. Or the expanded Fluid package.\n\t */\n\treadonly package: string | Readonly<IFluidPackage>;\n\n\t/**\n\t * Configuration details. This includes links to the package manager and base CDNs.\n\t */\n\treadonly config?: IFluidCodeDetailsConfig;\n}\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions#isFluidCodeDetails}\n * to have code loading modules in same package.\n */\nexport const isFluidCodeDetails = (details: unknown): details is Readonly<IFluidCodeDetails> => {\n\tconst maybeCodeDetails = details as Partial<IFluidCodeDetails> | undefined;\n\treturn (\n\t\ttypeof maybeCodeDetails === \"object\" &&\n\t\t(typeof maybeCodeDetails?.package === \"string\" ||\n\t\t\tisFluidPackage(maybeCodeDetails?.package)) &&\n\t\t(maybeCodeDetails?.config === undefined || typeof maybeCodeDetails?.config === \"object\")\n\t);\n};\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}\n * to have code loading modules in same package.\n */\nexport const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer =\n\t\"IFluidCodeDetailsComparer\";\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions#IProvideFluidCodeDetailsComparer}\n * to have code loading modules in same package.\n */\nexport interface IProvideFluidCodeDetailsComparer {\n\treadonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;\n}\n\n/**\n * Provides capability to compare Fluid code details.\n *\n * @deprecated in favor of {@link @fluidframework/container-definitions#IFluidCodeDetailsComparer}\n * to have code loading modules in same package.\n */\nexport interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {\n\t/**\n\t * Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.\n\t *\n\t * Similar semantics to:\n\t * {@link https://github.com/npm/node-semver#usage}\n\t */\n\tsatisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;\n\n\t/**\n\t * Returns a number representing the ascending sort order of the `a` and `b` code details:\n\t *\n\t * - `< 0` if `a < b`.\n\t *\n\t * - `= 0` if `a === b`.\n\t *\n\t * - `> 0` if `a > b`.\n\t *\n\t * - `undefined` if `a` is not comparable to `b`.\n\t *\n\t * Similar semantics to:\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description | Array.sort}\n\t */\n\tcompare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"fluidRouter.d.ts","sourceRoot":"","sources":["../src/fluidRouter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC3B,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC;CACxB;AAED,MAAM,WAAW,QAAQ;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,cAAc,CAAC;CAC5B;AAED,MAAM,WAAW,SAAS;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KAAE,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,mBAAoC,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;CACvC;AACD,MAAM,WAAW,YAAa,SAAQ,mBAAmB;IACrD,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;CAClD"}
1
+ {"version":3,"file":"fluidRouter.d.ts","sourceRoot":"","sources":["../src/fluidRouter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC9B,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,WAAW,SAAS;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,mBAAoC,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;CACpC;AACD,MAAM,WAAW,YAAa,SAAQ,mBAAmB;IACxD,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;CAC/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"fluidRouter.js","sourceRoot":"","sources":["../src/fluidRouter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH,MAAM,CAAC,MAAM,YAAY,GAA8B,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport interface IRequestHeader {\n [index: string]: any;\n}\n\nexport interface IRequest {\n url: string;\n headers?: IRequestHeader;\n}\n\nexport interface IResponse {\n mimeType: string;\n status: number;\n value: any;\n headers?: { [key: string]: any; };\n stack?: string;\n}\n\nexport const IFluidRouter: keyof IProvideFluidRouter = \"IFluidRouter\";\n\n/**\n * Request routing\n */\nexport interface IProvideFluidRouter {\n readonly IFluidRouter: IFluidRouter;\n}\nexport interface IFluidRouter extends IProvideFluidRouter {\n request(request: IRequest): Promise<IResponse>;\n}\n"]}
1
+ {"version":3,"file":"fluidRouter.js","sourceRoot":"","sources":["../src/fluidRouter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH,MAAM,CAAC,MAAM,YAAY,GAA8B,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport interface IRequestHeader {\n\t[index: string]: any;\n}\n\nexport interface IRequest {\n\turl: string;\n\theaders?: IRequestHeader;\n}\n\nexport interface IResponse {\n\tmimeType: string;\n\tstatus: number;\n\tvalue: any;\n\theaders?: { [key: string]: any };\n\tstack?: string;\n}\n\nexport const IFluidRouter: keyof IProvideFluidRouter = \"IFluidRouter\";\n\n/**\n * Request routing\n */\nexport interface IProvideFluidRouter {\n\treadonly IFluidRouter: IFluidRouter;\n}\nexport interface IFluidRouter extends IProvideFluidRouter {\n\trequest(request: IRequest): Promise<IResponse>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"handles.d.ts","sourceRoot":"","sources":["../src/handles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAO,MAAM,mBAAmB,EAAE,MAAM,0BAAkD,CAAC;AAE3F,MAAM,WAAW,0BAA0B;IACvC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;IACnE;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAE5C;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,WAAW,IAAI,IAAI,CAAC;IAEpB,aAAa,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;CACxD;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,mBAAoC,CAAC;AAEtE,MAAM,WAAW,mBAAmB;IAChC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY,CAEzB,CAAC,GAAG,WAAW,GAAG,cAAc,CAC9B,SAAQ,mBAAmB;IAE7B;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,Q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AE9B;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,WAAW,IAAI,IAAI,CAAC;IAEpB;;OAEG;IACH,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;IAElB;;;OAGG;IACH,IAAI,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;CACjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"handles.js","sourceRoot":"","sources":["../src/handles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,CAAC,MAAM,mBAAmB,GAAqC,qBAAqB,CAAC;AAkC3F,MAAM,CAAC,MAAM,YAAY,GAA8B,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest, IResponse } from \"./fluidRouter\";\nimport { IFluidLoadable } from \"./fluidLoadable\";\nimport { FluidObject } from \"./provider\";\n\nexport const IFluidHandleContext: keyof IProvideFluidHandleContext = \"IFluidHandleContext\";\n\nexport interface IProvideFluidHandleContext {\n readonly IFluidHandleContext: IFluidHandleContext;\n}\n\n/**\n * Describes a routing context from which other `IFluidHandleContext`s are defined.\n */\nexport interface IFluidHandleContext extends IProvideFluidHandleContext {\n /**\n * The absolute path to the handle context from the root.\n */\n readonly absolutePath: string;\n\n /**\n * The parent IFluidHandleContext that has provided a route path to this IFluidHandleContext or undefined\n * at the root.\n */\n readonly routeContext?: IFluidHandleContext;\n\n /**\n * Flag indicating whether or not the entity has services attached.\n */\n readonly isAttached: boolean;\n\n /**\n * Runs through the graph and attach the bounded handles.\n */\n attachGraph(): void;\n\n resolveHandle(request: IRequest): Promise<IResponse>;\n}\n\nexport const IFluidHandle: keyof IProvideFluidHandle = \"IFluidHandle\";\n\nexport interface IProvideFluidHandle {\n readonly IFluidHandle: IFluidHandle;\n}\n\n/**\n * Handle to a shared {@link FluidObject}.\n */\nexport interface IFluidHandle<\n // REVIEW: Constrain `T` to something? How do we support dds and datastores safely?\n T = FluidObject & IFluidLoadable,\n > extends IProvideFluidHandle {\n\n /**\n * @deprecated Do not use handle's path for routing. Use `get` to get the underlying object.\n *\n * The absolute path to the handle context from the root.\n */\n readonly absolutePath: string;\n\n /**\n * Flag indicating whether or not the entity has services attached.\n */\n readonly isAttached: boolean;\n\n /**\n * Runs through the graph and attach the bounded handles.\n */\n attachGraph(): void;\n\n /**\n * Returns a promise to the Fluid Object referenced by the handle.\n */\n get(): Promise<T>;\n\n /**\n * Binds the given handle to this one or attach the given handle if this handle is attached.\n * A bound handle will also be attached once this handle is attached.\n */\n bind(handle: IFluidHandle): void;\n}\n"]}
1
+ {"version":3,"file":"handles.js","sourceRoot":"","sources":["../src/handles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,CAAC,MAAM,mBAAmB,GAAqC,qBAAqB,CAAC;AAkC3F,MAAM,CAAC,MAAM,YAAY,GAA8B,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest, IResponse } from \"./fluidRouter\";\nimport { IFluidLoadable } from \"./fluidLoadable\";\nimport { FluidObject } from \"./provider\";\n\nexport const IFluidHandleContext: keyof IProvideFluidHandleContext = \"IFluidHandleContext\";\n\nexport interface IProvideFluidHandleContext {\n\treadonly IFluidHandleContext: IFluidHandleContext;\n}\n\n/**\n * Describes a routing context from which other `IFluidHandleContext`s are defined.\n */\nexport interface IFluidHandleContext extends IProvideFluidHandleContext {\n\t/**\n\t * The absolute path to the handle context from the root.\n\t */\n\treadonly absolutePath: string;\n\n\t/**\n\t * The parent IFluidHandleContext that has provided a route path to this IFluidHandleContext or undefined\n\t * at the root.\n\t */\n\treadonly routeContext?: IFluidHandleContext;\n\n\t/**\n\t * Flag indicating whether or not the entity has services attached.\n\t */\n\treadonly isAttached: boolean;\n\n\t/**\n\t * Runs through the graph and attach the bounded handles.\n\t */\n\tattachGraph(): void;\n\n\tresolveHandle(request: IRequest): Promise<IResponse>;\n}\n\nexport const IFluidHandle: keyof IProvideFluidHandle = \"IFluidHandle\";\n\nexport interface IProvideFluidHandle {\n\treadonly IFluidHandle: IFluidHandle;\n}\n\n/**\n * Handle to a shared {@link FluidObject}.\n */\nexport interface IFluidHandle<\n\t// REVIEW: Constrain `T` to something? How do we support dds and datastores safely?\n\tT = FluidObject & IFluidLoadable,\n> extends IProvideFluidHandle {\n\t/**\n\t * @deprecated Do not use handle's path for routing. Use `get` to get the underlying object.\n\t *\n\t * The absolute path to the handle context from the root.\n\t */\n\treadonly absolutePath: string;\n\n\t/**\n\t * Flag indicating whether or not the entity has services attached.\n\t */\n\treadonly isAttached: boolean;\n\n\t/**\n\t * Runs through the graph and attach the bounded handles.\n\t */\n\tattachGraph(): void;\n\n\t/**\n\t * Returns a promise to the Fluid Object referenced by the handle.\n\t */\n\tget(): Promise<T>;\n\n\t/**\n\t * Binds the given handle to this one or attach the given handle if this handle is attached.\n\t * A bound handle will also be attached once this handle is attached.\n\t */\n\tbind(handle: IFluidHandle): void;\n}\n"]}
package/lib/index.d.ts CHANGED
@@ -2,10 +2,9 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { IFluidObject } from "./fluidObject";
6
5
  export { IFluidLoadable, IProvideFluidLoadable, IFluidRunnable, IProvideFluidRunnable, } from "./fluidLoadable";
7
6
  export { IRequest, IRequestHeader, IResponse, IProvideFluidRouter, IFluidRouter, } from "./fluidRouter";
8
7
  export { IFluidHandleContext, IProvideFluidHandleContext, IFluidHandle, IProvideFluidHandle, } from "./handles";
9
8
  export { IFluidPackageEnvironment, IFluidPackage, isFluidPackage, IFluidCodeDetailsConfig, IFluidCodeDetails, isFluidCodeDetails, IFluidCodeDetailsComparer, IProvideFluidCodeDetailsComparer, } from "./fluidPackage";
10
- export { FluidObjectProviderKeys, FluidObject, FluidObjectKeys, } from "./provider";
9
+ export { FluidObjectProviderKeys, FluidObject, FluidObjectKeys } from "./provider";
11
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EACH,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,qBAAqB,GACxB,MAAM,iBAAiB,CAAC;AAKzB,OAAO,EACH,QAAQ,EACR,cAAc,EACd,SAAS,EACT,mBAAmB,EACnB,YAAY,GACf,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,mBAAmB,EACnB,0BAA0B,EAC1B,YAAY,EACZ,mBAAmB,GACtB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACH,wBAAwB,EACxB,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,EACzB,gCAAgC,GACnC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACH,uBAAuB,EACvB,WAAW,EACX,eAAe,GAClB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,qBAAqB,GACrB,MAAM,iBAAiB,CAAC;AAKzB,OAAO,EACN,QAAQ,EACR,cAAc,EACd,SAAS,EACT,mBAAmB,EACnB,YAAY,GACZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EACN,mBAAmB,EACnB,0BAA0B,EAC1B,YAAY,EACZ,mBAAmB,GACnB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACN,wBAAwB,EACxB,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,EACzB,gCAAgC,GAChC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EACH,cAAc,EAEd,cAAc,GAEjB,MAAM,iBAAiB,CAAC;AAEzB,+FAA+F;AAC/F,qDAAqD;AACrD,8EAA8E;AAC9E,OAAO,EAKH,YAAY,GACf,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,mBAAmB,EAEnB,YAAY,GAEf,MAAM,WAAW,CAAC;AAEnB,OAAO,EAGH,cAAc,EAGd,kBAAkB,EAClB,yBAAyB,GAE5B,MAAM,gBAAgB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// when merging declarations the module path must match exactly. Because of this we need to explicitly export\n// IFluidObject as opposed to an export *\nexport { IFluidObject } from \"./fluidObject\";\n\nexport {\n IFluidLoadable,\n IProvideFluidLoadable,\n IFluidRunnable,\n IProvideFluidRunnable,\n} from \"./fluidLoadable\";\n\n// Typescript forgets the index signature when customers augment IRequestHeader if we export *.\n// So we export the explicit members as a workaround:\n// https://github.com/microsoft/TypeScript/issues/18877#issuecomment-476921038\nexport {\n IRequest,\n IRequestHeader,\n IResponse,\n IProvideFluidRouter,\n IFluidRouter,\n} from \"./fluidRouter\";\n\nexport {\n IFluidHandleContext,\n IProvideFluidHandleContext,\n IFluidHandle,\n IProvideFluidHandle,\n} from \"./handles\";\n\nexport {\n IFluidPackageEnvironment,\n IFluidPackage,\n isFluidPackage,\n IFluidCodeDetailsConfig,\n IFluidCodeDetails,\n isFluidCodeDetails,\n IFluidCodeDetailsComparer,\n IProvideFluidCodeDetailsComparer,\n} from \"./fluidPackage\";\n\nexport {\n FluidObjectProviderKeys,\n FluidObject,\n FluidObjectKeys,\n} from \"./provider\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,cAAc,EAEd,cAAc,GAEd,MAAM,iBAAiB,CAAC;AAEzB,+FAA+F;AAC/F,qDAAqD;AACrD,8EAA8E;AAC9E,OAAO,EAKN,YAAY,GACZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EACN,mBAAmB,EAEnB,YAAY,GAEZ,MAAM,WAAW,CAAC;AAEnB,OAAO,EAGN,cAAc,EAGd,kBAAkB,EAClB,yBAAyB,GAEzB,MAAM,gBAAgB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tIFluidLoadable,\n\tIProvideFluidLoadable,\n\tIFluidRunnable,\n\tIProvideFluidRunnable,\n} from \"./fluidLoadable\";\n\n// Typescript forgets the index signature when customers augment IRequestHeader if we export *.\n// So we export the explicit members as a workaround:\n// https://github.com/microsoft/TypeScript/issues/18877#issuecomment-476921038\nexport {\n\tIRequest,\n\tIRequestHeader,\n\tIResponse,\n\tIProvideFluidRouter,\n\tIFluidRouter,\n} from \"./fluidRouter\";\n\nexport {\n\tIFluidHandleContext,\n\tIProvideFluidHandleContext,\n\tIFluidHandle,\n\tIProvideFluidHandle,\n} from \"./handles\";\n\nexport {\n\tIFluidPackageEnvironment,\n\tIFluidPackage,\n\tisFluidPackage,\n\tIFluidCodeDetailsConfig,\n\tIFluidCodeDetails,\n\tisFluidCodeDetails,\n\tIFluidCodeDetailsComparer,\n\tIProvideFluidCodeDetailsComparer,\n} from \"./fluidPackage\";\n\nexport { FluidObjectProviderKeys, FluidObject, FluidObjectKeys } from \"./provider\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,oBAAY,uBAAuB,CAAC,CAAC,EAAE,KAA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,CAAC,GAAG,OAAO,IAAI;KACrC,CAAC,IAAI,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;;;GAQG;AACH,oBAAY,eAAe,CAAC,CAAC,IAAI,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * This utility type is meant for internal use by {@link FluidObject}\n * Produces a valid FluidObject key given a type and a property.\n * A valid FluidObject key is a property that exists on the incoming type\n * as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`\n * This aligns with the FluidObject pattern expected to be used with all FluidObjects.\n *\n * @example\n * ```typescript\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n * This pattern enables discovery, and delegation in a standard way which is central\n * to FluidObject pattern\n *\n * @internal\n */\nexport type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> =\n string extends TProp ? never : number extends TProp? never : // exclude indexers [key:string |number]: any\n TProp extends keyof Required<T>[TProp] // TProp is a property of T, and T[TProp]\n ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] // T[TProp] is the same type as T[TProp][TProp]\n ? TProp\n : never\n : never;\n\n/**\n * This utility type take interface(s) that follow the FluidObject pattern, and produces\n * a new type that can be used for inspection and discovery of those interfaces.\n *\n * It is meant to be used with types that are known to implement the FluidObject pattern.\n * A common way to specify a type implements the FluidObject pattern is to expose it as a\n * FluidObject without a generic argument.\n *\n * @example\n * For example, if we have an interface like below\n * ```typescript\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n *\n * and a function that returns a FluidObject. You would do the following\n *\n * `const maybeFoo: FluidObject<IFoo> = getFluidObject()`;\n *\n * Either IFoo or IProvideFoo are valid generic arguments. In both case\n * maybeFoo will be of type `{IFoo?: IFoo}`. If IFoo is not undefined,\n * then the FluidObject provides IFoo, and it can be used.\n *\n * You can inspect multiple types via a intersection. For example:\n * `FluidObject<IFoo & IBar>`\n *\n */\nexport type FluidObject<T = unknown> = {\n [P in FluidObjectProviderKeys<T>]?: T[P];\n};\n\n/**\n * This utility type creates a type that is the union of all keys on the generic type\n * which implement the FluidObject pattern.\n *\n * See {@link FluidObject}\n *\n * For example `FluidObjectKeys<IFoo & IBar>` would result in `\"IFoo\" | \"IBar\"`\n *\n */\nexport type FluidObjectKeys<T> = keyof FluidObject<T>;\n"]}
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * This utility type is meant for internal use by {@link FluidObject}\n * Produces a valid FluidObject key given a type and a property.\n * A valid FluidObject key is a property that exists on the incoming type\n * as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`\n * This aligns with the FluidObject pattern expected to be used with all FluidObjects.\n *\n * @example\n * ```typescript\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n * This pattern enables discovery, and delegation in a standard way which is central\n * to FluidObject pattern\n *\n * @internal\n */\nexport type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp\n\t? never\n\t: number extends TProp\n\t? never // exclude indexers [key:string |number]: any\n\t: TProp extends keyof Required<T>[TProp] // TProp is a property of T, and T[TProp]\n\t? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] // T[TProp] is the same type as T[TProp][TProp]\n\t\t? TProp\n\t\t: never\n\t: never;\n\n/**\n * This utility type take interface(s) that follow the FluidObject pattern, and produces\n * a new type that can be used for inspection and discovery of those interfaces.\n *\n * It is meant to be used with types that are known to implement the FluidObject pattern.\n * A common way to specify a type implements the FluidObject pattern is to expose it as a\n * FluidObject without a generic argument.\n *\n * @example\n * For example, if we have an interface like below\n * ```typescript\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n *\n * and a function that returns a FluidObject. You would do the following\n *\n * `const maybeFoo: FluidObject<IFoo> = getFluidObject()`;\n *\n * Either IFoo or IProvideFoo are valid generic arguments. In both case\n * maybeFoo will be of type `{IFoo?: IFoo}`. If IFoo is not undefined,\n * then the FluidObject provides IFoo, and it can be used.\n *\n * You can inspect multiple types via a intersection. For example:\n * `FluidObject<IFoo & IBar>`\n *\n */\nexport type FluidObject<T = unknown> = {\n\t[P in FluidObjectProviderKeys<T>]?: T[P];\n};\n\n/**\n * This utility type creates a type that is the union of all keys on the generic type\n * which implement the FluidObject pattern.\n *\n * See {@link FluidObject}\n *\n * For example `FluidObjectKeys<IFoo & IBar>` would result in `\"IFoo\" | \"IBar\"`\n *\n */\nexport type FluidObjectKeys<T> = keyof FluidObject<T>;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/core-interfaces",
3
- "version": "2.0.0-dev.2.2.0.111723",
3
+ "version": "2.0.0-dev.3.1.0.125672",
4
4
  "description": "Fluid object interfaces",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -16,11 +16,13 @@
16
16
  "types": "dist/index.d.ts",
17
17
  "scripts": {
18
18
  "build": "concurrently npm:build:compile npm:lint && npm run build:docs",
19
- "build:compile": "concurrently npm:typetests:gen npm:tsc npm:build:esnext",
19
+ "build:commonjs": "npm run tsc && npm run typetests:gen && npm run build:test",
20
+ "build:compile": "concurrently npm:build:commonjs npm:build:esnext",
20
21
  "build:docs": "api-extractor run --local --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
21
22
  "build:esnext": "tsc --project ./tsconfig.esnext.json",
22
23
  "build:full": "npm run build",
23
24
  "build:full:compile": "npm run build:compile",
25
+ "build:test": "tsc --project ./src/test/tsconfig.json",
24
26
  "ci:build": "npm run build:compile",
25
27
  "ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
26
28
  "ci:test": "echo No test for this package",
@@ -29,8 +31,8 @@
29
31
  "eslint": "eslint --format stylish src",
30
32
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
31
33
  "format": "npm run prettier:fix",
32
- "lint": "npm run eslint",
33
- "lint:fix": "npm run eslint:fix",
34
+ "lint": "npm run prettier && npm run eslint",
35
+ "lint:fix": "npm run prettier:fix && npm run eslint:fix",
34
36
  "prettier": "prettier --check . --ignore-path ../../../.prettierignore",
35
37
  "prettier:fix": "prettier --write . --ignore-path ../../../.prettierignore",
36
38
  "tsc": "tsc",
@@ -39,14 +41,14 @@
39
41
  "typetests:prepare": "flub generate typetests --prepare --dir . --pin"
40
42
  },
41
43
  "devDependencies": {
42
- "@fluid-tools/build-cli": "^0.6.0-109663",
44
+ "@fluid-tools/build-cli": "^0.8.0",
43
45
  "@fluidframework/build-common": "^1.1.0",
44
- "@fluidframework/build-tools": "^0.6.0-109663",
45
- "@fluidframework/core-interfaces-previous": "npm:@fluidframework/core-interfaces@2.0.0-internal.2.1.0",
46
- "@fluidframework/eslint-config-fluid": "^1.2.0",
46
+ "@fluidframework/build-tools": "^0.8.0",
47
+ "@fluidframework/core-interfaces-previous": "npm:@fluidframework/core-interfaces@2.0.0-internal.3.0.0",
48
+ "@fluidframework/eslint-config-fluid": "^2.0.0",
47
49
  "@microsoft/api-extractor": "^7.22.2",
48
50
  "@rushstack/eslint-config": "^2.5.1",
49
- "@types/node": "^14.18.0",
51
+ "@types/node": "^14.18.36",
50
52
  "concurrently": "^6.2.0",
51
53
  "copyfiles": "^2.4.1",
52
54
  "eslint": "~8.6.0",
@@ -55,9 +57,10 @@
55
57
  "typescript": "~4.5.5"
56
58
  },
57
59
  "typeValidation": {
58
- "version": "2.0.0-internal.2.2.0",
59
- "baselineRange": ">=2.0.0-internal.2.1.0 <2.0.0-internal.2.2.0",
60
- "baselineVersion": "2.0.0-internal.2.1.0",
60
+ "version": "2.0.0-internal.3.1.0",
61
+ "previousVersionStyle": "~previousMinor",
62
+ "baselineRange": ">=2.0.0-internal.3.0.0 <2.0.0-internal.3.1.0",
63
+ "baselineVersion": "2.0.0-internal.3.0.0",
61
64
  "broken": {}
62
65
  }
63
66
  }
@@ -4,5 +4,5 @@
4
4
  */
5
5
 
6
6
  module.exports = {
7
- ...require("@fluidframework/build-common/prettier.config.cjs"),
7
+ ...require("@fluidframework/build-common/prettier.config.cjs"),
8
8
  };