@daffodil/contact
Advanced tools
Comparing version 0.3.3 to 0.4.0
@@ -144,4 +144,77 @@ (function (global, factory) { | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var DaffInMemoryBackendContactService = /** @class */ (function () { | ||
function DaffInMemoryBackendContactService() { | ||
this.forums = []; | ||
} | ||
/** | ||
* @param {?} url | ||
* @param {?} utils | ||
* @return {?} | ||
*/ | ||
DaffInMemoryBackendContactService.prototype.parseRequestUrl = /** | ||
* @param {?} url | ||
* @param {?} utils | ||
* @return {?} | ||
*/ | ||
function (url, utils) { | ||
return utils.parseRequestUrl(url); | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
DaffInMemoryBackendContactService.prototype.createDb = /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
return { | ||
forums: this.forums | ||
}; | ||
}; | ||
//validate that its not empty | ||
//validate that it doesn't already exist | ||
//validate that its not empty | ||
//validate that it doesn't already exist | ||
/** | ||
* @param {?} reqInfo | ||
* @return {?} | ||
*/ | ||
DaffInMemoryBackendContactService.prototype.post = | ||
//validate that its not empty | ||
//validate that it doesn't already exist | ||
/** | ||
* @param {?} reqInfo | ||
* @return {?} | ||
*/ | ||
function (reqInfo) { | ||
if (reqInfo === undefined) { | ||
return Error('Payload is undefined'); | ||
} | ||
else if (this.forums.indexOf(reqInfo.body)) { | ||
return Error('Already contains submission'); | ||
} | ||
else { | ||
this.forums.push(reqInfo.body); | ||
return rxjs.of(reqInfo.body); | ||
} | ||
}; | ||
DaffInMemoryBackendContactService.decorators = [ | ||
{ type: core.Injectable, args: [{ | ||
providedIn: 'root' | ||
},] } | ||
]; | ||
/** @nocollapse */ DaffInMemoryBackendContactService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendContactService_Factory() { return new DaffInMemoryBackendContactService(); }, token: DaffInMemoryBackendContactService, providedIn: "root" }); | ||
return DaffInMemoryBackendContactService; | ||
}()); | ||
if (false) { | ||
/** @type {?} */ | ||
DaffInMemoryBackendContactService.prototype.forums; | ||
} | ||
exports.DaffContactInMemoryDriverModule = DaffContactInMemoryDriverModule; | ||
exports.DaffContactTestingDriverModule = DaffContactTestingDriverModule; | ||
exports.DaffInMemoryBackendContactService = DaffInMemoryBackendContactService; | ||
exports.ɵa = DaffTestingContactService; | ||
@@ -148,0 +221,0 @@ exports.ɵb = DaffInMemoryContactService; |
@@ -1,2 +0,2 @@ | ||
!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@angular/core"),require("@daffodil/contact"),require("rxjs"),require("rxjs/operators"),require("@angular/common"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("@daffodil/contact/testing",["exports","@angular/core","@daffodil/contact","rxjs","rxjs/operators","@angular/common","@angular/common/http"],o):o(((t=t||self).daffodil=t.daffodil||{},t.daffodil.contact=t.daffodil.contact||{},t.daffodil.contact.testing={}),t.ng.core,t.daffodil.contact,t.rxjs,t.rxjs.operators,t.ng.common,t.ng.common.http)}(this,function(t,o,e,n,r,i,a){"use strict";var c=function(){function t(){}return t.prototype.send=function(t){return n.of("Success").pipe(r.delay(10))},t.decorators=[{type:o.Injectable,args:[{providedIn:"root"}]}],t.ngInjectableDef=o.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}(),f=function(){function t(){}return t.forRoot=function(){return{ngModule:t,providers:[{provide:e.DaffContactDriver,useClass:c}]}},t.decorators=[{type:o.NgModule,args:[{imports:[i.CommonModule]}]}],t}(),u=function(){function t(t){this.http=t,this.url="/api/contact"}return t.prototype.send=function(t){return this.http.post(this.url,t)},t.decorators=[{type:o.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:a.HttpClient}]},t.ngInjectableDef=o.ɵɵdefineInjectable({factory:function(){return new t(o.ɵɵinject(a.HttpClient))},token:t,providedIn:"root"}),t}();var d=function(){function t(){}return t.forRoot=function(){return{ngModule:t,providers:[{provide:e.DaffContactDriver,useClass:u}]}},t.decorators=[{type:o.NgModule,args:[{imports:[i.CommonModule]}]}],t}();t.DaffContactInMemoryDriverModule=d,t.DaffContactTestingDriverModule=f,t.ɵa=c,t.ɵb=u,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(o,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@daffodil/contact"),require("rxjs"),require("rxjs/operators"),require("@angular/common"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("@daffodil/contact/testing",["exports","@angular/core","@daffodil/contact","rxjs","rxjs/operators","@angular/common","@angular/common/http"],t):t(((o=o||self).daffodil=o.daffodil||{},o.daffodil.contact=o.daffodil.contact||{},o.daffodil.contact.testing={}),o.ng.core,o.daffodil.contact,o.rxjs,o.rxjs.operators,o.ng.common,o.ng.common.http)}(this,function(o,t,e,r,n,i,a){"use strict";var c=function(){function o(){}return o.prototype.send=function(o){return r.of("Success").pipe(n.delay(10))},o.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],o.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new o},token:o,providedIn:"root"}),o}(),f=function(){function o(){}return o.forRoot=function(){return{ngModule:o,providers:[{provide:e.DaffContactDriver,useClass:c}]}},o.decorators=[{type:t.NgModule,args:[{imports:[i.CommonModule]}]}],o}(),u=function(){function o(o){this.http=o,this.url="/api/contact"}return o.prototype.send=function(o){return this.http.post(this.url,o)},o.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],o.ctorParameters=function(){return[{type:a.HttpClient}]},o.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new o(t.ɵɵinject(a.HttpClient))},token:o,providedIn:"root"}),o}();var d=function(){function o(){}return o.forRoot=function(){return{ngModule:o,providers:[{provide:e.DaffContactDriver,useClass:u}]}},o.decorators=[{type:t.NgModule,args:[{imports:[i.CommonModule]}]}],o}(),s=function(){function o(){this.forums=[]}return o.prototype.parseRequestUrl=function(o,t){return t.parseRequestUrl(o)},o.prototype.createDb=function(){return{forums:this.forums}},o.prototype.post=function(o){return void 0===o?Error("Payload is undefined"):this.forums.indexOf(o.body)?Error("Already contains submission"):(this.forums.push(o.body),r.of(o.body))},o.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],o.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new o},token:o,providedIn:"root"}),o}();o.DaffContactInMemoryDriverModule=d,o.DaffContactTestingDriverModule=f,o.DaffInMemoryBackendContactService=s,o.ɵa=c,o.ɵb=u,Object.defineProperty(o,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=daffodil-contact-testing.umd.min.js.map |
@@ -8,5 +8,5 @@ /** | ||
*/ | ||
export { DaffContactTestingDriverModule, DaffContactInMemoryDriverModule } from './index'; | ||
export { DaffContactTestingDriverModule, DaffContactInMemoryDriverModule, DaffInMemoryBackendContactService } from './index'; | ||
export { DaffInMemoryContactService as ɵb } from './drivers/in-memory/contact.service'; | ||
export { DaffTestingContactService as ɵa } from './drivers/testing/contact.service'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGFmZm9kaWwtY29udGFjdC10ZXN0aW5nLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGRhZmZvZGlsL2NvbnRhY3QvdGVzdGluZy8iLCJzb3VyY2VzIjpbImRhZmZvZGlsLWNvbnRhY3QtdGVzdGluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsZ0ZBQWMsU0FBUyxDQUFDO0FBRXhCLE9BQU8sRUFBQywwQkFBMEIsSUFBSSxFQUFFLEVBQUMsTUFBTSxxQ0FBcUMsQ0FBQztBQUNyRixPQUFPLEVBQUMseUJBQXlCLElBQUksRUFBRSxFQUFDLE1BQU0sbUNBQW1DLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0Ll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dC5zZXJ2aWNlJzsiXX0= |
@@ -7,2 +7,3 @@ /** | ||
export { DaffContactInMemoryDriverModule } from './drivers/in-memory/in-memory.module'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AZGFmZm9kaWwvY29udGFjdC90ZXN0aW5nLyIsInNvdXJjZXMiOlsiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSw4QkFBOEIsRUFBRSxNQUFNLGtDQUFrQyxDQUFDO0FBQ2xGLE9BQU8sRUFBRSwrQkFBK0IsRUFBRSxNQUFNLHNDQUFzQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHsgRGFmZkNvbnRhY3RUZXN0aW5nRHJpdmVyTW9kdWxlIH0gZnJvbSAnLi9kcml2ZXJzL3Rlc3RpbmcvdGVzdGluZy5tb2R1bGUnO1xuZXhwb3J0IHsgRGFmZkNvbnRhY3RJbk1lbW9yeURyaXZlck1vZHVsZSB9IGZyb20gJy4vZHJpdmVycy9pbi1tZW1vcnkvaW4tbWVtb3J5Lm1vZHVsZSc7Il19 | ||
export { DaffInMemoryBackendContactService } from './in-memory-backend/contact-in-memory-backend.service'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AZGFmZm9kaWwvY29udGFjdC90ZXN0aW5nLyIsInNvdXJjZXMiOlsiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSw4QkFBOEIsRUFBRSxNQUFNLGtDQUFrQyxDQUFDO0FBQ2xGLE9BQU8sRUFBRSwrQkFBK0IsRUFBRSxNQUFNLHNDQUFzQyxDQUFDO0FBQ3ZGLE9BQU8sRUFBRSxpQ0FBaUMsRUFBRSxNQUFNLHVEQUF1RCxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHsgRGFmZkNvbnRhY3RUZXN0aW5nRHJpdmVyTW9kdWxlIH0gZnJvbSAnLi9kcml2ZXJzL3Rlc3RpbmcvdGVzdGluZy5tb2R1bGUnO1xuZXhwb3J0IHsgRGFmZkNvbnRhY3RJbk1lbW9yeURyaXZlck1vZHVsZSB9IGZyb20gJy4vZHJpdmVycy9pbi1tZW1vcnkvaW4tbWVtb3J5Lm1vZHVsZSc7XG5leHBvcnQgeyBEYWZmSW5NZW1vcnlCYWNrZW5kQ29udGFjdFNlcnZpY2UgfSBmcm9tICcuL2luLW1lbW9yeS1iYWNrZW5kL2NvbnRhY3QtaW4tbWVtb3J5LWJhY2tlbmQuc2VydmljZSc7Il19 |
@@ -8,5 +8,5 @@ /** | ||
*/ | ||
export { DaffContactTestingDriverModule, DaffContactInMemoryDriverModule } from './index'; | ||
export { DaffContactTestingDriverModule, DaffContactInMemoryDriverModule, DaffInMemoryBackendContactService } from './index'; | ||
export { DaffInMemoryContactService as ɵb } from './drivers/in-memory/contact.service'; | ||
export { DaffTestingContactService as ɵa } from './drivers/testing/contact.service'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGFmZm9kaWwtY29udGFjdC10ZXN0aW5nLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGRhZmZvZGlsL2NvbnRhY3QvdGVzdGluZy8iLCJzb3VyY2VzIjpbImRhZmZvZGlsLWNvbnRhY3QtdGVzdGluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsZ0ZBQWMsU0FBUyxDQUFDO0FBRXhCLE9BQU8sRUFBQywwQkFBMEIsSUFBSSxFQUFFLEVBQUMsTUFBTSxxQ0FBcUMsQ0FBQztBQUNyRixPQUFPLEVBQUMseUJBQXlCLElBQUksRUFBRSxFQUFDLE1BQU0sbUNB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3J0IHtEYWZmVGVzdGluZ0NvbnRhY3RTZXJ2aWNlIGFzIMm1YX0gZnJvbSAnLi9kcml2ZXJzL3Rlc3RpbmcvY29udGFjdC5zZXJ2aWNlJzsiXX0= |
@@ -7,2 +7,3 @@ /** | ||
export { DaffContactInMemoryDriverModule } from './drivers/in-memory/in-memory.module'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AZGFmZm9kaWwvY29udGFjdC90ZXN0aW5nLyIsInNvdXJjZXMiOlsiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSw4QkFBOEIsRUFBRSxNQUFNLGtDQUFrQyxDQUFDO0FBQ2xGLE9BQU8sRUFBRSwrQkFBK0IsRUFBRSxNQUFNLHNDQUFzQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHsgRGFmZkNvbnRhY3RUZXN0aW5nRHJpdmVyTW9kdWxlIH0gZnJvbSAnLi9kcml2ZXJzL3Rlc3RpbmcvdGVzdGluZy5tb2R1bGUnO1xuZXhwb3J0IHsgRGFmZkNvbnRhY3RJbk1lbW9yeURyaXZlck1vZHVsZSB9IGZyb20gJy4vZHJpdmVycy9pbi1tZW1vcnkvaW4tbWVtb3J5Lm1vZHVsZSc7Il19 | ||
export { DaffInMemoryBackendContactService } from './in-memory-backend/contact-in-memory-backend.service'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AZGFmZm9kaWwvY29udGFjdC90ZXN0aW5nLyIsInNvdXJjZXMiOlsiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSw4QkFBOEIsRUFBRSxNQUFNLGtDQUFrQyxDQUFDO0FBQ2xGLE9BQU8sRUFBRSwrQkFBK0IsRUFBRSxNQUFNLHNDQUFzQyxDQUFDO0FBQ3ZGLE9BQU8sRUFBRSxpQ0FBaUMsRUFBRSxNQUFNLHVEQUF1RCxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHsgRGFmZkNvbnRhY3RUZXN0aW5nRHJpdmVyTW9kdWxlIH0gZnJvbSAnLi9kcml2ZXJzL3Rlc3RpbmcvdGVzdGluZy5tb2R1bGUnO1xuZXhwb3J0IHsgRGFmZkNvbnRhY3RJbk1lbW9yeURyaXZlck1vZHVsZSB9IGZyb20gJy4vZHJpdmVycy9pbi1tZW1vcnkvaW4tbWVtb3J5Lm1vZHVsZSc7XG5leHBvcnQgeyBEYWZmSW5NZW1vcnlCYWNrZW5kQ29udGFjdFNlcnZpY2UgfSBmcm9tICcuL2luLW1lbW9yeS1iYWNrZW5kL2NvbnRhY3QtaW4tbWVtb3J5LWJhY2tlbmQuc2VydmljZSc7Il19 |
@@ -128,2 +128,51 @@ import { Injectable, ɵɵdefineInjectable, NgModule, ɵɵinject } from '@angular/core'; | ||
*/ | ||
class DaffInMemoryBackendContactService { | ||
constructor() { | ||
this.forums = []; | ||
} | ||
/** | ||
* @param {?} url | ||
* @param {?} utils | ||
* @return {?} | ||
*/ | ||
parseRequestUrl(url, utils) { | ||
return utils.parseRequestUrl(url); | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
createDb() { | ||
return { | ||
forums: this.forums | ||
}; | ||
} | ||
//validate that its not empty | ||
//validate that it doesn't already exist | ||
/** | ||
* @param {?} reqInfo | ||
* @return {?} | ||
*/ | ||
post(reqInfo) { | ||
if (reqInfo === undefined) { | ||
return Error('Payload is undefined'); | ||
} | ||
else if (this.forums.indexOf(reqInfo.body)) { | ||
return Error('Already contains submission'); | ||
} | ||
else { | ||
this.forums.push(reqInfo.body); | ||
return of(reqInfo.body); | ||
} | ||
} | ||
} | ||
DaffInMemoryBackendContactService.decorators = [ | ||
{ type: Injectable, args: [{ | ||
providedIn: 'root' | ||
},] } | ||
]; | ||
/** @nocollapse */ DaffInMemoryBackendContactService.ngInjectableDef = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendContactService_Factory() { return new DaffInMemoryBackendContactService(); }, token: DaffInMemoryBackendContactService, providedIn: "root" }); | ||
if (false) { | ||
/** @type {?} */ | ||
DaffInMemoryBackendContactService.prototype.forums; | ||
} | ||
@@ -135,3 +184,8 @@ /** | ||
export { DaffContactInMemoryDriverModule, DaffContactTestingDriverModule, DaffTestingContactService as ɵa, DaffInMemoryContactService as ɵb }; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
export { DaffContactInMemoryDriverModule, DaffContactTestingDriverModule, DaffInMemoryBackendContactService, DaffTestingContactService as ɵa, DaffInMemoryContactService as ɵb }; | ||
//# sourceMappingURL=daffodil-contact-testing.js.map |
@@ -149,2 +149,69 @@ import { Injectable, ɵɵdefineInjectable, NgModule, ɵɵinject } from '@angular/core'; | ||
*/ | ||
var DaffInMemoryBackendContactService = /** @class */ (function () { | ||
function DaffInMemoryBackendContactService() { | ||
this.forums = []; | ||
} | ||
/** | ||
* @param {?} url | ||
* @param {?} utils | ||
* @return {?} | ||
*/ | ||
DaffInMemoryBackendContactService.prototype.parseRequestUrl = /** | ||
* @param {?} url | ||
* @param {?} utils | ||
* @return {?} | ||
*/ | ||
function (url, utils) { | ||
return utils.parseRequestUrl(url); | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
DaffInMemoryBackendContactService.prototype.createDb = /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
return { | ||
forums: this.forums | ||
}; | ||
}; | ||
//validate that its not empty | ||
//validate that it doesn't already exist | ||
//validate that its not empty | ||
//validate that it doesn't already exist | ||
/** | ||
* @param {?} reqInfo | ||
* @return {?} | ||
*/ | ||
DaffInMemoryBackendContactService.prototype.post = | ||
//validate that its not empty | ||
//validate that it doesn't already exist | ||
/** | ||
* @param {?} reqInfo | ||
* @return {?} | ||
*/ | ||
function (reqInfo) { | ||
if (reqInfo === undefined) { | ||
return Error('Payload is undefined'); | ||
} | ||
else if (this.forums.indexOf(reqInfo.body)) { | ||
return Error('Already contains submission'); | ||
} | ||
else { | ||
this.forums.push(reqInfo.body); | ||
return of(reqInfo.body); | ||
} | ||
}; | ||
DaffInMemoryBackendContactService.decorators = [ | ||
{ type: Injectable, args: [{ | ||
providedIn: 'root' | ||
},] } | ||
]; | ||
/** @nocollapse */ DaffInMemoryBackendContactService.ngInjectableDef = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendContactService_Factory() { return new DaffInMemoryBackendContactService(); }, token: DaffInMemoryBackendContactService, providedIn: "root" }); | ||
return DaffInMemoryBackendContactService; | ||
}()); | ||
if (false) { | ||
/** @type {?} */ | ||
DaffInMemoryBackendContactService.prototype.forums; | ||
} | ||
@@ -156,3 +223,8 @@ /** | ||
export { DaffContactInMemoryDriverModule, DaffContactTestingDriverModule, DaffTestingContactService as ɵa, DaffInMemoryContactService as ɵb }; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
export { DaffContactInMemoryDriverModule, DaffContactTestingDriverModule, DaffInMemoryBackendContactService, DaffTestingContactService as ɵa, DaffInMemoryContactService as ɵb }; | ||
//# sourceMappingURL=daffodil-contact-testing.js.map |
{ | ||
"name": "@daffodil/contact", | ||
"version": "0.3.3", | ||
"version": "0.4.0", | ||
"repository": { | ||
@@ -12,4 +12,4 @@ "type": "git", | ||
"peerDependencies": { | ||
"@daffodil/driver": "0.3.3", | ||
"@daffodil/core": "0.3.3", | ||
"@daffodil/driver": "0.4.0", | ||
"@daffodil/core": "0.4.0", | ||
"@angular/common": "^8.0.0", | ||
@@ -16,0 +16,0 @@ "@angular/core": "^8.0.0" |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"DaffContactTestingDriverModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":7,"character":4}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"DaffContactTestingDriverModule"},"providers":[{"provide":{"__symbolic":"reference","module":"@daffodil/contact","name":"DaffContactDriver","line":16,"character":19},"useClass":{"__symbolic":"reference","name":"ɵa"}}]}}}},"DaffContactInMemoryDriverModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":8,"character":4}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"DaffContactInMemoryDriverModule"},"providers":[{"provide":{"__symbolic":"reference","module":"@daffodil/contact","name":"DaffContactDriver","line":17,"character":19},"useClass":{"__symbolic":"reference","name":"ɵb"}}]}}}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"send":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":12,"character":28}]}],"send":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}}},"origins":{"DaffContactTestingDriverModule":"./drivers/testing/testing.module","DaffContactInMemoryDriverModule":"./drivers/in-memory/in-memory.module","ɵa":"./drivers/testing/contact.service","ɵb":"./drivers/in-memory/contact.service"},"importAs":"@daffodil/contact/testing"} | ||
{"__symbolic":"module","version":4,"metadata":{"DaffContactTestingDriverModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":7,"character":4}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"DaffContactTestingDriverModule"},"providers":[{"provide":{"__symbolic":"reference","module":"@daffodil/contact","name":"DaffContactDriver","line":16,"character":19},"useClass":{"__symbolic":"reference","name":"ɵa"}}]}}}},"DaffContactInMemoryDriverModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":8,"character":4}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"DaffContactInMemoryDriverModule"},"providers":[{"provide":{"__symbolic":"reference","module":"@daffodil/contact","name":"DaffContactDriver","line":17,"character":19},"useClass":{"__symbolic":"reference","name":"ɵb"}}]}}}},"DaffInMemoryBackendContactService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":5,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"parseRequestUrl":[{"__symbolic":"method"}],"createDb":[{"__symbolic":"method"}],"post":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"send":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":12,"character":28}]}],"send":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}}},"origins":{"DaffContactTestingDriverModule":"./drivers/testing/testing.module","DaffContactInMemoryDriverModule":"./drivers/in-memory/in-memory.module","DaffInMemoryBackendContactService":"./in-memory-backend/contact-in-memory-backend.service","ɵa":"./drivers/testing/contact.service","ɵb":"./drivers/in-memory/contact.service"},"importAs":"@daffodil/contact/testing"} |
export { DaffContactTestingDriverModule } from './drivers/testing/testing.module'; | ||
export { DaffContactInMemoryDriverModule } from './drivers/in-memory/in-memory.module'; | ||
export { DaffInMemoryBackendContactService } from './in-memory-backend/contact-in-memory-backend.service'; |
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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
316401
93
3725
0