@lotics/cli 0.44.1 → 0.44.2
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/src/cli.js +43 -20
- package/dist/starter_template.d.ts +1 -1
- package/dist/starter_template.js +29 -9
- package/package.json +1 -1
package/dist/src/cli.js
CHANGED
|
@@ -30179,7 +30179,7 @@ import { spawn as spawn2 } from "node:child_process";
|
|
|
30179
30179
|
import { tmpdir } from "node:os";
|
|
30180
30180
|
|
|
30181
30181
|
// src/starter_template.ts
|
|
30182
|
-
var STARTER_FALLBACK_UI_VERSION = "
|
|
30182
|
+
var STARTER_FALLBACK_UI_VERSION = "1.8.0";
|
|
30183
30183
|
var STARTER_FALLBACK_SDK_VERSION = "0.11.0";
|
|
30184
30184
|
var STARTER_REACT_NATIVE_VERSION = "0.85.3";
|
|
30185
30185
|
function buildStarterTemplate(args) {
|
|
@@ -30322,14 +30322,34 @@ export default defineConfig({
|
|
|
30322
30322
|
dedupe: ["react", "react-dom", "react-native-web"],
|
|
30323
30323
|
},
|
|
30324
30324
|
optimizeDeps: {
|
|
30325
|
-
//
|
|
30326
|
-
//
|
|
30327
|
-
//
|
|
30328
|
-
//
|
|
30329
|
-
//
|
|
30330
|
-
//
|
|
30331
|
-
//
|
|
30332
|
-
|
|
30325
|
+
// \`recharts\` (used by @lotics/ui chart_* + sparkline) imports
|
|
30326
|
+
// \`es-toolkit/compat/get\` as a default-export CJS module. Vite's dev
|
|
30327
|
+
// server treats \`compat/*\` as ESM and won't synthesize a default,
|
|
30328
|
+
// so \`import get from "es-toolkit/compat/get"\` fails to resolve.
|
|
30329
|
+
// Pre-bundling forces Vite to convert it to an ESM shim with a default
|
|
30330
|
+
// export. Production build (rollup) handles it correctly without this.
|
|
30331
|
+
//
|
|
30332
|
+
// react-native-web itself is force-prebundled (folds its core CJS deps like
|
|
30333
|
+
// @react-native/normalize-colors into one interop'd chunk), and the deep
|
|
30334
|
+
// subpaths it reaches via *default* imports (e.g. @react-native-picker's web
|
|
30335
|
+
// <select> build) are each pre-bundled into an ESM shim \u2014 Vite's dev optimizer
|
|
30336
|
+
// otherwise serves them without a synthesized default export ("does not
|
|
30337
|
+
// provide an export named 'default'"), blanking the iframe. (Production/rollup
|
|
30338
|
+
// resolves the interop already, so this is dev-only.)
|
|
30339
|
+
include: [
|
|
30340
|
+
"recharts", "es-toolkit", "es-toolkit/compat",
|
|
30341
|
+
"react-native-web", "@react-native/normalize-colors",
|
|
30342
|
+
"inline-style-prefixer/lib/createPrefixer",
|
|
30343
|
+
"inline-style-prefixer/lib/plugins/crossFade",
|
|
30344
|
+
"inline-style-prefixer/lib/plugins/imageSet",
|
|
30345
|
+
"inline-style-prefixer/lib/plugins/logical",
|
|
30346
|
+
"inline-style-prefixer/lib/plugins/position",
|
|
30347
|
+
"inline-style-prefixer/lib/plugins/sizing",
|
|
30348
|
+
"inline-style-prefixer/lib/plugins/transition",
|
|
30349
|
+
"postcss-value-parser", "fbjs/lib/invariant", "fbjs/lib/warning",
|
|
30350
|
+
"styleq", "styleq/transform-localize-style",
|
|
30351
|
+
"react", "react-dom", "react-dom/client", "nullthrows",
|
|
30352
|
+
],
|
|
30333
30353
|
// The dep optimizer pre-bundles deps with a SEPARATE esbuild pass that
|
|
30334
30354
|
// top-level \`define\` doesn't always reach, so a pre-bundled RN dep can
|
|
30335
30355
|
// still hit \`__DEV__ is not defined\` under \`lotics app dev\`. Define it
|
|
@@ -39228,7 +39248,7 @@ var drawingParser = new XMLParser({
|
|
|
39228
39248
|
processEntities: false,
|
|
39229
39249
|
isArray: (tagName) => tagName === "xdr:twoCellAnchor" || tagName === "xdr:oneCellAnchor" || tagName === "Relationship"
|
|
39230
39250
|
});
|
|
39231
|
-
function parseSheet(sheetXml, sheetRelsXml, styles, sharedStrings, theme, indexedColors, zipEntries, date1904) {
|
|
39251
|
+
function parseSheet(sheetXml, sheetRelsXml, styles, sharedStrings, theme, indexedColors, zipEntries, date1904, maxRows = MAX_ROWS_PER_SHEET) {
|
|
39232
39252
|
const doc = xmlParser4.parse(sheetXml);
|
|
39233
39253
|
const worksheet = doc?.["worksheet"];
|
|
39234
39254
|
if (!worksheet) return emptySheet("Sheet");
|
|
@@ -39246,7 +39266,7 @@ function parseSheet(sheetXml, sheetRelsXml, styles, sharedStrings, theme, indexe
|
|
|
39246
39266
|
maxCol,
|
|
39247
39267
|
maxContentWidth,
|
|
39248
39268
|
rowOutlineLevels
|
|
39249
|
-
} = parseSheetData(worksheet, styles, sharedStrings, hyperlinkMap, defaultRowHeight, date1904);
|
|
39269
|
+
} = parseSheetData(worksheet, styles, sharedStrings, hyperlinkMap, defaultRowHeight, date1904, maxRows);
|
|
39250
39270
|
const colCount = Math.max(parsedCols.length > 0 ? parsedCols[parsedCols.length - 1].max : 0, maxCol);
|
|
39251
39271
|
const columns = buildColumns(parsedCols, colHidden, maxContentWidth, colCount, defaultColWidth);
|
|
39252
39272
|
const mergedCells = parseMergedCells(worksheet);
|
|
@@ -39428,7 +39448,7 @@ function buildColumns(colDefs, colHidden, maxContentWidth, colCount, _defaultCol
|
|
|
39428
39448
|
}
|
|
39429
39449
|
return columns;
|
|
39430
39450
|
}
|
|
39431
|
-
function parseSheetData(worksheet, styles, sharedStrings, hyperlinkMap, defaultRowHeight, date1904) {
|
|
39451
|
+
function parseSheetData(worksheet, styles, sharedStrings, hyperlinkMap, defaultRowHeight, date1904, maxRows) {
|
|
39432
39452
|
const sheetData = worksheet["sheetData"];
|
|
39433
39453
|
if (!sheetData) {
|
|
39434
39454
|
return {
|
|
@@ -39466,7 +39486,7 @@ function parseSheetData(worksheet, styles, sharedStrings, hyperlinkMap, defaultR
|
|
|
39466
39486
|
}
|
|
39467
39487
|
if (rowEl["@_hidden"] === "1" || rowEl["@_hidden"] === "true") continue;
|
|
39468
39488
|
rowCount++;
|
|
39469
|
-
if (rowCount >
|
|
39489
|
+
if (rowCount > maxRows) continue;
|
|
39470
39490
|
const height = rowEl["@_ht"] ? parseFloat(rowEl["@_ht"]) : defaultRowHeight;
|
|
39471
39491
|
const cellArr = rowEl["c"];
|
|
39472
39492
|
const cells = [];
|
|
@@ -39495,7 +39515,7 @@ function parseSheetData(worksheet, styles, sharedStrings, hyperlinkMap, defaultR
|
|
|
39495
39515
|
return {
|
|
39496
39516
|
rows,
|
|
39497
39517
|
totalRowCount,
|
|
39498
|
-
truncated: rowCount >
|
|
39518
|
+
truncated: rowCount > maxRows,
|
|
39499
39519
|
maxCol,
|
|
39500
39520
|
maxContentWidth,
|
|
39501
39521
|
rowOutlineLevels
|
|
@@ -39537,10 +39557,12 @@ function parseCell(cellEl, styles, sharedStrings, hyperlinkMap, date1904) {
|
|
|
39537
39557
|
if (fEl !== void 0 && fEl !== null) {
|
|
39538
39558
|
if (typeof fEl === "object") {
|
|
39539
39559
|
const fObj = fEl;
|
|
39540
|
-
|
|
39560
|
+
const text = fObj["#text"];
|
|
39561
|
+
formula = text == null ? void 0 : String(text);
|
|
39541
39562
|
if (fObj["@_t"] === "array") {
|
|
39542
39563
|
isArrayFormula = true;
|
|
39543
|
-
|
|
39564
|
+
const ref2 = fObj["@_ref"];
|
|
39565
|
+
arrayRange = ref2 == null ? void 0 : String(ref2);
|
|
39544
39566
|
if (formula?.startsWith("{") && formula.endsWith("}")) {
|
|
39545
39567
|
formula = formula.slice(1, -1);
|
|
39546
39568
|
}
|
|
@@ -41109,11 +41131,11 @@ function ensureVmlArray(val) {
|
|
|
41109
41131
|
}
|
|
41110
41132
|
|
|
41111
41133
|
// ../xlsx/src/excel_parser.ts
|
|
41112
|
-
function parseExcelBuffer(arrayBuffer) {
|
|
41134
|
+
function parseExcelBuffer(arrayBuffer, options) {
|
|
41113
41135
|
const zip = unzipXlsx(arrayBuffer);
|
|
41114
|
-
return parseExcelFromZip(zip);
|
|
41136
|
+
return parseExcelFromZip(zip, options);
|
|
41115
41137
|
}
|
|
41116
|
-
function parseExcelFromZip(zip) {
|
|
41138
|
+
function parseExcelFromZip(zip, options) {
|
|
41117
41139
|
const themeEntry = findEntry(zip, "xl/theme/theme1.xml");
|
|
41118
41140
|
const theme = themeEntry ? parseTheme(decodeUtf8(themeEntry)) : { colors: defaultThemeColors(), majorFont: "Calibri", minorFont: "Calibri" };
|
|
41119
41141
|
const stylesEntry = findEntry(zip, "xl/styles.xml");
|
|
@@ -41175,7 +41197,8 @@ function parseExcelFromZip(zip) {
|
|
|
41175
41197
|
theme,
|
|
41176
41198
|
styles.indexedColors,
|
|
41177
41199
|
zip,
|
|
41178
|
-
workbookInfo.date1904
|
|
41200
|
+
workbookInfo.date1904,
|
|
41201
|
+
options?.maxRowsPerSheet
|
|
41179
41202
|
);
|
|
41180
41203
|
parsed.name = sheetInfo.name;
|
|
41181
41204
|
if (isHidden) parsed.hidden = true;
|
|
@@ -39,7 +39,7 @@ export interface StarterFile {
|
|
|
39
39
|
* scaffolds resolve the live version via `fetchLatestNpmVersion` and only
|
|
40
40
|
* fall back here when the lookup fails.
|
|
41
41
|
*/
|
|
42
|
-
export declare const STARTER_FALLBACK_UI_VERSION = "
|
|
42
|
+
export declare const STARTER_FALLBACK_UI_VERSION = "1.8.0";
|
|
43
43
|
export declare const STARTER_FALLBACK_SDK_VERSION = "0.11.0";
|
|
44
44
|
/**
|
|
45
45
|
* react-native pin for scaffolded apps. Matches the monorepo frontend's pin so
|
package/dist/starter_template.js
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
* scaffolds resolve the live version via `fetchLatestNpmVersion` and only
|
|
36
36
|
* fall back here when the lookup fails.
|
|
37
37
|
*/
|
|
38
|
-
export const STARTER_FALLBACK_UI_VERSION = "
|
|
38
|
+
export const STARTER_FALLBACK_UI_VERSION = "1.8.0";
|
|
39
39
|
export const STARTER_FALLBACK_SDK_VERSION = "0.11.0";
|
|
40
40
|
/**
|
|
41
41
|
* react-native pin for scaffolded apps. Matches the monorepo frontend's pin so
|
|
@@ -184,14 +184,34 @@ export default defineConfig({
|
|
|
184
184
|
dedupe: ["react", "react-dom", "react-native-web"],
|
|
185
185
|
},
|
|
186
186
|
optimizeDeps: {
|
|
187
|
-
//
|
|
188
|
-
//
|
|
189
|
-
//
|
|
190
|
-
//
|
|
191
|
-
//
|
|
192
|
-
//
|
|
193
|
-
//
|
|
194
|
-
|
|
187
|
+
// \`recharts\` (used by @lotics/ui chart_* + sparkline) imports
|
|
188
|
+
// \`es-toolkit/compat/get\` as a default-export CJS module. Vite's dev
|
|
189
|
+
// server treats \`compat/*\` as ESM and won't synthesize a default,
|
|
190
|
+
// so \`import get from "es-toolkit/compat/get"\` fails to resolve.
|
|
191
|
+
// Pre-bundling forces Vite to convert it to an ESM shim with a default
|
|
192
|
+
// export. Production build (rollup) handles it correctly without this.
|
|
193
|
+
//
|
|
194
|
+
// react-native-web itself is force-prebundled (folds its core CJS deps like
|
|
195
|
+
// @react-native/normalize-colors into one interop'd chunk), and the deep
|
|
196
|
+
// subpaths it reaches via *default* imports (e.g. @react-native-picker's web
|
|
197
|
+
// <select> build) are each pre-bundled into an ESM shim — Vite's dev optimizer
|
|
198
|
+
// otherwise serves them without a synthesized default export ("does not
|
|
199
|
+
// provide an export named 'default'"), blanking the iframe. (Production/rollup
|
|
200
|
+
// resolves the interop already, so this is dev-only.)
|
|
201
|
+
include: [
|
|
202
|
+
"recharts", "es-toolkit", "es-toolkit/compat",
|
|
203
|
+
"react-native-web", "@react-native/normalize-colors",
|
|
204
|
+
"inline-style-prefixer/lib/createPrefixer",
|
|
205
|
+
"inline-style-prefixer/lib/plugins/crossFade",
|
|
206
|
+
"inline-style-prefixer/lib/plugins/imageSet",
|
|
207
|
+
"inline-style-prefixer/lib/plugins/logical",
|
|
208
|
+
"inline-style-prefixer/lib/plugins/position",
|
|
209
|
+
"inline-style-prefixer/lib/plugins/sizing",
|
|
210
|
+
"inline-style-prefixer/lib/plugins/transition",
|
|
211
|
+
"postcss-value-parser", "fbjs/lib/invariant", "fbjs/lib/warning",
|
|
212
|
+
"styleq", "styleq/transform-localize-style",
|
|
213
|
+
"react", "react-dom", "react-dom/client", "nullthrows",
|
|
214
|
+
],
|
|
195
215
|
// The dep optimizer pre-bundles deps with a SEPARATE esbuild pass that
|
|
196
216
|
// top-level \`define\` doesn't always reach, so a pre-bundled RN dep can
|
|
197
217
|
// still hit \`__DEV__ is not defined\` under \`lotics app dev\`. Define it
|