Default module set (documented in docs/DEFAULT-MODULES.md):
CI / Build & Test (push) Successful in 8m10s
CI / Build & Test (push) Successful in 8m10s
Category Modules Runtime bare, bare-process, bare-module, bare-fs, bare-path, bare-stream Swarm / data hyperswarm, hypercore, corestore, hyperbee, hyperdrive, autobase, hyperdb, hyperschema, hrpc, protomux, compact-encoding, b4a Media bare-media, bare-ffmpeg, plus codecs via bare-media (jpeg/png/webp/gif/heif/…) Local power (bundled) bare-sqlite, bare-fetch
This commit is contained in:
+19
-1
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Shared host bootstrap used by index.mjs (lean) and index-media.mjs (media pack).
|
||||
* Shared host bootstrap for index.mjs.
|
||||
*/
|
||||
|
||||
export function installConsoleToStderr() {
|
||||
@@ -22,15 +22,33 @@ export function logErr(msg) {
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
/** Native addons to touch during --extract-addons (core + media + sqlite). */
|
||||
export const DEFAULT_ADDON_PACKAGES = [
|
||||
// Core swarm / storage
|
||||
'bare-fs',
|
||||
'bare-pipe',
|
||||
'bare-module',
|
||||
'udx-native',
|
||||
'sodium-native',
|
||||
'rocksdb-native',
|
||||
// Media (default)
|
||||
'bare-ffmpeg',
|
||||
'bare-jpeg',
|
||||
'bare-png',
|
||||
'bare-webp',
|
||||
'bare-gif',
|
||||
'bare-heif',
|
||||
'bare-bmp',
|
||||
'bare-ico',
|
||||
'bare-tiff',
|
||||
'bare-svg',
|
||||
'bare-image-resample',
|
||||
'bare-exif',
|
||||
// Local power
|
||||
'bare-sqlite',
|
||||
];
|
||||
|
||||
/** @deprecated Use DEFAULT_ADDON_PACKAGES — media is default. */
|
||||
export const MEDIA_ADDON_PACKAGES = [
|
||||
'bare-ffmpeg',
|
||||
'bare-jpeg',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Media capability pack (bare-media + bare-ffmpeg).
|
||||
* Only loaded by index-media.mjs so the default host stays lean.
|
||||
* Registered by default via register-default-packs.mjs.
|
||||
*/
|
||||
|
||||
const path = require('bare-path');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Capability pack registry. Packs register at host startup (default: none;
|
||||
* media host registers via index-media.mjs).
|
||||
* Capability pack registry. Packs register at host startup
|
||||
* (media is registered by default via register-default-packs.mjs).
|
||||
*/
|
||||
|
||||
/** @type {Map<string, { id: string, commands: Record<string, Function>, onLoad?: Function }>} */
|
||||
|
||||
@@ -1,45 +1,5 @@
|
||||
/**
|
||||
* BridgeSwarm native messaging host with the media capability pack
|
||||
* (bare-media + bare-ffmpeg). Built separately via `npm run build:dist:media`
|
||||
* so the default host stays lean.
|
||||
* @deprecated Media is included in the default host (index.mjs).
|
||||
* Kept as an alias so older docs/scripts that point here still work.
|
||||
*/
|
||||
|
||||
import 'bare-process/global';
|
||||
import './set-tmpdir.mjs';
|
||||
import * as bareMedia from 'bare-media';
|
||||
import registry from './capabilities/registry.js';
|
||||
import mediaMod from './capabilities/media.js';
|
||||
import {
|
||||
installConsoleToStderr,
|
||||
logErr,
|
||||
DEFAULT_ADDON_PACKAGES,
|
||||
MEDIA_ADDON_PACKAGES,
|
||||
extractAddons,
|
||||
startHost,
|
||||
} from './boot.mjs';
|
||||
import _messenger from './messenger.js';
|
||||
import _host from './host.js';
|
||||
|
||||
installConsoleToStderr();
|
||||
|
||||
try {
|
||||
const pack = mediaMod.createMediaPack(bareMedia);
|
||||
registry.registerPack(pack);
|
||||
if (typeof pack.onLoad === 'function') pack.onLoad();
|
||||
logErr('capability pack registered: media');
|
||||
} catch (err) {
|
||||
logErr('failed to register media pack: ' + (err && err.message));
|
||||
throw err;
|
||||
}
|
||||
|
||||
if (process.argv.includes('--extract-addons')) {
|
||||
extractAddons([...DEFAULT_ADDON_PACKAGES, ...MEDIA_ADDON_PACKAGES]);
|
||||
} else {
|
||||
try {
|
||||
startHost(_messenger, _host);
|
||||
} catch (err) {
|
||||
logErr(`startup error: ${err.message}`);
|
||||
if (err.stack) logErr(err.stack);
|
||||
process.exitCode = 1;
|
||||
}
|
||||
}
|
||||
import './index.mjs';
|
||||
|
||||
+19
-2
@@ -1,5 +1,8 @@
|
||||
/**
|
||||
* BridgeSwarm native messaging host entrypoint (default / lean).
|
||||
* BridgeSwarm native messaging host entrypoint.
|
||||
*
|
||||
* Includes default capability packs (media / bare-ffmpeg) and curated Bare
|
||||
* modules — see docs/DEFAULT-MODULES.md.
|
||||
*
|
||||
* bare-process/global must be the very first import so that `process` is
|
||||
* available as a global before any other module runs (required for bare-pack
|
||||
@@ -22,13 +25,27 @@ import {
|
||||
extractAddons,
|
||||
startHost,
|
||||
} from './boot.mjs';
|
||||
import {
|
||||
registerDefaultCapabilityPacks,
|
||||
warmDefaultModules,
|
||||
} from './register-default-packs.mjs';
|
||||
import _messenger from './messenger.js';
|
||||
import _host from './host.js';
|
||||
|
||||
installConsoleToStderr();
|
||||
|
||||
try {
|
||||
registerDefaultCapabilityPacks();
|
||||
} catch (err) {
|
||||
logErr('failed to register default capability packs: ' + (err && err.message));
|
||||
throw err;
|
||||
}
|
||||
|
||||
if (process.argv.includes('--extract-addons')) {
|
||||
extractAddons(DEFAULT_ADDON_PACKAGES);
|
||||
(async () => {
|
||||
await warmDefaultModules();
|
||||
await extractAddons(DEFAULT_ADDON_PACKAGES);
|
||||
})();
|
||||
} else {
|
||||
try {
|
||||
startHost(_messenger, _host);
|
||||
|
||||
Generated
+283
-3
@@ -11,10 +11,14 @@
|
||||
"autobase": "^7.28.1",
|
||||
"b4a": "^1.8.1",
|
||||
"bare": "^1.30.3",
|
||||
"bare-fetch": "^3.2.0",
|
||||
"bare-ffmpeg": "^1.5.0",
|
||||
"bare-fs": "^4.7.4",
|
||||
"bare-media": "^2.10.1",
|
||||
"bare-module": "^6.4.0",
|
||||
"bare-path": "^3.1.1",
|
||||
"bare-process": "^4.5.1",
|
||||
"bare-sqlite": "^0.1.4",
|
||||
"bare-stream": "^2.13.3",
|
||||
"compact-encoding": "^3.3.0",
|
||||
"corestore": "^7.11.1",
|
||||
@@ -193,12 +197,17 @@
|
||||
"bare-inspect": "^3.1.2"
|
||||
}
|
||||
},
|
||||
"node_modules/bare-bmp": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/bare-bmp/-/bare-bmp-1.0.1.tgz",
|
||||
"integrity": "sha512-xjPfMapNJhs2ABzVfzWxGoXxnCuplwgcleRPliyGEQ/6ooOb0xSrqJJ+PHZz5B4OT/A7F2b8aBFm5Yj+Ftb2bw==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bare-buffer": {
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/bare-buffer/-/bare-buffer-3.6.2.tgz",
|
||||
"integrity": "sha512-WT9xx12FJvWbBCkgfjuAeWfY40RW6BKVr2fK9UGrTEYKbvqhcaW0J9AMkA3Sj36Wgi+DUuGXYkZPxn5jVH61LA==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"bare": ">=1.20.0"
|
||||
}
|
||||
@@ -226,7 +235,6 @@
|
||||
"resolved": "https://registry.npmjs.org/bare-dns/-/bare-dns-2.1.4.tgz",
|
||||
"integrity": "sha512-abwjHmpWqSRNB7V5615QxPH92L71AVzFm/kKTs8VYiNTAi2xVdonpv0BjJ0hwXLwomoW+xsSOPjW6PZPO14asg==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"bare": ">=1.7.0"
|
||||
}
|
||||
@@ -254,6 +262,56 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/bare-exif": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/bare-exif/-/bare-exif-1.1.0.tgz",
|
||||
"integrity": "sha512-4rHys0eKWG+pnzvfO9uuw/hDITOg3yVYYAtKJyvyIc/LdfqpgPjpM671xTfAsDgYZt6oM+TH4hPzOO/pab8Vgg==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bare-fetch": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/bare-fetch/-/bare-fetch-3.2.0.tgz",
|
||||
"integrity": "sha512-ijeXh8iSZb8QcGr8gMXbnoxQe/sWWsde4ofTolyiDH8GtLmqjj141QZDoYYMq0fmwp60oFgngmumQO2/tAytwg==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"bare-form-data": "^1.2.0",
|
||||
"bare-http1": "^4.5.2",
|
||||
"bare-https": "^3.0.0",
|
||||
"bare-mime": "^1.0.0",
|
||||
"bare-performance": "^2.1.1",
|
||||
"bare-stream": "^2.9.1",
|
||||
"bare-url": "^2.4.0",
|
||||
"bare-zlib": "^1.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bare-abort-controller": "*",
|
||||
"bare-buffer": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"bare-abort-controller": {
|
||||
"optional": true
|
||||
},
|
||||
"bare-buffer": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/bare-ffmpeg": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bare-ffmpeg/-/bare-ffmpeg-1.5.0.tgz",
|
||||
"integrity": "sha512-JPyUvuAESe/hiSEb/1z55W7lWdwHFNnQZfTN7iXVuRX/02T9efdCc0ltehEtFfrBQAN+PbfJTQp6lPv62JQqoQ==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bare-form-data": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/bare-form-data/-/bare-form-data-1.2.2.tgz",
|
||||
"integrity": "sha512-DQyAkCf5mgKT07orewuvaJfoalw7RBSHia4wgkrG7+seI6aHLB+r6gMRdCGrlO+BmCqMwgTeHAHxDU2NrOjQnQ==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"bare-buffer": "^3.6.0",
|
||||
"bare-stream": "^2.6.5"
|
||||
}
|
||||
},
|
||||
"node_modules/bare-fs": {
|
||||
"version": "4.7.4",
|
||||
"resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.7.4.tgz",
|
||||
@@ -278,12 +336,77 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/bare-gif": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/bare-gif/-/bare-gif-1.1.4.tgz",
|
||||
"integrity": "sha512-CeMgIXO6dfoAay2LJiC9OmgtOkquj4tNY6JO2natv3r3b9RWD5OLu1QvR6Ejbx6yy9do9jQdP+seNSmvZSBjsQ==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bare-heif": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/bare-heif/-/bare-heif-1.0.11.tgz",
|
||||
"integrity": "sha512-nm0jOr1JRzRXmTqg/ABga6AR99xEtFBfQyAAsoEcV45cp9bG7nAYVymlWMeQ8BO8OoZrZHiWaXJAtgdLKzuIEQ==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bare-hrtime": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/bare-hrtime/-/bare-hrtime-2.1.1.tgz",
|
||||
"integrity": "sha512-VMb3tHo05gsnbu3OXTmkDiwTjMlOsbQmKoysKqKEyR09m77TuDrYFbj3Q5GGk10dAKsUHrnXmwCaeJqzVpB5ZA==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bare-http-parser": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/bare-http-parser/-/bare-http-parser-1.1.5.tgz",
|
||||
"integrity": "sha512-sPaDetLbWRmth04JmuTCvw/hoNdWJvYUJN8n1tYdGW3HM0mMnCvK2f0oIxE6HK7iOq+WlsRzEMg1LT/b0wGbLQ==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bare-http1": {
|
||||
"version": "4.5.7",
|
||||
"resolved": "https://registry.npmjs.org/bare-http1/-/bare-http1-4.5.7.tgz",
|
||||
"integrity": "sha512-PRuzs9ywt4vUvrC3mnHhQyaQfLYzdFy8XKOH0oKeKmYfyYYUqXBkdbJE2csESLBxJEbKDBjxPGLU+Qa0l1ds4A==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"bare-events": "^2.6.0",
|
||||
"bare-http-parser": "^1.1.1",
|
||||
"bare-stream": "^2.10.0",
|
||||
"bare-tcp": "^2.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bare-buffer": "*",
|
||||
"bare-url": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"bare-buffer": {
|
||||
"optional": true
|
||||
},
|
||||
"bare-url": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/bare-https": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bare-https/-/bare-https-3.0.0.tgz",
|
||||
"integrity": "sha512-W1GRSCzn+xXKf5bMcPs/hg6Ga1bxPqb7owGfS+tvlBQfPe5Q2STcanRuKZrgU60v5uKrhXH5cgWwM+DLqvXZgQ==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"bare-http1": "^4.4.0",
|
||||
"bare-tcp": "^2.2.0",
|
||||
"bare-tls": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bare-ico": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/bare-ico/-/bare-ico-1.0.1.tgz",
|
||||
"integrity": "sha512-e85L/Y37Pr4I7Cof7BssXwYCPB/Ws0NJ0eMJfXc10sY67A6irVFvPHZf99Dvn+QjwjVwkkt/Oe5NpU4yAu9Buw==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bare-image-resample": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/bare-image-resample/-/bare-image-resample-1.0.2.tgz",
|
||||
"integrity": "sha512-nbkcRwFjyAp1nYgKLYsULZRg99oKD6x7bSaOgBAEC+bu2pdVqyE2q1L4F3fcny77FSgDdyRw9w/uwYpOwbNsTw==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bare-inspect": {
|
||||
"version": "3.1.4",
|
||||
"resolved": "https://registry.npmjs.org/bare-inspect/-/bare-inspect-3.1.4.tgz",
|
||||
@@ -297,6 +420,46 @@
|
||||
"bare": ">=1.18.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bare-jpeg": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/bare-jpeg/-/bare-jpeg-1.1.2.tgz",
|
||||
"integrity": "sha512-MpY/jeMCaBk7rs+mQRnugunc28DdVveMX6k75tVQQFx6MquOIGr77+IhNKEz9m7sq87BloEQHjB2X3tmEJw7NQ==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bare-media": {
|
||||
"version": "2.10.2",
|
||||
"resolved": "https://registry.npmjs.org/bare-media/-/bare-media-2.10.2.tgz",
|
||||
"integrity": "sha512-257KIEIlCsS0rOxP9VKCwnakWSc137MGPBjlqONpFvFONRhBffjlA4JlyJBJHhLuW7dFnWFXz0NdQe+54lKjMw==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"bare-bmp": "^1.0.0",
|
||||
"bare-exif": "^1.1.0",
|
||||
"bare-fetch": "^3.0.1",
|
||||
"bare-ffmpeg": "^1.5.0",
|
||||
"bare-fs": "^4.1.5",
|
||||
"bare-gif": "^1.1.2",
|
||||
"bare-heif": "^1.0.5",
|
||||
"bare-ico": "^1.0.0",
|
||||
"bare-image-resample": "^1.0.1",
|
||||
"bare-jpeg": "^1.1.1",
|
||||
"bare-png": "^1.0.2",
|
||||
"bare-svg": "^1.0.1",
|
||||
"bare-tiff": "^1.0.1",
|
||||
"bare-webp": "^1.0.3",
|
||||
"get-file-format": "^1.1.0",
|
||||
"get-mime-type": "^2.0.1",
|
||||
"paparam": "^1.10.1"
|
||||
},
|
||||
"bin": {
|
||||
"bare-media": "bin.js"
|
||||
}
|
||||
},
|
||||
"node_modules/bare-mime": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bare-mime/-/bare-mime-1.0.0.tgz",
|
||||
"integrity": "sha512-lUOswzBkfqham4zjLDueKOd4Qj3gS56BiZ3q2f0g0adoFhF+HFNupvTUfZBWoicl7fWJ7Hp2RUZjmkY47dxxOQ==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bare-module": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/bare-module/-/bare-module-6.4.0.tgz",
|
||||
@@ -356,6 +519,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/bare-net": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/bare-net/-/bare-net-2.3.2.tgz",
|
||||
"integrity": "sha512-I+yz+pqbYsBkxDsnu5vkKvy7RSNY9CcAvu2jZT6PsmdXJQG1i3dmD5V7xc3334OVp2absgtUEYLmmuNFlphBzg==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"bare-events": "^2.2.2",
|
||||
"bare-pipe": "^4.0.0",
|
||||
"bare-stream": "^2.0.0",
|
||||
"bare-tcp": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bare-os": {
|
||||
"version": "3.9.3",
|
||||
"resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.9.3.tgz",
|
||||
@@ -371,6 +546,18 @@
|
||||
"integrity": "sha512-JprUlveX3QjApC1cTpsUOiscADftCGVWkzitbHsRqv84hzYwYHw2mbluddsq5TvI8mH/8Ov1f4BiMAdcB0oYnQ==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bare-performance": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/bare-performance/-/bare-performance-2.1.1.tgz",
|
||||
"integrity": "sha512-nVlulswnYgXS2Fkbk4ZIKgfIWY/rmeG8ljM9aryPYClgPNzpOgOSLQzVSgU/K+ReLJHq7fEUQ9SBdjEs1QTIfw==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"bare-events": "^2.9.1"
|
||||
},
|
||||
"engines": {
|
||||
"bare": ">=1.27.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bare-pipe": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/bare-pipe/-/bare-pipe-4.2.3.tgz",
|
||||
@@ -384,6 +571,12 @@
|
||||
"bare": ">=1.16.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bare-png": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/bare-png/-/bare-png-1.0.6.tgz",
|
||||
"integrity": "sha512-q/ltPOLxHhlkHP/ONyOvZImY667XPnU/phkalKEg2L4VTjYizFg4uyqfzWuG0tbJidtm8AyKHrRugkZe/Edbjw==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bare-posix": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/bare-posix/-/bare-posix-1.0.1.tgz",
|
||||
@@ -739,6 +932,20 @@
|
||||
"bare": ">=1.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bare-sqlite": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/bare-sqlite/-/bare-sqlite-0.1.4.tgz",
|
||||
"integrity": "sha512-h2UdmQohSQG98lrMZ31PnhKIZRNT+1cDUZRzboHmsXKp+l4N4UBSJylMDEGL+D4fw6MJfOHWFIzUG20pITGy8Q==",
|
||||
"license": "Apache-2.0",
|
||||
"peerDependencies": {
|
||||
"bare-buffer": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"bare-buffer": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/bare-stdio": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/bare-stdio/-/bare-stdio-1.0.3.tgz",
|
||||
@@ -820,12 +1027,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/bare-svg": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/bare-svg/-/bare-svg-1.0.1.tgz",
|
||||
"integrity": "sha512-nPNV2/xnLBEING9iUli88DzOXCt3+N/d7rNYTnaKVwA7BNNRgkNlFMMwYLE124Y48uHrIQ18MoMTbYz18dJoVQ==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bare-tcp": {
|
||||
"version": "2.5.3",
|
||||
"resolved": "https://registry.npmjs.org/bare-tcp/-/bare-tcp-2.5.3.tgz",
|
||||
"integrity": "sha512-TsioekALDulWi0mglooIVG4ML7doxyANKfvuXUU6NS5tFMUnWVuvDht9wQplg07ZS6PQ3jfowzKxNeWdj2e02Q==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"bare-dns": "^2.0.4",
|
||||
"bare-events": "^2.5.4",
|
||||
@@ -843,6 +1055,25 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/bare-tiff": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/bare-tiff/-/bare-tiff-1.0.4.tgz",
|
||||
"integrity": "sha512-vUyD/qStO1Z9UxtBLolV9sZ4bpzBXselRjE03SEBUfR+SaO+033kp5CDAPxHdJRLx2pEwFY0QFC5ytFjSGxBKQ==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bare-tls": {
|
||||
"version": "3.1.7",
|
||||
"resolved": "https://registry.npmjs.org/bare-tls/-/bare-tls-3.1.7.tgz",
|
||||
"integrity": "sha512-AMw8tJlb3LhzAmhgXRcjDrTlNxR3gXXyj6G8eU9iwvCFtiUBD8MxAW7bwunA1gXDukgo40A970jX0APc2jMU7A==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"bare-net": "^2.0.1",
|
||||
"bare-stream": "^2.6.4"
|
||||
},
|
||||
"engines": {
|
||||
"bare": ">=1.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bare-tty": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/bare-tty/-/bare-tty-5.1.2.tgz",
|
||||
@@ -892,6 +1123,29 @@
|
||||
"bare-path": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bare-webp": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/bare-webp/-/bare-webp-1.3.0.tgz",
|
||||
"integrity": "sha512-M45Dn6MJZoO1gLPnJiFmCf/25arfuIzFVsGKrj0P3YOac3QqiU4Tyybo3GIrLo4l58noZD6i4dMUNIZsfexMlA==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bare-zlib": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/bare-zlib/-/bare-zlib-1.4.1.tgz",
|
||||
"integrity": "sha512-CsnQl+XyLaUecB9/OUpjqmemung10M7J2UNXz+6NAVrZAI3HC9c5Kxw34aI0jaU9+gb2yUCD31hOrtPZlnE3bA==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"bare-stream": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bare-buffer": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"bare-buffer": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/big-sparse-array": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/big-sparse-array/-/big-sparse-array-1.0.3.tgz",
|
||||
@@ -1112,6 +1366,26 @@
|
||||
"integrity": "sha512-IfTY0dKZM43ACyGvXkbG7De7WY7MxTS5VO6Juhe8oJKpCmrYYXoqp/cJMskkpi0k9H8wuXq0H+eI898/BCqvXg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/get-file-format": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/get-file-format/-/get-file-format-1.1.1.tgz",
|
||||
"integrity": "sha512-QTbY9616JA3iKxwMqmwl5sT1ym1FhWAnX/5IwAk1V4FhkQoAo2OdCOMZD60ekoxzpwDIz9kj/Mu+5FxBoYfTiw==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"b4a": "^1.6.7",
|
||||
"bare-path": "^3.0.0",
|
||||
"paparam": "^1.9.1"
|
||||
},
|
||||
"bin": {
|
||||
"gff": "cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/get-mime-type": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/get-mime-type/-/get-mime-type-2.0.2.tgz",
|
||||
"integrity": "sha512-pTrc0SYvnFGSri+yjvEIq/m/cg2Ti7Vlrlki13RDicWJzLQgKTCDt8Rhdo80vhEzanOGjbpa+KLYjOiJcA26tQ==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/hrpc": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/hrpc/-/hrpc-4.3.0.tgz",
|
||||
@@ -1438,6 +1712,12 @@
|
||||
"sodium-universal": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/paparam": {
|
||||
"version": "1.10.1",
|
||||
"resolved": "https://registry.npmjs.org/paparam/-/paparam-1.10.1.tgz",
|
||||
"integrity": "sha512-viyQI64VIja0Za3njIzhoEP8ZVkgPowhZPuG0E96NwBfYJ6ZIyrrlhWGtFPkdN7eYLl2L8CTWL+wla0evm1KKQ==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/protocol-buffers-encodings": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/protocol-buffers-encodings/-/protocol-buffers-encodings-1.2.0.tgz",
|
||||
|
||||
@@ -12,10 +12,14 @@
|
||||
"autobase": "^7.28.1",
|
||||
"b4a": "^1.8.1",
|
||||
"bare": "^1.30.3",
|
||||
"bare-fetch": "^3.2.0",
|
||||
"bare-ffmpeg": "^1.5.0",
|
||||
"bare-fs": "^4.7.4",
|
||||
"bare-media": "^2.10.1",
|
||||
"bare-module": "^6.4.0",
|
||||
"bare-path": "^3.1.1",
|
||||
"bare-process": "^4.5.1",
|
||||
"bare-sqlite": "^0.1.4",
|
||||
"bare-stream": "^2.13.3",
|
||||
"compact-encoding": "^3.3.0",
|
||||
"corestore": "^7.11.1",
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Register capability packs that ship in the default host.
|
||||
* Static imports so bare-pack always includes bare-media / ffmpeg in the graph.
|
||||
*/
|
||||
|
||||
import * as bareMedia from 'bare-media';
|
||||
import registry from './capabilities/registry.js';
|
||||
import mediaMod from './capabilities/media.js';
|
||||
import { logErr } from './boot.mjs';
|
||||
|
||||
export function registerDefaultCapabilityPacks() {
|
||||
const pack = mediaMod.createMediaPack(bareMedia);
|
||||
registry.registerPack(pack);
|
||||
if (typeof pack.onLoad === 'function') pack.onLoad();
|
||||
logErr('capability pack registered: media');
|
||||
return ['media'];
|
||||
}
|
||||
|
||||
/** Touch bundled modules so bare-pack + --extract-addons keep them in the host. */
|
||||
export async function warmDefaultModules() {
|
||||
// bare-fetch is a dep of bare-media; import explicitly for the default set.
|
||||
try {
|
||||
await import('bare-fetch');
|
||||
} catch (_) {}
|
||||
try {
|
||||
await import('bare-sqlite');
|
||||
} catch (_) {}
|
||||
try {
|
||||
await import('bare-ffmpeg');
|
||||
} catch (_) {}
|
||||
}
|
||||
Reference in New Issue
Block a user