@nonbot/cli 0.9.10 → 0.9.11
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/lib/snapshot.js +2 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/lib/snapshot.js
CHANGED
|
@@ -3,6 +3,7 @@ import { VERSION } from '../version.js';
|
|
|
3
3
|
import { evictOldestToCap } from './bounded-set.js';
|
|
4
4
|
export const PANE_ID_RE = /^%\d+$/;
|
|
5
5
|
export const ACTIVATION_ID_RE = /^act_[a-f0-9]{8,32}$/i;
|
|
6
|
+
export const SNAPSHOT_REQUESTS_MAX = 16;
|
|
6
7
|
export const SNAPSHOT_MAX_BYTES = 16384;
|
|
7
8
|
const MAX_LINES_DEFAULT = 100;
|
|
8
9
|
const MAX_LINES_CAP = 2000;
|
|
@@ -74,7 +75,7 @@ async function postSnapshot(opts, activationId, body) {
|
|
|
74
75
|
}
|
|
75
76
|
export async function serveSnapshotRequests(opts) {
|
|
76
77
|
const servedNow = [];
|
|
77
|
-
for (const req of opts.requests ?? []) {
|
|
78
|
+
for (const req of (opts.requests ?? []).slice(0, SNAPSHOT_REQUESTS_MAX)) {
|
|
78
79
|
if (!req || typeof req.requestId !== 'string' || req.requestId.length === 0)
|
|
79
80
|
continue;
|
|
80
81
|
if (typeof req.activationId !== 'string' || !ACTIVATION_ID_RE.test(req.activationId)) {
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.9.
|
|
1
|
+
export const VERSION = '0.9.11';
|
package/package.json
CHANGED