@objectstack/connector-rest 17.2.0 → 17.4.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/CHANGELOG.md +444 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,449 @@
|
|
|
1
1
|
# @objectstack/connector-rest
|
|
2
2
|
|
|
3
|
+
## 17.4.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- be92d46: These fourteen packages now declare `repository.directory`, so their npm pages carry a working "source" deep link to their own directory in the monorepo.
|
|
8
|
+
|
|
9
|
+
npm renders that field by concatenating it onto `repository.url`. None of these fourteen manifests carried a `repository` block at all, so every one of their npm pages offered no route from the package back to its code — not a broken link, no link. That is what this publishes: the block those pages read, naming each package's own directory.
|
|
10
|
+
|
|
11
|
+
Nothing else about these packages changes. No export, no runtime behaviour, no dependency and no file in the tarball other than the manifest's own `repository` key. The version bump exists because the fix is only real once it is published: the field lives in the manifest npm serves, so a corrected manifest sitting in the repository leaves the package page exactly as wrong as it was.
|
|
12
|
+
|
|
13
|
+
The rule behind it is now mechanical rather than remembered — `check:manifest-repository-directory` makes a publishable (non-private) workspace manifest declare the field naming its own directory, so a package added or moved after this cannot quietly go back to having no source link.
|
|
14
|
+
- Updated dependencies [fe0d9a4]
|
|
15
|
+
- Updated dependencies [ecd2158]
|
|
16
|
+
- Updated dependencies [f2b5e46]
|
|
17
|
+
- Updated dependencies [2ed6be6]
|
|
18
|
+
- Updated dependencies [ed7243d]
|
|
19
|
+
- Updated dependencies [6ba0db4]
|
|
20
|
+
- Updated dependencies [625b0c3]
|
|
21
|
+
- Updated dependencies [233222e]
|
|
22
|
+
- Updated dependencies [07f40e5]
|
|
23
|
+
- Updated dependencies [ceb4877]
|
|
24
|
+
- Updated dependencies [e9fcd6b]
|
|
25
|
+
- Updated dependencies [90e7e6d]
|
|
26
|
+
- Updated dependencies [2bdabe6]
|
|
27
|
+
- Updated dependencies [ca326b5]
|
|
28
|
+
- Updated dependencies [8f404a5]
|
|
29
|
+
- Updated dependencies [68437d4]
|
|
30
|
+
- Updated dependencies [abb140c]
|
|
31
|
+
- Updated dependencies [8333a6c]
|
|
32
|
+
- Updated dependencies [3e3ecb0]
|
|
33
|
+
- Updated dependencies [3030369]
|
|
34
|
+
- Updated dependencies [d5d8d50]
|
|
35
|
+
- Updated dependencies [e08892d]
|
|
36
|
+
- Updated dependencies [ae05f2e]
|
|
37
|
+
- Updated dependencies [b548e43]
|
|
38
|
+
- Updated dependencies [c463d03]
|
|
39
|
+
- Updated dependencies [64bd6a3]
|
|
40
|
+
- Updated dependencies [13c48c2]
|
|
41
|
+
- Updated dependencies [b0529e1]
|
|
42
|
+
- Updated dependencies [66dc6ab]
|
|
43
|
+
- Updated dependencies [6f94458]
|
|
44
|
+
- Updated dependencies [6e67b86]
|
|
45
|
+
- Updated dependencies [132742f]
|
|
46
|
+
- Updated dependencies [85a2459]
|
|
47
|
+
- Updated dependencies [50dc214]
|
|
48
|
+
- Updated dependencies [e89fa92]
|
|
49
|
+
- Updated dependencies [e9fcd6b]
|
|
50
|
+
- Updated dependencies [8976ea1]
|
|
51
|
+
- Updated dependencies [56fe8c2]
|
|
52
|
+
- Updated dependencies [acabd24]
|
|
53
|
+
- Updated dependencies [ab50c8f]
|
|
54
|
+
- Updated dependencies [6491463]
|
|
55
|
+
- Updated dependencies [89cf4d6]
|
|
56
|
+
- Updated dependencies [21c5dcb]
|
|
57
|
+
- Updated dependencies [6d4d5d3]
|
|
58
|
+
- Updated dependencies [ed5d557]
|
|
59
|
+
- Updated dependencies [bca21f7]
|
|
60
|
+
- Updated dependencies [e9fcd6b]
|
|
61
|
+
- Updated dependencies [2025b1f]
|
|
62
|
+
- Updated dependencies [1a7a7c9]
|
|
63
|
+
- Updated dependencies [e9fcd6b]
|
|
64
|
+
- Updated dependencies [ef3a138]
|
|
65
|
+
- Updated dependencies [68d5dfd]
|
|
66
|
+
- Updated dependencies [3e21cf0]
|
|
67
|
+
- Updated dependencies [4cfc93b]
|
|
68
|
+
- Updated dependencies [efd6b43]
|
|
69
|
+
- Updated dependencies [859ded3]
|
|
70
|
+
- Updated dependencies [fa125f3]
|
|
71
|
+
- Updated dependencies [74628d9]
|
|
72
|
+
- Updated dependencies [a646120]
|
|
73
|
+
- Updated dependencies [6f1ce7d]
|
|
74
|
+
- Updated dependencies [7778115]
|
|
75
|
+
- Updated dependencies [2c753fe]
|
|
76
|
+
- Updated dependencies [52804cd]
|
|
77
|
+
- Updated dependencies [3f89967]
|
|
78
|
+
- Updated dependencies [53cf263]
|
|
79
|
+
- Updated dependencies [21aabbc]
|
|
80
|
+
- Updated dependencies [9c270bb]
|
|
81
|
+
- Updated dependencies [76c8c5a]
|
|
82
|
+
- Updated dependencies [a84e1ce]
|
|
83
|
+
- Updated dependencies [bf1054a]
|
|
84
|
+
- Updated dependencies [d8d2776]
|
|
85
|
+
- Updated dependencies [222dc0f]
|
|
86
|
+
- Updated dependencies [e9fcd6b]
|
|
87
|
+
- Updated dependencies [32c917d]
|
|
88
|
+
- Updated dependencies [f9a3c32]
|
|
89
|
+
- Updated dependencies [f502898]
|
|
90
|
+
- Updated dependencies [51ae731]
|
|
91
|
+
- Updated dependencies [af7edfe]
|
|
92
|
+
- Updated dependencies [b60f48b]
|
|
93
|
+
- Updated dependencies [c78c918]
|
|
94
|
+
- Updated dependencies [cf9bda4]
|
|
95
|
+
- Updated dependencies [784cb92]
|
|
96
|
+
- Updated dependencies [7629f4d]
|
|
97
|
+
- Updated dependencies [51df9fd]
|
|
98
|
+
- Updated dependencies [a7da4de]
|
|
99
|
+
- Updated dependencies [de0bcdd]
|
|
100
|
+
- Updated dependencies [70f7d6d]
|
|
101
|
+
- Updated dependencies [c677cda]
|
|
102
|
+
- Updated dependencies [554a160]
|
|
103
|
+
- Updated dependencies [f7da71e]
|
|
104
|
+
- Updated dependencies [7f745c3]
|
|
105
|
+
- Updated dependencies [5eb24f8]
|
|
106
|
+
- Updated dependencies [2a3decc]
|
|
107
|
+
- Updated dependencies [cc00df2]
|
|
108
|
+
- Updated dependencies [cc00df2]
|
|
109
|
+
- Updated dependencies [f4e6adf]
|
|
110
|
+
- Updated dependencies [ee4a59b]
|
|
111
|
+
- Updated dependencies [4db3c61]
|
|
112
|
+
- Updated dependencies [5ca314a]
|
|
113
|
+
- Updated dependencies [e0af1a8]
|
|
114
|
+
- Updated dependencies [4771bd9]
|
|
115
|
+
- Updated dependencies [414c1fc]
|
|
116
|
+
- Updated dependencies [22c0279]
|
|
117
|
+
- Updated dependencies [0db2947]
|
|
118
|
+
- Updated dependencies [92b5d7f]
|
|
119
|
+
- Updated dependencies [613bfbd]
|
|
120
|
+
- Updated dependencies [abae16a]
|
|
121
|
+
- Updated dependencies [094b8fd]
|
|
122
|
+
- Updated dependencies [c7aca0d]
|
|
123
|
+
- Updated dependencies [c1d8f98]
|
|
124
|
+
- Updated dependencies [8e0b297]
|
|
125
|
+
- Updated dependencies [d4f9b2a]
|
|
126
|
+
- Updated dependencies [5f7fa1d]
|
|
127
|
+
- Updated dependencies [87f0ccc]
|
|
128
|
+
- Updated dependencies [aedbaef]
|
|
129
|
+
- Updated dependencies [a727043]
|
|
130
|
+
- Updated dependencies [c5d6803]
|
|
131
|
+
- Updated dependencies [10d05bb]
|
|
132
|
+
- Updated dependencies [69602e5]
|
|
133
|
+
- Updated dependencies [c3ce76c]
|
|
134
|
+
- Updated dependencies [7936b29]
|
|
135
|
+
- Updated dependencies [46803fa]
|
|
136
|
+
- Updated dependencies [c2a336c]
|
|
137
|
+
- Updated dependencies [9f890d3]
|
|
138
|
+
- Updated dependencies [0bb2318]
|
|
139
|
+
- Updated dependencies [f7db8f4]
|
|
140
|
+
- Updated dependencies [1ecee3e]
|
|
141
|
+
- Updated dependencies [9408b7f]
|
|
142
|
+
- Updated dependencies [e9fcd6b]
|
|
143
|
+
- Updated dependencies [9bcd9be]
|
|
144
|
+
- Updated dependencies [b398ad2]
|
|
145
|
+
- Updated dependencies [99261a7]
|
|
146
|
+
- Updated dependencies [81b426f]
|
|
147
|
+
- Updated dependencies [001af1c]
|
|
148
|
+
- Updated dependencies [fb77aa5]
|
|
149
|
+
- Updated dependencies [581d8f8]
|
|
150
|
+
- Updated dependencies [f81afe3]
|
|
151
|
+
- Updated dependencies [40a44b9]
|
|
152
|
+
- Updated dependencies [f89812e]
|
|
153
|
+
- Updated dependencies [7a7fb03]
|
|
154
|
+
- Updated dependencies [8fd246d]
|
|
155
|
+
- @objectstack/spec@17.4.0
|
|
156
|
+
- @objectstack/core@17.4.0
|
|
157
|
+
|
|
158
|
+
## 17.3.0
|
|
159
|
+
|
|
160
|
+
### Patch Changes
|
|
161
|
+
|
|
162
|
+
- Updated dependencies [809d417]
|
|
163
|
+
- Updated dependencies [387e231]
|
|
164
|
+
- Updated dependencies [f794e4e]
|
|
165
|
+
- Updated dependencies [cae2169]
|
|
166
|
+
- Updated dependencies [b812a54]
|
|
167
|
+
- Updated dependencies [2d4fa75]
|
|
168
|
+
- Updated dependencies [0e4e51b]
|
|
169
|
+
- Updated dependencies [e84bbf6]
|
|
170
|
+
- Updated dependencies [effae80]
|
|
171
|
+
- Updated dependencies [efb3513]
|
|
172
|
+
- Updated dependencies [d62f990]
|
|
173
|
+
- Updated dependencies [c45d8e6]
|
|
174
|
+
- Updated dependencies [2e3e8c7]
|
|
175
|
+
- Updated dependencies [e621291]
|
|
176
|
+
- Updated dependencies [655b106]
|
|
177
|
+
- Updated dependencies [40a93b5]
|
|
178
|
+
- Updated dependencies [d5b330d]
|
|
179
|
+
- Updated dependencies [dda969c]
|
|
180
|
+
- Updated dependencies [1f45690]
|
|
181
|
+
- Updated dependencies [277948f]
|
|
182
|
+
- Updated dependencies [8bdd955]
|
|
183
|
+
- Updated dependencies [f3bbbef]
|
|
184
|
+
- Updated dependencies [4f24e9d]
|
|
185
|
+
- Updated dependencies [e27583e]
|
|
186
|
+
- Updated dependencies [4bd6faa]
|
|
187
|
+
- Updated dependencies [86cbe37]
|
|
188
|
+
- Updated dependencies [6a180e4]
|
|
189
|
+
- Updated dependencies [474242f]
|
|
190
|
+
- Updated dependencies [63cd487]
|
|
191
|
+
- Updated dependencies [bd4aa4e]
|
|
192
|
+
- Updated dependencies [803eaab]
|
|
193
|
+
- Updated dependencies [f8e8f03]
|
|
194
|
+
- Updated dependencies [983edf1]
|
|
195
|
+
- Updated dependencies [eae824e]
|
|
196
|
+
- Updated dependencies [f6fa22c]
|
|
197
|
+
- Updated dependencies [8a483b3]
|
|
198
|
+
- Updated dependencies [97bcd99]
|
|
199
|
+
- Updated dependencies [df59de0]
|
|
200
|
+
- Updated dependencies [96e25a8]
|
|
201
|
+
- Updated dependencies [f75a38a]
|
|
202
|
+
- Updated dependencies [7a25e7d]
|
|
203
|
+
- Updated dependencies [1fa05a6]
|
|
204
|
+
- Updated dependencies [c85a265]
|
|
205
|
+
- Updated dependencies [dcb10a5]
|
|
206
|
+
- Updated dependencies [773a999]
|
|
207
|
+
- Updated dependencies [35dffea]
|
|
208
|
+
- Updated dependencies [d8024f0]
|
|
209
|
+
- Updated dependencies [8120808]
|
|
210
|
+
- Updated dependencies [776a098]
|
|
211
|
+
- Updated dependencies [5060877]
|
|
212
|
+
- Updated dependencies [4f6325d]
|
|
213
|
+
- Updated dependencies [52954c0]
|
|
214
|
+
- Updated dependencies [2aa8456]
|
|
215
|
+
- Updated dependencies [93809a3]
|
|
216
|
+
- Updated dependencies [7c0d0c3]
|
|
217
|
+
- Updated dependencies [daae7aa]
|
|
218
|
+
- Updated dependencies [8dc22d6]
|
|
219
|
+
- Updated dependencies [279431e]
|
|
220
|
+
- Updated dependencies [948dd6b]
|
|
221
|
+
- Updated dependencies [3b4c56c]
|
|
222
|
+
- Updated dependencies [ae8edd2]
|
|
223
|
+
- Updated dependencies [e25403c]
|
|
224
|
+
- Updated dependencies [64baa68]
|
|
225
|
+
- Updated dependencies [9fa70d7]
|
|
226
|
+
- Updated dependencies [09db64a]
|
|
227
|
+
- Updated dependencies [92916e7]
|
|
228
|
+
- Updated dependencies [a84f3ea]
|
|
229
|
+
- Updated dependencies [f2eaae8]
|
|
230
|
+
- Updated dependencies [c09451b]
|
|
231
|
+
- Updated dependencies [ba64877]
|
|
232
|
+
- Updated dependencies [7345308]
|
|
233
|
+
- Updated dependencies [79b6a22]
|
|
234
|
+
- Updated dependencies [30d96ab]
|
|
235
|
+
- Updated dependencies [f658793]
|
|
236
|
+
- Updated dependencies [c95ad19]
|
|
237
|
+
- Updated dependencies [e58ea8b]
|
|
238
|
+
- Updated dependencies [4a17645]
|
|
239
|
+
- Updated dependencies [3795c5f]
|
|
240
|
+
- Updated dependencies [8ab926b]
|
|
241
|
+
- Updated dependencies [7317cf2]
|
|
242
|
+
- Updated dependencies [e25e839]
|
|
243
|
+
- Updated dependencies [5997207]
|
|
244
|
+
- Updated dependencies [8b13cc8]
|
|
245
|
+
- Updated dependencies [4a4a35d]
|
|
246
|
+
- Updated dependencies [86e765a]
|
|
247
|
+
- Updated dependencies [1d7e76a]
|
|
248
|
+
- Updated dependencies [53dc739]
|
|
249
|
+
- Updated dependencies [fd289be]
|
|
250
|
+
- Updated dependencies [03bf7b1]
|
|
251
|
+
- Updated dependencies [f90e820]
|
|
252
|
+
- Updated dependencies [18d816a]
|
|
253
|
+
- Updated dependencies [e8bd715]
|
|
254
|
+
- Updated dependencies [b91c351]
|
|
255
|
+
- Updated dependencies [a28a3c0]
|
|
256
|
+
- Updated dependencies [daeaaf9]
|
|
257
|
+
- Updated dependencies [c459da6]
|
|
258
|
+
- Updated dependencies [e914733]
|
|
259
|
+
- Updated dependencies [f887e52]
|
|
260
|
+
- Updated dependencies [881f8d8]
|
|
261
|
+
- Updated dependencies [3bfa1e6]
|
|
262
|
+
- Updated dependencies [0a8ebf3]
|
|
263
|
+
- Updated dependencies [901355c]
|
|
264
|
+
- Updated dependencies [34ce8e7]
|
|
265
|
+
- Updated dependencies [33681ea]
|
|
266
|
+
- Updated dependencies [4635f3e]
|
|
267
|
+
- Updated dependencies [fd289be]
|
|
268
|
+
- Updated dependencies [ee3595c]
|
|
269
|
+
- Updated dependencies [b2eab95]
|
|
270
|
+
- Updated dependencies [93940d4]
|
|
271
|
+
- Updated dependencies [3a04b01]
|
|
272
|
+
- Updated dependencies [45b9051]
|
|
273
|
+
- Updated dependencies [b9e9227]
|
|
274
|
+
- Updated dependencies [d395692]
|
|
275
|
+
- Updated dependencies [5894d30]
|
|
276
|
+
- Updated dependencies [a3765f6]
|
|
277
|
+
- Updated dependencies [2d5cee3]
|
|
278
|
+
- Updated dependencies [e22158f]
|
|
279
|
+
- Updated dependencies [7404925]
|
|
280
|
+
- Updated dependencies [0c2334f]
|
|
281
|
+
- Updated dependencies [778c59f]
|
|
282
|
+
- Updated dependencies [d2619fd]
|
|
283
|
+
- Updated dependencies [af56546]
|
|
284
|
+
- Updated dependencies [6acb11a]
|
|
285
|
+
- Updated dependencies [33c5fd3]
|
|
286
|
+
- Updated dependencies [20b0fdb]
|
|
287
|
+
- Updated dependencies [905019b]
|
|
288
|
+
- Updated dependencies [a286411]
|
|
289
|
+
- Updated dependencies [98c0d33]
|
|
290
|
+
- Updated dependencies [368a82e]
|
|
291
|
+
- Updated dependencies [a3d5724]
|
|
292
|
+
- Updated dependencies [93ea19b]
|
|
293
|
+
- Updated dependencies [9ee2dcf]
|
|
294
|
+
- Updated dependencies [8cb96ec]
|
|
295
|
+
- Updated dependencies [8f10a79]
|
|
296
|
+
- Updated dependencies [6269a55]
|
|
297
|
+
- Updated dependencies [a17da05]
|
|
298
|
+
- Updated dependencies [a8c00e2]
|
|
299
|
+
- Updated dependencies [0fb8760]
|
|
300
|
+
- Updated dependencies [e5ce2ed]
|
|
301
|
+
- Updated dependencies [be21955]
|
|
302
|
+
- Updated dependencies [bc56e18]
|
|
303
|
+
- Updated dependencies [be21955]
|
|
304
|
+
- Updated dependencies [a9ee989]
|
|
305
|
+
- Updated dependencies [4d0d944]
|
|
306
|
+
- Updated dependencies [15d58db]
|
|
307
|
+
- Updated dependencies [d63b014]
|
|
308
|
+
- Updated dependencies [9abe4e4]
|
|
309
|
+
- Updated dependencies [2cc7122]
|
|
310
|
+
- Updated dependencies [50d6c92]
|
|
311
|
+
- Updated dependencies [9e0ba21]
|
|
312
|
+
- Updated dependencies [311433f]
|
|
313
|
+
- Updated dependencies [3e5ad08]
|
|
314
|
+
- Updated dependencies [9abe4e4]
|
|
315
|
+
- Updated dependencies [b7131f3]
|
|
316
|
+
- Updated dependencies [e5812fa]
|
|
317
|
+
- Updated dependencies [7085f90]
|
|
318
|
+
- Updated dependencies [dee4dd4]
|
|
319
|
+
- Updated dependencies [ce7e497]
|
|
320
|
+
- Updated dependencies [51ecb2f]
|
|
321
|
+
- Updated dependencies [9086761]
|
|
322
|
+
- Updated dependencies [42a117b]
|
|
323
|
+
- Updated dependencies [1401ae7]
|
|
324
|
+
- Updated dependencies [4297fe7]
|
|
325
|
+
- Updated dependencies [e398863]
|
|
326
|
+
- Updated dependencies [d16df74]
|
|
327
|
+
- Updated dependencies [f11fc61]
|
|
328
|
+
- Updated dependencies [e808890]
|
|
329
|
+
- Updated dependencies [8f79379]
|
|
330
|
+
- Updated dependencies [e6ca40e]
|
|
331
|
+
- Updated dependencies [0c77ea4]
|
|
332
|
+
- Updated dependencies [52954c0]
|
|
333
|
+
- Updated dependencies [89eb997]
|
|
334
|
+
- Updated dependencies [7131f12]
|
|
335
|
+
- Updated dependencies [aa5994e]
|
|
336
|
+
- Updated dependencies [be93457]
|
|
337
|
+
- Updated dependencies [a65db76]
|
|
338
|
+
- Updated dependencies [15eb2c9]
|
|
339
|
+
- Updated dependencies [5691b07]
|
|
340
|
+
- Updated dependencies [2a6122b]
|
|
341
|
+
- Updated dependencies [225e769]
|
|
342
|
+
- Updated dependencies [8af88dd]
|
|
343
|
+
- Updated dependencies [fb5fbb8]
|
|
344
|
+
- Updated dependencies [d7b3963]
|
|
345
|
+
- Updated dependencies [33184fd]
|
|
346
|
+
- Updated dependencies [7c41693]
|
|
347
|
+
- Updated dependencies [b72db01]
|
|
348
|
+
- Updated dependencies [dce5cd4]
|
|
349
|
+
- Updated dependencies [9688f58]
|
|
350
|
+
- Updated dependencies [556ebc1]
|
|
351
|
+
- Updated dependencies [177ebdc]
|
|
352
|
+
- Updated dependencies [8d237b4]
|
|
353
|
+
- Updated dependencies [2d2e6f0]
|
|
354
|
+
- Updated dependencies [2d8dd8d]
|
|
355
|
+
- Updated dependencies [22d573e]
|
|
356
|
+
- Updated dependencies [b5a2398]
|
|
357
|
+
- Updated dependencies [348860c]
|
|
358
|
+
- Updated dependencies [5383fa6]
|
|
359
|
+
- Updated dependencies [5b3ff63]
|
|
360
|
+
- Updated dependencies [1a6a19c]
|
|
361
|
+
- Updated dependencies [527e050]
|
|
362
|
+
- Updated dependencies [dd33bf9]
|
|
363
|
+
- Updated dependencies [4cb2a90]
|
|
364
|
+
- Updated dependencies [74a7804]
|
|
365
|
+
- Updated dependencies [53d3689]
|
|
366
|
+
- Updated dependencies [b3a63d3]
|
|
367
|
+
- Updated dependencies [49f0dcf]
|
|
368
|
+
- Updated dependencies [033a34c]
|
|
369
|
+
- Updated dependencies [4d25d22]
|
|
370
|
+
- Updated dependencies [1ffee51]
|
|
371
|
+
- Updated dependencies [5ae4303]
|
|
372
|
+
- Updated dependencies [ece4dad]
|
|
373
|
+
- Updated dependencies [e9b377e]
|
|
374
|
+
- Updated dependencies [146f448]
|
|
375
|
+
- Updated dependencies [735f5c7]
|
|
376
|
+
- Updated dependencies [a7e18de]
|
|
377
|
+
- Updated dependencies [366f895]
|
|
378
|
+
- Updated dependencies [dc75ba8]
|
|
379
|
+
- Updated dependencies [cce0aa9]
|
|
380
|
+
- Updated dependencies [e764507]
|
|
381
|
+
- Updated dependencies [cff17af]
|
|
382
|
+
- Updated dependencies [39404f3]
|
|
383
|
+
- Updated dependencies [ca1965f]
|
|
384
|
+
- Updated dependencies [8619f95]
|
|
385
|
+
- Updated dependencies [b706af9]
|
|
386
|
+
- Updated dependencies [add4360]
|
|
387
|
+
- Updated dependencies [fc9ba76]
|
|
388
|
+
- Updated dependencies [0f94cc7]
|
|
389
|
+
- Updated dependencies [a11c1a5]
|
|
390
|
+
- Updated dependencies [71f9cd1]
|
|
391
|
+
- Updated dependencies [ee17d86]
|
|
392
|
+
- Updated dependencies [cdbd920]
|
|
393
|
+
- Updated dependencies [18c432e]
|
|
394
|
+
- Updated dependencies [3c418c4]
|
|
395
|
+
- Updated dependencies [fa8715a]
|
|
396
|
+
- Updated dependencies [a933ed7]
|
|
397
|
+
- Updated dependencies [b3ca463]
|
|
398
|
+
- Updated dependencies [a933ed7]
|
|
399
|
+
- Updated dependencies [0d4a6a8]
|
|
400
|
+
- Updated dependencies [518d5e5]
|
|
401
|
+
- Updated dependencies [6643ba1]
|
|
402
|
+
- Updated dependencies [eeba2ef]
|
|
403
|
+
- Updated dependencies [ec4c4d2]
|
|
404
|
+
- Updated dependencies [424f73c]
|
|
405
|
+
- Updated dependencies [cccbe51]
|
|
406
|
+
- Updated dependencies [a8d6b1d]
|
|
407
|
+
- Updated dependencies [e4a7695]
|
|
408
|
+
- Updated dependencies [87075b1]
|
|
409
|
+
- Updated dependencies [fc58a99]
|
|
410
|
+
- Updated dependencies [14cfc00]
|
|
411
|
+
- Updated dependencies [1c6f7b4]
|
|
412
|
+
- Updated dependencies [e854a53]
|
|
413
|
+
- Updated dependencies [dfebfc8]
|
|
414
|
+
- Updated dependencies [d028b37]
|
|
415
|
+
- Updated dependencies [f7b25c5]
|
|
416
|
+
- Updated dependencies [122ef38]
|
|
417
|
+
- Updated dependencies [4a37870]
|
|
418
|
+
- Updated dependencies [428f9b2]
|
|
419
|
+
- Updated dependencies [aa7ff56]
|
|
420
|
+
- Updated dependencies [c41b42e]
|
|
421
|
+
- Updated dependencies [c4db311]
|
|
422
|
+
- Updated dependencies [750fff5]
|
|
423
|
+
- Updated dependencies [c19035e]
|
|
424
|
+
- Updated dependencies [ececf7a]
|
|
425
|
+
- Updated dependencies [d173125]
|
|
426
|
+
- Updated dependencies [8eeca27]
|
|
427
|
+
- Updated dependencies [8425c17]
|
|
428
|
+
- Updated dependencies [a5ef1d8]
|
|
429
|
+
- Updated dependencies [772d5de]
|
|
430
|
+
- Updated dependencies [ce80ec2]
|
|
431
|
+
- Updated dependencies [b372318]
|
|
432
|
+
- Updated dependencies [97a2263]
|
|
433
|
+
- Updated dependencies [29d0676]
|
|
434
|
+
- Updated dependencies [0169d49]
|
|
435
|
+
- Updated dependencies [6bd3231]
|
|
436
|
+
- Updated dependencies [d2b5ba8]
|
|
437
|
+
- Updated dependencies [b799ac5]
|
|
438
|
+
- Updated dependencies [8f74307]
|
|
439
|
+
- Updated dependencies [d23dc08]
|
|
440
|
+
- Updated dependencies [644ad50]
|
|
441
|
+
- Updated dependencies [0da7cd2]
|
|
442
|
+
- Updated dependencies [28a5c3e]
|
|
443
|
+
- Updated dependencies [4bc18e5]
|
|
444
|
+
- @objectstack/spec@17.3.0
|
|
445
|
+
- @objectstack/core@17.3.0
|
|
446
|
+
|
|
3
447
|
## 17.2.0
|
|
4
448
|
|
|
5
449
|
### Patch Changes
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/rest-connector.ts","../src/rest-provider.ts","../src/connector-rest-plugin.ts"],"sourcesContent":["// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\n/**\n * @objectstack/connector-rest\n *\n * Generic REST connector — the reference *concrete* connector (ADR-0018\n * §Addendum). The baseline automation engine ships the `connector_action`\n * dispatch node + an empty connector registry; this plugin populates the\n * registry with a `rest` connector exposing a `request` action.\n *\n * Static auth only (`none` / `api-key` / `basic` / `bearer`); OAuth2 refresh,\n * credential vaulting, and multi-tenant lifecycle are the enterprise tier.\n */\n\nexport {\n createRestConnector,\n type RestConnectorOptions,\n type RestConnectorBundle,\n type RestRequestInput,\n type RestAuth,\n} from './rest-connector.js';\nexport {\n ConnectorRestPlugin,\n type ConnectorRestPluginOptions,\n type ConnectorRegistrySurface,\n} from './connector-rest-plugin.js';\nexport {\n createRestProviderFactory,\n REST_PROVIDER_KEY,\n type RestProviderDeps,\n} from './rest-provider.js';\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { Connector } from '@objectstack/spec/integration';\nimport { resilientFetch } from '@objectstack/spec/shared';\n\n/**\n * Generic REST connector — the reference *concrete* connector (ADR-0018\n * §Addendum). It produces a {@link Connector} definition plus the handler for\n * its one action, `request`, which the baseline `connector_action` node\n * dispatches to.\n *\n * Open-source scope: **static** auth only (`none` / `api-key` / `basic` /\n * `bearer`), with credentials supplied by the caller. OAuth2 token acquisition\n * and refresh, credential vaulting, and multi-tenant connection lifecycle are\n * the enterprise tier (see `../cloud/docs/design/connector-tiering.md`) and are\n * deliberately out of scope here.\n */\n\n/** Auth config understood by the REST connector (the static subset). */\nexport type RestAuth = Extract<\n Connector['authentication'],\n { type: 'none' | 'api-key' | 'basic' | 'bearer' }\n>;\n\nexport interface RestConnectorOptions {\n /** Connector machine name (snake_case). Defaults to `rest`. */\n name?: string;\n /** Human-readable label. Defaults to a title derived from `name`. */\n label?: string;\n /** Base URL prepended to each request's `path` (e.g. `https://api.example.com`). */\n baseUrl: string;\n /** Static authentication. Defaults to `{ type: 'none' }`. */\n auth?: RestAuth;\n /** Headers merged into every request (request-level headers win). */\n defaultHeaders?: Record<string, string>;\n /** Injected for tests; defaults to the global `fetch`. */\n fetchImpl?: typeof fetch;\n}\n\n/** Input accepted by the `request` action. */\nexport interface RestRequestInput {\n method?: string;\n path?: string;\n headers?: Record<string, string>;\n query?: Record<string, string | number | boolean | null | undefined>;\n body?: unknown;\n}\n\n/** A connector definition paired with its action handlers, ready for registerConnector(). */\nexport interface RestConnectorBundle {\n def: Connector;\n handlers: Record<\n string,\n (input: Record<string, unknown>, ctx: unknown) => Promise<Record<string, unknown>>\n >;\n}\n\n/** Build the request URL from base + path + query, encoding query params. */\nfunction buildUrl(baseUrl: string, path: string, query?: RestRequestInput['query']): string {\n const base = baseUrl.replace(/\\/+$/, '');\n const suffix = path ? (path.startsWith('/') ? path : `/${path}`) : '';\n const url = new URL(base + suffix);\n if (query) {\n for (const [key, value] of Object.entries(query)) {\n if (value !== undefined && value !== null) url.searchParams.set(key, String(value));\n }\n }\n return url.toString();\n}\n\n/**\n * Apply static auth to the outgoing headers / query. Returns possibly-extended\n * query so an `api-key` configured with `paramName` can ride the query string.\n */\nfunction applyAuth(\n auth: RestAuth,\n headers: Record<string, string>,\n query: Record<string, string | number | boolean | null | undefined>,\n): void {\n switch (auth.type) {\n case 'none':\n return;\n case 'bearer':\n headers['Authorization'] = `Bearer ${auth.token}`;\n return;\n case 'basic': {\n const encoded = Buffer.from(`${auth.username}:${auth.password}`).toString('base64');\n headers['Authorization'] = `Basic ${encoded}`;\n return;\n }\n case 'api-key':\n if (auth.paramName) query[auth.paramName] = auth.key;\n else headers[auth.headerName ?? 'X-API-Key'] = auth.key;\n return;\n }\n}\n\nexport function createRestConnector(opts: RestConnectorOptions): RestConnectorBundle {\n const name = opts.name ?? 'rest';\n const auth: RestAuth = opts.auth ?? { type: 'none' };\n\n const def: Connector = {\n name,\n label: opts.label ?? 'REST Connector',\n type: 'api',\n description: 'Generic REST/HTTP connector with static authentication.',\n icon: 'globe',\n authentication: auth,\n // Defaulted by ConnectorSchema; set explicitly so the literal satisfies\n // the (post-parse) Connector output type.\n status: 'active',\n enabled: true,\n connectionTimeoutMs: 30000,\n requestTimeoutMs: 30000,\n actions: [\n {\n key: 'request',\n label: 'HTTP Request',\n description: 'Send an HTTP request to the connector\\'s base URL with static auth applied.',\n inputSchema: {\n type: 'object',\n properties: {\n method: { type: 'string', description: 'HTTP method (default GET)' },\n path: { type: 'string', description: 'Path appended to the base URL' },\n headers: { type: 'object', description: 'Per-request headers' },\n query: { type: 'object', description: 'Query parameters' },\n body: { description: 'Request body (JSON-encoded for non-GET)' },\n },\n },\n outputSchema: {\n type: 'object',\n properties: {\n status: { type: 'number' },\n ok: { type: 'boolean' },\n body: {},\n },\n },\n },\n ],\n };\n\n async function request(input: Record<string, unknown>): Promise<Record<string, unknown>> {\n const req = input as RestRequestInput;\n const method = (req.method ?? 'GET').toUpperCase();\n const headers: Record<string, string> = { ...opts.defaultHeaders, ...req.headers };\n const query: Record<string, string | number | boolean | null | undefined> = { ...req.query };\n\n applyAuth(auth, headers, query);\n\n const url = buildUrl(opts.baseUrl, req.path ?? '', query);\n\n const hasBody = req.body !== undefined && method !== 'GET' && method !== 'HEAD';\n if (hasBody && headers['Content-Type'] === undefined && headers['content-type'] === undefined) {\n headers['Content-Type'] = 'application/json';\n }\n\n const response = await resilientFetch(url, {\n method,\n headers,\n body: hasBody ? JSON.stringify(req.body) : undefined,\n }, { fetchImpl: opts.fetchImpl });\n\n // Parse JSON when advertised; fall back to text so non-JSON endpoints\n // don't throw.\n const contentType = response.headers.get('content-type') ?? '';\n const parsed = contentType.includes('application/json')\n ? await response.json()\n : await response.text();\n\n return { status: response.status, ok: response.ok, body: parsed };\n }\n\n return { def, handlers: { request } };\n}\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { ConnectorProviderFactory, ResolvedConnectorAuth } from '@objectstack/spec/integration';\nimport { createRestConnector, type RestAuth } from './rest-connector.js';\n\n/**\n * The provider key this package contributes (ADR-0097). A declarative\n * `connectors:` entry with `provider: 'rest'` is materialized by this factory.\n */\nexport const REST_PROVIDER_KEY = 'rest';\n\n/** Injectable dependencies for {@link createRestProviderFactory} (tests). */\nexport interface RestProviderDeps {\n /** Injected fetch implementation; defaults to the global `fetch`. */\n fetchImpl?: typeof fetch;\n}\n\n/** Shape of `providerConfig` for a `provider: 'rest'` declarative instance. */\ninterface RestProviderConfig {\n baseUrl?: unknown;\n defaultHeaders?: unknown;\n}\n\nfunction isStringRecord(v: unknown): v is Record<string, string> {\n if (!v || typeof v !== 'object' || Array.isArray(v)) return false;\n return Object.values(v as Record<string, unknown>).every((x) => typeof x === 'string');\n}\n\n/**\n * Build the `rest` {@link ConnectorProviderFactory} (ADR-0097). At boot the\n * automation service invokes it for each `provider: 'rest'` declarative instance,\n * turning `providerConfig.baseUrl` (+ the resolved `auth`) into the same\n * `{ def, handlers }` bundle {@link createRestConnector} produces for a\n * hand-wired REST connector — one `request` action over static-auth HTTP.\n *\n * Hard-fails on invalid config (missing `baseUrl`), so a misconfigured instance\n * fails boot loudly rather than materializing a dead connector.\n */\nexport function createRestProviderFactory(deps: RestProviderDeps = {}): ConnectorProviderFactory {\n return (ctx) => {\n const cfg = (ctx.providerConfig ?? {}) as RestProviderConfig;\n if (typeof cfg.baseUrl !== 'string' || cfg.baseUrl.length === 0) {\n throw new Error(\n `connector-rest provider: connector '${ctx.name}' requires providerConfig.baseUrl (a non-empty string, e.g. https://api.example.com).`,\n );\n }\n if (cfg.defaultHeaders !== undefined && !isStringRecord(cfg.defaultHeaders)) {\n throw new Error(\n `connector-rest provider: connector '${ctx.name}' providerConfig.defaultHeaders must be a string→string map.`,\n );\n }\n // `ResolvedConnectorAuth` is exactly the static-auth subset RestAuth expects\n // (the credentialRef has already been resolved to a secret upstream).\n const auth = ctx.auth as ResolvedConnectorAuth | undefined as RestAuth | undefined;\n return createRestConnector({\n name: ctx.name,\n label: ctx.label,\n baseUrl: cfg.baseUrl,\n auth,\n defaultHeaders: isStringRecord(cfg.defaultHeaders) ? cfg.defaultHeaders : undefined,\n fetchImpl: deps.fetchImpl,\n });\n };\n}\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { Plugin, PluginContext } from '@objectstack/core';\nimport type { Connector, ConnectorProviderFactory } from '@objectstack/spec/integration';\nimport { createRestConnector, type RestConnectorOptions } from './rest-connector.js';\nimport { createRestProviderFactory, REST_PROVIDER_KEY } from './rest-provider.js';\n\n/**\n * Minimal surface of the automation engine this plugin depends on — the\n * connector registry (ADR-0018 §Addendum) plus the provider registry (ADR-0097).\n * Kept structural so the plugin needs no runtime dependency on\n * `@objectstack/service-automation`.\n */\nexport interface ConnectorRegistrySurface {\n registerConnector(\n def: Connector,\n handlers: Record<\n string,\n (input: Record<string, unknown>, ctx: unknown) => Promise<Record<string, unknown>>\n >,\n ): void;\n unregisterConnector(name: string): void;\n registerConnectorProvider(providerKey: string, factory: ConnectorProviderFactory): void;\n}\n\n/**\n * Options for {@link ConnectorRestPlugin}. All optional (ADR-0097): with no\n * `baseUrl` the plugin contributes only the `rest` provider factory — so a stack\n * can declare `provider: 'rest'` instances as pure metadata. Supply `baseUrl`\n * (etc.) to ALSO register a single hand-wired `rest` connector, the pre-ADR-0097\n * usage.\n */\nexport interface ConnectorRestPluginOptions extends Partial<RestConnectorOptions> {}\n\n/**\n * ConnectorRestPlugin — contributes the generic REST connector (ADR-0018\n * §Addendum) in two forms:\n *\n * 1. **Provider factory** (`rest`, ADR-0097): registered at `init()` so the\n * automation service can materialize declarative `provider: 'rest'`\n * `connectors:` entries into live connectors at boot.\n * 2. **Hand-wired instance** (optional, back-compat): when constructed with a\n * `baseUrl`, it also registers one concrete `rest` connector at `start()`.\n *\n * If no automation engine is present the plugin logs and skips — the connector\n * has nowhere to register, which is not an error.\n */\nexport class ConnectorRestPlugin implements Plugin {\n name = 'com.objectstack.connector.rest';\n version = '1.0.0';\n type = 'standard' as const;\n // Ensure the automation engine (and its connector/provider registries) exist first.\n dependencies = ['com.objectstack.service-automation'];\n\n private readonly options: ConnectorRestPluginOptions;\n private connectorName?: string;\n private automation?: ConnectorRegistrySurface;\n\n constructor(options: ConnectorRestPluginOptions = {}) {\n this.options = options;\n }\n\n async init(ctx: PluginContext): Promise<void> {\n // Contribute the `rest` provider factory (ADR-0097). Done in init() — not\n // start() — so it is registered before the automation service materializes\n // declarative instances during its own start().\n const automation = this.tryGetAutomation(ctx);\n if (automation && typeof automation.registerConnectorProvider === 'function') {\n automation.registerConnectorProvider(\n REST_PROVIDER_KEY,\n createRestProviderFactory({ fetchImpl: this.options.fetchImpl }),\n );\n ctx.logger.info(\"ConnectorRestPlugin: registered 'rest' connector provider\");\n }\n }\n\n async start(ctx: PluginContext): Promise<void> {\n // Only register a concrete connector when a baseUrl was supplied — the\n // provider-only usage (no options) contributes just the factory in init().\n if (!this.options.baseUrl) return;\n\n const automation = this.tryGetAutomation(ctx);\n if (!automation || typeof automation.registerConnector !== 'function') {\n ctx.logger.info('ConnectorRestPlugin: no automation engine — REST connector not registered');\n return;\n }\n\n const { def, handlers } = createRestConnector(this.options as RestConnectorOptions);\n automation.registerConnector(def, handlers);\n this.automation = automation;\n this.connectorName = def.name;\n ctx.logger.info(`ConnectorRestPlugin: REST connector '${def.name}' registered`);\n }\n\n /**\n * The kernel's teardown hook (`Plugin.destroy?()`, core `types.ts`) — the\n * ONLY teardown entry point `ObjectKernel.performShutdown()` and\n * `LiteKernel.destroy()` invoke.\n *\n * [#10371] IT USED TO BE `stop()`, WHICH NOTHING CALLED. `Plugin` declares\n * `init()`, `start?()` and `destroy?()` and no `stop()`, so the kernel\n * walked past this plugin at shutdown and the REST connector stayed registered in the automation\n * engine for the lifetime of the process. `start()` IS on the\n * interface, so the pair read as symmetric in review — that asymmetry is\n * what let the same shape survive in six packages at once.\n *\n * No timers here, so this instance never cost a merge-queue eviction the\n * way the `plugin-reports` / `service-messaging` members did (#9371). The\n * class is the same one either way: a teardown the kernel does not reach.\n */\n async destroy(): Promise<void> {\n if (this.automation && this.connectorName) {\n try { this.automation.unregisterConnector(this.connectorName); } catch { /* ignore */ }\n }\n this.automation = undefined;\n this.connectorName = undefined;\n }\n\n /**\n * Retained alias for {@link destroy}. Kept because it is public API of an\n * exported class, and removing it would break an embedder who learned to\n * call it directly precisely BECAUSE the kernel never did. Prefer kernel\n * shutdown; direct callers keep working unchanged.\n */\n async stop(_ctx?: PluginContext): Promise<void> {\n await this.destroy();\n }\n\n private tryGetAutomation(ctx: PluginContext): ConnectorRegistrySurface | undefined {\n try {\n return ctx.getService<Connect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e;AAAA,IAC1F;AACA,SAAK,aAAa;AAClB,SAAK,gBAAgB;AAAA,EACzB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,KAAK,MAAqC;AAC5C,UAAM,KAAK,QAAQ;AAAA,EACvB;AAAA,EAEQ,iBAAiB,KAA0D;AAC/E,QAAI;AACA,aAAO,IAAI,WAAqC,YAAY;AAAA,IAChE,QAAQ;AACJ,aAAO;AAAA,IACX;AAAA,EACJ;AACJ;","names":[]}
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/rest-connector.ts","../src/rest-provider.ts","../src/connector-rest-plugin.ts"],"sourcesContent":["// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { Connector } from '@objectstack/spec/integration';\nimport { resilientFetch } from '@objectstack/spec/shared';\n\n/**\n * Generic REST connector — the reference *concrete* connector (ADR-0018\n * §Addendum). It produces a {@link Connector} definition plus the handler for\n * its one action, `request`, which the baseline `connector_action` node\n * dispatches to.\n *\n * Open-source scope: **static** auth only (`none` / `api-key` / `basic` /\n * `bearer`), with credentials supplied by the caller. OAuth2 token acquisition\n * and refresh, credential vaulting, and multi-tenant connection lifecycle are\n * the enterprise tier (see `../cloud/docs/design/connector-tiering.md`) and are\n * deliberately out of scope here.\n */\n\n/** Auth config understood by the REST connector (the static subset). */\nexport type RestAuth = Extract<\n Connector['authentication'],\n { type: 'none' | 'api-key' | 'basic' | 'bearer' }\n>;\n\nexport interface RestConnectorOptions {\n /** Connector machine name (snake_case). Defaults to `rest`. */\n name?: string;\n /** Human-readable label. Defaults to a title derived from `name`. */\n label?: string;\n /** Base URL prepended to each request's `path` (e.g. `https://api.example.com`). */\n baseUrl: string;\n /** Static authentication. Defaults to `{ type: 'none' }`. */\n auth?: RestAuth;\n /** Headers merged into every request (request-level headers win). */\n defaultHeaders?: Record<string, string>;\n /** Injected for tests; defaults to the global `fetch`. */\n fetchImpl?: typeof fetch;\n}\n\n/** Input accepted by the `request` action. */\nexport interface RestRequestInput {\n method?: string;\n path?: string;\n headers?: Record<string, string>;\n query?: Record<string, string | number | boolean | null | undefined>;\n body?: unknown;\n}\n\n/** A connector definition paired with its action handlers, ready for registerConnector(). */\nexport interface RestConnectorBundle {\n def: Connector;\n handlers: Record<\n string,\n (input: Record<string, unknown>, ctx: unknown) => Promise<Record<string, unknown>>\n >;\n}\n\n/** Build the request URL from base + path + query, encoding query params. */\nfunction buildUrl(baseUrl: string, path: string, query?: RestRequestInput['query']): string {\n const base = baseUrl.replace(/\\/+$/, '');\n const suffix = path ? (path.startsWith('/') ? path : `/${path}`) : '';\n const url = new URL(base + suffix);\n if (query) {\n for (const [key, value] of Object.entries(query)) {\n if (value !== undefined && value !== null) url.searchParams.set(key, String(value));\n }\n }\n return url.toString();\n}\n\n/**\n * Apply static auth to the outgoing headers / query. Returns possibly-extended\n * query so an `api-key` configured with `paramName` can ride the query string.\n */\nfunction applyAuth(\n auth: RestAuth,\n headers: Record<string, string>,\n query: Record<string, string | number | boolean | null | undefined>,\n): void {\n switch (auth.type) {\n case 'none':\n return;\n case 'bearer':\n headers['Authorization'] = `Bearer ${auth.token}`;\n return;\n case 'basic': {\n const encoded = Buffer.from(`${auth.username}:${auth.password}`).toString('base64');\n headers['Authorization'] = `Basic ${encoded}`;\n return;\n }\n case 'api-key':\n if (auth.paramName) query[auth.paramName] = auth.key;\n else headers[auth.headerName ?? 'X-API-Key'] = auth.key;\n return;\n }\n}\n\nexport function createRestConnector(opts: RestConnectorOptions): RestConnectorBundle {\n const name = opts.name ?? 'rest';\n const auth: RestAuth = opts.auth ?? { type: 'none' };\n\n const def: Connector = {\n name,\n label: opts.label ?? 'REST Connector',\n type: 'api',\n description: 'Generic REST/HTTP connector with static authentication.',\n icon: 'globe',\n authentication: auth,\n // Defaulted by ConnectorSchema; set explicitly so the literal satisfies\n // the (post-parse) Connector output type.\n status: 'active',\n enabled: true,\n connectionTimeoutMs: 30000,\n requestTimeoutMs: 30000,\n actions: [\n {\n key: 'request',\n label: 'HTTP Request',\n description: 'Send an HTTP request to the connector\\'s base URL with static auth applied.',\n inputSchema: {\n type: 'object',\n properties: {\n method: { type: 'string', description: 'HTTP method (default GET)' },\n path: { type: 'string', description: 'Path appended to the base URL' },\n headers: { type: 'object', description: 'Per-request headers' },\n query: { type: 'object', description: 'Query parameters' },\n body: { description: 'Request body (JSON-encoded for non-GET)' },\n },\n },\n outputSchema: {\n type: 'object',\n properties: {\n status: { type: 'number' },\n ok: { type: 'boolean' },\n body: {},\n },\n },\n },\n ],\n };\n\n async function request(input: Record<string, unknown>): Promise<Record<string, unknown>> {\n const req = input as RestRequestInput;\n const method = (req.method ?? 'GET').toUpperCase();\n const headers: Record<string, string> = { ...opts.defaultHeaders, ...req.headers };\n const query: Record<string, string | number | boolean | null | undefined> = { ...req.query };\n\n applyAuth(auth, headers, query);\n\n const url = buildUrl(opts.baseUrl, req.path ?? '', query);\n\n const hasBody = req.body !== undefined && method !== 'GET' && method !== 'HEAD';\n if (hasBody && headers['Content-Type'] === undefined && headers['content-type'] === undefined) {\n headers['Content-Type'] = 'application/json';\n }\n\n const response = await resilientFetch(url, {\n method,\n headers,\n body: hasBody ? JSON.stringify(req.body) : undefined,\n }, { fetchImpl: opts.fetchImpl });\n\n // Parse JSON when advertised; fall back to text so non-JSON endpoints\n // don't throw.\n const contentType = response.headers.get('content-type') ?? '';\n const parsed = contentType.includes('application/json')\n ? await response.json()\n : await response.text();\n\n return { status: response.status, ok: response.ok, body: parsed };\n }\n\n return { def, handlers: { request } };\n}\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { ConnectorProviderFactory, ResolvedConnectorAuth } from '@objectstack/spec/integration';\nimport { createRestConnector, type RestAuth } from './rest-connector.js';\n\n/**\n * The provider key this package contributes (ADR-0097). A declarative\n * `connectors:` entry with `provider: 'rest'` is materialized by this factory.\n */\nexport const REST_PROVIDER_KEY = 'rest';\n\n/** Injectable dependencies for {@link createRestProviderFactory} (tests). */\nexport interface RestProviderDeps {\n /** Injected fetch implementation; defaults to the global `fetch`. */\n fetchImpl?: typeof fetch;\n}\n\n/** Shape of `providerConfig` for a `provider: 'rest'` declarative instance. */\ninterface RestProviderConfig {\n baseUrl?: unknown;\n defaultHeaders?: unknown;\n}\n\nfunction isStringRecord(v: unknown): v is Record<string, string> {\n if (!v || typeof v !== 'object' || Array.isArray(v)) return false;\n return Object.values(v as Record<string, unknown>).every((x) => typeof x === 'string');\n}\n\n/**\n * Build the `rest` {@link ConnectorProviderFactory} (ADR-0097). At boot the\n * automation service invokes it for each `provider: 'rest'` declarative instance,\n * turning `providerConfig.baseUrl` (+ the resolved `auth`) into the same\n * `{ def, handlers }` bundle {@link createRestConnector} produces for a\n * hand-wired REST connector — one `request` action over static-auth HTTP.\n *\n * Hard-fails on invalid config (missing `baseUrl`), so a misconfigured instance\n * fails boot loudly rather than materializing a dead connector.\n */\nexport function createRestProviderFactory(deps: RestProviderDeps = {}): ConnectorProviderFactory {\n return (ctx) => {\n const cfg = (ctx.providerConfig ?? {}) as RestProviderConfig;\n if (typeof cfg.baseUrl !== 'string' || cfg.baseUrl.length === 0) {\n throw new Error(\n `connector-rest provider: connector '${ctx.name}' requires providerConfig.baseUrl (a non-empty string, e.g. https://api.example.com).`,\n );\n }\n if (cfg.defaultHeaders !== undefined && !isStringRecord(cfg.defaultHeaders)) {\n throw new Error(\n `connector-rest provider: connector '${ctx.name}' providerConfig.defaultHeaders must be a string→string map.`,\n );\n }\n // `ResolvedConnectorAuth` is exactly the static-auth subset RestAuth expects\n // (the credentialRef has already been resolved to a secret upstream).\n const auth = ctx.auth as ResolvedConnectorAuth | undefined as RestAuth | undefined;\n return createRestConnector({\n name: ctx.name,\n label: ctx.label,\n baseUrl: cfg.baseUrl,\n auth,\n defaultHeaders: isStringRecord(cfg.defaultHeaders) ? cfg.defaultHeaders : undefined,\n fetchImpl: deps.fetchImpl,\n });\n };\n}\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { Plugin, PluginContext } from '@objectstack/core';\nimport type { Connector, ConnectorProviderFactory } from '@objectstack/spec/integration';\nimport { createRestConnector, type RestConnectorOptions } from './rest-connector.js';\nimport { createRestProviderFactory, REST_PROVIDER_KEY } from './rest-provider.js';\n\n/**\n * Minimal surface of the automation engine this plugin depends on — the\n * connector registry (ADR-0018 §Addendum) plus the provider registry (ADR-0097).\n * Kept structural so the plugin needs no runtime dependency on\n * `@objectstack/service-automation`.\n */\nexport interface ConnectorRegistrySurface {\n registerConnector(\n def: Connector,\n handlers: Record<\n string,\n (input: Record<string, unknown>, ctx: unknown) => Promise<Record<string, unknown>>\n >,\n ): void;\n unregisterConnector(name: string): void;\n registerConnectorProvider(providerKey: string, factory: ConnectorProviderFactory): void;\n}\n\n/**\n * Options for {@link ConnectorRestPlugin}. All optional (ADR-0097): with no\n * `baseUrl` the plugin contributes only the `rest` provider factory — so a stack\n * can declare `provider: 'rest'` instances as pure metadata. Supply `baseUrl`\n * (etc.) to ALSO register a single hand-wired `rest` connector, the pre-ADR-0097\n * usage.\n */\nexport interface ConnectorRestPluginOptions extends Partial<RestConnectorOptions> {}\n\n/**\n * ConnectorRestPlugin — contributes the generic REST connector (ADR-0018\n * §Addendum) in two forms:\n *\n * 1. **Provider factory** (`rest`, ADR-0097): registered at `init()` so the\n * automation service can materialize declarative `provider: 'rest'`\n * `connectors:` entries into live connectors at boot.\n * 2. **Hand-wired instance** (optional, back-compat): when constructed with a\n * `baseUrl`, it also registers one concrete `rest` connector at `start()`.\n *\n * If no automation engine is present the plugin logs and skips — the connector\n * has nowhere to register, which is not an error.\n */\nexport class ConnectorRestPlugin implements Plugin {\n name = 'com.objectstack.connector.rest';\n version = '1.0.0';\n type = 'standard' as const;\n // Ensure the automation engine (and its connector/provider registries) exist first.\n dependencies = ['com.objectstack.service-automation'];\n\n private readonly options: ConnectorRestPluginOptions;\n private connectorName?: string;\n private automation?: ConnectorRegistrySurface;\n\n constructor(options: ConnectorRestPluginOptions = {}) {\n this.options = options;\n }\n\n async init(ctx: PluginContext): Promise<void> {\n // Contribute the `rest` provider factory (ADR-0097). Done in init() — not\n // start() — so it is registered before the automation service materializes\n // declarative instances during its own start().\n const automation = this.tryGetAutomation(ctx);\n if (automation && typeof automation.registerConnectorProvider === 'function') {\n automation.registerConnectorProvider(\n REST_PROVIDER_KEY,\n createRestProviderFactory({ fetchImpl: this.options.fetchImpl }),\n );\n ctx.logger.info(\"ConnectorRestPlugin: registered 'rest' connector provider\");\n }\n }\n\n async start(ctx: PluginContext): Promise<void> {\n // Only register a concrete connector when a baseUrl was supplied — the\n // provider-only usage (no options) contributes just the factory in init().\n if (!this.options.baseUrl) return;\n\n const automation = this.tryGetAutomation(ctx);\n if (!automation || typeof automation.registerConnector !== 'function') {\n ctx.logger.info('ConnectorRestPlugin: no automation engine — REST connector not registered');\n return;\n }\n\n const { def, handlers } = createRestConnector(this.options as RestConnectorOptions);\n automation.registerConnector(def, handlers);\n this.automation = automation;\n this.connectorName = def.name;\n ctx.logger.info(`ConnectorRestPlugin: REST connector '${def.name}' registered`);\n }\n\n /**\n * The kernel's teardown hook (`Plugin.destroy?()`, core `types.ts`) — the\n * ONLY teardown entry point `ObjectKernel.performShutdown()` and\n * `LiteKernel.destroy()` invoke.\n *\n * [#10371] IT USED TO BE `stop()`, WHICH NOTHING CALLED. `Plugin` declares\n * `init()`, `start?()` and `destroy?()` and no `stop()`, so the kernel\n * walked past this plugin at shutdown and the REST connector stayed registered in the automation\n * engine for the lifetime of the process. `start()` IS on the\n * interface, so the pair read as symmetric in review — that asymmetry is\n * what let the same shape survive in six packages at once.\n *\n * No timers here, so this instance never cost a merge-queue eviction the\n * way the `plugin-reports` / `service-messaging` members did (#9371). The\n * class is the same one either way: a teardown the kernel does not reach.\n */\n async destroy(): Promise<void> {\n if (this.automation && this.connectorName) {\n try { this.automation.unregisterConnector(this.connectorName); } catch { /* ignore */ }\n }\n this.automation = undefined;\n this.connectorName = undefined;\n }\n\n /**\n * Retained alias for {@link destroy}. Kept because it is public API of an\n * exported class, and removing it would break an embedder who learned to\n * call it directly precisely BECAUSE the kernel never did. Prefer kernel\n * shutdown; direct callers keep working unchanged.\n */\n async stop(_ctx?: PluginContext): Promise<void> {\n await this.destroy();\n }\n\n private tryGetAutomation(ctx: PluginContext): ConnectorRegistrySurface | undefined {\n try {\n return ctx.getService<ConnectorRegistrySurface>('automation');\n } catch {\n return undefined;\n }\n }\n}\n"],"mappings":";AAGA,SAAS,sBAAsB;AAuD/B,SAAS,SAAS,SAAiB,MAAc,OAA2C;AACxF,QAAM,OAAO,QAAQ,QAAQ,QAAQ,EAAE;AACvC,QAAM,SAAS,OAAQ,KAAK,WAAW,GAAG,IAAI,OAAO,IAAI,IAAI,KAAM;AACnE,QAAM,MAAM,IAAI,IAAI,OAAO,MAAM;AACjC,MAAI,OAAO;AACP,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,KAAK,GAAG;AAC9C,UAAI,UAAU,UAAa,UAAU,KAAM,KAAI,aAAa,IAAI,KAAK,OAAO,KAAK,CAAC;AAAA,IACtF;AAAA,EACJ;AACA,SAAO,IAAI,SAAS;AACxB;AAMA,SAAS,UACL,MACA,SACA,OACI;AACJ,UAAQ,KAAK,MAAM;AAAA,IACf,KAAK;AACD;AAAA,IACJ,KAAK;AACD,cAAQ,eAAe,IAAI,UAAU,KAAK,KAAK;AAC/C;AAAA,IACJ,KAAK,SAAS;AACV,YAAM,UAAU,OAAO,KAAK,GAAG,KAAK,QAAQ,IAAI,KAAK,QAAQ,EAAE,EAAE,SAAS,QAAQ;AAClF,cAAQ,eAAe,IAAI,SAAS,OAAO;AAC3C;AAAA,IACJ;AAAA,IACA,KAAK;AACD,UAAI,KAAK,UAAW,OAAM,KAAK,SAAS,IAAI,KAAK;AAAA,UAC5C,SAAQ,KAAK,cAAc,WAAW,IAAI,KAAK;AACpD;AAAA,EACR;AACJ;AAEO,SAAS,oBA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yB;AAC3B,QAAI,KAAK,cAAc,KAAK,eAAe;AACvC,UAAI;AAAE,aAAK,WAAW,oBAAoB,KAAK,aAAa;AAAA,MAAG,QAAQ;AAAA,MAAe;AAAA,IAC1F;AACA,SAAK,aAAa;AAClB,SAAK,gBAAgB;AAAA,EACzB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,KAAK,MAAqC;AAC5C,UAAM,KAAK,QAAQ;AAAA,EACvB;AAAA,EAEQ,iBAAiB,KAA0D;AAC/E,QAAI;AACA,aAAO,IAAI,WAAqC,YAAY;AAAA,IAChE,QAAQ;AACJ,aAAO;AAAA,IACX;AAAA,EACJ;AACJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@objectstack/connector-rest",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.4.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Generic REST connector for ObjectStack — the reference concrete connector that registers a `request` action on the automation engine's connector registry (ADR-0018 §Addendum).",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@objectstack/core": "17.
|
|
17
|
-
"@objectstack/spec": "17.
|
|
16
|
+
"@objectstack/core": "17.4.0",
|
|
17
|
+
"@objectstack/spec": "17.4.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/node": "^26.2.0",
|
|
21
21
|
"typescript": "^6.0.3",
|
|
22
22
|
"vitest": "^4.1.10",
|
|
23
|
-
"@objectstack/service-automation": "17.
|
|
23
|
+
"@objectstack/service-automation": "17.4.0"
|
|
24
24
|
},
|
|
25
25
|
"keywords": [
|
|
26
26
|
"objectstack",
|
|
@@ -29,14 +29,21 @@
|
|
|
29
29
|
"integration",
|
|
30
30
|
"http"
|
|
31
31
|
],
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://github.com/objectstack-ai/objectstack.git",
|
|
35
|
+
"directory": "packages/connectors/connector-rest"
|
|
36
|
+
},
|
|
32
37
|
"files": [
|
|
33
38
|
"dist",
|
|
34
39
|
"README.md",
|
|
35
40
|
"CHANGELOG.md"
|
|
36
41
|
],
|
|
37
42
|
"scripts": {
|
|
38
|
-
"build": "tsup --config ../../../tsup.config.ts",
|
|
43
|
+
"build": "tsup --config ../../../tsup.config.ts && node ../../../scripts/check-dts-emitted.mjs",
|
|
44
|
+
"check:test-typecheck": "tsx ../../../scripts/check-test-typecheck.mts --self-test && tsx ../../../scripts/check-test-typecheck.mts --package packages/connectors/connector-rest --project tsconfig.test.json",
|
|
45
|
+
"gen:test-typecheck-debt": "tsx ../../../scripts/check-test-typecheck.mts --update --package packages/connectors/connector-rest --project tsconfig.test.json",
|
|
39
46
|
"test": "vitest run --passWithNoTests",
|
|
40
|
-
"typecheck": "tsc --noEmit"
|
|
47
|
+
"typecheck": "tsc --noEmit && pnpm check:test-typecheck"
|
|
41
48
|
}
|
|
42
49
|
}
|