Skip to content

Commit

Permalink
Deploying to gh-pages from @ a383171 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
nin-jin committed Feb 3, 2024
1 parent 6dc9403 commit a6f6563
Show file tree
Hide file tree
Showing 13 changed files with 182 additions and 176 deletions.
29 changes: 13 additions & 16 deletions node.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,25 @@ declare namespace $ {
destructor(): void;
static destructor(): void;
toString(): string;
toJSON(): any;
}
}

declare namespace $ {
var $mol_dom_context: typeof globalThis;
}

declare namespace $ {
function $mol_promise_like(val: any): val is Promise<any>;
}

declare namespace $ {
function $mol_fail_catch(error: unknown): boolean;
}

declare namespace $ {
function $mol_fail_log(error: unknown): boolean;
}

interface $node {
[key: string]: any;
}
Expand Down Expand Up @@ -265,9 +276,7 @@ declare namespace $ {
namespace $$ { }
const $mol_object_field: unique symbol;
class $mol_object extends $mol_object2 {
static make<Instance>(this: {
new (): Instance;
}, config: Partial<Instance>): Instance;
static make<This extends typeof $mol_object>(this: This, config: Partial<InstanceType<This>>): InstanceType<This>;
}
}

Expand Down Expand Up @@ -393,10 +402,6 @@ declare namespace $ {
}
}

declare namespace $ {
function $mol_promise_like(val: any): val is Promise<any>;
}

declare namespace $ {
abstract class $mol_wire_fiber<Host, Args extends readonly unknown[], Result> extends $mol_wire_pub_sub {
readonly task: (this: Host, ...args: Args) => Result;
Expand Down Expand Up @@ -471,14 +476,6 @@ declare namespace $ {
type $mol_type_foot<Tuple extends readonly any[]> = Tuple['length'] extends 0 ? never : Tuple[$mol_type_tail<Tuple>['length']];
}

declare namespace $ {
function $mol_fail_catch(error: unknown): boolean;
}

declare namespace $ {
function $mol_fail_log(error: unknown): boolean;
}

declare namespace $ {
class $mol_wire_atom<Host, Args extends readonly unknown[], Result> extends $mol_wire_fiber<Host, Args, Result> {
static solo<Host, Args extends readonly unknown[], Result>(host: Host, task: (this: Host, ...args: Args) => Result): $mol_wire_atom<Host, Args, Result>;
Expand Down
2 changes: 1 addition & 1 deletion node.deps.json

Large diffs are not rendered by default.

100 changes: 53 additions & 47 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.

100 changes: 53 additions & 47 deletions node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,6 @@ var $;
toString() {
return this[Symbol.toStringTag] || this.constructor.name + '<>';
}
toJSON() {
return this.toString();
}
}
$.$mol_object2 = $mol_object2;
})($ || ($ = {}));
Expand All @@ -267,6 +264,49 @@ var $;
//node/node.ts
;
"use strict";
var $;
(function ($) {
function $mol_promise_like(val) {
return val && typeof val === 'object' && 'then' in val && typeof val.then === 'function';
}
$.$mol_promise_like = $mol_promise_like;
})($ || ($ = {}));
//mol/promise/like/like.ts
;
"use strict";
var $;
(function ($) {
const catched = new WeakMap();
function $mol_fail_catch(error) {
if (typeof error !== 'object')
return false;
if ($mol_promise_like(error))
$mol_fail_hidden(error);
if (catched.get(error))
return false;
catched.set(error, true);
return true;
}
$.$mol_fail_catch = $mol_fail_catch;
})($ || ($ = {}));
//mol/fail/catch/catch.ts
;
"use strict";
var $;
(function ($) {
function $mol_fail_log(error) {
if ($mol_promise_like(error))
return false;
if (!$mol_fail_catch(error))
return false;
console.error(error);
return true;
}
$.$mol_fail_log = $mol_fail_log;
})($ || ($ = {}));
//mol/fail/log/log.ts
;
"use strict";
var $node = new Proxy({ require }, {
get(target, name, wrapper) {
if (target[name])
Expand Down Expand Up @@ -295,7 +335,13 @@ var $node = new Proxy({ require }, {
dir = parent;
}
}
return target.require(name);
try {
return target.require(name);
}
catch (error) {
$.$mol_fail_log(error);
return null;
}
},
set(target, name, value) {
target[name] = value;
Expand Down Expand Up @@ -726,6 +772,9 @@ var $;
if (typeof json.toJSON === 'function') {
return $mol_tree2_from_json(json.toJSON());
}
if (json.toString !== Object.prototype.toString) {
return $mol_tree2.data(json.toString(), [], span);
}
if (json instanceof Error) {
const { name, message, stack } = json;
json = { ...json, name, message, stack };
Expand Down Expand Up @@ -1362,16 +1411,6 @@ var $;
;
"use strict";
var $;
(function ($) {
function $mol_promise_like(val) {
return val && typeof val === 'object' && 'then' in val && typeof val.then === 'function';
}
$.$mol_promise_like = $mol_promise_like;
})($ || ($ = {}));
//mol/promise/like/like.ts
;
"use strict";
var $;
(function ($) {
const handled = new WeakSet();
class $mol_wire_fiber extends $mol_wire_pub_sub {
Expand Down Expand Up @@ -1889,39 +1928,6 @@ var $;
;
"use strict";
var $;
(function ($) {
const catched = new WeakMap();
function $mol_fail_catch(error) {
if (typeof error !== 'object')
return false;
if ($mol_promise_like(error))
$mol_fail_hidden(error);
if (catched.get(error))
return false;
catched.set(error, true);
return true;
}
$.$mol_fail_catch = $mol_fail_catch;
})($ || ($ = {}));
//mol/fail/catch/catch.ts
;
"use strict";
var $;
(function ($) {
function $mol_fail_log(error) {
if ($mol_promise_like(error))
return false;
if (!$mol_fail_catch(error))
return false;
console.error(error);
return true;
}
$.$mol_fail_log = $mol_fail_log;
})($ || ($ = {}));
//mol/fail/log/log.ts
;
"use strict";
var $;
(function ($) {
class $mol_wire_atom extends $mol_wire_fiber {
static solo(host, task) {
Expand Down
Loading

0 comments on commit a6f6563

Please sign in to comment.