@amplifyup/sdk 0.1.53 → 0.1.55
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/AmplifyRenderer.d.mts +5 -3
- package/dist/AmplifyRenderer.d.ts +5 -3
- package/dist/AmplifyRenderer.js +64 -35
- package/dist/AmplifyRenderer.js.map +1 -1
- package/dist/AmplifyRenderer.mjs +65 -36
- package/dist/AmplifyRenderer.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{query-L7zSmLFX.d.ts → query-BqApXxQi.d.ts} +1 -1
- package/dist/{query-CWFb7rSm.d.mts → query-DaJlqU-Z.d.mts} +1 -1
- package/dist/react.d.mts +6 -6
- package/dist/react.d.ts +6 -6
- package/dist/react.js +132 -100
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +134 -102
- package/dist/react.mjs.map +1 -1
- package/dist/server.d.mts +3 -3
- package/dist/server.d.ts +3 -3
- package/dist/{types-DpTzUg1C.d.mts → types-Db_eLrfU.d.mts} +5 -0
- package/dist/{types-DpTzUg1C.d.ts → types-Db_eLrfU.d.ts} +5 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { P as PageConfig, C as ContentSource, A as AmplifyContentMeta, E as EventTrackingConfig$1, a as PageDataSnapshot, b as CDPAdapter, c as AmplifyUpConfig, d as EventProperties, e as AmplifyPageContextInput, f as AttachedPageEventContext, I as IdentifyInput, g as IdentifyTraits, h as ProfileFieldsInput, i as AmplifyUpTarget } from './types-
|
|
2
|
-
export { Z as ZoneConfig, k as isAmplifyUpTarget, n as normalizeAmplifyUpTarget, r as resolveAmplifyUpTarget, j as resolveAmplifyUpUrls } from './types-
|
|
1
|
+
import { P as PageConfig, C as ContentSource, A as AmplifyContentMeta, E as EventTrackingConfig$1, a as PageDataSnapshot, b as CDPAdapter, c as AmplifyUpConfig, d as EventProperties, e as AmplifyPageContextInput, f as AttachedPageEventContext, I as IdentifyInput, g as IdentifyTraits, h as ProfileFieldsInput, i as AmplifyUpTarget } from './types-Db_eLrfU.mjs';
|
|
2
|
+
export { Z as ZoneConfig, k as isAmplifyUpTarget, n as normalizeAmplifyUpTarget, r as resolveAmplifyUpTarget, j as resolveAmplifyUpUrls } from './types-Db_eLrfU.mjs';
|
|
3
3
|
export { i as isComposerPreview, a as isPreviewRequest, b as isWorkingContentRequest } from './preview-_vHmzRen.mjs';
|
|
4
4
|
export { A as AMPLIFYUP_EDITOR_ROUTE, i as isAmplifyUpEditorRoute } from './reservedRoutes-aGgViBDM.mjs';
|
|
5
|
-
export { g as FetchEdgeQueryOptions, F as FetchEdgeSelectOptions, Q as QueryContentError, e as QueryContentOptions, k as QueryFilter, l as QueryFilterOp, i as QueryPagination, h as QueryResult, m as QuerySort, j as QuerySpec, S as SelectVariantsError, a as SelectVariantsOptions, b as SelectVariantsResult, c as fetchEdgeQuery, f as fetchEdgeSelect, n as nextPageSpec, q as queryContent, d as searchSpec, s as selectVariants } from './query-
|
|
5
|
+
export { g as FetchEdgeQueryOptions, F as FetchEdgeSelectOptions, Q as QueryContentError, e as QueryContentOptions, k as QueryFilter, l as QueryFilterOp, i as QueryPagination, h as QueryResult, m as QuerySort, j as QuerySpec, S as SelectVariantsError, a as SelectVariantsOptions, b as SelectVariantsResult, c as fetchEdgeQuery, f as fetchEdgeSelect, n as nextPageSpec, q as queryContent, d as searchSpec, s as selectVariants } from './query-DaJlqU-Z.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Storage utilities for instance ID and user ID
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { P as PageConfig, C as ContentSource, A as AmplifyContentMeta, E as EventTrackingConfig$1, a as PageDataSnapshot, b as CDPAdapter, c as AmplifyUpConfig, d as EventProperties, e as AmplifyPageContextInput, f as AttachedPageEventContext, I as IdentifyInput, g as IdentifyTraits, h as ProfileFieldsInput, i as AmplifyUpTarget } from './types-
|
|
2
|
-
export { Z as ZoneConfig, k as isAmplifyUpTarget, n as normalizeAmplifyUpTarget, r as resolveAmplifyUpTarget, j as resolveAmplifyUpUrls } from './types-
|
|
1
|
+
import { P as PageConfig, C as ContentSource, A as AmplifyContentMeta, E as EventTrackingConfig$1, a as PageDataSnapshot, b as CDPAdapter, c as AmplifyUpConfig, d as EventProperties, e as AmplifyPageContextInput, f as AttachedPageEventContext, I as IdentifyInput, g as IdentifyTraits, h as ProfileFieldsInput, i as AmplifyUpTarget } from './types-Db_eLrfU.js';
|
|
2
|
+
export { Z as ZoneConfig, k as isAmplifyUpTarget, n as normalizeAmplifyUpTarget, r as resolveAmplifyUpTarget, j as resolveAmplifyUpUrls } from './types-Db_eLrfU.js';
|
|
3
3
|
export { i as isComposerPreview, a as isPreviewRequest, b as isWorkingContentRequest } from './preview-_vHmzRen.js';
|
|
4
4
|
export { A as AMPLIFYUP_EDITOR_ROUTE, i as isAmplifyUpEditorRoute } from './reservedRoutes-aGgViBDM.js';
|
|
5
|
-
export { g as FetchEdgeQueryOptions, F as FetchEdgeSelectOptions, Q as QueryContentError, e as QueryContentOptions, k as QueryFilter, l as QueryFilterOp, i as QueryPagination, h as QueryResult, m as QuerySort, j as QuerySpec, S as SelectVariantsError, a as SelectVariantsOptions, b as SelectVariantsResult, c as fetchEdgeQuery, f as fetchEdgeSelect, n as nextPageSpec, q as queryContent, d as searchSpec, s as selectVariants } from './query-
|
|
5
|
+
export { g as FetchEdgeQueryOptions, F as FetchEdgeSelectOptions, Q as QueryContentError, e as QueryContentOptions, k as QueryFilter, l as QueryFilterOp, i as QueryPagination, h as QueryResult, m as QuerySort, j as QuerySpec, S as SelectVariantsError, a as SelectVariantsOptions, b as SelectVariantsResult, c as fetchEdgeQuery, f as fetchEdgeSelect, n as nextPageSpec, q as queryContent, d as searchSpec, s as selectVariants } from './query-BqApXxQi.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Storage utilities for instance ID and user ID
|
package/dist/index.js
CHANGED
|
@@ -549,6 +549,23 @@ function mergeEventContext(properties, attached) {
|
|
|
549
549
|
function setPageResourceFields(fields) {
|
|
550
550
|
}
|
|
551
551
|
|
|
552
|
+
// src/debug.ts
|
|
553
|
+
function envFlag(value) {
|
|
554
|
+
if (!value) return false;
|
|
555
|
+
const v = value.trim().toLowerCase();
|
|
556
|
+
return v === "1" || v === "true" || v === "yes";
|
|
557
|
+
}
|
|
558
|
+
function readAmplifyUpDebugEnv() {
|
|
559
|
+
try {
|
|
560
|
+
if (typeof process === "undefined") return false;
|
|
561
|
+
return envFlag(process.env.NEXT_PUBLIC_AMPLIFYUP_DEBUG) || envFlag(process.env.AMPLIFYUP_DEBUG);
|
|
562
|
+
} catch {
|
|
563
|
+
return false;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
function setAmplifyUpDebug(enabled) {
|
|
567
|
+
}
|
|
568
|
+
|
|
552
569
|
// src/reservedRoutes.ts
|
|
553
570
|
var AMPLIFYUP_EDITOR_ROUTE = "/__amplifyup/editor";
|
|
554
571
|
function isAmplifyUpEditorRoute(pathname) {
|
|
@@ -1128,13 +1145,13 @@ var AmplifyUpSDK = class {
|
|
|
1128
1145
|
}
|
|
1129
1146
|
this.config = {
|
|
1130
1147
|
trackingId: previewOverrides.trackingId || config.trackingId,
|
|
1131
|
-
debug: config.debug ??
|
|
1132
|
-
// Enable debug by default
|
|
1148
|
+
debug: config.debug ?? readAmplifyUpDebugEnv(),
|
|
1133
1149
|
target: this.target,
|
|
1134
1150
|
dev: config.dev,
|
|
1135
1151
|
...config.siteId ? { siteId: config.siteId } : {},
|
|
1136
1152
|
...config.pageContext ? { pageContext: config.pageContext } : {}
|
|
1137
1153
|
};
|
|
1154
|
+
setAmplifyUpDebug(!!this.config.debug);
|
|
1138
1155
|
if (config.pageContext) {
|
|
1139
1156
|
this.pendingPageContext = config.pageContext;
|
|
1140
1157
|
this.recomputeAttachedContext();
|