btrz-api-client 9.1.0 → 9.2.0
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/.githooks/pre-commit +18 -0
- package/lib/client-standalone-min.js +5 -5
- package/lib/client.js +4 -0
- package/lib/endpoints/endpoints_helpers.js +1 -1
- package/lib/endpoints/inventory/events.js +41 -0
- package/lib/endpoints/inventory/parcel-zones.js +26 -2
- package/lib/endpoints/inventory/zone-prices.js +31 -2
- package/lib/endpoints/sales/cart.js +1 -1
- package/package.json +3 -2
- package/src/client.js +1 -0
- package/src/endpoints/endpoints_helpers.js +1 -1
- package/src/endpoints/inventory/events.js +28 -0
- package/src/endpoints/inventory/parcel-zones.js +18 -2
- package/src/endpoints/inventory/zone-prices.js +21 -2
- package/src/endpoints/sales/cart.js +1 -1
- package/test/endpoints/inventory/events.test.js +19 -0
- package/test/endpoints/inventory/parcel-zones.test.js +13 -0
- package/test/endpoints/inventory/zone-prices.test.js +17 -0
- package/types/endpoints/inventory/events.d.ts +16 -0
- package/types/endpoints/inventory/parcel-zones.d.ts +2 -1
- package/types/endpoints/inventory/zone-prices.d.ts +2 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# btrz-banned-libs-hook-v1
|
|
3
|
+
set -eu
|
|
4
|
+
|
|
5
|
+
DIFF_CONTENT=$(git diff --cached -U0 -- package.json package-lock.json npm-shrinkwrap.json yarn.lock pnpm-lock.yaml 2>/dev/null || true)
|
|
6
|
+
|
|
7
|
+
if [ -z "$DIFF_CONTENT" ]; then
|
|
8
|
+
exit 0
|
|
9
|
+
fi
|
|
10
|
+
|
|
11
|
+
if printf '%s
|
|
12
|
+
' "$DIFF_CONTENT" | rg -q '^\+.*("(lodash|mocha|chai|sinon)"|lodash@|mocha@|chai@|sinon@)'; then
|
|
13
|
+
echo ""
|
|
14
|
+
echo "Commit blocked: adding banned libraries is not allowed (lodash, mocha, chai, sinon)."
|
|
15
|
+
echo "Remove the staged dependency/lockfile additions and retry."
|
|
16
|
+
echo ""
|
|
17
|
+
exit 1
|
|
18
|
+
fi
|