@bitefoundry/onenote 0.1.3 → 0.2.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/package.json CHANGED
@@ -1,49 +1,50 @@
1
- {
2
- "name": "@bitefoundry/onenote",
3
- "version": "0.1.3",
4
- "description": "Microsoft OneNote terminal client & AI agent toolkit — Notebooks, Sections, Pages, XHTML/Markdown & Resources (CLI, TUI, HTTP API, MCP)",
5
- "repository": {
6
- "type": "git",
7
- "url": "git+https://github.com/BiteFoundry/onenote.git"
8
- },
9
- "license": "MIT",
10
- "bin": {
11
- "onenote": "bin/onenote.js",
12
- "note": "bin/note.js"
13
- },
14
- "files": [
15
- "bin/onenote.js",
16
- "bin/note.js",
17
- "scripts/postinstall.mjs",
18
- "docs/NPM.md",
19
- "README.md"
20
- ],
21
- "engines": {
22
- "node": ">=18"
23
- },
24
- "keywords": [
25
- "microsoft-onenote",
26
- "onenote",
27
- "note",
28
- "microsoft-365",
29
- "microsoft-graph",
30
- "notebooks",
31
- "markdown",
32
- "cli",
33
- "tui",
34
- "mcp"
35
- ],
36
- "scripts": {
37
- "postinstall": "node scripts/postinstall.mjs",
38
- "sync-version": "node scripts/sync-version.mjs",
39
- "build:npm": "node scripts/build-npm.mjs"
40
- },
41
- "optionalDependencies": {
42
- "@bitefoundry/onenote-win32-x64": "0.1.3",
43
- "@bitefoundry/onenote-win32-arm64": "0.1.3",
44
- "@bitefoundry/onenote-darwin-x64": "0.1.3",
45
- "@bitefoundry/onenote-darwin-arm64": "0.1.3",
46
- "@bitefoundry/onenote-linux-x64": "0.1.3",
47
- "@bitefoundry/onenote-linux-arm64": "0.1.3"
48
- }
49
- }
1
+ {
2
+ "name": "@bitefoundry/onenote",
3
+ "version": "0.2.0",
4
+ "description": "Microsoft OneNote terminal client & AI agent toolkit — Notebooks, Sections, Pages, XHTML/Markdown & Resources (CLI, TUI, HTTP API, MCP)",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/BiteFoundry/onenote.git"
8
+ },
9
+ "license": "MIT",
10
+ "bin": {
11
+ "onenote": "bin/onenote.js"
12
+ },
13
+ "files": [
14
+ "bin/onenote.js",
15
+ "scripts/postinstall.mjs",
16
+ "docs/NPM.md",
17
+ "docs/API.md",
18
+ "docs/MCP.md",
19
+ "docs/openapi.yaml",
20
+ "README.md"
21
+ ],
22
+ "engines": {
23
+ "node": ">=18"
24
+ },
25
+ "keywords": [
26
+ "microsoft-onenote",
27
+ "onenote",
28
+ "note",
29
+ "microsoft-365",
30
+ "microsoft-graph",
31
+ "notebooks",
32
+ "markdown",
33
+ "cli",
34
+ "tui",
35
+ "mcp"
36
+ ],
37
+ "scripts": {
38
+ "postinstall": "node scripts/postinstall.mjs",
39
+ "sync-version": "node scripts/sync-version.mjs",
40
+ "build:npm": "node scripts/build-npm.mjs"
41
+ },
42
+ "optionalDependencies": {
43
+ "@bitefoundry/onenote-win32-x64": "0.2.0",
44
+ "@bitefoundry/onenote-win32-arm64": "0.2.0",
45
+ "@bitefoundry/onenote-darwin-x64": "0.2.0",
46
+ "@bitefoundry/onenote-darwin-arm64": "0.2.0",
47
+ "@bitefoundry/onenote-linux-x64": "0.2.0",
48
+ "@bitefoundry/onenote-linux-arm64": "0.2.0"
49
+ }
50
+ }
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  // Zero-Node-Process npm native binary linker.
3
3
  //
4
- // On Unix (linux/darwin): replaces installed `bin/onenote.js` and `bin/note.js` with
4
+ // On Unix (linux/darwin): replaces installed `bin/onenote.js` with
5
5
  // hardlinks/symlinks directly to `@bitefoundry/onenote-<platform>-<arch>/bin/onenote` so npm's
6
6
  // bin symlink execve's the native Rust binary directly (0ms Node startup, 0MB Node RSS).
7
7
  //
8
- // On Windows (win32): creates NTFS hardlinks (fallback copy) `bin/onenote.exe` & `bin/note.exe`
9
- // and rewrites npm's `.bin/{onenote,note}[.cmd|.ps1]` shims when present to invoke
8
+ // On Windows (win32): creates a native `bin/onenote.exe` hardlink (fallback copy)
9
+ // and rewrites npm's `onenote[.cmd|.ps1]` shims when present to invoke
10
10
  // the native executable directly without spawning `node.exe`.
11
11
 
12
12
  import fs from 'node:fs';
@@ -14,7 +14,7 @@ import path from 'node:path';
14
14
  import { createRequire } from 'node:module';
15
15
  import { fileURLToPath } from 'node:url';
16
16
 
17
- const BIN_NAMES = ['onenote', 'note'];
17
+ const BIN_NAMES = ['onenote'];
18
18
  const PKG_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
19
19
 
20
20
  function linkOrCopyFile(source, destination) {
@@ -95,10 +95,7 @@ function collectWindowsShimDirs(pkgRoot, env = process.env) {
95
95
 
96
96
  function shimReferencesLauncher(content, name) {
97
97
  const normalized = content.replace(/\\/g, '/').toLowerCase();
98
- return (
99
- normalized.includes('@bitefoundry/onenote') &&
100
- normalized.includes(`bin/${name}.js`)
101
- );
98
+ return normalized.includes(`/@bitefoundry/onenote/bin/${name}.js"`);
102
99
  }
103
100
 
104
101
  function rewriteWindowsShims(shimDir, pkgRoot) {
@@ -135,11 +132,10 @@ function rewriteWindowsShims(shimDir, pkgRoot) {
135
132
  const ps1Body = [
136
133
  '#!/usr/bin/env pwsh',
137
134
  '$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent',
138
- `$exePath = Join-Path $basedir '${relWin.replace(/'/g, "''")}'`,
139
135
  'if ($MyInvocation.ExpectingInput) {',
140
- ' $input | & $exePath @args',
136
+ ` $input | & "$basedir/${relPosix}" $args`,
141
137
  '} else {',
142
- ' & $exePath @args',
138
+ ` & "$basedir/${relPosix}" $args`,
143
139
  '}',
144
140
  'exit $LASTEXITCODE',
145
141
  '',
package/bin/note.js DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- 'use strict';
3
-
4
- require('./onenote.js');