@explorable-viz/fluid 0.7.17 → 0.7.19
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/.spago/node-child-process/v9.0.0/.eslintrc.json +29 -0
- package/.spago/node-child-process/v9.0.0/.gitignore +8 -0
- package/dist/fluid/fluid.mjs +314 -16
- package/package.json +5 -2
- package/script/bundle-page.sh +21 -0
- package/script/bundle-website.sh +44 -0
- package/script/util/bundle.sh +3 -0
- package/script/util/clean.sh +5 -0
- package/script/util/compile.sh +7 -0
- package/script/util/lisp-case.sh +10 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"parserOptions": {
|
3
|
+
"ecmaVersion": 6,
|
4
|
+
"sourceType": "module"
|
5
|
+
},
|
6
|
+
"extends": "eslint:recommended",
|
7
|
+
"env": {
|
8
|
+
"node": true
|
9
|
+
},
|
10
|
+
"rules": {
|
11
|
+
"strict": [2, "global"],
|
12
|
+
"block-scoped-var": 2,
|
13
|
+
"consistent-return": 2,
|
14
|
+
"eqeqeq": [2, "smart"],
|
15
|
+
"guard-for-in": 2,
|
16
|
+
"no-caller": 2,
|
17
|
+
"no-extend-native": 2,
|
18
|
+
"no-loop-func": 2,
|
19
|
+
"no-new": 2,
|
20
|
+
"no-param-reassign": 2,
|
21
|
+
"no-return-assign": 2,
|
22
|
+
"no-unused-expressions": 2,
|
23
|
+
"no-use-before-define": 2,
|
24
|
+
"radix": [2, "always"],
|
25
|
+
"indent": [2, 2],
|
26
|
+
"quotes": [2, "double"],
|
27
|
+
"semi": [2, "always"]
|
28
|
+
}
|
29
|
+
}
|
package/dist/fluid/fluid.mjs
CHANGED
@@ -257,8 +257,17 @@ var pureE = function(a) {
|
|
257
257
|
return a;
|
258
258
|
};
|
259
259
|
};
|
260
|
+
var bindE = function(a) {
|
261
|
+
return function(f) {
|
262
|
+
return function() {
|
263
|
+
return f(a())();
|
264
|
+
};
|
265
|
+
};
|
266
|
+
};
|
260
267
|
|
261
268
|
// output-es/Effect/index.js
|
269
|
+
var monadEffect = { Applicative0: () => applicativeEffect, Bind1: () => bindEffect };
|
270
|
+
var bindEffect = { bind: bindE, Apply0: () => applyEffect };
|
262
271
|
var applyEffect = {
|
263
272
|
apply: (f) => (a) => () => {
|
264
273
|
const f$p = f();
|
@@ -462,6 +471,17 @@ var iterate = (iter) => (f) => () => {
|
|
462
471
|
}
|
463
472
|
};
|
464
473
|
|
474
|
+
// output-es/Data.Maybe.First/index.js
|
475
|
+
var semigroupFirst = {
|
476
|
+
append: (v) => (v1) => {
|
477
|
+
if (v.tag === "Just") {
|
478
|
+
return v;
|
479
|
+
}
|
480
|
+
return v1;
|
481
|
+
}
|
482
|
+
};
|
483
|
+
var monoidFirst = { mempty: Nothing, Semigroup0: () => semigroupFirst };
|
484
|
+
|
465
485
|
// output-es/Data.Foldable/foreign.js
|
466
486
|
var foldrArray = function(f) {
|
467
487
|
return function(init5) {
|
@@ -507,6 +527,15 @@ var foldrDefault = (dictFoldable) => {
|
|
507
527
|
const foldMap2 = dictFoldable.foldMap(monoidEndo);
|
508
528
|
return (c) => (u) => (xs) => foldMap2((x) => c(x))(xs)(u);
|
509
529
|
};
|
530
|
+
var lookup = (dictFoldable) => {
|
531
|
+
const foldMap2 = dictFoldable.foldMap(monoidFirst);
|
532
|
+
return (dictEq) => (a) => foldMap2((v) => {
|
533
|
+
if (dictEq.eq(a)(v._1)) {
|
534
|
+
return $Maybe("Just", v._2);
|
535
|
+
}
|
536
|
+
return Nothing;
|
537
|
+
});
|
538
|
+
};
|
510
539
|
|
511
540
|
// output-es/Data.Eq/foreign.js
|
512
541
|
var refEq = function(r1) {
|
@@ -3271,7 +3300,7 @@ var toUnfoldable3 = (dictUnfoldable) => (m) => {
|
|
3271
3300
|
};
|
3272
3301
|
return dictUnfoldable.unfoldr(go)($List("Cons", m, Nil));
|
3273
3302
|
};
|
3274
|
-
var
|
3303
|
+
var lookup2 = (dictOrd) => (k) => {
|
3275
3304
|
const go = (go$a0$copy) => {
|
3276
3305
|
let go$a0 = go$a0$copy, go$c = true, go$r;
|
3277
3306
|
while (go$c) {
|
@@ -4160,7 +4189,7 @@ var $$delete = (dictOrd) => (k) => (m) => {
|
|
4160
4189
|
fail();
|
4161
4190
|
};
|
4162
4191
|
var alter = (dictOrd) => (f) => (k) => (m) => {
|
4163
|
-
const v = f(
|
4192
|
+
const v = f(lookup2(dictOrd)(k)(m));
|
4164
4193
|
if (v.tag === "Nothing") {
|
4165
4194
|
return $$delete(dictOrd)(k)(m);
|
4166
4195
|
}
|
@@ -4198,7 +4227,7 @@ var size2 = (v) => size(v);
|
|
4198
4227
|
var singleton2 = (a) => $$$Map("Two", Leaf2, a, void 0, Leaf2);
|
4199
4228
|
var showSet = (dictShow) => ({ show: (s) => "(fromFoldable " + showArrayImpl(dictShow.show)(toUnfoldable1(s)) + ")" });
|
4200
4229
|
var member = (dictOrd) => (a) => (v) => {
|
4201
|
-
const $0 =
|
4230
|
+
const $0 = lookup2(dictOrd)(a)(v);
|
4202
4231
|
if ($0.tag === "Nothing") {
|
4203
4232
|
return false;
|
4204
4233
|
}
|
@@ -9574,7 +9603,7 @@ var mutate = (f) => (m) => {
|
|
9574
9603
|
};
|
9575
9604
|
var member2 = ($0) => ($1) => _lookup(false, (v) => true, $0, $1);
|
9576
9605
|
var mapWithKey = (f) => (m) => _mapWithKey(m, f);
|
9577
|
-
var
|
9606
|
+
var lookup3 = ($0) => ($1) => _lookup(Nothing, Just, $0, $1);
|
9578
9607
|
var isSubmap = (dictEq) => (m1) => (m2) => all2((k) => (v) => _lookup(false, dictEq.eq(v), k, m2))(m1);
|
9579
9608
|
var isEmpty2 = /* @__PURE__ */ all2((v) => (v1) => false);
|
9580
9609
|
var insert2 = (k) => (v) => mutate(($0) => () => {
|
@@ -10043,7 +10072,7 @@ var mapObjectString = {
|
|
10043
10072
|
})(),
|
10044
10073
|
filterKeys,
|
10045
10074
|
unionWith: unionWith2,
|
10046
|
-
lookup:
|
10075
|
+
lookup: lookup3,
|
10047
10076
|
delete: $$delete2,
|
10048
10077
|
insert: insert2,
|
10049
10078
|
toUnfoldable: (dictUnfoldable) => toAscUnfoldable(dictUnfoldable),
|
@@ -11751,7 +11780,7 @@ var topologicalSort = (dictOrd) => (v) => {
|
|
11751
11780
|
}
|
11752
11781
|
if (v1._1._1.tag === "Visit") {
|
11753
11782
|
if ((() => {
|
11754
|
-
const $0 =
|
11783
|
+
const $0 = lookup2(dictOrd)(v1._1._1._1)(state.unvisited);
|
11755
11784
|
if ($0.tag === "Nothing") {
|
11756
11785
|
return false;
|
11757
11786
|
}
|
@@ -11763,7 +11792,7 @@ var topologicalSort = (dictOrd) => (v) => {
|
|
11763
11792
|
visit$a0 = { result: state.result, unvisited: $$delete(dictOrd)(v1._1._1._1)(state.unvisited) };
|
11764
11793
|
visit$a1 = (() => {
|
11765
11794
|
const $0 = fromFoldable6(listMap(Visit)((() => {
|
11766
|
-
const $02 =
|
11795
|
+
const $02 = lookup2(dictOrd)(v1._1._1._1)(v);
|
11767
11796
|
if ($02.tag === "Nothing") {
|
11768
11797
|
return Nil;
|
11769
11798
|
}
|
@@ -12182,7 +12211,7 @@ var fwdSlice = (dictGraph) => {
|
|
12182
12211
|
return pure($Step("Done", void 0));
|
12183
12212
|
}
|
12184
12213
|
if (v1.es.tag === "Cons") {
|
12185
|
-
const $2 =
|
12214
|
+
const $2 = lookup2(ordVertex)(v1.es._1._1)(v1.pending);
|
12186
12215
|
const \u03B2s = (() => {
|
12187
12216
|
if ($2.tag === "Nothing") {
|
12188
12217
|
return $$$Map("Two", Leaf2, v1.es._1._2, void 0, Leaf2);
|
@@ -16410,7 +16439,7 @@ var helperMatch = (pss) => $NonEmpty(
|
|
16410
16439
|
listMap((v) => $Tuple($NonEmpty(v._1, Nil), v._2))(pss._2)
|
16411
16440
|
);
|
16412
16441
|
var getPrec = (x) => {
|
16413
|
-
const v =
|
16442
|
+
const v = lookup2(ordString)(x)(opDefs);
|
16414
16443
|
if (v.tag === "Just") {
|
16415
16444
|
return v._1.prec;
|
16416
16445
|
}
|
@@ -24775,6 +24804,7 @@ var concatM2 = (dictMonad) => foldrArray((() => {
|
|
24775
24804
|
const $0 = dictMonad.Bind1();
|
24776
24805
|
return (f) => (g) => (a) => $0.bind(f(a))(g);
|
24777
24806
|
})())(dictMonad.Applicative0().pure);
|
24807
|
+
var Folder = (x) => x;
|
24778
24808
|
var parse = (dictMonadError) => {
|
24779
24809
|
const $0 = dictMonadError.MonadThrow0();
|
24780
24810
|
const $1 = $0.Monad0().Applicative0().pure;
|
@@ -24895,6 +24925,48 @@ function nullable(a, r, f) {
|
|
24895
24925
|
return a == null ? r : f(a);
|
24896
24926
|
}
|
24897
24927
|
|
24928
|
+
// output-es/Node.Buffer.Immutable/foreign.js
|
24929
|
+
function toStringImpl(enc) {
|
24930
|
+
return (buff) => {
|
24931
|
+
return buff.toString(enc);
|
24932
|
+
};
|
24933
|
+
}
|
24934
|
+
|
24935
|
+
// output-es/Node.Buffer.Immutable/index.js
|
24936
|
+
var toString = (x) => toStringImpl((() => {
|
24937
|
+
if (x === "ASCII") {
|
24938
|
+
return "ascii";
|
24939
|
+
}
|
24940
|
+
if (x === "UTF8") {
|
24941
|
+
return "utf8";
|
24942
|
+
}
|
24943
|
+
if (x === "UTF16LE") {
|
24944
|
+
return "utf16le";
|
24945
|
+
}
|
24946
|
+
if (x === "UCS2") {
|
24947
|
+
return "ucs2";
|
24948
|
+
}
|
24949
|
+
if (x === "Base64") {
|
24950
|
+
return "base64";
|
24951
|
+
}
|
24952
|
+
if (x === "Latin1") {
|
24953
|
+
return "latin1";
|
24954
|
+
}
|
24955
|
+
if (x === "Binary") {
|
24956
|
+
return "binary";
|
24957
|
+
}
|
24958
|
+
if (x === "Hex") {
|
24959
|
+
return "hex";
|
24960
|
+
}
|
24961
|
+
fail();
|
24962
|
+
})());
|
24963
|
+
|
24964
|
+
// output-es/Node.Buffer.Internal/index.js
|
24965
|
+
var toString2 = (dictMonad) => (m) => {
|
24966
|
+
const $0 = toString(m);
|
24967
|
+
return (buf) => dictMonad.Bind1().Apply0().Functor0().map($0)(dictMonad.Applicative0().pure(buf));
|
24968
|
+
};
|
24969
|
+
|
24898
24970
|
// output-es/Node.FS.Constants/foreign.js
|
24899
24971
|
import { constants } from "node:fs";
|
24900
24972
|
var f_OK = constants.F_OK;
|
@@ -24997,6 +25069,132 @@ var loadFile = (v) => (v1) => (dictMonadAff) => {
|
|
24997
25069
|
return (dictMonadError) => Monad0.Bind1().bind(dictMonadAff.liftAff(toAff2(readTextFile)(ASCII)(v + "/" + v1 + ".fld")))((buffer) => Monad0.Applicative0().pure(buffer));
|
24998
25070
|
};
|
24999
25071
|
|
25072
|
+
// output-es/Node.ChildProcess/foreign.js
|
25073
|
+
import { spawn, exec, execFile, execSync, execFileSync, fork as cp_fork } from "child_process";
|
25074
|
+
function execImpl(command2) {
|
25075
|
+
return (opts) => (callback2) => () => exec(
|
25076
|
+
command2,
|
25077
|
+
opts,
|
25078
|
+
(err, stdout, stderr) => {
|
25079
|
+
callback2(err)(stdout)(stderr)();
|
25080
|
+
}
|
25081
|
+
);
|
25082
|
+
}
|
25083
|
+
var _undefined = void 0;
|
25084
|
+
|
25085
|
+
// output-es/Node.ChildProcess/index.js
|
25086
|
+
var convertExecOptions = (opts) => ({
|
25087
|
+
cwd: (() => {
|
25088
|
+
if (opts.cwd.tag === "Nothing") {
|
25089
|
+
return _undefined;
|
25090
|
+
}
|
25091
|
+
if (opts.cwd.tag === "Just") {
|
25092
|
+
return opts.cwd._1;
|
25093
|
+
}
|
25094
|
+
fail();
|
25095
|
+
})(),
|
25096
|
+
env: (() => {
|
25097
|
+
if (opts.env.tag === "Nothing") {
|
25098
|
+
return _undefined;
|
25099
|
+
}
|
25100
|
+
if (opts.env.tag === "Just") {
|
25101
|
+
return opts.env._1;
|
25102
|
+
}
|
25103
|
+
fail();
|
25104
|
+
})(),
|
25105
|
+
encoding: (() => {
|
25106
|
+
if (opts.encoding.tag === "Nothing") {
|
25107
|
+
return _undefined;
|
25108
|
+
}
|
25109
|
+
if (opts.encoding.tag === "Just") {
|
25110
|
+
if (opts.encoding._1 === "ASCII") {
|
25111
|
+
return "ascii";
|
25112
|
+
}
|
25113
|
+
if (opts.encoding._1 === "UTF8") {
|
25114
|
+
return "utf8";
|
25115
|
+
}
|
25116
|
+
if (opts.encoding._1 === "UTF16LE") {
|
25117
|
+
return "utf16le";
|
25118
|
+
}
|
25119
|
+
if (opts.encoding._1 === "UCS2") {
|
25120
|
+
return "ucs2";
|
25121
|
+
}
|
25122
|
+
if (opts.encoding._1 === "Base64") {
|
25123
|
+
return "base64";
|
25124
|
+
}
|
25125
|
+
if (opts.encoding._1 === "Latin1") {
|
25126
|
+
return "latin1";
|
25127
|
+
}
|
25128
|
+
if (opts.encoding._1 === "Binary") {
|
25129
|
+
return "binary";
|
25130
|
+
}
|
25131
|
+
if (opts.encoding._1 === "Hex") {
|
25132
|
+
return "hex";
|
25133
|
+
}
|
25134
|
+
}
|
25135
|
+
fail();
|
25136
|
+
})(),
|
25137
|
+
shell: (() => {
|
25138
|
+
if (opts.shell.tag === "Nothing") {
|
25139
|
+
return _undefined;
|
25140
|
+
}
|
25141
|
+
if (opts.shell.tag === "Just") {
|
25142
|
+
return opts.shell._1;
|
25143
|
+
}
|
25144
|
+
fail();
|
25145
|
+
})(),
|
25146
|
+
timeout: (() => {
|
25147
|
+
if (opts.timeout.tag === "Nothing") {
|
25148
|
+
return _undefined;
|
25149
|
+
}
|
25150
|
+
if (opts.timeout.tag === "Just") {
|
25151
|
+
return opts.timeout._1;
|
25152
|
+
}
|
25153
|
+
fail();
|
25154
|
+
})(),
|
25155
|
+
maxBuffer: (() => {
|
25156
|
+
if (opts.maxBuffer.tag === "Nothing") {
|
25157
|
+
return _undefined;
|
25158
|
+
}
|
25159
|
+
if (opts.maxBuffer.tag === "Just") {
|
25160
|
+
return opts.maxBuffer._1;
|
25161
|
+
}
|
25162
|
+
fail();
|
25163
|
+
})(),
|
25164
|
+
killSignal: (() => {
|
25165
|
+
if (opts.killSignal.tag === "Nothing") {
|
25166
|
+
return _undefined;
|
25167
|
+
}
|
25168
|
+
if (opts.killSignal.tag === "Just") {
|
25169
|
+
return opts.killSignal._1;
|
25170
|
+
}
|
25171
|
+
fail();
|
25172
|
+
})(),
|
25173
|
+
uid: (() => {
|
25174
|
+
if (opts.uid.tag === "Nothing") {
|
25175
|
+
return _undefined;
|
25176
|
+
}
|
25177
|
+
if (opts.uid.tag === "Just") {
|
25178
|
+
return opts.uid._1;
|
25179
|
+
}
|
25180
|
+
fail();
|
25181
|
+
})(),
|
25182
|
+
gid: (() => {
|
25183
|
+
if (opts.gid.tag === "Nothing") {
|
25184
|
+
return _undefined;
|
25185
|
+
}
|
25186
|
+
if (opts.gid.tag === "Just") {
|
25187
|
+
return opts.gid._1;
|
25188
|
+
}
|
25189
|
+
fail();
|
25190
|
+
})()
|
25191
|
+
});
|
25192
|
+
var exec2 = (cmd) => (opts) => (callback2) => execImpl(cmd)(convertExecOptions(opts))((err) => (stdout$p) => (stderr$p) => callback2({
|
25193
|
+
error: nullable(err, Nothing, Just),
|
25194
|
+
stdout: stdout$p,
|
25195
|
+
stderr: stderr$p
|
25196
|
+
}));
|
25197
|
+
|
25000
25198
|
// output-es/Options.Applicative.Internal.Utils/index.js
|
25001
25199
|
var whitespaceRegex = /* @__PURE__ */ (() => {
|
25002
25200
|
const v = regex("\\s+")(noFlags);
|
@@ -25779,9 +25977,15 @@ var manyM = (p) => freeMonadRec.tailRecM((acc) => $Free(
|
|
25779
25977
|
// output-es/Options.Applicative.Builder.Internal/index.js
|
25780
25978
|
var $DefaultProp = (_1, _2) => ({ tag: "DefaultProp", _1, _2 });
|
25781
25979
|
var $Mod = (_1, _2, _3) => ({ tag: "Mod", _1, _2, _3 });
|
25980
|
+
var lookup4 = /* @__PURE__ */ lookup(foldableArray)(eqString);
|
25782
25981
|
var identity26 = (x) => x;
|
25783
25982
|
var Mod = (value0) => (value1) => (value2) => $Mod(value0, value1, value2);
|
25784
25983
|
var optionFieldsHasName = { name: (n) => (fields) => ({ optNames: [n, ...fields.optNames], optCompleter: fields.optCompleter, optNoArgError: fields.optNoArgError }) };
|
25984
|
+
var mkCommand = (m) => {
|
25985
|
+
const v = m._1({ cmdCommands: [], cmdGroup: Nothing });
|
25986
|
+
const $0 = v.cmdCommands;
|
25987
|
+
return $Tuple(v.cmdGroup, $Tuple(arrayMap(fst)($0), $Tuple((v1) => lookup4(v1)($0), void 0)));
|
25988
|
+
};
|
25785
25989
|
var modSemigroup = {
|
25786
25990
|
append: (v) => (v1) => $Mod((x) => v1._1(v._1(x)), $DefaultProp(v1._2._1.tag === "Nothing" ? v._2._1 : v1._2._1, v1._2._2.tag === "Nothing" ? v._2._2 : v1._2._2), (x) => v1._3(v._3(x)))
|
25787
25991
|
};
|
@@ -25850,6 +26054,14 @@ var option = (r) => (m) => {
|
|
25850
26054
|
m._2._2.tag === "Nothing" ? $0._2._2 : m._2._2
|
25851
26055
|
))((x) => m._3($0._3(x)))($OptReader("OptReader", $1.optNames, { crCompleter: $1.optCompleter, crReader: r }, $1.optNoArgError));
|
25852
26056
|
};
|
26057
|
+
var subparser = (m) => {
|
26058
|
+
const $0 = optionMod((p) => ({ propMetaVar: "COMMAND", propDescMod: p.propDescMod, propHelp: p.propHelp, propShowDefault: p.propShowDefault, propVisibility: p.propVisibility }));
|
26059
|
+
const v1 = mkCommand(m);
|
26060
|
+
return mkParser($DefaultProp(
|
26061
|
+
m._2._1.tag === "Nothing" ? $0._2._1 : m._2._1,
|
26062
|
+
m._2._2.tag === "Nothing" ? $0._2._2 : m._2._2
|
26063
|
+
))((x) => m._3($0._3(x)))($OptReader("CmdReader", v1._1, v1._2._1, v1._2._2._1));
|
26064
|
+
};
|
25853
26065
|
var hidden = /* @__PURE__ */ optionMod((p) => ({
|
25854
26066
|
propVisibility: min3(Hidden)(p.propVisibility),
|
25855
26067
|
propDescMod: p.propDescMod,
|
@@ -25906,6 +26118,11 @@ var defaultPrefs = {
|
|
25906
26118
|
prefBacktrack: Backtrack,
|
25907
26119
|
prefColumns: 80
|
25908
26120
|
};
|
26121
|
+
var command = (cmd) => (pinfo) => $Mod(
|
26122
|
+
(p) => ({ cmdCommands: [$Tuple(cmd, pinfo), ...p.cmdCommands], cmdGroup: p.cmdGroup }),
|
26123
|
+
$DefaultProp(Nothing, Nothing),
|
26124
|
+
identity26
|
26125
|
+
);
|
25909
26126
|
var abortOption = (err) => (m) => {
|
25910
26127
|
const $0 = fold3([
|
25911
26128
|
$Mod(
|
@@ -25931,10 +26148,10 @@ var abortOption = (err) => (m) => {
|
|
25931
26148
|
};
|
25932
26149
|
|
25933
26150
|
// output-es/Node.Process/foreign.js
|
25934
|
-
import
|
26151
|
+
import process2 from "process";
|
25935
26152
|
function exit(code) {
|
25936
26153
|
return () => {
|
25937
|
-
|
26154
|
+
process2.exit(code);
|
25938
26155
|
};
|
25939
26156
|
}
|
25940
26157
|
function copyArray(xs) {
|
@@ -25942,7 +26159,7 @@ function copyArray(xs) {
|
|
25942
26159
|
}
|
25943
26160
|
|
25944
26161
|
// output-es/Node.Process/index.js
|
25945
|
-
var argv = /* @__PURE__ */ (() => copyArray(
|
26162
|
+
var argv = /* @__PURE__ */ (() => copyArray(process2.argv))();
|
25946
26163
|
|
25947
26164
|
// output-es/Node.Stream/foreign.js
|
25948
26165
|
function writeStringImpl(w) {
|
@@ -28102,7 +28319,7 @@ var handleParseResult = (v) => {
|
|
28102
28319
|
return () => {
|
28103
28320
|
const progn = getProgName();
|
28104
28321
|
const v1 = renderFailure($0)(progn);
|
28105
|
-
writeString(v1._2 === "Success" ?
|
28322
|
+
writeString(v1._2 === "Success" ? process2.stdout : process2.stderr)(UTF8)(v1._1 + "\n")(mempty22)();
|
28106
28323
|
return exit(boundedEnumExitCode.fromEnum(v1._2))();
|
28107
28324
|
};
|
28108
28325
|
}
|
@@ -28111,7 +28328,7 @@ var handleParseResult = (v) => {
|
|
28111
28328
|
return () => {
|
28112
28329
|
const progn = getProgName();
|
28113
28330
|
const msg = $0.execCompletion(progn)();
|
28114
|
-
writeString(
|
28331
|
+
writeString(process2.stdout)(UTF8)(msg)(mempty22)();
|
28115
28332
|
return exitSuccess();
|
28116
28333
|
};
|
28117
28334
|
}
|
@@ -28139,11 +28356,14 @@ var execParserPure = (pprefs) => (pinfo) => (args) => {
|
|
28139
28356
|
};
|
28140
28357
|
|
28141
28358
|
// output-es/Fluid/index.js
|
28359
|
+
var $Command = (tag, _1, _2) => ({ tag, _1, _2 });
|
28142
28360
|
var $Program = (_1) => ({ tag: "Program", _1 });
|
28143
28361
|
var loadProgCxt2 = /* @__PURE__ */ loadProgCxt(monadAffAff)(monadErrorAff)(loadFile);
|
28144
28362
|
var prepConfig2 = /* @__PURE__ */ prepConfig(monadAffAff)(monadErrorAff)(loadFile);
|
28145
28363
|
var graphEval2 = /* @__PURE__ */ graphEval(monadErrorAff);
|
28146
28364
|
var fromFoldable29 = /* @__PURE__ */ (() => fromFoldableImpl(foldableList.foldr))();
|
28365
|
+
var Evaluate = (value0) => $Command("Evaluate", value0);
|
28366
|
+
var Publish = (value0) => (value1) => $Command("Publish", value0, value1);
|
28147
28367
|
var parseImports = /* @__PURE__ */ $Parser(
|
28148
28368
|
"BindP",
|
28149
28369
|
/* @__PURE__ */ manyM(/* @__PURE__ */ option(readerAsk)(/* @__PURE__ */ (() => {
|
@@ -28169,6 +28389,40 @@ var output = (v) => {
|
|
28169
28389
|
})(v2["out\u03B1"]._2)
|
28170
28390
|
)))));
|
28171
28391
|
};
|
28392
|
+
var copyOptions = {
|
28393
|
+
cwd: Nothing,
|
28394
|
+
env: Nothing,
|
28395
|
+
timeout: Nothing,
|
28396
|
+
killSignal: Nothing,
|
28397
|
+
maxBuffer: Nothing,
|
28398
|
+
uid: Nothing,
|
28399
|
+
gid: Nothing,
|
28400
|
+
encoding: Nothing,
|
28401
|
+
shell: Nothing
|
28402
|
+
};
|
28403
|
+
var copyFiles = (website) => exec2("yarn bundle-website " + website)(copyOptions)((v) => {
|
28404
|
+
if (v.error.tag === "Just") {
|
28405
|
+
return log(showErrorImpl(v.error._1));
|
28406
|
+
}
|
28407
|
+
if (v.error.tag === "Nothing") {
|
28408
|
+
const $0 = toString2(monadEffect)(ASCII)(v.stdout);
|
28409
|
+
return () => {
|
28410
|
+
const out = $0();
|
28411
|
+
return log(out)();
|
28412
|
+
};
|
28413
|
+
}
|
28414
|
+
fail();
|
28415
|
+
});
|
28416
|
+
var dispatchCommand = (v) => {
|
28417
|
+
if (v.tag === "Evaluate") {
|
28418
|
+
return output(v._1);
|
28419
|
+
}
|
28420
|
+
if (v.tag === "Publish") {
|
28421
|
+
const $0 = v._1;
|
28422
|
+
return _bind(_liftEffect(copyFiles(v._2)))(() => _bind(_liftEffect(log("Published")))(() => output($0)));
|
28423
|
+
}
|
28424
|
+
fail();
|
28425
|
+
};
|
28172
28426
|
var callback = (v) => {
|
28173
28427
|
if (v.tag === "Left") {
|
28174
28428
|
return log(showErrorImpl(v._1));
|
@@ -28261,6 +28515,50 @@ var program = /* @__PURE__ */ (() => $Parser(
|
|
28261
28515
|
})())
|
28262
28516
|
)
|
28263
28517
|
))();
|
28518
|
+
var publish = /* @__PURE__ */ (() => $Parser(
|
28519
|
+
"MultP",
|
28520
|
+
$MultPE(
|
28521
|
+
parserFunctor.map(Publish)(program),
|
28522
|
+
parserFunctor.map(Folder)(option(readerAsk)((() => {
|
28523
|
+
const $0 = help("root directory under dist/");
|
28524
|
+
const $1 = $0._2._2.tag === "Nothing" ? Nothing : $0._2._2;
|
28525
|
+
return $Mod(
|
28526
|
+
(x) => $0._1({
|
28527
|
+
optNames: [$OptName("OptShort", "r"), $OptName("OptLong", "root"), ...x.optNames],
|
28528
|
+
optCompleter: x.optCompleter,
|
28529
|
+
optNoArgError: x.optNoArgError
|
28530
|
+
}),
|
28531
|
+
$DefaultProp($Maybe("Just", "Misc"), $1.tag === "Nothing" ? Nothing : $1),
|
28532
|
+
(x) => $0._3(x)
|
28533
|
+
);
|
28534
|
+
})()))
|
28535
|
+
)
|
28536
|
+
))();
|
28537
|
+
var commandParser = /* @__PURE__ */ subparser(/* @__PURE__ */ (() => {
|
28538
|
+
const $0 = command("evaluate")(progDesc("Evaluate a file")({
|
28539
|
+
infoParser: parserFunctor.map(Evaluate)(program),
|
28540
|
+
infoFullDesc: true,
|
28541
|
+
infoProgDesc: mempty12,
|
28542
|
+
infoHeader: mempty12,
|
28543
|
+
infoFooter: mempty12,
|
28544
|
+
infoFailureCode: $$Error,
|
28545
|
+
infoPolicy: Intersperse
|
28546
|
+
}));
|
28547
|
+
const $1 = command("publish")(progDesc("Publish a file")({
|
28548
|
+
infoParser: publish,
|
28549
|
+
infoFullDesc: true,
|
28550
|
+
infoProgDesc: mempty12,
|
28551
|
+
infoHeader: mempty12,
|
28552
|
+
infoFooter: mempty12,
|
28553
|
+
infoFailureCode: $$Error,
|
28554
|
+
infoPolicy: Intersperse
|
28555
|
+
}));
|
28556
|
+
return $Mod(
|
28557
|
+
(x) => $1._1($0._1(x)),
|
28558
|
+
$DefaultProp($1._2._1.tag === "Nothing" ? $0._2._1 : $1._2._1, $1._2._2.tag === "Nothing" ? $0._2._2 : $1._2._2),
|
28559
|
+
(x) => $1._3($0._3(x))
|
28560
|
+
);
|
28561
|
+
})());
|
28264
28562
|
var main = /* @__PURE__ */ (() => {
|
28265
28563
|
const $0 = runAff(callback)(_bind(_liftEffect((() => {
|
28266
28564
|
const $02 = header("parse - a simple parser")(progDesc("Parse a file")({
|
@@ -28268,7 +28566,7 @@ var main = /* @__PURE__ */ (() => {
|
|
28268
28566
|
infoFailureCode: $$Error,
|
28269
28567
|
infoFooter: mempty12,
|
28270
28568
|
infoHeader: mempty12,
|
28271
|
-
infoParser: apApplyFlipped(parserApply)(
|
28569
|
+
infoParser: apApplyFlipped(parserApply)(commandParser)(helper),
|
28272
28570
|
infoPolicy: Intersperse,
|
28273
28571
|
infoProgDesc: mempty12
|
28274
28572
|
}));
|
@@ -28276,7 +28574,7 @@ var main = /* @__PURE__ */ (() => {
|
|
28276
28574
|
const a$p = getArgs();
|
28277
28575
|
return handleParseResult(execParserPure(defaultPrefs)($02)(a$p))();
|
28278
28576
|
};
|
28279
|
-
})()))(
|
28577
|
+
})()))(dispatchCommand));
|
28280
28578
|
return () => {
|
28281
28579
|
$0();
|
28282
28580
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@explorable-viz/fluid",
|
3
|
-
"version": "0.7.
|
3
|
+
"version": "0.7.19",
|
4
4
|
"description": "Fluid is an experimental programming language which integrates a bidirectional dynamic analysis to connect outputs to data sources in a fine-grained way. Fluid is implemented in PureScript and runs in the browser.",
|
5
5
|
"main": "index.js",
|
6
6
|
"repository": {
|
@@ -18,7 +18,10 @@
|
|
18
18
|
},
|
19
19
|
"homepage": "https://f.luid.org",
|
20
20
|
"files": [
|
21
|
-
"dist/fluid/"
|
21
|
+
"dist/fluid/",
|
22
|
+
"script/bundle-website.sh",
|
23
|
+
"script/util/",
|
24
|
+
"script/bundle-page.sh"
|
22
25
|
],
|
23
26
|
"scripts": {
|
24
27
|
"tidy": "./script/tidy.sh",
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
# run from project root
|
3
|
+
set -xe
|
4
|
+
|
5
|
+
MODULE=$1
|
6
|
+
SRC_PATH=${MODULE//./\/}
|
7
|
+
SRC_PATH_LISP_CASE=$(./script/util/lisp-case.sh "$SRC_PATH")
|
8
|
+
echo "$SRC_PATH -> $SRC_PATH_LISP_CASE"
|
9
|
+
|
10
|
+
if [[ ! -e "website/$SRC_PATH.purs" ]]; then
|
11
|
+
./script/util/clean.sh $SRC_PATH_LISP_CASE
|
12
|
+
cp website/$SRC_PATH.html dist/$SRC_PATH_LISP_CASE/index.html
|
13
|
+
else
|
14
|
+
./script/util/bundle.sh $SRC_PATH_LISP_CASE Website.$MODULE
|
15
|
+
|
16
|
+
if [[ -e "website/$SRC_PATH.html" ]]; then
|
17
|
+
cp website/$SRC_PATH.html dist/$SRC_PATH_LISP_CASE/index.html
|
18
|
+
else
|
19
|
+
cp website/FluidOrg/template.html dist/$SRC_PATH_LISP_CASE/index.html
|
20
|
+
fi
|
21
|
+
fi
|
@@ -0,0 +1,44 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
# run from project root
|
3
|
+
set -xe
|
4
|
+
|
5
|
+
WEBSITE=$1
|
6
|
+
. script/bundle-page.sh $WEBSITE
|
7
|
+
|
8
|
+
# Only support one level of nesting for now
|
9
|
+
shopt -s nullglob
|
10
|
+
|
11
|
+
set +x
|
12
|
+
PAGES=($(for FILE in website/$WEBSITE/*.purs; do
|
13
|
+
basename "$FILE" | sed 's/\.[^.]*$//'
|
14
|
+
done | sort -u))
|
15
|
+
set -x
|
16
|
+
|
17
|
+
echo "Processing ${WEBSITE} pages: ${PAGES[@]}"
|
18
|
+
|
19
|
+
for PAGE in "${PAGES[@]}"; do
|
20
|
+
. script/bundle-page.sh $WEBSITE.$PAGE
|
21
|
+
done
|
22
|
+
|
23
|
+
WEBSITE_LISP_CASE=$(./script/util/lisp-case.sh "$WEBSITE")
|
24
|
+
|
25
|
+
set +x
|
26
|
+
TO_COPY=()
|
27
|
+
for CHILD in website/$WEBSITE/*; do
|
28
|
+
BASENAME="$(basename "$CHILD")"
|
29
|
+
if [[ "$BASENAME" =~ ^[a-z] ]]; then
|
30
|
+
TO_COPY+=("$CHILD")
|
31
|
+
fi
|
32
|
+
done
|
33
|
+
set -x
|
34
|
+
|
35
|
+
echo "Processing static files:"
|
36
|
+
|
37
|
+
for CHILD in "${TO_COPY[@]}"; do
|
38
|
+
BASENAME="$(basename "$CHILD")"
|
39
|
+
cp -rL "$CHILD" "dist/$WEBSITE_LISP_CASE/$BASENAME"
|
40
|
+
done
|
41
|
+
|
42
|
+
shopt -u nullglob
|
43
|
+
cp -r fluid dist/$WEBSITE_LISP_CASE
|
44
|
+
echo "Bundled website $WEBSITE"
|