@zapier/zapier-sdk 0.87.0 → 0.87.1
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 +6 -0
- package/dist/{chunk-275CXIIT.cjs → chunk-S6IN256D.cjs} +49 -25
- package/dist/{chunk-XUT7EPI7.mjs → chunk-WVAZCBUJ.mjs} +49 -25
- package/dist/experimental.cjs +341 -341
- package/dist/experimental.mjs +2 -2
- package/dist/index.cjs +269 -269
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -144,13 +144,34 @@ function buildRegistry({
|
|
|
144
144
|
}).filter((category) => category.functions.length > 0);
|
|
145
145
|
return { functions: filteredFunctions, categories: filteredCategories };
|
|
146
146
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
if (!
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
147
|
+
var isolated = /* @__PURE__ */ new WeakSet();
|
|
148
|
+
function isolate(observer) {
|
|
149
|
+
if (!observer) return void 0;
|
|
150
|
+
if (isolated.has(observer)) return observer;
|
|
151
|
+
const wrapped = (ctx) => {
|
|
152
|
+
try {
|
|
153
|
+
observer(ctx);
|
|
154
|
+
} catch (error) {
|
|
155
|
+
console.error(
|
|
156
|
+
"[core] A method-lifecycle observer threw and was ignored. Observers are fire-and-forget and must not throw.",
|
|
157
|
+
error
|
|
158
|
+
);
|
|
159
|
+
}
|
|
153
160
|
};
|
|
161
|
+
isolated.add(wrapped);
|
|
162
|
+
return wrapped;
|
|
163
|
+
}
|
|
164
|
+
function composeVoid(existing, added) {
|
|
165
|
+
const wrappedExisting = isolate(existing);
|
|
166
|
+
const wrappedAdded = isolate(added);
|
|
167
|
+
if (!wrappedExisting) return wrappedAdded;
|
|
168
|
+
if (!wrappedAdded) return wrappedExisting;
|
|
169
|
+
const composed = (ctx) => {
|
|
170
|
+
wrappedExisting(ctx);
|
|
171
|
+
wrappedAdded(ctx);
|
|
172
|
+
};
|
|
173
|
+
isolated.add(composed);
|
|
174
|
+
return composed;
|
|
154
175
|
}
|
|
155
176
|
function buildHooks(existing, added) {
|
|
156
177
|
const result = {};
|
|
@@ -824,24 +845,27 @@ function createPaginatedFunction(coreFn, options) {
|
|
|
824
845
|
return result.value;
|
|
825
846
|
});
|
|
826
847
|
if (hooks?.onMethodEnd) {
|
|
827
|
-
firstPagePromise.then(
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
848
|
+
firstPagePromise.then(
|
|
849
|
+
() => {
|
|
850
|
+
hooks.onMethodEnd({
|
|
851
|
+
methodName: functionName,
|
|
852
|
+
args,
|
|
853
|
+
isPaginated: true,
|
|
854
|
+
depth,
|
|
855
|
+
durationMs: Date.now() - startTime
|
|
856
|
+
});
|
|
857
|
+
},
|
|
858
|
+
(error) => {
|
|
859
|
+
hooks.onMethodEnd({
|
|
860
|
+
methodName: functionName,
|
|
861
|
+
args,
|
|
862
|
+
isPaginated: true,
|
|
863
|
+
depth,
|
|
864
|
+
durationMs: Date.now() - startTime,
|
|
865
|
+
error: error instanceof Error ? error : new Error(String(error))
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
);
|
|
845
869
|
}
|
|
846
870
|
const pageStream = async function* () {
|
|
847
871
|
yield await firstPagePromise;
|
|
@@ -5791,7 +5815,7 @@ function parseDeprecationDate(value) {
|
|
|
5791
5815
|
}
|
|
5792
5816
|
|
|
5793
5817
|
// src/sdk-version.ts
|
|
5794
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.87.
|
|
5818
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.87.1" : void 0) || "unknown";
|
|
5795
5819
|
|
|
5796
5820
|
// src/utils/open-url.ts
|
|
5797
5821
|
var nodePrefix = "node:";
|
|
@@ -142,13 +142,34 @@ function buildRegistry({
|
|
|
142
142
|
}).filter((category) => category.functions.length > 0);
|
|
143
143
|
return { functions: filteredFunctions, categories: filteredCategories };
|
|
144
144
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
if (!
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
145
|
+
var isolated = /* @__PURE__ */ new WeakSet();
|
|
146
|
+
function isolate(observer) {
|
|
147
|
+
if (!observer) return void 0;
|
|
148
|
+
if (isolated.has(observer)) return observer;
|
|
149
|
+
const wrapped = (ctx) => {
|
|
150
|
+
try {
|
|
151
|
+
observer(ctx);
|
|
152
|
+
} catch (error) {
|
|
153
|
+
console.error(
|
|
154
|
+
"[core] A method-lifecycle observer threw and was ignored. Observers are fire-and-forget and must not throw.",
|
|
155
|
+
error
|
|
156
|
+
);
|
|
157
|
+
}
|
|
151
158
|
};
|
|
159
|
+
isolated.add(wrapped);
|
|
160
|
+
return wrapped;
|
|
161
|
+
}
|
|
162
|
+
function composeVoid(existing, added) {
|
|
163
|
+
const wrappedExisting = isolate(existing);
|
|
164
|
+
const wrappedAdded = isolate(added);
|
|
165
|
+
if (!wrappedExisting) return wrappedAdded;
|
|
166
|
+
if (!wrappedAdded) return wrappedExisting;
|
|
167
|
+
const composed = (ctx) => {
|
|
168
|
+
wrappedExisting(ctx);
|
|
169
|
+
wrappedAdded(ctx);
|
|
170
|
+
};
|
|
171
|
+
isolated.add(composed);
|
|
172
|
+
return composed;
|
|
152
173
|
}
|
|
153
174
|
function buildHooks(existing, added) {
|
|
154
175
|
const result = {};
|
|
@@ -822,24 +843,27 @@ function createPaginatedFunction(coreFn, options) {
|
|
|
822
843
|
return result.value;
|
|
823
844
|
});
|
|
824
845
|
if (hooks?.onMethodEnd) {
|
|
825
|
-
firstPagePromise.then(
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
846
|
+
firstPagePromise.then(
|
|
847
|
+
() => {
|
|
848
|
+
hooks.onMethodEnd({
|
|
849
|
+
methodName: functionName,
|
|
850
|
+
args,
|
|
851
|
+
isPaginated: true,
|
|
852
|
+
depth,
|
|
853
|
+
durationMs: Date.now() - startTime
|
|
854
|
+
});
|
|
855
|
+
},
|
|
856
|
+
(error) => {
|
|
857
|
+
hooks.onMethodEnd({
|
|
858
|
+
methodName: functionName,
|
|
859
|
+
args,
|
|
860
|
+
isPaginated: true,
|
|
861
|
+
depth,
|
|
862
|
+
durationMs: Date.now() - startTime,
|
|
863
|
+
error: error instanceof Error ? error : new Error(String(error))
|
|
864
|
+
});
|
|
865
|
+
}
|
|
866
|
+
);
|
|
843
867
|
}
|
|
844
868
|
const pageStream = async function* () {
|
|
845
869
|
yield await firstPagePromise;
|
|
@@ -5789,7 +5813,7 @@ function parseDeprecationDate(value) {
|
|
|
5789
5813
|
}
|
|
5790
5814
|
|
|
5791
5815
|
// src/sdk-version.ts
|
|
5792
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.87.
|
|
5816
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.87.1" : void 0) || "unknown";
|
|
5793
5817
|
|
|
5794
5818
|
// src/utils/open-url.ts
|
|
5795
5819
|
var nodePrefix = "node:";
|