@jeremiahmanalang/excel-mapping 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/NOTICE +7 -0
- package/README.md +28 -2
- package/dist/adapters/index.d.ts +4 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/parseWorkbook.d.ts +8 -0
- package/dist/adapters/parseWorkbook.d.ts.map +1 -0
- package/dist/adapters/sheetjs.d.ts +7 -0
- package/dist/adapters/sheetjs.d.ts.map +1 -0
- package/dist/adapters/types.d.ts +28 -0
- package/dist/adapters/types.d.ts.map +1 -0
- package/dist/cli/bin.d.ts +2 -0
- package/dist/cli/bin.d.ts.map +1 -0
- package/dist/cli/index.d.ts +9 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli.js +170 -0
- package/dist/cli.js.map +7 -0
- package/dist/errors.d.ts +25 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/extract/extract.d.ts +14 -0
- package/dist/extract/extract.d.ts.map +1 -0
- package/dist/extract/index.d.ts +3 -0
- package/dist/extract/index.d.ts.map +1 -0
- package/dist/extract/types.d.ts +38 -0
- package/dist/extract/types.d.ts.map +1 -0
- package/dist/grid/a1.d.ts +31 -0
- package/dist/grid/a1.d.ts.map +1 -0
- package/dist/grid/grid.d.ts +19 -0
- package/dist/grid/grid.d.ts.map +1 -0
- package/dist/grid/index.d.ts +4 -0
- package/dist/grid/index.d.ts.map +1 -0
- package/dist/grid/types.d.ts +36 -0
- package/dist/grid/types.d.ts.map +1 -0
- package/dist/index.cjs +28327 -0
- package/dist/index.d.cts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28304 -0
- package/dist/node/index.cjs +55 -0
- package/dist/node/index.cjs.map +7 -0
- package/dist/node/index.d.cts +13 -0
- package/dist/node/index.d.ts +13 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +32 -0
- package/dist/node/index.js.map +7 -0
- package/dist/resolve/index.d.ts +5 -0
- package/dist/resolve/index.d.ts.map +1 -0
- package/dist/resolve/resolveDataRange.d.ts +8 -0
- package/dist/resolve/resolveDataRange.d.ts.map +1 -0
- package/dist/resolve/resolveHeaderRange.d.ts +8 -0
- package/dist/resolve/resolveHeaderRange.d.ts.map +1 -0
- package/dist/resolve/resolveRanges.d.ts +9 -0
- package/dist/resolve/resolveRanges.d.ts.map +1 -0
- package/dist/resolve/types.d.ts +28 -0
- package/dist/resolve/types.d.ts.map +1 -0
- package/dist/spec/a1.d.ts +21 -0
- package/dist/spec/a1.d.ts.map +1 -0
- package/dist/spec/index.d.ts +7 -0
- package/dist/spec/index.d.ts.map +1 -0
- package/dist/spec/jsonSchema.d.ts +9 -0
- package/dist/spec/jsonSchema.d.ts.map +1 -0
- package/dist/spec/schema.d.ts +74 -0
- package/dist/spec/schema.d.ts.map +1 -0
- package/dist/spec/suggestKey.d.ts +14 -0
- package/dist/spec/suggestKey.d.ts.map +1 -0
- package/dist/spec/types.d.ts +36 -0
- package/dist/spec/types.d.ts.map +1 -0
- package/dist/spec/validate.d.ts +6 -0
- package/dist/spec/validate.d.ts.map +1 -0
- package/dist/spec/version.d.ts +5 -0
- package/dist/spec/version.d.ts.map +1 -0
- package/package.json +66 -4
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/node/index.ts
|
|
22
|
+
var index_exports = {};
|
|
23
|
+
__export(index_exports, {
|
|
24
|
+
extractFromPath: () => extractFromPath,
|
|
25
|
+
parseWorkbookFromPath: () => parseWorkbookFromPath
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(index_exports);
|
|
28
|
+
var import_promises = require("node:fs/promises");
|
|
29
|
+
var import__ = require("../index.cjs");
|
|
30
|
+
__reExport(index_exports, require("../index.cjs"), module.exports);
|
|
31
|
+
async function readFileWithinLimit(filePath, maxFileBytes) {
|
|
32
|
+
const info = await (0, import_promises.stat)(filePath);
|
|
33
|
+
if (info.size > maxFileBytes) {
|
|
34
|
+
throw new import__.LimitExceededError("maxFileBytes", info.size, maxFileBytes);
|
|
35
|
+
}
|
|
36
|
+
const buffer = await (0, import_promises.readFile)(filePath);
|
|
37
|
+
return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
38
|
+
}
|
|
39
|
+
async function parseWorkbookFromPath(filePath, options) {
|
|
40
|
+
const limits = (0, import__.resolveParseLimits)(options?.limits);
|
|
41
|
+
const bytes = await readFileWithinLimit(filePath, limits.maxFileBytes);
|
|
42
|
+
return (0, import__.parseWorkbook)(bytes, options);
|
|
43
|
+
}
|
|
44
|
+
async function extractFromPath(filePath, config, options) {
|
|
45
|
+
const limits = (0, import__.resolveParseLimits)(options?.limits);
|
|
46
|
+
const bytes = await readFileWithinLimit(filePath, limits.maxFileBytes);
|
|
47
|
+
return (0, import__.extract)(bytes, config, options);
|
|
48
|
+
}
|
|
49
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
50
|
+
0 && (module.exports = {
|
|
51
|
+
extractFromPath,
|
|
52
|
+
parseWorkbookFromPath,
|
|
53
|
+
...require("../index.cjs")
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/node/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { readFile, stat } from \"node:fs/promises\";\nimport {\n LimitExceededError,\n extract,\n parseWorkbook,\n resolveParseLimits,\n type ExtractOptions,\n type ExtractResult,\n type MappingConfig,\n type ParseWorkbookOptions,\n type ParsedWorkbook,\n} from \"../index.js\";\n\nexport * from \"../index.js\";\n\nasync function readFileWithinLimit(filePath: string, maxFileBytes: number): Promise<Uint8Array> {\n const info = await stat(filePath);\n if (info.size > maxFileBytes) {\n throw new LimitExceededError(\"maxFileBytes\", info.size, maxFileBytes);\n }\n const buffer = await readFile(filePath);\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n}\n\n/**\n * Node-only helper: parses a spreadsheet file from disk with upfront file-size\n * limit enforcement (via `fs.stat` before reading bytes into memory).\n */\nexport async function parseWorkbookFromPath(\n filePath: string,\n options?: ParseWorkbookOptions,\n): Promise<ParsedWorkbook> {\n const limits = resolveParseLimits(options?.limits);\n const bytes = await readFileWithinLimit(filePath, limits.maxFileBytes);\n return parseWorkbook(bytes, options);\n}\n\n/**\n * Node-only helper: reads a spreadsheet file from disk and extracts data using\n * the provided MappingConfig. Enforces `maxFileBytes` before reading the file.\n */\nexport async function extractFromPath(\n filePath: string,\n config: MappingConfig,\n options?: ExtractOptions,\n): Promise<ExtractResult> {\n const limits = resolveParseLimits(options?.limits);\n const bytes = await readFileWithinLimit(filePath, limits.maxFileBytes);\n return extract(bytes, config, options);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA+B;AAC/B,eAUO;AAEP,0BAAc,yBAbd;AAeA,eAAe,oBAAoB,UAAkB,cAA2C;AAC9F,QAAM,OAAO,UAAM,sBAAK,QAAQ;AAChC,MAAI,KAAK,OAAO,cAAc;AAC5B,UAAM,IAAI,4BAAmB,gBAAgB,KAAK,MAAM,YAAY;AAAA,EACtE;AACA,QAAM,SAAS,UAAM,0BAAS,QAAQ;AACtC,SAAO,IAAI,WAAW,OAAO,QAAQ,OAAO,YAAY,OAAO,UAAU;AAC3E;AAMA,eAAsB,sBACpB,UACA,SACyB;AACzB,QAAM,aAAS,6BAAmB,SAAS,MAAM;AACjD,QAAM,QAAQ,MAAM,oBAAoB,UAAU,OAAO,YAAY;AACrE,aAAO,wBAAc,OAAO,OAAO;AACrC;AAMA,eAAsB,gBACpB,UACA,QACA,SACwB;AACxB,QAAM,aAAS,6BAAmB,SAAS,MAAM;AACjD,QAAM,QAAQ,MAAM,oBAAoB,UAAU,OAAO,YAAY;AACrE,aAAO,kBAAQ,OAAO,QAAQ,OAAO;AACvC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ExtractOptions, type ExtractResult, type MappingConfig, type ParseWorkbookOptions, type ParsedWorkbook } from "../index.js";
|
|
2
|
+
export * from "../index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Node-only helper: parses a spreadsheet file from disk with upfront file-size
|
|
5
|
+
* limit enforcement (via `fs.stat` before reading bytes into memory).
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseWorkbookFromPath(filePath: string, options?: ParseWorkbookOptions): Promise<ParsedWorkbook>;
|
|
8
|
+
/**
|
|
9
|
+
* Node-only helper: reads a spreadsheet file from disk and extracts data using
|
|
10
|
+
* the provided MappingConfig. Enforces `maxFileBytes` before reading the file.
|
|
11
|
+
*/
|
|
12
|
+
export declare function extractFromPath(filePath: string, config: MappingConfig, options?: ExtractOptions): Promise<ExtractResult>;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ExtractOptions, type ExtractResult, type MappingConfig, type ParseWorkbookOptions, type ParsedWorkbook } from "../index.js";
|
|
2
|
+
export * from "../index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Node-only helper: parses a spreadsheet file from disk with upfront file-size
|
|
5
|
+
* limit enforcement (via `fs.stat` before reading bytes into memory).
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseWorkbookFromPath(filePath: string, options?: ParseWorkbookOptions): Promise<ParsedWorkbook>;
|
|
8
|
+
/**
|
|
9
|
+
* Node-only helper: reads a spreadsheet file from disk and extracts data using
|
|
10
|
+
* the provided MappingConfig. Enforces `maxFileBytes` before reading the file.
|
|
11
|
+
*/
|
|
12
|
+
export declare function extractFromPath(filePath: string, config: MappingConfig, options?: ExtractOptions): Promise<ExtractResult>;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAErB,cAAc,aAAa,CAAC;AAW5B;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,cAAc,CAAC,CAIzB;AAED;;;GAGG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,aAAa,EACrB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,aAAa,CAAC,CAIxB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// src/node/index.ts
|
|
2
|
+
import { readFile, stat } from "node:fs/promises";
|
|
3
|
+
import {
|
|
4
|
+
LimitExceededError,
|
|
5
|
+
extract,
|
|
6
|
+
parseWorkbook,
|
|
7
|
+
resolveParseLimits
|
|
8
|
+
} from "../index.js";
|
|
9
|
+
export * from "../index.js";
|
|
10
|
+
async function readFileWithinLimit(filePath, maxFileBytes) {
|
|
11
|
+
const info = await stat(filePath);
|
|
12
|
+
if (info.size > maxFileBytes) {
|
|
13
|
+
throw new LimitExceededError("maxFileBytes", info.size, maxFileBytes);
|
|
14
|
+
}
|
|
15
|
+
const buffer = await readFile(filePath);
|
|
16
|
+
return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
17
|
+
}
|
|
18
|
+
async function parseWorkbookFromPath(filePath, options) {
|
|
19
|
+
const limits = resolveParseLimits(options?.limits);
|
|
20
|
+
const bytes = await readFileWithinLimit(filePath, limits.maxFileBytes);
|
|
21
|
+
return parseWorkbook(bytes, options);
|
|
22
|
+
}
|
|
23
|
+
async function extractFromPath(filePath, config, options) {
|
|
24
|
+
const limits = resolveParseLimits(options?.limits);
|
|
25
|
+
const bytes = await readFileWithinLimit(filePath, limits.maxFileBytes);
|
|
26
|
+
return extract(bytes, config, options);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
extractFromPath,
|
|
30
|
+
parseWorkbookFromPath
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/node/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { readFile, stat } from \"node:fs/promises\";\nimport {\n LimitExceededError,\n extract,\n parseWorkbook,\n resolveParseLimits,\n type ExtractOptions,\n type ExtractResult,\n type MappingConfig,\n type ParseWorkbookOptions,\n type ParsedWorkbook,\n} from \"../index.js\";\n\nexport * from \"../index.js\";\n\nasync function readFileWithinLimit(filePath: string, maxFileBytes: number): Promise<Uint8Array> {\n const info = await stat(filePath);\n if (info.size > maxFileBytes) {\n throw new LimitExceededError(\"maxFileBytes\", info.size, maxFileBytes);\n }\n const buffer = await readFile(filePath);\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n}\n\n/**\n * Node-only helper: parses a spreadsheet file from disk with upfront file-size\n * limit enforcement (via `fs.stat` before reading bytes into memory).\n */\nexport async function parseWorkbookFromPath(\n filePath: string,\n options?: ParseWorkbookOptions,\n): Promise<ParsedWorkbook> {\n const limits = resolveParseLimits(options?.limits);\n const bytes = await readFileWithinLimit(filePath, limits.maxFileBytes);\n return parseWorkbook(bytes, options);\n}\n\n/**\n * Node-only helper: reads a spreadsheet file from disk and extracts data using\n * the provided MappingConfig. Enforces `maxFileBytes` before reading the file.\n */\nexport async function extractFromPath(\n filePath: string,\n config: MappingConfig,\n options?: ExtractOptions,\n): Promise<ExtractResult> {\n const limits = resolveParseLimits(options?.limits);\n const bytes = await readFileWithinLimit(filePath, limits.maxFileBytes);\n return extract(bytes, config, options);\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,UAAU,YAAY;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AAEP,cAAc;AAEd,eAAe,oBAAoB,UAAkB,cAA2C;AAC9F,QAAM,OAAO,MAAM,KAAK,QAAQ;AAChC,MAAI,KAAK,OAAO,cAAc;AAC5B,UAAM,IAAI,mBAAmB,gBAAgB,KAAK,MAAM,YAAY;AAAA,EACtE;AACA,QAAM,SAAS,MAAM,SAAS,QAAQ;AACtC,SAAO,IAAI,WAAW,OAAO,QAAQ,OAAO,YAAY,OAAO,UAAU;AAC3E;AAMA,eAAsB,sBACpB,UACA,SACyB;AACzB,QAAM,SAAS,mBAAmB,SAAS,MAAM;AACjD,QAAM,QAAQ,MAAM,oBAAoB,UAAU,OAAO,YAAY;AACrE,SAAO,cAAc,OAAO,OAAO;AACrC;AAMA,eAAsB,gBACpB,UACA,QACA,SACwB;AACxB,QAAM,SAAS,mBAAmB,SAAS,MAAM;AACjD,QAAM,QAAQ,MAAM,oBAAoB,UAAU,OAAO,YAAY;AACrE,SAAO,QAAQ,OAAO,QAAQ,OAAO;AACvC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { resolveHeaderRange } from "./resolveHeaderRange.js";
|
|
2
|
+
export { resolveDataRange } from "./resolveDataRange.js";
|
|
3
|
+
export { resolveRanges } from "./resolveRanges.js";
|
|
4
|
+
export type { ResolveOptions, ResolvedHeader, ResolvedDataRange, ResolvedRanges } from "./types.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resolve/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Grid } from "../grid/types.js";
|
|
2
|
+
import type { MappingRule } from "../spec/types.js";
|
|
3
|
+
import type { ResolveOptions, ResolvedDataRange } from "./types.js";
|
|
4
|
+
/**
|
|
5
|
+
* Resolves the data range(s) and ordered step indices for a validated mapping rule on a Grid.
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveDataRange(grid: Grid, mapping: MappingRule, options?: ResolveOptions): ResolvedDataRange;
|
|
8
|
+
//# sourceMappingURL=resolveDataRange.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveDataRange.d.ts","sourceRoot":"","sources":["../../src/resolve/resolveDataRange.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA0B,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAiKpE;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,WAAW,EACpB,OAAO,CAAC,EAAE,cAAc,GACvB,iBAAiB,CAqPnB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Grid } from "../grid/types.js";
|
|
2
|
+
import type { MappingRule } from "../spec/types.js";
|
|
3
|
+
import type { ResolvedHeader } from "./types.js";
|
|
4
|
+
/**
|
|
5
|
+
* Resolves the header range and ordered header cell addresses for a mapping rule.
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveHeaderRange(_grid: Grid, mapping: MappingRule): ResolvedHeader;
|
|
8
|
+
//# sourceMappingURL=resolveHeaderRange.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveHeaderRange.d.ts","sourceRoot":"","sources":["../../src/resolve/resolveHeaderRange.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA0B,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,GAAG,cAAc,CA6BpF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Grid } from "../grid/types.js";
|
|
2
|
+
import type { MappingRule } from "../spec/types.js";
|
|
3
|
+
import type { ResolveOptions, ResolvedRanges } from "./types.js";
|
|
4
|
+
/**
|
|
5
|
+
* Pure function returning plain CellRange arrays describing which cells
|
|
6
|
+
* are header cells and which are data cells for a given mapping rule on a Grid.
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveRanges(grid: Grid, mapping: MappingRule, options?: ResolveOptions): ResolvedRanges;
|
|
9
|
+
//# sourceMappingURL=resolveRanges.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveRanges.d.ts","sourceRoot":"","sources":["../../src/resolve/resolveRanges.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGpD,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjE;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,WAAW,EACpB,OAAO,CAAC,EAAE,cAAc,GACvB,cAAc,CAOhB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { CellAddress, CellRange } from "../grid/types.js";
|
|
2
|
+
export interface ResolveOptions {
|
|
3
|
+
readonly trim?: boolean | undefined;
|
|
4
|
+
readonly skipHiddenRows?: boolean | undefined;
|
|
5
|
+
}
|
|
6
|
+
export interface ResolvedHeader {
|
|
7
|
+
readonly range: CellRange;
|
|
8
|
+
readonly ranges: readonly CellRange[];
|
|
9
|
+
readonly cells: readonly CellAddress[];
|
|
10
|
+
}
|
|
11
|
+
export interface ResolvedDataRange {
|
|
12
|
+
/** Normalized 0-based CellRange(s) for UI highlighting. Empty when no data cells exist. */
|
|
13
|
+
readonly ranges: readonly CellRange[];
|
|
14
|
+
/**
|
|
15
|
+
* Ordered 0-based row indices (for direction "below") or column indices
|
|
16
|
+
* (for direction "right" / "left") in extraction reading order.
|
|
17
|
+
*/
|
|
18
|
+
readonly steps: readonly number[];
|
|
19
|
+
/** True when an explicit range or single target extended beyond the grid bounds. */
|
|
20
|
+
readonly truncated: boolean;
|
|
21
|
+
/** True when a merged header region shifted the data start coordinate in direction. */
|
|
22
|
+
readonly mergedHeaderAdjusted: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface ResolvedRanges {
|
|
25
|
+
readonly header: readonly CellRange[];
|
|
26
|
+
readonly data: readonly CellRange[];
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/resolve/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/C;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;CACxC;AAED,MAAM,WAAW,iBAAiB;IAChC,2FAA2F;IAC3F,QAAQ,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IACtC;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,oFAAoF;IACpF,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,uFAAuF;IACvF,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;CACxC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,SAAS,SAAS,EAAE,CAAC;CACrC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const MAX_EXCEL_COLUMN = 16383;
|
|
2
|
+
export declare const MAX_EXCEL_ROW = 1048576;
|
|
3
|
+
export declare const A1_REF_REGEX: RegExp;
|
|
4
|
+
export declare const COL_LETTERS_REGEX: RegExp;
|
|
5
|
+
export interface ParsedA1Ref {
|
|
6
|
+
/** 0-based column index (A = 0, Z = 25, AA = 26). */
|
|
7
|
+
readonly col: number;
|
|
8
|
+
/** 1-based row number (row 1 = 1). */
|
|
9
|
+
readonly row: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Converts uppercase Excel column letters (e.g. "A", "Z", "AA", "XFD")
|
|
13
|
+
* to a 0-based column index, or returns null if invalid or out of Excel bounds.
|
|
14
|
+
*/
|
|
15
|
+
export declare function colLettersToIndex(letters: string): number | null;
|
|
16
|
+
/**
|
|
17
|
+
* Parses an uppercase A1 cell reference (e.g. "A5", "AA10") into its
|
|
18
|
+
* 0-based column index and 1-based row number, or returns null if invalid.
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseA1Ref(ref: string): ParsedA1Ref | null;
|
|
21
|
+
//# sourceMappingURL=a1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a1.d.ts","sourceRoot":"","sources":["../../src/spec/a1.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AACtC,eAAO,MAAM,aAAa,UAAY,CAAC;AAEvC,eAAO,MAAM,YAAY,QAAgC,CAAC;AAC1D,eAAO,MAAM,iBAAiB,QAAiB,CAAC;AAEhD,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAchE;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAgB1D"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { SPEC_VERSION, SUPPORTED_SPEC_VERSIONS, isSupportedSpecVersion, type SupportedSpecVersion, } from "./version.js";
|
|
2
|
+
export { KEY_PATTERN, suggestKey, isValidKey } from "./suggestKey.js";
|
|
3
|
+
export { DirectionSchema, OccurrenceSchema, RangeTypeSchema, HeaderRangeSchema, MappingRuleSchema, SheetSelectorSchema, MappingConfigSchema, } from "./schema.js";
|
|
4
|
+
export { getMappingConfigJsonSchema, mappingConfigJsonSchema } from "./jsonSchema.js";
|
|
5
|
+
export { validateConfig } from "./validate.js";
|
|
6
|
+
export type { Direction, Occurrence, RangeType, HeaderRange, MappingRule, MappingConfig, ValidationIssue, ValidationResult, } from "./types.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spec/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,sBAAsB,EACtB,KAAK,oBAAoB,GAC1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEtE,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAEtF,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,YAAY,EACV,SAAS,EACT,UAAU,EACV,SAAS,EACT,WAAW,EACX,WAAW,EACX,aAAa,EACb,eAAe,EACf,gBAAgB,GACjB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates a JSON Schema (Draft 2020-12) describing MappingConfig v1.
|
|
3
|
+
*/
|
|
4
|
+
export declare function getMappingConfigJsonSchema(): Record<string, unknown>;
|
|
5
|
+
/**
|
|
6
|
+
* Pre-generated JSON Schema (Draft 2020-12) for MappingConfig v1.
|
|
7
|
+
*/
|
|
8
|
+
export declare const mappingConfigJsonSchema: Readonly<Record<string, unknown>>;
|
|
9
|
+
//# sourceMappingURL=jsonSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonSchema.d.ts","sourceRoot":"","sources":["../../src/spec/jsonSchema.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAIpE;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACxC,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const DirectionSchema: z.ZodEnum<{
|
|
3
|
+
below: "below";
|
|
4
|
+
right: "right";
|
|
5
|
+
left: "left";
|
|
6
|
+
}>;
|
|
7
|
+
export declare const OccurrenceSchema: z.ZodEnum<{
|
|
8
|
+
single: "single";
|
|
9
|
+
continuous: "continuous";
|
|
10
|
+
}>;
|
|
11
|
+
export declare const RangeTypeSchema: z.ZodEnum<{
|
|
12
|
+
cellRange: "cellRange";
|
|
13
|
+
limiter: "limiter";
|
|
14
|
+
untilValue: "untilValue";
|
|
15
|
+
untilBlank: "untilBlank";
|
|
16
|
+
}>;
|
|
17
|
+
export declare const HeaderRangeSchema: z.ZodObject<{
|
|
18
|
+
start: z.ZodString;
|
|
19
|
+
end: z.ZodString;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
export declare const MappingRuleSchema: z.ZodObject<{
|
|
22
|
+
key: z.ZodString;
|
|
23
|
+
direction: z.ZodEnum<{
|
|
24
|
+
below: "below";
|
|
25
|
+
right: "right";
|
|
26
|
+
left: "left";
|
|
27
|
+
}>;
|
|
28
|
+
occurrence: z.ZodEnum<{
|
|
29
|
+
single: "single";
|
|
30
|
+
continuous: "continuous";
|
|
31
|
+
}>;
|
|
32
|
+
header: z.ZodObject<{
|
|
33
|
+
start: z.ZodString;
|
|
34
|
+
end: z.ZodString;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
rangeType: z.ZodNullable<z.ZodEnum<{
|
|
37
|
+
cellRange: "cellRange";
|
|
38
|
+
limiter: "limiter";
|
|
39
|
+
untilValue: "untilValue";
|
|
40
|
+
untilBlank: "untilBlank";
|
|
41
|
+
}>>;
|
|
42
|
+
rangeValue: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
43
|
+
expectedHeaderText: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
export declare const SheetSelectorSchema: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
46
|
+
export declare const MappingConfigSchema: z.ZodObject<{
|
|
47
|
+
specVersion: z.ZodLiteral<1>;
|
|
48
|
+
sheet: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
49
|
+
mappings: z.ZodArray<z.ZodObject<{
|
|
50
|
+
key: z.ZodString;
|
|
51
|
+
direction: z.ZodEnum<{
|
|
52
|
+
below: "below";
|
|
53
|
+
right: "right";
|
|
54
|
+
left: "left";
|
|
55
|
+
}>;
|
|
56
|
+
occurrence: z.ZodEnum<{
|
|
57
|
+
single: "single";
|
|
58
|
+
continuous: "continuous";
|
|
59
|
+
}>;
|
|
60
|
+
header: z.ZodObject<{
|
|
61
|
+
start: z.ZodString;
|
|
62
|
+
end: z.ZodString;
|
|
63
|
+
}, z.core.$strict>;
|
|
64
|
+
rangeType: z.ZodNullable<z.ZodEnum<{
|
|
65
|
+
cellRange: "cellRange";
|
|
66
|
+
limiter: "limiter";
|
|
67
|
+
untilValue: "untilValue";
|
|
68
|
+
untilBlank: "untilBlank";
|
|
69
|
+
}>>;
|
|
70
|
+
rangeValue: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
71
|
+
expectedHeaderText: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
72
|
+
}, z.core.$strict>>;
|
|
73
|
+
}, z.core.$strict>;
|
|
74
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/spec/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,eAAe;;;;EAAqC,CAAC;AAElE,eAAO,MAAM,gBAAgB;;;EAAmC,CAAC;AAEjE,eAAO,MAAM,eAAe;;;;;EAA+D,CAAC;AAE5F,eAAO,MAAM,iBAAiB;;;kBAKnB,CAAC;AAEZ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;kBAiM1B,CAAC;AAEL,eAAO,MAAM,mBAAmB,+EAMnB,CAAC;AAEd,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8B5B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const KEY_PATTERN: RegExp;
|
|
2
|
+
/**
|
|
3
|
+
* Normalizes arbitrary label text into a valid snake_case mapping key:
|
|
4
|
+
* - lowercases text
|
|
5
|
+
* - converts whitespace runs to underscores
|
|
6
|
+
* - strips non-alphanumeric characters (except underscores)
|
|
7
|
+
* - collapses consecutive underscores and trims leading/trailing underscores
|
|
8
|
+
*/
|
|
9
|
+
export declare function suggestKey(text: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Returns true if the string is a valid non-empty snake_case mapping key.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isValidKey(key: string): boolean;
|
|
14
|
+
//# sourceMappingURL=suggestKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestKey.d.ts","sourceRoot":"","sources":["../../src/spec/suggestKey.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAA+B,CAAC;AAExD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ/C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE/C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { SupportedSpecVersion } from "./version.js";
|
|
2
|
+
export type Direction = "below" | "right" | "left";
|
|
3
|
+
export type Occurrence = "single" | "continuous";
|
|
4
|
+
export type RangeType = "cellRange" | "limiter" | "untilValue" | "untilBlank";
|
|
5
|
+
export interface HeaderRange {
|
|
6
|
+
readonly start: string;
|
|
7
|
+
readonly end: string;
|
|
8
|
+
}
|
|
9
|
+
export interface MappingRule {
|
|
10
|
+
readonly key: string;
|
|
11
|
+
readonly direction: Direction;
|
|
12
|
+
readonly occurrence: Occurrence;
|
|
13
|
+
readonly header: HeaderRange;
|
|
14
|
+
readonly rangeType: RangeType | null;
|
|
15
|
+
readonly rangeValue: string | number | null;
|
|
16
|
+
readonly expectedHeaderText?: readonly string[] | null | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface MappingConfig {
|
|
19
|
+
readonly specVersion: SupportedSpecVersion;
|
|
20
|
+
readonly sheet?: string | number | null | undefined;
|
|
21
|
+
readonly mappings: readonly MappingRule[];
|
|
22
|
+
}
|
|
23
|
+
export interface ValidationIssue {
|
|
24
|
+
readonly path: readonly (string | number)[];
|
|
25
|
+
readonly code: string;
|
|
26
|
+
readonly message: string;
|
|
27
|
+
readonly mappingKey?: string;
|
|
28
|
+
}
|
|
29
|
+
export type ValidationResult = {
|
|
30
|
+
readonly ok: true;
|
|
31
|
+
readonly value: MappingConfig;
|
|
32
|
+
} | {
|
|
33
|
+
readonly ok: false;
|
|
34
|
+
readonly errors: readonly ValidationIssue[];
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/spec/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEnD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,YAAY,CAAC;AAEjD,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,YAAY,GAAG,YAAY,CAAC;AAE9E,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC5C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;CACpE;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;IAC3C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAA;CAAE,GACpD;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/spec/validate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAuBpE;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,gBAAgB,CA8BhE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const SPEC_VERSION: 1;
|
|
2
|
+
export declare const SUPPORTED_SPEC_VERSIONS: readonly [1];
|
|
3
|
+
export type SupportedSpecVersion = (typeof SUPPORTED_SPEC_VERSIONS)[number];
|
|
4
|
+
export declare function isSupportedSpecVersion(version: unknown): version is SupportedSpecVersion;
|
|
5
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/spec/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAG,CAAU,CAAC;AAEvC,eAAO,MAAM,uBAAuB,cAAe,CAAC;AAEpD,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,oBAAoB,CAMxF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jeremiahmanalang/excel-mapping",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Declarative Excel data-extraction library for Node and the browser.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"excel",
|
|
8
|
+
"xlsx",
|
|
9
|
+
"csv",
|
|
10
|
+
"spreadsheet",
|
|
11
|
+
"mapping",
|
|
12
|
+
"extraction",
|
|
13
|
+
"declarative",
|
|
14
|
+
"json"
|
|
15
|
+
],
|
|
16
|
+
"type": "module",
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"main": "./dist/index.cjs",
|
|
19
|
+
"module": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"import": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"default": "./dist/index.js"
|
|
26
|
+
},
|
|
27
|
+
"require": {
|
|
28
|
+
"types": "./dist/index.d.cts",
|
|
29
|
+
"default": "./dist/index.cjs"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"./node": {
|
|
33
|
+
"import": {
|
|
34
|
+
"types": "./dist/node/index.d.ts",
|
|
35
|
+
"default": "./dist/node/index.js"
|
|
36
|
+
},
|
|
37
|
+
"require": {
|
|
38
|
+
"types": "./dist/node/index.d.cts",
|
|
39
|
+
"default": "./dist/node/index.cjs"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist",
|
|
45
|
+
"README.md",
|
|
46
|
+
"LICENSE",
|
|
47
|
+
"NOTICE"
|
|
48
|
+
],
|
|
49
|
+
"bin": {
|
|
50
|
+
"excel-mapping": "./dist/cli.js"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "node scripts/build.mjs",
|
|
54
|
+
"typecheck": "tsc --noEmit",
|
|
55
|
+
"test": "vitest run",
|
|
56
|
+
"test:watch": "vitest",
|
|
57
|
+
"prepublishOnly": "pnpm run build && pnpm run typecheck && pnpm run test"
|
|
58
|
+
},
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": ">=20"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"zod": "^4.6.7"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
|
|
67
|
+
}
|
|
68
|
+
}
|