Getting started

Installation

Install @welldot/core with npm, pnpm or yarn, check the requirements, and find the JSON Schema and example files it ships with.
pnpm add @welldot/core

Requirements

  • Node.js 18 or later, or any modern browser or bundler. The package has no DOM or network dependency, so it also runs in workers and edge runtimes.
  • ES modules and CommonJS are both published (import and require), with TypeScript declarations.
  • Dependencies: zod 3 (the validators are Zod schemas) and defu. They install with the package.

What else is in the package

PathContents
@welldot/coreThe library: types, validators, serialization, units, vocabularies.
@welldot/core/well.schema.jsonThe JSON Schema for v2, the same file published at https://welldot.org/schema/v2/well.schema.json.
@welldot/core/examples/<file>.wellThe 19 example wells.
// Node: read an example from the installed package
import { readFile } from 'node:fs/promises';
import { createRequire } from 'node:module';

const require = createRequire(import.meta.url);
const path =
  require.resolve('@welldot/core/examples/coluna-mg-cristalino-abastecimento.well');
const text = await readFile(path, 'utf8');

Versions

The package follows semantic versioning from 1.0 onward; during 0.x a minor release can change the API, and the changelog says how. Format support by release:

@welldot/coreFormat revision
0.5.02.4 (writes "2.4")
0.4.02.3
0.3.02.1
0.2.02.0
Releases up to 0.4.0 reject files with "version": "2.4". Update every program that reads your files before any of them starts writing 2.4 files.

Next

First use