@builder.io/sdk 1.1.31-0 → 1.1.31
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.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs.js +12 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +12 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +22 -13
- package/dist/index.umd.js.map +1 -1
- package/dist/src/builder.class.d.ts +5 -0
- package/dist/src/builder.class.js +6 -0
- package/dist/src/builder.class.js.map +1 -1
- package/dist/src/functions/server-only-require.function.d.ts +2 -1
- package/dist/src/functions/server-only-require.function.js +7 -5
- package/dist/src/functions/server-only-require.function.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/interfaces/Input.md +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -385,12 +385,15 @@ var Promise$1 = (typeof Promise !== 'undefined' ? Promise : TinyPromise);
|
|
|
385
385
|
|
|
386
386
|
// Webpack workaround to conditionally require certain external modules
|
|
387
387
|
// only on the server and not bundle them on the client
|
|
388
|
-
var serverOnlyRequire
|
|
389
|
-
|
|
390
|
-
(typeof window === 'undefined' && typeof require === 'function')) {
|
|
388
|
+
var serverOnlyRequire;
|
|
389
|
+
try {
|
|
391
390
|
// tslint:disable-next-line:no-eval
|
|
392
391
|
serverOnlyRequire = eval('require');
|
|
393
392
|
}
|
|
393
|
+
catch (err) {
|
|
394
|
+
// all good
|
|
395
|
+
serverOnlyRequire = (function () { return null; });
|
|
396
|
+
}
|
|
394
397
|
var serverOnlyRequire$1 = serverOnlyRequire;
|
|
395
398
|
|
|
396
399
|
function promiseResolve(value) {
|
|
@@ -2181,6 +2184,12 @@ var Builder = /** @class */ (function () {
|
|
|
2181
2184
|
}
|
|
2182
2185
|
return observable;
|
|
2183
2186
|
};
|
|
2187
|
+
// this is needed to satisfy the Angular SDK, which used to rely on the more complex version of `requestUrl`.
|
|
2188
|
+
// even though we only use `fetch()` now, we prefer to keep the old behavior and use the `fetch` that comes from
|
|
2189
|
+
// the core SDK for consistency
|
|
2190
|
+
Builder.prototype.requestUrl = function (url, options) {
|
|
2191
|
+
return fetch(url, options).then(function (res) { return res.json(); });
|
|
2192
|
+
};
|
|
2184
2193
|
Object.defineProperty(Builder.prototype, "host", {
|
|
2185
2194
|
get: function () {
|
|
2186
2195
|
switch (this.env) {
|