thebird 1.2.54 → 1.2.56
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/docs/preview-sw.js +1 -1
- package/docs/shell-node.js +3 -2
- package/package.json +1 -1
package/docs/preview-sw.js
CHANGED
|
@@ -44,7 +44,7 @@ async function handlePreview(key, request) {
|
|
|
44
44
|
const db = await openIDB();
|
|
45
45
|
const fs = await getFS(db);
|
|
46
46
|
if (key in fs) return new Response(fs[key], { status: 200, headers: { 'Content-Type': getMime(key) } });
|
|
47
|
-
const clients = await self.clients.matchAll({ type: 'window' });
|
|
47
|
+
const clients = await self.clients.matchAll({ type: 'window', includeUncontrolled: true });
|
|
48
48
|
if (!clients.length) return new Response('not found: ' + key, { status: 404 });
|
|
49
49
|
const { port1, port2 } = new MessageChannel();
|
|
50
50
|
const result = await new Promise((res, rej) => {
|
package/docs/shell-node.js
CHANGED
|
@@ -6,7 +6,7 @@ function serializeRoutes(routes) {
|
|
|
6
6
|
return out;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const makeBuiltinModules = term => ({
|
|
10
10
|
express: () => () => {
|
|
11
11
|
const routes = { GET: [], POST: [], USE: [] };
|
|
12
12
|
const app = {
|
|
@@ -37,9 +37,10 @@ const BUILTIN_MODULES = {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
|
-
};
|
|
40
|
+
});
|
|
41
41
|
|
|
42
42
|
export function createNodeEnv({ ctx, term }) {
|
|
43
|
+
const BUILTIN_MODULES = makeBuiltinModules(term);
|
|
43
44
|
const scope = {
|
|
44
45
|
process: {
|
|
45
46
|
argv: [],
|
package/package.json
CHANGED