diff --git a/lib/aspects/token.js b/lib/aspects/token.js index 82b953b01..9ecb1b2e2 100644 --- a/lib/aspects/token.js +++ b/lib/aspects/token.js @@ -180,7 +180,7 @@ function setupMobile(mobile, env, context) { systemId: systemId, } } - }, context, { notCollect: true })]; + }, context, { dontCollect: true })]; case 3: result2 = (_h.sent()).result; if (!(result2.length > 0)) return [3 /*break*/, 11]; @@ -324,7 +324,7 @@ function loginByMobile(params, context) { }], indexFrom: 0, count: 1, - }, context, { notCollect: true })]; + }, context, { dontCollect: true })]; case 2: result = (_e.sent()).result; if (!(result.length > 0)) return [3 /*break*/, 4]; @@ -483,10 +483,10 @@ function loginWechat(_a, context) { entity: 'wechatUser', entityId: wechatUser2.id, }, - hint: { - ignoreTrigger: true, - }, - }, context)]; + }, context, { + dummy: 1, + ignoreTrigger: true, + })]; case 5: _e = __read.apply(void 0, [(_r.sent()).result, 1]), token = _e[0]; if (!(token && (0, lodash_1.isEqual)(token.env, env))) return [3 /*break*/, 7]; @@ -738,10 +738,7 @@ function loginWechatMp(_a, context) { entity: 'wechatUser', entityId: wechatUser2.id, }, - hint: { - ignoreTrigger: true, - }, - }, context)]; + }, context, { dummy: 1, ignoreTrigger: true })]; case 5: _e = __read.apply(void 0, [(_r.sent()).result, 1]), token = _e[0]; if (!(token && (0, lodash_1.isEqual)(token.env, env))) return [3 /*break*/, 7]; diff --git a/lib/features/application.js b/lib/features/application.js index 63365943a..210b2bfd4 100644 --- a/lib/features/application.js +++ b/lib/features/application.js @@ -88,7 +88,7 @@ var Application = /** @class */ (function (_super) { } Application.prototype.getApplicationFromCache = function (callback) { return __awaiter(this, void 0, void 0, function () { - var result; + var data; return __generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, this.cache.refresh('application', { @@ -98,9 +98,9 @@ var Application = /** @class */ (function (_super) { } })]; case 1: - result = (_a.sent()).result; - (0, assert_1.assert)(result.length === 1); - this.application = result[0]; + data = (_a.sent()).data; + (0, assert_1.assert)(data.length === 1); + this.application = data[0]; callback(this.application); return [2 /*return*/]; } diff --git a/scripts/cleanDtsAndJs.ts b/scripts/cleanDtsAndJs.ts index 6616426f8..f419a781a 100644 --- a/scripts/cleanDtsAndJs.ts +++ b/scripts/cleanDtsAndJs.ts @@ -7,7 +7,7 @@ function removeDts(path: string) { files.forEach( (file) => { const stat = statSync(join(path, file)); - if (stat.isDirectory() && !['types', 'typings', 'lin-ui'].includes(file)) { + if (stat.isDirectory() && !['types', 'typings', 'miniprogram_npm'].includes(file)) { removeDts(join(path, file)); } else if (file.endsWith('.d.ts') || file.endsWith('.js')) { diff --git a/src/aspects/token.ts b/src/aspects/token.ts index 5a8434801..1a8800556 100644 --- a/src/aspects/token.ts +++ b/src/aspects/token.ts @@ -124,7 +124,7 @@ async function setupMobile 0) { // 此手机号已经存在 assert(result2.length === 1); @@ -255,7 +255,7 @@ export async function loginByMobile 0) { const [captchaRow] = result; if (captchaRow.expired) { @@ -402,10 +402,10 @@ export async function loginWechat) => void) { - const { result } = await this.cache.refresh('application', { + const { data } = await this.cache.refresh('application', { data: projection, filter: { id: this.applicationId, } }); - assert(result.length === 1); - this.application = result[0] as any; + assert(data.length === 1); + this.application = data[0] as any; callback(this.application!); } diff --git a/src/triggers/user.ts b/src/triggers/user.ts index 8a491e8c6..d0113a054 100644 --- a/src/triggers/user.ts +++ b/src/triggers/user.ts @@ -91,7 +91,7 @@ const triggers: Trigger>[] await context.rowStore.operate('token', { action: 'update', data: { - userId: filter!.id, + userId: filter!.id as string, }, filter: { id,