naystack 1.8.18 → 1.8.19
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/dist/auth/index.cjs.js +23 -14
- package/dist/auth/index.esm.js +23 -14
- package/dist/auth/instagram/index.cjs.js +23 -14
- package/dist/auth/instagram/index.esm.js +23 -14
- package/dist/auth/instagram/route.cjs.js +23 -14
- package/dist/auth/instagram/route.esm.js +23 -14
- package/dist/socials/index.cjs.js +23 -14
- package/dist/socials/index.esm.js +23 -14
- package/dist/socials/instagram/setters.cjs.js +23 -14
- package/dist/socials/instagram/setters.esm.js +23 -14
- package/dist/socials/meta/container.cjs.js +23 -14
- package/dist/socials/meta/container.d.mts +10 -1
- package/dist/socials/meta/container.d.ts +10 -1
- package/dist/socials/meta/container.esm.js +23 -14
- package/dist/socials/threads/setters.cjs.js +23 -14
- package/dist/socials/threads/setters.esm.js +23 -14
- package/package.json +1 -1
package/dist/auth/index.cjs.js
CHANGED
|
@@ -727,21 +727,30 @@ function createPublisher(platform) {
|
|
|
727
727
|
if (!containerID) return null;
|
|
728
728
|
return platform.publish(token, containerID);
|
|
729
729
|
},
|
|
730
|
-
/**
|
|
730
|
+
/**
|
|
731
|
+
* Creates and awaits every carousel child **in parallel**, resolving to
|
|
732
|
+
* their ids in input order — or `null` if any failed.
|
|
733
|
+
*
|
|
734
|
+
* Parallel because each child is an independent create-then-poll and Meta
|
|
735
|
+
* spends ~5s accepting a single container, so ten sequential children cost
|
|
736
|
+
* ~50s of mostly waiting — past what a serverless caller can fit in its
|
|
737
|
+
* timeout. `Promise.all` preserves input order, which the carousel's slide
|
|
738
|
+
* order depends on.
|
|
739
|
+
*/
|
|
731
740
|
createChildren: async (token, items, wait, retry) => {
|
|
732
|
-
const children =
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
return children;
|
|
741
|
+
const children = await Promise.all(
|
|
742
|
+
items.map(
|
|
743
|
+
(item) => createReady(
|
|
744
|
+
token,
|
|
745
|
+
{ ...item, is_carousel_item: true },
|
|
746
|
+
"carousel item",
|
|
747
|
+
wait,
|
|
748
|
+
retry
|
|
749
|
+
)
|
|
750
|
+
)
|
|
751
|
+
);
|
|
752
|
+
const created = children.filter((childID) => childID !== null);
|
|
753
|
+
return created.length === children.length ? created : null;
|
|
745
754
|
}
|
|
746
755
|
};
|
|
747
756
|
}
|
package/dist/auth/index.esm.js
CHANGED
|
@@ -685,21 +685,30 @@ function createPublisher(platform) {
|
|
|
685
685
|
if (!containerID) return null;
|
|
686
686
|
return platform.publish(token, containerID);
|
|
687
687
|
},
|
|
688
|
-
/**
|
|
688
|
+
/**
|
|
689
|
+
* Creates and awaits every carousel child **in parallel**, resolving to
|
|
690
|
+
* their ids in input order — or `null` if any failed.
|
|
691
|
+
*
|
|
692
|
+
* Parallel because each child is an independent create-then-poll and Meta
|
|
693
|
+
* spends ~5s accepting a single container, so ten sequential children cost
|
|
694
|
+
* ~50s of mostly waiting — past what a serverless caller can fit in its
|
|
695
|
+
* timeout. `Promise.all` preserves input order, which the carousel's slide
|
|
696
|
+
* order depends on.
|
|
697
|
+
*/
|
|
689
698
|
createChildren: async (token, items, wait, retry) => {
|
|
690
|
-
const children =
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
return children;
|
|
699
|
+
const children = await Promise.all(
|
|
700
|
+
items.map(
|
|
701
|
+
(item) => createReady(
|
|
702
|
+
token,
|
|
703
|
+
{ ...item, is_carousel_item: true },
|
|
704
|
+
"carousel item",
|
|
705
|
+
wait,
|
|
706
|
+
retry
|
|
707
|
+
)
|
|
708
|
+
)
|
|
709
|
+
);
|
|
710
|
+
const created = children.filter((childID) => childID !== null);
|
|
711
|
+
return created.length === children.length ? created : null;
|
|
703
712
|
}
|
|
704
713
|
};
|
|
705
714
|
}
|
|
@@ -250,21 +250,30 @@ function createPublisher(platform) {
|
|
|
250
250
|
if (!containerID) return null;
|
|
251
251
|
return platform.publish(token, containerID);
|
|
252
252
|
},
|
|
253
|
-
/**
|
|
253
|
+
/**
|
|
254
|
+
* Creates and awaits every carousel child **in parallel**, resolving to
|
|
255
|
+
* their ids in input order — or `null` if any failed.
|
|
256
|
+
*
|
|
257
|
+
* Parallel because each child is an independent create-then-poll and Meta
|
|
258
|
+
* spends ~5s accepting a single container, so ten sequential children cost
|
|
259
|
+
* ~50s of mostly waiting — past what a serverless caller can fit in its
|
|
260
|
+
* timeout. `Promise.all` preserves input order, which the carousel's slide
|
|
261
|
+
* order depends on.
|
|
262
|
+
*/
|
|
254
263
|
createChildren: async (token, items, wait, retry) => {
|
|
255
|
-
const children =
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
return children;
|
|
264
|
+
const children = await Promise.all(
|
|
265
|
+
items.map(
|
|
266
|
+
(item) => createReady(
|
|
267
|
+
token,
|
|
268
|
+
{ ...item, is_carousel_item: true },
|
|
269
|
+
"carousel item",
|
|
270
|
+
wait,
|
|
271
|
+
retry
|
|
272
|
+
)
|
|
273
|
+
)
|
|
274
|
+
);
|
|
275
|
+
const created = children.filter((childID) => childID !== null);
|
|
276
|
+
return created.length === children.length ? created : null;
|
|
268
277
|
}
|
|
269
278
|
};
|
|
270
279
|
}
|
|
@@ -222,21 +222,30 @@ function createPublisher(platform) {
|
|
|
222
222
|
if (!containerID) return null;
|
|
223
223
|
return platform.publish(token, containerID);
|
|
224
224
|
},
|
|
225
|
-
/**
|
|
225
|
+
/**
|
|
226
|
+
* Creates and awaits every carousel child **in parallel**, resolving to
|
|
227
|
+
* their ids in input order — or `null` if any failed.
|
|
228
|
+
*
|
|
229
|
+
* Parallel because each child is an independent create-then-poll and Meta
|
|
230
|
+
* spends ~5s accepting a single container, so ten sequential children cost
|
|
231
|
+
* ~50s of mostly waiting — past what a serverless caller can fit in its
|
|
232
|
+
* timeout. `Promise.all` preserves input order, which the carousel's slide
|
|
233
|
+
* order depends on.
|
|
234
|
+
*/
|
|
226
235
|
createChildren: async (token, items, wait, retry) => {
|
|
227
|
-
const children =
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
return children;
|
|
236
|
+
const children = await Promise.all(
|
|
237
|
+
items.map(
|
|
238
|
+
(item) => createReady(
|
|
239
|
+
token,
|
|
240
|
+
{ ...item, is_carousel_item: true },
|
|
241
|
+
"carousel item",
|
|
242
|
+
wait,
|
|
243
|
+
retry
|
|
244
|
+
)
|
|
245
|
+
)
|
|
246
|
+
);
|
|
247
|
+
const created = children.filter((childID) => childID !== null);
|
|
248
|
+
return created.length === children.length ? created : null;
|
|
240
249
|
}
|
|
241
250
|
};
|
|
242
251
|
}
|
|
@@ -239,21 +239,30 @@ function createPublisher(platform) {
|
|
|
239
239
|
if (!containerID) return null;
|
|
240
240
|
return platform.publish(token, containerID);
|
|
241
241
|
},
|
|
242
|
-
/**
|
|
242
|
+
/**
|
|
243
|
+
* Creates and awaits every carousel child **in parallel**, resolving to
|
|
244
|
+
* their ids in input order — or `null` if any failed.
|
|
245
|
+
*
|
|
246
|
+
* Parallel because each child is an independent create-then-poll and Meta
|
|
247
|
+
* spends ~5s accepting a single container, so ten sequential children cost
|
|
248
|
+
* ~50s of mostly waiting — past what a serverless caller can fit in its
|
|
249
|
+
* timeout. `Promise.all` preserves input order, which the carousel's slide
|
|
250
|
+
* order depends on.
|
|
251
|
+
*/
|
|
243
252
|
createChildren: async (token, items, wait, retry) => {
|
|
244
|
-
const children =
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
return children;
|
|
253
|
+
const children = await Promise.all(
|
|
254
|
+
items.map(
|
|
255
|
+
(item) => createReady(
|
|
256
|
+
token,
|
|
257
|
+
{ ...item, is_carousel_item: true },
|
|
258
|
+
"carousel item",
|
|
259
|
+
wait,
|
|
260
|
+
retry
|
|
261
|
+
)
|
|
262
|
+
)
|
|
263
|
+
);
|
|
264
|
+
const created = children.filter((childID) => childID !== null);
|
|
265
|
+
return created.length === children.length ? created : null;
|
|
257
266
|
}
|
|
258
267
|
};
|
|
259
268
|
}
|
|
@@ -215,21 +215,30 @@ function createPublisher(platform) {
|
|
|
215
215
|
if (!containerID) return null;
|
|
216
216
|
return platform.publish(token, containerID);
|
|
217
217
|
},
|
|
218
|
-
/**
|
|
218
|
+
/**
|
|
219
|
+
* Creates and awaits every carousel child **in parallel**, resolving to
|
|
220
|
+
* their ids in input order — or `null` if any failed.
|
|
221
|
+
*
|
|
222
|
+
* Parallel because each child is an independent create-then-poll and Meta
|
|
223
|
+
* spends ~5s accepting a single container, so ten sequential children cost
|
|
224
|
+
* ~50s of mostly waiting — past what a serverless caller can fit in its
|
|
225
|
+
* timeout. `Promise.all` preserves input order, which the carousel's slide
|
|
226
|
+
* order depends on.
|
|
227
|
+
*/
|
|
219
228
|
createChildren: async (token, items, wait, retry) => {
|
|
220
|
-
const children =
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
return children;
|
|
229
|
+
const children = await Promise.all(
|
|
230
|
+
items.map(
|
|
231
|
+
(item) => createReady(
|
|
232
|
+
token,
|
|
233
|
+
{ ...item, is_carousel_item: true },
|
|
234
|
+
"carousel item",
|
|
235
|
+
wait,
|
|
236
|
+
retry
|
|
237
|
+
)
|
|
238
|
+
)
|
|
239
|
+
);
|
|
240
|
+
const created = children.filter((childID) => childID !== null);
|
|
241
|
+
return created.length === children.length ? created : null;
|
|
233
242
|
}
|
|
234
243
|
};
|
|
235
244
|
}
|
|
@@ -235,21 +235,30 @@ function createPublisher(platform) {
|
|
|
235
235
|
if (!containerID) return null;
|
|
236
236
|
return platform.publish(token, containerID);
|
|
237
237
|
},
|
|
238
|
-
/**
|
|
238
|
+
/**
|
|
239
|
+
* Creates and awaits every carousel child **in parallel**, resolving to
|
|
240
|
+
* their ids in input order — or `null` if any failed.
|
|
241
|
+
*
|
|
242
|
+
* Parallel because each child is an independent create-then-poll and Meta
|
|
243
|
+
* spends ~5s accepting a single container, so ten sequential children cost
|
|
244
|
+
* ~50s of mostly waiting — past what a serverless caller can fit in its
|
|
245
|
+
* timeout. `Promise.all` preserves input order, which the carousel's slide
|
|
246
|
+
* order depends on.
|
|
247
|
+
*/
|
|
239
248
|
createChildren: async (token, items, wait, retry) => {
|
|
240
|
-
const children =
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
return children;
|
|
249
|
+
const children = await Promise.all(
|
|
250
|
+
items.map(
|
|
251
|
+
(item) => createReady(
|
|
252
|
+
token,
|
|
253
|
+
{ ...item, is_carousel_item: true },
|
|
254
|
+
"carousel item",
|
|
255
|
+
wait,
|
|
256
|
+
retry
|
|
257
|
+
)
|
|
258
|
+
)
|
|
259
|
+
);
|
|
260
|
+
const created = children.filter((childID) => childID !== null);
|
|
261
|
+
return created.length === children.length ? created : null;
|
|
253
262
|
}
|
|
254
263
|
};
|
|
255
264
|
}
|
|
@@ -188,21 +188,30 @@ function createPublisher(platform) {
|
|
|
188
188
|
if (!containerID) return null;
|
|
189
189
|
return platform.publish(token, containerID);
|
|
190
190
|
},
|
|
191
|
-
/**
|
|
191
|
+
/**
|
|
192
|
+
* Creates and awaits every carousel child **in parallel**, resolving to
|
|
193
|
+
* their ids in input order — or `null` if any failed.
|
|
194
|
+
*
|
|
195
|
+
* Parallel because each child is an independent create-then-poll and Meta
|
|
196
|
+
* spends ~5s accepting a single container, so ten sequential children cost
|
|
197
|
+
* ~50s of mostly waiting — past what a serverless caller can fit in its
|
|
198
|
+
* timeout. `Promise.all` preserves input order, which the carousel's slide
|
|
199
|
+
* order depends on.
|
|
200
|
+
*/
|
|
192
201
|
createChildren: async (token, items, wait, retry) => {
|
|
193
|
-
const children =
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
return children;
|
|
202
|
+
const children = await Promise.all(
|
|
203
|
+
items.map(
|
|
204
|
+
(item) => createReady(
|
|
205
|
+
token,
|
|
206
|
+
{ ...item, is_carousel_item: true },
|
|
207
|
+
"carousel item",
|
|
208
|
+
wait,
|
|
209
|
+
retry
|
|
210
|
+
)
|
|
211
|
+
)
|
|
212
|
+
);
|
|
213
|
+
const created = children.filter((childID) => childID !== null);
|
|
214
|
+
return created.length === children.length ? created : null;
|
|
206
215
|
}
|
|
207
216
|
};
|
|
208
217
|
}
|
|
@@ -129,21 +129,30 @@ function createPublisher(platform) {
|
|
|
129
129
|
if (!containerID) return null;
|
|
130
130
|
return platform.publish(token, containerID);
|
|
131
131
|
},
|
|
132
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* Creates and awaits every carousel child **in parallel**, resolving to
|
|
134
|
+
* their ids in input order — or `null` if any failed.
|
|
135
|
+
*
|
|
136
|
+
* Parallel because each child is an independent create-then-poll and Meta
|
|
137
|
+
* spends ~5s accepting a single container, so ten sequential children cost
|
|
138
|
+
* ~50s of mostly waiting — past what a serverless caller can fit in its
|
|
139
|
+
* timeout. `Promise.all` preserves input order, which the carousel's slide
|
|
140
|
+
* order depends on.
|
|
141
|
+
*/
|
|
133
142
|
createChildren: async (token, items, wait, retry) => {
|
|
134
|
-
const children =
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
return children;
|
|
143
|
+
const children = await Promise.all(
|
|
144
|
+
items.map(
|
|
145
|
+
(item) => createReady(
|
|
146
|
+
token,
|
|
147
|
+
{ ...item, is_carousel_item: true },
|
|
148
|
+
"carousel item",
|
|
149
|
+
wait,
|
|
150
|
+
retry
|
|
151
|
+
)
|
|
152
|
+
)
|
|
153
|
+
);
|
|
154
|
+
const created = children.filter((childID) => childID !== null);
|
|
155
|
+
return created.length === children.length ? created : null;
|
|
147
156
|
}
|
|
148
157
|
};
|
|
149
158
|
}
|
|
@@ -101,21 +101,30 @@ function createPublisher(platform) {
|
|
|
101
101
|
if (!containerID) return null;
|
|
102
102
|
return platform.publish(token, containerID);
|
|
103
103
|
},
|
|
104
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* Creates and awaits every carousel child **in parallel**, resolving to
|
|
106
|
+
* their ids in input order — or `null` if any failed.
|
|
107
|
+
*
|
|
108
|
+
* Parallel because each child is an independent create-then-poll and Meta
|
|
109
|
+
* spends ~5s accepting a single container, so ten sequential children cost
|
|
110
|
+
* ~50s of mostly waiting — past what a serverless caller can fit in its
|
|
111
|
+
* timeout. `Promise.all` preserves input order, which the carousel's slide
|
|
112
|
+
* order depends on.
|
|
113
|
+
*/
|
|
105
114
|
createChildren: async (token, items, wait, retry) => {
|
|
106
|
-
const children =
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
return children;
|
|
115
|
+
const children = await Promise.all(
|
|
116
|
+
items.map(
|
|
117
|
+
(item) => createReady(
|
|
118
|
+
token,
|
|
119
|
+
{ ...item, is_carousel_item: true },
|
|
120
|
+
"carousel item",
|
|
121
|
+
wait,
|
|
122
|
+
retry
|
|
123
|
+
)
|
|
124
|
+
)
|
|
125
|
+
);
|
|
126
|
+
const created = children.filter((childID) => childID !== null);
|
|
127
|
+
return created.length === children.length ? created : null;
|
|
119
128
|
}
|
|
120
129
|
};
|
|
121
130
|
}
|
|
@@ -80,21 +80,30 @@ function createPublisher(platform) {
|
|
|
80
80
|
if (!containerID) return null;
|
|
81
81
|
return platform.publish(token, containerID);
|
|
82
82
|
},
|
|
83
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* Creates and awaits every carousel child **in parallel**, resolving to
|
|
85
|
+
* their ids in input order — or `null` if any failed.
|
|
86
|
+
*
|
|
87
|
+
* Parallel because each child is an independent create-then-poll and Meta
|
|
88
|
+
* spends ~5s accepting a single container, so ten sequential children cost
|
|
89
|
+
* ~50s of mostly waiting — past what a serverless caller can fit in its
|
|
90
|
+
* timeout. `Promise.all` preserves input order, which the carousel's slide
|
|
91
|
+
* order depends on.
|
|
92
|
+
*/
|
|
84
93
|
createChildren: async (token, items, wait, retry) => {
|
|
85
|
-
const children =
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
return children;
|
|
94
|
+
const children = await Promise.all(
|
|
95
|
+
items.map(
|
|
96
|
+
(item) => createReady(
|
|
97
|
+
token,
|
|
98
|
+
{ ...item, is_carousel_item: true },
|
|
99
|
+
"carousel item",
|
|
100
|
+
wait,
|
|
101
|
+
retry
|
|
102
|
+
)
|
|
103
|
+
)
|
|
104
|
+
);
|
|
105
|
+
const created = children.filter((childID) => childID !== null);
|
|
106
|
+
return created.length === children.length ? created : null;
|
|
98
107
|
}
|
|
99
108
|
};
|
|
100
109
|
}
|
|
@@ -49,7 +49,16 @@ declare function createPublisher(platform: {
|
|
|
49
49
|
}): {
|
|
50
50
|
/** Creates a container, waits for it to finish processing, then publishes it. */
|
|
51
51
|
publish: (token: string, params: GraphParams, wait?: WaitForContainerOptions, retry?: RetryOptions) => Promise<string | null>;
|
|
52
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Creates and awaits every carousel child **in parallel**, resolving to
|
|
54
|
+
* their ids in input order — or `null` if any failed.
|
|
55
|
+
*
|
|
56
|
+
* Parallel because each child is an independent create-then-poll and Meta
|
|
57
|
+
* spends ~5s accepting a single container, so ten sequential children cost
|
|
58
|
+
* ~50s of mostly waiting — past what a serverless caller can fit in its
|
|
59
|
+
* timeout. `Promise.all` preserves input order, which the carousel's slide
|
|
60
|
+
* order depends on.
|
|
61
|
+
*/
|
|
53
62
|
createChildren: (token: string, items: GraphParams[], wait?: WaitForContainerOptions, retry?: RetryOptions) => Promise<string[] | null>;
|
|
54
63
|
};
|
|
55
64
|
|
|
@@ -49,7 +49,16 @@ declare function createPublisher(platform: {
|
|
|
49
49
|
}): {
|
|
50
50
|
/** Creates a container, waits for it to finish processing, then publishes it. */
|
|
51
51
|
publish: (token: string, params: GraphParams, wait?: WaitForContainerOptions, retry?: RetryOptions) => Promise<string | null>;
|
|
52
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Creates and awaits every carousel child **in parallel**, resolving to
|
|
54
|
+
* their ids in input order — or `null` if any failed.
|
|
55
|
+
*
|
|
56
|
+
* Parallel because each child is an independent create-then-poll and Meta
|
|
57
|
+
* spends ~5s accepting a single container, so ten sequential children cost
|
|
58
|
+
* ~50s of mostly waiting — past what a serverless caller can fit in its
|
|
59
|
+
* timeout. `Promise.all` preserves input order, which the carousel's slide
|
|
60
|
+
* order depends on.
|
|
61
|
+
*/
|
|
53
62
|
createChildren: (token: string, items: GraphParams[], wait?: WaitForContainerOptions, retry?: RetryOptions) => Promise<string[] | null>;
|
|
54
63
|
};
|
|
55
64
|
|
|
@@ -56,21 +56,30 @@ function createPublisher(platform) {
|
|
|
56
56
|
if (!containerID) return null;
|
|
57
57
|
return platform.publish(token, containerID);
|
|
58
58
|
},
|
|
59
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Creates and awaits every carousel child **in parallel**, resolving to
|
|
61
|
+
* their ids in input order — or `null` if any failed.
|
|
62
|
+
*
|
|
63
|
+
* Parallel because each child is an independent create-then-poll and Meta
|
|
64
|
+
* spends ~5s accepting a single container, so ten sequential children cost
|
|
65
|
+
* ~50s of mostly waiting — past what a serverless caller can fit in its
|
|
66
|
+
* timeout. `Promise.all` preserves input order, which the carousel's slide
|
|
67
|
+
* order depends on.
|
|
68
|
+
*/
|
|
60
69
|
createChildren: async (token, items, wait, retry) => {
|
|
61
|
-
const children =
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
return children;
|
|
70
|
+
const children = await Promise.all(
|
|
71
|
+
items.map(
|
|
72
|
+
(item) => createReady(
|
|
73
|
+
token,
|
|
74
|
+
{ ...item, is_carousel_item: true },
|
|
75
|
+
"carousel item",
|
|
76
|
+
wait,
|
|
77
|
+
retry
|
|
78
|
+
)
|
|
79
|
+
)
|
|
80
|
+
);
|
|
81
|
+
const created = children.filter((childID) => childID !== null);
|
|
82
|
+
return created.length === children.length ? created : null;
|
|
74
83
|
}
|
|
75
84
|
};
|
|
76
85
|
}
|
|
@@ -83,21 +83,30 @@ function createPublisher(platform) {
|
|
|
83
83
|
if (!containerID) return null;
|
|
84
84
|
return platform.publish(token, containerID);
|
|
85
85
|
},
|
|
86
|
-
/**
|
|
86
|
+
/**
|
|
87
|
+
* Creates and awaits every carousel child **in parallel**, resolving to
|
|
88
|
+
* their ids in input order — or `null` if any failed.
|
|
89
|
+
*
|
|
90
|
+
* Parallel because each child is an independent create-then-poll and Meta
|
|
91
|
+
* spends ~5s accepting a single container, so ten sequential children cost
|
|
92
|
+
* ~50s of mostly waiting — past what a serverless caller can fit in its
|
|
93
|
+
* timeout. `Promise.all` preserves input order, which the carousel's slide
|
|
94
|
+
* order depends on.
|
|
95
|
+
*/
|
|
87
96
|
createChildren: async (token, items, wait, retry) => {
|
|
88
|
-
const children =
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return children;
|
|
97
|
+
const children = await Promise.all(
|
|
98
|
+
items.map(
|
|
99
|
+
(item) => createReady(
|
|
100
|
+
token,
|
|
101
|
+
{ ...item, is_carousel_item: true },
|
|
102
|
+
"carousel item",
|
|
103
|
+
wait,
|
|
104
|
+
retry
|
|
105
|
+
)
|
|
106
|
+
)
|
|
107
|
+
);
|
|
108
|
+
const created = children.filter((childID) => childID !== null);
|
|
109
|
+
return created.length === children.length ? created : null;
|
|
101
110
|
}
|
|
102
111
|
};
|
|
103
112
|
}
|
|
@@ -56,21 +56,30 @@ function createPublisher(platform) {
|
|
|
56
56
|
if (!containerID) return null;
|
|
57
57
|
return platform.publish(token, containerID);
|
|
58
58
|
},
|
|
59
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Creates and awaits every carousel child **in parallel**, resolving to
|
|
61
|
+
* their ids in input order — or `null` if any failed.
|
|
62
|
+
*
|
|
63
|
+
* Parallel because each child is an independent create-then-poll and Meta
|
|
64
|
+
* spends ~5s accepting a single container, so ten sequential children cost
|
|
65
|
+
* ~50s of mostly waiting — past what a serverless caller can fit in its
|
|
66
|
+
* timeout. `Promise.all` preserves input order, which the carousel's slide
|
|
67
|
+
* order depends on.
|
|
68
|
+
*/
|
|
60
69
|
createChildren: async (token, items, wait, retry) => {
|
|
61
|
-
const children =
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
return children;
|
|
70
|
+
const children = await Promise.all(
|
|
71
|
+
items.map(
|
|
72
|
+
(item) => createReady(
|
|
73
|
+
token,
|
|
74
|
+
{ ...item, is_carousel_item: true },
|
|
75
|
+
"carousel item",
|
|
76
|
+
wait,
|
|
77
|
+
retry
|
|
78
|
+
)
|
|
79
|
+
)
|
|
80
|
+
);
|
|
81
|
+
const created = children.filter((childID) => childID !== null);
|
|
82
|
+
return created.length === children.length ? created : null;
|
|
74
83
|
}
|
|
75
84
|
};
|
|
76
85
|
}
|