lightspeed-retail-sdk 3.4.1 → 3.4.2
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/README.md +1 -1
- package/dist/src/bin/cli.js +27 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A modern JavaScript SDK for interacting with the Lightspeed Retail API. This SDK provides a convenient, secure, and flexible way to access Lightspeed Retail's features—including customer, item, and order management.
|
|
4
4
|
|
|
5
|
-
**Current Version: 3.4.
|
|
5
|
+
**Current Version: 3.4.2** — Auto-discovery system for seamless cron job and production deployment.
|
|
6
6
|
|
|
7
7
|
## **🆕 Recent Updates (v3.4.0)**
|
|
8
8
|
|
package/dist/src/bin/cli.js
CHANGED
|
@@ -330,6 +330,10 @@ program
|
|
|
330
330
|
err.message
|
|
331
331
|
);
|
|
332
332
|
}
|
|
333
|
+
// Remove storage config file
|
|
334
|
+
const storageConfig = new StorageConfig();
|
|
335
|
+
await storageConfig.removeConfig();
|
|
336
|
+
console.log("🗑️ Storage configuration cleared");
|
|
333
337
|
return;
|
|
334
338
|
}
|
|
335
339
|
case "postgres": {
|
|
@@ -365,6 +369,10 @@ program
|
|
|
365
369
|
err.message
|
|
366
370
|
);
|
|
367
371
|
}
|
|
372
|
+
// Remove storage config file
|
|
373
|
+
const storageConfig = new StorageConfig();
|
|
374
|
+
await storageConfig.removeConfig();
|
|
375
|
+
console.log("🗑️ Storage configuration cleared");
|
|
368
376
|
return;
|
|
369
377
|
}
|
|
370
378
|
case "mongodb": {
|
|
@@ -402,6 +410,10 @@ program
|
|
|
402
410
|
err.message
|
|
403
411
|
);
|
|
404
412
|
}
|
|
413
|
+
// Remove storage config file
|
|
414
|
+
const storageConfig = new StorageConfig();
|
|
415
|
+
await storageConfig.removeConfig();
|
|
416
|
+
console.log("🗑️ Storage configuration cleared");
|
|
405
417
|
return;
|
|
406
418
|
}
|
|
407
419
|
default:
|
|
@@ -439,6 +451,11 @@ program
|
|
|
439
451
|
await fileStorage.setTokens({});
|
|
440
452
|
console.log(`\n✅ Token file cleared: ${tokenFile}`);
|
|
441
453
|
}
|
|
454
|
+
|
|
455
|
+
// Remove storage config file
|
|
456
|
+
const storageConfig = new StorageConfig();
|
|
457
|
+
await storageConfig.removeConfig();
|
|
458
|
+
console.log("🗑️ Storage configuration cleared");
|
|
442
459
|
});
|
|
443
460
|
|
|
444
461
|
program
|
|
@@ -1104,6 +1121,16 @@ async function getStorageConfig(storage) {
|
|
|
1104
1121
|
|
|
1105
1122
|
async function selectStorageBackend(saveConfig = true) {
|
|
1106
1123
|
const storageConfig = new StorageConfig();
|
|
1124
|
+
|
|
1125
|
+
// Try auto-discovery first if not saving config (read-only operations)
|
|
1126
|
+
if (!saveConfig) {
|
|
1127
|
+
const { autoDiscoverStorage } = await import("../storage/StorageConfig.mjs");
|
|
1128
|
+
const autoStorage = await autoDiscoverStorage();
|
|
1129
|
+
if (autoStorage) {
|
|
1130
|
+
return autoStorage;
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1107
1134
|
const storage = await selectStorageBackendInternal();
|
|
1108
1135
|
|
|
1109
1136
|
// Save configuration for auto-discovery if requested
|