Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ import http from "http";

import { tool } from "@opencode-ai/plugin";
import type { Plugin } from "@opencode-ai/plugin";
import type { PushToken } from "./src/push";
import { formatNotification } from "./src/push/formatter";
import { sendPush } from "./src/push/sender";
import { loadTokens, saveTokens } from "./src/push/token-store";
import { startLocaltunnel, stopLocaltunnel, getLocaltunnelUrl } from "./src/tunnel/localtunnel";
import { displayQRCode, generateQRCodeAscii, generateQRCodeAsciiPlain } from "./src/tunnel/qrcode";
import { startNgrokTunnel, stopNgrokTunnel, isNgrokInstalled } from "./src/tunnel/ngrok";
import { startCloudflareTunnel, stopCloudflareTunnel, getCloudflareUrl, isCloudflareInstalled } from "./src/tunnel/cloudflare";
import { updateTunnelMetadata, clearTunnelMetadata, loadTunnelMetadata } from "./src/tunnel/metadata";
import type { PushToken } from "./src/push/index.js";
import { formatNotification } from "./src/push/formatter.js";
import { sendPush } from "./src/push/sender.js";
import { loadTokens, saveTokens } from "./src/push/token-store.js";
import { startLocaltunnel, stopLocaltunnel, getLocaltunnelUrl } from "./src/tunnel/localtunnel.js";
import { displayQRCode, generateQRCodeAscii, generateQRCodeAsciiPlain } from "./src/tunnel/qrcode.js";
import { startNgrokTunnel, stopNgrokTunnel, isNgrokInstalled } from "./src/tunnel/ngrok.js";
import { startCloudflareTunnel, stopCloudflareTunnel, getCloudflareUrl, isCloudflareInstalled } from "./src/tunnel/cloudflare.js";
import { updateTunnelMetadata, clearTunnelMetadata, loadTunnelMetadata } from "./src/tunnel/metadata.js";

function logPluginVersion(ctx: Parameters<Plugin>[0]): void {
const client = (ctx as any)?.client;
Expand Down
4 changes: 3 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/proxy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
* Proxy module barrel export
*/

export * from "./types";
export * from "./types.js";
6 changes: 3 additions & 3 deletions src/push/formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* Notification formatting utilities
*/

import type { Notification, NotificationEvent, PluginContext } from "./types";
import { truncate } from "./token-store";
import { loadFilterConfig, shouldFilterSession } from "./filters";
import type { Notification, NotificationEvent, PluginContext } from "./types.js";
import { truncate } from "./token-store.js";
import { loadFilterConfig, shouldFilterSession } from "./filters.js";

const DEBUG_ENABLED = process.env.OPENCODE_MOBILE_DEBUG === "1";
const debugLog = (...args: unknown[]): void => {
Expand Down
10 changes: 5 additions & 5 deletions src/push/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Push notification module barrel export
*/

export * from "./types";
export * from "./token-store";
export * from "./formatter";
export * from "./sender";
export * from "./notification-handler";
export * from "./types.js";
export * from "./token-store.js";
export * from "./formatter.js";
export * from "./sender.js";
export * from "./notification-handler.js";
4 changes: 2 additions & 2 deletions src/push/sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Push notification sender
*/

import type { Notification } from "./types";
import { loadTokens, saveTokens } from "./token-store";
import type { Notification } from "./types.js";
import { loadTokens, saveTokens } from "./token-store.js";

const EXPO_PUSH_URL = "https://exp.host/--/api/v2/push/send";

Expand Down
2 changes: 1 addition & 1 deletion src/push/token-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import * as fs from "fs";
import * as path from "path";
import type { PushToken } from "./types";
import type { PushToken } from "./types.js";

const CONFIG_DIR = path.join(process.env.HOME || "", ".config/opencode");
const TOKEN_FILE = path.join(CONFIG_DIR, "push-tokens.json");
Expand Down
2 changes: 1 addition & 1 deletion src/tunnel/cloudflare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { spawn, ChildProcess, execSync } from "child_process";
import * as fs from "fs";
import * as path from "path";
import * as os from "os";
import type { TunnelConfig, TunnelInfo } from "./types";
import type { TunnelConfig, TunnelInfo } from "./types.js";

// Export types for external use
export type { TunnelConfig, TunnelInfo };
Expand Down
10 changes: 5 additions & 5 deletions src/tunnel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
*/

import * as fs from "fs";
import type { TunnelConfig, TunnelInfo, TunnelDetails } from "./types";
import type { TunnelConfig, TunnelInfo, TunnelDetails } from "./types.js";
import {
startNgrokTunnel,
stopNgrokTunnel,
diagnoseNgrok,
ensureNgrokReady
} from "./ngrok";
} from "./ngrok.js";
import {
startLocaltunnel,
stopLocaltunnel,
getLocaltunnelUrl
} from "./localtunnel";
} from "./localtunnel.js";
import {
startCloudflareTunnel,
stopCloudflareTunnel,
getCloudflareUrl
} from "./cloudflare";
import { displayQRCode } from "./qrcode";
} from "./cloudflare.js";
import { displayQRCode } from "./qrcode.js";

let currentTunnel: TunnelInfo | null = null;

Expand Down
2 changes: 1 addition & 1 deletion src/tunnel/localtunnel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import localtunnel from "localtunnel";
import type { TunnelConfig, TunnelInfo } from "./types";
import type { TunnelConfig, TunnelInfo } from "./types.js";

// Export the type for external use
export type { TunnelConfig, TunnelInfo };
Expand Down
2 changes: 1 addition & 1 deletion src/tunnel/ngrok.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as fs from "fs";
import * as path from "path";
import { spawn } from "child_process";
import * as ngrok from "@ngrok/ngrok";
import type { TunnelConfig, TunnelInfo, NgrokDiagnostics } from "./types";
import type { TunnelConfig, TunnelInfo, NgrokDiagnostics } from "./types.js";

let ngrokInstance: any = null;
let ngrokSession: any = null;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
* Utilities barrel export
*/

export * from "./port";
export * from "./port.js";