New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aofl/resource-enumerate

Package Overview
Dependencies
Maintainers
2
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aofl/resource-enumerate - npm Package Compare versions

Comparing version 3.5.0-beta.8 to 3.5.0-beta.9

2

dist/index.js

@@ -1,2 +0,2 @@

module.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r(r.s="QfWi")}({BZcc:function(t,e){t.exports=require("@aofl/api-request")},NToG:function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}},NthX:function(t,e,r){t.exports=r("wcNg")},QfWi:function(t,e,r){"use strict";r.r(e);var n=r("NthX"),o=r.n(n),i=r("fFdx"),a=r.n(i),u=r("SDJZ"),c=r.n(u),s=r("NToG"),f=r.n(s),l=r("bygm"),h=r("j1ZV"),p=r("BZcc"),d=function(){function t(e){var r=this;c()(this,t),this.environment=e,this.ready=new Promise((function(t){r.resolve=t})),this.middlewareInstance=new h.Middleware("before","after"),this.apiRequestInstance=new p.ApiRequest}var e,r;return f()(t,[{key:"init",value:(r=a()(o.a.mark((function t(e){var r,n,i,a,u,c,s=this,f=arguments;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.apis,n=e.developmentConfig,i=e.stageConfig,a=f.length>1&&void 0!==f[1]&&f[1],this.apis=r,u=function(t){if(!Object.hasOwnProperty.call(s.apis,t))return"continue";var e=s.apis[t];s.apiRequestInstance.addFormatter(t,{pack:function(){return e.requestOptions||{}},unpack:function(t){return t.json()}})},t.t0=o.a.keys(this.apis);case 5:if((t.t1=t.t0()).done){t.next=12;break}if(c=t.t1.value,"continue"!==u(c)){t.next=10;break}return t.abrupt("continue",5);case 10:t.next=5;break;case 12:if(!1!==a||this.environment===l.environmentTypeEnumerate.PROD){t.next=17;break}return t.next=15,this.updateApis(n,i);case 15:case 17:return this.resolve(),t.abrupt("return",this.ready);case 19:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"before",value:function(t){this.middlewareInstance.use(t,"before")}},{key:"after",value:function(t){this.middlewareInstance.use(t,"after")}},{key:"get",value:(e=a()(o.a.mark((function e(r){var n,i,a,u,c,s,f,l=this,h=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!(h.length>1&&void 0!==h[1])||h[1],e.next=3,this.ready;case 3:if(i=this.apis[r],a=n,void 0!==i){e.next=7;break}throw new TypeError("".concat(r," is not a valid api namespace."));case 7:return(!a||"function"==typeof i.invalidateCache&&i.invalidateCache.call(null))&&(this.apiRequestInstance.clearCache(t.NAMESPACE),a=!1),u=this.apiRequestInstance.getCacheManager(t.NAMESPACE),c=u.getItem(i.url+JSON.stringify("")),s={namespace:r,cached:null!==c},e.next=13,this.middlewareInstance.iterateMiddleware(s,"before");case 13:return f=null,f=null!==c?c:this.apiRequestInstance.request(i.url,"",r,a,t.NAMESPACE),e.abrupt("return",f.then((function(t){return l.middlewareInstance.iterateMiddleware(s,"after",t)})));case 16:case"end":return e.stop()}}),e,this)}))),function(t){return e.apply(this,arguments)})},{key:"updateApis",value:function(t,e){var r=this,n=t;return this.environment===l.environmentTypeEnumerate.STAGE&&(n=e),n().then((function(t){for(var e in r.apis)if(Object.hasOwnProperty.call(r.apis,e)){var n=r.apis[e],o={};"function"==typeof n[r.environment+"Variables"]&&(o=n[r.environment+"Variables"].call(null)),n.url=t.default(e,o)}}))}}],[{key:"NAMESPACE",get:function(){return"resource-enumerate"}}]),t}();r.d(e,"ResourceEnumerate",(function(){return d}))},SDJZ:function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},bygm:function(t,e){t.exports=require("@aofl/server-environment")},fFdx:function(t,e){function r(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function u(t){r(a,o,i,u,c,"next",t)}function c(t){r(a,o,i,u,c,"throw",t)}u(void 0)}))}}},j1ZV:function(t,e){t.exports=require("@aofl/middleware")},wcNg:function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===s)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var f=c(t,e,r);if("normal"===f.type){if(n=r.done?"completed":"suspendedYield",f.arg===s)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(n="completed",r.method="throw",r.arg=f.arg)}}}(t,r,a),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function f(){}function l(){}function h(){}var p={};p[o]=function(){return this};var d=Object.getPrototypeOf,v=d&&d(d(L([])));v&&v!==e&&r.call(v,o)&&(p=v);var y=h.prototype=f.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function g(t){var e;this._invoke=function(n,o){function i(){return new Promise((function(e,i){!function e(n,o,i,a){var u=c(t[n],t,o);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?Promise.resolve(f.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):Promise.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return e("throw",t,i,a)}))}a(u.arg)}(n,o,e,i)}))}return e=e?e.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,s;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function L(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return l.prototype=y.constructor=h,h.constructor=l,h[a]=l.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},m(g.prototype),g.prototype[i]=function(){return this},t.AsyncIterator=g,t.async=function(e,r,n,o){var i=new g(u(e,r,n,o));return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},m(y),y[a]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=L,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),s}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}}});
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s="QfWi")}({BZcc:function(e,t){e.exports=require("@aofl/api-request")},MmcY:function(e,t){e.exports=require("@babel/runtime/helpers/classCallCheck")},QfWi:function(e,t,n){"use strict";n.r(t);var r=n("dvlR"),i=n.n(r),a=n("RNGJ"),u=n.n(a),o=n("MmcY"),s=n.n(o),c=n("iTvO"),l=n.n(c),f=n("bygm"),p=n("j1ZV"),d=n("BZcc"),h=function(){function e(t){var n=this;s()(this,e),this.environment=t,this.ready=new Promise((function(e){n.resolve=e})),this.middlewareInstance=new p.Middleware("before","after"),this.apiRequestInstance=new d.ApiRequest}var t,n;return l()(e,[{key:"init",value:(n=u()(i.a.mark((function e(t){var n,r,a,u,o,s,c=this,l=arguments;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.apis,r=t.developmentConfig,a=t.stageConfig,u=l.length>1&&void 0!==l[1]&&l[1],this.apis=n,o=function(e){if(!Object.hasOwnProperty.call(c.apis,e))return"continue";var t=c.apis[e];c.apiRequestInstance.addFormatter(e,{pack:function(){return t.requestOptions||{}},unpack:function(e){return e.json()}})},e.t0=i.a.keys(this.apis);case 5:if((e.t1=e.t0()).done){e.next=12;break}if(s=e.t1.value,"continue"!==o(s)){e.next=10;break}return e.abrupt("continue",5);case 10:e.next=5;break;case 12:if(!1!==u||this.environment===f.environmentTypeEnumerate.PROD){e.next=17;break}return e.next=15,this.updateApis(r,a);case 15:case 17:return this.resolve(),e.abrupt("return",this.ready);case 19:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"before",value:function(e){this.middlewareInstance.use(e,"before")}},{key:"after",value:function(e){this.middlewareInstance.use(e,"after")}},{key:"get",value:(t=u()(i.a.mark((function t(n){var r,a,u,o,s,c,l,f=this,p=arguments;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!(p.length>1&&void 0!==p[1])||p[1],t.next=3,this.ready;case 3:if(a=this.apis[n],u=r,void 0!==a){t.next=7;break}throw new TypeError("".concat(n," is not a valid api namespace."));case 7:return(!u||"function"==typeof a.invalidateCache&&a.invalidateCache.call(null))&&(this.apiRequestInstance.clearCache(e.NAMESPACE),u=!1),o=this.apiRequestInstance.getCacheManager(e.NAMESPACE),s=o.getItem(a.url+JSON.stringify("")),c={namespace:n,cached:null!==s},t.next=13,this.middlewareInstance.iterateMiddleware(c,"before");case 13:return l=null,l=null!==s?s:this.apiRequestInstance.request(a.url,"",n,u,e.NAMESPACE),t.abrupt("return",l.then((function(e){return f.middlewareInstance.iterateMiddleware(c,"after",e)})));case 16:case"end":return t.stop()}}),t,this)}))),function(e){return t.apply(this,arguments)})},{key:"updateApis",value:function(e,t){var n=this,r=e;return this.environment===f.environmentTypeEnumerate.STAGE&&(r=t),r().then((function(e){for(var t in n.apis)if(Object.hasOwnProperty.call(n.apis,t)){var r=n.apis[t],i={};"function"==typeof r[n.environment+"Variables"]&&(i=r[n.environment+"Variables"].call(null)),r.url=e.default(t,i)}}))}}],[{key:"NAMESPACE",get:function(){return"resource-enumerate"}}]),e}();n.d(t,"ResourceEnumerate",(function(){return h}))},RNGJ:function(e,t){e.exports=require("@babel/runtime/helpers/asyncToGenerator")},bygm:function(e,t){e.exports=require("@aofl/server-environment")},dvlR:function(e,t){e.exports=require("@babel/runtime/regenerator")},iTvO:function(e,t){e.exports=require("@babel/runtime/helpers/createClass")},j1ZV:function(e,t){e.exports=require("@aofl/middleware")}});
//# sourceMappingURL=index.js.map
{
"name": "@aofl/resource-enumerate",
"version": "3.5.0-beta.8",
"version": "3.5.0-beta.9",
"description": "Resource enumerate is a special case API call that returns the interface of the API code in a single endpoint",

@@ -34,7 +34,7 @@ "main": "index.js",

"devDependencies": {
"@aofl/api-request": "^3.5.0-beta.8",
"@aofl/cache-manager": "^3.5.0-beta.8",
"@aofl/cli": "^3.5.0-beta.8",
"@aofl/middleware": "^3.5.0-beta.8",
"@aofl/server-environment": "^3.5.0-beta.8",
"@aofl/api-request": "^3.5.0-beta.9",
"@aofl/cache-manager": "^3.5.0-beta.9",
"@aofl/cli": "^3.5.0-beta.9",
"@aofl/middleware": "^3.5.0-beta.9",
"@aofl/server-environment": "^3.5.0-beta.9",
"cross-env": "^6.0.3",

@@ -41,0 +41,0 @@ "jsdoc": "^3.6.3",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc