calendit 1.0.3 → 2026.4.26
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/README.md +81 -62
- package/dist/commands/accounts.d.ts +4 -0
- package/dist/commands/accounts.js +26 -0
- package/dist/commands/add.js +8 -0
- package/dist/commands/apply.js +5 -1
- package/dist/commands/auth.js +11 -2
- package/dist/commands/config.js +50 -16
- package/dist/commands/macos.d.ts +3 -0
- package/dist/commands/macos.js +401 -0
- package/dist/commands/onboard.d.ts +2 -0
- package/dist/commands/onboard.js +79 -0
- package/dist/commands/query.js +2 -2
- package/dist/commands/shared.d.ts +3 -2
- package/dist/commands/shared.js +21 -5
- package/dist/core/accountStatus.d.ts +18 -0
- package/dist/core/accountStatus.js +74 -0
- package/dist/core/auth.js +7 -11
- package/dist/core/authStatus.d.ts +20 -0
- package/dist/core/authStatus.js +82 -0
- package/dist/core/config.d.ts +11 -1
- package/dist/core/config.js +73 -6
- package/dist/core/datetime.js +3 -2
- package/dist/core/errors.d.ts +3 -0
- package/dist/core/errors.js +5 -0
- package/dist/core/eventkitBridgeFetch.d.ts +26 -0
- package/dist/core/eventkitBridgeFetch.js +159 -0
- package/dist/core/eventkitEnvFromConfig.d.ts +7 -0
- package/dist/core/eventkitEnvFromConfig.js +24 -0
- package/dist/core/eventkitHelper.d.ts +50 -0
- package/dist/core/eventkitHelper.js +336 -0
- package/dist/core/formatter.d.ts +41 -0
- package/dist/core/formatter.js +79 -0
- package/dist/core/i18n.d.ts +7 -0
- package/dist/core/i18n.js +52 -0
- package/dist/core/localeBootstrap.d.ts +12 -0
- package/dist/core/localeBootstrap.js +74 -0
- package/dist/core/logger.d.ts +2 -0
- package/dist/core/logger.js +5 -0
- package/dist/core/macosBridgeApp.d.ts +12 -0
- package/dist/core/macosBridgeApp.js +83 -0
- package/dist/core/macosTerminalRelay.d.ts +12 -0
- package/dist/core/macosTerminalRelay.js +62 -0
- package/dist/generated/locale-keys.d.ts +3 -0
- package/dist/generated/locale-keys.js +90 -0
- package/dist/index.js +99 -17
- package/dist/locales/en.json +128 -0
- package/dist/locales/ja.json +128 -0
- package/dist/services/macos.d.ts +14 -0
- package/dist/services/macos.js +115 -0
- package/dist/test_runner.js +11 -2
- package/dist/types/index.d.ts +12 -1
- package/package.json +16 -5
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
{
|
|
2
|
+
"errors": {
|
|
3
|
+
"validation": { "prefix": "入力エラー:" },
|
|
4
|
+
"config": {
|
|
5
|
+
"prefix": "設定エラー:",
|
|
6
|
+
"fileNotFound": "設定ファイルが見つかりません。",
|
|
7
|
+
"fileNotFoundHint": "初回は `calendit config set-google --id <id> --secret <secret>` などでセットアップしてください。",
|
|
8
|
+
"invalidFormat": "設定ファイルの形式が不正です。",
|
|
9
|
+
"invalidFormatDetails": "config.json を確認してください。詳細: {details}",
|
|
10
|
+
"readFailed": "設定ファイルの読み込みに失敗しました。",
|
|
11
|
+
"readFailedHint": "config.json のJSON形式を確認してください。"
|
|
12
|
+
},
|
|
13
|
+
"auth": {
|
|
14
|
+
"prefix": "認証エラー:",
|
|
15
|
+
"googleLoginHint": "docs/setup_google.md を参照するか、`calendit config set-google --file <path>` を実行してください。"
|
|
16
|
+
},
|
|
17
|
+
"api": { "prefix": "API エラー" },
|
|
18
|
+
"apiWithStatus": "API エラー ({status}):",
|
|
19
|
+
"unknown": "予期しないエラー:",
|
|
20
|
+
"datetime": {
|
|
21
|
+
"invalidFormat": "日時フォーマットが不正です: \"{input}\"",
|
|
22
|
+
"invalidParse": "日時として解釈できません: \"{input}\"",
|
|
23
|
+
"invalidParseHint": "入力値を見直してください。時間は HH:mm 形式で指定してください。"
|
|
24
|
+
},
|
|
25
|
+
"service": {
|
|
26
|
+
"googleCredsNotSet": "Google の認証情報が未設定です。",
|
|
27
|
+
"googleCredsNotSetHint": "`calendit config set-google --id <id> --secret <secret>` を実行してください。",
|
|
28
|
+
"outlookCredsNotSet": "Outlook の認証情報が未設定です。",
|
|
29
|
+
"outlookCredsNotSetHint": "`calendit config set-outlook --id <id>` を先に実行してください。"
|
|
30
|
+
},
|
|
31
|
+
"context": {
|
|
32
|
+
"missing": "コンテキスト '{name}' が見つかりません。",
|
|
33
|
+
"missingHint": "`calendit config check` で一覧を確認し、必要なら `calendit config set-context {name} --service google --calendar primary` を実行してください。",
|
|
34
|
+
"loadFailed": "設定の読み込みに失敗しました。`calendit --help` でセットアップ手順を確認してください。",
|
|
35
|
+
"loadFailedHint": "`calendit config set-google` などで設定を作成してください。"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"common": {
|
|
39
|
+
"hint": "ヒント:"
|
|
40
|
+
},
|
|
41
|
+
"config": {
|
|
42
|
+
"cmd": {
|
|
43
|
+
"googleSaved": "Google の認証情報を config に保存しました。",
|
|
44
|
+
"outlookSaved": "Outlook の認証情報を config に保存しました。",
|
|
45
|
+
"contextSaved": "コンテキスト '{name}' を保存しました。",
|
|
46
|
+
"contextDeleted": "コンテキスト '{name}' を削除しました。",
|
|
47
|
+
"localeSet": "UI 言語を '{locale}' に設定しました。",
|
|
48
|
+
"macosTransportSet": "EventKit の既定トランスポートを '{value}' に保存しました(シェルで CALENDIT_EVENTKIT_BRIDGE 未指定のとき有効)。"
|
|
49
|
+
},
|
|
50
|
+
"check": {
|
|
51
|
+
"header": "[CONFIG CHECK]",
|
|
52
|
+
"googleOk": "Google credentials : OK (id: {mask})",
|
|
53
|
+
"googleNotSet": "Google credentials : NOT SET (run: calendit config set-google --id <id> --secret <secret>)",
|
|
54
|
+
"outlookOk": "Outlook credentials: OK (id: {mask})",
|
|
55
|
+
"outlookNotSet": "Outlook credentials: NOT SET (run: calendit config set-outlook --id <id>)",
|
|
56
|
+
"contexts": "Contexts : {list}",
|
|
57
|
+
"contextsNone": "Contexts : none",
|
|
58
|
+
"fileLine": "Config file : ~/.config/calendit/config.json (or CALENDIT_CONFIG_DIR override)",
|
|
59
|
+
"uiLocale": "UI locale : {locale}"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"locale": {
|
|
63
|
+
"bootstrap": {
|
|
64
|
+
"prompt": "calendit の表示言語を選んでください:",
|
|
65
|
+
"choiceEn": "English",
|
|
66
|
+
"choiceJa": "日本語"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"eventkit": {
|
|
70
|
+
"bridge": {
|
|
71
|
+
"tokenMissing": "EventKit ブリッジのトークンが {path} にありません。",
|
|
72
|
+
"hintStartBridge": "ブリッジを起動: calendit macos bridge start、または /Applications などの CalenditEventKitBridge.app を開く。",
|
|
73
|
+
"connectFailed": "EventKit ブリッジ {path} に接続できません: {message}。",
|
|
74
|
+
"timeout": "EventKit ブリッジが {ms} ms 以内に応答しませんでした。",
|
|
75
|
+
"invalidJson": "EventKit ブリッジからの JSON が不正です: {line}",
|
|
76
|
+
"closedWithoutResponse": "EventKit ブリッジが応答を送る前に接続を閉じました。",
|
|
77
|
+
"bridgeError": "EventKit ブリッジ エラー"
|
|
78
|
+
},
|
|
79
|
+
"helper": {
|
|
80
|
+
"missing": "EventKit ヘルパー実行ファイルが見つかりません。",
|
|
81
|
+
"hintBuild": "CALENDIT_EVENTKIT_HELPER を設定するか、(cd native/eventkit-helper && swift build -c release) でビルドしてください。",
|
|
82
|
+
"timeout": "EventKit ヘルパーが {ms} ms 以内に終了しませんでした。",
|
|
83
|
+
"exitCode": "EventKit ヘルパーが終了コード {code} で終了しました。"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"macos": {
|
|
87
|
+
"bridge": {
|
|
88
|
+
"openFailed": "ブリッジ app を起動できません: {message}",
|
|
89
|
+
"opened": "起動しました: {path}。数秒待ってから: calendit macos doctor",
|
|
90
|
+
"notFound": "CalenditEventKitBridge.app が見つかりません。配布 / Homebrew を使うか、完全なクローン上で: calendit macos bridge build — 次に: calendit macos bridge start",
|
|
91
|
+
"buildNoSource": "EventKit ブリッジのソースがこのインストール近くにありません。git クローン一式を使うか、CALENDIT_EVENTKIT_BRIDGE_ROOT に native/eventkit-bridge を指定するか、**calendit macos bridge fetch** で取得できます。",
|
|
92
|
+
"buildOk": "ビルドが完了しました。{path}",
|
|
93
|
+
"buildFailed": "EventKit ブリッジのビルドに失敗しました: {message}",
|
|
94
|
+
"fetchIntro": "GitHub 上の calendit リポジトリのスナップショットを取り、**native/eventkit-bridge だけ**を、既定の calendit データ領域(通常は `~/Library/Application Support/calendit/` 配下)に展開します。次のステップで Swift により CalenditEventKitBridge.app をビルドします。",
|
|
95
|
+
"fetchPlan": "• 取得元: {url}\n• おおよそのダウンロード量: {sizeLine}\n• 展開先: {dest}\n• その後(任意)同フォルダで Swift ビルドを実行し、`.build/CalenditEventKitBridge.app` を作ります。",
|
|
96
|
+
"fetchSizeKnown": "約 {mb} MiB(サーバの Content-Length)",
|
|
97
|
+
"fetchSizeUnknown": "未確認(HEAD に Content-Length がない場合。数MB程度のことが多い)",
|
|
98
|
+
"fetchConfirm": "上記のとおりダウンロードと展開を行いますか?",
|
|
99
|
+
"fetchCancel": "取り消しました。ダウンロードは行っていません。",
|
|
100
|
+
"fetchBuildPrompt": "続けて Swift で .app をビルドしますか?(Xcode コマンドライン: swift / codesign が必要)",
|
|
101
|
+
"fetchOk": "EventKit ブリッジ用ソースを配置しました: {path}。ビルド後は: calendit macos bridge start または calendit macos setup など。",
|
|
102
|
+
"fetchSkipsExisting": "既に {path} にブリッジ用ソースがあります。上書きする場合は --force か: calendit macos bridge build",
|
|
103
|
+
"fetchFailed": "ダウンロードまたは展開に失敗しました: {message}",
|
|
104
|
+
"fetchNoTty": "対話式でない端末です。ダウンロードの確認を省略するには --yes を使うか、操作できるターミナルで実行してください。"
|
|
105
|
+
},
|
|
106
|
+
"setup": {
|
|
107
|
+
"notDarwin": "macOS のみです。",
|
|
108
|
+
"noTransport": "EventKit が使えません(ヘルパー未ビルド、または未起動のブリッジ)。helper をビルドするかブリッジ .app を起動してください。",
|
|
109
|
+
"tcc": "CalenditEventKitBridge にカレンダー許可: システム設定 → プライバシーとセキュリティ → カレンダー。終わったら Enter。",
|
|
110
|
+
"pickCalendar": "使うカレンダーを選んでください:",
|
|
111
|
+
"contextName": "このコンテキスト名(例: my-mac):",
|
|
112
|
+
"contextNameRequired": "コンテキスト名を入力してください。",
|
|
113
|
+
"saved": "コンテキスト '{name}' を保存しました(macos / {calendarId})。",
|
|
114
|
+
"noCalendars": "カレンダーが取得できません(権限の可能性あり)。",
|
|
115
|
+
"startBridgePrompt": "ブリッジが起動していない可能性があります。CalenditEventKitBridge.app を開きますか?",
|
|
116
|
+
"canceled": "セットアップを中止しました。"
|
|
117
|
+
},
|
|
118
|
+
"external": {
|
|
119
|
+
"onlyDarwin": "macOS のみ対応です。",
|
|
120
|
+
"badSub": "サブコマンドは `doctor` / `list-calendars` / `shell` です。",
|
|
121
|
+
"badSubHint": "例: calendit macos external doctor / calendit macos external list-calendars --json / calendit macos external shell",
|
|
122
|
+
"jsonOnlyForList": "`--json` は `list-calendars` のときのみ使えます。",
|
|
123
|
+
"opened": "ターミナル.app を開きました。新しいウィンドウで実行しています: {cmd}",
|
|
124
|
+
"osascriptFailed": "AppleScript でターミナル.app を開けませんでした: {message}",
|
|
125
|
+
"suggestionWhenDenied": "このターミナルではカレンダーが拒否されています。例: calendit macos external doctor(ターミナルで許可ダイアログ) / calendit macos external shell(このディレクトリでターミナルを開き、query 等も含めて利用)。"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AbstractCalendarService } from "./base.js";
|
|
2
|
+
import { CalendarEvent, CalendarInfo, ProviderCapabilities } from "../types/index.js";
|
|
3
|
+
export declare class MacosCalendarService extends AbstractCalendarService {
|
|
4
|
+
getProviderId(): string;
|
|
5
|
+
getCapabilities(): ProviderCapabilities;
|
|
6
|
+
private wrapError;
|
|
7
|
+
listCalendars(): Promise<CalendarInfo[]>;
|
|
8
|
+
createCalendar(_name: string): Promise<CalendarInfo>;
|
|
9
|
+
deleteCalendar(_calendarId: string): Promise<void>;
|
|
10
|
+
listEvents(calendarId: string, start: Date, end: Date): Promise<CalendarEvent[]>;
|
|
11
|
+
createEvent(calendarId: string, event: Omit<CalendarEvent, "id" | "service" | "calendarId">): Promise<CalendarEvent>;
|
|
12
|
+
updateEvent(calendarId: string, eventId: string, event: Partial<CalendarEvent>): Promise<CalendarEvent>;
|
|
13
|
+
deleteEvent(calendarId: string, eventId: string): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { AbstractCalendarService } from "./base.js";
|
|
2
|
+
import { ApiError } from "../core/errors.js";
|
|
3
|
+
import { runEventkitHelper } from "../core/eventkitHelper.js";
|
|
4
|
+
import { logger } from "../core/logger.js";
|
|
5
|
+
export class MacosCalendarService extends AbstractCalendarService {
|
|
6
|
+
getProviderId() {
|
|
7
|
+
return "macos";
|
|
8
|
+
}
|
|
9
|
+
getCapabilities() {
|
|
10
|
+
return {
|
|
11
|
+
webConferencing: false,
|
|
12
|
+
bulkOperations: true,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
wrapError(err, op) {
|
|
16
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
17
|
+
throw new ApiError(`macOS EventKit (${op}): ${msg}`, { provider: "macos", details: err });
|
|
18
|
+
}
|
|
19
|
+
async listCalendars() {
|
|
20
|
+
try {
|
|
21
|
+
const { stdout } = await runEventkitHelper(["list-calendars"]);
|
|
22
|
+
const data = JSON.parse(stdout.trim());
|
|
23
|
+
return (data.calendars || []).map((c) => ({
|
|
24
|
+
id: c.calendarIdentifier,
|
|
25
|
+
name: `${c.title} (${c.sourceTitle})`,
|
|
26
|
+
service: "macos",
|
|
27
|
+
isPrimary: false,
|
|
28
|
+
canEdit: c.allowsContentModification,
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
this.wrapError(e, "listCalendars");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async createCalendar(_name) {
|
|
36
|
+
throw new ApiError("macOS EventKit: createCalendar は未対応です。", { provider: "macos" });
|
|
37
|
+
}
|
|
38
|
+
async deleteCalendar(_calendarId) {
|
|
39
|
+
throw new ApiError("macOS EventKit: deleteCalendar は未対応です。", { provider: "macos" });
|
|
40
|
+
}
|
|
41
|
+
async listEvents(calendarId, start, end) {
|
|
42
|
+
try {
|
|
43
|
+
logger.debug("Macos listEvents", { calendarId, start: start.toISOString(), end: end.toISOString() });
|
|
44
|
+
const { stdout } = await runEventkitHelper([
|
|
45
|
+
"list-events",
|
|
46
|
+
calendarId,
|
|
47
|
+
start.toISOString(),
|
|
48
|
+
end.toISOString(),
|
|
49
|
+
]);
|
|
50
|
+
const data = JSON.parse(stdout.trim());
|
|
51
|
+
return data.events || [];
|
|
52
|
+
}
|
|
53
|
+
catch (e) {
|
|
54
|
+
this.wrapError(e, "listEvents");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async createEvent(calendarId, event) {
|
|
58
|
+
try {
|
|
59
|
+
const body = {
|
|
60
|
+
calendarId,
|
|
61
|
+
summary: event.summary,
|
|
62
|
+
start: event.start,
|
|
63
|
+
end: event.end,
|
|
64
|
+
location: event.location,
|
|
65
|
+
description: event.description,
|
|
66
|
+
};
|
|
67
|
+
if (event.attendees?.length) {
|
|
68
|
+
body.attendees = event.attendees;
|
|
69
|
+
}
|
|
70
|
+
const { stdout } = await runEventkitHelper(["create-event"], {
|
|
71
|
+
stdin: JSON.stringify(body),
|
|
72
|
+
});
|
|
73
|
+
const raw = JSON.parse(stdout.trim());
|
|
74
|
+
if (raw.attendeesOmitted) {
|
|
75
|
+
logger.warn("macOS EventKit: attendees はこのビルドでは保存されませんでした(EventKit の制限)。");
|
|
76
|
+
}
|
|
77
|
+
delete raw.attendeesOmitted;
|
|
78
|
+
const row = raw;
|
|
79
|
+
return { ...row, service: "macos", calendarId };
|
|
80
|
+
}
|
|
81
|
+
catch (e) {
|
|
82
|
+
this.wrapError(e, "createEvent");
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
async updateEvent(calendarId, eventId, event) {
|
|
86
|
+
try {
|
|
87
|
+
const patch = {};
|
|
88
|
+
if (event.summary !== undefined)
|
|
89
|
+
patch.summary = event.summary;
|
|
90
|
+
if (event.start !== undefined)
|
|
91
|
+
patch.start = event.start;
|
|
92
|
+
if (event.end !== undefined)
|
|
93
|
+
patch.end = event.end;
|
|
94
|
+
if (event.location !== undefined)
|
|
95
|
+
patch.location = event.location;
|
|
96
|
+
if (event.description !== undefined)
|
|
97
|
+
patch.description = event.description;
|
|
98
|
+
const stdin = JSON.stringify({ calendarId, eventId, patch });
|
|
99
|
+
const { stdout } = await runEventkitHelper(["update-event"], { stdin });
|
|
100
|
+
const row = JSON.parse(stdout.trim());
|
|
101
|
+
return { ...row, service: "macos", calendarId };
|
|
102
|
+
}
|
|
103
|
+
catch (e) {
|
|
104
|
+
this.wrapError(e, "updateEvent");
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
async deleteEvent(calendarId, eventId) {
|
|
108
|
+
try {
|
|
109
|
+
await runEventkitHelper(["delete-event", calendarId, eventId]);
|
|
110
|
+
}
|
|
111
|
+
catch (e) {
|
|
112
|
+
this.wrapError(e, "deleteEvent");
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
package/dist/test_runner.js
CHANGED
|
@@ -5,8 +5,12 @@ import process from "process";
|
|
|
5
5
|
import * as os from "os";
|
|
6
6
|
import { promisify } from "util";
|
|
7
7
|
const execAsync = promisify(exec);
|
|
8
|
+
/** Replace CLI word `calendit` only (e.g. keep `DEBUG=calendit` value literal). */
|
|
9
|
+
function substituteCalenditCli(rawCmd, cliCmdBase) {
|
|
10
|
+
return rawCmd.replace(/(^|\s)calendit(?=\s|$)/g, (_, pre) => `${pre}${cliCmdBase}`);
|
|
11
|
+
}
|
|
8
12
|
async function runCommand(rawCmd, cliCmdBase, testConfigDir) {
|
|
9
|
-
const cmd = rawCmd
|
|
13
|
+
const cmd = substituteCalenditCli(rawCmd, cliCmdBase) + " 2>&1";
|
|
10
14
|
try {
|
|
11
15
|
const { stdout, stderr } = await execAsync(cmd, {
|
|
12
16
|
maxBuffer: 10 * 1024 * 1024,
|
|
@@ -15,6 +19,8 @@ async function runCommand(rawCmd, cliCmdBase, testConfigDir) {
|
|
|
15
19
|
...process.env,
|
|
16
20
|
CALENDIT_MOCK: "true",
|
|
17
21
|
CALENDIT_CONFIG_DIR: testConfigDir || process.env.CALENDIT_CONFIG_DIR || "",
|
|
22
|
+
CALENDIT_LOCALE: "en",
|
|
23
|
+
CALENDIT_SKIP_LOCALE_PROMPT: "1",
|
|
18
24
|
},
|
|
19
25
|
});
|
|
20
26
|
return { output: stdout + stderr, success: true };
|
|
@@ -61,6 +67,8 @@ function isStatefulTestCase(tc) {
|
|
|
61
67
|
}
|
|
62
68
|
return (cmd.includes("config set-") ||
|
|
63
69
|
cmd.includes("auth login") ||
|
|
70
|
+
cmd.includes("auth status") ||
|
|
71
|
+
cmd.includes("accounts status") ||
|
|
64
72
|
cmd.includes("apply --in tests/data/empty.md --sync") ||
|
|
65
73
|
cmd.includes("\n"));
|
|
66
74
|
}
|
|
@@ -71,7 +79,8 @@ async function runTests() {
|
|
|
71
79
|
console.log(`🚀 Starting professional autonomous test runner (v${version})...`);
|
|
72
80
|
if (testContext)
|
|
73
81
|
console.log(`🎯 Testing Context: ${testContext}`);
|
|
74
|
-
const
|
|
82
|
+
const distCli = path.join(process.cwd(), "dist", "index.js");
|
|
83
|
+
const cliCmdBase = `node ${JSON.stringify(distCli)}`;
|
|
75
84
|
const testsFile = path.join(process.cwd(), "docs/tests.md");
|
|
76
85
|
let testConfigDir = path.join(os.tmpdir(), `calendit_test_${Math.random().toString(36).substring(2, 9)}`);
|
|
77
86
|
await fs.mkdir(testConfigDir, { recursive: true });
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type CalendarServiceType = 'google' | 'outlook';
|
|
1
|
+
export type CalendarServiceType = 'google' | 'outlook' | 'macos';
|
|
2
2
|
export interface CalendarEvent {
|
|
3
3
|
id?: string;
|
|
4
4
|
summary: string;
|
|
@@ -6,6 +6,8 @@ export interface CalendarEvent {
|
|
|
6
6
|
end: string;
|
|
7
7
|
location?: string;
|
|
8
8
|
description?: string;
|
|
9
|
+
/** メールアドレスのみ(macOS EventKit 等で使用) */
|
|
10
|
+
attendees?: string[];
|
|
9
11
|
service: CalendarServiceType;
|
|
10
12
|
calendarId: string;
|
|
11
13
|
}
|
|
@@ -38,7 +40,16 @@ export interface OutlookCredentials {
|
|
|
38
40
|
id: string;
|
|
39
41
|
tenantId: string;
|
|
40
42
|
}
|
|
43
|
+
export interface AppUiConfig {
|
|
44
|
+
locale: "en" | "ja";
|
|
45
|
+
localePromptCompleted?: boolean;
|
|
46
|
+
}
|
|
47
|
+
export interface AppEventkitConfig {
|
|
48
|
+
defaultTransport: "auto" | "bridge" | "helper";
|
|
49
|
+
}
|
|
41
50
|
export interface FullAppConfig extends AppConfig {
|
|
42
51
|
google_creds?: GoogleCredentials;
|
|
43
52
|
outlook_creds?: OutlookCredentials;
|
|
53
|
+
ui?: AppUiConfig;
|
|
54
|
+
eventkit?: AppEventkitConfig;
|
|
44
55
|
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "calendit",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Terminal-based calendar management tool for Google Calendar and
|
|
3
|
+
"version": "2026.4.26",
|
|
4
|
+
"description": "Terminal-based calendar management tool for Google Calendar, Outlook, and macOS Calendar (EventKit) via CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"bin": {
|
|
8
8
|
"calendit": "bin/cli.js"
|
|
9
9
|
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin",
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
10
16
|
"scripts": {
|
|
17
|
+
"postinstall": "node -e \"if (process.env.CI) process.exit(0); console.log('[calendit] First-time AI / Cursor rally: https://github.com/chromatribe/calendit/blob/main/docs/ai-onboarding-rally.md');\"",
|
|
11
18
|
"dev": "node --loader ts-node/esm src/index.ts",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
19
|
+
"gen:locales": "node scripts/gen-locale-keys.mjs",
|
|
20
|
+
"check:locales": "node scripts/check-locale-parity.mjs",
|
|
21
|
+
"build": "npm run gen:locales && tsc && node scripts/copy-locales.mjs",
|
|
22
|
+
"test": "npm run build && node --loader ts-node/esm src/test_runner.ts",
|
|
23
|
+
"prepack": "npm test",
|
|
24
|
+
"pack:check": "npm pack --dry-run",
|
|
25
|
+
"ux:link": "npm run build && npm link"
|
|
15
26
|
},
|
|
16
27
|
"keywords": [
|
|
17
28
|
"calendar",
|