inplan 0.1.11 → 0.1.13

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.
@@ -8,11 +8,11 @@
8
8
  no-plugin path (main exposes nothing to import + runs no plugin). -->
9
9
  <meta
10
10
  http-equiv="Content-Security-Policy"
11
- content="default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' inplan-plugin:; connect-src 'self' inplan-plugin: ws://127.0.0.1:* ws://localhost:*"
11
+ content="default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' inplan-plugin:; connect-src 'self' inplan-plugin: ws://127.0.0.1:* ws://localhost:*; frame-src https://inplan.ai http://127.0.0.1:* http://localhost:*"
12
12
  />
13
13
  <title>inplan</title>
14
- <script type="module" crossorigin src="./assets/index-BJNrsTeG.js"></script>
15
- <link rel="stylesheet" crossorigin href="./assets/index-9o5QlQHM.css">
14
+ <script type="module" crossorigin src="./assets/index-mE-gsS63.js"></script>
15
+ <link rel="stylesheet" crossorigin href="./assets/index-DOP9u7n4.css">
16
16
  </head>
17
17
  <body>
18
18
  <div id="root"></div>
package/bin/cli.js CHANGED
@@ -1213,17 +1213,39 @@ function hasFlag(args, name) {
1213
1213
  }
1214
1214
  var debounceMs = Number(process.env.INPLAN_DEBOUNCE_MS ?? 3e3);
1215
1215
  var pollMs = Number(process.env.INPLAN_POLL_MS ?? 200);
1216
+ function electronDistRel(platform) {
1217
+ if (platform === "win32") return "electron.exe";
1218
+ if (platform === "darwin") return join9("Electron.app", "Contents", "MacOS", "Electron");
1219
+ return "electron";
1220
+ }
1221
+ function electronBinaryFromDisk(reqUrl) {
1222
+ try {
1223
+ const pkgDir = dirname9(createRequire(reqUrl).resolve("electron/package.json"));
1224
+ const rel = electronDistRel(process.platform);
1225
+ const bin = join9(pkgDir, "dist", rel);
1226
+ if (!existsSync9(bin)) return null;
1227
+ try {
1228
+ const pathFile = join9(pkgDir, "path.txt");
1229
+ if (!existsSync9(pathFile)) writeFileSync8(pathFile, rel);
1230
+ } catch {
1231
+ }
1232
+ return bin;
1233
+ } catch {
1234
+ return null;
1235
+ }
1236
+ }
1216
1237
  function resolveBundledApp() {
1217
1238
  const here = dirname9(fileURLToPath2(import.meta.url));
1218
1239
  const appMain = join9(here, "..", "app", "main", "index.js");
1219
1240
  if (!existsSync9(appMain)) return { appMain: null };
1220
1241
  try {
1221
1242
  const electron = createRequire(import.meta.url)("electron");
1222
- if (typeof electron === "string" && electron) return { electron, appMain };
1223
- return { appMain, error: "the electron dependency did not resolve to a runtime path" };
1224
- } catch (e) {
1225
- return { appMain, error: e instanceof Error ? e.message : String(e) };
1243
+ if (typeof electron === "string" && electron && existsSync9(electron)) return { electron, appMain };
1244
+ } catch {
1226
1245
  }
1246
+ const onDisk = electronBinaryFromDisk(import.meta.url);
1247
+ if (onDisk) return { electron: onDisk, appMain };
1248
+ return { appMain, error: "Electron's binary isn't installed \u2014 its download was likely blocked (proxy/AV), and path.txt is missing" };
1227
1249
  }
1228
1250
  function spawnApp(file) {
1229
1251
  const env = { ...process.env, INPLAN_CLI: process.argv[1] ?? "" };
@@ -1399,7 +1421,7 @@ async function waitCycle(backend, explicitCursor, confirmed, model, gate = null)
1399
1421
  async function doLogin(args) {
1400
1422
  const url = getFlag(args, "url") ?? process.env.INPLAN_SUPABASE_URL;
1401
1423
  const anonKey = getFlag(args, "anon") ?? process.env.INPLAN_SUPABASE_ANON_KEY;
1402
- const refreshToken = getFlag(args, "refresh");
1424
+ const refreshToken = getFlag(args, "refresh") ?? process.env.INPLAN_REFRESH_TOKEN;
1403
1425
  if (!url || !anonKey || !refreshToken) {
1404
1426
  process.stderr.write("usage: inplan login --url <url> --anon <anon-key> --refresh <refresh-token> [--email <e>]\n");
1405
1427
  process.exit(64);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inplan",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "inplan — a Markdown editor for human ⇄ coding-agent planning. CLI + desktop editor.",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "repository": {