mam 1.11.839 → 1.11.841

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.mjs CHANGED
@@ -3201,6 +3201,8 @@ var $;
3201
3201
  if (this.$.$mol_fail_catch(error)) {
3202
3202
  if (error.code === 'ENOENT')
3203
3203
  return null;
3204
+ if (error.code === 'EPERM')
3205
+ return null;
3204
3206
  error.message += '\n' + path;
3205
3207
  this.$.$mol_fail_hidden(error);
3206
3208
  }
@@ -4113,6 +4115,30 @@ var $;
4113
4115
  $.$mol_mem_persist = $mol_wire_solid;
4114
4116
  })($ || ($ = {}));
4115
4117
 
4118
+ ;
4119
+ "use strict";
4120
+ var $;
4121
+ (function ($) {
4122
+ $.$mol_dom = $mol_dom_context;
4123
+ })($ || ($ = {}));
4124
+
4125
+ ;
4126
+ "use strict";
4127
+ var $;
4128
+ (function ($) {
4129
+ function $mol_wait_user_async() {
4130
+ return new Promise(done => $mol_dom.addEventListener('click', function onclick() {
4131
+ $mol_dom.removeEventListener('click', onclick);
4132
+ done(null);
4133
+ }));
4134
+ }
4135
+ $.$mol_wait_user_async = $mol_wait_user_async;
4136
+ function $mol_wait_user() {
4137
+ return this.$mol_wire_sync(this).$mol_wait_user_async();
4138
+ }
4139
+ $.$mol_wait_user = $mol_wait_user;
4140
+ })($ || ($ = {}));
4141
+
4116
4142
  ;
4117
4143
  "use strict";
4118
4144
  var $;
@@ -4132,7 +4158,9 @@ var $;
4132
4158
  return Boolean(next);
4133
4159
  const native = this.native();
4134
4160
  if (next && !$mol_mem_cached(() => this.persisted())) {
4135
- native.persist().then(actual => {
4161
+ this.$.$mol_wait_user_async()
4162
+ .then(() => native.persist())
4163
+ .then(actual => {
4136
4164
  setTimeout(() => this.persisted(actual, 'cache'), 5000);
4137
4165
  if (actual)
4138
4166
  this.$.$mol_log3_done({ place: `$mol_storage`, message: `Persist: Yes` });
@@ -4218,13 +4246,6 @@ var $;
4218
4246
  $.$mol_state_local = $mol_state_local;
4219
4247
  })($ || ($ = {}));
4220
4248
 
4221
- ;
4222
- "use strict";
4223
- var $;
4224
- (function ($) {
4225
- $.$mol_dom = $mol_dom_context;
4226
- })($ || ($ = {}));
4227
-
4228
4249
  ;
4229
4250
  "use strict";
4230
4251
  var $;
package/node.test.js CHANGED
@@ -3192,6 +3192,8 @@ var $;
3192
3192
  if (this.$.$mol_fail_catch(error)) {
3193
3193
  if (error.code === 'ENOENT')
3194
3194
  return null;
3195
+ if (error.code === 'EPERM')
3196
+ return null;
3195
3197
  error.message += '\n' + path;
3196
3198
  this.$.$mol_fail_hidden(error);
3197
3199
  }
@@ -4104,6 +4106,30 @@ var $;
4104
4106
  $.$mol_mem_persist = $mol_wire_solid;
4105
4107
  })($ || ($ = {}));
4106
4108
 
4109
+ ;
4110
+ "use strict";
4111
+ var $;
4112
+ (function ($) {
4113
+ $.$mol_dom = $mol_dom_context;
4114
+ })($ || ($ = {}));
4115
+
4116
+ ;
4117
+ "use strict";
4118
+ var $;
4119
+ (function ($) {
4120
+ function $mol_wait_user_async() {
4121
+ return new Promise(done => $mol_dom.addEventListener('click', function onclick() {
4122
+ $mol_dom.removeEventListener('click', onclick);
4123
+ done(null);
4124
+ }));
4125
+ }
4126
+ $.$mol_wait_user_async = $mol_wait_user_async;
4127
+ function $mol_wait_user() {
4128
+ return this.$mol_wire_sync(this).$mol_wait_user_async();
4129
+ }
4130
+ $.$mol_wait_user = $mol_wait_user;
4131
+ })($ || ($ = {}));
4132
+
4107
4133
  ;
4108
4134
  "use strict";
4109
4135
  var $;
@@ -4123,7 +4149,9 @@ var $;
4123
4149
  return Boolean(next);
4124
4150
  const native = this.native();
4125
4151
  if (next && !$mol_mem_cached(() => this.persisted())) {
4126
- native.persist().then(actual => {
4152
+ this.$.$mol_wait_user_async()
4153
+ .then(() => native.persist())
4154
+ .then(actual => {
4127
4155
  setTimeout(() => this.persisted(actual, 'cache'), 5000);
4128
4156
  if (actual)
4129
4157
  this.$.$mol_log3_done({ place: `$mol_storage`, message: `Persist: Yes` });
@@ -4209,13 +4237,6 @@ var $;
4209
4237
  $.$mol_state_local = $mol_state_local;
4210
4238
  })($ || ($ = {}));
4211
4239
 
4212
- ;
4213
- "use strict";
4214
- var $;
4215
- (function ($) {
4216
- $.$mol_dom = $mol_dom_context;
4217
- })($ || ($ = {}));
4218
-
4219
4240
  ;
4220
4241
  "use strict";
4221
4242
  var $;