Skip to content

Commit

Permalink
Deployed using Blazing fast GitHub Pages deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
nin-jin committed Mar 20, 2024
1 parent cd1742e commit 20f852c
Show file tree
Hide file tree
Showing 13 changed files with 314 additions and 297 deletions.
168 changes: 85 additions & 83 deletions node.d.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion node.d.ts.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion node.deps.json

Large diffs are not rendered by default.

61 changes: 33 additions & 28 deletions node.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node.js.map

Large diffs are not rendered by default.

61 changes: 33 additions & 28 deletions node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ var $;
destructor: result['destructor'] ?? (() => { })
});
handled.add(result);
const error = new Error();
const error = new Error(`Promise in ${this}`);
Object.defineProperty(result, 'stack', { get: () => error.stack });
}
if (!$mol_promise_like(result)) {
Expand Down Expand Up @@ -1946,6 +1946,32 @@ var $;
;
"use strict";

;
"use strict";
var $;
(function ($) {
function $mol_wire_sync(obj) {
return new Proxy(obj, {
get(obj, field) {
const val = obj[field];
if (typeof val !== 'function')
return val;
const temp = $mol_wire_task.getter(val);
return function $mol_wire_sync(...args) {
const fiber = temp(obj, args);
return fiber.sync();
};
},
apply(obj, self, args) {
const temp = $mol_wire_task.getter(obj);
const fiber = temp(self, args);
return fiber.sync();
},
});
}
$.$mol_wire_sync = $mol_wire_sync;
})($ || ($ = {}));

;
"use strict";
var $node = new Proxy({ require }, {
Expand Down Expand Up @@ -1977,9 +2003,12 @@ var $node = new Proxy({ require }, {
}
}
try {
return target.require(name);
return $.$mol_wire_sync(target).require(name);
}
catch (error) {
if (error.code === 'ERR_REQUIRE_ESM') {
return importSync(name);
}
$.$mol_fail_log(error);
return null;
}
Expand All @@ -1989,6 +2018,8 @@ var $node = new Proxy({ require }, {
return true;
},
});
const importAsync = async (uri) => import(uri);
const importSync = $.$mol_wire_sync(importAsync);
require = (req => Object.assign(function require(name) {
return $node[name];
}, req))(require);
Expand Down Expand Up @@ -3739,32 +3770,6 @@ var $;
$.$mol_mem_cached = $mol_wire_probe;
})($ || ($ = {}));

;
"use strict";
var $;
(function ($) {
function $mol_wire_sync(obj) {
return new Proxy(obj, {
get(obj, field) {
const val = obj[field];
if (typeof val !== 'function')
return val;
const temp = $mol_wire_task.getter(val);
return function $mol_wire_sync(...args) {
const fiber = temp(obj, args);
return fiber.sync();
};
},
apply(obj, self, args) {
const temp = $mol_wire_task.getter(obj);
const fiber = temp(self, args);
return fiber.sync();
},
});
}
$.$mol_wire_sync = $mol_wire_sync;
})($ || ($ = {}));

;
"use strict";
var $;
Expand Down
Loading

0 comments on commit 20f852c

Please sign in to comment.