@msout/microsoft-onenote-exporter 0.1.2 → 0.1.3
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/CHANGELOG.md +45 -0
- package/entrypoint.sh +30 -9
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.1.3] - 2026-10-02
|
|
10
|
+
|
|
11
|
+
A **patch**, and the first release driven by the automation added in the previous
|
|
12
|
+
one rather than by remembering to check.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- **`@msout/microsoft-onenote-list-notebooks` 0.0.6 → 0.0.7.** Pin bumped and the
|
|
17
|
+
lockfile regenerated, so it now resolves that version from the registry rather
|
|
18
|
+
than the previous tarball.
|
|
19
|
+
|
|
20
|
+
The contract this adapter depends on is unchanged — `listNotebooks(options)`
|
|
21
|
+
still returns `Array<{name, url, id}>`, and the module still exports
|
|
22
|
+
`listNotebooks` and `dismissMcasInterstitial` — so no code here changed.
|
|
23
|
+
|
|
24
|
+
What 0.0.7 brings, from its own release: real notebook URLs are resolved instead
|
|
25
|
+
of the MRU placeholder, and links are read from the MRU feed in canonical form.
|
|
26
|
+
That matters here because `list` prints `nb.url`, so the URLs this tool reports
|
|
27
|
+
are now the ones that can actually be opened.
|
|
28
|
+
|
|
29
|
+
0.0.6 was still pinned when this was written, which is what the `stale-steps`
|
|
30
|
+
CI job reported on its first run and what Dependabot has a grouped PR open for.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- **`entrypoint.sh` offered `--output-dir` to every subcommand.** `list`, `check`
|
|
35
|
+
and `logout` do not define that option, so all three died with
|
|
36
|
+
`error: unknown option '--output-dir'` and exit 1 — the container refused to list
|
|
37
|
+
anything, while the flag commander rejected had been added by the entrypoint
|
|
38
|
+
itself. `export` kept working, and it was the only subcommand anyone had run
|
|
39
|
+
through a container. Now gated on the subcommand actually being `export`.
|
|
40
|
+
|
|
41
|
+
Two tests, both of which fail against the previous entrypoint: one asserts the
|
|
42
|
+
injection sits *inside* the export gate by comparing source positions, because
|
|
43
|
+
the earlier assertion checked only that the injection existed and not which
|
|
44
|
+
subcommands it applied to — which is exactly why it passed against the broken
|
|
45
|
+
version. The other pins the subcommand match by name.
|
|
46
|
+
|
|
47
|
+
- Related: **issue #3** — `start-container.sh` still refuses `list`, `check` and
|
|
48
|
+
`logout` when given no flags, from a `$# -eq 0` guard written for `export` and
|
|
49
|
+
applied to all five subcommands. Tracked, not yet fixed; both it and the
|
|
50
|
+
entrypoint bug have to be resolved before `list` works through the wrapper.
|
|
51
|
+
|
|
52
|
+
Tests: 130 → 132.
|
|
53
|
+
|
|
9
54
|
## [0.1.2] - 2026-10-02
|
|
10
55
|
|
|
11
56
|
A **patch**. It changes what is published, not what the package does.
|
package/entrypoint.sh
CHANGED
|
@@ -72,19 +72,40 @@ if [ ! -d /data/output ]; then
|
|
|
72
72
|
echo " when it exits. Mount one, for example:" >&2
|
|
73
73
|
echo " -v \"\$PWD/output:/data/output\"" >&2
|
|
74
74
|
else
|
|
75
|
-
#
|
|
76
|
-
#
|
|
77
|
-
#
|
|
78
|
-
#
|
|
79
|
-
|
|
75
|
+
# Only `export` writes notes, so only `export` is offered --output-dir.
|
|
76
|
+
#
|
|
77
|
+
# Appending it for every subcommand broke the other three: `list`, `check` and
|
|
78
|
+
# `logout` do not define that option, so commander answered
|
|
79
|
+
#
|
|
80
|
+
# error: unknown option '--output-dir'
|
|
81
|
+
#
|
|
82
|
+
# and exited 1 - the container refused to list anything, while the flag it
|
|
83
|
+
# complained about had been added here, not by the caller. `export` kept
|
|
84
|
+
# working, which is why it went unnoticed: it was the only subcommand anyone
|
|
85
|
+
# had run through a container.
|
|
86
|
+
is_export=false
|
|
80
87
|
for arg in "$@"; do
|
|
81
|
-
if [ "$arg" = "
|
|
82
|
-
|
|
88
|
+
if [ "$arg" = "export" ]; then
|
|
89
|
+
is_export=true
|
|
83
90
|
break
|
|
84
91
|
fi
|
|
85
92
|
done
|
|
86
|
-
|
|
87
|
-
|
|
93
|
+
|
|
94
|
+
if [ "$is_export" = true ]; then
|
|
95
|
+
# Appending --output-dir rather than exporting a variable, because the CLI
|
|
96
|
+
# has no environment variable for it and its default resolves against a
|
|
97
|
+
# cwd of /app. Only when the caller did not pass one, for the same reason
|
|
98
|
+
# as --auth-file below: an explicit choice must never be overridden.
|
|
99
|
+
has_output_dir=false
|
|
100
|
+
for arg in "$@"; do
|
|
101
|
+
if [ "$arg" = "--output-dir" ]; then
|
|
102
|
+
has_output_dir=true
|
|
103
|
+
break
|
|
104
|
+
fi
|
|
105
|
+
done
|
|
106
|
+
if [ "$has_output_dir" = false ]; then
|
|
107
|
+
set -- "$@" --output-dir /data/output
|
|
108
|
+
fi
|
|
88
109
|
fi
|
|
89
110
|
fi
|
|
90
111
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@msout/microsoft-onenote-exporter",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Log in, list and export Microsoft OneNote notebooks as Obsidian Markdown - one CLI over @msout/microsoft-webauth, @msout/microsoft-onenote-list-notebooks and @msout/microsoft-onenote-export-notebook.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"homepage": "https://github.com/Ms-OneNote-Exporter/microsoft-onenote-exporter#readme",
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@msout/microsoft-onenote-export-notebook": "0.3.7",
|
|
56
|
-
"@msout/microsoft-onenote-list-notebooks": "0.0.
|
|
56
|
+
"@msout/microsoft-onenote-list-notebooks": "0.0.7",
|
|
57
57
|
"@msout/microsoft-webauth": "0.1.8",
|
|
58
58
|
"chalk": "^4.1.2",
|
|
59
59
|
"commander": "^14.0.3",
|