apple-notes-mcp 2.8.16 → 2.8.18
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/index.js +34 -17
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -39975,10 +39975,8 @@ import { homedir as homedir4 } from "os";
|
|
|
39975
39975
|
import { join as join4 } from "path";
|
|
39976
39976
|
var FIELD_SEP = "";
|
|
39977
39977
|
var RECORD_SEP = "";
|
|
39978
|
-
var AS_FIELD_SEP = "(
|
|
39979
|
-
var AS_RECORD_SEP = "(
|
|
39980
|
-
var AS_FIELD_SEP_LOCAL = "(character id 31)";
|
|
39981
|
-
var AS_RECORD_SEP_LOCAL = "(character id 30)";
|
|
39978
|
+
var AS_FIELD_SEP = "(character id 31)";
|
|
39979
|
+
var AS_RECORD_SEP = "(character id 30)";
|
|
39982
39980
|
var DEFAULT_EXPORT_PAGE_SIZE = 50;
|
|
39983
39981
|
var DEFAULT_EXPORT_MAX_RESPONSE_BYTES = 8 * 1024 * 1024;
|
|
39984
39982
|
function exportMaxResponseBytes(env = process.env) {
|
|
@@ -40817,11 +40815,11 @@ var AppleNotesManager = class {
|
|
|
40817
40815
|
end try
|
|
40818
40816
|
${countGuard("noteIds")}
|
|
40819
40817
|
repeat with i from 1 to count of noteNames
|
|
40820
|
-
set end of resultList to (item i of noteNames) & ${
|
|
40818
|
+
set end of resultList to (item i of noteNames) & ${AS_FIELD_SEP} & (item i of noteIds)
|
|
40821
40819
|
end repeat
|
|
40822
40820
|
end if
|
|
40823
|
-
set AppleScript's text item delimiters to ${
|
|
40824
|
-
return (totalCount as text) & ${
|
|
40821
|
+
set AppleScript's text item delimiters to ${AS_RECORD_SEP}
|
|
40822
|
+
return (totalCount as text) & ${AS_RECORD_SEP} & (resultList as text)
|
|
40825
40823
|
`;
|
|
40826
40824
|
}
|
|
40827
40825
|
const dateFetch = dateSetup ? `set noteDates to modification date of ${fullSource}
|
|
@@ -40838,9 +40836,9 @@ var AppleNotesManager = class {
|
|
|
40838
40836
|
${dateFetch}${countGuard("noteIds")}
|
|
40839
40837
|
${dateCountGuard}set resultList to {}
|
|
40840
40838
|
repeat with i from 1 to count of noteNames
|
|
40841
|
-
${dateGuardOpen}set end of resultList to (item i of noteNames) & ${
|
|
40839
|
+
${dateGuardOpen}set end of resultList to (item i of noteNames) & ${AS_FIELD_SEP} & (item i of noteIds)${dateGuardClose}
|
|
40842
40840
|
end repeat
|
|
40843
|
-
set AppleScript's text item delimiters to ${
|
|
40841
|
+
set AppleScript's text item delimiters to ${AS_RECORD_SEP}
|
|
40844
40842
|
return resultList as text
|
|
40845
40843
|
`;
|
|
40846
40844
|
}
|
|
@@ -40975,11 +40973,11 @@ var AppleNotesManager = class {
|
|
|
40975
40973
|
if (item i of noteShared) is true then
|
|
40976
40974
|
set cd to item i of noteCreated
|
|
40977
40975
|
set md to item i of noteModified
|
|
40978
|
-
set end of resultList to (item i of noteNames) & ${
|
|
40976
|
+
set end of resultList to (item i of noteNames) & ${AS_FIELD_SEP} & (item i of noteIds) & ${AS_FIELD_SEP} & ${asDatePartsExpr("cd")} & ${AS_FIELD_SEP} & ${asDatePartsExpr("md")} & ${AS_FIELD_SEP} & "true" & ${AS_FIELD_SEP} & ((item i of noteLocked) as text)
|
|
40979
40977
|
end if
|
|
40980
40978
|
end repeat
|
|
40981
40979
|
end if
|
|
40982
|
-
set AppleScript's text item delimiters to ${
|
|
40980
|
+
set AppleScript's text item delimiters to ${AS_RECORD_SEP}
|
|
40983
40981
|
return resultList as text
|
|
40984
40982
|
`
|
|
40985
40983
|
);
|
|
@@ -43658,6 +43656,30 @@ function withJsonSchema2020_12(transport2) {
|
|
|
43658
43656
|
return transport2;
|
|
43659
43657
|
}
|
|
43660
43658
|
|
|
43659
|
+
// src/utils/shutdown.ts
|
|
43660
|
+
var SHUTDOWN_DRAIN_TIMEOUT_MS = 2e3;
|
|
43661
|
+
function createShutdown(stream, exit, timeoutMs = SHUTDOWN_DRAIN_TIMEOUT_MS) {
|
|
43662
|
+
let shuttingDown = false;
|
|
43663
|
+
let exited = false;
|
|
43664
|
+
const exitOnce = () => {
|
|
43665
|
+
if (exited) return;
|
|
43666
|
+
exited = true;
|
|
43667
|
+
clearTimeout(timer);
|
|
43668
|
+
exit();
|
|
43669
|
+
};
|
|
43670
|
+
let timer;
|
|
43671
|
+
const exitWhenDrained = () => {
|
|
43672
|
+
if (stream.writableLength === 0) exitOnce();
|
|
43673
|
+
else stream.once("drain", exitWhenDrained);
|
|
43674
|
+
};
|
|
43675
|
+
return () => {
|
|
43676
|
+
if (shuttingDown) return;
|
|
43677
|
+
shuttingDown = true;
|
|
43678
|
+
timer = setTimeout(exitOnce, timeoutMs);
|
|
43679
|
+
setImmediate(exitWhenDrained);
|
|
43680
|
+
};
|
|
43681
|
+
}
|
|
43682
|
+
|
|
43661
43683
|
// src/utils/noteTables.ts
|
|
43662
43684
|
import { gunzipSync as gunzipSync3 } from "node:zlib";
|
|
43663
43685
|
var sub = (f, n) => {
|
|
@@ -46246,12 +46268,7 @@ process.on("uncaughtException", (err) => {
|
|
|
46246
46268
|
process.on("unhandledRejection", (reason) => {
|
|
46247
46269
|
console.error("[unhandledRejection]", reason);
|
|
46248
46270
|
});
|
|
46249
|
-
var
|
|
46250
|
-
var shutdown = () => {
|
|
46251
|
-
if (_shuttingDown) return;
|
|
46252
|
-
_shuttingDown = true;
|
|
46253
|
-
process.exit(0);
|
|
46254
|
-
};
|
|
46271
|
+
var shutdown = createShutdown(process.stdout, () => process.exit(0));
|
|
46255
46272
|
for (const sig of ["SIGINT", "SIGTERM"]) {
|
|
46256
46273
|
process.on(sig, shutdown);
|
|
46257
46274
|
}
|
package/package.json
CHANGED