@pisell/pisellos 2.2.116 → 2.2.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server/index.js
CHANGED
|
@@ -370,6 +370,9 @@ var Server = /*#__PURE__*/function () {
|
|
|
370
370
|
skip: (data === null || data === void 0 ? void 0 : data.skip) || 1,
|
|
371
371
|
num: (data === null || data === void 0 ? void 0 : data.num) || 10
|
|
372
372
|
});
|
|
373
|
+
_this.logInfo('Server 劫持 Resource 接口:handleResourceList: 资源列表查询结果', {
|
|
374
|
+
list: list
|
|
375
|
+
});
|
|
373
376
|
return _context6.abrupt("return", {
|
|
374
377
|
code: 200,
|
|
375
378
|
data: {
|
|
@@ -379,7 +382,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
379
382
|
message: '',
|
|
380
383
|
status: true
|
|
381
384
|
});
|
|
382
|
-
case
|
|
385
|
+
case 5:
|
|
383
386
|
case "end":
|
|
384
387
|
return _context6.stop();
|
|
385
388
|
}
|
|
@@ -763,13 +763,16 @@ export var ResourceModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
763
763
|
case 4:
|
|
764
764
|
result = _context8.sent;
|
|
765
765
|
console.log('result', result);
|
|
766
|
+
this.logInfo('setupResourceSync: 资源列表查询结果', {
|
|
767
|
+
result: result
|
|
768
|
+
});
|
|
766
769
|
if (!(result !== null && result !== void 0 && (_result$data = result.data) !== null && _result$data !== void 0 && (_result$data = _result$data.list) !== null && _result$data !== void 0 && _result$data.length)) {
|
|
767
|
-
_context8.next =
|
|
770
|
+
_context8.next = 10;
|
|
768
771
|
break;
|
|
769
772
|
}
|
|
770
|
-
_context8.next =
|
|
773
|
+
_context8.next = 10;
|
|
771
774
|
return this.mergeResourcesToStore(result === null || result === void 0 || (_result$data2 = result.data) === null || _result$data2 === void 0 ? void 0 : _result$data2.list);
|
|
772
|
-
case
|
|
775
|
+
case 10:
|
|
773
776
|
case "end":
|
|
774
777
|
return _context8.stop();
|
|
775
778
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/model/strategy/adapter/promotion/index.ts
|
|
30
|
+
var promotion_exports = {};
|
|
31
|
+
__export(promotion_exports, {
|
|
32
|
+
BUY_X_GET_Y_FREE_STRATEGY: () => import_examples.BUY_X_GET_Y_FREE_STRATEGY,
|
|
33
|
+
PromotionAdapter: () => import_adapter.PromotionAdapter,
|
|
34
|
+
PromotionEvaluator: () => import_evaluator.PromotionEvaluator,
|
|
35
|
+
X_ITEMS_FOR_Y_PRICE_STRATEGY: () => import_examples.X_ITEMS_FOR_Y_PRICE_STRATEGY,
|
|
36
|
+
default: () => import_adapter2.default
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(promotion_exports);
|
|
39
|
+
var import_evaluator = require("./evaluator");
|
|
40
|
+
var import_adapter = require("./adapter");
|
|
41
|
+
var import_adapter2 = __toESM(require("./adapter"));
|
|
42
|
+
var import_examples = require("./examples");
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
BUY_X_GET_Y_FREE_STRATEGY,
|
|
46
|
+
PromotionAdapter,
|
|
47
|
+
PromotionEvaluator,
|
|
48
|
+
X_ITEMS_FOR_Y_PRICE_STRATEGY
|
|
49
|
+
});
|
package/lib/server/index.js
CHANGED
|
@@ -254,6 +254,7 @@ var Server = class {
|
|
|
254
254
|
skip: (data == null ? void 0 : data.skip) || 1,
|
|
255
255
|
num: (data == null ? void 0 : data.num) || 10
|
|
256
256
|
});
|
|
257
|
+
this.logInfo("Server 劫持 Resource 接口:handleResourceList: 资源列表查询结果", { list });
|
|
257
258
|
return {
|
|
258
259
|
code: 200,
|
|
259
260
|
data: { list, count: (list == null ? void 0 : list.length) || 0 },
|
|
@@ -440,6 +440,7 @@ var ResourceModule = class extends import_BaseModule.BaseModule {
|
|
|
440
440
|
}).catch(() => {
|
|
441
441
|
});
|
|
442
442
|
console.log("result", result);
|
|
443
|
+
this.logInfo("setupResourceSync: 资源列表查询结果", { result });
|
|
443
444
|
if ((_b = (_a = result == null ? void 0 : result.data) == null ? void 0 : _a.list) == null ? void 0 : _b.length) {
|
|
444
445
|
await this.mergeResourcesToStore((_c = result == null ? void 0 : result.data) == null ? void 0 : _c.list);
|
|
445
446
|
}
|