insync-stage-handler 4.0.0-beta.3 → 4.0.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 +18 -4
- package/dist/library.js.map +1 -1
- package/dist/module.js +19 -5
- package/dist/module.js.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as R from 'ramda';
|
|
2
|
-
import { flip, prop, path, curry, map as map$1, compose, indexBy, pipe, converge, pathOr, defaultTo, hasPath,
|
|
2
|
+
import { flip, prop, path, curry, map as map$1, compose, indexBy, pipe, converge, pathOr, defaultTo, hasPath, prepend, join, applyTo, assoc, dissocPath, filter, propSatisfies, startsWith, pair, replace, reduce, assocPath, tap, propOr, always, last, gte, nth, apply, nAry, unless } from 'ramda';
|
|
3
3
|
import Ajv from 'ajv';
|
|
4
4
|
import { formatWithOptions, parseISO } from 'date-fns/fp';
|
|
5
5
|
|
|
@@ -40,7 +40,7 @@ const formatErrorMessage = errors => {
|
|
|
40
40
|
return pipe(map$1(({
|
|
41
41
|
dataPath,
|
|
42
42
|
message
|
|
43
|
-
}) => `path: "${dataPath}", message: ${message}
|
|
43
|
+
}) => ` - path: "${dataPath}", message: ${message}\n`), prepend(header), join(""))(errors);
|
|
44
44
|
};
|
|
45
45
|
var createValidationError = errors => {
|
|
46
46
|
const err = new ValidationError(formatErrorMessage(errors));
|
|
@@ -3714,6 +3714,19 @@ const createDockviewGridNode = (section, sections) => {
|
|
|
3714
3714
|
data: children
|
|
3715
3715
|
};
|
|
3716
3716
|
};
|
|
3717
|
+
const ensureBranchRoot = node => {
|
|
3718
|
+
if (!node || node.type !== "leaf") {
|
|
3719
|
+
return node;
|
|
3720
|
+
}
|
|
3721
|
+
return {
|
|
3722
|
+
type: "branch",
|
|
3723
|
+
size: 100,
|
|
3724
|
+
data: [{
|
|
3725
|
+
...node,
|
|
3726
|
+
size: 100
|
|
3727
|
+
}]
|
|
3728
|
+
};
|
|
3729
|
+
};
|
|
3717
3730
|
const filterLayoutSectionsByAssets = (sectionsById, assetsById) => {
|
|
3718
3731
|
return R.pipe(R.map(section => {
|
|
3719
3732
|
const assetId = R.path(["props", "assetId"], section);
|
|
@@ -3738,12 +3751,13 @@ const convertLegacyLayoutToDockview = stage => {
|
|
|
3738
3751
|
const sections = filterLayoutSectionsByAssets(rawSections, assetsById);
|
|
3739
3752
|
const rootSection = getRootSection(content, sections);
|
|
3740
3753
|
const rootNode = createDockviewGridNode(rootSection, sections);
|
|
3741
|
-
|
|
3754
|
+
const dockviewRoot = ensureBranchRoot(rootNode);
|
|
3755
|
+
if (!rootSection || !dockviewRoot) {
|
|
3742
3756
|
return null;
|
|
3743
3757
|
}
|
|
3744
3758
|
return {
|
|
3745
3759
|
grid: {
|
|
3746
|
-
root:
|
|
3760
|
+
root: dockviewRoot,
|
|
3747
3761
|
height: 100,
|
|
3748
3762
|
width: 100,
|
|
3749
3763
|
orientation: getOrientationForSection(rootSection)
|
|
@@ -3982,7 +3996,7 @@ const settingsCleaner = R.pipe(R.dissocPath(["timer", "wantedTime"]));
|
|
|
3982
3996
|
var settingsHandler = (stage, settings) => R.pipe(settingsUpgrader(stage), settingsCleaner)(settings);
|
|
3983
3997
|
|
|
3984
3998
|
var name = "insync-stage-handler";
|
|
3985
|
-
var version = "4.0.
|
|
3999
|
+
var version = "4.0.1";
|
|
3986
4000
|
var description = "Handles stages files. This consists of validating, upgrading and consolodating them.";
|
|
3987
4001
|
var author = "David Ammeraal (Noterik B.V.)";
|
|
3988
4002
|
var license = "MIT";
|