@moxn/kb-migrate 0.4.40 → 0.4.41

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/dist/client.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * API client for Moxn KB
3
3
  */
4
- /// <reference types="node" resolution-mode="require"/>
5
4
  import type { ExtractedDocument, MigrationOptions, MigrationResult, DocumentListItem, DocumentDetail, ExportOptions } from './types.js';
6
5
  import type { DateFilter } from './date-filter.js';
7
6
  /**
@@ -7,9 +7,14 @@ import * as fs from 'fs/promises';
7
7
  import * as fsSync from 'fs';
8
8
  import * as path from 'path';
9
9
  import { glob } from 'glob';
10
- // unified@9 is CJS with a default-function export — a named import fails both
11
- // tsc (TS2595 under esModuleInterop) and runtime ESM loading under tsx.
12
- import unified from 'unified';
10
+ // NAMED import, matching this package's OWN dependency (unified@^11, pure ESM,
11
+ // named export only — no default). The published artifact resolves ^11; a
12
+ // default import bricks the npx-installed CLI at load time (proven: 0.4.40).
13
+ // In-repo gotcha: this package is STANDALONE-installed (own package-lock.json)
14
+ // — run `npm install` INSIDE packages/kb-migrate before building, or tsc/tsx
15
+ // resolve the monorepo ROOT's hoisted CJS unified@9 and this import appears
16
+ // broken (TS2595). That mirage is what shipped the 0.4.40 regression.
17
+ import { unified } from 'unified';
13
18
  import remarkParse from 'remark-parse';
14
19
  import { MigrationSource } from './base.js';
15
20
  /**
@@ -323,7 +323,7 @@ function convertImage(block) {
323
323
  blockType: 'image',
324
324
  type: 'url',
325
325
  url: img.image.external.url,
326
- mediaType: 'image/png',
326
+ mediaType: 'image/png', // Generic — Moxn will detect actual type
327
327
  alt: caption || undefined,
328
328
  },
329
329
  ];
@@ -13,7 +13,7 @@ import { blocksToSections, getPageTitle, normalizeId, } from './notion-blocks.js
13
13
  import { NotionMediaDownloader } from './notion-media.js';
14
14
  import { parseDatabaseSchema, parseEntryValues, renderPropertiesSection, } from './notion-databases.js';
15
15
  import { resolveNotionReferences } from './notion-references.js';
16
- const MAX_DOCUMENT_COUNT = 10000;
16
+ const MAX_DOCUMENT_COUNT = 10_000;
17
17
  // ============================================
18
18
  // Source
19
19
  // ============================================
@@ -6,7 +6,6 @@
6
6
  * are simple enough that a hand-rolled client is cheaper than the SDK and
7
7
  * gives us precise control over 429 handling.
8
8
  */
9
- /// <reference types="node" resolution-mode="require"/>
10
9
  import type { OneNoteNotebook, OneNotePage, OneNoteSection, OneNoteSectionGroup } from './types.js';
11
10
  export interface OneNoteApiClientOptions {
12
11
  /** Alternate base URL — for testing only. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moxn/kb-migrate",
3
- "version": "0.4.40",
3
+ "version": "0.4.41",
4
4
  "description": "Migration tool for importing documents into Moxn Knowledge Base from local files, Notion, Google Docs, and more",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -155,4 +155,4 @@
155
155
  "publishConfig": {
156
156
  "access": "public"
157
157
  }
158
- }
158
+ }