@rebasepro/client 0.12.0 → 0.12.1-canary.g5f403cf
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/index.es.js +5 -4
- package/dist/index.es.js.map +1 -1
- package/package.json +8 -8
- package/src/functions.ts +9 -1
package/dist/index.es.js
CHANGED
|
@@ -1418,7 +1418,8 @@ function createCollectionClient(transport, slug, ws) {
|
|
|
1418
1418
|
function createFunctionsClient(transport) {
|
|
1419
1419
|
return { async invoke(name, payload, options) {
|
|
1420
1420
|
const method = options?.method ?? "POST";
|
|
1421
|
-
const
|
|
1421
|
+
const rawPath = options?.path;
|
|
1422
|
+
const subPath = rawPath ? /^[?#]/.test(rawPath) ? rawPath : `/${rawPath.replace(/^\//, "")}` : "";
|
|
1422
1423
|
const routePath = `/functions/${encodeURIComponent(name)}${subPath}`;
|
|
1423
1424
|
const init = { method };
|
|
1424
1425
|
if (payload !== void 0 && method !== "GET") init.body = JSON.stringify(payload);
|
|
@@ -1632,7 +1633,7 @@ function extractMessageError(message) {
|
|
|
1632
1633
|
* Fire-and-forget (the server sends no response envelope), and exempt from the
|
|
1633
1634
|
* client-side auth gate — a public channel is usable without an account.
|
|
1634
1635
|
*/
|
|
1635
|
-
var CHANNEL_MESSAGE_TYPES = new Set([
|
|
1636
|
+
var CHANNEL_MESSAGE_TYPES = /* @__PURE__ */ new Set([
|
|
1636
1637
|
"join_channel",
|
|
1637
1638
|
"leave_channel",
|
|
1638
1639
|
"broadcast",
|
|
@@ -2425,7 +2426,7 @@ var RebaseWebSocketClient = class {
|
|
|
2425
2426
|
if (this.deepEqual(normCached, normIncoming)) return cachedRow;
|
|
2426
2427
|
else {
|
|
2427
2428
|
const mismatches = {};
|
|
2428
|
-
const allKeys = new Set([...Object.keys(normCached), ...Object.keys(normIncoming)]);
|
|
2429
|
+
const allKeys = /* @__PURE__ */ new Set([...Object.keys(normCached), ...Object.keys(normIncoming)]);
|
|
2429
2430
|
for (const key of allKeys) if (!this.deepEqual(normCached[key], normIncoming[key])) mismatches[key] = {
|
|
2430
2431
|
cached: normCached[key],
|
|
2431
2432
|
incoming: normIncoming[key]
|
|
@@ -3228,7 +3229,7 @@ function isNetworkError(error) {
|
|
|
3228
3229
|
* bug the same payload will hit again than a blip, and retrying it forever
|
|
3229
3230
|
* jams every write behind it.
|
|
3230
3231
|
*/
|
|
3231
|
-
var RETRYABLE_STATUSES = new Set([
|
|
3232
|
+
var RETRYABLE_STATUSES = /* @__PURE__ */ new Set([
|
|
3232
3233
|
408,
|
|
3233
3234
|
425,
|
|
3234
3235
|
429,
|