@cloudbase/js-sdk 2.25.1 → 2.25.3
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/miniprogram_dist/oauth.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.3";
|
|
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.3";
|
|
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
|
|
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 o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(248),t)},248:(e,t,n)=>{n.r(t),n.d(t,{generateApis:()=>l,registerApis:()=>p});var o=n(794),r=function(){return r=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},r.apply(this,arguments)},i=function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function c(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((o=o.apply(e,t||[])).next())}))},a=function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[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,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],o=0}finally{n=r=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,s;return i(this,void 0,void 0,(function(){var i,l,f,d,p,h,v,O,y,b,_,g,E,P,w,R,T,A,m,S,I;return a(this,(function(a){switch(a.label){case 0:if(l=(i=e||{}).name,f=i.body,d=i.path,p=void 0===d?"":d,h=i.method,v=void 0===h?"POST":h,O=i.headers,y=void 0===O?{}:O,b=(e||{}).token,!l)throw new Error(JSON.stringify({code:o.ERRORS.INVALID_PARAMS,msg:"[apis] invalid api name"}));return _="",E=(g=this).gatewayOrigin,P=g.getAccessToken,w=g.env,E?_="".concat(E,"/v1"):this.getEndPointWithKey?(R=this.getEndPointWithKey("GATEWAY"),T=R.BASE_URL,A=R.PROTOCOL,_="".concat(A).concat(T)):_="https://".concat(w,".api.tcloudbasegateway.com/v1"),m="".concat(_,"/apis/").concat(l),S=p.startsWith("/")?p:"/".concat(p),P?[4,P()]:[3,2];case 1:I=a.sent().accessToken,y.Authorization="Bearer ".concat(I),a.label=2;case 2:return[4,this.request.fetch(r(r(r({url:"".concat(m).concat(S),method:v||"POST",headers:r({"Content-Type":"application/json; charset=utf-8"},y)},["GET","HEAD"].includes(null===(n=null==v?void 0:v.toUpperCase)||void 0===n?void 0:n.call(v))?{}:{body:f}),{token:(null===(c=null==b?void 0:b.trim)||void 0===c?void 0:c.call(b))||(null===(s=null===(u=y.Authorization)||void 0===u?void 0:u.replace)||void 0===s?void 0:s.call(u,/^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,o){if("string"!=typeof o)throw new Error("[apis] method must be string");var s=o.toLocaleUpperCase();if(!u.includes(s))throw new Error("[apis] invalid method: ".concat(o));return function(n,o){return i(t,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,c.call(this,r({name:e,method:("REQUEST"===s?n.method:s)||"POST"},n),o)];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 o="https:";t.setProtocol=function(e){o=e},t.getProtocol=function(){return o},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 o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.OATUH_LOGINTYPE=void 0,r(n(946),t),r(n(205),t),t.OATUH_LOGINTYPE="constants"}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}return n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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)})()));
|