@xuda.io/runtime-bundle 1.0.1359 → 1.0.1361
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/js/modules/xuda-cli-plugin-html-parser-module.esm.min.mjs +1 -0
- package/js/modules/xuda-cli-plugin-html-parser-module.esm.mjs +703 -0
- package/js/xuda-runtime-bundle.js +16 -7
- package/js/xuda-runtime-bundle.min.js +2 -2
- package/js/xuda-runtime-slim.js +16 -7
- package/js/xuda-runtime-slim.min.es.js +16 -7
- package/js/xuda-runtime-slim.min.js +2 -2
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +6 -1
- package/js/xuda-worker-bundle.js +6 -1
- package/js/xuda-worker-bundle.min.js +1 -1
- package/js/xuda_common-bundle.js +6 -1
- package/js/xuda_common-bundle.min.js +1 -1
- package/package.json +1 -1
|
@@ -885,10 +885,15 @@ func.api.watch = function (path, cb, opt = {}) {
|
|
|
885
885
|
_session.watchers = {};
|
|
886
886
|
}
|
|
887
887
|
|
|
888
|
-
_session.watchers[path] = cb;
|
|
888
|
+
_session.watchers[path] = { ...opt, handler: cb };
|
|
889
|
+
|
|
889
890
|
if (opt.immediate) {
|
|
890
891
|
const value = _.get(SESSION_OBJ[SESSION_ID].DS_GLB[0], path);
|
|
891
892
|
cb({ path, newValue: value, oldValue: value, timestamp: Date.now(), opt });
|
|
893
|
+
|
|
894
|
+
if (opt.once) {
|
|
895
|
+
delete _session.watchers[path];
|
|
896
|
+
}
|
|
892
897
|
}
|
|
893
898
|
return 'ok';
|
|
894
899
|
};
|
package/js/xuda-worker-bundle.js
CHANGED
|
@@ -885,10 +885,15 @@ func.api.watch = function (path, cb, opt = {}) {
|
|
|
885
885
|
_session.watchers = {};
|
|
886
886
|
}
|
|
887
887
|
|
|
888
|
-
_session.watchers[path] = cb;
|
|
888
|
+
_session.watchers[path] = { ...opt, handler: cb };
|
|
889
|
+
|
|
889
890
|
if (opt.immediate) {
|
|
890
891
|
const value = _.get(SESSION_OBJ[SESSION_ID].DS_GLB[0], path);
|
|
891
892
|
cb({ path, newValue: value, oldValue: value, timestamp: Date.now(), opt });
|
|
893
|
+
|
|
894
|
+
if (opt.once) {
|
|
895
|
+
delete _session.watchers[path];
|
|
896
|
+
}
|
|
892
897
|
}
|
|
893
898
|
return 'ok';
|
|
894
899
|
};
|