create-ampless 1.0.0-beta.151 → 1.0.0-beta.154
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.js +7 -0
- package/dist/templates/_shared/amplify/auth/resource.custom.ts +39 -0
- package/dist/templates/_shared/amplify/auth/resource.ts +8 -1
- package/dist/templates/_shared/app/(admin)/admin/account/page.tsx +5 -0
- package/dist/templates/_shared/package.json +14 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1916,8 +1916,15 @@ var AMPLESS_PACKAGES = /* @__PURE__ */ new Set([
|
|
|
1916
1916
|
"@ampless/runtime"
|
|
1917
1917
|
]);
|
|
1918
1918
|
var AMPLESS_MANAGED_TRANSITIVE_PREFIXES = ["@tiptap/"];
|
|
1919
|
+
var AMPLESS_MANAGED_EXACT_DEPS = /* @__PURE__ */ new Set([
|
|
1920
|
+
"aws-amplify",
|
|
1921
|
+
"@aws-amplify/adapter-nextjs",
|
|
1922
|
+
"@aws-amplify/backend",
|
|
1923
|
+
"@aws-amplify/backend-cli"
|
|
1924
|
+
]);
|
|
1919
1925
|
function isManagedDep(name) {
|
|
1920
1926
|
if (AMPLESS_PACKAGES.has(name)) return true;
|
|
1927
|
+
if (AMPLESS_MANAGED_EXACT_DEPS.has(name)) return true;
|
|
1921
1928
|
return AMPLESS_MANAGED_TRANSITIVE_PREFIXES.some((p3) => name.startsWith(p3));
|
|
1922
1929
|
}
|
|
1923
1930
|
var AMPLESS_MANAGED_SCRIPTS = /* @__PURE__ */ new Set([
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Custom Cognito auth options for this project.
|
|
2
|
+
//
|
|
3
|
+
// `amplify/auth/resource.ts` spreads this object into
|
|
4
|
+
// `amplessAuthConfig({ postConfirmation, ...authCustomizations })`, so
|
|
5
|
+
// anything you set here overrides the ampless defaults.
|
|
6
|
+
//
|
|
7
|
+
// This file is NEVER overwritten by `create-ampless upgrade` —
|
|
8
|
+
// `amplify/auth/resource.ts` is, so keep your auth customizations here.
|
|
9
|
+
//
|
|
10
|
+
// ── Passkeys (WebAuthn) ──────────────────────────────────────────────
|
|
11
|
+
//
|
|
12
|
+
// Passkeys are ENABLED BY DEFAULT (the empty object below). With the
|
|
13
|
+
// default, Amplify auto-resolves the WebAuthn Relying Party ID from the
|
|
14
|
+
// deployment domain, which works on Amplify Hosting domains and on a
|
|
15
|
+
// `localhost` sandbox.
|
|
16
|
+
//
|
|
17
|
+
// If you serve the admin from a CUSTOM DOMAIN behind a CDN, the
|
|
18
|
+
// auto-resolved RP ID won't match the URL the browser sees and passkey
|
|
19
|
+
// sign-in fails with a `SecurityError`. Pin the RP ID to the bare
|
|
20
|
+
// domain (no protocol, no path) the operators visit:
|
|
21
|
+
//
|
|
22
|
+
// export const authCustomizations: Pick<AmplessAuthConfigOpts, 'webAuthn'> = {
|
|
23
|
+
// webAuthn: { relyingPartyId: 'admin.example.com' },
|
|
24
|
+
// }
|
|
25
|
+
//
|
|
26
|
+
// To turn passkeys off entirely (password-only sign-in):
|
|
27
|
+
//
|
|
28
|
+
// export const authCustomizations: Pick<AmplessAuthConfigOpts, 'webAuthn'> = {
|
|
29
|
+
// webAuthn: false,
|
|
30
|
+
// }
|
|
31
|
+
//
|
|
32
|
+
// ⚠️ Changing the RP ID after operators have registered passkeys
|
|
33
|
+
// invalidates every existing credential — they'll have to register
|
|
34
|
+
// again from the account page. The password flow always stays available
|
|
35
|
+
// as the fallback. See `docs/passkeys.md`.
|
|
36
|
+
|
|
37
|
+
import type { AmplessAuthConfigOpts } from '@ampless/backend'
|
|
38
|
+
|
|
39
|
+
export const authCustomizations: Pick<AmplessAuthConfigOpts, 'webAuthn'> = {}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineAuth } from '@aws-amplify/backend'
|
|
2
2
|
import { amplessAuthConfig } from '@ampless/backend'
|
|
3
3
|
import { postConfirmation } from './post-confirmation/resource.js'
|
|
4
|
+
import { authCustomizations } from './resource.custom.js'
|
|
4
5
|
|
|
5
6
|
// Provisions a Cognito User Pool + Identity Pool with the three role
|
|
6
7
|
// groups (ampless-admin, ampless-editor, ampless-reader) and wires in
|
|
@@ -10,4 +11,10 @@ import { postConfirmation } from './post-confirmation/resource.js'
|
|
|
10
11
|
// `defineAuth` must be called from this file directly — Amplify Gen 2's
|
|
11
12
|
// import-path verifier requires it to live at amplify/auth/resource.ts.
|
|
12
13
|
// `amplessAuthConfig` just returns the props object.
|
|
13
|
-
|
|
14
|
+
//
|
|
15
|
+
// Per-site auth knobs (e.g. passkey Relying Party ID on a custom
|
|
16
|
+
// domain) live in `resource.custom.ts` — that file is yours to edit and
|
|
17
|
+
// is never overwritten by `update-ampless`.
|
|
18
|
+
export const auth = defineAuth(
|
|
19
|
+
amplessAuthConfig({ postConfirmation, ...authCustomizations })
|
|
20
|
+
)
|
|
@@ -26,21 +26,21 @@
|
|
|
26
26
|
"@tiptap/pm": "^3.23.6",
|
|
27
27
|
"@tiptap/react": "^3.23.6",
|
|
28
28
|
"@tiptap/starter-kit": "^3.23.6",
|
|
29
|
-
"@ampless/plugin-analytics-ga4": "^0.2.0-beta.
|
|
30
|
-
"@ampless/plugin-cookie-consent": "^0.1.0-beta.
|
|
31
|
-
"@ampless/plugin-gtm": "^0.2.0-beta.
|
|
32
|
-
"@ampless/plugin-og-image": "^0.2.0-beta.
|
|
33
|
-
"@ampless/plugin-plausible": "^0.2.0-beta.
|
|
34
|
-
"@ampless/plugin-reading-time": "^0.1.0-beta.
|
|
35
|
-
"@ampless/plugin-rss": "^0.2.0-beta.
|
|
36
|
-
"@ampless/plugin-schema-jsonld": "^0.1.1-beta.
|
|
37
|
-
"@ampless/plugin-seo": "^0.2.0-beta.
|
|
38
|
-
"@ampless/plugin-webhook": "^0.2.0-beta.
|
|
39
|
-
"@ampless/admin": "^1.0.0-beta.
|
|
40
|
-
"@ampless/backend": "^1.0.0-beta.
|
|
41
|
-
"@ampless/runtime": "^1.0.0-beta.
|
|
29
|
+
"@ampless/plugin-analytics-ga4": "^0.2.0-beta.36",
|
|
30
|
+
"@ampless/plugin-cookie-consent": "^0.1.0-beta.27",
|
|
31
|
+
"@ampless/plugin-gtm": "^0.2.0-beta.35",
|
|
32
|
+
"@ampless/plugin-og-image": "^0.2.0-beta.52",
|
|
33
|
+
"@ampless/plugin-plausible": "^0.2.0-beta.35",
|
|
34
|
+
"@ampless/plugin-reading-time": "^0.1.0-beta.25",
|
|
35
|
+
"@ampless/plugin-rss": "^0.2.0-beta.52",
|
|
36
|
+
"@ampless/plugin-schema-jsonld": "^0.1.1-beta.31",
|
|
37
|
+
"@ampless/plugin-seo": "^0.2.0-beta.52",
|
|
38
|
+
"@ampless/plugin-webhook": "^0.2.0-beta.53",
|
|
39
|
+
"@ampless/admin": "^1.0.0-beta.91",
|
|
40
|
+
"@ampless/backend": "^1.0.0-beta.76",
|
|
41
|
+
"@ampless/runtime": "^1.0.0-beta.61",
|
|
42
42
|
"@digital-go-jp/tailwind-theme-plugin": "^0.3.4",
|
|
43
|
-
"ampless": "^1.0.0-beta.
|
|
43
|
+
"ampless": "^1.0.0-beta.52",
|
|
44
44
|
"aws-amplify": "^6.17.0",
|
|
45
45
|
"class-variance-authority": "^0.7.1",
|
|
46
46
|
"clsx": "^2.1.1",
|