@ekrooh/bare 0.3.0 → 0.4.0

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.
@@ -48,12 +48,13 @@ declare function getIPC(): BareIPC;
48
48
  //#endregion
49
49
  //#region core/runtime.d.ts
50
50
  /** Resolves the host-provided worklet configuration from `start(...)`
51
- * arguments. On-device hosts pass `["<webAssets>", "<storage>", "<cache>"]`,
52
- * landing at `Bare.argv[0..2]`; the Bare CLI (dev) passes the binary and the
53
- * script path instead, so a missing/absent config means dev mode (auth off,
54
- * fixed port, no handoff file). Falls back to the labeled CLI token syntax
55
- * (see `resolveCliConfig`) when the positional shape doesn't match, so the
56
- * same entry works for both device and dev runs. */
51
+ * arguments. On-device hosts pass `["<webAssets>", "<storage>", "<cache>"]`
52
+ * (three existing directories, in that order), landing at `Bare.argv[0..2]`;
53
+ * the Bare CLI (dev) passes the binary and the script path instead, so a
54
+ * missing/absent config means dev mode (auth off, fixed port, no handoff
55
+ * file). Falls back to the labeled CLI token syntax (see `resolveCliConfig`)
56
+ * when the positional shape doesn't match, so the same entry works for both
57
+ * device and dev runs. */
57
58
  declare function resolveWorkletConfig(): WorkletRuntimeOptions;
58
59
  /**
59
60
  * Parses the dev/CLI labeled-token configuration from bare CLI arguments:
package/dist/runtime.mjs CHANGED
@@ -551,12 +551,13 @@ function readBareArgv() {
551
551
  return typeof Bare !== "undefined" && Array.isArray(Bare.argv) ? Bare.argv : [];
552
552
  }
553
553
  /** Resolves the host-provided worklet configuration from `start(...)`
554
- * arguments. On-device hosts pass `["<webAssets>", "<storage>", "<cache>"]`,
555
- * landing at `Bare.argv[0..2]`; the Bare CLI (dev) passes the binary and the
556
- * script path instead, so a missing/absent config means dev mode (auth off,
557
- * fixed port, no handoff file). Falls back to the labeled CLI token syntax
558
- * (see `resolveCliConfig`) when the positional shape doesn't match, so the
559
- * same entry works for both device and dev runs. */
554
+ * arguments. On-device hosts pass `["<webAssets>", "<storage>", "<cache>"]`
555
+ * (three existing directories, in that order), landing at `Bare.argv[0..2]`;
556
+ * the Bare CLI (dev) passes the binary and the script path instead, so a
557
+ * missing/absent config means dev mode (auth off, fixed port, no handoff
558
+ * file). Falls back to the labeled CLI token syntax (see `resolveCliConfig`)
559
+ * when the positional shape doesn't match, so the same entry works for both
560
+ * device and dev runs. */
560
561
  function resolveWorkletConfig() {
561
562
  const argv = readBareArgv();
562
563
  const webAssets = argv[0];
@@ -566,7 +567,7 @@ function resolveWorkletConfig() {
566
567
  const isDir = (p) => fs.statSync(p).isDirectory();
567
568
  if (isDir(webAssets) && isDir(storage)) {
568
569
  const cacheDir = typeof cache === "string" && isDir(cache) ? cache : storage;
569
- if (cacheDir !== cache) console.warn("[bare] cache dir missing or not a directory; falling back to the storage dir");
570
+ if (cacheDir !== cache) console.warn("[bare] cache dir missing or not a directory; falling back to the storage dir. Pass three dirs in order to the worklet: [webAssets, storage, cache].");
570
571
  return {
571
572
  webAssets,
572
573
  storage,
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ekrooh/bare",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
- "description": "One soul, many platforms — the boring bootstrap for cross-platform apps on the Bare runtime: wire protocol, plugin kernel, RPC messenger, transports, and native host bridges.",
5
+ "description": "One soul, many platforms \u2014 the boring bootstrap for cross-platform apps on the Bare runtime: wire protocol, plugin kernel, RPC messenger, transports, and native host bridges.",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",