@builder.io/sdk 2.1.1 → 2.2.0
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 +31 -17
- package/coverage/clover.xml +3918 -0
- package/coverage/coverage-final.json +19 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +176 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/src/builder.class.ts.html +8323 -0
- package/coverage/lcov-report/src/classes/animator.class.ts.html +847 -0
- package/coverage/lcov-report/src/classes/cookies.class.ts.html +559 -0
- package/coverage/lcov-report/src/classes/index.html +176 -0
- package/coverage/lcov-report/src/classes/observable.class.ts.html +400 -0
- package/coverage/lcov-report/src/classes/promise.class.ts.html +607 -0
- package/coverage/lcov-report/src/classes/query-string.class.ts.html +328 -0
- package/coverage/lcov-report/src/functions/assign.function.ts.html +139 -0
- package/coverage/lcov-report/src/functions/fetch.function.ts.html +427 -0
- package/coverage/lcov-report/src/functions/get-top-level-domain.ts.html +121 -0
- package/coverage/lcov-report/src/functions/index.html +236 -0
- package/coverage/lcov-report/src/functions/next-tick.function.ts.html +166 -0
- package/coverage/lcov-report/src/functions/omit.function.ts.html +106 -0
- package/coverage/lcov-report/src/functions/server-only-require.function.ts.html +121 -0
- package/coverage/lcov-report/src/functions/throttle.function.ts.html +181 -0
- package/coverage/lcov-report/src/functions/to-error.ts.html +133 -0
- package/coverage/lcov-report/src/functions/uuid.ts.html +136 -0
- package/coverage/lcov-report/src/index.html +131 -0
- package/coverage/lcov-report/src/polyfills/custom-event-polyfill.js.html +121 -0
- package/coverage/lcov-report/src/polyfills/index.html +116 -0
- package/coverage/lcov-report/src/types/api-version.ts.html +91 -0
- package/coverage/lcov-report/src/types/index.html +116 -0
- package/coverage/lcov-report/src/url.ts.html +253 -0
- package/coverage/lcov.info +4426 -0
- package/dist/index.browser.js +20 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs.js +20 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +20 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +20 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/package.json +2 -1
- package/dist/src/builder.class.d.ts +39 -8
- package/dist/src/builder.class.js +19 -3
- package/dist/src/builder.class.js.map +1 -1
- package/dist/src/builder.class.test.d.ts +1 -0
- package/dist/src/builder.class.test.js +23 -0
- package/dist/src/builder.class.test.js.map +1 -0
- package/dist/src/classes/cookies.class.d.ts +1 -1
- package/dist/src/functions/server-only-require.function.d.ts +1 -1
- package/dist/src/url.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -1
package/dist/index.esm.js
CHANGED
|
@@ -118,7 +118,7 @@ function assertAllowedPropertyName(name) {
|
|
|
118
118
|
throw new Error("Property name \"".concat(name, "\" is not allowed"));
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
var version = "2.1.
|
|
121
|
+
var version = "2.1.2";
|
|
122
122
|
|
|
123
123
|
var Subscription = /** @class */ (function () {
|
|
124
124
|
function Subscription(listeners, listener) {
|
|
@@ -1047,7 +1047,7 @@ function setCookie(name, value, expires) {
|
|
|
1047
1047
|
expiresString +
|
|
1048
1048
|
'; path=/' +
|
|
1049
1049
|
"; domain=".concat(getTopLevelDomain(location.hostname)) +
|
|
1050
|
-
(secure ? ';secure
|
|
1050
|
+
(secure ? '; secure; SameSite=None' : '');
|
|
1051
1051
|
}
|
|
1052
1052
|
catch (err) {
|
|
1053
1053
|
console.warn('Could not set cookie', err);
|
|
@@ -1277,7 +1277,11 @@ var Builder = /** @class */ (function () {
|
|
|
1277
1277
|
this.serverContext = context;
|
|
1278
1278
|
};
|
|
1279
1279
|
Builder.isTrustedHost = function (hostname) {
|
|
1280
|
-
return (this.trustedHosts.findIndex(function (trustedHost) {
|
|
1280
|
+
return (this.trustedHosts.findIndex(function (trustedHost) {
|
|
1281
|
+
return trustedHost.startsWith('*.')
|
|
1282
|
+
? hostname.endsWith(trustedHost.slice(1))
|
|
1283
|
+
: trustedHost === hostname;
|
|
1284
|
+
}) > -1);
|
|
1281
1285
|
};
|
|
1282
1286
|
Builder.runAction = function (action) {
|
|
1283
1287
|
// TODO
|
|
@@ -2299,6 +2303,12 @@ var Builder = /** @class */ (function () {
|
|
|
2299
2303
|
if ('noTraverse' in queue[0]) {
|
|
2300
2304
|
queryParams.noTraverse = queue[0].noTraverse;
|
|
2301
2305
|
}
|
|
2306
|
+
if ('includeUnpublished' in queue[0]) {
|
|
2307
|
+
queryParams.includeUnpublished = queue[0].includeUnpublished;
|
|
2308
|
+
}
|
|
2309
|
+
if (queue[0].sort) {
|
|
2310
|
+
queryParams.sort = queue[0].sort;
|
|
2311
|
+
}
|
|
2302
2312
|
var pageQueryParams = typeof location !== 'undefined'
|
|
2303
2313
|
? QueryString.parseDeep(location.search.substr(1))
|
|
2304
2314
|
: {}; // TODO: WHAT about SSR (this.request) ?
|
|
@@ -2587,7 +2597,13 @@ var Builder = /** @class */ (function () {
|
|
|
2587
2597
|
Builder.nextTick = nextTick;
|
|
2588
2598
|
Builder.throttle = throttle;
|
|
2589
2599
|
Builder.editors = [];
|
|
2590
|
-
Builder.trustedHosts = [
|
|
2600
|
+
Builder.trustedHosts = [
|
|
2601
|
+
'*.beta.builder.io',
|
|
2602
|
+
'beta.builder.io',
|
|
2603
|
+
'builder.io',
|
|
2604
|
+
'localhost',
|
|
2605
|
+
'qa.builder.io',
|
|
2606
|
+
];
|
|
2591
2607
|
Builder.plugins = [];
|
|
2592
2608
|
Builder.actions = [];
|
|
2593
2609
|
Builder.registry = {};
|