@pisell/pisellos 2.2.242 → 2.2.243

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.
@@ -4181,12 +4181,11 @@ var Server = /*#__PURE__*/function () {
4181
4181
  case 4:
4182
4182
  _context45.prev = 4;
4183
4183
  printIdentity = this.getPrintOrderIdentity(params.syncedOrder);
4184
- printIdentity = "".concat(printIdentity, "_").concat(Date.now());
4185
- _context45.next = 9;
4184
+ _context45.next = 8;
4186
4185
  return this.getShortNumberOrDeviceId();
4187
- case 9:
4186
+ case 8:
4188
4187
  deviceId = _context45.sent;
4189
- _context45.next = 12;
4188
+ _context45.next = 11;
4190
4189
  return deviceTask.dispatch({
4191
4190
  action: 'print_all',
4192
4191
  device_id: (_params$deviceId = params.deviceId) !== null && _params$deviceId !== void 0 ? _params$deviceId : deviceId,
@@ -4210,20 +4209,20 @@ var Server = /*#__PURE__*/function () {
4210
4209
  source_type: 'order',
4211
4210
  source_id: printIdentity
4212
4211
  });
4213
- case 12:
4214
- _context45.next = 17;
4212
+ case 11:
4213
+ _context45.next = 16;
4215
4214
  break;
4216
- case 14:
4217
- _context45.prev = 14;
4215
+ case 13:
4216
+ _context45.prev = 13;
4218
4217
  _context45.t0 = _context45["catch"](4);
4219
4218
  this.logError('dispatchPrintOtherReceiptTask: 派发失败', {
4220
4219
  error: _context45.t0 instanceof Error ? _context45.t0.message : String(_context45.t0)
4221
4220
  });
4222
- case 17:
4221
+ case 16:
4223
4222
  case "end":
4224
4223
  return _context45.stop();
4225
4224
  }
4226
- }, _callee45, this, [[4, 14]]);
4225
+ }, _callee45, this, [[4, 13]]);
4227
4226
  }));
4228
4227
  function dispatchPrintOtherReceiptTask(_x49) {
4229
4228
  return _dispatchPrintOtherReceiptTask.apply(this, arguments);
@@ -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
+ });
@@ -2615,7 +2615,6 @@ var Server = class {
2615
2615
  }
2616
2616
  try {
2617
2617
  let printIdentity = this.getPrintOrderIdentity(params.syncedOrder);
2618
- printIdentity = `${printIdentity}_${Date.now()}`;
2619
2618
  const deviceId = await this.getShortNumberOrDeviceId();
2620
2619
  await deviceTask.dispatch({
2621
2620
  action: "print_all",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.2.242",
4
+ "version": "2.2.243",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",