Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@alicloud/mpserverless-sdk

Package Overview
Dependencies
Maintainers
9
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alicloud/mpserverless-sdk - npm Package Compare versions

Comparing version 2.2.0-alpha.0 to 2.2.0-alpha.1

14

dist/esm/codec.js

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

import * as tslib_1 from "tslib";
import { __assign, __extends } from "tslib";
import { HTTPRequestEncoder, HTTPResponseDecoder, PREFIX, ErrorName, ErrorType, } from '@ant-basement/core';

@@ -8,3 +8,3 @@ import crypto from 'crypto-js/core';

var MiniProgramHTTPRequestEncoder = (function (_super) {
tslib_1.__extends(MiniProgramHTTPRequestEncoder, _super);
__extends(MiniProgramHTTPRequestEncoder, _super);
function MiniProgramHTTPRequestEncoder(endpoint, spaceId) {

@@ -48,3 +48,3 @@ var _this = _super.call(this, endpoint) || this;

}
return tslib_1.__assign({ url: this.url, data: this.body, method: this.method, headers: this.headers, header: this.headers, dataType: 'json' }, additionalObject);
return __assign({ url: this.url, data: this.body, method: this.method, headers: this.headers, header: this.headers, dataType: 'json' }, additionalObject);
};

@@ -62,3 +62,3 @@ MiniProgramHTTPRequestEncoder.prototype.clone = function () {

var MiniProgramHTTPResponseDecoder = (function (_super) {
tslib_1.__extends(MiniProgramHTTPResponseDecoder, _super);
__extends(MiniProgramHTTPResponseDecoder, _super);
function MiniProgramHTTPResponseDecoder() {

@@ -71,3 +71,3 @@ var _this = _super !== null && _super.apply(this, arguments) || this;

_super.prototype.setStatusAndBody.call(this, status, body);
if (this.ERROR_CODES.includes(status)) {
if (this.ERROR_CODES.indexOf(status) >= 0) {
this._error = MPServerlessClientError.from({

@@ -89,3 +89,3 @@ name: ErrorName.IDE_ERROR,

if (isNumber(body.data.affectedDocs)) {
body = Object.assign({}, body, tslib_1.__assign({}, body.data));
body = Object.assign({}, body, __assign({}, body.data));
}

@@ -136,2 +136,2 @@ else if (Object.prototype.toString.call(body.data) === '[object Object]') {

export { MiniProgramHTTPResponseDecoder };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29kZWMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29kZWMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFFTCxrQkFBa0IsRUFFbEIsbUJBQW1CLEVBRW5CLE1BQU0sRUFDTixTQUFTLEVBQ1QsU0FBUyxHQUNWLE1BQU0sb0JBQW9CLENBQUM7QUFDNUIsT0FBTyxNQUFNLE1BQU0sZ0JBQWdCLENBQUM7QUFDcEMsT0FBTyxPQUFPLE1BQU0sb0JBQW9CLENBQUM7QUFDekMsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUNoQyxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSxTQUFTLENBQUM7QUE4QmxEO0lBQW1ELHlEQUFrQjtJQVNuRSx1Q0FBWSxRQUFnQixFQUFZLE9BQWU7UUFBdkQsWUFDRSxrQkFBTSxRQUFRLENBQUMsU0FLaEI7UUFOdUMsYUFBTyxHQUFQLE9BQU8sQ0FBUTtRQVI3QyxZQUFNLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FBQztRQUN2QixvQkFBYyxHQUEwQixFQUFFLENBQUM7UUFVbkQsS0FBSSxDQUFDLFlBQVksQ0FBQztZQUNoQixPQUFPLFNBQUE7U0FDUixDQUFDLENBQUM7O0lBQ0wsQ0FBQztJQU1NLDRDQUFJLEdBQVgsVUFBWSxZQUFvQjtRQUN4QixJQUFBLGNBQXNELEVBQXBELG9CQUFPLEVBQUUsa0JBQU0sRUFBRSxrQkFBTSxFQUFFLGdCQUFLLEVBQUUsa0JBQW9CLENBQUM7UUFDN0QsSUFBTSxTQUFTLEdBQUcsSUFBSSxDQUFDLEdBQUcsRUF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SxDQUFDLEtBQUssQ0FBQyxDQUFDO1lBQ2hDLE9BQU8saUJBQU0sTUFBTSxXQUFFLENBQUM7U0FDdkI7UUFHRCxJQUFNLGtCQUFrQixHQUFHLFFBQVEsQ0FBQyxHQUFHLENBQUMsTUFBTSxJQUFJLEdBQUcsQ0FBQyxVQUFVLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDdEUsSUFBSSxrQkFBa0IsRUFBRTtZQUN0QixJQUFJLENBQUMsZ0JBQWdCLENBQUMsa0JBQWtCLEVBQUUsSUFBSSxDQUFDLENBQUM7WUFDaEQsT0FBTyxpQkFBTSxNQUFNLFdBQUUsQ0FBQztTQUN2QjtRQUdELElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxHQUFHLEVBQUUsR0FBRyxDQUFDLENBQUM7UUFDaEMsT0FBTyxpQkFBTSxNQUFNLFdBQUUsQ0FBQztJQUN4QixDQUFDO0lBQ0gscUNBQUM7QUFBRCxDQUFDLEFBM0ZELENBQW9ELG1CQUFtQixHQTJGdEUifQ==

@@ -1,5 +0,5 @@

import * as tslib_1 from "tslib";
import { __extends } from "tslib";
import { BuiltInError } from '@ant-basement/core';
var MPServerlessClientError = (function (_super) {
tslib_1.__extends(MPServerlessClientError, _super);
__extends(MPServerlessClientError, _super);
function MPServerlessClientError(name, code, type, message) {

@@ -19,2 +19,2 @@ var _this = _super.call(this, message) || this;

export { MPServerlessClientError };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXJyb3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQW1CLE1BQU0sb0JBQW9CLENBQUM7QUFFbkU7SUFBNkMsbURBQVk7SUFDdkQsaUNBQ1MsSUFBWSxFQUNaLElBQVksRUFDWixJQUFZLEVBQ1osT0FBZTtRQUp4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UksRUFDUixHQUFHLENBQUMsSUFBSSxFQUNSLEdBQUcsQ0FBQyxJQUFJLEVBQ1IsR0FBRyxDQUFDLE9BQU8sQ0FDWixDQUFDO0lBQ0osQ0FBQztJQUNILDhCQUFDO0FBQUQsQ0FBQyxBQXZCRCxDQUE2QyxZQUFZLEdBdUJ4RCJ9

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

import * as tslib_1 from "tslib";
import { __assign, __awaiter, __extends, __generator } from "tslib";
import { Basement as Base, WHITELIST_EXTENSIONS, assert, OSSUploadHeaderList, ErrorType, ErrorName, ErrorCode, OSSUploadResponseFormat, } from '@ant-basement/core';

@@ -9,3 +9,3 @@ import { DbService, FileService, AuthService, FunctionService, } from '@ant-basement/services';

var MiniProgramFileService = (function (_super) {
tslib_1.__extends(MiniProgramFileService, _super);
__extends(MiniProgramFileService, _super);
function MiniProgramFileService() {

@@ -15,5 +15,5 @@ return _super !== null && _super.apply(this, arguments) || this;

MiniProgramFileService.prototype.uploadFile = function (options) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return __awaiter(this, void 0, void 0, function () {
var relativePath, extension, meta, headers, fileSize, getFileInfo, fileInfo, imageExt, getImageInfo, imageInfo, uploadRes, uploadOptions;
return tslib_1.__generator(this, function (_a) {
return __generator(this, function (_a) {
switch (_a.label) {

@@ -24,3 +24,3 @@ case 0:

extension = relativePath.split('.').pop();
assert(WHITELIST_EXTENSIONS.includes(extension.toLowerCase()), "\u76EE\u524D\u4E0D\u652F\u6301 " + extension + " \u7C7B\u578B\u6587\u4EF6");
assert(WHITELIST_EXTENSIONS.indexOf(extension.toLowerCase()) >= 0, "\u76EE\u524D\u4E0D\u652F\u6301 " + extension + " \u7C7B\u578B\u6587\u4EF6");
meta = Object.keys(options.meta || {}).reduce(function (accu, key) {

@@ -79,5 +79,5 @@ accu["x-oss-meta-" + key] = options.meta[key];

MiniProgramFileService.prototype.uploadFileToOSS = function (fileUploadOptions, ossUploadOptions, headers, meta) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return __awaiter(this, void 0, void 0, function () {
var options, uploadHeader, contentType;
return tslib_1.__generator(this, function (_a) {
return __generator(this, function (_a) {
switch (_a.label) {

@@ -109,5 +109,5 @@ case 0:

var MPServerless = (function (_super) {
tslib_1.__extends(MPServerless, _super);
__extends(MPServerless, _super);
function MPServerless(appGlobal, options) {
var _this = _super.call(this, tslib_1.__assign({}, options, { httpClient: appGlobal, httpTransport: MiniProgramHTTPTransport, logger: appGlobal.logger })) || this;
var _this = _super.call(this, __assign(__assign({}, options), { httpClient: appGlobal, httpTransport: MiniProgramHTTPTransport, logger: appGlobal.logger })) || this;
assert(options.clientSecret, 'clientSecret is required');

@@ -120,5 +120,5 @@ assert(options.appId, 'appId is required');

_this.network = new NetworkService(_this.transport);
_this.user.authorize = function (options) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
_this.user.authorize = function (options) { return __awaiter(_this, void 0, void 0, function () {
var hasToken, token, token;
return tslib_1.__generator(this, function (_a) {
return __generator(this, function (_a) {
switch (_a.label) {

@@ -179,2 +179,2 @@ case 0:

export { MPServerless };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXBzZXJ2ZXJsZXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL21wc2VydmVybGVzcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUNMLFFBQVEsSUFBSSxJQUFJLEVBQ2hCLG9CQUFvQixFQUVwQixNQUFNLEVBSU4sbUJBQW1CLEVBQ25CLFNBQVMsRUFDVCxTQUFTLEVBQ1QsU0FBUyxFQUNULHVCQUF1QixHQUN4QixNQUFNLG9CQUFvQixDQUFDO0FBQzVCLE9BQU8sRUFDTCxTQUFTLEVBQUUsV0FBVyxFQUFFLFdBQVcsRUFBRSxlQUFlLEdBQ3JELE1BQU0sd0JBQXdCLENBQUM7QUFDaEMsT0FBTyxFQUFFLHdCQUF3QixF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0FBZSxHQUF6QixVQUEwQixPQUF3QjtRQUNoRCxpQkFBTSxlQUFlLFlBQUMsT0FBTyxDQUFDLENBQUM7UUFDL0IsSUFBSSxDQUFDLFNBQVMsQ0FBQyxZQUFZLENBQUMsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsRUFBRSxDQUFDLENBQUM7SUFDbkUsQ0FBQztJQUNILG1CQUFDO0FBQUQsQ0FBQyxBQXRFRCxDQUFrQyxJQUFJLEdBc0VyQyJ9

@@ -1,5 +0,5 @@

import * as tslib_1 from "tslib";
import { __awaiter, __extends, __generator } from "tslib";
import { BaseService, } from '@ant-basement/core';
var NetworkService = (function (_super) {
tslib_1.__extends(NetworkService, _super);
__extends(NetworkService, _super);
function NetworkService() {

@@ -9,5 +9,5 @@ return _super !== null && _super.apply(this, arguments) || this;

NetworkService.prototype.forward = function (method, params) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return __awaiter(this, void 0, void 0, function () {
var request, response;
return tslib_1.__generator(this, function (_a) {
return __generator(this, function (_a) {
switch (_a.label) {

@@ -31,2 +31,2 @@ case 0:

export { NetworkService };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmV0d29yay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9uZXR3b3JrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQ0wsV0FBVyxHQUVaLE1BQU0sb0JBQW9CLENBQUM7QUFFNUI7SUFBb0MsMENBQVc7SUFBL0M7O0lBV0EsQ0FBQztJQVZjLGdDQUFPLEdBQXBCLFVBQXFCLE1BQWMsRUFBRSxNQUEwQjs7Ozs7O3dCQUN2RCxPQUFPLEdBQUcsSUFBSSxDQUFDLFVBQVUsRUFBRSxDQUFDO3dCQUNsQyxPQUFPLENBQUMsWUFBWSxDQUFDOzRCQUNuQixN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} from "tslib";
import { HTTPTransport, HTTP_UNAUTHORIZED, ErrorCode, ErrorName, ErrorType, assert, } from '@ant-basement/core';

@@ -11,3 +11,3 @@ import { MiniProgramHTTPRequestEncoder, MiniProgramHTTPResponseDecoder, } from './codec';

var MiniProgramHTTPTransport = (function (_super) {
tslib_1.__extends(MiniProgramHTTPTransport, _super);
__extends(MiniProgramHTTPTransport, _super);
function MiniProgramHTTPTransport(endpoint, library) {

@@ -35,5 +35,5 @@ var _this = _super.call(this, endpoint, library) || this;

if (retried === void 0) { retried = false; }
return tslib_1.__awaiter(this, void 0, void 0, function () {
return __awaiter(this, void 0, void 0, function () {
var cloned, token, encoded, decoded, e_1, isUnAuthorized;
return tslib_1.__generator(this, function (_a) {
return __generator(this, function (_a) {
switch (_a.label) {

@@ -105,5 +105,5 @@ case 0:

MiniProgramHTTPTransport.prototype.authorize = function (options) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return __awaiter(this, void 0, void 0, function () {
var _this = this;
return tslib_1.__generator(this, function (_a) {
return __generator(this, function (_a) {
this.pendingRequest = this

@@ -153,6 +153,6 @@ .getAuthCode({ scopes: this.scope })

MiniProgramHTTPTransport.prototype.anonymousAuthorize = function (options) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return __awaiter(this, void 0, void 0, function () {
var encoder, encoded;
var _this = this;
return tslib_1.__generator(this, function (_a) {
return __generator(this, function (_a) {
encoder = this.getEncoder();

@@ -193,4 +193,4 @@ encoder.setBodyField({

if (refresh === void 0) { refresh = false; }
return tslib_1.__awaiter(this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
if (this.pendingRequest) {

@@ -215,4 +215,4 @@ this.logger.info('getAccessToken: reuse');

MiniProgramHTTPTransport.prototype.upload = function (host, formData, fileName, filePath, header) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {

@@ -229,3 +229,3 @@ case 0:

fileType: 'image',
header: tslib_1.__assign({}, header, { 'X-OSS-server-side-encrpytion': 'AES256' }),
header: __assign(__assign({}, header), { 'X-OSS-server-side-encrpytion': 'AES256' }),
})];

@@ -260,2 +260,2 @@ case 1: return [2, _a.sent()];

export { MiniProgramHTTPTransport };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNwb3J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3RyYW5zcG9ydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUVMLGFBQWEsRUFHYixpQkFBaUIsRUFDakIsU0FBUyxFQUNULFNBQVMsRUFDVCxTQUFTLEVBRVQsTUFBTSxHQUVQLE1BQU0sb0JBQW9CLENBQUM7QUFDNUIsT0FBTyxFQUdMLDZCQUE2QixFQUM3Qiw4QkFBOEIsR0FHL0IsTUFBTSxTQUFTLENBQUM7QUFDakIsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQU0sU0FBUyxDQUFDO0FBY2xELE1BQU0sQ0FBTixJQUFZLFFBR1g7QUFIRCxXQUFZLFFBQVE7SUFDbEIsbUNBQXVCLENBQUE7SUFDdkIsd0JBQVksQ0FBQTtBQUNkLENBQUMsRUFIVyxRQUFRLEtBQVIsUUFBUSxRQUduQjtBQUVEO0lBQThDLG9EQUFhO0lBWXpELGtDQUNFLFFBQWdCLEVBQ2hCLE9BQVk7UUFGZCxZQUlFLGtCQUFNLFFBQVEsRUFBRSxPQUFPLENBQUMsU0FjekI7UUE3QlMsV0FBSyxHQUFlLFdBQVcsQ0FBQztRQWdCeEMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxVQUFVLEVBQUUsb0JBQW9CLENBQUMsQ0FBQztRQUNqRCxNQUFNLENBQUMsT0FBTyxDQUFDLFdBQVcsRUFBRSxxQkFBcUIs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DLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxFQUFFO29CQUMzQixRQUFRLEVBQUUsVUFBQyxHQUFhO3dCQUFiLG9CQUFBLEVBQUEsUUFBYTt3QkFDdEIsS0FBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsbUJBQW1CLENBQUMsQ0FBQzt3QkFDdEMsS0FBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxHQUFHLEVBQUUsSUFBSSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7d0JBQy9DLElBQU0sT0FBTyxHQUFHLElBQUksOEJBQThCLEVBQUUsQ0FBQzt3QkFDckQsSUFBTSxRQUFRLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQzt3QkFDckMsSUFBSSxRQUFRLENBQUMsS0FBSyxFQUFFOzRCQUNsQixPQUFPLE1BQU0sQ0FBQyxRQUFRLENBQUMsQ0FBQzt5QkFDekI7d0JBRUQsT0FBTyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUM7b0JBQzNCLENBQUM7aUJBQ0YsQ0FBQyxDQUFDLENBQUM7WUFDTixDQUFDLENBQUMsQ0FBQztRQUNMLENBQUMsQ0FBQztJQUNKLENBQUM7SUFDSCwrQkFBQztBQUFELENBQUMsQUEzUkQsQ0FBOEMsYUFBYSxHQTJSMUQifQ==

@@ -12,58 +12,52 @@ (function (factory) {

Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const core_1 = require("@ant-basement/core");
const core_2 = tslib_1.__importDefault(require("crypto-js/core"));
const hmac_md5_1 = tslib_1.__importDefault(require("crypto-js/hmac-md5"));
const util_1 = require("util");
const error_1 = require("./error");
class MiniProgramHTTPRequestEncoder extends core_1.HTTPRequestEncoder {
constructor(endpoint, spaceId) {
super(endpoint);
this.spaceId = spaceId;
this.prefix = core_1.PREFIX.CLIENT;
this.serviceHeaders = {};
this.setBodyField({
spaceId,
var tslib_1 = require("tslib");
var core_1 = require("@ant-basement/core");
var core_2 = tslib_1.__importDefault(require("crypto-js/core"));
var hmac_md5_1 = tslib_1.__importDefault(require("crypto-js/hmac-md5"));
var util_1 = require("util");
var error_1 = require("./error");
var MiniProgramHTTPRequestEncoder = (function (_super) {
tslib_1.__extends(MiniProgramHTTPRequestEncoder, _super);
function MiniProgramHTTPRequestEncoder(endpoint, spaceId) {
var _this = _super.call(this, endpoint) || this;
_this.spaceId = spaceId;
_this.prefix = core_1.PREFIX.CLIENT;
_this.serviceHeaders = {};
_this.setBodyField({
spaceId: spaceId,
});
return _this;
}
sign(clientSecret) {
const { spaceId, method, params, token, userId } = this.body;
const timestamp = Date.now();
MiniProgramHTTPRequestEncoder.prototype.sign = function (clientSecret) {
var _a = this.body, spaceId = _a.spaceId, method = _a.method, params = _a.params, token = _a.token, userId = _a.userId;
var timestamp = Date.now();
this.setBodyField({
timestamp,
timestamp: timestamp,
});
let signString = '';
const signObject = {
spaceId,
timestamp,
method,
var signString = '';
var signObject = {
spaceId: spaceId,
timestamp: timestamp,
method: method,
params: JSON.stringify(params),
token,
userId,
token: token,
userId: userId,
};
Object.keys(signObject).sort().forEach(key => {
Object.keys(signObject).sort().forEach(function (key) {
if (signObject[key]) {
signString = `${signString}&${key}=${signObject[key]}`;
signString = signString + "&" + key + "=" + signObject[key];
}
});
signString = signString.slice(1);
const sign = hmac_md5_1.default(signString, clientSecret).toString(core_2.default.enc.Hex);
this.setServerlessHeaders({ sign });
}
encodeAsHTTPRequestObject(additionalObject) {
var sign = hmac_md5_1.default(signString, clientSecret).toString(core_2.default.enc.Hex);
this.setServerlessHeaders({ sign: sign });
};
MiniProgramHTTPRequestEncoder.prototype.encodeAsHTTPRequestObject = function (additionalObject) {
if (this.body.params) {
this.body.params = JSON.stringify(this.body.params);
}
return {
url: this.url,
data: this.body,
method: this.method,
headers: this.headers,
header: this.headers,
dataType: 'json',
...additionalObject,
};
}
clone() {
const encoder = new MiniProgramHTTPRequestEncoder(this.endpoint, this.spaceId);
return tslib_1.__assign({ url: this.url, data: this.body, method: this.method, headers: this.headers, header: this.headers, dataType: 'json' }, additionalObject);
};
MiniProgramHTTPRequestEncoder.prototype.clone = function () {
var encoder = new MiniProgramHTTPRequestEncoder(this.endpoint, this.spaceId);
encoder.setBodyField(this.body);

@@ -73,13 +67,16 @@ encoder.setBaseHeaders(this.baseHeaders);

return encoder;
}
}
};
return MiniProgramHTTPRequestEncoder;
}(core_1.HTTPRequestEncoder));
exports.MiniProgramHTTPRequestEncoder = MiniProgramHTTPRequestEncoder;
class MiniProgramHTTPResponseDecoder extends core_1.HTTPResponseDecoder {
constructor() {
super(...arguments);
this.ERROR_CODES = [11, 12, 13, 14, 19, 20];
var MiniProgramHTTPResponseDecoder = (function (_super) {
tslib_1.__extends(MiniProgramHTTPResponseDecoder, _super);
function MiniProgramHTTPResponseDecoder() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.ERROR_CODES = [11, 12, 13, 14, 19, 20];
return _this;
}
setStatusAndBody(status, body) {
super.setStatusAndBody(status, body);
if (this.ERROR_CODES.includes(status)) {
MiniProgramHTTPResponseDecoder.prototype.setStatusAndBody = function (status, body) {
_super.prototype.setStatusAndBody.call(this, status, body);
if (this.ERROR_CODES.indexOf(status) >= 0) {
this._error = error_1.MPServerlessClientError.from({

@@ -92,6 +89,6 @@ name: core_1.ErrorName.IDE_ERROR,

}
}
decode(res) {
};
MiniProgramHTTPResponseDecoder.prototype.decode = function (res) {
this.setHeaders(res.headers || {});
let body = res.data || res.body;
var body = res.data || res.body;
if (typeof body === 'string') {

@@ -102,5 +99,3 @@ body = JSON.parse(body);

if (util_1.isNumber(body.data.affectedDocs)) {
body = Object.assign({}, body, {
...body.data,
});
body = Object.assign({}, body, tslib_1.__assign({}, body.data));
}

@@ -111,3 +106,3 @@ else if (Object.prototype.toString.call(body.data) === '[object Object]') {

else if (Object.prototype.toString.call(body.data) === '[object Array]') {
[...body.result] = body.data;
body.result = body.data.slice(0);
}

@@ -121,33 +116,34 @@ else {

this.setErrorMessage(res.errMsg);
return super.decode();
return _super.prototype.decode.call(this);
}
const responseErrorCode = parseInt(res.error, 10);
var responseErrorCode = parseInt(res.error, 10);
if (responseErrorCode) {
this.setStatusAndBody(responseErrorCode, body);
return super.decode();
return _super.prototype.decode.call(this);
}
const responseErrorMessage = res.err;
var responseErrorMessage = res.err;
if (responseErrorMessage) {
this.setErrorMessage(responseErrorMessage);
return super.decode();
return _super.prototype.decode.call(this);
}
if (res instanceof Error) {
this.setErrorObject(res);
return super.decode();
return _super.prototype.decode.call(this);
}
if (body && typeof body.error === 'object') {
this.setErrorObject(body.error);
return super.decode();
return _super.prototype.decode.call(this);
}
const responseStatusCode = parseInt(res.status || res.statusCode, 10);
var responseStatusCode = parseInt(res.status || res.statusCode, 10);
if (responseStatusCode) {
this.setStatusAndBody(responseStatusCode, body);
return super.decode();
return _super.prototype.decode.call(this);
}
this.setStatusAndBody(200, res);
return super.decode();
}
}
return _super.prototype.decode.call(this);
};
return MiniProgramHTTPResponseDecoder;
}(core_1.HTTPResponseDecoder));
exports.MiniProgramHTTPResponseDecoder = MiniProgramHTTPResponseDecoder;
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29kZWMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29kZWMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0lBQUEsNkNBUzRCO0lBQzVCLGtFQUFvQztJQUNwQywwRUFBeUM7SUFDekMsK0JBQWdDO0lBQ2hDLG1DQUFrRDtJQThCbEQsTUFBYSw2QkFBOEIsU0FBUSx5QkFBa0I7UUFTbkUsWUFBWSxRQUFnQixFQUFZLE9BQWU7WUFDckQsS0FBSyxDQUFDLFFBQVEsQ0FBQyxDQUFDO1lBRHNCLFlBQU8sR0FBUCxPQUFPLENBQ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z0JBQ3hCLElBQUksQ0FBQyxjQUFjLENBQUMsR0FBRyxDQUFDLENBQUM7Z0JBQ3pCLE9BQU8saUJBQU0sTUFBTSxXQUFFLENBQUM7YUFDdkI7WUFFRCxJQUFJLElBQUksSUFBSSxPQUFPLElBQUksQ0FBQyxLQUFLLEtBQUssUUFBUSxFQUFFO2dCQUMxQyxJQUFJLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztnQkFDaEMsT0FBTyxpQkFBTSxNQUFNLFdBQUUsQ0FBQzthQUN2QjtZQUdELElBQU0sa0JBQWtCLEdBQUcsUUFBUSxDQUFDLEdBQUcsQ0FBQyxNQUFNLElBQUksR0FBRyxDQUFDLFVBQVUsRUFBRSxFQUFFLENBQUMsQ0FBQztZQUN0RSxJQUFJLGtCQUFrQixFQUFFO2dCQUN0QixJQUFJLENBQUMsZ0JBQWdCLENBQUMsa0JBQWtCLEVBQUUsSUFBSSxDQUFDLENBQUM7Z0JBQ2hELE9BQU8saUJBQU0sTUFBTSxXQUFFLENBQUM7YUFDdkI7WUFHRCxJQUFJLENBQUMsZ0JBQWdCLENBQUMsR0FBRyxFQUFFLEdBQUcsQ0FBQyxDQUFDO1lBQ2hDLE9BQU8saUJBQU0sTUFBTSxXQUFFLENBQUM7UUFDeEIsQ0FBQztRQUNILHFDQUFDO0lBQUQsQ0FBQyxBQTNGRCxDQUFvRCwwQkFBbUIsR0EyRnRFO0lBM0ZZLHdFQUE4QiJ9

@@ -7,3 +7,3 @@ (function (factory) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "@ant-basement/core"], factory);
define(["require", "exports", "tslib", "@ant-basement/core"], factory);
}

@@ -13,17 +13,21 @@ })(function (require, exports) {

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@ant-basement/core");
class MPServerlessClientError extends core_1.BuiltInError {
constructor(name, code, type, message) {
super(message);
this.name = name;
this.code = code;
this.type = type;
this.message = message;
var tslib_1 = require("tslib");
var core_1 = require("@ant-basement/core");
var MPServerlessClientError = (function (_super) {
tslib_1.__extends(MPServerlessClientError, _super);
function MPServerlessClientError(name, code, type, message) {
var _this = _super.call(this, message) || this;
_this.name = name;
_this.code = code;
_this.type = type;
_this.message = message;
return _this;
}
static from(raw) {
MPServerlessClientError.from = function (raw) {
return new MPServerlessClientError(raw.name, raw.code, raw.type, raw.message);
}
}
};
return MPServerlessClientError;
}(core_1.BuiltInError));
exports.MPServerlessClientError = MPServerlessClientError;
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXJyb3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7SUFBQSw2Q0FBbUU7SUFFbkUsTUFBYSx1QkFBd0IsU0FBUSxtQkFBWTtRQUN2RCxZQUNTLElBQVksRUFDWixJQUFZLEVBQ1osSUFBWSxFQUNaLE9BQWU7WUFFdEIsS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1lBTFIsU0FBSSxHQUFKLElBQUksQ0FBUTtZQUNaLFNBQUksR0FBSixJQUFJLENBQVE7WUFDWixTQUFJLEdBQUosSUFBSSxDQUFRO1lBQ1osWUFBTyxHQUFQLE9BQU8sQ0FBUTtRQUd4QixDQUFDO1FBT00sTUFBTSxDQUFDLElBQUksQ0FBQyxHQUFvQjtZQUNyQyxPQUFPLElBQUksdUJBQXVCLENBQ2hDLEdBQUcsQ0FBQyxJQUFJLEVBQ1IsR0FBRyxDQUFDLElBQUksRUFDUixHQUFHLENBQUMsSUFBSSxFQUNSLEdBQUcsQ0FBQyxPQUFPLENBQ1osQ0FBQztRQUNKLENBQUM7S0FDRjtJQXZCRCwwREF1QkMifQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXJyb3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0lBQUEsMkNBQW1FO0lBRW5FO1FBQTZDLG1EQUFZO1FBQ3ZELGlDQUNTLElBQVksRUFDWixJQUFZLEVBQ1osSUFBWSxFQUNaLE9BQWU7WUFKeEIsWUFNRSxrQkFBTSxPQUFPLENBQUMsU0FDZjtZQU5RLFVBQUksR0FBSixJQUFJLENBQVE7WUFDWixVQUFJLEdBQUosSUFBSSxDQUFRO1lBQ1osVUFBSSxHQUFKLElBQUksQ0FBUTtZQUNaLGFBQU8sR0FBUCxPQUFPLENBQVE7O1FBR3hCLENBQUM7UUFPYSw0QkFBSSxHQUFsQixVQUFtQixHQUFvQjtZQUNyQyxPQUFPLElBQUksdUJBQXVCLENBQ2hDLEdBQUcsQ0FBQyxJQUFJLEVBQ1IsR0FBRyxDQUFDLElBQUksRUFDUixHQUFHLENBQUMsSUFBSSxFQUNSLEdBQUcsQ0FBQyxPQUFPLENBQ1osQ0FBQztRQUNKLENBQUM7UUFDSCw4QkFBQztJQUFELENBQUMsQUF2QkQsQ0FBNkMsbUJBQVksR0F1QnhEO0lBdkJZLDBEQUF1QiJ9

@@ -12,119 +12,175 @@ (function (factory) {

Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const core_1 = require("@ant-basement/core");
const services_1 = require("@ant-basement/services");
const transport_1 = require("./transport");
const lite_1 = tslib_1.__importDefault(require("mime/lite"));
const error_1 = require("./error");
const network_1 = require("./network");
class MiniProgramFileService extends services_1.FileService {
async uploadFile(options) {
core_1.assert(options.filePath && typeof options.filePath === 'string', 'missing options.filePath');
const relativePath = options.filePath.replace(/(.*):\/\//, '');
const extension = relativePath.split('.').pop();
core_1.assert(core_1.WHITELIST_EXTENSIONS.includes(extension.toLowerCase()), `目前不支持 ${extension} 类型文件`);
const meta = Object.keys(options.meta || {}).reduce((accu, key) => {
accu[`x-oss-meta-${key}`] = options.meta[key];
return accu;
}, {});
const headers = options.headers ? core_1.OSSUploadHeaderList.reduce((accu, key) => {
const fieldName = key.replace(/\-[A-Z]/g, match => match[1]).replace(/^[A-Z]/, match => match.toLowerCase());
if (options.headers.hasOwnProperty(fieldName))
accu[key] = options.headers[fieldName];
return accu;
}, {}) : {};
let fileSize = options.fileSize;
const getFileInfo = this.transport.getFileInfo;
if (!fileSize && getFileInfo) {
const fileInfo = await getFileInfo({
filePath: options.filePath,
var tslib_1 = require("tslib");
var core_1 = require("@ant-basement/core");
var services_1 = require("@ant-basement/services");
var transport_1 = require("./transport");
var lite_1 = tslib_1.__importDefault(require("mime/lite"));
var error_1 = require("./error");
var network_1 = require("./network");
var MiniProgramFileService = (function (_super) {
tslib_1.__extends(MiniProgramFileService, _super);
function MiniProgramFileService() {
return _super !== null && _super.apply(this, arguments) || this;
}
MiniProgramFileService.prototype.uploadFile = function (options) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var relativePath, extension, meta, headers, fileSize, getFileInfo, fileInfo, imageExt, getImageInfo, imageInfo, uploadRes, uploadOptions;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0:
core_1.assert(options.filePath && typeof options.filePath === 'string', 'missing options.filePath');
relativePath = options.filePath.replace(/(.*):\/\//, '');
extension = relativePath.split('.').pop();
core_1.assert(core_1.WHITELIST_EXTENSIONS.indexOf(extension.toLowerCase()) >= 0, "\u76EE\u524D\u4E0D\u652F\u6301 " + extension + " \u7C7B\u578B\u6587\u4EF6");
meta = Object.keys(options.meta || {}).reduce(function (accu, key) {
accu["x-oss-meta-" + key] = options.meta[key];
return accu;
}, {});
headers = options.headers ? core_1.OSSUploadHeaderList.reduce(function (accu, key) {
var fieldName = key.replace(/\-[A-Z]/g, function (match) { return match[1]; }).replace(/^[A-Z]/, function (match) { return match.toLowerCase(); });
if (options.headers.hasOwnProperty(fieldName))
accu[key] = options.headers[fieldName];
return accu;
}, {}) : {};
fileSize = options.fileSize;
getFileInfo = this.transport.getFileInfo;
if (!(!fileSize && getFileInfo)) return [3, 2];
return [4, getFileInfo({
filePath: options.filePath,
})];
case 1:
fileInfo = _a.sent();
fileSize = fileInfo.size;
_a.label = 2;
case 2:
imageExt = options.extension;
getImageInfo = this.transport.getImageInfo;
if (!(!imageExt && getImageInfo)) return [3, 4];
return [4, getImageInfo({
src: options.filePath,
})];
case 3:
imageInfo = _a.sent();
imageExt = imageInfo.type;
_a.label = 4;
case 4: return [4, this.getOSSUploadOptionsFromPath(relativePath, options.path, fileSize)];
case 5:
uploadRes = _a.sent();
if (uploadRes.error) {
throw new error_1.MPServerlessClientError(core_1.ErrorName.INTERFACE_ERROR, core_1.ErrorCode.INTERFACE_RESPONSE_FAILED, core_1.ErrorType.COMMON_ERROR, uploadRes.error.message);
}
uploadOptions = core_1.OSSUploadResponseFormat(uploadRes.result);
return [4, this.uploadFileToOSS(options, uploadOptions, headers, meta)];
case 6:
_a.sent();
return [4, this.reportOSSUpload(uploadOptions.id, lite_1.default.getType(imageExt))];
case 7:
_a.sent();
return [2, {
fileUrl: "https://" + uploadOptions.host + "/" + uploadOptions.key,
filePath: uploadOptions.key,
}];
}
});
fileSize = fileInfo.size;
}
let imageExt = options.extension;
const getImageInfo = this.transport.getImageInfo;
if (!imageExt && getImageInfo) {
const imageInfo = await getImageInfo({
src: options.filePath,
});
};
MiniProgramFileService.prototype.uploadFileToOSS = function (fileUploadOptions, ossUploadOptions, headers, meta) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var options, uploadHeader, contentType;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0:
options = ['key', 'policy', 'Signature', 'OSSAccessKeyId'].reduce(function (accu, key) {
accu[key] = ossUploadOptions[key];
return accu;
}, ossUploadOptions);
uploadHeader = {};
if (fileUploadOptions.extension) {
contentType = lite_1.default.getType(fileUploadOptions.extension);
if (!contentType) {
throw new error_1.MPServerlessClientError(core_1.ErrorName.VALIDATION_ERROR, core_1.ErrorCode.VALIDATION_FAILED, core_1.ErrorType.COMMON_ERROR, '文件扩展错误,无法解析正确的 MIME');
}
uploadHeader['Content-Type'] = contentType;
}
headers['Cache-Control'] = 'max-age=2592000';
return [4, this.transport.upload("https://" + ossUploadOptions.host, Object.assign({ success_action_status: 200 }, headers, meta, options), 'file', fileUploadOptions.filePath, uploadHeader)];
case 1:
_a.sent();
return [2];
}
});
imageExt = imageInfo.type;
}
const uploadRes = await this.getOSSUploadOptionsFromPath(relativePath, options.path, fileSize);
if (uploadRes.error) {
throw new error_1.MPServerlessClientError(core_1.ErrorName.INTERFACE_ERROR, core_1.ErrorCode.INTERFACE_RESPONSE_FAILED, core_1.ErrorType.COMMON_ERROR, uploadRes.error.message);
}
const uploadOptions = core_1.OSSUploadResponseFormat(uploadRes.result);
await this.uploadFileToOSS(options, uploadOptions, headers, meta);
await this.reportOSSUpload(uploadOptions.id, lite_1.default.getType(imageExt));
return {
fileUrl: `https://${uploadOptions.host}/${uploadOptions.key}`,
filePath: uploadOptions.key,
};
}
async uploadFileToOSS(fileUploadOptions, ossUploadOptions, headers, meta) {
const options = ['key', 'policy', 'Signature', 'OSSAccessKeyId'].reduce((accu, key) => {
accu[key] = ossUploadOptions[key];
return accu;
}, ossUploadOptions);
const uploadHeader = {};
if (fileUploadOptions.extension) {
const contentType = lite_1.default.getType(fileUploadOptions.extension);
if (!contentType) {
throw new error_1.MPServerlessClientError(core_1.ErrorName.VALIDATION_ERROR, core_1.ErrorCode.VALIDATION_FAILED, core_1.ErrorType.COMMON_ERROR, '文件扩展错误,无法解析正确的 MIME');
}
uploadHeader['Content-Type'] = contentType;
}
headers['Cache-Control'] = 'max-age=2592000';
await this.transport.upload(`https://${ossUploadOptions.host}`, Object.assign({ success_action_status: 200 }, headers, meta, options), 'file', fileUploadOptions.filePath, uploadHeader);
}
}
class MPServerless extends core_1.Basement {
constructor(appGlobal, options) {
super({ ...options, httpClient: appGlobal, httpTransport: transport_1.MiniProgramHTTPTransport, logger: appGlobal.logger });
});
};
return MiniProgramFileService;
}(services_1.FileService));
var MPServerless = (function (_super) {
tslib_1.__extends(MPServerless, _super);
function MPServerless(appGlobal, options) {
var _this = _super.call(this, tslib_1.__assign(tslib_1.__assign({}, options), { httpClient: appGlobal, httpTransport: transport_1.MiniProgramHTTPTransport, logger: appGlobal.logger })) || this;
core_1.assert(options.clientSecret, 'clientSecret is required');
core_1.assert(options.appId, 'appId is required');
this.db = new services_1.DbService(this.transport);
this.user = new services_1.AuthService(this.transport);
this.file = new MiniProgramFileService(this.transport);
this.function = new services_1.FunctionService(this.transport);
this.network = new network_1.NetworkService(this.transport);
this.user.authorize = async (options) => {
const hasToken = this.transport.hasToken();
if (options.authType === transport_1.AuthType.ANONYMOUS) {
const token = await this.transport.anonymousAuthorize(options);
if (token) {
return {
success: true,
};
_this.db = new services_1.DbService(_this.transport);
_this.user = new services_1.AuthService(_this.transport);
_this.file = new MiniProgramFileService(_this.transport);
_this.function = new services_1.FunctionService(_this.transport);
_this.network = new network_1.NetworkService(_this.transport);
_this.user.authorize = function (options) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var hasToken, token, token;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0:
hasToken = this.transport.hasToken();
if (!(options.authType === transport_1.AuthType.ANONYMOUS)) return [3, 2];
return [4, this.transport.anonymousAuthorize(options)];
case 1:
token = _a.sent();
if (token) {
return [2, {
success: true,
}];
}
return [2, {
success: false,
}];
case 2:
if (!(!hasToken || hasToken && this.transport.authType !== options.authType)) return [3, 4];
return [4, this.transport.authorize(options)];
case 3:
token = _a.sent();
if (token) {
return [2, {
success: true,
}];
}
return [2, {
success: false,
}];
case 4: return [2];
}
return {
success: false,
};
}
else if (!hasToken || hasToken && this.transport.authType !== options.authType) {
const token = await this.transport.authorize(options);
if (token) {
return {
success: true,
};
}
return {
success: false,
};
}
};
});
}); };
return _this;
}
get version() {
return VERSION;
}
get ua() {
return PKGUA;
}
createTransport(options) {
super.createTransport(options);
Object.defineProperty(MPServerless.prototype, "version", {
get: function () {
return VERSION;
},
enumerable: true,
configurable: true
});
Object.defineProperty(MPServerless.prototype, "ua", {
get: function () {
return PKGUA;
},
enumerable: true,
configurable: true
});
MPServerless.prototype.createTransport = function (options) {
_super.prototype.createTransport.call(this, options);
this.transport.setAppSecret(options.clientSecret).setUA(this.ua);
}
}
};
return MPServerless;
}(core_1.Basement));
exports.MPServerless = MPServerless;
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXBzZXJ2ZXJsZXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL21wc2VydmVybGVzcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7SUFBQSw2Q0FhNEI7SUFDNUIscURBRWdDO0lBQ2hDLDJDQUFtRjtJQUNuRiw2REFBNkI7SUFDN0IsbUNBQWtEO0lBQ2xELHVDQUVtQjtJQUVuQixNQUFNLHNCQUF1QixTQUFRLHNCQUFXO1FBTXZDLEtBQUssQ0FBQyxVQUFVLENBQUMsT0FBMEI7WUFDaEQsYUFBTSxDQUFDLE9BQU8sQ0FBQyxRQUFRLElBQUksT0FBTyxPQUFPLENBQUMsUUFBUSxLQUFLLFFBQVEsRUFBRSwwQkFBMEIsQ0FBQyxDQUFDO1lBRTdGLE1BQU0sWUFBWSxHQUFHLE9BQU8sQ0FBQyxRQUFRLENBQUMsT0FBTyxDQUFDLFdBQVcsRUFBRSxFQUFFLENBQUMsQ0FBQztZQUMvRCxNQUFNLFNBQVMsR0FBRyxZQUFZLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDLEdBQUcsRUFBRSxDQUFDO1lBQ2hELGFBQU0sQ0FBQywyQkFBb0IsQ0FBQyxRQUFRLENBQUMsU0FBUyxDQUFDLFdBQVcsRUFBRSxDQUFDLEVBQUUsU0FBUyxTQUFTLE9BQU8sQ0FBQyxDQUFDO1lBRT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9

@@ -7,3 +7,3 @@ (function (factory) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "@ant-basement/core"], factory);
define(["require", "exports", "tslib", "@ant-basement/core"], factory);
}

@@ -13,16 +13,32 @@ })(function (require, exports) {

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@ant-basement/core");
class NetworkService extends core_1.BaseService {
async forward(method, params) {
const request = this.getEncoder();
request.setBodyField({
method,
params,
var tslib_1 = require("tslib");
var core_1 = require("@ant-basement/core");
var NetworkService = (function (_super) {
tslib_1.__extends(NetworkService, _super);
function NetworkService() {
return _super !== null && _super.apply(this, arguments) || this;
}
NetworkService.prototype.forward = function (method, params) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var request, response;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0:
request = this.getEncoder();
request.setBodyField({
method: method,
params: params,
});
return [4, this.transport.request(request)];
case 1:
response = _a.sent();
return [2, response.body];
}
});
});
const response = await this.transport.request(request);
return response.body;
}
}
};
return NetworkService;
}(core_1.BaseService));
exports.NetworkService = NetworkService;
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmV0d29yay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9uZXR3b3JrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0lBQUEsNkNBRzRCO0lBRTVCLE1BQWEsY0FBZSxTQUFRLGtCQUFXO1FBQ3RDLEtBQUssQ0FBQyxPQUFPLENBQUMsTUFBYyxFQUFFLE1BQTBCO1lBQzdELE1BQU0sT0FBTyxHQUFHLElBQUksQ0FBQyxVQUFVLEVBQUUsQ0FBQztZQUNsQyxPQUFPLENBQUMsWUFBWSxDQUFDO2dCQUNuQixNQUFNO2dCQUNOLE1BQU07YUFDUCxDQUFDLENBQUM7WUFFSCxNQUFNLFFBQVEsR0FBRyxNQUFNLElBQUksQ0FBQyxTQUFTLENBQUMsT0FBTyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1lBQ3ZELE9BQU8sUUFBUSxDQUFDLElBQUksQ0FBQztRQUN2QixDQUFDO0tBQ0Y7SUFYRCx3Q0FXQyJ9
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmV0d29yay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9uZXR3b3JrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7OztJQUFBLDJDQUc0QjtJQUU1QjtRQUFvQywwQ0FBVztRQUEvQzs7UUFXQSxDQUFDO1FBVmMsZ0NBQU8sR0FBcEIsVUFBcUIsTUFBYyxFQUFFLE1BQTBCOzs7Ozs7NEJBQ3ZELE9BQU8sR0FBRyxJQUFJLENBQUMsVUFBVSxFQUFFLENBQUM7NEJBQ2xDLE9BQU8sQ0FBQyxZQUFZLENBQUM7Z0NBQ25CLE1BQU0sUUFBQTtnQ0FDTixNQUFNLFFBQUE7NkJBQ1AsQ0FBQyxDQUFDOzRCQUVjLFdBQU0sSUFBSSxDQUFDLFNBQVMsQ0FBQyxPQUFPLENBQUMsT0FBTyxDQUFDLEVBQUE7OzRCQUFoRCxRQUFRLEdBQUcsU0FBcUM7NEJBQ3RELFdBQU8sUUFBUSxDQUFDLElBQUksRUFBQzs7OztTQUN0QjtRQUNILHFCQUFDO0lBQUQsQ0FBQyxBQVhELENBQW9DLGtCQUFXLEdBVzlDO0lBWFksd0NBQWMifQ==

@@ -7,3 +7,3 @@ (function (factory) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "@ant-basement/core", "./codec", "./error"], factory);
define(["require", "exports", "tslib", "@ant-basement/core", "./codec", "./error"], factory);
}

@@ -13,5 +13,6 @@ })(function (require, exports) {

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@ant-basement/core");
const codec_1 = require("./codec");
const error_1 = require("./error");
var tslib_1 = require("tslib");
var core_1 = require("@ant-basement/core");
var codec_1 = require("./codec");
var error_1 = require("./error");
var AuthType;

@@ -22,186 +23,233 @@ (function (AuthType) {

})(AuthType = exports.AuthType || (exports.AuthType = {}));
class MiniProgramHTTPTransport extends core_1.HTTPTransport {
constructor(endpoint, library) {
super(endpoint, library);
this.scope = 'auth_user';
var MiniProgramHTTPTransport = (function (_super) {
tslib_1.__extends(MiniProgramHTTPTransport, _super);
function MiniProgramHTTPTransport(endpoint, library) {
var _this = _super.call(this, endpoint, library) || this;
_this.scope = 'auth_user';
core_1.assert(library.uploadFile, 'missing uploadFile');
core_1.assert(library.getAuthCode, 'missing getAuthCode');
core_1.assert(library.request, 'missing request');
this.uploadFile = this.wrap(library.uploadFile);
this.getAuthCode = this.wrap(library.getAuthCode);
this.httpRequest = this.wrap(library.request);
_this.uploadFile = _this.wrap(library.uploadFile);
_this.getAuthCode = _this.wrap(library.getAuthCode);
_this.httpRequest = _this.wrap(library.request);
if (library.getFileInfo) {
this.getFileInfo = this.wrap(library.getFileInfo);
_this.getFileInfo = _this.wrap(library.getFileInfo);
}
if (library.getImageInfo) {
this.getImageInfo = this.wrap(library.getImageInfo);
_this.getImageInfo = _this.wrap(library.getImageInfo);
}
return _this;
}
getEncoder() {
MiniProgramHTTPTransport.prototype.getEncoder = function () {
return new codec_1.MiniProgramHTTPRequestEncoder(this.endpoint, this.spaceId);
}
async request(encoder, retried = false) {
const cloned = encoder.clone();
const token = await this.getAccessToken();
encoder.setBodyField({
token,
};
MiniProgramHTTPTransport.prototype.request = function (encoder, retried) {
if (retried === void 0) { retried = false; }
return tslib_1.__awaiter(this, void 0, void 0, function () {
var cloned, token, encoded, decoded, e_1, isUnAuthorized;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0:
cloned = encoder.clone();
return [4, this.getAccessToken()];
case 1:
token = _a.sent();
encoder.setBodyField({
token: token,
});
encoder.sign(this.appSecret);
encoder.setBaseHeaders({
'Content-Type': 'application/json',
'x-basement-token': token,
});
if (this.ua) {
encoder.setBaseHeaders({
'x-serverless-ua': this.ua,
});
}
_a.label = 2;
case 2:
_a.trys.push([2, 4, , 8]);
encoded = encoder.encodeAsHTTPRequestObject({
timeout: this.timeout,
dataType: 'json',
});
this.logger.info('request encode data', encoded);
return [4, this.httpRequest(encoded)];
case 3:
decoded = _a.sent();
return [2, decoded];
case 4:
e_1 = _a.sent();
this.logger.error('request error', e_1);
isUnAuthorized = e_1.error.code === 'GATEWAY_INVALID_TOKEN'
|| e_1.error.code === 'InvalidParameter.InvalidToken' || e_1.status === core_1.HTTP_UNAUTHORIZED;
if (!isUnAuthorized) return [3, 7];
if (retried) {
throw new error_1.MPServerlessClientError(core_1.ErrorName.UNAUTHORIZED_ERROR, core_1.ErrorCode.AUTHENTICATION_FAILED, core_1.ErrorType.COMMON_ERROR, 'authentication failed');
}
return [4, this.getAccessToken(true)];
case 5:
_a.sent();
return [4, this.request(cloned, true)];
case 6: return [2, _a.sent()];
case 7:
if (e_1.error) {
throw e_1.error;
}
throw e_1;
case 8: return [2];
}
});
});
encoder.sign(this.appSecret);
encoder.setBaseHeaders({
'Content-Type': 'application/json',
'x-basement-token': token,
});
if (this.ua) {
encoder.setBaseHeaders({
'x-serverless-ua': this.ua,
});
}
try {
const encoded = encoder.encodeAsHTTPRequestObject({
timeout: this.timeout,
dataType: 'json',
});
this.logger.info('request encode data', encoded);
const decoded = await this.httpRequest(encoded);
return decoded;
}
catch (e) {
this.logger.error('request error', e);
const isUnAuthorized = e.error.code === 'GATEWAY_INVALID_TOKEN'
|| e.error.code === 'InvalidParameter.InvalidToken' || e.status === core_1.HTTP_UNAUTHORIZED;
if (isUnAuthorized) {
if (retried) {
throw new error_1.MPServerlessClientError(core_1.ErrorName.UNAUTHORIZED_ERROR, core_1.ErrorCode.AUTHENTICATION_FAILED, core_1.ErrorType.COMMON_ERROR, 'authentication failed');
}
await this.getAccessToken(true);
return await this.request(cloned, true);
}
if (e.error) {
throw e.error;
}
throw e;
}
}
hasToken() {
};
MiniProgramHTTPTransport.prototype.hasToken = function () {
return !!this.accessToken;
}
get authType() {
return this.currentAuthType;
}
async authorize(options) {
this.pendingRequest = this
.getAuthCode({ scopes: this.scope })
.then((res) => {
this.logger.info(`Request authcode is ${res.body.authCode || res.body.code} `);
return res.body.authCode || res.body.code;
})
.then((authCode) => {
const encoder = this.getEncoder();
encoder.setBodyField({
method: 'serverless.auth.user.authorize',
params: {
authProvider: options.authProvider || 'alipay_openapi',
clientIdentifier: this.appId,
authCode,
},
};
Object.defineProperty(MiniProgramHTTPTransport.prototype, "authType", {
get: function () {
return this.currentAuthType;
},
enumerable: true,
configurable: true
});
MiniProgramHTTPTransport.prototype.authorize = function (options) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var _this = this;
return tslib_1.__generator(this, function (_a) {
this.pendingRequest = this
.getAuthCode({ scopes: this.scope })
.then(function (res) {
_this.logger.info("Request authcode is " + (res.body.authCode || res.body.code) + " ");
return res.body.authCode || res.body.code;
})
.then(function (authCode) {
var encoder = _this.getEncoder();
encoder.setBodyField({
method: 'serverless.auth.user.authorize',
params: {
authProvider: options.authProvider || 'alipay_openapi',
clientIdentifier: _this.appId,
authCode: authCode,
},
});
encoder.sign(_this.appSecret);
encoder.setBaseHeaders({ 'Content-Type': 'application/json' });
if (_this.ua) {
encoder.setBaseHeaders({
'x-serverless-ua': _this.ua,
});
}
var encoded = encoder.encodeAsHTTPRequestObject({
timeout: _this.timeout,
dataType: 'json',
});
return _this.httpRequest(encoded);
})
.then(function (res) {
_this.logger.info('Request accessToken ' + (res.body.success ? 'success' : 'failed'));
if (res.body && res.body.result) {
_this.authorizeOptions = options;
_this.accessToken = res.body.result.accessToken;
_this.currentAuthType = AuthType.DEFAULT;
}
_this.pendingRequest = null;
return Promise.resolve(_this.accessToken);
});
return [2, this.pendingRequest];
});
encoder.sign(this.appSecret);
encoder.setBaseHeaders({ 'Content-Type': 'application/json' });
if (this.ua) {
encoder.setBaseHeaders({
'x-serverless-ua': this.ua,
});
};
MiniProgramHTTPTransport.prototype.anonymousAuthorize = function (options) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var encoder, encoded;
var _this = this;
return tslib_1.__generator(this, function (_a) {
encoder = this.getEncoder();
encoder.setBodyField({
method: 'serverless.auth.user.anonymousAuthorize',
params: {
clientIdentifier: this.appId,
},
});
}
const encoded = encoder.encodeAsHTTPRequestObject({
timeout: this.timeout,
dataType: 'json',
encoder.sign(this.appSecret);
encoder.setBaseHeaders({ 'Content-Type': 'application/json' });
if (this.ua) {
encoder.setBaseHeaders({
'x-serverless-ua': this.ua,
});
}
encoded = encoder.encodeAsHTTPRequestObject({
timeout: this.timeout,
dataType: 'json',
});
this.pendingRequest = this.httpRequest(encoded)
.then(function (res) {
_this.logger.info('Request accessToken ' + (res.body.success ? 'success' : 'failed'));
if (res.body && res.body.result) {
_this.authorizeOptions = options;
_this.accessToken = res.body.result.accessToken;
_this.currentAuthType = AuthType.ANONYMOUS;
}
_this.pendingRequest = null;
return Promise.resolve(_this.accessToken);
});
return [2, this.pendingRequest];
});
return this.httpRequest(encoded);
})
.then((res) => {
this.logger.info('Request accessToken ' + (res.body.success ? 'success' : 'failed'));
if (res.body && res.body.result) {
this.authorizeOptions = options;
this.accessToken = res.body.result.accessToken;
this.currentAuthType = AuthType.DEFAULT;
}
this.pendingRequest = null;
return Promise.resolve(this.accessToken);
});
return this.pendingRequest;
}
async anonymousAuthorize(options) {
const encoder = this.getEncoder();
encoder.setBodyField({
method: 'serverless.auth.user.anonymousAuthorize',
params: {
clientIdentifier: this.appId,
},
};
MiniProgramHTTPTransport.prototype.getAccessToken = function (refresh) {
if (refresh === void 0) { refresh = false; }
return tslib_1.__awaiter(this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
if (this.pendingRequest) {
this.logger.info('getAccessToken: reuse');
return [2, this.pendingRequest];
}
if (!this.accessToken) {
throw new error_1.MPServerlessClientError(core_1.ErrorName.UNAUTHORIZED_ERROR, core_1.ErrorCode.UNAUTHENTICATION, core_1.ErrorType.COMMON_ERROR, 'unauthentication, should use user.authorize / user.anonymousAuthorize first');
}
if (refresh && this.authorizeOptions) {
this.logger.info('getAccessToken: start');
if (this.authorizeOptions.authType === AuthType.ANONYMOUS) {
return [2, this.anonymousAuthorize(this.authorizeOptions)];
}
return [2, this.authorize(this.authorizeOptions)];
}
return [2, this.accessToken];
});
});
encoder.sign(this.appSecret);
encoder.setBaseHeaders({ 'Content-Type': 'application/json' });
if (this.ua) {
encoder.setBaseHeaders({
'x-serverless-ua': this.ua,
};
MiniProgramHTTPTransport.prototype.upload = function (host, formData, fileName, filePath, header) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0:
this.logger.info('upload with params');
this.logger.info(JSON.stringify(formData, null, 2));
return [4, this.uploadFile({
url: host,
formData: formData,
fileName: fileName,
name: fileName,
filePath: filePath,
fileType: 'image',
header: tslib_1.__assign(tslib_1.__assign({}, header), { 'X-OSS-server-side-encrpytion': 'AES256' }),
})];
case 1: return [2, _a.sent()];
}
});
}
const encoded = encoder.encodeAsHTTPRequestObject({
timeout: this.timeout,
dataType: 'json',
});
this.pendingRequest = this.httpRequest(encoded)
.then((res) => {
this.logger.info('Request accessToken ' + (res.body.success ? 'success' : 'failed'));
if (res.body && res.body.result) {
this.authorizeOptions = options;
this.accessToken = res.body.result.accessToken;
this.currentAuthType = AuthType.ANONYMOUS;
}
this.pendingRequest = null;
return Promise.resolve(this.accessToken);
});
return this.pendingRequest;
}
async getAccessToken(refresh = false) {
if (this.pendingRequest) {
this.logger.info('getAccessToken: reuse');
return this.pendingRequest;
}
if (!this.accessToken) {
throw new error_1.MPServerlessClientError(core_1.ErrorName.UNAUTHORIZED_ERROR, core_1.ErrorCode.UNAUTHENTICATION, core_1.ErrorType.COMMON_ERROR, 'unauthentication, should use user.authorize / user.anonymousAuthorize first');
}
if (refresh && this.authorizeOptions) {
this.logger.info('getAccessToken: start');
if (this.authorizeOptions.authType === AuthType.ANONYMOUS) {
return this.anonymousAuthorize(this.authorizeOptions);
}
return this.authorize(this.authorizeOptions);
}
return this.accessToken;
}
async upload(host, formData, fileName, filePath, header) {
this.logger.info('upload with params');
this.logger.info(JSON.stringify(formData, null, 2));
return await this.uploadFile({
url: host,
formData,
fileName,
name: fileName,
filePath,
fileType: 'image',
header: {
...header,
'X-OSS-server-side-encrpytion': 'AES256',
},
});
}
wrap(myMethod) {
return args => {
return new Promise((resolve, reject) => {
};
MiniProgramHTTPTransport.prototype.wrap = function (myMethod) {
var _this = this;
return function (args) {
return new Promise(function (resolve, reject) {
myMethod(Object.assign(args, {
complete: (res = {}) => {
this.logger.info('completed request');
this.logger.info(JSON.stringify(res, null, 2));
const decoder = new codec_1.MiniProgramHTTPResponseDecoder();
const response = decoder.decode(res);
complete: function (res) {
if (res === void 0) { res = {}; }
_this.logger.info('completed request');
_this.logger.info(JSON.stringify(res, null, 2));
var decoder = new codec_1.MiniProgramHTTPResponseDecoder();
var response = decoder.decode(res);
if (response.error) {

@@ -215,6 +263,7 @@ return reject(response);

};
}
}
};
return MiniProgramHTTPTransport;
}(core_1.HTTPTransport));
exports.MiniProgramHTTPTransport = MiniProgramHTTPTransport;
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNwb3J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3RyYW5zcG9ydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztJQUFBLDZDQVk0QjtJQUM1QixtQ0FPaUI7SUFDakIsbUNBQWtEO0lBY2xELElBQVksUUFHWDtJQUhELFdBQVksUUFBUTtRQUNsQixtQ0FBdUIsQ0FBQTtRQUN2Qix3QkFBWSxDQUFBO0lBQ2QsQ0FBQyxFQUhXLFFBQVEsR0FBUixnQkFBUSxLQUFSLGdCQUFRLFFBR25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xRQUFRLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEVBQUU7d0JBQzNCLFFBQVEsRUFBRSxVQUFDLEdBQWE7NEJBQWIsb0JBQUEsRUFBQSxRQUFhOzRCQUN0QixLQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDOzRCQUN0QyxLQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLEdBQUcsRUFBRSxJQUFJLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQzs0QkFDL0MsSUFBTSxPQUFPLEdBQUcsSUFBSSxzQ0FBOEIsRUFBRSxDQUFDOzRCQUNyRCxJQUFNLFFBQVEsR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBQyxDQUFDOzRCQUNyQyxJQUFJLFFBQVEsQ0FBQyxLQUFLLEVBQUU7Z0NBQ2xCLE9BQU8sTUFBTSxDQUFDLFFBQVEsQ0FBQyxDQUFDOzZCQUN6Qjs0QkFFRCxPQUFPLE9BQU8sQ0FBQyxRQUFRLENBQUMsQ0FBQzt3QkFDM0IsQ0FBQztxQkFDRixDQUFDLENBQUMsQ0FBQztnQkFDTixDQUFDLENBQUMsQ0FBQztZQUNMLENBQUMsQ0FBQztRQUNKLENBQUM7UUFDSCwrQkFBQztJQUFELENBQUMsQUEzUkQsQ0FBOEMsb0JBQWEsR0EyUjFEO0lBM1JZLDREQUF3QiJ9
{
"name": "@alicloud/mpserverless-sdk",
"author": "zack-lin <linzegia@gmail.com>",
"version": "2.2.0-alpha.0",
"version": "2.2.0-alpha.1",
"description": "JavaScript SDK for Alicloud MPServerless",

@@ -6,0 +6,0 @@ "main": "dist/umd/index.js",

Sorry, the diff of this file is too big to display

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