@johnhenry/browsermesh-core 0.2.0 → 0.2.1
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/package.json +8 -2
- package/src/peer-tools.mjs +12 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@johnhenry/browsermesh-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Identity, crypto, peer management, and trust primitives for BrowserMesh",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.mjs",
|
|
@@ -20,7 +20,13 @@
|
|
|
20
20
|
"directory": "packages/browsermesh-core"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@johnhenry/browsermesh-primitives": ">=0.0.1 <1.0.0"
|
|
23
|
+
"@johnhenry/browsermesh-primitives": ">=0.0.1 <1.0.0",
|
|
24
|
+
"@johnhenry/browsermesh-apps": ">=0.4.0 <1.0.0"
|
|
25
|
+
},
|
|
26
|
+
"peerDependenciesMeta": {
|
|
27
|
+
"@johnhenry/browsermesh-apps": {
|
|
28
|
+
"optional": true
|
|
29
|
+
}
|
|
24
30
|
},
|
|
25
31
|
"scripts": {
|
|
26
32
|
"test": "node --import ./test/_setup-globals.mjs --test test/*.test.mjs"
|
package/src/peer-tools.mjs
CHANGED
|
@@ -209,13 +209,18 @@ export class MeshSchedulerSubmitTool extends BrowserTool {
|
|
|
209
209
|
if (!sched) return { success: false, output: '', error: 'Mesh scheduler not initialized.' }
|
|
210
210
|
try {
|
|
211
211
|
// ScheduledTask lives in the sibling browsermesh-apps package, which
|
|
212
|
-
// itself depends on browsermesh-core (peerDependency)
|
|
213
|
-
// depend back on apps without a cycle
|
|
214
|
-
//
|
|
215
|
-
//
|
|
216
|
-
//
|
|
217
|
-
//
|
|
218
|
-
|
|
212
|
+
// itself depends on browsermesh-core (peerDependency) -- core can't
|
|
213
|
+
// depend back on apps without a build-time cycle. Reached via a
|
|
214
|
+
// lazy import of the real package NAME (not a monorepo-relative
|
|
215
|
+
// path, which only ever resolved inside this workspace and broke
|
|
216
|
+
// for every standalone consumer via esm.sh) -- matches this
|
|
217
|
+
// family's established pattern for an optional cross-package reach
|
|
218
|
+
// (see @johnhenry/andbox's lazy import in browsermesh-apps'
|
|
219
|
+
// serverless-executor-andbox.mjs). Declared as an optional peer
|
|
220
|
+
// dependency below; contained by the surrounding try/catch so a
|
|
221
|
+
// consumer without apps installed still fails this one tool
|
|
222
|
+
// gracefully instead of crashing the module.
|
|
223
|
+
const { ScheduledTask } = await import('@johnhenry/browsermesh-apps')
|
|
219
224
|
const task = new ScheduledTask({
|
|
220
225
|
id: crypto.randomUUID(),
|
|
221
226
|
type,
|