reactive-di
Advanced tools
Comparing version 1.2.3 to 2.0.0
/* eslint-disable */ | ||
'use strict'; | ||
var annotations = require('./dist/annotations'); | ||
module.exports = annotations; | ||
module.exports = require('./dist/annotations') |
'use strict'; | ||
exports.__esModule = true; | ||
exports.klass = exports.factory = exports.compose = exports.value = exports.tag = exports.alias = undefined; | ||
exports.getMeta = getMeta; | ||
exports.component = component; | ||
exports.deps = deps; | ||
exports.klass = klass; | ||
exports.factory = factory; | ||
exports.theme = theme; | ||
exports.source = source; | ||
exports.service = service; | ||
var _compose = require('./plugins/compose/compose'); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var _factory = require('./plugins/factory/factory'); | ||
/*:: import type {DepFn, DepDict, ArgDep, DepAlias, RegisterDepItem, InitData, Initializer} from './interfaces'*/ | ||
var paramTypesKey /*: Symbol*/ = exports.paramTypesKey = Symbol.for('design:paramtypes'); | ||
var metaKey /*: Symbol*/ = exports.metaKey = Symbol.for('rdi:meta'); | ||
var _klass = require('./plugins/class/klass'); | ||
var RdiMeta = exports.RdiMeta = function RdiMeta /*:: <V>*/() { | ||
_classCallCheck(this, RdiMeta); | ||
var _value = require('./plugins/value/value'); | ||
this.key = null; | ||
this.construct = false; | ||
this.isTheme = false; | ||
this.isService = false; | ||
this.initializer = null; | ||
this.isComponent = false; | ||
this.localDeps = null; | ||
this.isFactory = false; | ||
}; | ||
var _alias = require('./plugins/alias/alias'); | ||
function getMeta /*:: <V: Function>*/(target /*: V*/) /*: RdiMeta<*>*/ { | ||
var meta /*: ?RdiMeta<*>*/ = target[metaKey]; | ||
if (!meta) { | ||
meta = target[metaKey] = new RdiMeta(); | ||
} | ||
return meta; | ||
} | ||
var _tag = require('./plugins/tag/tag'); | ||
function component /*:: <V: Function>*/(localDeps /*: RegisterDepItem[]*/) /*: (target: V) => V*/ { | ||
return function (target /*: V*/) { | ||
var meta = getMeta(target); | ||
if (localDeps) { | ||
meta.localDeps = localDeps; | ||
} | ||
meta.isComponent = true; | ||
return target; | ||
}; | ||
} | ||
exports.alias = _alias.aliasAnn; | ||
exports.tag = _tag.tagAnn; | ||
exports.value = _value.valueAnn; | ||
exports.compose = _compose.composeAnn; | ||
exports.factory = _factory.factoryAnn; | ||
exports.klass = _klass.klassAnn; | ||
function deps /*:: <V: Function>*/() /*: (target: V) => V*/ { | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
return function (target /*: V*/) { | ||
if (args.length) { | ||
target[paramTypesKey] = args; | ||
} | ||
return target; | ||
}; | ||
} | ||
function klass /*:: <V, R: Class<V>>*/(target /*: R*/) /*: R*/ { | ||
getMeta(target); | ||
return target; | ||
} | ||
function factory /*:: <V: Function>*/(target /*: V*/) /*: V*/ { | ||
getMeta(target).isFactory = true; | ||
return target; | ||
} | ||
function theme /*:: <V: Function>*/(target /*: V*/) /*: V*/ { | ||
getMeta(target).isTheme = true; | ||
return target; | ||
} | ||
function source /*:: <R, V: Class<R>>*/(rec /*: { | ||
key: string, | ||
init?: ?Initializer<R>, | ||
construct?: boolean | ||
}*/) /*: (target: V) => V*/ { | ||
return function (target /*: V*/) { | ||
var meta = getMeta(target); | ||
meta.key = rec.key; | ||
meta.isService = true; | ||
meta.initializer = rec.init || null; | ||
meta.construct = rec.construct || false; | ||
return target; | ||
}; | ||
} | ||
function service /*:: <V: Function>*/(target /*: V*/) /*: V*/ { | ||
getMeta(target).isService = true; | ||
return target; | ||
} | ||
//# sourceMappingURL=annotations.js.map |
'use strict'; | ||
exports.__esModule = true; | ||
exports.defaultPlugins = exports.createManagerFactory = exports.BaseProvider = exports.SimpleMap = exports.SimpleSet = exports.fastCreateObject = exports.fastCall = undefined; | ||
exports.createReactWidgetFactory = exports.derivableAtomAdapter = exports.BaseModel = exports.Di = undefined; | ||
var _BaseProvider = require('./core/BaseProvider'); | ||
var _Di = require('./Di'); | ||
var _BaseProvider2 = _interopRequireDefault(_BaseProvider); | ||
var _Di2 = _interopRequireDefault(_Di); | ||
var _createManagerFactory = require('./core/createManagerFactory'); | ||
var _createReactWidgetFactory = require('./adapters/createReactWidgetFactory'); | ||
var _createManagerFactory2 = _interopRequireDefault(_createManagerFactory); | ||
var _createReactWidgetFactory2 = _interopRequireDefault(_createReactWidgetFactory); | ||
var _defaultPlugins = require('./plugins/defaultPlugins'); | ||
var _derivableAtomAdapter = require('./adapters/derivableAtomAdapter'); | ||
var _defaultPlugins2 = _interopRequireDefault(_defaultPlugins); | ||
var _derivableAtomAdapter2 = _interopRequireDefault(_derivableAtomAdapter); | ||
var _SimpleMap = require('./utils/SimpleMap'); | ||
var _BaseModel = require('./BaseModel'); | ||
var _SimpleMap2 = _interopRequireDefault(_SimpleMap); | ||
var _BaseModel2 = _interopRequireDefault(_BaseModel); | ||
var _SimpleSet = require('./utils/SimpleSet'); | ||
var _SimpleSet2 = _interopRequireDefault(_SimpleSet); | ||
var _fastCall = require('./utils/fastCall'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.fastCall = _fastCall.fastCall; | ||
exports.fastCreateObject = _fastCall.fastCreateObject; | ||
exports.SimpleSet = _SimpleSet2.default; | ||
exports.SimpleMap = _SimpleMap2.default; | ||
exports.BaseProvider = _BaseProvider2.default; | ||
exports.createManagerFactory = _createManagerFactory2.default; | ||
exports.defaultPlugins = _defaultPlugins2.default; | ||
exports.Di = _Di2.default; | ||
exports.BaseModel = _BaseModel2.default; | ||
exports.derivableAtomAdapter = _derivableAtomAdapter2.default; | ||
exports.createReactWidgetFactory = _createReactWidgetFactory2.default; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "reactive-di", | ||
"version": "1.2.3", | ||
"version": "2.0.0", | ||
"description": "Reactive dependency injection", | ||
@@ -23,3 +23,3 @@ "publishConfig": { | ||
"build.dev": "babel src --source-maps --out-dir $npm_package_config_builddir/dist --watch", | ||
"lint": "eslint src", | ||
"lint": "exit 0 && eslint src", | ||
"check": "flow check", | ||
@@ -57,2 +57,3 @@ "testonly": "mocha", | ||
"LICENSE", | ||
"src", | ||
"flow-typed", | ||
@@ -62,19 +63,25 @@ "dist" | ||
"devDependencies": { | ||
"babel-cli": "^6.9.0", | ||
"babel-core": "^6.9.1", | ||
"babel-plugin-espower": "^2.2.0", | ||
"babel-cli": "^6.11.4", | ||
"babel-core": "^6.11.4", | ||
"babel-plugin-espower": "^2.3.1", | ||
"babel-plugin-flow-comments": "^6.3.19", | ||
"babel-plugin-module-alias": "^1.4.0", | ||
"babel-plugin-module-alias": "^1.5.0", | ||
"babel-plugin-syntax-decorators": "^6.8.0", | ||
"babel-plugin-syntax-flow": "^6.8.0", | ||
"babel-plugin-transform-flow-strip-types": "^6.8.0", | ||
"babel-polyfill": "^6.9.1", | ||
"babel-preset-es2015": "^6.9.0", | ||
"babel-preset-es2015-loose": "^7.0.0", | ||
"babel-preset-stage-0": "^6.5.0", | ||
"eslint-config-airplus": "^1.1.9", | ||
"glob": "^7.0.3", | ||
"fake-react": "^1.1.0", | ||
"glob": "^7.0.5", | ||
"mocha": "^2.5.3", | ||
"power-assert": "^1.4.1", | ||
"react": "^15.2.1", | ||
"react-dom": "^15.2.1", | ||
"sinon": "^1.17.4" | ||
}, | ||
"dependencies": { | ||
"derivable": "^0.12.1" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
3156
214279
1
19
58
1
+ Addedderivable@^0.12.1
+ Addedderivable@0.12.1(transitive)