@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.
- package/dist/runtime.d.mts +7 -6
- package/dist/runtime.mjs +8 -7
- package/package.json +2 -2
package/dist/runtime.d.mts
CHANGED
|
@@ -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]`;
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* same entry works for both
|
|
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]`;
|
|
556
|
-
*
|
|
557
|
-
*
|
|
558
|
-
*
|
|
559
|
-
* same entry works for both
|
|
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
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "One soul, many platforms
|
|
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",
|