@galaxy-tool-util/workflow-graph 1.0.0 → 1.2.0
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/README.md +2 -12
- package/dist/collection-type-variants.d.ts +12 -6
- package/dist/collection-type-variants.d.ts.map +1 -1
- package/dist/collection-type-variants.js +14 -8
- package/dist/collection-type-variants.js.map +1 -1
- package/dist/collection-type.d.ts +16 -2
- package/dist/collection-type.d.ts.map +1 -1
- package/dist/collection-type.js +57 -4
- package/dist/collection-type.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
# @galaxy-tool-util/workflow-graph
|
|
2
2
|
|
|
3
|
-
Pure collection-type algebra and datatype subtyping primitives extracted from Galaxy's workflow editor.
|
|
3
|
+
Pure collection-type algebra and datatype subtyping primitives extracted from Galaxy's workflow editor. No runtime dependencies.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- Galaxy (re-exported from `client/src/components/Workflow/Editor/modules/` and
|
|
8
|
-
`client/src/components/Datatypes/`).
|
|
9
|
-
- The TypeScript workflow connection validator in this monorepo.
|
|
10
|
-
- Future tooling (CLI, VS Code plugin, gxwf-ui).
|
|
11
|
-
|
|
12
|
-
No runtime dependencies. Pure TypeScript / ESM.
|
|
13
|
-
|
|
14
|
-
See `TS_CONNECTION_REFACTOR_IN_GX_PLAN.md` and the `old/CONNECTION_VALIDATION.md`
|
|
15
|
-
historical note for context on why these primitives were extracted.
|
|
5
|
+
See the [workflow-graph package docs](https://jmchilton.github.io/galaxy-tool-util-ts/#/packages/workflow-graph) for the public API and TS-specific notes. The collection-type algebra itself is documented Galaxy-side in [`collection_semantics.yml`](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/model/dataset_collections/types/collection_semantics.yml).
|
|
@@ -4,19 +4,25 @@
|
|
|
4
4
|
* Galaxy tools can declare `collection_types: string[]` on collection inputs,
|
|
5
5
|
* meaning the input accepts any of several collection types. These helpers
|
|
6
6
|
* mirror the inner loop of `InputCollectionTerminal._effectiveMapOver` in the
|
|
7
|
-
* Galaxy editor and the Python port's `_split_collection_type` helper
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Galaxy editor and the Python port's `_split_collection_type` helper.
|
|
8
|
+
*
|
|
9
|
+
* sample_sheet asymmetry is enforced inside `CollectionTypeDescription.accepts`
|
|
10
|
+
* itself, so callers don't need to re-check it here for the simple
|
|
11
|
+
* `accepts(output)` cases. The Galaxy `InputCollectionTerminal.canAccept`
|
|
12
|
+
* still keeps a defense-in-depth re-check for compound effective types where
|
|
13
|
+
* the receiver's raw type can hide the guard from `accepts` — that remains a
|
|
14
|
+
* caller-side concern.
|
|
10
15
|
*/
|
|
11
16
|
import type { CollectionTypeDescriptor } from "./collection-type.js";
|
|
12
17
|
/**
|
|
13
|
-
* True if
|
|
18
|
+
* True if any of the accepted `inputs` accepts `output` directly.
|
|
19
|
+
* Direction follows `input_type.accepts(output_type)`.
|
|
14
20
|
*/
|
|
15
|
-
export declare function
|
|
21
|
+
export declare function acceptsAny(output: CollectionTypeDescriptor, inputs: CollectionTypeDescriptor[]): boolean;
|
|
16
22
|
/**
|
|
17
23
|
* Compute the effective map-over for an output connecting to a multi-accept
|
|
18
24
|
* input. Mirrors `InputCollectionTerminal._effectiveMapOver`:
|
|
19
|
-
* - If any accepted input directly
|
|
25
|
+
* - If any accepted input directly accepts the output, no map-over is needed
|
|
20
26
|
* (returns NULL).
|
|
21
27
|
* - Otherwise, return the first non-null `output.effectiveMapOver(input)` for
|
|
22
28
|
* an input the output can map over.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-type-variants.d.ts","sourceRoot":"","sources":["../src/collection-type-variants.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"collection-type-variants.d.ts","sourceRoot":"","sources":["../src/collection-type-variants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAGrE;;;GAGG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,wBAAwB,EAChC,MAAM,EAAE,wBAAwB,EAAE,GACjC,OAAO,CAET;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,wBAAwB,EAChC,MAAM,EAAE,wBAAwB,EAAE,GACjC,wBAAwB,CAa1B"}
|
|
@@ -4,28 +4,34 @@
|
|
|
4
4
|
* Galaxy tools can declare `collection_types: string[]` on collection inputs,
|
|
5
5
|
* meaning the input accepts any of several collection types. These helpers
|
|
6
6
|
* mirror the inner loop of `InputCollectionTerminal._effectiveMapOver` in the
|
|
7
|
-
* Galaxy editor and the Python port's `_split_collection_type` helper
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Galaxy editor and the Python port's `_split_collection_type` helper.
|
|
8
|
+
*
|
|
9
|
+
* sample_sheet asymmetry is enforced inside `CollectionTypeDescription.accepts`
|
|
10
|
+
* itself, so callers don't need to re-check it here for the simple
|
|
11
|
+
* `accepts(output)` cases. The Galaxy `InputCollectionTerminal.canAccept`
|
|
12
|
+
* still keeps a defense-in-depth re-check for compound effective types where
|
|
13
|
+
* the receiver's raw type can hide the guard from `accepts` — that remains a
|
|
14
|
+
* caller-side concern.
|
|
10
15
|
*/
|
|
11
16
|
import { NULL_COLLECTION_TYPE_DESCRIPTION } from "./collection-type.js";
|
|
12
17
|
/**
|
|
13
|
-
* True if
|
|
18
|
+
* True if any of the accepted `inputs` accepts `output` directly.
|
|
19
|
+
* Direction follows `input_type.accepts(output_type)`.
|
|
14
20
|
*/
|
|
15
|
-
export function
|
|
16
|
-
return inputs.some((input) => input.
|
|
21
|
+
export function acceptsAny(output, inputs) {
|
|
22
|
+
return inputs.some((input) => input.accepts(output));
|
|
17
23
|
}
|
|
18
24
|
/**
|
|
19
25
|
* Compute the effective map-over for an output connecting to a multi-accept
|
|
20
26
|
* input. Mirrors `InputCollectionTerminal._effectiveMapOver`:
|
|
21
|
-
* - If any accepted input directly
|
|
27
|
+
* - If any accepted input directly accepts the output, no map-over is needed
|
|
22
28
|
* (returns NULL).
|
|
23
29
|
* - Otherwise, return the first non-null `output.effectiveMapOver(input)` for
|
|
24
30
|
* an input the output can map over.
|
|
25
31
|
* - Falls back to NULL when no variant accepts the output.
|
|
26
32
|
*/
|
|
27
33
|
export function effectiveMapOverAny(output, inputs) {
|
|
28
|
-
if (inputs.some((input) => input.
|
|
34
|
+
if (inputs.some((input) => input.accepts(output))) {
|
|
29
35
|
return NULL_COLLECTION_TYPE_DESCRIPTION;
|
|
30
36
|
}
|
|
31
37
|
for (const input of inputs) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-type-variants.js","sourceRoot":"","sources":["../src/collection-type-variants.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"collection-type-variants.js","sourceRoot":"","sources":["../src/collection-type-variants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAExE;;;GAGG;AACH,MAAM,UAAU,UAAU,CACxB,MAAgC,EAChC,MAAkC;IAElC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;AACvD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAgC,EAChC,MAAkC;IAElC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QAClD,OAAO,gCAAgC,CAAC;IAC1C,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;YACjD,IAAI,SAAS,KAAK,gCAAgC,EAAE,CAAC;gBACnD,OAAO,SAAS,CAAC;YACnB,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,gCAAgC,CAAC;AAC1C,CAAC"}
|
|
@@ -2,7 +2,8 @@ export interface CollectionTypeDescriptor {
|
|
|
2
2
|
isCollection: boolean;
|
|
3
3
|
collectionType: string | null;
|
|
4
4
|
rank: number;
|
|
5
|
-
|
|
5
|
+
accepts(other: CollectionTypeDescriptor): boolean;
|
|
6
|
+
compatible(other: CollectionTypeDescriptor): boolean;
|
|
6
7
|
canMapOver(other: CollectionTypeDescriptor): boolean;
|
|
7
8
|
append(other: CollectionTypeDescriptor): CollectionTypeDescriptor;
|
|
8
9
|
equal(other: CollectionTypeDescriptor | null): boolean;
|
|
@@ -17,7 +18,20 @@ export declare class CollectionTypeDescription implements CollectionTypeDescript
|
|
|
17
18
|
rank: number;
|
|
18
19
|
constructor(collectionType: string);
|
|
19
20
|
append(other: CollectionTypeDescriptor): CollectionTypeDescriptor;
|
|
20
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Asymmetric direct-edge check: does an input slot of type `this`
|
|
23
|
+
* accept an output of type `other`? Convention:
|
|
24
|
+
* `input_type.accepts(output_type)`. Used at workflow-editor edge
|
|
25
|
+
* validation.
|
|
26
|
+
*/
|
|
27
|
+
accepts(other: CollectionTypeDescriptor): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Symmetric sibling-matching check: do `this` and `other` match such
|
|
30
|
+
* that they could drive a common map-over over sibling inputs of a
|
|
31
|
+
* single tool? Used for sibling map-over state checks where neither
|
|
32
|
+
* side is the declared input slot.
|
|
33
|
+
*/
|
|
34
|
+
compatible(other: CollectionTypeDescriptor): boolean;
|
|
21
35
|
canMapOver(other: CollectionTypeDescriptor): boolean;
|
|
22
36
|
effectiveMapOver(other: CollectionTypeDescriptor): CollectionTypeDescriptor;
|
|
23
37
|
equal(other: CollectionTypeDescriptor | null): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-type.d.ts","sourceRoot":"","sources":["../src/collection-type.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"collection-type.d.ts","sourceRoot":"","sources":["../src/collection-type.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC;IAClD,UAAU,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC;IACrD,UAAU,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC;IACrD,MAAM,CAAC,KAAK,EAAE,wBAAwB,GAAG,wBAAwB,CAAC;IAClE,KAAK,CAAC,KAAK,EAAE,wBAAwB,GAAG,IAAI,GAAG,OAAO,CAAC;IACvD,QAAQ,IAAI,MAAM,CAAC;IACnB,gBAAgB,CAAC,KAAK,EAAE,wBAAwB,GAAG,wBAAwB,CAAC;CAC7E;AAED,eAAO,MAAM,gCAAgC,EAAE,wBAyB9C,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,wBAyB7C,CAAC;AAaF,qBAAa,yBAA0B,YAAW,wBAAwB;IACxE,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,IAAI,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;gBAED,cAAc,EAAE,MAAM;IAKlC,MAAM,CAAC,KAAK,EAAE,wBAAwB,GAAG,wBAAwB;IASjE;;;;;OAKG;IACH,OAAO,CAAC,KAAK,EAAE,wBAAwB;IAqCvC;;;;;OAKG;IACH,UAAU,CAAC,KAAK,EAAE,wBAAwB;IAG1C,UAAU,CAAC,KAAK,EAAE,wBAAwB;IAgD1C,gBAAgB,CAAC,KAAK,EAAE,wBAAwB,GAAG,wBAAwB;IAkD3E,KAAK,CAAC,KAAK,EAAE,wBAAwB,GAAG,IAAI;IAM5C,QAAQ;IAGR,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAGtC;AAKD,wBAAgB,wBAAwB,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,WAM1E"}
|
package/dist/collection-type.js
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* Classes for reasoning about collection map-over state and the
|
|
2
|
+
compatibility algebra.
|
|
3
|
+
|
|
4
|
+
Two operations on collection types:
|
|
5
|
+
- accepts(other): asymmetric. input_type.accepts(output_type) is true
|
|
6
|
+
iff an output of type other can be connected to an input slot of
|
|
7
|
+
type this. Used at workflow-editor edge validation.
|
|
8
|
+
- compatible(other): symmetric. True iff this and other match such
|
|
9
|
+
that they could drive a common map-over over sibling inputs of one
|
|
10
|
+
tool. Used for sibling map-over state checks (neither side is the
|
|
11
|
+
input slot).
|
|
12
|
+
|
|
13
|
+
Mirrors the Python implementation in
|
|
14
|
+
lib/galaxy/model/dataset_collections/type_description.py — keep in sync.
|
|
15
|
+
See lib/galaxy/model/dataset_collections/types/collection_semantics.yml
|
|
16
|
+
"Type Compatibility Algebra" for the lattice diagram and worked examples.
|
|
17
|
+
|
|
18
|
+
Type variants:
|
|
2
19
|
null: not a collection?
|
|
3
20
|
NULL_COLLECTION_TYPE_DESCRIPTION: also not a collection. Is there any difference with null ?
|
|
4
21
|
ANY_COLLECTION_TYPE_DESCRIPTION: collection, but will never be mapped over (input has no collection_type)
|
|
@@ -8,7 +25,10 @@ export const NULL_COLLECTION_TYPE_DESCRIPTION = {
|
|
|
8
25
|
isCollection: false,
|
|
9
26
|
collectionType: null,
|
|
10
27
|
rank: 0,
|
|
11
|
-
|
|
28
|
+
accepts: function (_other) {
|
|
29
|
+
return false;
|
|
30
|
+
},
|
|
31
|
+
compatible: function (_other) {
|
|
12
32
|
return false;
|
|
13
33
|
},
|
|
14
34
|
canMapOver: function () {
|
|
@@ -31,7 +51,10 @@ export const ANY_COLLECTION_TYPE_DESCRIPTION = {
|
|
|
31
51
|
isCollection: true,
|
|
32
52
|
collectionType: "any",
|
|
33
53
|
rank: -1,
|
|
34
|
-
|
|
54
|
+
accepts: function (other) {
|
|
55
|
+
return NULL_COLLECTION_TYPE_DESCRIPTION !== other;
|
|
56
|
+
},
|
|
57
|
+
compatible: function (other) {
|
|
35
58
|
return NULL_COLLECTION_TYPE_DESCRIPTION !== other;
|
|
36
59
|
},
|
|
37
60
|
canMapOver: function () {
|
|
@@ -78,7 +101,13 @@ export class CollectionTypeDescription {
|
|
|
78
101
|
}
|
|
79
102
|
return new CollectionTypeDescription(`${this.collectionType}:${other.collectionType}`);
|
|
80
103
|
}
|
|
81
|
-
|
|
104
|
+
/**
|
|
105
|
+
* Asymmetric direct-edge check: does an input slot of type `this`
|
|
106
|
+
* accept an output of type `other`? Convention:
|
|
107
|
+
* `input_type.accepts(output_type)`. Used at workflow-editor edge
|
|
108
|
+
* validation.
|
|
109
|
+
*/
|
|
110
|
+
accepts(other) {
|
|
82
111
|
const otherCollectionType = other.collectionType;
|
|
83
112
|
if (other === NULL_COLLECTION_TYPE_DESCRIPTION) {
|
|
84
113
|
return false;
|
|
@@ -86,6 +115,14 @@ export class CollectionTypeDescription {
|
|
|
86
115
|
if (other === ANY_COLLECTION_TYPE_DESCRIPTION) {
|
|
87
116
|
return true;
|
|
88
117
|
}
|
|
118
|
+
// sample_sheet asymmetry: a sample_sheet input needs column metadata
|
|
119
|
+
// that a plain-list output cannot provide. Check raw types before
|
|
120
|
+
// normalization (which otherwise equates the two).
|
|
121
|
+
if (this.collectionType.startsWith("sample_sheet") &&
|
|
122
|
+
otherCollectionType &&
|
|
123
|
+
!otherCollectionType.startsWith("sample_sheet")) {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
89
126
|
const normalizedThis = normalizeCollectionType(this.collectionType);
|
|
90
127
|
const normalizedOther = otherCollectionType
|
|
91
128
|
? normalizeCollectionType(otherCollectionType)
|
|
@@ -105,10 +142,26 @@ export class CollectionTypeDescription {
|
|
|
105
142
|
}
|
|
106
143
|
return normalizedOther == normalizedThis;
|
|
107
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Symmetric sibling-matching check: do `this` and `other` match such
|
|
147
|
+
* that they could drive a common map-over over sibling inputs of a
|
|
148
|
+
* single tool? Used for sibling map-over state checks where neither
|
|
149
|
+
* side is the declared input slot.
|
|
150
|
+
*/
|
|
151
|
+
compatible(other) {
|
|
152
|
+
return this.accepts(other) || other.accepts(this);
|
|
153
|
+
}
|
|
108
154
|
canMapOver(other) {
|
|
109
155
|
if (!other.collectionType || other.collectionType === "any") {
|
|
110
156
|
return false;
|
|
111
157
|
}
|
|
158
|
+
// sample_sheet asymmetry: a sample_sheet input requires sample_sheet
|
|
159
|
+
// column metadata; a plain-list output cannot be mapped over it.
|
|
160
|
+
// `this` is the output, `other` is the input.
|
|
161
|
+
if (other.collectionType.startsWith("sample_sheet") &&
|
|
162
|
+
!this.collectionType.startsWith("sample_sheet")) {
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
112
165
|
const normalizedThis = normalizeCollectionType(this.collectionType);
|
|
113
166
|
const normalizedOther = normalizeCollectionType(other.collectionType);
|
|
114
167
|
if (this.rank <= other.rank) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-type.js","sourceRoot":"","sources":["../src/collection-type.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"collection-type.js","sourceRoot":"","sources":["../src/collection-type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;AAeF,MAAM,CAAC,MAAM,gCAAgC,GAA6B;IACxE,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nB,OAAO,mBAAmB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAClD,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ANY_COLLECTION_TYPE_DESCRIPTION, CollectionTypeDescription, NULL_COLLECTION_TYPE_DESCRIPTION, isValidCollectionTypeStr, type CollectionTypeDescriptor, } from "./collection-type.js";
|
|
2
|
-
export {
|
|
2
|
+
export { acceptsAny, effectiveMapOverAny } from "./collection-type-variants.js";
|
|
3
3
|
export type { DatatypesCombinedMap } from "./datatypes-combined-map.js";
|
|
4
4
|
export { DatatypesMapperModel } from "./datatypes-mapper.js";
|
|
5
5
|
export { ConnectionAcceptable, producesAcceptableDatatype } from "./connection-acceptable.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,gCAAgC,EAChC,wBAAwB,EACxB,KAAK,wBAAwB,GAC9B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,gCAAgC,EAChC,wBAAwB,EACxB,KAAK,wBAAwB,GAC9B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAChF,YAAY,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ANY_COLLECTION_TYPE_DESCRIPTION, CollectionTypeDescription, NULL_COLLECTION_TYPE_DESCRIPTION, isValidCollectionTypeStr, } from "./collection-type.js";
|
|
2
|
-
export {
|
|
2
|
+
export { acceptsAny, effectiveMapOverAny } from "./collection-type-variants.js";
|
|
3
3
|
export { DatatypesMapperModel } from "./datatypes-mapper.js";
|
|
4
4
|
export { ConnectionAcceptable, producesAcceptableDatatype } from "./connection-acceptable.js";
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,gCAAgC,EAChC,wBAAwB,GAEzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,gCAAgC,EAChC,wBAAwB,GAEzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEhF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galaxy-tool-util/workflow-graph",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Pure collection-type algebra and datatype subtyping primitives extracted from Galaxy's workflow editor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -32,6 +32,9 @@
|
|
|
32
32
|
"datatypes"
|
|
33
33
|
],
|
|
34
34
|
"license": "MIT",
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"yaml": "^2.8.3"
|
|
37
|
+
},
|
|
35
38
|
"scripts": {
|
|
36
39
|
"build": "tsc",
|
|
37
40
|
"typecheck": "tsc --noEmit",
|