create-ampless 1.0.0-beta.152 → 1.0.0-beta.155

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 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
- export const auth = defineAuth(amplessAuthConfig({ postConfirmation }))
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
+ )
@@ -0,0 +1,5 @@
1
+ import { admin } from '@/lib/admin'
2
+ import { createAccountPage } from '@ampless/admin/pages'
3
+
4
+ export const dynamic = 'force-dynamic'
5
+ export default createAccountPage(admin)
@@ -36,8 +36,8 @@
36
36
  "@ampless/plugin-schema-jsonld": "^0.1.1-beta.31",
37
37
  "@ampless/plugin-seo": "^0.2.0-beta.52",
38
38
  "@ampless/plugin-webhook": "^0.2.0-beta.53",
39
- "@ampless/admin": "^1.0.0-beta.90",
40
- "@ampless/backend": "^1.0.0-beta.75",
39
+ "@ampless/admin": "^1.0.0-beta.91",
40
+ "@ampless/backend": "^1.0.0-beta.77",
41
41
  "@ampless/runtime": "^1.0.0-beta.61",
42
42
  "@digital-go-jp/tailwind-theme-plugin": "^0.3.4",
43
43
  "ampless": "^1.0.0-beta.52",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ampless",
3
- "version": "1.0.0-beta.152",
3
+ "version": "1.0.0-beta.155",
4
4
  "description": "Create a new ampless project",
5
5
  "license": "MIT",
6
6
  "type": "module",