insync-stage-handler 3.1.3 → 4.0.0-beta.1
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/library.js +800 -577
- package/dist/library.js.map +1 -1
- package/dist/module.js +782 -579
- package/dist/module.js.map +1 -1
- package/package.json +36 -23
package/dist/library.js
CHANGED
|
@@ -2,14 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
|
-
|
|
7
5
|
var R = require('ramda');
|
|
8
|
-
var Ajv =
|
|
6
|
+
var Ajv = require('ajv');
|
|
9
7
|
var fp = require('date-fns/fp');
|
|
10
8
|
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n["default"] = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var R__namespace = /*#__PURE__*/_interopNamespace(R);
|
|
30
|
+
var Ajv__default = /*#__PURE__*/_interopDefaultLegacy(Ajv);
|
|
31
|
+
|
|
11
32
|
const lookup = R.flip(R.prop);
|
|
12
|
-
|
|
33
|
+
R.flip(R.path);
|
|
13
34
|
const lookupAll = R.curry((from, ids) => R.map(lookup(from), ids));
|
|
14
35
|
const lookupPathAll = R.curry((from, p, ids) => R.map(R.compose(R.path(p), lookup(from)), ids));
|
|
15
36
|
const indexById = R.indexBy(R.prop("id"));
|
|
@@ -19,16 +40,13 @@ const listEntities = R.curry((entitiesContainerPath, from) => R.pipe(R.converge(
|
|
|
19
40
|
* Return the version of a stage object.
|
|
20
41
|
* @param {Object} stage The stage for which to return the version.
|
|
21
42
|
*/
|
|
22
|
-
|
|
23
43
|
var detectVersion = R.pipe(R.prop("version"), R.defaultTo(1));
|
|
24
44
|
|
|
25
45
|
class ValidationError extends Error {
|
|
26
46
|
setErrors(errors) {
|
|
27
47
|
this.errors = errors;
|
|
28
48
|
}
|
|
29
|
-
|
|
30
49
|
}
|
|
31
|
-
|
|
32
50
|
const formatErrorMessage = errors => {
|
|
33
51
|
const header = "Validation errors occurred: \n";
|
|
34
52
|
return R.pipe(R.map(({
|
|
@@ -36,26 +54,22 @@ const formatErrorMessage = errors => {
|
|
|
36
54
|
message
|
|
37
55
|
}) => `path: "${dataPath}", message: ${message}`), R.map(R.of), R.map(R.pipe(R.prepend(" - "), R.append("\n"))), R.flatten, R.prepend(header), R.join(""))(errors);
|
|
38
56
|
};
|
|
39
|
-
|
|
40
|
-
var createValidationError = (errors => {
|
|
57
|
+
var createValidationError = errors => {
|
|
41
58
|
const err = new ValidationError(formatErrorMessage(errors));
|
|
42
59
|
err.setErrors(errors);
|
|
43
60
|
return err;
|
|
44
|
-
}
|
|
61
|
+
};
|
|
45
62
|
|
|
46
|
-
const ajv = new
|
|
63
|
+
const ajv = new Ajv__default["default"]({
|
|
47
64
|
$data: true,
|
|
48
65
|
allErrors: true,
|
|
49
66
|
logger: false
|
|
50
67
|
});
|
|
51
|
-
|
|
52
68
|
require("ajv-keywords")(ajv, "formatMinimum");
|
|
53
69
|
/**
|
|
54
70
|
* Creates a JSON schema validator.
|
|
55
71
|
* @param {Object} obj Object containing json schema rules.
|
|
56
72
|
*/
|
|
57
|
-
|
|
58
|
-
|
|
59
73
|
const createAJVValidator = schema => {
|
|
60
74
|
const validator = ajv.compile(schema);
|
|
61
75
|
return stage => {
|
|
@@ -71,11 +85,11 @@ const createAJVValidator = schema => {
|
|
|
71
85
|
};
|
|
72
86
|
};
|
|
73
87
|
|
|
74
|
-
var $schema = "http://json-schema.org/draft-07/schema#";
|
|
75
|
-
var id = "stage.1.schema.json";
|
|
76
|
-
var description = "Version 1 of stage file";
|
|
77
|
-
var type = "object";
|
|
78
|
-
var definitions = {
|
|
88
|
+
var $schema$3 = "http://json-schema.org/draft-07/schema#";
|
|
89
|
+
var id$3 = "stage.1.schema.json";
|
|
90
|
+
var description$4 = "Version 1 of stage file";
|
|
91
|
+
var type$3 = "object";
|
|
92
|
+
var definitions$3 = {
|
|
79
93
|
entitiesContainer: {
|
|
80
94
|
type: "object",
|
|
81
95
|
properties: {
|
|
@@ -623,7 +637,7 @@ var definitions = {
|
|
|
623
637
|
]
|
|
624
638
|
}
|
|
625
639
|
};
|
|
626
|
-
var properties = {
|
|
640
|
+
var properties$3 = {
|
|
627
641
|
menu: {
|
|
628
642
|
type: "object",
|
|
629
643
|
properties: {
|
|
@@ -765,25 +779,25 @@ var properties = {
|
|
|
765
779
|
}
|
|
766
780
|
}
|
|
767
781
|
};
|
|
768
|
-
var schema = {
|
|
769
|
-
$schema: $schema,
|
|
770
|
-
id: id,
|
|
771
|
-
description: description,
|
|
772
|
-
type: type,
|
|
773
|
-
definitions: definitions,
|
|
774
|
-
properties: properties
|
|
782
|
+
var schema$3 = {
|
|
783
|
+
$schema: $schema$3,
|
|
784
|
+
id: id$3,
|
|
785
|
+
description: description$4,
|
|
786
|
+
type: type$3,
|
|
787
|
+
definitions: definitions$3,
|
|
788
|
+
properties: properties$3
|
|
775
789
|
};
|
|
776
790
|
|
|
777
|
-
const jsonSchemaValidator = createAJVValidator(schema);
|
|
778
|
-
var v1 =
|
|
779
|
-
return jsonSchemaValidator(stage);
|
|
780
|
-
}
|
|
791
|
+
const jsonSchemaValidator$3 = createAJVValidator(schema$3);
|
|
792
|
+
var v1 = stage => {
|
|
793
|
+
return jsonSchemaValidator$3(stage);
|
|
794
|
+
};
|
|
781
795
|
|
|
782
|
-
var $schema$
|
|
783
|
-
var id$
|
|
784
|
-
var description$
|
|
785
|
-
var type$
|
|
786
|
-
var definitions$
|
|
796
|
+
var $schema$2 = "http://json-schema.org/draft-07/schema#";
|
|
797
|
+
var id$2 = "stage.2.schema.json";
|
|
798
|
+
var description$3 = "Version 2 of stage file";
|
|
799
|
+
var type$2 = "object";
|
|
800
|
+
var definitions$2 = {
|
|
787
801
|
entitiesContainer: {
|
|
788
802
|
type: "object",
|
|
789
803
|
properties: {
|
|
@@ -1344,7 +1358,7 @@ var definitions$1 = {
|
|
|
1344
1358
|
]
|
|
1345
1359
|
}
|
|
1346
1360
|
};
|
|
1347
|
-
var properties$
|
|
1361
|
+
var properties$2 = {
|
|
1348
1362
|
menu: {
|
|
1349
1363
|
type: "object",
|
|
1350
1364
|
properties: {
|
|
@@ -1486,25 +1500,25 @@ var properties$1 = {
|
|
|
1486
1500
|
}
|
|
1487
1501
|
}
|
|
1488
1502
|
};
|
|
1489
|
-
var schema$
|
|
1490
|
-
$schema: $schema$
|
|
1491
|
-
id: id$
|
|
1492
|
-
description: description$
|
|
1493
|
-
type: type$
|
|
1494
|
-
definitions: definitions$
|
|
1495
|
-
properties: properties$
|
|
1503
|
+
var schema$2 = {
|
|
1504
|
+
$schema: $schema$2,
|
|
1505
|
+
id: id$2,
|
|
1506
|
+
description: description$3,
|
|
1507
|
+
type: type$2,
|
|
1508
|
+
definitions: definitions$2,
|
|
1509
|
+
properties: properties$2
|
|
1496
1510
|
};
|
|
1497
1511
|
|
|
1498
|
-
const jsonSchemaValidator$
|
|
1499
|
-
var v2 =
|
|
1500
|
-
return jsonSchemaValidator$
|
|
1501
|
-
}
|
|
1512
|
+
const jsonSchemaValidator$2 = createAJVValidator(schema$2);
|
|
1513
|
+
var v2 = stage => {
|
|
1514
|
+
return jsonSchemaValidator$2(stage);
|
|
1515
|
+
};
|
|
1502
1516
|
|
|
1503
|
-
var $schema$
|
|
1504
|
-
var id$
|
|
1517
|
+
var $schema$1 = "http://json-schema.org/draft-07/schema#";
|
|
1518
|
+
var id$1 = "stage.3.schema.json";
|
|
1505
1519
|
var description$2 = "Version 3 of stage file";
|
|
1506
|
-
var type$
|
|
1507
|
-
var definitions$
|
|
1520
|
+
var type$1 = "object";
|
|
1521
|
+
var definitions$1 = {
|
|
1508
1522
|
entitiesContainer: {
|
|
1509
1523
|
type: "object",
|
|
1510
1524
|
properties: {
|
|
@@ -2061,7 +2075,7 @@ var definitions$2 = {
|
|
|
2061
2075
|
]
|
|
2062
2076
|
}
|
|
2063
2077
|
};
|
|
2064
|
-
var properties$
|
|
2078
|
+
var properties$1 = {
|
|
2065
2079
|
menu: {
|
|
2066
2080
|
type: "object",
|
|
2067
2081
|
properties: {
|
|
@@ -2200,25 +2214,25 @@ var properties$2 = {
|
|
|
2200
2214
|
}
|
|
2201
2215
|
}
|
|
2202
2216
|
};
|
|
2203
|
-
var schema$
|
|
2204
|
-
$schema: $schema$
|
|
2205
|
-
id: id$
|
|
2217
|
+
var schema$1 = {
|
|
2218
|
+
$schema: $schema$1,
|
|
2219
|
+
id: id$1,
|
|
2206
2220
|
description: description$2,
|
|
2207
|
-
type: type$
|
|
2208
|
-
definitions: definitions$
|
|
2209
|
-
properties: properties$
|
|
2221
|
+
type: type$1,
|
|
2222
|
+
definitions: definitions$1,
|
|
2223
|
+
properties: properties$1
|
|
2210
2224
|
};
|
|
2211
2225
|
|
|
2212
|
-
const jsonSchemaValidator$
|
|
2213
|
-
var v3 =
|
|
2214
|
-
return jsonSchemaValidator$
|
|
2215
|
-
}
|
|
2226
|
+
const jsonSchemaValidator$1 = createAJVValidator(schema$1);
|
|
2227
|
+
var v3$1 = stage => {
|
|
2228
|
+
return jsonSchemaValidator$1(stage);
|
|
2229
|
+
};
|
|
2216
2230
|
|
|
2217
|
-
var $schema
|
|
2218
|
-
var id
|
|
2219
|
-
var description$
|
|
2220
|
-
var type
|
|
2221
|
-
var definitions
|
|
2231
|
+
var $schema = "http://json-schema.org/draft-07/schema#";
|
|
2232
|
+
var id = "stage.4.schema.json";
|
|
2233
|
+
var description$1 = "Version 4 of stage file - DockView layout format";
|
|
2234
|
+
var type = "object";
|
|
2235
|
+
var definitions = {
|
|
2222
2236
|
entitiesContainer: {
|
|
2223
2237
|
type: "object",
|
|
2224
2238
|
properties: {
|
|
@@ -2247,6 +2261,17 @@ var definitions$3 = {
|
|
|
2247
2261
|
"id"
|
|
2248
2262
|
]
|
|
2249
2263
|
},
|
|
2264
|
+
ref: {
|
|
2265
|
+
type: "object",
|
|
2266
|
+
properties: {
|
|
2267
|
+
type: {
|
|
2268
|
+
type: "string"
|
|
2269
|
+
},
|
|
2270
|
+
id: {
|
|
2271
|
+
type: "string"
|
|
2272
|
+
}
|
|
2273
|
+
}
|
|
2274
|
+
},
|
|
2250
2275
|
asset: {
|
|
2251
2276
|
allOf: [
|
|
2252
2277
|
{
|
|
@@ -2265,7 +2290,7 @@ var definitions$3 = {
|
|
|
2265
2290
|
}
|
|
2266
2291
|
]
|
|
2267
2292
|
},
|
|
2268
|
-
|
|
2293
|
+
timing: {
|
|
2269
2294
|
allOf: [
|
|
2270
2295
|
{
|
|
2271
2296
|
$ref: "#/definitions/entity"
|
|
@@ -2273,12 +2298,6 @@ var definitions$3 = {
|
|
|
2273
2298
|
{
|
|
2274
2299
|
type: "object",
|
|
2275
2300
|
properties: {
|
|
2276
|
-
type: {
|
|
2277
|
-
type: "string"
|
|
2278
|
-
},
|
|
2279
|
-
path: {
|
|
2280
|
-
type: "string"
|
|
2281
|
-
},
|
|
2282
2301
|
start: {
|
|
2283
2302
|
format: "date-time",
|
|
2284
2303
|
message: "Is not a valid date time"
|
|
@@ -2289,6 +2308,38 @@ var definitions$3 = {
|
|
|
2289
2308
|
formatMinimum: {
|
|
2290
2309
|
$data: "1/start"
|
|
2291
2310
|
}
|
|
2311
|
+
},
|
|
2312
|
+
ref: {
|
|
2313
|
+
$ref: "#definitions/ref"
|
|
2314
|
+
}
|
|
2315
|
+
},
|
|
2316
|
+
required: [
|
|
2317
|
+
"start",
|
|
2318
|
+
"end",
|
|
2319
|
+
"ref"
|
|
2320
|
+
]
|
|
2321
|
+
}
|
|
2322
|
+
]
|
|
2323
|
+
},
|
|
2324
|
+
file: {
|
|
2325
|
+
allOf: [
|
|
2326
|
+
{
|
|
2327
|
+
$ref: "#/definitions/entity"
|
|
2328
|
+
},
|
|
2329
|
+
{
|
|
2330
|
+
type: "object",
|
|
2331
|
+
properties: {
|
|
2332
|
+
type: {
|
|
2333
|
+
type: "string"
|
|
2334
|
+
},
|
|
2335
|
+
path: {
|
|
2336
|
+
type: "string"
|
|
2337
|
+
},
|
|
2338
|
+
fps: {
|
|
2339
|
+
type: "number"
|
|
2340
|
+
},
|
|
2341
|
+
originalFps: {
|
|
2342
|
+
type: "number"
|
|
2292
2343
|
}
|
|
2293
2344
|
},
|
|
2294
2345
|
required: [
|
|
@@ -2348,17 +2399,26 @@ var definitions$3 = {
|
|
|
2348
2399
|
configAvailable: {
|
|
2349
2400
|
type: "boolean"
|
|
2350
2401
|
},
|
|
2351
|
-
|
|
2352
|
-
type: "
|
|
2402
|
+
measurements: {
|
|
2403
|
+
type: "array",
|
|
2404
|
+
items: {
|
|
2405
|
+
time: "string"
|
|
2406
|
+
}
|
|
2353
2407
|
},
|
|
2354
|
-
|
|
2355
|
-
type: "
|
|
2408
|
+
zoomSteps: {
|
|
2409
|
+
type: "array",
|
|
2410
|
+
items: {
|
|
2411
|
+
type: "number"
|
|
2412
|
+
}
|
|
2413
|
+
},
|
|
2414
|
+
activeZoomStep: {
|
|
2415
|
+
type: "number"
|
|
2356
2416
|
}
|
|
2357
2417
|
}
|
|
2358
2418
|
}
|
|
2359
2419
|
]
|
|
2360
2420
|
},
|
|
2361
|
-
|
|
2421
|
+
measurement: {
|
|
2362
2422
|
allOf: [
|
|
2363
2423
|
{
|
|
2364
2424
|
$ref: "#/definitions/entity"
|
|
@@ -2376,33 +2436,6 @@ var definitions$3 = {
|
|
|
2376
2436
|
}
|
|
2377
2437
|
]
|
|
2378
2438
|
},
|
|
2379
|
-
outlet: {
|
|
2380
|
-
allOf: [
|
|
2381
|
-
{
|
|
2382
|
-
$ref: "#/definitions/entity"
|
|
2383
|
-
},
|
|
2384
|
-
{
|
|
2385
|
-
type: "object",
|
|
2386
|
-
properties: {
|
|
2387
|
-
streams: {
|
|
2388
|
-
type: "array",
|
|
2389
|
-
items: {
|
|
2390
|
-
type: "string"
|
|
2391
|
-
}
|
|
2392
|
-
},
|
|
2393
|
-
loading: {
|
|
2394
|
-
type: "boolean"
|
|
2395
|
-
},
|
|
2396
|
-
resolution: {
|
|
2397
|
-
type: "number"
|
|
2398
|
-
},
|
|
2399
|
-
visible: {
|
|
2400
|
-
type: "number"
|
|
2401
|
-
}
|
|
2402
|
-
}
|
|
2403
|
-
}
|
|
2404
|
-
]
|
|
2405
|
-
},
|
|
2406
2439
|
annotation: {
|
|
2407
2440
|
allOf: [
|
|
2408
2441
|
{
|
|
@@ -2472,10 +2505,7 @@ var definitions$3 = {
|
|
|
2472
2505
|
}
|
|
2473
2506
|
}
|
|
2474
2507
|
},
|
|
2475
|
-
|
|
2476
|
-
type: "string"
|
|
2477
|
-
},
|
|
2478
|
-
outletId: {
|
|
2508
|
+
measurement: {
|
|
2479
2509
|
type: "string"
|
|
2480
2510
|
}
|
|
2481
2511
|
}
|
|
@@ -2512,49 +2542,136 @@ var definitions$3 = {
|
|
|
2512
2542
|
}
|
|
2513
2543
|
]
|
|
2514
2544
|
},
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2545
|
+
dockviewLeafData: {
|
|
2546
|
+
type: "object",
|
|
2547
|
+
properties: {
|
|
2548
|
+
id: {
|
|
2549
|
+
type: "string"
|
|
2550
|
+
},
|
|
2551
|
+
views: {
|
|
2552
|
+
type: "array",
|
|
2553
|
+
items: {
|
|
2554
|
+
type: "string"
|
|
2555
|
+
}
|
|
2519
2556
|
},
|
|
2557
|
+
activeView: {
|
|
2558
|
+
type: "string"
|
|
2559
|
+
}
|
|
2560
|
+
},
|
|
2561
|
+
required: [
|
|
2562
|
+
"id",
|
|
2563
|
+
"views"
|
|
2564
|
+
]
|
|
2565
|
+
},
|
|
2566
|
+
dockviewNode: {
|
|
2567
|
+
oneOf: [
|
|
2520
2568
|
{
|
|
2521
2569
|
type: "object",
|
|
2522
2570
|
properties: {
|
|
2523
2571
|
type: {
|
|
2524
|
-
|
|
2572
|
+
"const": "leaf"
|
|
2525
2573
|
},
|
|
2526
|
-
|
|
2527
|
-
type: "
|
|
2574
|
+
size: {
|
|
2575
|
+
type: "number"
|
|
2528
2576
|
},
|
|
2529
|
-
|
|
2530
|
-
|
|
2577
|
+
data: {
|
|
2578
|
+
$ref: "#/definitions/dockviewLeafData"
|
|
2579
|
+
}
|
|
2580
|
+
},
|
|
2581
|
+
required: [
|
|
2582
|
+
"type",
|
|
2583
|
+
"data"
|
|
2584
|
+
]
|
|
2585
|
+
},
|
|
2586
|
+
{
|
|
2587
|
+
type: "object",
|
|
2588
|
+
properties: {
|
|
2589
|
+
type: {
|
|
2590
|
+
"const": "branch"
|
|
2531
2591
|
},
|
|
2532
|
-
|
|
2533
|
-
type: "
|
|
2592
|
+
size: {
|
|
2593
|
+
type: "number"
|
|
2534
2594
|
},
|
|
2535
|
-
|
|
2595
|
+
data: {
|
|
2536
2596
|
type: "array",
|
|
2537
2597
|
items: {
|
|
2538
|
-
|
|
2598
|
+
$ref: "#/definitions/dockviewNode"
|
|
2539
2599
|
}
|
|
2600
|
+
}
|
|
2601
|
+
},
|
|
2602
|
+
required: [
|
|
2603
|
+
"type",
|
|
2604
|
+
"data"
|
|
2605
|
+
]
|
|
2606
|
+
}
|
|
2607
|
+
]
|
|
2608
|
+
},
|
|
2609
|
+
dockviewPanel: {
|
|
2610
|
+
type: "object",
|
|
2611
|
+
properties: {
|
|
2612
|
+
id: {
|
|
2613
|
+
type: "string"
|
|
2614
|
+
},
|
|
2615
|
+
contentComponent: {
|
|
2616
|
+
type: "string"
|
|
2617
|
+
},
|
|
2618
|
+
title: {
|
|
2619
|
+
type: "string"
|
|
2620
|
+
},
|
|
2621
|
+
params: {
|
|
2622
|
+
type: "object"
|
|
2623
|
+
}
|
|
2624
|
+
},
|
|
2625
|
+
required: [
|
|
2626
|
+
"id",
|
|
2627
|
+
"contentComponent",
|
|
2628
|
+
"title",
|
|
2629
|
+
"params"
|
|
2630
|
+
]
|
|
2631
|
+
},
|
|
2632
|
+
dockviewLayout: {
|
|
2633
|
+
type: "object",
|
|
2634
|
+
properties: {
|
|
2635
|
+
grid: {
|
|
2636
|
+
type: "object",
|
|
2637
|
+
properties: {
|
|
2638
|
+
root: {
|
|
2639
|
+
$ref: "#/definitions/dockviewNode"
|
|
2640
|
+
},
|
|
2641
|
+
orientation: {
|
|
2642
|
+
type: "string",
|
|
2643
|
+
"enum": [
|
|
2644
|
+
"HORIZONTAL",
|
|
2645
|
+
"VERTICAL"
|
|
2646
|
+
]
|
|
2647
|
+
},
|
|
2648
|
+
width: {
|
|
2649
|
+
type: "number"
|
|
2540
2650
|
},
|
|
2541
|
-
props: {
|
|
2542
|
-
type: "object"
|
|
2543
|
-
},
|
|
2544
|
-
component: {
|
|
2545
|
-
type: "string"
|
|
2546
|
-
},
|
|
2547
|
-
componentState: {
|
|
2548
|
-
type: "object"
|
|
2549
|
-
},
|
|
2550
|
-
width: {
|
|
2551
|
-
type: "number"
|
|
2552
|
-
},
|
|
2553
2651
|
height: {
|
|
2554
2652
|
type: "number"
|
|
2555
2653
|
}
|
|
2654
|
+
},
|
|
2655
|
+
required: [
|
|
2656
|
+
"root",
|
|
2657
|
+
"orientation",
|
|
2658
|
+
"width",
|
|
2659
|
+
"height"
|
|
2660
|
+
]
|
|
2661
|
+
},
|
|
2662
|
+
panels: {
|
|
2663
|
+
type: "object",
|
|
2664
|
+
additionalProperties: {
|
|
2665
|
+
$ref: "#/definitions/dockviewPanel"
|
|
2556
2666
|
}
|
|
2667
|
+
},
|
|
2668
|
+
activeGroup: {
|
|
2669
|
+
type: "string"
|
|
2557
2670
|
}
|
|
2671
|
+
},
|
|
2672
|
+
required: [
|
|
2673
|
+
"grid",
|
|
2674
|
+
"panels"
|
|
2558
2675
|
]
|
|
2559
2676
|
},
|
|
2560
2677
|
axis: {
|
|
@@ -2668,25 +2785,7 @@ var definitions$3 = {
|
|
|
2668
2785
|
}
|
|
2669
2786
|
]
|
|
2670
2787
|
},
|
|
2671
|
-
|
|
2672
|
-
allOf: [
|
|
2673
|
-
{
|
|
2674
|
-
$ref: "#/definitions/entitiesContainer"
|
|
2675
|
-
},
|
|
2676
|
-
{
|
|
2677
|
-
type: "object",
|
|
2678
|
-
properties: {
|
|
2679
|
-
byId: {
|
|
2680
|
-
type: "object",
|
|
2681
|
-
additionalProperties: {
|
|
2682
|
-
$ref: "#/definitions/dataStream"
|
|
2683
|
-
}
|
|
2684
|
-
}
|
|
2685
|
-
}
|
|
2686
|
-
}
|
|
2687
|
-
]
|
|
2688
|
-
},
|
|
2689
|
-
outletsContainer: {
|
|
2788
|
+
measurementsContainer: {
|
|
2690
2789
|
allOf: [
|
|
2691
2790
|
{
|
|
2692
2791
|
$ref: "#/definitions/entitiesContainer"
|
|
@@ -2697,7 +2796,7 @@ var definitions$3 = {
|
|
|
2697
2796
|
byId: {
|
|
2698
2797
|
type: "object",
|
|
2699
2798
|
additionalProperties: {
|
|
2700
|
-
$ref: "#/definitions/
|
|
2799
|
+
$ref: "#/definitions/measurement"
|
|
2701
2800
|
}
|
|
2702
2801
|
}
|
|
2703
2802
|
}
|
|
@@ -2740,24 +2839,6 @@ var definitions$3 = {
|
|
|
2740
2839
|
}
|
|
2741
2840
|
]
|
|
2742
2841
|
},
|
|
2743
|
-
layoutSectionsContainer: {
|
|
2744
|
-
allOf: [
|
|
2745
|
-
{
|
|
2746
|
-
$ref: "#/definitions/entitiesContainer"
|
|
2747
|
-
},
|
|
2748
|
-
{
|
|
2749
|
-
type: "object",
|
|
2750
|
-
properties: {
|
|
2751
|
-
byId: {
|
|
2752
|
-
type: "object",
|
|
2753
|
-
additionalProperties: {
|
|
2754
|
-
$ref: "#/definitions/layoutSection"
|
|
2755
|
-
}
|
|
2756
|
-
}
|
|
2757
|
-
}
|
|
2758
|
-
}
|
|
2759
|
-
]
|
|
2760
|
-
},
|
|
2761
2842
|
axesContainer: {
|
|
2762
2843
|
allOf: [
|
|
2763
2844
|
{
|
|
@@ -2777,7 +2858,11 @@ var definitions$3 = {
|
|
|
2777
2858
|
]
|
|
2778
2859
|
}
|
|
2779
2860
|
};
|
|
2780
|
-
var properties
|
|
2861
|
+
var properties = {
|
|
2862
|
+
version: {
|
|
2863
|
+
type: "number",
|
|
2864
|
+
"const": 4
|
|
2865
|
+
},
|
|
2781
2866
|
menu: {
|
|
2782
2867
|
type: "object",
|
|
2783
2868
|
properties: {
|
|
@@ -2825,6 +2910,30 @@ var properties$3 = {
|
|
|
2825
2910
|
}
|
|
2826
2911
|
}
|
|
2827
2912
|
},
|
|
2913
|
+
layout: {
|
|
2914
|
+
type: "object",
|
|
2915
|
+
properties: {
|
|
2916
|
+
dockviewLayout: {
|
|
2917
|
+
oneOf: [
|
|
2918
|
+
{
|
|
2919
|
+
$ref: "#/definitions/dockviewLayout"
|
|
2920
|
+
},
|
|
2921
|
+
{
|
|
2922
|
+
type: "null"
|
|
2923
|
+
}
|
|
2924
|
+
]
|
|
2925
|
+
},
|
|
2926
|
+
focus: {
|
|
2927
|
+
type: "string"
|
|
2928
|
+
},
|
|
2929
|
+
dragging: {
|
|
2930
|
+
type: "boolean"
|
|
2931
|
+
},
|
|
2932
|
+
resizingPanels: {
|
|
2933
|
+
type: "boolean"
|
|
2934
|
+
}
|
|
2935
|
+
}
|
|
2936
|
+
},
|
|
2828
2937
|
data: {
|
|
2829
2938
|
type: "object",
|
|
2830
2939
|
properties: {
|
|
@@ -2837,11 +2946,8 @@ var properties$3 = {
|
|
|
2837
2946
|
dataViewers: {
|
|
2838
2947
|
$ref: "#/definitions/dataViewersContainer"
|
|
2839
2948
|
},
|
|
2840
|
-
|
|
2841
|
-
$ref: "#/definitions/
|
|
2842
|
-
},
|
|
2843
|
-
outlets: {
|
|
2844
|
-
$ref: "#/definitions/outletsContainer"
|
|
2949
|
+
measurements: {
|
|
2950
|
+
$ref: "#/definitions/measurementsContainer"
|
|
2845
2951
|
}
|
|
2846
2952
|
}
|
|
2847
2953
|
}
|
|
@@ -2919,78 +3025,82 @@ var properties$3 = {
|
|
|
2919
3025
|
}
|
|
2920
3026
|
}
|
|
2921
3027
|
};
|
|
2922
|
-
var schema
|
|
2923
|
-
$schema: $schema
|
|
2924
|
-
id: id
|
|
2925
|
-
description: description$
|
|
2926
|
-
type: type
|
|
2927
|
-
definitions: definitions
|
|
2928
|
-
properties: properties
|
|
3028
|
+
var schema = {
|
|
3029
|
+
$schema: $schema,
|
|
3030
|
+
id: id,
|
|
3031
|
+
description: description$1,
|
|
3032
|
+
type: type,
|
|
3033
|
+
definitions: definitions,
|
|
3034
|
+
properties: properties
|
|
2929
3035
|
};
|
|
2930
3036
|
|
|
2931
|
-
const jsonSchemaValidator
|
|
2932
|
-
var
|
|
2933
|
-
return jsonSchemaValidator
|
|
2934
|
-
}
|
|
3037
|
+
const jsonSchemaValidator = createAJVValidator(schema);
|
|
3038
|
+
var v4 = stage => {
|
|
3039
|
+
return jsonSchemaValidator(stage);
|
|
3040
|
+
};
|
|
2935
3041
|
|
|
2936
3042
|
const map = Object.freeze({
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
3043
|
+
1: v1,
|
|
3044
|
+
2: v2,
|
|
3045
|
+
3: v3$1,
|
|
3046
|
+
4: v4
|
|
2941
3047
|
});
|
|
2942
3048
|
|
|
2943
3049
|
/**
|
|
2944
3050
|
* Parses validation specific options from global options.
|
|
2945
3051
|
* @param {obj} options
|
|
2946
3052
|
*/
|
|
2947
|
-
|
|
2948
|
-
const optionsParser = ({
|
|
3053
|
+
const optionsParser$1 = ({
|
|
2949
3054
|
validationVersion = undefined
|
|
2950
3055
|
}) => ({
|
|
2951
3056
|
version: validationVersion
|
|
2952
3057
|
});
|
|
3058
|
+
|
|
2953
3059
|
/**
|
|
2954
3060
|
* Validates a stage
|
|
2955
3061
|
* @param {Object} stage
|
|
2956
3062
|
* @param {number} version
|
|
2957
3063
|
*/
|
|
2958
3064
|
|
|
2959
|
-
var validate = (
|
|
3065
|
+
var validate = (stage, options = {}) => {
|
|
2960
3066
|
const {
|
|
2961
3067
|
version = undefined
|
|
2962
3068
|
} = options;
|
|
2963
3069
|
return R.pipe(R.defaultTo(detectVersion(stage)), lookup(map), R.applyTo(stage))(version);
|
|
2964
|
-
}
|
|
3070
|
+
};
|
|
2965
3071
|
|
|
2966
|
-
var versions = Object.freeze([1, 2, 3,
|
|
3072
|
+
var versions = Object.freeze([1, 2, 3, 4]);
|
|
2967
3073
|
|
|
2968
3074
|
/**
|
|
2969
3075
|
* v1-to-v2.js
|
|
2970
3076
|
* Upgrader for version 1 stage files to version 2.
|
|
2971
3077
|
* Removes timelines axes with resources. And adds the zoomSteps for the dataviewer.
|
|
2972
3078
|
*/
|
|
2973
|
-
const outletsView = listEntities(["data", "entities", "outlets"]);
|
|
3079
|
+
const outletsView = listEntities(["data", "entities", "outlets"]);
|
|
2974
3080
|
|
|
2975
|
-
|
|
3081
|
+
// This adds the zoomsteps on dataviwer based on "visible" prop on the associated outlet.
|
|
3082
|
+
const addDataViewerZoomSteps = stage => R.pipe(outletsView,
|
|
3083
|
+
// The association to a dataviewer is defined in the outlet id (dataviewer/<DATAVIEWER ID>),
|
|
2976
3084
|
// This only takes outlets associated with a dataviewer.
|
|
2977
|
-
R.filter(R.propSatisfies(R.startsWith("dataviewer/"), "id")), R.map(
|
|
2978
|
-
|
|
3085
|
+
R.filter(R.propSatisfies(R.startsWith("dataviewer/"), "id")), R.map(
|
|
3086
|
+
// This pairs the path to the associated dataviewer to its required zoomSteps.
|
|
3087
|
+
R.converge(R.pair, [R.pipe(R.prop("id"), R.replace("dataviewer/", ""), id => ["data", "entities", "dataViewers", "byId", id, "zoomSteps"]), R.pipe(R.prop("visible"), visible => [visible])])),
|
|
3088
|
+
// Set the "zoomSteps" prop of the dataviewer to the visibility of the outlet.
|
|
2979
3089
|
R.reduce((acc, [path, zoomSteps]) => R.assocPath(path, zoomSteps, acc), stage))(stage);
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
R.assoc("version", 2),
|
|
3090
|
+
var v1ToV2 = R.pipe(
|
|
3091
|
+
// Sets the version prop to "2"
|
|
3092
|
+
R.assoc("version", 2),
|
|
3093
|
+
// Remove the association to resources from the timline axes.
|
|
2983
3094
|
// In version 2 the tracks for files on the timeline are handled by the v2 consolidation strategy.
|
|
2984
|
-
R.dissocPath(["timeline", "entities", "axes", "byId", "video", "resources"]), R.dissocPath(["timeline", "entities", "axes", "byId", "high-speed", "resources"]),
|
|
3095
|
+
R.dissocPath(["timeline", "entities", "axes", "byId", "video", "resources"]), R.dissocPath(["timeline", "entities", "axes", "byId", "high-speed", "resources"]),
|
|
3096
|
+
// Adds the zoomsteps to the dataviewers.
|
|
2985
3097
|
addDataViewerZoomSteps);
|
|
2986
3098
|
|
|
2987
|
-
const NEW_TEST_REGEX = /^([0-9]{5})_(.+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)$/;
|
|
2988
|
-
|
|
2989
|
-
const
|
|
2990
|
-
|
|
2991
|
-
const
|
|
2992
|
-
const mapWithIndex = R.addIndex(R.map);
|
|
2993
|
-
const axesSettings = [{
|
|
3099
|
+
const NEW_TEST_REGEX$1 = /^([0-9]{5})_(.+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)$/;
|
|
3100
|
+
const fsPath$1 = require("path");
|
|
3101
|
+
const match$1 = R__namespace.curry((regex, st) => st.match(regex));
|
|
3102
|
+
const mapWithIndex$1 = R__namespace.addIndex(R__namespace.map);
|
|
3103
|
+
const axesSettings$1 = [{
|
|
2994
3104
|
id: "video",
|
|
2995
3105
|
color: "#41b51b"
|
|
2996
3106
|
}, {
|
|
@@ -3000,43 +3110,45 @@ const axesSettings = [{
|
|
|
3000
3110
|
id: "comment",
|
|
3001
3111
|
color: "red"
|
|
3002
3112
|
}];
|
|
3003
|
-
const tracksIdsPath = ["timeline", "entities", "tracks", "ids"];
|
|
3004
|
-
const tracksByIdPath = ["timeline", "entities", "tracks", "byId"];
|
|
3005
|
-
const axesIdsPath = ["timeline", "entities", "axes", "ids"];
|
|
3006
|
-
const axesByIdPath = ["timeline", "entities", "axes", "byId"];
|
|
3007
|
-
const resourcesIdsView =
|
|
3008
|
-
const resourcesByIdView =
|
|
3009
|
-
const filesIdsView =
|
|
3010
|
-
const filesByIdView =
|
|
3011
|
-
const commentsByIdView =
|
|
3012
|
-
const tracksIdsLens =
|
|
3013
|
-
const tracksByIdLens =
|
|
3014
|
-
const axesIdsLens =
|
|
3015
|
-
const axesByIdLens =
|
|
3016
|
-
const filesView =
|
|
3017
|
-
const commentsView =
|
|
3018
|
-
|
|
3019
|
-
const
|
|
3020
|
-
const
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
resourcesIdsView,
|
|
3024
|
-
|
|
3025
|
-
|
|
3113
|
+
const tracksIdsPath$1 = ["timeline", "entities", "tracks", "ids"];
|
|
3114
|
+
const tracksByIdPath$1 = ["timeline", "entities", "tracks", "byId"];
|
|
3115
|
+
const axesIdsPath$1 = ["timeline", "entities", "axes", "ids"];
|
|
3116
|
+
const axesByIdPath$1 = ["timeline", "entities", "axes", "byId"];
|
|
3117
|
+
const resourcesIdsView$1 = R__namespace.pathOr([], ["resources", "entities", "resources", "ids"]);
|
|
3118
|
+
const resourcesByIdView$1 = R__namespace.pathOr({}, ["resources", "entities", "resources", "byId"]);
|
|
3119
|
+
const filesIdsView$1 = R__namespace.pathOr([], ["files", "entities", "files", "ids"]);
|
|
3120
|
+
const filesByIdView$1 = R__namespace.pathOr({}, ["files", "entities", "files", "byId"]);
|
|
3121
|
+
const commentsByIdView$1 = R__namespace.pathOr({}, ["timeline", "entities", "comments", "byId"]);
|
|
3122
|
+
const tracksIdsLens$1 = R__namespace.lensPath(tracksIdsPath$1);
|
|
3123
|
+
const tracksByIdLens$1 = R__namespace.lensPath(tracksByIdPath$1);
|
|
3124
|
+
const axesIdsLens$1 = R__namespace.lensPath(axesIdsPath$1);
|
|
3125
|
+
const axesByIdLens$1 = R__namespace.lensPath(axesByIdPath$1);
|
|
3126
|
+
const filesView = R__namespace.pipe(filesByIdView$1, R__namespace.values);
|
|
3127
|
+
const commentsView$1 = R__namespace.pipe(commentsByIdView$1, R__namespace.values);
|
|
3128
|
+
const highSpeedsFilesView$1 = stage => {
|
|
3129
|
+
const filesById = filesByIdView$1(stage);
|
|
3130
|
+
const resourcesById = resourcesByIdView$1(stage);
|
|
3131
|
+
return R__namespace.pipe(
|
|
3132
|
+
// Iterate R.over the resource ids
|
|
3133
|
+
resourcesIdsView$1,
|
|
3134
|
+
// Filter out all the ids that don't start with high-speed.
|
|
3135
|
+
R__namespace.filter(R__namespace.startsWith("high-speed:")),
|
|
3136
|
+
// Map the remaining resource ids to the files ids in the respective resource object.
|
|
3137
|
+
lookupPathAll(resourcesById, ["files"]),
|
|
3138
|
+
// Flatten the ids so we get a single array containing all the files ids referred
|
|
3026
3139
|
// to across all high-speed resources.
|
|
3027
|
-
|
|
3140
|
+
R__namespace.flatten,
|
|
3141
|
+
// Map the file ids to file objects.
|
|
3028
3142
|
lookupAll(filesById))(stage);
|
|
3029
3143
|
};
|
|
3030
|
-
|
|
3031
|
-
const
|
|
3032
|
-
const
|
|
3033
|
-
const
|
|
3034
|
-
|
|
3035
|
-
return R.pipe(R.without(R.pluck("id", highSpeedFiles)), lookupAll(filesById), R.filter(R.propEq("type", "video")))(filesIds);
|
|
3144
|
+
const videosFilesView$1 = stage => {
|
|
3145
|
+
const filesIds = filesIdsView$1(stage);
|
|
3146
|
+
const filesById = filesByIdView$1(stage);
|
|
3147
|
+
const highSpeedFiles = highSpeedsFilesView$1(stage);
|
|
3148
|
+
return R__namespace.pipe(R__namespace.without(R__namespace.pluck("id", highSpeedFiles)), lookupAll(filesById), R__namespace.filter(R__namespace.propEq("video", "type")))(filesIds);
|
|
3036
3149
|
};
|
|
3037
|
-
|
|
3038
|
-
const
|
|
3039
|
-
const createTrackFromEntity = R.curry((axis, entity) => {
|
|
3150
|
+
const upsertAxes$1 = axes => R__namespace.curry(R__namespace.pipe(R__namespace.unless(R__namespace.path(axesIdsPath$1), R__namespace.assocPath(axesIdsPath$1, [])), R__namespace.unless(R__namespace.path(axesByIdPath$1), R__namespace.assocPath(axesIdsPath$1, {})), R__namespace.over(axesIdsLens$1, R__namespace.union(R__namespace.pluck("id", axes))), R__namespace.over(axesByIdLens$1, R__namespace.mergeRight(indexById(axes)))));
|
|
3151
|
+
const createTrackFromEntity$1 = R__namespace.curry((axis, entity) => {
|
|
3040
3152
|
const {
|
|
3041
3153
|
start,
|
|
3042
3154
|
end,
|
|
@@ -3052,68 +3164,56 @@ const createTrackFromEntity = R.curry((axis, entity) => {
|
|
|
3052
3164
|
ref: id
|
|
3053
3165
|
};
|
|
3054
3166
|
});
|
|
3055
|
-
const mapEntitiesToTracks =
|
|
3056
|
-
const mapCommentsToTracks =
|
|
3167
|
+
const mapEntitiesToTracks$1 = R__namespace.curry((entitiesSelector, axis, stage) => R__namespace.map(createTrackFromEntity$1(axis), entitiesSelector(stage)));
|
|
3168
|
+
const mapCommentsToTracks$1 = R__namespace.pipe(mapEntitiesToTracks$1(commentsView$1, "comment"), R__namespace.map(R__namespace.mergeLeft({
|
|
3057
3169
|
type: "comment",
|
|
3058
3170
|
label: "comment"
|
|
3059
3171
|
})));
|
|
3060
|
-
|
|
3061
|
-
const
|
|
3062
|
-
|
|
3063
|
-
m, project, facility, program, category, test, experiment, measurement] = input.match(NEW_TEST_REGEX);
|
|
3172
|
+
const formatTestNo$1 = input => {
|
|
3173
|
+
const [
|
|
3174
|
+
// eslint-disable-next-line no-unused-vars
|
|
3175
|
+
m, project, facility, program, category, test, experiment, measurement] = input.match(NEW_TEST_REGEX$1);
|
|
3064
3176
|
return `${project}_${program.padStart(2, "0")}${facility}_${category.padStart(2, "0")}_${test.padStart(3, "0")}_${experiment.padStart(3, "0")}_${measurement.padStart(2, "0")}`;
|
|
3065
3177
|
};
|
|
3066
|
-
|
|
3067
|
-
const
|
|
3068
|
-
const
|
|
3069
|
-
|
|
3070
|
-
const extractTestNumber = (stage, track) => R.pipe(filesByIdView, R.prop(track.ref), R.either(extractTestNumberFromMetadata, extractTestNumberFromFileName))(stage);
|
|
3071
|
-
|
|
3072
|
-
const formatter = fp.formatWithOptions({
|
|
3178
|
+
const extractTestNumberFromMetadata$1 = R__namespace.pipe(R__namespace.path(["metadata", "location", "$id"]), R__namespace.when(R__namespace.test(NEW_TEST_REGEX$1), formatTestNo$1));
|
|
3179
|
+
const extractTestNumberFromFileName$1 = R__namespace.compose(R__namespace.head, R__namespace.defaultTo([undefined]), R__namespace.either(match$1(/[0-9]{5}_[0-9]{2}[a-zA-Z]+_[0-9]{2}_[0-9]{3}_[0-9]{3}_[0-9]{2}/), match$1(/[A-Za-z]+[0-9]{5}_[0-9]+_[0-9]+_[0-9]+/)), R__namespace.prop("path"));
|
|
3180
|
+
const extractTestNumber$1 = (stage, track) => R__namespace.pipe(filesByIdView$1, R__namespace.prop(track.ref), R__namespace.either(extractTestNumberFromMetadata$1, extractTestNumberFromFileName$1))(stage);
|
|
3181
|
+
const formatter$1 = fp.formatWithOptions({
|
|
3073
3182
|
awareOfUnicodeTokens: true
|
|
3074
3183
|
});
|
|
3075
|
-
|
|
3076
|
-
const
|
|
3077
|
-
|
|
3078
|
-
const createHighSpeedTracksLabels = stage => tracks => mapWithIndex((hs, index) => {
|
|
3079
|
-
const recordingChannel = extractRecordingChannel(stage, hs);
|
|
3184
|
+
const extractRecordingChannel$1 = (stage, track) => R__namespace.pipe(filesByIdView$1, R__namespace.path([track.ref, "metadata", "recChannel"]))(stage);
|
|
3185
|
+
const createHighSpeedTracksLabels$1 = stage => tracks => mapWithIndex$1((hs, index) => {
|
|
3186
|
+
const recordingChannel = extractRecordingChannel$1(stage, hs);
|
|
3080
3187
|
const no = recordingChannel || index + 1;
|
|
3081
|
-
return
|
|
3188
|
+
return R__namespace.assoc("label", `HS ${no}`, hs);
|
|
3082
3189
|
}, tracks);
|
|
3083
|
-
|
|
3084
|
-
const
|
|
3085
|
-
const recordingChannel = extractRecordingChannel(stage, vid);
|
|
3190
|
+
const createVideoTracksLabels$1 = stage => tracks => mapWithIndex$1((vid, index) => {
|
|
3191
|
+
const recordingChannel = extractRecordingChannel$1(stage, vid);
|
|
3086
3192
|
const no = recordingChannel || index + 1;
|
|
3087
|
-
return
|
|
3193
|
+
return R__namespace.assoc("label", `VID ${no}`, vid);
|
|
3088
3194
|
}, tracks);
|
|
3089
|
-
|
|
3090
|
-
const
|
|
3091
|
-
|
|
3092
|
-
const extractSecondFractions = isoStr => R.pipe(match(/[0-9]{2}:[0-9]{2}:[0-9]{2}.([0-9]+)/), R.ifElse(R.isNil, R.always("000"), R.nth(1)))(isoStr);
|
|
3093
|
-
|
|
3195
|
+
const extractFormat$1 = (stage, track) => R__namespace.pipe(filesByIdView$1, R__namespace.path([track.ref, "path"]), p => fsPath$1.extname(p))(stage);
|
|
3196
|
+
const extractSecondFractions$1 = isoStr => R__namespace.pipe(match$1(/[0-9]{2}:[0-9]{2}:[0-9]{2}.([0-9]+)/), R__namespace.ifElse(R__namespace.isNil, R__namespace.always("000"), R__namespace.nth(1)))(isoStr);
|
|
3094
3197
|
const extractDate = (stage, track) => {
|
|
3095
|
-
return
|
|
3198
|
+
return R__namespace.pipe(filesByIdView$1, R__namespace.path([track.ref, "start"]), fp.parseISO, formatter$1("dd-MM-yyyy"))(stage);
|
|
3096
3199
|
};
|
|
3097
|
-
|
|
3098
|
-
const
|
|
3099
|
-
|
|
3100
|
-
const
|
|
3101
|
-
|
|
3102
|
-
const extractEnd = (stage, track) => R.pipe(filesByIdView, R.path([track.ref, "end"]), createTime)(stage);
|
|
3103
|
-
|
|
3104
|
-
const createVideoMetadata = R.curry((type, stage, track) => ({ ...track,
|
|
3200
|
+
const createTime$1 = R__namespace.converge(R__namespace.pipe(R__namespace.pair, R__namespace.join(".")), [R__namespace.pipe(fp.parseISO, formatter$1("HH:mm:ss")), extractSecondFractions$1]);
|
|
3201
|
+
const extractStart = (stage, track) => R__namespace.pipe(filesByIdView$1, R__namespace.path([track.ref, "start"]), createTime$1)(stage);
|
|
3202
|
+
const extractEnd = (stage, track) => R__namespace.pipe(filesByIdView$1, R__namespace.path([track.ref, "end"]), createTime$1)(stage);
|
|
3203
|
+
const createVideoMetadata$1 = R__namespace.curry((type, stage, track) => ({
|
|
3204
|
+
...track,
|
|
3105
3205
|
metadata: track.metadata || [[{
|
|
3106
3206
|
label: "Test",
|
|
3107
|
-
value: extractTestNumber(stage, track)
|
|
3207
|
+
value: extractTestNumber$1(stage, track)
|
|
3108
3208
|
}], [{
|
|
3109
3209
|
label: "Type",
|
|
3110
3210
|
value: type
|
|
3111
3211
|
}, {
|
|
3112
3212
|
label: "Recording channel",
|
|
3113
|
-
value: extractRecordingChannel(stage, track)
|
|
3213
|
+
value: extractRecordingChannel$1(stage, track)
|
|
3114
3214
|
}, {
|
|
3115
3215
|
label: "Format",
|
|
3116
|
-
value: extractFormat(stage, track)
|
|
3216
|
+
value: extractFormat$1(stage, track)
|
|
3117
3217
|
}], [{
|
|
3118
3218
|
label: "Date",
|
|
3119
3219
|
value: extractDate(stage, track)
|
|
@@ -3125,36 +3225,26 @@ const createVideoMetadata = R.curry((type, stage, track) => ({ ...track,
|
|
|
3125
3225
|
value: extractEnd(stage, track)
|
|
3126
3226
|
}]]
|
|
3127
3227
|
}));
|
|
3128
|
-
const createHighSpeedsMetadata =
|
|
3129
|
-
const createVideosMetadata =
|
|
3130
|
-
|
|
3131
|
-
const
|
|
3132
|
-
|
|
3133
|
-
const
|
|
3134
|
-
|
|
3135
|
-
const
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
const setTimeLineStartEnd = stage => R.pipe(R.assocPath(["timeline", "start"], earliestTime(stage)), R.assocPath(["timeline", "end"], latestTime(stage)))(stage);
|
|
3140
|
-
|
|
3141
|
-
const setCommentAxis = R.assocPath(["timeline", "commentAxis"], "comment");
|
|
3142
|
-
|
|
3143
|
-
const consolidateTimeline = stage => {
|
|
3144
|
-
return R.pipe(upsertAxes(axesSettings), upsertTracks(createTracks(stage)), setTimeLineStartEnd, setCommentAxis)(stage);
|
|
3228
|
+
const createHighSpeedsMetadata$1 = R__namespace.curry((stage, tracks) => R__namespace.map(createVideoMetadata$1("high-speed", stage), tracks));
|
|
3229
|
+
const createVideosMetadata$1 = R__namespace.curry((stage, tracks) => R__namespace.map(createVideoMetadata$1("video", stage), tracks));
|
|
3230
|
+
const createTracks$1 = stage => R__namespace.converge((...args) => R__namespace.flatten(args), [R__namespace.pipe(mapEntitiesToTracks$1(highSpeedsFilesView$1, "high-speed"), createHighSpeedTracksLabels$1(stage), createHighSpeedsMetadata$1(stage)), R__namespace.pipe(mapEntitiesToTracks$1(videosFilesView$1, "video"), createVideoTracksLabels$1(stage), createVideosMetadata$1(stage)), mapCommentsToTracks$1])(stage);
|
|
3231
|
+
const upsertTracks$1 = tracks => R__namespace.curry(R__namespace.pipe(R__namespace.unless(R__namespace.path(tracksIdsPath$1), R__namespace.assocPath(tracksIdsPath$1, [])), R__namespace.unless(R__namespace.path(tracksByIdPath$1), R__namespace.assocPath(tracksByIdPath$1, {})), R__namespace.over(tracksIdsLens$1, R__namespace.union(R__namespace.pluck("id", tracks))), R__namespace.over(tracksByIdLens$1, R__namespace.mergeRight(indexById(tracks)))));
|
|
3232
|
+
const earliestTime$1 = stage => R__namespace.pipe(filesView, R__namespace.map(R__namespace.prop("start")), R__namespace.map(Date.parse), R__namespace.apply(Math.min), t => new Date(t), d => d.toISOString())(stage);
|
|
3233
|
+
const latestTime$1 = stage => R__namespace.pipe(filesView, R__namespace.map(R__namespace.prop("end")), R__namespace.map(Date.parse), R__namespace.apply(Math.max), t => new Date(t), d => d.toISOString())(stage);
|
|
3234
|
+
const setTimeLineStartEnd$1 = stage => R__namespace.pipe(R__namespace.assocPath(["timeline", "start"], earliestTime$1(stage)), R__namespace.assocPath(["timeline", "end"], latestTime$1(stage)))(stage);
|
|
3235
|
+
const setCommentAxis$1 = R__namespace.assocPath(["timeline", "commentAxis"], "comment");
|
|
3236
|
+
const consolidateTimeline$1 = stage => {
|
|
3237
|
+
return R__namespace.pipe(upsertAxes$1(axesSettings$1), upsertTracks$1(createTracks$1(stage)), setTimeLineStartEnd$1, setCommentAxis$1)(stage);
|
|
3145
3238
|
};
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
return consolidateTimeline(stage);
|
|
3239
|
+
const consolidate$1 = stage => {
|
|
3240
|
+
return consolidateTimeline$1(stage);
|
|
3149
3241
|
};
|
|
3150
3242
|
|
|
3151
|
-
const NEW_TEST_REGEX
|
|
3152
|
-
|
|
3153
|
-
const
|
|
3154
|
-
|
|
3155
|
-
const
|
|
3156
|
-
const mapWithIndex$1 = R.addIndex(R.map);
|
|
3157
|
-
const axesSettings$1 = [{
|
|
3243
|
+
const NEW_TEST_REGEX = /^([0-9]{5})_(.+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)$/;
|
|
3244
|
+
const fsPath = require("path");
|
|
3245
|
+
const match = R__namespace.curry((regex, st) => st.match(regex));
|
|
3246
|
+
const mapWithIndex = R__namespace.addIndex(R__namespace.map);
|
|
3247
|
+
const axesSettings = [{
|
|
3158
3248
|
id: "video",
|
|
3159
3249
|
color: "#41b51b"
|
|
3160
3250
|
}, {
|
|
@@ -3164,55 +3254,56 @@ const axesSettings$1 = [{
|
|
|
3164
3254
|
id: "comment",
|
|
3165
3255
|
color: "red"
|
|
3166
3256
|
}];
|
|
3167
|
-
const tracksIdsPath
|
|
3168
|
-
const tracksByIdPath
|
|
3169
|
-
const axesIdsPath
|
|
3170
|
-
const axesByIdPath
|
|
3171
|
-
const resourcesIdsView
|
|
3172
|
-
const resourcesByIdView
|
|
3173
|
-
const filesIdsView
|
|
3174
|
-
const filesByIdView
|
|
3175
|
-
const timingByIdView =
|
|
3176
|
-
const commentsByIdView
|
|
3177
|
-
const tracksIdsLens
|
|
3178
|
-
const tracksByIdLens
|
|
3179
|
-
const axesIdsLens
|
|
3180
|
-
const axesByIdLens
|
|
3181
|
-
const timingsView =
|
|
3182
|
-
const commentsView
|
|
3183
|
-
|
|
3184
|
-
const
|
|
3185
|
-
const
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
resourcesIdsView
|
|
3189
|
-
|
|
3190
|
-
|
|
3257
|
+
const tracksIdsPath = ["timeline", "entities", "tracks", "ids"];
|
|
3258
|
+
const tracksByIdPath = ["timeline", "entities", "tracks", "byId"];
|
|
3259
|
+
const axesIdsPath = ["timeline", "entities", "axes", "ids"];
|
|
3260
|
+
const axesByIdPath = ["timeline", "entities", "axes", "byId"];
|
|
3261
|
+
const resourcesIdsView = R__namespace.pathOr([], ["resources", "entities", "resources", "ids"]);
|
|
3262
|
+
const resourcesByIdView = R__namespace.pathOr({}, ["resources", "entities", "resources", "byId"]);
|
|
3263
|
+
const filesIdsView = R__namespace.pathOr([], ["files", "entities", "files", "ids"]);
|
|
3264
|
+
const filesByIdView = R__namespace.pathOr({}, ["files", "entities", "files", "byId"]);
|
|
3265
|
+
const timingByIdView = R__namespace.pathOr({}, ["timing", "entities", "timing", "byId"]);
|
|
3266
|
+
const commentsByIdView = R__namespace.pathOr({}, ["timeline", "entities", "comments", "byId"]);
|
|
3267
|
+
const tracksIdsLens = R__namespace.lensPath(tracksIdsPath);
|
|
3268
|
+
const tracksByIdLens = R__namespace.lensPath(tracksByIdPath);
|
|
3269
|
+
const axesIdsLens = R__namespace.lensPath(axesIdsPath);
|
|
3270
|
+
const axesByIdLens = R__namespace.lensPath(axesByIdPath);
|
|
3271
|
+
const timingsView = R__namespace.pipe(timingByIdView, R__namespace.values);
|
|
3272
|
+
const commentsView = R__namespace.pipe(commentsByIdView, R__namespace.values);
|
|
3273
|
+
const highSpeedsFilesView = stage => {
|
|
3274
|
+
const filesById = filesByIdView(stage);
|
|
3275
|
+
const resourcesById = resourcesByIdView(stage);
|
|
3276
|
+
return R__namespace.pipe(
|
|
3277
|
+
// Iterate R.over the resource ids
|
|
3278
|
+
resourcesIdsView,
|
|
3279
|
+
// Filter out all the ids that don't start with high-speed.
|
|
3280
|
+
R__namespace.filter(R__namespace.startsWith("high-speed:")),
|
|
3281
|
+
// Map the remaining resource ids to the files ids in the respective resource object.
|
|
3282
|
+
lookupPathAll(resourcesById, ["props", "files"]),
|
|
3283
|
+
// Flatten the ids so we get a single array containing all the files ids referred
|
|
3191
3284
|
// to across all high-speed resources.
|
|
3192
|
-
|
|
3285
|
+
R__namespace.flatten,
|
|
3286
|
+
// Map the file ids to file objects.
|
|
3193
3287
|
lookupAll(filesById))(stage);
|
|
3194
3288
|
};
|
|
3195
|
-
|
|
3196
3289
|
const highSpeedsTimingsView = stage => {
|
|
3197
3290
|
const timings = timingsView(stage);
|
|
3198
|
-
return
|
|
3291
|
+
return R__namespace.pipe(highSpeedsFilesView,
|
|
3292
|
+
// Map the file ids to file objects.
|
|
3199
3293
|
files => files.map(file => timings.find(timing => timing.ref.id === file.id)))(stage);
|
|
3200
3294
|
};
|
|
3201
|
-
|
|
3202
|
-
const
|
|
3203
|
-
const
|
|
3204
|
-
const
|
|
3205
|
-
|
|
3206
|
-
return R.pipe(R.without(R.pluck("id", highSpeedFiles)), lookupAll(filesById), R.filter(R.propEq("type", "video")))(filesIds);
|
|
3295
|
+
const videosFilesView = stage => {
|
|
3296
|
+
const filesIds = filesIdsView(stage);
|
|
3297
|
+
const filesById = filesByIdView(stage);
|
|
3298
|
+
const highSpeedFiles = highSpeedsFilesView(stage);
|
|
3299
|
+
return R__namespace.pipe(R__namespace.without(R__namespace.pluck("id", highSpeedFiles)), lookupAll(filesById), R__namespace.filter(R__namespace.propEq("video", "type")))(filesIds);
|
|
3207
3300
|
};
|
|
3208
|
-
|
|
3209
3301
|
const videoTimingsView = stage => {
|
|
3210
3302
|
const timings = timingsView(stage);
|
|
3211
|
-
return
|
|
3303
|
+
return R__namespace.pipe(videosFilesView, files => files.map(file => timings.find(timing => timing.ref.id === file.id)))(stage);
|
|
3212
3304
|
};
|
|
3213
|
-
|
|
3214
|
-
const
|
|
3215
|
-
const createTrackFromEntity$1 = R.curry((axis, entity) => {
|
|
3305
|
+
const upsertAxes = axes => R__namespace.curry(R__namespace.pipe(R__namespace.unless(R__namespace.path(axesIdsPath), R__namespace.assocPath(axesIdsPath, [])), R__namespace.unless(R__namespace.path(axesByIdPath), R__namespace.assocPath(axesIdsPath, {})), R__namespace.over(axesIdsLens, R__namespace.union(R__namespace.pluck("id", axes))), R__namespace.over(axesByIdLens, R__namespace.mergeRight(indexById(axes)))));
|
|
3306
|
+
const createTrackFromEntity = R__namespace.curry((axis, entity) => {
|
|
3216
3307
|
const {
|
|
3217
3308
|
start,
|
|
3218
3309
|
end,
|
|
@@ -3232,8 +3323,8 @@ const createTrackFromEntity$1 = R.curry((axis, entity) => {
|
|
|
3232
3323
|
timeline: "1"
|
|
3233
3324
|
};
|
|
3234
3325
|
});
|
|
3235
|
-
const mapEntitiesToTracks
|
|
3236
|
-
const createTrackFromTiming =
|
|
3326
|
+
const mapEntitiesToTracks = R__namespace.curry((entitiesSelector, axis, stage) => R__namespace.map(createTrackFromEntity(axis), entitiesSelector(stage)));
|
|
3327
|
+
const createTrackFromTiming = R__namespace.curry((axis, timing) => {
|
|
3237
3328
|
const {
|
|
3238
3329
|
start,
|
|
3239
3330
|
end,
|
|
@@ -3256,62 +3347,54 @@ const createTrackFromTiming = R.curry((axis, timing) => {
|
|
|
3256
3347
|
timeline: "1"
|
|
3257
3348
|
};
|
|
3258
3349
|
});
|
|
3259
|
-
const mapTimingsToTracks =
|
|
3260
|
-
const mapCommentsToTracks
|
|
3350
|
+
const mapTimingsToTracks = R__namespace.curry((entitiesSelector, axis, stage) => R__namespace.map(createTrackFromTiming(axis), entitiesSelector(stage)));
|
|
3351
|
+
const mapCommentsToTracks = R__namespace.pipe(mapEntitiesToTracks(commentsView, "comment"), R__namespace.map(R__namespace.mergeLeft({
|
|
3261
3352
|
type: "comment",
|
|
3262
3353
|
label: "comment"
|
|
3263
3354
|
})));
|
|
3264
|
-
|
|
3265
|
-
const
|
|
3266
|
-
|
|
3267
|
-
m, project, facility, program, category, test, experiment, measurement] = input.match(NEW_TEST_REGEX
|
|
3355
|
+
const formatTestNo = input => {
|
|
3356
|
+
const [
|
|
3357
|
+
// eslint-disable-next-line no-unused-vars
|
|
3358
|
+
m, project, facility, program, category, test, experiment, measurement] = input.match(NEW_TEST_REGEX);
|
|
3268
3359
|
return `${project}_${program.padStart(2, "0")}${facility}_${category.padStart(2, "0")}_${test.padStart(3, "0")}_${experiment.padStart(3, "0")}_${measurement.padStart(2, "0")}`;
|
|
3269
3360
|
};
|
|
3270
|
-
|
|
3271
|
-
const
|
|
3272
|
-
const
|
|
3273
|
-
|
|
3274
|
-
const extractTestNumber$1 = (stage, track) => R.pipe(filesByIdView$1, R.prop(track.ref.id), R.either(extractTestNumberFromMetadata$1, extractTestNumberFromFileName$1))(stage);
|
|
3275
|
-
|
|
3276
|
-
const formatter$1 = fp.formatWithOptions({
|
|
3361
|
+
const extractTestNumberFromMetadata = R__namespace.pipe(R__namespace.path(["metadata", "location", "$id"]), R__namespace.when(R__namespace.test(NEW_TEST_REGEX), formatTestNo));
|
|
3362
|
+
const extractTestNumberFromFileName = R__namespace.compose(R__namespace.head, R__namespace.defaultTo([undefined]), R__namespace.either(match(/[0-9]{5}_[0-9]{2}[a-zA-Z]+_[0-9]{2}_[0-9]{3}_[0-9]{3}_[0-9]{2}/), match(/[A-Za-z]+[0-9]{5}_[0-9]+_[0-9]+_[0-9]+/)), R__namespace.prop("path"));
|
|
3363
|
+
const extractTestNumber = (stage, track) => R__namespace.pipe(filesByIdView, R__namespace.prop(track.ref.id), R__namespace.either(extractTestNumberFromMetadata, extractTestNumberFromFileName))(stage);
|
|
3364
|
+
const formatter = fp.formatWithOptions({
|
|
3277
3365
|
awareOfUnicodeTokens: true
|
|
3278
3366
|
});
|
|
3279
|
-
|
|
3280
|
-
const
|
|
3281
|
-
|
|
3282
|
-
const createHighSpeedTracksLabels$1 = stage => tracks => mapWithIndex$1((hs, index) => {
|
|
3283
|
-
const recordingChannel = extractRecordingChannel$1(stage, hs);
|
|
3367
|
+
const extractRecordingChannel = (stage, track) => R__namespace.pipe(filesByIdView, R__namespace.path([track.ref.id, "metadata", "recChannel"]))(stage);
|
|
3368
|
+
const createHighSpeedTracksLabels = stage => tracks => mapWithIndex((hs, index) => {
|
|
3369
|
+
const recordingChannel = extractRecordingChannel(stage, hs);
|
|
3284
3370
|
const no = recordingChannel || index + 1;
|
|
3285
|
-
return
|
|
3371
|
+
return R__namespace.assoc("label", `HS ${no}`, hs);
|
|
3286
3372
|
}, tracks);
|
|
3287
|
-
|
|
3288
|
-
const
|
|
3289
|
-
const recordingChannel = extractRecordingChannel$1(stage, vid);
|
|
3373
|
+
const createVideoTracksLabels = stage => tracks => mapWithIndex((vid, index) => {
|
|
3374
|
+
const recordingChannel = extractRecordingChannel(stage, vid);
|
|
3290
3375
|
const no = recordingChannel || index + 1;
|
|
3291
|
-
return
|
|
3376
|
+
return R__namespace.assoc("label", `VID ${no}`, vid);
|
|
3292
3377
|
}, tracks);
|
|
3293
|
-
|
|
3294
|
-
const
|
|
3295
|
-
|
|
3296
|
-
const
|
|
3297
|
-
|
|
3298
|
-
const
|
|
3299
|
-
const
|
|
3300
|
-
|
|
3301
|
-
const extractEndFromTrack = R.pipe(R.prop("end"), createTime$1);
|
|
3302
|
-
const createVideoMetadata$1 = R.curry((type, stage, track) => ({ ...track,
|
|
3378
|
+
const extractFormat = (stage, track) => R__namespace.pipe(filesByIdView, R__namespace.path([track.ref.id, "path"]), p => fsPath.extname(p))(stage);
|
|
3379
|
+
const extractSecondFractions = isoStr => R__namespace.pipe(match(/[0-9]{2}:[0-9]{2}:[0-9]{2}.([0-9]+)/), R__namespace.ifElse(R__namespace.isNil, R__namespace.always("000"), R__namespace.nth(1)))(isoStr);
|
|
3380
|
+
const extractDateFromTrack = R__namespace.pipe(R__namespace.prop("start"), fp.parseISO, formatter("dd-MM-yyyy"));
|
|
3381
|
+
const createTime = R__namespace.converge(R__namespace.pipe(R__namespace.pair, R__namespace.join(".")), [R__namespace.pipe(fp.parseISO, formatter("HH:mm:ss")), extractSecondFractions]);
|
|
3382
|
+
const extractStartFromTrack = R__namespace.pipe(R__namespace.prop("start"), createTime);
|
|
3383
|
+
const extractEndFromTrack = R__namespace.pipe(R__namespace.prop("end"), createTime);
|
|
3384
|
+
const createVideoMetadata = R__namespace.curry((type, stage, track) => ({
|
|
3385
|
+
...track,
|
|
3303
3386
|
metadata: [[{
|
|
3304
3387
|
label: "Test",
|
|
3305
|
-
value: extractTestNumber
|
|
3388
|
+
value: extractTestNumber(stage, track)
|
|
3306
3389
|
}], [{
|
|
3307
3390
|
label: "Type",
|
|
3308
3391
|
value: type
|
|
3309
3392
|
}, {
|
|
3310
3393
|
label: "Recording channel",
|
|
3311
|
-
value: extractRecordingChannel
|
|
3394
|
+
value: extractRecordingChannel(stage, track)
|
|
3312
3395
|
}, {
|
|
3313
3396
|
label: "Format",
|
|
3314
|
-
value: extractFormat
|
|
3397
|
+
value: extractFormat(stage, track)
|
|
3315
3398
|
}], [{
|
|
3316
3399
|
label: "Date",
|
|
3317
3400
|
value: extractDateFromTrack(track)
|
|
@@ -3323,41 +3406,33 @@ const createVideoMetadata$1 = R.curry((type, stage, track) => ({ ...track,
|
|
|
3323
3406
|
value: extractEndFromTrack(track)
|
|
3324
3407
|
}]]
|
|
3325
3408
|
}));
|
|
3326
|
-
const createHighSpeedsMetadata
|
|
3327
|
-
const createVideosMetadata
|
|
3328
|
-
|
|
3329
|
-
const
|
|
3330
|
-
|
|
3331
|
-
const upsertTracks$1 = tracks => stage => {
|
|
3409
|
+
const createHighSpeedsMetadata = R__namespace.curry((stage, tracks) => R__namespace.map(createVideoMetadata("high-speed", stage), tracks));
|
|
3410
|
+
const createVideosMetadata = R__namespace.curry((stage, tracks) => R__namespace.map(createVideoMetadata("video", stage), tracks));
|
|
3411
|
+
const createTracks = stage => R__namespace.converge((...args) => R__namespace.flatten(args), [R__namespace.pipe(mapTimingsToTracks(highSpeedsTimingsView, "high-speed"), createHighSpeedTracksLabels(stage), createHighSpeedsMetadata(stage)), R__namespace.pipe(mapTimingsToTracks(videoTimingsView, "video"), createVideoTracksLabels(stage), createVideosMetadata(stage)), mapCommentsToTracks])(stage);
|
|
3412
|
+
const upsertTracks = tracks => stage => {
|
|
3332
3413
|
const indexedById = indexById(tracks);
|
|
3333
|
-
return
|
|
3414
|
+
return R__namespace.pipe(R__namespace.unless(R__namespace.path(tracksIdsPath), R__namespace.assocPath(tracksIdsPath, [])), R__namespace.unless(R__namespace.path(tracksByIdPath), R__namespace.assocPath(tracksByIdPath, {})), R__namespace.over(tracksIdsLens, R__namespace.union(R__namespace.pluck("id", tracks))), R__namespace.over(tracksByIdLens, R__namespace.mergeLeft(indexedById)))(stage);
|
|
3334
3415
|
};
|
|
3335
|
-
|
|
3336
|
-
const
|
|
3337
|
-
|
|
3338
|
-
const
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
const setCommentAxis$1 = R.assocPath(["timeline", "commentAxis"], "comment");
|
|
3343
|
-
|
|
3344
|
-
const consolidateTimeline$1 = stage => {
|
|
3345
|
-
return R.pipe(upsertAxes$1(axesSettings$1), upsertTracks$1(createTracks$1(stage)), setTimeLineStartEnd$1, setCommentAxis$1)(stage);
|
|
3416
|
+
const earliestTime = stage => R__namespace.pipe(timingsView, R__namespace.map(R__namespace.prop("start")), R__namespace.map(Date.parse), R__namespace.apply(Math.min), t => new Date(t), d => d.toISOString())(stage);
|
|
3417
|
+
const latestTime = stage => R__namespace.pipe(timingsView, R__namespace.map(R__namespace.prop("end")), R__namespace.map(Date.parse), R__namespace.apply(Math.max), t => new Date(t), d => d.toISOString())(stage);
|
|
3418
|
+
const setTimeLineStartEnd = stage => R__namespace.pipe(R__namespace.assocPath(["timeline", "start"], earliestTime(stage)), R__namespace.assocPath(["timeline", "end"], latestTime(stage)))(stage);
|
|
3419
|
+
const setCommentAxis = R__namespace.assocPath(["timeline", "commentAxis"], "comment");
|
|
3420
|
+
const consolidateTimeline = stage => {
|
|
3421
|
+
return R__namespace.pipe(upsertAxes(axesSettings), upsertTracks(createTracks(stage)), setTimeLineStartEnd, setCommentAxis)(stage);
|
|
3346
3422
|
};
|
|
3347
|
-
|
|
3348
|
-
var v3$1 = R.pipe(R.tap(s => {
|
|
3423
|
+
var v3 = R.pipe(R.tap(s => {
|
|
3349
3424
|
console.log("consolidating v3 stage!", s);
|
|
3350
|
-
}), consolidateTimeline
|
|
3425
|
+
}), consolidateTimeline);
|
|
3351
3426
|
|
|
3352
3427
|
var _consolidators = Object.freeze({
|
|
3353
|
-
2: consolidate,
|
|
3354
|
-
3: v3
|
|
3428
|
+
2: consolidate$1,
|
|
3429
|
+
3: v3,
|
|
3430
|
+
4: v3
|
|
3355
3431
|
});
|
|
3356
3432
|
|
|
3357
3433
|
const _consolidate = consolidators => stage => {
|
|
3358
3434
|
const version = detectVersion(stage);
|
|
3359
3435
|
const consolidator = R.propOr(R.always(stage), version, consolidators);
|
|
3360
|
-
|
|
3361
3436
|
try {
|
|
3362
3437
|
return {
|
|
3363
3438
|
stage: consolidator(stage)
|
|
@@ -3368,101 +3443,95 @@ const _consolidate = consolidators => stage => {
|
|
|
3368
3443
|
};
|
|
3369
3444
|
}
|
|
3370
3445
|
};
|
|
3371
|
-
var consolidate
|
|
3446
|
+
var consolidate = _consolidate(_consolidators);
|
|
3372
3447
|
|
|
3373
|
-
const upgradeResources =
|
|
3448
|
+
const upgradeResources = R__namespace.over(R__namespace.lensPath(["resources", "entities", "resources", "byId"]), R__namespace.map(({
|
|
3374
3449
|
files,
|
|
3375
3450
|
...resource
|
|
3376
|
-
}) => ({
|
|
3451
|
+
}) => ({
|
|
3452
|
+
...resource,
|
|
3377
3453
|
props: {
|
|
3378
3454
|
files
|
|
3379
3455
|
}
|
|
3380
3456
|
})));
|
|
3381
|
-
const createTimingSlice =
|
|
3457
|
+
const createTimingSlice = R__namespace.pipe(R__namespace.assocPath(["timing", "entities", "timing"], {
|
|
3382
3458
|
ids: [],
|
|
3383
3459
|
byId: {}
|
|
3384
|
-
}),
|
|
3460
|
+
}), R__namespace.assocPath(["timing", "entities", "offset"], {
|
|
3385
3461
|
ids: [],
|
|
3386
3462
|
byId: {}
|
|
3387
3463
|
}));
|
|
3388
|
-
|
|
3389
3464
|
const createFilesTimings = s => {
|
|
3390
|
-
const timings =
|
|
3465
|
+
const timings = R__namespace.pipe(R__namespace.path(["files", "entities", "files"]), R__namespace.over(R__namespace.lensProp("byId"), R__namespace.map(R__namespace.pipe(R__namespace.pick(["id", "start", "end"]), timing => R__namespace.assoc("ref", {
|
|
3391
3466
|
id: timing.id,
|
|
3392
3467
|
type: "file"
|
|
3393
3468
|
}, timing)))))(s);
|
|
3394
|
-
return
|
|
3469
|
+
return R__namespace.pipe(R__namespace.over(R__namespace.lensPath(["files", "entities", "files", "byId"]), R__namespace.map(R__namespace.omit(["start", "end"]))), R__namespace.over(R__namespace.lensPath(["timing", "entities", "timing"]), R__namespace.mergeDeepRight(timings)), R__namespace.over(R__namespace.lensPath(["timing", "entities", "timing"]), entities => R__namespace.assoc("ids", R__namespace.keys(entities.byId), entities)))(s);
|
|
3395
3470
|
};
|
|
3396
|
-
|
|
3397
|
-
const createComments = R.unless(R.pipe(R.path(["timeline", "entities", "comments"]), R.complement(R.isNil)), R.assocPath(["timeline", "entities", "comments"], {
|
|
3471
|
+
const createComments = R__namespace.unless(R__namespace.pipe(R__namespace.path(["timeline", "entities", "comments"]), R__namespace.complement(R__namespace.isNil)), R__namespace.assocPath(["timeline", "entities", "comments"], {
|
|
3398
3472
|
ids: [],
|
|
3399
3473
|
byId: {}
|
|
3400
3474
|
}));
|
|
3401
|
-
|
|
3402
3475
|
const createCommentsTimings = s => {
|
|
3403
|
-
const timings =
|
|
3476
|
+
const timings = R__namespace.pipe(R__namespace.path(["timeline", "entities", "comments"]), R__namespace.over(R__namespace.lensProp("byId"), R__namespace.map(R__namespace.pipe(R__namespace.pick(["id", "start", "end"]), timing => R__namespace.assoc("ref", {
|
|
3404
3477
|
id: timing.id,
|
|
3405
3478
|
type: "comment"
|
|
3406
3479
|
}, timing)))))(s);
|
|
3407
|
-
return
|
|
3480
|
+
return R__namespace.pipe(R__namespace.over(R__namespace.lensPath(["timeline", "entities", "comments", "byId"]), R__namespace.map(R__namespace.omit(["start", "end"]))), R__namespace.over(R__namespace.lensPath(["timing", "entities", "timing"]), R__namespace.mergeDeepRight(timings)), R__namespace.over(R__namespace.lensPath(["timing", "entities", "timing"]), entities => R__namespace.assoc("ids", R__namespace.keys(entities.byId), entities)))(s);
|
|
3408
3481
|
};
|
|
3409
|
-
|
|
3410
|
-
const
|
|
3411
|
-
const outlets = R.path(["data", "entities", "outlets"], s);
|
|
3412
|
-
|
|
3482
|
+
const removeOutlets$1 = s => {
|
|
3483
|
+
const outlets = R__namespace.path(["data", "entities", "outlets"], s);
|
|
3413
3484
|
if (outlets) {
|
|
3414
|
-
return
|
|
3485
|
+
return R__namespace.pipe(R__namespace.dissocPath(["data", "entities", "outlets"]), R__namespace.over(R__namespace.lensPath(["data", "entities", "dataViewers", "byId"]), R__namespace.map(({
|
|
3415
3486
|
outletId,
|
|
3416
3487
|
...dataViewer
|
|
3417
3488
|
}) => {
|
|
3418
|
-
const outlet =
|
|
3489
|
+
const outlet = R__namespace.path(["byId", outletId], outlets) || {
|
|
3419
3490
|
streams: []
|
|
3420
3491
|
};
|
|
3421
|
-
return {
|
|
3492
|
+
return {
|
|
3493
|
+
...dataViewer,
|
|
3422
3494
|
streams: outlet.streams
|
|
3423
3495
|
};
|
|
3424
3496
|
})))(s);
|
|
3425
3497
|
}
|
|
3426
|
-
|
|
3427
3498
|
return s;
|
|
3428
3499
|
};
|
|
3429
|
-
|
|
3430
3500
|
const createSliceEntities = entityName => slice => {
|
|
3431
|
-
const result =
|
|
3501
|
+
const result = R__namespace.pipe(R__namespace.unless(R__namespace.has("entities"), R__namespace.assoc("entities", {})), R__namespace.unless(R__namespace.hasPath(["entities", entityName]), R__namespace.assocPath(["entities", entityName], {
|
|
3432
3502
|
ids: [],
|
|
3433
3503
|
byId: {}
|
|
3434
3504
|
})))(slice);
|
|
3435
3505
|
return result;
|
|
3436
3506
|
};
|
|
3437
|
-
|
|
3438
3507
|
const createTimelineSlice = s => {
|
|
3439
|
-
return
|
|
3508
|
+
return R__namespace.pipe(R__namespace.over(R__namespace.lensProp("timeline"), R__namespace.pipe(createSliceEntities("axes"), createSliceEntities("groups"), createSliceEntities("timeline"), createSliceEntities("tracks"))))(s);
|
|
3440
3509
|
};
|
|
3441
|
-
|
|
3442
3510
|
const createTimelineGroups = s => {
|
|
3443
|
-
const groups =
|
|
3444
|
-
return
|
|
3511
|
+
const groups = R__namespace.pipe(R__namespace.path(["timeline", "entities", "axes"]), R__namespace.over(R__namespace.lensProp("byId"), R__namespace.map(R__namespace.dissoc("resources"))))(s);
|
|
3512
|
+
return R__namespace.pipe(R__namespace.dissocPath(["timeline", "entities", "axes"]), R__namespace.assocPath(["timeline", "entities", "groups"], groups))(s);
|
|
3445
3513
|
};
|
|
3446
|
-
|
|
3447
|
-
const createTimeline = s => R.pipe(R.assocPath(["timeline", "entities", "timeline", "byId", "1"], {
|
|
3514
|
+
const createTimeline = s => R__namespace.pipe(R__namespace.assocPath(["timeline", "entities", "timeline", "byId", "1"], {
|
|
3448
3515
|
id: "1",
|
|
3449
3516
|
groupOrder: ["video", "high-speed", "comment"],
|
|
3450
3517
|
actions: {
|
|
3451
3518
|
copyLink: true,
|
|
3452
3519
|
addComment: true
|
|
3453
3520
|
},
|
|
3454
|
-
start:
|
|
3455
|
-
end:
|
|
3456
|
-
}),
|
|
3457
|
-
|
|
3458
|
-
|
|
3521
|
+
start: R__namespace.path(["timeline", "start"], s),
|
|
3522
|
+
end: R__namespace.path(["timeline", "end"], s)
|
|
3523
|
+
}), R__namespace.dissocPath(["timeline", "start"]), R__namespace.dissocPath(["timeline", "end"]), R__namespace.assocPath(["timeline", "entities", "timeline", "ids"], ["1"]), R__namespace.over(R__namespace.lensPath(["timeline", "entities", "tracks", "byId"]), R__namespace.map(R__namespace.pipe(R__namespace.assoc("timeline", "1")))), R__namespace.assocPath(["timeline", "masterTimeline"], "1"))(s);
|
|
3524
|
+
const fixTracks = s => R__namespace.pipe(R__namespace.over(R__namespace.lensPath(["timeline", "entities", "tracks", "byId"]),
|
|
3525
|
+
// eslint-disable-next-line no-unused-vars
|
|
3526
|
+
R__namespace.map(({
|
|
3459
3527
|
axisRef,
|
|
3460
3528
|
type,
|
|
3461
3529
|
ref,
|
|
3462
3530
|
start,
|
|
3463
3531
|
end,
|
|
3464
3532
|
...track
|
|
3465
|
-
}) => ({
|
|
3533
|
+
}) => ({
|
|
3534
|
+
...track,
|
|
3466
3535
|
group: axisRef,
|
|
3467
3536
|
ref: {
|
|
3468
3537
|
type: type === "video" || type === "image" ? "file" : type,
|
|
@@ -3471,16 +3540,15 @@ const fixTracks = s => R.pipe(R.over(R.lensPath(["timeline", "entities", "tracks
|
|
|
3471
3540
|
editable: type === "comment",
|
|
3472
3541
|
timeline: "1"
|
|
3473
3542
|
}))))(s);
|
|
3474
|
-
|
|
3475
|
-
const
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
const measurementsSlice = R.pipe(R.over(R.lensProp("byId"), R.pipe(R.map(measurement => ({ ...measurement,
|
|
3543
|
+
const dataStreamsToMeasurements$1 = s => {
|
|
3544
|
+
const streamsSlice = R__namespace.path(["data", "entities", "dataStreams"], s);
|
|
3545
|
+
if (!R__namespace.isEmpty(streamsSlice) && !R__namespace.isNil(streamsSlice)) {
|
|
3546
|
+
const measurementsSlice = R__namespace.pipe(R__namespace.over(R__namespace.lensProp("byId"), R__namespace.pipe(R__namespace.map(measurement => ({
|
|
3547
|
+
...measurement,
|
|
3480
3548
|
legacy: true,
|
|
3481
3549
|
name: measurement.id
|
|
3482
3550
|
})))))(streamsSlice);
|
|
3483
|
-
return
|
|
3551
|
+
return R__namespace.pipe(R__namespace.dissocPath(["data", "entities", "dataStreams"]), R__namespace.assocPath(["data", "entities", "measurements"], measurementsSlice), R__namespace.over(R__namespace.lensPath(["data", "entities", "dataViewers", "byId"]), R__namespace.map(({
|
|
3484
3552
|
streams = [],
|
|
3485
3553
|
...dataViewer
|
|
3486
3554
|
}) => ({
|
|
@@ -3488,69 +3556,234 @@ const dataStreamsToMeasurements = s => {
|
|
|
3488
3556
|
...dataViewer
|
|
3489
3557
|
}))))(s);
|
|
3490
3558
|
}
|
|
3491
|
-
|
|
3492
3559
|
return s;
|
|
3493
3560
|
};
|
|
3494
|
-
|
|
3495
|
-
const translateComponent = component => {
|
|
3561
|
+
const translateComponent$1 = component => {
|
|
3496
3562
|
switch (component) {
|
|
3497
3563
|
case "DataViewerComponent":
|
|
3498
3564
|
return "DataViewerPanel";
|
|
3499
|
-
|
|
3500
3565
|
case "VideoComponent":
|
|
3501
3566
|
return "VideoPanel";
|
|
3502
|
-
|
|
3503
3567
|
case "PlaylistComponent":
|
|
3504
3568
|
return "PlaylistPanel";
|
|
3505
|
-
|
|
3506
3569
|
default:
|
|
3507
3570
|
return component;
|
|
3508
3571
|
}
|
|
3509
3572
|
};
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
return R.pipe(R.over(R.lensPath(["layout", "entities", "layoutSections", "byId"]), R.unless(R.isNil, R.map(R.when(R.has("component"), R.over(R.lensProp("component"), translateComponent))))))(s);
|
|
3573
|
+
const fixPanels$1 = s => {
|
|
3574
|
+
if (R__namespace.hasPath(["layout", "entities", "layoutSections", "byId"], s)) {
|
|
3575
|
+
return R__namespace.pipe(R__namespace.over(R__namespace.lensPath(["layout", "entities", "layoutSections", "byId"]), R__namespace.unless(R__namespace.isNil, R__namespace.map(R__namespace.when(R__namespace.has("component"), R__namespace.over(R__namespace.lensProp("component"), translateComponent$1))))))(s);
|
|
3514
3576
|
}
|
|
3515
|
-
|
|
3516
3577
|
return s;
|
|
3517
3578
|
};
|
|
3518
|
-
|
|
3519
|
-
const scaleZoomSteps = stage => {
|
|
3579
|
+
const scaleZoomSteps$1 = stage => {
|
|
3520
3580
|
const {
|
|
3521
3581
|
measurementScale
|
|
3522
3582
|
} = stage.data;
|
|
3523
|
-
return
|
|
3583
|
+
return R__namespace.over(R__namespace.lensPath(["data", "entities", "dataViewers", "byId"]), R__namespace.unless(R__namespace.isNil, R__namespace.mapObjIndexed(({
|
|
3524
3584
|
zoomSteps = [],
|
|
3525
3585
|
...rest
|
|
3526
|
-
}) => ({
|
|
3586
|
+
}) => ({
|
|
3587
|
+
...rest,
|
|
3527
3588
|
zoomSteps: rest.zoomStepsIsScaled ? zoomSteps : zoomSteps.map(step => step * Math.sqrt(measurementScale))
|
|
3528
3589
|
}))))(stage);
|
|
3529
3590
|
};
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
var v2ToV3 = R.pipe(R.tap(stage => {
|
|
3591
|
+
const updateVersion$2 = R__namespace.assoc("version", 3);
|
|
3592
|
+
var v2ToV3$1 = R__namespace.pipe(R__namespace.tap(stage => {
|
|
3533
3593
|
console.log("upgrading ", stage, " from 2 to 3");
|
|
3534
|
-
}), consolidate
|
|
3594
|
+
}), consolidate, R__namespace.unless(R__namespace.prop("error"), R__namespace.pipe(R__namespace.prop("stage"), removeOutlets$1, scaleZoomSteps$1, dataStreamsToMeasurements$1, createTimingSlice, createTimelineSlice, createFilesTimings, createComments, createCommentsTimings, createTimelineGroups, createTimeline, fixTracks, updateVersion$2, fixPanels$1, upgradeResources)));
|
|
3535
3595
|
|
|
3536
|
-
|
|
3596
|
+
/**
|
|
3597
|
+
* v3-to-v4 Stage Upgrader
|
|
3598
|
+
*
|
|
3599
|
+
* Converts Golden Layout (v3) to DockView layout (v4).
|
|
3600
|
+
*
|
|
3601
|
+
* Key changes:
|
|
3602
|
+
* - Converts layout.entities.layoutSections (flat structure) to layout.dockviewLayout (hierarchical tree)
|
|
3603
|
+
* - Maps component names: DataViewerComponent → DataViewerPanel, VideoComponent → VideoPanel, etc.
|
|
3604
|
+
* - Converts row/column/stack structure to branch/leaf DockView nodes
|
|
3605
|
+
* - Updates version to 4
|
|
3606
|
+
*/
|
|
3537
3607
|
|
|
3538
|
-
const
|
|
3608
|
+
const DOCKVIEW_HORIZONTAL = "HORIZONTAL";
|
|
3609
|
+
const DOCKVIEW_VERTICAL = "VERTICAL";
|
|
3610
|
+
const LEGACY_COMPONENT_TO_DOCKVIEW = {
|
|
3611
|
+
DataViewerComponent: "DataViewerPanel",
|
|
3612
|
+
VideoComponent: "VideoPanel",
|
|
3613
|
+
PlaylistComponent: "PlaylistPanel"
|
|
3614
|
+
};
|
|
3615
|
+
const mapLegacyComponentToDockview = component => {
|
|
3616
|
+
return LEGACY_COMPONENT_TO_DOCKVIEW[component] || component;
|
|
3617
|
+
};
|
|
3618
|
+
const getSectionId = value => {
|
|
3619
|
+
if (Array.isArray(value)) {
|
|
3620
|
+
return value[0];
|
|
3621
|
+
}
|
|
3622
|
+
return value || "";
|
|
3623
|
+
};
|
|
3624
|
+
const getSection = (sections, value) => sections[getSectionId(value)];
|
|
3625
|
+
const isComponentSection = section => {
|
|
3626
|
+
return Boolean(section) && !["row", "column", "stack"].includes((section === null || section === void 0 ? void 0 : section.type) || "");
|
|
3627
|
+
};
|
|
3628
|
+
const getRootSection = (content, sections) => {
|
|
3629
|
+
const rootId = getSectionId(content && content[0]);
|
|
3630
|
+
return rootId ? sections[rootId] : undefined;
|
|
3631
|
+
};
|
|
3632
|
+
const getOrientationForSection = section => {
|
|
3633
|
+
return (section === null || section === void 0 ? void 0 : section.type) === "row" ? DOCKVIEW_HORIZONTAL : DOCKVIEW_VERTICAL;
|
|
3634
|
+
};
|
|
3635
|
+
const getChildSize = (parent, child) => {
|
|
3636
|
+
if (!parent || !child) {
|
|
3637
|
+
return undefined;
|
|
3638
|
+
}
|
|
3639
|
+
return parent.type === "row" ? child.width : child.height;
|
|
3640
|
+
};
|
|
3641
|
+
const flattenDirectionalChildren = (section, sections) => {
|
|
3642
|
+
const content = (section === null || section === void 0 ? void 0 : section.content) || [];
|
|
3643
|
+
return content.flatMap(childValue => {
|
|
3644
|
+
const child = getSection(sections, childValue);
|
|
3645
|
+
if ((child === null || child === void 0 ? void 0 : child.type) === section.type) {
|
|
3646
|
+
return flattenDirectionalChildren(child, sections);
|
|
3647
|
+
}
|
|
3648
|
+
return [childValue];
|
|
3649
|
+
});
|
|
3650
|
+
};
|
|
3651
|
+
const createDockviewPanelState = section => {
|
|
3652
|
+
var _section$props, _section$props2;
|
|
3653
|
+
return {
|
|
3654
|
+
id: section.id,
|
|
3655
|
+
contentComponent: mapLegacyComponentToDockview(section.component || ""),
|
|
3656
|
+
title: ((_section$props = section.props) === null || _section$props === void 0 ? void 0 : _section$props.title) || section.title || section.id,
|
|
3657
|
+
params: {
|
|
3658
|
+
...section.props,
|
|
3659
|
+
wrapMode: section.wrapMode || ((_section$props2 = section.props) === null || _section$props2 === void 0 ? void 0 : _section$props2.wrapMode) || "over"
|
|
3660
|
+
}
|
|
3661
|
+
};
|
|
3662
|
+
};
|
|
3663
|
+
const createDockviewGroupId = section => {
|
|
3664
|
+
if (section.type === "stack") {
|
|
3665
|
+
return section.id;
|
|
3666
|
+
}
|
|
3667
|
+
return `${section.id}__group`;
|
|
3668
|
+
};
|
|
3669
|
+
const createDockviewLeaf = (section, sections) => {
|
|
3670
|
+
const childValues = section.type === "stack" ? section.content || [] : [section.id];
|
|
3671
|
+
const panelIds = childValues.map(getSectionId).filter(panelId => Boolean(sections[panelId]));
|
|
3672
|
+
const activeIndex = Math.max(0, Math.min(section.activeItemIndex || 0, Math.max(panelIds.length - 1, 0)));
|
|
3673
|
+
return {
|
|
3674
|
+
type: "leaf",
|
|
3675
|
+
data: {
|
|
3676
|
+
id: createDockviewGroupId(section),
|
|
3677
|
+
views: panelIds,
|
|
3678
|
+
activeView: panelIds[activeIndex]
|
|
3679
|
+
}
|
|
3680
|
+
};
|
|
3681
|
+
};
|
|
3682
|
+
const createDockviewGridNode = (section, sections) => {
|
|
3683
|
+
if (!section) {
|
|
3684
|
+
return null;
|
|
3685
|
+
}
|
|
3686
|
+
if (section.type === "stack" || isComponentSection(section)) {
|
|
3687
|
+
return createDockviewLeaf(section, sections);
|
|
3688
|
+
}
|
|
3689
|
+
const childValues = flattenDirectionalChildren(section, sections);
|
|
3690
|
+
const children = childValues.map(childValue => {
|
|
3691
|
+
const childSection = getSection(sections, childValue);
|
|
3692
|
+
const node = createDockviewGridNode(childSection, sections);
|
|
3693
|
+
if (!node) {
|
|
3694
|
+
return null;
|
|
3695
|
+
}
|
|
3696
|
+
return {
|
|
3697
|
+
...node,
|
|
3698
|
+
size: getChildSize(section, childSection)
|
|
3699
|
+
};
|
|
3700
|
+
}).filter(n => n !== null);
|
|
3701
|
+
if (children.length === 0) {
|
|
3702
|
+
return null;
|
|
3703
|
+
}
|
|
3704
|
+
if (children.length === 1) {
|
|
3705
|
+
return children[0];
|
|
3706
|
+
}
|
|
3707
|
+
return {
|
|
3708
|
+
type: "branch",
|
|
3709
|
+
data: children
|
|
3710
|
+
};
|
|
3711
|
+
};
|
|
3712
|
+
const filterLayoutSectionsByAssets = (sectionsById, assetsById) => {
|
|
3713
|
+
return R__namespace.pipe(R__namespace.map(section => {
|
|
3714
|
+
const assetId = R__namespace.path(["props", "assetId"], section);
|
|
3715
|
+
if (assetId && !assetsById[assetId]) {
|
|
3716
|
+
return null;
|
|
3717
|
+
}
|
|
3718
|
+
return section;
|
|
3719
|
+
}), R__namespace.filter(R__namespace.identity))(sectionsById);
|
|
3720
|
+
};
|
|
3721
|
+
const createPanelsById = sections => {
|
|
3722
|
+
return R__namespace.pipe(R__namespace.values, R__namespace.filter(isComponentSection), R__namespace.reduce((acc, section) => {
|
|
3723
|
+
return {
|
|
3724
|
+
...acc,
|
|
3725
|
+
[section.id]: createDockviewPanelState(section)
|
|
3726
|
+
};
|
|
3727
|
+
}, {}))(sections);
|
|
3728
|
+
};
|
|
3729
|
+
const convertLegacyLayoutToDockview = stage => {
|
|
3730
|
+
var _rootSection$content;
|
|
3731
|
+
const content = R__namespace.path(["layout", "content"], stage);
|
|
3732
|
+
const rawSections = R__namespace.pathOr({}, ["layout", "entities", "layoutSections", "byId"], stage);
|
|
3733
|
+
const assetsById = R__namespace.pathOr({}, ["assets", "entities", "assets", "byId"], stage);
|
|
3734
|
+
const sections = filterLayoutSectionsByAssets(rawSections, assetsById);
|
|
3735
|
+
const rootSection = getRootSection(content, sections);
|
|
3736
|
+
const rootNode = createDockviewGridNode(rootSection, sections);
|
|
3737
|
+
if (!rootSection || !rootNode) {
|
|
3738
|
+
return null;
|
|
3739
|
+
}
|
|
3740
|
+
return {
|
|
3741
|
+
grid: {
|
|
3742
|
+
root: rootNode,
|
|
3743
|
+
height: 100,
|
|
3744
|
+
width: 100,
|
|
3745
|
+
orientation: getOrientationForSection(rootSection)
|
|
3746
|
+
},
|
|
3747
|
+
panels: createPanelsById(sections),
|
|
3748
|
+
activeGroup: createDockviewGroupId(rootSection.type === "stack" ? rootSection : getSection(sections, (_rootSection$content = rootSection.content) === null || _rootSection$content === void 0 ? void 0 : _rootSection$content[0]) || rootSection)
|
|
3749
|
+
};
|
|
3750
|
+
};
|
|
3751
|
+
const upgradeToDockviewLayout = stage => {
|
|
3752
|
+
// If already has dockviewLayout, skip conversion
|
|
3753
|
+
if (R__namespace.hasPath(["layout", "dockviewLayout"], stage)) {
|
|
3754
|
+
return stage;
|
|
3755
|
+
}
|
|
3539
3756
|
|
|
3540
|
-
|
|
3757
|
+
// If no legacy layout sections, nothing to convert
|
|
3758
|
+
if (!R__namespace.hasPath(["layout", "entities", "layoutSections"], stage)) {
|
|
3759
|
+
return stage;
|
|
3760
|
+
}
|
|
3761
|
+
const dockviewLayout = convertLegacyLayoutToDockview(stage);
|
|
3541
3762
|
|
|
3542
|
-
|
|
3763
|
+
// Remove legacy layout structure, keep other layout state
|
|
3764
|
+
return R__namespace.pipe(R__namespace.dissocPath(["layout", "entities"]), R__namespace.dissocPath(["layout", "content"]), R__namespace.assocPath(["layout", "dockviewLayout"], dockviewLayout),
|
|
3765
|
+
// Preserve these layout state properties if they exist
|
|
3766
|
+
R__namespace.when(R__namespace.hasPath(["layout", "focus"]), R__namespace.identity), R__namespace.when(R__namespace.hasPath(["layout", "dragging"]), R__namespace.identity), R__namespace.when(R__namespace.hasPath(["layout", "resizingPanels"]), R__namespace.identity))(stage);
|
|
3767
|
+
};
|
|
3768
|
+
const updateVersion$1 = R__namespace.assoc("version", 4);
|
|
3769
|
+
var v3ToV4 = R__namespace.pipe(R__namespace.tap(stage => {
|
|
3770
|
+
console.log("upgrading ", stage, " from 3 to 4");
|
|
3771
|
+
}), upgradeToDockviewLayout, updateVersion$1);
|
|
3543
3772
|
|
|
3544
|
-
|
|
3773
|
+
var upgraders = () => [[2, v1ToV2], [3, v2ToV3$1], [4, v3ToV4]];
|
|
3545
3774
|
|
|
3546
|
-
const
|
|
3775
|
+
const resolveFrom = stage => detectVersion(stage);
|
|
3776
|
+
const resolveTo = to => R.defaultTo(R.last(versions))(to);
|
|
3777
|
+
const versionsCorrect = (from, to) => R.gte(to, from);
|
|
3778
|
+
const upgradePipe = (from, to, stage) => R.pipe(R.filter(([v]) => v > from && v <= to), R.map(R.nth(1)), R.prepend(R.always(stage)), R.apply(R.pipe), R.applyTo(stage))(upgraders());
|
|
3779
|
+
const optionsParser = ({
|
|
3547
3780
|
upgradeFrom: from = undefined,
|
|
3548
3781
|
upgradeTo: to = undefined
|
|
3549
3782
|
}) => ({
|
|
3550
3783
|
from,
|
|
3551
3784
|
to
|
|
3552
3785
|
});
|
|
3553
|
-
var upgrade = (
|
|
3786
|
+
var upgrade = (stage, options = {}) => {
|
|
3554
3787
|
const {
|
|
3555
3788
|
to = undefined
|
|
3556
3789
|
} = options;
|
|
@@ -3559,18 +3792,16 @@ var upgrade = ((stage, options = {}) => {
|
|
|
3559
3792
|
let upgraded = stage;
|
|
3560
3793
|
let error;
|
|
3561
3794
|
console.log(`upgrading from ${resolvedFrom} to ${resolvedTo}.`);
|
|
3562
|
-
|
|
3563
3795
|
if (versionsCorrect(resolvedFrom, resolvedTo)) {
|
|
3564
3796
|
upgraded = upgradePipe(resolvedFrom, resolvedTo, stage);
|
|
3565
3797
|
} else {
|
|
3566
3798
|
error = new Error(`Incorrect version: from: ${resolvedFrom} > to: ${resolvedTo}`);
|
|
3567
3799
|
}
|
|
3568
|
-
|
|
3569
3800
|
return {
|
|
3570
3801
|
stage: upgraded,
|
|
3571
3802
|
error
|
|
3572
3803
|
};
|
|
3573
|
-
}
|
|
3804
|
+
};
|
|
3574
3805
|
|
|
3575
3806
|
var timezoneData = {
|
|
3576
3807
|
version: "2018g",
|
|
@@ -3583,19 +3814,15 @@ const {
|
|
|
3583
3814
|
setTimeZone,
|
|
3584
3815
|
populateTimeZones
|
|
3585
3816
|
} = require("timezone-support/dist/lookup-convert");
|
|
3586
|
-
|
|
3587
3817
|
const {
|
|
3588
3818
|
formatZonedTime
|
|
3589
3819
|
} = require("timezone-support/dist/parse-format");
|
|
3590
|
-
|
|
3591
3820
|
populateTimeZones(timezoneData);
|
|
3592
3821
|
const dateWithoutTimeZoneExp = /^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})((\.)([0-9]{0,}))?$/;
|
|
3593
3822
|
const dateWithWrongSeconds = /^([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:)([0-9]{3,})((\.[0-9]+)?((Z|(\+|-)([0-9]{2}:[0-9]{2}|[0-9]+))))$/;
|
|
3594
3823
|
const amsterdam = findTimeZone("Europe/Amsterdam");
|
|
3595
|
-
|
|
3596
3824
|
const fixDateWithoutTimezone = d => {
|
|
3597
3825
|
const matches = dateWithoutTimeZoneExp.exec(d);
|
|
3598
|
-
|
|
3599
3826
|
if (matches) {
|
|
3600
3827
|
const timeObj = {
|
|
3601
3828
|
year: matches[1],
|
|
@@ -3612,89 +3839,79 @@ const fixDateWithoutTimezone = d => {
|
|
|
3612
3839
|
const formattedTimezone = formatZonedTime(withTimezone, "Z");
|
|
3613
3840
|
return `${formattedDate}T${formattedTime}${milliseconds || ""}${formattedTimezone}`;
|
|
3614
3841
|
}
|
|
3615
|
-
|
|
3616
3842
|
return d;
|
|
3617
3843
|
};
|
|
3618
|
-
|
|
3619
3844
|
const fixDateWithWrongSeconds = d => {
|
|
3620
3845
|
const matches = dateWithWrongSeconds.exec(d);
|
|
3621
|
-
|
|
3622
3846
|
if (matches) {
|
|
3623
3847
|
const [, rest, seconds, timezone] = matches;
|
|
3624
3848
|
const newDate = `${rest}${seconds.substring(seconds.length - 2)}${timezone}`;
|
|
3625
3849
|
return newDate;
|
|
3626
3850
|
}
|
|
3627
|
-
|
|
3628
3851
|
return d;
|
|
3629
3852
|
};
|
|
3630
|
-
|
|
3631
|
-
const
|
|
3632
|
-
|
|
3633
|
-
const fixDates = obj => R.pipe(R.map(R.ifElse(isIncorrectTime, R.pipe(R.tap(x => `${x} is incorrect date`), fixDateWithoutTimezone, fixDateWithWrongSeconds), R.when(R.is(Object), c => fixDates(c)))))(obj);
|
|
3853
|
+
const isIncorrectTime = input => R__namespace.both(R__namespace.is(String), R__namespace.pipe(R__namespace.anyPass([R__namespace.test(dateWithoutTimeZoneExp), R__namespace.test(dateWithWrongSeconds)])))(input);
|
|
3854
|
+
const fixDates = obj => R__namespace.pipe(R__namespace.map(R__namespace.ifElse(isIncorrectTime, R__namespace.pipe(R__namespace.tap(x => `${x} is incorrect date`), fixDateWithoutTimezone, fixDateWithWrongSeconds), R__namespace.when(R__namespace.is(Object), c => fixDates(c)))))(obj);
|
|
3634
3855
|
|
|
3635
3856
|
const fixDatesWithOptions = (options, stage) => ({
|
|
3636
3857
|
stage: fixDates(stage)
|
|
3637
3858
|
});
|
|
3638
|
-
|
|
3639
3859
|
const validateWithOptions = (options, stage) => {
|
|
3640
|
-
const validated = validate(stage, optionsParser(options));
|
|
3860
|
+
const validated = validate(stage, optionsParser$1(options));
|
|
3641
3861
|
return validated;
|
|
3642
3862
|
};
|
|
3643
|
-
|
|
3644
|
-
const
|
|
3645
|
-
|
|
3646
|
-
const consolidateWithOptions = (options, stage) => consolidate$1(stage);
|
|
3647
|
-
|
|
3648
|
-
var steps = (() => [fixDatesWithOptions, validateWithOptions, consolidateWithOptions, upgradeWithOptions]);
|
|
3863
|
+
const upgradeWithOptions = (options, stage) => upgrade(stage, optionsParser(options));
|
|
3864
|
+
const consolidateWithOptions = (options, stage) => consolidate(stage);
|
|
3865
|
+
var steps = () => [fixDatesWithOptions, validateWithOptions, consolidateWithOptions, upgradeWithOptions];
|
|
3649
3866
|
|
|
3650
3867
|
const hasError = R.prop("error");
|
|
3651
3868
|
const doStep = R.curry((options, step, response) => {
|
|
3652
3869
|
const normalizedStep = R.curry(R.nAry(2, step));
|
|
3653
3870
|
return R.pipe(R.defaultTo({}), R.unless(hasError, R.pipe(R.prop("stage"), normalizedStep(options))))(response);
|
|
3654
3871
|
});
|
|
3655
|
-
const handler = R.curry((steps, options, stage) => R.pipe(R.defaultTo([]), R.map(doStep(options)),
|
|
3872
|
+
const handler = R.curry((steps, options, stage) => R.pipe(R.defaultTo([]), R.map(doStep(options)),
|
|
3873
|
+
// Map all the steps to a doStep wrapper so they can be piped.
|
|
3656
3874
|
R.prepend(R.always({
|
|
3657
3875
|
stage
|
|
3658
|
-
})), R.apply(R.pipe),
|
|
3876
|
+
})), R.apply(R.pipe),
|
|
3877
|
+
// Create a pipe of all the steps.
|
|
3659
3878
|
R.applyTo(stage) // Pipe the stage through the steps.
|
|
3660
3879
|
)(steps));
|
|
3661
|
-
var handlerFactory = (
|
|
3880
|
+
var handlerFactory = (steps, options) => handler(steps, options);
|
|
3662
3881
|
|
|
3663
|
-
var defaultOptions = (
|
|
3882
|
+
var defaultOptions = () => Object.freeze({
|
|
3664
3883
|
upgradeFrom: undefined,
|
|
3665
3884
|
upgradeTo: undefined,
|
|
3666
3885
|
validateVersion: undefined
|
|
3667
|
-
})
|
|
3668
|
-
|
|
3669
|
-
const removeOutlets$1 = s => {
|
|
3670
|
-
const outlets = R.path(["data", "entities", "outlets"], s);
|
|
3886
|
+
});
|
|
3671
3887
|
|
|
3888
|
+
const removeOutlets = s => {
|
|
3889
|
+
const outlets = R__namespace.path(["data", "entities", "outlets"], s);
|
|
3672
3890
|
if (outlets) {
|
|
3673
|
-
return
|
|
3891
|
+
return R__namespace.pipe(R__namespace.dissocPath(["data", "entities", "outlets"]), R__namespace.over(R__namespace.lensPath(["data", "entities", "dataViewers", "byId"]), R__namespace.map(({
|
|
3674
3892
|
outletId,
|
|
3675
3893
|
...dataViewer
|
|
3676
3894
|
}) => {
|
|
3677
|
-
const outlet =
|
|
3895
|
+
const outlet = R__namespace.path(["byId", outletId], outlets) || {
|
|
3678
3896
|
streams: []
|
|
3679
3897
|
};
|
|
3680
|
-
return {
|
|
3898
|
+
return {
|
|
3899
|
+
...dataViewer,
|
|
3681
3900
|
streams: outlet.streams
|
|
3682
3901
|
};
|
|
3683
3902
|
})))(s);
|
|
3684
3903
|
}
|
|
3685
|
-
|
|
3686
3904
|
return s;
|
|
3687
3905
|
};
|
|
3688
|
-
|
|
3689
|
-
const
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
const measurementsSlice = R.pipe(R.over(R.lensProp("byId"), R.pipe(R.map(measurement => ({ ...measurement,
|
|
3906
|
+
const dataStreamsToMeasurements = s => {
|
|
3907
|
+
const streamsSlice = R__namespace.path(["data", "entities", "dataStreams"], s);
|
|
3908
|
+
if (!R__namespace.isEmpty(streamsSlice) && !R__namespace.isNil(streamsSlice)) {
|
|
3909
|
+
const measurementsSlice = R__namespace.pipe(R__namespace.over(R__namespace.lensProp("byId"), R__namespace.pipe(R__namespace.map(measurement => ({
|
|
3910
|
+
...measurement,
|
|
3694
3911
|
legacy: true,
|
|
3695
3912
|
name: measurement.id
|
|
3696
3913
|
})))))(streamsSlice);
|
|
3697
|
-
return
|
|
3914
|
+
return R__namespace.pipe(R__namespace.dissocPath(["data", "entities", "dataStreams"]), R__namespace.assocPath(["data", "entities", "measurements"], measurementsSlice), R__namespace.over(R__namespace.lensPath(["data", "entities", "dataViewers", "byId"]), R__namespace.map(({
|
|
3698
3915
|
streams = [],
|
|
3699
3916
|
...dataViewer
|
|
3700
3917
|
}) => ({
|
|
@@ -3702,64 +3919,56 @@ const dataStreamsToMeasurements$1 = s => {
|
|
|
3702
3919
|
...dataViewer
|
|
3703
3920
|
}))))(s);
|
|
3704
3921
|
}
|
|
3705
|
-
|
|
3706
3922
|
return s;
|
|
3707
3923
|
};
|
|
3708
|
-
|
|
3709
|
-
const translateComponent$1 = component => {
|
|
3924
|
+
const translateComponent = component => {
|
|
3710
3925
|
switch (component) {
|
|
3711
3926
|
case "DataViewerComponent":
|
|
3712
3927
|
return "DataViewerPanel";
|
|
3713
|
-
|
|
3714
3928
|
case "VideoComponent":
|
|
3715
3929
|
return "VideoPanel";
|
|
3716
|
-
|
|
3717
3930
|
case "PlaylistComponent":
|
|
3718
3931
|
return "PlaylistPanel";
|
|
3719
|
-
|
|
3720
3932
|
default:
|
|
3721
3933
|
return component;
|
|
3722
3934
|
}
|
|
3723
3935
|
};
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
return R.pipe(R.over(R.lensPath(["layout", "entities", "layoutSections", "byId"]), R.unless(R.isNil, R.map(R.when(R.has("component"), R.over(R.lensProp("component"), translateComponent$1))))))(s);
|
|
3936
|
+
const fixPanels = s => {
|
|
3937
|
+
if (R__namespace.hasPath(["layout", "entities", "layoutSections", "byId"], s)) {
|
|
3938
|
+
return R__namespace.pipe(R__namespace.over(R__namespace.lensPath(["layout", "entities", "layoutSections", "byId"]), R__namespace.unless(R__namespace.isNil, R__namespace.map(R__namespace.when(R__namespace.has("component"), R__namespace.over(R__namespace.lensProp("component"), translateComponent))))))(s);
|
|
3728
3939
|
}
|
|
3729
|
-
|
|
3730
3940
|
return s;
|
|
3731
3941
|
};
|
|
3732
|
-
|
|
3733
|
-
const scaleZoomSteps$1 = stage => settings => {
|
|
3942
|
+
const scaleZoomSteps = stage => settings => {
|
|
3734
3943
|
const {
|
|
3735
3944
|
measurementScale
|
|
3736
3945
|
} = stage.data;
|
|
3737
|
-
return
|
|
3946
|
+
return R__namespace.over(R__namespace.lensPath(["data", "entities", "dataViewers", "byId"]), R__namespace.unless(R__namespace.isNil, R__namespace.mapObjIndexed(({
|
|
3738
3947
|
zoomSteps = [],
|
|
3739
3948
|
...rest
|
|
3740
|
-
}) => ({
|
|
3949
|
+
}) => ({
|
|
3950
|
+
...rest,
|
|
3741
3951
|
zoomSteps: rest.zoomStepsIsScaled ? zoomSteps : zoomSteps.map(step => step * Math.sqrt(measurementScale))
|
|
3742
3952
|
}))))(settings);
|
|
3743
3953
|
};
|
|
3744
|
-
|
|
3745
|
-
const
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
return R.pipe(R.tap(s => {
|
|
3954
|
+
const removeTimeline = R__namespace.dissoc("timeline");
|
|
3955
|
+
const updateVersion = R__namespace.assoc("version", 3);
|
|
3956
|
+
var v2ToV3 = R__namespace.curry((stage, settings) => {
|
|
3957
|
+
return R__namespace.pipe(R__namespace.tap(s => {
|
|
3749
3958
|
console.log("upgrading settings", s, " from 2 to 3");
|
|
3750
|
-
}),
|
|
3959
|
+
}), R__namespace.pipe(removeOutlets, dataStreamsToMeasurements, updateVersion, scaleZoomSteps(stage), fixPanels, removeTimeline))(settings);
|
|
3751
3960
|
});
|
|
3752
3961
|
|
|
3753
|
-
var settingsUpgrader =
|
|
3754
|
-
return
|
|
3962
|
+
var settingsUpgrader = R__namespace.curry((stage, settings) => {
|
|
3963
|
+
return R__namespace.pipe(R__namespace.unless(R__namespace.propEq(3, "version"), v2ToV3(stage)))(settings);
|
|
3755
3964
|
});
|
|
3756
3965
|
|
|
3757
|
-
const settingsCleaner =
|
|
3758
|
-
var settingsHandler = (
|
|
3966
|
+
const settingsCleaner = R__namespace.pipe(R__namespace.dissocPath(["timer", "wantedTime"]));
|
|
3967
|
+
var settingsHandler = (stage, settings) => R__namespace.pipe(settingsUpgrader(stage), settingsCleaner)(settings);
|
|
3759
3968
|
|
|
3760
3969
|
var name = "insync-stage-handler";
|
|
3761
|
-
var version = "
|
|
3762
|
-
var description
|
|
3970
|
+
var version = "4.0.0-beta.1";
|
|
3971
|
+
var description = "Handles stages files. This consists of validating, upgrading and consolodating them.";
|
|
3763
3972
|
var author = "David Ammeraal (Noterik B.V.)";
|
|
3764
3973
|
var license = "MIT";
|
|
3765
3974
|
var main = "dist/library.js";
|
|
@@ -3780,39 +3989,52 @@ var scripts = {
|
|
|
3780
3989
|
"lint:fix": "yarn lint --fix"
|
|
3781
3990
|
};
|
|
3782
3991
|
var devDependencies = {
|
|
3783
|
-
"@babel/core": "^7.
|
|
3784
|
-
"@babel/
|
|
3785
|
-
"@
|
|
3992
|
+
"@babel/core": "^7.29.7",
|
|
3993
|
+
"@babel/eslint-parser": "^7.25.0",
|
|
3994
|
+
"@babel/preset-env": "^7.29.7",
|
|
3995
|
+
"@eslint/js": "^10.0.1",
|
|
3996
|
+
"@rollup/plugin-babel": "^5.3.1",
|
|
3786
3997
|
"@rollup/plugin-json": "^4.1.0",
|
|
3787
|
-
"@rollup/plugin-node-resolve": "^
|
|
3788
|
-
"babel-
|
|
3789
|
-
"babel-
|
|
3790
|
-
|
|
3791
|
-
eslint: "
|
|
3792
|
-
"eslint-config-
|
|
3793
|
-
"eslint-
|
|
3794
|
-
"eslint-import
|
|
3795
|
-
"eslint-plugin-
|
|
3796
|
-
"eslint-plugin-
|
|
3797
|
-
|
|
3798
|
-
jest: "^
|
|
3799
|
-
prettier: "^2.
|
|
3800
|
-
rollup: "^2.
|
|
3801
|
-
"rollup-plugin-eslint": "^7.0.0"
|
|
3998
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
3999
|
+
"babel-jest": "^30.0.0",
|
|
4000
|
+
"babel-plugin-module-resolver": "^4.1.0",
|
|
4001
|
+
eslint: "^10.0.0",
|
|
4002
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
4003
|
+
"eslint-config-prettier": "^10.0.0",
|
|
4004
|
+
"eslint-import-resolver-babel-module": "^5.3.2",
|
|
4005
|
+
"eslint-plugin-import": "^2.32.0",
|
|
4006
|
+
"eslint-plugin-jest": "^29.0.0",
|
|
4007
|
+
"eslint-plugin-prettier": "^5.2.0",
|
|
4008
|
+
globals: "^17.6.0",
|
|
4009
|
+
jest: "^30.0.0",
|
|
4010
|
+
prettier: "^2.8.8",
|
|
4011
|
+
rollup: "^2.80.0"
|
|
3802
4012
|
};
|
|
3803
4013
|
var dependencies = {
|
|
3804
|
-
ajv: "^6.
|
|
4014
|
+
ajv: "^6.15.0",
|
|
3805
4015
|
"ajv-keywords": "^3.5.2",
|
|
3806
|
-
"core-js": "^3.
|
|
3807
|
-
"date-fns": "^
|
|
4016
|
+
"core-js": "^3.49.0",
|
|
4017
|
+
"date-fns": "^4.1.0",
|
|
3808
4018
|
"object-hash": "^1.3.1",
|
|
3809
|
-
ramda: "^0.
|
|
4019
|
+
ramda: "^0.32.0",
|
|
3810
4020
|
"timezone-support": "^1.8.1"
|
|
3811
4021
|
};
|
|
4022
|
+
var resolutions = {
|
|
4023
|
+
minimist: "^1.2.8",
|
|
4024
|
+
"ansi-regex": "^5.0.1",
|
|
4025
|
+
"brace-expansion": "^2.0.1",
|
|
4026
|
+
minimatch: "^3.1.4",
|
|
4027
|
+
"path-parse": "^1.0.7",
|
|
4028
|
+
json5: "^2.2.3",
|
|
4029
|
+
picomatch: "^2.3.1",
|
|
4030
|
+
lodash: "^4.17.21",
|
|
4031
|
+
"js-yaml": "^4.1.0",
|
|
4032
|
+
debug: "^4.3.5"
|
|
4033
|
+
};
|
|
3812
4034
|
var pkg = {
|
|
3813
4035
|
name: name,
|
|
3814
4036
|
version: version,
|
|
3815
|
-
description: description
|
|
4037
|
+
description: description,
|
|
3816
4038
|
author: author,
|
|
3817
4039
|
license: license,
|
|
3818
4040
|
main: main,
|
|
@@ -3821,7 +4043,8 @@ var pkg = {
|
|
|
3821
4043
|
files: files,
|
|
3822
4044
|
scripts: scripts,
|
|
3823
4045
|
devDependencies: devDependencies,
|
|
3824
|
-
dependencies: dependencies
|
|
4046
|
+
dependencies: dependencies,
|
|
4047
|
+
resolutions: resolutions
|
|
3825
4048
|
};
|
|
3826
4049
|
|
|
3827
4050
|
console.log("inSync StageHandler version", pkg.version);
|