@gitsheets/core-napi 0.3.0 → 0.5.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/binding.cjs +24 -0
- package/index.d.ts +154 -6
- package/index.js +10 -1
- package/package.json +9 -9
package/binding.cjs
CHANGED
|
@@ -70,6 +70,15 @@ class NotFoundError extends GitsheetsError {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
class ContractError extends GitsheetsError {
|
|
74
|
+
constructor(message, opts = {}) {
|
|
75
|
+
super(message, opts);
|
|
76
|
+
this.name = 'ContractError';
|
|
77
|
+
if (opts.contract !== undefined) this.contract = opts.contract;
|
|
78
|
+
if (opts.issues !== undefined) this.issues = opts.issues;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
73
82
|
const CLASS_BY_NAME = {
|
|
74
83
|
ConfigError,
|
|
75
84
|
ValidationError,
|
|
@@ -78,6 +87,7 @@ const CLASS_BY_NAME = {
|
|
|
78
87
|
RefError,
|
|
79
88
|
PathTemplateError,
|
|
80
89
|
NotFoundError,
|
|
90
|
+
ContractError,
|
|
81
91
|
};
|
|
82
92
|
|
|
83
93
|
// Map a structured error raised by the addon onto its typed class. The mapping
|
|
@@ -87,6 +97,7 @@ function mapCoreError(raw) {
|
|
|
87
97
|
const opts = { code: raw.code, status: raw.status, cause: raw };
|
|
88
98
|
if (raw.issues !== undefined) opts.issues = raw.issues;
|
|
89
99
|
if (raw.conflictingPaths !== undefined) opts.conflictingPaths = raw.conflictingPaths;
|
|
100
|
+
if (raw.contract !== undefined) opts.contract = raw.contract;
|
|
90
101
|
return new Cls(raw.message, opts);
|
|
91
102
|
}
|
|
92
103
|
|
|
@@ -113,6 +124,10 @@ module.exports = {
|
|
|
113
124
|
// PathTemplateError; schema compilation raises a typed ConfigError.
|
|
114
125
|
renderPathsBatch: wrap(addon.renderPathsBatch),
|
|
115
126
|
validateBatch: wrap(addon.validateBatch),
|
|
127
|
+
// The contract identity primitive (specs/behaviors/contracts.md "Canonical
|
|
128
|
+
// form" / "Contract identity"): canonicalize → SHA-256 hex. A string input
|
|
129
|
+
// with no/invalid `format` raises a typed ConfigError.
|
|
130
|
+
canonicalContractHash: wrap(addon.canonicalContractHash),
|
|
116
131
|
runComparator: wrap(addon.runComparator),
|
|
117
132
|
// Native locale array sort (declarative `sort = true`) — the ICU collator
|
|
118
133
|
// matching V8 `localeCompare`. Pure (no structured errors), so unwrapped.
|
|
@@ -134,6 +149,9 @@ module.exports = {
|
|
|
134
149
|
// the filter (equality / nested / `$pred` engine snippets) runs in the core.
|
|
135
150
|
recordQuery: wrap(addon.recordQuery),
|
|
136
151
|
recordQueryCandidates: wrap(addon.recordQueryCandidates),
|
|
152
|
+
treeReadBlob: wrap(addon.treeReadBlob),
|
|
153
|
+
treeEntryHash: wrap(addon.treeEntryHash),
|
|
154
|
+
blobRead: wrap(addon.blobRead),
|
|
137
155
|
templateFieldNames: wrap(addon.templateFieldNames),
|
|
138
156
|
// Secondary indexing (lazy, in-memory). A unique conflict surfaces as a typed
|
|
139
157
|
// IndexError(index_unique_conflict).
|
|
@@ -152,6 +170,11 @@ module.exports = {
|
|
|
152
170
|
CoreTransaction: addon.CoreTransaction,
|
|
153
171
|
coreDiscoverSheets: wrap(addon.coreDiscoverSheets),
|
|
154
172
|
coreCheckValidators: wrap(addon.coreCheckValidators),
|
|
173
|
+
// Consumer-side contract verification — the two-rung ladder behind
|
|
174
|
+
// `openSheet(name, { contract })` (specs/behaviors/contracts.md "Consumer
|
|
175
|
+
// verification"). A verification failure raises a typed
|
|
176
|
+
// ContractError(contract_unsatisfied) carrying the conformance report.
|
|
177
|
+
verifySheetContract: wrap(addon.verifySheetContract),
|
|
155
178
|
// Markdown / mdx content-type codec. serialize/parse can raise a typed
|
|
156
179
|
// ValidationError/ConfigError; the H1 + normalize helpers are pure. Body
|
|
157
180
|
// NORMALIZATION is native — `markdownSerialize` runs the embedded
|
|
@@ -175,4 +198,5 @@ module.exports = {
|
|
|
175
198
|
RefError,
|
|
176
199
|
PathTemplateError,
|
|
177
200
|
NotFoundError,
|
|
201
|
+
ContractError,
|
|
178
202
|
};
|
package/index.d.ts
CHANGED
|
@@ -33,6 +33,17 @@ export interface JsValidationIssue {
|
|
|
33
33
|
source: string
|
|
34
34
|
schemaPath?: string
|
|
35
35
|
code?: string
|
|
36
|
+
/**
|
|
37
|
+
* The contract name, when the failing branch is a declared contract
|
|
38
|
+
* composed via `allOf` (specs/behaviors/contracts.md).
|
|
39
|
+
*/
|
|
40
|
+
contract?: string
|
|
41
|
+
/**
|
|
42
|
+
* The record's sheet-relative path, in a multi-record conformance
|
|
43
|
+
* report (`ContractError.issues` from consumer-side contract
|
|
44
|
+
* verification — specs/behaviors/contracts.md "Consumer verification").
|
|
45
|
+
*/
|
|
46
|
+
record?: string
|
|
36
47
|
}
|
|
37
48
|
/**
|
|
38
49
|
* Render a path template against a **batch** of records, returning one path per
|
|
@@ -53,6 +64,87 @@ export declare function renderPathsBatch(template: string, records: Array<JsValu
|
|
|
53
64
|
* compile surfaces as a structured, typed `ConfigError` (`config_invalid`).
|
|
54
65
|
*/
|
|
55
66
|
export declare function validateBatch(schema: JsValue, records: Array<JsValue>): Array<Array<JsValidationIssue>>
|
|
67
|
+
/**
|
|
68
|
+
* The contract identity primitive (specs/behaviors/contracts.md "Canonical
|
|
69
|
+
* form" / "Contract identity"): canonicalize `input` → SHA-256 hex of the
|
|
70
|
+
* canonical TOML bytes. `input` is either already-parsed data (a JS
|
|
71
|
+
* object/array/etc.) or a string, in which case `format` says how to parse
|
|
72
|
+
* it (`"json"` or `"toml"` — required for a string input; a
|
|
73
|
+
* `ConfigError(config_invalid)` names the omission). The minimal JS surface
|
|
74
|
+
* over [`gitsheets_core::contract::canonical_contract_hash`].
|
|
75
|
+
*/
|
|
76
|
+
export declare function canonicalContractHash(input: string | JsValue, format?: string | undefined | null): string
|
|
77
|
+
/**
|
|
78
|
+
* Validate a contract name (`specs/behaviors/contracts.md` "Contract names
|
|
79
|
+
* and the derived path") — the same check a sheet's `implements` entries run
|
|
80
|
+
* through at sheet-open. `contracts adopt` runs it on the name derived from a
|
|
81
|
+
* candidate document's `$id` before vendoring. Throws
|
|
82
|
+
* `ConfigError(config_invalid)` naming the violated rule.
|
|
83
|
+
*/
|
|
84
|
+
export declare function validateContractName(name: string): void
|
|
85
|
+
/**
|
|
86
|
+
* The derived vendored path for a contract name — mechanical, no manifest:
|
|
87
|
+
* `.gitsheets/contracts/<name>.toml`. The minimal JS surface over
|
|
88
|
+
* [`gitsheets_core::contract_path`].
|
|
89
|
+
*/
|
|
90
|
+
export declare function contractPath(name: string): string
|
|
91
|
+
/**
|
|
92
|
+
* Enforce the contract document requirements
|
|
93
|
+
* (`specs/behaviors/contracts.md` "Contract document requirements") against a
|
|
94
|
+
* NOT-yet-vendored candidate document — `contracts adopt`'s pre-vendor gate.
|
|
95
|
+
*
|
|
96
|
+
* `input` is either already-parsed data (a JS object) or a string, in which
|
|
97
|
+
* case `format` says how to parse it — mirrors `canonicalContractHash`'s
|
|
98
|
+
* shape exactly, for the same reason: a **JSON-text** input is parsed with
|
|
99
|
+
* `serde_json::from_str` directly (preserving a literal JSON `null`),
|
|
100
|
+
* deliberately NOT via the `JsValue`/core-`Value` marshalling boundary,
|
|
101
|
+
* which silently *drops* null-valued keys per the type-fidelity rules at the
|
|
102
|
+
* top of this file. Requirement 4 (no null-bearing keywords — `default:
|
|
103
|
+
* null`, `const: null`, a null in `enum`) can only ever be violated by a
|
|
104
|
+
* JSON-sourced document (TOML has no null literal at all), so routing
|
|
105
|
+
* through the null-dropping path would make that check silently unreachable
|
|
106
|
+
* for exactly the input shape it exists to catch. A TOML-text or
|
|
107
|
+
* already-parsed-data input has no such hazard (nothing they carry can be a
|
|
108
|
+
* TOML/core `Value` null in the first place), so those still go through the
|
|
109
|
+
* shared `value_to_json` conversion.
|
|
110
|
+
* Throws `ContractError(contract_invalid)` naming the violated rule.
|
|
111
|
+
*/
|
|
112
|
+
export declare function checkContractDocument(name: string, input: string | JsValue, format?: string | undefined | null): void
|
|
113
|
+
/**
|
|
114
|
+
* Load a vendored contract document `name` from the committed tree at
|
|
115
|
+
* `treeRef` (scoped under `openRoot`), returning it as JSON text on success.
|
|
116
|
+
* The minimal JS surface over [`gitsheets_core::contract::load_contract`] —
|
|
117
|
+
* runs the exact compile-time check (byte-canonical, document requirements,
|
|
118
|
+
* `$id`↔path) `Sheet::open` composition relies on, so `contracts verify` /
|
|
119
|
+
* `contracts adopt --sheet` get the identical guarantee. Throws
|
|
120
|
+
* `ContractError('contract_missing' | 'contract_invalid')` on failure.
|
|
121
|
+
*/
|
|
122
|
+
export declare function contractLoad(gitDir: string, treeRef: string, openRoot: string, name: string): string
|
|
123
|
+
/**
|
|
124
|
+
* The result of a successful [`verify_sheet_contract`] call — the wire shape
|
|
125
|
+
* for `sheet.contractVerification` minus `tree` (the JS binding attaches that
|
|
126
|
+
* from the read snapshot it already resolved to open the sheet).
|
|
127
|
+
*/
|
|
128
|
+
export interface JsConformanceReport {
|
|
129
|
+
name: string
|
|
130
|
+
/** `"declared"` or `"structural"` — which rung passed. */
|
|
131
|
+
rung: string
|
|
132
|
+
conforming: boolean
|
|
133
|
+
issues: Array<JsValidationIssue>
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Consumer-side contract verification — the two-rung ladder behind
|
|
137
|
+
* `openSheet(name, { contract })` (specs/behaviors/contracts.md "Consumer
|
|
138
|
+
* verification", specs/api/repository.md `opts.contract`). Opens `sheetName`
|
|
139
|
+
* read-only against `treeRef` (config read + effective-schema compile, same
|
|
140
|
+
* as any other read), then verifies it against `schema` — parsed data, or
|
|
141
|
+
* text with `format` naming which text form (mirrors
|
|
142
|
+
* `canonicalContractHash`'s input handling: no format auto-detection). A
|
|
143
|
+
* verification failure (both rungs missed, or the attempted rung missed in
|
|
144
|
+
* `declared`/`structural` mode) surfaces as `ContractError(contract_unsatisfied)`
|
|
145
|
+
* carrying the conformance report in `issues`.
|
|
146
|
+
*/
|
|
147
|
+
export declare function verifySheetContract(gitDir: string, treeRef: string, sheetName: string, configPath: string, openRoot: string, prefix: string, schema: string | JsValue, format?: string | undefined | null, mode?: string | undefined | null): JsConformanceReport
|
|
56
148
|
/**
|
|
57
149
|
* Compile a raw-JS sort comparator (`rule`, the body of `(a, b) => { … }`) and
|
|
58
150
|
* run it once against `a`/`b`, returning its numeric result. The direct
|
|
@@ -143,15 +235,47 @@ export declare function substrateReset(): void
|
|
|
143
235
|
/**
|
|
144
236
|
* Query records under `base` in the tree `treeRef`, returning each matched
|
|
145
237
|
* `{ path, record }` in sorted path order. The template prunes the walk; the
|
|
146
|
-
* filter (equality / nested / `$pred` snippets
|
|
147
|
-
*
|
|
148
|
-
|
|
149
|
-
|
|
238
|
+
* filter (equality / nested / `$pred` snippets / `{ $gt, $gte, $lt, $lte }` ranges)
|
|
239
|
+
* is applied to each candidate; a range on a date-bucket path field prunes
|
|
240
|
+
* the walk to the bounded span of partitions. Batch-first: the whole query
|
|
241
|
+
* crosses the FFI once.
|
|
242
|
+
*
|
|
243
|
+
* Format-aware: pass `bodyField` (and optionally `titleField`) for a
|
|
244
|
+
* markdown/mdx sheet (the kind follows `extension`: `.mdx` → mdx, else
|
|
245
|
+
* markdown) and the core decodes each candidate through the frontmatter
|
|
246
|
+
* codec — `withBody: false` is the lazy-body switch (default `true`). Without
|
|
247
|
+
* `bodyField` records are canonical TOML. The binding never fetches record
|
|
248
|
+
* bytes itself (spec: `rust-core.md` "Query traversal + filtering").
|
|
249
|
+
*/
|
|
250
|
+
export declare function recordQuery(gitDir: string, treeRef: string, base: string, template: string, filter: object, extension?: string | undefined | null, bodyField?: string | undefined | null, titleField?: string | undefined | null, withBody?: boolean | undefined | null): Array<JsRecordEntry>
|
|
251
|
+
/**
|
|
252
|
+
* A blob read by `treeRef:path` — the bytes plus the blob's object id, or
|
|
253
|
+
* `null` when nothing (or a subtree) lives at `path`. Backs sheet-config
|
|
254
|
+
* loading and lazy-body hydration without a `git cat-file` subprocess
|
|
255
|
+
* (spec: `rust-core.md` "Blob reads").
|
|
256
|
+
*/
|
|
257
|
+
export declare function treeReadBlob(gitDir: string, treeRef: string, path: string): JsBlobEntry | null
|
|
258
|
+
/**
|
|
259
|
+
* The object id of the blob at `treeRef:path`, or `null` when absent or not
|
|
260
|
+
* a blob. The hash-only lookup (attachment handles, cache keys).
|
|
261
|
+
*/
|
|
262
|
+
export declare function treeEntryHash(gitDir: string, treeRef: string, path: string): string | null
|
|
263
|
+
/**
|
|
264
|
+
* A blob's bytes by object id, or `null` when no object has that id. Backs
|
|
265
|
+
* attachment content reads and diff-side record reads.
|
|
266
|
+
*/
|
|
267
|
+
export declare function blobRead(gitDir: string, hash: string): Buffer | null
|
|
268
|
+
/** A blob read by `treeRef:path`: its object id and bytes. */
|
|
269
|
+
export interface JsBlobEntry {
|
|
270
|
+
hash: string
|
|
271
|
+
content: Buffer
|
|
272
|
+
}
|
|
150
273
|
/**
|
|
151
274
|
* The pruning candidate set alone (no content filter applied) — the direct
|
|
152
275
|
* parity target for the host `Template.queryTree`. `query` is a (partial)
|
|
153
|
-
* record of the path-template input fields
|
|
154
|
-
*
|
|
276
|
+
* record of the path-template input fields; a date-bucket field may carry a
|
|
277
|
+
* `{ $gte, $lt, … }` range object, which bounds the walk. Returns candidate
|
|
278
|
+
* record paths (relative to `base`, no extension) in sorted order.
|
|
155
279
|
*/
|
|
156
280
|
export declare function recordQueryCandidates(gitDir: string, treeRef: string, base: string, template: string, query: JsValue, extension?: string | undefined | null): Array<string>
|
|
157
281
|
/**
|
|
@@ -384,6 +508,14 @@ export declare class CoreTransaction {
|
|
|
384
508
|
* else. `path` is repo-root-relative. Returns the written blob hash.
|
|
385
509
|
*/
|
|
386
510
|
writeFile(path: string, content: string): string
|
|
511
|
+
/**
|
|
512
|
+
* Delete a raw file at `path` (repo-root-relative) in this transaction's
|
|
513
|
+
* private tree *(mutating)* — `write_file`'s inverse. Returns whether a
|
|
514
|
+
* blob existed at `path` before the delete. Used by `contracts prune` to
|
|
515
|
+
* remove undeclared vendored contract documents; deep (slash-separated)
|
|
516
|
+
* paths are supported directly via `MutableTree::delete_child_deep`.
|
|
517
|
+
*/
|
|
518
|
+
deleteFile(path: string): boolean
|
|
387
519
|
/**
|
|
388
520
|
* The blob-hash map of a record's attachments (`name → hash`, sorted by
|
|
389
521
|
* name), or `null` when the record has no attachment directory. Read-only.
|
|
@@ -410,6 +542,22 @@ export declare class CoreTransaction {
|
|
|
410
542
|
* Read-only — does not mark the transaction mutated.
|
|
411
543
|
*/
|
|
412
544
|
list(name: string, withBody: boolean): Array<JsRecordEntry>
|
|
545
|
+
/**
|
|
546
|
+
* Query the sheet's records in the transaction's private tree — pruned by
|
|
547
|
+
* the path template exactly like a committed-ref query, decoded through
|
|
548
|
+
* the format codec, `withBody` the lazy-body switch (spec:
|
|
549
|
+
* `api/transaction.md` "Read isolation"). The filter takes the same forms
|
|
550
|
+
* as `recordQuery` (equality / nested / `$pred` / ranges). Read-only —
|
|
551
|
+
* does not mark the transaction mutated.
|
|
552
|
+
*/
|
|
553
|
+
query(name: string, filter: object, withBody: boolean): Array<JsRecordEntry>
|
|
554
|
+
/**
|
|
555
|
+
* Read the one record at `recordPath` (relative to the sheet's base, no
|
|
556
|
+
* extension) in the transaction's private tree, decoded through the format
|
|
557
|
+
* codec — the tx-bound `Sheet.get`. `null` when absent; `withBody` is the
|
|
558
|
+
* lazy-body switch. Read-only.
|
|
559
|
+
*/
|
|
560
|
+
readRecord(name: string, recordPath: string, withBody: boolean): JsValue | null
|
|
413
561
|
/** The parent commit hash captured at open (null on a fresh repo). */
|
|
414
562
|
parentCommitHash(): string | null
|
|
415
563
|
/**
|
package/index.js
CHANGED
|
@@ -310,13 +310,19 @@ if (!nativeBinding) {
|
|
|
310
310
|
throw new Error(`Failed to load native binding`)
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
const { roundtrip, parseRecords, serializeRecords, renderPathsBatch, validateBatch, runComparator, collatorSort, CompiledDefinition, recordRead, recordWrite, recordDelete, recordList, writeBlob, substrateStats, substrateReset, recordQuery, recordQueryCandidates, templateFieldNames, recordIndexUnique, recordIndexMulti, createPatch, applyMergePatch, diffRecords, simulateCoreError, CoreTransaction, coreDiscoverSheets, coreCheckValidators, markdownSerialize, markdownNormalizeBody, markdownParse, markdownParseHeaderOnly, markdownExtractH1, markdownRewriteH1 } = nativeBinding
|
|
313
|
+
const { roundtrip, parseRecords, serializeRecords, renderPathsBatch, validateBatch, canonicalContractHash, validateContractName, contractPath, checkContractDocument, contractLoad, verifySheetContract, runComparator, collatorSort, CompiledDefinition, recordRead, recordWrite, recordDelete, recordList, writeBlob, substrateStats, substrateReset, recordQuery, treeReadBlob, treeEntryHash, blobRead, recordQueryCandidates, templateFieldNames, recordIndexUnique, recordIndexMulti, createPatch, applyMergePatch, diffRecords, simulateCoreError, CoreTransaction, coreDiscoverSheets, coreCheckValidators, markdownSerialize, markdownNormalizeBody, markdownParse, markdownParseHeaderOnly, markdownExtractH1, markdownRewriteH1 } = nativeBinding
|
|
314
314
|
|
|
315
315
|
module.exports.roundtrip = roundtrip
|
|
316
316
|
module.exports.parseRecords = parseRecords
|
|
317
317
|
module.exports.serializeRecords = serializeRecords
|
|
318
318
|
module.exports.renderPathsBatch = renderPathsBatch
|
|
319
319
|
module.exports.validateBatch = validateBatch
|
|
320
|
+
module.exports.canonicalContractHash = canonicalContractHash
|
|
321
|
+
module.exports.validateContractName = validateContractName
|
|
322
|
+
module.exports.contractPath = contractPath
|
|
323
|
+
module.exports.checkContractDocument = checkContractDocument
|
|
324
|
+
module.exports.contractLoad = contractLoad
|
|
325
|
+
module.exports.verifySheetContract = verifySheetContract
|
|
320
326
|
module.exports.runComparator = runComparator
|
|
321
327
|
module.exports.collatorSort = collatorSort
|
|
322
328
|
module.exports.CompiledDefinition = CompiledDefinition
|
|
@@ -328,6 +334,9 @@ module.exports.writeBlob = writeBlob
|
|
|
328
334
|
module.exports.substrateStats = substrateStats
|
|
329
335
|
module.exports.substrateReset = substrateReset
|
|
330
336
|
module.exports.recordQuery = recordQuery
|
|
337
|
+
module.exports.treeReadBlob = treeReadBlob
|
|
338
|
+
module.exports.treeEntryHash = treeEntryHash
|
|
339
|
+
module.exports.blobRead = blobRead
|
|
331
340
|
module.exports.recordQueryCandidates = recordQueryCandidates
|
|
332
341
|
module.exports.templateFieldNames = templateFieldNames
|
|
333
342
|
module.exports.recordIndexUnique = recordIndexUnique
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitsheets/core-napi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Node.js native binding for gitsheets-core — the FFI marshalling boundary.",
|
|
5
5
|
"main": "binding.cjs",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"index.d.ts"
|
|
34
34
|
],
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@gitsheets/core-napi-linux-x64-gnu": "0.
|
|
37
|
-
"@gitsheets/core-napi-linux-arm64-gnu": "0.
|
|
38
|
-
"@gitsheets/core-napi-linux-x64-musl": "0.
|
|
39
|
-
"@gitsheets/core-napi-darwin-arm64": "0.
|
|
40
|
-
"@gitsheets/core-napi-darwin-x64": "0.
|
|
41
|
-
"@gitsheets/core-napi-win32-x64-msvc": "0.
|
|
36
|
+
"@gitsheets/core-napi-linux-x64-gnu": "0.5.0",
|
|
37
|
+
"@gitsheets/core-napi-linux-arm64-gnu": "0.5.0",
|
|
38
|
+
"@gitsheets/core-napi-linux-x64-musl": "0.5.0",
|
|
39
|
+
"@gitsheets/core-napi-darwin-arm64": "0.5.0",
|
|
40
|
+
"@gitsheets/core-napi-darwin-x64": "0.5.0",
|
|
41
|
+
"@gitsheets/core-napi-win32-x64-msvc": "0.5.0"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"artifacts": "napi artifacts",
|
|
45
45
|
"build": "napi build --platform --release",
|
|
46
46
|
"build:debug": "napi build --platform",
|
|
47
47
|
"prepublishOnly": "napi prepublish -t npm --skip-gh-release",
|
|
48
|
-
"test": "node --test test/roundtrip.mjs test/errors.mjs test/canonical.mjs test/path-template.mjs test/validation-parity.mjs test/engine-parity.mjs test/collator-parity.mjs test/record-crud.mjs test/record-query.mjs test/record-index.mjs test/sheet-store.mjs test/sheet-markdown.mjs test/sheet-attachments.mjs",
|
|
48
|
+
"test": "node --test test/roundtrip.mjs test/errors.mjs test/canonical.mjs test/path-template.mjs test/validation-parity.mjs test/engine-parity.mjs test/collator-parity.mjs test/record-crud.mjs test/record-query.mjs test/record-index.mjs test/sheet-store.mjs test/sheet-markdown.mjs test/sheet-attachments.mjs test/contracts.mjs",
|
|
49
49
|
"bench": "node bench/query-bench.mjs",
|
|
50
50
|
"version": "napi version"
|
|
51
51
|
},
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
"ajv": "^8.20.0",
|
|
55
55
|
"ajv-formats": "^3.0.1",
|
|
56
56
|
"rfc6902": "^5.2.0",
|
|
57
|
-
"smol-toml": "^1.
|
|
57
|
+
"smol-toml": "^1.8.0"
|
|
58
58
|
}
|
|
59
59
|
}
|