@amplifyup/sdk 0.1.77 → 0.1.79
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/README.md +93 -28
- package/dist/AmplifyRenderer-BNWBrFQN.d.ts +47 -0
- package/dist/AmplifyRenderer-CPUr9Bkc.d.mts +47 -0
- package/dist/AmplifyRenderer.d.mts +4 -40
- package/dist/AmplifyRenderer.d.ts +4 -40
- package/dist/AmplifyRenderer.js +119 -17
- package/dist/AmplifyRenderer.js.map +1 -1
- package/dist/AmplifyRenderer.mjs +119 -17
- package/dist/AmplifyRenderer.mjs.map +1 -1
- package/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +266 -0
- package/dist/cli.js.map +1 -0
- package/dist/cli.mjs +260 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/config.d.mts +18 -0
- package/dist/config.d.ts +18 -0
- package/dist/config.js +10 -0
- package/dist/config.js.map +1 -0
- package/dist/config.mjs +8 -0
- package/dist/config.mjs.map +1 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/dist/next.d.mts +9 -0
- package/dist/next.d.ts +9 -0
- package/dist/next.js +259 -0
- package/dist/next.js.map +1 -0
- package/dist/next.mjs +253 -0
- package/dist/next.mjs.map +1 -0
- package/dist/query-DYjs4LQQ.d.mts +262 -0
- package/dist/query-Xo9cy-2F.d.ts +262 -0
- package/dist/react.d.mts +19 -21
- package/dist/react.d.ts +19 -21
- package/dist/react.js +1488 -1336
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +1488 -1337
- package/dist/react.mjs.map +1 -1
- package/dist/server.d.mts +3 -3
- package/dist/server.d.ts +3 -3
- package/dist/{types-D4TSd2Yt.d.mts → types-ffQNIQCK.d.mts} +1 -102
- package/dist/{types-D4TSd2Yt.d.ts → types-ffQNIQCK.d.ts} +1 -102
- package/package.json +17 -2
- package/dist/query-B23UsNIv.d.ts +0 -161
- package/dist/query-CV8x3oQT.d.mts +0 -161
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `amplifyup.config.ts` — project settings read at build/dev time by
|
|
3
|
+
* `withAmplifyUp` and the `amplifyup` CLI. Never imported by the browser.
|
|
4
|
+
*/
|
|
5
|
+
type AmplifyComponentsConfig = {
|
|
6
|
+
/** Folders scanned for components, relative to the project root. Default `['src/components']`, or `['components']` when there is no `src/`. */
|
|
7
|
+
roots?: string[];
|
|
8
|
+
/** Extra glob patterns to skip (tests, stories and type files are always skipped). */
|
|
9
|
+
exclude?: string[];
|
|
10
|
+
/** Generated file path without extension. Default `<first root's parent>/.amplifyup/component-registry`. */
|
|
11
|
+
output?: string;
|
|
12
|
+
};
|
|
13
|
+
type AmplifyConfig = {
|
|
14
|
+
components?: AmplifyComponentsConfig;
|
|
15
|
+
};
|
|
16
|
+
declare const defineAmplifyConfig: (config: AmplifyConfig) => AmplifyConfig;
|
|
17
|
+
|
|
18
|
+
export { type AmplifyComponentsConfig, type AmplifyConfig, defineAmplifyConfig };
|
package/dist/config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/config.ts"],"names":[],"mappings":";;;;;AAkBO,IAAM,mBAAA,GAAsB,CAAC,MAAA,KAAyC","file":"config.js","sourcesContent":["/**\n * `amplifyup.config.ts` — project settings read at build/dev time by\n * `withAmplifyUp` and the `amplifyup` CLI. Never imported by the browser.\n */\n\nexport type AmplifyComponentsConfig = {\n /** Folders scanned for components, relative to the project root. Default `['src/components']`, or `['components']` when there is no `src/`. */\n roots?: string[];\n /** Extra glob patterns to skip (tests, stories and type files are always skipped). */\n exclude?: string[];\n /** Generated file path without extension. Default `<first root's parent>/.amplifyup/component-registry`. */\n output?: string;\n};\n\nexport type AmplifyConfig = {\n components?: AmplifyComponentsConfig;\n};\n\nexport const defineAmplifyConfig = (config: AmplifyConfig): AmplifyConfig => config;\n"]}
|
package/dist/config.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/config.ts"],"names":[],"mappings":";;;AAkBO,IAAM,mBAAA,GAAsB,CAAC,MAAA,KAAyC","file":"config.mjs","sourcesContent":["/**\n * `amplifyup.config.ts` — project settings read at build/dev time by\n * `withAmplifyUp` and the `amplifyup` CLI. Never imported by the browser.\n */\n\nexport type AmplifyComponentsConfig = {\n /** Folders scanned for components, relative to the project root. Default `['src/components']`, or `['components']` when there is no `src/`. */\n roots?: string[];\n /** Extra glob patterns to skip (tests, stories and type files are always skipped). */\n exclude?: string[];\n /** Generated file path without extension. Default `<first root's parent>/.amplifyup/component-registry`. */\n output?: string;\n};\n\nexport type AmplifyConfig = {\n components?: AmplifyComponentsConfig;\n};\n\nexport const defineAmplifyConfig = (config: AmplifyConfig): AmplifyConfig => config;\n"]}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { P as PageConfig, C as ContentSource,
|
|
2
|
-
export { Z as ZoneConfig, l as isAmplifyUpTarget, n as normalizeAmplifyUpTarget, r as resolveAmplifyUpTarget,
|
|
1
|
+
import { P as PageConfig, C as ContentSource, a as AmplifyContentMeta, E as EventTrackingConfig$1, c as PageDataSnapshot, R as ResolvedPageResourceRef, d as PageTaxonomies, e as CDPAdapter, f as AmplifyUpConfig, g as EventProperties, h as AmplifyPageContextInput, i as AttachedPageEventContext, I as IdentifyInput, j as IdentifyTraits, k as ProfileFieldsInput, A as AmplifyUpTarget } from './types-ffQNIQCK.mjs';
|
|
2
|
+
export { Z as ZoneConfig, l as isAmplifyUpTarget, n as normalizeAmplifyUpTarget, r as resolveAmplifyUpTarget, b as resolveAmplifyUpUrls } from './types-ffQNIQCK.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-DYjs4LQQ.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,
|
|
2
|
-
export { Z as ZoneConfig, l as isAmplifyUpTarget, n as normalizeAmplifyUpTarget, r as resolveAmplifyUpTarget,
|
|
1
|
+
import { P as PageConfig, C as ContentSource, a as AmplifyContentMeta, E as EventTrackingConfig$1, c as PageDataSnapshot, R as ResolvedPageResourceRef, d as PageTaxonomies, e as CDPAdapter, f as AmplifyUpConfig, g as EventProperties, h as AmplifyPageContextInput, i as AttachedPageEventContext, I as IdentifyInput, j as IdentifyTraits, k as ProfileFieldsInput, A as AmplifyUpTarget } from './types-ffQNIQCK.js';
|
|
2
|
+
export { Z as ZoneConfig, l as isAmplifyUpTarget, n as normalizeAmplifyUpTarget, r as resolveAmplifyUpTarget, b as resolveAmplifyUpUrls } from './types-ffQNIQCK.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-Xo9cy-2F.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Storage utilities for instance ID and user ID
|
package/dist/index.js
CHANGED
|
@@ -159,6 +159,7 @@ var AWSAdapter = class {
|
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
161
|
const trackingId = eventData?.trackingId || this.config?.trackingId;
|
|
162
|
+
const debug = this.config?.debug;
|
|
162
163
|
const query = trackingId ? `?tid=${encodeURIComponent(trackingId)}` : "";
|
|
163
164
|
const url = `${this.apiGatewayUrl}${endpoint}${query}`;
|
|
164
165
|
try {
|
|
@@ -173,15 +174,15 @@ var AWSAdapter = class {
|
|
|
173
174
|
keepalive: true
|
|
174
175
|
});
|
|
175
176
|
if (!response.ok) {
|
|
176
|
-
if (
|
|
177
|
+
if (debug) {
|
|
177
178
|
console.warn(`AmplifyUp SDK: Event tracking failed: ${response.status} ${response.statusText}`);
|
|
178
179
|
}
|
|
179
|
-
} else if (
|
|
180
|
+
} else if (debug) {
|
|
180
181
|
const result = await response.json().catch(() => ({}));
|
|
181
182
|
console.log("AmplifyUp SDK: Event tracked", result);
|
|
182
183
|
}
|
|
183
184
|
} catch (error) {
|
|
184
|
-
if (
|
|
185
|
+
if (debug) {
|
|
185
186
|
console.error("AmplifyUp SDK: Event tracking error:", error);
|
|
186
187
|
}
|
|
187
188
|
}
|
|
@@ -3820,7 +3821,7 @@ var verifyAWSConnection = () => {
|
|
|
3820
3821
|
console.log("Full details:", result);
|
|
3821
3822
|
return result;
|
|
3822
3823
|
};
|
|
3823
|
-
var
|
|
3824
|
+
var src_default = getSDK();
|
|
3824
3825
|
|
|
3825
3826
|
exports.AMPLIFYUP_EDITOR_ROUTE = AMPLIFYUP_EDITOR_ROUTE;
|
|
3826
3827
|
exports.ANON_COOKIE_NAME = ANON_COOKIE_NAME;
|
|
@@ -3834,7 +3835,7 @@ exports.SelectVariantsError = SelectVariantsError;
|
|
|
3834
3835
|
exports.buildLayoutProviderUrl = buildLayoutProviderUrl;
|
|
3835
3836
|
exports.buildPageRenderUrl = buildPageRenderUrl;
|
|
3836
3837
|
exports.cleanupEventTracking = cleanupEventTracking;
|
|
3837
|
-
exports.default =
|
|
3838
|
+
exports.default = src_default;
|
|
3838
3839
|
exports.fetchContent = fetchContent;
|
|
3839
3840
|
exports.fetchEdgeQuery = fetchEdgeQuery;
|
|
3840
3841
|
exports.fetchEdgeResolve = fetchEdgeResolve;
|