mol_dump_lib 0.0.288 → 0.0.290
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/node.d.ts +60 -52
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +32 -0
- package/node.js.map +1 -1
- package/node.mjs +32 -0
- package/node.test.js +66 -34
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +53 -52
- package/web.d.ts.map +1 -1
- package/web.deps.json +1 -1
- package/web.js +3 -0
- package/web.js.map +1 -1
- package/web.mjs +3 -0
package/node.mjs
CHANGED
|
@@ -5321,6 +5321,9 @@ var $;
|
|
|
5321
5321
|
open(...modes) {
|
|
5322
5322
|
return 0;
|
|
5323
5323
|
}
|
|
5324
|
+
toJSON() {
|
|
5325
|
+
return this.path();
|
|
5326
|
+
}
|
|
5324
5327
|
}
|
|
5325
5328
|
__decorate([
|
|
5326
5329
|
$mol_mem
|
|
@@ -5566,6 +5569,35 @@ var $;
|
|
|
5566
5569
|
$.$mol_file = $mol_file_node;
|
|
5567
5570
|
})($ || ($ = {}));
|
|
5568
5571
|
|
|
5572
|
+
;
|
|
5573
|
+
"use strict";
|
|
5574
|
+
var $;
|
|
5575
|
+
(function ($) {
|
|
5576
|
+
class $mol_state_local_node extends $mol_state_local {
|
|
5577
|
+
static dir() {
|
|
5578
|
+
const base = process.env.XDG_DATA_HOME || ($node.os.homedir() + '/.local/share');
|
|
5579
|
+
return $mol_file.absolute(base).resolve('./hyoo_state_local');
|
|
5580
|
+
}
|
|
5581
|
+
static value(key, next) {
|
|
5582
|
+
const file = this.dir().resolve(encodeURIComponent(key) + '.json');
|
|
5583
|
+
if (next === null) {
|
|
5584
|
+
file.exists(false);
|
|
5585
|
+
return null;
|
|
5586
|
+
}
|
|
5587
|
+
const arg = next === undefined ? undefined : JSON.stringify(next);
|
|
5588
|
+
return JSON.parse(file.text(arg) || 'null');
|
|
5589
|
+
}
|
|
5590
|
+
}
|
|
5591
|
+
__decorate([
|
|
5592
|
+
$mol_mem
|
|
5593
|
+
], $mol_state_local_node, "dir", null);
|
|
5594
|
+
__decorate([
|
|
5595
|
+
$mol_mem_key
|
|
5596
|
+
], $mol_state_local_node, "value", null);
|
|
5597
|
+
$.$mol_state_local_node = $mol_state_local_node;
|
|
5598
|
+
$.$mol_state_local = $mol_state_local_node;
|
|
5599
|
+
})($ || ($ = {}));
|
|
5600
|
+
|
|
5569
5601
|
;
|
|
5570
5602
|
"use strict";
|
|
5571
5603
|
var $;
|
package/node.test.js
CHANGED
|
@@ -5312,6 +5312,9 @@ var $;
|
|
|
5312
5312
|
open(...modes) {
|
|
5313
5313
|
return 0;
|
|
5314
5314
|
}
|
|
5315
|
+
toJSON() {
|
|
5316
|
+
return this.path();
|
|
5317
|
+
}
|
|
5315
5318
|
}
|
|
5316
5319
|
__decorate([
|
|
5317
5320
|
$mol_mem
|
|
@@ -5557,6 +5560,35 @@ var $;
|
|
|
5557
5560
|
$.$mol_file = $mol_file_node;
|
|
5558
5561
|
})($ || ($ = {}));
|
|
5559
5562
|
|
|
5563
|
+
;
|
|
5564
|
+
"use strict";
|
|
5565
|
+
var $;
|
|
5566
|
+
(function ($) {
|
|
5567
|
+
class $mol_state_local_node extends $mol_state_local {
|
|
5568
|
+
static dir() {
|
|
5569
|
+
const base = process.env.XDG_DATA_HOME || ($node.os.homedir() + '/.local/share');
|
|
5570
|
+
return $mol_file.absolute(base).resolve('./hyoo_state_local');
|
|
5571
|
+
}
|
|
5572
|
+
static value(key, next) {
|
|
5573
|
+
const file = this.dir().resolve(encodeURIComponent(key) + '.json');
|
|
5574
|
+
if (next === null) {
|
|
5575
|
+
file.exists(false);
|
|
5576
|
+
return null;
|
|
5577
|
+
}
|
|
5578
|
+
const arg = next === undefined ? undefined : JSON.stringify(next);
|
|
5579
|
+
return JSON.parse(file.text(arg) || 'null');
|
|
5580
|
+
}
|
|
5581
|
+
}
|
|
5582
|
+
__decorate([
|
|
5583
|
+
$mol_mem
|
|
5584
|
+
], $mol_state_local_node, "dir", null);
|
|
5585
|
+
__decorate([
|
|
5586
|
+
$mol_mem_key
|
|
5587
|
+
], $mol_state_local_node, "value", null);
|
|
5588
|
+
$.$mol_state_local_node = $mol_state_local_node;
|
|
5589
|
+
$.$mol_state_local = $mol_state_local_node;
|
|
5590
|
+
})($ || ($ = {}));
|
|
5591
|
+
|
|
5560
5592
|
;
|
|
5561
5593
|
"use strict";
|
|
5562
5594
|
var $;
|
|
@@ -9568,40 +9600,6 @@ var $;
|
|
|
9568
9600
|
})($$ = $_1.$$ || ($_1.$$ = {}));
|
|
9569
9601
|
})($ || ($ = {}));
|
|
9570
9602
|
|
|
9571
|
-
;
|
|
9572
|
-
"use strict";
|
|
9573
|
-
var $;
|
|
9574
|
-
(function ($) {
|
|
9575
|
-
$mol_test({
|
|
9576
|
-
'local get set delete'() {
|
|
9577
|
-
var key = '$mol_state_local_test:' + Math.random();
|
|
9578
|
-
$mol_assert_equal($mol_state_local.value(key), null);
|
|
9579
|
-
$mol_state_local.value(key, 123);
|
|
9580
|
-
$mol_assert_equal($mol_state_local.value(key), 123);
|
|
9581
|
-
$mol_state_local.value(key, null);
|
|
9582
|
-
$mol_assert_equal($mol_state_local.value(key), null);
|
|
9583
|
-
},
|
|
9584
|
-
});
|
|
9585
|
-
})($ || ($ = {}));
|
|
9586
|
-
|
|
9587
|
-
;
|
|
9588
|
-
"use strict";
|
|
9589
|
-
var $;
|
|
9590
|
-
(function ($) {
|
|
9591
|
-
$mol_test_mocks.push(context => {
|
|
9592
|
-
class $mol_state_local_mock extends $mol_state_local {
|
|
9593
|
-
static state = {};
|
|
9594
|
-
static value(key, next = this.state[key]) {
|
|
9595
|
-
return this.state[key] = (next || null);
|
|
9596
|
-
}
|
|
9597
|
-
}
|
|
9598
|
-
__decorate([
|
|
9599
|
-
$mol_mem_key
|
|
9600
|
-
], $mol_state_local_mock, "value", null);
|
|
9601
|
-
context.$mol_state_local = $mol_state_local_mock;
|
|
9602
|
-
});
|
|
9603
|
-
})($ || ($ = {}));
|
|
9604
|
-
|
|
9605
9603
|
;
|
|
9606
9604
|
"use strict";
|
|
9607
9605
|
var $;
|
|
@@ -9651,6 +9649,40 @@ var $;
|
|
|
9651
9649
|
});
|
|
9652
9650
|
})($ || ($ = {}));
|
|
9653
9651
|
|
|
9652
|
+
;
|
|
9653
|
+
"use strict";
|
|
9654
|
+
var $;
|
|
9655
|
+
(function ($) {
|
|
9656
|
+
$mol_test({
|
|
9657
|
+
'local get set delete'() {
|
|
9658
|
+
var key = '$mol_state_local_test:' + Math.random();
|
|
9659
|
+
$mol_assert_equal($mol_state_local.value(key), null);
|
|
9660
|
+
$mol_state_local.value(key, 123);
|
|
9661
|
+
$mol_assert_equal($mol_state_local.value(key), 123);
|
|
9662
|
+
$mol_state_local.value(key, null);
|
|
9663
|
+
$mol_assert_equal($mol_state_local.value(key), null);
|
|
9664
|
+
},
|
|
9665
|
+
});
|
|
9666
|
+
})($ || ($ = {}));
|
|
9667
|
+
|
|
9668
|
+
;
|
|
9669
|
+
"use strict";
|
|
9670
|
+
var $;
|
|
9671
|
+
(function ($) {
|
|
9672
|
+
$mol_test_mocks.push(context => {
|
|
9673
|
+
class $mol_state_local_mock extends $mol_state_local {
|
|
9674
|
+
static state = {};
|
|
9675
|
+
static value(key, next = this.state[key]) {
|
|
9676
|
+
return this.state[key] = (next || null);
|
|
9677
|
+
}
|
|
9678
|
+
}
|
|
9679
|
+
__decorate([
|
|
9680
|
+
$mol_mem_key
|
|
9681
|
+
], $mol_state_local_mock, "value", null);
|
|
9682
|
+
context.$mol_state_local = $mol_state_local_mock;
|
|
9683
|
+
});
|
|
9684
|
+
})($ || ($ = {}));
|
|
9685
|
+
|
|
9654
9686
|
;
|
|
9655
9687
|
"use strict";
|
|
9656
9688
|
var $;
|