@dataplan/json 0.0.1-beta.2 → 0.0.1-beta.21

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/CHANGELOG.md CHANGED
@@ -1,5 +1,254 @@
1
1
  # @dataplan/json
2
2
 
3
+ ## 0.0.1-beta.21
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ [[`1bd50b61e`](https://github.com/graphile/crystal/commit/1bd50b61ebb10b7d09b3612c2e2767c41cca3b78),
9
+ [`4e102b1a1`](https://github.com/graphile/crystal/commit/4e102b1a1cd232e6f6703df0706415f01831dab2),
10
+ [`7bb1573ba`](https://github.com/graphile/crystal/commit/7bb1573ba45a4d8b7fa9ad53cdd79686d2641383),
11
+ [`18addb385`](https://github.com/graphile/crystal/commit/18addb3852525aa91019a36d58fa2fecd8b5b443),
12
+ [`6ed615e55`](https://github.com/graphile/crystal/commit/6ed615e557b2ab1fb57f1e68c06730a8e3da7175),
13
+ [`b25cc539c`](https://github.com/graphile/crystal/commit/b25cc539c00aeda7a943c37509aaae4dc7812317),
14
+ [`867f33136`](https://github.com/graphile/crystal/commit/867f331365346fc46ed1e0d23c79719846e398f4),
15
+ [`cf535c210`](https://github.com/graphile/crystal/commit/cf535c21078da06c14dd12f30e9b4378da4ded03),
16
+ [`acf99b190`](https://github.com/graphile/crystal/commit/acf99b190954e3c5926e820daed68dfe8eb3ee1f),
17
+ [`4967a197f`](https://github.com/graphile/crystal/commit/4967a197fd2c71ee2a581fe29470ee9f30e74de5),
18
+ [`1908e1ba1`](https://github.com/graphile/crystal/commit/1908e1ba11883a34dac66f985fc20ab160e572b1),
19
+ [`084d80be6`](https://github.com/graphile/crystal/commit/084d80be6e17187c9a9932bcf079e3f460368782)]:
20
+ - grafast@0.1.1-beta.12
21
+
22
+ ## 0.0.1-beta.20
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies
27
+ [[`582bd768f`](https://github.com/graphile/crystal/commit/582bd768fec403ce3284f293b85b9fd86e4d3f40)]:
28
+ - grafast@0.1.1-beta.11
29
+
30
+ ## 0.0.1-beta.19
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies
35
+ [[`3c161f7e1`](https://github.com/graphile/crystal/commit/3c161f7e13375105b1035a7d5d1c0f2b507ca5c7),
36
+ [`a674a9923`](https://github.com/graphile/crystal/commit/a674a9923bc908c9315afa40e0cb256ee0953d16),
37
+ [`b7cfeffd1`](https://github.com/graphile/crystal/commit/b7cfeffd1019d61c713a5054c4f5929960a2a6ab)]:
38
+ - grafast@0.1.1-beta.10
39
+
40
+ ## 0.0.1-beta.18
41
+
42
+ ### Patch Changes
43
+
44
+ - Updated dependencies
45
+ [[`437570f97`](https://github.com/graphile/crystal/commit/437570f97e8520afaf3d0d0b514d1f4c31546b76)]:
46
+ - grafast@0.1.1-beta.9
47
+
48
+ ## 0.0.1-beta.17
49
+
50
+ ### Patch Changes
51
+
52
+ - Updated dependencies
53
+ [[`bd5a908a4`](https://github.com/graphile/crystal/commit/bd5a908a4d04310f90dfb46ad87398ffa993af3b)]:
54
+ - grafast@0.1.1-beta.8
55
+
56
+ ## 0.0.1-beta.16
57
+
58
+ ### Patch Changes
59
+
60
+ - [#1980](https://github.com/graphile/crystal/pull/1980)
61
+ [`357d475f5`](https://github.com/graphile/crystal/commit/357d475f54fecc8c51892e0346d6872b34132430)
62
+ Thanks [@benjie](https://github.com/benjie)! - The signature of
63
+ `ExecutableStep.execute` has changed; please make the following change to each
64
+ of your custom step classes' `execute` methods:
65
+
66
+ ```diff
67
+ - async execute(count: number, values: any[][], extra: ExecutionExtra) {
68
+ + async execute({ count, values: newValues, extra }: ExecutionDetails) {
69
+ + const values = newValues.map((dep) =>
70
+ + dep.isBatch ? dep.entries : new Array(count).fill(dep.value)
71
+ + );
72
+ // REST OF YOUR FUNCTION HERE
73
+ }
74
+ ```
75
+
76
+ For more details, see: https://err.red/gev2
77
+
78
+ - [#1973](https://github.com/graphile/crystal/pull/1973)
79
+ [`a0e82b9c5`](https://github.com/graphile/crystal/commit/a0e82b9c5f4e585f1af1e147299cd07944ece6f8)
80
+ Thanks [@benjie](https://github.com/benjie)! - Add 'unary steps' concept to
81
+ codebase and refactor to using new executeV2 execution method which leverages
82
+ them. Backwards compatibility maintained, but users should move to executeV2.
83
+ - Updated dependencies
84
+ [[`357d475f5`](https://github.com/graphile/crystal/commit/357d475f54fecc8c51892e0346d6872b34132430),
85
+ [`3551725e7`](https://github.com/graphile/crystal/commit/3551725e71c3ed876554e19e5ab2c1dcb0fb1143),
86
+ [`80836471e`](https://github.com/graphile/crystal/commit/80836471e5cedb29dee63bc5002550c4f1713cfd),
87
+ [`a5c20fefb`](https://github.com/graphile/crystal/commit/a5c20fefb571dea6d1187515dc48dd547e9e6204),
88
+ [`1ce08980e`](https://github.com/graphile/crystal/commit/1ce08980e2a52ed9bc81564d248c19648ecd3616),
89
+ [`dff4f2535`](https://github.com/graphile/crystal/commit/dff4f2535ac6ce893089b312fcd5fffcd98573a5),
90
+ [`a287a57c2`](https://github.com/graphile/crystal/commit/a287a57c2765da0fb6a132ea0953f64453210ceb),
91
+ [`2fe56f9a6`](https://github.com/graphile/crystal/commit/2fe56f9a6dac03484ace45c29c2223a65f9ca1db),
92
+ [`fed603d71`](https://github.com/graphile/crystal/commit/fed603d719c02f33e12190f925c9e3b06c581fac),
93
+ [`ed6e0d278`](https://github.com/graphile/crystal/commit/ed6e0d2788217a1c419634837f4208013eaf2923),
94
+ [`e82e4911e`](https://github.com/graphile/crystal/commit/e82e4911e32138df1b90ec0fde555ea963018d21),
95
+ [`42ece5aa6`](https://github.com/graphile/crystal/commit/42ece5aa6ca05345ebc17fb5c7d55df3b79b7612),
96
+ [`e0d69e518`](https://github.com/graphile/crystal/commit/e0d69e518a98c70f9b90f59d243ce33978c1b5a1),
97
+ [`6699388ec`](https://github.com/graphile/crystal/commit/6699388ec167d35c71220ce5d9113cac578da6cb),
98
+ [`966203504`](https://github.com/graphile/crystal/commit/96620350467ab8c65b56adf2f055e19450f8e772),
99
+ [`c1645b249`](https://github.com/graphile/crystal/commit/c1645b249aae949a548cd916e536ccfb63e5ab35),
100
+ [`ed8bbaa3c`](https://github.com/graphile/crystal/commit/ed8bbaa3cd1563a7601ca8c6b0412633b0ea4ce9),
101
+ [`a0e82b9c5`](https://github.com/graphile/crystal/commit/a0e82b9c5f4e585f1af1e147299cd07944ece6f8),
102
+ [`14e2412ee`](https://github.com/graphile/crystal/commit/14e2412ee368e8d53abf6774c7f0069f32d4e8a3),
103
+ [`57ab0e1e7`](https://github.com/graphile/crystal/commit/57ab0e1e72c01213b21d3efc539cd655d83d993a),
104
+ [`8442242e4`](https://github.com/graphile/crystal/commit/8442242e43cac7d89ca0c413cf42c9fabf6f247f),
105
+ [`64ce7b765`](https://github.com/graphile/crystal/commit/64ce7b7650530251aec38a51089da66f914c19b4),
106
+ [`cba842357`](https://github.com/graphile/crystal/commit/cba84235786acbd77ade53bae7a3fba4a9be1eb7),
107
+ [`2fa77d0f2`](https://github.com/graphile/crystal/commit/2fa77d0f237cdb98d3dafb6b5e4083a2c6c38673)]:
108
+ - grafast@0.1.1-beta.7
109
+
110
+ ## 0.0.1-beta.15
111
+
112
+ ### Patch Changes
113
+
114
+ - Updated dependencies
115
+ [[`9f85c614d`](https://github.com/graphile/crystal/commit/9f85c614d48dc745c5fed15333dbb75af7fddc88),
116
+ [`6c6be29f1`](https://github.com/graphile/crystal/commit/6c6be29f12b24782c926b2bc62ed2ede09ac05de),
117
+ [`8315e8d01`](https://github.com/graphile/crystal/commit/8315e8d01c118cebc4ebbc53a2f264b958b252ad)]:
118
+ - grafast@0.1.1-beta.6
119
+
120
+ ## 0.0.1-beta.14
121
+
122
+ ### Patch Changes
123
+
124
+ - [#1924](https://github.com/graphile/crystal/pull/1924)
125
+ [`ef44c29b2`](https://github.com/graphile/crystal/commit/ef44c29b24a1ad5a042ae1536a4546dd64b17195)
126
+ Thanks [@benjie](https://github.com/benjie)! - 🚨 TypeScript is now configured
127
+ to hide interfaces marked as `@internal`. This may result in a few errors
128
+ where you're accessing things you oughtn't be, but also may hide some
129
+ interfaces that should be exposed - please file an issue if an API you were
130
+ dependent on has been removed from the TypeScript typings. If that API happens
131
+ to be `step.dependencies`; you should first read this:
132
+ https://benjie.dev/graphql/ancestors
133
+ - Updated dependencies
134
+ [[`63dd7ea99`](https://github.com/graphile/crystal/commit/63dd7ea992d30ad711dd85a73a127484a0e35479),
135
+ [`d801c9778`](https://github.com/graphile/crystal/commit/d801c9778a86d61e060896460af9fe62a733534a),
136
+ [`ef44c29b2`](https://github.com/graphile/crystal/commit/ef44c29b24a1ad5a042ae1536a4546dd64b17195)]:
137
+ - grafast@0.1.1-beta.5
138
+
139
+ ## 0.0.1-beta.13
140
+
141
+ ### Patch Changes
142
+
143
+ - Updated dependencies
144
+ [[`a2176ea32`](https://github.com/graphile/crystal/commit/a2176ea324db0801249661b30e9c9d314c6fb159),
145
+ [`886833e2e`](https://github.com/graphile/crystal/commit/886833e2e319f23d905d7184ca88fca701b94044)]:
146
+ - grafast@0.1.1-beta.4
147
+
148
+ ## 0.0.1-beta.12
149
+
150
+ ### Patch Changes
151
+
152
+ - Updated dependencies []:
153
+ - grafast@0.1.1-beta.3
154
+
155
+ ## 0.0.1-beta.11
156
+
157
+ ### Patch Changes
158
+
159
+ - Updated dependencies
160
+ [[`3fdc2bce4`](https://github.com/graphile/crystal/commit/3fdc2bce42418773f808c5b8309dfb361cd95ce9),
161
+ [`aeef362b5`](https://github.com/graphile/crystal/commit/aeef362b5744816f01e4a6f714bbd77f92332bc5),
162
+ [`8a76db07f`](https://github.com/graphile/crystal/commit/8a76db07f4c110cecc6225504f9a05ccbcbc7b92),
163
+ [`8a0cdb95f`](https://github.com/graphile/crystal/commit/8a0cdb95f200b28b0ea1ab5caa12b23dce5f374f),
164
+ [`1c9f1c0ed`](https://github.com/graphile/crystal/commit/1c9f1c0edf4e621a5b6345d3a41527a18143c6ae)]:
165
+ - grafast@0.1.1-beta.2
166
+
167
+ ## 0.0.1-beta.10
168
+
169
+ ### Patch Changes
170
+
171
+ - Updated dependencies
172
+ [[`49fcb0d58`](https://github.com/graphile/crystal/commit/49fcb0d585b31b291c9072c339d6f5b550eefc9f)]:
173
+ - grafast@0.1.1-beta.1
174
+
175
+ ## 0.0.1-beta.9
176
+
177
+ ### Patch Changes
178
+
179
+ - [#1778](https://github.com/graphile/crystal/pull/1778)
180
+ [`b2bce88da`](https://github.com/graphile/crystal/commit/b2bce88da26c7a8965468be16fc2d935eadd3434)
181
+ Thanks [@benjie](https://github.com/benjie)! - Enable source maps in modules
182
+ where it was disabled.
183
+
184
+ - Updated dependencies
185
+ [[`4a4d26d87`](https://github.com/graphile/crystal/commit/4a4d26d87ce74589429b8ca5126a7bfdf30351b8),
186
+ [`b2bce88da`](https://github.com/graphile/crystal/commit/b2bce88da26c7a8965468be16fc2d935eadd3434),
187
+ [`861a8a306`](https://github.com/graphile/crystal/commit/861a8a306ef42a821da19e77903ddd7e8130bfb3)]:
188
+ - grafast@0.1.1-beta.0
189
+
190
+ ## 0.0.1-beta.8
191
+
192
+ ### Patch Changes
193
+
194
+ - [#514](https://github.com/graphile/crystal-pre-merge/pull/514)
195
+ [`c9848f693`](https://github.com/graphile/crystal-pre-merge/commit/c9848f6936a5abd7740c0638bfb458fb5551f03b)
196
+ Thanks [@benjie](https://github.com/benjie)! - Update package.json repository
197
+ information
198
+
199
+ - Updated dependencies
200
+ [[`c9848f693`](https://github.com/graphile/crystal-pre-merge/commit/c9848f6936a5abd7740c0638bfb458fb5551f03b),
201
+ [`ede1092fe`](https://github.com/graphile/crystal-pre-merge/commit/ede1092fe197719b6fa786f4cfa75f6a1f4c56c1),
202
+ [`566983fbd`](https://github.com/graphile/crystal-pre-merge/commit/566983fbd99c4b2df8c4ebd6260521670a2b7dfc),
203
+ [`409bf6071`](https://github.com/graphile/crystal-pre-merge/commit/409bf607180d4d8faec658c803e5ec4d1a00c451)]:
204
+ - grafast@0.0.1-beta.8
205
+
206
+ ## 0.0.1-beta.7
207
+
208
+ ### Patch Changes
209
+
210
+ - Updated dependencies
211
+ [[`3700e204f`](https://github.com/benjie/crystal/commit/3700e204f430db182c92ca7abc82017c81fa1f9b)]:
212
+ - grafast@0.0.1-beta.7
213
+
214
+ ## 0.0.1-beta.6
215
+
216
+ ### Patch Changes
217
+
218
+ - [#496](https://github.com/benjie/crystal/pull/496)
219
+ [`c9bfd9892`](https://github.com/benjie/crystal/commit/c9bfd989247f9433fb5b18c5175c9d8d64cd21a1)
220
+ Thanks [@benjie](https://github.com/benjie)! - Update dependencies (sometimes
221
+ through major versions).
222
+
223
+ - Updated dependencies
224
+ [[`c9bfd9892`](https://github.com/benjie/crystal/commit/c9bfd989247f9433fb5b18c5175c9d8d64cd21a1),
225
+ [`e613b476d`](https://github.com/benjie/crystal/commit/e613b476d6ee867d1f7509c895dabee40e7f9a31)]:
226
+ - grafast@0.0.1-beta.6
227
+
228
+ ## 0.0.1-beta.5
229
+
230
+ ### Patch Changes
231
+
232
+ - Updated dependencies
233
+ [[`53186213a`](https://github.com/benjie/crystal/commit/53186213ade962f4b66cb0d5ea8b57b5ce7ea85f)]:
234
+ - grafast@0.0.1-beta.5
235
+
236
+ ## 0.0.1-beta.4
237
+
238
+ ### Patch Changes
239
+
240
+ - Updated dependencies
241
+ [[`f9cc88dc4`](https://github.com/benjie/crystal/commit/f9cc88dc442d371aee154a28d4e63c6da39f6b2e)]:
242
+ - grafast@0.0.1-beta.4
243
+
244
+ ## 0.0.1-beta.3
245
+
246
+ ### Patch Changes
247
+
248
+ - Updated dependencies
249
+ [[`46cd08aa1`](https://github.com/benjie/crystal/commit/46cd08aa13e3bac4d186c72c6ce24997f37658af)]:
250
+ - grafast@0.0.1-beta.3
251
+
3
252
  ## 0.0.1-beta.2
4
253
 
5
254
  ### Patch Changes
package/README.md CHANGED
@@ -13,9 +13,9 @@ Docs: https://grafast.org/grafast/step-library/dataplan-json/
13
13
 
14
14
  ## Crowd-funded open-source software
15
15
 
16
- To help us develop this software sustainably under the MIT license, we ask all
17
- individuals and businesses that use it to help support its ongoing maintenance
18
- and development via sponsorship.
16
+ To help us develop this software sustainably, we ask all individuals and
17
+ businesses that use it to help support its ongoing maintenance and development
18
+ via sponsorship.
19
19
 
20
20
  ### [Click here to find out more about sponsors and sponsorship.](https://www.graphile.org/sponsor/)
21
21
 
@@ -24,12 +24,8 @@ And please give some love to our featured sponsors 🤩:
24
24
  <table><tr>
25
25
  <td align="center"><a href="https://www.the-guild.dev/"><img src="https://graphile.org/images/sponsors/theguild.png" width="90" height="90" alt="The Guild" /><br />The Guild</a> *</td>
26
26
  <td align="center"><a href="https://dovetailapp.com/"><img src="https://graphile.org/images/sponsors/dovetail.png" width="90" height="90" alt="Dovetail" /><br />Dovetail</a> *</td>
27
- <td align="center"><a href="https://qwick.com/"><img src="https://graphile.org/images/sponsors/qwick.png" width="90" height="90" alt="Qwick" /><br />Qwick</a> *</td>
28
- <td align="center"><a href="https://www.netflix.com/"><img src="https://graphile.org/images/sponsors/Netflix.png" width="90" height="90" alt="Netflix" /><br />Netflix</a> *</td>
29
- </tr><tr>
30
- <td align="center"><a href=""><img src="https://graphile.org/images/sponsors/chadf.png" width="90" height="90" alt="Chad Furman" /><br />Chad Furman</a> *</td>
31
27
  <td align="center"><a href="https://stellate.co/"><img src="https://graphile.org/images/sponsors/Stellate.png" width="90" height="90" alt="Stellate" /><br />Stellate</a> *</td>
32
- <td align="center"><a href="https://www.accenture.com/"><img src="https://graphile.org/images/sponsors/accenture.svg" width="90" height="90" alt="Accenture" /><br />Accenture</a> *</td>
28
+ <td align="center"><a href="https://gosteelhead.com/"><img src="https://graphile.org/images/sponsors/steelhead.svg" width="90" height="90" alt="Steelhead" /><br />Steelhead</a> *</td>
33
29
  </tr></table>
34
30
 
35
31
  <em>\* Sponsors the entire Graphile suite</em>
package/dist/index.js CHANGED
@@ -4,3 +4,4 @@ exports.JSONParseStep = exports.jsonParse = void 0;
4
4
  var jsonParse_js_1 = require("./steps/jsonParse.js");
5
5
  Object.defineProperty(exports, "jsonParse", { enumerable: true, get: function () { return jsonParse_js_1.jsonParse; } });
6
6
  Object.defineProperty(exports, "JSONParseStep", { enumerable: true, get: function () { return jsonParse_js_1.JSONParseStep; } });
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2E;AAAlE,yGAAA,SAAS,OAAA;AAAE,6GAAA,aAAa,OAAA"}
@@ -1,4 +1,4 @@
1
- import type { AccessStep, GrafastResultsList, GrafastValuesList } from "grafast";
1
+ import type { AccessStep, ExecutionDetails, GrafastResultsList } from "grafast";
2
2
  import { ExecutableStep } from "grafast";
3
3
  export type JSONValue = string | number | boolean | null | {
4
4
  [key: string]: JSONValue;
@@ -19,7 +19,7 @@ export declare class JSONParseStep<TJSON extends JSONValue> extends ExecutableSt
19
19
  [key: string]: unknown;
20
20
  } ? TJSON[TKey] : never>;
21
21
  at<TIndex extends keyof TJSON & number>(index: TIndex): AccessStep<TJSON[TIndex]>;
22
- execute(count: number, values: [GrafastValuesList<string>]): GrafastResultsList<TJSON>;
22
+ execute({ indexMap, values: [stringDep], }: ExecutionDetails<[string]>): GrafastResultsList<TJSON>;
23
23
  }
24
24
  /**
25
25
  * This plan accepts as JSON string as its only input and will result in the
@@ -1 +1 @@
1
- {"version":3,"file":"jsonParse.d.ts","sourceRoot":"","sources":["../../src/steps/jsonParse.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EAElB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAU,cAAc,EAAY,MAAM,SAAS,CAAC;AAE3D,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC5B,KAAK,CAAC,SAAS,CAA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;AACH,qBAAa,aAAa,CACxB,KAAK,SAAS,SAAS,CACvB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC7B,MAAM,CAAC,QAAQ;;;MAGb;IAGF,aAAa,UAAS;gBAEV,WAAW,EAAE,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC;IAKtD,YAAY,IAAI,MAAM;IAItB,GAAG,CAAC,IAAI,SAAS,MAAM,KAAK,EAC1B,GAAG,EAAE,IAAI,GACR,UAAU,CACX,KAAK,SAAS;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAC/D;IAID,EAAE,CAAC,MAAM,SAAS,MAAM,KAAK,GAAG,MAAM,EACpC,KAAK,EAAE,MAAM,GACZ,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAI5B,OAAO,CAAC,EACN,QAAQ,EACR,MAAM,EAAE,CAAC,SAAS,CAAC,GACpB,EAAE,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC;CAsB1D;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,SAAS,SAAS,EAC/C,OAAO,EAAE,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,GACrC,aAAa,CAAC,KAAK,CAAC,CAEtB"}
@@ -21,7 +21,7 @@ class JSONParseStep extends grafast_1.ExecutableStep {
21
21
  this.addDependency($stringPlan);
22
22
  }
23
23
  toStringMeta() {
24
- return chalk_1.default.bold.yellow(String(this.dependencies[0].id));
24
+ return chalk_1.default.bold.yellow(String(this.getDep(0).id));
25
25
  }
26
26
  get(key) {
27
27
  return (0, grafast_1.access)(this, [key]);
@@ -29,27 +29,24 @@ class JSONParseStep extends grafast_1.ExecutableStep {
29
29
  at(index) {
30
30
  return (0, grafast_1.access)(this, [index]);
31
31
  }
32
- execute(count, values) {
33
- const result = []; // new Array(count);
34
- const list = values[0];
35
- for (let i = 0; i < count; i++) {
36
- const v = list[i];
32
+ execute({ indexMap, values: [stringDep], }) {
33
+ return indexMap((i) => {
34
+ const v = stringDep.at(i);
37
35
  if (typeof v === "string") {
38
36
  try {
39
- result[i] = JSON.parse(v);
37
+ return JSON.parse(v);
40
38
  }
41
39
  catch (e) {
42
- result[i] = Promise.reject(e);
40
+ return Promise.reject(e);
43
41
  }
44
42
  }
45
43
  else if (v == null) {
46
- result[i] = null;
44
+ return null;
47
45
  }
48
46
  else {
49
- result[i] = Promise.reject(new Error(`JSONParseStep: expected string to parse, but received ${Array.isArray(v) ? "array" : typeof v}`));
47
+ return Promise.reject(new Error(`JSONParseStep: expected string to parse, but received ${Array.isArray(v) ? "array" : typeof v}`));
50
48
  }
51
- }
52
- return result;
49
+ });
53
50
  }
54
51
  }
55
52
  exports.JSONParseStep = JSONParseStep;
@@ -62,3 +59,4 @@ function jsonParse($string) {
62
59
  }
63
60
  exports.jsonParse = jsonParse;
64
61
  (0, grafast_1.exportAs)("@dataplan/json", jsonParse, "jsonParse");
62
+ //# sourceMappingURL=jsonParse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsonParse.js","sourceRoot":"","sources":["../../src/steps/jsonParse.ts"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAO1B,qCAA2D;AAU3D;;;GAGG;AACH,MAAa,aAEX,SAAQ,wBAAqB;aACtB,aAAQ,GAAG;QAChB,UAAU,EAAE,gBAAgB;QAC5B,UAAU,EAAE,eAAe;KAC5B,AAHc,CAGb;IAKF,YAAY,WAA0C;QACpD,KAAK,EAAE,CAAC;QALV,wEAAwE;QACxE,WAAW;QACX,kBAAa,GAAG,KAAK,CAAC;QAIpB,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAClC,CAAC;IAED,YAAY;QACV,OAAO,eAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAA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21",
4
4
  "description": "JSON step classes for Grafast",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "git+https://github.com/graphile/heart.git"
12
+ "url": "git+https://github.com/graphile/crystal.git"
13
13
  },
14
14
  "keywords": [
15
15
  "graphile",
@@ -22,26 +22,26 @@
22
22
  "author": "Benjie Gillam <code@benjiegillam.com>",
23
23
  "license": "MIT",
24
24
  "bugs": {
25
- "url": "https://github.com/graphile/heart/issues"
25
+ "url": "https://github.com/graphile/crystal/issues"
26
26
  },
27
- "homepage": "https://github.com/graphile/heart/tree/main/grafast/dataplan-json",
27
+ "homepage": "https://github.com/graphile/crystal/tree/main/grafast/dataplan-json",
28
28
  "dependencies": {
29
29
  "chalk": "^4.1.2",
30
- "tslib": "^2.5.0"
30
+ "tslib": "^2.6.2"
31
31
  },
32
32
  "engines": {
33
33
  "node": ">=14.17"
34
34
  },
35
35
  "peerDependencies": {
36
- "grafast": "^0.0.1-beta.2"
36
+ "grafast": "^0.1.1-beta.12"
37
37
  },
38
38
  "files": [
39
39
  "dist"
40
40
  ],
41
41
  "devDependencies": {
42
- "@types/jest": "^27.5.1",
43
- "jest": "^28.1.3",
44
- "jest-serializer-simple": "^5.0.0-beta.1",
45
- "typescript": "^5.0.4"
42
+ "@types/jest": "^29.5.4",
43
+ "jest": "^29.6.4",
44
+ "jest-serializer-simple": "^5.0.0-beta.3",
45
+ "typescript": "^5.2.2"
46
46
  }
47
47
  }