akanjs 3.3.0-rc.26 → 3.3.0-rc.27

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 CHANGED
@@ -521,6 +521,10 @@
521
521
 
522
522
  - c44d068: A coding agent reads less to build its first app: the `akanjs` README keeps the path to a first app and links the rest on akanjs.com (17 KB to 7 KB), the `akan-page` and `akan-service` skills ship the API reference one section at a time with every entry named in the skill's index (`Link` now lists the anchor attributes it takes and `Link.Back`, `Link.Close` and `Link.Lang`), the `akan-page` skill holds what a first page looks up while `pageRule` keeps the deeper contract, and each rule is stated once across AGENTS.md, the path rules and the skills. Run `akan agent install` in a workspace to pick up the new files.
523
523
  - 43b44ca: An Android app's page now meets the keyboard the way the iOS app's does: the keys rise over the page and only what the page moves rides up with them. In keyboard mode "none" (what akan apps ship) the Android WebView still heard of the keyboard through the window insets, shrank its visual viewport to the space above the keys and panned the whole page so the focused field showed, which lifted a chat composer far above the keys, dragged whatever sat under it (a tab bar's room) up too, and slid the top of the page under the status bar. The Android shell now hands the WebView its insets with the keyboard taken out in "none" (and its animation callbacks too), keeps the bottom safe area while the keys are up, reports the keys' whole overlap with the screen as the iOS shell does, and tells the page through `__AKAN_NATIVE__.keyboardAvoidance = "page"`. Under such a shell the frame ends the content at the keys and `KeyboardRide` carries what is marked `data-akan-keyboard-ride` with them, on the duration the shell reports and Android's IME curve (`ANDROID_KEYBOARD_ANIMATION_EASING`, added to `akanjs/client`). A page under an older shell, which still pans, keeps today's behavior; an Android app gets the new behavior once it is built with this shell.
524
+ - 6443972: `AppWorker.spawn` runs the worker when the server itself was started as `bun -e <code>`: under `akan start`, and in a backend a gateway starts.
525
+
526
+ Such a server handed its own start code on to the worker's command, so the child ran the server's code again with the worker file as an argument, exited with 1 and was started again every second: the worker never ran, and the log showed `[Worker:<name>] WARN exited 1; restarting in 1000ms` over and over. A server started from its file (`bun main.js` with no backends of its own) was not affected. The same command builds the `ops snapshot` and `ops migrate` children, which now leave the start code out as well.
527
+
524
528
  - f678e80: The `akanjs` package no longer ships `ARCHITECTURE.md`. The map of the framework's processes and messages is for contributors and stays in the repository (`pkgs/akanjs/ARCHITECTURE.md`); a coding agent building an app read its 11.9 KB from the unpacked package before scaffolding. Verifying a built `akanjs` dist now fails if the file is back in it.
525
529
  - af09c4f: `router.backOrFallback()` and `Link.Back` with a `fallback` close a browser tab the app itself opened instead of replacing to the fallback, when there is nothing to go back to. The tab counts as opened by the app when it holds one history entry and has an opener or a same-origin referrer, so a `window.open(href, "_blank", "noopener")` or `target="_blank"` link qualifies. A tab the person opened (a bookmark, a typed URL), one another site opened, and an iOS, Android or desktop shell keep going to the fallback, as does a tab the browser refuses to close.
526
530
  - 24315d1: A page asks for its stylesheet before its client chunks. The preload tags for the chunks a page's first screen imports are written at the end of `<head>` instead of at its top, so the stylesheet link comes first; the bootstrap module, the dictionary and the import map stay at the top. On a throttled mobile connection (Lighthouse's slow 4G applied in the browser, over HTTP/2) a 56-chunk page first paints about 160 ms sooner (1.83 s to 1.67 s), and a page whose largest element is a small image shows it about 140 ms sooner; a large image still shares the connection with the chunks and arrives when it did. Every chunk still starts loading with the document, so the page hydrates when it did.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akanjs",
3
- "version": "3.3.0-rc.26",
3
+ "version": "3.3.0-rc.27",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -27,7 +27,19 @@ export class SelfExec {
27
27
  return beBun === undefined ? env : { ...env, BUN_BE_BUN: beBun };
28
28
  }
29
29
 
30
+ static readonly #codeFlags = ["-e", "--eval", "-p", "--print"];
31
+
32
+ static runtimeFlags(execArgv: string[] = process.execArgv): string[] {
33
+ const flags: string[] = [];
34
+ for (let idx = 0; idx < execArgv.length; idx++) {
35
+ const flag = execArgv[idx] ?? "";
36
+ if (SelfExec.#codeFlags.includes(flag)) idx++;
37
+ else if (!SelfExec.#codeFlags.some((codeFlag) => flag.startsWith(`${codeFlag}=`))) flags.push(flag);
38
+ }
39
+ return flags;
40
+ }
41
+
30
42
  static command(script: string, ...args: string[]): string[] {
31
- return [process.execPath, ...process.execArgv, script, ...args];
43
+ return [process.execPath, ...SelfExec.runtimeFlags(), script, ...args];
32
44
  }
33
45
  }
@@ -4,5 +4,6 @@ export declare class SelfExec {
4
4
  /** A desktop app's carried server: only its shell starts the app executable as Bun. */
5
5
  static get carried(): boolean;
6
6
  static env(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
7
+ static runtimeFlags(execArgv?: string[]): string[];
7
8
  static command(script: string, ...args: string[]): string[];
8
9
  }