feat: manifest module.json i kod modułu z getModuleInfo zamiast hardcode

- module.json: name/version/dependsOn (core/orders, core/products);
  package.json name -> core.prestashop
- hardcode'y 'core/prestashop' (source.moduleCode w pullerze/imporcie)
  zastąpione Core.getModuleInfo().code; w orders-api stałe top-level
  zamienione na leniwe funkcje, legacy alias 'prestashop' wyliczany z kodu
- make-zip.sh pakuje module.json

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-28 12:03:48 +02:00
co-authored by Claude Fable 5
parent 5a1e6ffbdd
commit b1c7f792de
8 changed files with 38 additions and 13 deletions
+4 -2
View File
@@ -123,7 +123,8 @@ async function importFromPSOrder(orderId, api, config) {
products
.filter(p => p.sourceId && p.name)
.map(p => Core.callModule( 'core/products', 'upsert', {
sourceModule: 'core/prestashop',
// własny kod modułu bierzemy z core (po rejestracji), nie z hardcode'u
sourceModule: Core.getModuleInfo().code,
sourceId: String(p.sourceId),
sku: p.sku || '',
name: p.name,
@@ -259,7 +260,8 @@ async function importFromPSOrder(orderId, api, config) {
source: {
name: "Prestashop",
moduleCode: 'core/prestashop',
// własny kod modułu bierzemy z core (po rejestracji), nie z hardcode'u
moduleCode: Core.getModuleInfo().code,
sourceId: order.id,
uniqueId: order.reference + ':' + order.id,
},