bundlebee 1.0.3 → 1.0.5
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/index.js +19 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -163,6 +163,23 @@ module.exports = class Bundlebee extends ReadyResource {
|
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
+
async *allABIs() {
|
|
167
|
+
for await (const d of this._bee.createChangesStream()) {
|
|
168
|
+
let record = null
|
|
169
|
+
for (const b of d.batch) {
|
|
170
|
+
if (!b.keys) continue
|
|
171
|
+
const r = b.keys.find((k) => k.key.toString() === MANIFEST_KEY_VALUE)
|
|
172
|
+
if (!r) continue
|
|
173
|
+
record = r
|
|
174
|
+
}
|
|
175
|
+
if (!record) continue
|
|
176
|
+
|
|
177
|
+
const manifest = c.decode(Manifest, record.value)
|
|
178
|
+
|
|
179
|
+
yield { checkout: d.head, manifest }
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
166
183
|
async checkout(checkout) {
|
|
167
184
|
if (!this.opened) await this.ready()
|
|
168
185
|
|
|
@@ -203,7 +220,7 @@ module.exports = class Bundlebee extends ReadyResource {
|
|
|
203
220
|
for (const [k, v] of Object.entries(resolutions)) {
|
|
204
221
|
const skip = peerDeps && peerDeps.has(k)
|
|
205
222
|
const nm =
|
|
206
|
-
(v.
|
|
223
|
+
(v.includes('node_modules/') && skipModules) || skip ? findModule(cache, v, root) : null
|
|
207
224
|
if (nm) {
|
|
208
225
|
m[k] = 'bundle://host' + v
|
|
209
226
|
bundleCache[m[k]] = nm
|
|
@@ -226,7 +243,6 @@ module.exports = class Bundlebee extends ReadyResource {
|
|
|
226
243
|
if (!root.pathname.endsWith('/')) root = new URL('./', root)
|
|
227
244
|
if (peerDependencies) peerDependencies = new Set(peerDependencies)
|
|
228
245
|
|
|
229
|
-
const nodeModules = new URL('./node_modules', root)
|
|
230
246
|
const bundle = new Bundle()
|
|
231
247
|
|
|
232
248
|
const resolutions = {}
|
|
@@ -287,6 +303,7 @@ module.exports = class Bundlebee extends ReadyResource {
|
|
|
287
303
|
}
|
|
288
304
|
|
|
289
305
|
const w = this._bee.write()
|
|
306
|
+
|
|
290
307
|
for (const f in data.bundle.files) {
|
|
291
308
|
w.tryPut(
|
|
292
309
|
b4a.from(f),
|