mol_db 0.0.160 → 0.0.161

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.js CHANGED
@@ -24,19 +24,19 @@ var $;
24
24
  (function ($) {
25
25
  })($ || ($ = {}));
26
26
  module.exports = $;
27
- //mam.js.map
27
+ //mam.ts
28
28
  ;
29
29
 
30
- $node[ "../mam" ] = $node[ "../mam.js" ] = module.exports }.call( {} , {} )
30
+ $node[ "../mam.ts" ] = $node[ "../mam.ts" ] = module.exports }.call( {} , {} )
31
31
  ;
32
32
  "use strict";
33
33
  var $;
34
34
  (function ($) {
35
35
  })($ || ($ = {}));
36
- //context.js.map
36
+ //mol/dom/context/context.ts
37
37
  ;
38
38
  "use strict";
39
- //node.js.map
39
+ //node/node.ts
40
40
  ;
41
41
  "use strict";
42
42
  var $node = new Proxy({ require }, {
@@ -75,14 +75,14 @@ var $node = new Proxy({ require }, {
75
75
  require = (req => Object.assign(function require(name) {
76
76
  return $node[name];
77
77
  }, req))(require);
78
- //node.node.js.map
78
+ //node/node.node.ts
79
79
  ;
80
80
  "use strict";
81
81
  var $;
82
82
  (function ($) {
83
83
  $.$mol_dom_context = new $node.jsdom.JSDOM('', { url: 'https://localhost/' }).window;
84
84
  })($ || ($ = {}));
85
- //context.node.js.map
85
+ //mol/dom/context/context.node.ts
86
86
  ;
87
87
  "use strict";
88
88
  var $;
@@ -95,7 +95,7 @@ var $;
95
95
  }
96
96
  $.$mol_db_response = $mol_db_response;
97
97
  })($ || ($ = {}));
98
- //response.js.map
98
+ //mol/db/response/response.ts
99
99
  ;
100
100
  "use strict";
101
101
  var $;
@@ -104,16 +104,16 @@ var $;
104
104
  const request = this.$mol_dom_context.indexedDB.open(name, migrations.length ? migrations.length + 1 : undefined);
105
105
  request.onupgradeneeded = event => {
106
106
  migrations.splice(0, event.oldVersion - 1);
107
- const transaction = new $.$mol_db_transaction(request.transaction);
107
+ const transaction = new $mol_db_transaction(request.transaction);
108
108
  for (const migrate of migrations)
109
109
  migrate(transaction);
110
110
  };
111
- const db = await $.$mol_db_response(request);
112
- return new $.$mol_db_database(db);
111
+ const db = await $mol_db_response(request);
112
+ return new $mol_db_database(db);
113
113
  }
114
114
  $.$mol_db = $mol_db;
115
115
  })($ || ($ = {}));
116
- //db.js.map
116
+ //mol/db/db.ts
117
117
  ;
118
118
  "use strict";
119
119
  var $;
@@ -136,7 +136,7 @@ var $;
136
136
  return new Proxy({}, {
137
137
  ownKeys: () => [...this.native.indexNames],
138
138
  has: (_, name) => this.native.indexNames.contains(name),
139
- get: (_, name) => new $.$mol_db_index(this.native.index(name))
139
+ get: (_, name) => new $mol_db_index(this.native.index(name))
140
140
  });
141
141
  }
142
142
  index_make(name, path = [], unique = false, multiEntry = false) {
@@ -147,46 +147,46 @@ var $;
147
147
  return this;
148
148
  }
149
149
  get transaction() {
150
- return new $.$mol_db_transaction(this.native.transaction);
150
+ return new $mol_db_transaction(this.native.transaction);
151
151
  }
152
152
  get db() {
153
153
  return this.transaction.db;
154
154
  }
155
155
  clear() {
156
- return $.$mol_db_response(this.native.clear());
156
+ return $mol_db_response(this.native.clear());
157
157
  }
158
158
  count(keys) {
159
- return $.$mol_db_response(this.native.count(keys));
159
+ return $mol_db_response(this.native.count(keys));
160
160
  }
161
161
  put(doc, key) {
162
- return $.$mol_db_response(this.native.put(doc, key));
162
+ return $mol_db_response(this.native.put(doc, key));
163
163
  }
164
164
  get(key) {
165
- return $.$mol_db_response(this.native.get(key));
165
+ return $mol_db_response(this.native.get(key));
166
166
  }
167
167
  select(key, count) {
168
- return $.$mol_db_response(this.native.getAll(key, count));
168
+ return $mol_db_response(this.native.getAll(key, count));
169
169
  }
170
170
  drop(keys) {
171
- return $.$mol_db_response(this.native.delete(keys));
171
+ return $mol_db_response(this.native.delete(keys));
172
172
  }
173
173
  }
174
174
  $.$mol_db_store = $mol_db_store;
175
175
  })($ || ($ = {}));
176
- //store.js.map
176
+ //mol/db/store/store.ts
177
177
  ;
178
178
  "use strict";
179
- //store_schema.js.map
179
+ //mol/db/store/store_schema.ts
180
180
  ;
181
181
  "use strict";
182
182
  var $;
183
183
  (function ($) {
184
- $.$mol_dom_context.indexedDB = $node['fake-indexeddb'];
184
+ $mol_dom_context.indexedDB = $node['fake-indexeddb'];
185
185
  })($ || ($ = {}));
186
- //db.node.js.map
186
+ //mol/db/db.node.ts
187
187
  ;
188
188
  "use strict";
189
- //db_schema.js.map
189
+ //mol/db/db_schema.ts
190
190
  ;
191
191
  "use strict";
192
192
  var $;
@@ -206,16 +206,16 @@ var $;
206
206
  return [...this.native.objectStoreNames];
207
207
  }
208
208
  read(...names) {
209
- return new $.$mol_db_transaction(this.native.transaction(names, 'readonly')).stores;
209
+ return new $mol_db_transaction(this.native.transaction(names, 'readonly')).stores;
210
210
  }
211
211
  change(...names) {
212
- return new $.$mol_db_transaction(this.native.transaction(names, 'readwrite'));
212
+ return new $mol_db_transaction(this.native.transaction(names, 'readwrite'));
213
213
  }
214
214
  kill() {
215
215
  this.native.close();
216
- const request = $.$mol_dom_context.indexedDB.deleteDatabase(this.name);
216
+ const request = $mol_dom_context.indexedDB.deleteDatabase(this.name);
217
217
  request.onblocked = console.error;
218
- return $.$mol_db_response(request).then(() => { });
218
+ return $mol_db_response(request).then(() => { });
219
219
  }
220
220
  destructor() {
221
221
  this.native.close();
@@ -223,7 +223,7 @@ var $;
223
223
  }
224
224
  $.$mol_db_database = $mol_db_database;
225
225
  })($ || ($ = {}));
226
- //database.js.map
226
+ //mol/db/database/database.ts
227
227
  ;
228
228
  "use strict";
229
229
  var $;
@@ -237,7 +237,7 @@ var $;
237
237
  return new Proxy({}, {
238
238
  ownKeys: () => [...this.native.objectStoreNames],
239
239
  has: (_, name) => this.native.objectStoreNames.contains(name),
240
- get: (_, name) => new $.$mol_db_store(this.native.objectStore(name)),
240
+ get: (_, name) => new $mol_db_store(this.native.objectStore(name)),
241
241
  });
242
242
  }
243
243
  store_make(name) {
@@ -258,12 +258,12 @@ var $;
258
258
  });
259
259
  }
260
260
  get db() {
261
- return new $.$mol_db_database(this.native.db);
261
+ return new $mol_db_database(this.native.db);
262
262
  }
263
263
  }
264
264
  $.$mol_db_transaction = $mol_db_transaction;
265
265
  })($ || ($ = {}));
266
- //transaction.js.map
266
+ //mol/db/transaction/transaction.ts
267
267
  ;
268
268
  "use strict";
269
269
  var $;
@@ -286,7 +286,7 @@ var $;
286
286
  return this.native.multiEntry;
287
287
  }
288
288
  get store() {
289
- return new $.$mol_db_store(this.native.objectStore);
289
+ return new $mol_db_store(this.native.objectStore);
290
290
  }
291
291
  get transaction() {
292
292
  return this.store.transaction;
@@ -295,21 +295,21 @@ var $;
295
295
  return this.store.db;
296
296
  }
297
297
  count(keys) {
298
- return $.$mol_db_response(this.native.count(keys));
298
+ return $mol_db_response(this.native.count(keys));
299
299
  }
300
300
  get(key) {
301
- return $.$mol_db_response(this.native.get(key));
301
+ return $mol_db_response(this.native.get(key));
302
302
  }
303
303
  select(key, count) {
304
- return $.$mol_db_response(this.native.getAll(key, count));
304
+ return $mol_db_response(this.native.getAll(key, count));
305
305
  }
306
306
  }
307
307
  $.$mol_db_index = $mol_db_index;
308
308
  })($ || ($ = {}));
309
- //index.js.map
309
+ //mol/db/index/index.ts
310
310
  ;
311
311
  "use strict";
312
- //index_schema.js.map
312
+ //mol/db/index/index_schema.ts
313
313
  ;
314
314
  "use strict";
315
315
  var $;
@@ -333,7 +333,7 @@ var $;
333
333
  $.$mol_log3_area_lazy = $mol_log3_area_lazy;
334
334
  $.$mol_log3_stack = [];
335
335
  })($ || ($ = {}));
336
- //log3.js.map
336
+ //mol/log3/log3.ts
337
337
  ;
338
338
  "use strict";
339
339
  var $;
@@ -344,7 +344,7 @@ var $;
344
344
  }
345
345
  $.$mol_ambient = $mol_ambient;
346
346
  })($ || ($ = {}));
347
- //ambient.js.map
347
+ //mol/ambient/ambient.ts
348
348
  ;
349
349
  "use strict";
350
350
  var $;
@@ -381,7 +381,7 @@ var $;
381
381
  value: (obj) => instances.has(obj),
382
382
  });
383
383
  })($ || ($ = {}));
384
- //delegate.js.map
384
+ //mol/delegate/delegate.ts
385
385
  ;
386
386
  "use strict";
387
387
  var $;
@@ -393,7 +393,7 @@ var $;
393
393
  return false;
394
394
  if (typeof having !== 'object')
395
395
  return false;
396
- if (having instanceof $.$mol_delegate)
396
+ if (having instanceof $mol_delegate)
397
397
  return false;
398
398
  if (typeof having['destructor'] !== 'function')
399
399
  return false;
@@ -437,7 +437,7 @@ var $;
437
437
  }
438
438
  $.$mol_owning_catch = $mol_owning_catch;
439
439
  })($ || ($ = {}));
440
- //owning.js.map
440
+ //mol/owning/owning.ts
441
441
  ;
442
442
  "use strict";
443
443
  var $;
@@ -447,7 +447,7 @@ var $;
447
447
  }
448
448
  $.$mol_fail = $mol_fail;
449
449
  })($ || ($ = {}));
450
- //fail.js.map
450
+ //mol/fail/fail.ts
451
451
  ;
452
452
  "use strict";
453
453
  var $;
@@ -457,27 +457,27 @@ var $;
457
457
  }
458
458
  $.$mol_fail_hidden = $mol_fail_hidden;
459
459
  })($ || ($ = {}));
460
- //hidden.js.map
460
+ //mol/fail/hidden/hidden.ts
461
461
  ;
462
462
  "use strict";
463
- //writable.js.map
463
+ //mol/type/writable/writable.ts
464
464
  ;
465
465
  "use strict";
466
466
  var $;
467
467
  (function ($) {
468
468
  class $mol_object2 {
469
469
  static $ = $;
470
- [$.$mol_ambient_ref] = null;
470
+ [$mol_ambient_ref] = null;
471
471
  get $() {
472
- if (this[$.$mol_ambient_ref])
473
- return this[$.$mol_ambient_ref];
474
- const owner = $.$mol_owning_get(this);
475
- return this[$.$mol_ambient_ref] = owner?.$ || $mol_object2.$;
472
+ if (this[$mol_ambient_ref])
473
+ return this[$mol_ambient_ref];
474
+ const owner = $mol_owning_get(this);
475
+ return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
476
476
  }
477
477
  set $(next) {
478
- if (this[$.$mol_ambient_ref])
479
- $.$mol_fail_hidden(new Error('Context already defined'));
480
- this[$.$mol_ambient_ref] = next;
478
+ if (this[$mol_ambient_ref])
479
+ $mol_fail_hidden(new Error('Context already defined'));
480
+ this[$mol_ambient_ref] = next;
481
481
  }
482
482
  static create(init) {
483
483
  const obj = new this;
@@ -503,7 +503,7 @@ var $;
503
503
  }
504
504
  $.$mol_object2 = $mol_object2;
505
505
  })($ || ($ = {}));
506
- //object2.js.map
506
+ //mol/object2/object2.ts
507
507
  ;
508
508
  "use strict";
509
509
  var $;
@@ -514,7 +514,7 @@ var $;
514
514
  let warned = false;
515
515
  descr.value = function $mol_deprecated_wrapper(...args) {
516
516
  if (!warned) {
517
- $.$$.$mol_log3_warn({
517
+ $$.$mol_log3_warn({
518
518
  place: `${host.constructor.name}::${field}`,
519
519
  message: `Deprecated`,
520
520
  hint: message,
@@ -527,13 +527,13 @@ var $;
527
527
  }
528
528
  $.$mol_deprecated = $mol_deprecated;
529
529
  })($ || ($ = {}));
530
- //deprecated.js.map
530
+ //mol/deprecated/deprecated.ts
531
531
  ;
532
532
  "use strict";
533
533
  var $;
534
534
  (function ($) {
535
535
  $.$mol_tree_convert = Symbol('$mol_tree_convert');
536
- class $mol_tree extends $.$mol_object2 {
536
+ class $mol_tree extends $mol_object2 {
537
537
  type;
538
538
  data;
539
539
  sub;
@@ -846,7 +846,7 @@ var $;
846
846
  const sub = [].concat(...this.sub.map(child => {
847
847
  const handle = context[child.type] || context[''];
848
848
  if (!handle)
849
- $.$mol_fail(child.error('Handler not defined'));
849
+ $mol_fail(child.error('Handler not defined'));
850
850
  return handle(child, context);
851
851
  }));
852
852
  return this.clone({ sub });
@@ -856,11 +856,11 @@ var $;
856
856
  }
857
857
  }
858
858
  __decorate([
859
- $.$mol_deprecated('Use $mol_tree:hack')
859
+ $mol_deprecated('Use $mol_tree:hack')
860
860
  ], $mol_tree.prototype, "transform", null);
861
861
  $.$mol_tree = $mol_tree;
862
862
  })($ || ($ = {}));
863
- //tree.js.map
863
+ //mol/tree/tree.ts
864
864
  ;
865
865
  "use strict";
866
866
  var $;
@@ -888,7 +888,7 @@ var $;
888
888
  $.$mol_log3_rise = $mol_log3_node_make('log', 'stdout', 'rise', 'magenta');
889
889
  $.$mol_log3_area = $mol_log3_node_make('log', 'stdout', 'area', 'cyan');
890
890
  })($ || ($ = {}));
891
- //log3.node.js.map
891
+ //mol/log3/log3.node.ts
892
892
  ;
893
893
  "use strict";
894
894
  var $;
@@ -898,7 +898,7 @@ var $;
898
898
  }
899
899
  $.$mol_env = $mol_env;
900
900
  })($ || ($ = {}));
901
- //env.js.map
901
+ //mol/env/env.ts
902
902
  ;
903
903
  "use strict";
904
904
  var $;
@@ -907,7 +907,7 @@ var $;
907
907
  return this.process.env;
908
908
  };
909
909
  })($ || ($ = {}));
910
- //env.node.js.map
910
+ //mol/env/env.node.ts
911
911
  ;
912
912
  "use strict";
913
913
  var $;
@@ -927,13 +927,13 @@ var $;
927
927
  env: this.$mol_env(),
928
928
  });
929
929
  if (res.status || res.error)
930
- return $.$mol_fail(res.error || new Error(res.stderr.toString()));
930
+ return $mol_fail(res.error || new Error(res.stderr.toString()));
931
931
  if (!res.stdout)
932
932
  res.stdout = Buffer.from([]);
933
933
  return res;
934
934
  }
935
935
  $.$mol_exec = $mol_exec;
936
936
  })($ || ($ = {}));
937
- //exec.node.js.map
937
+ //mol/exec/exec.node.ts
938
938
 
939
939
  //# sourceMappingURL=node.js.map