@obelisk/ngx
Advanced tools
Comparing version 2.0.0-alpha.0 to 2.0.0-alpha.1
@@ -29,6 +29,6 @@ (function (global, factory) { | ||
this._namespace = options.host + "/" + options.realm + "/" + options.apiVersion + "/"; | ||
return this._client.init().pipe(operators.map(( /** | ||
return this._client.init().pipe(operators.flatMap(( /** | ||
* @param {?} ok | ||
* @return {?} | ||
*/function (ok) { return ok ? ( /** @type {?} */(_this._client)).getNewRpt() : rxjs.of(false); }))).toPromise(); | ||
*/function (ok) { return ok ? _this._client.getNewRpt() : rxjs.of(false); }))).toPromise(); | ||
}; | ||
@@ -35,0 +35,0 @@ Object.defineProperty(ObeliskService.prototype, "client", { |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@obelisk/client"),require("rxjs"),require("rxjs/operators"),require("@angular/common"),require("@angular/core")):"function"==typeof define&&define.amd?define("@obelisk/ngx",["exports","@obelisk/client","rxjs","rxjs/operators","@angular/common","@angular/core"],t):t((e.obelisk=e.obelisk||{},e.obelisk.ngx={}),e.client,e.rxjs,e.rxjs.operators,e.ng.common,e.ng.core)}(this,function(e,n,r,i,o,u){"use strict";var c=function(){function e(){this._client=null,this._namespace=null,this._events$=new r.ReplaySubject(1)}return e.prototype.initService=function(e){var t=this;return this._client=new n.IotClient(e,this._events$),this._namespace=e.host+"/"+e.realm+"/"+e.apiVersion+"/",this._client.init().pipe(i.map(function(e){return e?t._client.getNewRpt():r.of(!1)})).toPromise()},Object.defineProperty(e.prototype,"client",{get:function(){if(null==this._client)throw Error("Client not initialised, did you call init() first?");return this._client},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"namespace",{get:function(){return this._namespace},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"events$",{get:function(){return this._events$},enumerable:!0,configurable:!0}),e.decorators=[{type:u.Injectable}],e.ctorParameters=function(){return[]},e}(),s=new u.InjectionToken("OBELISK_OPTIONS"),t=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[c,{provide:s,useValue:e}]}},t.decorators=[{type:u.NgModule,args:[{imports:[o.CommonModule]}]}],t}();var l=[c,s];e.ObeliskService=c,e.factory=function a(e,t){return function(){return e.initService(t)}},e.OBELISK_OPTIONS=s,e.ObeliskNgxModule=t,e.OBELISK_DEPS=l,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@obelisk/client"),require("rxjs"),require("rxjs/operators"),require("@angular/common"),require("@angular/core")):"function"==typeof define&&define.amd?define("@obelisk/ngx",["exports","@obelisk/client","rxjs","rxjs/operators","@angular/common","@angular/core"],t):t((e.obelisk=e.obelisk||{},e.obelisk.ngx={}),e.client,e.rxjs,e.rxjs.operators,e.ng.common,e.ng.core)}(this,function(e,n,r,i,o,u){"use strict";var c=function(){function e(){this._client=null,this._namespace=null,this._events$=new r.ReplaySubject(1)}return e.prototype.initService=function(e){var t=this;return this._client=new n.IotClient(e,this._events$),this._namespace=e.host+"/"+e.realm+"/"+e.apiVersion+"/",this._client.init().pipe(i.flatMap(function(e){return e?t._client.getNewRpt():r.of(!1)})).toPromise()},Object.defineProperty(e.prototype,"client",{get:function(){if(null==this._client)throw Error("Client not initialised, did you call init() first?");return this._client},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"namespace",{get:function(){return this._namespace},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"events$",{get:function(){return this._events$},enumerable:!0,configurable:!0}),e.decorators=[{type:u.Injectable}],e.ctorParameters=function(){return[]},e}(),s=new u.InjectionToken("OBELISK_OPTIONS"),t=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[c,{provide:s,useValue:e}]}},t.decorators=[{type:u.NgModule,args:[{imports:[o.CommonModule]}]}],t}();var l=[c,s];e.ObeliskService=c,e.factory=function a(e,t){return function(){return e.initService(t)}},e.OBELISK_OPTIONS=s,e.ObeliskNgxModule=t,e.OBELISK_DEPS=l,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=obelisk-ngx.umd.min.js.map |
@@ -8,3 +8,3 @@ /** | ||
import { of, ReplaySubject } from 'rxjs'; | ||
import { map } from 'rxjs/operators'; | ||
import { flatMap } from 'rxjs/operators'; | ||
export class ObeliskService { | ||
@@ -23,7 +23,7 @@ constructor() { | ||
this._namespace = `${options.host}/${options.realm}/${options.apiVersion}/`; | ||
return this._client.init().pipe(map((/** | ||
return this._client.init().pipe(flatMap((/** | ||
* @param {?} ok | ||
* @return {?} | ||
*/ | ||
ok => ok ? (/** @type {?} */ (this._client)).getNewRpt() : of(false)))).toPromise(); | ||
ok => ok ? this._client.getNewRpt() : of(false)))).toPromise(); | ||
} | ||
@@ -76,2 +76,2 @@ /** | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2JlbGlzay5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG9iZWxpc2svbmd4LyIsInNvdXJjZXMiOlsibGliL29iZWxpc2suc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQThCLFNBQVMsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQ3hFLE9BQU8sRUFBYyxFQUFFLEVBQUUsYUFBYSxFQUFXLE1BQU0sTUFBTSxDQUFDO0FBQzlELE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUdyQyxNQUFNLE9BQU8sY0FBYztJQUt6QjtRQUpRLFlBQU8sR0FBcUIsSUFBSSxDQUFDO1FBQ2pDLGVBQVUsR0FBa0IsSUFBSSxDQUFDO1FBSXZDLElBQUksQ0FBQyxRQUFRLEdBQUcsSUFBSSxhQUFhLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFDdkMsQ0FBQzs7Ozs7S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xpZW50ID09IG51bGwpIHtcbiAgICAgIHRocm93IEVycm9yKFwiQ2xpZW50IG5vdCBpbml0aWFsaXNlZCwgZGlkIHlvdSBjYWxsIGluaXQoKSBmaXJzdD9cIik7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiB0aGlzLl9jbGllbnQ7XG4gICAgfVxuICB9XG5cbiAgZ2V0IG5hbWVzcGFjZSgpOiBzdHJpbmcge1xuICAgIHJldHVybiB0aGlzLl9uYW1lc3BhY2U7XG4gIH1cblxuICBnZXQgZXZlbnRzJCgpOiBPYnNlcnZhYmxlPENsaWVudEV2ZW50PiB7XG4gICAgcmV0dXJuIHRoaXMuX2V2ZW50cyQ7XG4gIH1cblxufSJdfQ== |
@@ -8,3 +8,3 @@ /** | ||
import { of, ReplaySubject } from 'rxjs'; | ||
import { map } from 'rxjs/operators'; | ||
import { flatMap } from 'rxjs/operators'; | ||
var ObeliskService = /** @class */ (function () { | ||
@@ -28,7 +28,7 @@ function ObeliskService() { | ||
this._namespace = options.host + "/" + options.realm + "/" + options.apiVersion + "/"; | ||
return this._client.init().pipe(map((/** | ||
return this._client.init().pipe(flatMap((/** | ||
* @param {?} ok | ||
* @return {?} | ||
*/ | ||
function (ok) { return ok ? (/** @type {?} */ (_this._client)).getNewRpt() : of(false); }))).toPromise(); | ||
function (ok) { return ok ? _this._client.getNewRpt() : of(false); }))).toPromise(); | ||
}; | ||
@@ -95,2 +95,2 @@ Object.defineProperty(ObeliskService.prototype, "client", { | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2JlbGlzay5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG9iZWxpc2svbmd4LyIsInNvdXJjZXMiOlsibGliL29iZWxpc2suc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUM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cigpIHtcbiAgICB0aGlzLl9ldmVudHMkID0gbmV3IFJlcGxheVN1YmplY3QoMSk7XG4gIH1cblxuICBwdWJsaWMgaW5pdFNlcnZpY2Uob3B0aW9uczogQ2xpZW50T3B0aW9ucyk6IFByb21pc2U8YW55PiB7XG4gICAgdGhpcy5fY2xpZW50ID0gbmV3IElvdENsaWVudChvcHRpb25zLCB0aGlzLl9ldmVudHMkKTtcbiAgICB0aGlzLl9uYW1lc3BhY2UgPSBgJHtvcHRpb25zLmhvc3R9LyR7b3B0aW9ucy5yZWFsbX0vJHtvcHRpb25zLmFwaVZlcnNpb259L2A7XG4gICAgcmV0dXJuIHRoaXMuX2NsaWVudC5pbml0KCkucGlwZShtYXAob2sgPT4gb2sgPyB0aGlzLl9jbGllbnQhLmdldE5ld1JwdCgpIDogb2YoZmFsc2UpKSkudG9Qcm9taXNlKCk7XG4gIH1cblxuICBnZXQgY2xpZW50KCk6IElvdENsaWVudCB7XG4gICAgaWYgKHRoaXMuX2NsaWVudCA9PSBudWxsKSB7XG4gICAgICB0aHJvdyBFcnJvcihcIkNsaWVudCBub3QgaW5pdGlhbGlzZWQsIGRpZCB5b3UgY2FsbCBpbml0KCkgZmlyc3Q/XCIpO1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gdGhpcy5fY2xpZW50O1xuICAgIH1cbiAgfVxuXG4gIGdldCBuYW1lc3BhY2UoKTogc3RyaW5nIHtcbiAgICByZXR1cm4gdGhpcy5fbmFtZXNwYWNlO1xuICB9XG5cbiAgZ2V0IGV2ZW50cyQoKTogT2JzZXJ2YWJsZTxDbGllbnRFdmVudD4ge1xuICAgIHJldHVybiB0aGlzLl9ldmVudHMkO1xuICB9XG5cbn0iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2JlbGlzay5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG9iZWxpc2svbmd4LyIsInNvdXJjZXMiOlsibGliL29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elisk/client'; | ||
import { of, ReplaySubject } from 'rxjs'; | ||
import { map } from 'rxjs/operators'; | ||
import { flatMap } from 'rxjs/operators'; | ||
import { CommonModule } from '@angular/common'; | ||
@@ -24,7 +24,7 @@ import { Injectable, InjectionToken, NgModule } from '@angular/core'; | ||
this._namespace = `${options.host}/${options.realm}/${options.apiVersion}/`; | ||
return this._client.init().pipe(map((/** | ||
return this._client.init().pipe(flatMap((/** | ||
* @param {?} ok | ||
* @return {?} | ||
*/ | ||
ok => ok ? (/** @type {?} */ (this._client)).getNewRpt() : of(false)))).toPromise(); | ||
ok => ok ? this._client.getNewRpt() : of(false)))).toPromise(); | ||
} | ||
@@ -31,0 +31,0 @@ /** |
import { IotClient } from '@obelisk/client'; | ||
import { of, ReplaySubject } from 'rxjs'; | ||
import { map } from 'rxjs/operators'; | ||
import { flatMap } from 'rxjs/operators'; | ||
import { CommonModule } from '@angular/common'; | ||
@@ -29,7 +29,7 @@ import { Injectable, InjectionToken, NgModule } from '@angular/core'; | ||
this._namespace = options.host + "/" + options.realm + "/" + options.apiVersion + "/"; | ||
return this._client.init().pipe(map((/** | ||
return this._client.init().pipe(flatMap((/** | ||
* @param {?} ok | ||
* @return {?} | ||
*/ | ||
function (ok) { return ok ? (/** @type {?} */ (_this._client)).getNewRpt() : of(false); }))).toPromise(); | ||
function (ok) { return ok ? _this._client.getNewRpt() : of(false); }))).toPromise(); | ||
}; | ||
@@ -36,0 +36,0 @@ Object.defineProperty(ObeliskService.prototype, "client", { |
{ | ||
"name": "@obelisk/ngx", | ||
"version": "2.0.0-alpha.0", | ||
"version": "2.0.0-alpha.1", | ||
"peerDependencies": { | ||
@@ -5,0 +5,0 @@ "@angular/common": "^7.2.0", |
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
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
65533
2