@fluidframework/synthesize 0.58.3000-61081 → 0.59.1001-62246
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/dependencyContainer.js +1 -1
- package/dist/dependencyContainer.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +54 -116
- package/dist/test/types/validateSynthesizePrevious.js.map +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/types.js.map +1 -1
- package/lib/dependencyContainer.js +1 -1
- package/lib/dependencyContainer.js.map +1 -1
- package/lib/types.js.map +1 -1
- package/package.json +7 -7
|
@@ -65,7 +65,7 @@ class DependencyContainer {
|
|
|
65
65
|
*/
|
|
66
66
|
getProvider(provider) {
|
|
67
67
|
// this was removed, but some partners have trouble with back compat where they
|
|
68
|
-
// use invalid patterns with
|
|
68
|
+
// use invalid patterns with FluidObject and IFluidDependencySynthesizer
|
|
69
69
|
// this is just for back compat until those are removed
|
|
70
70
|
if (this.has(provider)) {
|
|
71
71
|
if (this.providers.has(provider)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependencyContainer.js","sourceRoot":"","sources":["../src/dependencyContainer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,+EAEuC;AAEvC;;;GAGG;AACH,MAAa,mBAAmB;IAK5B,YAAmB,GAAI,OAAoD;QAJ1D,cAAS,GAAG,IAAI,GAAG,EAAwC,CAAC;QAKzE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAoC,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;IAC5F,CAAC;IAJD,IAAW,2BAA2B,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC;IAMzD;;;;;OAKG;IACI,QAAQ,CAAoC,IAAO,EAAE,QAA4C;QACpG,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,6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AC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;wBACxC,IAAI,CAAC,EAAE;4BACH,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;yBACf;oBACL,CAAC,CAAC,CAAC;iBACN;YACL,CAAC;SACJ,CAAC;IACV,CAAC;CACJ;AAnKD,kDAmKC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation 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 * @deprecated - Needed for back compat\n */\n private getProvider(provider: string & keyof TMap) {\n // this was removed, but some partners have trouble with back compat where they\n // use invalid patterns with IFluidObject and IFluidDependencySynthesizer\n // this is just for back compat until those are removed\n if(this.has(provider)) {\n if(this.providers.has(provider)) {\n return this.providers.get(provider);\n }\n for(const parent of this.parents) {\n if(parent instanceof DependencyContainer) {\n return parent.getProvider(provider);\n }else{\n // older implementations of the IFluidDependencySynthesizer exposed getProvider\n const maybeGetProvider: {getProvider?(provider: string & keyof TMap)} = parent as any;\n if(maybeGetProvider?.getProvider !== undefined) {\n return maybeGetProvider.getProvider(provider);\n }\n }\n }\n }\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: async () => 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 // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const sp = { [t]: t } as FluidObjectSymbolProvider<Pick<TMap, T>>;\n const syn = parent.synthesize<Pick<TMap, T>, Record<string, unknown>>(\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"]}
|
|
1
|
+
{"version":3,"file":"dependencyContainer.js","sourceRoot":"","sources":["../src/dependencyContainer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,+EAEuC;AAEvC;;;GAGG;AACH,MAAa,mBAAmB;IAK5B,YAAmB,GAAI,OAAoD;QAJ1D,cAAS,GAAG,IAAI,GAAG,EAAwC,CAAC;QAKzE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAoC,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;IAC5F,CAAC;IAJD,IAAW,2BAA2B,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC;IAMzD;;;;;OAKG;IACI,QAAQ,CAAoC,IAAO,EAAE,QAA4C;QACpG,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAC1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OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;wBACxC,IAAI,CAAC,EAAE;4BACH,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;yBACf;oBACL,CAAC,CAAC,CAAC;iBACN;YACL,CAAC;SACJ,CAAC;IACV,CAAC;CACJ;AAnKD,kDAmKC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation 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 * @deprecated - Needed for back compat\n */\n private getProvider(provider: string & keyof TMap) {\n // this was removed, but some partners have trouble with back compat where they\n // use invalid patterns with FluidObject and IFluidDependencySynthesizer\n // this is just for back compat until those are removed\n if(this.has(provider)) {\n if(this.providers.has(provider)) {\n return this.providers.get(provider);\n }\n for(const parent of this.parents) {\n if(parent instanceof DependencyContainer) {\n return parent.getProvider(provider);\n }else{\n // older implementations of the IFluidDependencySynthesizer exposed getProvider\n const maybeGetProvider: {getProvider?(provider: string & keyof TMap)} = parent as any;\n if(maybeGetProvider?.getProvider !== undefined) {\n return maybeGetProvider.getProvider(provider);\n }\n }\n }\n }\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: async () => 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 // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const sp = { [t]: t } as FluidObjectSymbolProvider<Pick<TMap, T>>;\n const syn = parent.synthesize<Pick<TMap, T>, Record<string, unknown>>(\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"]}
|
|
@@ -152,18 +152,18 @@
|
|
|
152
152
|
"affectsGlobalScope": false
|
|
153
153
|
},
|
|
154
154
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/provider.d.ts": {
|
|
155
|
-
"version": "
|
|
156
|
-
"signature": "
|
|
155
|
+
"version": "ffe2fe2824ad18643c67bdea603c0b13ce0b8e03fcedd7e830c3621e7495b8e4",
|
|
156
|
+
"signature": "ffe2fe2824ad18643c67bdea603c0b13ce0b8e03fcedd7e830c3621e7495b8e4",
|
|
157
157
|
"affectsGlobalScope": false
|
|
158
158
|
},
|
|
159
159
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/handles.d.ts": {
|
|
160
|
-
"version": "
|
|
161
|
-
"signature": "
|
|
160
|
+
"version": "008b0f774aa53fadf66f518d63e53df8a1bb6389908ac361895f3acae06159df",
|
|
161
|
+
"signature": "008b0f774aa53fadf66f518d63e53df8a1bb6389908ac361895f3acae06159df",
|
|
162
162
|
"affectsGlobalScope": false
|
|
163
163
|
},
|
|
164
164
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/fluidLoadable.d.ts": {
|
|
165
|
-
"version": "
|
|
166
|
-
"signature": "
|
|
165
|
+
"version": "8692a1ed3a979fa000b62e01f8d33cf940e030b7af50945176428f9cdd4dca80",
|
|
166
|
+
"signature": "8692a1ed3a979fa000b62e01f8d33cf940e030b7af50945176428f9cdd4dca80",
|
|
167
167
|
"affectsGlobalScope": false
|
|
168
168
|
},
|
|
169
169
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/serializer.d.ts": {
|
|
@@ -172,8 +172,8 @@
|
|
|
172
172
|
"affectsGlobalScope": false
|
|
173
173
|
},
|
|
174
174
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/fluidObject.d.ts": {
|
|
175
|
-
"version": "
|
|
176
|
-
"signature": "
|
|
175
|
+
"version": "4de717c31e6a926ab75d60b15881fcb86eedfe4c86a10ecc7bcbb132b704ec25",
|
|
176
|
+
"signature": "4de717c31e6a926ab75d60b15881fcb86eedfe4c86a10ecc7bcbb132b704ec25",
|
|
177
177
|
"affectsGlobalScope": false
|
|
178
178
|
},
|
|
179
179
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/fluidPackage.d.ts": {
|
|
@@ -457,8 +457,8 @@
|
|
|
457
457
|
"affectsGlobalScope": false
|
|
458
458
|
},
|
|
459
459
|
"../../../../../node_modules/@fluidframework/protocol-definitions/dist/storage.d.ts": {
|
|
460
|
-
"version": "
|
|
461
|
-
"signature": "
|
|
460
|
+
"version": "400b71c3fd22577b532c14206b3e39f1cd13d7222e12a23f18253b1a8a573efc",
|
|
461
|
+
"signature": "400b71c3fd22577b532c14206b3e39f1cd13d7222e12a23f18253b1a8a573efc",
|
|
462
462
|
"affectsGlobalScope": false
|
|
463
463
|
},
|
|
464
464
|
"../../../../../node_modules/@fluidframework/protocol-definitions/dist/summary.d.ts": {
|
|
@@ -491,27 +491,32 @@
|
|
|
491
491
|
"signature": "383dced3ebba2967eeab64d0b7facd4529fe3ed2c352744f3f6c1988482206d4",
|
|
492
492
|
"affectsGlobalScope": false
|
|
493
493
|
},
|
|
494
|
+
"../../../../../node_modules/@fluidframework/container-definitions/dist/fluidPackage.d.ts": {
|
|
495
|
+
"version": "29af84fd868f666a8d2b0766b188faed869babeb3da5c556fc1151cc4e1e5153",
|
|
496
|
+
"signature": "29af84fd868f666a8d2b0766b188faed869babeb3da5c556fc1151cc4e1e5153",
|
|
497
|
+
"affectsGlobalScope": false
|
|
498
|
+
},
|
|
494
499
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/browserPackage.d.ts": {
|
|
495
|
-
"version": "
|
|
496
|
-
"signature": "
|
|
500
|
+
"version": "5a6da0fe8e8896c8f05057396d825d36506a1527de189150cf4d8dea3e794239",
|
|
501
|
+
"signature": "5a6da0fe8e8896c8f05057396d825d36506a1527de189150cf4d8dea3e794239",
|
|
497
502
|
"affectsGlobalScope": false
|
|
498
503
|
},
|
|
499
|
-
"../../../../../node_modules/@fluidframework/
|
|
504
|
+
"../../../../../node_modules/@fluidframework/driver-definitions/dist/driverError.d.ts": {
|
|
500
505
|
"version": "9c35bf4f305ed653f657ebe97ced739b0778fab04b76268d4adcac72f279b242",
|
|
501
506
|
"signature": "9c35bf4f305ed653f657ebe97ced739b0778fab04b76268d4adcac72f279b242",
|
|
502
507
|
"affectsGlobalScope": false
|
|
503
508
|
},
|
|
504
|
-
"../../../../../node_modules/@fluidframework/
|
|
505
|
-
"version": "
|
|
506
|
-
"signature": "
|
|
509
|
+
"../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts": {
|
|
510
|
+
"version": "f46c512d895fa0c08acafd325c94189005255d382e4375b15d0274a107526b7f",
|
|
511
|
+
"signature": "f46c512d895fa0c08acafd325c94189005255d382e4375b15d0274a107526b7f",
|
|
507
512
|
"affectsGlobalScope": false
|
|
508
513
|
},
|
|
509
|
-
"../../../../../node_modules/@fluidframework/
|
|
510
|
-
"version": "
|
|
511
|
-
"signature": "
|
|
514
|
+
"../../../../../node_modules/@fluidframework/driver-definitions/dist/storage.d.ts": {
|
|
515
|
+
"version": "23333bf4703c216fc9707c31b1c80d913f0dcbb66b2603011a399c5bc517cc84",
|
|
516
|
+
"signature": "23333bf4703c216fc9707c31b1c80d913f0dcbb66b2603011a399c5bc517cc84",
|
|
512
517
|
"affectsGlobalScope": false
|
|
513
518
|
},
|
|
514
|
-
"../../../../../node_modules/@fluidframework/
|
|
519
|
+
"../../../../../node_modules/@fluidframework/driver-definitions/dist/index.d.ts": {
|
|
515
520
|
"version": "db393dd65f2c615ff4ad4078bc1a2660b53f18ac0b27dbee9e11a00c129feab1",
|
|
516
521
|
"signature": "db393dd65f2c615ff4ad4078bc1a2660b53f18ac0b27dbee9e11a00c129feab1",
|
|
517
522
|
"affectsGlobalScope": false
|
|
@@ -527,18 +532,18 @@
|
|
|
527
532
|
"affectsGlobalScope": false
|
|
528
533
|
},
|
|
529
534
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/fluidModule.d.ts": {
|
|
530
|
-
"version": "
|
|
531
|
-
"signature": "
|
|
535
|
+
"version": "8023ac345236d4f16563d8dee36b7db6a3b58d2d478c2de674cbd70ce0249737",
|
|
536
|
+
"signature": "8023ac345236d4f16563d8dee36b7db6a3b58d2d478c2de674cbd70ce0249737",
|
|
532
537
|
"affectsGlobalScope": false
|
|
533
538
|
},
|
|
534
539
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts": {
|
|
535
|
-
"version": "
|
|
536
|
-
"signature": "
|
|
540
|
+
"version": "dbf77f0154be728232944a67288f6908c748de6fe160e074b048e0579f3d4900",
|
|
541
|
+
"signature": "dbf77f0154be728232944a67288f6908c748de6fe160e074b048e0579f3d4900",
|
|
537
542
|
"affectsGlobalScope": false
|
|
538
543
|
},
|
|
539
544
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/runtime.d.ts": {
|
|
540
|
-
"version": "
|
|
541
|
-
"signature": "
|
|
545
|
+
"version": "597fef4eabc67556e36afaefae4d924153cd3dace784f44529891dffda5abe7e",
|
|
546
|
+
"signature": "597fef4eabc67556e36afaefae4d924153cd3dace784f44529891dffda5abe7e",
|
|
542
547
|
"affectsGlobalScope": false
|
|
543
548
|
},
|
|
544
549
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/index.d.ts": {
|
|
@@ -546,11 +551,6 @@
|
|
|
546
551
|
"signature": "419d3554e67aed44fbad75878a168ec530032ea11a2572c769e98d15b91cad81",
|
|
547
552
|
"affectsGlobalScope": false
|
|
548
553
|
},
|
|
549
|
-
"../../../../../node_modules/@fluidframework/container-definitions/dist/fluidPackage.d.ts": {
|
|
550
|
-
"version": "29af84fd868f666a8d2b0766b188faed869babeb3da5c556fc1151cc4e1e5153",
|
|
551
|
-
"signature": "29af84fd868f666a8d2b0766b188faed869babeb3da5c556fc1151cc4e1e5153",
|
|
552
|
-
"affectsGlobalScope": false
|
|
553
|
-
},
|
|
554
554
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/proxyLoader.d.ts": {
|
|
555
555
|
"version": "0ee40e5e446be73c62334a574d628dac014b292699bca2527d2abb99b8e31bf9",
|
|
556
556
|
"signature": "0ee40e5e446be73c62334a574d628dac014b292699bca2527d2abb99b8e31bf9",
|
|
@@ -686,26 +686,6 @@
|
|
|
686
686
|
"signature": "f8eb054ed71a693219fa8c4ecd08272a72dadf73ab82ec9a73b365662f16775c",
|
|
687
687
|
"affectsGlobalScope": false
|
|
688
688
|
},
|
|
689
|
-
"../../../../../node_modules/@fluidframework/driver-definitions/dist/driverError.d.ts": {
|
|
690
|
-
"version": "9c35bf4f305ed653f657ebe97ced739b0778fab04b76268d4adcac72f279b242",
|
|
691
|
-
"signature": "9c35bf4f305ed653f657ebe97ced739b0778fab04b76268d4adcac72f279b242",
|
|
692
|
-
"affectsGlobalScope": false
|
|
693
|
-
},
|
|
694
|
-
"../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts": {
|
|
695
|
-
"version": "fb75519ad714b609817f371b9e3fca4f02e2302d50bb84a3e8e9ba6ba233ce3d",
|
|
696
|
-
"signature": "fb75519ad714b609817f371b9e3fca4f02e2302d50bb84a3e8e9ba6ba233ce3d",
|
|
697
|
-
"affectsGlobalScope": false
|
|
698
|
-
},
|
|
699
|
-
"../../../../../node_modules/@fluidframework/driver-definitions/dist/storage.d.ts": {
|
|
700
|
-
"version": "23333bf4703c216fc9707c31b1c80d913f0dcbb66b2603011a399c5bc517cc84",
|
|
701
|
-
"signature": "23333bf4703c216fc9707c31b1c80d913f0dcbb66b2603011a399c5bc517cc84",
|
|
702
|
-
"affectsGlobalScope": false
|
|
703
|
-
},
|
|
704
|
-
"../../../../../node_modules/@fluidframework/driver-definitions/dist/index.d.ts": {
|
|
705
|
-
"version": "db393dd65f2c615ff4ad4078bc1a2660b53f18ac0b27dbee9e11a00c129feab1",
|
|
706
|
-
"signature": "db393dd65f2c615ff4ad4078bc1a2660b53f18ac0b27dbee9e11a00c129feab1",
|
|
707
|
-
"affectsGlobalScope": false
|
|
708
|
-
},
|
|
709
689
|
"../../../../runtime/runtime-definitions/dist/dataStoreRegistry.d.ts": {
|
|
710
690
|
"version": "eff90c8fb7521204ef889ea0684748a7ff8a1b62a7e0cc23ace822a96d1bff44",
|
|
711
691
|
"signature": "eff90c8fb7521204ef889ea0684748a7ff8a1b62a7e0cc23ace822a96d1bff44",
|
|
@@ -727,8 +707,8 @@
|
|
|
727
707
|
"affectsGlobalScope": false
|
|
728
708
|
},
|
|
729
709
|
"../../../../runtime/runtime-definitions/dist/dataStoreContext.d.ts": {
|
|
730
|
-
"version": "
|
|
731
|
-
"signature": "
|
|
710
|
+
"version": "2137a49910486c5f9a6a028bc19d2afbbfc147885e46ebcb434d1ecb24983821",
|
|
711
|
+
"signature": "2137a49910486c5f9a6a028bc19d2afbbfc147885e46ebcb434d1ecb24983821",
|
|
732
712
|
"affectsGlobalScope": false
|
|
733
713
|
},
|
|
734
714
|
"../../../../runtime/runtime-definitions/dist/dataStoreFactory.d.ts": {
|
|
@@ -772,13 +752,13 @@
|
|
|
772
752
|
"affectsGlobalScope": false
|
|
773
753
|
},
|
|
774
754
|
"../../../../runtime/datastore/dist/dataStoreRuntime.d.ts": {
|
|
775
|
-
"version": "
|
|
776
|
-
"signature": "
|
|
755
|
+
"version": "0161b59129dab096029007e9bb4eb287d6aafe5131943bd99ffbe942df0cb312",
|
|
756
|
+
"signature": "0161b59129dab096029007e9bb4eb287d6aafe5131943bd99ffbe942df0cb312",
|
|
777
757
|
"affectsGlobalScope": false
|
|
778
758
|
},
|
|
779
759
|
"../../../../runtime/datastore/dist/fluidHandle.d.ts": {
|
|
780
|
-
"version": "
|
|
781
|
-
"signature": "
|
|
760
|
+
"version": "fa2391e2793c9deed82cbdc69ca6ec910498b73d02aefd1fbce7080a69ec3eef",
|
|
761
|
+
"signature": "fa2391e2793c9deed82cbdc69ca6ec910498b73d02aefd1fbce7080a69ec3eef",
|
|
782
762
|
"affectsGlobalScope": false
|
|
783
763
|
},
|
|
784
764
|
"../../../../runtime/datastore/dist/index.d.ts": {
|
|
@@ -787,8 +767,8 @@
|
|
|
787
767
|
"affectsGlobalScope": false
|
|
788
768
|
},
|
|
789
769
|
"../types.d.ts": {
|
|
790
|
-
"version": "
|
|
791
|
-
"signature": "
|
|
770
|
+
"version": "0019f06f88e66fa5371d8eebb0e81dc749e54a8f65f8ec9b59760c77e759e46e",
|
|
771
|
+
"signature": "0019f06f88e66fa5371d8eebb0e81dc749e54a8f65f8ec9b59760c77e759e46e",
|
|
792
772
|
"affectsGlobalScope": false
|
|
793
773
|
},
|
|
794
774
|
"../IFluidDependencySynthesizer.d.ts": {
|
|
@@ -832,7 +812,7 @@
|
|
|
832
812
|
"affectsGlobalScope": false
|
|
833
813
|
},
|
|
834
814
|
"../../src/test/types/validateSynthesizePrevious.ts": {
|
|
835
|
-
"version": "
|
|
815
|
+
"version": "a468afb6b7ceb12b0f43c2c7ec6b299188f150e68e1c3f9f24dacf7418502bf6",
|
|
836
816
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
837
817
|
"affectsGlobalScope": false
|
|
838
818
|
},
|
|
@@ -932,13 +912,12 @@
|
|
|
932
912
|
"../../../../../node_modules/@types/node/index.d.ts"
|
|
933
913
|
],
|
|
934
914
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/browserPackage.d.ts": [
|
|
935
|
-
"../../../../../node_modules/@fluidframework/
|
|
915
|
+
"../../../../../node_modules/@fluidframework/container-definitions/dist/fluidPackage.d.ts"
|
|
936
916
|
],
|
|
937
917
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts": [
|
|
938
918
|
"../../../../../node_modules/@fluidframework/common-definitions/dist/index.d.ts",
|
|
939
919
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/index.d.ts",
|
|
940
920
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
|
|
941
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
|
|
942
921
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
|
|
943
922
|
"../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
|
|
944
923
|
"../../../../../node_modules/@fluidframework/protocol-definitions/dist/index.d.ts"
|
|
@@ -947,6 +926,7 @@
|
|
|
947
926
|
"../../../../../node_modules/@fluidframework/common-definitions/dist/index.d.ts"
|
|
948
927
|
],
|
|
949
928
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/fluidModule.d.ts": [
|
|
929
|
+
"../../../../../node_modules/@fluidframework/container-definitions/dist/fluidPackage.d.ts",
|
|
950
930
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/runtime.d.ts",
|
|
951
931
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts"
|
|
952
932
|
],
|
|
@@ -966,7 +946,6 @@
|
|
|
966
946
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
|
|
967
947
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
|
|
968
948
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/runtime.d.ts",
|
|
969
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
|
|
970
949
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
|
|
971
950
|
"../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts"
|
|
972
951
|
],
|
|
@@ -976,45 +955,29 @@
|
|
|
976
955
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
|
|
977
956
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/error.d.ts",
|
|
978
957
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/fluidModule.d.ts",
|
|
958
|
+
"../../../../../node_modules/@fluidframework/container-definitions/dist/fluidPackage.d.ts",
|
|
979
959
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/index.d.ts",
|
|
980
960
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/runtime.d.ts",
|
|
981
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/index.d.ts",
|
|
982
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
|
|
983
961
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
|
|
962
|
+
"../../../../../node_modules/@fluidframework/driver-definitions/dist/index.d.ts",
|
|
984
963
|
"../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
|
|
985
964
|
"../../../../../node_modules/@fluidframework/protocol-definitions/dist/index.d.ts"
|
|
986
965
|
],
|
|
987
966
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/proxyLoader.d.ts": [
|
|
988
967
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
|
|
989
|
-
"../../../../../node_modules/@fluidframework/
|
|
968
|
+
"../../../../../node_modules/@fluidframework/driver-definitions/dist/index.d.ts"
|
|
990
969
|
],
|
|
991
970
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/runtime.d.ts": [
|
|
992
971
|
"../../../../../node_modules/@fluidframework/common-definitions/dist/index.d.ts",
|
|
993
972
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/audience.d.ts",
|
|
994
973
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
|
|
995
974
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/error.d.ts",
|
|
975
|
+
"../../../../../node_modules/@fluidframework/container-definitions/dist/fluidPackage.d.ts",
|
|
996
976
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
|
|
997
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/index.d.ts",
|
|
998
977
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
|
|
978
|
+
"../../../../../node_modules/@fluidframework/driver-definitions/dist/index.d.ts",
|
|
999
979
|
"../../../../../node_modules/@fluidframework/protocol-definitions/dist/index.d.ts"
|
|
1000
980
|
],
|
|
1001
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/index.d.ts": [
|
|
1002
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/driverError.d.ts",
|
|
1003
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/storage.d.ts",
|
|
1004
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts"
|
|
1005
|
-
],
|
|
1006
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/storage.d.ts": [
|
|
1007
|
-
"../../../../../node_modules/@fluidframework/common-definitions/dist/index.d.ts",
|
|
1008
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
|
|
1009
|
-
"../../../../../node_modules/@fluidframework/protocol-definitions/dist/index.d.ts"
|
|
1010
|
-
],
|
|
1011
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts": [
|
|
1012
|
-
"../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
|
|
1013
|
-
"../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/index.d.ts",
|
|
1014
|
-
"../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
|
|
1015
|
-
"../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
|
|
1016
|
-
"../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts"
|
|
1017
|
-
],
|
|
1018
981
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/fluidLoadable.d.ts": [
|
|
1019
982
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/handles.d.ts"
|
|
1020
983
|
],
|
|
@@ -1026,7 +989,6 @@
|
|
|
1026
989
|
],
|
|
1027
990
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/handles.d.ts": [
|
|
1028
991
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/fluidLoadable.d.ts",
|
|
1029
|
-
"../../../../../node_modules/@fluidframework/core-interfaces/dist/fluidObject.d.ts",
|
|
1030
992
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/fluidRouter.d.ts",
|
|
1031
993
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/provider.d.ts"
|
|
1032
994
|
],
|
|
@@ -1056,7 +1018,6 @@
|
|
|
1056
1018
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
|
|
1057
1019
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/index.d.ts",
|
|
1058
1020
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
|
|
1059
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
|
|
1060
1021
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts"
|
|
1061
1022
|
],
|
|
1062
1023
|
"../../../../../node_modules/@fluidframework/protocol-definitions/dist/clients.d.ts": [
|
|
@@ -1491,13 +1452,12 @@
|
|
|
1491
1452
|
"../../../../../node_modules/@types/node/index.d.ts"
|
|
1492
1453
|
],
|
|
1493
1454
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/browserPackage.d.ts": [
|
|
1494
|
-
"../../../../../node_modules/@fluidframework/
|
|
1455
|
+
"../../../../../node_modules/@fluidframework/container-definitions/dist/fluidPackage.d.ts"
|
|
1495
1456
|
],
|
|
1496
1457
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts": [
|
|
1497
1458
|
"../../../../../node_modules/@fluidframework/common-definitions/dist/index.d.ts",
|
|
1498
1459
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/index.d.ts",
|
|
1499
1460
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
|
|
1500
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
|
|
1501
1461
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
|
|
1502
1462
|
"../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
|
|
1503
1463
|
"../../../../../node_modules/@fluidframework/protocol-definitions/dist/index.d.ts"
|
|
@@ -1506,6 +1466,7 @@
|
|
|
1506
1466
|
"../../../../../node_modules/@fluidframework/common-definitions/dist/index.d.ts"
|
|
1507
1467
|
],
|
|
1508
1468
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/fluidModule.d.ts": [
|
|
1469
|
+
"../../../../../node_modules/@fluidframework/container-definitions/dist/fluidPackage.d.ts",
|
|
1509
1470
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/runtime.d.ts",
|
|
1510
1471
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts"
|
|
1511
1472
|
],
|
|
@@ -1525,7 +1486,6 @@
|
|
|
1525
1486
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
|
|
1526
1487
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
|
|
1527
1488
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/runtime.d.ts",
|
|
1528
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
|
|
1529
1489
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
|
|
1530
1490
|
"../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts"
|
|
1531
1491
|
],
|
|
@@ -1535,45 +1495,29 @@
|
|
|
1535
1495
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
|
|
1536
1496
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/error.d.ts",
|
|
1537
1497
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/fluidModule.d.ts",
|
|
1498
|
+
"../../../../../node_modules/@fluidframework/container-definitions/dist/fluidPackage.d.ts",
|
|
1538
1499
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/index.d.ts",
|
|
1539
1500
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/runtime.d.ts",
|
|
1540
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/index.d.ts",
|
|
1541
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
|
|
1542
1501
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
|
|
1502
|
+
"../../../../../node_modules/@fluidframework/driver-definitions/dist/index.d.ts",
|
|
1543
1503
|
"../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
|
|
1544
1504
|
"../../../../../node_modules/@fluidframework/protocol-definitions/dist/index.d.ts"
|
|
1545
1505
|
],
|
|
1546
1506
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/proxyLoader.d.ts": [
|
|
1547
1507
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
|
|
1548
|
-
"../../../../../node_modules/@fluidframework/
|
|
1508
|
+
"../../../../../node_modules/@fluidframework/driver-definitions/dist/index.d.ts"
|
|
1549
1509
|
],
|
|
1550
1510
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/runtime.d.ts": [
|
|
1551
1511
|
"../../../../../node_modules/@fluidframework/common-definitions/dist/index.d.ts",
|
|
1552
1512
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/audience.d.ts",
|
|
1553
1513
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
|
|
1554
1514
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/error.d.ts",
|
|
1515
|
+
"../../../../../node_modules/@fluidframework/container-definitions/dist/fluidPackage.d.ts",
|
|
1555
1516
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
|
|
1556
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/index.d.ts",
|
|
1557
1517
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
|
|
1518
|
+
"../../../../../node_modules/@fluidframework/driver-definitions/dist/index.d.ts",
|
|
1558
1519
|
"../../../../../node_modules/@fluidframework/protocol-definitions/dist/index.d.ts"
|
|
1559
1520
|
],
|
|
1560
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/index.d.ts": [
|
|
1561
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/driverError.d.ts",
|
|
1562
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/storage.d.ts",
|
|
1563
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts"
|
|
1564
|
-
],
|
|
1565
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/storage.d.ts": [
|
|
1566
|
-
"../../../../../node_modules/@fluidframework/common-definitions/dist/index.d.ts",
|
|
1567
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
|
|
1568
|
-
"../../../../../node_modules/@fluidframework/protocol-definitions/dist/index.d.ts"
|
|
1569
|
-
],
|
|
1570
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts": [
|
|
1571
|
-
"../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
|
|
1572
|
-
"../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/index.d.ts",
|
|
1573
|
-
"../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
|
|
1574
|
-
"../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts",
|
|
1575
|
-
"../../../../../node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts"
|
|
1576
|
-
],
|
|
1577
1521
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/fluidLoadable.d.ts": [
|
|
1578
1522
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/handles.d.ts"
|
|
1579
1523
|
],
|
|
@@ -1585,7 +1529,6 @@
|
|
|
1585
1529
|
],
|
|
1586
1530
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/handles.d.ts": [
|
|
1587
1531
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/fluidLoadable.d.ts",
|
|
1588
|
-
"../../../../../node_modules/@fluidframework/core-interfaces/dist/fluidObject.d.ts",
|
|
1589
1532
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/fluidRouter.d.ts",
|
|
1590
1533
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/provider.d.ts"
|
|
1591
1534
|
],
|
|
@@ -1615,7 +1558,6 @@
|
|
|
1615
1558
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/deltas.d.ts",
|
|
1616
1559
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/legacy/index.d.ts",
|
|
1617
1560
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
|
|
1618
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
|
|
1619
1561
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/index.d.ts"
|
|
1620
1562
|
],
|
|
1621
1563
|
"../../../../../node_modules/@fluidframework/protocol-definitions/dist/clients.d.ts": [
|
|
@@ -2018,10 +1960,6 @@
|
|
|
2018
1960
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/loader.d.ts",
|
|
2019
1961
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/proxyLoader.d.ts",
|
|
2020
1962
|
"../../../../../node_modules/@fluidframework/container-definitions/dist/runtime.d.ts",
|
|
2021
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/driverError.d.ts",
|
|
2022
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/index.d.ts",
|
|
2023
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/storage.d.ts",
|
|
2024
|
-
"../../../../../node_modules/@fluidframework/container-definitions/node_modules/@fluidframework/driver-definitions/dist/urlResolver.d.ts",
|
|
2025
1963
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/fluidLoadable.d.ts",
|
|
2026
1964
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/fluidObject.d.ts",
|
|
2027
1965
|
"../../../../../node_modules/@fluidframework/core-interfaces/dist/fluidPackage.d.ts",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateSynthesizePrevious.js","sourceRoot":"","sources":["../../../src/test/types/validateSynthesizePrevious.ts"],"names":[],"mappings":";;AAyBA,yDAAyD,CACrD,qDAAqD,EAAE,CAAC,CAAC;AAW7D,qDAAqD,CACjD,yDAAyD,EAAE,CAAC,CAAC;AAWjE,iEAAiE,CAC7D,6DAA6D,EAAE,CAAC,CAAC;AAWrE,6DAA6D,CACzD,iEAAiE,EAAE,CAAC,CAAC;AAWzE,iEAAiE,CAC7D,6DAA6D,EAAE,CAAC,CAAC;AAWrE,6DAA6D,CACzD,iEAAiE,EAAE,CAAC,CAAC;AAWzE,gDAAgD,CAC5C,4CAA4C,EAAE,CAAC,CAAC;AAWpD,4CAA4C,CACxC,gDAAgD,EAAE,CAAC,CAAC;AAWxD,oDAAoD,CAChD,gDAAgD,EAAE,CAAC,CAAC;AAWxD,gDAAgD,CAC5C,oDAAoD,EAAE,CAAC,CAAC;AAW5D,0DAA0D,CACtD,sDAAsD,EAAE,CAAC,CAAC;AAW9D,sDAAsD,CAClD,0DAA0D,EAAE,CAAC,CAAC;AAWlE,2DAA2D,CACvD,uDAAuD,EAAE,CAAC,CAAC;AAW/D,uDAAuD,CACnD,2DAA2D,EAAE,CAAC,CAAC;AAWnE,4DAA4D,CACxD,wDAAwD,EAAE,CAAC,CAAC;AAWhE,wDAAwD,CACpD,4DAA4D,EAAE,CAAC,CAAC;AAWpE,mEAAmE,CAC/D,+DAA+D,EAAE,CAAC,CAAC;AAWvE,+DAA+D,CAC3D,mEAAmE,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by fluid-type-validator in @fluidframework/build-tools.\n */\n/* eslint-disable max-lines */\nimport * as old from \"@fluidframework/synthesize-previous\";\nimport * as current from \"../../index\";\n\ntype TypeOnly<T> = {\n [P in keyof T]: TypeOnly<T[P]>;\n};\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"TypeAliasDeclaration_AsyncFluidObjectProvider\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_AsyncFluidObjectProvider():\n TypeOnly<old.AsyncFluidObjectProvider<any,any>>;\ndeclare function use_current_TypeAliasDeclaration_AsyncFluidObjectProvider(\n use: TypeOnly<current.AsyncFluidObjectProvider<any,any>>);\nuse_current_TypeAliasDeclaration_AsyncFluidObjectProvider(\n get_old_TypeAliasDeclaration_AsyncFluidObjectProvider());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"TypeAliasDeclaration_AsyncFluidObjectProvider\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_AsyncFluidObjectProvider():\n TypeOnly<current.AsyncFluidObjectProvider<any,any>>;\ndeclare function use_old_TypeAliasDeclaration_AsyncFluidObjectProvider(\n use: TypeOnly<old.AsyncFluidObjectProvider<any,any>>);\nuse_old_TypeAliasDeclaration_AsyncFluidObjectProvider(\n get_current_TypeAliasDeclaration_AsyncFluidObjectProvider());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"TypeAliasDeclaration_AsyncOptionalFluidObjectProvider\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_AsyncOptionalFluidObjectProvider():\n TypeOnly<old.AsyncOptionalFluidObjectProvider<any>>;\ndeclare function use_current_TypeAliasDeclaration_AsyncOptionalFluidObjectProvider(\n use: TypeOnly<current.AsyncOptionalFluidObjectProvider<any>>);\nuse_current_TypeAliasDeclaration_AsyncOptionalFluidObjectProvider(\n get_old_TypeAliasDeclaration_AsyncOptionalFluidObjectProvider());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"TypeAliasDeclaration_AsyncOptionalFluidObjectProvider\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_AsyncOptionalFluidObjectProvider():\n TypeOnly<current.AsyncOptionalFluidObjectProvider<any>>;\ndeclare function use_old_TypeAliasDeclaration_AsyncOptionalFluidObjectProvider(\n use: TypeOnly<old.AsyncOptionalFluidObjectProvider<any>>);\nuse_old_TypeAliasDeclaration_AsyncOptionalFluidObjectProvider(\n get_current_TypeAliasDeclaration_AsyncOptionalFluidObjectProvider());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"TypeAliasDeclaration_AsyncRequiredFluidObjectProvider\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_AsyncRequiredFluidObjectProvider():\n TypeOnly<old.AsyncRequiredFluidObjectProvider<any>>;\ndeclare function use_current_TypeAliasDeclaration_AsyncRequiredFluidObjectProvider(\n use: TypeOnly<current.AsyncRequiredFluidObjectProvider<any>>);\nuse_current_TypeAliasDeclaration_AsyncRequiredFluidObjectProvider(\n get_old_TypeAliasDeclaration_AsyncRequiredFluidObjectProvider());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"TypeAliasDeclaration_AsyncRequiredFluidObjectProvider\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_AsyncRequiredFluidObjectProvider():\n TypeOnly<current.AsyncRequiredFluidObjectProvider<any>>;\ndeclare function use_old_TypeAliasDeclaration_AsyncRequiredFluidObjectProvider(\n use: TypeOnly<old.AsyncRequiredFluidObjectProvider<any>>);\nuse_old_TypeAliasDeclaration_AsyncRequiredFluidObjectProvider(\n get_current_TypeAliasDeclaration_AsyncRequiredFluidObjectProvider());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"ClassDeclaration_DependencyContainer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_DependencyContainer():\n TypeOnly<old.DependencyContainer<any>>;\ndeclare function use_current_ClassDeclaration_DependencyContainer(\n use: TypeOnly<current.DependencyContainer<any>>);\nuse_current_ClassDeclaration_DependencyContainer(\n get_old_ClassDeclaration_DependencyContainer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"ClassDeclaration_DependencyContainer\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_DependencyContainer():\n TypeOnly<current.DependencyContainer<any>>;\ndeclare function use_old_ClassDeclaration_DependencyContainer(\n use: TypeOnly<old.DependencyContainer<any>>);\nuse_old_ClassDeclaration_DependencyContainer(\n get_current_ClassDeclaration_DependencyContainer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"TypeAliasDeclaration_FluidObjectProvider\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_FluidObjectProvider():\n TypeOnly<old.FluidObjectProvider<any>>;\ndeclare function use_current_TypeAliasDeclaration_FluidObjectProvider(\n use: TypeOnly<current.FluidObjectProvider<any>>);\nuse_current_TypeAliasDeclaration_FluidObjectProvider(\n get_old_TypeAliasDeclaration_FluidObjectProvider());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"TypeAliasDeclaration_FluidObjectProvider\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_FluidObjectProvider():\n TypeOnly<current.FluidObjectProvider<any>>;\ndeclare function use_old_TypeAliasDeclaration_FluidObjectProvider(\n use: TypeOnly<old.FluidObjectProvider<any>>);\nuse_old_TypeAliasDeclaration_FluidObjectProvider(\n get_current_TypeAliasDeclaration_FluidObjectProvider());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"TypeAliasDeclaration_FluidObjectSymbolProvider\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_FluidObjectSymbolProvider():\n TypeOnly<old.FluidObjectSymbolProvider<any>>;\ndeclare function use_current_TypeAliasDeclaration_FluidObjectSymbolProvider(\n use: TypeOnly<current.FluidObjectSymbolProvider<any>>);\nuse_current_TypeAliasDeclaration_FluidObjectSymbolProvider(\n get_old_TypeAliasDeclaration_FluidObjectSymbolProvider());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"TypeAliasDeclaration_FluidObjectSymbolProvider\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_FluidObjectSymbolProvider():\n TypeOnly<current.FluidObjectSymbolProvider<any>>;\ndeclare function use_old_TypeAliasDeclaration_FluidObjectSymbolProvider(\n use: TypeOnly<old.FluidObjectSymbolProvider<any>>);\nuse_old_TypeAliasDeclaration_FluidObjectSymbolProvider(\n get_current_TypeAliasDeclaration_FluidObjectSymbolProvider());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"VariableDeclaration_IFluidDependencySynthesizer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_VariableDeclaration_IFluidDependencySynthesizer():\n TypeOnly<typeof old.IFluidDependencySynthesizer>;\ndeclare function use_current_VariableDeclaration_IFluidDependencySynthesizer(\n use: TypeOnly<typeof current.IFluidDependencySynthesizer>);\nuse_current_VariableDeclaration_IFluidDependencySynthesizer(\n get_old_VariableDeclaration_IFluidDependencySynthesizer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"VariableDeclaration_IFluidDependencySynthesizer\": {\"backCompat\": false}\n*/\ndeclare function get_current_VariableDeclaration_IFluidDependencySynthesizer():\n TypeOnly<typeof current.IFluidDependencySynthesizer>;\ndeclare function use_old_VariableDeclaration_IFluidDependencySynthesizer(\n use: TypeOnly<typeof old.IFluidDependencySynthesizer>);\nuse_old_VariableDeclaration_IFluidDependencySynthesizer(\n get_current_VariableDeclaration_IFluidDependencySynthesizer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"InterfaceDeclaration_IFluidDependencySynthesizer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IFluidDependencySynthesizer():\n TypeOnly<old.IFluidDependencySynthesizer>;\ndeclare function use_current_InterfaceDeclaration_IFluidDependencySynthesizer(\n use: TypeOnly<current.IFluidDependencySynthesizer>);\nuse_current_InterfaceDeclaration_IFluidDependencySynthesizer(\n get_old_InterfaceDeclaration_IFluidDependencySynthesizer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"InterfaceDeclaration_IFluidDependencySynthesizer\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IFluidDependencySynthesizer():\n TypeOnly<current.IFluidDependencySynthesizer>;\ndeclare function use_old_InterfaceDeclaration_IFluidDependencySynthesizer(\n use: TypeOnly<old.IFluidDependencySynthesizer>);\nuse_old_InterfaceDeclaration_IFluidDependencySynthesizer(\n get_current_InterfaceDeclaration_IFluidDependencySynthesizer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"InterfaceDeclaration_IProvideFluidDependencySynthesizer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IProvideFluidDependencySynthesizer():\n TypeOnly<old.IProvideFluidDependencySynthesizer>;\ndeclare function use_current_InterfaceDeclaration_IProvideFluidDependencySynthesizer(\n use: TypeOnly<current.IProvideFluidDependencySynthesizer>);\nuse_current_InterfaceDeclaration_IProvideFluidDependencySynthesizer(\n get_old_InterfaceDeclaration_IProvideFluidDependencySynthesizer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2000:\n* \"InterfaceDeclaration_IProvideFluidDependencySynthesizer\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IProvideFluidDependencySynthesizer():\n TypeOnly<current.IProvideFluidDependencySynthesizer>;\ndeclare function use_old_InterfaceDeclaration_IProvideFluidDependencySynthesizer(\n use: TypeOnly<old.IProvideFluidDependencySynthesizer>);\nuse_old_InterfaceDeclaration_IProvideFluidDependencySynthesizer(\n get_current_InterfaceDeclaration_IProvideFluidDependencySynthesizer());\n"]}
|
|
1
|
+
{"version":3,"file":"validateSynthesizePrevious.js","sourceRoot":"","sources":["../../../src/test/types/validateSynthesizePrevious.ts"],"names":[],"mappings":";;AAyBA,yDAAyD,CACrD,qDAAqD,EAAE,CAAC,CAAC;AAW7D,qDAAqD,CACjD,yDAAyD,EAAE,CAAC,CAAC;AAWjE,iEAAiE,CAC7D,6DAA6D,EAAE,CAAC,CAAC;AAWrE,6DAA6D,CACzD,iEAAiE,EAAE,CAAC,CAAC;AAWzE,iEAAiE,CAC7D,6DAA6D,EAAE,CAAC,CAAC;AAWrE,6DAA6D,CACzD,iEAAiE,EAAE,CAAC,CAAC;AAWzE,gDAAgD,CAC5C,4CAA4C,EAAE,CAAC,CAAC;AAWpD,4CAA4C,CACxC,gDAAgD,EAAE,CAAC,CAAC;AAWxD,oDAAoD,CAChD,gDAAgD,EAAE,CAAC,CAAC;AAWxD,gDAAgD,CAC5C,oDAAoD,EAAE,CAAC,CAAC;AAW5D,0DAA0D,CACtD,sDAAsD,EAAE,CAAC,CAAC;AAW9D,sDAAsD,CAClD,0DAA0D,EAAE,CAAC,CAAC;AAWlE,2DAA2D,CACvD,uDAAuD,EAAE,CAAC,CAAC;AAW/D,uDAAuD,CACnD,2DAA2D,EAAE,CAAC,CAAC;AAWnE,4DAA4D,CACxD,wDAAwD,EAAE,CAAC,CAAC;AAWhE,wDAAwD,CACpD,4DAA4D,EAAE,CAAC,CAAC;AAWpE,mEAAmE,CAC/D,+DAA+D,EAAE,CAAC,CAAC;AAWvE,+DAA+D,CAC3D,mEAAmE,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by fluid-type-validator in @fluidframework/build-tools.\n */\n/* eslint-disable max-lines */\nimport * as old from \"@fluidframework/synthesize-previous\";\nimport * as current from \"../../index\";\n\ntype TypeOnly<T> = {\n [P in keyof T]: TypeOnly<T[P]>;\n};\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"TypeAliasDeclaration_AsyncFluidObjectProvider\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_AsyncFluidObjectProvider():\n TypeOnly<old.AsyncFluidObjectProvider<any,any>>;\ndeclare function use_current_TypeAliasDeclaration_AsyncFluidObjectProvider(\n use: TypeOnly<current.AsyncFluidObjectProvider<any,any>>);\nuse_current_TypeAliasDeclaration_AsyncFluidObjectProvider(\n get_old_TypeAliasDeclaration_AsyncFluidObjectProvider());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"TypeAliasDeclaration_AsyncFluidObjectProvider\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_AsyncFluidObjectProvider():\n TypeOnly<current.AsyncFluidObjectProvider<any,any>>;\ndeclare function use_old_TypeAliasDeclaration_AsyncFluidObjectProvider(\n use: TypeOnly<old.AsyncFluidObjectProvider<any,any>>);\nuse_old_TypeAliasDeclaration_AsyncFluidObjectProvider(\n get_current_TypeAliasDeclaration_AsyncFluidObjectProvider());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"TypeAliasDeclaration_AsyncOptionalFluidObjectProvider\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_AsyncOptionalFluidObjectProvider():\n TypeOnly<old.AsyncOptionalFluidObjectProvider<any>>;\ndeclare function use_current_TypeAliasDeclaration_AsyncOptionalFluidObjectProvider(\n use: TypeOnly<current.AsyncOptionalFluidObjectProvider<any>>);\nuse_current_TypeAliasDeclaration_AsyncOptionalFluidObjectProvider(\n get_old_TypeAliasDeclaration_AsyncOptionalFluidObjectProvider());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"TypeAliasDeclaration_AsyncOptionalFluidObjectProvider\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_AsyncOptionalFluidObjectProvider():\n TypeOnly<current.AsyncOptionalFluidObjectProvider<any>>;\ndeclare function use_old_TypeAliasDeclaration_AsyncOptionalFluidObjectProvider(\n use: TypeOnly<old.AsyncOptionalFluidObjectProvider<any>>);\nuse_old_TypeAliasDeclaration_AsyncOptionalFluidObjectProvider(\n get_current_TypeAliasDeclaration_AsyncOptionalFluidObjectProvider());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"TypeAliasDeclaration_AsyncRequiredFluidObjectProvider\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_AsyncRequiredFluidObjectProvider():\n TypeOnly<old.AsyncRequiredFluidObjectProvider<any>>;\ndeclare function use_current_TypeAliasDeclaration_AsyncRequiredFluidObjectProvider(\n use: TypeOnly<current.AsyncRequiredFluidObjectProvider<any>>);\nuse_current_TypeAliasDeclaration_AsyncRequiredFluidObjectProvider(\n get_old_TypeAliasDeclaration_AsyncRequiredFluidObjectProvider());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"TypeAliasDeclaration_AsyncRequiredFluidObjectProvider\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_AsyncRequiredFluidObjectProvider():\n TypeOnly<current.AsyncRequiredFluidObjectProvider<any>>;\ndeclare function use_old_TypeAliasDeclaration_AsyncRequiredFluidObjectProvider(\n use: TypeOnly<old.AsyncRequiredFluidObjectProvider<any>>);\nuse_old_TypeAliasDeclaration_AsyncRequiredFluidObjectProvider(\n get_current_TypeAliasDeclaration_AsyncRequiredFluidObjectProvider());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"ClassDeclaration_DependencyContainer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_DependencyContainer():\n TypeOnly<old.DependencyContainer<any>>;\ndeclare function use_current_ClassDeclaration_DependencyContainer(\n use: TypeOnly<current.DependencyContainer<any>>);\nuse_current_ClassDeclaration_DependencyContainer(\n get_old_ClassDeclaration_DependencyContainer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"ClassDeclaration_DependencyContainer\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_DependencyContainer():\n TypeOnly<current.DependencyContainer<any>>;\ndeclare function use_old_ClassDeclaration_DependencyContainer(\n use: TypeOnly<old.DependencyContainer<any>>);\nuse_old_ClassDeclaration_DependencyContainer(\n get_current_ClassDeclaration_DependencyContainer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"TypeAliasDeclaration_FluidObjectProvider\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_FluidObjectProvider():\n TypeOnly<old.FluidObjectProvider<any>>;\ndeclare function use_current_TypeAliasDeclaration_FluidObjectProvider(\n use: TypeOnly<current.FluidObjectProvider<any>>);\nuse_current_TypeAliasDeclaration_FluidObjectProvider(\n get_old_TypeAliasDeclaration_FluidObjectProvider());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"TypeAliasDeclaration_FluidObjectProvider\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_FluidObjectProvider():\n TypeOnly<current.FluidObjectProvider<any>>;\ndeclare function use_old_TypeAliasDeclaration_FluidObjectProvider(\n use: TypeOnly<old.FluidObjectProvider<any>>);\nuse_old_TypeAliasDeclaration_FluidObjectProvider(\n get_current_TypeAliasDeclaration_FluidObjectProvider());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"TypeAliasDeclaration_FluidObjectSymbolProvider\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_FluidObjectSymbolProvider():\n TypeOnly<old.FluidObjectSymbolProvider<any>>;\ndeclare function use_current_TypeAliasDeclaration_FluidObjectSymbolProvider(\n use: TypeOnly<current.FluidObjectSymbolProvider<any>>);\nuse_current_TypeAliasDeclaration_FluidObjectSymbolProvider(\n get_old_TypeAliasDeclaration_FluidObjectSymbolProvider());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"TypeAliasDeclaration_FluidObjectSymbolProvider\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_FluidObjectSymbolProvider():\n TypeOnly<current.FluidObjectSymbolProvider<any>>;\ndeclare function use_old_TypeAliasDeclaration_FluidObjectSymbolProvider(\n use: TypeOnly<old.FluidObjectSymbolProvider<any>>);\nuse_old_TypeAliasDeclaration_FluidObjectSymbolProvider(\n get_current_TypeAliasDeclaration_FluidObjectSymbolProvider());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"VariableDeclaration_IFluidDependencySynthesizer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_VariableDeclaration_IFluidDependencySynthesizer():\n TypeOnly<typeof old.IFluidDependencySynthesizer>;\ndeclare function use_current_VariableDeclaration_IFluidDependencySynthesizer(\n use: TypeOnly<typeof current.IFluidDependencySynthesizer>);\nuse_current_VariableDeclaration_IFluidDependencySynthesizer(\n get_old_VariableDeclaration_IFluidDependencySynthesizer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"VariableDeclaration_IFluidDependencySynthesizer\": {\"backCompat\": false}\n*/\ndeclare function get_current_VariableDeclaration_IFluidDependencySynthesizer():\n TypeOnly<typeof current.IFluidDependencySynthesizer>;\ndeclare function use_old_VariableDeclaration_IFluidDependencySynthesizer(\n use: TypeOnly<typeof old.IFluidDependencySynthesizer>);\nuse_old_VariableDeclaration_IFluidDependencySynthesizer(\n get_current_VariableDeclaration_IFluidDependencySynthesizer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"InterfaceDeclaration_IFluidDependencySynthesizer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IFluidDependencySynthesizer():\n TypeOnly<old.IFluidDependencySynthesizer>;\ndeclare function use_current_InterfaceDeclaration_IFluidDependencySynthesizer(\n use: TypeOnly<current.IFluidDependencySynthesizer>);\nuse_current_InterfaceDeclaration_IFluidDependencySynthesizer(\n get_old_InterfaceDeclaration_IFluidDependencySynthesizer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"InterfaceDeclaration_IFluidDependencySynthesizer\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IFluidDependencySynthesizer():\n TypeOnly<current.IFluidDependencySynthesizer>;\ndeclare function use_old_InterfaceDeclaration_IFluidDependencySynthesizer(\n use: TypeOnly<old.IFluidDependencySynthesizer>);\nuse_old_InterfaceDeclaration_IFluidDependencySynthesizer(\n get_current_InterfaceDeclaration_IFluidDependencySynthesizer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"InterfaceDeclaration_IProvideFluidDependencySynthesizer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IProvideFluidDependencySynthesizer():\n TypeOnly<old.IProvideFluidDependencySynthesizer>;\ndeclare function use_current_InterfaceDeclaration_IProvideFluidDependencySynthesizer(\n use: TypeOnly<current.IProvideFluidDependencySynthesizer>);\nuse_current_InterfaceDeclaration_IProvideFluidDependencySynthesizer(\n get_old_InterfaceDeclaration_IProvideFluidDependencySynthesizer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"InterfaceDeclaration_IProvideFluidDependencySynthesizer\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IProvideFluidDependencySynthesizer():\n TypeOnly<current.IProvideFluidDependencySynthesizer>;\ndeclare function use_old_InterfaceDeclaration_IProvideFluidDependencySynthesizer(\n use: TypeOnly<old.IProvideFluidDependencySynthesizer>);\nuse_old_InterfaceDeclaration_IProvideFluidDependencySynthesizer(\n get_current_InterfaceDeclaration_IProvideFluidDependencySynthesizer());\n"]}
|
package/dist/types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { IFluidDependencySynthesizer } from ".";
|
|
6
6
|
/**
|
|
7
7
|
* This is a condensed version of Record that requires the object has all
|
|
8
|
-
* the
|
|
8
|
+
* the FluidObject properties as its type mapped to a string representation
|
|
9
9
|
* of that property.
|
|
10
10
|
*
|
|
11
11
|
* @example - \{ IFoo: "IFoo" \}
|
|
@@ -15,7 +15,7 @@ export declare type FluidObjectSymbolProvider<T> = {
|
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
17
|
* This is a condensed version of Record that requires the object has all
|
|
18
|
-
* the
|
|
18
|
+
* the FluidObject properties as its type mapped to an object that implements
|
|
19
19
|
* the property.
|
|
20
20
|
*/
|
|
21
21
|
export declare type AsyncRequiredFluidObjectProvider<T> = T extends undefined ? Record<string, never> : {
|
|
@@ -23,7 +23,7 @@ export declare type AsyncRequiredFluidObjectProvider<T> = T extends undefined ?
|
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* This is a condensed version of Record that requires the object has all
|
|
26
|
-
* the
|
|
26
|
+
* the FluidObject properties as its type, mapped to an object that implements
|
|
27
27
|
* the property or undefined.
|
|
28
28
|
*/
|
|
29
29
|
export declare type AsyncOptionalFluidObjectProvider<T> = T extends undefined ? Record<string, never> : {
|
package/dist/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 { IFluidDependencySynthesizer } from \".\";\n/**\n * This is a condensed version of Record that requires the object has all\n * the
|
|
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 FluidObject 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 FluidObject 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 FluidObject 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>>);\n"]}
|
|
@@ -62,7 +62,7 @@ export class DependencyContainer {
|
|
|
62
62
|
*/
|
|
63
63
|
getProvider(provider) {
|
|
64
64
|
// this was removed, but some partners have trouble with back compat where they
|
|
65
|
-
// use invalid patterns with
|
|
65
|
+
// use invalid patterns with FluidObject and IFluidDependencySynthesizer
|
|
66
66
|
// this is just for back compat until those are removed
|
|
67
67
|
if (this.has(provider)) {
|
|
68
68
|
if (this.providers.has(provider)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependencyContainer.js","sourceRoot":"","sources":["../src/dependencyContainer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EACH,2BAA2B,GAC9B,MAAM,+BAA+B,CAAC;AAEvC;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAK5B,YAAmB,GAAI,OAAoD;QAJ1D,cAAS,GAAG,IAAI,GAAG,EAAwC,CAAC;QAKzE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAoC,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;IAC5F,CAAC;IAJD,IAAW,2BAA2B,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC;IAMzD;;;;;OAKG;IACI,QAAQ,CAAoC,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C;aACJ,CAAC;SACL;QACD,OAAO;YACC,GAAG;gBACC,IAAI,QAAQ,EAAE;oBACV,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;wBACxC,IAAI,CAAC,EAAE;4BACH,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;yBACf;oBACL,CAAC,CAAC,CAAC;iBACN;YACL,CAAC;SACJ,CAAC;IACV,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation 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 * @deprecated - Needed for back compat\n */\n private getProvider(provider: string & keyof TMap) {\n // this was removed, but some partners have trouble with back compat where they\n // use invalid patterns with IFluidObject and IFluidDependencySynthesizer\n // this is just for back compat until those are removed\n if(this.has(provider)) {\n if(this.providers.has(provider)) {\n return this.providers.get(provider);\n }\n for(const parent of this.parents) {\n if(parent instanceof DependencyContainer) {\n return parent.getProvider(provider);\n }else{\n // older implementations of the IFluidDependencySynthesizer exposed getProvider\n const maybeGetProvider: {getProvider?(provider: string & keyof TMap)} = parent as any;\n if(maybeGetProvider?.getProvider !== undefined) {\n return maybeGetProvider.getProvider(provider);\n }\n }\n }\n }\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: async () => 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 // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const sp = { [t]: t } as FluidObjectSymbolProvider<Pick<TMap, T>>;\n const syn = parent.synthesize<Pick<TMap, T>, Record<string, unknown>>(\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"]}
|
|
1
|
+
{"version":3,"file":"dependencyContainer.js","sourceRoot":"","sources":["../src/dependencyContainer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EACH,2BAA2B,GAC9B,MAAM,+BAA+B,CAAC;AAEvC;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAK5B,YAAmB,GAAI,OAAoD;QAJ1D,cAAS,GAAG,IAAI,GAAG,EAAwC,CAAC;QAKzE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAoC,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;IAC5F,CAAC;IAJD,IAAW,2BAA2B,KAAK,OAAO,IAAI,C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CAAC,CAAG,CAAC,CAAC,CAAC,CAAC;qBAC5B;gBACL,CAAC;aACJ,CAAC;SACL;QACD,OAAO;YACC,GAAG;gBACC,IAAI,QAAQ,EAAE;oBACV,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;wBACxC,IAAI,CAAC,EAAE;4BACH,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;yBACf;oBACL,CAAC,CAAC,CAAC;iBACN;YACL,CAAC;SACJ,CAAC;IACV,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation 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 * @deprecated - Needed for back compat\n */\n private getProvider(provider: string & keyof TMap) {\n // this was removed, but some partners have trouble with back compat where they\n // use invalid patterns with FluidObject and IFluidDependencySynthesizer\n // this is just for back compat until those are removed\n if(this.has(provider)) {\n if(this.providers.has(provider)) {\n return this.providers.get(provider);\n }\n for(const parent of this.parents) {\n if(parent instanceof DependencyContainer) {\n return parent.getProvider(provider);\n }else{\n // older implementations of the IFluidDependencySynthesizer exposed getProvider\n const maybeGetProvider: {getProvider?(provider: string & keyof TMap)} = parent as any;\n if(maybeGetProvider?.getProvider !== undefined) {\n return maybeGetProvider.getProvider(provider);\n }\n }\n }\n }\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: async () => 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 // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const sp = { [t]: t } as FluidObjectSymbolProvider<Pick<TMap, T>>;\n const syn = parent.synthesize<Pick<TMap, T>, Record<string, unknown>>(\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 { IFluidDependencySynthesizer } from \".\";\n/**\n * This is a condensed version of Record that requires the object has all\n * the
|
|
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 FluidObject 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 FluidObject 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 FluidObject 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>>);\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/synthesize",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.1001-62246",
|
|
4
4
|
"description": "A library for synthesizing scope objects.",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@fluidframework/build-common": "^0.23.0",
|
|
66
|
-
"@fluidframework/core-interfaces": "^0.
|
|
67
|
-
"@fluidframework/datastore": "0.
|
|
68
|
-
"@fluidframework/eslint-config-fluid": "^0.
|
|
69
|
-
"@fluidframework/mocha-test-setup": "0.
|
|
70
|
-
"@fluidframework/synthesize-previous": "npm:@fluidframework/synthesize
|
|
66
|
+
"@fluidframework/core-interfaces": "^0.43.1000",
|
|
67
|
+
"@fluidframework/datastore": "0.59.1001-62246",
|
|
68
|
+
"@fluidframework/eslint-config-fluid": "^0.28.1000",
|
|
69
|
+
"@fluidframework/mocha-test-setup": "0.59.1001-62246",
|
|
70
|
+
"@fluidframework/synthesize-previous": "npm:@fluidframework/synthesize@^0.58.0",
|
|
71
71
|
"@microsoft/api-extractor": "^7.16.1",
|
|
72
72
|
"@rushstack/eslint-config": "^2.5.1",
|
|
73
73
|
"@types/mocha": "^8.2.2",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"typescript-formatter": "7.1.0"
|
|
92
92
|
},
|
|
93
93
|
"typeValidation": {
|
|
94
|
-
"version": "0.
|
|
94
|
+
"version": "0.59.1000",
|
|
95
95
|
"broken": {}
|
|
96
96
|
}
|
|
97
97
|
}
|