@ph-itdev/warehouse-zone-manager 0.2026.629 → 0.2026.631
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 +11 -0
- package/index.js +20 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,3 +24,14 @@ MIT
|
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
*Auto-generated by logistics-npm pipeline — 2026-06-29*
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## Changelog
|
|
30
|
+
|
|
31
|
+
### v0.2026.631 (2026-07-03)
|
|
32
|
+
- Added usage examples
|
|
33
|
+
- Daily auto-update
|
|
34
|
+
|
|
35
|
+
### v0.2026.630 (2026-06-29)
|
|
36
|
+
- Added utility helpers (uuid, retry, chunk, clamp)
|
|
37
|
+
- Daily auto-update
|
package/index.js
CHANGED
|
@@ -46,4 +46,24 @@ class WarehouseZoneManager {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
|
|
49
|
+
|
|
50
|
+
// ─── Auto-generated utility helpers ──────────────────────────────────────────
|
|
51
|
+
function _logisticsHelpers() {
|
|
52
|
+
return {
|
|
53
|
+
timestamp: () => new Date().toISOString(),
|
|
54
|
+
uuid: () => 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
|
|
55
|
+
const r = Math.random() * 16 | 0;
|
|
56
|
+
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);
|
|
57
|
+
}),
|
|
58
|
+
sleep: (ms) => new Promise(r => setTimeout(r, ms)),
|
|
59
|
+
retry: async (fn, maxAttempts = 3, delayMs = 1000) => {
|
|
60
|
+
for (let i = 0; i < maxAttempts; i++) {
|
|
61
|
+
try { return await fn(); } catch (e) { if (i === maxAttempts - 1) throw e; await new Promise(r => setTimeout(r, delayMs * (i + 1))); }
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
clamp: (val, min, max) => Math.min(Math.max(val, min), max),
|
|
65
|
+
chunk: (arr, size) => Array.from({ length: Math.ceil(arr.length / size) }, (_, i) => arr.slice(i * size, i * size + size)),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
49
69
|
module.exports = { WarehouseZoneManager };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ph-itdev/warehouse-zone-manager",
|
|
3
|
-
"version": "0.2026.
|
|
3
|
+
"version": "0.2026.631",
|
|
4
4
|
"description": "Manage warehouse zones, bin locations, put-away rules, and zone-based picking strategies for fulfillment automation.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|