create-ampless 1.0.0-beta.164 → 1.0.0-beta.167

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
@@ -122,6 +122,9 @@ next-env.d.ts
122
122
  .amplify/
123
123
  amplify_outputs.json
124
124
 
125
+ # Ampless plugin-secret encryption key \u2014 NEVER commit (decrypts all stored secrets)
126
+ amplify/secrets/encryption-key.ts
127
+
125
128
  # TypeScript build artifacts
126
129
  *.tsbuildinfo
127
130
 
@@ -284,7 +287,11 @@ var VALID_PLUGIN_CAPABILITIES = [
284
287
  "eventHooks",
285
288
  "adminSettings",
286
289
  "writePublicAsset",
287
- "schema"
290
+ "schema",
291
+ "publicHtmlForPost",
292
+ "secretSettings",
293
+ "contentFields",
294
+ "publicPostScript"
288
295
  ];
289
296
  var STRING_FLAGS = /* @__PURE__ */ new Set([
290
297
  "--site-name",
@@ -644,6 +651,53 @@ import pc2 from "picocolors";
644
651
  import { execa } from "execa";
645
652
  import { basename } from "path";
646
653
  import pc from "picocolors";
654
+
655
+ // src/deploy-shared.ts
656
+ function extractRegistrableDomain(domain) {
657
+ const labels = domain.replace(/\.$/, "").split(".");
658
+ if (labels.length <= 2) return labels.join(".");
659
+ const MULTI_PART_SUFFIXES = /* @__PURE__ */ new Set([
660
+ "co.uk",
661
+ "org.uk",
662
+ "me.uk",
663
+ "gov.uk",
664
+ "ac.uk",
665
+ "co.jp",
666
+ "ne.jp",
667
+ "or.jp",
668
+ "ac.jp",
669
+ "go.jp",
670
+ "ad.jp",
671
+ "gr.jp",
672
+ "lg.jp",
673
+ "com.au",
674
+ "net.au",
675
+ "org.au",
676
+ "edu.au",
677
+ "gov.au",
678
+ "co.nz",
679
+ "net.nz",
680
+ "org.nz",
681
+ "com.br",
682
+ "com.mx",
683
+ "com.cn",
684
+ "com.sg",
685
+ "com.hk",
686
+ "com.tw",
687
+ "co.kr",
688
+ "or.kr",
689
+ "co.in",
690
+ "co.id",
691
+ "co.za"
692
+ ]);
693
+ const lastTwo = labels.slice(-2).join(".");
694
+ if (MULTI_PART_SUFFIXES.has(lastTwo) && labels.length >= 3) {
695
+ return labels.slice(-3).join(".");
696
+ }
697
+ return lastTwo;
698
+ }
699
+
700
+ // src/preflight.ts
647
701
  var DEFAULT_AMPLIFY_ROLE_NAME = "AmplifyDeployBackend";
648
702
  var AMPLIFY_BACKEND_POLICY_ARN = "arn:aws:iam::aws:policy/AdministratorAccess-Amplify";
649
703
  var TRUST_POLICY_JSON = JSON.stringify({
@@ -1172,49 +1226,6 @@ async function resolveGithubToken(explicit, env = process.env) {
1172
1226
  }
1173
1227
  return void 0;
1174
1228
  }
1175
- function extractRegistrableDomain(domain) {
1176
- const labels = domain.replace(/\.$/, "").split(".");
1177
- if (labels.length <= 2) return labels.join(".");
1178
- const MULTI_PART_SUFFIXES = /* @__PURE__ */ new Set([
1179
- "co.uk",
1180
- "org.uk",
1181
- "me.uk",
1182
- "gov.uk",
1183
- "ac.uk",
1184
- "co.jp",
1185
- "ne.jp",
1186
- "or.jp",
1187
- "ac.jp",
1188
- "go.jp",
1189
- "ad.jp",
1190
- "gr.jp",
1191
- "lg.jp",
1192
- "com.au",
1193
- "net.au",
1194
- "org.au",
1195
- "edu.au",
1196
- "gov.au",
1197
- "co.nz",
1198
- "net.nz",
1199
- "org.nz",
1200
- "com.br",
1201
- "com.mx",
1202
- "com.cn",
1203
- "com.sg",
1204
- "com.hk",
1205
- "com.tw",
1206
- "co.kr",
1207
- "or.kr",
1208
- "co.in",
1209
- "co.id",
1210
- "co.za"
1211
- ]);
1212
- const lastTwo = labels.slice(-2).join(".");
1213
- if (MULTI_PART_SUFFIXES.has(lastTwo) && labels.length >= 3) {
1214
- return labels.slice(-3).join(".");
1215
- }
1216
- return lastTwo;
1217
- }
1218
1229
  function splitDomain(domain, subdomain) {
1219
1230
  const registrable = extractRegistrableDomain(domain);
1220
1231
  if (subdomain !== void 0) {
@@ -47,7 +47,11 @@ export function response(ctx) {
47
47
  slug: row.slug,
48
48
  title: row.title,
49
49
  excerpt: row.excerpt ?? null,
50
- format: 'markdown',
50
+ // `format` is denormalized onto the PostTag row by the trusted processor
51
+ // (posttag-sync), so tag pages get the post's real format. `?? null`
52
+ // guards rows written before the field existed — the runtime then applies
53
+ // its documented `?? 'markdown'` fallback for those.
54
+ format: row.format ?? null,
51
55
  body: null,
52
56
  status: 'published',
53
57
  publishedAt: row.publishedAt,
@@ -1,5 +1,12 @@
1
1
  /** @type {import('next').NextConfig} */
2
2
  const nextConfig = {
3
+ // ampless serves `format: 'static'` posts at `/<slug>/` (trailing slash)
4
+ // so the bundle's relative asset paths resolve against `/<slug>/...`.
5
+ // The static route 308-redirects `/<slug>` → `/<slug>/`; Next's default
6
+ // trailing-slash normalization does the opposite (`/<slug>/` → `/<slug>`),
7
+ // and the two fight into an infinite redirect loop. Letting middleware /
8
+ // the static route own trailing-slash handling avoids it. Do not remove.
9
+ skipTrailingSlashRedirect: true,
3
10
  images: {
4
11
  remotePatterns: [
5
12
  { protocol: 'https', hostname: '*.s3.amazonaws.com' },
@@ -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.37",
30
- "@ampless/plugin-cookie-consent": "^0.1.0-beta.28",
31
- "@ampless/plugin-gtm": "^0.2.0-beta.36",
32
- "@ampless/plugin-og-image": "^0.2.0-beta.53",
33
- "@ampless/plugin-plausible": "^0.2.0-beta.36",
34
- "@ampless/plugin-reading-time": "^0.1.0-beta.26",
35
- "@ampless/plugin-rss": "^0.2.0-beta.53",
36
- "@ampless/plugin-schema-jsonld": "^0.1.1-beta.32",
37
- "@ampless/plugin-seo": "^0.2.0-beta.53",
38
- "@ampless/plugin-webhook": "^0.2.0-beta.54",
39
- "@ampless/admin": "^1.0.0-beta.99",
40
- "@ampless/backend": "^1.0.0-beta.80",
41
- "@ampless/runtime": "^1.0.0-beta.65",
29
+ "@ampless/plugin-analytics-ga4": "^0.2.0-beta.38",
30
+ "@ampless/plugin-cookie-consent": "^0.1.0-beta.29",
31
+ "@ampless/plugin-gtm": "^0.2.0-beta.37",
32
+ "@ampless/plugin-og-image": "^0.2.0-beta.54",
33
+ "@ampless/plugin-plausible": "^0.2.0-beta.37",
34
+ "@ampless/plugin-reading-time": "^0.1.0-beta.27",
35
+ "@ampless/plugin-rss": "^0.2.0-beta.54",
36
+ "@ampless/plugin-schema-jsonld": "^0.1.1-beta.33",
37
+ "@ampless/plugin-seo": "^0.2.0-beta.54",
38
+ "@ampless/plugin-webhook": "^0.2.0-beta.55",
39
+ "@ampless/admin": "^1.0.0-beta.100",
40
+ "@ampless/backend": "^1.0.0-beta.81",
41
+ "@ampless/runtime": "^1.0.0-beta.66",
42
42
  "@digital-go-jp/tailwind-theme-plugin": "^0.3.4",
43
- "ampless": "^1.0.0-beta.53",
43
+ "ampless": "^1.0.0-beta.54",
44
44
  "aws-amplify": "^6.17.0",
45
45
  "class-variance-authority": "^0.7.1",
46
46
  "clsx": "^2.1.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ampless",
3
- "version": "1.0.0-beta.164",
3
+ "version": "1.0.0-beta.167",
4
4
  "description": "Create a new ampless project",
5
5
  "license": "MIT",
6
6
  "type": "module",