@distilled.cloud/core 1.0.0-rc.16 → 1.0.0-rc.17
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/lib/_bundle/aws.js +2 -0
- package/lib/_bundle/aws.js.map +1 -0
- package/lib/_bundle/base.js +5 -0
- package/lib/_bundle/base.js.map +1 -0
- package/lib/_bundle/graphql.js +3 -0
- package/lib/_bundle/graphql.js.map +1 -0
- package/lib/_bundle/rest.js +2 -0
- package/lib/_bundle/rest.js.map +1 -0
- package/lib/_bundle/xml.js +4 -0
- package/lib/_bundle/xml.js.map +1 -0
- package/lib/api.d.ts.map +1 -1
- package/lib/api.js +1 -796
- package/lib/category.js +1 -278
- package/lib/chunks.js +1 -11
- package/lib/config.js +1 -161
- package/lib/crypto.js +1 -130
- package/lib/debug.js +1 -8
- package/lib/error-category.js +1 -47
- package/lib/errors.js +1 -198
- package/lib/graphql.js +1 -1058
- package/lib/graphql.types.js +1 -6
- package/lib/index.js +0 -15
- package/lib/json-patch.js +1 -226
- package/lib/json-patch.js.map +1 -1
- package/lib/pagination.js +1 -271
- package/lib/plain-values.js +1 -39
- package/lib/plain-values.js.map +1 -1
- package/lib/protocol-http.js +1 -812
- package/lib/protocol-rest.js +1 -375
- package/lib/query.js +1 -27
- package/lib/response-validation-strict.js +1 -284
- package/lib/response-validation.js +1 -118
- package/lib/retry-after.js +1 -112
- package/lib/retry.js +1 -197
- package/lib/schema-lite-impl.js +1 -341
- package/lib/schema-lite-typed.js +1 -26
- package/lib/schema-lite-typed.js.map +1 -1
- package/lib/schema-lite.js +1 -31
- package/lib/schema.js +1 -220
- package/lib/testing.js +1 -41
- package/lib/testing.js.map +1 -1
- package/lib/trait.js +1 -131
- package/lib/xml.js +1 -323
- package/package.json +1 -1
- package/src/api.ts +7 -6
- package/lib/api.js.map +0 -1
- package/lib/category.js.map +0 -1
- package/lib/chunks.js.map +0 -1
- package/lib/config.js.map +0 -1
- package/lib/crypto.js.map +0 -1
- package/lib/debug.js.map +0 -1
- package/lib/error-category.js.map +0 -1
- package/lib/errors.js.map +0 -1
- package/lib/graphql.js.map +0 -1
- package/lib/graphql.types.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/pagination.js.map +0 -1
- package/lib/protocol-http.js.map +0 -1
- package/lib/protocol-rest.js.map +0 -1
- package/lib/query.js.map +0 -1
- package/lib/response-validation-strict.js.map +0 -1
- package/lib/response-validation.js.map +0 -1
- package/lib/retry-after.js.map +0 -1
- package/lib/retry.js.map +0 -1
- package/lib/schema-lite-impl.js.map +0 -1
- package/lib/schema-lite.js.map +0 -1
- package/lib/schema.js.map +0 -1
- package/lib/trait.js.map +0 -1
- package/lib/xml.js.map +0 -1
package/lib/graphql.types.js
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
const deployment = /*@__PURE__*/ service.latestDeployment.pipe(
|
|
3
|
-
/*@__PURE__*/ mapQuery((d) => ({ id: d.id, status: d.status })));
|
|
4
|
-
const popular = /*@__PURE__*/ service.stars.pipe(/*@__PURE__*/ mapQuery((stars) => stars > 5));
|
|
5
|
-
const labels = /*@__PURE__*/ service.tags.pipe(/*@__PURE__*/ mapQuery((tag) => tag.label));
|
|
6
|
-
//# sourceMappingURL=graphql.types.js.map
|
|
1
|
+
export {};
|
package/lib/index.js
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
1
|
export * as API from "./api.js";
|
|
16
2
|
export * as Category from "./category.js";
|
|
17
3
|
export * as Errors from "./errors.js";
|
|
@@ -25,4 +11,3 @@ export * as ResponseValidation from "./response-validation.js";
|
|
|
25
11
|
export * as Retry from "./retry.js";
|
|
26
12
|
export * as RetryAfter from "./retry-after.js";
|
|
27
13
|
export * as Trait from "./trait.js";
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
package/lib/json-patch.js
CHANGED
|
@@ -1,227 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// ============================================================================
|
|
13
|
-
// JSON Pointer (RFC 6901)
|
|
14
|
-
// ============================================================================
|
|
15
|
-
|
|
16
|
-
export function parseJsonPointer(pointer) {
|
|
17
|
-
if (pointer === "")
|
|
18
|
-
return [];
|
|
19
|
-
if (!pointer.startsWith("/")) {
|
|
20
|
-
throw new Error(`Invalid JSON Pointer: ${pointer}`);
|
|
21
|
-
}
|
|
22
|
-
return pointer
|
|
23
|
-
.slice(1)
|
|
24
|
-
.split("/")
|
|
25
|
-
.map((segment) => segment.replace(/~1/g, "/").replace(/~0/g, "~"));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export class StaleTargetError extends Error {
|
|
33
|
-
name = "StaleTargetError";
|
|
34
|
-
}
|
|
35
|
-
export function getValueAtPath(obj, pointer) {
|
|
36
|
-
const segments = parseJsonPointer(pointer);
|
|
37
|
-
let current = obj;
|
|
38
|
-
for (const segment of segments) {
|
|
39
|
-
if (current === null || current === undefined || typeof current !== "object") {
|
|
40
|
-
throw new StaleTargetError(`JSON pointer ${pointer} missing (at '${segment}'): not an object`);
|
|
41
|
-
}
|
|
42
|
-
if (Array.isArray(current)) {
|
|
43
|
-
const index = segment === "-" ? current.length : parseInt(segment, 10);
|
|
44
|
-
if (index < 0 || index >= current.length) {
|
|
45
|
-
throw new StaleTargetError(`JSON pointer ${pointer} missing index '${segment}'`);
|
|
46
|
-
}
|
|
47
|
-
current = current[index];
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
const record = current;
|
|
51
|
-
if (!Object.prototype.hasOwnProperty.call(record, segment)) {
|
|
52
|
-
throw new StaleTargetError(`JSON pointer ${pointer} missing key '${segment}'`);
|
|
53
|
-
}
|
|
54
|
-
current = record[segment];
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return current;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export function setValueAtPath(obj, pointer, value, mode = "add", before) {
|
|
61
|
-
const segments = parseJsonPointer(pointer);
|
|
62
|
-
if (segments.length === 0) {
|
|
63
|
-
throw new Error("Cannot set value at root path");
|
|
64
|
-
}
|
|
65
|
-
let current = obj;
|
|
66
|
-
for (let i = 0; i < segments.length - 1; i++) {
|
|
67
|
-
const segment = segments[i];
|
|
68
|
-
if (current === null || typeof current !== "object") {
|
|
69
|
-
throw new StaleTargetError(`Cannot traverse path ${pointer}: not an object`);
|
|
70
|
-
}
|
|
71
|
-
if (Array.isArray(current)) {
|
|
72
|
-
current = current[parseInt(segment, 10)];
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
current = current[segment];
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
const lastSegment = segments[segments.length - 1];
|
|
79
|
-
if (current === null || typeof current !== "object") {
|
|
80
|
-
throw new StaleTargetError(`Cannot set value at path ${pointer}: parent is not an object`);
|
|
81
|
-
}
|
|
82
|
-
if (Array.isArray(current)) {
|
|
83
|
-
if (lastSegment === "-") {
|
|
84
|
-
current.push(value);
|
|
85
|
-
}
|
|
86
|
-
else if (mode === "replace") {
|
|
87
|
-
current[parseInt(lastSegment, 10)] = value;
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
// RFC 6902 §4.1: `add` at an array index inserts before it.
|
|
91
|
-
const index = parseInt(lastSegment, 10);
|
|
92
|
-
if (Number.isNaN(index) || index < 0 || index > current.length) {
|
|
93
|
-
throw new StaleTargetError(`JSON pointer ${pointer} index '${lastSegment}' is out of bounds`);
|
|
94
|
-
}
|
|
95
|
-
current.splice(index, 0, value);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
const record = current;
|
|
100
|
-
if (before === undefined || lastSegment in record || !(before in record)) {
|
|
101
|
-
record[lastSegment] = value;
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
// Rebuild the keys in place: the parent object stays the same object,
|
|
105
|
-
// since callers and later ops may hold a reference to it.
|
|
106
|
-
const entries = Object.entries(record);
|
|
107
|
-
for (const [key] of entries)
|
|
108
|
-
delete record[key];
|
|
109
|
-
for (const [key, v] of entries) {
|
|
110
|
-
if (key === before)
|
|
111
|
-
record[lastSegment] = value;
|
|
112
|
-
record[key] = v;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export function removeValueAtPath(obj, pointer) {
|
|
118
|
-
const segments = parseJsonPointer(pointer);
|
|
119
|
-
if (segments.length === 0) {
|
|
120
|
-
throw new Error("Cannot remove root");
|
|
121
|
-
}
|
|
122
|
-
let current = obj;
|
|
123
|
-
for (let i = 0; i < segments.length - 1; i++) {
|
|
124
|
-
const segment = segments[i];
|
|
125
|
-
if (current === null || typeof current !== "object") {
|
|
126
|
-
throw new StaleTargetError(`Cannot traverse path ${pointer}: not an object`);
|
|
127
|
-
}
|
|
128
|
-
if (Array.isArray(current)) {
|
|
129
|
-
current = current[parseInt(segment, 10)];
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
current = current[segment];
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
const lastSegment = segments[segments.length - 1];
|
|
136
|
-
if (current === null || typeof current !== "object") {
|
|
137
|
-
throw new StaleTargetError(`Cannot remove at path ${pointer}: parent is not an object`);
|
|
138
|
-
}
|
|
139
|
-
// RFC 6902 §4.2: the target location MUST exist.
|
|
140
|
-
if (Array.isArray(current)) {
|
|
141
|
-
const index = parseInt(lastSegment, 10);
|
|
142
|
-
if (Number.isNaN(index) || index < 0 || index >= current.length) {
|
|
143
|
-
throw new StaleTargetError(`JSON pointer ${pointer} missing index '${lastSegment}'`);
|
|
144
|
-
}
|
|
145
|
-
current.splice(index, 1);
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
const record = current;
|
|
149
|
-
if (!Object.prototype.hasOwnProperty.call(record, lastSegment)) {
|
|
150
|
-
throw new StaleTargetError(`JSON pointer ${pointer} missing key '${lastSegment}'`);
|
|
151
|
-
}
|
|
152
|
-
delete record[lastSegment];
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
// ============================================================================
|
|
156
|
-
// Patch Operations
|
|
157
|
-
// ============================================================================
|
|
158
|
-
|
|
159
|
-
export function applyOperation(obj, operation) {
|
|
160
|
-
switch (operation.op) {
|
|
161
|
-
case "add":
|
|
162
|
-
setValueAtPath(obj, operation.path, operation.value, "add", operation.before);
|
|
163
|
-
break;
|
|
164
|
-
case "remove":
|
|
165
|
-
removeValueAtPath(obj, operation.path);
|
|
166
|
-
break;
|
|
167
|
-
case "replace": {
|
|
168
|
-
const existing = getValueAtPath(obj, operation.path);
|
|
169
|
-
if (existing === undefined) {
|
|
170
|
-
throw new StaleTargetError(`JSON pointer ${operation.path} does not exist`);
|
|
171
|
-
}
|
|
172
|
-
setValueAtPath(obj, operation.path, operation.value, "replace");
|
|
173
|
-
break;
|
|
174
|
-
}
|
|
175
|
-
case "move": {
|
|
176
|
-
if (!operation.from)
|
|
177
|
-
throw new Error("move operation requires 'from'");
|
|
178
|
-
const moveValue = getValueAtPath(obj, operation.from);
|
|
179
|
-
if (moveValue === undefined) {
|
|
180
|
-
throw new StaleTargetError(`Cannot move from path ${operation.from}: not an object`);
|
|
181
|
-
}
|
|
182
|
-
removeValueAtPath(obj, operation.from);
|
|
183
|
-
setValueAtPath(obj, operation.path, moveValue, "add", operation.before);
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
case "copy": {
|
|
187
|
-
if (!operation.from)
|
|
188
|
-
throw new Error("copy operation requires 'from'");
|
|
189
|
-
const copyValue = getValueAtPath(obj, operation.from);
|
|
190
|
-
setValueAtPath(obj, operation.path, JSON.parse(JSON.stringify(copyValue)));
|
|
191
|
-
break;
|
|
192
|
-
}
|
|
193
|
-
case "test": {
|
|
194
|
-
const testValue = getValueAtPath(obj, operation.path);
|
|
195
|
-
if (JSON.stringify(testValue) !== JSON.stringify(operation.value)) {
|
|
196
|
-
throw new Error(`Test operation failed at ${operation.path}: expected ${JSON.stringify(operation.value)}, got ${JSON.stringify(testValue)}`);
|
|
197
|
-
}
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
default:
|
|
201
|
-
throw new Error(`Unknown operation: ${operation.op}`);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export function applyPatch(obj, patch) {
|
|
206
|
-
for (const operation of patch) {
|
|
207
|
-
applyOperation(obj, operation);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
export function isStaleTargetError(error) {
|
|
218
|
-
if (error instanceof StaleTargetError)
|
|
219
|
-
return true;
|
|
220
|
-
const message = typeof error === "string" ? error : error instanceof Error ? error.message : "";
|
|
221
|
-
return (message.includes("not an object") ||
|
|
222
|
-
message.includes("parent is not an object") ||
|
|
223
|
-
message.includes("missing key") ||
|
|
224
|
-
message.includes("missing index") ||
|
|
225
|
-
message.includes("does not exist"));
|
|
226
|
-
}
|
|
1
|
+
function parseJsonPointer(e){if(e===``)return[];if(!e.startsWith(`/`))throw new Error(`Invalid JSON Pointer: ${e}`);return e.slice(1).split(`/`).map(e=>e.replace(/~1/g,`/`).replace(/~0/g,`~`))}var StaleTargetError=class extends Error{name=`StaleTargetError`};function getValueAtPath(e,t){const n=parseJsonPointer(t);let r=e;for(const e of n){if(r===null||r===void 0||typeof r!==`object`)throw new StaleTargetError(`JSON pointer ${t} missing (at '${e}'): not an object`);if(Array.isArray(r)){const n=e===`-`?r.length:parseInt(e,10);if(n<0||n>=r.length)throw new StaleTargetError(`JSON pointer ${t} missing index '${e}'`);r=r[n]}else{const n=r;if(!Object.prototype.hasOwnProperty.call(n,e))throw new StaleTargetError(`JSON pointer ${t} missing key '${e}'`);r=n[e]}}return r}function setValueAtPath(e,t,n,r=`add`,i){const a=parseJsonPointer(t);if(a.length===0)throw new Error(`Cannot set value at root path`);let o=e;for(let e=0;e<a.length-1;e++){const n=a[e];if(o===null||typeof o!==`object`)throw new StaleTargetError(`Cannot traverse path ${t}: not an object`);if(Array.isArray(o))o=o[parseInt(n,10)];else o=o[n]}const s=a[a.length-1];if(o===null||typeof o!==`object`)throw new StaleTargetError(`Cannot set value at path ${t}: parent is not an object`);if(Array.isArray(o)){if(s===`-`)o.push(n);else if(r===`replace`)o[parseInt(s,10)]=n;else{const e=parseInt(s,10);if(Number.isNaN(e)||e<0||e>o.length)throw new StaleTargetError(`JSON pointer ${t} index '${s}' is out of bounds`);o.splice(e,0,n)}}else{const e=o;if(i===void 0||s in e||!(i in e)){e[s]=n;return}const t=Object.entries(e);for(const[n]of t)delete e[n];for(const[r,a]of t){if(r===i)e[s]=n;e[r]=a}}}function removeValueAtPath(e,t){const n=parseJsonPointer(t);if(n.length===0)throw new Error(`Cannot remove root`);let r=e;for(let e=0;e<n.length-1;e++){const i=n[e];if(r===null||typeof r!==`object`)throw new StaleTargetError(`Cannot traverse path ${t}: not an object`);if(Array.isArray(r))r=r[parseInt(i,10)];else r=r[i]}const i=n[n.length-1];if(r===null||typeof r!==`object`)throw new StaleTargetError(`Cannot remove at path ${t}: parent is not an object`);if(Array.isArray(r)){const e=parseInt(i,10);if(Number.isNaN(e)||e<0||e>=r.length)throw new StaleTargetError(`JSON pointer ${t} missing index '${i}'`);r.splice(e,1)}else{const e=r;if(!Object.prototype.hasOwnProperty.call(e,i))throw new StaleTargetError(`JSON pointer ${t} missing key '${i}'`);delete e[i]}}function applyOperation(e,t){switch(t.op){case`add`:setValueAtPath(e,t.path,t.value,`add`,t.before);break;case`remove`:removeValueAtPath(e,t.path);break;case`replace`:if(getValueAtPath(e,t.path)===void 0)throw new StaleTargetError(`JSON pointer ${t.path} does not exist`);setValueAtPath(e,t.path,t.value,`replace`);break;case`move`:{if(!t.from)throw new Error(`move operation requires 'from'`);const n=getValueAtPath(e,t.from);if(n===void 0)throw new StaleTargetError(`Cannot move from path ${t.from}: not an object`);removeValueAtPath(e,t.from);setValueAtPath(e,t.path,n,`add`,t.before);break}case`copy`:{if(!t.from)throw new Error(`copy operation requires 'from'`);const n=getValueAtPath(e,t.from);setValueAtPath(e,t.path,JSON.parse(JSON.stringify(n)));break}case`test`:{const n=getValueAtPath(e,t.path);if(JSON.stringify(n)!==JSON.stringify(t.value))throw new Error(`Test operation failed at ${t.path}: expected ${JSON.stringify(t.value)}, got ${JSON.stringify(n)}`);break}default:throw new Error(`Unknown operation: ${t.op}`)}}function applyPatch(e,t){for(const n of t)applyOperation(e,n)}function isStaleTargetError(e){if(e instanceof StaleTargetError)return true;const t=typeof e===`string`?e:e instanceof Error?e.message:``;return t.includes(`not an object`)||t.includes(`parent is not an object`)||t.includes(`missing key`)||t.includes(`missing index`)||t.includes(`does not exist`)}export{StaleTargetError,applyOperation,applyPatch,getValueAtPath,isStaleTargetError,parseJsonPointer,removeValueAtPath,setValueAtPath};
|
|
227
2
|
//# sourceMappingURL=json-patch.js.map
|
package/lib/json-patch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-patch.js","
|
|
1
|
+
{"version":3,"file":"json-patch.js","names":["pointer","segment","segments","current","obj","index","record","i","lastSegment","value","mode","before","entries","key","v","operation","moveValue","copyValue","testValue","patch","error","message"],"sources":["../src/json-patch.ts"],"mappings":"AA2CA,SAAgB,iBAAiB,EAA2B,CAC1D,GAAIA,IAAY,GAAI,MAAO,CAAC,EAC5B,GAAI,CAACA,EAAQ,WAAW,GAAG,EACzB,MAAM,IAAI,MAAM,yBAAyBA,GAAS,EA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const parts = path.split(".");
|
|
9
|
-
let current = obj;
|
|
10
|
-
for (const part of parts) {
|
|
11
|
-
if (current == null || typeof current !== "object") {
|
|
12
|
-
return undefined;
|
|
13
|
-
}
|
|
14
|
-
current = current[part];
|
|
15
|
-
}
|
|
16
|
-
return current;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export const getItems = (obj, path) => {
|
|
31
|
-
let current = [obj];
|
|
32
|
-
for (const part of path.split(".")) {
|
|
33
|
-
const next = [];
|
|
34
|
-
for (const value of current) {
|
|
35
|
-
if (value == null || typeof value !== "object")
|
|
36
|
-
continue;
|
|
37
|
-
const child = value[part];
|
|
38
|
-
if (Array.isArray(child)) {
|
|
39
|
-
for (const item of child)
|
|
40
|
-
next.push(item);
|
|
41
|
-
}
|
|
42
|
-
else if (child != null)
|
|
43
|
-
next.push(child);
|
|
44
|
-
}
|
|
45
|
-
current = next;
|
|
46
|
-
}
|
|
47
|
-
return current;
|
|
48
|
-
};
|
|
49
|
-
const missingPaginationConfig = (kind) => Stream.die(new Error(kind));
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
export const isTerminalToken = (token) => token === undefined || token === null || token === "";
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
export const paginateSingle = (operation, input) =>
|
|
66
|
-
// `Stream.fromEffect` keeps `mapEffect`'s concurrency machinery out of bundles.
|
|
67
|
-
Stream.fromEffect(Effect.suspend(() => operation(input)));
|
|
68
|
-
// ============================================================================
|
|
69
|
-
// Page-based Pagination
|
|
70
|
-
// ============================================================================
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
export const paginatePageNumber = (operation, input, pagination) => {
|
|
77
|
-
const inputToken = pagination.inputToken;
|
|
78
|
-
const outputToken = pagination.outputToken;
|
|
79
|
-
if (!inputToken || !outputToken) {
|
|
80
|
-
return missingPaginationConfig("Page-number pagination requires inputToken and outputToken");
|
|
81
|
-
}
|
|
82
|
-
const startPage = typeof input[inputToken] === "number" ? input[inputToken] : 1;
|
|
83
|
-
return Stream.unfold({ page: startPage, done: false }, (state) => Effect.gen(function* () {
|
|
84
|
-
if (state.done)
|
|
85
|
-
return undefined;
|
|
86
|
-
const requestPayload = { ...input, [inputToken]: state.page };
|
|
87
|
-
const response = yield* operation(requestPayload);
|
|
88
|
-
const nextPage = getPath(response, outputToken);
|
|
89
|
-
// Some APIs report the CURRENT page at `outputToken` rather than the
|
|
90
|
-
// next one (e.g. Cloudflare's `result_info.page`). Taking that value as
|
|
91
|
-
// the next page re-requests the same page forever. Only accept an
|
|
92
|
-
// *advancing* page number; otherwise advance by one and terminate when
|
|
93
|
-
// a page comes back with no items (or the token is absent).
|
|
94
|
-
const items = pagination.items
|
|
95
|
-
? getPath(response, pagination.items)
|
|
96
|
-
: undefined;
|
|
97
|
-
const nextState = {
|
|
98
|
-
page: typeof nextPage === "number" && nextPage > state.page ? nextPage : state.page + 1,
|
|
99
|
-
done: nextPage === null ||
|
|
100
|
-
nextPage === undefined ||
|
|
101
|
-
(items !== undefined && items.length === 0),
|
|
102
|
-
};
|
|
103
|
-
return [response, nextState];
|
|
104
|
-
}));
|
|
105
|
-
};
|
|
106
|
-
// ============================================================================
|
|
107
|
-
// Cursor-based Pagination
|
|
108
|
-
// ============================================================================
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
export const paginateCursor = (operation, input, pagination) => {
|
|
115
|
-
const inputToken = pagination.inputToken;
|
|
116
|
-
const outputToken = pagination.outputToken;
|
|
117
|
-
if (!inputToken || !outputToken) {
|
|
118
|
-
return missingPaginationConfig("Cursor pagination requires inputToken and outputToken");
|
|
119
|
-
}
|
|
120
|
-
const startCursor = typeof input[inputToken] === "string" ? input[inputToken] : undefined;
|
|
121
|
-
return Stream.suspend(() => {
|
|
122
|
-
// Cursor history belongs to this traversal, not to the reusable stream.
|
|
123
|
-
const requestedCursors = new Set();
|
|
124
|
-
return Stream.unfold({ cursor: startCursor, done: false }, (state) => Effect.gen(function* () {
|
|
125
|
-
if (state.done)
|
|
126
|
-
return undefined;
|
|
127
|
-
if (state.cursor !== undefined)
|
|
128
|
-
requestedCursors.add(state.cursor);
|
|
129
|
-
const requestPayload = {
|
|
130
|
-
...input,
|
|
131
|
-
...(state.cursor ? { [inputToken]: state.cursor } : {}),
|
|
132
|
-
};
|
|
133
|
-
const response = yield* operation(requestPayload);
|
|
134
|
-
const nextCursor = getPath(response, outputToken);
|
|
135
|
-
const nextState = {
|
|
136
|
-
cursor: nextCursor ?? undefined,
|
|
137
|
-
done: isTerminalToken(nextCursor) || (nextCursor != null && requestedCursors.has(nextCursor)),
|
|
138
|
-
};
|
|
139
|
-
return [response, nextState];
|
|
140
|
-
}));
|
|
141
|
-
});
|
|
142
|
-
};
|
|
143
|
-
// ============================================================================
|
|
144
|
-
// Token-based Pagination (AWS style)
|
|
145
|
-
// ============================================================================
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
export const paginateToken = (operation, input, pagination) => {
|
|
151
|
-
const inputToken = pagination.inputToken;
|
|
152
|
-
const outputToken = pagination.outputToken;
|
|
153
|
-
if (!inputToken || !outputToken) {
|
|
154
|
-
return missingPaginationConfig("Token pagination requires inputToken and outputToken");
|
|
155
|
-
}
|
|
156
|
-
const startToken = input[inputToken];
|
|
157
|
-
return Stream.unfold({ token: startToken, done: false }, (state) => Effect.gen(function* () {
|
|
158
|
-
if (state.done)
|
|
159
|
-
return undefined;
|
|
160
|
-
const requestPayload = state.token !== undefined ? { ...input, [inputToken]: state.token } : input;
|
|
161
|
-
const response = yield* operation(requestPayload);
|
|
162
|
-
const nextToken = getPath(response, outputToken);
|
|
163
|
-
const nextState = {
|
|
164
|
-
token: nextToken,
|
|
165
|
-
done: isTerminalToken(nextToken),
|
|
166
|
-
};
|
|
167
|
-
return [response, nextState];
|
|
168
|
-
}));
|
|
169
|
-
};
|
|
170
|
-
// ============================================================================
|
|
171
|
-
// Relay Pagination (GraphQL connections)
|
|
172
|
-
// ============================================================================
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
export const paginateRelay = (operation, input, pagination) => {
|
|
186
|
-
const inputToken = pagination.inputToken;
|
|
187
|
-
const outputToken = pagination.outputToken;
|
|
188
|
-
if (!inputToken || !outputToken) {
|
|
189
|
-
return missingPaginationConfig("Relay pagination requires inputToken and outputToken");
|
|
190
|
-
}
|
|
191
|
-
// `pageInfo.endCursor` -> `pageInfo.hasNextPage` when the trait doesn't say.
|
|
192
|
-
const hasNextPath = pagination.hasNextPage ??
|
|
193
|
-
`${outputToken.split(".").slice(0, -1).concat("hasNextPage").join(".")}`;
|
|
194
|
-
const startCursor = typeof input[inputToken] === "string" ? input[inputToken] : undefined;
|
|
195
|
-
return Stream.unfold({ cursor: startCursor, done: false }, (state) => Effect.gen(function* () {
|
|
196
|
-
if (state.done)
|
|
197
|
-
return undefined;
|
|
198
|
-
const requestPayload = {
|
|
199
|
-
...input,
|
|
200
|
-
...(state.cursor ? { [inputToken]: state.cursor } : {}),
|
|
201
|
-
};
|
|
202
|
-
const response = yield* operation(requestPayload);
|
|
203
|
-
const nextCursor = getPath(response, outputToken);
|
|
204
|
-
const hasNext = getPath(response, hasNextPath) === true;
|
|
205
|
-
// An empty page means the connection is exhausted regardless of what
|
|
206
|
-
// `hasNextPage` claims -- re-requesting the same cursor would loop.
|
|
207
|
-
const emptyPage = pagination.items !== undefined && getItems(response, pagination.items).length === 0;
|
|
208
|
-
// A connection that keeps returning the same `endCursor` with
|
|
209
|
-
// `hasNextPage: true` (Railway `projects` has done this) would
|
|
210
|
-
// otherwise paginate forever.
|
|
211
|
-
const stuckCursor = state.cursor !== undefined &&
|
|
212
|
-
nextCursor !== undefined &&
|
|
213
|
-
nextCursor !== null &&
|
|
214
|
-
nextCursor === state.cursor;
|
|
215
|
-
const nextState = {
|
|
216
|
-
cursor: nextCursor ?? undefined,
|
|
217
|
-
done: !hasNext || isTerminalToken(nextCursor) || emptyPage || stuckCursor,
|
|
218
|
-
};
|
|
219
|
-
return [response, nextState];
|
|
220
|
-
}));
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
export const paginateWithDefaults = (operation, input, pagination) => {
|
|
227
|
-
const mode = pagination.mode ?? "token";
|
|
228
|
-
switch (mode) {
|
|
229
|
-
case "page":
|
|
230
|
-
return paginatePageNumber(operation, input, pagination);
|
|
231
|
-
case "cursor":
|
|
232
|
-
return paginateCursor(operation, input, pagination);
|
|
233
|
-
case "relay":
|
|
234
|
-
return paginateRelay(operation, input, pagination);
|
|
235
|
-
case "single":
|
|
236
|
-
return paginateSingle(operation, input, pagination);
|
|
237
|
-
case "token":
|
|
238
|
-
default:
|
|
239
|
-
return paginateToken(operation, input, pagination);
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
|
-
// ============================================================================
|
|
243
|
-
// Item extraction
|
|
244
|
-
// ============================================================================
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
export const extractItems = (pages, itemsPath) =>
|
|
254
|
-
// Flattens each pulled chunk of pages directly, skipping pages with no
|
|
255
|
-
// items. `Stream.flatMap` / `flattenIterable` would do the same but pull in
|
|
256
|
-
// Effect's concurrent-merge machinery (Queue, Semaphore, ...): about 5 KB
|
|
257
|
-
// gzip in every bundle that uses a paginated operation.
|
|
258
|
-
Stream.transformPull(pages, (pull) => {
|
|
259
|
-
// Same error channel as `pull` (its `Done` included), so the stream ends where the pages end.
|
|
260
|
-
const next = Effect.flatMap(pull, (chunk) => {
|
|
261
|
-
const items = [];
|
|
262
|
-
for (const page of chunk)
|
|
263
|
-
for (const item of getItems(page, itemsPath))
|
|
264
|
-
items.push(item);
|
|
265
|
-
return items.length > 0
|
|
266
|
-
? Effect.succeed(items)
|
|
267
|
-
: next;
|
|
268
|
-
});
|
|
269
|
-
return Effect.succeed(next);
|
|
270
|
-
});
|
|
271
|
-
//# sourceMappingURL=pagination.js.map
|
|
1
|
+
export { pagination$extractItems as extractItems, pagination$getItems as getItems, pagination$getPath as getPath, pagination$isTerminalToken as isTerminalToken, pagination$paginateCursor as paginateCursor, pagination$paginatePageNumber as paginatePageNumber, pagination$paginateRelay as paginateRelay, pagination$paginateSingle as paginateSingle, pagination$paginateToken as paginateToken, pagination$paginateWithDefaults as paginateWithDefaults } from "./_bundle/base.js";
|
package/lib/plain-values.js
CHANGED
|
@@ -1,40 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import * as Redacted from "effect/Redacted";
|
|
7
|
-
|
|
8
|
-
export const isOpaqueValue = (v) => v instanceof Blob ||
|
|
9
|
-
v instanceof File ||
|
|
10
|
-
v instanceof ArrayBuffer ||
|
|
11
|
-
v instanceof Uint8Array ||
|
|
12
|
-
v instanceof Date;
|
|
13
|
-
const isPlainObject = (v) => v !== null &&
|
|
14
|
-
typeof v === "object" &&
|
|
15
|
-
!Array.isArray(v) &&
|
|
16
|
-
!isOpaqueValue(v) &&
|
|
17
|
-
(Object.getPrototypeOf(v) === Object.prototype || Object.getPrototypeOf(v) === null);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export const unwrapRedactedDeep = (value) => {
|
|
25
|
-
if (Redacted.isRedacted(value))
|
|
26
|
-
return Redacted.value(value);
|
|
27
|
-
if (Array.isArray(value))
|
|
28
|
-
return value.map(unwrapRedactedDeep);
|
|
29
|
-
if (isPlainObject(value)) {
|
|
30
|
-
const out = {};
|
|
31
|
-
for (const [k, v] of Object.entries(value)) {
|
|
32
|
-
if (v === undefined)
|
|
33
|
-
continue;
|
|
34
|
-
out[k] = unwrapRedactedDeep(v);
|
|
35
|
-
}
|
|
36
|
-
return out;
|
|
37
|
-
}
|
|
38
|
-
return value;
|
|
39
|
-
};
|
|
1
|
+
import*as e from"effect/Redacted";const isOpaqueValue=e=>e instanceof Blob||e instanceof File||e instanceof ArrayBuffer||e instanceof Uint8Array||e instanceof Date;const isPlainObject=e=>e!==null&&typeof e===`object`&&!Array.isArray(e)&&!isOpaqueValue(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null);const unwrapRedactedDeep=t=>{if(e.isRedacted(t))return e.value(t);if(Array.isArray(t))return t.map(unwrapRedactedDeep);if(isPlainObject(t)){const e={};for(const[n,r]of Object.entries(t)){if(r===void 0)continue;e[n]=unwrapRedactedDeep(r)}return e}return t};export{isOpaqueValue,unwrapRedactedDeep};
|
|
40
2
|
//# sourceMappingURL=plain-values.js.map
|
package/lib/plain-values.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plain-values.js","
|
|
1
|
+
{"version":3,"file":"plain-values.js","names":["Redacted","v","value","out","k"],"sources":["../src/plain-values.ts"],"mappings":"kCAQA,MAAa,cAAiB,GAC5BC,aAAa,MACbA,aAAa,MACbA,aAAa,aACbA,aAAa,YACbA,aAAa,KAEf,MAAM,cAAiB,GACrBA,IAAM,MACN,OAAOA,IAAM,UACb,CAAC,MAAM,QAAQA,CAAC,GAChB,CAAC,cAAcA,CAAC,IACf,OAAO,eAAeA,CAAC,IAAM,OAAO,WAAa,OAAO,eAAeA,CAAC,IAAM,MAQjF,MAAa,mBAAsB,GAA4B,CAC7D,GAAID,EAAS,WAAWE,CAAK,EAAG,OAAOF,EAAS,MAAME,CAAK,EAC3D,GAAI,MAAM,QAAQA,CAAK,EAAG,OAAOA,EAAM,IAAI,kBAAkB,EAC7D,GAAI,cAAcA,CAAK,EAAG,CACxB,MAAMC,EAA+B,CAAC,EACtC,IAAK,KAAM,CAACC,EAAGH,KAAM,OAAO,QAAQC,CAAK,EAAG,CAC1C,GAAID,IAAM,IAAA,GAAW,SACrB,EAAIG,GAAK,mBAAmBH,CAAC,CAC/B,CACA,OAAOE,CACT,CACA,OAAOD,CACT"}
|