@alipay/faas-common-sdk
Advanced tools
Comparing version 1.1.11 to 1.1.12-alpha.0
@@ -1,1 +0,1 @@ | ||
"use strict";var __assign=this&&this.__assign||function(){__assign=Object.assign||function(c){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)if(Object.prototype.hasOwnProperty.call(r,a))c[a]=r[a]}return c};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(c,r,n,o){function a(t){return t instanceof n?t:new n(function(i){i(t)})}return new(n||(n=Promise))(function(t,i){function s(u){try{e(o.next(u))}catch(f){i(f)}}function l(u){try{e(o["throw"](u))}catch(f){i(f)}}function e(u){u.done?t(u.value):a(u.value).then(s,l)}e((o=o.apply(c,r||[])).next())})};var __generator=this&&this.__generator||function(c,r){var n={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},o,a,t,i;return i={next:s(0),"throw":s(1),"return":s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(u){return l([e,u])}}function l(e){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,e[0]&&(n=0)),n)try{if(o=1,a&&(t=e[0]&2?a["return"]:e[0]?a["throw"]||((t=a["return"])&&t.call(a),0):a.next)&&!(t=t.call(a,e[1])).done)return t;if(a=0,t)e=[e[0]&2,t.value];switch(e[0]){case 0:case 1:t=e;break;case 4:n.label++;return{value:e[1],done:false};case 5:n.label++;a=e[1];e=[0];continue;case 7:e=n.ops.pop();n.trys.pop();continue;default:if(!(t=n.trys,t=t.length>0&&t[t.length-1])&&(e[0]===6||e[0]===2)){n=0;continue}if(e[0]===3&&(!t||e[1]>t[0]&&e[1]<t[3])){n.label=e[1];break}if(e[0]===6&&n.label<t[1]){n.label=t[1];t=e;break}if(t&&n.label<t[2]){n.label=t[2];n.ops.push(e);break}if(t[2])n.ops.pop();n.trys.pop();continue}e=r.call(c,n)}catch(u){e=[6,u];a=0}finally{o=t=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:true}}};Object.defineProperty(exports,"__esModule",{value:true});exports.Database=void 0;var Collection_1=require("./Collection");var DatabaseHttpclient=function(){function c(r){this.httpclient=r}c.prototype.request=function(r){var n=r.method,o=r.path,a=r.data,t=r.headers;return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){switch(i.label){case 0:return[4,this.httpclient.request({method:n,path:o,data:a,headers:__assign({"x-alipay-cloud-mode":"mongo","x-data-api-type":"mongo","x-expire-timestamp":"".concat(Date.now()+6e4)},t)})];case 1:return[2,i.sent()]}})})};return c}();var Database=function(){function c(r){this.options=__assign(__assign({},r),{httpclient:new DatabaseHttpclient(r.httpclient)})}c.prototype.collection=function(r){return new Collection_1.Collection(r,this.options)};return c}();exports.Database=Database; | ||
"use strict";var __assign=this&&this.__assign||function(){__assign=Object.assign||function(o){for(var r,n=1,u=arguments.length;n<u;n++){r=arguments[n];for(var a in r)if(Object.prototype.hasOwnProperty.call(r,a))o[a]=r[a]}return o};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(o,r,n,u){function a(t){return t instanceof n?t:new n(function(i){i(t)})}return new(n||(n=Promise))(function(t,i){function s(c){try{e(u.next(c))}catch(f){i(f)}}function l(c){try{e(u["throw"](c))}catch(f){i(f)}}function e(c){c.done?t(c.value):a(c.value).then(s,l)}e((u=u.apply(o,r||[])).next())})};var __generator=this&&this.__generator||function(o,r){var n={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},u,a,t,i;return i={next:s(0),"throw":s(1),"return":s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(c){return l([e,c])}}function l(e){if(u)throw new TypeError("Generator is already executing.");while(i&&(i=0,e[0]&&(n=0)),n)try{if(u=1,a&&(t=e[0]&2?a["return"]:e[0]?a["throw"]||((t=a["return"])&&t.call(a),0):a.next)&&!(t=t.call(a,e[1])).done)return t;if(a=0,t)e=[e[0]&2,t.value];switch(e[0]){case 0:case 1:t=e;break;case 4:n.label++;return{value:e[1],done:false};case 5:n.label++;a=e[1];e=[0];continue;case 7:e=n.ops.pop();n.trys.pop();continue;default:if(!(t=n.trys,t=t.length>0&&t[t.length-1])&&(e[0]===6||e[0]===2)){n=0;continue}if(e[0]===3&&(!t||e[1]>t[0]&&e[1]<t[3])){n.label=e[1];break}if(e[0]===6&&n.label<t[1]){n.label=t[1];t=e;break}if(t&&n.label<t[2]){n.label=t[2];n.ops.push(e);break}if(t[2])n.ops.pop();n.trys.pop();continue}e=r.call(o,n)}catch(c){e=[6,c];a=0}finally{u=t=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:true}}};Object.defineProperty(exports,"__esModule",{value:true});exports.Database=void 0;var faas_db_builder_1=require("@alipay/faas-db-builder");var error_1=require("../error");var Collection_1=require("./Collection");var DatabaseHttpclient=function(){function o(r){this.httpclient=r}o.prototype.request=function(r){var n=r.method,u=r.path,a=r.data,t=r.headers;return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){switch(i.label){case 0:return[4,this.httpclient.request({method:n,path:u,data:a,headers:__assign({"x-alipay-cloud-mode":"mongo","x-data-api-type":"mongo","x-expire-timestamp":"".concat(Date.now()+6e4)},t)})];case 1:return[2,i.sent()]}})})};return o}();var Database=function(){function o(r){this.command=new faas_db_builder_1.Command;this.options=__assign(__assign({},r),{httpclient:new DatabaseHttpclient(r.httpclient)})}o.prototype.collection=function(r){if(!r){throw error_1.FaasError.INVALID_PARAM_ERR("collectionName","\u4E0D\u80FD\u4E3A\u7A7A")}return new Collection_1.Collection(r,this.options)};return o}();exports.Database=Database; |
{ | ||
"name": "@alipay/faas-common-sdk", | ||
"version": "1.1.11", | ||
"version": "1.1.12-alpha.0", | ||
"description": "云函数服务通用 SDK", | ||
@@ -29,3 +29,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@alipay/faas-db-builder": "^1.1.11" | ||
"@alipay/faas-db-builder": "^1.1.12-alpha.0" | ||
}, | ||
@@ -32,0 +32,0 @@ "engines": { |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
52887
14