Commit 72de2b97 authored by qinhaitao's avatar qinhaitao

init

parent 040b48e0
/** @format */
module.exports = {
parser: '@typescript-eslint/parser',
extends: ['prettier/@typescript-eslint', 'plugin:prettier/recommended'],
parserOptions: {
ecmaVersion: 2019,
sourceType: 'module'
},
env: {
browser: true,
node: true
}
}
.tea
.DS_Store
.vscode
debug.log
node_modules
\ No newline at end of file
module.exports = {
"printWidth": 120,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "avoid",
"insertPragma": true,
"tabWidth": 2,
"useTabs": false
};
\ No newline at end of file
# 通用模板
## 库表规范
http://cf.dui88.com/pages/viewpage.action?pageId=63937755
## sdk 接口文档说明
http://cf.dui88.com/pages/viewpage.action?pageId=66194323
## 模板说明
{
"runtime": "nodejs8",
"version": "1.0"
}
\ No newline at end of file
/** @format */
interface Iconfig {
VIP_CALLBACK_URL: string;
VIP_MOCK: boolean;
}
export declare const getConfig: (context: Context) => Iconfig;
export {};
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getConfig = void 0;
var online_1 = require("./online");
var test_1 = require("./test");
var configs = {
online: online_1.default,
test: test_1.default
};
exports.getConfig = function (context) {
var env = context.env;
return configs[env] || configs.test;
};
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,mCAA6B;AAC7B,+BAAyB;AAOzB,IAAM,OAAO,GAAG;IACd,MAAM,kBAAA;IACN,IAAI,gBAAA;CACL,CAAA;AAEY,QAAA,SAAS,GAAG,UAAC,OAAgB;IACxC,IAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;IACvB,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,IAAI,CAAA;AACrC,CAAC,CAAA"}
\ No newline at end of file
/** @format */
declare const _default: {
VIP_CALLBACK_URL: string;
VIP_MOCK: boolean;
};
export default _default;
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
VIP_CALLBACK_URL: 'testUrl',
VIP_MOCK: false
};
//# sourceMappingURL=online.js.map
\ No newline at end of file
{"version":3,"file":"online.js","sourceRoot":"","sources":["../../src/config/online.ts"],"names":[],"mappings":";AAAA,cAAc;;AAEd,kBAAe;IACb,gBAAgB,EAAE,SAAS;IAC3B,QAAQ,EAAE,KAAK;CAChB,CAAA"}
\ No newline at end of file
declare const _default: {
VIP_CALLBACK_URL: string;
VIP_MOCK: boolean;
};
/** @format */
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/** @format */
exports.default = {
VIP_CALLBACK_URL: 'onlineUrl',
VIP_MOCK: true
};
//# sourceMappingURL=test.js.map
\ No newline at end of file
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/config/test.ts"],"names":[],"mappings":";;AAAA,cAAc;AACd,kBAAe;IACb,gBAAgB,EAAE,WAAW;IAC7B,QAAQ,EAAE,IAAI;CACf,CAAA"}
\ No newline at end of file
/** @format */
export declare const BusinessError: {
ERROR_UPDATE_RETRY: {
code: string;
defaultMsg: string;
};
ERROR_NO_ACTIVITY: {
code: string;
defaultMsg: string;
};
ERROR_ACTIVITY_NOSTART: {
code: string;
defaultMsg: string;
};
ERROR_ACTIVITY_OVER: {
code: string;
defaultMsg: string;
};
ERROR_NO_USER: {
code: string;
defaultMsg: string;
};
ERROR_NEEDMEMBER_DOHELP: {
code: string;
defaultMsg: string;
};
ERROR_NO_VIP: {
code: string;
defaultMsg: string;
};
ERROR_TASK_ALREADYRECEIVE: {
code: string;
defaultMsg: string;
};
ERROR_TASK_COMPLETE: {
code: string;
defaultMsg: string;
};
ERROR_TASK_NORECEIVE: {
code: string;
defaultMsg: string;
};
ERROR_INVALID_INVITE_ID: {
code: string;
defaultMsg: string;
};
ERROR_NO_CREDITS: {
code: string;
defaultMsg: string;
};
ERROR_TASK_LIMIT: {
code: string;
defaultMsg: string;
};
ERROR_FORBIDDEN_OPE: {
code: string;
defaultMsg: string;
};
ERROR_RECEIVE_PRIZE: {
code: string;
defaultMsg: string;
};
ERROR_SEND_PRIZE: {
code: string;
defaultMsg: string;
};
ERROR_NO_PRIZE: {
code: string;
defaultMsg: string;
};
ERROR_NO_STOCK: {
code: string;
defaultMsg: string;
};
ERROR_PRIZE_EXPIRED: {
code: string;
defaultMsg: string;
};
};
export declare const CODE_TYPES: {
PARAMS_ERROR: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
SYSTEM_ERROR: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
SUCCESS: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
} & {
ERROR_UPDATE_RETRY: {
code: string;
defaultMsg: string;
};
ERROR_NO_ACTIVITY: {
code: string;
defaultMsg: string;
};
ERROR_ACTIVITY_NOSTART: {
code: string;
defaultMsg: string;
};
ERROR_ACTIVITY_OVER: {
code: string;
defaultMsg: string;
};
ERROR_NO_USER: {
code: string;
defaultMsg: string;
};
ERROR_NEEDMEMBER_DOHELP: {
code: string;
defaultMsg: string;
};
ERROR_NO_VIP: {
code: string;
defaultMsg: string;
};
ERROR_TASK_ALREADYRECEIVE: {
code: string;
defaultMsg: string;
};
ERROR_TASK_COMPLETE: {
code: string;
defaultMsg: string;
};
ERROR_TASK_NORECEIVE: {
code: string;
defaultMsg: string;
};
ERROR_INVALID_INVITE_ID: {
code: string;
defaultMsg: string;
};
ERROR_NO_CREDITS: {
code: string;
defaultMsg: string;
};
ERROR_TASK_LIMIT: {
code: string;
defaultMsg: string;
};
ERROR_FORBIDDEN_OPE: {
code: string;
defaultMsg: string;
};
ERROR_RECEIVE_PRIZE: {
code: string;
defaultMsg: string;
};
ERROR_SEND_PRIZE: {
code: string;
defaultMsg: string;
};
ERROR_NO_PRIZE: {
code: string;
defaultMsg: string;
};
ERROR_NO_STOCK: {
code: string;
defaultMsg: string;
};
ERROR_PRIZE_EXPIRED: {
code: string;
defaultMsg: string;
};
};
export declare const TBERROR: {
USER_PERMISSION_EXCEED_MAX_RIGHT_COUNT_IN_DAY: string;
COUPON_INVALID_OR_DELETED: string;
APPLY_OWNSELF_COUPON: string;
APPLY_SINGLE_COUPON_COUNT_EXCEED_LIMIT: string;
NO_RIGHT_QUANTITY: string;
ERRORA_3_567: string;
'Invalid session': string;
};
export declare const DRAW_STATUS: {
WAITAWARD: number;
PROCESSING: number;
SUCCESS: number;
FAIL: number;
EXPIRED: number;
RETRY: number;
};
export declare const PRIZE_TYPE: {
ENAME: number;
CREDITS: number;
OBJECT: number;
THANKS: number;
};
export declare const C_APP_NAME: string;
export declare const TAOBAO_SUCCESS_ORDER_STATUS: string[];
export declare const enum ACTIVITY_STATUS {
NORMAL = 1,
DELETE = 2
}
export declare const TASK_RATE_TYPE: {
FOREVER: number;
EVERYDAY: number;
NOLIMIT: number;
};
export declare const RECORD_TYPE: {
FOLLOW_TASK: {
type: number;
name: string;
};
SIGN_TASK: {
type: number;
name: string;
};
RECEIVE_INVITE: {
type: number;
name: string;
};
INVITE_SUCCESS: {
type: number;
name: string;
};
};
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.RECORD_TYPE = exports.TASK_RATE_TYPE = exports.TAOBAO_SUCCESS_ORDER_STATUS = exports.C_APP_NAME = exports.PRIZE_TYPE = exports.DRAW_STATUS = exports.TBERROR = exports.CODE_TYPES = exports.BusinessError = void 0;
var sdk_1 = require("./sdk");
exports.BusinessError = {
// 更新重试失败(用于并发更新)
ERROR_UPDATE_RETRY: {
code: "210001",
defaultMsg: "\u7CFB\u7EDF\u9519\u8BEF"
},
// 活动不存在
ERROR_NO_ACTIVITY: {
code: "220001",
defaultMsg: "\u6D3B\u52A8\u4E0D\u5B58\u5728"
},
// 活动未开始
ERROR_ACTIVITY_NOSTART: {
code: "220002",
defaultMsg: "\u6D3B\u52A8\u672A\u5F00\u59CB"
},
// 活动已结束
ERROR_ACTIVITY_OVER: {
code: "220003",
defaultMsg: "\u6D3B\u52A8\u5DF2\u7ED3\u675F"
},
// 用户不存在
ERROR_NO_USER: {
code: "310002",
defaultMsg: "\u7528\u6237\u4E0D\u5B58\u5728"
},
// 需要成为会员才能助力哦
ERROR_NEEDMEMBER_DOHELP: {
code: "310004",
defaultMsg: '需要成为会员才能助力哦'
},
// 非店铺会员
ERROR_NO_VIP: {
code: "310005",
defaultMsg: '非店铺会员'
},
// 任务奖励已领取
ERROR_TASK_ALREADYRECEIVE: {
code: "430002",
defaultMsg: "\u4EFB\u52A1\u5956\u52B1\u5DF2\u9886\u53D6"
},
// 任务已完成
ERROR_TASK_COMPLETE: {
code: "430003",
defaultMsg: "\u4EFB\u52A1\u5DF2\u5B8C\u6210"
},
// 暂无次数可领取
ERROR_TASK_NORECEIVE: {
code: "430003",
defaultMsg: "\u6682\u65E0\u6B21\u6570\u53EF\u9886\u53D6"
},
ERROR_INVALID_INVITE_ID: {
code: "430004",
defaultMsg: "\u9080\u8BF7\u7801\u65E0\u6548"
},
ERROR_NO_CREDITS: {
code: "430005",
defaultMsg: "\u79EF\u5206\u4E0D\u8DB3"
},
ERROR_TASK_LIMIT: {
code: "430006",
defaultMsg: "\u4ECA\u65E5\u5B8C\u6210\u8BE5\u4EFB\u52A1\u6B21\u6570\u8D85\u9650"
},
ERROR_FORBIDDEN_OPE: {
code: "530001",
defaultMsg: "\u975E\u6CD5\u64CD\u4F5C"
},
ERROR_RECEIVE_PRIZE: {
code: "630002",
defaultMsg: "\u5956\u52B1\u5DF2\u9886\u53D6"
},
ERROR_SEND_PRIZE: {
code: "730001",
defaultMsg: "\u53D1\u5956\u5931\u8D25"
},
ERROR_NO_PRIZE: {
code: "730002",
defaultMsg: "\u5956\u54C1\u4E0D\u5B58\u5728"
},
ERROR_NO_STOCK: {
code: "730003",
defaultMsg: "\u5E93\u5B58\u4E0D\u8DB3"
},
ERROR_PRIZE_EXPIRED: {
code: "740001",
defaultMsg: "\u5956\u54C1\u5DF2\u8D85\u8FC7\u9886\u53D6\u65F6\u95F4"
}
};
exports.CODE_TYPES = Object.assign({}, sdk_1.DEFAULT_CODE_TYPES, exports.BusinessError);
// tb 接口返回部分错误
exports.TBERROR = {
USER_PERMISSION_EXCEED_MAX_RIGHT_COUNT_IN_DAY: '今日领取达到上限,明日再来领取哦',
COUPON_INVALID_OR_DELETED: '权益无效或者被删除,请联系商家',
APPLY_OWNSELF_COUPON: '不能领取自己家店铺权益',
APPLY_SINGLE_COUPON_COUNT_EXCEED_LIMIT: '请至卡券包删除无用权益再领取',
NO_RIGHT_QUANTITY: '权益库存不足,请联系商家',
ERRORA_3_567: '领取失败,为风险用户',
'Invalid session': '订购应用已过期,请联系商家处理'
};
// 领取奖品状态
exports.DRAW_STATUS = {
// 待领取
WAITAWARD: 1,
// 处理中
PROCESSING: 2,
// 领取成功
SUCCESS: 3,
// 领取失败
FAIL: 4,
// 已过期
EXPIRED: 5,
// 重新领取
RETRY: 6
};
// 奖品类型
exports.PRIZE_TYPE = {
ENAME: 1,
CREDITS: 2,
OBJECT: 3,
THANKS: 5
};
// C端的APP NAME
exports.C_APP_NAME = 'promotioncenter-${需要补充}';
// 订单状态
exports.TAOBAO_SUCCESS_ORDER_STATUS = [
'WAIT_SELLER_SEND_GOODS',
'SELLER_CONSIGNED_PART',
'WAIT_BUYER_CONFIRM_GOODS',
'TRADE_BUYER_SIGNED',
'TRADE_FINISHED',
'PAID_FORBID_CONSIGN'
];
//任务频率类型常量
exports.TASK_RATE_TYPE = {
FOREVER: 1,
EVERYDAY: 2,
NOLIMIT: 3
};
exports.RECORD_TYPE = {
FOLLOW_TASK: { type: 1, name: '关注店铺任务' },
SIGN_TASK: { type: 2, name: '签到任务' },
RECEIVE_INVITE: { type: 3, name: '接受邀请' },
INVITE_SUCCESS: { type: 4, name: '邀请成功' }
};
//# sourceMappingURL=constants.js.map
\ No newline at end of file
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,6BAA0C;AAE7B,QAAA,aAAa,GAAG;IA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A,cAAc,GAAG;IAC5B,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,CAAC;CACX,CAAA;AAEY,QAAA,WAAW,GAAG;IACzB,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxC,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;IACpC,cAAc,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;IACzC,cAAc,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;CAC1C,CAAA"}
\ No newline at end of file
/** @format */
import { AwardsService, BaseService } from '../service';
export default class AwardsController {
/**
* 我的奖品列表
*/
getMyPrizeList(context: Context, {}: {}, [awardSer]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
/**
* 领取实物
*/
receiveObjectPrize(context: Context, {}: {}, [awardSer]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
/**
* 权益重新领取
*/
receiveEnamePrize(context: Context, {}: {}, [awardSer, baseService]: [AwardsService, BaseService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}
"use strict";
/** @format */
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var decorator_1 = require("../decorator");
var sdk_1 = require("../sdk");
var service_1 = require("../service");
var AwardsController = /** @class */ (function () {
function AwardsController() {
}
/**
* 我的奖品列表
*/
AwardsController.prototype.getMyPrizeList = function (context, _a, _b) {
var awardSer = _b[0];
return __awaiter(this, void 0, void 0, function () {
var result;
return __generator(this, function (_c) {
switch (_c.label) {
case 0: return [4 /*yield*/, awardSer.getMyPrizeList({ openId: context.openId, activityId: context.data.activityId })];
case 1:
result = _c.sent();
return [2 /*return*/, sdk_1.resultsModel.success(result)];
}
});
});
};
/**
* 领取实物
*/
AwardsController.prototype.receiveObjectPrize = function (context, _a, _b) {
var awardSer = _b[0];
return __awaiter(this, void 0, void 0, function () {
var _c, province, city, area, addressdetail, _id, name, phone, activityId, result;
return __generator(this, function (_d) {
switch (_d.label) {
case 0:
_c = context.data, province = _c.province, city = _c.city, area = _c.area, addressdetail = _c.addressdetail, _id = _c._id, name = _c.name, phone = _c.phone, activityId = _c.activityId;
return [4 /*yield*/, awardSer.recieveObjectPrize(_id, {
activityId: activityId,
province: province,
city: city,
area: area,
addressdetail: addressdetail,
name: name,
phone: phone
})
//@ts-ignore
];
case 1:
result = _d.sent();
//@ts-ignore
if (result.code) {
//@ts-ignore
return [2 /*return*/, sdk_1.resultsModel.error(result)];
}
return [2 /*return*/, sdk_1.resultsModel.success(result)];
}
});
});
};
/**
* 权益重新领取
*/
AwardsController.prototype.receiveEnamePrize = function (context, _a, _b) {
var awardSer = _b[0], baseService = _b[1];
return __awaiter(this, void 0, void 0, function () {
var _c, _id, activityId, result;
return __generator(this, function (_d) {
switch (_d.label) {
case 0:
_c = context.data, _id = _c._id, activityId = _c.activityId;
return [4 /*yield*/, awardSer.recieveEnamePrize(_id, activityId)
//@ts-ignore
];
case 1:
result = _d.sent();
//@ts-ignore
if (result.code) {
//@ts-ignore
return [2 /*return*/, sdk_1.resultsModel.error(result)];
}
//@ts-ignore
if (result.remark) {
//@ts-ignore
return [2 /*return*/, sdk_1.resultsModel.error(result, result.remark)];
}
return [2 /*return*/, sdk_1.resultsModel.success(result)];
}
});
});
};
__decorate([
decorator_1.paramsCheck(['activityId']),
decorator_1.userCheck({ intercept: true }),
decorator_1.services([service_1.AwardsService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], AwardsController.prototype, "getMyPrizeList", null);
__decorate([
decorator_1.paramsCheck(['activityId', '_id', 'name', 'phone', 'province', 'city', 'area', 'addressdetail']),
decorator_1.userCheck({ intercept: true }),
decorator_1.services([service_1.AwardsService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], AwardsController.prototype, "receiveObjectPrize", null);
__decorate([
decorator_1.paramsCheck(['activityId', '_id']),
decorator_1.userCheck({ intercept: true }),
decorator_1.services([service_1.AwardsService, service_1.BaseService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], AwardsController.prototype, "receiveEnamePrize", null);
return AwardsController;
}());
exports.default = AwardsController;
//# sourceMappingURL=awards.controller.js.map
\ No newline at end of file
{"version":3,"file":"awards.controller.js","sourceRoot":"","sources":["../../src/controller/awards.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGd,0CAA+D;AAE/D,8BAAqC;AACrC,sCAAuD;AACvD;IAAA;IA4DA,CAAC;IA3DC;;OAEG;IAIG,yCAAc,GAApB,UAAqB,OAAgB,EAAE,EAAE,EAAE,EAA2B;YAA1B,QAAQ,QAAA;;;;;4BACrC,qBAAM,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,EAAA;;wBAAvG,MAAM,GAAG,SAA8F;wBAC3G,sBAAO,kBAAY,CAAC,OAAO,CAAC,MAAM,CAAC,EAAA;;;;KACpC;IAED;;OAEG;IAIG,6CAAkB,GAAxB,U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C,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAA;yBACjD;wBACD,sBAAO,kBAAY,CAAC,OAAO,CAAC,MAAM,CAAC,EAAA;;;;KACpC;IApDD;QAHC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,oBAAQ,CAAC,CAAC,uBAAa,CAAC,CAAC;;;;0DAIzB;IAQD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;QAChG,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,oBAAQ,CAAC,CAAC,uBAAa,CAAC,CAAC;;;;8DAmBzB;IAQD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAClC,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,oBAAQ,CAAC,CAAC,uBAAa,EAAE,qBAAW,CAAC,CAAC;;;;6DAgBtC;IACH,uBAAC;CAAA,AA5DD,IA4DC;kBA5DoB,gBAAgB"}
\ No newline at end of file
/** @format */
import { BaseService } from '../service';
export default class BaseController {
/**
* 活动基本信息
*/
getActivityBaseInfoById(context: Context, {}: {}, [baseService]: [BaseService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}
"use strict";
/** @format */
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var constants_1 = require("./../constants");
var decorator_1 = require("../decorator");
var sdk_1 = require("../sdk");
var service_1 = require("../service");
var BaseController = /** @class */ (function () {
function BaseController() {
}
/**
* 活动基本信息
*/
BaseController.prototype.getActivityBaseInfoById = function (context, _a, _b) {
var baseService = _b[0];
return __awaiter(this, void 0, void 0, function () {
var activityId, activityInfo;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
activityId = context.data.activityId;
// 参数校验
if (!activityId) {
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.PARAMS_ERROR, "activityId\u5FC5\u586B")];
}
return [4 /*yield*/, baseService.getBaseInfo(activityId)];
case 1:
activityInfo = _c.sent();
return [2 /*return*/, sdk_1.resultsModel.success(activityInfo)];
}
});
});
};
__decorate([
decorator_1.paramsCheck(['activityId']),
decorator_1.services([service_1.BaseService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], BaseController.prototype, "getActivityBaseInfoById", null);
return BaseController;
}());
exports.default = BaseController;
//# sourceMappingURL=base.controller.js.map
\ No newline at end of file
{"version":3,"file":"base.controller.js","sourceRoot":"","sources":["../../src/controller/base.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,4CAA2C;AAC3C,0CAAoD;AAEpD,8BAAqC;AACrC,sCAAwC;AACxC;IAAA;IAgBA,CAAC;IAfC;;OAEG;IAGG,gDAAuB,GAA7B,UAA8B,OAAgB,EAAE,EAAE,EAAE,EAA4B;YAA3B,WAAW,QAAA;;;;;;wBACtD,UAAU,GAAK,OAAO,CAAC,IAAI,WAAjB,CAAiB;wBACnC,OAAO;wBACP,IAAI,CAAC,UAAU,EAAE;4BACf,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,wBAAc,CAAC,EAAA;yBACnE;wBAEoB,qBAAM,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,EAAA;;wBAAxD,YAAY,GAAG,SAAyC;wBAC9D,sBAAO,kBAAY,CAAC,OAAO,CAAC,YAAY,CAAC,EAAA;;;;KAC1C;IATD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;iEAUvB;IACH,qBAAC;CAAA,AAhBD,IAgBC;kBAhBoB,cAAc"}
\ No newline at end of file
/** @format */
import { UserService, BaseService, AccessService } from '../service';
export default class Share {
/**
* 完成分享
*/
insertShareRecord(context: Context, { userInfo, vipInfo, activityInfo }: IControllerInfos, [userService, baseService, accessService]: [UserService, BaseService, AccessService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}
"use strict";
/** @format */
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var constants_1 = require("./../constants");
var check_1 = require("../decorator/check");
var services_1 = require("../decorator/services");
var sdk_1 = require("../sdk");
var utils_1 = require("../utils");
var service_1 = require("../service");
// {
// "handler": "doFollowTask",
// "data": {
// "activityId": "5f213791964f9706aa59b192"
// }
// }
var Share = /** @class */ (function () {
function Share() {
}
/**
* 完成分享
*/
Share.prototype.insertShareRecord = function (context, _a, _b) {
var userInfo = _a.userInfo, vipInfo = _a.vipInfo, activityInfo = _a.activityInfo;
var userService = _b[0], baseService = _b[1], accessService = _b[2];
return __awaiter(this, void 0, void 0, function () {
var _c, activityId, inviteId, openId, inviteUserInfo, isFirstLogin, isValidShare, tasks, value, today, inviteUserId;
var _d;
return __generator(this, function (_e) {
switch (_e.label) {
case 0:
_c = context.data, activityId = _c.activityId, inviteId = _c.inviteId;
openId = context.openId;
return [4 /*yield*/, userService.getUserInfoByOpenId(inviteId)
// inviteId的用户信息查询不到, 则inviteId无效
];
case 1:
inviteUserInfo = _e.sent();
// inviteId的用户信息查询不到, 则inviteId无效
if (!inviteUserInfo)
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.ERROR_INVALID_INVITE_ID)];
return [4 /*yield*/, accessService.getAccessCount()];
case 2:
isFirstLogin = (_e.sent()) === 1;
isValidShare = [isFirstLogin].every(function (v) { return !!v; });
tasks = activityInfo.tasks;
value = (tasks || {}).inviteFriends.value;
today = utils_1.getToday();
if (!isValidShare) return [3 /*break*/, 4];
inviteUserId = inviteUserInfo._id;
// 增加邀请人的待领取次数和邀请记录
return [4 /*yield*/, userService.updateUser(inviteUserId, {
$inc: {
'remainTimes.invites': value
},
$push: (_d = {},
_d["taskInfo." + today + ".invites"] = { openId: openId, createTime: Date.now() },
_d)
})];
case 3:
// 增加邀请人的待领取次数和邀请记录
_e.sent();
_e.label = 4;
case 4: return [2 /*return*/, sdk_1.resultsModel.success(true)];
}
});
});
};
__decorate([
check_1.paramsCheck(['activityId', 'inviteId']),
check_1.activityTimeCheck,
services_1.services([service_1.UserService, service_1.BaseService, service_1.AccessService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], Share.prototype, "insertShareRecord", null);
return Share;
}());
exports.default = Share;
//# sourceMappingURL=share.controller.js.map
\ No newline at end of file
{"version":3,"file":"share.controller.js","sourceRoot":"","sources":["../../src/controller/share.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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EAAE;gCACzC,IAAI,EAAE;oCACJ,qBAAqB,EAAE,KAAK;iCAC7B;gCACD,KAAK;oCACH,GAAC,cAAY,KAAK,aAAU,IAAG,EAAE,MAAM,QAAA,EAAE,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE;uCAClE;6BACF,CAAC,EAAA;;wBARF,mBAAmB;wBACnB,SAOE,CAAA;;4BAGJ,sBAAO,kBAAY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAA;;;;KAClC;IA5CD;QAHC,mBAAW,CAAC,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACvC,yBAAiB;QACjB,mBAAQ,CAAC,CAAC,qBAAW,EAAE,qBAAW,EAAE,uBAAa,CAAC,CAAC;;;;kDA6CnD;IACH,YAAC;CAAA,AApDD,IAoDC;kBApDoB,KAAK"}
\ No newline at end of file
/** @format */
/** @format */
export default class StatController {
/**
* 统计数据
*/
getStats(context: Context): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}
"use strict";
/** @format */
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var db_1 = require("../db");
var sdk_1 = require("../sdk");
var constants_1 = require("../constants");
var xlsx = require("node-xlsx");
/** @format */
var StatController = /** @class */ (function () {
function StatController() {
}
/**
* 统计数据
*/
StatController.prototype.getStats = function (context) {
return __awaiter(this, void 0, void 0, function () {
var _a, activityId, startDay, endDay, userDao, accessDao, recordDao, awardsDao, oneDay, xlsxData, day, PV, UV, newUV, vipPV, noVipPV, vipUV, noVipUV, newVipUV, followPV, followUV, inviteSuccessUV, receiveShareUV, receiveShareVipUV, receiveShareNoVipUV, keyValueMapper, tommorrow, buffer, result, e_1;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
_a = context.data, activityId = _a.activityId, startDay = _a.startDay, endDay = _a.endDay;
userDao = new sdk_1.BaseDao(context, db_1.USER_DB_NAME);
accessDao = new sdk_1.BaseDao(context, db_1.ACCESS_DB_NAME);
recordDao = new sdk_1.BaseDao(context, db_1.RECORD_DB_NAME);
awardsDao = new sdk_1.BaseDao(context, db_1.AWARDS_DB_NAME);
oneDay = 24 * 3600 * 1000;
xlsxData = [];
_b.label = 1;
case 1:
_b.trys.push([1, 19, , 20]);
day = startDay;
_b.label = 2;
case 2:
if (!(new Date(day).getTime() <= new Date(endDay).getTime())) return [3 /*break*/, 17];
return [4 /*yield*/, accessDao.count({ activityId: activityId, createDay: day })
// 访问UV
];
case 3:
PV = _b.sent();
return [4 /*yield*/, accessDao.aggregate([
{ $match: { activityId: activityId, createDay: day } },
{ $group: { _id: '$openId', count: { $sum: 1 } } }
])];
case 4:
UV = (_b.sent()).length;
return [4 /*yield*/, userDao.count({
activityId: activityId,
createDay: day
})
// 已入会PV
];
case 5:
newUV = _b.sent();
return [4 /*yield*/, accessDao.count({ activityId: activityId, createDay: day, isVip: true })
// 未入会PV
];
case 6:
vipPV = _b.sent();
return [4 /*yield*/, accessDao.count({ activityId: activityId, createDay: day, isVip: false })
// 已入会UV
];
case 7:
noVipPV = _b.sent();
return [4 /*yield*/, accessDao.aggregate([
{ $match: { activityId: activityId, createDay: day, isVip: true } },
{ $group: { _id: '$openId', count: { $sum: 1 } } }
])];
case 8:
vipUV = (_b.sent()).length;
return [4 /*yield*/, accessDao.aggregate([
{ $match: { activityId: activityId, createDay: day, isVip: false } },
{ $group: { _id: '$openId', count: { $sum: 1 } } }
])];
case 9:
noVipUV = (_b.sent()).length;
return [4 /*yield*/, userDao.count({
activityId: activityId,
'member.newMember': true,
'member.bememberDay': day
})];
case 10:
newVipUV = _b.sent();
return [4 /*yield*/, recordDao.count({
activityId: activityId,
createDay: day,
recordType: constants_1.RECORD_TYPE.FOLLOW_TASK.type
})];
case 11:
followPV = _b.sent();
return [4 /*yield*/, recordDao.aggregate([
{ $match: { activityId: activityId, createDay: day, recordType: constants_1.RECORD_TYPE.FOLLOW_TASK.type } },
{ $group: { _id: '$openId', count: { $sum: 1 } } }
])];
case 12:
followUV = (_b.sent()).length;
return [4 /*yield*/, recordDao.aggregate([
{ $match: { activityId: activityId, createDay: day, recordType: constants_1.RECORD_TYPE.INVITE_SUCCESS.type } },
{ $group: { _id: '$inviteId', count: { $sum: 1 } } }
])];
case 13:
inviteSuccessUV = (_b.sent()).length;
return [4 /*yield*/, recordDao.aggregate([
{ $match: { activityId: activityId, createDay: day, recordType: constants_1.RECORD_TYPE.RECEIVE_INVITE.type } },
{ $group: { _id: '$openId', count: { $sum: 1 } } }
])];
case 14:
receiveShareUV = (_b.sent()).length;
return [4 /*yield*/, accessDao.aggregate([
{ $match: { activityId: activityId, createDay: day, isReceiveShare: true, isVip: true } },
{ $group: { _id: '$openId', count: { $sum: 1 } } }
])];
case 15:
receiveShareVipUV = (_b.sent()).length;
return [4 /*yield*/, accessDao.aggregate([
{ $match: { activityId: activityId, createDay: day, isReceiveShare: true, isVip: false } },
{ $group: { _id: '$openId', count: { $sum: 1 } } }
])];
case 16:
receiveShareNoVipUV = (_b.sent()).length;
keyValueMapper = {
时间: day,
访问PV: PV,
访问UV: UV,
新增UV: newUV,
已入会PV: vipPV,
已入会UV: vipUV,
未入会PV: noVipPV,
未入会UV: noVipUV,
新入会UV: newVipUV,
关注店铺完成PV: followPV,
关注店铺完成UV: followUV,
// 签到PV: signTaskPV,
// 签到UV: signTaskUV,
邀请好友完成UV: inviteSuccessUV,
带来好友UV: receiveShareUV,
带来好友已入会UV: receiveShareVipUV,
带来好友未入会UV: receiveShareNoVipUV
};
if (day === startDay) {
xlsxData.push(Object.keys(keyValueMapper));
}
// @ts-ignore
xlsxData.push(Object.values(keyValueMapper));
tommorrow = new Date(day).getTime() + oneDay;
day = sdk_1.dateFormatter(sdk_1.transformBeijingDate(tommorrow), 'yyyy/MM/dd');
return [3 /*break*/, 2];
case 17:
buffer = xlsx.build([
{
name: "\u6570\u636E\u7EDF\u8BA1" + startDay.replace(/\//g, '-') + "-" + endDay.replace(/\//g, '-'),
data: xlsxData
}
]);
return [4 /*yield*/, context.cloud.file.uploadFile({
fileContent: buffer,
fileName: "\u6570\u636E\u7EDF\u8BA1" + startDay.replace(/\//g, '-') + "-" + endDay.replace(/\//g, '-') + ".xlsx"
})];
case 18:
result = _b.sent();
console.log(xlsxData, 'xlsxData');
if (result.url) {
result.url = result.url.replace('http', 'https').replace('-internal', '');
}
return [2 /*return*/, sdk_1.resultsModel.success(result.url)];
case 19:
e_1 = _b.sent();
console.log('上传文件出错', e_1);
// 打印日志
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.SYSTEM_ERROR, "\u4E0A\u4F20\u6587\u4EF6\u9519\u8BEF")];
case 20: return [2 /*return*/];
}
});
});
};
return StatController;
}());
exports.default = StatController;
//# sourceMappingURL=stat.controller.js.map
\ No newline at end of file
{"version":3,"file":"stat.controller.js","sourceRoot":"","sources":["../../src/controller/stat.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,4BAAoF;AACpF,8BAAmF;AACnF,0CAAsD;AACtD,gCAAiC;AAEjC,cAAc;AACd;IAAA;IAyKA,CAAC;IAxKC;;OAEG;IACG,iCAAQ,GAAd,UAAe,OAAgB;;;;;;wBACvB,KAAmC,OAAO,CAAC,IAAI,EAA7C,UAAU,gBAAA,EAAE,QAAQ,cAAA,EAAE,MAAM,YAAA,CAAiB;wBAE/C,OAAO,GAAa,IAAI,aAAO,CAAC,OAAO,EAAE,iBAAY,CAAC,CAAA;wBACtD,SAAS,GAAa,IAAI,aAAO,CAAC,OAAO,EAAE,mBAAc,CAAC,CAAA;wBAC1D,SAAS,GAAa,IAAI,aAAO,CAAC,OAAO,EAAE,mBAAc,CAAC,CAAA;wBAC1D,SAAS,GAAa,IAAI,aAAO,CAAC,OAAO,EAAE,mBAAc,CAAC,CAAA;wBAC1D,MAAM,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAA;wBAEzB,QAAQ,GAAG,EAAE,CAAA;;;;wBAEb,GAAG,GAAG,QAAQ,CAAA;;;6BACX,CAAA,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,OA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GAAG,CAAC,SAAI,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,UAAO;6BACnF,CAAC,EAAA;;wBAHE,MAAM,GAAG,SAGX;wBACF,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAA;wBACjC,IAAI,MAAM,CAAC,GAAG,EAAE;4BACd,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;yBAC1E;wBACD,sBAAO,kBAAY,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,EAAA;;;wBAEvC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAC,CAAC,CAAA;wBACxB,OAAO;wBACP,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,sCAAQ,CAAC,EAAA;;;;;KAE/D;IACH,qBAAC;AAAD,CAAC,AAzKD,IAyKC"}
\ No newline at end of file
/** @format */
import { UserService, TaskService } from '../service';
export default class Task {
/**
* 任务列表
*/
getTaskList(context: Context, { userInfo, vipInfo, activityInfo, session }: IControllerInfos, [taskService]: [TaskService]): Promise<Result>;
/**
* 完成关注店铺任务
*/
doFollowTask(context: Context, { userInfo, activityInfo }: IControllerInfos, [TaskService]: [TaskService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
/**
* 积分兑换次数
*/
doExchangeCreditsTask(context: Context, { userInfo, activityInfo, session }: IControllerInfos, [userService, taskService]: [UserService, TaskService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
/**
* 浏览商品
*/
doBrowseGoodsTask(context: Context, { userInfo, activityInfo }: IControllerInfos, [taskService]: [TaskService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}
"use strict";
/** @format */
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var constants_1 = require("./../constants");
var decorator_1 = require("../decorator");
var sdk_1 = require("../sdk");
var utils_1 = require("../utils");
var service_1 = require("../service");
// {
// "handler": "getTaskList",
// "data": {
// "activityId": "5f213791964f9706aa59b192"
// }
// }
var Task = /** @class */ (function () {
function Task() {
}
/**
* 任务列表
*/
Task.prototype.getTaskList = function (context, _a, _b) {
var userInfo = _a.userInfo, vipInfo = _a.vipInfo, activityInfo = _a.activityInfo, session = _a.session;
var taskService = _b[0];
return __awaiter(this, void 0, void 0, function () {
var tasks, updatedUserInfo, _c, _d, _e, _f, vipTask, followTask;
return __generator(this, function (_g) {
switch (_g.label) {
case 0:
tasks = activityInfo.tasks;
_d = (_c = taskService).updateTasks;
_e = [userInfo._id];
_f = [taskService.updateVipTaskStatus(userInfo, vipInfo, tasks)];
return [4 /*yield*/, taskService.updateOrderGoodsTask(userInfo, tasks, session)];
case 1: return [4 /*yield*/, _d.apply(_c, _e.concat([_f.concat([
_g.sent()
])]))
// 会员任务
];
case 2:
updatedUserInfo = _g.sent();
vipTask = taskService.initVipTask(updatedUserInfo, vipInfo, tasks);
followTask = taskService.initFollowTask(updatedUserInfo, tasks);
// // 下单任务
// const orderGoodsTask = taskService.initOrderGoodsTask(updatedUserInfo, tasks)
// // 浏览商品任务
// const browseGoodsTask = taskService.initBrowseGoodsTask(updatedUserInfo, tasks)
// // 邀请任务
// const invitesTask = taskService.initInvitesTask(updatedUserInfo, tasks)
// 积分兑换
//const exchangeCreditsTask = taskService.initExchangeCreditsTask(updatedUserInfo, tasks)
return [2 /*return*/, sdk_1.resultsModel.success([vipTask, followTask])];
}
});
});
};
/**
* 完成关注店铺任务
*/
Task.prototype.doFollowTask = function (context, _a, _b) {
var userInfo = _a.userInfo, activityInfo = _a.activityInfo;
var TaskService = _b[0];
return __awaiter(this, void 0, void 0, function () {
var follow, flag, newFollow, hasFollowed, result;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
follow = userInfo.follow;
flag = follow.flag, newFollow = follow.newFollow;
hasFollowed = flag || newFollow;
if (hasFollowed)
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.ERROR_TASK_COMPLETE)
// 更新状态
];
return [4 /*yield*/, TaskService.updateFollowTask(userInfo, activityInfo)];
case 1:
result = _c.sent();
return [2 /*return*/, result ? sdk_1.resultsModel.success(true) : sdk_1.resultsModel.error(constants_1.CODE_TYPES.SYSTEM_ERROR)];
}
});
});
};
/**
* 积分兑换次数
*/
Task.prototype.doExchangeCreditsTask = function (context, _a, _b) {
var userInfo = _a.userInfo, activityInfo = _a.activityInfo, session = _a.session;
var userService = _b[0], taskService = _b[1];
return __awaiter(this, void 0, void 0, function () {
var openId, credits, _id, taskInfo, taskType, _c, value, times, taskRateType, today, todayTimes, myCredits, result;
return __generator(this, function (_d) {
switch (_d.label) {
case 0:
openId = context.openId;
credits = context.data.credits;
_id = userInfo._id, taskInfo = userInfo.taskInfo;
taskType = "exchangeCredits";
_c = activityInfo.tasks.exchangeCredits, value = _c.value, times = _c.times, taskRateType = _c.taskRateType;
today = utils_1.getToday();
todayTimes = taskService.getTodayCompleteTask(taskType, userInfo).todayTimes;
// 如果每日限制次数并到达了限制次数
if (times && times === todayTimes && taskRateType === constants_1.TASK_RATE_TYPE.EVERYDAY) {
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.ERROR_TASK_LIMIT)];
}
return [4 /*yield*/, sdk_1.TBAPIS.queryCredits(context, session)];
case 1:
myCredits = _d.sent();
console.log('myCredits', myCredits);
// 积分不足
if (myCredits < credits)
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.ERROR_NO_CREDITS)
// 扣积分
];
return [4 /*yield*/, sdk_1.TBAPIS.changeCredits(context, session, {
quantity: +credits,
change_type: 2,
opt_type: '1',
remark: "\u79EF\u5206\u5151\u6362\u4EFB\u52A1\u51CF\u79EF\u5206"
})];
case 2:
result = _d.sent();
if (!result)
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.SYSTEM_ERROR)
// 更新user表
];
// 更新user表
return [4 /*yield*/, taskService.updateUserTaskRecord(taskType, value, userInfo)];
case 3:
// 更新user表
_d.sent();
return [2 /*return*/, sdk_1.resultsModel.success(true)];
}
});
});
};
/**
* 浏览商品
*/
Task.prototype.doBrowseGoodsTask = function (context, _a, _b) {
var userInfo = _a.userInfo, activityInfo = _a.activityInfo;
var taskService = _b[0];
return __awaiter(this, void 0, void 0, function () {
var taskType, itemId, _c, taskRateType, times, itemIds, value, itemIdArray, _d, todayTaskInfo, todayTimes, hasCompleteToday;
return __generator(this, function (_e) {
switch (_e.label) {
case 0:
taskType = 'browseGoods';
itemId = context.data.itemId;
_c = activityInfo.tasks.browseGoods, taskRateType = _c.taskRateType, times = _c.times, itemIds = _c.itemIds, value = _c.value;
itemIdArray = Array.isArray(itemIds) ? itemIds : itemIds.split(',').map(function (v) { return +v; });
// B端配置商品ids不匹配正确
if (!itemIdArray.includes(+itemId))
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.PARAMS_ERROR, '商品id不匹配')];
_d = taskService.getTodayCompleteTask('browseGoods', userInfo), todayTaskInfo = _d.todayTaskInfo, todayTimes = _d.todayTimes;
hasCompleteToday = todayTaskInfo.filter(function (v) { return v.itemId === itemId; }).length &&
taskRateType === constants_1.TASK_RATE_TYPE.EVERYDAY;
// 今日任务已经完成
if (hasCompleteToday) {
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.PARAMS_ERROR, '今日该商品任务已完成')];
}
// 次数超限
if (times && times === todayTimes && taskRateType === constants_1.TASK_RATE_TYPE.EVERYDAY) {
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.ERROR_TASK_LIMIT)];
}
// 更新user表
return [4 /*yield*/, taskService.updateUserTaskRecord(taskType, value, userInfo, {
itemId: itemId
})];
case 1:
// 更新user表
_e.sent();
return [2 /*return*/, sdk_1.resultsModel.success(true)];
}
});
});
};
__decorate([
decorator_1.paramsCheck(['activityId']),
decorator_1.userCheck({ intercept: true }),
decorator_1.activityTimeCheck,
decorator_1.services([service_1.TaskService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], Task.prototype, "getTaskList", null);
__decorate([
decorator_1.paramsCheck(['activityId']),
decorator_1.activityTimeCheck,
decorator_1.services([service_1.TaskService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], Task.prototype, "doFollowTask", null);
__decorate([
decorator_1.paramsCheck(['activityId', 'credits']),
decorator_1.userCheck({ intercept: true }),
decorator_1.activityTimeCheck,
decorator_1.services([service_1.UserService, service_1.TaskService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], Task.prototype, "doExchangeCreditsTask", null);
__decorate([
decorator_1.paramsCheck(['activityId', 'itemId']),
decorator_1.userCheck({ intercept: true }),
decorator_1.activityTimeCheck,
decorator_1.services([service_1.TaskService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], Task.prototype, "doBrowseGoodsTask", null);
return Task;
}());
exports.default = Task;
//# sourceMappingURL=task.controller.js.map
\ No newline at end of file
{"version":3,"file":"task.controller.js","sourceRoot":"","sources":["../../src/controller/task.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,YAAY,CAAC,CAAC;QAC3B,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;2CA6BvB;IAQD;QAHC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;4CAavB;IASD;QAJC,uBAAW,CAAC,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;QACtC,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,EAAE,qBAAW,CAAC,CAAC;;;;qDA6CpC;IASD;QAJC,uBAAW,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QACrC,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;iDA0CvB;IACH,WAAC;CAAA,AAhKD,IAgKC;kBAhKoB,IAAI"}
\ No newline at end of file
/** @format */
import { UserService, AccessService } from '../service';
interface IVipContext extends Context {
data: {
activityId: string;
callbackUrl?: string;
};
}
interface ILoginContext extends Context {
data: {
activityId: string;
userNick: string;
avatar: string;
isFollow: boolean;
inviteId?: string;
};
}
export default class User {
/**
* 登录接口, 初始化/更新用户信息
*/
login(context: ILoginContext, { userInfo, vipInfo, activityInfo }: IControllerInfos, [userService, accessService]: [UserService, AccessService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
/**
* 获取会员信息
*/
getVipInfo(context: IVipContext, { session }: IControllerInfos, [userService]: [UserService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}
export {};
"use strict";
/** @format */
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var decorator_1 = require("../decorator");
var sdk_1 = require("../sdk");
var service_1 = require("../service");
var config_1 = require("../config");
var User = /** @class */ (function () {
function User() {
}
/**
* 登录接口, 初始化/更新用户信息
*/
User.prototype.login = function (context, _a, _b) {
var userInfo = _a.userInfo, vipInfo = _a.vipInfo, activityInfo = _a.activityInfo;
var userService = _b[0], accessService = _b[1];
return __awaiter(this, void 0, void 0, function () {
var openId, isFollow;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
openId = context.openId;
isFollow = context.data.isFollow;
if (!!userInfo) return [3 /*break*/, 2];
return [4 /*yield*/, userService.initUserData(vipInfo, activityInfo)];
case 1:
_c.sent();
return [3 /*break*/, 4];
case 2: return [4 /*yield*/, userService.updateUserData(vipInfo, userInfo)];
case 3:
_c.sent();
_c.label = 4;
case 4:
// access表
return [4 /*yield*/, accessService.addAccess(isFollow, vipInfo.isVip)];
case 5:
// access表
_c.sent();
return [2 /*return*/, sdk_1.resultsModel.success({
openId: openId
})];
}
});
});
};
/**
* 获取会员信息
*/
User.prototype.getVipInfo = function (context, _a, _b) {
var session = _a.session;
var userService = _b[0];
return __awaiter(this, void 0, void 0, function () {
var callbackUrl, VIP_CALLBACK_URL, result;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
callbackUrl = context.data.callbackUrl;
VIP_CALLBACK_URL = config_1.getConfig(context).VIP_CALLBACK_URL;
return [4 /*yield*/, userService.getShopVip(session, callbackUrl || VIP_CALLBACK_URL)];
case 1:
result = _c.sent();
return [2 /*return*/, sdk_1.resultsModel.success(result)];
}
});
});
};
__decorate([
decorator_1.paramsCheck(['activityId', 'userNick', 'avatar', 'isFollow']),
decorator_1.activityTimeCheck,
decorator_1.services([service_1.UserService, service_1.AccessService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], User.prototype, "login", null);
__decorate([
decorator_1.paramsCheck(['activityId']),
decorator_1.services([service_1.UserService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], User.prototype, "getVipInfo", null);
return User;
}());
exports.default = User;
//# sourceMappingURL=user.controller.js.map
\ No newline at end of file
{"version":3,"file":"user.controller.js","sourceRoot":"","sources":["../../src/controller/user.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,0CAAkF;AAElF,8BAAqC;AACrC,sCAAuD;AACvD,oCAAqC;AAiBrC;IAAA;IAyCA,CAAC;IAxCC;;OAEG;IAIG,oBAAK,GAAX,UACE,OAAsB,EACtB,EAAqD,EACrD,EAA0D;YADxD,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA;YAChC,WAAW,QAAA,EAAE,aAAa,QAAA;;;;;;wBAEnB,MAAM,GAAK,OAAO,OAAZ,CAAY;wBAElB,QAAQ,GAAK,OAAO,CAAC,IAAI,SAAjB,CAAiB;6BAE7B,CAAC,QAAQ,EAAT,wBAAS;wBACX,qBAAM,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,EAAA;;wBAArD,SAAqD,CAAA;;4BAErD,qBAAM,WAAW,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAA;;wBAAnD,SAAmD,CAAA;;;oBAGrD,UAAU;oBACV,qBAAM,aAAa,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,EAAA;;wBADtD,UAAU;wBACV,SAAsD,CAAA;wBAEtD,sBAAO,kBAAY,CAAC,OAAO,CAAC;gCAC1B,MAAM,QAAA;6BACP,CAAC,EAAA;;;;KACH;IACD;;OAEG;IAGG,yBAAU,GAAhB,UAAiB,OAAoB,EAAE,EAA6B,EAAE,EAA4B;YAAzD,OAAO,aAAA;YAAuB,WAAW,QAAA;;;;;;wBACxE,WAAW,GAAK,OAAO,CAAC,IAAI,YAAjB,CAAiB;wBAC5B,gBAAgB,GAAK,kBAAS,CAAC,OAAO,CAAC,iBAAvB,CAAuB;wBAChC,qBAAM,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,IAAI,gBAAgB,CAAC,EAAA;;wBAA/E,MAAM,GAAG,SAAsE;wBAErF,sBAAO,kBAAY,CAAC,OAAO,CAAC,MAAM,CAAC,EAAA;;;;KACpC;IAjCD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC7D,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,EAAE,uBAAa,CAAC,CAAC;;;;qCAsBtC;IAMD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;0CAOvB;IACH,WAAC;CAAA,AAzCD,IAyCC;kBAzCoB,IAAI"}
\ No newline at end of file
/** @format */
export declare const ACCESS_DB_NAME: string;
export declare const USER_DB_NAME: string;
export declare const AWARDS_DB_NAME: string;
export declare const RECORD_DB_NAME: string;
export declare const ERROR_LOG_DB_NAME: string;
export declare const SELLER_INFO_DB_NAME: string;
export declare const PRIZE_CONFIG_DB_NAME: string;
export declare const ACTIVITY_CONFIG_DB_NAME: string;
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ACTIVITY_CONFIG_DB_NAME = exports.PRIZE_CONFIG_DB_NAME = exports.SELLER_INFO_DB_NAME = exports.ERROR_LOG_DB_NAME = exports.RECORD_DB_NAME = exports.AWARDS_DB_NAME = exports.USER_DB_NAME = exports.ACCESS_DB_NAME = void 0;
exports.ACCESS_DB_NAME = 'c_user_access';
exports.USER_DB_NAME = 'c_user';
exports.AWARDS_DB_NAME = 'c_awards_info';
exports.RECORD_DB_NAME = "c_user_record";
exports.ERROR_LOG_DB_NAME = 'error_log';
exports.SELLER_INFO_DB_NAME = 'a_seller_info';
exports.PRIZE_CONFIG_DB_NAME = 'b_prize_config';
exports.ACTIVITY_CONFIG_DB_NAME = 'b_activity_config';
//# sourceMappingURL=db.js.map
\ No newline at end of file
{"version":3,"file":"db.js","sourceRoot":"","sources":["../src/db.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAED,QAAA,cAAc,GAAW,eAAe,CAAA;AAExC,QAAA,YAAY,GAAW,QAAQ,CAAA;AAE/B,QAAA,cAAc,GAAW,eAAe,CAAA;AAExC,QAAA,cAAc,GAAW,eAAe,CAAA;AAExC,QAAA,iBAAiB,GAAW,WAAW,CAAA;AAEvC,QAAA,mBAAmB,GAAW,eAAe,CAAA;AAE7C,QAAA,oBAAoB,GAAW,gBAAgB,CAAA;AAE/C,QAAA,uBAAuB,GAAW,mBAAmB,CAAA"}
\ No newline at end of file
export declare const paramsCheck: (params: string[]) => (target: Object, name: string, descriptor: PropertyDescriptor) => void;
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.paramsCheck = void 0;
/** @format */
var sdk_1 = require("../sdk");
var constants_1 = require("../constants");
exports.paramsCheck = function (params) {
return function (target, name, descriptor) {
var method = descriptor.value;
descriptor.value = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var context = args[0], _a = args[1], otherArgs = _a === void 0 ? {} : _a;
var dataKeys = Object.keys(context.data);
for (var i = 0; i < params.length; i++) {
var param = params[i];
if (!dataKeys.includes(param))
return sdk_1.resultsModel.error(constants_1.CODE_TYPES.PARAMS_ERROR, "\u7F3A\u5C11" + param + "\u53C2\u6570");
}
return method.apply(target, [context, __assign({}, otherArgs)]);
};
};
};
//# sourceMappingURL=check.js.map
\ No newline at end of file
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/decorator/check.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,cAAc;AACd,8BAAqC;AACrC,0CAAyC;AAC5B,QAAA,WAAW,GAAG,UAAC,MAAgB;IAC1C,OAAO,UAAU,MAAc,EAAE,IAAY,EAAE,UAA8B;QAC3E,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAA;QAE/B,UAAU,CAAC,KAAK,GAAG;YAAU,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAClC,IAAA,OAAO,GAAoB,IAAI,GAAxB,EAAE,KAAkB,IAAI,GAAR,EAAd,SAAS,mBAAG,EAAE,KAAA,CAAQ;YACtC,IAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACtC,IAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;gBACvB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;oBAAE,OAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,iBAAK,KAAK,iBAAI,CAAC,CAAA;aAClG;YACD,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,eAAO,SAAS,EAAG,CAAC,CAAA;QAC1D,CAAC,CAAA;IACH,CAAC,CAAA;AACH,CAAC,CAAA"}
\ No newline at end of file
/** @format */
export * from './check';
export * from './services';
export * from './noCatch';
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
/** @format */
__exportStar(require("./check"), exports);
__exportStar(require("./services"), exports);
__exportStar(require("./noCatch"), exports);
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decorator/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,cAAc;AACd,0CAAuB;AACvB,6CAA0B;AAC1B,4CAAyB"}
\ No newline at end of file
/** @format */
export declare const noCatch: (target: any, name: string, descriptor: PropertyDescriptor) => void;
"use strict";
/** @format */
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.noCatch = void 0;
exports.noCatch = function (target, name, descriptor) {
var method = descriptor.value;
descriptor.value = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return __awaiter(this, void 0, void 0, function () {
var context, _a, otherArgs;
return __generator(this, function (_b) {
context = args[0], _a = args[1], otherArgs = _a === void 0 ? {} : _a;
return [2 /*return*/, method.apply(this, [context, __assign(__assign({}, otherArgs), { noCatch: true })])];
});
});
};
};
//# sourceMappingURL=noCatch.js.map
\ No newline at end of file
{"version":3,"file":"noCatch.js","sourceRoot":"","sources":["../../src/decorator/noCatch.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,QAAA,OAAO,GAAG,UAAC,MAAW,EAAE,IAAY,EAAE,UAA8B;IAC/E,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAA;IAC/B,UAAU,CAAC,KAAK,GAAG;QAAgB,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,yBAAc;;;;;gBACxC,OAAO,GAAoB,IAAI,GAAxB,EAAE,KAAkB,IAAI,GAAR,EAAd,SAAS,mBAAG,EAAE,KAAA,CAAQ;gBACtC,sBAAO,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,OAAO,wBAAO,SAAS,KAAE,OAAO,EAAE,IAAI,IAAG,CAAC,EAAA;;;KACtE,CAAA;AACH,CAAC,CAAA"}
\ No newline at end of file
export declare const services: (services: any[]) => (target: Object, name: string, descriptor: PropertyDescriptor) => void;
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.services = void 0;
/** @format */
var utils_1 = require("../utils");
var sdk_1 = require("../sdk");
var constants_1 = require("../constants");
function initBaseInfo(context, baseInfos) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, baseInfos];
});
});
}
exports.services = function (services) {
return function (target, name, descriptor) {
var method = descriptor.value;
descriptor.value = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return __awaiter(this, void 0, void 0, function () {
var context, _a, otherArgs, servicesInstance, baseInfos, ret, error_1;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
context = args[0], _a = args[1], otherArgs = _a === void 0 ? {} : _a;
servicesInstance = services.map(function (v) { return new v(context); });
return [4 /*yield*/, initBaseInfo(context, otherArgs)
// 默认全局try catch 如果有noCatch参数则直接执行
];
case 1:
baseInfos = _b.sent();
// 默认全局try catch 如果有noCatch参数则直接执行
if (baseInfos.noCatch) {
delete baseInfos.noCatch;
return [2 /*return*/, method.apply(target, [context, baseInfos, servicesInstance])];
}
_b.label = 2;
case 2:
_b.trys.push([2, 4, , 6]);
utils_1.logger(context);
return [4 /*yield*/, method.apply(target, [context, baseInfos, servicesInstance])];
case 3:
ret = _b.sent();
return [3 /*break*/, 6];
case 4:
error_1 = _b.sent();
console.log('error', error_1);
return [4 /*yield*/, utils_1.recordErrorLog(context, baseInfos, error_1.toString(), error_1.stack)];
case 5:
_b.sent();
ret = sdk_1.resultsModel.error(constants_1.CODE_TYPES.SYSTEM_ERROR);
return [3 /*break*/, 6];
case 6: return [2 /*return*/, ret];
}
});
});
};
};
};
//# sourceMappingURL=services.js.map
\ No newline at end of file
{"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/decorator/services.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,kCAAgD;AAChD,8BAAqC;AACrC,0CAAyC;AACzC,SAAe,YAAY,CAAC,OAAgB,EAAE,SAA2B;;;YAGvE,sBAAO,SAAS,EAAA;;;CACjB;AAEY,QAAA,QAAQ,GAAG,UAAC,QAAe;IACtC,OAAO,UAAC,MAAc,EAAE,IAAY,EAAE,UAA8B;QAClE,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAA;QAE/B,UAAU,CAAC,KAAK,GAAG;YAAgB,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;;;;;;4BAC1C,OAAO,GAAoB,IAAI,GAAxB,EAAE,KAAkB,IAAI,GAAR,EAAd,SAAS,mBAAG,EAAE,KAAA,CAAQ;4BAC9B,gBAAgB,GAAG,QAAQ,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,IAAI,CAAC,CAAC,OAAO,CAAC,EAAd,CAAc,CAAC,CAAA;4BACtB,qBAAM,YAAY,CAAC,OAAO,EAAE,SAAS,CAAC;gCAC1E,mCAAmC;8BADuC;;4BAApE,SAAS,GAAqB,SAAsC;4BAC1E,mCAAmC;4BACnC,IAAI,SAAS,CAAC,OAAO,EAAE;gCACrB,OAAO,SAAS,CAAC,OAAO,CAAA;gCACxB,sBAAO,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC,EAAA;6BACpE;;;;4BAGC,cAAM,CAAC,OAAO,CAAC,CAAA;4BACT,qBAAM,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC,EAAA;;4BAAxE,GAAG,GAAG,SAAkE,CAAA;;;;4BAExE,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,OAAK,CAAC,CAAA;4BAC3B,qBAAM,sBAAc,CAAC,OAAO,EAAE,SAAS,EAAE,OAAK,CAAC,QAAQ,EAAE,EAAE,OAAK,CAAC,KAAK,CAAC,EAAA;;4BAAvE,SAAuE,CAAA;4BACvE,GAAG,GAAG,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,CAAC,CAAA;;gCAEnD,sBAAO,GAAG,EAAA;;;;SACX,CAAA;IACH,CAAC,CAAA;AACH,CAAC,CAAA"}
\ No newline at end of file
/** @format */
declare const _default: {};
export default _default;
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
var utils_1 = require("./utils");
exports.default = utils_1.exportHandlers([]);
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,cAAc;;AAEd,iCAAwC;AAGxC,kBAAe,sBAAc,CAAC,EAAE,CAAC,CAAA"}
\ No newline at end of file
/** @format */
import Utils from 'taobao-mini-sdk/lib/utils/index';
import TBAPI from 'taobao-mini-sdk/lib/service/TBAPI';
declare const DEFAULT_CODE_TYPES: {
PARAMS_ERROR: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
SYSTEM_ERROR: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
SUCCESS: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
}, getStartTimestamp: (day: string) => number, getEndTimestamp: (day: string) => number;
declare const resultsModel: import("taobao-mini-sdk/lib/utils/resultmodel").ResultsModel;
export declare const TBAPIS: typeof TBAPI;
export declare const BaseDao: any;
export declare const transformBeijingDate: typeof Utils.transformBeijingDate;
export declare const dateFormatter: typeof Utils.dateFormatter;
export { DEFAULT_CODE_TYPES, resultsModel, getStartTimestamp, getEndTimestamp };
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEndTimestamp = exports.getStartTimestamp = exports.resultsModel = exports.DEFAULT_CODE_TYPES = exports.dateFormatter = exports.transformBeijingDate = exports.BaseDao = exports.TBAPIS = void 0;
var index_1 = require("taobao-mini-sdk/lib/utils/index");
var base_dao_1 = require("taobao-mini-sdk/lib/dao/base.dao");
var TBAPI_1 = require("taobao-mini-sdk/lib/service/TBAPI");
var MockConfig = require('../mockServer/sdk');
var DEFAULT_CODE_TYPES = index_1.default.DEFAULT_CODE_TYPES, cloudDateFormatter = index_1.default.dateFormatter, cloudTransformBeijingDate = index_1.default.transformBeijingDate, getStartTimestamp = index_1.default.getStartTimestamp, getEndTimestamp = index_1.default.getEndTimestamp, ResultsModel = index_1.default.ResultsModel;
exports.DEFAULT_CODE_TYPES = DEFAULT_CODE_TYPES;
exports.getStartTimestamp = getStartTimestamp;
exports.getEndTimestamp = getEndTimestamp;
var resultsModel = new ResultsModel();
exports.resultsModel = resultsModel;
var env = process.argv[2];
console.log("env", env);
exports.TBAPIS = env === 'mock' ? MockConfig.TBAPIS : TBAPI_1.default;
exports.BaseDao = env === 'mock' ? MockConfig.BaseDao : base_dao_1.BaseDao;
exports.transformBeijingDate = env === 'mock' ? MockConfig.transformBeijingDate : cloudTransformBeijingDate;
exports.dateFormatter = env === 'mock' ? MockConfig.dateFormatter : cloudDateFormatter;
//# sourceMappingURL=sdk.js.map
\ No newline at end of file
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,yDAAmD;AACnD,6DAA0E;AAC1E,2DAAqD;AACrD,IAAI,UAAU,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAG3C,IAAA,kBAAkB,GAMhB,eAAK,mBANW,EACH,kBAAkB,GAK/B,eAAK,cAL0B,EACX,yBAAyB,GAI7C,eAAK,qBAJwC,EAC/C,iBAAiB,GAGf,eAAK,kBAHU,EACjB,eAAe,GAEb,eAAK,gBAFQ,EACf,YAAY,GACV,eAAK,aADK,CACL;AAgBA,gDAAkB;AAAgB,8CAAiB;AAAE,0CAAe;AAd7E,IAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAA;AAcV,oCAAY;AAZzC,IAAI,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACzB,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;AAEV,QAAA,MAAM,GAAiB,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,eAAK,CAAA;AAEjE,QAAA,OAAO,GAAG,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAY,CAAA;AAE5D,QAAA,oBAAoB,GAC/B,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC,yBAAyB,CAAA;AAEjE,QAAA,aAAa,GAA+B,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,kBAAkB,CAAA"}
\ No newline at end of file
/**
* 访问明细
*
* @format
*/
export default class UserAccessService {
context: Context;
accessdao: IBaseDao;
constructor(context: Context);
/**
* 增加访问记录
* @param {是否关注店铺} isFollow
*/
addAccess(isFollow: boolean, isVip: boolean): Promise<any>;
getAccessCount(): Promise<any>;
}
"use strict";
/**
* 访问明细
*
* @format
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var sdk_1 = require("../sdk");
var utils_1 = require("../utils");
var db_1 = require("../db");
var UserAccessService = /** @class */ (function () {
function UserAccessService(context) {
this.context = context;
this.accessdao = new sdk_1.BaseDao(context, db_1.ACCESS_DB_NAME);
}
/**
* 增加访问记录
* @param {是否关注店铺} isFollow
*/
UserAccessService.prototype.addAccess = function (isFollow, isVip) {
return __awaiter(this, void 0, void 0, function () {
var _a, openId, data, activityId, userNick, avatar, inviteId;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
_a = this.context, openId = _a.openId, data = _a.data;
activityId = data.activityId, userNick = data.userNick, avatar = data.avatar, inviteId = data.inviteId;
return [4 /*yield*/, this.accessdao.insertOne({
openId: openId,
activityId: activityId,
userNick: userNick,
avatar: avatar,
isReceiveShare: !!inviteId,
inviteId: inviteId,
isFollow: isFollow,
isVip: isVip,
accessTime: Date.now(),
createTime: Date.now(),
updateTime: Date.now(),
createDay: utils_1.getToday()
})];
case 1: return [2 /*return*/, _b.sent()];
}
});
});
};
UserAccessService.prototype.getAccessCount = function () {
return __awaiter(this, void 0, void 0, function () {
var _a, openId, data, activityId;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
_a = this.context, openId = _a.openId, data = _a.data;
activityId = data.activityId;
return [4 /*yield*/, this.accessdao.count({
openId: openId,
activityId: activityId
})];
case 1: return [2 /*return*/, _b.sent()];
}
});
});
};
return UserAccessService;
}());
exports.default = UserAccessService;
//# sourceMappingURL=access.service.js.map
\ No newline at end of file
{"version":3,"file":"access.service.js","sourceRoot":"","sources":["../../src/service/access.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,8BAAgC;AAChC,kCAAmC;AACnC,4BAAsC;AAEtC;IAGE,2BAAY,OAAgB;QAC1B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,SAAS,GAAG,IAAI,aAAO,CAAC,OAAO,EAAE,mBAAc,CAAC,CAAA;IACvD,CAAC;IACD;;;OAGG;IACG,qCAAS,GAAf,UAAgB,QAAiB,EAAE,KAAc;;;;;;wBAC3C,KAAmB,IAAI,CAAC,OAAO,EAA7B,MAAM,YAAA,EAAE,IAAI,UAAA,CAAiB;wBAC7B,UAAU,GAAiC,IAAI,WAArC,EAAE,QAAQ,GAAuB,IAAI,SAA3B,EAAE,MAAM,GAAe,IAAI,OAAnB,EAAE,QAAQ,GAAK,IAAI,SAAT,CAAS;wBAE9C,qBAAM,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;gCACpC,MAAM,QAAA;gCACN,UAAU,YAAA;gCACV,QAAQ,UAAA;gCACR,MAAM,QAAA;gCACN,cAAc,EAAE,CAAC,CAAC,QAAQ;gCAC1B,QAAQ,UAAA;gCACR,QAAQ,UAAA;gCACR,KAAK,OAAA;gCACL,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;gCACtB,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;gCACtB,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;gCACtB,SAAS,EAAE,gBAAQ,EAAE;6BACtB,CAAC,EAAA;4BAbF,sBAAO,SAaL,EAAA;;;;KACH;IAEK,0CAAc,GAApB;;;;;;wBACM,KAAmB,IAAI,CAAC,OAAO,EAA7B,MAAM,YAAA,EAAE,IAAI,UAAA,CAAiB;wBAC7B,UAAU,GAAK,IAAI,WAAT,CAAS;wBAClB,qBAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;gCAChC,MAAM,QAAA;gCACN,UAAU,YAAA;6BACX,CAAC,EAAA;4BAHF,sBAAO,SAGL,EAAA;;;;KACH;IACH,wBAAC;AAAD,CAAC,AAvCD,IAuCC"}
\ No newline at end of file
/**
* 奖励
*
* @format
*/
import UserService from './user.service';
export default class AwardsService extends UserService {
awardsdao: IBaseDao;
activityprizedao: IBaseDao;
constructor(context: Context);
reduceStock(_id: string): Promise<true | import("taobao-mini-sdk/lib/utils/codetypes").CodeType>;
/**
* 插入奖品记录
* @param {*} award
*/
addAward(award: any): Promise<any>;
/**
* 发放奖品
* @param {*} document
*/
sendAward(document: any): Promise<any>;
/**
* 我的奖品
* @param {*} param0
*/
getMyPrizeList({ openId, activityId }: {
openId: any;
activityId: any;
}): Promise<any>;
recieveObjectPrize(_id: any, { activityId, province, city, area, addressdetail, name, phone }: {
activityId: any;
province: any;
city: any;
area: any;
addressdetail: any;
name: any;
phone: any;
}): Promise<true | import("taobao-mini-sdk/lib/utils/codetypes").CodeType>;
recieveEnamePrize(_id: any, activityId: any): Promise<{}>;
/**
* 获取活动配置项奖品
* @param {*} _id
*/
getActivityPrizeById(_id: string): Promise<any>;
}
"use strict";
/**
* 奖励
*
* @format
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var sdk_1 = require("../sdk");
var user_service_1 = require("./user.service");
var constants_1 = require("../constants");
var db_1 = require("../db");
var utils_1 = require("../utils");
var AwardsService = /** @class */ (function (_super) {
__extends(AwardsService, _super);
function AwardsService(context) {
var _this = _super.call(this, context) || this;
_this.awardsdao = new sdk_1.BaseDao(context, db_1.AWARDS_DB_NAME);
_this.activityprizedao = new sdk_1.BaseDao(context, db_1.PRIZE_CONFIG_DB_NAME);
return _this;
}
// 根据奖品Id扣库存
AwardsService.prototype.reduceStock = function (_id) {
return __awaiter(this, void 0, void 0, function () {
var result, limitStock, stock, useStock, e_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.activityprizedao.findOne({ _id: _id })
// 奖品不存在
];
case 1:
result = _a.sent();
// 奖品不存在
if (!result) {
return [2 /*return*/, constants_1.CODE_TYPES.ERROR_NO_PRIZE];
}
limitStock = result.limitStock, stock = result.stock, useStock = result.useStock;
// 若不限制库存
if (limitStock === 0) {
return [2 /*return*/, true];
}
// 若库存不足
if (useStock >= stock) {
return [2 /*return*/, constants_1.CODE_TYPES.ERROR_NO_STOCK];
}
_a.label = 2;
case 2:
_a.trys.push([2, 4, , 5]);
return [4 /*yield*/, this.activityprizedao.update({ _id: _id }, {
$set: {
useStock: useStock + 1
}
})];
case 3:
_a.sent();
return [2 /*return*/, true];
case 4:
e_1 = _a.sent();
console.log("\u6263\u5E93\u5B58\u5931\u8D25\uFF1A", e_1);
return [2 /*return*/, constants_1.CODE_TYPES.SYSTEM_ERROR];
case 5: return [2 /*return*/];
}
});
});
};
/**
* 插入奖品记录
* @param {*} award
*/
AwardsService.prototype.addAward = function (award) {
return __awaiter(this, void 0, void 0, function () {
var e_2;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, this.awardsdao.insertOne(__assign(__assign({}, award), { createTime: Date.now(), updateTime: Date.now() }))];
case 1: return [2 /*return*/, _a.sent()];
case 2:
e_2 = _a.sent();
console.log("\u63D2\u5165\u4E2D\u5956\u8BB0\u5F55\u9519\u8BEF:", e_2);
return [2 /*return*/, constants_1.CODE_TYPES.SYSTEM_ERROR];
case 3: return [2 /*return*/];
}
});
});
};
/**
* 发放奖品
* @param {*} document
*/
AwardsService.prototype.sendAward = function (document) {
return __awaiter(this, void 0, void 0, function () {
var session, result, _id, update;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, utils_1.getSellerSession(this.context)
// 发放淘宝权益
];
case 1:
session = (_a.sent()).session;
return [4 /*yield*/, utils_1.sendTBAward(this.context, session, document)];
case 2:
result = _a.sent();
if (result.code) {
return [2 /*return*/, result];
}
_id = document._id;
return [4 /*yield*/, this.awardsdao.update({ _id: _id }, {
$set: {
drawStatus: document.drawStatus,
remark: document.remark,
updateTime: Date.now()
}
})];
case 3:
update = _a.sent();
console.log("\u66F4\u65B0\u5956\u54C1\u72B6\u6001", update, document);
return [2 /*return*/, document];
}
});
});
};
/**
* 我的奖品
* @param {*} param0
*/
AwardsService.prototype.getMyPrizeList = function (_a) {
var openId = _a.openId, activityId = _a.activityId;
return __awaiter(this, void 0, void 0, function () {
var awardReceiveExpiredTime, myprizeList, currentTime_1;
return __generator(this, function (_b) {
switch (_b.label) {
case 0: return [4 /*yield*/, this.getBaseInfo(activityId)];
case 1:
awardReceiveExpiredTime = (_b.sent()).awardReceiveExpiredTime;
return [4 /*yield*/, this.awardsdao.find({ openId: openId, activityId: activityId }, {
sort: {
createTime: -1
}
})
// 若有过期时间,且已过期
];
case 2:
myprizeList = _b.sent();
// 若有过期时间,且已过期
if (awardReceiveExpiredTime) {
currentTime_1 = Date.now();
myprizeList.map(function (v) {
if (currentTime_1 > awardReceiveExpiredTime) {
if ([constants_1.DRAW_STATUS.WAITAWARD, constants_1.DRAW_STATUS.RETRY].includes(v.drawStatus)) {
v.drawStatus = constants_1.DRAW_STATUS.EXPIRED;
v.remark = "\u5956\u54C1\u5DF2\u8FC7\u671F";
}
}
v.expiredTime = awardReceiveExpiredTime;
});
}
return [2 /*return*/, myprizeList];
}
});
});
};
// 领取实物
AwardsService.prototype.recieveObjectPrize = function (_id, _a) {
var activityId = _a.activityId, province = _a.province, city = _a.city, area = _a.area, addressdetail = _a.addressdetail, name = _a.name, phone = _a.phone;
return __awaiter(this, void 0, void 0, function () {
var awardReceiveExpiredTime, award, result, e_3;
return __generator(this, function (_b) {
switch (_b.label) {
case 0: return [4 /*yield*/, this.getBaseInfo(activityId)];
case 1:
awardReceiveExpiredTime = (_b.sent()).awardReceiveExpiredTime;
if (awardReceiveExpiredTime && Date.now() > awardReceiveExpiredTime) {
return [2 /*return*/, constants_1.CODE_TYPES.ERROR_PRIZE_EXPIRED];
}
return [4 /*yield*/, this.awardsdao.findOne({ _id: _id })];
case 2:
award = _b.sent();
console.log("receiveObject-award", award);
// 奖品不存在
if (!award) {
return [2 /*return*/, constants_1.CODE_TYPES.ERROR_NO_PRIZE];
}
// 已领取
if (award.drawStatus === constants_1.DRAW_STATUS.SUCCESS) {
return [2 /*return*/, constants_1.CODE_TYPES.ERROR_RECEIVE_PRIZE];
}
// 不是实物,非法操作
if (award.type !== constants_1.PRIZE_TYPE.OBJECT) {
return [2 /*return*/, constants_1.CODE_TYPES.ERROR_FORBIDDEN_OPE];
}
_b.label = 3;
case 3:
_b.trys.push([3, 5, , 6]);
return [4 /*yield*/, this.awardsdao.update({ _id: _id }, {
$set: {
receiveName: name,
phone: phone,
drawStatus: constants_1.DRAW_STATUS.SUCCESS,
province: province,
city: city,
area: area,
addressdetail: addressdetail,
receiveTime: Date.now(),
updateTime: Date.now()
}
})];
case 4:
result = _b.sent();
return [2 /*return*/, true];
case 5:
e_3 = _b.sent();
console.log("\u9886\u53D6\u5B9E\u7269\u9519\u8BEF\uFF1A", e_3);
return [2 /*return*/, constants_1.CODE_TYPES.SYSTEM_ERROR];
case 6: return [2 /*return*/];
}
});
});
};
// 发放淘宝权益(奖品数据已插入到awards_info表,且状态drawStatus 为1或者6)
AwardsService.prototype.recieveEnamePrize = function (_id, activityId) {
return __awaiter(this, void 0, void 0, function () {
var awardReceiveExpiredTime, result, award, session;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.getBaseInfo(activityId)];
case 1:
awardReceiveExpiredTime = (_a.sent()).awardReceiveExpiredTime;
if (awardReceiveExpiredTime && Date.now() > awardReceiveExpiredTime) {
return [2 /*return*/, constants_1.CODE_TYPES.ERROR_PRIZE_EXPIRED];
}
result = {};
return [4 /*yield*/, this.awardsdao.findOne({ _id: _id })
// 奖品不存在
];
case 2:
award = _a.sent();
// 奖品不存在
if (!award) {
return [2 /*return*/, constants_1.CODE_TYPES.ERROR_NO_PRIZE];
}
// 已领取
if (award.drawStatus === constants_1.DRAW_STATUS.SUCCESS) {
return [2 /*return*/, constants_1.CODE_TYPES.ERROR_RECEIVE_PRIZE];
}
console.log("award.drawStatus", award.drawStatus);
// 状态不是1,6
if (![constants_1.DRAW_STATUS.WAITAWARD, constants_1.DRAW_STATUS.RETRY].includes(award.drawStatus)) {
return [2 /*return*/, constants_1.CODE_TYPES.ERROR_FORBIDDEN_OPE];
}
return [4 /*yield*/, utils_1.getSellerSession(this.context)
// 发放淘宝权益
];
case 3:
session = (_a.sent()).session;
return [4 /*yield*/, utils_1.sendTBAward(this.context, session, award)
// 更新
];
case 4:
// 发放淘宝权益
result = _a.sent();
// 更新
return [4 /*yield*/, this.awardsdao.update({ _id: _id }, {
$set: {
// @ts-ignore
drawStatus: result.drawStatus,
// @ts-ignore
remark: result.remark,
updateTime: Date.now()
}
})];
case 5:
// 更新
_a.sent();
return [2 /*return*/, result];
}
});
});
};
/**
* 获取活动配置项奖品
* @param {*} _id
*/
AwardsService.prototype.getActivityPrizeById = function (_id) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.activityprizedao.findOne({ _id: _id, deleteStatus: 1 /* NORMAL */ }, {
sort: {
index: 1
}
})];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
};
return AwardsService;
}(user_service_1.default));
exports.default = AwardsService;
//# sourceMappingURL=awards.service.js.map
\ No newline at end of file
{"version":3,"file":"awards.service.js","sourceRoot":"","sources":["../../src/service/awards.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,8BAAgC;AAChC,+CAAwC;AACxC,0CAAmF;AACnF,4BAA4D;AAC5D,kCAA2E;AAE3E;IAA2C,iCAAW;IAGpD,uBAAY,OAAgB;QAA5B,YACE,kBAAM,OAAO,CAAC,SAGf;QAFC,KAAI,CAA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qBAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CACxC,EAAE,GAAG,KAAA,EAAE,YAAY,gBAAwB,EAAE,EAC7C;4BACE,IAAI,EAAE;gCACJ,KAAK,EAAE,CAAC;6BACT;yBACF,CACF,EAAA;4BAPD,sBAAO,SAON,EAAA;;;;KACF;IACH,oBAAC;AAAD,CAAC,AAzND,CAA2C,sBAAW,GAyNrD"}
\ No newline at end of file
/**
* 基本信息
*
* @format
*/
export default class BaseService {
context: Context;
activitydao: IBaseDao;
constructor(context: Context);
/**
* @desc 活动基本信息
* @param {活动id} activityId
* @returns 返回活动详情,若不存在活动,返回为null
*/
getBaseInfo(activityId: string): Promise<any>;
}
"use strict";
/**
* 基本信息
*
* @format
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var sdk_1 = require("../sdk");
var db_1 = require("../db");
var BaseService = /** @class */ (function () {
function BaseService(context) {
this.context = context;
this.activitydao = new sdk_1.BaseDao(context, db_1.ACTIVITY_CONFIG_DB_NAME);
}
/**
* @desc 活动基本信息
* @param {活动id} activityId
* @returns 返回活动详情,若不存在活动,返回为null
*/
BaseService.prototype.getBaseInfo = function (activityId) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
console.log(process.argv[2], 'process.argv[2]');
return [4 /*yield*/, this.activitydao.findOne({ _id: activityId })];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
};
return BaseService;
}());
exports.default = BaseService;
//# sourceMappingURL=base.service.js.map
\ No newline at end of file
{"version":3,"file":"base.service.js","sourceRoot":"","sources":["../../src/service/base.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,8BAAgC;AAChC,4BAA+C;AAE/C;IAGE,qBAAY,OAAgB;QAC1B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,WAAW,GAAG,IAAI,aAAO,CAAC,OAAO,EAAE,4BAAuB,CAAC,CAAA;IAClE,CAAC;IACD;;;;OAIG;IACG,iCAAW,GAAjB,UAAkB,UAAkB;;;;;wBAClC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAA;wBACxC,qBAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,EAAA;4BAA1D,sBAAO,SAAmD,EAAA;;;;KAC3D;IACH,kBAAC;AAAD,CAAC,AAhBD,IAgBC"}
\ No newline at end of file
/** @format */
export { default as BaseService } from './base.service';
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
var base_service_1 = require("./base.service");
Object.defineProperty(exports, "BaseService", { enumerable: true, get: function () { return base_service_1.default; } });
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":";AAAA,cAAc;;AAEd,+CAAuD;AAA9C,2GAAA,OAAO,OAAe"}
\ No newline at end of file
/**
* 任务相关方法
*
* @format
*/
import UserService from './user.service';
interface ITaskInfo {
taskType?: string;
url?: string;
rewards: number;
done?: boolean;
itemIds?: string;
waitReceive?: number;
title: string;
}
export default class TaskService extends UserService {
constructor(context: Context);
initVipTask(userInfo: IUserInfo, vipInfo: IVipInfo, tasks: ITasks): ITaskInfo;
initOrderGoodsTask(userInfo: IUserInfo, tasks: ITasks): ITaskInfo;
initBrowseGoodsTask(userInfo: IUserInfo, tasks: ITasks): ITaskInfo;
initInvitesTask(userInfo: IUserInfo, tasks: ITasks): ITaskInfo;
initFollowTask(userInfo: IUserInfo, tasks: ITasks): {
taskType: string;
title: string;
rewards: number;
waitReceive: number;
done: boolean;
};
initExchangeCreditsTask(userInfo: IUserInfo, tasks: ITasks): {
taskType: string;
title: string;
rewards: number;
waitReceive: number;
done: boolean;
};
updateVipTaskStatus(userInfo: IUserInfo, vipInfo: IVipInfo, tasks: ITasks): {
member: IMemberInfo;
remainTimes: IRemainTimesInfo;
};
updateOrderGoodsTask(userInfo: IUserInfo, tasks: ITasks, session?: string): Promise<{
remainTimes?: undefined;
taskInfo?: undefined;
} | {
remainTimes: IRemainTimesInfo;
taskInfo: object;
}>;
/**
*更新关注店铺任务状态
*
* @param {IUserInfo} userInfo
* @param {IActivityInfo} activityInfo
* @returns
* @memberof TaskService
*/
updateFollowTask(userInfo: IUserInfo, activityInfo: IActivityInfo): Promise<any>;
/**
*
* 获取任务今天完成的次数
*
* @param {string} taskType 任务类型
* @param {IUserInfo} userInfo 用户信息
* @returns {number} todayTimes 今日任务完成次数 todayTaskInfo 今日对应任务完成详情
* @memberof TaskService
*/
getTodayCompleteTask(taskType: string, userInfo: IUserInfo): {
todayTimes: any;
todayTaskInfo: any;
};
/**
* 根据任务类型获取任务完成情况
*
* @param {IUserInfo} userInfo
* @param {string} taskType
* @returns {array}
* @memberof TaskService
*/
getCompleteTaskByUserTaskInfo(taskType: string, userInfo: IUserInfo): any[];
/**
*根据任务类型更新任务待领取次数和任务记录
*
* @param {string} taskType
* @param {number} rewards
* @param {IUserInfo} userInfo
* @param {object} [customRecord]
* @returns {boolean}
* @memberof TaskService
*/
updateUserTaskRecord(taskType: string, rewards: number, userInfo: IUserInfo, customRecord?: object): Promise<boolean>;
updateTasks(id: string, needUpdateKeysArray: object[]): Promise<any>;
}
export {};
"use strict";
/**
* 任务相关方法
*
* @format
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var user_service_1 = require("./user.service");
var utils_1 = require("../utils");
var constants_1 = require("../constants");
var TaskService = /** @class */ (function (_super) {
__extends(TaskService, _super);
function TaskService(context) {
return _super.call(this, context) || this;
}
TaskService.prototype.initVipTask = function (userInfo, vipInfo, tasks) {
var _a = userInfo.member, flag = _a.flag, newMember = _a.newMember, remainTimes = userInfo.remainTimes;
// 后台配置奖励
var value = tasks.beMembership.value;
// 会员信息
var isVipBefore = flag;
return {
taskType: "member",
title: "\u52A0\u5165\u4F1A\u5458",
url: vipInfo.url,
rewards: value,
waitReceive: remainTimes.member,
// 已经是会员, 说明完成任务
done: newMember || isVipBefore
};
};
// 初始化下单任务
TaskService.prototype.initOrderGoodsTask = function (userInfo, tasks) {
var _a;
var _b = tasks.orderGoods, value = _b.value, itemIds = _b.itemIds, taskRateType = _b.taskRateType, times = _b.times;
var remainTimes = userInfo.remainTimes, taskInfo = userInfo.taskInfo;
var orderTask = {
taskType: "orderGoods",
title: "\u4E0B\u5355\u5546\u54C1",
itemIds: itemIds,
rewards: value,
waitReceive: remainTimes.orderGoods,
done: false
};
var orderGoodsCompleteList = this.getCompleteTaskByUserTaskInfo('orderGoods', userInfo);
// 永久任务且已完成
if (taskRateType === constants_1.TASK_RATE_TYPE.FOREVER && orderGoodsCompleteList) {
orderTask.done = true;
}
// 每日限制完成且完成次数达到限制
var today = utils_1.getToday();
if (taskRateType === constants_1.TASK_RATE_TYPE.EVERYDAY && ((_a = taskInfo === null || taskInfo === void 0 ? void 0 : taskInfo[today]) === null || _a === void 0 ? void 0 : _a.orderGoods) >= times) {
orderTask.done = true;
}
return orderTask;
};
// 初始化浏览商品任务
TaskService.prototype.initBrowseGoodsTask = function (userInfo, tasks) {
var _a;
var _b = tasks.browseGoods, value = _b.value, itemIds = _b.itemIds, taskRateType = _b.taskRateType, times = _b.times;
var remainTimes = userInfo.remainTimes, taskInfo = userInfo.taskInfo;
var orderTask = {
taskType: "browseGoods",
title: "\u6D4F\u89C8\u5546\u54C1",
itemIds: itemIds,
rewards: value,
waitReceive: remainTimes.browseGoods,
done: false
};
var browseGoodsCompleteList = this.getCompleteTaskByUserTaskInfo('browseGoods', userInfo);
// 永久任务且已完成
if (taskRateType === constants_1.TASK_RATE_TYPE.FOREVER && browseGoodsCompleteList) {
orderTask.done = true;
}
// 每日限制完成且完成次数达到限制
var today = utils_1.getToday();
if (taskRateType === constants_1.TASK_RATE_TYPE.EVERYDAY && ((_a = taskInfo === null || taskInfo === void 0 ? void 0 : taskInfo[today]) === null || _a === void 0 ? void 0 : _a.browseGoods) >= times) {
orderTask.done = true;
}
return orderTask;
};
// 初始化邀请任务
TaskService.prototype.initInvitesTask = function (userInfo, tasks) {
var _a;
var _b = tasks.inviteFriends, value = _b.value, taskRateType = _b.taskRateType, times = _b.times;
var remainTimes = userInfo.remainTimes, taskInfo = userInfo.taskInfo;
var orderTask = {
taskType: "invites",
title: "\u9080\u8BF7",
rewards: value,
waitReceive: remainTimes.invites,
done: false
};
var invitesCompleteList = this.getCompleteTaskByUserTaskInfo('invites', userInfo);
// 永久任务且已完成
if (taskRateType === constants_1.TASK_RATE_TYPE.FOREVER && invitesCompleteList) {
orderTask.done = true;
}
// 每日限制完成且完成次数达到限制
var today = utils_1.getToday();
if (taskRateType === constants_1.TASK_RATE_TYPE.EVERYDAY && ((_a = taskInfo === null || taskInfo === void 0 ? void 0 : taskInfo[today]) === null || _a === void 0 ? void 0 : _a.invites) >= times) {
orderTask.done = true;
}
return orderTask;
};
// 关注店铺
TaskService.prototype.initFollowTask = function (userInfo, tasks) {
var value = tasks.attentionStore.value;
var remainTimes = userInfo.remainTimes;
var orderGoodsCompleteList = this.getCompleteTaskByUserTaskInfo('follow', userInfo);
return {
taskType: "follow",
title: "\u5173\u6CE8\u5E97\u94FA",
rewards: value,
waitReceive: remainTimes.follow,
done: !!orderGoodsCompleteList.length
};
};
// 积分兑换
TaskService.prototype.initExchangeCreditsTask = function (userInfo, tasks) {
var _a;
var _b = tasks.exchangeCredits, value = _b.value, times = _b.times;
var remainTimes = userInfo.remainTimes, taskInfo = userInfo.taskInfo;
var today = utils_1.getToday();
return {
taskType: "exchangeCredits",
title: "\u79EF\u5206\u5151\u6362",
rewards: value,
waitReceive: remainTimes.exchangeCredits,
// 积分兑换固定为每日限制
done: !!(((_a = taskInfo === null || taskInfo === void 0 ? void 0 : taskInfo[today]) === null || _a === void 0 ? void 0 : _a.exchangeCredits) >= times)
};
};
// 根据会员状态更新
TaskService.prototype.updateVipTaskStatus = function (userInfo, vipInfo, tasks) {
var member = userInfo.member, remainTimes = userInfo.remainTimes, _id = userInfo._id;
var newMember = member.newMember;
var today = utils_1.getToday();
var isNewVip = this.checkNewVipStatus(userInfo, vipInfo);
var value = tasks.beMembership.value;
if (isNewVip && !newMember) {
member.newMember = true;
member.bememberTime = Date.now();
member.bememberDay = today;
remainTimes.member = (remainTimes.member || 0) + value;
}
return {
member: member,
remainTimes: remainTimes
};
};
TaskService.prototype.updateOrderGoodsTask = function (userInfo, tasks, session) {
var _a;
return __awaiter(this, void 0, void 0, function () {
var taskInfo, remainTimes, _b, value, itemIds, taskRateType, times, orderGoodsCompleteList, today, lastOrderInfo, orderResult, itemIdsArr;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
taskInfo = userInfo.taskInfo, remainTimes = userInfo.remainTimes;
_b = tasks.orderGoods, value = _b.value, itemIds = _b.itemIds, taskRateType = _b.taskRateType, times = _b.times;
orderGoodsCompleteList = this.getCompleteTaskByUserTaskInfo('orderGoods', userInfo);
// 永久任务且已完成
if (taskRateType === constants_1.TASK_RATE_TYPE.FOREVER && orderGoodsCompleteList) {
return [2 /*return*/, {}];
}
today = utils_1.getToday();
if (taskRateType === constants_1.TASK_RATE_TYPE.EVERYDAY && ((_a = taskInfo === null || taskInfo === void 0 ? void 0 : taskInfo[today]) === null || _a === void 0 ? void 0 : _a.orderGoods) >= times) {
return [2 /*return*/, {}];
}
lastOrderInfo = (orderGoodsCompleteList === null || orderGoodsCompleteList === void 0 ? void 0 : orderGoodsCompleteList[orderGoodsCompleteList.length - 1]) || {};
return [4 /*yield*/, utils_1.getUserOrderlist(this.context,
//@ts-ignore
lastOrderInfo.createTime || Date.now(), Date.now(), session)];
case 1:
orderResult = _c.sent();
itemIdsArr = itemIds.split(',').map(function (v) { return +v; });
orderResult.forEach(function (v) {
if (itemIdsArr.includes(v.itemId)) {
remainTimes.orderGoods += +value;
taskInfo[today] = (taskInfo === null || taskInfo === void 0 ? void 0 : taskInfo[today]) || {};
taskInfo[today].orderGoods = taskInfo[today].orderGoods || [];
taskInfo[today].orderGoods.push({
itemId: v.itemId,
createTime: Date.now()
});
}
});
return [2 /*return*/, {
remainTimes: remainTimes,
taskInfo: taskInfo
}];
}
});
});
};
/**
*更新关注店铺任务状态
*
* @param {IUserInfo} userInfo
* @param {IActivityInfo} activityInfo
* @returns
* @memberof TaskService
*/
TaskService.prototype.updateFollowTask = function (userInfo, activityInfo) {
return __awaiter(this, void 0, void 0, function () {
var today, remainTimes, _id, taskInfo, follow, tasks, value, followInfo;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
today = utils_1.getToday();
remainTimes = userInfo.remainTimes, _id = userInfo._id, taskInfo = userInfo.taskInfo, follow = userInfo.follow;
tasks = activityInfo.tasks;
value = (tasks || {}).attentionStore.value;
followInfo = __assign(__assign({}, follow), { newFollow: true, followTime: Date.now(), followDay: today });
// 记录数据
taskInfo[today] = taskInfo[today] || {};
taskInfo[today].follow = 1;
// 增加待领取次数
remainTimes.follow += value;
return [4 /*yield*/, this.updateUser(_id, {
$set: {
remainTimes: remainTimes,
follow: followInfo,
taskInfo: taskInfo
}
})];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
};
/**
*
* 获取任务今天完成的次数
*
* @param {string} taskType 任务类型
* @param {IUserInfo} userInfo 用户信息
* @returns {number} todayTimes 今日任务完成次数 todayTaskInfo 今日对应任务完成详情
* @memberof TaskService
*/
TaskService.prototype.getTodayCompleteTask = function (taskType, userInfo) {
var _a, _b, _c, _d, _e;
var today = utils_1.getToday();
return {
todayTimes: ((_c = (_b = (_a = userInfo === null || userInfo === void 0 ? void 0 : userInfo.taskInfo) === null || _a === void 0 ? void 0 : _a[today]) === null || _b === void 0 ? void 0 : _b[taskType]) === null || _c === void 0 ? void 0 : _c.length) || 0,
todayTaskInfo: (_e = (_d = userInfo === null || userInfo === void 0 ? void 0 : userInfo.taskInfo) === null || _d === void 0 ? void 0 : _d[today]) === null || _e === void 0 ? void 0 : _e[taskType]
};
};
/**
* 根据任务类型获取任务完成情况
*
* @param {IUserInfo} userInfo
* @param {string} taskType
* @returns {array}
* @memberof TaskService
*/
TaskService.prototype.getCompleteTaskByUserTaskInfo = function (taskType, userInfo) {
var _a = userInfo.taskInfo, taskInfo = _a === void 0 ? {} : _a;
var targetTaskList = [];
Object.keys(taskInfo).forEach(function (day) {
var _a, _b, _c, _d;
if ((_a = taskInfo[day]) === null || _a === void 0 ? void 0 : _a[taskType]) {
var dayTaskInfo = Array.isArray((_b = taskInfo[day]) === null || _b === void 0 ? void 0 : _b[taskType])
? (_c = taskInfo[day]) === null || _c === void 0 ? void 0 : _c[taskType] : [(_d = taskInfo[day]) === null || _d === void 0 ? void 0 : _d[taskType]];
targetTaskList = __spreadArrays(targetTaskList, dayTaskInfo);
}
});
return targetTaskList;
};
/**
*根据任务类型更新任务待领取次数和任务记录
*
* @param {string} taskType
* @param {number} rewards
* @param {IUserInfo} userInfo
* @param {object} [customRecord]
* @returns {boolean}
* @memberof TaskService
*/
TaskService.prototype.updateUserTaskRecord = function (taskType, rewards, userInfo, customRecord) {
return __awaiter(this, void 0, void 0, function () {
var _id, openId, today, result;
var _a, _b;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
_id = userInfo._id;
openId = this.context.openId;
today = utils_1.getToday();
return [4 /*yield*/, this.updateUser(_id, {
$inc: (_a = {},
_a["remainTimes." + taskType] = rewards,
_a),
$push: (_b = {},
_b["taskInfo." + today + "." + taskType] = __assign({ openId: openId, createTime: Date.now() }, customRecord),
_b)
})];
case 1:
result = _c.sent();
return [2 /*return*/, result === 1];
}
});
});
};
TaskService.prototype.updateTasks = function (id, needUpdateKeysArray) {
return __awaiter(this, void 0, void 0, function () {
var updateKeys;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
updateKeys = Object.assign.apply(Object, __spreadArrays([{}], needUpdateKeysArray));
return [4 /*yield*/, this.updateUser(id, {
$set: updateKeys
})];
case 1:
_a.sent();
return [4 /*yield*/, this.getUserInfo()];
case 2: return [2 /*return*/, _a.sent()];
}
});
});
};
return TaskService;
}(user_service_1.default));
exports.default = TaskService;
//# sourceMappingURL=task.service.js.map
\ No newline at end of file
{"version":3,"file":"task.service.js","sourceRoot":"","sources":["../../src/service/task.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,+CAAwC;AAExC,kCAAqD;AACrD,0CAA6C;AAW7C;IAAyC,+BAAW;IAClD,qBAAY,OAAgB;eAC1B,kBAAM,OAAO,CAAC;IAChB,CAAC;IAED,iCAAW,GAAX,UAAY,QAAmB,EAAE,OAAiB,EAAE,KAAa;QAE7D,IAAA,KAEE,QAAQ,OAFiB,EAAjB,IAAI,UAAA,EAAE,SAAS,eAAA,EACzB,WAAW,GACT,QAAQ,YADC,CACD;QAEZ,SAAS;QAES,IAAA,KAAK,GACnB,KAAK,mBADc,CACd;QAET,OAAO;QAEP,IAAM,WAAW,GAAG,IAAI,CAAA;QAExB,OAAO;YACL,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,0BAAM;YACb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AAA,EAAE,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,IAAK,YAAY,CAAE;uCACvF;6BACF,CAAC,EAAA;;wBAPI,MAAM,GAAG,SAOb;wBACF,sBAAO,MAAM,KAAK,CAAC,EAAA;;;;KACpB;IAEK,iCAAW,GAAjB,UAAkB,EAAU,EAAE,mBAA6B;;;;;;wBACnD,UAAU,GAAG,MAAM,CAAC,MAAM,OAAb,MAAM,kBAAQ,EAAE,GAAK,mBAAmB,EAAC,CAAA;wBAC5D,qBAAM,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE;gCACxB,IAAI,EAAE,UAAU;6BACjB,CAAC,EAAA;;wBAFF,SAEE,CAAA;wBACK,qBAAM,IAAI,CAAC,WAAW,EAAE,EAAA;4BAA/B,sBAAO,SAAwB,EAAA;;;;KAChC;IACH,kBAAC;AAAD,CAAC,AA/VD,CAAyC,sBAAW,GA+VnD"}
\ No newline at end of file
/**
* 用户相关方法
*
* @format
*/
import BaseService from './base.service';
declare class UserService extends BaseService {
userdao: IBaseDao;
constructor(context: Context);
/**
* @desc 获取当前打开活动的用户详情
* @returns 若用户不存在,返回null; 用户存在,返回用户信息(object对象)
*/
getUserInfo(): Promise<any>;
/**
* @desc 根据inviteId获取用户详情
* @desc 常用于助力分享码为用户openId, 被邀请人打开活动助力时需要获取邀请人的用户详情
* @param {邀请人的openId} inviteId
* @returns 若用户不存在,返回null; 用户存在,返回用户信息(object对象)
*/
getUserInfoByOpenId(inviteId: string): Promise<any>;
/**
* @desc 获取是否是会员
* @param {调用淘宝接口的session} session
* @returns {isVip: boolean(是否是会员), url: string(入会链接) }
*/
getShopVip(session: string, callbackUrl?: string): Promise<IVipInfo>;
/**
* 初始化用户数据
*
* @param {IVipInfo} vipInfo
* @param {IActivityInfo} activityInfo
* @returns
* @memberof UserService
*/
initUserData(vipInfo: IVipInfo, activityInfo: IActivityInfo): Promise<any>;
updateUserData(vipInfo: IVipInfo, userInfo: IUserInfo): Promise<void>;
/**
* @desc 更新用户表
* @param {用户的主键id} _id
* @param {更新的对象} document
* @returns 若更新成功,返回为1; 若更新失败,返回为 0 或系统直接报错
*/
updateUser(_id: string, projection: object): Promise<any>;
/**
* @desc 根据用户主键id查找用户详情
* @param {用户的主键id} _id
* @returns 若用户不存在,返回null; 用户存在,返回用户信息(object对象)
*/
getUserInfoById(_id: string): Promise<any>;
/**
*判断是否新会员
*
* @param {IUserInfo} userInfo
* @param {IVipInfo} vipInfo
* @returns {boolean}
* @memberof UserService
*/
checkNewVipStatus(userInfo: IUserInfo, vipInfo: IVipInfo): boolean;
}
export default UserService;
"use strict";
/**
* 用户相关方法
*
* @format
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var sdk_1 = require("../sdk");
var base_service_1 = require("./base.service");
var db_1 = require("../db");
var utils_1 = require("../utils");
var config_1 = require("../config");
var UserService = /** @class */ (function (_super) {
__extends(UserService, _super);
function UserService(context) {
var _this = _super.call(this, context) || this;
_this.userdao = new sdk_1.BaseDao(context, db_1.USER_DB_NAME);
return _this;
}
/**
* @desc 获取当前打开活动的用户详情
* @returns 若用户不存在,返回null; 用户存在,返回用户信息(object对象)
*/
UserService.prototype.getUserInfo = function () {
return __awaiter(this, void 0, void 0, function () {
var _a, openId, data, activityId, record;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
_a = this.context, openId = _a.openId, data = _a.data;
activityId = data.activityId;
return [4 /*yield*/, this.userdao.findOne({ openId: openId, activityId: activityId })];
case 1:
record = _b.sent();
return [2 /*return*/, record];
}
});
});
};
/**
* @desc 根据inviteId获取用户详情
* @desc 常用于助力分享码为用户openId, 被邀请人打开活动助力时需要获取邀请人的用户详情
* @param {邀请人的openId} inviteId
* @returns 若用户不存在,返回null; 用户存在,返回用户信息(object对象)
*/
UserService.prototype.getUserInfoByOpenId = function (inviteId) {
return __awaiter(this, void 0, void 0, function () {
var activityId, record;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
activityId = this.context.data.activityId;
return [4 /*yield*/, this.userdao.findOne({ openId: inviteId, activityId: activityId })];
case 1:
record = _a.sent();
return [2 /*return*/, record];
}
});
});
};
/**
* @desc 获取是否是会员
* @param {调用淘宝接口的session} session
* @returns {isVip: boolean(是否是会员), url: string(入会链接) }
*/
UserService.prototype.getShopVip = function (session, callbackUrl) {
if (callbackUrl === void 0) { callbackUrl = ''; }
return __awaiter(this, void 0, void 0, function () {
var VIP_MOCK, result, shopUrl, e_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
VIP_MOCK = config_1.getConfig(this.context).VIP_MOCK;
if (VIP_MOCK) {
return [2 /*return*/, {
isVip: true
}];
}
result = {
result: {
member_info: ''
}
};
shopUrl = {
result: {
result: ''
}
};
_a.label = 1;
case 1:
_a.trys.push([1, 4, , 5]);
return [4 /*yield*/, sdk_1.TBAPIS.queryVipinfo(this.context, session)];
case 2:
result = _a.sent();
return [4 /*yield*/, sdk_1.TBAPIS.getShopVipUrl(this.context, session, {
source: 'isvapp',
entrance: 'duiba'
}, callbackUrl)];
case 3:
shopUrl = _a.sent();
return [3 /*break*/, 5];
case 4:
e_1 = _a.sent();
console.log(e_1);
return [3 /*break*/, 5];
case 5:
console.log("result, shopUrl", result, shopUrl);
return [2 /*return*/, {
isVip: !!(result.result && result.result.member_info),
url: shopUrl.result && shopUrl.result.result
}];
}
});
});
};
/**
* 初始化用户数据
*
* @param {IVipInfo} vipInfo
* @param {IActivityInfo} activityInfo
* @returns
* @memberof UserService
*/
UserService.prototype.initUserData = function (vipInfo, activityInfo) {
return __awaiter(this, void 0, void 0, function () {
var _a, openId, data, activityId, isFollow, avatar, inviteId, userNick, today, tasks, attentionStore, beMembership, user;
var _b, _c;
return __generator(this, function (_d) {
switch (_d.label) {
case 0:
_a = this.context, openId = _a.openId, data = _a.data;
activityId = data.activityId, isFollow = data.isFollow, avatar = data.avatar, inviteId = data.inviteId, userNick = data.userNick;
today = utils_1.getToday();
console.log("----------" + today + "----------", today);
tasks = activityInfo.tasks;
attentionStore = tasks.attentionStore, beMembership = tasks.beMembership;
user = {
activityId: activityId,
avatar: avatar,
inviteId: inviteId,
userNick: userNick,
openId: openId,
// 待领取次数初始化, 根据需自定义添加
remainTimes: {
follow: isFollow ? attentionStore.value : 0,
member: vipInfo.isVip ? beMembership.value : 0
},
member: {
flag: !!vipInfo.isVip
},
follow: {
flag: !!isFollow
},
login: (_b = {},
_b[today] = 1,
_b),
taskInfo: (_c = {},
_c[today] = {},
_c),
createTime: Date.now(),
createDay: today,
updateTime: Date.now()
};
return [4 /*yield*/, this.userdao.insertOne(user)];
case 1: return [2 /*return*/, _d.sent()];
}
});
});
};
UserService.prototype.updateUserData = function (vipInfo, userInfo) {
return __awaiter(this, void 0, void 0, function () {
var data, isFollow, followBefore, followNow, today, isNewVip;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
data = this.context.data;
isFollow = data.isFollow;
followBefore = userInfo.follow.flag;
followNow = isFollow;
if (!followBefore && followNow && !userInfo.follow.newFollow) {
userInfo.follow.newFollow = true;
userInfo.follow.followTime = userInfo.follow.followTime || Date.now();
}
today = utils_1.getToday();
isNewVip = this.checkNewVipStatus(userInfo, vipInfo);
if (isNewVip && !userInfo.member.newMember) {
userInfo.member.newMember = true;
userInfo.member.bememberTime = userInfo.member.bememberTime || Date.now();
}
// 添加登录次数
userInfo['login'][today] = userInfo['login'][today] ? userInfo['login'][today] + 1 : 1;
return [4 /*yield*/, this.updateUser(userInfo._id, {
$set: {
follow: userInfo.follow,
login: userInfo['login'],
member: userInfo.member
}
})];
case 1:
_a.sent();
return [2 /*return*/];
}
});
});
};
/**
* @desc 更新用户表
* @param {用户的主键id} _id
* @param {更新的对象} document
* @returns 若更新成功,返回为1; 若更新失败,返回为 0 或系统直接报错
*/
UserService.prototype.updateUser = function (_id, projection) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
console.log(projection);
if (projection['$set']) {
projection['$set'].updateTime = Date.now();
}
return [4 /*yield*/, this.userdao.update({ _id: _id }, projection)];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
};
/**
* @desc 根据用户主键id查找用户详情
* @param {用户的主键id} _id
* @returns 若用户不存在,返回null; 用户存在,返回用户信息(object对象)
*/
UserService.prototype.getUserInfoById = function (_id) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.userdao.findOne({ _id: _id })];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
};
/**
*判断是否新会员
*
* @param {IUserInfo} userInfo
* @param {IVipInfo} vipInfo
* @returns {boolean}
* @memberof UserService
*/
UserService.prototype.checkNewVipStatus = function (userInfo, vipInfo) {
var flag = userInfo.member.flag;
var isVip = vipInfo.isVip;
return !flag && isVip;
};
return UserService;
}(base_service_1.default));
exports.default = UserService;
//# sourceMappingURL=user.service.js.map
\ No newline at end of file
{"version":3,"file":"user.service.js","sourceRoot":"","sources":["../../src/service/user.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,8BAAwC;AACxC,+CAAwC;AACxC,4BAAoC;AACpC,kCAAmC;AACnC,oCAAqC;AAErC;IAA0B,+BAAW;IAEnC,qBAAY,OAAgB;QAA5B,YACE,kBAAM,OAAO,CAAC,SAEf;QADC,KAAI,CAAC,OAAO,GAAG,IAAI,aAAO,CAAC,OAAO,EAAE,iBAAY,CAAC,CAAA;;IACnD,CAAC;IACD;;;OAGG;IACG,iCAAW,GAAjB;;;;;;wBACM,KAAmB,IAAI,CAAC,OAAO,EAA7B,MAAM,YAAA,EA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ADI,CACJ;QAEJ,IAAA,KAAK,GAAK,OAAO,MAAZ,CAAY;QAEzB,OAAO,CAAC,IAAI,IAAI,KAAK,CAAA;IACvB,CAAC;IACH,kBAAC;AAAD,CAAC,AA9LD,CAA0B,sBAAW,GA8LpC;AAED,kBAAe,WAAW,CAAA"}
\ No newline at end of file
/** @format */
export declare const exportHandlers: (controllers: any[]) => {};
"use strict";
/** @format */
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.exportHandlers = void 0;
exports.exportHandlers = function (controllers) {
var handlersMapper = controllers
.map(function (controller) {
var controllerInstance = new controller();
var handlersKeys = Object.getOwnPropertyNames(Object.getPrototypeOf(controllerInstance)).filter(function (v) { return v !== 'constructor'; });
return handlersKeys.reduce(function (prev, current) {
var _a;
return __assign(__assign({}, prev), (_a = {}, _a[current] = controllerInstance[current], _a));
}, {});
})
.reduce(function (prev, current) {
return __assign(__assign({}, current), prev);
}, {});
return handlersMapper;
};
//# sourceMappingURL=exportHandlers.js.map
\ No newline at end of file
{"version":3,"file":"exportHandlers.js","sourceRoot":"","sources":["../../src/utils/exportHandlers.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;AAED,QAAA,cAAc,GAAG,UAAC,WAAkB;IAC/C,IAAM,cAAc,GAAG,WAAW;SAC/B,GAAG,CAAC,UAAA,UAAU;QACb,IAAM,kBAAkB,GAAG,IAAI,UAAU,EAAE,CAAA;QAC3C,IAAM,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAC/F,UAAA,CAAC,IAAI,OAAA,CAAC,KAAK,aAAa,EAAnB,CAAmB,CACzB,CAAA;QACD,OAAO,YAAY,CAAC,MAAM,CAAC,UAAC,IAAI,EAAE,OAAO;;YACvC,6BACK,IAAI,gBACN,OAAO,IAAG,kBAAkB,CAAC,OAAO,CAAC,OACvC;QACH,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,CAAC,CAAC;SACD,MAAM,CAAC,UAAC,IAAI,EAAE,OAAO;QACpB,6BACK,OAAO,GACP,IAAI,EACR;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,OAAO,cAAc,CAAA;AACvB,CAAC,CAAA"}
\ No newline at end of file
/** @format */
export declare const getToday: () => string;
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getToday = void 0;
var sdk_1 = require("../sdk");
// 获取今天的时间
exports.getToday = function () {
console.log(sdk_1.transformBeijingDate(Date.now()));
return sdk_1.dateFormatter(sdk_1.transformBeijingDate(Date.now()), 'yyyy/MM/dd');
};
//# sourceMappingURL=getToday.js.map
\ No newline at end of file
{"version":3,"file":"getToday.js","sourceRoot":"","sources":["../../src/utils/getToday.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,8BAA4D;AAE5D,UAAU;AACG,QAAA,QAAQ,GAAG;IACtB,OAAO,CAAC,GAAG,CAAC,0BAAoB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;IAC7C,OAAO,mBAAa,CAAC,0BAAoB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE,YAAY,CAAC,CAAA;AACtE,CAAC,CAAA"}
\ No newline at end of file
/** @format */
export * from './logger';
export * from './getToday';
export * from './exportHandlers';
"use strict";
/** @format */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./logger"), exports);
__exportStar(require("./getToday"), exports);
__exportStar(require("./exportHandlers"), exports);
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;AAGd,2CAAwB;AACxB,6CAA0B;AAC1B,mDAAgC"}
\ No newline at end of file
export declare const logger: (context: Context) => void;
export declare const recordErrorLog: (context: Context, baseInfos: IControllerInfos, errorMsg: string, stack: string) => Promise<any>;
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.recordErrorLog = exports.logger = void 0;
/** @format */
var sdk_1 = require("../sdk");
var db_1 = require("../db");
var utils_1 = require("../utils");
exports.logger = function (context) {
var _a, _b, _c;
var data = JSON.stringify(context.data);
console.log(context);
console.log("---------\u51FD\u6570: " + (context.fcName || '') + "." + (((_c = (_b = (_a = context === null || context === void 0 ? void 0 : context.cloud) === null || _a === void 0 ? void 0 : _a.dataspace) === null || _b === void 0 ? void 0 : _b.context) === null || _c === void 0 ? void 0 : _c.handler) || context.handler) + "------------");
console.log("---------\u8BF7\u6C42\u53C2\u6570: " + data + "------------");
};
// 记录错误日志
exports.recordErrorLog = function (context, baseInfos, errorMsg, stack) { return __awaiter(void 0, void 0, void 0, function () {
var openId, activityId, userInfo, userNick, logdao, functionName;
var _a, _b, _c;
return __generator(this, function (_d) {
switch (_d.label) {
case 0:
openId = context.openId;
activityId = (context.data || {}).activityId;
userInfo = baseInfos.userInfo;
userNick = (userInfo || {}).userNick;
logdao = new sdk_1.BaseDao(context, db_1.ERROR_LOG_DB_NAME);
functionName = (context.fcName || '') + "." + (((_c = (_b = (_a = context === null || context === void 0 ? void 0 : context.cloud) === null || _a === void 0 ? void 0 : _a.dataspace) === null || _b === void 0 ? void 0 : _b.context) === null || _c === void 0 ? void 0 : _c.handler) || context.handler);
return [4 /*yield*/, logdao.insertOne({
openId: openId,
activityId: activityId,
errorMsg: errorMsg,
errorStack: stack,
functionName: functionName,
userNick: userNick,
fcInvokeId: context.fcInvokeId,
params: context.data,
createTime: Date.now(),
createDay: utils_1.getToday(),
catchType: 1
})];
case 1: return [2 /*return*/, _d.sent()];
}
});
}); };
//# sourceMappingURL=logger.js.map
\ No newline at end of file
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,8BAAgC;AAChC,4BAAyC;AACzC,kCAAmC;AAEtB,QAAA,MAAM,GAAG,UAAC,OAAgB;;IACrC,IAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACzC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IACpB,OAAO,CAAC,GAAG,CACT,6BAAgB,OAAO,CAAC,MAAM,IAAI,EAAE,WAClC,mBAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,SAAS,0CAAE,OAAO,0CAAE,OAAO,KAAI,OAAO,CAAC,OAAO,kBAClD,CACf,CAAA;IACD,OAAO,CAAC,GAAG,CAAC,wCAAkB,IAAI,iBAAc,CAAC,CAAA;AACnD,CAAC,CAAA;AAED,SAAS;AACI,QAAA,cAAc,GAAG,UAC5B,OAAgB,EAChB,SAA2B,EAC3B,QAAgB,EAChB,KAAa;;;;;;gBAEL,MAAM,GAAK,OAAO,OAAZ,CAAY;gBAClB,UAAU,GAAK,CAAA,OAAO,CAAC,IAAI,IAAI,EAAE,CAAA,WAAvB,CAAuB;gBACjC,QAAQ,GAAK,SAAS,SAAd,CAAc;gBACtB,QAAQ,GAAK,CAAA,QAAQ,IAAI,EAAE,CAAA,SAAnB,CAAmB;gBAC7B,MAAM,GAAa,IAAI,aAAO,CAAC,OAAO,EAAE,sBAAiB,CAAC,CAAA;gBAC1D,YAAY,GAAW,CAAG,OAAO,CAAC,MAAM,IAAI,EAAE,WAClD,mBAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,SAAS,0CAAE,OAAO,0CAAE,OAAO,KAAI,OAAO,CAAC,OAAO,CAC9D,CAAA;gBACK,qBAAM,MAAM,CAAC,SAAS,CAAC;wBAC5B,MAAM,QAAA;wBACN,UAAU,YAAA;wBACV,QAAQ,UAAA;wBACR,UAAU,EAAE,KAAK;wBACjB,YAAY,cAAA;wBACZ,QAAQ,UAAA;wBACR,UAAU,EAAE,OAAO,CAAC,UAAU;wBAC9B,MAAM,EAAE,OAAO,CAAC,IAAI;wBACpB,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;wBACtB,SAAS,EAAE,gBAAQ,EAAE;wBACrB,SAAS,EAAE,CAAC;qBACb,CAAC,EAAA;oBAZF,sBAAO,SAYL,EAAA;;;KACH,CAAA"}
\ No newline at end of file
/** @format */
export declare const exportHandlers: (controllers: any[]) => {};
"use strict";
/** @format */
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.exportHandlers = void 0;
exports.exportHandlers = function (controllers) {
var handlersMapper = controllers
.map(function (controller) {
var controllerInstance = new controller();
var handlersKeys = Object.getOwnPropertyNames(Object.getPrototypeOf(controllerInstance)).filter(function (v) { return v !== 'constructor'; });
return handlersKeys.reduce(function (prev, current) {
var _a;
return __assign(__assign({}, prev), (_a = {}, _a[current] = controllerInstance[current], _a));
}, {});
})
.reduce(function (prev, current) {
return __assign(__assign({}, current), prev);
}, {});
return handlersMapper;
};
//# sourceMappingURL=exportHandlers.js.map
\ No newline at end of file
{"version":3,"file":"exportHandlers.js","sourceRoot":"","sources":["../../../src/utils/package/exportHandlers.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;AAED,QAAA,cAAc,GAAG,UAAC,WAAkB;IAC/C,IAAM,cAAc,GAAG,WAAW;SAC/B,GAAG,CAAC,UAAA,UAAU;QACb,IAAM,kBAAkB,GAAG,IAAI,UAAU,EAAE,CAAA;QAC3C,IAAM,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAC/F,UAAA,CAAC,IAAI,OAAA,CAAC,KAAK,aAAa,EAAnB,CAAmB,CACzB,CAAA;QACD,OAAO,YAAY,CAAC,MAAM,CAAC,UAAC,IAAI,EAAE,OAAO;;YACvC,6BACK,IAAI,gBACN,OAAO,IAAG,kBAAkB,CAAC,OAAO,CAAC,OACvC;QACH,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,CAAC,CAAC;SACD,MAAM,CAAC,UAAC,IAAI,EAAE,OAAO;QACpB,6BACK,OAAO,GACP,IAAI,EACR;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,OAAO,cAAc,CAAA;AACvB,CAAC,CAAA"}
\ No newline at end of file
/**
* 获取商家session
*
* @format
*/
export declare const getSellerSession: (context: Context, activityId?: string) => Promise<{
session?: undefined;
} | {
session: any;
}>;
"use strict";
/**
* 获取商家session
*
* @format
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSellerSession = void 0;
var db_1 = require("../../db");
var sdk_1 = require("../../sdk");
exports.getSellerSession = function (context, activityId) { return __awaiter(void 0, void 0, void 0, function () {
var activitydao, sellerdao, activityConfigResult, result;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!activityId) {
activityId = context.data.activityId;
}
activitydao = new sdk_1.BaseDao(context, db_1.ACTIVITY_CONFIG_DB_NAME);
sellerdao = new sdk_1.BaseDao(context, db_1.SELLER_INFO_DB_NAME);
return [4 /*yield*/, activitydao.find({ _id: activityId })];
case 1:
activityConfigResult = _a.sent();
if (!activityConfigResult || !activityConfigResult[0])
return [2 /*return*/, {}];
return [4 /*yield*/, sellerdao.find({
openId: activityConfigResult[0].openId
})
// console.log(`getSellerSession`, result)
];
case 2:
result = _a.sent();
// console.log(`getSellerSession`, result)
if (!result || !result[0])
return [2 /*return*/, {}];
return [2 /*return*/, {
session: result[0].accessToken
}];
}
});
}); };
//# sourceMappingURL=getSession.js.map
\ No newline at end of file
{"version":3,"file":"getSession.js","sourceRoot":"","sources":["../../../src/utils/package/getSession.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+BAAuE;AAEvE,iCAAmC;AAEtB,QAAA,gBAAgB,GAAG,UAAO,OAAgB,EAAE,UAAmB;;;;;gBAC1E,IAAI,CAAC,UAAU,EAAE;oBACf,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,CAAA;iBACrC;gBACG,WAAW,GAAG,IAAI,aAAO,CAAC,OAAO,EAAE,4BAAuB,CAAC,CAAA;gBAC3D,SAAS,GAAG,IAAI,aAAO,CAAC,OAAO,EAAE,wBAAmB,CAAC,CAAA;gBAC9B,qBAAM,WAAW,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,EAAA;;gBAAlE,oBAAoB,GAAG,SAA2C;gBACtE,IAAI,CAAC,oBAAoB,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC;oBAAE,sBAAO,EAAE,EAAA;gBAEnD,qBAAM,SAAS,CAAC,IAAI,CAAC;wBAChC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC,MAAM;qBACvC,CAAC;oBACF,2CAA2C;kBADzC;;gBAFE,MAAM,GAAG,SAEX;gBACF,2CAA2C;gBAC3C,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;oBAAE,sBAAO,EAAE,EAAA;gBACpC,sBAAO;wBACL,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW;qBAC/B,EAAA;;;KACF,CAAA"}
\ No newline at end of file
/** @format */
export declare const getToday: () => string;
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getToday = void 0;
var sdk_1 = require("../../sdk");
// 获取今天的时间
exports.getToday = function () {
console.log(sdk_1.transformBeijingDate(Date.now()));
return sdk_1.dateFormatter(sdk_1.transformBeijingDate(Date.now()), 'yyyy/MM/dd');
};
//# sourceMappingURL=getToday.js.map
\ No newline at end of file
{"version":3,"file":"getToday.js","sourceRoot":"","sources":["../../../src/utils/package/getToday.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,iCAA+D;AAE/D,UAAU;AACG,QAAA,QAAQ,GAAG;IACtB,OAAO,CAAC,GAAG,CAAC,0BAAoB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;IAC7C,OAAO,mBAAa,CAAC,0BAAoB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE,YAAY,CAAC,CAAA;AACtE,CAAC,CAAA"}
\ No newline at end of file
/**
* 用户购买记录查询
*
* @format
*/
export declare const getUserOrderlist: (context: any, queryStartTime: any, queryEndTime?: any, session?: string) => Promise<any[]>;
"use strict";
/**
* 用户购买记录查询
*
* @format
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getUserOrderlist = void 0;
var dayjs = require("dayjs");
var sdk_1 = require("../../sdk");
var getSession_1 = require("./getSession");
var constants_1 = require("../../constants");
exports.getUserOrderlist = function (context, queryStartTime, queryEndTime, session) { return __awaiter(void 0, void 0, void 0, function () {
var results_1, currentTime, lastUpdateTime, params, orderResult, trade, e_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 4, , 5]);
results_1 = [];
currentTime = Date.now();
lastUpdateTime = dayjs().add(-3, 'month').valueOf();
console.log("lastUpdateTime", lastUpdateTime);
// 若倒推的3个月时间小于传入的查询开始时间, 则以查询开始时间作为最后更新时间
if (lastUpdateTime < queryStartTime) {
lastUpdateTime = queryStartTime;
}
if (!!session) return [3 /*break*/, 2];
return [4 /*yield*/, getSession_1.getSellerSession(context)];
case 1:
session = (_a.sent()).session;
_a.label = 2;
case 2:
params = {
startTime: sdk_1.dateFormatter(sdk_1.transformBeijingDate(lastUpdateTime)),
endTime: sdk_1.dateFormatter(sdk_1.transformBeijingDate(queryEndTime || currentTime)),
openId: context.openId,
session: session
};
return [4 /*yield*/, sdk_1.TBAPIS.getBuyerOrderList(context, params)];
case 3:
orderResult = _a.sent();
if (orderResult.total_results > 0) {
trade = orderResult.trades.trade;
trade.forEach(function (i) {
if (constants_1.TAOBAO_SUCCESS_ORDER_STATUS.includes(i.status)) {
i.orders.order.forEach(function (s) {
results_1.push({
payTime: i.pay_time,
itemId: s.num_iid,
time: i.created,
price: s.price,
orderId: s.oid,
img: s.pic_path,
title: s.title
});
});
}
});
}
console.log("\u5DF2\u652F\u4ED8\u7684\u8BA2\u5355\u5217\u8868", results_1);
return [2 /*return*/, results_1];
case 4:
e_1 = _a.sent();
console.log("\u9519\u8BEF", e_1);
return [2 /*return*/, []];
case 5: return [2 /*return*/];
}
});
}); };
//# sourceMappingURL=getUserOrderlist.js.map
\ No newline at end of file
{"version":3,"file":"getUserOrderlist.js","sourceRoot":"","sources":["../../../src/utils/package/getUserOrderlist.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6BAA8B;AAC9B,iCAAuE;AACvE,2CAA+C;AAC/C,6CAA6D;AAEhD,QAAA,gBAAgB,GAAG,UAAO,OAAO,EAAE,cAAc,EAAE,YAAa,EAAE,OAAgB;;;;;;gBAEvF,YAAU,EAAE,CAAA;gBACZ,WAAW,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;gBAExB,cAAc,GAAG,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,CAAA;gBACvD,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAA;gBAC7C,yCAAyC;gBACzC,IAAI,cAAc,GAAG,cAAc,EAAE;oBACnC,cAAc,GAAG,cAAc,C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AO,CAAC,GAAG,CAAC,cAAI,EAAE,GAAC,CAAC,CAAA;gBACpB,sBAAO,EAAE,EAAA;;;;KAEZ,CAAA"}
\ No newline at end of file
/** @format */
/**
* 并发更新
* @param {接收数组或对象} daoqueryArr : [{dao: userdao, query:{id:_id}}, {dao: activityprizedao, query: {id:_id}}]
* @param {*} fn
* @param {*} times
*/
export declare const lockUpdate: (daoqueryArr: any, fn: any, times?: number) => Promise<any>;
/**
* 调用示例
*/
"use strict";
/** @format */
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.lockUpdate = void 0;
var constants_1 = require("../../constants");
/**
* 并发更新
* @param {接收数组或对象} daoqueryArr : [{dao: userdao, query:{id:_id}}, {dao: activityprizedao, query: {id:_id}}]
* @param {*} fn
* @param {*} times
*/
exports.lockUpdate = function (daoqueryArr, fn, times) {
if (times === void 0) { times = 5; }
return __awaiter(void 0, void 0, void 0, function () {
function waitFor(ms) {
return new Promise(function (resolve) {
setTimeout(resolve, ms);
});
}
var time, success, _loop_1, state_1, e_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (typeof daoqueryArr !== 'object' && !Array.isArray(daoqueryArr)) {
console.log("lockUpdate \u53C2\u6570\u9519\u8BEF");
return [2 /*return*/, false];
}
if (typeof daoqueryArr === 'object') {
daoqueryArr = [daoqueryArr];
}
time = 0;
console.log("\u8FDB\u5165update\u5E76\u53D1\u5904\u7406\u6B21\u6570", times);
success = false;
_a.label = 1;
case 1:
_a.trys.push([1, 5, , 6]);
_loop_1 = function () {
var updateRes, ret;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
updateRes = [];
daoqueryArr.forEach(function (daoquery) { return __awaiter(void 0, void 0, void 0, function () {
var canupdate;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, daoquery.dao.update(daoquery.query, { $set: { lockStatus: 2 } })];
case 1:
canupdate = _a.sent();
updateRes.push(canupdate);
return [2 /*return*/];
}
});
}); });
if (!!daoqueryArr.includes(0)) return [3 /*break*/, 2];
return [4 /*yield*/, fn()];
case 1:
ret = _a.sent();
daoqueryArr.forEach(function (daoquery) { return __awaiter(void 0, void 0, void 0, function () {
var ures;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, daoquery.dao.update(daoquery.query, { $set: { lockStatus: 1 } })];
case 1:
ures = _a.sent();
console.log("\u66F4\u65B0lockStatus\u4E3A0", ures);
return [2 /*return*/];
}
});
}); });
success = true;
return [2 /*return*/, { value: ret }];
case 2:
console.log("\u8FDB\u5165waitFor\u4E86\uFF0C\u9700\u7B49\u5F8530ms");
return [4 /*yield*/, waitFor(30)];
case 3:
_a.sent();
success = false;
_a.label = 4;
case 4: return [2 /*return*/];
}
});
};
_a.label = 2;
case 2:
if (!(time++ < times && !success)) return [3 /*break*/, 4];
return [5 /*yield**/, _loop_1()];
case 3:
state_1 = _a.sent();
if (typeof state_1 === "object")
return [2 /*return*/, state_1.value];
return [3 /*break*/, 2];
case 4: return [3 /*break*/, 6];
case 5:
e_1 = _a.sent();
console.log(e_1);
daoqueryArr.forEach(function (daoquery) { return __awaiter(void 0, void 0, void 0, function () {
var ures;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, daoquery.dao.update(daoquery.query, { $set: { lockStatus: 1 } })];
case 1:
ures = _a.sent();
console.log("\u66F4\u65B0lockStatus\u4E3A0", ures);
return [2 /*return*/];
}
});
}); });
success = false;
return [3 /*break*/, 6];
case 6:
// 稍后重试
if (!success) {
daoqueryArr.forEach(function (daoquery) { return __awaiter(void 0, void 0, void 0, function () {
var ures;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, daoquery.dao.update(daoquery.query, { $set: { lockStatus: 1 } })];
case 1:
ures = _a.sent();
console.log("\u64CD\u4F5C" + times + "\u6B21\u540E\u66F4\u65B0lockStatus\u4E3A0", ures);
return [2 /*return*/];
}
});
}); });
return [2 /*return*/, constants_1.CODE_TYPES.ERROR_UPDATE_RETRY];
}
return [2 /*return*/];
}
});
});
};
/**
* 调用示例
*/
// 扣库存
// let res = await lockUpdate({dao: this.activityprizedao, query: {_id}}, async ()=> {
// return await this.activityprizedao.update({_id}, {$set: {
// useStock: useStock + 1,
// updateTime: Date.now()
// }});
// });
// console.log(res);
// if (!res) {
// return CODE_TYPES.ERROR_UPDATE_RETRY;
// }
// return true;
//# sourceMappingURL=lockUpdate.js.map
\ No newline at end of file
{"version":3,"file":"lockUpdate.js","sourceRoot":"","sources":["../../../src/utils/package/lockUpdate.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,6CAA4C;AAE5C;;;;;GAKG;AACU,QAAA,UAAU,GAAG,UAAO,WAAW,EAAE,EAAE,EAAE,KAAS;IAAT,sBAAA,EAAA,SAAS;;QAoDzD,SAAS,OAAO,CAAC,EAAE;YACjB,OAAO,IAAI,OAAO,CAAC,UAAA,OAAO;gBACxB,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;YACzB,CAAC,CAAC,CAAA;QACJ,CAAC;;;;;oBAvDD,IAAI,OAAO,WAAW,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;wBAClE,OAAO,CAAC,GAAG,CAAC,qCAAiB,CAAC,CAAA;wBAC9B,sBAAO,KAAK,EAAA;qBACb;oBACD,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;wBACnC,WAAW,GAAG,CAAC,WAAW,CAAC,CAAA;qBAC5B;oBAEG,IAAI,GAAG,CAAC,CAAA;oBACZ,OAAO,CAAC,GAAG,CAAC,wDAAgB,EAAE,KAAK,CAAC,CAAA;oBAChC,OAAO,GAAG,KAAK,CAAA;;;;;;;;;oCAIX,SAAS,GAAG,EAAE,CAAA;oCAClB,WAAW,CAAC,OAAO,CAAC,UAAM,QAAQ;;;;wDAChB,qBAAM,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EA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;oBAEjB,OAAO;oBACP,IAAI,CAAC,OAAO,EAAE;wBACZ,WAAW,CAAC,OAAO,CAAC,UAAM,QAAQ;;;;4CACrB,qBAAM,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,EAAA;;wCAA7E,IAAI,GAAG,SAAsE;wCACjF,OAAO,CAAC,GAAG,CAAC,iBAAK,KAAK,8CAAkB,EAAE,IAAI,CAAC,CAAA;;;;6BAChD,CAAC,CAAA;wBACF,sBAAO,sBAAU,CAAC,kBAAkB,EAAA;qBACrC;;;;;CAMF,CAAA;AAED;;GAEG;AACH,MAAM;AACN,sFAAsF;AACtF,8DAA8D;AAC9D,8BAA8B;AAC9B,6BAA6B;AAC7B,SAAS;AACT,MAAM;AACN,oBAAoB;AACpB,cAAc;AACd,0CAA0C;AAC1C,IAAI;AACJ,eAAe"}
\ No newline at end of file
export declare const logger: (context: Context) => void;
export declare const recordErrorLog: (context: Context, baseInfos: IControllerInfos, errorMsg: string, stack: string) => Promise<any>;
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.recordErrorLog = exports.logger = void 0;
/** @format */
var sdk_1 = require("../../sdk");
var db_1 = require("../../db");
var utils_1 = require("../../utils");
exports.logger = function (context) {
var _a, _b, _c;
var data = JSON.stringify(context.data);
console.log(context);
console.log("---------\u51FD\u6570: " + (context.fcName || '') + "." + (((_c = (_b = (_a = context === null || context === void 0 ? void 0 : context.cloud) === null || _a === void 0 ? void 0 : _a.dataspace) === null || _b === void 0 ? void 0 : _b.context) === null || _c === void 0 ? void 0 : _c.handler) || context.handler) + "------------");
console.log("---------\u8BF7\u6C42\u53C2\u6570: " + data + "------------");
};
// 记录错误日志
exports.recordErrorLog = function (context, baseInfos, errorMsg, stack) { return __awaiter(void 0, void 0, void 0, function () {
var openId, activityId, userInfo, userNick, logdao, functionName;
var _a, _b, _c;
return __generator(this, function (_d) {
switch (_d.label) {
case 0:
openId = context.openId;
activityId = (context.data || {}).activityId;
userInfo = baseInfos.userInfo;
userNick = (userInfo || {}).userNick;
logdao = new sdk_1.BaseDao(context, db_1.ERROR_LOG_DB_NAME);
functionName = (context.fcName || '') + "." + (((_c = (_b = (_a = context === null || context === void 0 ? void 0 : context.cloud) === null || _a === void 0 ? void 0 : _a.dataspace) === null || _b === void 0 ? void 0 : _b.context) === null || _c === void 0 ? void 0 : _c.handler) || context.handler);
return [4 /*yield*/, logdao.insertOne({
openId: openId,
activityId: activityId,
errorMsg: errorMsg,
errorStack: stack,
functionName: functionName,
userNick: userNick,
fcInvokeId: context.fcInvokeId,
params: context.data,
createTime: Date.now(),
createDay: utils_1.getToday(),
catchType: 1
})];
case 1: return [2 /*return*/, _d.sent()];
}
});
}); };
//# sourceMappingURL=logger.js.map
\ No newline at end of file
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/utils/package/logger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,iCAAmC;AACnC,+BAA4C;AAC5C,qCAAsC;AAEzB,QAAA,MAAM,GAAG,UAAC,OAAgB;;IACrC,IAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACzC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IACpB,OAAO,CAAC,GAAG,CACT,6BAAgB,OAAO,CAAC,MAAM,IAAI,EAAE,WAClC,mBAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,SAAS,0CAAE,OAAO,0CAAE,OAAO,KAAI,OAAO,CAAC,OAAO,kBAClD,CACf,CAAA;IACD,OAAO,CAAC,GAAG,CAAC,wCAAkB,IAAI,iBAAc,CAAC,CAAA;AACnD,CAAC,CAAA;AAED,SAAS;AACI,QAAA,cAAc,GAAG,UAC5B,OAAgB,EAChB,SAA2B,EAC3B,QAAgB,EAChB,KAAa;;;;;;gBAEL,MAAM,GAAK,OAAO,OAAZ,CAAY;gBAClB,UAAU,GAAK,CAAA,OAAO,CAAC,IAAI,IAAI,EAAE,CAAA,WAAvB,CAAuB;gBACjC,QAAQ,GAAK,SAAS,SAAd,CAAc;gBACtB,QAAQ,GAAK,CAAA,QAAQ,IAAI,EAAE,CAAA,SAAnB,CAAmB;gBAC7B,MAAM,GAAa,IAAI,aAAO,CAAC,OAAO,EAAE,sBAAiB,CAAC,CAAA;gBAC1D,YAAY,GAAW,CAAG,OAAO,CAAC,MAAM,IAAI,EAAE,WAClD,mBAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,SAAS,0CAAE,OAAO,0CAAE,OAAO,KAAI,OAAO,CAAC,OAAO,CAC9D,CAAA;gBACK,qBAAM,MAAM,CAAC,SAAS,CAAC;wBAC5B,MAAM,QAAA;wBACN,UAAU,YAAA;wBACV,QAAQ,UAAA;wBACR,UAAU,EAAE,KAAK;wBACjB,YAAY,cAAA;wBACZ,QAAQ,UAAA;wBACR,UAAU,EAAE,OAAO,CAAC,UAAU;wBAC9B,MAAM,EAAE,OAAO,CAAC,IAAI;wBACpB,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;wBACtB,SAAS,EAAE,gBAAQ,EAAE;wBACrB,SAAS,EAAE,CAAC;qBACb,CAAC,EAAA;oBAZF,sBAAO,SAYL,EAAA;;;KACH,CAAA"}
\ No newline at end of file
/** @format */
export declare const rand: (number: any) => number;
export declare const signFigures: (num: any, rank?: number) => number;
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.signFigures = exports.rand = void 0;
exports.rand = (function () {
var seed = new Date().getTime();
function r() {
seed = (seed * 9301 + 49297) % 233280;
return seed / 233280.0;
}
return function (number) {
return Math.ceil(r() * number);
};
})();
exports.signFigures = function (num, rank) {
if (rank === void 0) { rank = 6; }
if (!num)
return 0;
var sign = num / Math.abs(num);
var number = num * sign;
var temp = rank - 1 - Math.floor(Math.log10(number));
var ans;
if (temp > 0) {
ans = parseFloat(number.toFixed(temp));
}
else if (temp < 0) {
ans = Math.round(number / Math.pow(10, temp)) * temp;
}
else {
ans = Math.round(number);
}
return ans * sign;
};
//# sourceMappingURL=rand.js.map
\ No newline at end of file
{"version":3,"file":"rand.js","sourceRoot":"","sources":["../../../src/utils/package/rand.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAED,QAAA,IAAI,GAAG,CAAC;IACnB,IAAI,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;IAC/B,SAAS,CAAC;QACR,IAAI,GAAG,CAAC,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAA;QACrC,OAAO,IAAI,GAAG,QAAQ,CAAA;IACxB,CAAC;IACD,OAAO,UAAU,MAAM;QACrB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,CAAA;IAChC,CAAC,CAAA;AACH,CAAC,CAAC,EAAE,CAAA;AAES,QAAA,WAAW,GAAG,UAAU,GAAG,EAAE,IAAQ;IAAR,qBAAA,EAAA,QAAQ;IAChD,IAAI,CAAC,GAAG;QAAE,OAAO,CAAC,CAAA;IAClB,IAAM,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAChC,IAAM,MAAM,GAAG,GAAG,GAAG,IAAI,CAAA;IACzB,IAAM,IAAI,GAAG,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;IACtD,IAAI,GAAG,CAAA;IACP,IAAI,IAAI,GAAG,CAAC,EAAE;QACZ,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;KACvC;SAAM,IAAI,IAAI,GAAG,CAAC,EAAE;QACnB,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,IAAI,CAAA;KACrD;SAAM;QACL,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;KACzB;IACD,OAAO,GAAG,GAAG,IAAI,CAAA;AACnB,CAAC,CAAA"}
\ No newline at end of file
/** @format */
/**
* 发奖,包含权益,实物,积分
* @param {*} document 必须要有{ type, ename, _id }
* @param {*} session
* @param {*} context
*/
export declare const sendTBAward: (context: any, session: any, document: any) => Promise<any>;
/**
* 发放积分
* @param {发放的积分数} credits
* @param {*} session
* @param {*} context
* @returns {drawStatus, remark}
*/
export declare const sendCredits: (credits: any, session: any, context: any) => Promise<{
drawStatus: number;
remark: string;
}>;
/**
* @desc 发放权益
* @param {权益名称} ename
* @param {唯一key} uniqueId
* @param {*} session
* @param {*} context
* @returns { drawStatus, remark }
*/
export declare const sendEname: (ename: any, uniqueId: any, session: any, context: any) => Promise<{
remark: string;
drawStatus: number;
}>;
"use strict";
/** @format */
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.sendEname = exports.sendCredits = exports.sendTBAward = void 0;
var constants_1 = require("../../constants");
var sdk_1 = require("../../sdk");
/**
* 发奖,包含权益,实物,积分
* @param {*} document 必须要有{ type, ename, _id }
* @param {*} session
* @param {*} context
*/
exports.sendTBAward = function (context, session, document) { return __awaiter(void 0, void 0, void 0, function () {
var type, ename, _id, credits, _a, drawStatus, remark, _b, drawStatus, remark, e_1;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
type = document.type, ename = document.ename, _id = document._id, credits = document.credits;
if (!type) {
return [2 /*return*/, constants_1.CODE_TYPES.PARAMS_ERROR];
}
if (type === constants_1.PRIZE_TYPE.OBJECT) {
return [2 /*return*/, document];
}
_c.label = 1;
case 1:
_c.trys.push([1, 6, , 7]);
console.log("type", type);
if (!(type === constants_1.PRIZE_TYPE.ENAME)) return [3 /*break*/, 3];
console.log("\u4E2D\u6743\u76CA");
return [4 /*yield*/, exports.sendEname(ename, _id, session, context)];
case 2:
_a = _c.sent(), drawStatus = _a.drawStatus, remark = _a.remark;
console.log("drawStatus, remark", drawStatus, remark);
document.drawStatus = drawStatus;
document.remark = remark;
return [3 /*break*/, 5];
case 3:
if (!(type === constants_1.PRIZE_TYPE.CREDITS)) return [3 /*break*/, 5];
return [4 /*yield*/, exports.sendCredits(credits, session, context)];
case 4:
_b = _c.sent(), drawStatus = _b.drawStatus, remark = _b.remark;
document.drawStatus = drawStatus;
document.remark = remark;
_c.label = 5;
case 5: return [2 /*return*/, document];
case 6:
e_1 = _c.sent();
console.log("\u53D1\u5956\u9519\u8BEF", e_1);
return [2 /*return*/, constants_1.CODE_TYPES.SYSTEM_ERROR];
case 7: return [2 /*return*/];
}
});
}); };
/**
* 发放积分
* @param {发放的积分数} credits
* @param {*} session
* @param {*} context
* @returns {drawStatus, remark}
*/
exports.sendCredits = function (credits, session, context) { return __awaiter(void 0, void 0, void 0, function () {
var drawStatus, remark, result;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
drawStatus = 0;
remark = '';
return [4 /*yield*/, sdk_1.TBAPIS.changeCredits(context, session, {
quantity: credits,
change_type: 2,
opt_type: '0',
remark: "\u53C2\u4E0E\u6D3B\u52A8\u52A0\u79EF\u5206"
})];
case 1:
result = _a.sent();
if (result) {
drawStatus = constants_1.DRAW_STATUS.SUCCESS;
}
else {
drawStatus = constants_1.DRAW_STATUS.FAIL;
remark = result.result_msg;
}
return [2 /*return*/, { drawStatus: drawStatus, remark: remark }];
}
});
}); };
/**
* @desc 发放权益
* @param {权益名称} ename
* @param {唯一key} uniqueId
* @param {*} session
* @param {*} context
* @returns { drawStatus, remark }
*/
exports.sendEname = function (ename, uniqueId, session, context) { return __awaiter(void 0, void 0, void 0, function () {
var result, e_2, drawStatus, remark, result_code;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
result = {
result_success: '',
result_code: '',
msg: '',
result_msg: '',
sub_msg: ''
};
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, sdk_1.TBAPIS.benefitSend(context, {
right_ename: ename,
receiver_id: context.openId,
unique_id: uniqueId,
app_name: constants_1.C_APP_NAME,
session: session
})];
case 2:
result = _a.sent();
return [3 /*break*/, 4];
case 3:
e_2 = _a.sent();
console.log("\u53D1\u653E\u6743\u76CA\u5931\u8D25", e_2);
result = e_2;
return [3 /*break*/, 4];
case 4:
drawStatus = 0;
remark = '';
if (result.result_success) {
drawStatus = constants_1.DRAW_STATUS.SUCCESS;
}
else {
result_code = result.result_code;
if ([
'APPLY_SINGLE_COUPON_COUNT_EXCEED_LIMIT',
'APPLY_ONE_SELLER_COUNT_EXCEED_LIMIT',
'USER_PERMISSION_EXCEED_MAX_RIGHT_COUNT_IN_DAY'
].includes(result_code)) {
drawStatus = constants_1.DRAW_STATUS.RETRY;
}
else {
drawStatus = constants_1.DRAW_STATUS.FAIL;
}
remark = constants_1.TBERROR[result_code || result.msg] || result.result_msg || result.sub_msg || "\u53D1\u653E\u5931\u8D25";
}
return [2 /*return*/, { remark: remark, drawStatus: drawStatus }];
}
});
}); };
//# sourceMappingURL=sendTBAward.js.map
\ No newline at end of file
{"version":3,"file":"sendTBAward.js","sourceRoot":"","sources":["../../../src/utils/package/sendTBAward.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,6CAA0F;AAC1F,iCAAkC;AAElC;;;;;GAKG;AACU,QAAA,WAAW,GAAG,UAAO,OAAO,EAAE,OAAO,EAAE,QAAQ;;;;;gBACpD,IAAI,GAA0B,QAAQ,KAAlC,EAAE,KAAK,GAAmB,QAAQ,MAA3B,EAAE,GAAG,GAAc,QAAQ,IAAtB,EAAE,OAAO,GAAK,QAAQ,QAAb,CAAa;gBAC5C,IAAI,CAAC,IAAI,EAAE;oBACT,sBAAO,sBAAU,CAAC,YAAY,EAAA;iBAC/B;gBACD,IAAI,IAAI,KAAK,sBAAU,CAAC,MAAM,EAAE;oBAC9B,sBAAO,QAAQ,EAAA;iBAChB;;;;gBAGC,O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B;yBAAM;wBACL,UAAU,GAAG,uBAAW,CAAC,IAAI,CAAA;qBAC9B;oBACD,MAAM,GAAG,mBAAO,CAAC,WAAW,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,OAAO,IAAI,0BAAM,CAAA;iBAC7F;gBACD,sBAAO,EAAE,MAAM,QAAA,EAAE,UAAU,YAAA,EAAE,EAAA;;;KAC9B,CAAA"}
\ No newline at end of file
/** @format */
require('source-map-support').install()
const fns = require('./dist/index')
module.exports = fns.default
{
"name": "mockserver",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@sindresorhus/is": {
"version": "0.14.0",
"resolved": "https://registry.npm.taobao.org/@sindresorhus/is/download/@sindresorhus/is-0.14.0.tgz?cache=0&sync_timestamp=1597573685903&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40sindresorhus%2Fis%2Fdownload%2F%40sindresorhus%2Fis-0.14.0.tgz",
"integrity": "sha1-n7OjzzEyMoFR81PeRjLgHlIQK+o=",
"dev": true
},
"@szmarczak/http-timer": {
"version": "1.1.2",
"resolved": "https://registry.npm.taobao.org/@szmarczak/http-timer/download/@szmarczak/http-timer-1.1.2.tgz",
"integrity": "sha1-sWZeLEYaLNkvTBu/UNVFTeDUtCE=",
"dev": true,
"requires": {
"defer-to-connect": "^1.0.1"
}
},
"@types/color-name": {
"version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/@types/color-name/download/@types/color-name-1.1.1.tgz?cache=0&sync_timestamp=1596837707987&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fcolor-name%2Fdownload%2F%40types%2Fcolor-name-1.1.1.tgz",
"integrity": "sha1-HBJhu+qhCoBVu8XYq4S3sq/IRqA=",
"dev": true
},
"@types/http-proxy": {
"version": "1.17.4",
"resolved": "https://registry.npm.taobao.org/@types/http-proxy/download/@types/http-proxy-1.17.4.tgz?cache=0&sync_timestamp=1596840717330&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fhttp-proxy%2Fdownload%2F%40types%2Fhttp-proxy-1.17.4.tgz",
"integrity": "sha1-58kuPb4+E6p5lED/QubToXqdBFs=",
"requires": {
"@types/node": "*"
}
},
"@types/node": {
"version": "14.0.27",
"resolved": "https://registry.npm.taobao.org/@types/node/download/@types/node-14.0.27.tgz?cache=0&sync_timestamp=1596839161536&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-14.0.27.tgz",
"integrity": "sha1-oVGHOvWl6FG1GzsGXJ5jOQqeDrE="
},
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/abbrev/download/abbrev-1.1.1.tgz",
"integrity": "sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg=",
"dev": true
},
"accepts": {
"version": "1.3.7",
"resolved": "https://registry.npm.taobao.org/accepts/download/accepts-1.3.7.tgz",
"integrity": "sha1-UxvHJlF6OytB+FACHGzBXqq1B80=",
"requires": {
"mime-types": "~2.1.24",
"negotiator": "0.6.2"
}
},
"ansi-align": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/ansi-align/download/ansi-align-3.0.0.tgz",
"integrity": "sha1-tTazcc9ofKrvI2wY0+If43l0Z8s=",
"dev": true,
"requires": {
"string-width": "^3.0.0"
},
"dependencies": {
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npm.taobao.org/string-width/download/string-width-3.1.0.tgz",
"integrity": "sha1-InZ74htirxCBV0MG9prFG2IgOWE=",
"dev": true,
"requires": {
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
}
}
},
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz?cache=0&sync_timestamp=1570188663907&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-regex%2Fdownload%2Fansi-regex-4.1.0.tgz",
"integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=",
"dev": true
},
"ansi-styles": {
"version": "4.2.1",
"resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.2.1.tgz",
"integrity": "sha1-kK51xCTQCNJiTFvynq0xd+v881k=",
"dev": true,
"requires": {
"@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
"anymatch": {
"version": "3.1.1",
"resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-3.1.1.tgz",
"integrity": "sha1-xV7PAhheJGklk5kxDBc84xIzsUI=",
"dev": true,
"requires": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
}
},
"array-flatten": {
"version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/array-flatten/download/array-flatten-1.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-flatten%2Fdownload%2Farray-flatten-1.1.1.tgz",
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
},
"axios": {
"version": "0.19.2",
"resolved": "https://registry.npm.taobao.org/axios/download/axios-0.19.2.tgz",
"integrity": "sha1-PqNsXYgY0NX4qKl6bTa4bNwAyyc=",
"requires": {
"follow-redirects": "1.5.10"
}
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
"binary-extensions": {
"version": "2.1.0",
"resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-2.1.0.tgz",
"integrity": "sha1-MPpAyef+B9vIlWeM0ocCTeokHdk=",
"dev": true
},
"body-parser": {
"version": "1.19.0",
"resolved": "https://registry.npm.taobao.org/body-parser/download/body-parser-1.19.0.tgz",
"integrity": "sha1-lrJwnlfJxOCab9Zqj9l5hE9p8Io=",
"requires": {
"bytes": "3.1.0",
"content-type": "~1.0.4",
"debug": "2.6.9",
"depd": "~1.1.2",
"http-errors": "1.7.2",
"iconv-lite": "0.4.24",
"on-finished": "~2.3.0",
"qs": "6.7.0",
"raw-body": "2.4.0",
"type-is": "~1.6.17"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz",
"integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=",
"requires": {
"ms": "2.0.0"
}
}
}
},
"boxen": {
"version": "4.2.0",
"resolved": "https://registry.npm.taobao.org/boxen/download/boxen-4.2.0.tgz",
"integrity": "sha1-5BG2I1fW1tNlh8isPV2XTaoHDmQ=",
"dev": true,
"requires": {
"ansi-align": "^3.0.0",
"camelcase": "^5.3.1",
"chalk": "^3.0.0",
"cli-boxes": "^2.2.0",
"string-width": "^4.1.0",
"term-size": "^2.1.0",
"type-fest": "^0.8.1",
"widest-line": "^3.1.0"
}
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz",
"integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npm.taobao.org/braces/download/braces-3.0.2.tgz",
"integrity": "sha1-NFThpGLujVmeI23zNs2epPiv4Qc=",
"requires": {
"fill-range": "^7.0.1"
}
},
"bytes": {
"version": "3.1.0",
"resolved": "https://registry.npm.taobao.org/bytes/download/bytes-3.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbytes%2Fdownload%2Fbytes-3.1.0.tgz",
"integrity": "sha1-9s95M6Ng4FiPqf3oVlHNx/gF0fY="
},
"cacheable-request": {
"version": "6.1.0",
"resolved": "https://registry.npm.taobao.org/cacheable-request/download/cacheable-request-6.1.0.tgz",
"integrity": "sha1-IP+4vRYrpL4R6VZ9gj22UQUsqRI=",
"dev": true,
"requires": {
"clone-response": "^1.0.2",
"get-stream": "^5.1.0",
"http-cache-semantics": "^4.0.0",
"keyv": "^3.0.0",
"lowercase-keys": "^2.0.0",
"normalize-url": "^4.1.0",
"responselike": "^1.0.2"
},
"dependencies": {
"get-stream": {
"version": "5.2.0",
"resolved": "https://registry.npm.taobao.org/get-stream/download/get-stream-5.2.0.tgz?cache=0&sync_timestamp=1597056455691&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fget-stream%2Fdownload%2Fget-stream-5.2.0.tgz",
"integrity": "sha1-SWaheV7lrOZecGxLe+txJX1uItM=",
"dev": true,
"requires": {
"pump": "^3.0.0"
}
},
"lowercase-keys": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/lowercase-keys/download/lowercase-keys-2.0.0.tgz",
"integrity": "sha1-JgPni3tLAAbLyi+8yKMgJVislHk=",
"dev": true
}
}
},
"camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz",
"integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=",
"dev": true
},
"chalk": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/chalk/download/chalk-3.0.0.tgz?cache=0&sync_timestamp=1592843133653&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-3.0.0.tgz",
"integrity": "sha1-P3PCv1JlkfV0zEksUeJFY0n4ROQ=",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"dependencies": {
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz",
"integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=",
"dev": true
},
"supports-color": {
"version": "7.1.0",
"resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.1.0.tgz",
"integrity": "sha1-aOMlkd9z4lrRxLSRCKLsUHliv9E=",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"chokidar": {
"version": "3.4.2",
"resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-3.4.2.tgz?cache=0&sync_timestamp=1596728921978&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-3.4.2.tgz",
"integrity": "sha1-ONyOZY3sOAl0HrPve7Ckf+QkIy0=",
"dev": true,
"requires": {
"anymatch": "~3.1.1",
"braces": "~3.0.2",
"fsevents": "~2.1.2",
"glob-parent": "~5.1.0",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.4.0"
}
},
"ci-info": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/ci-info/download/ci-info-2.0.0.tgz",
"integrity": "sha1-Z6npZL4xpR4V5QENWObxKDQAL0Y=",
"dev": true
},
"cli-boxes": {
"version": "2.2.0",
"resolved": "https://registry.npm.taobao.org/cli-boxes/download/cli-boxes-2.2.0.tgz",
"integrity": "sha1-U47K6PnGylCOPDyVtFP+k8tMFo0=",
"dev": true
},
"clone-response": {
"version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/clone-response/download/clone-response-1.0.2.tgz",
"integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=",
"dev": true,
"requires": {
"mimic-response": "^1.0.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcolor-convert%2Fdownload%2Fcolor-convert-2.0.1.tgz",
"integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz",
"integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=",
"dev": true
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
"configstore": {
"version": "5.0.1",
"resolved": "https://registry.npm.taobao.org/configstore/download/configstore-5.0.1.tgz",
"integrity": "sha1-02UCG130uYzdGH1qOw4/anzF7ZY=",
"dev": true,
"requires": {
"dot-prop": "^5.2.0",
"graceful-fs": "^4.1.2",
"make-dir": "^3.0.0",
"unique-string": "^2.0.0",
"write-file-atomic": "^3.0.0",
"xdg-basedir": "^4.0.0"
}
},
"content-disposition": {
"version": "0.5.3",
"resolved": "https://registry.npm.taobao.org/content-disposition/download/content-disposition-0.5.3.tgz",
"integrity": "sha1-4TDK9+cnkIfFYWwgB9BIVpiYT70=",
"requires": {
"safe-buffer": "5.1.2"
}
},
"content-type": {
"version": "1.0.4",
"resolved": "https://registry.npm.taobao.org/content-type/download/content-type-1.0.4.tgz",
"integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js="
},
"cookie": {
"version": "0.4.0",
"resolved": "https://registry.npm.taobao.org/cookie/download/cookie-0.4.0.tgz?cache=0&sync_timestamp=1587525873712&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcookie%2Fdownload%2Fcookie-0.4.0.tgz",
"integrity": "sha1-vrQ35wIrO21JAZ0IhmUwPr6cFLo="
},
"cookie-parser": {
"version": "1.4.5",
"resolved": "https://registry.npm.taobao.org/cookie-parser/download/cookie-parser-1.4.5.tgz?cache=0&sync_timestamp=1584246006993&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcookie-parser%2Fdownload%2Fcookie-parser-1.4.5.tgz",
"integrity": "sha1-PlctS3wMgPnGHa9gTkM2gxtdHUk=",
"requires": {
"cookie": "0.4.0",
"cookie-signature": "1.0.6"
}
},
"cookie-signature": {
"version": "1.0.6",
"resolved": "https://registry.npm.taobao.org/cookie-signature/download/cookie-signature-1.0.6.tgz",
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
},
"crypto-random-string": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/crypto-random-string/download/crypto-random-string-2.0.0.tgz",
"integrity": "sha1-7yp6lm7BEIM4g2m6oC6+rSKbMNU=",
"dev": true
},
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz",
"integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=",
"requires": {
"ms": "2.0.0"
}
},
"decompress-response": {
"version": "3.3.0",
"resolved": "https://registry.npm.taobao.org/decompress-response/download/decompress-response-3.3.0.tgz",
"integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=",
"dev": true,
"requires": {
"mimic-response": "^1.0.0"
}
},
"deep-extend": {
"version": "0.6.0",
"resolved": "https://registry.npm.taobao.org/deep-extend/download/deep-extend-0.6.0.tgz",
"integrity": "sha1-xPp8lUBKF6nD6Mp+FTcxK3NjMKw=",
"dev": true
},
"defer-to-connect": {
"version": "1.1.3",
"resolved": "https://registry.npm.taobao.org/defer-to-connect/download/defer-to-connect-1.1.3.tgz",
"integrity": "sha1-MxrgUMCNz3ifjIOnuB8O2U9KxZE=",
"dev": true
},
"depd": {
"version": "1.1.2",
"resolved": "https://registry.npm.taobao.org/depd/download/depd-1.1.2.tgz",
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
},
"destroy": {
"version": "1.0.4",
"resolved": "https://registry.npm.taobao.org/destroy/download/destroy-1.0.4.tgz",
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
},
"dot-prop": {
"version": "5.2.0",
"resolved": "https://registry.npm.taobao.org/dot-prop/download/dot-prop-5.2.0.tgz?cache=0&sync_timestamp=1597574926376&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdot-prop%2Fdownload%2Fdot-prop-5.2.0.tgz",
"integrity": "sha1-w07MKVVtxF8fTCJpe29JBODMT8s=",
"dev": true,
"requires": {
"is-obj": "^2.0.0"
}
},
"duplexer3": {
"version": "0.1.4",
"resolved": "https://registry.npm.taobao.org/duplexer3/download/duplexer3-0.1.4.tgz",
"integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=",
"dev": true
},
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
},
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npm.taobao.org/emoji-regex/download/emoji-regex-7.0.3.tgz",
"integrity": "sha1-kzoEBShgyF6DwSJHnEdIqOTHIVY=",
"dev": true
},
"encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/encodeurl/download/encodeurl-1.0.2.tgz",
"integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
},
"end-of-stream": {
"version": "1.4.4",
"resolved": "https://registry.npm.taobao.org/end-of-stream/download/end-of-stream-1.4.4.tgz",
"integrity": "sha1-WuZKX0UFe682JuwU2gyl5LJDHrA=",
"dev": true,
"requires": {
"once": "^1.4.0"
}
},
"escape-goat": {
"version": "2.1.1",
"resolved": "https://registry.npm.taobao.org/escape-goat/download/escape-goat-2.1.1.tgz",
"integrity": "sha1-Gy3HcANnbEV+x2Cy3GjttkgYhnU=",
"dev": true
},
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz",
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
"etag": {
"version": "1.8.1",
"resolved": "https://registry.npm.taobao.org/etag/download/etag-1.8.1.tgz",
"integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
},
"eventemitter3": {
"version": "4.0.4",
"resolved": "https://registry.npm.taobao.org/eventemitter3/download/eventemitter3-4.0.4.tgz?cache=0&sync_timestamp=1589283105849&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feventemitter3%2Fdownload%2Feventemitter3-4.0.4.tgz",
"integrity": "sha1-tUY6zmNaCD0Bi9x8kXtMXxCoU4Q="
},
"express": {
"version": "4.17.1",
"resolved": "https://registry.npm.taobao.org/express/download/express-4.17.1.tgz?cache=0&sync_timestamp=1585184310145&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexpress%2Fdownload%2Fexpress-4.17.1.tgz",
"integrity": "sha1-RJH8OGBc9R+GKdOcK10Cb5ikwTQ=",
"requires": {
"accepts": "~1.3.7",
"array-flatten": "1.1.1",
"body-parser": "1.19.0",
"content-disposition": "0.5.3",
"content-type": "~1.0.4",
"cookie": "0.4.0",
"cookie-signature": "1.0.6",
"debug": "2.6.9",
"depd": "~1.1.2",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"finalhandler": "~1.1.2",
"fresh": "0.5.2",
"merge-descriptors": "1.0.1",
"methods": "~1.1.2",
"on-finished": "~2.3.0",
"parseurl": "~1.3.3",
"path-to-regexp": "0.1.7",
"proxy-addr": "~2.0.5",
"qs": "6.7.0",
"range-parser": "~1.2.1",
"safe-buffer": "5.1.2",
"send": "0.17.1",
"serve-static": "1.14.1",
"setprototypeof": "1.1.1",
"statuses": "~1.5.0",
"type-is": "~1.6.18",
"utils-merge": "1.0.1",
"vary": "~1.1.2"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz",
"integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=",
"requires": {
"ms": "2.0.0"
}
}
}
},
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npm.taobao.org/fill-range/download/fill-range-7.0.1.tgz",
"integrity": "sha1-GRmmp8df44ssfHflGYU12prN2kA=",
"requires": {
"to-regex-range": "^5.0.1"
}
},
"finalhandler": {
"version": "1.1.2",
"resolved": "https://registry.npm.taobao.org/finalhandler/download/finalhandler-1.1.2.tgz",
"integrity": "sha1-t+fQAP/RGTjQ/bBTUG9uur6fWH0=",
"requires": {
"debug": "2.6.9",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"on-finished": "~2.3.0",
"parseurl": "~1.3.3",
"statuses": "~1.5.0",
"unpipe": "~1.0.0"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz",
"integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=",
"requires": {
"ms": "2.0.0"
}
}
}
},
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.5.10.tgz?cache=0&sync_timestamp=1597057976909&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.5.10.tgz",
"integrity": "sha1-e3qfmuov3/NnhqlP9kPtB/T/Xio=",
"requires": {
"debug": "=3.1.0"
}
},
"forwarded": {
"version": "0.1.2",
"resolved": "https://registry.npm.taobao.org/forwarded/download/forwarded-0.1.2.tgz",
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
},
"fresh": {
"version": "0.5.2",
"resolved": "https://registry.npm.taobao.org/fresh/download/fresh-0.5.2.tgz",
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
"fsevents": {
"version": "2.1.3",
"resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-2.1.3.tgz",
"integrity": "sha1-+3OHA66NL5/pAMM4Nt3r7ouX8j4=",
"dev": true,
"optional": true
},
"get-stream": {
"version": "4.1.0",
"resolved": "https://registry.npm.taobao.org/get-stream/download/get-stream-4.1.0.tgz?cache=0&sync_timestamp=1597056455691&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fget-stream%2Fdownload%2Fget-stream-4.1.0.tgz",
"integrity": "sha1-wbJVV189wh1Zv8ec09K0axw6VLU=",
"dev": true,
"requires": {
"pump": "^3.0.0"
}
},
"glob-parent": {
"version": "5.1.1",
"resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-5.1.1.tgz?cache=0&sync_timestamp=1584836110944&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglob-parent%2Fdownload%2Fglob-parent-5.1.1.tgz",
"integrity": "sha1-tsHvQXxOVmPqSY8cRa+saRa7wik=",
"dev": true,
"requires": {
"is-glob": "^4.0.1"
}
},
"global-dirs": {
"version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/global-dirs/download/global-dirs-2.0.1.tgz?cache=0&sync_timestamp=1573231918216&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobal-dirs%2Fdownload%2Fglobal-dirs-2.0.1.tgz",
"integrity": "sha1-rN87tmhbzVXLNeigUiZlaelGkgE=",
"dev": true,
"requires": {
"ini": "^1.3.5"
}
},
"got": {
"version": "9.6.0",
"resolved": "https://registry.npm.taobao.org/got/download/got-9.6.0.tgz?cache=0&sync_timestamp=1596795791808&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fgot%2Fdownload%2Fgot-9.6.0.tgz",
"integrity": "sha1-7fRefWf5lUVwXeH3u+7rEhdl7YU=",
"dev": true,
"requires": {
"@sindresorhus/is": "^0.14.0",
"@szmarczak/http-timer": "^1.1.2",
"cacheable-request": "^6.0.0",
"decompress-response": "^3.3.0",
"duplexer3": "^0.1.4",
"get-stream": "^4.1.0",
"lowercase-keys": "^1.0.1",
"mimic-response": "^1.0.1",
"p-cancelable": "^1.0.0",
"to-readable-stream": "^1.0.0",
"url-parse-lax": "^3.0.0"
}
},
"graceful-fs": {
"version": "4.2.4",
"resolved": "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.4.tgz",
"integrity": "sha1-Ila94U02MpWMRl68ltxGfKB6Kfs=",
"dev": true
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"has-yarn": {
"version": "2.1.0",
"resolved": "https://registry.npm.taobao.org/has-yarn/download/has-yarn-2.1.0.tgz",
"integrity": "sha1-E34RNUp7W/EapctknPDG8/8rLnc=",
"dev": true
},
"http-cache-semantics": {
"version": "4.1.0",
"resolved": "https://registry.npm.taobao.org/http-cache-semantics/download/http-cache-semantics-4.1.0.tgz",
"integrity": "sha1-SekcXL82yblLz81xwj1SSex045A=",
"dev": true
},
"http-errors": {
"version": "1.7.2",
"resolved": "https://registry.npm.taobao.org/http-errors/download/http-errors-1.7.2.tgz?cache=0&sync_timestamp=1593407676273&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-errors%2Fdownload%2Fhttp-errors-1.7.2.tgz",
"integrity": "sha1-T1ApzxMjnzEDblsuVSkrz7zIXI8=",
"requires": {
"depd": "~1.1.2",
"inherits": "2.0.3",
"setprototypeof": "1.1.1",
"statuses": ">= 1.5.0 < 2",
"toidentifier": "1.0.0"
}
},
"http-proxy": {
"version": "1.18.1",
"resolved": "https://registry.npm.taobao.org/http-proxy/download/http-proxy-1.18.1.tgz?cache=0&sync_timestamp=1589778321455&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-proxy%2Fdownload%2Fhttp-proxy-1.18.1.tgz",
"integrity": "sha1-QBVB8FNIhLv5UmAzTnL4juOXZUk=",
"requires": {
"eventemitter3": "^4.0.0",
"follow-redirects": "^1.0.0",
"requires-port": "^1.0.0"
}
},
"http-proxy-middleware": {
"version": "1.0.5",
"resolved": "https://registry.npm.taobao.org/http-proxy-middleware/download/http-proxy-middleware-1.0.5.tgz",
"integrity": "sha1-TG4l2VpBHj11C8ecz2YpBnUXbcI=",
"requires": {
"@types/http-proxy": "^1.17.4",
"http-proxy": "^1.18.1",
"is-glob": "^4.0.1",
"lodash": "^4.17.19",
"micromatch": "^4.0.2"
}
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.24.tgz",
"integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"ignore-by-default": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/ignore-by-default/download/ignore-by-default-1.0.1.tgz?cache=0&sync_timestamp=1592055969434&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore-by-default%2Fdownload%2Fignore-by-default-1.0.1.tgz",
"integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=",
"dev": true
},
"import-lazy": {
"version": "2.1.0",
"resolved": "https://registry.npm.taobao.org/import-lazy/download/import-lazy-2.1.0.tgz",
"integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=",
"dev": true
},
"imurmurhash": {
"version": "0.1.4",
"resolved": "https://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz",
"integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
"dev": true
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"ini": {
"version": "1.3.5",
"resolved": "https://registry.npm.taobao.org/ini/download/ini-1.3.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fini%2Fdownload%2Fini-1.3.5.tgz",
"integrity": "sha1-7uJfVtscnsYIXgwid4CD9Zar+Sc=",
"dev": true
},
"ipaddr.js": {
"version": "1.9.1",
"resolved": "https://registry.npm.taobao.org/ipaddr.js/download/ipaddr.js-1.9.1.tgz",
"integrity": "sha1-v/OFQ+64mEglB5/zoqjmy9RngbM="
},
"is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-2.1.0.tgz",
"integrity": "sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=",
"dev": true,
"requires": {
"binary-extensions": "^2.0.0"
}
},
"is-ci": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/is-ci/download/is-ci-2.0.0.tgz",
"integrity": "sha1-a8YzQYGBDgS1wis9WJ/cpVAmQEw=",
"dev": true,
"requires": {
"ci-info": "^2.0.0"
}
},
"is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz",
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true
},
"is-glob": {
"version": "4.0.1",
"resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-4.0.1.tgz",
"integrity": "sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw=",
"requires": {
"is-extglob": "^2.1.1"
}
},
"is-installed-globally": {
"version": "0.3.2",
"resolved": "https://registry.npm.taobao.org/is-installed-globally/download/is-installed-globally-0.3.2.tgz?cache=0&sync_timestamp=1586162509580&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-installed-globally%2Fdownload%2Fis-installed-globally-0.3.2.tgz",
"integrity": "sha1-/T76ee5nDRGHIzGC1bCh3QAxMUE=",
"dev": true,
"requires": {
"global-dirs": "^2.0.1",
"is-path-inside": "^3.0.1"
}
},
"is-npm": {
"version": "4.0.0",
"resolved": "https://registry.npm.taobao.org/is-npm/download/is-npm-4.0.0.tgz",
"integrity": "sha1-yQ3YOAaW34enptgjwg0LErvjyE0=",
"dev": true
},
"is-number": {
"version": "7.0.0",
"resolved": "https://registry.npm.taobao.org/is-number/download/is-number-7.0.0.tgz",
"integrity": "sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss="
},
"is-obj": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/is-obj/download/is-obj-2.0.0.tgz",
"integrity": "sha1-Rz+wXZc3BeP9liBUUBjKjiLvSYI=",
"dev": true
},
"is-path-inside": {
"version": "3.0.2",
"resolved": "https://registry.npm.taobao.org/is-path-inside/download/is-path-inside-3.0.2.tgz",
"integrity": "sha1-9SIPyCo+IzdXKR3dycWHfyofMBc=",
"dev": true
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
"dev": true
},
"is-yarn-global": {
"version": "0.3.0",
"resolved": "https://registry.npm.taobao.org/is-yarn-global/download/is-yarn-global-0.3.0.tgz",
"integrity": "sha1-1QLTOCWQ6jAEiTdGdUyJE5lz4jI=",
"dev": true
},
"json-buffer": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/json-buffer/download/json-buffer-3.0.0.tgz",
"integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=",
"dev": true
},
"keyv": {
"version": "3.1.0",
"resolved": "https://registry.npm.taobao.org/keyv/download/keyv-3.1.0.tgz",
"integrity": "sha1-7MIoSG9pmR5J6UdkhaW+Ho/FxNk=",
"dev": true,
"requires": {
"json-buffer": "3.0.0"
}
},
"latest-version": {
"version": "5.1.0",
"resolved": "https://registry.npm.taobao.org/latest-version/download/latest-version-5.1.0.tgz",
"integrity": "sha1-EZ3+kI/jjRXfpD7NE/oS7Igy+s4=",
"dev": true,
"requires": {
"package-json": "^6.3.0"
}
},
"lodash": {
"version": "4.17.20",
"resolved": "https://registry.npm.taobao.org/lodash/download/lodash-4.17.20.tgz?cache=0&sync_timestamp=1597336053864&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flodash%2Fdownload%2Flodash-4.17.20.tgz",
"integrity": "sha1-tEqbYpe8tpjxxRo1RaKzs2jVnFI="
},
"lowercase-keys": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/lowercase-keys/download/lowercase-keys-1.0.1.tgz",
"integrity": "sha1-b54wtHCE2XGnyCD/FabFFnt0wm8=",
"dev": true
},
"make-dir": {
"version": "3.1.0",
"resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-3.1.0.tgz",
"integrity": "sha1-QV6WcEazp/HRhSd9hKpYIDcmoT8=",
"dev": true,
"requires": {
"semver": "^6.0.0"
},
"dependencies": {
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1586886267748&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz",
"integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=",
"dev": true
}
}
},
"media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
},
"merge-descriptors": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/merge-descriptors/download/merge-descriptors-1.0.1.tgz",
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
},
"methods": {
"version": "1.1.2",
"resolved": "https://registry.npm.taobao.org/methods/download/methods-1.1.2.tgz",
"integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
},
"micromatch": {
"version": "4.0.2",
"resolved": "https://registry.npm.taobao.org/micromatch/download/micromatch-4.0.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmicromatch%2Fdownload%2Fmicromatch-4.0.2.tgz",
"integrity": "sha1-T8sJmb+fvC/L3SEvbWKbmlbDklk=",
"requires": {
"braces": "^3.0.1",
"picomatch": "^2.0.5"
}
},
"mime": {
"version": "1.6.0",
"resolved": "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz",
"integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE="
},
"mime-db": {
"version": "1.44.0",
"resolved": "https://registry.npm.taobao.org/mime-db/download/mime-db-1.44.0.tgz",
"integrity": "sha1-+hHF6wrKEzS0Izy01S8QxaYnL5I="
},
"mime-types": {
"version": "2.1.27",
"resolved": "https://registry.npm.taobao.org/mime-types/download/mime-types-2.1.27.tgz",
"integrity": "sha1-R5SfmOJ56lMRn1ci4PNOUpvsAJ8=",
"requires": {
"mime-db": "1.44.0"
}
},
"mimic-response": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/mimic-response/download/mimic-response-1.0.1.tgz",
"integrity": "sha1-SSNTiHju9CBjy4o+OweYeBSHqxs=",
"dev": true
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminimatch%2Fdownload%2Fminimatch-3.0.4.tgz",
"integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz",
"integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=",
"dev": true
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"negotiator": {
"version": "0.6.2",
"resolved": "https://registry.npm.taobao.org/negotiator/download/negotiator-0.6.2.tgz",
"integrity": "sha1-/qz3zPUlp3rpY0Q2pkiD/+yjRvs="
},
"nodemon": {
"version": "2.0.4",
"resolved": "https://registry.npm.taobao.org/nodemon/download/nodemon-2.0.4.tgz?cache=0&sync_timestamp=1589456003432&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnodemon%2Fdownload%2Fnodemon-2.0.4.tgz",
"integrity": "sha1-VbCTGetIjWOUqpgYFIwMLRwExBY=",
"dev": true,
"requires": {
"chokidar": "^3.2.2",
"debug": "^3.2.6",
"ignore-by-default": "^1.0.1",
"minimatch": "^3.0.4",
"pstree.remy": "^1.1.7",
"semver": "^5.7.1",
"supports-color": "^5.5.0",
"touch": "^3.1.0",
"undefsafe": "^2.0.2",
"update-notifier": "^4.0.0"
},
"dependencies": {
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz",
"integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=",
"dev": true,
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.1.2.tgz",
"integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=",
"dev": true
}
}
},
"nopt": {
"version": "1.0.10",
"resolved": "https://registry.npm.taobao.org/nopt/download/nopt-1.0.10.tgz?cache=0&sync_timestamp=1597649908392&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnopt%2Fdownload%2Fnopt-1.0.10.tgz",
"integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",
"dev": true,
"requires": {
"abbrev": "1"
}
},
"normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-3.0.0.tgz",
"integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=",
"dev": true
},
"normalize-url": {
"version": "4.5.0",
"resolved": "https://registry.npm.taobao.org/normalize-url/download/normalize-url-4.5.0.tgz?cache=0&sync_timestamp=1596373093290&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnormalize-url%2Fdownload%2Fnormalize-url-4.5.0.tgz",
"integrity": "sha1-RTNUCH5sqWlXvY9br3U/WYIUISk=",
"dev": true
},
"on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz",
"integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
"requires": {
"ee-first": "1.1.1"
}
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npm.taobao.org/once/download/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"requires": {
"wrappy": "1"
}
},
"p-cancelable": {
"version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/p-cancelable/download/p-cancelable-1.1.0.tgz",
"integrity": "sha1-0HjRWjr0CSIMiG8dmgyi5EGrJsw=",
"dev": true
},
"package-json": {
"version": "6.5.0",
"resolved": "https://registry.npm.taobao.org/package-json/download/package-json-6.5.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpackage-json%2Fdownload%2Fpackage-json-6.5.0.tgz",
"integrity": "sha1-b+7ayjXnVyWHbQsOZJdGl/7RRbA=",
"dev": true,
"requires": {
"got": "^9.6.0",
"registry-auth-token": "^4.0.0",
"registry-url": "^5.0.0",
"semver": "^6.2.0"
},
"dependencies": {
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1586886267748&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz",
"integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=",
"dev": true
}
}
},
"parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npm.taobao.org/parseurl/download/parseurl-1.3.3.tgz",
"integrity": "sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ="
},
"path-to-regexp": {
"version": "0.1.7",
"resolved": "https://registry.npm.taobao.org/path-to-regexp/download/path-to-regexp-0.1.7.tgz?cache=0&sync_timestamp=1574278831909&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-to-regexp%2Fdownload%2Fpath-to-regexp-0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
"picomatch": {
"version": "2.2.2",
"resolved": "https://registry.npm.taobao.org/picomatch/download/picomatch-2.2.2.tgz",
"integrity": "sha1-IfMz6ba46v8CRo9RRupAbTRfTa0="
},
"prepend-http": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/prepend-http/download/prepend-http-2.0.0.tgz",
"integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=",
"dev": true
},
"proxy-addr": {
"version": "2.0.6",
"resolved": "https://registry.npm.taobao.org/proxy-addr/download/proxy-addr-2.0.6.tgz?cache=0&sync_timestamp=1582556112011&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fproxy-addr%2Fdownload%2Fproxy-addr-2.0.6.tgz",
"integrity": "sha1-/cIzZQVEfT8vLGOO0nLK9hS7sr8=",
"requires": {
"forwarded": "~0.1.2",
"ipaddr.js": "1.9.1"
}
},
"pstree.remy": {
"version": "1.1.8",
"resolved": "https://registry.npm.taobao.org/pstree.remy/download/pstree.remy-1.1.8.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpstree.remy%2Fdownload%2Fpstree.remy-1.1.8.tgz",
"integrity": "sha1-wkIiT0pnwh9oaDm720rCgrg3PTo=",
"dev": true
},
"pump": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/pump/download/pump-3.0.0.tgz",
"integrity": "sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ=",
"dev": true,
"requires": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
}
},
"pupa": {
"version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/pupa/download/pupa-2.0.1.tgz",
"integrity": "sha1-29yf9I/76komoGm2+fersFEAhyY=",
"dev": true,
"requires": {
"escape-goat": "^2.0.0"
}
},
"qs": {
"version": "6.7.0",
"resolved": "https://registry.npm.taobao.org/qs/download/qs-6.7.0.tgz",
"integrity": "sha1-QdwaAV49WB8WIXdr4xr7KHapsbw="
},
"range-parser": {
"version": "1.2.1",
"resolved": "https://registry.npm.taobao.org/range-parser/download/range-parser-1.2.1.tgz",
"integrity": "sha1-PPNwI9GZ4cJNGlW4SADC8+ZGgDE="
},
"raw-body": {
"version": "2.4.0",
"resolved": "https://registry.npm.taobao.org/raw-body/download/raw-body-2.4.0.tgz",
"integrity": "sha1-oc5vucm8NWylLoklarWQWeE9AzI=",
"requires": {
"bytes": "3.1.0",
"http-errors": "1.7.2",
"iconv-lite": "0.4.24",
"unpipe": "1.0.0"
}
},
"rc": {
"version": "1.2.8",
"resolved": "https://registry.npm.taobao.org/rc/download/rc-1.2.8.tgz",
"integrity": "sha1-zZJL9SAKB1uDwYjNa54hG3/A0+0=",
"dev": true,
"requires": {
"deep-extend": "^0.6.0",
"ini": "~1.3.0",
"minimist": "^1.2.0",
"strip-json-comments": "~2.0.1"
}
},
"readdirp": {
"version": "3.4.0",
"resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-3.4.0.tgz",
"integrity": "sha1-n9zN+ekVWAVEkiGsZF6DA6tbmto=",
"dev": true,
"requires": {
"picomatch": "^2.2.1"
}
},
"registry-auth-token": {
"version": "4.2.0",
"resolved": "https://registry.npm.taobao.org/registry-auth-token/download/registry-auth-token-4.2.0.tgz?cache=0&sync_timestamp=1594638395069&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregistry-auth-token%2Fdownload%2Fregistry-auth-token-4.2.0.tgz",
"integrity": "sha1-HTff/acrvs0PWB5HFVQCE6Zet9o=",
"dev": true,
"requires": {
"rc": "^1.2.8"
}
},
"registry-url": {
"version": "5.1.0",
"resolved": "https://registry.npm.taobao.org/registry-url/download/registry-url-5.1.0.tgz",
"integrity": "sha1-6YM0tQ1UNLgRNrROxjjZwgCcUAk=",
"dev": true,
"requires": {
"rc": "^1.2.8"
}
},
"requires-port": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/requires-port/download/requires-port-1.0.0.tgz",
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
},
"responselike": {
"version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/responselike/download/responselike-1.0.2.tgz",
"integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=",
"dev": true,
"requires": {
"lowercase-keys": "^1.0.0"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz",
"integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0="
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsafer-buffer%2Fdownload%2Fsafer-buffer-2.1.2.tgz",
"integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo="
},
"semver": {
"version": "5.7.1",
"resolved": "https://registry.npm.taobao.org/semver/download/semver-5.7.1.tgz?cache=0&sync_timestamp=1586886267748&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-5.7.1.tgz",
"integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=",
"dev": true
},
"semver-diff": {
"version": "3.1.1",
"resolved": "https://registry.npm.taobao.org/semver-diff/download/semver-diff-3.1.1.tgz",
"integrity": "sha1-Bfd85Z8yXgDicGr9Z7tQbdscoys=",
"dev": true,
"requires": {
"semver": "^6.3.0"
},
"dependencies": {
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1586886267748&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz",
"integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=",
"dev": true
}
}
},
"send": {
"version": "0.17.1",
"resolved": "https://registry.npm.taobao.org/send/download/send-0.17.1.tgz",
"integrity": "sha1-wdiwWfeQD3Rm3Uk4vcROEd2zdsg=",
"requires": {
"debug": "2.6.9",
"depd": "~1.1.2",
"destroy": "~1.0.4",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"fresh": "0.5.2",
"http-errors": "~1.7.2",
"mime": "1.6.0",
"ms": "2.1.1",
"on-finished": "~2.3.0",
"range-parser": "~1.2.1",
"statuses": "~1.5.0"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz",
"integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=",
"requires": {
"ms": "2.0.0"
},
"dependencies": {
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.1.1.tgz",
"integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo="
}
}
},
"serve-static": {
"version": "1.14.1",
"resolved": "https://registry.npm.taobao.org/serve-static/download/serve-static-1.14.1.tgz",
"integrity": "sha1-Zm5jbcTwEPfvKZcKiKZ0MgiYsvk=",
"requires": {
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"parseurl": "~1.3.3",
"send": "0.17.1"
}
},
"setprototypeof": {
"version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.1.tgz",
"integrity": "sha1-fpWsskqpL1iF4KvvW6ExMw1K5oM="
},
"signal-exit": {
"version": "3.0.3",
"resolved": "https://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.3.tgz?cache=0&sync_timestamp=1592843131591&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsignal-exit%2Fdownload%2Fsignal-exit-3.0.3.tgz",
"integrity": "sha1-oUEMLt2PB3sItOJTyOrPyvBXRhw=",
"dev": true
},
"statuses": {
"version": "1.5.0",
"resolved": "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz?cache=0&sync_timestamp=1587327902535&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstatuses%2Fdownload%2Fstatuses-1.5.0.tgz",
"integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
},
"string-width": {
"version": "4.2.0",
"resolved": "https://registry.npm.taobao.org/string-width/download/string-width-4.2.0.tgz",
"integrity": "sha1-lSGCxGzHssMT0VluYjmSvRY7crU=",
"dev": true,
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.0"
},
"dependencies": {
"ansi-regex": {
"version": "5.0.0",
"resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-5.0.0.tgz?cache=0&sync_timestamp=1570188663907&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-regex%2Fdownload%2Fansi-regex-5.0.0.tgz",
"integrity": "sha1-OIU59VF5vzkznIGvMKZU1p+Hy3U=",
"dev": true
},
"emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npm.taobao.org/emoji-regex/download/emoji-regex-8.0.0.tgz",
"integrity": "sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc=",
"dev": true
},
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0=",
"dev": true
},
"strip-ansi": {
"version": "6.0.0",
"resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-6.0.0.tgz",
"integrity": "sha1-CxVx3XZpzNTz4G4U7x7tJiJa5TI=",
"dev": true,
"requires": {
"ansi-regex": "^5.0.0"
}
}
}
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz",
"integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=",
"dev": true,
"requires": {
"ansi-regex": "^4.1.0"
}
},
"strip-json-comments": {
"version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/strip-json-comments/download/strip-json-comments-2.0.1.tgz?cache=0&sync_timestamp=1594567543744&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-json-comments%2Fdownload%2Fstrip-json-comments-2.0.1.tgz",
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
"dev": true
},
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz",
"integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
},
"term-size": {
"version": "2.2.0",
"resolved": "https://registry.npm.taobao.org/term-size/download/term-size-2.2.0.tgz",
"integrity": "sha1-Hxat7f6b3BiADhd2ghc0CG/MZ1M=",
"dev": true
},
"to-readable-stream": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/to-readable-stream/download/to-readable-stream-1.0.0.tgz",
"integrity": "sha1-zgqgwvPfat+FLvtASng+d8BHV3E=",
"dev": true
},
"to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npm.taobao.org/to-regex-range/download/to-regex-range-5.0.1.tgz",
"integrity": "sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=",
"requires": {
"is-number": "^7.0.0"
}
},
"toidentifier": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/toidentifier/download/toidentifier-1.0.0.tgz",
"integrity": "sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM="
},
"touch": {
"version": "3.1.0",
"resolved": "https://registry.npm.taobao.org/touch/download/touch-3.1.0.tgz",
"integrity": "sha1-/jZfX3XsntTlaCXgu3bSSrdK+Ds=",
"dev": true,
"requires": {
"nopt": "~1.0.10"
}
},
"type-fest": {
"version": "0.8.1",
"resolved": "https://registry.npm.taobao.org/type-fest/download/type-fest-0.8.1.tgz?cache=0&sync_timestamp=1593293797610&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftype-fest%2Fdownload%2Ftype-fest-0.8.1.tgz",
"integrity": "sha1-CeJJ696FHTseSNJ8EFREZn8XuD0=",
"dev": true
},
"type-is": {
"version": "1.6.18",
"resolved": "https://registry.npm.taobao.org/type-is/download/type-is-1.6.18.tgz",
"integrity": "sha1-TlUs0F3wlGfcvE73Od6J8s83wTE=",
"requires": {
"media-typer": "0.3.0",
"mime-types": "~2.1.24"
}
},
"typedarray-to-buffer": {
"version": "3.1.5",
"resolved": "https://registry.npm.taobao.org/typedarray-to-buffer/download/typedarray-to-buffer-3.1.5.tgz",
"integrity": "sha1-qX7nqf9CaRufeD/xvFES/j/KkIA=",
"dev": true,
"requires": {
"is-typedarray": "^1.0.0"
}
},
"undefsafe": {
"version": "2.0.3",
"resolved": "https://registry.npm.taobao.org/undefsafe/download/undefsafe-2.0.3.tgz",
"integrity": "sha1-axZucJStRjE7IgLafsws18xueq4=",
"dev": true,
"requires": {
"debug": "^2.2.0"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz",
"integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=",
"dev": true,
"requires": {
"ms": "2.0.0"
}
}
}
},
"unique-string": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/unique-string/download/unique-string-2.0.0.tgz",
"integrity": "sha1-OcZFH4GvsnSd4rIz4/fF6IQ72J0=",
"dev": true,
"requires": {
"crypto-random-string": "^2.0.0"
}
},
"unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz",
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
},
"update-notifier": {
"version": "4.1.1",
"resolved": "https://registry.npm.taobao.org/update-notifier/download/update-notifier-4.1.1.tgz?cache=0&sync_timestamp=1597574328608&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fupdate-notifier%2Fdownload%2Fupdate-notifier-4.1.1.tgz",
"integrity": "sha1-iV/IViu+ZmF5UA+fLOusTyYyN0Y=",
"dev": true,
"requires": {
"boxen": "^4.2.0",
"chalk": "^3.0.0",
"configstore": "^5.0.1",
"has-yarn": "^2.1.0",
"import-lazy": "^2.1.0",
"is-ci": "^2.0.0",
"is-installed-globally": "^0.3.1",
"is-npm": "^4.0.0",
"is-yarn-global": "^0.3.0",
"latest-version": "^5.0.0",
"pupa": "^2.0.1",
"semver-diff": "^3.1.1",
"xdg-basedir": "^4.0.0"
}
},
"url-parse-lax": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/url-parse-lax/download/url-parse-lax-3.0.0.tgz",
"integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=",
"dev": true,
"requires": {
"prepend-http": "^2.0.0"
}
},
"utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/utils-merge/download/utils-merge-1.0.1.tgz",
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
},
"vary": {
"version": "1.1.2",
"resolved": "https://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz",
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
},
"widest-line": {
"version": "3.1.0",
"resolved": "https://registry.npm.taobao.org/widest-line/download/widest-line-3.1.0.tgz",
"integrity": "sha1-gpIzO79my0X/DeFgOxNreuFJbso=",
"dev": true,
"requires": {
"string-width": "^4.0.0"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
},
"write-file-atomic": {
"version": "3.0.3",
"resolved": "https://registry.npm.taobao.org/write-file-atomic/download/write-file-atomic-3.0.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwrite-file-atomic%2Fdownload%2Fwrite-file-atomic-3.0.3.tgz",
"integrity": "sha1-Vr1cWlxwSBzRnFcb05q5ZaXeVug=",
"dev": true,
"requires": {
"imurmurhash": "^0.1.4",
"is-typedarray": "^1.0.0",
"signal-exit": "^3.0.2",
"typedarray-to-buffer": "^3.1.5"
}
},
"xdg-basedir": {
"version": "4.0.0",
"resolved": "https://registry.npm.taobao.org/xdg-basedir/download/xdg-basedir-4.0.0.tgz",
"integrity": "sha1-S8jZmEQDaWIl74OhVzy7y0552xM=",
"dev": true
}
}
}
{
"name": "mockserver",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "nodemon --watch sdk --watch ../ --watch server.js server.js mock"
},
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^0.19.2",
"body-parser": "^1.19.0",
"cookie-parser": "^1.4.5",
"express": "^4.17.1",
"http-proxy-middleware": "^1.0.5"
},
"port": 5555,
"serverProxy": {
"target": "http://tornado.duibadev.com.cn"
},
"devDependencies": {
"nodemon": "^2.0.4"
}
}
/** @format */
const { CURD_REQUEST } = require('./request')
class BaseDao {
constructor(context, dbName) {
this.db = context.db
this.TABLE = dbName
}
/**
* 查询一条数据
* @param query
* @param options
*/
async findOne(query, options) {
let result = await CURD_REQUEST({
db: this.db,
TABLE: this.TABLE,
type: `find`,
query: query || {},
options: options || {}
})
return result[0]
}
/**
* 查询多条数据
* @param query
* @param options
*/
async find(query, options) {
console.log(`db`, this.db)
let result = await CURD_REQUEST({
db: this.db,
TABLE: this.TABLE,
type: `find`,
query: query || {},
options: options || {}
})
return result
}
/**
* 插入单条数据
* @param document
*/
async insertOne(document) {
console.log(`insertOne`, document)
let result = await CURD_REQUEST({ db: this.db, TABLE: this.TABLE, type: `insert`, document: document || {} })
return result
}
/**
* 插入多条数据
* @param documents 插入对象
*/
async insertMany(documents) {
let result = await CURD_REQUEST({ db: this.db, TABLE: this.TABLE, type: `insert`, document: documents || [{}] })
return result
}
/**
* 更新数据
* @param query
* @param options
*/
async update(query, options) {
let result = await CURD_REQUEST({
db: this.db,
TABLE: this.TABLE,
type: `update`,
query: query || {},
options: options || {}
})
let res = result.nModified > 0 ? 1 : 0
console.log(`update结果`, res)
return res
}
/**
* 删除多条数据
* @param query
* @param options
*/
async delete(query, options) {
let result = await CURD_REQUEST({
db: this.db,
TABLE: this.TABLE,
type: `delete`,
query: query || {},
options: options || {}
})
return result
}
/**
* 获取条目数
* @param query
* @param options
*/
async count(query, options) {
let result = await CURD_REQUEST({
db: this.db,
TABLE: this.TABLE,
type: `count`,
query: query || {},
options: options || {}
})
return result
}
}
module.exports = BaseDao
/** @format */
const { TBAPI_REQUEST } = require('./request')
let TBAPIS = {}
const APIS = [
`getItemListByItemIds`,
`getPrizeByEname`,
`getShopVipUrl`,
`queryVipinfo`,
`benefitSend`,
`queryCredits`,
`changeCredits`,
`getShopInfo`,
`getBuyerOrderList`
]
APIS.forEach(v => {
TBAPIS[v] = async query => {
let result = await TBAPI_REQUEST(process.db, v, query)
console.log(`TBAPIS.${v}----参数`, process.db, v, query)
console.log(`result`, result)
return result.tbvalue
}
})
module.exports = TBAPIS
/** @format */
const dateFormatter = (thisDate, fmt = 'yyyy-MM-dd hh:mm:ss') => {
thisDate = new Date(thisDate)
console.log(`thisDate`, thisDate)
const o = {
'M+': thisDate.getMonth() + 1,
'd+': thisDate.getDate(),
'h+': thisDate.getHours(),
'm+': thisDate.getMinutes(),
's+': thisDate.getSeconds(),
'q+': Math.floor((thisDate.getMonth() + 3) / 3),
S: thisDate.getMilliseconds()
}
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (thisDate.getFullYear() + '').substr(4 - RegExp.$1.length))
for (const k in o) {
if (new RegExp('(' + k + ')').test(fmt)) {
fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length))
}
}
return fmt
}
module.exports = dateFormatter
/** @format */
const BaseDao = require('./BaseDao')
const TBAPIS = require('./TBAPIS')
const transformBeijingDate = require('./transformBeijingDate')
const dateFormatter = require('./dateFormatter')
module.exports = {
BaseDao,
TBAPIS,
transformBeijingDate,
dateFormatter
}
/** @format */
var axios = require('axios')
let port = require('../package.json').port || 5555
const request = async (path, params) => {
let res = await axios({
method: 'post',
url: path,
data: params,
baseURL: `http://127.0.0.1:${port}`
})
if (!res.data.data) {
console.log(`调用${path}${JSON.stringify(params)}\n返回结果`, res.data)
return false
}
return res.data.data
}
const CURD_REQUEST = async ({ db, TABLE, type, query, options, document }) => {
// 参数
let data = {
dbName: db,
TABLE,
query,
options,
document
}
console.log(`请求参数`, data)
let path = `/proxy/dataMock/${type}`
return await request(path, data)
}
const TBAPI_REQUEST = async (db, funName, query) => {
// 参数
let data = {
dbName: db,
funName
}
let path = `/proxy/dataMock/tbapi`
let params = {
dbName: data.dbName,
funName: data.funName,
query
}
return await request(path, params)
}
module.exports = {
CURD_REQUEST,
TBAPI_REQUEST
}
module.exports = (day) => {
if (day) {
return new Date(day).getTime();
}else {
return new Date().getTime();
}
}
\ No newline at end of file
/** @format */
var express = require('express')
var bodyParser = require('body-parser')
var cookieParser = require('cookie-parser')
var { createProxyMiddleware } = require('http-proxy-middleware')
const routers = require('../index')
const { port, serverProxy } = require('./package.json')
var app = express()
app.use(cookieParser())
app.use(
bodyParser.urlencoded({
extended: true
})
)
app.use(bodyParser.json())
app.get('/', (req, res) => {
res.json({ message: `ok` })
})
// 执行本地云函数方法
app.post('/handler', async (req, res) => {
console.log(req.body)
let { data, openId, db } = req.body
if (!db) {
res.json({ message: `参数错误,缺少数据库db` })
}
if (!openId) {
res.json({ message: `参数错误,缺少openId` })
}
try {
let query = JSON.parse(JSON.stringify(data))
} catch (e) {
res.json({ message: `查询参数格式错误` })
}
let { handler, data: queryData } = data
if (!handler) {
res.json({ message: `格式错误, handler参数不能为空` })
}
if (!queryData) {
res.json({ message: `格式错误, data参数不能为空` })
}
if (!process.db) {
process.db = db
}
req.context = {
openId,
db,
env: 'mock',
data: queryData,
handler
}
if (routers[handler]) {
let result = await routers[handler](req.context)
res.json(result)
} else {
res.json({ message: `函数${handler}不存在` })
}
})
// 获取本地export的数据库表及云函数
app.get('/getDBHandlers', async (req, res) => {
let dbs = require('../dist/db')
let handlers = routers
// dbsInfo
let dbArray = []
let handlerArray = []
Object.keys(dbs).map(v => {
dbArray.push(dbs[v])
})
Object.keys(handlers).map(v => {
handlerArray.push(v)
})
console.log(dbArray, handlerArray)
res.json({
dbs: dbArray,
handlers: handlerArray,
success: true
})
})
const ProxyOption = {
target: serverProxy.target,
changeOrigin: true,
pathRewrite: (path, req) => {
console.log(`path`, path)
return path.replace('/proxy', '')
},
onProxyReq: (proxyReq, req, res) => {
console.log(`req.body`, req.body)
if (req.body) {
let bodyData = JSON.stringify(req.body)
console.log(`bodyData`, bodyData)
// incase if content-type is application/x-www-form-urlencoded -> we need to change to application/json
proxyReq.setHeader('Content-Type', 'application/json')
proxyReq.setHeader('Content-Length', Buffer.byteLength(bodyData))
// stream the content
proxyReq.write(bodyData)
}
}
}
app.use('/proxy', createProxyMiddleware(ProxyOption))
app.listen(port || 5555)
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@sindresorhus/is@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"
integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==
"@szmarczak/http-timer@^1.1.2":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421"
integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==
dependencies:
defer-to-connect "^1.0.1"
"@types/color-name@^1.1.1":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
"@types/http-proxy@^1.17.4":
version "1.17.4"
resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.4.tgz#e7c92e3dbe3e13aa799440ff42e6d3a17a9d045b"
integrity sha512-IrSHl2u6AWXduUaDLqYpt45tLVCtYv7o4Z0s1KghBCDgIIS9oW5K1H8mZG/A2CfeLdEa7rTd1ACOiHBc1EMT2Q==
dependencies:
"@types/node" "*"
"@types/node@*":
version "14.6.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.6.0.tgz#7d4411bf5157339337d7cff864d9ff45f177b499"
integrity sha512-mikldZQitV94akrc4sCcSjtJfsTKt4p+e/s0AGscVA6XArQ9kFclP+ZiYUMnq987rc6QlYxXv/EivqlfSLxpKA==
abbrev@1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
accepts@~1.3.7:
version "1.3.7"
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==
dependencies:
mime-types "~2.1.24"
negotiator "0.6.2"
ansi-align@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb"
integrity sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==
dependencies:
string-width "^3.0.0"
ansi-regex@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
ansi-regex@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
ansi-styles@^4.1.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359"
integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==
dependencies:
"@types/color-name" "^1.1.1"
color-convert "^2.0.1"
anymatch@~3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142"
integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==
dependencies:
normalize-path "^3.0.0"
picomatch "^2.0.4"
array-flatten@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=
axios@^0.19.2:
version "0.19.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27"
integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==
dependencies:
follow-redirects "1.5.10"
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
binary-extensions@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9"
integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==
body-parser@1.19.0, body-parser@^1.19.0:
version "1.19.0"
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a"
integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==
dependencies:
bytes "3.1.0"
content-type "~1.0.4"
debug "2.6.9"
depd "~1.1.2"
http-errors "1.7.2"
iconv-lite "0.4.24"
on-finished "~2.3.0"
qs "6.7.0"
raw-body "2.4.0"
type-is "~1.6.17"
boxen@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/boxen/-/boxen-4.2.0.tgz#e411b62357d6d6d36587c8ac3d5d974daa070e64"
integrity sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==
dependencies:
ansi-align "^3.0.0"
camelcase "^5.3.1"
chalk "^3.0.0"
cli-boxes "^2.2.0"
string-width "^4.1.0"
term-size "^2.1.0"
type-fest "^0.8.1"
widest-line "^3.1.0"
brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
dependencies:
balanced-match "^1.0.0"
concat-map "0.0.1"
braces@^3.0.1, braces@~3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
dependencies:
fill-range "^7.0.1"
bytes@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==
cacheable-request@^6.0.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912"
integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==
dependencies:
clone-response "^1.0.2"
get-stream "^5.1.0"
http-cache-semantics "^4.0.0"
keyv "^3.0.0"
lowercase-keys "^2.0.0"
normalize-url "^4.1.0"
responselike "^1.0.2"
camelcase@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
chalk@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4"
integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==
dependencies:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
chokidar@^3.2.2:
version "3.4.2"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.2.tgz#38dc8e658dec3809741eb3ef7bb0a47fe424232d"
integrity sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==
dependencies:
anymatch "~3.1.1"
braces "~3.0.2"
glob-parent "~5.1.0"
is-binary-path "~2.1.0"
is-glob "~4.0.1"
normalize-path "~3.0.0"
readdirp "~3.4.0"
optionalDependencies:
fsevents "~2.1.2"
ci-info@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46"
integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==
cli-boxes@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.0.tgz#538ecae8f9c6ca508e3c3c95b453fe93cb4c168d"
integrity sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==
clone-response@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b"
integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=
dependencies:
mimic-response "^1.0.0"
color-convert@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
dependencies:
color-name "~1.1.4"
color-name@~1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
configstore@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96"
integrity sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==
dependencies:
dot-prop "^5.2.0"
graceful-fs "^4.1.2"
make-dir "^3.0.0"
unique-string "^2.0.0"
write-file-atomic "^3.0.0"
xdg-basedir "^4.0.0"
content-disposition@0.5.3:
version "0.5.3"
resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd"
integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==
dependencies:
safe-buffer "5.1.2"
content-type@~1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==
cookie-parser@^1.4.5:
version "1.4.5"
resolved "https://registry.yarnpkg.com/cookie-parser/-/cookie-parser-1.4.5.tgz#3e572d4b7c0c80f9c61daf604e4336831b5d1d49"
integrity sha512-f13bPUj/gG/5mDr+xLmSxxDsB9DQiTIfhJS/sqjrmfAWiAN+x2O4i/XguTL9yDZ+/IFDanJ+5x7hC4CXT9Tdzw==
dependencies:
cookie "0.4.0"
cookie-signature "1.0.6"
cookie-signature@1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw=
cookie@0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba"
integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==
crypto-random-string@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5"
integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==
debug@2.6.9, debug@^2.2.0:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
dependencies:
ms "2.0.0"
debug@=3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
dependencies:
ms "2.0.0"
debug@^3.2.6:
version "3.2.6"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
dependencies:
ms "^2.1.1"
decompress-response@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3"
integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=
dependencies:
mimic-response "^1.0.0"
deep-extend@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
defer-to-connect@^1.0.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591"
integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==
depd@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
destroy@~1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=
dot-prop@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.2.0.tgz#c34ecc29556dc45f1f4c22697b6f4904e0cc4fcb"
integrity sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==
dependencies:
is-obj "^2.0.0"
duplexer3@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=
ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
emoji-regex@^7.0.1:
version "7.0.3"
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
emoji-regex@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
encodeurl@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
end-of-stream@^1.1.0:
version "1.4.4"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
dependencies:
once "^1.4.0"
escape-goat@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675"
integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==
escape-html@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
etag@~1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
eventemitter3@^4.0.0:
version "4.0.4"
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384"
integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==
express@^4.17.1:
version "4.17.1"
resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134"
integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==
dependencies:
accepts "~1.3.7"
array-flatten "1.1.1"
body-parser "1.19.0"
content-disposition "0.5.3"
content-type "~1.0.4"
cookie "0.4.0"
cookie-signature "1.0.6"
debug "2.6.9"
depd "~1.1.2"
encodeurl "~1.0.2"
escape-html "~1.0.3"
etag "~1.8.1"
finalhandler "~1.1.2"
fresh "0.5.2"
merge-descriptors "1.0.1"
methods "~1.1.2"
on-finished "~2.3.0"
parseurl "~1.3.3"
path-to-regexp "0.1.7"
proxy-addr "~2.0.5"
qs "6.7.0"
range-parser "~1.2.1"
safe-buffer "5.1.2"
send "0.17.1"
serve-static "1.14.1"
setprototypeof "1.1.1"
statuses "~1.5.0"
type-is "~1.6.18"
utils-merge "1.0.1"
vary "~1.1.2"
fill-range@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
dependencies:
to-regex-range "^5.0.1"
finalhandler@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d"
integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==
dependencies:
debug "2.6.9"
encodeurl "~1.0.2"
escape-html "~1.0.3"
on-finished "~2.3.0"
parseurl "~1.3.3"
statuses "~1.5.0"
unpipe "~1.0.0"
follow-redirects@1.5.10:
version "1.5.10"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a"
integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==
dependencies:
debug "=3.1.0"
follow-redirects@^1.0.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db"
integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==
forwarded@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=
fresh@0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=
fsevents@~2.1.2:
version "2.1.3"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e"
integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==
get-stream@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==
dependencies:
pump "^3.0.0"
get-stream@^5.1.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3"
integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==
dependencies:
pump "^3.0.0"
glob-parent@~5.1.0:
version "5.1.1"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229"
integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==
dependencies:
is-glob "^4.0.1"
global-dirs@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-2.0.1.tgz#acdf3bb6685bcd55cb35e8a052266569e9469201"
integrity sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==
dependencies:
ini "^1.3.5"
got@^9.6.0:
version "9.6.0"
resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85"
integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==
dependencies:
"@sindresorhus/is" "^0.14.0"
"@szmarczak/http-timer" "^1.1.2"
cacheable-request "^6.0.0"
decompress-response "^3.3.0"
duplexer3 "^0.1.4"
get-stream "^4.1.0"
lowercase-keys "^1.0.1"
mimic-response "^1.0.1"
p-cancelable "^1.0.0"
to-readable-stream "^1.0.0"
url-parse-lax "^3.0.0"
graceful-fs@^4.1.2:
version "4.2.4"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==
has-flag@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
has-flag@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
has-yarn@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77"
integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==
http-cache-semantics@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390"
integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==
http-errors@1.7.2:
version "1.7.2"
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f"
integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==
dependencies:
depd "~1.1.2"
inherits "2.0.3"
setprototypeof "1.1.1"
statuses ">= 1.5.0 < 2"
toidentifier "1.0.0"
http-errors@~1.7.2:
version "1.7.3"
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06"
integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==
dependencies:
depd "~1.1.2"
inherits "2.0.4"
setprototypeof "1.1.1"
statuses ">= 1.5.0 < 2"
toidentifier "1.0.0"
http-proxy-middleware@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-1.0.5.tgz#4c6e25d95a411e3d750bc79ccf66290675176dc2"
integrity sha512-CKzML7u4RdGob8wuKI//H8Ein6wNTEQR7yjVEzPbhBLGdOfkfvgTnp2HLnniKBDP9QW4eG10/724iTWLBeER3g==
dependencies:
"@types/http-proxy" "^1.17.4"
http-proxy "^1.18.1"
is-glob "^4.0.1"
lodash "^4.17.19"
micromatch "^4.0.2"
http-proxy@^1.18.1:
version "1.18.1"
resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549"
integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==
dependencies:
eventemitter3 "^4.0.0"
follow-redirects "^1.0.0"
requires-port "^1.0.0"
iconv-lite@0.4.24:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
dependencies:
safer-buffer ">= 2.1.2 < 3"
ignore-by-default@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09"
integrity sha1-SMptcvbGo68Aqa1K5odr44ieKwk=
import-lazy@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43"
integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
inherits@2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
inherits@2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
ini@^1.3.5, ini@~1.3.0:
version "1.3.5"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
ipaddr.js@1.9.1:
version "1.9.1"
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3"
integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==
is-binary-path@~2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
dependencies:
binary-extensions "^2.0.0"
is-ci@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c"
integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==
dependencies:
ci-info "^2.0.0"
is-extglob@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=
is-fullwidth-code-point@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
is-fullwidth-code-point@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
is-glob@^4.0.1, is-glob@~4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==
dependencies:
is-extglob "^2.1.1"
is-installed-globally@^0.3.1:
version "0.3.2"
resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.3.2.tgz#fd3efa79ee670d1187233182d5b0a1dd00313141"
integrity sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==
dependencies:
global-dirs "^2.0.1"
is-path-inside "^3.0.1"
is-npm@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-4.0.0.tgz#c90dd8380696df87a7a6d823c20d0b12bbe3c84d"
integrity sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==
is-number@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
is-obj@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982"
integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==
is-path-inside@^3.0.1:
version "3.0.2"
resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017"
integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==
is-typedarray@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
is-yarn-global@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232"
integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==
json-buffer@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898"
integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=
keyv@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9"
integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==
dependencies:
json-buffer "3.0.0"
latest-version@^5.0.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face"
integrity sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==
dependencies:
package-json "^6.3.0"
lodash@^4.17.19:
version "4.17.20"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
lowercase-keys@^1.0.0, lowercase-keys@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f"
integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==
lowercase-keys@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479"
integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==
make-dir@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==
dependencies:
semver "^6.0.0"
media-typer@0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=
merge-descriptors@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=
methods@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
micromatch@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259"
integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==
dependencies:
braces "^3.0.1"
picomatch "^2.0.5"
mime-db@1.44.0:
version "1.44.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92"
integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==
mime-types@~2.1.24:
version "2.1.27"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f"
integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==
dependencies:
mime-db "1.44.0"
mime@1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
mimic-response@^1.0.0, mimic-response@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b"
integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
dependencies:
brace-expansion "^1.1.7"
minimist@^1.2.0:
version "1.2.5"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
ms@2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
ms@^2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
negotiator@0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==
nodemon@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.4.tgz#55b09319eb488d6394aa9818148c0c2d1c04c416"
integrity sha512-Ltced+hIfTmaS28Zjv1BM552oQ3dbwPqI4+zI0SLgq+wpJhSyqgYude/aZa/3i31VCQWMfXJVxvu86abcam3uQ==
dependencies:
chokidar "^3.2.2"
debug "^3.2.6"
ignore-by-default "^1.0.1"
minimatch "^3.0.4"
pstree.remy "^1.1.7"
semver "^5.7.1"
supports-color "^5.5.0"
touch "^3.1.0"
undefsafe "^2.0.2"
update-notifier "^4.0.0"
nopt@~1.0.10:
version "1.0.10"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee"
integrity sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=
dependencies:
abbrev "1"
normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
normalize-url@^4.1.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129"
integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==
on-finished@~2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=
dependencies:
ee-first "1.1.1"
once@^1.3.1, once@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
dependencies:
wrappy "1"
p-cancelable@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc"
integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==
package-json@^6.3.0:
version "6.5.0"
resolved "https://registry.yarnpkg.com/package-json/-/package-json-6.5.0.tgz#6feedaca35e75725876d0b0e64974697fed145b0"
integrity sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==
dependencies:
got "^9.6.0"
registry-auth-token "^4.0.0"
registry-url "^5.0.0"
semver "^6.2.0"
parseurl@~1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
path-to-regexp@0.1.7:
version "0.1.7"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1:
version "2.2.2"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
prepend-http@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
proxy-addr@~2.0.5:
version "2.0.6"
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf"
integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==
dependencies:
forwarded "~0.1.2"
ipaddr.js "1.9.1"
pstree.remy@^1.1.7:
version "1.1.8"
resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a"
integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==
pump@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
dependencies:
end-of-stream "^1.1.0"
once "^1.3.1"
pupa@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.0.1.tgz#dbdc9ff48ffbea4a26a069b6f9f7abb051008726"
integrity sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==
dependencies:
escape-goat "^2.0.0"
qs@6.7.0:
version "6.7.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==
range-parser@~1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
raw-body@2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332"
integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==
dependencies:
bytes "3.1.0"
http-errors "1.7.2"
iconv-lite "0.4.24"
unpipe "1.0.0"
rc@^1.2.8:
version "1.2.8"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
dependencies:
deep-extend "^0.6.0"
ini "~1.3.0"
minimist "^1.2.0"
strip-json-comments "~2.0.1"
readdirp@~3.4.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.4.0.tgz#9fdccdf9e9155805449221ac645e8303ab5b9ada"
integrity sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==
dependencies:
picomatch "^2.2.1"
registry-auth-token@^4.0.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.0.tgz#1d37dffda72bbecd0f581e4715540213a65eb7da"
integrity sha512-P+lWzPrsgfN+UEpDS3U8AQKg/UjZX6mQSJueZj3EK+vNESoqBSpBUD3gmu4sF9lOsjXWjF11dQKUqemf3veq1w==
dependencies:
rc "^1.2.8"
registry-url@^5.0.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-5.1.0.tgz#e98334b50d5434b81136b44ec638d9c2009c5009"
integrity sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==
dependencies:
rc "^1.2.8"
requires-port@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=
responselike@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=
dependencies:
lowercase-keys "^1.0.0"
safe-buffer@5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
"safer-buffer@>= 2.1.2 < 3":
version "2.1.2"
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
semver-diff@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b"
integrity sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==
dependencies:
semver "^6.3.0"
semver@^5.7.1:
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
semver@^6.0.0, semver@^6.2.0, semver@^6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
send@0.17.1:
version "0.17.1"
resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"
integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==
dependencies:
debug "2.6.9"
depd "~1.1.2"
destroy "~1.0.4"
encodeurl "~1.0.2"
escape-html "~1.0.3"
etag "~1.8.1"
fresh "0.5.2"
http-errors "~1.7.2"
mime "1.6.0"
ms "2.1.1"
on-finished "~2.3.0"
range-parser "~1.2.1"
statuses "~1.5.0"
serve-static@1.14.1:
version "1.14.1"
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9"
integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==
dependencies:
encodeurl "~1.0.2"
escape-html "~1.0.3"
parseurl "~1.3.3"
send "0.17.1"
setprototypeof@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683"
integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==
signal-exit@^3.0.2:
version "3.0.3"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
"statuses@>= 1.5.0 < 2", statuses@~1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=
string-width@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==
dependencies:
emoji-regex "^7.0.1"
is-fullwidth-code-point "^2.0.0"
strip-ansi "^5.1.0"
string-width@^4.0.0, string-width@^4.1.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5"
integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.0"
strip-ansi@^5.1.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
dependencies:
ansi-regex "^4.1.0"
strip-ansi@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==
dependencies:
ansi-regex "^5.0.0"
strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
supports-color@^5.5.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
dependencies:
has-flag "^3.0.0"
supports-color@^7.1.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1"
integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==
dependencies:
has-flag "^4.0.0"
term-size@^2.1.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.0.tgz#1f16adedfe9bdc18800e1776821734086fcc6753"
integrity sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==
to-readable-stream@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771"
integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==
to-regex-range@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
dependencies:
is-number "^7.0.0"
toidentifier@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==
touch@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b"
integrity sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==
dependencies:
nopt "~1.0.10"
type-fest@^0.8.1:
version "0.8.1"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==
type-is@~1.6.17, type-is@~1.6.18:
version "1.6.18"
resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==
dependencies:
media-typer "0.3.0"
mime-types "~2.1.24"
typedarray-to-buffer@^3.1.5:
version "3.1.5"
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==
dependencies:
is-typedarray "^1.0.0"
undefsafe@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.3.tgz#6b166e7094ad46313b2202da7ecc2cd7cc6e7aae"
integrity sha512-nrXZwwXrD/T/JXeygJqdCO6NZZ1L66HrxM/Z7mIq2oPanoN0F1nLx3lwJMu6AwJY69hdixaFQOuoYsMjE5/C2A==
dependencies:
debug "^2.2.0"
unique-string@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d"
integrity sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==
dependencies:
crypto-random-string "^2.0.0"
unpipe@1.0.0, unpipe@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
update-notifier@^4.0.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-4.1.1.tgz#895fc8562bbe666179500f9f2cebac4f26323746"
integrity sha512-9y+Kds0+LoLG6yN802wVXoIfxYEwh3FlZwzMwpCZp62S2i1/Jzeqb9Eeeju3NSHccGGasfGlK5/vEHbAifYRDg==
dependencies:
boxen "^4.2.0"
chalk "^3.0.0"
configstore "^5.0.1"
has-yarn "^2.1.0"
import-lazy "^2.1.0"
is-ci "^2.0.0"
is-installed-globally "^0.3.1"
is-npm "^4.0.0"
is-yarn-global "^0.3.0"
latest-version "^5.0.0"
pupa "^2.0.1"
semver-diff "^3.1.1"
xdg-basedir "^4.0.0"
url-parse-lax@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c"
integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=
dependencies:
prepend-http "^2.0.0"
utils-merge@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=
vary@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
widest-line@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca"
integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==
dependencies:
string-width "^4.0.0"
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
write-file-atomic@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8"
integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==
dependencies:
imurmurhash "^0.1.4"
is-typedarray "^1.0.0"
signal-exit "^3.0.2"
typedarray-to-buffer "^3.1.5"
xdg-basedir@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13"
integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==
{
"name": "duiba",
"version": "1.0.0",
"description": "11",
"main": "index.js",
"author": "duiba",
"license": "ISC",
"sdkVersion": "*",
"dependencies": {
"dayjs": "^1.8.28",
"node-xlsx": "^0.15.0",
"source-map-support": "^0.5.19",
"taobao-mini-sdk": "0.1.5"
},
"scripts": {
"start": "tsc",
"mock": "cd mockServer && npm start",
"preinstall": "cd mockServer && yarn"
},
"config": {
"notNeedLogin": [
"endingNotify"
]
},
"optionalDependencies": {
"@types/node": "^14.6.0",
"@typescript-eslint/eslint-plugin": "^3.9.1",
"@typescript-eslint/parser": "^3.9.1",
"eslint": "^7.7.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"prettier": "^2.0.5",
"typescript": "^3.9.7"
}
}
/** @format */
import online from './online'
import test from './test'
interface Iconfig {
VIP_CALLBACK_URL: string
VIP_MOCK: boolean
}
const configs = {
online,
test
}
export const getConfig = (context: Context): Iconfig => {
const env = context.env
return configs[env] || configs.test
}
/** @format */
export default {
VIP_CALLBACK_URL: 'testUrl',
VIP_MOCK: false
}
/** @format */
export default {
VIP_CALLBACK_URL: 'onlineUrl',
VIP_MOCK: true
}
/** @format */
import { DEFAULT_CODE_TYPES } from './sdk'
export const BusinessError = {
// 更新重试失败(用于并发更新)
ERROR_UPDATE_RETRY: {
code: `210001`,
defaultMsg: `系统错误`
},
// 活动不存在
ERROR_NO_ACTIVITY: {
code: `220001`,
defaultMsg: `活动不存在`
},
// 活动未开始
ERROR_ACTIVITY_NOSTART: {
code: `220002`,
defaultMsg: `活动未开始`
},
// 活动已结束
ERROR_ACTIVITY_OVER: {
code: `220003`,
defaultMsg: `活动已结束`
},
// 用户不存在
ERROR_NO_USER: {
code: `310002`,
defaultMsg: `用户不存在`
},
// 需要成为会员才能助力哦
ERROR_NEEDMEMBER_DOHELP: {
code: `310004`,
defaultMsg: '需要成为会员才能助力哦'
},
// 非店铺会员
ERROR_NO_VIP: {
code: `310005`,
defaultMsg: '非店铺会员'
},
// 任务奖励已领取
ERROR_TASK_ALREADYRECEIVE: {
code: `430002`,
defaultMsg: `任务奖励已领取`
},
// 任务已完成
ERROR_TASK_COMPLETE: {
code: `430003`,
defaultMsg: `任务已完成`
},
// 暂无次数可领取
ERROR_TASK_NORECEIVE: {
code: `430003`,
defaultMsg: `暂无次数可领取`
},
ERROR_INVALID_INVITE_ID: {
code: `430004`,
defaultMsg: `邀请码无效`
},
ERROR_NO_CREDITS: {
code: `430005`,
defaultMsg: `积分不足`
},
ERROR_TASK_LIMIT: {
code: `430006`,
defaultMsg: `今日完成该任务次数超限`
},
ERROR_FORBIDDEN_OPE: {
code: `530001`,
defaultMsg: `非法操作`
},
ERROR_RECEIVE_PRIZE: {
code: `630002`,
defaultMsg: `奖励已领取`
},
ERROR_SEND_PRIZE: {
code: `730001`,
defaultMsg: `发奖失败`
},
ERROR_NO_PRIZE: {
code: `730002`,
defaultMsg: `奖品不存在`
},
ERROR_NO_STOCK: {
code: `730003`,
defaultMsg: `库存不足`
},
ERROR_PRIZE_EXPIRED: {
code: `740001`,
defaultMsg: `奖品已超过领取时间`
}
}
export const CODE_TYPES = Object.assign({}, DEFAULT_CODE_TYPES, BusinessError)
// tb 接口返回部分错误
export const TBERROR = {
USER_PERMISSION_EXCEED_MAX_RIGHT_COUNT_IN_DAY: '今日领取达到上限,明日再来领取哦',
COUPON_INVALID_OR_DELETED: '权益无效或者被删除,请联系商家',
APPLY_OWNSELF_COUPON: '不能领取自己家店铺权益',
APPLY_SINGLE_COUPON_COUNT_EXCEED_LIMIT: '请至卡券包删除无用权益再领取',
NO_RIGHT_QUANTITY: '权益库存不足,请联系商家',
ERRORA_3_567: '领取失败,为风险用户',
'Invalid session': '订购应用已过期,请联系商家处理'
}
// 领取奖品状态
export const DRAW_STATUS = {
// 待领取
WAITAWARD: 1,
// 处理中
PROCESSING: 2,
// 领取成功
SUCCESS: 3,
// 领取失败
FAIL: 4,
// 已过期
EXPIRED: 5,
// 重新领取
RETRY: 6
}
// 奖品类型
export const PRIZE_TYPE = {
ENAME: 1,
CREDITS: 2,
OBJECT: 3,
THANKS: 5
}
// C端的APP NAME
export const C_APP_NAME: string = 'promotioncenter-${需要补充}'
// 订单状态
export const TAOBAO_SUCCESS_ORDER_STATUS: string[] = [
'WAIT_SELLER_SEND_GOODS',
'SELLER_CONSIGNED_PART',
'WAIT_BUYER_CONFIRM_GOODS',
'TRADE_BUYER_SIGNED',
'TRADE_FINISHED',
'PAID_FORBID_CONSIGN'
]
// 活动状态
export const enum ACTIVITY_STATUS {
NORMAL = 1,
DELETE = 2
}
//任务频率类型常量
export const TASK_RATE_TYPE = {
FOREVER: 1,
EVERYDAY: 2,
NOLIMIT: 3
}
export const RECORD_TYPE = {
FOLLOW_TASK: { type: 1, name: '关注店铺任务' },
SIGN_TASK: { type: 2, name: '签到任务' },
RECEIVE_INVITE: { type: 3, name: '接受邀请' },
INVITE_SUCCESS: { type: 4, name: '邀请成功' }
}
/** @format */
import { CODE_TYPES } from './../constants'
import { services, paramsCheck } from '../decorator'
import { resultsModel } from '../sdk'
import { BaseService } from '../service'
export default class BaseController {
/**
* 活动基本信息
*/
@paramsCheck(['activityId'])
@services([BaseService])
async getActivityBaseInfoById(context: Context, {}, [baseService]: [BaseService]) {
const { activityId } = context.data
// 参数校验
if (!activityId) {
return resultsModel.error(CODE_TYPES.PARAMS_ERROR, `activityId必填`)
}
// 活动基本情况
const activityInfo = await baseService.getBaseInfo(activityId)
return resultsModel.success(activityInfo)
}
}
/** @format */
export const ACCESS_DB_NAME: string = 'c_user_access'
export const USER_DB_NAME: string = 'c_user'
export const AWARDS_DB_NAME: string = 'c_awards_info'
export const RECORD_DB_NAME: string = `c_user_record`
export const ERROR_LOG_DB_NAME: string = 'error_log'
export const SELLER_INFO_DB_NAME: string = 'a_seller_info'
export const PRIZE_CONFIG_DB_NAME: string = 'b_prize_config'
export const ACTIVITY_CONFIG_DB_NAME: string = 'b_activity_config'
/** @format */
import { resultsModel } from '../sdk'
import { CODE_TYPES } from '../constants'
export const paramsCheck = (params: string[]) => {
return function (target: Object, name: string, descriptor: PropertyDescriptor) {
const method = descriptor.value
descriptor.value = function (...args: any[]) {
const [context, otherArgs = {}] = args
const dataKeys = Object.keys(context.data)
for (let i = 0; i < params.length; i++) {
const param = params[i]
if (!dataKeys.includes(param)) return resultsModel.error(CODE_TYPES.PARAMS_ERROR, `缺少${param}参数`)
}
return method.apply(target, [context, { ...otherArgs }])
}
}
}
/** @format */
export * from './check'
export * from './services'
export * from './noCatch'
/** @format */
export const noCatch = (target: any, name: string, descriptor: PropertyDescriptor) => {
const method = descriptor.value
descriptor.value = async function (...args: any[]) {
const [context, otherArgs = {}] = args
return method.apply(this, [context, { ...otherArgs, noCatch: true }])
}
}
/** @format */
import {logger, recordErrorLog } from '../utils'
import { resultsModel } from '../sdk'
import { CODE_TYPES } from '../constants'
async function initBaseInfo(context: Context, baseInfos: IControllerInfos) {
return baseInfos
}
export const services = (services: any[]) => {
return (target: Object, name: string, descriptor: PropertyDescriptor) => {
const method = descriptor.value
descriptor.value = async function (...args: any[]) {
let [context, otherArgs = {}] = args
const servicesInstance = services.map(v => new v(context))
const baseInfos: IControllerInfos = await initBaseInfo(context, otherArgs)
// 默认全局try catch 如果有noCatch参数则直接执行
if (baseInfos.noCatch) {
delete baseInfos.noCatch
return method.apply(target, [context, baseInfos, servicesInstance])
}
let ret: Result
try {
logger(context)
ret = await method.apply(target, [context, baseInfos, servicesInstance])
} catch (error) {
console.log('error', error)
await recordErrorLog(context, baseInfos, error.toString(), error.stack)
ret = resultsModel.error(CODE_TYPES.SYSTEM_ERROR)
}
return ret
}
}
}
/** @format */
import { exportHandlers } from './utils'
export default exportHandlers([])
/** @format */
import Utils from 'taobao-mini-sdk/lib/utils/index'
import { BaseDao as CloudBaseDao } from 'taobao-mini-sdk/lib/dao/base.dao'
import TBAPI from 'taobao-mini-sdk/lib/service/TBAPI'
let MockConfig = require('../mockServer/sdk')
const {
DEFAULT_CODE_TYPES,
dateFormatter: cloudDateFormatter,
transformBeijingDate: cloudTransformBeijingDate,
getStartTimestamp,
getEndTimestamp,
ResultsModel
} = Utils
const resultsModel = new ResultsModel()
let env = process.argv[2]
console.log(`env`, env)
export const TBAPIS: typeof TBAPI = env === 'mock' ? MockConfig.TBAPIS : TBAPI
export const BaseDao = env === 'mock' ? MockConfig.BaseDao : CloudBaseDao
export const transformBeijingDate: typeof Utils.transformBeijingDate =
env === 'mock' ? MockConfig.transformBeijingDate : cloudTransformBeijingDate
export const dateFormatter: typeof Utils.dateFormatter = env === 'mock' ? MockConfig.dateFormatter : cloudDateFormatter
export { DEFAULT_CODE_TYPES, resultsModel, getStartTimestamp, getEndTimestamp }
/**
* 基本信息
*
* @format
*/
import { BaseDao } from '../sdk'
import { ACTIVITY_CONFIG_DB_NAME } from '../db'
export default class BaseService {
context: Context
activitydao: IBaseDao
constructor(context: Context) {
this.context = context
this.activitydao = new BaseDao(context, ACTIVITY_CONFIG_DB_NAME)
}
/**
* @desc 活动基本信息
* @param {活动id} activityId
* @returns 返回活动详情,若不存在活动,返回为null
*/
async getBaseInfo(activityId: string) {
console.log(process.argv[2], 'process.argv[2]')
return await this.activitydao.findOne({ _id: activityId })
}
}
/** @format */
export { default as BaseService } from './base.service'
/** @format */
interface IActivityInfo {
_id: string
openId: string
rule: string
startTime: number
endTime: number
title: string
deleteStatus: 1 | 2
openPrizeStatus?: 1 | 2 | 3 | 4
remark?: string
createTime: number
updateTime: number
awardReceiveExpiredTime?: number
tasks?: ITasks
}
interface ITasks {
attentionStore?: ITaskConfig
beMembership?: ITaskConfig
sign?: ITaskConfig
exchangeCredits?: ITaskConfig
browseGoods?: ITaskConfig
orderGoods?: ITaskConfig
collectGoods?: ITaskConfig
jumpLink?: ITaskConfig
inviteFriends?: ITaskConfig
}
interface ITaskConfig {
title?: string // 任务标题
value: number // 任奖奖励
times?: number // 任务为每日限次次数值
taskRateType?: number // 任务频率类型
link?: number // 任务链接
itemIds?: string // 任务商品
checked?: boolean // 是否选中(B端需勾选时)
}
/** @format */
interface Context {
appkey: string
sourceAppKey: string
userNick?: string
mixNick: string
miniappId: string
sourceMiniAppId: string
accessToken: string
openId: string
env: string
traceId: string
fcName: string
handler: string
appOwnerOpenId: string
fcInvokeId: string
cloud: any
data: {
[queryParam: string]: any
}
}
interface IControllerInfos {
userInfo: IUserInfo
vipInfo: IVipInfo
activityInfo?: IActivityInfo
session: string
noCatch?: boolean
}
interface IVipInfo {
isVip: boolean
url?: string
}
interface Result {
success: boolean
code: string
message?: string
data?: object[] | object | number[] | string[] | boolean
}
interface IBaseDao {
dbName: string
db: object
constructor(context: any, dbName: string)
/**
* 查询一条数据
* @param query
* @param projection
*/
findOne(query: object, projection?: object): Promise<any>
/**
* 查询多条数据
* @param query
* @param projection
*/
find(query: object, projection?: object): Promise<any>
/**
* 插入单条数据
* @param document
*/
insertOne(document: object): Promise<any>
/**
* 插入多条数据
* @param documents 插入对象
*/
insertMany(documents: object[]): Promise<any>
/**
* 更新数据
* @param query
* @param options
*/
update(query: object, options?: object): Promise<any>
/**
* 删除多条数据
* @param filter
*/
delete(filter: object): Promise<any>
/**
* 获取条目数
* @param query
* @param options
*/
count(query: object, options?: object): Promise<any>
/**
* 聚合查询
* @param query
* @param options
*/
aggregate(aggregateOperation: object | any[]): Promise<any>
}
/** @format */
interface IUserInfo {
_id?: string
activityId: string
avatar: string
userNick: string
openId: string
createTime: number
updateTime: number
createDay?: string
inviteId?: string
member?: IMemberInfo
follow?: IFollowInfo
remainTimes?: IRemainTimesInfo
taskInfo?: object
login?: object
}
interface IRemainTimesInfo {
invites?: number
browseGoods?: number
joinGroup?: number
member?: number
follow?: number
orderGoods?: number
exchangeCredits?: number
}
interface IMemberInfo {
flag: boolean
newMember?: boolean
bememberTime?: number
bememberDay?: string
}
interface IFollowInfo {
flag: boolean
newFollow?: boolean
followTime?: number
followDay?: string
}
/** @format */
export const exportHandlers = (controllers: any[]) => {
const handlersMapper = controllers
.map(controller => {
const controllerInstance = new controller()
const handlersKeys = Object.getOwnPropertyNames(Object.getPrototypeOf(controllerInstance)).filter(
v => v !== 'constructor'
)
return handlersKeys.reduce((prev, current) => {
return {
...prev,
[current]: controllerInstance[current]
}
}, {})
})
.reduce((prev, current) => {
return {
...current,
...prev
}
}, {})
return handlersMapper
}
/** @format */
import { transformBeijingDate, dateFormatter } from '../sdk'
// 获取今天的时间
export const getToday = () => {
console.log(transformBeijingDate(Date.now()))
return dateFormatter(transformBeijingDate(Date.now()), 'yyyy/MM/dd')
}
/** @format */
export * from './logger'
export * from './getToday'
export * from './exportHandlers'
/** @format */
import { BaseDao } from '../sdk'
import { ERROR_LOG_DB_NAME } from '../db'
import { getToday } from '../utils'
export const logger = (context: Context) => {
const data = JSON.stringify(context.data)
console.log(context)
console.log(
`---------函数: ${context.fcName || ''}.${
context?.cloud?.dataspace?.context?.handler || context.handler
}------------`
)
console.log(`---------请求参数: ${data}------------`)
}
// 记录错误日志
export const recordErrorLog = async (
context: Context,
baseInfos: IControllerInfos,
errorMsg: string,
stack: string
) => {
const { openId } = context
const { activityId } = context.data || {}
const { userInfo } = baseInfos
const { userNick } = userInfo || {}
const logdao: IBaseDao = new BaseDao(context, ERROR_LOG_DB_NAME)
const functionName: string = `${context.fcName || ''}.${
context?.cloud?.dataspace?.context?.handler || context.handler
}`
return await logdao.insertOne({
openId,
activityId,
errorMsg,
errorStack: stack,
functionName,
userNick,
fcInvokeId: context.fcInvokeId,
params: context.data,
createTime: Date.now(),
createDay: getToday(),
catchType: 1
})
}
{
"compileOnSave": true,
"compilerOptions": {
"target": "es5",
"lib": [
"es6", "dom", "es7"
],
"typeRoots": ["./node_modules/@types/", "./src/typings/"],
"outDir": "./dist",
"sourceMap": true,
"module": "commonjs",
"watch": true,
"moduleResolution": "node",
"isolatedModules": false,
"allowJs": true,
"declaration": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"suppressImplicitAnyIndexErrors": true
},
"include": [
"./src/**/*"
]
}
\ No newline at end of file
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@babel/code-frame@^7.0.0":
version "7.10.4"
resolved "https://registry.npm.taobao.org/@babel/code-frame/download/@babel/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a"
integrity sha1-Fo2ho26Q2miujUnA8bSMfGJJITo=
dependencies:
"@babel/highlight" "^7.10.4"
"@babel/helper-validator-identifier@^7.10.4":
version "7.10.4"
resolved "https://registry.npm.taobao.org/@babel/helper-validator-identifier/download/@babel/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2"
integrity sha1-p4x6clHgH2FlEtMbEK3PUq2l4NI=
"@babel/highlight@^7.10.4":
version "7.10.4"
resolved "https://registry.npm.taobao.org/@babel/highlight/download/@babel/highlight-7.10.4.tgz?cache=0&sync_timestamp=1593521087106&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhighlight%2Fdownload%2F%40babel%2Fhighlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143"
integrity sha1-fRvf1ldTU4+r5sOFls23bZrGAUM=
dependencies:
"@babel/helper-validator-identifier" "^7.10.4"
chalk "^2.0.0"
js-tokens "^4.0.0"
"@types/color-name@^1.1.1":
version "1.1.1"
resolved "https://registry.npm.taobao.org/@types/color-name/download/@types/color-name-1.1.1.tgz?cache=0&sync_timestamp=1596837707987&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fcolor-name%2Fdownload%2F%40types%2Fcolor-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
integrity sha1-HBJhu+qhCoBVu8XYq4S3sq/IRqA=
"@types/eslint-visitor-keys@^1.0.0":
version "1.0.0"
resolved "https://registry.npm.taobao.org/@types/eslint-visitor-keys/download/@types/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d"
integrity sha1-HuMNeVRMqE1o1LPNsK9PIFZj3S0=
"@types/json-schema@^7.0.3":
version "7.0.5"
resolved "https://registry.npm.taobao.org/@types/json-schema/download/@types/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd"
integrity sha1-3M5EMOZLRDuolF8CkPtWStW6xt0=
"@types/node@^14.6.0":
version "14.6.0"
resolved "https://registry.npm.taobao.org/@types/node/download/@types/node-14.6.0.tgz?cache=0&sync_timestamp=1597673176468&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-14.6.0.tgz#7d4411bf5157339337d7cff864d9ff45f177b499"
integrity sha1-fUQRv1FXM5M318/4ZNn/RfF3tJk=
"@typescript-eslint/eslint-plugin@^3.9.1":
version "3.9.1"
resolved "https://registry.npm.taobao.org/@typescript-eslint/eslint-plugin/download/@typescript-eslint/eslint-plugin-3.9.1.tgz#8cf27b6227d12d66dd8dc1f1a4b04d1daad51c2e"
integrity sha1-jPJ7YifRLWbdjcHxpLBNHarVHC4=
dependencies:
"@typescript-eslint/experimental-utils" "3.9.1"
debug "^4.1.1"
functional-red-black-tree "^1.0.1"
regexpp "^3.0.0"
semver "^7.3.2"
tsutils "^3.17.1"
"@typescript-eslint/experimental-utils@3.9.1":
version "3.9.1"
resolved "https://registry.npm.taobao.org/@typescript-eslint/experimental-utils/download/@typescript-eslint/experimental-utils-3.9.1.tgz?cache=0&sync_timestamp=1597682959833&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40typescript-eslint%2Fexperimental-utils%2Fdownload%2F%40typescript-eslint%2Fexperimental-utils-3.9.1.tgz#b140b2dc7a7554a44f8a86fb6fe7cbfe57ca059e"
integrity sha1-sUCy3Hp1VKRPiob7b+fL/lfKBZ4=
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/types" "3.9.1"
"@typescript-eslint/typescript-estree" "3.9.1"
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"
"@typescript-eslint/parser@^3.9.1":
version "3.9.1"
resolved "https://registry.npm.taobao.org/@typescript-eslint/parser/download/@typescript-eslint/parser-3.9.1.tgz#ab7983abaea0ae138ff5671c7c7739d8a191b181"
integrity sha1-q3mDq66grhOP9WccfHc52KGRsYE=
dependencies:
"@types/eslint-visitor-keys" "^1.0.0"
"@typescript-eslint/experimental-utils" "3.9.1"
"@typescript-eslint/types" "3.9.1"
"@typescript-eslint/typescript-estree" "3.9.1"
eslint-visitor-keys "^1.1.0"
"@typescript-eslint/types@3.9.1":
version "3.9.1"
resolved "https://registry.npm.taobao.org/@typescript-eslint/types/download/@typescript-eslint/types-3.9.1.tgz?cache=0&sync_timestamp=1597682871503&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40typescript-eslint%2Ftypes%2Fdownload%2F%40typescript-eslint%2Ftypes-3.9.1.tgz#b2a6eaac843cf2f2777b3f2464fb1fbce5111416"
integrity sha1-sqbqrIQ88vJ3ez8kZPsfvOURFBY=
"@typescript-eslint/typescript-estree@3.9.1":
version "3.9.1"
resolved "https://registry.npm.taobao.org/@typescript-eslint/typescript-estree/download/@typescript-eslint/typescript-estree-3.9.1.tgz?cache=0&sync_timestamp=1597682960916&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40typescript-eslint%2Ftypescript-estree%2Fdownload%2F%40typescript-eslint%2Ftypescript-estree-3.9.1.tgz#fd81cada74bc8a7f3a2345b00897acb087935779"
integrity sha1-/YHK2nS8in86I0WwCJessIeTV3k=
dependencies:
"@typescript-eslint/types" "3.9.1"
"@typescript-eslint/visitor-keys" "3.9.1"
debug "^4.1.1"
glob "^7.1.6"
is-glob "^4.0.1"
lodash "^4.17.15"
semver "^7.3.2"
tsutils "^3.17.1"
"@typescript-eslint/visitor-keys@3.9.1":
version "3.9.1"
resolved "https://registry.npm.taobao.org/@typescript-eslint/visitor-keys/download/@typescript-eslint/visitor-keys-3.9.1.tgz?cache=0&sync_timestamp=1597682861568&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40typescript-eslint%2Fvisitor-keys%2Fdownload%2F%40typescript-eslint%2Fvisitor-keys-3.9.1.tgz#92af3747cdb71509199a8f7a4f00b41d636551d1"
integrity sha1-kq83R823FQkZmo96TwC0HWNlUdE=
dependencies:
eslint-visitor-keys "^1.1.0"
acorn-jsx@^5.2.0:
version "5.2.0"
resolved "https://registry.npm.taobao.org/acorn-jsx/download/acorn-jsx-5.2.0.tgz?cache=0&sync_timestamp=1582724149302&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn-jsx%2Fdownload%2Facorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe"
integrity sha1-TGYGkXPW/daO2FI5/CViJhgrLr4=
acorn@^7.3.1:
version "7.4.0"
resolved "https://registry.npm.taobao.org/acorn/download/acorn-7.4.0.tgz?cache=0&sync_timestamp=1597237468154&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn%2Fdownload%2Facorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c"
integrity sha1-4a1IbmxUUBY0xsOXxcEh2qODYHw=
adler-32@~1.2.0:
version "1.2.0"
resolved "https://registry.npm.taobao.org/adler-32/download/adler-32-1.2.0.tgz#6a3e6bf0a63900ba15652808cb15c6813d1a5f25"
integrity sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU=
dependencies:
exit-on-epipe "~1.0.1"
printj "~1.1.0"
ajv@^6.10.0, ajv@^6.10.2:
version "6.12.4"
resolved "https://registry.npm.taobao.org/ajv/download/ajv-6.12.4.tgz?cache=0&sync_timestamp=1597480799381&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv%2Fdownload%2Fajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234"
integrity sha1-BhT6zEUiEn+nE0Rca/0+vTduIjQ=
dependencies:
fast-deep-equal "^3.1.1"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
ansi-colors@^4.1.1:
version "4.1.1"
resolved "https://registry.npm.taobao.org/ansi-colors/download/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348"
integrity sha1-y7muJWv3UK8eqzRPIpqif+lLo0g=
ansi-regex@^4.1.0:
version "4.1.0"
resolved "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
integrity sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=
ansi-regex@^5.0.0:
version "5.0.0"
resolved "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
integrity sha1-OIU59VF5vzkznIGvMKZU1p+Hy3U=
ansi-styles@^3.2.0, ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
integrity sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=
dependencies:
color-convert "^1.9.0"
ansi-styles@^4.1.0:
version "4.2.1"
resolved "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359"
integrity sha1-kK51xCTQCNJiTFvynq0xd+v881k=
dependencies:
"@types/color-name" "^1.1.1"
color-convert "^2.0.1"
argparse@^1.0.7:
version "1.0.10"
resolved "https://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz?cache=0&sync_timestamp=1597414399705&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fargparse%2Fdownload%2Fargparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
integrity sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=
dependencies:
sprintf-js "~1.0.2"
astral-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/astral-regex/download/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
integrity sha1-bIw/uCfdQ+45GPJ7gngqt2WKb9k=
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
integrity sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=
dependencies:
balanced-match "^1.0.0"
concat-map "0.0.1"
buffer-from@^1.0.0, buffer-from@^1.1.0:
version "1.1.1"
resolved "https://registry.npm.taobao.org/buffer-from/download/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
integrity sha1-MnE7wCj3XAL9txDXx7zsHyxgcO8=
callsites@^3.0.0:
version "3.1.0"
resolved "https://registry.npm.taobao.org/callsites/download/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
integrity sha1-s2MKvYlDQy9Us/BRkjjjPNffL3M=
cfb@^1.1.2:
version "1.2.0"
resolved "https://registry.npm.taobao.org/cfb/download/cfb-1.2.0.tgz#6a4d0872b525ed60349e1ef51fb4b0bf73eca9a8"
integrity sha1-ak0IcrUl7WA0nh71H7Swv3Psqag=
dependencies:
adler-32 "~1.2.0"
crc-32 "~1.2.0"
printj "~1.1.2"
chalk@^2.0.0:
version "2.4.2"
resolved "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1591687076871&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
integrity sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=
dependencies:
ansi-styles "^3.2.1"
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"
chalk@^4.0.0:
version "4.1.0"
resolved "https://registry.npm.taobao.org/chalk/download/chalk-4.1.0.tgz?cache=0&sync_timestamp=1591687076871&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
integrity sha1-ThSHCmGNni7dl92DRf2dncMVZGo=
dependencies:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
codepage@~1.14.0:
version "1.14.0"
resolved "https://registry.npm.taobao.org/codepage/download/codepage-1.14.0.tgz#8cbe25481323559d7d307571b0fff91e7a1d2f99"
integrity sha1-jL4lSBMjVZ19MHVxsP/5HnodL5k=
dependencies:
commander "~2.14.1"
exit-on-epipe "~1.0.1"
color-convert@^1.9.0:
version "1.9.3"
resolved "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
integrity sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=
dependencies:
color-name "1.1.3"
color-convert@^2.0.1:
version "2.0.1"
resolved "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
integrity sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=
dependencies:
color-name "~1.1.4"
color-name@1.1.3:
version "1.1.3"
resolved "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
color-name@~1.1.4:
version "1.1.4"
resolved "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=
commander@~2.14.1:
version "2.14.1"
resolved "https://registry.npm.taobao.org/commander/download/commander-2.14.1.tgz?cache=0&sync_timestamp=1595168214577&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa"
integrity sha1-IjUSPjevjKPGXfRbAm29NXsBuao=
commander@~2.17.1:
version "2.17.1"
resolved "https://registry.npm.taobao.org/commander/download/commander-2.17.1.tgz?cache=0&sync_timestamp=1595168214577&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf"
integrity sha1-vXerfebelCBc6sxy8XFtKfIKd78=
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
crc-32@~1.2.0:
version "1.2.0"
resolved "https://registry.npm.taobao.org/crc-32/download/crc-32-1.2.0.tgz#cb2db6e29b88508e32d9dd0ec1693e7b41a18208"
integrity sha1-yy224puIUI4y2d0OwWk+e0Ghggg=
dependencies:
exit-on-epipe "~1.0.1"
printj "~1.1.0"
cross-spawn@^7.0.2:
version "7.0.3"
resolved "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-7.0.3.tgz?cache=0&sync_timestamp=1590420971248&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcross-spawn%2Fdownload%2Fcross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha1-9zqFudXUHQRVUcF34ogtSshXKKY=
dependencies:
path-key "^3.1.0"
shebang-command "^2.0.0"
which "^2.0.1"
dayjs@^1.8.28:
version "1.8.32"
resolved "https://registry.npm.taobao.org/dayjs/download/dayjs-1.8.32.tgz?cache=0&sync_timestamp=1596547169382&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdayjs%2Fdownload%2Fdayjs-1.8.32.tgz#66c48b95c397d9f7907e89bd29f78b3d19d40294"
integrity sha1-ZsSLlcOX2feQfom9KfeLPRnUApQ=
debug@^4.0.1, debug@^4.1.1:
version "4.1.1"
resolved "https://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
integrity sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=
dependencies:
ms "^2.1.1"
deep-is@^0.1.3:
version "0.1.3"
resolved "https://registry.npm.taobao.org/deep-is/download/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
doctrine@^3.0.0:
version "3.0.0"
resolved "https://registry.npm.taobao.org/doctrine/download/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961"
integrity sha1-rd6+rXKmV023g2OdyHoSF3OXOWE=
dependencies:
esutils "^2.0.2"
emoji-regex@^7.0.1:
version "7.0.3"
resolved "https://registry.npm.taobao.org/emoji-regex/download/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
integrity sha1-kzoEBShgyF6DwSJHnEdIqOTHIVY=
enquirer@^2.3.5:
version "2.3.6"
resolved "https://registry.npm.taobao.org/enquirer/download/enquirer-2.3.6.tgz?cache=0&sync_timestamp=1593693257124&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fenquirer%2Fdownload%2Fenquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d"
integrity sha1-Kn/l3WNKHkElqXXsmU/1RW3Dc00=
dependencies:
ansi-colors "^4.1.1"
escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1587627107924&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
eslint-config-prettier@^6.11.0:
version "6.11.0"
resolved "https://registry.npm.taobao.org/eslint-config-prettier/download/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1"
integrity sha1-9tIjjBKQ0ByFmotcH301KgsNqLE=
dependencies:
get-stdin "^6.0.0"
eslint-plugin-prettier@^3.1.4:
version "3.1.4"
resolved "https://registry.npm.taobao.org/eslint-plugin-prettier/download/eslint-plugin-prettier-3.1.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-plugin-prettier%2Fdownload%2Feslint-plugin-prettier-3.1.4.tgz#168ab43154e2ea57db992a2cd097c828171f75c2"
integrity sha1-Foq0MVTi6lfbmSos0JfIKBcfdcI=
dependencies:
prettier-linter-helpers "^1.0.0"
eslint-scope@^5.0.0, eslint-scope@^5.1.0:
version "5.1.0"
resolved "https://registry.npm.taobao.org/eslint-scope/download/eslint-scope-5.1.0.tgz#d0f971dfe59c69e0cada684b23d49dbf82600ce5"
integrity sha1-0Plx3+WcaeDK2mhLI9Sdv4JgDOU=
dependencies:
esrecurse "^4.1.0"
estraverse "^4.1.1"
eslint-utils@^2.0.0, eslint-utils@^2.1.0:
version "2.1.0"
resolved "https://registry.npm.taobao.org/eslint-utils/download/eslint-utils-2.1.0.tgz?cache=0&sync_timestamp=1592222029130&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-utils%2Fdownload%2Feslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27"
integrity sha1-0t5eA0JOcH3BDHQGjd7a5wh0Gyc=
dependencies:
eslint-visitor-keys "^1.1.0"
eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
version "1.3.0"
resolved "https://registry.npm.taobao.org/eslint-visitor-keys/download/eslint-visitor-keys-1.3.0.tgz?cache=0&sync_timestamp=1597435587476&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-visitor-keys%2Fdownload%2Feslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
integrity sha1-MOvR73wv3/AcOk8VEESvJfqwUj4=
eslint@^7.7.0:
version "7.7.0"
resolved "https://registry.npm.taobao.org/eslint/download/eslint-7.7.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint%2Fdownload%2Feslint-7.7.0.tgz#18beba51411927c4b64da0a8ceadefe4030d6073"
integrity sha1-GL66UUEZJ8S2TaCozq3v5AMNYHM=
dependencies:
"@babel/code-frame" "^7.0.0"
ajv "^6.10.0"
chalk "^4.0.0"
cross-spawn "^7.0.2"
debug "^4.0.1"
doctrine "^3.0.0"
enquirer "^2.3.5"
eslint-scope "^5.1.0"
eslint-utils "^2.1.0"
eslint-visitor-keys "^1.3.0"
espree "^7.2.0"
esquery "^1.2.0"
esutils "^2.0.2"
file-entry-cache "^5.0.1"
functional-red-black-tree "^1.0.1"
glob-parent "^5.0.0"
globals "^12.1.0"
ignore "^4.0.6"
import-fresh "^3.0.0"
imurmurhash "^0.1.4"
is-glob "^4.0.0"
js-yaml "^3.13.1"
json-stable-stringify-without-jsonify "^1.0.1"
levn "^0.4.1"
lodash "^4.17.19"
minimatch "^3.0.4"
natural-compare "^1.4.0"
optionator "^0.9.1"
progress "^2.0.0"
regexpp "^3.1.0"
semver "^7.2.1"
strip-ansi "^6.0.0"
strip-json-comments "^3.1.0"
table "^5.2.3"
text-table "^0.2.0"
v8-compile-cache "^2.0.3"
espree@^7.2.0:
version "7.2.0"
resolved "https://registry.npm.taobao.org/espree/download/espree-7.2.0.tgz?cache=0&sync_timestamp=1595033738897&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fespree%2Fdownload%2Fespree-7.2.0.tgz#1c263d5b513dbad0ac30c4991b93ac354e948d69"
integrity sha1-HCY9W1E9utCsMMSZG5OsNU6UjWk=
dependencies:
acorn "^7.3.1"
acorn-jsx "^5.2.0"
eslint-visitor-keys "^1.3.0"
esprima@^4.0.0:
version "4.0.1"
resolved "https://registry.npm.taobao.org/esprima/download/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
integrity sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=
esquery@^1.2.0:
version "1.3.1"
resolved "https://registry.npm.taobao.org/esquery/download/esquery-1.3.1.tgz?cache=0&sync_timestamp=1587061209806&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fesquery%2Fdownload%2Fesquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57"
integrity sha1-t4tYKKqOIU4p+3TE1bdS4cAz2lc=
dependencies:
estraverse "^5.1.0"
esrecurse@^4.1.0:
version "4.2.1"
resolved "https://registry.npm.taobao.org/esrecurse/download/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf"
integrity sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=
dependencies:
estraverse "^4.1.0"
estraverse@^4.1.0, estraverse@^4.1.1:
version "4.3.0"
resolved "https://registry.npm.taobao.org/estraverse/download/estraverse-4.3.0.tgz?cache=0&sync_timestamp=1596641261331&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Festraverse%2Fdownload%2Festraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
integrity sha1-OYrT88WiSUi+dyXoPRGn3ijNvR0=
estraverse@^5.1.0:
version "5.2.0"
resolved "https://registry.npm.taobao.org/estraverse/download/estraverse-5.2.0.tgz?cache=0&sync_timestamp=1596641261331&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Festraverse%2Fdownload%2Festraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880"
integrity sha1-MH30JUfmzHMk088DwVXVzbjFOIA=
esutils@^2.0.2:
version "2.0.3"
resolved "https://registry.npm.taobao.org/esutils/download/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
integrity sha1-dNLrTeC42hKTcRkQ1Qd1ubcQ72Q=
exit-on-epipe@~1.0.1:
version "1.0.1"
resolved "https://registry.npm.taobao.org/exit-on-epipe/download/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692"
integrity sha1-C92S6H1ShdJn2qgXHQ6wYVlolpI=
fast-deep-equal@^3.1.1:
version "3.1.3"
resolved "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-3.1.3.tgz?cache=0&sync_timestamp=1591599651635&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU=
fast-diff@^1.1.2:
version "1.2.0"
resolved "https://registry.npm.taobao.org/fast-diff/download/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03"
integrity sha1-c+4RmC2Gyq95WYKNUZz+kn+sXwM=
fast-json-stable-stringify@^2.0.0:
version "2.1.0"
resolved "https://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-json-stable-stringify%2Fdownload%2Ffast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
integrity sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM=
fast-levenshtein@^2.0.6:
version "2.0.6"
resolved "https://registry.npm.taobao.org/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
file-entry-cache@^5.0.1:
version "5.0.1"
resolved "https://registry.npm.taobao.org/file-entry-cache/download/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c"
integrity sha1-yg9u+m3T1WEzP7FFFQZcL6/fQ5w=
dependencies:
flat-cache "^2.0.1"
flat-cache@^2.0.1:
version "2.0.1"
resolved "https://registry.npm.taobao.org/flat-cache/download/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0"
integrity sha1-XSltbwS9pEpGMKMBQTvbwuwIXsA=
dependencies:
flatted "^2.0.0"
rimraf "2.6.3"
write "1.0.3"
flatted@^2.0.0:
version "2.0.2"
resolved "https://registry.npm.taobao.org/flatted/download/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
integrity sha1-RXWyHivO50NKqb5mL0t7X5wrUTg=
frac@~1.1.2:
version "1.1.2"
resolved "https://registry.npm.taobao.org/frac/download/frac-1.1.2.tgz#3d74f7f6478c88a1b5020306d747dc6313c74d0b"
integrity sha1-PXT39keMiKG1AgMG10fcYxPHTQs=
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
functional-red-black-tree@^1.0.1:
version "1.0.1"
resolved "https://registry.npm.taobao.org/functional-red-black-tree/download/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=
get-stdin@^6.0.0:
version "6.0.0"
resolved "https://registry.npm.taobao.org/get-stdin/download/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"
integrity sha1-ngm/cSs2CrkiXoEgSPcf3pyJZXs=
glob-parent@^5.0.0:
version "5.1.1"
resolved "https://registry.npm.taobao.org/glob-parent/download/glob-parent-5.1.1.tgz?cache=0&sync_timestamp=1584836110944&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglob-parent%2Fdownload%2Fglob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229"
integrity sha1-tsHvQXxOVmPqSY8cRa+saRa7wik=
dependencies:
is-glob "^4.0.1"
glob@^7.1.3, glob@^7.1.6:
version "7.1.6"
resolved "https://registry.npm.taobao.org/glob/download/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
integrity sha1-FB8zuBp8JJLhJVlDB0gMRmeSeKY=
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"
globals@^12.1.0:
version "12.4.0"
resolved "https://registry.npm.taobao.org/globals/download/globals-12.4.0.tgz?cache=0&sync_timestamp=1596711099974&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobals%2Fdownload%2Fglobals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8"
integrity sha1-oYgTV2pBsAokqX5/gVkYwuGZJfg=
dependencies:
type-fest "^0.8.1"
has-flag@^3.0.0:
version "3.0.0"
resolved "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
has-flag@^4.0.0:
version "4.0.0"
resolved "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
integrity sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=
ignore@^4.0.6:
version "4.0.6"
resolved "https://registry.npm.taobao.org/ignore/download/ignore-4.0.6.tgz?cache=0&sync_timestamp=1590809289115&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
integrity sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=
import-fresh@^3.0.0:
version "3.2.1"
resolved "https://registry.npm.taobao.org/import-fresh/download/import-fresh-3.2.1.tgz?cache=0&sync_timestamp=1573665028675&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fimport-fresh%2Fdownload%2Fimport-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66"
integrity sha1-Yz/2GFBueTr1rJG/SLcmd+FcvmY=
dependencies:
parent-module "^1.0.0"
resolve-from "^4.0.0"
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
dependencies:
once "^1.3.0"
wrappy "1"
inherits@2:
version "2.0.4"
resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=
is-extglob@^2.1.1:
version "2.1.1"
resolved "https://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=
is-fullwidth-code-point@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
is-glob@^4.0.0, is-glob@^4.0.1:
version "4.0.1"
resolved "https://registry.npm.taobao.org/is-glob/download/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
integrity sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw=
dependencies:
is-extglob "^2.1.1"
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.npm.taobao.org/js-tokens/download/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha1-GSA/tZmR35jjoocFDUZHzerzJJk=
js-yaml@^3.13.1:
version "3.14.0"
resolved "https://registry.npm.taobao.org/js-yaml/download/js-yaml-3.14.0.tgz?cache=0&sync_timestamp=1590172246873&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjs-yaml%2Fdownload%2Fjs-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482"
integrity sha1-p6NBcPJqIbsWJCTYray0ETpp5II=
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
json-schema-traverse@^0.4.1:
version "0.4.1"
resolved "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
integrity sha1-afaofZUTq4u4/mO9sJecRI5oRmA=
json-stable-stringify-without-jsonify@^1.0.1:
version "1.0.1"
resolved "https://registry.npm.taobao.org/json-stable-stringify-without-jsonify/download/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
levn@^0.4.1:
version "0.4.1"
resolved "https://registry.npm.taobao.org/levn/download/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"
integrity sha1-rkViwAdHO5MqYgDUAyaN0v/8at4=
dependencies:
prelude-ls "^1.2.1"
type-check "~0.4.0"
lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19:
version "4.17.20"
resolved "https://registry.npm.taobao.org/lodash/download/lodash-4.17.20.tgz?cache=0&sync_timestamp=1597336053864&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flodash%2Fdownload%2Flodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha1-tEqbYpe8tpjxxRo1RaKzs2jVnFI=
minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
integrity sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=
dependencies:
brace-expansion "^1.1.7"
minimist@^1.2.5:
version "1.2.5"
resolved "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=
mkdirp@^0.5.1:
version "0.5.5"
resolved "https://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.5.tgz?cache=0&sync_timestamp=1587535418745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
integrity sha1-2Rzv1i0UNsoPQWIOJRKI1CAJne8=
dependencies:
minimist "^1.2.5"
ms@^2.1.1:
version "2.1.2"
resolved "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=
natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.npm.taobao.org/natural-compare/download/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
node-xlsx@^0.15.0:
version "0.15.0"
resolved "https://registry.npm.taobao.org/node-xlsx/download/node-xlsx-0.15.0.tgz#1f1b0d7adce5c706e86bfd96a5aa0005bf8a9dc3"
integrity sha1-HxsNetzlxwboa/2WpaoABb+KncM=
dependencies:
buffer-from "^1.1.0"
xlsx "^0.14.1"
once@^1.3.0:
version "1.4.0"
resolved "https://registry.npm.taobao.org/once/download/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
dependencies:
wrappy "1"
optionator@^0.9.1:
version "0.9.1"
resolved "https://registry.npm.taobao.org/optionator/download/optionator-0.9.1.tgz?cache=0&sync_timestamp=1585966238288&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Foptionator%2Fdownload%2Foptionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499"
integrity sha1-TyNqY3Pa4FZqbUPhMmZ09QwpFJk=
dependencies:
deep-is "^0.1.3"
fast-levenshtein "^2.0.6"
levn "^0.4.1"
prelude-ls "^1.2.1"
type-check "^0.4.0"
word-wrap "^1.2.3"
parent-module@^1.0.0:
version "1.0.1"
resolved "https://registry.npm.taobao.org/parent-module/download/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"
integrity sha1-aR0nCeeMefrjoVZiJFLQB2LKqqI=
dependencies:
callsites "^3.0.0"
path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
path-key@^3.1.0:
version "3.1.1"
resolved "https://registry.npm.taobao.org/path-key/download/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
integrity sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=
prelude-ls@^1.2.1:
version "1.2.1"
resolved "https://registry.npm.taobao.org/prelude-ls/download/prelude-ls-1.2.1.tgz?cache=0&sync_timestamp=1585868608597&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fprelude-ls%2Fdownload%2Fprelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha1-3rxkidem5rDnYRiIzsiAM30xY5Y=
prettier-linter-helpers@^1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/prettier-linter-helpers/download/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
integrity sha1-0j1B/hN1ZG3i0BBNNFSjAIgCz3s=
dependencies:
fast-diff "^1.1.2"
prettier@^2.0.5:
version "2.0.5"
resolved "https://registry.npm.taobao.org/prettier/download/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4"
integrity sha1-1tVigkVSQ/L5LMFxZpLAiqMVItQ=
printj@~1.1.0, printj@~1.1.2:
version "1.1.2"
resolved "https://registry.npm.taobao.org/printj/download/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222"
integrity sha1-2Q3rKXWoufYA+zoclOP0xTx4oiI=
progress@^2.0.0:
version "2.0.3"
resolved "https://registry.npm.taobao.org/progress/download/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
integrity sha1-foz42PW48jnBvGi+tOt4Vn1XLvg=
punycode@^2.1.0:
version "2.1.1"
resolved "https://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpunycode%2Fdownload%2Fpunycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha1-tYsBCsQMIsVldhbI0sLALHv0eew=
regexpp@^3.0.0, regexpp@^3.1.0:
version "3.1.0"
resolved "https://registry.npm.taobao.org/regexpp/download/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2"
integrity sha1-IG0K0KVkjP+9uK5GQ489xRyfeOI=
resolve-from@^4.0.0:
version "4.0.0"
resolved "https://registry.npm.taobao.org/resolve-from/download/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
integrity sha1-SrzYUq0y3Xuqv+m0DgCjbbXzkuY=
rimraf@2.6.3:
version "2.6.3"
resolved "https://registry.npm.taobao.org/rimraf/download/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
integrity sha1-stEE/g2Psnz54KHNqCYt04M8bKs=
dependencies:
glob "^7.1.3"
semver@^7.2.1, semver@^7.3.2:
version "7.3.2"
resolved "https://registry.npm.taobao.org/semver/download/semver-7.3.2.tgz?cache=0&sync_timestamp=1586886267748&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
integrity sha1-YElisFK4HtB4aq6EOJ/7pw/9OTg=
shebang-command@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/shebang-command/download/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
integrity sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=
dependencies:
shebang-regex "^3.0.0"
shebang-regex@^3.0.0:
version "3.0.0"
resolved "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
integrity sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=
slice-ansi@^2.1.0:
version "2.1.0"
resolved "https://registry.npm.taobao.org/slice-ansi/download/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636"
integrity sha1-ys12k0YaY3pXiNkqfdT7oGjoFjY=
dependencies:
ansi-styles "^3.2.0"
astral-regex "^1.0.0"
is-fullwidth-code-point "^2.0.0"
source-map-support@^0.5.19:
version "0.5.19"
resolved "https://registry.npm.taobao.org/source-map-support/download/source-map-support-0.5.19.tgz?cache=0&sync_timestamp=1587719289626&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-support%2Fdownload%2Fsource-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
integrity sha1-qYti+G3K9PZzmWSMCFKRq56P7WE=
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
source-map@^0.6.0:
version "0.6.1"
resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha1-dHIq8y6WFOnCh6jQu95IteLxomM=
sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
ssf@~0.10.2:
version "0.10.3"
resolved "https://registry.npm.taobao.org/ssf/download/ssf-0.10.3.tgz#8eae1fc29c90a552e7921208f81892d6f77acb2b"
integrity sha1-jq4fwpyQpVLnkhII+BiS1vd6yys=
dependencies:
frac "~1.1.2"
string-width@^3.0.0:
version "3.1.0"
resolved "https://registry.npm.taobao.org/string-width/download/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
integrity sha1-InZ74htirxCBV0MG9prFG2IgOWE=
dependencies:
emoji-regex "^7.0.1"
is-fullwidth-code-point "^2.0.0"
strip-ansi "^5.1.0"
strip-ansi@^5.1.0:
version "5.2.0"
resolved "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
integrity sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=
dependencies:
ansi-regex "^4.1.0"
strip-ansi@^6.0.0:
version "6.0.0"
resolved "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
integrity sha1-CxVx3XZpzNTz4G4U7x7tJiJa5TI=
dependencies:
ansi-regex "^5.0.0"
strip-json-comments@^3.1.0:
version "3.1.1"
resolved "https://registry.npm.taobao.org/strip-json-comments/download/strip-json-comments-3.1.1.tgz?cache=0&sync_timestamp=1594567543744&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-json-comments%2Fdownload%2Fstrip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
integrity sha1-MfEoGzgyYwQ0gxwxDAHMzajL4AY=
supports-color@^5.3.0:
version "5.5.0"
resolved "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
integrity sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=
dependencies:
has-flag "^3.0.0"
supports-color@^7.1.0:
version "7.1.0"
resolved "https://registry.npm.taobao.org/supports-color/download/supports-color-7.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1"
integrity sha1-aOMlkd9z4lrRxLSRCKLsUHliv9E=
dependencies:
has-flag "^4.0.0"
table@^5.2.3:
version "5.4.6"
resolved "https://registry.npm.taobao.org/table/download/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e"
integrity sha1-EpLRlQDOP4YFOwXw6Ofko7shB54=
dependencies:
ajv "^6.10.2"
lodash "^4.17.14"
slice-ansi "^2.1.0"
string-width "^3.0.0"
taobao-mini-sdk@0.1.5:
version "0.1.5"
resolved "https://registry.npm.taobao.org/taobao-mini-sdk/download/taobao-mini-sdk-0.1.5.tgz?cache=0&sync_timestamp=1597738826643&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftaobao-mini-sdk%2Fdownload%2Ftaobao-mini-sdk-0.1.5.tgz#7cd64eaa581423c57f841fecd6bf76c827386771"
integrity sha1-fNZOqlgUI8V/hB/s1r92yCc4Z3E=
text-table@^0.2.0:
version "0.2.0"
resolved "https://registry.npm.taobao.org/text-table/download/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
tslib@^1.8.1:
version "1.13.0"
resolved "https://registry.npm.taobao.org/tslib/download/tslib-1.13.0.tgz?cache=0&sync_timestamp=1596752024863&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftslib%2Fdownload%2Ftslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043"
integrity sha1-yIHhPMcBWJTtkUhi0nZDb6mkcEM=
tsutils@^3.17.1:
version "3.17.1"
resolved "https://registry.npm.taobao.org/tsutils/download/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759"
integrity sha1-7XGZF/EcoN7lhicrKsSeAVot11k=
dependencies:
tslib "^1.8.1"
type-check@^0.4.0, type-check@~0.4.0:
version "0.4.0"
resolved "https://registry.npm.taobao.org/type-check/download/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"
integrity sha1-B7ggO/pwVsBlcFDjzNLDdzC6uPE=
dependencies:
prelude-ls "^1.2.1"
type-fest@^0.8.1:
version "0.8.1"
resolved "https://registry.npm.taobao.org/type-fest/download/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
integrity sha1-CeJJ696FHTseSNJ8EFREZn8XuD0=
typescript@^3.9.7:
version "3.9.7"
resolved "https://registry.npm.taobao.org/typescript/download/typescript-3.9.7.tgz?cache=0&sync_timestamp=1597733591530&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftypescript%2Fdownload%2Ftypescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"
integrity sha1-mNYApevcOPQMsndSLxLcgA6eJfo=
uri-js@^4.2.2:
version "4.2.2"
resolved "https://registry.npm.taobao.org/uri-js/download/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
integrity sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=
dependencies:
punycode "^2.1.0"
v8-compile-cache@^2.0.3:
version "2.1.1"
resolved "https://registry.npm.taobao.org/v8-compile-cache/download/v8-compile-cache-2.1.1.tgz?cache=0&sync_timestamp=1590871613090&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fv8-compile-cache%2Fdownload%2Fv8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745"
integrity sha1-VLw83UMxe8qR413K8wWxpyN950U=
which@^2.0.1:
version "2.0.2"
resolved "https://registry.npm.taobao.org/which/download/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
integrity sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=
dependencies:
isexe "^2.0.0"
word-wrap@^1.2.3:
version "1.2.3"
resolved "https://registry.npm.taobao.org/word-wrap/download/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
integrity sha1-YQY29rH3A4kb00dxzLF/uTtHB5w=
wrappy@1:
version "1.0.2"
resolved "https://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
write@1.0.3:
version "1.0.3"
resolved "https://registry.npm.taobao.org/write/download/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3"
integrity sha1-CADhRSO5I6OH5BUSPIZWFqrg9cM=
dependencies:
mkdirp "^0.5.1"
xlsx@^0.14.1:
version "0.14.5"
resolved "https://registry.npm.taobao.org/xlsx/download/xlsx-0.14.5.tgz?cache=0&sync_timestamp=1596167131125&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fxlsx%2Fdownload%2Fxlsx-0.14.5.tgz#3637e914d791bdca7382816e173f7d725ed0e0d2"
integrity sha1-NjfpFNeRvcpzgoFuFz99cl7Q4NI=
dependencies:
adler-32 "~1.2.0"
cfb "^1.1.2"
codepage "~1.14.0"
commander "~2.17.1"
crc-32 "~1.2.0"
exit-on-epipe "~1.0.1"
ssf "~0.10.2"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment