@anvil-works/anvil-cli 0.5.3 → 0.5.5
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/dist/cli.js +16 -14
- package/package.json +1 -1
- package/scripts/install/install.cmd +6 -0
- package/scripts/install/install.ps1 +1 -1
- package/scripts/install/install.sh +1 -1
package/dist/cli.js
CHANGED
|
@@ -51793,17 +51793,19 @@ var __webpack_exports__ = {};
|
|
|
51793
51793
|
function normalizePickerQuery(term) {
|
|
51794
51794
|
return (term || "").trim();
|
|
51795
51795
|
}
|
|
51796
|
-
function
|
|
51797
|
-
|
|
51798
|
-
const
|
|
51799
|
-
if (
|
|
51800
|
-
return
|
|
51796
|
+
function parseNonNegativeMs(raw) {
|
|
51797
|
+
if (null == raw) return null;
|
|
51798
|
+
const parsed = Number(raw);
|
|
51799
|
+
if (!Number.isFinite(parsed) || parsed < 0) return null;
|
|
51800
|
+
return parsed;
|
|
51801
|
+
}
|
|
51802
|
+
function getCheckoutPickerDelayMs() {
|
|
51803
|
+
const fromEnv = parseNonNegativeMs(process.env.ANVIL_CHECKOUT_PICKER_DELAY_MS);
|
|
51804
|
+
if (null != fromEnv) return fromEnv;
|
|
51805
|
+
return 0;
|
|
51801
51806
|
}
|
|
51802
|
-
function getCheckoutPickerPaginationDelayMs(
|
|
51803
|
-
|
|
51804
|
-
const fromEnv = null == raw ? NaN : Number(raw);
|
|
51805
|
-
if (null != raw && Number.isFinite(fromEnv) && fromEnv >= 0) return fromEnv;
|
|
51806
|
-
return /localhost|127\.0\.0\.1/.test(anvilUrl) ? 1000 : 0;
|
|
51807
|
+
function getCheckoutPickerPaginationDelayMs() {
|
|
51808
|
+
return getCheckoutPickerDelayMs();
|
|
51807
51809
|
}
|
|
51808
51810
|
function getCheckoutPickerMaxRows() {
|
|
51809
51811
|
const raw = process.env.ANVIL_CHECKOUT_PICKER_MAX_ROWS;
|
|
@@ -51846,8 +51848,8 @@ var __webpack_exports__ = {};
|
|
|
51846
51848
|
const staleTimeMs = options.staleTimeMs ?? 30000;
|
|
51847
51849
|
const maxAutoPagesPerCall = options.maxAutoPagesPerCall ?? 8;
|
|
51848
51850
|
const initialQuery = normalizePickerQuery(options.initialQuery);
|
|
51849
|
-
const simulatedDelayMs = getCheckoutPickerDelayMs(
|
|
51850
|
-
const paginationDelayMs = getCheckoutPickerPaginationDelayMs(
|
|
51851
|
+
const simulatedDelayMs = getCheckoutPickerDelayMs();
|
|
51852
|
+
const paginationDelayMs = getCheckoutPickerPaginationDelayMs();
|
|
51851
51853
|
const cache = new Map();
|
|
51852
51854
|
const getState = (query)=>{
|
|
51853
51855
|
const existing = cache.get(query);
|
|
@@ -51976,8 +51978,8 @@ var __webpack_exports__ = {};
|
|
|
51976
51978
|
const pageSize = 20;
|
|
51977
51979
|
const staleTimeMs = 30000;
|
|
51978
51980
|
const debounceMs = 180;
|
|
51979
|
-
const simulatedDelayMs = getCheckoutPickerDelayMs(
|
|
51980
|
-
const paginationDelayMs = getCheckoutPickerPaginationDelayMs(
|
|
51981
|
+
const simulatedDelayMs = getCheckoutPickerDelayMs();
|
|
51982
|
+
const paginationDelayMs = getCheckoutPickerPaginationDelayMs();
|
|
51981
51983
|
const maxVisibleRows = getCheckoutPickerMaxRows();
|
|
51982
51984
|
const cache = new Map();
|
|
51983
51985
|
let query = normalizePickerQuery(initialQuery);
|
package/package.json
CHANGED
|
@@ -30,4 +30,10 @@ powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_PATH%"
|
|
|
30
30
|
set "EXIT_CODE=%ERRORLEVEL%"
|
|
31
31
|
|
|
32
32
|
del /q "%SCRIPT_PATH%" >nul 2>&1
|
|
33
|
+
|
|
34
|
+
if "%EXIT_CODE%"=="0" (
|
|
35
|
+
echo.
|
|
36
|
+
echo Next steps: run 'anvil configure' or 'anvil checkout'
|
|
37
|
+
)
|
|
38
|
+
|
|
33
39
|
exit /b %EXIT_CODE%
|
|
@@ -183,7 +183,7 @@ function Main {
|
|
|
183
183
|
|
|
184
184
|
Write-Info ''
|
|
185
185
|
Write-Info "anvil-cli installed successfully (v$version)"
|
|
186
|
-
Write-Info "Next
|
|
186
|
+
Write-Info "Next steps: run 'anvil configure' or 'anvil checkout'"
|
|
187
187
|
Write-Info "If your current terminal cannot find 'anvil', start a new terminal session."
|
|
188
188
|
}
|
|
189
189
|
|
|
@@ -153,7 +153,7 @@ main() {
|
|
|
153
153
|
|
|
154
154
|
log ""
|
|
155
155
|
log "anvil-cli installed successfully${version:+ (v$version)}"
|
|
156
|
-
log "Next
|
|
156
|
+
log "Next steps: run 'anvil configure' or 'anvil checkout'"
|
|
157
157
|
log "If your current shell cannot find 'anvil', open a new terminal session."
|
|
158
158
|
}
|
|
159
159
|
|