@fluidframework/synthesize 0.54.2 → 0.56.0-49831
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IFluidDependencySynthesizer.d.ts +4 -32
- package/dist/IFluidDependencySynthesizer.d.ts.map +1 -1
- package/dist/IFluidDependencySynthesizer.js.map +1 -1
- package/dist/dependencyContainer.d.ts +15 -19
- package/dist/dependencyContainer.d.ts.map +1 -1
- package/dist/dependencyContainer.js +61 -63
- package/dist/dependencyContainer.js.map +1 -1
- package/dist/test/dependencyContainer.spec.js +49 -39
- package/dist/test/dependencyContainer.spec.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +54 -82
- package/dist/types.d.ts +9 -26
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/lib/IFluidDependencySynthesizer.js.map +1 -1
- package/lib/dependencyContainer.js +61 -63
- package/lib/dependencyContainer.js.map +1 -1
- package/lib/types.js.map +1 -1
- package/package.json +14 -15
|
@@ -2,33 +2,32 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
import { IFluidDependencySynthesizer, } from "./IFluidDependencySynthesizer";
|
|
5
6
|
/**
|
|
6
7
|
* DependencyContainer is similar to a IoC Container. It takes providers and will
|
|
7
8
|
* synthesize an object based on them when requested.
|
|
8
9
|
*/
|
|
9
10
|
export class DependencyContainer {
|
|
10
|
-
constructor(
|
|
11
|
-
this.parent = parent;
|
|
11
|
+
constructor(...parents) {
|
|
12
12
|
this.providers = new Map();
|
|
13
|
+
this.parents = parents.filter((v) => v !== undefined);
|
|
13
14
|
}
|
|
14
15
|
get IFluidDependencySynthesizer() { return this; }
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* {@inheritDoc (IFluidDependencySynthesizer:interface).register}
|
|
17
|
+
* Add a new provider
|
|
18
|
+
* @param type - Name of the Type T being provided
|
|
19
|
+
* @param provider - A provider that will resolve the T correctly when asked
|
|
20
|
+
* @throws - If passing a type that's already registered
|
|
23
21
|
*/
|
|
24
22
|
register(type, provider) {
|
|
25
|
-
if (this.has(type)) {
|
|
23
|
+
if (this.providers.has(type)) {
|
|
26
24
|
throw new Error(`Attempting to register a provider of type ${type} that already exists`);
|
|
27
25
|
}
|
|
28
26
|
this.providers.set(type, provider);
|
|
29
27
|
}
|
|
30
28
|
/**
|
|
31
|
-
*
|
|
29
|
+
* Remove a provider
|
|
30
|
+
* @param type - Name of the provider to remove
|
|
32
31
|
*/
|
|
33
32
|
unregister(type) {
|
|
34
33
|
if (this.providers.has(type)) {
|
|
@@ -39,77 +38,76 @@ export class DependencyContainer {
|
|
|
39
38
|
* {@inheritDoc (IFluidDependencySynthesizer:interface).synthesize}
|
|
40
39
|
*/
|
|
41
40
|
synthesize(optionalTypes, requiredTypes) {
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
const required = this.generateRequired(requiredTypes);
|
|
49
|
-
const optional = this.generateOptional(optionalTypes);
|
|
50
|
-
return Object.assign(Object.assign({}, required), optional);
|
|
41
|
+
const base = {};
|
|
42
|
+
this.generateRequired(base, requiredTypes);
|
|
43
|
+
this.generateOptional(base, optionalTypes);
|
|
44
|
+
Object.defineProperty(base, IFluidDependencySynthesizer, { get: () => this });
|
|
45
|
+
return base;
|
|
51
46
|
}
|
|
52
47
|
/**
|
|
53
48
|
* {@inheritDoc (IFluidDependencySynthesizer:interface).has}
|
|
49
|
+
* @param excludeParents - If true, exclude checking parent registries
|
|
54
50
|
*/
|
|
55
|
-
has(
|
|
56
|
-
|
|
57
|
-
return
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* {@inheritDoc (IFluidDependencySynthesizer:interface).getProvider}
|
|
62
|
-
*/
|
|
63
|
-
getProvider(type) {
|
|
64
|
-
// If we have the provider return it
|
|
65
|
-
const provider = this.providers.get(type);
|
|
66
|
-
if (provider) {
|
|
67
|
-
return provider;
|
|
51
|
+
has(type, excludeParents) {
|
|
52
|
+
if (this.providers.has(type)) {
|
|
53
|
+
return true;
|
|
68
54
|
}
|
|
69
|
-
if (
|
|
70
|
-
return this.
|
|
55
|
+
if (excludeParents !== true) {
|
|
56
|
+
return this.parents.some((p) => p.has(type));
|
|
71
57
|
}
|
|
72
|
-
return
|
|
58
|
+
return false;
|
|
73
59
|
}
|
|
74
|
-
generateRequired(types) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
60
|
+
generateRequired(base, types) {
|
|
61
|
+
if (types === undefined)
|
|
62
|
+
return;
|
|
63
|
+
for (const key of Object.keys(types)) {
|
|
64
|
+
const provider = this.resolveProvider(key);
|
|
65
|
+
if (provider === undefined) {
|
|
66
|
+
throw new Error(`Object attempted to be created without registered required provider ${key}`);
|
|
80
67
|
}
|
|
81
|
-
|
|
82
|
-
}
|
|
68
|
+
Object.defineProperty(base, key, provider);
|
|
69
|
+
}
|
|
83
70
|
}
|
|
84
|
-
generateOptional(types) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
return
|
|
92
|
-
|
|
71
|
+
generateOptional(base, types) {
|
|
72
|
+
var _a;
|
|
73
|
+
if (types === undefined)
|
|
74
|
+
return;
|
|
75
|
+
for (const key of Object.keys(types)) {
|
|
76
|
+
// back-compat: in 0.56 we allow undefined in the types, but we didn't before
|
|
77
|
+
// this will keep runtime back compat, eventually we should support undefined properties
|
|
78
|
+
// rather than properties that return promises that resolve to undefined
|
|
79
|
+
const provider = (_a = this.resolveProvider(key)) !== null && _a !== void 0 ? _a : { get: () => Promise.resolve(undefined) };
|
|
80
|
+
Object.defineProperty(base, key, provider);
|
|
81
|
+
}
|
|
93
82
|
}
|
|
94
|
-
resolveProvider(
|
|
83
|
+
resolveProvider(t) {
|
|
84
|
+
// If we have the provider return it
|
|
85
|
+
const provider = this.providers.get(t);
|
|
86
|
+
if (provider === undefined) {
|
|
87
|
+
for (const parent of this.parents) {
|
|
88
|
+
const sp = { [t]: t };
|
|
89
|
+
const syn = parent.synthesize(sp, {});
|
|
90
|
+
const descriptor = Object.getOwnPropertyDescriptor(syn, t);
|
|
91
|
+
if (descriptor !== undefined) {
|
|
92
|
+
return descriptor;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
95
97
|
// The double nested gets are required for lazy loading the provider resolution
|
|
96
98
|
if (typeof provider === "function") {
|
|
97
|
-
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
98
|
-
const self = this;
|
|
99
99
|
return {
|
|
100
|
-
get
|
|
100
|
+
get() {
|
|
101
101
|
if (provider && typeof provider === "function") {
|
|
102
|
-
return Promise.resolve(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
});
|
|
102
|
+
return Promise.resolve(this[IFluidDependencySynthesizer])
|
|
103
|
+
.then(async (fds) => provider(fds))
|
|
104
|
+
.then((p) => p === null || p === void 0 ? void 0 : p[t]);
|
|
107
105
|
}
|
|
108
106
|
},
|
|
109
107
|
};
|
|
110
108
|
}
|
|
111
109
|
return {
|
|
112
|
-
get
|
|
110
|
+
get() {
|
|
113
111
|
if (provider) {
|
|
114
112
|
return Promise.resolve(provider).then((p) => {
|
|
115
113
|
if (p) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependencyContainer.js","sourceRoot":"","sources":["../src/dependencyContainer.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"dependencyContainer.js","sourceRoot":"","sources":["../src/dependencyContainer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EACH,2BAA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poration and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n AsyncFluidObjectProvider,\n FluidObjectSymbolProvider,\n FluidObjectProvider,\n AsyncOptionalFluidObjectProvider,\n AsyncRequiredFluidObjectProvider,\n} from \"./types\";\nimport {\n IFluidDependencySynthesizer,\n} from \"./IFluidDependencySynthesizer\";\n\n/**\n * DependencyContainer is similar to a IoC Container. It takes providers and will\n * synthesize an object based on them when requested.\n */\nexport class DependencyContainer<TMap> implements IFluidDependencySynthesizer {\n private readonly providers = new Map<keyof TMap, FluidObjectProvider<any>>();\n private readonly parents: IFluidDependencySynthesizer[];\n public get IFluidDependencySynthesizer() { return this; }\n\n public constructor(... parents: (IFluidDependencySynthesizer | undefined)[]) {\n this.parents = parents.filter((v): v is IFluidDependencySynthesizer => v !== undefined);\n }\n\n /**\n * Add a new provider\n * @param type - Name of the Type T being provided\n * @param provider - A provider that will resolve the T correctly when asked\n * @throws - If passing a type that's already registered\n */\n public register<T extends keyof TMap = keyof TMap>(type: T, provider: FluidObjectProvider<Pick<TMap, T>>): void {\n if (this.providers.has(type)) {\n throw new Error(`Attempting to register a provider of type ${type} that already exists`);\n }\n\n this.providers.set(type, provider);\n }\n\n /**\n * Remove a provider\n * @param type - Name of the provider to remove\n */\n public unregister(type: keyof TMap): void {\n if (this.providers.has(type)) {\n this.providers.delete(type);\n }\n }\n\n /**\n * {@inheritDoc (IFluidDependencySynthesizer:interface).synthesize}\n */\n public synthesize<O, R = undefined | Record<string, never>>(\n optionalTypes: FluidObjectSymbolProvider<O>,\n requiredTypes: Required<FluidObjectSymbolProvider<R>>,\n ): AsyncFluidObjectProvider<O, R> {\n const base: AsyncFluidObjectProvider<O, R> = {} as any;\n this.generateRequired<R>(base, requiredTypes);\n this.generateOptional<O>(base, optionalTypes);\n Object.defineProperty(base, IFluidDependencySynthesizer, { get: () => this });\n return base;\n }\n\n /**\n * {@inheritDoc (IFluidDependencySynthesizer:interface).has}\n * @param excludeParents - If true, exclude checking parent registries\n */\n public has(type: string, excludeParents?: boolean): boolean {\n if (this.providers.has(type as keyof TMap)) {\n return true;\n }\n if (excludeParents !== true) {\n return this.parents.some((p: IFluidDependencySynthesizer) => p.has(type));\n }\n return false;\n }\n\n private generateRequired<T>(\n base: AsyncRequiredFluidObjectProvider<T>,\n types: Required<FluidObjectSymbolProvider<T>>,\n ) {\n if(types === undefined) return;\n for(const key of Object.keys(types) as unknown as (keyof TMap)[]) {\n const provider = this.resolveProvider(key);\n if(provider === undefined) {\n throw new Error(`Object attempted to be created without registered required provider ${key}`);\n }\n Object.defineProperty(\n base,\n key,\n provider,\n );\n }\n }\n\n private generateOptional<T>(\n base: AsyncOptionalFluidObjectProvider<T>,\n types: FluidObjectSymbolProvider<T>,\n ) {\n if(types === undefined) return;\n for(const key of Object.keys(types) as unknown as (keyof TMap)[]) {\n // back-compat: in 0.56 we allow undefined in the types, but we didn't before\n // this will keep runtime back compat, eventually we should support undefined properties\n // rather than properties that return promises that resolve to undefined\n const provider = this.resolveProvider(key) ?? {get:()=>Promise.resolve(undefined)};\n Object.defineProperty(\n base,\n key,\n provider,\n );\n }\n }\n\n private resolveProvider<T extends keyof TMap>(t: T): PropertyDescriptor | undefined {\n // If we have the provider return it\n const provider = this.providers.get(t);\n if (provider === undefined) {\n for(const parent of this.parents) {\n const sp = { [t]: t } as FluidObjectSymbolProvider<Pick<TMap, T>>;\n const syn = parent.synthesize<Pick<TMap, T>,{}>(\n sp,\n {});\n const descriptor = Object.getOwnPropertyDescriptor(syn, t);\n if (descriptor !== undefined) {\n return descriptor;\n }\n }\n return undefined;\n }\n\n // The double nested gets are required for lazy loading the provider resolution\n if (typeof provider === \"function\") {\n return {\n get() {\n if (provider && typeof provider === \"function\") {\n return Promise.resolve(this[IFluidDependencySynthesizer])\n .then(async (fds): Promise<any> => provider(fds))\n .then((p) => p?.[t]);\n }\n },\n };\n }\n return {\n get() {\n if (provider) {\n return Promise.resolve(provider).then((p) => {\n if (p) {\n return p[t];\n }\n });\n }\n },\n };\n }\n}\n"]}
|
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport {
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { IFluidDependencySynthesizer } from \".\";\n/**\n * This is a condensed version of Record that requires the object has all\n * the IFluidObject properties as its type mapped to a string representation\n * of that property.\n *\n * @example - \\{ IFoo: \"IFoo\" \\}\n */\nexport type FluidObjectSymbolProvider<T> = {\n [P in keyof T]?: P;\n};\n\n/**\n * This is a condensed version of Record that requires the object has all\n * the IFluidObject properties as its type mapped to an object that implements\n * the property.\n */\nexport type AsyncRequiredFluidObjectProvider<T> = T extends undefined ? Record<string, never> : {\n [P in keyof T]: Promise<NonNullable<Exclude<T[P], undefined | null>>>\n};\n\n/**\n * This is a condensed version of Record that requires the object has all\n * the IFluidObject properties as its type, mapped to an object that implements\n * the property or undefined.\n */\nexport type AsyncOptionalFluidObjectProvider<T> = T extends undefined\n ? Record<string, never>\n : {\n [P in keyof T]?: Promise<T[P] | undefined>;\n };\n\n/**\n * Combined type for Optional and Required Async Fluid object Providers\n */\nexport type AsyncFluidObjectProvider<O, R = undefined>\n = AsyncOptionalFluidObjectProvider<O> & AsyncRequiredFluidObjectProvider<R>;\n\n/**\n * Multiple ways to provide a Fluid object.\n */\nexport type FluidObjectProvider<T> =\n NonNullable<T>\n | Promise<NonNullable<T>>\n | ((dependencyContainer: IFluidDependencySynthesizer) => NonNullable<T>)\n | ((dependencyContainer: IFluidDependencySynthesizer) => Promise<NonNullable<T>>);"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/synthesize",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.0-49831",
|
|
4
4
|
"description": "A library for synthesizing scope objects.",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": "https://github.com/microsoft/FluidFramework",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/* ../../../_api-extractor-temp/",
|
|
27
27
|
"clean": "rimraf dist lib *.tsbuildinfo *.build.log",
|
|
28
28
|
"eslint": "eslint --format stylish src",
|
|
29
|
-
"eslint:fix": "eslint --format stylish src --fix",
|
|
29
|
+
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
30
30
|
"lint": "npm run eslint",
|
|
31
31
|
"lint:fix": "npm run eslint:fix",
|
|
32
32
|
"test": "npm run test:mocha",
|
|
@@ -57,29 +57,28 @@
|
|
|
57
57
|
],
|
|
58
58
|
"temp-directory": "nyc/.nyc_output"
|
|
59
59
|
},
|
|
60
|
-
"dependencies": {
|
|
61
|
-
"@fluidframework/core-interfaces": "^0.41.0"
|
|
62
|
-
},
|
|
63
60
|
"devDependencies": {
|
|
64
61
|
"@fluidframework/build-common": "^0.23.0",
|
|
65
|
-
"@fluidframework/
|
|
66
|
-
"@fluidframework/
|
|
67
|
-
"@fluidframework/
|
|
62
|
+
"@fluidframework/core-interfaces": "^0.42.0-0",
|
|
63
|
+
"@fluidframework/datastore": "0.56.0-49831",
|
|
64
|
+
"@fluidframework/eslint-config-fluid": "^0.25.0",
|
|
65
|
+
"@fluidframework/mocha-test-setup": "0.56.0-49831",
|
|
68
66
|
"@microsoft/api-extractor": "^7.16.1",
|
|
67
|
+
"@rushstack/eslint-config": "^2.5.1",
|
|
69
68
|
"@types/mocha": "^8.2.2",
|
|
70
69
|
"@types/node": "^14.18.0",
|
|
71
|
-
"@typescript-eslint/eslint-plugin": "~
|
|
72
|
-
"@typescript-eslint/parser": "~
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "~5.9.0",
|
|
71
|
+
"@typescript-eslint/parser": "~5.9.0",
|
|
73
72
|
"concurrently": "^6.2.0",
|
|
74
73
|
"copyfiles": "^2.1.0",
|
|
75
74
|
"cross-env": "^7.0.2",
|
|
76
|
-
"eslint": "~
|
|
75
|
+
"eslint": "~8.6.0",
|
|
76
|
+
"eslint-plugin-editorconfig": "~3.2.0",
|
|
77
77
|
"eslint-plugin-eslint-comments": "~3.2.0",
|
|
78
|
-
"eslint-plugin-import": "~2.
|
|
78
|
+
"eslint-plugin-import": "~2.25.4",
|
|
79
79
|
"eslint-plugin-no-null": "~1.0.2",
|
|
80
|
-
"eslint-plugin-
|
|
81
|
-
"eslint-plugin-
|
|
82
|
-
"eslint-plugin-unicorn": "~26.0.1",
|
|
80
|
+
"eslint-plugin-react": "~7.28.0",
|
|
81
|
+
"eslint-plugin-unicorn": "~40.0.0",
|
|
83
82
|
"mocha": "^8.4.0",
|
|
84
83
|
"nyc": "^15.0.0",
|
|
85
84
|
"rimraf": "^2.6.2",
|