datanotes 3.2.0 → 3.3.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/README.md +1 -0
- package/SECURITY.md +12 -0
- package/dist/api/client.d.cts +2 -0
- package/dist/api/client.d.ts +2 -0
- package/dist/api/docs.d.cts +14 -4
- package/dist/api/docs.d.ts +14 -4
- package/dist/api/extension-files.d.cts +23 -0
- package/dist/api/extension-files.d.ts +23 -0
- package/dist/api/extension-host.d.cts +108 -0
- package/dist/api/extension-host.d.ts +108 -0
- package/dist/api/extension-manifest.d.cts +154 -0
- package/dist/api/extension-manifest.d.ts +154 -0
- package/dist/api/extension-plan.d.cts +174 -0
- package/dist/api/extension-plan.d.ts +174 -0
- package/dist/api/extension-record.d.cts +65 -0
- package/dist/api/extension-record.d.ts +65 -0
- package/dist/api/extension-sdk.d.cts +65 -0
- package/dist/api/extension-sdk.d.ts +65 -0
- package/dist/api/extensions.cjs +18472 -0
- package/dist/api/extensions.d.cts +11 -0
- package/dist/api/extensions.d.ts +11 -0
- package/dist/api/extensions.js +18409 -0
- package/dist/api/index.cjs +371 -366
- package/dist/api/index.js +371 -366
- package/dist/api/mcp.cjs +28 -5
- package/dist/api/mcp.js +28 -5
- package/dist/datanotes.cjs +6205 -3421
- package/dist/docs/administration/extensions.md +213 -0
- package/dist/docs/api/operations/extensions_delete.md +29 -0
- package/dist/docs/api/operations/extensions_list.md +20 -0
- package/dist/docs/api/operations/extensions_record.md +44 -0
- package/dist/docs/api/operations/tags/extensions.md +9 -0
- package/dist/docs/api.md +9 -1
- package/dist/docs/develop/write-an-extension.md +369 -0
- package/dist/docs/guides/data-quality/check-constraints.md +10 -10
- package/dist/docs/guides/data-quality/hand-edits.md +8 -8
- package/dist/docs/guides/database-objects/bases.md +11 -11
- package/dist/docs/guides/database-objects/catalogs-and-schemas.md +10 -10
- package/dist/docs/guides/database-objects/columns.md +38 -38
- package/dist/docs/guides/database-objects/relations.md +28 -28
- package/dist/docs/guides/database-objects/tables.md +28 -28
- package/dist/docs/guides/database-objects/views.md +44 -44
- package/dist/docs/guides/history/change-data-feed.md +34 -34
- package/dist/docs/guides/history/journal-and-undo.md +12 -12
- package/dist/docs/guides/history/restore.md +20 -20
- package/dist/docs/guides/history/table-history.md +31 -31
- package/dist/docs/guides/read-and-write/automatic-links.md +15 -15
- package/dist/docs/guides/read-and-write/import-notes.md +20 -20
- package/dist/docs/guides/read-and-write/joins-and-aggregates.md +7 -7
- package/dist/docs/guides/read-and-write/read-and-filter.md +10 -10
- package/dist/docs/guides/read-and-write/write-rows.md +10 -10
- package/dist/docs/guides/search/text.md +1 -1
- package/dist/docs/guides/security/security-model.md +12 -0
- package/dist/docs/reference/cli.md +32 -1
- package/dist/docs/reference/glossary.md +8 -0
- package/dist/docs/release-notes.md +33 -0
- package/dist/docs/start/connect-agents.md +11 -0
- package/package.json +11 -1
package/dist/api/mcp.cjs
CHANGED
|
@@ -17092,9 +17092,12 @@ var SearchIndex = class {
|
|
|
17092
17092
|
}
|
|
17093
17093
|
};
|
|
17094
17094
|
var DocsLibrary = class {
|
|
17095
|
-
constructor(dir) {
|
|
17095
|
+
constructor(dir, mounts = []) {
|
|
17096
17096
|
this.dir = dir;
|
|
17097
|
+
this.mounts = mounts;
|
|
17097
17098
|
this.loaded = null;
|
|
17099
|
+
/** The keys of the pages that come from mounts: the docs' version leaves them out. */
|
|
17100
|
+
this.mounted = /* @__PURE__ */ new Set();
|
|
17098
17101
|
this.index = null;
|
|
17099
17102
|
this.hash = null;
|
|
17100
17103
|
this.sectionList = null;
|
|
@@ -17124,6 +17127,23 @@ var DocsLibrary = class {
|
|
|
17124
17127
|
}
|
|
17125
17128
|
};
|
|
17126
17129
|
walk(this.dir, "");
|
|
17130
|
+
const walkMount = (dir, rel, prefix) => {
|
|
17131
|
+
for (const ent of import_node_fs.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
17132
|
+
if (ent.isDirectory()) walkMount(import_node_path.default.join(dir, ent.name), `${rel}${ent.name}/`, prefix);
|
|
17133
|
+
else if (ent.name.endsWith(".md")) {
|
|
17134
|
+
const name = ent.name.slice(0, -3);
|
|
17135
|
+
const folder = rel.slice(0, -1);
|
|
17136
|
+
const tail = name === "index" ? folder : `${rel}${name}`;
|
|
17137
|
+
const key2 = tail === "" ? prefix : `${prefix}/${tail}`;
|
|
17138
|
+
if (pages.has(key2)) continue;
|
|
17139
|
+
pages.set(key2, pageOf(key2, import_node_fs.default.readFileSync(import_node_path.default.join(dir, ent.name), "utf8").replace(/\r\n/g, "\n")));
|
|
17140
|
+
this.mounted.add(key2);
|
|
17141
|
+
}
|
|
17142
|
+
}
|
|
17143
|
+
};
|
|
17144
|
+
for (const m of [...this.mounts].sort((a, b) => a.prefix < b.prefix ? -1 : 1)) {
|
|
17145
|
+
if (import_node_fs.default.existsSync(m.dir)) walkMount(m.dir, "", m.prefix);
|
|
17146
|
+
}
|
|
17127
17147
|
this.loaded = pages;
|
|
17128
17148
|
return pages;
|
|
17129
17149
|
}
|
|
@@ -17338,7 +17358,9 @@ var DocsLibrary = class {
|
|
|
17338
17358
|
version() {
|
|
17339
17359
|
if (this.hash === null) {
|
|
17340
17360
|
const h = (0, import_node_crypto.createHash)("sha256");
|
|
17341
|
-
for (const s of this.sections())
|
|
17361
|
+
for (const s of this.sections()) {
|
|
17362
|
+
if (!this.mounted.has(s.path.split("#")[0])) h.update(`${s.path}\0${s.text}\0`);
|
|
17363
|
+
}
|
|
17342
17364
|
this.hash = h.digest("hex").slice(0, 16);
|
|
17343
17365
|
}
|
|
17344
17366
|
return this.hash;
|
|
@@ -17370,9 +17392,10 @@ function excerpt(body, terms) {
|
|
|
17370
17392
|
return `${start > 0 ? "\u2026" : ""}${cut}${start + 200 < prose.length ? "\u2026" : ""}`;
|
|
17371
17393
|
}
|
|
17372
17394
|
var libraries = /* @__PURE__ */ new Map();
|
|
17373
|
-
function openDocs(dir = findDocsDir()) {
|
|
17374
|
-
|
|
17375
|
-
|
|
17395
|
+
function openDocs(dir = findDocsDir(), mounts = []) {
|
|
17396
|
+
const key2 = `${dir}\0${JSON.stringify(mounts)}`;
|
|
17397
|
+
let lib = libraries.get(key2);
|
|
17398
|
+
if (!lib) libraries.set(key2, lib = new DocsLibrary(dir, mounts));
|
|
17376
17399
|
return lib;
|
|
17377
17400
|
}
|
|
17378
17401
|
|
package/dist/api/mcp.js
CHANGED
|
@@ -17043,9 +17043,12 @@ var SearchIndex = class {
|
|
|
17043
17043
|
}
|
|
17044
17044
|
};
|
|
17045
17045
|
var DocsLibrary = class {
|
|
17046
|
-
constructor(dir) {
|
|
17046
|
+
constructor(dir, mounts = []) {
|
|
17047
17047
|
this.dir = dir;
|
|
17048
|
+
this.mounts = mounts;
|
|
17048
17049
|
this.loaded = null;
|
|
17050
|
+
/** The keys of the pages that come from mounts: the docs' version leaves them out. */
|
|
17051
|
+
this.mounted = /* @__PURE__ */ new Set();
|
|
17049
17052
|
this.index = null;
|
|
17050
17053
|
this.hash = null;
|
|
17051
17054
|
this.sectionList = null;
|
|
@@ -17075,6 +17078,23 @@ var DocsLibrary = class {
|
|
|
17075
17078
|
}
|
|
17076
17079
|
};
|
|
17077
17080
|
walk(this.dir, "");
|
|
17081
|
+
const walkMount = (dir, rel, prefix) => {
|
|
17082
|
+
for (const ent of fs.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
17083
|
+
if (ent.isDirectory()) walkMount(path.join(dir, ent.name), `${rel}${ent.name}/`, prefix);
|
|
17084
|
+
else if (ent.name.endsWith(".md")) {
|
|
17085
|
+
const name = ent.name.slice(0, -3);
|
|
17086
|
+
const folder = rel.slice(0, -1);
|
|
17087
|
+
const tail = name === "index" ? folder : `${rel}${name}`;
|
|
17088
|
+
const key2 = tail === "" ? prefix : `${prefix}/${tail}`;
|
|
17089
|
+
if (pages.has(key2)) continue;
|
|
17090
|
+
pages.set(key2, pageOf(key2, fs.readFileSync(path.join(dir, ent.name), "utf8").replace(/\r\n/g, "\n")));
|
|
17091
|
+
this.mounted.add(key2);
|
|
17092
|
+
}
|
|
17093
|
+
}
|
|
17094
|
+
};
|
|
17095
|
+
for (const m of [...this.mounts].sort((a, b) => a.prefix < b.prefix ? -1 : 1)) {
|
|
17096
|
+
if (fs.existsSync(m.dir)) walkMount(m.dir, "", m.prefix);
|
|
17097
|
+
}
|
|
17078
17098
|
this.loaded = pages;
|
|
17079
17099
|
return pages;
|
|
17080
17100
|
}
|
|
@@ -17289,7 +17309,9 @@ var DocsLibrary = class {
|
|
|
17289
17309
|
version() {
|
|
17290
17310
|
if (this.hash === null) {
|
|
17291
17311
|
const h = createHash("sha256");
|
|
17292
|
-
for (const s of this.sections())
|
|
17312
|
+
for (const s of this.sections()) {
|
|
17313
|
+
if (!this.mounted.has(s.path.split("#")[0])) h.update(`${s.path}\0${s.text}\0`);
|
|
17314
|
+
}
|
|
17293
17315
|
this.hash = h.digest("hex").slice(0, 16);
|
|
17294
17316
|
}
|
|
17295
17317
|
return this.hash;
|
|
@@ -17321,9 +17343,10 @@ function excerpt(body, terms) {
|
|
|
17321
17343
|
return `${start > 0 ? "\u2026" : ""}${cut}${start + 200 < prose.length ? "\u2026" : ""}`;
|
|
17322
17344
|
}
|
|
17323
17345
|
var libraries = /* @__PURE__ */ new Map();
|
|
17324
|
-
function openDocs(dir = findDocsDir()) {
|
|
17325
|
-
|
|
17326
|
-
|
|
17346
|
+
function openDocs(dir = findDocsDir(), mounts = []) {
|
|
17347
|
+
const key2 = `${dir}\0${JSON.stringify(mounts)}`;
|
|
17348
|
+
let lib = libraries.get(key2);
|
|
17349
|
+
if (!lib) libraries.set(key2, lib = new DocsLibrary(dir, mounts));
|
|
17327
17350
|
return lib;
|
|
17328
17351
|
}
|
|
17329
17352
|
|