@stackables/bridge 1.6.1 → 1.8.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.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Shared utilities for the Bridge runtime.
3
+ */
4
+ /**
5
+ * Split a dotted path string into path segments, expanding array indices.
6
+ * e.g. "items[0].name" → ["items", "0", "name"]
7
+ */
8
+ export declare function parsePath(text: string): string[];
9
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAchD"}
package/build/utils.js ADDED
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Shared utilities for the Bridge runtime.
3
+ */
4
+ /**
5
+ * Split a dotted path string into path segments, expanding array indices.
6
+ * e.g. "items[0].name" → ["items", "0", "name"]
7
+ */
8
+ export function parsePath(text) {
9
+ const parts = [];
10
+ for (const segment of text.split(".")) {
11
+ const match = segment.match(/^([^[]+)(?:\[(\d*)\])?$/);
12
+ if (match) {
13
+ parts.push(match[1]);
14
+ if (match[2] !== undefined && match[2] !== "") {
15
+ parts.push(match[2]);
16
+ }
17
+ }
18
+ else {
19
+ parts.push(segment);
20
+ }
21
+ }
22
+ return parts;
23
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackables/bridge",
3
- "version": "1.6.1",
3
+ "version": "1.8.0",
4
4
  "description": "Declarative dataflow for GraphQL",
5
5
  "main": "./build/index.js",
6
6
  "type": "module",
@@ -43,6 +43,7 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@graphql-tools/utils": "^11",
46
+ "chevrotain": "^11.1.1",
46
47
  "graphql": "^16",
47
48
  "lru-cache": "^11"
48
49
  },