@dra2020/baseclient 1.0.71 → 1.0.75
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/dist/all/all.d.ts +2 -0
- package/dist/baseclient.js +97 -1
- package/dist/baseclient.js.map +1 -1
- package/dist/dataflow/all.d.ts +1 -0
- package/dist/dataflow/dataflow.d.ts +23 -0
- package/lib/all/all.ts +2 -0
- package/lib/csv/csv.ts +4 -0
- package/lib/dataflow/all.ts +1 -0
- package/lib/dataflow/dataflow.ts +81 -0
- package/package.json +1 -1
package/dist/all/all.d.ts
CHANGED
package/dist/baseclient.js
CHANGED
|
@@ -39,7 +39,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
39
39
|
return result;
|
|
40
40
|
};
|
|
41
41
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
42
|
-
exports.Colors = exports.CSV = exports.Emit = exports.G = exports.FilterExpr = exports.OTE = exports.OT = exports.LogClient = exports.LogAbstract = exports.Poly = exports.FSM = exports.Context = exports.Util = void 0;
|
|
42
|
+
exports.DataFlow = exports.Colors = exports.CSV = exports.Emit = exports.G = exports.FilterExpr = exports.OTE = exports.OT = exports.LogClient = exports.LogAbstract = exports.Poly = exports.FSM = exports.Context = exports.Util = void 0;
|
|
43
43
|
// Client and Server
|
|
44
44
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
45
45
|
exports.Util = Util;
|
|
@@ -67,6 +67,8 @@ const CSV = __importStar(__webpack_require__(/*! ../csv/all */ "./lib/csv/all.ts
|
|
|
67
67
|
exports.CSV = CSV;
|
|
68
68
|
const Colors = __importStar(__webpack_require__(/*! ../colors/colors */ "./lib/colors/colors.ts"));
|
|
69
69
|
exports.Colors = Colors;
|
|
70
|
+
const DataFlow = __importStar(__webpack_require__(/*! ../dataflow/all */ "./lib/dataflow/all.ts"));
|
|
71
|
+
exports.DataFlow = DataFlow;
|
|
70
72
|
|
|
71
73
|
|
|
72
74
|
/***/ }),
|
|
@@ -944,6 +946,9 @@ class ParseOne {
|
|
|
944
946
|
this.quote = 0;
|
|
945
947
|
this.nwhite = 0;
|
|
946
948
|
}
|
|
949
|
+
else if (this.quote) {
|
|
950
|
+
this.tok[this.toklen++] = c;
|
|
951
|
+
}
|
|
947
952
|
else if (c === Comma || c === Pipe) {
|
|
948
953
|
this.force = true;
|
|
949
954
|
this.pushtok();
|
|
@@ -975,6 +980,97 @@ class ParseOne {
|
|
|
975
980
|
exports.ParseOne = ParseOne;
|
|
976
981
|
|
|
977
982
|
|
|
983
|
+
/***/ }),
|
|
984
|
+
|
|
985
|
+
/***/ "./lib/dataflow/all.ts":
|
|
986
|
+
/*!*****************************!*\
|
|
987
|
+
!*** ./lib/dataflow/all.ts ***!
|
|
988
|
+
\*****************************/
|
|
989
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
990
|
+
|
|
991
|
+
|
|
992
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
993
|
+
if (k2 === undefined) k2 = k;
|
|
994
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
995
|
+
}) : (function(o, m, k, k2) {
|
|
996
|
+
if (k2 === undefined) k2 = k;
|
|
997
|
+
o[k2] = m[k];
|
|
998
|
+
}));
|
|
999
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
1000
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
1001
|
+
};
|
|
1002
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1003
|
+
__exportStar(__webpack_require__(/*! ./dataflow */ "./lib/dataflow/dataflow.ts"), exports);
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
/***/ }),
|
|
1007
|
+
|
|
1008
|
+
/***/ "./lib/dataflow/dataflow.ts":
|
|
1009
|
+
/*!**********************************!*\
|
|
1010
|
+
!*** ./lib/dataflow/dataflow.ts ***!
|
|
1011
|
+
\**********************************/
|
|
1012
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
1013
|
+
|
|
1014
|
+
|
|
1015
|
+
//
|
|
1016
|
+
// DataFlow: mechanism for setting up a data-flow dependency graph that gets computed on demand.
|
|
1017
|
+
//
|
|
1018
|
+
// Semantics are these:
|
|
1019
|
+
// 1. The simplest "atomic" DataFlow object just has an id() and a value(). The id() is used to check for exact
|
|
1020
|
+
// equivalence when determining if any dependents need to be recomputed. id() and value() might be the same
|
|
1021
|
+
// for something that just creates a new whole object when recomputed. In other cases, id() might represent a
|
|
1022
|
+
// hash or changestamp/timestamp that is distinct from the value(). The value may or may not be "ready" as well.
|
|
1023
|
+
// If the value is not "ready", no dependents can be computed.
|
|
1024
|
+
// 2. A DataFlow object can record that it "uses" another DataFlow object. If it does, it can use a set of helper
|
|
1025
|
+
// routines to track the state of its dependents. When its dependents are all ready(), it remembers their ids
|
|
1026
|
+
// and can later test if they are stale.
|
|
1027
|
+
//
|
|
1028
|
+
//
|
|
1029
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1030
|
+
exports.DataFlowCallback = exports.DataFlow = void 0;
|
|
1031
|
+
class DataFlow {
|
|
1032
|
+
constructor() {
|
|
1033
|
+
this.usesList = [];
|
|
1034
|
+
}
|
|
1035
|
+
// override in subclass
|
|
1036
|
+
id() { return null; }
|
|
1037
|
+
value() { return null; }
|
|
1038
|
+
uses(df) {
|
|
1039
|
+
this.usesList.push({ df: df });
|
|
1040
|
+
}
|
|
1041
|
+
usesStale() {
|
|
1042
|
+
let isstale = false;
|
|
1043
|
+
this.usesList.forEach(ui => { if (ui.id !== ui.df.id())
|
|
1044
|
+
isstale = true; });
|
|
1045
|
+
return isstale;
|
|
1046
|
+
}
|
|
1047
|
+
usesRemember() {
|
|
1048
|
+
this.usesList.forEach(ui => { ui.id = ui.df.id(); });
|
|
1049
|
+
}
|
|
1050
|
+
ifcompute() {
|
|
1051
|
+
if (this.usesStale()) {
|
|
1052
|
+
this.usesRemember();
|
|
1053
|
+
this.compute();
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
compute() {
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
exports.DataFlow = DataFlow;
|
|
1060
|
+
// Takes callback that, eventually, returns non-null. The return value is both the value and the id.
|
|
1061
|
+
// Once the value returns non-null, the callback is never called again.
|
|
1062
|
+
class DataFlowCallback extends DataFlow {
|
|
1063
|
+
constructor(cb) {
|
|
1064
|
+
super();
|
|
1065
|
+
this._cb = cb;
|
|
1066
|
+
}
|
|
1067
|
+
id() { if (!this._value)
|
|
1068
|
+
this._value = this._cb(); return this._value; }
|
|
1069
|
+
value() { return this.id(); }
|
|
1070
|
+
}
|
|
1071
|
+
exports.DataFlowCallback = DataFlowCallback;
|
|
1072
|
+
|
|
1073
|
+
|
|
978
1074
|
/***/ }),
|
|
979
1075
|
|
|
980
1076
|
/***/ "./lib/emit/all.ts":
|