@sheetxl/scripting 0.8.0-beta.15 → 0.8.0-beta.16
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/LICENSE.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# License
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Copyright (c) 2026-present SheetXL Inc. & Michael T. Ford. All rights reserved.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This package is commercial software, licensed under the SheetXL End-User License Agreement:
|
|
6
|
+
https://www.sheetxl.com/eula
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
A free Community License covers evaluation, learning and non-commercial use. Commercial use
|
|
9
|
+
requires a paid license — see https://www.sheetxl.com/pricing.
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
https://www.sheetxl.com/docs/guides/licensing-pricing
|
|
11
|
+
Third-party components bundled in this package remain under their own licenses, listed in
|
|
12
|
+
`licenses/dependencies.txt`.
|
|
@@ -4,7 +4,7 @@ var t = class {
|
|
|
4
4
|
}
|
|
5
5
|
async getWorkerWrapper() {
|
|
6
6
|
if (this.workerWrapper) return this.workerWrapper;
|
|
7
|
-
const { createCompilerWorker: r } = await import("./
|
|
7
|
+
const { createCompilerWorker: r } = await import("./CotP1NJdNdhRg2_K.mjs");
|
|
8
8
|
return this.workerWrapper = await r(), this.workerWrapper;
|
|
9
9
|
}
|
|
10
10
|
async compileModule(r) {
|
|
@@ -64,20 +64,20 @@ var c = class {
|
|
|
64
64
|
Row: "row"
|
|
65
65
|
};
|
|
66
66
|
({ ...ie });
|
|
67
|
-
function
|
|
67
|
+
function Ge(e, t) {
|
|
68
68
|
if (e === t) return !0;
|
|
69
69
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
70
70
|
if (e.constructor !== t.constructor) return !1;
|
|
71
71
|
let r, n, i;
|
|
72
72
|
if (Array.isArray(e)) {
|
|
73
73
|
if (r = e.length, r != t.length) return !1;
|
|
74
|
-
for (n = r; n-- !== 0;) if (!
|
|
74
|
+
for (n = r; n-- !== 0;) if (!Ge(e[n], t[n])) return !1;
|
|
75
75
|
return !0;
|
|
76
76
|
}
|
|
77
77
|
if (e instanceof Map && t instanceof Map) {
|
|
78
78
|
if (e.size !== t.size) return !1;
|
|
79
79
|
for (n of e.entries()) if (!t.has(n[0])) return !1;
|
|
80
|
-
for (n of e.entries()) if (!
|
|
80
|
+
for (n of e.entries()) if (!Ge(n[1], t.get(n[0]))) return !1;
|
|
81
81
|
return !0;
|
|
82
82
|
}
|
|
83
83
|
if (e instanceof Set && t instanceof Set) {
|
|
@@ -97,7 +97,7 @@ function Xe(e, t) {
|
|
|
97
97
|
for (n = r; n-- !== 0;) if (!Object.prototype.hasOwnProperty.call(t, i[n])) return !1;
|
|
98
98
|
for (n = r; n-- !== 0;) {
|
|
99
99
|
let a = i[n];
|
|
100
|
-
if ((a !== "_owner" || !e.$$typeof) && !
|
|
100
|
+
if ((a !== "_owner" || !e.$$typeof) && !Ge(e[a], t[a])) return !1;
|
|
101
101
|
}
|
|
102
102
|
return !0;
|
|
103
103
|
}
|
|
@@ -174,7 +174,7 @@ var lr = ge({
|
|
|
174
174
|
castToString: () => Mn,
|
|
175
175
|
cloneObject: () => xn,
|
|
176
176
|
consoleWithNoSource: () => zn,
|
|
177
|
-
deepEqual: () =>
|
|
177
|
+
deepEqual: () => Ge,
|
|
178
178
|
deepFreeze: () => gr,
|
|
179
179
|
deepMerge: () => Ee,
|
|
180
180
|
diffValues: () => $n,
|
|
@@ -518,7 +518,7 @@ ge({
|
|
|
518
518
|
EmptyCell: () => yr,
|
|
519
519
|
EmptyRange: () => Kn,
|
|
520
520
|
EmptyRanges: () => Vn,
|
|
521
|
-
EmptySelection: () =>
|
|
521
|
+
EmptySelection: () => Xn,
|
|
522
522
|
InsertCutShift: () => ve,
|
|
523
523
|
cellToRange: () => Wn,
|
|
524
524
|
classifyInsertCut: () => ii,
|
|
@@ -531,7 +531,7 @@ ge({
|
|
|
531
531
|
extendRangeToIntersectingRanges: () => Lr,
|
|
532
532
|
extendRangeToUnionRanges: () => qn,
|
|
533
533
|
intersectRanges: () => Nr,
|
|
534
|
-
isCellWithinRange: () =>
|
|
534
|
+
isCellWithinRange: () => Gn,
|
|
535
535
|
isEqualCells: () => Ir,
|
|
536
536
|
isEqualRanges: () => yt,
|
|
537
537
|
isEqualRangesArrays: () => $r,
|
|
@@ -562,7 +562,7 @@ var yr = Object.freeze({
|
|
|
562
562
|
rowStart: 0,
|
|
563
563
|
colEnd: 0,
|
|
564
564
|
rowEnd: 0
|
|
565
|
-
}), Vn = De,
|
|
565
|
+
}), Vn = De, Xn = Object.freeze({
|
|
566
566
|
cell: yr,
|
|
567
567
|
ranges: De,
|
|
568
568
|
rangeIndex: -1
|
|
@@ -603,7 +603,7 @@ function Ir(e, t) {
|
|
|
603
603
|
function yt(e, t) {
|
|
604
604
|
return e === t || !(!e || !t) && e.rowStart === t.rowStart && e.rowEnd === t.rowEnd && e.colStart === t.colStart && e.colEnd === t.colEnd && e.scope === t.scope;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function Gn(e, t) {
|
|
607
607
|
if (!e || !t) return !1;
|
|
608
608
|
let r = e.rowIndex;
|
|
609
609
|
if (r < t.rowStart || r > t.rowEnd) return !1;
|
|
@@ -2020,7 +2020,7 @@ const E = Object.freeze({
|
|
|
2020
2020
|
/** An enum member has no doc comment. */
|
|
2021
2021
|
EnumMemberUndocumented: "SXL9005"
|
|
2022
2022
|
});
|
|
2023
|
-
var
|
|
2023
|
+
var Gi;
|
|
2024
2024
|
(function(e) {
|
|
2025
2025
|
e.MAX_TEXT_LENGTH = 32767;
|
|
2026
2026
|
let t = e.MAX_SIGNIFICANT_DIGITS = 15;
|
|
@@ -2070,8 +2070,8 @@ var Xi;
|
|
|
2070
2070
|
let A = S - f;
|
|
2071
2071
|
return A >= -308 && A <= 308;
|
|
2072
2072
|
};
|
|
2073
|
-
})(
|
|
2074
|
-
var
|
|
2073
|
+
})(Gi ||= {});
|
|
2074
|
+
var Gt, ot, Hi, T, me = {
|
|
2075
2075
|
Number: "number",
|
|
2076
2076
|
String: "string",
|
|
2077
2077
|
Boolean: "boolean",
|
|
@@ -2088,11 +2088,11 @@ var Xt, ot, Hi, T, me = {
|
|
|
2088
2088
|
Lambda: "lambda",
|
|
2089
2089
|
Omitted: "omitted"
|
|
2090
2090
|
};
|
|
2091
|
-
(ot =
|
|
2091
|
+
(ot = Gt ||= {}).Axis = {
|
|
2092
2092
|
Column: "column",
|
|
2093
2093
|
Row: "row"
|
|
2094
2094
|
}, ot.AxisSelection = {
|
|
2095
|
-
...
|
|
2095
|
+
...Gt.Axis,
|
|
2096
2096
|
Both: "both"
|
|
2097
2097
|
}, ot.Direction = {
|
|
2098
2098
|
Up: "up",
|
|
@@ -2351,10 +2351,10 @@ var Xt, ot, Hi, T, me = {
|
|
|
2351
2351
|
})(T ||= {});
|
|
2352
2352
|
var ee = {};
|
|
2353
2353
|
ee[T.Code.Parse] = T.Parse, ee[T.Code.Null] = T.Null, ee[T.Code.Div0] = T.Div0, ee[T.Code.Value] = T.Value, ee[T.Code.Ref] = T.Ref, ee[T.Code.Name] = T.Name, ee[T.Code.Num] = T.Num, ee[T.Code.NA] = T.NA, ee[T.Code.GettingData] = T.GettingData, ee[T.Code.Spill] = T.Spill, ee[T.Code.Connect] = T.Connect, ee[T.Code.Blocked] = T.Blocked, ee[T.Code.Unknown] = T.Unknown, ee[T.Code.Field] = T.Field, ee[T.Code.Calc] = T.Calc, ee[T.Code.Busy] = T.Busy, ee[T.Code.Python] = T.Python, ee[T.Code.Timeout] = T.Timeout;
|
|
2354
|
-
var
|
|
2354
|
+
var Gr = /* @__PURE__ */ new Map(), Hr = /* @__PURE__ */ new Map(), Wr = /* @__PURE__ */ new Map(), Jr = /* @__PURE__ */ new Map(), Jt = Object.keys(ee);
|
|
2355
2355
|
for (let e = 0; e < Jt.length; e++) {
|
|
2356
2356
|
let t = ee[Jt[e]], r = new t();
|
|
2357
|
-
Wr.set(r.getLabel(), t), Jr.set(r.getCode(), t),
|
|
2357
|
+
Wr.set(r.getLabel(), t), Jr.set(r.getCode(), t), Gr.set(r.getLabel(), r), Hr.set(r.getCode(), r);
|
|
2358
2358
|
}
|
|
2359
2359
|
(function(e) {
|
|
2360
2360
|
let t = e.getBuiltInByCode = (r) => Hr.get(r);
|
|
@@ -2380,7 +2380,7 @@ for (let e = 0; e < Jt.length; e++) {
|
|
|
2380
2380
|
}, e.newTypedError = (r, n, i) => {
|
|
2381
2381
|
let a;
|
|
2382
2382
|
return a = typeof r == "string" ? Wr.get(r) : Jr.get(r), a ||= T.Unknown, new a(n, i);
|
|
2383
|
-
}, e.getBuiltInByLabel = (r) =>
|
|
2383
|
+
}, e.getBuiltInByLabel = (r) => Gr.get(r), e.isError = function(r, n) {
|
|
2384
2384
|
return !!r && r.isFormulaError === !0 && (n === void 0 || r.getCode() === n);
|
|
2385
2385
|
};
|
|
2386
2386
|
})(T ||= {});
|
|
@@ -2475,8 +2475,11 @@ var Wi = class {
|
|
|
2475
2475
|
createCriteria(e, t) {
|
|
2476
2476
|
throw le("createCriteria");
|
|
2477
2477
|
}
|
|
2478
|
-
|
|
2479
|
-
throw le("
|
|
2478
|
+
createPivot(e, t, r) {
|
|
2479
|
+
throw le("createPivot");
|
|
2480
|
+
}
|
|
2481
|
+
getPivotAt(e) {
|
|
2482
|
+
return null;
|
|
2480
2483
|
}
|
|
2481
2484
|
parseAsLiteral(e) {
|
|
2482
2485
|
let t = e.toUpperCase();
|
|
@@ -2559,8 +2562,11 @@ var Wi = class {
|
|
|
2559
2562
|
createCriteria(e, t) {
|
|
2560
2563
|
return this._getScope().createCriteria(e, t);
|
|
2561
2564
|
}
|
|
2562
|
-
|
|
2563
|
-
return this._getScope().
|
|
2565
|
+
createPivot(e, t, r) {
|
|
2566
|
+
return this._getScope().createPivot(e, t, r);
|
|
2567
|
+
}
|
|
2568
|
+
getPivotAt(e) {
|
|
2569
|
+
return this._getScope().getPivotAt?.(e) ?? null;
|
|
2564
2570
|
}
|
|
2565
2571
|
parseAsLiteral(e) {
|
|
2566
2572
|
let t = this._getScope();
|
|
@@ -3070,7 +3076,7 @@ function fa(e, t, r, n) {
|
|
|
3070
3076
|
Q !== void 0 ? m(V ?? u, E.EnumDuplicateValue, "warning", \`'\${$}.\${Y}' has the same value as '\${$}.\${Q}' (\${JSON.stringify(I)}). A formula passes the value, so the two cannot be told apart.\`) : g.set(I, Y), re === "" && m(V ?? u, E.EnumMemberUndocumented, "warning", \`'\${$}.\${Y}' is missing a description. Add a doc comment above the member — it is what the argument dropdown shows.\`);
|
|
3071
3077
|
}
|
|
3072
3078
|
}
|
|
3073
|
-
const
|
|
3079
|
+
const G = {
|
|
3074
3080
|
id: $,
|
|
3075
3081
|
type: U ? me.Number : me.String,
|
|
3076
3082
|
members: M.map(([g, x, , , I]) => I ? [
|
|
@@ -3079,18 +3085,18 @@ function fa(e, t, r, n) {
|
|
|
3079
3085
|
I
|
|
3080
3086
|
] : [g, x])
|
|
3081
3087
|
};
|
|
3082
|
-
C ? h.set(C,
|
|
3083
|
-
const
|
|
3088
|
+
C ? h.set(C, G) : y.set($, G);
|
|
3089
|
+
const X = C ? Le(C.getDocumentationComment(r)) : "", j = {};
|
|
3084
3090
|
for (const [g, , , x] of M) x && (j[g] = { description: x });
|
|
3085
|
-
if (
|
|
3091
|
+
if (X || Object.keys(j).length > 0) {
|
|
3086
3092
|
const g = {};
|
|
3087
|
-
|
|
3093
|
+
X && (g.summary = X), Object.keys(j).length > 0 && (g.members = j), w.set(G, g);
|
|
3088
3094
|
}
|
|
3089
|
-
return
|
|
3095
|
+
return G;
|
|
3090
3096
|
}, we = (u, p, v, _) => {
|
|
3091
3097
|
const C = (U, $, B) => {
|
|
3092
|
-
const
|
|
3093
|
-
return S($,
|
|
3098
|
+
const G = { name: U };
|
|
3099
|
+
return S($, G, v, !0), B && (G.optional = !0), _ && !G.acceptError && (G.acceptError = !0), G;
|
|
3094
3100
|
};
|
|
3095
3101
|
if (u.kind !== e.SyntaxKind.TupleType) return [C(p, u, !1)];
|
|
3096
3102
|
const M = u.elements;
|
|
@@ -3111,12 +3117,12 @@ function fa(e, t, r, n) {
|
|
|
3111
3117
|
}
|
|
3112
3118
|
if (u.kind === e.SyntaxKind.ParenthesizedType) return te(u.type, p, v, _, C, M, z, U);
|
|
3113
3119
|
if (u.kind === e.SyntaxKind.UnionType) {
|
|
3114
|
-
const $ = (
|
|
3120
|
+
const $ = (X) => X.kind === e.SyntaxKind.UndefinedKeyword || X.kind === e.SyntaxKind.VoidKeyword || X.kind === e.SyntaxKind.NullKeyword || X.kind === e.SyntaxKind.LiteralType && X.literal?.kind === e.SyntaxKind.NullKeyword, B = u.types.filter((X) => !$(X));
|
|
3115
3121
|
if (B.length === 1) return te(B[0], p, v, _, C, M, z, U);
|
|
3116
|
-
const
|
|
3117
|
-
if (
|
|
3118
|
-
if (
|
|
3119
|
-
p.scalar =
|
|
3122
|
+
const G = de(u, p.name ?? f(u));
|
|
3123
|
+
if (G === void 0) return;
|
|
3124
|
+
if (G !== null) {
|
|
3125
|
+
p.scalar = G.type, _ && (p.enum = G);
|
|
3120
3126
|
return;
|
|
3121
3127
|
}
|
|
3122
3128
|
if (!_) {
|
|
@@ -3124,20 +3130,20 @@ function fa(e, t, r, n) {
|
|
|
3124
3130
|
return;
|
|
3125
3131
|
}
|
|
3126
3132
|
if (B.length === 2) {
|
|
3127
|
-
const
|
|
3128
|
-
if (j >= 0 && !
|
|
3133
|
+
const X = (g) => g.kind !== e.SyntaxKind.TypeReference ? !1 : e.isTypeReferenceNode(g) && _e(g) === "Lambda", j = B.findIndex(X);
|
|
3134
|
+
if (j >= 0 && !X(B[1 - j])) {
|
|
3129
3135
|
te(B[1 - j], p, v, _, C, M, z, U), A(B[j], _e(B[j]), p, v, _);
|
|
3130
3136
|
return;
|
|
3131
3137
|
}
|
|
3132
3138
|
}
|
|
3133
3139
|
if (_ && B.length === 2) {
|
|
3134
|
-
const
|
|
3140
|
+
const X = (g) => {
|
|
3135
3141
|
if (!(g.kind !== e.SyntaxKind.TypeReference || g.typeArguments?.length)) return ht.get(_e(g));
|
|
3136
|
-
}, j = B.findIndex((g) =>
|
|
3137
|
-
if (j >= 0 &&
|
|
3142
|
+
}, j = B.findIndex((g) => X(g) !== void 0);
|
|
3143
|
+
if (j >= 0 && X(B[1 - j]) === void 0) {
|
|
3138
3144
|
const g = {}, x = C.count;
|
|
3139
3145
|
if (te(B[1 - j], g, v, _, C, M, !1), g.scalar && !g.range && g.lambda == null && C.count === x) {
|
|
3140
|
-
p.range =
|
|
3146
|
+
p.range = X(B[j]), p.scalar = g.scalar, p.valueOrRange = !0;
|
|
3141
3147
|
const I = g.enum;
|
|
3142
3148
|
I && (p.enum = I);
|
|
3143
3149
|
return;
|
|
@@ -3145,8 +3151,8 @@ function fa(e, t, r, n) {
|
|
|
3145
3151
|
}
|
|
3146
3152
|
}
|
|
3147
3153
|
if (_ && B.length === 2) {
|
|
3148
|
-
const
|
|
3149
|
-
if (j >= 0 && !
|
|
3154
|
+
const X = (g) => g.kind === e.SyntaxKind.TypeReference && !g.typeArguments?.length && _e(g) === "Scalar", j = B.findIndex(X);
|
|
3155
|
+
if (j >= 0 && !X(B[1 - j])) {
|
|
3150
3156
|
const g = de(B[1 - j], p.name ?? f(u));
|
|
3151
3157
|
if (g === void 0) return;
|
|
3152
3158
|
if (g !== null) {
|
|
@@ -3176,10 +3182,10 @@ function fa(e, t, r, n) {
|
|
|
3176
3182
|
return;
|
|
3177
3183
|
}
|
|
3178
3184
|
if (_ && z) {
|
|
3179
|
-
const B = p,
|
|
3185
|
+
const B = p, G = B.name ?? f(u) ?? "parameter", X = B.acceptError;
|
|
3180
3186
|
delete B.acceptError;
|
|
3181
|
-
const j = { name:
|
|
3182
|
-
S($, j, v, !0),
|
|
3187
|
+
const j = { name: G };
|
|
3188
|
+
S($, j, v, !0), X && !j.acceptError && (j.acceptError = !0), B.repeating = [j];
|
|
3183
3189
|
return;
|
|
3184
3190
|
}
|
|
3185
3191
|
C.count++, te($, p, v, _, C);
|
|
@@ -3362,10 +3368,10 @@ function fa(e, t, r, n) {
|
|
|
3362
3368
|
return;
|
|
3363
3369
|
}
|
|
3364
3370
|
const B = ht.get($);
|
|
3365
|
-
let
|
|
3366
|
-
B && (p.range = B,
|
|
3367
|
-
const
|
|
3368
|
-
if (
|
|
3371
|
+
let G = !1;
|
|
3372
|
+
B && (p.range = B, G = !0);
|
|
3373
|
+
const X = ia.get($);
|
|
3374
|
+
if (X && (p.scalar = X), X !== void 0 && (G = !0), A(u, $, p, v, _)) return;
|
|
3369
3375
|
if (_) {
|
|
3370
3376
|
if ($ === "Volatile" || $ === \`\${se}.Volatile\`) {
|
|
3371
3377
|
o(u, E.InvalidParamType, \`'Volatile' is not a valid parameter type: '\${f(u)}'. It describes the function's RESULT, so it belongs on the return type.\`);
|
|
@@ -3374,12 +3380,12 @@ function fa(e, t, r, n) {
|
|
|
3374
3380
|
if (da.has($)) return Qt;
|
|
3375
3381
|
const g = bt.get($);
|
|
3376
3382
|
if (g) return g;
|
|
3377
|
-
} else if ($ === "Promise") b = u,
|
|
3383
|
+
} else if ($ === "Promise") b = u, G = !0;
|
|
3378
3384
|
else {
|
|
3379
3385
|
const g = ua.get($);
|
|
3380
|
-
g && (Object.assign(p, g()),
|
|
3386
|
+
g && (Object.assign(p, g()), G = !0);
|
|
3381
3387
|
}
|
|
3382
|
-
if (!
|
|
3388
|
+
if (!G) {
|
|
3383
3389
|
const g = de(u, p.name ?? f(u));
|
|
3384
3390
|
if (g === void 0) return;
|
|
3385
3391
|
if (g !== null) {
|
|
@@ -3387,7 +3393,7 @@ function fa(e, t, r, n) {
|
|
|
3387
3393
|
return;
|
|
3388
3394
|
}
|
|
3389
3395
|
}
|
|
3390
|
-
if (!
|
|
3396
|
+
if (!G) {
|
|
3391
3397
|
const g = "number, string, boolean, Scalar, Lambda, Date, FormulaError.Known, IRichData, IRange, IReferenceRange (and arrays of these; optionally wrapped in AcceptError<T>, or grouped with Repeating<T>)", x = "number, string, boolean, Scalar, Date, FormulaError.Known, IRichData, IRange, Volatile<T> (and arrays of these)";
|
|
3392
3398
|
let I;
|
|
3393
3399
|
_ ? M ? I = \`'\${$}' is not a valid first parameter: '\${f(u)}'. The first parameter is EITHER a macro target (making this a macro) OR a calculation input (making this a calculation function). Allowed: \${na.join(", ")} (macro target); \${g} (calculation input).\` : I = \`'\${$}' is not a valid parameter type: '\${f(u)}'. Allowed: \${g}.\` : I = \`'\${$}' is not a valid return type: '\${f(u)}'. Allowed: \${x}.\`, o(u, _ ? E.InvalidParamType : E.InvalidReturnType, I);
|
|
@@ -3427,8 +3433,8 @@ function fa(e, t, r, n) {
|
|
|
3427
3433
|
b = null, S(u.type, z, v, !1), v.returnType = z;
|
|
3428
3434
|
const U = {};
|
|
3429
3435
|
Ie(u) && (U.default = !0, c = p), v.parameters = [];
|
|
3430
|
-
const $ = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map(),
|
|
3431
|
-
let
|
|
3436
|
+
const $ = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map(), G = /* @__PURE__ */ new Set();
|
|
3437
|
+
let X = null, j = null, g = null, x = 0, I = !1, V = 0;
|
|
3432
3438
|
for (let P = 0; P < u.parameters.length; P++) {
|
|
3433
3439
|
const O = u.parameters[P], N = {};
|
|
3434
3440
|
N.name = O.name?.getText();
|
|
@@ -3451,13 +3457,13 @@ function fa(e, t, r, n) {
|
|
|
3451
3457
|
continue;
|
|
3452
3458
|
}
|
|
3453
3459
|
if (N.lambda !== void 0) {
|
|
3454
|
-
if (
|
|
3455
|
-
o(O, E.MultipleLambda, \`'\${v.name}' has more than one Lambda parameter ('\${
|
|
3460
|
+
if (X !== null) {
|
|
3461
|
+
o(O, E.MultipleLambda, \`'\${v.name}' has more than one Lambda parameter ('\${X}' and '\${N.name}'). Only one Lambda parameter is allowed.\`);
|
|
3456
3462
|
return;
|
|
3457
3463
|
}
|
|
3458
|
-
|
|
3459
|
-
} else if (
|
|
3460
|
-
o(O, E.LambdaNotLast, \`'\${v.name}' Lambda parameter ('\${
|
|
3464
|
+
X = N.name;
|
|
3465
|
+
} else if (X !== null) {
|
|
3466
|
+
o(O, E.LambdaNotLast, \`'\${v.name}' Lambda parameter ('\${X}') must be the last parameter, but '\${N.name}' follows it.\`);
|
|
3461
3467
|
return;
|
|
3462
3468
|
}
|
|
3463
3469
|
const ye = N.optional === !0 || !((O.initializer === void 0 || O.initializer === null) && (O.questionToken === void 0 || O.questionToken === null));
|
|
@@ -3525,7 +3531,7 @@ function fa(e, t, r, n) {
|
|
|
3525
3531
|
Se && ((_.enums ??= {})[ue.enum.id] = Se);
|
|
3526
3532
|
}
|
|
3527
3533
|
if ($.set(N.name, N), B.set(N.name, O), H && H.length > 1) {
|
|
3528
|
-
|
|
3534
|
+
G.add(N.name);
|
|
3529
3535
|
for (const ue of H) {
|
|
3530
3536
|
const Se = \`\${N.name}.\${ue.name}\`;
|
|
3531
3537
|
_.parameters[Se] = { description: "" }, $.set(Se, ue), B.set(Se, O);
|
|
@@ -3629,7 +3635,7 @@ function fa(e, t, r, n) {
|
|
|
3629
3635
|
}
|
|
3630
3636
|
if (Y) {
|
|
3631
3637
|
const P = _.parameters ?? {};
|
|
3632
|
-
for (const [O, N] of Object.entries(P)) if (!
|
|
3638
|
+
for (const [O, N] of Object.entries(P)) if (!G.has(O) && !N.description) {
|
|
3633
3639
|
const ne = B.get(O);
|
|
3634
3640
|
m(ne, E.MissingParamDescription, "warning", \`'\${p}': parameter '\${O}' is missing a description. Add an '@param \${O}' tag.\`);
|
|
3635
3641
|
}
|
|
@@ -3816,7 +3822,7 @@ interface Promise<T> {
|
|
|
3816
3822
|
isTrue?: boolean;
|
|
3817
3823
|
}
|
|
3818
3824
|
\`, xa = async () => _a;
|
|
3819
|
-
let
|
|
3825
|
+
let Xe = null;
|
|
3820
3826
|
const st = "sheetxl.d.ts", nr = "sheetxl-modules.d.ts", Ta = \`declare module '@sheetxl/primitives' { export = SheetXL; }
|
|
3821
3827
|
\`, Ca = [
|
|
3822
3828
|
"lib.webworker.d.ts",
|
|
@@ -3831,15 +3837,15 @@ async function Aa() {
|
|
|
3831
3837
|
})), ut;
|
|
3832
3838
|
}
|
|
3833
3839
|
async function ln() {
|
|
3834
|
-
if (
|
|
3840
|
+
if (Xe) return Xe;
|
|
3835
3841
|
try {
|
|
3836
3842
|
const e = await (await Promise.resolve().then(() => (on(), an))).initialize();
|
|
3837
3843
|
if (!e) throw new Error("TypeScript could not be loaded. Check your connection and try again.");
|
|
3838
3844
|
return e;
|
|
3839
3845
|
} catch (e) {
|
|
3840
|
-
throw
|
|
3846
|
+
throw Xe = null, e;
|
|
3841
3847
|
} finally {
|
|
3842
|
-
|
|
3848
|
+
Xe = null;
|
|
3843
3849
|
}
|
|
3844
3850
|
}
|
|
3845
3851
|
async function Ia(e) {
|
package/browser/esm/index.mjs
CHANGED
|
@@ -50,7 +50,7 @@ var k = Object.freeze({ compile: async function(t) {
|
|
|
50
50
|
if (l && f.deepEqual(l, t)) return a;
|
|
51
51
|
const n = await (await (async function() {
|
|
52
52
|
if (o) return o;
|
|
53
|
-
const { TypeScriptCompiler: e } = await import("./
|
|
53
|
+
const { TypeScriptCompiler: e } = await import("./BN3QDziAPoH4mB5P.mjs");
|
|
54
54
|
return o = new e();
|
|
55
55
|
})()).compileModule(t);
|
|
56
56
|
return a = n, l = t, n;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/scripting",
|
|
3
3
|
"description": "Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild.",
|
|
4
|
-
"version": "0.8.0-beta.
|
|
5
|
-
"license": "SEE LICENSE IN
|
|
4
|
+
"version": "0.8.0-beta.16",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"scripting"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@sheetxl/primitives": "^0.8.0-beta.
|
|
43
|
-
"@sheetxl/utils": "^0.8.0-beta.
|
|
42
|
+
"@sheetxl/primitives": "^0.8.0-beta.16",
|
|
43
|
+
"@sheetxl/utils": "^0.8.0-beta.16"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"esbuild-wasm": ">=0.25.7",
|