@posx/core 5.5.509 → 5.5.510

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.
Files changed (44) hide show
  1. package/AGENTS.md +24 -0
  2. package/CLAUDE.md +23 -23
  3. package/LICENSE +21 -21
  4. package/README.md +85 -85
  5. package/build/index.d.ts +4 -0
  6. package/build/index.js +1 -1
  7. package/jest.config.cjs +36 -36
  8. package/jest.setup.cjs +80 -80
  9. package/memo/technical-docs/01_ARCHITECTURE.md +147 -0
  10. package/memo/technical-docs/02_CORE_BUSINESS.md +292 -0
  11. package/memo/technical-docs/03_UI_COMPONENTS.md +59 -0
  12. package/memo/technical-docs/04_VIEWS.md +82 -0
  13. package/memo/technical-docs/05_DATA_LAYER.md +375 -0
  14. package/memo/technical-docs/06_CROSS_PLATFORM.md +246 -0
  15. package/memo/technical-docs/07_SIMILARITY_INDEX.md +195 -0
  16. package/memo/technical-docs/CHECKPOINT.md +46 -0
  17. package/memo/technical-docs/PROJECT_OVERVIEW.md +122 -0
  18. package/memo/technical-docs/TECHNICAL_DOCS_PLAN.md +77 -0
  19. package/package.json +1 -1
  20. package/package.publish.json +121 -121
  21. package/tsdown.config.ts +21 -21
  22. package/vite.config.ts +86 -86
  23. package/dev/.stfolder/syncthing-folder-9a95b7.txt +0 -5
  24. package/dev/98894488.xlsx +0 -0
  25. package/dev/HappyThaiSembawang.csv +0 -336
  26. package/dev/KB/create-new-model.md +0 -34
  27. package/dev/KB/markdown-lint.md +0 -14
  28. package/dev/KB/readmefirst.md +0 -6
  29. package/dev/Merchants/HappyThaiSembawang.csv +0 -400
  30. package/dev/Merchants/HappyThaiSembawang.xlsx +0 -0
  31. package/dev/Product_Import_Template.xlsx +0 -0
  32. package/dev/XPOS Invoice Module.pdf +0 -232
  33. package/dev/data/invoice.json +0 -1
  34. package/dev/escpos/receipt.bin +0 -0
  35. package/dev/escpos/receipt.hex +0 -1
  36. package/dev/escpos/receipt.json +0 -1
  37. package/dev/escpos-cli-usage.md +0 -103
  38. package/dev/harbor-harness-deployment.md +0 -78
  39. package/dev/nginx-harbor-harness.conf +0 -84
  40. package/dev/px-cli.md +0 -97
  41. package/dev/test-logs/2026-02.md +0 -5
  42. package/dev/tmp/xpos_product_import(1).csv +0 -338
  43. package/dev/tmp/xpos_product_import_fixed.csv +0 -338
  44. package/dev//344/272/247/345/223/201/345/257/274/345/205/245/346/250/241/346/235/277.xlsx +0 -0
@@ -1 +0,0 @@
1
- {"uid":"inv_iWcYcdv1YNoZC0aGwQxj5","updated_at":"2026-02-14T12:32:28.321Z","created_at":"2026-02-14T12:32:38.731Z","created_at_timestamp":1771072358731,"ref_id":"01260214000001601","call_num":"601","table_uid":"sit_2hPwnc9KSpi39Sn3sFlOi","table_name":"Grab","type":"dine_in","pax":0,"adult_pax":0,"child_pax":0,"baby_pax":0,"subtotal":70000,"point_subtotal":0,"service_chargeable_subtotal":70000,"discountable_subtotal":70000,"service_charge":0,"delivery_id":0,"delivery_charge":0,"delivery_type":"","delivery_by":"","use_customer_point":false,"add_point":0,"minus_point":0,"rewarded_point_rate":0,"rewarded_point":0,"use_customer_balance":false,"add_credit":0,"minus_credit":0,"rewarded_credit_rate":0,"rewarded_credit":0,"discounts":[],"discount_amount":0,"tax":5185.19,"rounding":0,"tip":0,"grand_total":70000,"customer_id":0,"remark":"","sales_user_uid":"","status":"paid","paid_at":"2026-02-14T12:32:38.712Z","voided_at":"1970-01-01T00:00:00.000Z","humanized_paid_at":"14/02/2026 19:32:38","humanized_voided_at":"","humanized_created_at":"14/02/2026 19:32:38","order_id":0,"to_address":{"address1":"","address2":"","lat":"","lng":"","postcode":"","note":"","is_default":false,"name":"","salute":"","phone_number":""},"payment_source_method":"","payment_source_last4":"","payment_source_charge_ref":"","is_sales_exclusive":false,"etc":{},"lines":[{"uid":"iln_qLuhso1UqVWH9ox6JsfGU","updated_at":"2026-02-14T12:32:32.978Z","created_at":"2026-02-14T12:32:32.978Z","created_at_timestamp":1771072352978,"item_uid":"itm_4iQMHedTPbCp3mFokLSvx","price":70000,"unit_of_measure":"quantity","quantity":1,"remark":"","invoice_uid":"","discount_calc_type":"flat","discount_amount":0,"discount_percent":0,"subtotal":70000,"subtotal_before_discount":70000,"item":{"uid":"itm_4iQMHedTPbCp3mFokLSvx","updated_at":"2026-02-13T12:29:18.955Z","created_at":"2025-11-17T07:27:37.134Z","created_at_timestamp":1763364457134,"name":"Grab - H\u1ED3ng Tr\u00E0 S\u1EEFa","name_translations":{"en":"Grab - Black Milk Tea"},"description":"(olong green tea, roasted olong, (avocado,condensed milk,Tapioca white pearl )","description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":170011,"image_url":"https://app.posx.ai/images/93da00e8-5cda-4cbf-be37-0b483b8a99cc.jpg","image_file_path":"","image_thumbnail_url":"https://app.posx.ai/images/93da00e8-5cda-4cbf-be37-0b483b8a99cc.thumbnail.jpg","image_thumbnail_file_path":"","sku":"","type":"by_quantity","barcode":"","category_uid":"cat_nDSPXlpMaHVMyBubKEpO2","price":70000,"original_price":0,"prices":[],"stock":-34,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"codename":"","recipe":"CP003-B01-W01","add_credit":0,"subcategory_uid":"","unit":0,"sold":0,"open_editor":true,"minus_point":0,"cost":0,"discountable":true,"printing_sequence":0,"recommended":false,"likes":0,"dislikes":0,"is_tax_exempt":false,"is_service_charge_exempt":false,"is_point_reward_exempt":false,"is_credit_reward_exempt":false,"is_delisted":false,"kitchen_printers_uids":["prt_UBY9G95mCuHgtg34tnD7H"],"order_printers_uids":[],"label_printers_uids":["prt_B1R1W19J1LRa14nraxiz2"],"open_editor_panel":true,"open_price_editor":true,"combo_groups":[],"id_in_server":9375,"_timestamp":1770985758771696,"modifier_categories":[{"min_order":1,"max_order":1,"sequence":4,"name":"Sugar Level","uid":"imc_5TG1isS3rDcW-TtE9mPvP"},{"min_order":1,"max_order":1,"sequence":3,"name":"Ice","uid":"imc_MA0C7z9B2GHEAplgfMSFc"},{"min_order":1,"max_order":1,"sequence":6,"name":"Topping one","uid":"imc_vQfQFta5UdBpn9KzyItRr"},{"min_order":0,"max_order":0,"sequence":7,"name":"Topping","uid":"imc_UH7jvReaP3k2tyuMUWAm_"}],"modifiers":[{"uid":"iod_JK30rn-ELHCiYyqGy-qi8","updated_at":"2025-11-29T12:05:26.892Z","created_at":"2025-11-29T12:05:26.892Z","created_at_timestamp":1764417926892,"name":"0%","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":4001,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_5TG1isS3rDcW-TtE9mPvP","price":0,"original_price":0,"prices":[],"stock":1000,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":"T05"},{"uid":"iod_2SBZM4Yg0XmqsS3kC9JX1","updated_at":"2025-11-29T12:05:41.197Z","created_at":"2025-11-29T12:05:41.197Z","created_at_timestamp":1764417941197,"name":"30%","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":4002,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_5TG1isS3rDcW-TtE9mPvP","price":0,"original_price":0,"prices":[],"stock":999,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":"T04"},{"uid":"iod_dilkDd6CXmVxDEtoc_cyl","updated_at":"2025-11-29T12:05:51.459Z","created_at":"2025-11-29T12:05:51.459Z","created_at_timestamp":1764417951459,"name":"50%","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":4003,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_5TG1isS3rDcW-TtE9mPvP","price":0,"original_price":0,"prices":[],"stock":994,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":"T03"},{"uid":"iod_wI5ynNWhF2-e2l8wHMYo7","updated_at":"2025-11-29T12:05:59.937Z","created_at":"2025-11-29T12:05:59.937Z","created_at_timestamp":1764417959937,"name":"70%","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":4004,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_5TG1isS3rDcW-TtE9mPvP","price":0,"original_price":0,"prices":[],"stock":999,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":"T02"},{"uid":"iod_UfyyYSUwqyfa5Fek9guGA","updated_at":"2025-11-29T12:06:08.590Z","created_at":"2025-11-29T12:06:08.590Z","created_at_timestamp":1764417968590,"name":"100%","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":4005,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_5TG1isS3rDcW-TtE9mPvP","price":0,"original_price":0,"prices":[],"stock":978,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":"T01"},{"uid":"iod_Wt1BN3gK_ck1HrVeUAbDd","updated_at":"2025-11-30T07:56:42.422Z","created_at":"2025-11-30T07:56:42.422Z","created_at_timestamp":1764489402422,"name":"0%","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":3001,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_MA0C7z9B2GHEAplgfMSFc","price":0,"original_price":0,"prices":[],"stock":1000,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},{"uid":"iod_mMLNAEzOKtY2epTp4gVYN","updated_at":"2025-11-30T07:56:57.428Z","created_at":"2025-11-30T07:56:57.428Z","created_at_timestamp":1764489417428,"name":"50%","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":3002,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_MA0C7z9B2GHEAplgfMSFc","price":0,"original_price":0,"prices":[],"stock":997,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},{"uid":"iod_ZahQa5c3NVufqLt-J_YTw","updated_at":"2025-11-30T07:57:06.578Z","created_at":"2025-11-30T07:57:06.578Z","created_at_timestamp":1764489426578,"name":"70%","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":3003,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_MA0C7z9B2GHEAplgfMSFc","price":0,"original_price":0,"prices":[],"stock":998,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},{"uid":"iod_gJcG8TTG20hD9BQLWCQGZ","updated_at":"2025-11-30T07:57:15.527Z","created_at":"2025-11-30T07:57:15.527Z","created_at_timestamp":1764489435527,"name":"100%","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":3004,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_MA0C7z9B2GHEAplgfMSFc","price":0,"original_price":0,"prices":[],"stock":975,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},{"uid":"iod_gj9FzI7-W64UmxsFr5IBr","updated_at":"2025-12-01T02:43:49.893Z","created_at":"2025-12-01T02:43:49.893Z","created_at_timestamp":1764557029893,"name":"Kem Mu\u1ED1i","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":6001,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_vQfQFta5UdBpn9KzyItRr","price":0,"original_price":0,"prices":[],"stock":1000,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},{"uid":"iod_qJbUtYkEmbxWCVP05oOpa","updated_at":"2025-12-01T02:44:36.158Z","created_at":"2025-12-01T02:44:36.158Z","created_at_timestamp":1764557076158,"name":"Kem Tiramisu","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":6002,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_vQfQFta5UdBpn9KzyItRr","price":0,"original_price":0,"prices":[],"stock":998,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},{"uid":"iod_NC_3a3Jx4Ss67wgQ7gxku","updated_at":"2025-12-01T02:44:43.988Z","created_at":"2025-12-01T02:44:43.988Z","created_at_timestamp":1764557083988,"name":"Kem Matcha","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":6003,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_vQfQFta5UdBpn9KzyItRr","price":0,"original_price":0,"prices":[],"stock":998,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},{"uid":"iod_ys_x93jxoF45IxkQdn1V5","updated_at":"2025-12-01T02:44:52.823Z","created_at":"2025-12-01T02:44:52.823Z","created_at_timestamp":1764557092823,"name":"Kem Khoai M\u00F4n","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":6004,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_vQfQFta5UdBpn9KzyItRr","price":0,"original_price":0,"prices":[],"stock":1000,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},{"uid":"iod_X8sPo6TuUmiyWKUMIt2En","updated_at":"2025-12-01T02:39:12.571Z","created_at":"2025-12-01T02:39:12.571Z","created_at_timestamp":1764556752571,"name":"H\u1EA1t Sen","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":7001,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_UH7jvReaP3k2tyuMUWAm_","price":20000,"original_price":0,"prices":[],"stock":1000,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},{"uid":"iod_NP_ELMackBiRKt4zUJuYm","updated_at":"2025-12-01T02:39:22.344Z","created_at":"2025-12-01T02:39:22.344Z","created_at_timestamp":1764556762344,"name":"Tr\u00E2n Ch\u00E2u Tr\u1EAFng","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":7002,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_UH7jvReaP3k2tyuMUWAm_","price":10000,"original_price":0,"prices":[],"stock":1000,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},{"uid":"iod_Pv_E-aBfwnFUDobeVZQrj","updated_at":"2025-12-01T02:39:29.101Z","created_at":"2025-12-01T02:39:29.101Z","created_at_timestamp":1764556769101,"name":"Tr\u00E2n Ch\u00E2u \u0110\u01B0\u1EDDng \u0110en","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":7003,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_UH7jvReaP3k2tyuMUWAm_","price":10000,"original_price":0,"prices":[],"stock":1000,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},{"uid":"iod_srhIckzDJzrX_ngNlzWEi","updated_at":"2025-12-01T02:39:38.616Z","created_at":"2025-12-01T02:39:38.616Z","created_at_timestamp":1764556778617,"name":"Th\u1EA1ch Chanh V\u00E0ng","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":7004,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_UH7jvReaP3k2tyuMUWAm_","price":10000,"original_price":0,"prices":[],"stock":999,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},{"uid":"iod_tAxh_GII-A9nxPYQQ7pXH","updated_at":"2025-12-01T02:39:46.145Z","created_at":"2025-12-01T02:39:46.145Z","created_at_timestamp":1764556786145,"name":"Th\u1EA1ch Nha \u0110am","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":7005,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_UH7jvReaP3k2tyuMUWAm_","price":10000,"original_price":0,"prices":[],"stock":1000,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},{"uid":"iod_DfzW0yeeEDGjfLPDyMDP9","updated_at":"2025-12-01T02:39:52.931Z","created_at":"2025-12-01T02:39:52.931Z","created_at_timestamp":1764556792931,"name":"B\u00E1nh L\u1ECDt","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":7006,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_UH7jvReaP3k2tyuMUWAm_","price":10000,"original_price":0,"prices":[],"stock":1000,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},{"uid":"iod_dSHn36b5-UNatGPAXTA7-","updated_at":"2025-12-01T02:40:01.345Z","created_at":"2025-12-01T02:40:01.345Z","created_at_timestamp":1764556801345,"name":"Kh\u00FAc B\u1EA1ch","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":7007,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_UH7jvReaP3k2tyuMUWAm_","price":15000,"original_price":0,"prices":[],"stock":999,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},{"uid":"iod_JwZio9Uv3BpOwQeDUgJt1","updated_at":"2025-12-01T02:40:11.646Z","created_at":"2025-12-01T02:40:11.646Z","created_at_timestamp":1764556811646,"name":"Nh\u00E3n Ng\u00E2m","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":7008,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_UH7jvReaP3k2tyuMUWAm_","price":20000,"original_price":0,"prices":[],"stock":1000,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},{"uid":"iod_mmjGhQEIMoIT_v2Aopqre","updated_at":"2025-12-01T02:40:22.943Z","created_at":"2025-12-01T02:40:22.943Z","created_at_timestamp":1764556822943,"name":"\u0110\u00E0o Mi\u1EBFng","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":7009,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_UH7jvReaP3k2tyuMUWAm_","price":20000,"original_price":0,"prices":[],"stock":1000,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""}],"print_template_uid":""},"point":0,"point_subtotal":0,"up_size":false,"is_take_out":false,"is_duplicate":false,"is_combo":false,"is_combo_item":false,"combo_group_uid":"","combo_line_uid":"","modifiers":[{"item_uid":"iod_gJcG8TTG20hD9BQLWCQGZ","item":{"uid":"iod_gJcG8TTG20hD9BQLWCQGZ","updated_at":"2025-11-30T07:57:15.527Z","created_at":"2025-11-30T07:57:15.527Z","created_at_timestamp":1764489435527,"name":"100%","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":3004,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_MA0C7z9B2GHEAplgfMSFc","price":0,"original_price":0,"prices":[],"stock":975,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":""},"price":0,"unit_of_measure":"quantity","quantity":1,"sent":0,"is_cancel_printed":false,"selected":false,"sales_user_uid":""},{"item_uid":"iod_UfyyYSUwqyfa5Fek9guGA","item":{"uid":"iod_UfyyYSUwqyfa5Fek9guGA","updated_at":"2025-11-29T12:06:08.590Z","created_at":"2025-11-29T12:06:08.590Z","created_at_timestamp":1764417968590,"name":"100%","name_translations":{},"description_translations":{},"meta":{},"etc":{},"assets":{},"config":{"online_order_display_large_image":false},"is_internal":false,"color":"","icon":"","sequence":4005,"image_url":"","image_file_path":"","image_thumbnail_url":"","image_thumbnail_file_path":"","visibility":[],"sku":"","type":"modifier","barcode":"","category_uid":"imc_5TG1isS3rDcW-TtE9mPvP","price":0,"original_price":0,"prices":[],"stock":978,"print_on_receipt":true,"price_adjustable":false,"is_sold_out":false,"recipe":"T01"},"price":0,"unit_of_measure":"quantity","quantity":1,"sent":0,"is_cancel_printed":false,"selected":false,"sales_user_uid":""}],"duplicated_from_uid":"","sent":1,"is_cancel_printed":false,"selected":false,"sales_user_uid":"","meta":{}}],"deleted_lines":[],"payment_has_cash":false,"payments":[{"uid":"pay_rqbYCVJ0tM9YqEtBBGGFg","updated_at":"2026-02-14T12:32:38.646Z","created_at":"2026-02-14T12:32:38.646Z","created_at_timestamp":1771072358646,"invoice_uid":"inv_iWcYcdv1YNoZC0aGwQxj5","tender_amount":70000,"change_amount":0,"payment_method_uid":"pmd_w5xPnDgpTeU2qufEmt9qz","payment_method_code":"ZALO","payment_method_name":"Zalo Pay","payment_method":{"uid":"pmd_w5xPnDgpTeU2qufEmt9qz","updated_at":"2026-01-24T15:20:40.450Z","created_at":"2025-11-25T06:02:37.244Z","created_at_timestamp":1764050557244,"deleted_at":null,"name":"Zalo Pay","name_translations":{},"sequence":0,"payment_currency_id":0,"currency_code":"","currency_symbol":"$","payment_method_code":"ZALO","codename":"","name_abbrev":"","enable_drawer":false,"enable_receipt":true,"image_url":"https://revopos-cdn.sgp1.digitaloceanspaces.com/4d49a465-47bb-44ca-8cdc-59f58c40e0cf.png","is_cash":false,"is_integrated":true,"is_disabled":false,"type":0,"api_id":"","api_key":"","is_sales_exclusive":false,"id_in_server":6742,"_timestamp":1768964152742600,"custom_image_url":"","enable_credit_validation":false,"enable_customer_validation":false,"is_cancellable":false},"payment_method_history":{"uid":"pmd_w5xPnDgpTeU2qufEmt9qz","updated_at":"2026-01-24T15:20:40.450Z","created_at":"2025-11-25T06:02:37.244Z","created_at_timestamp":1764050557244,"deleted_at":null,"name":"Zalo Pay","name_translations":{},"sequence":0,"payment_currency_id":0,"currency_code":"","currency_symbol":"$","payment_method_code":"ZALO","codename":"","name_abbrev":"","enable_drawer":false,"enable_receipt":true,"image_url":"https://revopos-cdn.sgp1.digitaloceanspaces.com/4d49a465-47bb-44ca-8cdc-59f58c40e0cf.png","is_cash":false,"is_integrated":true,"is_disabled":false,"type":0,"api_id":"","api_key":"","is_sales_exclusive":false,"id_in_server":6742,"_timestamp":1768964152742600,"custom_image_url":"","enable_credit_validation":false,"enable_customer_validation":false,"is_cancellable":false,"changed_at":"2026-02-14T14:34:38.555Z"}}],"table_switch_id":0,"employee_uid":"emp_ux2a3RLr1KZDYuHz_B7AP","employee_name":"Hamster","receipt_print_override":false,"customer":{"id":0,"ref_id":"","image_url":"","stripe_token":"","stripe_customer_id":"","username":"","normalized_username":"","company":"","ic":"","display_name":"","full_name":"","birth_date":"","gender":"","address":"","postcode":"","note":"","language":"","time_zone":"","created_at":"2026-02-14T12:32:28.322Z","updated_at":"2026-02-14T12:32:28.322Z","license_ids":"","security_stamp":"","phone_number":"","license_id":0,"credit":0,"point":0,"transaction_total":0,"transaction_time":0,"user_group_id":0,"user_group_name":"","error":""},"is_duplicate":false,"kitchen_print_override":false,"otp":"","activities":[],"receipt_print_job_uid":"pjb_6AY0c1t9DYoqZfiglWruH","kitchen_print_job_uids":[["pjb_6lIIH_bLvO2QJJ701v4Hx"]],"label_print_job_uids":[["pjb_TEy4QwnyPiP_ryRMpMNNB"]],"charges":[],"is_charge_triggered":false,"meta":{"total_item_quantity":1},"price_lookup_key":"","id_in_server":252475,"_timestamp":1771079680743354}
Binary file
@@ -1 +0,0 @@
1
- 1B401B45001B34001B2D000A1B45011B61011D2111204861707079205468616920466F6F64202D20566963746F727920380A1D21001B45001B34001B2D000A1B45011B610138204A616C616E204C6567756E6469202330312D313020566963746F727920380A1B45001B34001B2D000A1B45011B610154656C3A2036373134363638320A1B45001B34001B2D000A1B45011B610044696E652D496E0A1B45001B34001B2D000A1B45011B6100232030313236303231303030303030313437320A1B45001B34001B2D000A1B45011B61001D21115461626C653A31350A1D21001B45001B34001B2D000A1B45011B61001D21114F52444552204E4F2E3A203437320A1D21001B45001B34001B2D000A1B45011B61005365727665642042793A61646D696E0A1B45001B34001B2D000A1B45011B6100446174653A323032362D4665622D31302031333A34313A35340A1B45001B34001B2D000A1B45001B34001B2D002D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D0A1B45014954454D20202020202020202020202020202020202020202020202051545920202020414D542020202020202020200A1B45001B34001B2D002D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D0A1B45011B61004D332E204761726C696320467269656420506F726B20202020202020783120202020202431332E39302020202020200A1B45011B61005445352E20436869636B656E204F6D656C65747465202020202020207831202020202024372E3930202020202020200A1B45011B61004E44322E20506861642073656520457720284B7761792054202020207831202020202024392E3930202020202020200A656F772920536561666F6F6420202020202020202020202020202020202020202020202020202020202020202020200A1B45011B610041342E205468616920507261776E2043616B65202834205020202020783120202020202431332E39302020202020200A69656365732920202020202020202020202020202020202020202020202020202020202020202020202020202020200A1B45011B6100445231312E2054686169204D696C6B205465612020202020202020207831202020202024342E3530202020202020200A1B45011B61004452372E204C656D6F6E6772617373204472696E6B202020202020207831202020202024332E3930202020202020200A1B45001B34001B2D001B61002D2020436F6C642020202020202020202020202020202020202020207B7B7D7D2020202020202020202020202020200A1B45001B34001B2D000A1B45001B34001B2D002D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D0A1B45011B6100535542544F54414C202020202020202020202020202020202020202020202020202020202435342E30302020202020200A1B450131302520534552564943452043484152474520202020202020202020202020202020202024352E3430202020202020200A1B4501544F54414C202020202020202020202020202020202020202020202020202020202020202435392E34302020202020200A1B45001B34001B2D002D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D0A1B45015041594D454E542042593A466975752020202020202020202020202020202020202020202435392E34302020202020200A1B45001B34001B2D002D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D0A1B45015041594D454E5420545950452020202020202020202020204D41535445524341524420202020202020202020202020200A1B45015245462020202020202020202020202020202020202020203334383732363039343320202020202020202020202020200A1B450143415244204E554D202020202020202020202020202020202A2A2A2A202A2A2A2A202A2A2A2A203130343020202020200A1B4501435553544F4D45522054454C2020202020202020202020202020202020202020202020202B36352A2A2A2A34383436200A1B450143617368204261636B20202020202020202020202020202020202020202020202020202024312E3738202020202020200A1B45014372656469742042616C616E63652020202020202020202020202020202020202020202024312E3738202020202020200A1B4501506F696E742042616C616E636520202020202020202020202020202020202020202020207074202020202020202020200A1B45001B34001B2D002D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D0A1B45011B610138204A616C616E204C6567756E6469202330312D313020566963746F727920380A1B45001B34001B2D000A0A0A0A0A1B45001B34001B2D000A1B45001B34001B2D000A1B45001B34001B2D000A1B45001B34001B2D001D5600
@@ -1 +0,0 @@
1
- {"uid": "pjb_I8RJcR0Hm6iMsYSzmIDRd", "updated_at": "2026-02-10T05:41:54.209Z", "created_at": "2026-02-10T05:41:54.356Z", "created_at_timestamp": 1770702114356, "deleted_at": null, "name_translations": {}, "printer_name": "Receipt Printer", "driver_printer_name": "Receipt Printer", "printer_ip": "0.0.0.0", "printer_uid": "prt_eJ5yITaByzBnAXSz1IvhF", "printer_type": "receipt_printer", "protocol": "ESC/POS", "connection_type": "WINDOWS_DRIVER", "data": {"codepage": "cp936", "items": [{"type": "newline", "repeat": 1}, {"type": "text", "align": "center", "style": "bold", "item": {"size": "custom", "width": 1, "height": 1, "text": " Happy Thai Food - Victory 8"}}, {"type": "newline", "repeat": 1}, {"type": "text", "align": "center", "style": "bold", "item": {"text": "8 Jalan Legundi #01-10 Victory 8"}}, {"type": "newline", "repeat": 1}, {"type": "text", "align": "center", "style": "bold", "item": {"text": "Tel: 67146682"}}, {"type": "newline", "repeat": 1}, {"type": "text", "align": "left", "style": "bold", "item": {"text": "Dine-In"}}, {"type": "newline", "repeat": 1}, {"type": "text", "align": "left", "style": "bold", "item": {"text": "# 01260210000001472"}}, {"type": "newline", "repeat": 1}, {"type": "text", "align": "left", "style": "bold", "item": {"size": "custom", "width": 1, "height": 1, "text": "Table:15"}}, {"type": "newline", "repeat": 1}, {"type": "text", "align": "left", "style": "bold", "item": {"size": "custom", "width": 1, "height": 1, "text": "ORDER NO.: 472"}}, {"type": "newline", "repeat": 1}, {"type": "text", "align": "left", "style": "bold", "item": {"text": "Served By:admin"}}, {"type": "newline", "repeat": 1}, {"type": "text", "align": "left", "style": "bold", "item": {"text": "Date:2026-Feb-10 13:41:54"}}, {"type": "newline", "repeat": 1}, {"type": "line"}, {"type": "table", "style": "bold", "table": {"items": [{"text": "ITEM", "column_width": 50}, {"text": "", "column_width": 10}, {"text": "QTY", "column_width": 15}, {"text": "AMT", "column_width": 25}]}}, {"type": "line"}, {"type": "table", "align": "left", "style": "bold", "table": {"items": [{"text": "M3. Garlic Fried Pork ", "column_width": 50}, {"text": "", "column_width": 10}, {"text": "x1", "column_width": 15}, {"text": "$13.90", "column_width": 25}]}}, {"type": "table", "align": "left", "style": "bold", "table": {"items": [{"text": "TE5. Chicken Omelette ", "column_width": 50}, {"text": "", "column_width": 10}, {"text": "x1", "column_width": 15}, {"text": "$7.90", "column_width": 25}]}}, {"type": "table", "align": "left", "style": "bold", "table": {"items": [{"text": "ND2. Phad see Ew (Kway Teow) Seafood ", "column_width": 50}, {"text": "", "column_width": 10}, {"text": "x1", "column_width": 15}, {"text": "$9.90", "column_width": 25}]}}, {"type": "table", "align": "left", "style": "bold", "table": {"items": [{"text": "A4. Thai Prawn Cake (4 Pieces) ", "column_width": 50}, {"text": "", "column_width": 10}, {"text": "x1", "column_width": 15}, {"text": "$13.90", "column_width": 25}]}}, {"type": "table", "align": "left", "style": "bold", "table": {"items": [{"text": "DR11. Thai Milk Tea ", "column_width": 50}, {"text": "", "column_width": 10}, {"text": "x1", "column_width": 15}, {"text": "$4.50", "column_width": 25}]}}, {"type": "table", "align": "left", "style": "bold", "table": {"items": [{"text": "DR7. Lemongrass Drink ", "column_width": 50}, {"text": "", "column_width": 10}, {"text": "x1", "column_width": 15}, {"text": "$3.90", "column_width": 25}]}}, {"type": "table", "align": "left", "table": {"items": [{"text": "- Cold ", "column_width": 50}, {"text": "", "column_width": 10}, {"text": "{{}}", "column_width": 15}, {"text": "", "column_width": 25}]}}, {"type": "newline", "repeat": 1}, {"type": "line"}, {"codepage": "cp437", "type": "table", "align": "left", "style": "bold", "table": {"items": [{"text": "SUBTOTAL", "column_width": 50}, {"text": "", "column_width": 25}, {"text": "$54.00", "column_width": 25}]}}, {"codepage": "cp437", "type": "table", "style": "bold", "table": {"items": [{"text": "10% SERVICE CHARGE", "column_width": 50}, {"text": "", "column_width": 25}, {"text": "$5.40", "column_width": 25}]}}, {"codepage": "cp437", "type": "table", "style": "bold", "size": "custom", "width": 1, "height": 1, "table": {"items": [{"text": "TOTAL", "column_width": 50}, {"text": "", "column_width": 25}, {"text": "$59.40", "column_width": 25}]}}, {"type": "line"}, {"codepage": "cp437", "type": "table", "style": "bold", "table": {"items": [{"text": "PAYMENT BY:Fiuu", "column_width": 50}, {"text": "", "column_width": 25}, {"text": "$59.40", "column_width": 25}]}}, {"type": "line"}, {"codepage": "cp437", "type": "table", "style": "bold", "table": {"items": [{"text": "PAYMENT TYPE", "column_width": 50}, {"text": "MASTERCARD", "column_width": 50}]}}, {"codepage": "cp437", "type": "table", "style": "bold", "table": {"items": [{"text": "REF", "column_width": 50}, {"text": "3487260943", "column_width": 50}]}}, {"codepage": "cp437", "type": "table", "style": "bold", "table": {"items": [{"text": "CARD NUM", "column_width": 50}, {"text": "**** **** **** 1040", "column_width": 50}]}}, {"type": "table", "style": "bold", "table": {"items": [{"text": "CUSTOMER TEL", "column_width": 50}, {"text": "", "column_width": 25}, {"text": "\u002B65****4846", "column_width": 25}]}}, {"type": "table", "style": "bold", "table": {"items": [{"text": "Cash Back", "column_width": 50}, {"text": "", "column_width": 25}, {"text": "$1.78", "column_width": 25}]}}, {"type": "table", "style": "bold", "table": {"items": [{"text": "Credit Balance", "column_width": 50}, {"text": "", "column_width": 25}, {"text": "$1.78", "column_width": 25}]}}, {"type": "table", "style": "bold", "table": {"items": [{"text": "Point Balance", "column_width": 50}, {"text": "", "column_width": 25}, {"text": "pt", "column_width": 25}]}}, {"type": "line"}, {"type": "text", "align": "center", "style": "bold", "item": {"text": "8 Jalan Legundi #01-10 Victory 8"}}, {"type": "newline", "repeat": 5}, {"type": "newline", "repeat": 1}, {"type": "newline", "repeat": 1}, {"type": "newline", "repeat": 1}, {"type": "cut"}]}, "status": "printed", "retries": 0, "commands": "", "save_only": false, "print_times": 1, "printed": 1, "device_uid_to_print": "", "designated_table_section_uids": [], "job_id": 0, "print_sequence": 0, "meta": {}, "id_in_server": 1044494, "_timestamp": 1770702115370025}
@@ -1,103 +0,0 @@
1
- # ESC/POS CLI Tool Usage Manual
2
-
3
- Generate ESC/POS byte files from print job JSON definitions.
4
-
5
- ## Files
6
-
7
- - `scripts/generate-escpos-bytes.mjs` - ESC/POS byte generator with built-in encoder
8
- - `scripts/example-print-job.json` - Example print job for testing
9
-
10
- ## Usage
11
-
12
- ```bash
13
- npm run escpos -- <input.json> <output.bin>
14
- ```
15
-
16
- ## Example
17
-
18
- ```bash
19
- npm run escpos -- ./scripts/example-print-job.json ./receipt.bin
20
- ```
21
-
22
- ## Supported Features
23
-
24
- | Feature | Description |
25
- |---------|-------------|
26
- | Text | With size, bold, italic, underline, alignment |
27
- | Tables | With column widths and text wrapping |
28
- | Lines | Separators |
29
- | QR codes | Model, size, error level configurable |
30
- | Barcodes | EAN13, UPC-A, UPC-E, EAN8, Code39, ITF, Codabar |
31
- | Newlines | With repeat count |
32
- | Cut | Full or partial |
33
- | Beeper | Audible alert |
34
- | Cash drawer | Open cash drawer command |
35
- | VISCII codepage | Vietnamese support |
36
- | Multiple codepages | cp437, cp850, cp936, etc. |
37
-
38
- ## Not Supported
39
-
40
- - **Image printing** - Requires browser APIs, not available in CLI mode
41
-
42
- ## Print Job JSON Format
43
-
44
- ```json
45
- {
46
- "codepage": "cp936",
47
- "items": [
48
- {
49
- "type": "text",
50
- "align": "center",
51
- "style": "bold",
52
- "item": {
53
- "text": "RECEIPT",
54
- "size": "normal",
55
- "line_width": 48
56
- }
57
- },
58
- {
59
- "type": "table",
60
- "table": {
61
- "size": "normal",
62
- "line_width": 48,
63
- "items": [
64
- { "text": "Item", "column_width": 50 },
65
- { "text": "Qty", "column_width": 20 },
66
- { "text": "Price", "column_width": 30 }
67
- ]
68
- }
69
- },
70
- {
71
- "type": "qrcode",
72
- "align": "center",
73
- "qrcode": {
74
- "data": "https://example.com",
75
- "model": 2,
76
- "size": 6,
77
- "errorlevel": "m"
78
- }
79
- },
80
- {
81
- "type": "cut"
82
- }
83
- ]
84
- }
85
- ```
86
-
87
- ## Available Types
88
-
89
- | Type | Properties |
90
- |------|------------|
91
- | `text` | `item.text`, `item.size`, `item.line_width`, `item.width`, `item.height` |
92
- | `table` | `table.items[]`, `table.size`, `table.line_width` |
93
- | `line` | `item.text` (character to repeat) |
94
- | `newline` | `repeat` (number of lines) |
95
- | `qrcode` | `qrcode.data`, `qrcode.model`, `qrcode.size`, `qrcode.errorlevel` |
96
- | `barcode` | `barcode.data`, `barcode.symbology`, `barcode.height` |
97
- | `cut` | `item.text` ("full" or "partial") |
98
- | `beeper` | - |
99
- | `open_cash_drawer` | - |
100
-
101
- ## Available Codepages
102
-
103
- `cp437`, `cp850`, `cp860`, `cp863`, `cp865`, `cp857`, `cp737`, `cp866`, `cp862`, `cp864`, `cp874`, `cp936`, `cp949`, `cp950`, `shiftjis`, `windows1252`, `69` (VISCII)
@@ -1,78 +0,0 @@
1
- # Harbor + Harness 部署总结
2
-
3
- ## 服务端口
4
-
5
- | 服务 | 端口 | 说明 |
6
- |-------------|------|----------------|
7
- | Harbor | 8081 | 容器镜像仓库 |
8
- | Harness | 8082 | Git 代码托管 |
9
- | Harness SSH | 3022 | Git SSH |
10
- | PostgreSQL | 5433 | 数据库 |
11
- | Redis | 6380 | 缓存 |
12
-
13
- ## 外部访问
14
-
15
- | 服务 | 外部地址 | 内部地址 |
16
- |---------|-------------------------|--------------|
17
- | Harbor | https://harbor.wyo.sg | LAN_IP:8081 |
18
- | Harness | https://harness.wyo.sg | LAN_IP:8082 |
19
-
20
- ## Harbor 登录
21
-
22
- - URL: https://harbor.wyo.sg
23
- - 用户名: `admin`
24
- - 密码: `Harbor@2024!`
25
-
26
- ## Harness 登录
27
-
28
- - URL: https://harness.wyo.sg
29
- - 用户名: `admin@harness.local`
30
- - 密码: `Harness@2024!`
31
-
32
- ## PostgreSQL
33
-
34
- Host: `127.0.0.1:5433`
35
-
36
- | 数据库 | 用户名 | 密码 |
37
- |----------|----------|----------------|
38
- | postgres | postgres | Postgres@2024! |
39
- | harbor | harbor | Harbor@2024! |
40
- | harness | harness | Harness@2024! |
41
-
42
- ## Redis
43
-
44
- - Host: `127.0.0.1:6380`
45
- - 密码: (无)
46
- - Harbor DB Index: 1, 2, 5, 6, 7
47
-
48
- ## 文件位置
49
-
50
- ```
51
- /opt/infra/docker-compose.yml # PostgreSQL + Redis
52
- /opt/infra/config/postgresql.conf # PostgreSQL 配置
53
- /opt/infra/config/redis.conf # Redis 配置
54
- /opt/harbor/harbor.yml # Harbor 配置
55
- /opt/harness/docker-compose.yml # Harness 配置
56
- ```
57
-
58
- ## 管理命令
59
-
60
- ```bash
61
- # 基础设施
62
- cd /opt/infra && docker compose up -d
63
- cd /opt/infra && docker compose down
64
-
65
- # Harbor
66
- cd /opt/harbor && docker compose up -d
67
- cd /opt/harbor && docker compose down
68
-
69
- # Harness
70
- cd /opt/harness && docker compose up -d
71
- cd /opt/harness && docker compose down
72
- ```
73
-
74
- ## Docker 登录 Harbor
75
-
76
- ```bash
77
- docker login harbor.wyo.sg
78
- ```
@@ -1,84 +0,0 @@
1
- # Harbor - 容器镜像仓库
2
- server {
3
- listen 80;
4
- server_name harbor.wyo.sg;
5
- return 301 https://$server_name$request_uri;
6
- }
7
-
8
- server {
9
- listen 443 ssl http2;
10
- server_name harbor.wyo.sg;
11
-
12
- ssl_certificate /etc/nginx/ssl/wyo.sg/fullchain.pem;
13
- ssl_certificate_key /etc/nginx/ssl/wyo.sg/privkey.pem;
14
-
15
- # SSL 配置
16
- ssl_protocols TLSv1.2 TLSv1.3;
17
- ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384;
18
- ssl_prefer_server_ciphers off;
19
- ssl_session_cache shared:SSL:10m;
20
- ssl_session_timeout 1d;
21
-
22
- # 重要:Docker 镜像上传无大小限制
23
- client_max_body_size 0;
24
- chunked_transfer_encoding on;
25
-
26
- # 禁用缓冲,支持大文件流式传输
27
- proxy_buffering off;
28
- proxy_request_buffering off;
29
-
30
- location / {
31
- proxy_pass http://LAN_IP:8081;
32
- proxy_set_header Host $host;
33
- proxy_set_header X-Real-IP $remote_addr;
34
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
35
- proxy_set_header X-Forwarded-Proto $scheme;
36
-
37
- # 超时设置(镜像推送可能耗时较长)
38
- proxy_connect_timeout 900;
39
- proxy_send_timeout 900;
40
- proxy_read_timeout 900;
41
- }
42
- }
43
-
44
- # Harness - Git 代码托管
45
- server {
46
- listen 80;
47
- server_name harness.wyo.sg;
48
- return 301 https://$server_name$request_uri;
49
- }
50
-
51
- server {
52
- listen 443 ssl http2;
53
- server_name harness.wyo.sg;
54
-
55
- ssl_certificate /etc/nginx/ssl/wyo.sg/fullchain.pem;
56
- ssl_certificate_key /etc/nginx/ssl/wyo.sg/privkey.pem;
57
-
58
- ssl_protocols TLSv1.2 TLSv1.3;
59
- ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384;
60
- ssl_prefer_server_ciphers off;
61
- ssl_session_cache shared:SSL:10m;
62
- ssl_session_timeout 1d;
63
-
64
- # Git 仓库可能较大
65
- client_max_body_size 0;
66
-
67
- location / {
68
- proxy_pass http://LAN_IP:8082;
69
- proxy_set_header Host $host;
70
- proxy_set_header X-Real-IP $remote_addr;
71
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
72
- proxy_set_header X-Forwarded-Proto $scheme;
73
-
74
- # WebSocket 支持(实时日志、通知等)
75
- proxy_http_version 1.1;
76
- proxy_set_header Upgrade $http_upgrade;
77
- proxy_set_header Connection "upgrade";
78
-
79
- # 超时设置
80
- proxy_connect_timeout 300;
81
- proxy_send_timeout 300;
82
- proxy_read_timeout 300;
83
- }
84
- }
package/dev/px-cli.md DELETED
@@ -1,97 +0,0 @@
1
- # px-cli
2
-
3
- Bun CLI project to interact with server using x-api-key method
4
-
5
- ## Setup
6
-
7
- ```bash
8
- cd px
9
- bun install
10
- cp .env.example .env # fill in PX_BASE_URL, PX_API_KEY, PX_MERCHANT_UID
11
- ```
12
-
13
- ## Structure
14
-
15
- ```
16
- px/
17
- ├── package.json # bun project, depends on @posx/core
18
- ├── tsconfig.json
19
- ├── .env.example
20
- ├── index.ts # entry point & router (cac)
21
- ├── http.ts # HTTP client with x-api-key auth
22
- └── commands/
23
- ├── category.ts # Category CRUD (types: ICategory)
24
- └── product.ts # Product CRUD (types: IItem)
25
- ```
26
-
27
- ## Dependencies
28
-
29
- - `@posx/core` — import types only (no service layer — no Dexie/IndexedDB in Bun):
30
- - `IServiceOptions` — config typing in `http.ts`
31
- - `ICategory` — category request/response typing
32
- - `IItem` — product request/response typing
33
- - `@litepos/autoquery` — `QueryBuilder` for `list` action (autoquery via `sapi` endpoint)
34
- - `cac` — lightweight CLI framework (arg parsing, help text, subcommands)
35
-
36
- ## Usage
37
-
38
- ### Read (immediate)
39
-
40
- ```bash
41
- # List via autoquery (sapi)
42
- px category list
43
- px category list --nameContains Drinks --take 10
44
- px product list
45
- px product list --nameContains Latte --take 10
46
-
47
- # Get by ID
48
- px category get --id 123
49
- px product get --id 456
50
- ```
51
-
52
- ### CUD — direct execution with dry-run
53
-
54
- ```bash
55
- # Add
56
- px category add --name "Drinks" --type product --color "#ff0000" --icon "🍹"
57
- px category add --name "Drinks" --dry-run # preview only
58
-
59
- # Update (always fetches first: GET → show diff → PATCH)
60
- px category update --id 123 --name "Beverages"
61
- px product update --id 456 --price 6.00 --dry-run # preview diff
62
-
63
- # Delete
64
- px category delete --id 123
65
- px product delete --id 456 --dry-run # preview record to be removed
66
- ```
67
-
68
- ### Update flow
69
-
70
- ```
71
- 1. GET /api/v5/merchants/{uid}/product/456
72
- 2. Show diff:
73
- - price: 5.00 → 6.00
74
- 3. PATCH (or skip if --dry-run)
75
- ```
76
-
77
- `--dry-run` 和正常执行都会先 GET,区别只在是否发送 PATCH。
78
-
79
- ## API
80
-
81
- - **Base**: `https://lite-dev.posx.ai`
82
- - **Auth**: `x-api-key` header
83
-
84
- | Method | Route | Action |
85
- |----------|-----------------------------------------------------|------------------|
86
- | `GET` | `sapi/v5/merchants/{merchant_uid}/{module}` | list (autoquery) |
87
- | `GET` | `api/v5/merchants/{merchant_uid}/{module}/{id}` | get |
88
- | `PUT` | `api/v5/merchants/{merchant_uid}/{module}/{method}` | add |
89
- | `PATCH` | `api/v5/merchants/{merchant_uid}/{module}/{id}` | update |
90
- | `DELETE` | `api/v5/merchants/{merchant_uid}/{module}/{id}` | delete |
91
-
92
- ## Ref
93
-
94
- ```bash
95
- curl -H "x-api-key: p8Hwl4A7ewynszODOOc05SJcqSP6YZDo2pevtZ" \
96
- "https://lite-dev.posx.ai/api/v5/merchants/by-whatsapp-jid/6590992059@s.whatsapp.net"
97
- ```
@@ -1,5 +0,0 @@
1
- # 2026-02 测试日志
2
-
3
- | # | 分支 | 时间 | 变更 | 测试 | 🌐 | 问题 | 状态 |
4
- |---|------|------|------|------|:--:|------|------|
5
- | 1 | bugfix/rounding-half-up-51 | 02-03 10:45 | roundingStep 实现 round half up | 19/20 passed | ✗ | `service-charge-and-tax-exempt.test.ts` 期望值需更新 5877→5876.9 | 🔧 需修复 |