@interactive-inc/docs-client 1.1.0 → 1.1.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/build/{doc-file-system-BQAOBIO-.d.ts → doc-file-system-DEmPPJPE.d.ts} +10 -142
- package/build/doc-file-system.interface-C5vpYrOL.d.ts +135 -0
- package/build/file-system-json.d.ts +5 -6
- package/build/file-system-json.js +18 -299
- package/build/file-system-mock.d.ts +28 -8
- package/build/file-system-mock.js +47 -435
- package/build/file-system-node.d.ts +16 -0
- package/build/file-system-node.js +544 -0
- package/build/file-system-octokit.d.ts +8 -15
- package/build/file-system-octokit.js +17 -304
- package/build/file-system.d.ts +10 -8
- package/build/file-system.js +157 -171
- package/build/index.d.ts +25 -34
- package/build/index.js +74 -214
- package/build/models.js +4 -75
- package/package.json +5 -4
- package/tmp/docs-studio/files/a.md +9 -0
- package/tmp/docs-studio/pages/delete-document.md +7 -0
- package/tmp/docs-studio/pages/document-editor.md +9 -0
- package/tmp/docs-studio/pages/edit-document-content.md +7 -0
- package/tmp/docs-studio/pages/index.md +14 -0
package/build/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { stringify, parse } from 'yaml';
|
|
3
|
+
|
|
1
4
|
// lib/models.ts
|
|
2
|
-
import { z } from "zod";
|
|
3
5
|
var zDocFilePath = z.object({
|
|
4
6
|
name: z.string(),
|
|
5
7
|
path: z.string(),
|
|
@@ -19,7 +21,7 @@ var zDocMetaFieldTypeMultiSelectText = z.literal("multi-select-text");
|
|
|
19
21
|
var zDocMetaFieldTypeMultiSelectNumber = z.literal(
|
|
20
22
|
"multi-select-number"
|
|
21
23
|
);
|
|
22
|
-
|
|
24
|
+
z.union([
|
|
23
25
|
zDocMetaFieldTypeText,
|
|
24
26
|
zDocMetaFieldTypeNumber,
|
|
25
27
|
zDocMetaFieldTypeBoolean,
|
|
@@ -222,13 +224,13 @@ var zDocCustomSchemaField = z.union([
|
|
|
222
224
|
zDocCustomSchemaFieldMultiSelectText,
|
|
223
225
|
zDocCustomSchemaFieldMultiSelectNumber
|
|
224
226
|
]);
|
|
225
|
-
|
|
227
|
+
z.record(z.string(), zDocCustomSchemaField);
|
|
226
228
|
var zDocFileIndexMeta = z.object({
|
|
227
229
|
type: z.literal("index-meta"),
|
|
228
230
|
icon: z.string().nullable(),
|
|
229
231
|
schema: zDocFileIndexSchema
|
|
230
232
|
});
|
|
231
|
-
|
|
233
|
+
z.object({
|
|
232
234
|
type: z.literal("index-meta"),
|
|
233
235
|
icon: z.string().nullable().or(z.undefined()),
|
|
234
236
|
schema: zDocFileIndexSchemaInput
|
|
@@ -288,14 +290,14 @@ var zDocFileMd = z.object({
|
|
|
288
290
|
content: zDocFileMdContent,
|
|
289
291
|
isArchived: z.boolean()
|
|
290
292
|
});
|
|
291
|
-
|
|
293
|
+
z.object({
|
|
292
294
|
type: z.literal("markdown"),
|
|
293
295
|
path: zDocFilePath,
|
|
294
296
|
content: zDocFileMdContentInput,
|
|
295
297
|
isArchived: z.boolean()
|
|
296
298
|
});
|
|
297
|
-
|
|
298
|
-
|
|
299
|
+
z.union([zDocFileIndex, zDocFileMd, zDocFileUnknown]);
|
|
300
|
+
z.union([zDocFileMd, zDocFileUnknown]);
|
|
299
301
|
var zDocTreeFileNode = z.object({
|
|
300
302
|
type: z.literal("file"),
|
|
301
303
|
name: z.string(),
|
|
@@ -323,9 +325,6 @@ var zDocClientConfig = z.object({
|
|
|
323
325
|
directoryExcludes: z.array(z.string())
|
|
324
326
|
});
|
|
325
327
|
|
|
326
|
-
// lib/values/doc-file-index-content-value.ts
|
|
327
|
-
import { stringify as stringify2 } from "yaml";
|
|
328
|
-
|
|
329
328
|
// lib/modules/markdown-system/doc-markdown-system.ts
|
|
330
329
|
var DocMarkdownSystem = class {
|
|
331
330
|
frontMatterSeparator = "---";
|
|
@@ -469,9 +468,6 @@ ${text}`.trim();
|
|
|
469
468
|
}
|
|
470
469
|
};
|
|
471
470
|
|
|
472
|
-
// lib/values/doc-file-index-meta-value.ts
|
|
473
|
-
import { parse, stringify } from "yaml";
|
|
474
|
-
|
|
475
471
|
// lib/constants.ts
|
|
476
472
|
var INDEX_META = "index-meta";
|
|
477
473
|
var DOC_NODE_TYPE_DIRECTORY = "directory";
|
|
@@ -1454,64 +1450,6 @@ var DocFileIndexMetaValue = class _DocFileIndexMetaValue {
|
|
|
1454
1450
|
{}
|
|
1455
1451
|
);
|
|
1456
1452
|
}
|
|
1457
|
-
/**
|
|
1458
|
-
* Extract icon
|
|
1459
|
-
*/
|
|
1460
|
-
static extractIcon(data, config) {
|
|
1461
|
-
if ("icon" in data && typeof data.icon === "string") {
|
|
1462
|
-
return data.icon;
|
|
1463
|
-
}
|
|
1464
|
-
return config.defaultIndexIcon;
|
|
1465
|
-
}
|
|
1466
|
-
/**
|
|
1467
|
-
* Extract schema part
|
|
1468
|
-
*/
|
|
1469
|
-
static extractSchema(record, customSchema) {
|
|
1470
|
-
const hasSchema = "schema" in record;
|
|
1471
|
-
if (hasSchema === false) {
|
|
1472
|
-
return _DocFileIndexMetaValue.emptySchema(customSchema);
|
|
1473
|
-
}
|
|
1474
|
-
if (typeof record.schema !== "object" || record.schema === null) {
|
|
1475
|
-
return _DocFileIndexMetaValue.emptySchema(customSchema);
|
|
1476
|
-
}
|
|
1477
|
-
return _DocFileIndexMetaValue.normalizeSchema(
|
|
1478
|
-
record.schema,
|
|
1479
|
-
customSchema
|
|
1480
|
-
);
|
|
1481
|
-
}
|
|
1482
|
-
/**
|
|
1483
|
-
* Normalize entire schema
|
|
1484
|
-
*/
|
|
1485
|
-
static normalizeSchema(schema, customSchema) {
|
|
1486
|
-
const factory = new DocFileIndexSchemaFieldFactory();
|
|
1487
|
-
if (Object.keys(customSchema).length === 0) {
|
|
1488
|
-
const dynamicRecord = {};
|
|
1489
|
-
for (const key of Object.keys(schema)) {
|
|
1490
|
-
const schemaValue = schema[key];
|
|
1491
|
-
if (schemaValue !== void 0 && schemaValue !== null) {
|
|
1492
|
-
const field = factory.from(key, schemaValue);
|
|
1493
|
-
const normalizedValue = {
|
|
1494
|
-
...field.value,
|
|
1495
|
-
required: field.value.required ?? false
|
|
1496
|
-
};
|
|
1497
|
-
dynamicRecord[key] = normalizedValue;
|
|
1498
|
-
}
|
|
1499
|
-
}
|
|
1500
|
-
return dynamicRecord;
|
|
1501
|
-
}
|
|
1502
|
-
const record = {};
|
|
1503
|
-
const customSchemaKeys = Object.keys(customSchema);
|
|
1504
|
-
for (const key of customSchemaKeys) {
|
|
1505
|
-
const schemaValue = schema[key];
|
|
1506
|
-
const field = factory.from(key, schemaValue);
|
|
1507
|
-
const normalizedValue = {
|
|
1508
|
-
...field.value,
|
|
1509
|
-
required: field.value.required ?? false
|
|
1510
|
-
};
|
|
1511
|
-
record[key] = normalizedValue;
|
|
1512
|
-
}
|
|
1513
|
-
return record;
|
|
1514
|
-
}
|
|
1515
1453
|
static emptySchema(customSchema) {
|
|
1516
1454
|
const record = {};
|
|
1517
1455
|
const customSchemaKeys = Object.keys(customSchema);
|
|
@@ -1527,6 +1465,32 @@ var DocFileIndexMetaValue = class _DocFileIndexMetaValue {
|
|
|
1527
1465
|
}
|
|
1528
1466
|
return record;
|
|
1529
1467
|
}
|
|
1468
|
+
// biome-ignore lint/correctness/noUnusedPrivateClassMembers: Used in fromRecord static method
|
|
1469
|
+
static extractIcon(record, config) {
|
|
1470
|
+
if (typeof record.icon === "string") {
|
|
1471
|
+
return record.icon;
|
|
1472
|
+
}
|
|
1473
|
+
return config.defaultIndexIcon;
|
|
1474
|
+
}
|
|
1475
|
+
// biome-ignore lint/correctness/noUnusedPrivateClassMembers: Used in fromRecord static method
|
|
1476
|
+
static extractSchema(record, customSchema) {
|
|
1477
|
+
if (typeof record.schema === "object" && record.schema !== null && !Array.isArray(record.schema)) {
|
|
1478
|
+
const rawSchema = record.schema;
|
|
1479
|
+
const normalizedSchema = {};
|
|
1480
|
+
for (const key in rawSchema) {
|
|
1481
|
+
const field = rawSchema[key];
|
|
1482
|
+
normalizedSchema[key] = {
|
|
1483
|
+
...field,
|
|
1484
|
+
required: field.required ?? false,
|
|
1485
|
+
title: field.title ?? null,
|
|
1486
|
+
description: field.description ?? null,
|
|
1487
|
+
default: field.default ?? null
|
|
1488
|
+
};
|
|
1489
|
+
}
|
|
1490
|
+
return normalizedSchema;
|
|
1491
|
+
}
|
|
1492
|
+
return _DocFileIndexMetaValue.emptySchema(customSchema);
|
|
1493
|
+
}
|
|
1530
1494
|
};
|
|
1531
1495
|
|
|
1532
1496
|
// lib/values/doc-file-index-content-value.ts
|
|
@@ -1686,7 +1650,7 @@ schema: {}
|
|
|
1686
1650
|
icon: this.meta().icon,
|
|
1687
1651
|
schema: this.meta().schema().toJson()
|
|
1688
1652
|
};
|
|
1689
|
-
const yamlStr =
|
|
1653
|
+
const yamlStr = stringify(yamlData).trim();
|
|
1690
1654
|
const text = `---
|
|
1691
1655
|
${yamlStr}
|
|
1692
1656
|
---
|
|
@@ -1858,9 +1822,6 @@ var DocFilePathValue = class _DocFilePathValue {
|
|
|
1858
1822
|
}
|
|
1859
1823
|
};
|
|
1860
1824
|
|
|
1861
|
-
// lib/values/doc-file-md-meta-value.ts
|
|
1862
|
-
import { parse as parse2, stringify as stringify3 } from "yaml";
|
|
1863
|
-
|
|
1864
1825
|
// lib/values/doc-custom-schema-field/doc-custom-schema-field-boolean-value.ts
|
|
1865
1826
|
var DocCustomSchemaFieldBooleanValue = class _DocCustomSchemaFieldBooleanValue {
|
|
1866
1827
|
constructor(key, value) {
|
|
@@ -2603,7 +2564,12 @@ var DocFileMdMetaValue = class _DocFileMdMetaValue {
|
|
|
2603
2564
|
constructor(value, customSchema) {
|
|
2604
2565
|
this.value = value;
|
|
2605
2566
|
this.customSchema = customSchema;
|
|
2606
|
-
|
|
2567
|
+
for (const key in customSchema) {
|
|
2568
|
+
const field = customSchema[key];
|
|
2569
|
+
if (field.required && !(key in value)) {
|
|
2570
|
+
throw new Error(`Required field "${key}" is missing`);
|
|
2571
|
+
}
|
|
2572
|
+
}
|
|
2607
2573
|
Object.freeze(this);
|
|
2608
2574
|
}
|
|
2609
2575
|
get keys() {
|
|
@@ -2703,24 +2669,7 @@ var DocFileMdMetaValue = class _DocFileMdMetaValue {
|
|
|
2703
2669
|
return this.value;
|
|
2704
2670
|
}
|
|
2705
2671
|
toYaml() {
|
|
2706
|
-
return
|
|
2707
|
-
}
|
|
2708
|
-
validateValue(value, schema) {
|
|
2709
|
-
if (Object.keys(schema).length === 0) {
|
|
2710
|
-
return;
|
|
2711
|
-
}
|
|
2712
|
-
const keys = Object.keys(schema);
|
|
2713
|
-
for (const key of keys) {
|
|
2714
|
-
const schemaField = schema[key];
|
|
2715
|
-
const fieldValue = this.getValueField(value, key);
|
|
2716
|
-
if (schemaField.required && fieldValue === void 0) {
|
|
2717
|
-
throw new Error(`Required field "${key}" is missing`);
|
|
2718
|
-
}
|
|
2719
|
-
if (fieldValue !== void 0) {
|
|
2720
|
-
const factory = new DocMetaFieldFactory();
|
|
2721
|
-
factory.fromType(key, schemaField.type, fieldValue);
|
|
2722
|
-
}
|
|
2723
|
-
}
|
|
2672
|
+
return stringify(this.value).trim();
|
|
2724
2673
|
}
|
|
2725
2674
|
getValueField(value, key) {
|
|
2726
2675
|
const record = value;
|
|
@@ -2730,7 +2679,7 @@ var DocFileMdMetaValue = class _DocFileMdMetaValue {
|
|
|
2730
2679
|
* Generate from Markdown text
|
|
2731
2680
|
*/
|
|
2732
2681
|
static fromYamlText(yamlText, customSchema) {
|
|
2733
|
-
const yamlRecord =
|
|
2682
|
+
const yamlRecord = parse(yamlText);
|
|
2734
2683
|
const record = zDocFileMdMetaInput.transform((meta) => {
|
|
2735
2684
|
const result = {};
|
|
2736
2685
|
for (const [key, value] of Object.entries(meta)) {
|
|
@@ -3079,12 +3028,6 @@ var DocRelationFileValue = class _DocRelationFileValue {
|
|
|
3079
3028
|
toJson() {
|
|
3080
3029
|
return { ...this.value };
|
|
3081
3030
|
}
|
|
3082
|
-
/**
|
|
3083
|
-
* Extract file name from file path (without extension)
|
|
3084
|
-
*/
|
|
3085
|
-
static extractFileName(filePath) {
|
|
3086
|
-
return filePath.split("/").pop()?.replace(".md", "") || filePath;
|
|
3087
|
-
}
|
|
3088
3031
|
/**
|
|
3089
3032
|
* Create from file path and title
|
|
3090
3033
|
*/
|
|
@@ -3097,6 +3040,19 @@ var DocRelationFileValue = class _DocRelationFileValue {
|
|
|
3097
3040
|
path: null
|
|
3098
3041
|
});
|
|
3099
3042
|
}
|
|
3043
|
+
// biome-ignore lint/correctness/noUnusedPrivateClassMembers: Used in from static method
|
|
3044
|
+
static extractFileName(filePath) {
|
|
3045
|
+
if (!filePath) {
|
|
3046
|
+
return filePath;
|
|
3047
|
+
}
|
|
3048
|
+
const lastSlash = filePath.lastIndexOf("/");
|
|
3049
|
+
const fileNameWithExt = lastSlash >= 0 ? filePath.slice(lastSlash + 1) : filePath;
|
|
3050
|
+
const lastDot = fileNameWithExt.lastIndexOf(".");
|
|
3051
|
+
if (lastDot > 0) {
|
|
3052
|
+
return fileNameWithExt.slice(0, lastDot);
|
|
3053
|
+
}
|
|
3054
|
+
return fileNameWithExt;
|
|
3055
|
+
}
|
|
3100
3056
|
};
|
|
3101
3057
|
|
|
3102
3058
|
// lib/values/doc-relation-value.ts
|
|
@@ -3505,7 +3461,7 @@ var DocFileIndexReference = class _DocFileIndexReference {
|
|
|
3505
3461
|
* Get last modified date
|
|
3506
3462
|
*/
|
|
3507
3463
|
async lastModified() {
|
|
3508
|
-
return this.fileSystem.
|
|
3464
|
+
return this.fileSystem.getFileUpdatedTime(this.filePath);
|
|
3509
3465
|
}
|
|
3510
3466
|
/**
|
|
3511
3467
|
* Get file creation date
|
|
@@ -3771,7 +3727,7 @@ var DocFileUnknownReference = class _DocFileUnknownReference {
|
|
|
3771
3727
|
* Get file last modified time
|
|
3772
3728
|
*/
|
|
3773
3729
|
async lastModified() {
|
|
3774
|
-
return this.fileSystem.
|
|
3730
|
+
return this.fileSystem.getFileUpdatedTime(this.path);
|
|
3775
3731
|
}
|
|
3776
3732
|
/**
|
|
3777
3733
|
* Get file creation time
|
|
@@ -4407,7 +4363,7 @@ var DocFileMdReference = class _DocFileMdReference {
|
|
|
4407
4363
|
* Get file last modified time
|
|
4408
4364
|
*/
|
|
4409
4365
|
async lastModified() {
|
|
4410
|
-
return this.fileSystem.
|
|
4366
|
+
return this.fileSystem.getFileUpdatedTime(this.path);
|
|
4411
4367
|
}
|
|
4412
4368
|
/**
|
|
4413
4369
|
* Get file creation time
|
|
@@ -5020,13 +4976,14 @@ var DocClient = class {
|
|
|
5020
4976
|
directoryExcludes: [".vitepress"]
|
|
5021
4977
|
};
|
|
5022
4978
|
this.config = props.config ? zDocClientConfig.parse(props.config) : defaultConfig;
|
|
5023
|
-
|
|
4979
|
+
const fileTreeSystem = new DocFileTreeSystem({
|
|
5024
4980
|
fileSystem: this.fileSystem,
|
|
5025
4981
|
pathSystem: this.pathSystem,
|
|
5026
4982
|
indexFileName: this.config.indexFileName,
|
|
5027
4983
|
archiveDirectoryName: this.config.archiveDirectoryName,
|
|
5028
4984
|
config: this.config
|
|
5029
4985
|
});
|
|
4986
|
+
this.fileTreeSystem = props.fileTreeSystem ?? fileTreeSystem;
|
|
5030
4987
|
}
|
|
5031
4988
|
basePath() {
|
|
5032
4989
|
return this.fileSystem.getBasePath();
|
|
@@ -5277,16 +5234,22 @@ var docCustomSchemaField = {
|
|
|
5277
5234
|
required
|
|
5278
5235
|
};
|
|
5279
5236
|
},
|
|
5280
|
-
relation(required) {
|
|
5237
|
+
relation(required, path) {
|
|
5281
5238
|
return {
|
|
5282
5239
|
type: "relation",
|
|
5283
|
-
required
|
|
5240
|
+
required,
|
|
5241
|
+
title: null,
|
|
5242
|
+
description: null,
|
|
5243
|
+
path
|
|
5284
5244
|
};
|
|
5285
5245
|
},
|
|
5286
|
-
multiRelation(required) {
|
|
5246
|
+
multiRelation(required, path) {
|
|
5287
5247
|
return {
|
|
5288
5248
|
type: "multi-relation",
|
|
5289
|
-
required
|
|
5249
|
+
required,
|
|
5250
|
+
title: null,
|
|
5251
|
+
description: null,
|
|
5252
|
+
path
|
|
5290
5253
|
};
|
|
5291
5254
|
},
|
|
5292
5255
|
selectText(required) {
|
|
@@ -5686,108 +5649,5 @@ var DocRelationFieldValue = class _DocRelationFieldValue {
|
|
|
5686
5649
|
return new _DocRelationFieldValue(props);
|
|
5687
5650
|
}
|
|
5688
5651
|
};
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
DocCustomSchemaFieldValue,
|
|
5692
|
-
DocDirectoryPathValue,
|
|
5693
|
-
DocDirectoryReference,
|
|
5694
|
-
DocFileIndexContentValue,
|
|
5695
|
-
DocFileIndexEntity,
|
|
5696
|
-
DocFileIndexMetaValue,
|
|
5697
|
-
DocFileIndexReference,
|
|
5698
|
-
DocFileIndexSchemaValue,
|
|
5699
|
-
DocFileMdContentValue,
|
|
5700
|
-
DocFileMdEntity,
|
|
5701
|
-
DocFileMdMetaValue,
|
|
5702
|
-
DocFileMdReference,
|
|
5703
|
-
DocFilePathValue,
|
|
5704
|
-
DocFileRelationReference,
|
|
5705
|
-
DocFileTreeSystem,
|
|
5706
|
-
DocFileUnknownEntity,
|
|
5707
|
-
DocFileUnknownReference,
|
|
5708
|
-
DocMarkdownSystem,
|
|
5709
|
-
DocPathSystem,
|
|
5710
|
-
DocPathSystemMock,
|
|
5711
|
-
DocRelationFieldValue,
|
|
5712
|
-
DocRelationFileValue,
|
|
5713
|
-
DocRelationValue,
|
|
5714
|
-
DocTreeDirectoryNodeValue,
|
|
5715
|
-
DocTreeFileNodeValue,
|
|
5716
|
-
assertType,
|
|
5717
|
-
defaultTestConfig,
|
|
5718
|
-
defineSchema,
|
|
5719
|
-
docCustomSchemaField,
|
|
5720
|
-
expectType,
|
|
5721
|
-
zDocClientConfig,
|
|
5722
|
-
zDocCustomSchema,
|
|
5723
|
-
zDocCustomSchemaField,
|
|
5724
|
-
zDocCustomSchemaFieldBoolean,
|
|
5725
|
-
zDocCustomSchemaFieldMultiNumber,
|
|
5726
|
-
zDocCustomSchemaFieldMultiRelation,
|
|
5727
|
-
zDocCustomSchemaFieldMultiSelectNumber,
|
|
5728
|
-
zDocCustomSchemaFieldMultiSelectText,
|
|
5729
|
-
zDocCustomSchemaFieldMultiText,
|
|
5730
|
-
zDocCustomSchemaFieldNumber,
|
|
5731
|
-
zDocCustomSchemaFieldRelation,
|
|
5732
|
-
zDocCustomSchemaFieldSelectNumber,
|
|
5733
|
-
zDocCustomSchemaFieldSelectText,
|
|
5734
|
-
zDocCustomSchemaFieldText,
|
|
5735
|
-
zDocFile,
|
|
5736
|
-
zDocFileDirectory,
|
|
5737
|
-
zDocFileIndex,
|
|
5738
|
-
zDocFileIndexContent,
|
|
5739
|
-
zDocFileIndexMeta,
|
|
5740
|
-
zDocFileIndexMetaInput,
|
|
5741
|
-
zDocFileIndexSchema,
|
|
5742
|
-
zDocFileIndexSchemaField,
|
|
5743
|
-
zDocFileIndexSchemaInput,
|
|
5744
|
-
zDocFileMd,
|
|
5745
|
-
zDocFileMdContent,
|
|
5746
|
-
zDocFileMdContentInput,
|
|
5747
|
-
zDocFileMdInput,
|
|
5748
|
-
zDocFileMdMeta,
|
|
5749
|
-
zDocFileMdMetaInput,
|
|
5750
|
-
zDocFilePath,
|
|
5751
|
-
zDocFileUnknown,
|
|
5752
|
-
zDocMetaField,
|
|
5753
|
-
zDocMetaFieldBoolean,
|
|
5754
|
-
zDocMetaFieldMultiNumber,
|
|
5755
|
-
zDocMetaFieldMultiRelation,
|
|
5756
|
-
zDocMetaFieldMultiSelectNumber,
|
|
5757
|
-
zDocMetaFieldMultiSelectText,
|
|
5758
|
-
zDocMetaFieldMultiText,
|
|
5759
|
-
zDocMetaFieldNumber,
|
|
5760
|
-
zDocMetaFieldRelation,
|
|
5761
|
-
zDocMetaFieldSelectNumber,
|
|
5762
|
-
zDocMetaFieldSelectText,
|
|
5763
|
-
zDocMetaFieldText,
|
|
5764
|
-
zDocMetaFieldType,
|
|
5765
|
-
zDocMetaFieldTypeBoolean,
|
|
5766
|
-
zDocMetaFieldTypeMultiNumber,
|
|
5767
|
-
zDocMetaFieldTypeMultiRelation,
|
|
5768
|
-
zDocMetaFieldTypeMultiSelectNumber,
|
|
5769
|
-
zDocMetaFieldTypeMultiSelectText,
|
|
5770
|
-
zDocMetaFieldTypeMultiText,
|
|
5771
|
-
zDocMetaFieldTypeNumber,
|
|
5772
|
-
zDocMetaFieldTypeRelation,
|
|
5773
|
-
zDocMetaFieldTypeSelectNumber,
|
|
5774
|
-
zDocMetaFieldTypeSelectText,
|
|
5775
|
-
zDocMetaFieldTypeText,
|
|
5776
|
-
zDocRelation,
|
|
5777
|
-
zDocRelationField,
|
|
5778
|
-
zDocRelationFile,
|
|
5779
|
-
zDocSchemaFieldBoolean,
|
|
5780
|
-
zDocSchemaFieldMultiNumber,
|
|
5781
|
-
zDocSchemaFieldMultiRelation,
|
|
5782
|
-
zDocSchemaFieldMultiSelectNumber,
|
|
5783
|
-
zDocSchemaFieldMultiSelectText,
|
|
5784
|
-
zDocSchemaFieldMultiText,
|
|
5785
|
-
zDocSchemaFieldNumber,
|
|
5786
|
-
zDocSchemaFieldRelation,
|
|
5787
|
-
zDocSchemaFieldSelectNumber,
|
|
5788
|
-
zDocSchemaFieldSelectText,
|
|
5789
|
-
zDocSchemaFieldText,
|
|
5790
|
-
zDocTreeDirectoryNode,
|
|
5791
|
-
zDocTreeFileNode,
|
|
5792
|
-
zDocTreeNode
|
|
5793
|
-
};
|
|
5652
|
+
|
|
5653
|
+
export { DocClient, DocCustomSchemaFieldValue, DocDirectoryPathValue, DocDirectoryReference, DocFileIndexContentValue, DocFileIndexEntity, DocFileIndexMetaValue, DocFileIndexReference, DocFileIndexSchemaValue, DocFileMdContentValue, DocFileMdEntity, DocFileMdMetaValue, DocFileMdReference, DocFilePathValue, DocFileRelationReference, DocFileTreeSystem, DocFileUnknownEntity, DocFileUnknownReference, DocMarkdownSystem, DocPathSystem, DocPathSystemMock, DocRelationFieldValue, DocRelationFileValue, DocRelationValue, DocTreeDirectoryNodeValue, DocTreeFileNodeValue, assertType, defaultTestConfig, defineSchema, docCustomSchemaField, expectType };
|
package/build/models.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
1
3
|
// lib/models.ts
|
|
2
|
-
import { z } from "zod";
|
|
3
4
|
var zDocFilePath = z.object({
|
|
4
5
|
name: z.string(),
|
|
5
6
|
path: z.string(),
|
|
@@ -322,77 +323,5 @@ var zDocClientConfig = z.object({
|
|
|
322
323
|
indexMetaIncludes: z.array(z.string()),
|
|
323
324
|
directoryExcludes: z.array(z.string())
|
|
324
325
|
});
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
zDocCustomSchema,
|
|
328
|
-
zDocCustomSchemaField,
|
|
329
|
-
zDocCustomSchemaFieldBoolean,
|
|
330
|
-
zDocCustomSchemaFieldMultiNumber,
|
|
331
|
-
zDocCustomSchemaFieldMultiRelation,
|
|
332
|
-
zDocCustomSchemaFieldMultiSelectNumber,
|
|
333
|
-
zDocCustomSchemaFieldMultiSelectText,
|
|
334
|
-
zDocCustomSchemaFieldMultiText,
|
|
335
|
-
zDocCustomSchemaFieldNumber,
|
|
336
|
-
zDocCustomSchemaFieldRelation,
|
|
337
|
-
zDocCustomSchemaFieldSelectNumber,
|
|
338
|
-
zDocCustomSchemaFieldSelectText,
|
|
339
|
-
zDocCustomSchemaFieldText,
|
|
340
|
-
zDocFile,
|
|
341
|
-
zDocFileDirectory,
|
|
342
|
-
zDocFileIndex,
|
|
343
|
-
zDocFileIndexContent,
|
|
344
|
-
zDocFileIndexMeta,
|
|
345
|
-
zDocFileIndexMetaInput,
|
|
346
|
-
zDocFileIndexSchema,
|
|
347
|
-
zDocFileIndexSchemaField,
|
|
348
|
-
zDocFileIndexSchemaInput,
|
|
349
|
-
zDocFileMd,
|
|
350
|
-
zDocFileMdContent,
|
|
351
|
-
zDocFileMdContentInput,
|
|
352
|
-
zDocFileMdInput,
|
|
353
|
-
zDocFileMdMeta,
|
|
354
|
-
zDocFileMdMetaInput,
|
|
355
|
-
zDocFilePath,
|
|
356
|
-
zDocFileUnknown,
|
|
357
|
-
zDocMetaField,
|
|
358
|
-
zDocMetaFieldBoolean,
|
|
359
|
-
zDocMetaFieldMultiNumber,
|
|
360
|
-
zDocMetaFieldMultiRelation,
|
|
361
|
-
zDocMetaFieldMultiSelectNumber,
|
|
362
|
-
zDocMetaFieldMultiSelectText,
|
|
363
|
-
zDocMetaFieldMultiText,
|
|
364
|
-
zDocMetaFieldNumber,
|
|
365
|
-
zDocMetaFieldRelation,
|
|
366
|
-
zDocMetaFieldSelectNumber,
|
|
367
|
-
zDocMetaFieldSelectText,
|
|
368
|
-
zDocMetaFieldText,
|
|
369
|
-
zDocMetaFieldType,
|
|
370
|
-
zDocMetaFieldTypeBoolean,
|
|
371
|
-
zDocMetaFieldTypeMultiNumber,
|
|
372
|
-
zDocMetaFieldTypeMultiRelation,
|
|
373
|
-
zDocMetaFieldTypeMultiSelectNumber,
|
|
374
|
-
zDocMetaFieldTypeMultiSelectText,
|
|
375
|
-
zDocMetaFieldTypeMultiText,
|
|
376
|
-
zDocMetaFieldTypeNumber,
|
|
377
|
-
zDocMetaFieldTypeRelation,
|
|
378
|
-
zDocMetaFieldTypeSelectNumber,
|
|
379
|
-
zDocMetaFieldTypeSelectText,
|
|
380
|
-
zDocMetaFieldTypeText,
|
|
381
|
-
zDocRelation,
|
|
382
|
-
zDocRelationField,
|
|
383
|
-
zDocRelationFile,
|
|
384
|
-
zDocSchemaFieldBoolean,
|
|
385
|
-
zDocSchemaFieldMultiNumber,
|
|
386
|
-
zDocSchemaFieldMultiRelation,
|
|
387
|
-
zDocSchemaFieldMultiSelectNumber,
|
|
388
|
-
zDocSchemaFieldMultiSelectText,
|
|
389
|
-
zDocSchemaFieldMultiText,
|
|
390
|
-
zDocSchemaFieldNumber,
|
|
391
|
-
zDocSchemaFieldRelation,
|
|
392
|
-
zDocSchemaFieldSelectNumber,
|
|
393
|
-
zDocSchemaFieldSelectText,
|
|
394
|
-
zDocSchemaFieldText,
|
|
395
|
-
zDocTreeDirectoryNode,
|
|
396
|
-
zDocTreeFileNode,
|
|
397
|
-
zDocTreeNode
|
|
398
|
-
};
|
|
326
|
+
|
|
327
|
+
export { zDocClientConfig, zDocCustomSchema, zDocCustomSchemaField, zDocCustomSchemaFieldBoolean, zDocCustomSchemaFieldMultiNumber, zDocCustomSchemaFieldMultiRelation, zDocCustomSchemaFieldMultiSelectNumber, zDocCustomSchemaFieldMultiSelectText, zDocCustomSchemaFieldMultiText, zDocCustomSchemaFieldNumber, zDocCustomSchemaFieldRelation, zDocCustomSchemaFieldSelectNumber, zDocCustomSchemaFieldSelectText, zDocCustomSchemaFieldText, zDocFile, zDocFileDirectory, zDocFileIndex, zDocFileIndexContent, zDocFileIndexMeta, zDocFileIndexMetaInput, zDocFileIndexSchema, zDocFileIndexSchemaField, zDocFileIndexSchemaInput, zDocFileMd, zDocFileMdContent, zDocFileMdContentInput, zDocFileMdInput, zDocFileMdMeta, zDocFileMdMetaInput, zDocFilePath, zDocFileUnknown, zDocMetaField, zDocMetaFieldBoolean, zDocMetaFieldMultiNumber, zDocMetaFieldMultiRelation, zDocMetaFieldMultiSelectNumber, zDocMetaFieldMultiSelectText, zDocMetaFieldMultiText, zDocMetaFieldNumber, zDocMetaFieldRelation, zDocMetaFieldSelectNumber, zDocMetaFieldSelectText, zDocMetaFieldText, zDocMetaFieldType, zDocMetaFieldTypeBoolean, zDocMetaFieldTypeMultiNumber, zDocMetaFieldTypeMultiRelation, zDocMetaFieldTypeMultiSelectNumber, zDocMetaFieldTypeMultiSelectText, zDocMetaFieldTypeMultiText, zDocMetaFieldTypeNumber, zDocMetaFieldTypeRelation, zDocMetaFieldTypeSelectNumber, zDocMetaFieldTypeSelectText, zDocMetaFieldTypeText, zDocRelation, zDocRelationField, zDocRelationFile, zDocSchemaFieldBoolean, zDocSchemaFieldMultiNumber, zDocSchemaFieldMultiRelation, zDocSchemaFieldMultiSelectNumber, zDocSchemaFieldMultiSelectText, zDocSchemaFieldMultiText, zDocSchemaFieldNumber, zDocSchemaFieldRelation, zDocSchemaFieldSelectNumber, zDocSchemaFieldSelectText, zDocSchemaFieldText, zDocTreeDirectoryNode, zDocTreeFileNode, zDocTreeNode };
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interactive-inc/docs-client",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"check": "tsgo --noEmit",
|
|
7
7
|
"build": "tsup",
|
|
8
|
-
"deploy": "bun
|
|
8
|
+
"deploy": "bun publish"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@octokit/rest": "^22.0.0",
|
|
12
|
-
"yaml": "^2.
|
|
12
|
+
"yaml": "^2.8.1"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"zod": "^4.0.0"
|
|
@@ -24,8 +24,9 @@
|
|
|
24
24
|
".": "./build/index.js",
|
|
25
25
|
"./models": "./build/models.js",
|
|
26
26
|
"./file-system": "./build/file-system.js",
|
|
27
|
-
"./file-system-mock": "./build/file-system-mock.js",
|
|
28
27
|
"./file-system-json": "./build/file-system-json.js",
|
|
28
|
+
"./file-system-mock": "./build/file-system-mock.js",
|
|
29
|
+
"./file-system-node": "./build/file-system-node.js",
|
|
29
30
|
"./file-system-octokit": "./build/file-system-octokit.js"
|
|
30
31
|
}
|
|
31
32
|
}
|