@builder.io/sdk-qwik 0.16.22 → 0.16.23

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.
Files changed (33) hide show
  1. package/lib/browser/blocks/form/form/form.qwik.cjs +4 -1
  2. package/lib/browser/blocks/form/form/form.qwik.mjs +4 -1
  3. package/lib/browser/components/content/components/enable-editor.qwik.cjs +2 -0
  4. package/lib/browser/components/content/components/enable-editor.qwik.mjs +2 -0
  5. package/lib/browser/constants/sdk-version.qwik.cjs +1 -1
  6. package/lib/browser/constants/sdk-version.qwik.mjs +1 -1
  7. package/lib/browser/functions/log-fetch.qwik.cjs +11 -0
  8. package/lib/browser/functions/log-fetch.qwik.mjs +11 -0
  9. package/lib/browser/functions/track/index.qwik.cjs +4 -1
  10. package/lib/browser/functions/track/index.qwik.mjs +4 -1
  11. package/lib/edge/blocks/form/form/form.qwik.cjs +4 -1
  12. package/lib/edge/blocks/form/form/form.qwik.mjs +4 -1
  13. package/lib/edge/components/content/components/enable-editor.qwik.cjs +2 -0
  14. package/lib/edge/components/content/components/enable-editor.qwik.mjs +2 -0
  15. package/lib/edge/constants/sdk-version.qwik.cjs +1 -1
  16. package/lib/edge/constants/sdk-version.qwik.mjs +1 -1
  17. package/lib/edge/functions/log-fetch.qwik.cjs +11 -0
  18. package/lib/edge/functions/log-fetch.qwik.mjs +11 -0
  19. package/lib/edge/functions/track/index.qwik.cjs +4 -1
  20. package/lib/edge/functions/track/index.qwik.mjs +4 -1
  21. package/lib/node/blocks/form/form/form.qwik.cjs +4 -1
  22. package/lib/node/blocks/form/form/form.qwik.mjs +4 -1
  23. package/lib/node/components/content/components/enable-editor.qwik.cjs +2 -0
  24. package/lib/node/components/content/components/enable-editor.qwik.mjs +2 -0
  25. package/lib/node/constants/sdk-version.qwik.cjs +1 -1
  26. package/lib/node/constants/sdk-version.qwik.mjs +1 -1
  27. package/lib/node/functions/log-fetch.qwik.cjs +11 -0
  28. package/lib/node/functions/log-fetch.qwik.mjs +11 -0
  29. package/lib/node/functions/track/index.qwik.cjs +4 -1
  30. package/lib/node/functions/track/index.qwik.mjs +4 -1
  31. package/package.json +1 -1
  32. package/types/src/constants/sdk-version.d.ts +1 -1
  33. package/types/src/functions/log-fetch.d.ts +1 -0
@@ -6,6 +6,7 @@ const blocks = require("../../../components/blocks/blocks.qwik.cjs");
6
6
  const getEnv = require("../../../functions/get-env.qwik.cjs");
7
7
  const get = require("../../../functions/get.qwik.cjs");
8
8
  const isEditing = require("../../../functions/is-editing.qwik.cjs");
9
+ const logFetch = require("../../../functions/log-fetch.qwik.cjs");
9
10
  const set = require("../../../functions/set.qwik.cjs");
10
11
  const mergeNewRootState = function mergeNewRootState2(props, state, formRef, newData) {
11
12
  var _a, _b;
@@ -100,7 +101,9 @@ const onSubmit = function onSubmit2(props, state, formRef, event) {
100
101
  }
101
102
  state.formState = "sending";
102
103
  const formUrl = `${getEnv.getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${props.builderContext.apiKey}&to=${btoa(props.sendSubmissionsToEmail || "")}&name=${encodeURIComponent(props.name || "")}`;
103
- fetch(props.sendSubmissionsTo === "email" ? formUrl : props.action, {
104
+ const url = props.sendSubmissionsTo === "email" ? formUrl : props.action;
105
+ logFetch.logFetch(url);
106
+ fetch(url, {
104
107
  body,
105
108
  headers,
106
109
  method: props.method || "post"
@@ -4,6 +4,7 @@ import { Blocks } from "../../../components/blocks/blocks.qwik.mjs";
4
4
  import { getEnv } from "../../../functions/get-env.qwik.mjs";
5
5
  import { get } from "../../../functions/get.qwik.mjs";
6
6
  import { isEditing } from "../../../functions/is-editing.qwik.mjs";
7
+ import { logFetch } from "../../../functions/log-fetch.qwik.mjs";
7
8
  import { set } from "../../../functions/set.qwik.mjs";
8
9
  const mergeNewRootState = function mergeNewRootState2(props, state, formRef, newData) {
9
10
  var _a, _b;
@@ -98,7 +99,9 @@ const onSubmit = function onSubmit2(props, state, formRef, event) {
98
99
  }
99
100
  state.formState = "sending";
100
101
  const formUrl = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${props.builderContext.apiKey}&to=${btoa(props.sendSubmissionsToEmail || "")}&name=${encodeURIComponent(props.name || "")}`;
101
- fetch(props.sendSubmissionsTo === "email" ? formUrl : props.action, {
102
+ const url = props.sendSubmissionsTo === "email" ? formUrl : props.action;
103
+ logFetch(url);
104
+ fetch(url, {
102
105
  body,
103
106
  headers,
104
107
  method: props.method || "post"
@@ -9,6 +9,7 @@ const index = require("../../../functions/get-content/index.qwik.cjs");
9
9
  const isBrowser = require("../../../functions/is-browser.qwik.cjs");
10
10
  const isEditing = require("../../../functions/is-editing.qwik.cjs");
11
11
  const isPreviewing = require("../../../functions/is-previewing.qwik.cjs");
12
+ const logFetch = require("../../../functions/log-fetch.qwik.cjs");
12
13
  const registerComponent = require("../../../functions/register-component.qwik.cjs");
13
14
  const index$1 = require("../../../functions/track/index.qwik.cjs");
14
15
  const interaction = require("../../../functions/track/interaction.qwik.cjs");
@@ -108,6 +109,7 @@ const runHttpRequests = function runHttpRequests2(props, state, showContentProps
108
109
  rootState: props.builderContextSignal.rootState,
109
110
  rootSetState: props.builderContextSignal.rootSetState
110
111
  })));
112
+ logFetch.logFetch(evaluatedUrl);
111
113
  fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
112
114
  mergeNewRootState(props, state, showContentProps, elementRef, {
113
115
  [key]: json
@@ -7,6 +7,7 @@ import { fetchOneEntry } from "../../../functions/get-content/index.qwik.mjs";
7
7
  import { isBrowser } from "../../../functions/is-browser.qwik.mjs";
8
8
  import { isEditing } from "../../../functions/is-editing.qwik.mjs";
9
9
  import { isPreviewing } from "../../../functions/is-previewing.qwik.mjs";
10
+ import { logFetch } from "../../../functions/log-fetch.qwik.mjs";
10
11
  import { createRegisterComponentMessage } from "../../../functions/register-component.qwik.mjs";
11
12
  import { _track } from "../../../functions/track/index.qwik.mjs";
12
13
  import { getInteractionPropertiesForEvent } from "../../../functions/track/interaction.qwik.mjs";
@@ -106,6 +107,7 @@ const runHttpRequests = function runHttpRequests2(props, state, showContentProps
106
107
  rootState: props.builderContextSignal.rootState,
107
108
  rootSetState: props.builderContextSignal.rootSetState
108
109
  })));
110
+ logFetch(evaluatedUrl);
109
111
  fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
110
112
  mergeNewRootState(props, state, showContentProps, elementRef, {
111
113
  [key]: json
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const SDK_VERSION = "0.16.22";
3
+ const SDK_VERSION = "0.16.23";
4
4
  exports.SDK_VERSION = SDK_VERSION;
@@ -1,4 +1,4 @@
1
- const SDK_VERSION = "0.16.22";
1
+ const SDK_VERSION = "0.16.23";
2
2
  export {
3
3
  SDK_VERSION
4
4
  };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const logger = require("../helpers/logger.qwik.cjs");
4
+ function logFetch(url) {
5
+ var _a;
6
+ if (typeof process !== "undefined" && ((_a = process.env) == null ? void 0 : _a.DEBUG)) {
7
+ if (String(process.env.DEBUG) == "true")
8
+ logger.logger.log(url);
9
+ }
10
+ }
11
+ exports.logFetch = logFetch;
@@ -0,0 +1,11 @@
1
+ import { logger } from "../helpers/logger.qwik.mjs";
2
+ function logFetch(url) {
3
+ var _a;
4
+ if (typeof process !== "undefined" && ((_a = process.env) == null ? void 0 : _a.DEBUG)) {
5
+ if (String(process.env.DEBUG) == "true")
6
+ logger.log(url);
7
+ }
8
+ }
9
+ export {
10
+ logFetch
11
+ };
@@ -7,6 +7,7 @@ const sessionId = require("../../helpers/sessionId.qwik.cjs");
7
7
  const visitorId = require("../../helpers/visitorId.qwik.cjs");
8
8
  const isBrowser = require("../is-browser.qwik.cjs");
9
9
  const isEditing = require("../is-editing.qwik.cjs");
10
+ const logFetch = require("../log-fetch.qwik.cjs");
10
11
  const helpers = require("./helpers.qwik.cjs");
11
12
  const getTrackingEventData = async ({ canTrack }) => {
12
13
  if (!canTrack)
@@ -52,7 +53,9 @@ async function _track({ apiHost, ...eventProps }) {
52
53
  if (!(isBrowser.isBrowser() || target.TARGET === "reactNative"))
53
54
  return;
54
55
  const baseUrl = apiHost || "https://cdn.builder.io";
55
- return fetch(`${baseUrl}/api/v1/track`, {
56
+ const url = `${baseUrl}/api/v1/track`;
57
+ logFetch.logFetch(url);
58
+ return fetch(url, {
56
59
  method: "POST",
57
60
  body: JSON.stringify({
58
61
  events: [
@@ -5,6 +5,7 @@ import { getSessionId } from "../../helpers/sessionId.qwik.mjs";
5
5
  import { getVisitorId } from "../../helpers/visitorId.qwik.mjs";
6
6
  import { isBrowser } from "../is-browser.qwik.mjs";
7
7
  import { isEditing } from "../is-editing.qwik.mjs";
8
+ import { logFetch } from "../log-fetch.qwik.mjs";
8
9
  import { getUserAttributes } from "./helpers.qwik.mjs";
9
10
  const getTrackingEventData = async ({ canTrack }) => {
10
11
  if (!canTrack)
@@ -50,7 +51,9 @@ async function _track({ apiHost, ...eventProps }) {
50
51
  if (!(isBrowser() || TARGET === "reactNative"))
51
52
  return;
52
53
  const baseUrl = apiHost || "https://cdn.builder.io";
53
- return fetch(`${baseUrl}/api/v1/track`, {
54
+ const url = `${baseUrl}/api/v1/track`;
55
+ logFetch(url);
56
+ return fetch(url, {
54
57
  method: "POST",
55
58
  body: JSON.stringify({
56
59
  events: [
@@ -6,6 +6,7 @@ const blocks = require("../../../components/blocks/blocks.qwik.cjs");
6
6
  const getEnv = require("../../../functions/get-env.qwik.cjs");
7
7
  const get = require("../../../functions/get.qwik.cjs");
8
8
  const isEditing = require("../../../functions/is-editing.qwik.cjs");
9
+ const logFetch = require("../../../functions/log-fetch.qwik.cjs");
9
10
  const set = require("../../../functions/set.qwik.cjs");
10
11
  const mergeNewRootState = function mergeNewRootState2(props, state, formRef, newData) {
11
12
  var _a, _b;
@@ -100,7 +101,9 @@ const onSubmit = function onSubmit2(props, state, formRef, event) {
100
101
  }
101
102
  state.formState = "sending";
102
103
  const formUrl = `${getEnv.getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${props.builderContext.apiKey}&to=${btoa(props.sendSubmissionsToEmail || "")}&name=${encodeURIComponent(props.name || "")}`;
103
- fetch(props.sendSubmissionsTo === "email" ? formUrl : props.action, {
104
+ const url = props.sendSubmissionsTo === "email" ? formUrl : props.action;
105
+ logFetch.logFetch(url);
106
+ fetch(url, {
104
107
  body,
105
108
  headers,
106
109
  method: props.method || "post"
@@ -4,6 +4,7 @@ import { Blocks } from "../../../components/blocks/blocks.qwik.mjs";
4
4
  import { getEnv } from "../../../functions/get-env.qwik.mjs";
5
5
  import { get } from "../../../functions/get.qwik.mjs";
6
6
  import { isEditing } from "../../../functions/is-editing.qwik.mjs";
7
+ import { logFetch } from "../../../functions/log-fetch.qwik.mjs";
7
8
  import { set } from "../../../functions/set.qwik.mjs";
8
9
  const mergeNewRootState = function mergeNewRootState2(props, state, formRef, newData) {
9
10
  var _a, _b;
@@ -98,7 +99,9 @@ const onSubmit = function onSubmit2(props, state, formRef, event) {
98
99
  }
99
100
  state.formState = "sending";
100
101
  const formUrl = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${props.builderContext.apiKey}&to=${btoa(props.sendSubmissionsToEmail || "")}&name=${encodeURIComponent(props.name || "")}`;
101
- fetch(props.sendSubmissionsTo === "email" ? formUrl : props.action, {
102
+ const url = props.sendSubmissionsTo === "email" ? formUrl : props.action;
103
+ logFetch(url);
104
+ fetch(url, {
102
105
  body,
103
106
  headers,
104
107
  method: props.method || "post"
@@ -9,6 +9,7 @@ const index = require("../../../functions/get-content/index.qwik.cjs");
9
9
  const isBrowser = require("../../../functions/is-browser.qwik.cjs");
10
10
  const isEditing = require("../../../functions/is-editing.qwik.cjs");
11
11
  const isPreviewing = require("../../../functions/is-previewing.qwik.cjs");
12
+ const logFetch = require("../../../functions/log-fetch.qwik.cjs");
12
13
  const registerComponent = require("../../../functions/register-component.qwik.cjs");
13
14
  const index$1 = require("../../../functions/track/index.qwik.cjs");
14
15
  const interaction = require("../../../functions/track/interaction.qwik.cjs");
@@ -108,6 +109,7 @@ const runHttpRequests = function runHttpRequests2(props, state, showContentProps
108
109
  rootState: props.builderContextSignal.rootState,
109
110
  rootSetState: props.builderContextSignal.rootSetState
110
111
  })));
112
+ logFetch.logFetch(evaluatedUrl);
111
113
  fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
112
114
  mergeNewRootState(props, state, showContentProps, elementRef, {
113
115
  [key]: json
@@ -7,6 +7,7 @@ import { fetchOneEntry } from "../../../functions/get-content/index.qwik.mjs";
7
7
  import { isBrowser } from "../../../functions/is-browser.qwik.mjs";
8
8
  import { isEditing } from "../../../functions/is-editing.qwik.mjs";
9
9
  import { isPreviewing } from "../../../functions/is-previewing.qwik.mjs";
10
+ import { logFetch } from "../../../functions/log-fetch.qwik.mjs";
10
11
  import { createRegisterComponentMessage } from "../../../functions/register-component.qwik.mjs";
11
12
  import { _track } from "../../../functions/track/index.qwik.mjs";
12
13
  import { getInteractionPropertiesForEvent } from "../../../functions/track/interaction.qwik.mjs";
@@ -106,6 +107,7 @@ const runHttpRequests = function runHttpRequests2(props, state, showContentProps
106
107
  rootState: props.builderContextSignal.rootState,
107
108
  rootSetState: props.builderContextSignal.rootSetState
108
109
  })));
110
+ logFetch(evaluatedUrl);
109
111
  fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
110
112
  mergeNewRootState(props, state, showContentProps, elementRef, {
111
113
  [key]: json
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const SDK_VERSION = "0.16.22";
3
+ const SDK_VERSION = "0.16.23";
4
4
  exports.SDK_VERSION = SDK_VERSION;
@@ -1,4 +1,4 @@
1
- const SDK_VERSION = "0.16.22";
1
+ const SDK_VERSION = "0.16.23";
2
2
  export {
3
3
  SDK_VERSION
4
4
  };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const logger = require("../helpers/logger.qwik.cjs");
4
+ function logFetch(url) {
5
+ var _a;
6
+ if (typeof process !== "undefined" && ((_a = process.env) == null ? void 0 : _a.DEBUG)) {
7
+ if (String(process.env.DEBUG) == "true")
8
+ logger.logger.log(url);
9
+ }
10
+ }
11
+ exports.logFetch = logFetch;
@@ -0,0 +1,11 @@
1
+ import { logger } from "../helpers/logger.qwik.mjs";
2
+ function logFetch(url) {
3
+ var _a;
4
+ if (typeof process !== "undefined" && ((_a = process.env) == null ? void 0 : _a.DEBUG)) {
5
+ if (String(process.env.DEBUG) == "true")
6
+ logger.log(url);
7
+ }
8
+ }
9
+ export {
10
+ logFetch
11
+ };
@@ -7,6 +7,7 @@ const sessionId = require("../../helpers/sessionId.qwik.cjs");
7
7
  const visitorId = require("../../helpers/visitorId.qwik.cjs");
8
8
  const isBrowser = require("../is-browser.qwik.cjs");
9
9
  const isEditing = require("../is-editing.qwik.cjs");
10
+ const logFetch = require("../log-fetch.qwik.cjs");
10
11
  const helpers = require("./helpers.qwik.cjs");
11
12
  const getTrackingEventData = async ({ canTrack }) => {
12
13
  if (!canTrack)
@@ -52,7 +53,9 @@ async function _track({ apiHost, ...eventProps }) {
52
53
  if (!(isBrowser.isBrowser() || target.TARGET === "reactNative"))
53
54
  return;
54
55
  const baseUrl = apiHost || "https://cdn.builder.io";
55
- return fetch(`${baseUrl}/api/v1/track`, {
56
+ const url = `${baseUrl}/api/v1/track`;
57
+ logFetch.logFetch(url);
58
+ return fetch(url, {
56
59
  method: "POST",
57
60
  body: JSON.stringify({
58
61
  events: [
@@ -5,6 +5,7 @@ import { getSessionId } from "../../helpers/sessionId.qwik.mjs";
5
5
  import { getVisitorId } from "../../helpers/visitorId.qwik.mjs";
6
6
  import { isBrowser } from "../is-browser.qwik.mjs";
7
7
  import { isEditing } from "../is-editing.qwik.mjs";
8
+ import { logFetch } from "../log-fetch.qwik.mjs";
8
9
  import { getUserAttributes } from "./helpers.qwik.mjs";
9
10
  const getTrackingEventData = async ({ canTrack }) => {
10
11
  if (!canTrack)
@@ -50,7 +51,9 @@ async function _track({ apiHost, ...eventProps }) {
50
51
  if (!(isBrowser() || TARGET === "reactNative"))
51
52
  return;
52
53
  const baseUrl = apiHost || "https://cdn.builder.io";
53
- return fetch(`${baseUrl}/api/v1/track`, {
54
+ const url = `${baseUrl}/api/v1/track`;
55
+ logFetch(url);
56
+ return fetch(url, {
54
57
  method: "POST",
55
58
  body: JSON.stringify({
56
59
  events: [
@@ -6,6 +6,7 @@ const blocks = require("../../../components/blocks/blocks.qwik.cjs");
6
6
  const getEnv = require("../../../functions/get-env.qwik.cjs");
7
7
  const get = require("../../../functions/get.qwik.cjs");
8
8
  const isEditing = require("../../../functions/is-editing.qwik.cjs");
9
+ const logFetch = require("../../../functions/log-fetch.qwik.cjs");
9
10
  const set = require("../../../functions/set.qwik.cjs");
10
11
  const mergeNewRootState = function mergeNewRootState2(props, state, formRef, newData) {
11
12
  var _a, _b;
@@ -100,7 +101,9 @@ const onSubmit = function onSubmit2(props, state, formRef, event) {
100
101
  }
101
102
  state.formState = "sending";
102
103
  const formUrl = `${getEnv.getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${props.builderContext.apiKey}&to=${btoa(props.sendSubmissionsToEmail || "")}&name=${encodeURIComponent(props.name || "")}`;
103
- fetch(props.sendSubmissionsTo === "email" ? formUrl : props.action, {
104
+ const url = props.sendSubmissionsTo === "email" ? formUrl : props.action;
105
+ logFetch.logFetch(url);
106
+ fetch(url, {
104
107
  body,
105
108
  headers,
106
109
  method: props.method || "post"
@@ -4,6 +4,7 @@ import { Blocks } from "../../../components/blocks/blocks.qwik.mjs";
4
4
  import { getEnv } from "../../../functions/get-env.qwik.mjs";
5
5
  import { get } from "../../../functions/get.qwik.mjs";
6
6
  import { isEditing } from "../../../functions/is-editing.qwik.mjs";
7
+ import { logFetch } from "../../../functions/log-fetch.qwik.mjs";
7
8
  import { set } from "../../../functions/set.qwik.mjs";
8
9
  const mergeNewRootState = function mergeNewRootState2(props, state, formRef, newData) {
9
10
  var _a, _b;
@@ -98,7 +99,9 @@ const onSubmit = function onSubmit2(props, state, formRef, event) {
98
99
  }
99
100
  state.formState = "sending";
100
101
  const formUrl = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${props.builderContext.apiKey}&to=${btoa(props.sendSubmissionsToEmail || "")}&name=${encodeURIComponent(props.name || "")}`;
101
- fetch(props.sendSubmissionsTo === "email" ? formUrl : props.action, {
102
+ const url = props.sendSubmissionsTo === "email" ? formUrl : props.action;
103
+ logFetch(url);
104
+ fetch(url, {
102
105
  body,
103
106
  headers,
104
107
  method: props.method || "post"
@@ -9,6 +9,7 @@ const index = require("../../../functions/get-content/index.qwik.cjs");
9
9
  const isBrowser = require("../../../functions/is-browser.qwik.cjs");
10
10
  const isEditing = require("../../../functions/is-editing.qwik.cjs");
11
11
  const isPreviewing = require("../../../functions/is-previewing.qwik.cjs");
12
+ const logFetch = require("../../../functions/log-fetch.qwik.cjs");
12
13
  const registerComponent = require("../../../functions/register-component.qwik.cjs");
13
14
  const index$1 = require("../../../functions/track/index.qwik.cjs");
14
15
  const interaction = require("../../../functions/track/interaction.qwik.cjs");
@@ -108,6 +109,7 @@ const runHttpRequests = function runHttpRequests2(props, state, showContentProps
108
109
  rootState: props.builderContextSignal.rootState,
109
110
  rootSetState: props.builderContextSignal.rootSetState
110
111
  })));
112
+ logFetch.logFetch(evaluatedUrl);
111
113
  fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
112
114
  mergeNewRootState(props, state, showContentProps, elementRef, {
113
115
  [key]: json
@@ -7,6 +7,7 @@ import { fetchOneEntry } from "../../../functions/get-content/index.qwik.mjs";
7
7
  import { isBrowser } from "../../../functions/is-browser.qwik.mjs";
8
8
  import { isEditing } from "../../../functions/is-editing.qwik.mjs";
9
9
  import { isPreviewing } from "../../../functions/is-previewing.qwik.mjs";
10
+ import { logFetch } from "../../../functions/log-fetch.qwik.mjs";
10
11
  import { createRegisterComponentMessage } from "../../../functions/register-component.qwik.mjs";
11
12
  import { _track } from "../../../functions/track/index.qwik.mjs";
12
13
  import { getInteractionPropertiesForEvent } from "../../../functions/track/interaction.qwik.mjs";
@@ -106,6 +107,7 @@ const runHttpRequests = function runHttpRequests2(props, state, showContentProps
106
107
  rootState: props.builderContextSignal.rootState,
107
108
  rootSetState: props.builderContextSignal.rootSetState
108
109
  })));
110
+ logFetch(evaluatedUrl);
109
111
  fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
110
112
  mergeNewRootState(props, state, showContentProps, elementRef, {
111
113
  [key]: json
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const SDK_VERSION = "0.16.22";
3
+ const SDK_VERSION = "0.16.23";
4
4
  exports.SDK_VERSION = SDK_VERSION;
@@ -1,4 +1,4 @@
1
- const SDK_VERSION = "0.16.22";
1
+ const SDK_VERSION = "0.16.23";
2
2
  export {
3
3
  SDK_VERSION
4
4
  };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const logger = require("../helpers/logger.qwik.cjs");
4
+ function logFetch(url) {
5
+ var _a;
6
+ if (typeof process !== "undefined" && ((_a = process.env) == null ? void 0 : _a.DEBUG)) {
7
+ if (String(process.env.DEBUG) == "true")
8
+ logger.logger.log(url);
9
+ }
10
+ }
11
+ exports.logFetch = logFetch;
@@ -0,0 +1,11 @@
1
+ import { logger } from "../helpers/logger.qwik.mjs";
2
+ function logFetch(url) {
3
+ var _a;
4
+ if (typeof process !== "undefined" && ((_a = process.env) == null ? void 0 : _a.DEBUG)) {
5
+ if (String(process.env.DEBUG) == "true")
6
+ logger.log(url);
7
+ }
8
+ }
9
+ export {
10
+ logFetch
11
+ };
@@ -7,6 +7,7 @@ const sessionId = require("../../helpers/sessionId.qwik.cjs");
7
7
  const visitorId = require("../../helpers/visitorId.qwik.cjs");
8
8
  const isBrowser = require("../is-browser.qwik.cjs");
9
9
  const isEditing = require("../is-editing.qwik.cjs");
10
+ const logFetch = require("../log-fetch.qwik.cjs");
10
11
  const helpers = require("./helpers.qwik.cjs");
11
12
  const getTrackingEventData = async ({ canTrack }) => {
12
13
  if (!canTrack)
@@ -52,7 +53,9 @@ async function _track({ apiHost, ...eventProps }) {
52
53
  if (!(isBrowser.isBrowser() || target.TARGET === "reactNative"))
53
54
  return;
54
55
  const baseUrl = apiHost || "https://cdn.builder.io";
55
- return fetch(`${baseUrl}/api/v1/track`, {
56
+ const url = `${baseUrl}/api/v1/track`;
57
+ logFetch.logFetch(url);
58
+ return fetch(url, {
56
59
  method: "POST",
57
60
  body: JSON.stringify({
58
61
  events: [
@@ -5,6 +5,7 @@ import { getSessionId } from "../../helpers/sessionId.qwik.mjs";
5
5
  import { getVisitorId } from "../../helpers/visitorId.qwik.mjs";
6
6
  import { isBrowser } from "../is-browser.qwik.mjs";
7
7
  import { isEditing } from "../is-editing.qwik.mjs";
8
+ import { logFetch } from "../log-fetch.qwik.mjs";
8
9
  import { getUserAttributes } from "./helpers.qwik.mjs";
9
10
  const getTrackingEventData = async ({ canTrack }) => {
10
11
  if (!canTrack)
@@ -50,7 +51,9 @@ async function _track({ apiHost, ...eventProps }) {
50
51
  if (!(isBrowser() || TARGET === "reactNative"))
51
52
  return;
52
53
  const baseUrl = apiHost || "https://cdn.builder.io";
53
- return fetch(`${baseUrl}/api/v1/track`, {
54
+ const url = `${baseUrl}/api/v1/track`;
55
+ logFetch(url);
56
+ return fetch(url, {
54
57
  method: "POST",
55
58
  body: JSON.stringify({
56
59
  events: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-qwik",
3
- "version": "0.16.22",
3
+ "version": "0.16.23",
4
4
  "homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/qwik",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.16.22";
1
+ export declare const SDK_VERSION = "0.16.23";
@@ -0,0 +1 @@
1
+ export declare function logFetch(url: string): void;