@cloudbase/js-sdk 2.25.1 → 2.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/miniprogram_dist/apis.js +1 -1
- package/miniprogram_dist/app.js +1 -1
- package/miniprogram_dist/auth.js +1 -1
- package/miniprogram_dist/cloudrun.js +1 -1
- package/miniprogram_dist/functions.js +1 -1
- package/miniprogram_dist/index.js +1 -1
- package/package.json +15 -15
package/dist/index.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ var cloudrun_1 = require("@cloudbase/cloudrun");
|
|
|
14
14
|
var mysql_1 = require("@cloudbase/mysql");
|
|
15
15
|
var apis_1 = require("@cloudbase/apis");
|
|
16
16
|
var database_1 = require("./../database");
|
|
17
|
-
var version = "2.25.
|
|
17
|
+
var version = "2.25.2";
|
|
18
18
|
app_1.default.registerVersion(version);
|
|
19
19
|
try {
|
|
20
20
|
(0, auth_1.registerAuth)(app_1.default);
|
package/dist/index.esm.js
CHANGED
|
@@ -10,7 +10,7 @@ import { registerCloudrun } from '@cloudbase/cloudrun';
|
|
|
10
10
|
import { registerMySQL } from '@cloudbase/mysql';
|
|
11
11
|
import { registerApis } from '@cloudbase/apis';
|
|
12
12
|
import { registerDatabase } from './../database';
|
|
13
|
-
var version = "2.25.
|
|
13
|
+
var version = "2.25.2";
|
|
14
14
|
cloudbase.registerVersion(version);
|
|
15
15
|
try {
|
|
16
16
|
registerAuth(cloudbase);
|
package/miniprogram_dist/apis.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("cloudbase_apis",[],t):"object"==typeof exports?exports.cloudbase_apis=t():e.cloudbase_apis=t()}("undefined"!=typeof window?window:this,(()=>(()=>{"use strict";var e={465:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(248),t)},248:(e,t,n)=>{n.r(t),n.d(t,{generateApis:()=>l,registerApis:()=>p});var r=n(794),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},i=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))},a=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function c(e,t){var n,c,u;return i(this,void 0,void 0,(function(){var i,s,l,f,d,p,h,v,O,y,b,_,g,P,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("cloudbase_apis",[],t):"object"==typeof exports?exports.cloudbase_apis=t():e.cloudbase_apis=t()}("undefined"!=typeof window?window:this,(()=>(()=>{"use strict";var e={465:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(248),t)},248:(e,t,n)=>{n.r(t),n.d(t,{generateApis:()=>l,registerApis:()=>p});var r=n(794),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},i=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))},a=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function c(e,t){var n,c,u;return i(this,void 0,void 0,(function(){var i,s,l,f,d,p,h,v,O,y,b,_,g,E,P,w,R,T,A,m,S;return a(this,(function(a){switch(a.label){case 0:if(s=(i=e||{}).name,l=i.body,f=i.path,d=void 0===f?"":f,p=i.method,h=void 0===p?"POST":p,v=i.headers,O=void 0===v?{}:v,y=(e||{}).token,!s)throw new Error(JSON.stringify({code:r.ERRORS.INVALID_PARAMS,msg:"[apis] invalid api name"}));return b="",g=(_=this).gatewayOrigin,E=_.getAccessToken,P=_.env,g?b="".concat(g,"/v1"):this.getEndPointWithKey?(w=this.getEndPointWithKey("GATEWAY"),R=w.BASE_URL,T=w.PROTOCOL,b="".concat(T).concat(R)):b="https://".concat(P,".api.tcloudbasegateway.com/v1"),A="".concat(b,"/apis/").concat(s),m=d.startsWith("/")?d:"/".concat(d),E?[4,E()]:[3,2];case 1:S=a.sent().accessToken,O.Authorization="Bearer ".concat(S),a.label=2;case 2:return[4,this.request.fetch(o(o(o({url:"".concat(A).concat(m),method:h||"POST",headers:o({"Content-Type":"application/json; charset=utf-8"},O)},["GET","HEAD"].includes(h)?{}:{body:l}),{token:(null===(n=null==y?void 0:y.trim)||void 0===n?void 0:n.call(y))||(null===(u=null===(c=O.Authorization)||void 0===c?void 0:c.replace)||void 0===u?void 0:u.call(c,/^Bearer /,""))||null}),t))];case 3:return[4,a.sent().data];case 4:return[2,a.sent()]}}))}))}var u=["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH","REQUEST"];function s(e){var t=this;return new Proxy({},{get:function(n,r){if("string"!=typeof r)throw new Error("[apis] method must be string");var s=r.toLocaleUpperCase();if(!u.includes(s))throw new Error("[apis] invalid method: ".concat(r));return function(n,r){return i(t,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,c.call(this,o({name:e,method:("REQUEST"===s?n.method:s)||"POST"},n),r)];case 1:return[2,t.sent()]}}))}))}}})}function l(e){var t=this;return Object.keys(e||{}).forEach((function(n){void 0!==e[n]&&(t[n]=e[n])})),new Proxy({},{get:function(e,n){if("string"==typeof n)return s.call(t,n)}})}var f="apis",d={name:f,IIFE:!0,entity:function(){Object.defineProperty(this.prototype,f,{get:function(){return l.call(this)},configurable:!0,enumerable:!0})}};function p(e){try{e.registerComponent(d)}catch(e){console.warn(e)}}try{cloudbase.registerComponent(d)}catch(e){}try{window.registerApis=p}catch(e){}},946:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.COMMUNITY_SITE_URL=t.IS_DEBUG_MODE=t.getProtocol=t.setProtocol=t.getSdkName=t.setSdkName=void 0;var n="@cloudbase/js-sdk";t.setSdkName=function(e){n=e},t.getSdkName=function(){return n};var r="https:";t.setProtocol=function(e){r=e},t.getProtocol=function(){return r},t.IS_DEBUG_MODE=!1,t.COMMUNITY_SITE_URL="https://support.qq.com/products/148793"},205:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ERRORS=void 0,t.ERRORS={INVALID_PARAMS:"INVALID_PARAMS",INVALID_SYNTAX:"INVALID_SYNTAX",INVALID_OPERATION:"INVALID_OPERATION",OPERATION_FAIL:"OPERATION_FAIL",NETWORK_ERROR:"NETWORK_ERROR",UNKOWN_ERROR:"UNKOWN_ERROR"}},794:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.OATUH_LOGINTYPE=void 0,o(n(946),t),o(n(205),t),t.OATUH_LOGINTYPE="constants"}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}return n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(465)})()));
|