@go-labs-sg/event-tech 1.9.0 → 1.10.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/README.md +4 -1
- package/dist/index.js +100 -93
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -231,7 +231,10 @@ the last name is the last word of the full name, or the first word with
|
|
|
231
231
|
`--surname-position first`. The response reports `imported`, `replaced` and
|
|
232
232
|
each `rejected` row (`MISSING_STAFF_ID`, `MISSING_LAST_NAME`,
|
|
233
233
|
`DUPLICATE_STAFF_ID` or `TOO_LONG`). Re-importing is safe: existing Staff ID
|
|
234
|
-
passports keep their stamps.
|
|
234
|
+
passports keep their stamps. A file may hold up to 20,000 rows with data and
|
|
235
|
+
200 columns. A file with data past those limits (including data below row
|
|
236
|
+
50,000), a misplaced or unclosed CSV quote, or no importable rows at all is refused and the
|
|
237
|
+
roster is left unchanged; use `roster purge` to empty a roster on purpose. Participant search, detail and `export` include
|
|
235
238
|
`staffId`. Staff ID sign-in itself is browser-only.
|
|
236
239
|
|
|
237
240
|
Guest enrollment/account linking is browser-only: it requires the original guest
|
package/dist/index.js
CHANGED
|
@@ -17200,7 +17200,7 @@ var DEPRECATED_EVENT_TYPES = [
|
|
|
17200
17200
|
var activeEventTypeSchema = _enum(EventType).exclude(DEPRECATED_EVENT_TYPES);
|
|
17201
17201
|
var ACTIVE_EVENT_TYPES = activeEventTypeSchema.options;
|
|
17202
17202
|
|
|
17203
|
-
// ../../../node_modules/.bun/@trpc+server@11.
|
|
17203
|
+
// ../../../node_modules/.bun/@trpc+server@11.26.0+431a08decb845963/node_modules/@trpc/server/dist/observable-CodTG6Sf.mjs
|
|
17204
17204
|
function observable(subscribe) {
|
|
17205
17205
|
const self2 = {
|
|
17206
17206
|
subscribe(observer) {
|
|
@@ -17416,7 +17416,7 @@ function observableToAsyncIterable(observable, signal) {
|
|
|
17416
17416
|
return iterator;
|
|
17417
17417
|
}
|
|
17418
17418
|
|
|
17419
|
-
// ../../../node_modules/.bun/@trpc+server@11.
|
|
17419
|
+
// ../../../node_modules/.bun/@trpc+server@11.26.0+431a08decb845963/node_modules/@trpc/server/dist/observable-BjUZYMQq.mjs
|
|
17420
17420
|
function share(_opts) {
|
|
17421
17421
|
return (source) => {
|
|
17422
17422
|
let refCount = 0;
|
|
@@ -17538,7 +17538,7 @@ function behaviorSubject(initialValue) {
|
|
|
17538
17538
|
return obs;
|
|
17539
17539
|
}
|
|
17540
17540
|
|
|
17541
|
-
// ../../../node_modules/.bun/@trpc+client@11.
|
|
17541
|
+
// ../../../node_modules/.bun/@trpc+client@11.26.0+2254e82f702320cc/node_modules/@trpc/client/dist/splitLink-PFsRy7Mf.mjs
|
|
17542
17542
|
function createChain(opts) {
|
|
17543
17543
|
return observable((observer) => {
|
|
17544
17544
|
function execute(index = 0, op = opts.op) {
|
|
@@ -17556,7 +17556,7 @@ function createChain(opts) {
|
|
|
17556
17556
|
});
|
|
17557
17557
|
}
|
|
17558
17558
|
|
|
17559
|
-
// ../../../node_modules/.bun/@trpc+client@11.
|
|
17559
|
+
// ../../../node_modules/.bun/@trpc+client@11.26.0+2254e82f702320cc/node_modules/@trpc/client/dist/objectSpread2-pyA4QVO4.mjs
|
|
17560
17560
|
function _typeof(o) {
|
|
17561
17561
|
"@babel/helpers - typeof";
|
|
17562
17562
|
return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o) {
|
|
@@ -17565,17 +17565,17 @@ function _typeof(o) {
|
|
|
17565
17565
|
return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
17566
17566
|
}, _typeof(o);
|
|
17567
17567
|
}
|
|
17568
|
-
function toPrimitive(t,
|
|
17568
|
+
function toPrimitive(t, e) {
|
|
17569
17569
|
if (_typeof(t) != "object" || !t)
|
|
17570
17570
|
return t;
|
|
17571
|
-
var
|
|
17572
|
-
if (
|
|
17573
|
-
var i =
|
|
17571
|
+
var r;
|
|
17572
|
+
if (typeof Symbol != "undefined" && (r = t[Symbol.toPrimitive]) !== undefined) {
|
|
17573
|
+
var i = r.call(t, e || "default");
|
|
17574
17574
|
if (_typeof(i) != "object")
|
|
17575
17575
|
return i;
|
|
17576
17576
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
17577
17577
|
}
|
|
17578
|
-
return (
|
|
17578
|
+
return (e === "string" ? String : Number)(t);
|
|
17579
17579
|
}
|
|
17580
17580
|
function toPropertyKey(t) {
|
|
17581
17581
|
var i = toPrimitive(t, "string");
|
|
@@ -17611,7 +17611,7 @@ function _objectSpread2(e) {
|
|
|
17611
17611
|
return e;
|
|
17612
17612
|
}
|
|
17613
17613
|
|
|
17614
|
-
// ../../../node_modules/.bun/@trpc+server@11.
|
|
17614
|
+
// ../../../node_modules/.bun/@trpc+server@11.26.0+431a08decb845963/node_modules/@trpc/server/dist/codes-BCsCCyMj.mjs
|
|
17615
17615
|
function isObject2(value) {
|
|
17616
17616
|
return !!value && !Array.isArray(value) && typeof value === "object";
|
|
17617
17617
|
}
|
|
@@ -17648,7 +17648,7 @@ var retryableRpcCodes = [
|
|
|
17648
17648
|
TRPC_ERROR_CODES_BY_KEY.INTERNAL_SERVER_ERROR
|
|
17649
17649
|
];
|
|
17650
17650
|
|
|
17651
|
-
// ../../../node_modules/.bun/@trpc+server@11.
|
|
17651
|
+
// ../../../node_modules/.bun/@trpc+server@11.26.0+431a08decb845963/node_modules/@trpc/server/dist/getErrorShape-CVrl8_-w.mjs
|
|
17652
17652
|
var noop = () => {};
|
|
17653
17653
|
var freezeIfAvailable = (obj) => {
|
|
17654
17654
|
if (Object.freeze)
|
|
@@ -17705,17 +17705,17 @@ function _typeof2(o) {
|
|
|
17705
17705
|
return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
17706
17706
|
}, _typeof2(o);
|
|
17707
17707
|
}
|
|
17708
|
-
function toPrimitive2(t,
|
|
17708
|
+
function toPrimitive2(t, e) {
|
|
17709
17709
|
if (_typeof2(t) != "object" || !t)
|
|
17710
17710
|
return t;
|
|
17711
|
-
var
|
|
17712
|
-
if (
|
|
17713
|
-
var i =
|
|
17711
|
+
var r;
|
|
17712
|
+
if (typeof Symbol != "undefined" && (r = t[Symbol.toPrimitive]) !== undefined) {
|
|
17713
|
+
var i = r.call(t, e || "default");
|
|
17714
17714
|
if (_typeof2(i) != "object")
|
|
17715
17715
|
return i;
|
|
17716
17716
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
17717
17717
|
}
|
|
17718
|
-
return (
|
|
17718
|
+
return (e === "string" ? String : Number)(t);
|
|
17719
17719
|
}
|
|
17720
17720
|
function toPropertyKey2(t) {
|
|
17721
17721
|
var i = toPrimitive2(t, "string");
|
|
@@ -17751,7 +17751,7 @@ function _objectSpread22(e) {
|
|
|
17751
17751
|
return e;
|
|
17752
17752
|
}
|
|
17753
17753
|
|
|
17754
|
-
// ../../../node_modules/.bun/@trpc+server@11.
|
|
17754
|
+
// ../../../node_modules/.bun/@trpc+server@11.26.0+431a08decb845963/node_modules/@trpc/server/dist/asyncGeneratorDelegate-BRQGtkYG.mjs
|
|
17755
17755
|
function transformResultInner(response, transformer) {
|
|
17756
17756
|
if ("error" in response) {
|
|
17757
17757
|
const error = transformer.deserialize(response.error);
|
|
@@ -17798,54 +17798,41 @@ function _OverloadYield(e, d) {
|
|
|
17798
17798
|
this.v = e, this.k = d;
|
|
17799
17799
|
}
|
|
17800
17800
|
function AsyncGenerator(e) {
|
|
17801
|
-
var
|
|
17802
|
-
function resume(
|
|
17801
|
+
var t, n;
|
|
17802
|
+
function resume(t, n) {
|
|
17803
17803
|
try {
|
|
17804
|
-
var
|
|
17805
|
-
Promise.resolve(u ? o.v : o).then(function(
|
|
17804
|
+
var r = e[t](n), o = r.value, u = o instanceof _OverloadYield;
|
|
17805
|
+
Promise.resolve(u ? o.v : o).then(function(n) {
|
|
17806
17806
|
if (u) {
|
|
17807
|
-
var i =
|
|
17808
|
-
if (!o.k ||
|
|
17809
|
-
return resume(i,
|
|
17810
|
-
|
|
17807
|
+
var i = t === "return" && o.k ? t : "next";
|
|
17808
|
+
if (!o.k || n.done)
|
|
17809
|
+
return resume(i, n);
|
|
17810
|
+
n = e[i](n).value;
|
|
17811
17811
|
}
|
|
17812
|
-
settle(
|
|
17812
|
+
settle(!!r.done, n);
|
|
17813
17813
|
}, function(e) {
|
|
17814
17814
|
resume("throw", e);
|
|
17815
17815
|
});
|
|
17816
17816
|
} catch (e) {
|
|
17817
|
-
settle(
|
|
17817
|
+
settle(2, e);
|
|
17818
17818
|
}
|
|
17819
17819
|
}
|
|
17820
|
-
function settle(e,
|
|
17821
|
-
|
|
17822
|
-
|
|
17823
|
-
|
|
17824
|
-
|
|
17825
|
-
done: true
|
|
17826
|
-
});
|
|
17827
|
-
break;
|
|
17828
|
-
case "throw":
|
|
17829
|
-
r.reject(n);
|
|
17830
|
-
break;
|
|
17831
|
-
default:
|
|
17832
|
-
r.resolve({
|
|
17833
|
-
value: n,
|
|
17834
|
-
done: false
|
|
17835
|
-
});
|
|
17836
|
-
}
|
|
17837
|
-
(r = r.next) ? resume(r.key, r.arg) : t = null;
|
|
17820
|
+
function settle(e, r) {
|
|
17821
|
+
e === 2 ? t.reject(r) : t.resolve({
|
|
17822
|
+
value: r,
|
|
17823
|
+
done: e
|
|
17824
|
+
}), (t = t.next) ? resume(t.key, t.arg) : n = null;
|
|
17838
17825
|
}
|
|
17839
|
-
this._invoke = function(e,
|
|
17826
|
+
this._invoke = function(e, r) {
|
|
17840
17827
|
return new Promise(function(o, u) {
|
|
17841
17828
|
var i = {
|
|
17842
17829
|
key: e,
|
|
17843
|
-
arg:
|
|
17830
|
+
arg: r,
|
|
17844
17831
|
resolve: o,
|
|
17845
17832
|
reject: u,
|
|
17846
17833
|
next: null
|
|
17847
17834
|
};
|
|
17848
|
-
|
|
17835
|
+
n ? n = n.next = i : (t = n = i, resume(e, r));
|
|
17849
17836
|
});
|
|
17850
17837
|
}, typeof e["return"] != "function" && (this["return"] = undefined);
|
|
17851
17838
|
}
|
|
@@ -17860,7 +17847,7 @@ AsyncGenerator.prototype[typeof Symbol == "function" && Symbol.asyncIterator ||
|
|
|
17860
17847
|
};
|
|
17861
17848
|
var trackedSymbol = Symbol();
|
|
17862
17849
|
|
|
17863
|
-
// ../../../node_modules/.bun/@trpc+client@11.
|
|
17850
|
+
// ../../../node_modules/.bun/@trpc+client@11.26.0+2254e82f702320cc/node_modules/@trpc/client/dist/TRPCClientError-DE6-fd1n.mjs
|
|
17864
17851
|
function isTRPCClientError(cause) {
|
|
17865
17852
|
return cause instanceof TRPCClientError;
|
|
17866
17853
|
}
|
|
@@ -17906,7 +17893,7 @@ var TRPCClientError = class TRPCClientError extends Error {
|
|
|
17906
17893
|
}
|
|
17907
17894
|
};
|
|
17908
17895
|
|
|
17909
|
-
// ../../../node_modules/.bun/@trpc+client@11.
|
|
17896
|
+
// ../../../node_modules/.bun/@trpc+client@11.26.0+2254e82f702320cc/node_modules/@trpc/client/dist/unstable-internals.mjs
|
|
17910
17897
|
function getTransformer(transformer) {
|
|
17911
17898
|
const _transformer = transformer;
|
|
17912
17899
|
if (!_transformer)
|
|
@@ -17928,7 +17915,7 @@ function getTransformer(transformer) {
|
|
|
17928
17915
|
};
|
|
17929
17916
|
}
|
|
17930
17917
|
|
|
17931
|
-
// ../../../node_modules/.bun/@trpc+client@11.
|
|
17918
|
+
// ../../../node_modules/.bun/@trpc+client@11.26.0+2254e82f702320cc/node_modules/@trpc/client/dist/httpUtils-CWtyfi2N.mjs
|
|
17932
17919
|
var isFunction2 = (fn) => typeof fn === "function";
|
|
17933
17920
|
function getFetch(customFetchImpl) {
|
|
17934
17921
|
if (customFetchImpl)
|
|
@@ -18081,7 +18068,7 @@ async function httpRequest(opts) {
|
|
|
18081
18068
|
};
|
|
18082
18069
|
}
|
|
18083
18070
|
|
|
18084
|
-
// ../../../node_modules/.bun/@trpc+client@11.
|
|
18071
|
+
// ../../../node_modules/.bun/@trpc+client@11.26.0+2254e82f702320cc/node_modules/@trpc/client/dist/httpBatchLink-C3x3d8vz.mjs
|
|
18085
18072
|
var throwFatalError = () => {
|
|
18086
18073
|
throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new");
|
|
18087
18074
|
};
|
|
@@ -18276,7 +18263,7 @@ function httpBatchLink(opts) {
|
|
|
18276
18263
|
};
|
|
18277
18264
|
}
|
|
18278
18265
|
|
|
18279
|
-
// ../../../node_modules/.bun/@trpc+client@11.
|
|
18266
|
+
// ../../../node_modules/.bun/@trpc+client@11.26.0+2254e82f702320cc/node_modules/@trpc/client/dist/wsLink-BiIe_j6D.mjs
|
|
18280
18267
|
var resultOf = (value, ...args) => {
|
|
18281
18268
|
return typeof value === "function" ? value(...args) : value;
|
|
18282
18269
|
};
|
|
@@ -18429,7 +18416,7 @@ var WsConnection = class WsConnection {
|
|
|
18429
18416
|
};
|
|
18430
18417
|
_defineProperty(WsConnection, "connectCount", 0);
|
|
18431
18418
|
|
|
18432
|
-
// ../../../node_modules/.bun/@trpc+client@11.
|
|
18419
|
+
// ../../../node_modules/.bun/@trpc+client@11.26.0+2254e82f702320cc/node_modules/@trpc/client/dist/index.mjs
|
|
18433
18420
|
var observerKeys = [
|
|
18434
18421
|
"onStarted",
|
|
18435
18422
|
"onData",
|
|
@@ -18573,54 +18560,41 @@ function _OverloadYield2(e, d) {
|
|
|
18573
18560
|
this.v = e, this.k = d;
|
|
18574
18561
|
}
|
|
18575
18562
|
function AsyncGenerator2(e) {
|
|
18576
|
-
var
|
|
18577
|
-
function resume(
|
|
18563
|
+
var t, n;
|
|
18564
|
+
function resume(t, n) {
|
|
18578
18565
|
try {
|
|
18579
|
-
var
|
|
18580
|
-
Promise.resolve(u ? o.v : o).then(function(
|
|
18566
|
+
var r = e[t](n), o = r.value, u = o instanceof _OverloadYield2;
|
|
18567
|
+
Promise.resolve(u ? o.v : o).then(function(n) {
|
|
18581
18568
|
if (u) {
|
|
18582
|
-
var i =
|
|
18583
|
-
if (!o.k ||
|
|
18584
|
-
return resume(i,
|
|
18585
|
-
|
|
18569
|
+
var i = t === "return" && o.k ? t : "next";
|
|
18570
|
+
if (!o.k || n.done)
|
|
18571
|
+
return resume(i, n);
|
|
18572
|
+
n = e[i](n).value;
|
|
18586
18573
|
}
|
|
18587
|
-
settle(
|
|
18574
|
+
settle(!!r.done, n);
|
|
18588
18575
|
}, function(e) {
|
|
18589
18576
|
resume("throw", e);
|
|
18590
18577
|
});
|
|
18591
18578
|
} catch (e) {
|
|
18592
|
-
settle(
|
|
18579
|
+
settle(2, e);
|
|
18593
18580
|
}
|
|
18594
18581
|
}
|
|
18595
|
-
function settle(e,
|
|
18596
|
-
|
|
18597
|
-
|
|
18598
|
-
|
|
18599
|
-
|
|
18600
|
-
done: true
|
|
18601
|
-
});
|
|
18602
|
-
break;
|
|
18603
|
-
case "throw":
|
|
18604
|
-
r.reject(n);
|
|
18605
|
-
break;
|
|
18606
|
-
default:
|
|
18607
|
-
r.resolve({
|
|
18608
|
-
value: n,
|
|
18609
|
-
done: false
|
|
18610
|
-
});
|
|
18611
|
-
}
|
|
18612
|
-
(r = r.next) ? resume(r.key, r.arg) : t = null;
|
|
18582
|
+
function settle(e, r) {
|
|
18583
|
+
e === 2 ? t.reject(r) : t.resolve({
|
|
18584
|
+
value: r,
|
|
18585
|
+
done: e
|
|
18586
|
+
}), (t = t.next) ? resume(t.key, t.arg) : n = null;
|
|
18613
18587
|
}
|
|
18614
|
-
this._invoke = function(e,
|
|
18588
|
+
this._invoke = function(e, r) {
|
|
18615
18589
|
return new Promise(function(o, u) {
|
|
18616
18590
|
var i = {
|
|
18617
18591
|
key: e,
|
|
18618
|
-
arg:
|
|
18592
|
+
arg: r,
|
|
18619
18593
|
resolve: o,
|
|
18620
18594
|
reject: u,
|
|
18621
18595
|
next: null
|
|
18622
18596
|
};
|
|
18623
|
-
|
|
18597
|
+
n ? n = n.next = i : (t = n = i, resume(e, r));
|
|
18624
18598
|
});
|
|
18625
18599
|
}, typeof e["return"] != "function" && (this["return"] = undefined);
|
|
18626
18600
|
}
|
|
@@ -18991,7 +18965,8 @@ Event Passport:
|
|
|
18991
18965
|
Staff roster (event hosts only): import replaces the roster and returns imported, replaced and
|
|
18992
18966
|
rejected rows (blank, too long, or a Staff ID repeated in the file). Columns are matched from
|
|
18993
18967
|
header names; override with the column flags. Without a last-name column, the last name is
|
|
18994
|
-
taken from the full name (--surname-position last|first, default last).
|
|
18968
|
+
taken from the full name (--surname-position last|first, default last). Files over 20,000 data
|
|
18969
|
+
rows or 200 columns, or with no importable rows, are refused and the roster is unchanged. Staff ID sign-in
|
|
18995
18970
|
matches case-insensitively, ignoring spaces and punctuation, and needs the browser.
|
|
18996
18971
|
Printed QR issue/revoke requires the last observed print version; stale versions conflict.
|
|
18997
18972
|
claim scans a station QR; collect scans a participant profile QR as an event operator.
|
|
@@ -19458,6 +19433,16 @@ var import_jszip = __toESM(require_lib3(), 1);
|
|
|
19458
19433
|
var import_papaparse = __toESM(require_papaparse(), 1);
|
|
19459
19434
|
var MAX_ROWS = 50000;
|
|
19460
19435
|
var MAX_COLUMNS = 200;
|
|
19436
|
+
var isFilled = (value) => Boolean(value?.trim());
|
|
19437
|
+
var rowLimitError = () => new Error(`The file has data below row ${MAX_ROWS.toLocaleString("en-US")}. Remove blank rows or split the file, then try again.`);
|
|
19438
|
+
var columnLimitError = () => new Error(`The file has data beyond column ${MAX_COLUMNS}. Delete the extra columns, then try again.`);
|
|
19439
|
+
var clampColumns = (cells) => {
|
|
19440
|
+
if (cells.length <= MAX_COLUMNS)
|
|
19441
|
+
return cells;
|
|
19442
|
+
if (cells.slice(MAX_COLUMNS).some(isFilled))
|
|
19443
|
+
throw columnLimitError();
|
|
19444
|
+
return cells.slice(0, MAX_COLUMNS);
|
|
19445
|
+
};
|
|
19461
19446
|
var isZip = (bytes) => bytes[0] === 80 && bytes[1] === 75 && bytes[2] === 3;
|
|
19462
19447
|
var decodeXml = (value) => value.replace(/_x([0-9A-Fa-f]{4})_/g, (_, hex) => String.fromCharCode(Number.parseInt(hex, 16))).replace(/&#x([0-9A-Fa-f]+);/g, (_, hex) => String.fromCodePoint(Number.parseInt(hex, 16))).replace(/&#(\d+);/g, (_, digits) => String.fromCodePoint(Number.parseInt(digits, 10))).replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/&/g, "&");
|
|
19463
19448
|
var textRuns = (xml) => [
|
|
@@ -19505,11 +19490,15 @@ var readRowCells = (rowXml, sharedStrings) => {
|
|
|
19505
19490
|
for (const cellMatch of rowXml.matchAll(/<c\b[^>]*?(?:\/>|>[\s\S]*?<\/c>)/g)) {
|
|
19506
19491
|
const reference = attribute(cellMatch[0], "r");
|
|
19507
19492
|
const column = reference ? columnIndex(reference) : cells.length;
|
|
19508
|
-
|
|
19493
|
+
const value = cellValue(cellMatch[0], sharedStrings);
|
|
19494
|
+
if (column < 0 || column >= MAX_COLUMNS) {
|
|
19495
|
+
if (isFilled(value))
|
|
19496
|
+
throw columnLimitError();
|
|
19509
19497
|
continue;
|
|
19498
|
+
}
|
|
19510
19499
|
while (cells.length < column)
|
|
19511
19500
|
cells.push("");
|
|
19512
|
-
cells[column] =
|
|
19501
|
+
cells[column] = value;
|
|
19513
19502
|
}
|
|
19514
19503
|
return cells;
|
|
19515
19504
|
};
|
|
@@ -19523,18 +19512,29 @@ var readXlsx = async (bytes) => {
|
|
|
19523
19512
|
for (const rowMatch of sheet.matchAll(/<row\b([^>]*?)(?:\/>|>([\s\S]*?)<\/row>)/g)) {
|
|
19524
19513
|
const rowNumber = Number(attribute(` ${rowMatch[1] ?? ""}`, "r"));
|
|
19525
19514
|
const index = Number.isInteger(rowNumber) ? rowNumber - 1 : table.length;
|
|
19526
|
-
|
|
19527
|
-
|
|
19515
|
+
const cells = readRowCells(rowMatch[2] ?? "", sharedStrings);
|
|
19516
|
+
if (index >= MAX_ROWS) {
|
|
19517
|
+
if (cells.some(isFilled))
|
|
19518
|
+
throw rowLimitError();
|
|
19519
|
+
continue;
|
|
19520
|
+
}
|
|
19528
19521
|
while (table.length < index)
|
|
19529
19522
|
table.push([]);
|
|
19530
|
-
table[index] =
|
|
19523
|
+
table[index] = cells;
|
|
19531
19524
|
}
|
|
19532
19525
|
return table;
|
|
19533
19526
|
};
|
|
19534
19527
|
var readCsv = (bytes) => {
|
|
19535
19528
|
const text = new TextDecoder("utf-8").decode(bytes).replace(/^\uFEFF/, "");
|
|
19536
19529
|
const parsed = import_papaparse.default.parse(text, { skipEmptyLines: false });
|
|
19537
|
-
|
|
19530
|
+
const badQuote = parsed.errors.find((error) => error.type === "Quotes");
|
|
19531
|
+
if (badQuote) {
|
|
19532
|
+
const near = badQuote.row === undefined ? "" : ` near row ${badQuote.row + 1}`;
|
|
19533
|
+
throw new Error(`The CSV has a misplaced or unclosed quote${near}. Fix it, then try again.`);
|
|
19534
|
+
}
|
|
19535
|
+
if (parsed.data.slice(MAX_ROWS).some((row) => row.some(isFilled)))
|
|
19536
|
+
throw rowLimitError();
|
|
19537
|
+
return parsed.data.slice(0, MAX_ROWS).map(clampColumns);
|
|
19538
19538
|
};
|
|
19539
19539
|
var squareTable = (table) => {
|
|
19540
19540
|
while (table.length > 0 && (table.at(-1) ?? []).every((value) => !value?.trim()))
|
|
@@ -19819,6 +19819,9 @@ var mapPassportRosterTable = (table, mapping) => {
|
|
|
19819
19819
|
displayName
|
|
19820
19820
|
});
|
|
19821
19821
|
});
|
|
19822
|
+
if (rows.length > PASSPORT_ROSTER_IMPORT_MAX) {
|
|
19823
|
+
throw new Error(`This file has ${rows.length.toLocaleString("en-US")} rows with data. A roster can have at most ${PASSPORT_ROSTER_IMPORT_MAX.toLocaleString("en-US")}. Split the file or remove rows you do not need.`);
|
|
19824
|
+
}
|
|
19822
19825
|
return rows;
|
|
19823
19826
|
};
|
|
19824
19827
|
var headerPatterns = {
|
|
@@ -20077,7 +20080,11 @@ var readRosterRows = async (path, flags) => {
|
|
|
20077
20080
|
throw new CliUsageError(`Could not read ${path}: ${error instanceof Error ? error.message : "unknown error"}`);
|
|
20078
20081
|
}
|
|
20079
20082
|
const mapping = resolvePassportRosterMapping(table[0] ?? [], flags);
|
|
20080
|
-
|
|
20083
|
+
try {
|
|
20084
|
+
return mapPassportRosterTable(table, mapping);
|
|
20085
|
+
} catch (error) {
|
|
20086
|
+
throw new CliUsageError(`Could not import ${path}: ${error instanceof Error ? error.message : "unknown error"}`);
|
|
20087
|
+
}
|
|
20081
20088
|
};
|
|
20082
20089
|
var optionalEntry = (key, value, parse) => value === undefined ? {} : { [key]: parse(value) };
|
|
20083
20090
|
var runPassportCommand = async (input) => {
|