@interactive-inc/docs-client 1.0.16 → 1.0.17

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.
Files changed (2) hide show
  1. package/build/index.js +15 -5
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -1858,7 +1858,9 @@ var DocFileRelationReference = class {
1858
1858
  if (file instanceof Error) {
1859
1859
  return file;
1860
1860
  }
1861
- if (file === null) continue;
1861
+ if (file === null) {
1862
+ continue;
1863
+ }
1862
1864
  files.push(file);
1863
1865
  }
1864
1866
  return files;
@@ -1870,6 +1872,9 @@ var DocFileRelationReference = class {
1870
1872
  if (filePath.includes("index.md")) {
1871
1873
  return null;
1872
1874
  }
1875
+ if (!filePath.endsWith(".md")) {
1876
+ return null;
1877
+ }
1873
1878
  const content = await this.fileSystem.readFile(filePath);
1874
1879
  if (content instanceof Error) {
1875
1880
  return content;
@@ -3398,7 +3403,7 @@ var DocFileIndexReference = class _DocFileIndexReference {
3398
3403
  return [];
3399
3404
  }
3400
3405
  const refs = [];
3401
- const fieldKeys = Object.keys(schema);
3406
+ const fieldKeys = Object.keys(schema.value);
3402
3407
  for (const key of fieldKeys) {
3403
3408
  const fieldValue = schema.value[key];
3404
3409
  if (fieldValue === void 0) continue;
@@ -3406,8 +3411,9 @@ var DocFileIndexReference = class _DocFileIndexReference {
3406
3411
  continue;
3407
3412
  }
3408
3413
  const field = schema.field(key);
3414
+ const path = field.path;
3409
3415
  const fileRef = new DocFileRelationReference({
3410
- filePath: field.path,
3416
+ filePath: path,
3411
3417
  fileSystem: this.fileSystem,
3412
3418
  pathSystem: this.pathSystem
3413
3419
  });
@@ -3423,8 +3429,12 @@ var DocFileIndexReference = class _DocFileIndexReference {
3423
3429
  const files = [];
3424
3430
  for (const relation of relations) {
3425
3431
  const entity = await relation.read();
3426
- if (entity === null) continue;
3427
- if (entity instanceof Error) continue;
3432
+ if (entity === null) {
3433
+ continue;
3434
+ }
3435
+ if (entity instanceof Error) {
3436
+ continue;
3437
+ }
3428
3438
  files.push(entity);
3429
3439
  }
3430
3440
  return files;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interactive-inc/docs-client",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "check": "tsgo --noEmit",