From 4aa2eaf8de206cf20cdd25f9610c384373cb8137 Mon Sep 17 00:00:00 2001 From: Yong Huang Date: Fri, 13 Jan 2017 17:38:26 +0800 Subject: [PATCH 1/2] add strict null check --- index.d.ts | 23 +++++++++++- index.js | 6 +-- index.ts | 4 +- package.json | 3 +- spec/index.js | 78 +++++++++++++++++++-------------------- spec/index.ts | 42 ++++++++++----------- spec/serialize.js | 94 +++++++++++++++++++++++------------------------ spec/serialize.ts | 2 +- tsconfig.json | 3 +- 9 files changed, 139 insertions(+), 116 deletions(-) diff --git a/index.d.ts b/index.d.ts index e0f3f28..f2cf2b4 100644 --- a/index.d.ts +++ b/index.d.ts @@ -8,17 +8,30 @@ import { IDecoratorMetaData } from './'; export interface IGenericObject { [key: string]: any; } +/** + * When custom mapping of a property is required. + * + * @interface + */ +export interface ICustomConverter { + fromJson(data: any): any; + toJson(data: any): any; +} /** * IDecoratorMetaData * DecoratorConstraint * * @interface + * @property {ICustomConverter} customConverter, will be used for mapping the property, if specified + * @property {boolean} excludeToJson, will exclude the property for serialization, if true */ export interface IDecoratorMetaData { name?: string; clazz?: { new (): T; }; + customConverter?: ICustomConverter; + excludeToJson?: boolean; } /** * JsonProperty @@ -39,4 +52,12 @@ export declare function JsonProperty(metadata?: IDecoratorMetaData | strin */ export declare function deserialize(Clazz: { new (): T; -}, json: IGenericObject): T; +}, json: IGenericObject): T | undefined; +/** + * Serialize: Creates a ready-for-json-serialization object from the provided model instance. + * Only @JsonProperty decorated properties in the model instance are processed. + * + * @param instance an instance of a model class + * @returns {any} an object ready to be serialized to JSON + */ +export declare function serialize(instance: any): any; diff --git a/index.js b/index.js index fa42fbc..85c1d07 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ "use strict"; -require('reflect-metadata'); -var utils_1 = require('./libs/utils'); +require("reflect-metadata"); +var utils_1 = require("./libs/utils"); /** * Decorator variable name * @@ -76,7 +76,7 @@ function getJsonProperty(target, propertyKey) { function hasAnyNullOrUndefined() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { - args[_i - 0] = arguments[_i]; + args[_i] = arguments[_i]; } return args.some(function (arg) { return arg === null || arg === undefined; }); } diff --git a/index.ts b/index.ts index 568e7b4..b796fcf 100644 --- a/index.ts +++ b/index.ts @@ -131,7 +131,7 @@ function mapFromJson(decoratorMetadata: IDecoratorMetaData, instance: T, if (metadata && metadata.clazz || isPrimitiveOrPrimitiveClass(clazz)) { if (innerJson && isArrayOrArrayClass(innerJson)) { return innerJson.map( - (item: any) => deserialize(metadata.clazz, item) + (item: any) => deserialize(metadata.clazz!, item) ); } return; @@ -156,7 +156,7 @@ function mapFromJson(decoratorMetadata: IDecoratorMetaData, instance: T, * * @return {T} return mapped object */ -export function deserialize(Clazz: {new(): T}, json: IGenericObject): T { +export function deserialize(Clazz: {new(): T}, json: IGenericObject): T | undefined { /** * As it is a recursive function, ignore any arguments that are unset */ diff --git a/package.json b/package.json index 293209f..4efb965 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ }, "devDependencies": { "chai": "~1.8.0", - "mocha": "2.0.1" + "mocha": "2.0.1", + "typescript": "^2.1.5" }, "scripts": { "test": "mocha ./spec/*.js", diff --git a/spec/index.js b/spec/index.js index db7db24..6259447 100644 --- a/spec/index.js +++ b/spec/index.js @@ -8,24 +8,24 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; -var chai_1 = require('chai'); -var index_1 = require('../index'); -var dateconverter_1 = require('./common/dateconverter'); +var chai_1 = require("chai"); +var index_1 = require("../index"); +var dateconverter_1 = require("./common/dateconverter"); var Student = (function () { function Student() { this.dateOfBirth = undefined; this.fullName = void 0; } - __decorate([ - index_1.JsonProperty('name'), - __metadata('design:type', String) - ], Student.prototype, "fullName", void 0); - __decorate([ - index_1.JsonProperty({ name: 'dob', customConverter: dateconverter_1.default }), - __metadata('design:type', Date) - ], Student.prototype, "dateOfBirth", void 0); return Student; }()); +__decorate([ + index_1.JsonProperty('name'), + __metadata("design:type", String) +], Student.prototype, "fullName", void 0); +__decorate([ + index_1.JsonProperty({ name: 'dob', customConverter: dateconverter_1.default }), + __metadata("design:type", Date) +], Student.prototype, "dateOfBirth", void 0); var Address = (function () { function Address() { this.firstLine = void 0; @@ -33,20 +33,20 @@ var Address = (function () { this.city = void 0; this.student = void 0; } - __decorate([ - index_1.JsonProperty('first-line'), - __metadata('design:type', String) - ], Address.prototype, "firstLine", void 0); - __decorate([ - index_1.JsonProperty('second-line'), - __metadata('design:type', String) - ], Address.prototype, "secondLine", void 0); - __decorate([ - index_1.JsonProperty({ clazz: Student }), - __metadata('design:type', Student) - ], Address.prototype, "student", void 0); return Address; }()); +__decorate([ + index_1.JsonProperty('first-line'), + __metadata("design:type", String) +], Address.prototype, "firstLine", void 0); +__decorate([ + index_1.JsonProperty('second-line'), + __metadata("design:type", String) +], Address.prototype, "secondLine", void 0); +__decorate([ + index_1.JsonProperty({ clazz: Student }), + __metadata("design:type", Student) +], Address.prototype, "student", void 0); var Person = (function () { function Person() { this.name = void 0; @@ -55,24 +55,24 @@ var Person = (function () { this.addressArr = void 0; this.address = void 0; } - __decorate([ - index_1.JsonProperty('Name'), - __metadata('design:type', String) - ], Person.prototype, "name", void 0); - __decorate([ - index_1.JsonProperty('xing'), - __metadata('design:type', String) - ], Person.prototype, "surname", void 0); - __decorate([ - index_1.JsonProperty({ clazz: Address, name: 'AddressArr' }), - __metadata('design:type', Array) - ], Person.prototype, "addressArr", void 0); - __decorate([ - index_1.JsonProperty({ clazz: Address, name: 'Address' }), - __metadata('design:type', Address) - ], Person.prototype, "address", void 0); return Person; }()); +__decorate([ + index_1.JsonProperty('Name'), + __metadata("design:type", String) +], Person.prototype, "name", void 0); +__decorate([ + index_1.JsonProperty('xing'), + __metadata("design:type", String) +], Person.prototype, "surname", void 0); +__decorate([ + index_1.JsonProperty({ clazz: Address, name: 'AddressArr' }), + __metadata("design:type", Array) +], Person.prototype, "addressArr", void 0); +__decorate([ + index_1.JsonProperty({ clazz: Address, name: 'Address' }), + __metadata("design:type", Address) +], Person.prototype, "address", void 0); describe('index()', function () { it('simple json object #1', function () { var json = { diff --git a/spec/index.ts b/spec/index.ts index 2cd3782..6824f5b 100644 --- a/spec/index.ts +++ b/spec/index.ts @@ -4,10 +4,10 @@ import dateConverter from './common/dateconverter' class Student { @JsonProperty('name') - fullName: string; + fullName?: string; @JsonProperty({name: 'dob', customConverter: dateConverter}) - dateOfBirth: Date = undefined; + dateOfBirth?: Date = undefined; constructor() { this.fullName = void 0; @@ -16,12 +16,12 @@ class Student { class Address { @JsonProperty('first-line') - firstLine: string; + firstLine?: string; @JsonProperty('second-line') - secondLine: string; + secondLine?: string; @JsonProperty({clazz: Student}) - student: Student; - city: string; + student?: Student; + city?: string; constructor() { this.firstLine = void 0; @@ -34,14 +34,14 @@ class Address { class Person { @JsonProperty('Name') - name: string; + name?: string; @JsonProperty('xing') - surname: string; - age: number; + surname?: string; + age?: number; @JsonProperty({clazz: Address, name: 'AddressArr'}) - addressArr: Address[]; + addressArr?: Address[]; @JsonProperty({clazz: Address, name: 'Address'}) - address: Address; + address?: Address; constructor() { this.name = void 0; @@ -61,7 +61,7 @@ describe('index()', function () { "AddressArr": [] as Array, "Address": null as any }; - const person = deserialize(Person, json); + const person = deserialize(Person, json)!; expect(person.address).to.be.equals(void 0); expect(person.name).to.be.equal("Mark"); expect(person.surname).to.be.equal("Galea"); @@ -77,12 +77,12 @@ describe('index()', function () { name: "Ailun" } }; - const address = deserialize(Address, addressjson); + const address = deserialize(Address, addressjson)!; expect(address.firstLine).to.be.equal("Some where"); expect(address.secondLine).to.be.equal("Over Here"); expect(address.city).to.be.equal("In This City"); expect(address.student).to.be.an('object'); - expect(address.student.fullName).to.be.equal('Ailun'); + expect(address.student!.fullName).to.be.equal('Ailun'); }); it('complex json object #1', function () { @@ -117,18 +117,18 @@ describe('index()', function () { } } }; - const person = deserialize(Person, json); + const person = deserialize(Person, json)!; expect(person.address).to.be.an.instanceOf(Address); expect(person.age).to.be.a('number'); expect(person.name).to.be.a('string'); expect(person.address).to.be.an('object'); - expect(person.addressArr.length).to.be.equals(2); - expect(person.address.student.fullName).to.be.equals('Ailun'); + expect(person.addressArr!.length).to.be.equals(2); + expect(person.address!.student!.fullName).to.be.equals('Ailun'); }); it('empty json object #1', function () { let json = {}; - const person = deserialize(Person, json); + const person = deserialize(Person, json)!; expect(person.address).to.be.equal(void 0); expect(person.name).to.be.equal(void 0); expect(person.surname).to.be.equal(void 0); @@ -169,7 +169,7 @@ describe('index()', function () { let json = { "NameTest": "Mark", }; - const person = deserialize(Person, json); + const person = deserialize(Person, json)!; expect(person.name).to.be.equals(void 0); }); @@ -178,9 +178,9 @@ describe('index()', function () { "name": "John Doe", dob: "1995-11-10" }; - const student = deserialize(Student, json); + const student = deserialize(Student, json)!; expect(student.fullName).to.be.equals('John Doe'); expect(student.dateOfBirth).to.be.instanceof(Date); - expect(student.dateOfBirth.toString()).to.equal(new Date("1995-11-10").toString()); + expect(student.dateOfBirth!.toString()).to.equal(new Date("1995-11-10").toString()); }); }); diff --git a/spec/serialize.js b/spec/serialize.js index f1398f1..1caa0d6 100644 --- a/spec/serialize.js +++ b/spec/serialize.js @@ -8,21 +8,21 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; -var chai_1 = require('chai'); -var index_1 = require('../index'); -var dateconverter_1 = require('./common/dateconverter'); +var chai_1 = require("chai"); +var index_1 = require("../index"); +var dateconverter_1 = require("./common/dateconverter"); describe('serialize', function () { it('should use the property name given in the meta data', function () { var ClassWithPrimitiveProp = (function () { function ClassWithPrimitiveProp() { this.name = undefined; } - __decorate([ - index_1.JsonProperty('theName'), - __metadata('design:type', String) - ], ClassWithPrimitiveProp.prototype, "name", void 0); return ClassWithPrimitiveProp; }()); + __decorate([ + index_1.JsonProperty('theName'), + __metadata("design:type", String) + ], ClassWithPrimitiveProp.prototype, "name", void 0); var instance = new ClassWithPrimitiveProp(); instance.name = 'Jim'; var serializedInstance = index_1.serialize(instance); @@ -36,12 +36,12 @@ describe('serialize', function () { function PrimitiveProp() { this.someProp = primitiveType; } - __decorate([ - index_1.JsonProperty('someProp'), - __metadata('design:type', Object) - ], PrimitiveProp.prototype, "someProp", void 0); return PrimitiveProp; }()); + __decorate([ + index_1.JsonProperty('someProp'), + __metadata("design:type", Object) + ], PrimitiveProp.prototype, "someProp", void 0); var instance = new PrimitiveProp(); // instance.someProp = primitiveType; var serializedInstance = index_1.serialize(instance); @@ -54,12 +54,12 @@ describe('serialize', function () { function ClassWithUnspecObject() { this.date = new Date(); } - __decorate([ - index_1.JsonProperty('date'), - __metadata('design:type', Date) - ], ClassWithUnspecObject.prototype, "date", void 0); return ClassWithUnspecObject; }()); + __decorate([ + index_1.JsonProperty('date'), + __metadata("design:type", Date) + ], ClassWithUnspecObject.prototype, "date", void 0); var instance = new ClassWithUnspecObject(); var serializedInstance = index_1.serialize(instance); chai_1.expect(serializedInstance.date).to.equal(instance.date); @@ -69,12 +69,12 @@ describe('serialize', function () { function ClassWithCustomConv() { this.date = new Date(); } - __decorate([ - index_1.JsonProperty({ name: 'date', customConverter: dateconverter_1.default }), - __metadata('design:type', Date) - ], ClassWithCustomConv.prototype, "date", void 0); return ClassWithCustomConv; }()); + __decorate([ + index_1.JsonProperty({ name: 'date', customConverter: dateconverter_1.default }), + __metadata("design:type", Date) + ], ClassWithCustomConv.prototype, "date", void 0); var instance = new ClassWithCustomConv(); var serializedInstance = index_1.serialize(instance); chai_1.expect(serializedInstance.date).to.equal('some-date'); @@ -85,16 +85,16 @@ describe('serialize', function () { this.name = 'John'; this.lastName = 'Doe'; } - __decorate([ - index_1.JsonProperty('name'), - __metadata('design:type', String) - ], ClassWithExcludedProp.prototype, "name", void 0); - __decorate([ - index_1.JsonProperty({ name: 'lastName', excludeToJson: true }), - __metadata('design:type', String) - ], ClassWithExcludedProp.prototype, "lastName", void 0); return ClassWithExcludedProp; }()); + __decorate([ + index_1.JsonProperty('name'), + __metadata("design:type", String) + ], ClassWithExcludedProp.prototype, "name", void 0); + __decorate([ + index_1.JsonProperty({ name: 'lastName', excludeToJson: true }), + __metadata("design:type", String) + ], ClassWithExcludedProp.prototype, "lastName", void 0); var instance = new ClassWithExcludedProp(); var serializedInstance = index_1.serialize(instance); chai_1.expect(serializedInstance.name).to.equal('John'); @@ -105,22 +105,22 @@ describe('serialize', function () { function OtherClass() { this.date = new Date(); } - __decorate([ - index_1.JsonProperty({ name: 'date', customConverter: dateconverter_1.default }), - __metadata('design:type', Date) - ], OtherClass.prototype, "date", void 0); return OtherClass; }()); + __decorate([ + index_1.JsonProperty({ name: 'date', customConverter: dateconverter_1.default }), + __metadata("design:type", Date) + ], OtherClass.prototype, "date", void 0); var ClassWithClassProp = (function () { function ClassWithClassProp() { this.other = new OtherClass(); } - __decorate([ - index_1.JsonProperty({ name: 'other', clazz: OtherClass }), - __metadata('design:type', OtherClass) - ], ClassWithClassProp.prototype, "other", void 0); return ClassWithClassProp; }()); + __decorate([ + index_1.JsonProperty({ name: 'other', clazz: OtherClass }), + __metadata("design:type", OtherClass) + ], ClassWithClassProp.prototype, "other", void 0); var instance = new ClassWithClassProp(); var serializedInstance = index_1.serialize(instance); chai_1.expect(serializedInstance.other.date).to.equal('some-date'); @@ -131,12 +131,12 @@ describe('serialize', function () { function ClassWithArrayProp() { this.items = [new Date(), new Date()]; } - __decorate([ - index_1.JsonProperty('items'), - __metadata('design:type', Array) - ], ClassWithArrayProp.prototype, "items", void 0); return ClassWithArrayProp; }()); + __decorate([ + index_1.JsonProperty('items'), + __metadata("design:type", Array) + ], ClassWithArrayProp.prototype, "items", void 0); var instance = new ClassWithArrayProp(); var serializedInstance = index_1.serialize(instance); chai_1.expect(serializedInstance.items).to.be.instanceof(Array); @@ -149,22 +149,22 @@ describe('serialize', function () { function OtherClass() { this.date = new Date(); } - __decorate([ - index_1.JsonProperty({ name: 'date', customConverter: dateconverter_1.default }), - __metadata('design:type', Date) - ], OtherClass.prototype, "date", void 0); return OtherClass; }()); + __decorate([ + index_1.JsonProperty({ name: 'date', customConverter: dateconverter_1.default }), + __metadata("design:type", Date) + ], OtherClass.prototype, "date", void 0); var ClassWithArrayProp = (function () { function ClassWithArrayProp() { this.items = [new OtherClass(), new OtherClass()]; } - __decorate([ - index_1.JsonProperty({ name: 'items', clazz: OtherClass }), - __metadata('design:type', Array) - ], ClassWithArrayProp.prototype, "items", void 0); return ClassWithArrayProp; }()); + __decorate([ + index_1.JsonProperty({ name: 'items', clazz: OtherClass }), + __metadata("design:type", Array) + ], ClassWithArrayProp.prototype, "items", void 0); var instance = new ClassWithArrayProp(); var serializedInstance = index_1.serialize(instance); chai_1.expect(serializedInstance.items).to.be.instanceof(Array); diff --git a/spec/serialize.ts b/spec/serialize.ts index c53dbde..1ae3654 100644 --- a/spec/serialize.ts +++ b/spec/serialize.ts @@ -7,7 +7,7 @@ describe('serialize', function () { it('should use the property name given in the meta data', function () { class ClassWithPrimitiveProp { @JsonProperty('theName') - name: string = undefined; + name?: string = undefined; } const instance = new ClassWithPrimitiveProp(); instance.name = 'Jim'; diff --git a/tsconfig.json b/tsconfig.json index 833260a..d740b40 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,8 @@ "sourceMap": true, "experimentalDecorators": true, "emitDecoratorMetadata": true, - "noImplicitAny": true + "noImplicitAny": true, + "strictNullChecks": true }, "exclude": [ "node_modules" From 820e248e5b2c28ac5a205ad44204a05b129453ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=9A=E5=90=8D?= Date: Fri, 27 Dec 2019 15:11:08 +0800 Subject: [PATCH 2/2] add local changes --- .gitignore | 4 ++ package.json | 7 +-- tsconfig.json | 6 ++- yarn.lock | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 140 insertions(+), 4 deletions(-) create mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore index 1fa7ead..a47b8a9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,10 @@ #libraries node_modules +build + +npm-debug.log + #ide settings .idea .log diff --git a/package.json b/package.json index 193d7e3..e834800 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "json-typescript-mapper", - "version": "1.1.3", + "name": "@qunhe/json-typescript-mapper", + "version": "1.1.4", "typescript": { "definition": "index.d.ts" }, @@ -14,7 +14,8 @@ }, "scripts": { "test": "mocha ./spec/*.js", - "typings:generate": "tsc --declaration" + "typings:generate": "rm -rf build && tsc --outDir build --declaration", + "do-publish": "npm run typings:generate && cp package.json ./build && cd build && npm publish && cd -" }, "description": "For single page application, data sources are obtained from API server. Instead of directly using api data, we \r definitely require an adapter layer to transform data as needed. Furthermore, \r the adapter inverse the the data dependency from API server(API Server is considered uncontrollable and \r highly unreliable as data structure may be edit by backend coder for some specific purposes)to our adapter \r which becomes reliable. Thus, this library is created as the adapter make use of es7 reflect decorator.", "main": "index.js", diff --git a/tsconfig.json b/tsconfig.json index d740b40..d002b47 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,11 @@ "experimentalDecorators": true, "emitDecoratorMetadata": true, "noImplicitAny": true, - "strictNullChecks": true + "strictNullChecks": true, + "lib": [ + "es2017", + "dom" + ] }, "exclude": [ "node_modules" diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..c06aa57 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,127 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +assertion-error@1.0.0: + version "1.0.0" + resolved "http://npm-registry.qunhequnhe.com/assertion-error/download/assertion-error-1.0.0.tgz#c7f85438fdd466bc7ca16ab90c81513797a5d23b" + +chai@~1.8.0: + version "1.8.1" + resolved "http://npm-registry.qunhequnhe.com/chai/download/chai-1.8.1.tgz#cc77866d5e7ebca2bd75144b1edc370a88785f72" + dependencies: + assertion-error "1.0.0" + deep-eql "0.1.3" + +commander@0.6.1: + version "0.6.1" + resolved "http://npm-registry.qunhequnhe.com/commander/download/commander-0.6.1.tgz#fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06" + +commander@2.3.0: + version "2.3.0" + resolved "http://npm-registry.qunhequnhe.com/commander/download/commander-2.3.0.tgz#fd430e889832ec353b9acd1de217c11cb3eef873" + +debug@2.0.0: + version "2.0.0" + resolved "http://npm-registry.qunhequnhe.com/debug/download/debug-2.0.0.tgz#89bd9df6732b51256bc6705342bba02ed12131ef" + dependencies: + ms "0.6.2" + +deep-eql@0.1.3: + version "0.1.3" + resolved "http://npm-registry.qunhequnhe.com/deep-eql/download/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2" + dependencies: + type-detect "0.1.1" + +diff@1.0.8: + version "1.0.8" + resolved "http://npm-registry.qunhequnhe.com/diff/download/diff-1.0.8.tgz#343276308ec991b7bc82267ed55bc1411f971666" + +escape-string-regexp@1.0.2: + version "1.0.2" + resolved "http://npm-registry.qunhequnhe.com/escape-string-regexp/download/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1" + +glob@3.2.3: + version "3.2.3" + resolved "http://npm-registry.qunhequnhe.com/glob/download/glob-3.2.3.tgz#e313eeb249c7affaa5c475286b0e115b59839467" + dependencies: + graceful-fs "~2.0.0" + inherits "2" + minimatch "~0.2.11" + +graceful-fs@~2.0.0: + version "2.0.3" + resolved "http://npm-registry.qunhequnhe.com/graceful-fs/download/graceful-fs-2.0.3.tgz#7cd2cdb228a4a3f36e95efa6cc142de7d1a136d0" + +growl@1.8.1: + version "1.8.1" + resolved "http://npm-registry.qunhequnhe.com/growl/download/growl-1.8.1.tgz#4b2dec8d907e93db336624dcec0183502f8c9428" + +inherits@2: + version "2.0.3" + resolved "http://npm-registry.qunhequnhe.com/inherits/download/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +jade@0.26.3: + version "0.26.3" + resolved "http://npm-registry.qunhequnhe.com/jade/download/jade-0.26.3.tgz#8f10d7977d8d79f2f6ff862a81b0513ccb25686c" + dependencies: + commander "0.6.1" + mkdirp "0.3.0" + +lru-cache@2: + version "2.7.3" + resolved "http://npm-registry.qunhequnhe.com/lru-cache/download/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" + +minimatch@~0.2.11: + version "0.2.14" + resolved "http://npm-registry.qunhequnhe.com/minimatch/download/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a" + dependencies: + lru-cache "2" + sigmund "~1.0.0" + +minimist@0.0.8: + version "0.0.8" + resolved "http://npm-registry.qunhequnhe.com/minimist/download/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +mkdirp@0.3.0: + version "0.3.0" + resolved "http://npm-registry.qunhequnhe.com/mkdirp/download/mkdirp-0.3.0.tgz#1bbf5ab1ba827af23575143490426455f481fe1e" + +mkdirp@0.5.0: + version "0.5.0" + resolved "http://npm-registry.qunhequnhe.com/mkdirp/download/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12" + dependencies: + minimist "0.0.8" + +mocha@2.0.1: + version "2.0.1" + resolved "http://npm-registry.qunhequnhe.com/mocha/download/mocha-2.0.1.tgz#5a16e88b856d0c4145d8c6888c27ebd4fab13e90" + dependencies: + commander "2.3.0" + debug "2.0.0" + diff "1.0.8" + escape-string-regexp "1.0.2" + glob "3.2.3" + growl "1.8.1" + jade "0.26.3" + mkdirp "0.5.0" + +ms@0.6.2: + version "0.6.2" + resolved "http://npm-registry.qunhequnhe.com/ms/download/ms-0.6.2.tgz#d89c2124c6fdc1353d65a8b77bf1aac4b193708c" + +reflect-metadata@^0.1.3: + version "0.1.10" + resolved "http://npm-registry.qunhequnhe.com/reflect-metadata/download/reflect-metadata-0.1.10.tgz#b4f83704416acad89988c9b15635d47e03b9344a" + +sigmund@~1.0.0: + version "1.0.1" + resolved "http://npm-registry.qunhequnhe.com/sigmund/download/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + +type-detect@0.1.1: + version "0.1.1" + resolved "http://npm-registry.qunhequnhe.com/type-detect/download/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822" + +typescript@^2.1.5: + version "2.6.2" + resolved "http://npm-registry.qunhequnhe.com/typescript/download/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4"