reactive-di
Advanced tools
Comparing version 1.1.4 to 1.1.6
'use strict'; | ||
exports.__esModule = true; | ||
exports.klass = exports.factory = exports.compose = exports.value = exports.tag = exports.alias = exports.inject = undefined; | ||
exports.klass = exports.factory = exports.compose = exports.value = exports.tag = exports.alias = undefined; | ||
@@ -18,9 +18,2 @@ var _compose = require('./plugins/compose/compose'); | ||
var _inject = require('./plugins/inject'); | ||
var _inject2 = _interopRequireDefault(_inject); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.inject = _inject2.default; | ||
exports.alias = _alias.aliasAnn; | ||
@@ -27,0 +20,0 @@ exports.tag = _tag.tagAnn; |
@@ -18,2 +18,4 @@ 'use strict'; | ||
var _annotationDriver = require('../annotationDriver'); | ||
var _configurations = require('../../configurations'); | ||
@@ -27,5 +29,9 @@ | ||
Container | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
function inject(meta, target /*: Function*/) { | ||
_annotationDriver.paramtypes.set(target, meta); | ||
} | ||
describe('DiContainerAnnotationTest', function () { | ||
@@ -47,3 +53,3 @@ it('should resolve function factory once', function () { | ||
filepath: 'src/core/__tests__/annotationTest.js', | ||
line: 36 | ||
line: 43 | ||
})); | ||
@@ -61,3 +67,3 @@ }); | ||
(0, _annotations.klass)()(A); | ||
(0, _annotations.inject)()(A); | ||
inject([], A); | ||
@@ -71,3 +77,3 @@ var B = function B(a /*: A*/) { | ||
(0, _annotations.klass)()(B); | ||
(0, _annotations.inject)(A)(B); | ||
inject([A], B); | ||
@@ -79,3 +85,3 @@ var newDi /*: Container*/ = (0, _createContainer.createContainer)(); | ||
filepath: 'src/core/__tests__/annotationTest.js', | ||
line: 55 | ||
line: 62 | ||
})); | ||
@@ -85,3 +91,3 @@ (0, _powerAssert2.default)(_rec3._expr(_rec3._capt(_rec3._capt(_rec3._capt(result, 'arguments/0/left/object').a, 'arguments/0/left') instanceof _rec3._capt(A, 'arguments/0/right'), 'arguments/0'), { | ||
filepath: 'src/core/__tests__/annotationTest.js', | ||
line: 56 | ||
line: 63 | ||
})); | ||
@@ -99,3 +105,3 @@ }); | ||
(0, _annotations.klass)()(A); | ||
(0, _annotations.inject)()(A); | ||
inject([], A); | ||
@@ -109,3 +115,3 @@ var B = function B(a /*: A*/) { | ||
(0, _annotations.klass)()(B); | ||
(0, _annotations.inject)(A)(B); | ||
inject([A], B); | ||
@@ -117,3 +123,3 @@ var newDi /*: Container*/ = (0, _createContainer.createContainer)([A, B]); | ||
filepath: 'src/core/__tests__/annotationTest.js', | ||
line: 78 | ||
line: 85 | ||
})); | ||
@@ -123,3 +129,3 @@ (0, _powerAssert2.default)(_rec5._expr(_rec5._capt(_rec5._capt(_rec5._capt(result, 'arguments/0/left/object').a, 'arguments/0/left') instanceof _rec5._capt(A, 'arguments/0/right'), 'arguments/0'), { | ||
filepath: 'src/core/__tests__/annotationTest.js', | ||
line: 79 | ||
line: 86 | ||
})); | ||
@@ -136,3 +142,3 @@ }); | ||
(0, _annotations.inject)()(A); | ||
inject([], A); | ||
@@ -145,3 +151,3 @@ var B = function B(a /*: A*/) { | ||
(0, _annotations.inject)(A)(B); | ||
inject([A], B); | ||
@@ -153,3 +159,3 @@ var newDi /*: Container*/ = (0, _createContainer.createContainer)([(0, _configurations.klass)(A), (0, _configurations.klass)(B)]); | ||
filepath: 'src/core/__tests__/annotationTest.js', | ||
line: 99 | ||
line: 106 | ||
})); | ||
@@ -159,3 +165,3 @@ (0, _powerAssert2.default)(_rec7._expr(_rec7._capt(_rec7._capt(_rec7._capt(result, 'arguments/0/left/object').a, 'arguments/0/left') instanceof _rec7._capt(A, 'arguments/0/right'), 'arguments/0'), { | ||
filepath: 'src/core/__tests__/annotationTest.js', | ||
line: 100 | ||
line: 107 | ||
})); | ||
@@ -162,0 +168,0 @@ }); |
@@ -23,3 +23,3 @@ 'use strict'; | ||
Container | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -26,0 +26,0 @@ |
@@ -24,3 +24,3 @@ 'use strict'; | ||
Container | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -27,0 +27,0 @@ |
@@ -10,9 +10,9 @@ 'use strict'; | ||
Tag, | ||
ConfigItem, | ||
DependencyKey, | ||
RawAnnotation, | ||
Container, | ||
ContainerManager, | ||
CreateContainerManager | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
function createContainer(config /*: Array<RawAnnotation|DependencyKey>*/, raw /*: Array<[DependencyKey, Array<Tag|DependencyKey>]>*/) /*: Container*/ { | ||
} from 'reactive-di'*/ | ||
function createContainer(config /*: Array<ConfigItem>*/, raw /*: Array<[DependencyKey, Array<Tag|DependencyKey>]>*/) /*: Container*/ { | ||
var isHot /*: ?boolean*/ = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; | ||
@@ -19,0 +19,0 @@ |
@@ -24,3 +24,3 @@ 'use strict'; | ||
Container | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -27,0 +27,0 @@ |
@@ -17,4 +17,5 @@ 'use strict'; | ||
/*:: import type { | ||
Provider, | ||
Container | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -45,7 +46,7 @@ | ||
filepath: 'src/core/__tests__/updaterTest.js', | ||
line: 33 | ||
line: 34 | ||
}), _rec2._expr(_rec2._capt(['factory@B', 'factory@A'], 'arguments/1'), { | ||
content: 'assert.deepEqual(result, [\'factory@B\', \'factory@A\'])', | ||
filepath: 'src/core/__tests__/updaterTest.js', | ||
line: 33 | ||
line: 34 | ||
})); | ||
@@ -77,7 +78,7 @@ }); | ||
filepath: 'src/core/__tests__/updaterTest.js', | ||
line: 54 | ||
line: 55 | ||
}), _rec4._expr(_rec4._capt(['factory@B', 'factory@C', 'factory@A'], 'arguments/1'), { | ||
content: 'assert.deepEqual(result, [\'factory@B\', \'factory@C\', \'factory@A\'])', | ||
filepath: 'src/core/__tests__/updaterTest.js', | ||
line: 54 | ||
line: 55 | ||
})); | ||
@@ -106,7 +107,7 @@ }); | ||
filepath: 'src/core/__tests__/updaterTest.js', | ||
line: 74 | ||
line: 75 | ||
}), _rec6._expr(_rec6._capt(['factory@B', 'factory@C', 'factory@A'], 'arguments/1'), { | ||
content: 'assert.deepEqual(result, [\'factory@B\', \'factory@C\', \'factory@A\'])', | ||
filepath: 'src/core/__tests__/updaterTest.js', | ||
line: 74 | ||
line: 75 | ||
})); | ||
@@ -135,7 +136,7 @@ }); | ||
filepath: 'src/core/__tests__/updaterTest.js', | ||
line: 93 | ||
line: 94 | ||
}), _rec8._expr(_rec8._capt(['factory@B', 'factory@C', 'factory@A'], 'arguments/1'), { | ||
content: 'assert.deepEqual(result, [\'factory@B\', \'factory@C\', \'factory@A\'])', | ||
filepath: 'src/core/__tests__/updaterTest.js', | ||
line: 93 | ||
line: 94 | ||
})); | ||
@@ -142,0 +143,0 @@ }); |
@@ -14,3 +14,3 @@ 'use strict'; | ||
MetadataDriver | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -17,0 +17,0 @@ |
@@ -17,4 +17,2 @@ 'use strict'; | ||
var _annotationDriver = require('./annotationDriver'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -25,40 +23,65 @@ | ||
/*:: import type { | ||
MetadataDriver, | ||
DepItem, | ||
Dependency, | ||
DependencyKey, | ||
ConfigItem, | ||
RawAnnotation, | ||
Annotation | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
Annotation as IAnnotation | ||
} from 'reactive-di'*/ | ||
var AnnotationMap = function () { | ||
function AnnotationMap(config /*: Array<RawAnnotation|DependencyKey>*/) { | ||
function AnnotationMap /*:: <Annotation: IAnnotation>*/(config /*: Array<ConfigItem>*/, rdi /*: MetadataDriver<RawAnnotation>*/, paramtypes /*: MetadataDriver<Array<DepItem>>*/) { | ||
_classCallCheck(this, AnnotationMap); | ||
this._rdi = rdi; | ||
this._paramtypes = paramtypes; | ||
this._map = new _SimpleMap2.default(); | ||
this.set(config); | ||
} | ||
AnnotationMap.prototype.set = function set(config /*: Array<ConfigItem>*/) { | ||
var map = this._map; | ||
var driver = this._rdi; | ||
for (var i = 0, l = config.length; i < l; i++) { | ||
var conf = config[i]; | ||
var annotation /*: RawAnnotation*/ = void 0; | ||
var target /*: ?DependencyKey*/ = void 0; | ||
if ((typeof conf === 'undefined' ? 'undefined' : _typeof(conf)) === 'object') { | ||
annotation = conf; | ||
target = annotation.target; | ||
} else { | ||
annotation = _annotationDriver.rdi.get(conf); | ||
var conf /*: ConfigItem*/ = config[i]; | ||
var raw /*: ?RawAnnotation*/ = void 0; | ||
var key /*: ?DependencyKey*/ = void 0; | ||
var target /*: ?Dependency*/ = void 0; | ||
if (Array.isArray(conf)) { | ||
key = conf[0]; | ||
raw = conf[1]; | ||
} else if ((typeof conf === 'undefined' ? 'undefined' : _typeof(conf)) === 'object') { | ||
raw = conf; | ||
} else if (typeof conf === 'function') { | ||
raw = driver.get(conf); | ||
target = conf; | ||
} | ||
if (!raw) { | ||
throw new Error('Can\'t find annotation: ' + conf); | ||
} | ||
target = target || raw.target; | ||
if (!target) { | ||
throw new Error('Target not set for annotation: ' + Object.keys(annotation)); | ||
throw new Error('Can\'t find annotation target: ' + raw.kind); | ||
} | ||
var oldAnnotation /*: ?Annotation*/ = this._map.get(target); | ||
key = key || (target /*: DependencyKey*/); | ||
var oldAnnotation /*: ?Annotation*/ = map.get(key); | ||
if (oldAnnotation) { | ||
throw new Error('DependencyKey already registered, current: ' + oldAnnotation.kind + '@' + (0, _getFunctionName2.default)(oldAnnotation.target) + ', new: ' + annotation.kind + '@' + (0, _getFunctionName2.default)(target)); | ||
throw new Error('DependencyKey already registered, current: ' + oldAnnotation.kind + '@' + (0, _getFunctionName2.default)(oldAnnotation.target) + ', new: ' + raw.kind + '@' + (0, _getFunctionName2.default)(target)); | ||
} | ||
this.set(target, annotation); | ||
map.set(key, this._createAnotation(target, raw)); | ||
} | ||
} | ||
}; | ||
AnnotationMap.prototype._normalize = function _normalize(key /*: Dependency*/, raw /*: RawAnnotation*/) { | ||
var target = raw.target || key; | ||
var deps /*: Array<DepItem>*/ = raw.deps && raw.deps.length ? raw.deps : _annotationDriver.paramtypes.get(target) || []; | ||
AnnotationMap.prototype._createAnotation = function _createAnotation(target /*: Dependency*/, raw /*: R*/) { | ||
var deps /*: Array<DepItem>*/ = raw.deps && raw.deps.length ? raw.deps : this._paramtypes.get(target) || []; | ||
return _extends({}, raw, { | ||
var annotation /*: Annotation*/ = _extends({}, (raw /*: any*/), { | ||
kind: raw.kind, | ||
@@ -70,19 +93,17 @@ displayName: raw.kind + '@' + (0, _getFunctionName2.default)(target), | ||
}); | ||
}; | ||
AnnotationMap.prototype.set = function set(target /*: DependencyKey*/, annotation /*: any*/) { | ||
this._map.set(target, this._normalize(target, annotation)); | ||
return annotation; | ||
}; | ||
AnnotationMap.prototype.has = function has(target /*: DependencyKey*/) { | ||
return this._map.has(target) && _annotationDriver.rdi.has(target); | ||
return this._map.has(target) && (typeof target === 'function' ? this._rdi.has(target) : false); | ||
}; | ||
AnnotationMap.prototype.get = function get(target /*: DependencyKey*/) { | ||
var annotation /*: ?Annotation*/ = this._map.get(target); | ||
if (!annotation) { | ||
var raw /*: ?RawAnnotation*/ = _annotationDriver.rdi.get(target); | ||
AnnotationMap.prototype.get = function get(key /*: DependencyKey*/) { | ||
var annotation /*: ?Annotation*/ = this._map.get(key); | ||
if (!annotation && typeof key === 'function') { | ||
var raw /*: ?RawAnnotation*/ = this._rdi.get(key); | ||
if (raw) { | ||
annotation = this._normalize(target, raw); | ||
this._map.set(target, annotation); | ||
annotation = this._createAnotation(key, raw); | ||
this._map.set(key, annotation); | ||
} | ||
@@ -89,0 +110,0 @@ } |
@@ -12,4 +12,5 @@ 'use strict'; | ||
/*:: import type { | ||
Provider | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
Provider, | ||
Dependency | ||
} from 'reactive-di'*/ | ||
/*:: type CallableArguments = { | ||
@@ -16,0 +17,0 @@ deps: Array<any>; |
@@ -18,3 +18,3 @@ 'use strict'; | ||
Container | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -21,0 +21,0 @@ var BaseProvider = function () { |
'use strict'; | ||
exports.__esModule = true; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
exports.default = createManagerFactory; | ||
@@ -46,11 +43,10 @@ | ||
DependencyKey, | ||
RawAnnotation, | ||
ConfigItem, | ||
Plugin, | ||
CreatePlugin | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
/*:: import type { | ||
CreatePlugin, | ||
CreateContainerManager, | ||
RelationUpdater, | ||
Container, | ||
ContainerManager | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -101,13 +97,2 @@ | ||
DefaultContainerManager.prototype.replace = function replace(oldDep /*: DependencyKey*/, newDep /*: DependencyKey|Annotation*/) { | ||
this._delete(oldDep); | ||
if (newDep && this._annotations.has(oldDep)) { | ||
var annotation /*: ?RawAnnotation*/ = (typeof newDep === 'undefined' ? 'undefined' : _typeof(newDep)) === 'object' ? (newDep /*: Annotation*/) : _annotationDriver.rdi.get((newDep /*: Dependency*/)); | ||
if (annotation) { | ||
this._annotations.set(oldDep, annotation); | ||
} | ||
} | ||
}; | ||
return DefaultContainerManager; | ||
@@ -158,3 +143,3 @@ }(); | ||
function createManagerFactory() /*: (config?: Array<RawAnnotation|DependencyKey>) => ContainerManager*/ { | ||
function createManagerFactory() /*: CreateContainerManager*/ { | ||
var pluginsConfig /*:: ?: Array<CreatePlugin>*/ = arguments.length <= 0 || arguments[0] === undefined ? _defaultPlugins2.default : arguments[0]; | ||
@@ -167,5 +152,5 @@ var createUpdater /*:: ?: () => RelationUpdater*/ = arguments.length <= 1 || arguments[1] === undefined ? _createDummyRelationUpdater2.default : arguments[1]; | ||
function createContainerManager() /*: ContainerManager*/ { | ||
var config /*:: ?: Array<RawAnnotation|DependencyKey>*/ = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0]; | ||
var config /*:: ?: Array<ConfigItem>*/ = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0]; | ||
return new DefaultContainerManager(new _AnnotationMap2.default(config), plugins, updater); | ||
return new DefaultContainerManager(new _AnnotationMap2.default(config, _annotationDriver.rdi, _annotationDriver.paramtypes), plugins, updater); | ||
} | ||
@@ -172,0 +157,0 @@ plugins = (0, _createPluginsMap2.default)(createContainerManager, pluginsConfig); |
@@ -34,3 +34,3 @@ 'use strict'; | ||
Provider | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
/*:: import type AnnotationMap from 'reactive-di/core/AnnotationMap'*/ | ||
@@ -120,9 +120,9 @@ | ||
DefaultContainer.prototype.delete = function _delete(annotatedDep /*: DependencyKey*/) { | ||
this._providerCache.delete(annotatedDep); | ||
var provider /*: ?Provider*/ = this._privateCache.get(annotatedDep); | ||
DefaultContainer.prototype.delete = function _delete(key /*: DependencyKey*/) { | ||
this._providerCache.delete(key); | ||
var provider /*: ?Provider*/ = this._privateCache.get(key); | ||
if (provider) { | ||
provider.dispose(); | ||
} | ||
this._privateCache.delete(annotatedDep); | ||
this._privateCache.delete(key); | ||
}; | ||
@@ -135,4 +135,4 @@ | ||
DefaultContainer.prototype.get = function get(annotatedDep /*: DependencyKey*/) { | ||
var dep = this.getProvider(annotatedDep); | ||
DefaultContainer.prototype.get = function get(key /*: DependencyKey*/) { | ||
var dep = this.getProvider(key); | ||
if (!dep.isCached) { | ||
@@ -146,14 +146,14 @@ dep.update(); | ||
DefaultContainer.prototype.beginInitialize = function beginInitialize(annotatedDep /*: DependencyKey*/, provider /*: Provider*/) { | ||
this._privateCache.set(annotatedDep, provider); | ||
this._providerCache.set(annotatedDep, provider); | ||
DefaultContainer.prototype.beginInitialize = function beginInitialize(key /*: DependencyKey*/, provider /*: Provider*/) { | ||
this._privateCache.set(key, provider); | ||
this._providerCache.set(key, provider); | ||
this._updater.begin(provider); | ||
}; | ||
DefaultContainer.prototype.hasProvider = function hasProvider(annotatedDep /*: DependencyKey*/) { | ||
return this._annotations.has(annotatedDep); | ||
DefaultContainer.prototype.hasProvider = function hasProvider(key /*: DependencyKey*/) { | ||
return this._annotations.has(key); | ||
}; | ||
DefaultContainer.prototype.getProvider = function getProvider(annotatedDep /*: DependencyKey*/) { | ||
var provider /*: ?Provider*/ = this._providerCache.get(annotatedDep); | ||
DefaultContainer.prototype.getProvider = function getProvider(key /*: DependencyKey*/) { | ||
var provider /*: ?Provider*/ = this._providerCache.get(key); | ||
@@ -168,9 +168,9 @@ if (provider) { | ||
var annotation /*: ?Annotation*/ = this._annotations.get(annotatedDep); | ||
var annotation /*: ?Annotation*/ = this._annotations.get(key); | ||
if (!annotation) { | ||
if (!this.parent) { | ||
throw new Error('Can\'t find annotation for ' + (0, _getFunctionName2.default)(annotatedDep)); | ||
throw new Error('Can\'t find annotation for ' + (0, _getFunctionName2.default)(key)); | ||
} | ||
provider = this.parent.getProvider(annotatedDep); | ||
this._providerCache.set(annotatedDep, provider); | ||
provider = this.parent.getProvider(key); | ||
this._providerCache.set(key, provider); | ||
return provider; | ||
@@ -186,3 +186,3 @@ } | ||
provider = plugin.createProvider(annotation, this, this._initState.get(annotatedDep)); | ||
provider = plugin.createProvider(annotation, this, this._initState.get(key)); | ||
@@ -193,3 +193,3 @@ if (l !== updater.length) { | ||
this._providerCache.set(annotatedDep, provider); | ||
this._providerCache.set(key, provider); | ||
@@ -196,0 +196,0 @@ return provider; |
@@ -15,3 +15,3 @@ 'use strict'; | ||
DependencyKey | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
function normalizeMiddlewares(raw /*: Array<[DependencyKey, Array<Tag|DependencyKey>]>*/) /*: Map<DependencyKey|Tag, Array<DependencyKey>>*/ { | ||
@@ -18,0 +18,0 @@ var middlewareMap /*: Map<DependencyKey|Tag, Array<DependencyKey>>*/ = new _SimpleMap2.default(); |
@@ -11,3 +11,3 @@ 'use strict'; | ||
RelationUpdater | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -14,0 +14,0 @@ var DummyRelationUpdater = function () { |
@@ -17,3 +17,3 @@ 'use strict'; | ||
RelationUpdater | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -20,0 +20,0 @@ var HotRelationUpdater = function () { |
@@ -11,5 +11,6 @@ 'use strict'; | ||
RawAnnotation, | ||
Dependency, | ||
DependencyKey | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
function alias(target /*: DependencyKey*/, aliasTarget /*: DependencyKey*/) /*: RawAnnotation*/ { | ||
} from 'reactive-di'*/ | ||
function alias(target /*: Dependency*/, aliasTarget /*: DependencyKey*/) /*: RawAnnotation*/ { | ||
return { | ||
@@ -16,0 +17,0 @@ kind: 'alias', |
@@ -8,8 +8,8 @@ 'use strict'; | ||
/*:: import type {AliasAnnotation} from 'reactive-di/i/pluginsInterfaces'*/ | ||
/*:: import type { | ||
AliasAnnotation, | ||
Container, | ||
Provider, | ||
Plugin | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -16,0 +16,0 @@ var AliasPlugin = function () { |
@@ -18,4 +18,4 @@ 'use strict'; | ||
/*:: import type {ClassAnnotation} from 'reactive-di/i/pluginsInterfaces'*/ | ||
/*:: import type { | ||
ClassAnnotation, | ||
ArgumentHelper, | ||
@@ -25,3 +25,3 @@ PassiveProvider, | ||
Plugin | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -28,0 +28,0 @@ var ClassProvider = function (_BaseProvider) { |
@@ -13,3 +13,3 @@ 'use strict'; | ||
RawAnnotation | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
function klass(target /*: Dependency*/) /*: RawAnnotation*/ { | ||
@@ -16,0 +16,0 @@ for (var _len = arguments.length, deps = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { |
@@ -12,3 +12,3 @@ 'use strict'; | ||
DepItem | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
function compose(target /*: Function*/) /*: RawAnnotation*/ { | ||
@@ -15,0 +15,0 @@ for (var _len = arguments.length, deps = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { |
@@ -18,4 +18,4 @@ 'use strict'; | ||
/*:: import type {ComposeAnnotation} from 'reactive-di/i/pluginsInterfaces'*/ | ||
/*:: import type { | ||
ComposeAnnotation, | ||
DepFn, | ||
@@ -26,3 +26,3 @@ Container, | ||
Plugin | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -29,0 +29,0 @@ var ComposeProvider = function (_BaseProvider) { |
@@ -29,3 +29,3 @@ 'use strict'; | ||
CreatePlugin | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -32,0 +32,0 @@ |
@@ -12,3 +12,3 @@ 'use strict'; | ||
DepItem | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
function factory(target /*: Function*/) /*: RawAnnotation*/ { | ||
@@ -15,0 +15,0 @@ for (var _len = arguments.length, deps = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { |
@@ -18,4 +18,4 @@ 'use strict'; | ||
/*:: import type {FactoryAnnotation} from 'reactive-di/i/pluginsInterfaces'*/ | ||
/*:: import type { | ||
FactoryAnnotation, | ||
ArgumentHelper, | ||
@@ -25,3 +25,3 @@ Container, | ||
Plugin | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -28,0 +28,0 @@ var FactoryProvider = function (_BaseProvider) { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
Dependency | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -22,0 +22,0 @@ |
@@ -11,6 +11,5 @@ 'use strict'; | ||
RawAnnotation, | ||
Dependency, | ||
DependencyKey | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
function value(target /*: DependencyKey*/, val /*: any*/) /*: RawAnnotation*/ { | ||
Dependency | ||
} from 'reactive-di'*/ | ||
function value(target /*: Dependency*/, val /*: any*/) /*: RawAnnotation*/ { | ||
return { | ||
@@ -17,0 +16,0 @@ kind: 'value', |
@@ -19,9 +19,7 @@ 'use strict'; | ||
/*:: import type { | ||
ValueAnnotation | ||
} from 'reactive-di/i/pluginsInterfaces'*/ | ||
/*:: import type { | ||
ValueAnnotation, | ||
Plugin, | ||
Container, | ||
PassiveProvider | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -28,0 +26,0 @@ var ValueProvider = function (_BaseProvider) { |
@@ -10,5 +10,4 @@ 'use strict'; | ||
Target, | ||
Metadata, | ||
MetadataDriver | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
@@ -38,3 +37,3 @@ | ||
var ReflectMetaDataDriver = function () { | ||
function ReflectMetaDataDriver /*:: <K: Symbol|string>*/(metadataKey /*: K*/) { | ||
function ReflectMetaDataDriver /*:: <K: Symbol|string, Metadata>*/(metadataKey /*: K*/) { | ||
_classCallCheck(this, ReflectMetaDataDriver); | ||
@@ -63,3 +62,3 @@ | ||
var EmulatedMetaDataDriver = function () { | ||
function EmulatedMetaDataDriver /*:: <K: Symbol|string>*/(metadataKey /*: K*/) { | ||
function EmulatedMetaDataDriver /*:: <K: Symbol|string, Metadata>*/(metadataKey /*: K*/) { | ||
_classCallCheck(this, EmulatedMetaDataDriver); | ||
@@ -66,0 +65,0 @@ |
@@ -16,3 +16,3 @@ 'use strict'; | ||
Plugin | ||
} from 'reactive-di/i/coreInterfaces'*/ | ||
} from 'reactive-di'*/ | ||
function createPluginsMap(createContainerManager /*: CreateContainerManager*/, plugins /*: Array<CreatePlugin>*/) /*: Map<string, Plugin>*/ { | ||
@@ -19,0 +19,0 @@ var pluginMap /*: Map<string, Plugin>*/ = new _SimpleMap2.default(); |
{ | ||
"name": "reactive-di", | ||
"version": "1.1.4", | ||
"version": "1.1.6", | ||
"description": "Reactive dependency injection", | ||
@@ -56,5 +56,4 @@ "publishConfig": { | ||
"LICENSE", | ||
"lib", | ||
"dist", | ||
"i" | ||
"flow-typed", | ||
"dist" | ||
], | ||
@@ -61,0 +60,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2473
228565
89