create-ampless 1.0.0-alpha.51 → 1.0.0-alpha.54

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
@@ -1750,7 +1750,12 @@ var AMPLESS_MANAGED_APP_PATHS = [
1750
1750
  var AMPLESS_RETIRED_PATHS = [
1751
1751
  // Retired alongside the in-deploy multi-site drop.
1752
1752
  "lib/admin-site.ts",
1753
- "lib/admin-site-client.ts"
1753
+ "lib/admin-site-client.ts",
1754
+ // Split into app/raw/[slug]/route.ts + app/static/[slug]/[[...path]]/route.ts.
1755
+ // The old unified internal handler at app/r/[slug]/[[...path]]/route.ts
1756
+ // is no longer wired to anything (middleware rewrites to /raw or
1757
+ // /static now).
1758
+ "app/r/[slug]/[[...path]]/route.ts"
1754
1759
  ];
1755
1760
  var AMPLESS_PACKAGES = /* @__PURE__ */ new Set([
1756
1761
  "ampless",
@@ -0,0 +1,10 @@
1
+ import { ampless } from '@/lib/ampless'
2
+ import { createRawRouteHandler } from '@ampless/runtime/routes'
3
+
4
+ // Internal handler for `format: 'html'` posts with
5
+ // `metadata.no_layout === true`. Reached via middleware rewrite from
6
+ // `/<slug>` — never directly. The browser URL stays `/<slug>`; the
7
+ // `/raw/` prefix is an implementation detail (folder names starting
8
+ // with `_` are excluded by the App Router, hence the explicit `raw/`).
9
+ export const dynamic = 'force-dynamic'
10
+ export const GET = createRawRouteHandler(ampless)
@@ -0,0 +1,14 @@
1
+ import { ampless } from '@/lib/ampless'
2
+ import { createStaticRouteHandler } from '@ampless/runtime/routes'
3
+
4
+ // Internal handler for `format: 'static'` posts — the body is a
5
+ // manifest pointing at a bundle of files in S3 at
6
+ // `public/static/<slug>/`. Reached via middleware rewrite from
7
+ // `/<slug>(/<path>)` — never directly. Each request becomes a short-
8
+ // lived S3 presigned redirect (302) for the entrypoint or the
9
+ // requested bundle file. The browser URL stays `/<slug>(/<path>)`;
10
+ // the `/static/` prefix is an implementation detail (folder names
11
+ // starting with `_` are excluded by the App Router, hence the
12
+ // explicit `static/`).
13
+ export const dynamic = 'force-dynamic'
14
+ export const GET = createStaticRouteHandler(ampless)
@@ -25,15 +25,15 @@
25
25
  "@tiptap/pm": "^3.23.6",
26
26
  "@tiptap/react": "^3.23.6",
27
27
  "@tiptap/starter-kit": "^3.23.6",
28
- "@ampless/plugin-og-image": "^0.2.0-alpha.13",
29
- "@ampless/plugin-rss": "^0.2.0-alpha.13",
30
- "@ampless/plugin-seo": "^0.2.0-alpha.13",
31
- "@ampless/plugin-webhook": "^0.2.0-alpha.13",
32
- "@ampless/admin": "^1.0.0-alpha.33",
33
- "@ampless/backend": "^1.0.0-alpha.25",
34
- "@ampless/runtime": "^1.0.0-alpha.18",
28
+ "@ampless/plugin-og-image": "^0.2.0-alpha.14",
29
+ "@ampless/plugin-rss": "^0.2.0-alpha.14",
30
+ "@ampless/plugin-seo": "^0.2.0-alpha.14",
31
+ "@ampless/plugin-webhook": "^0.2.0-alpha.14",
32
+ "@ampless/admin": "^1.0.0-alpha.34",
33
+ "@ampless/backend": "^1.0.0-alpha.27",
34
+ "@ampless/runtime": "^1.0.0-alpha.19",
35
35
  "@digital-go-jp/tailwind-theme-plugin": "^0.3.4",
36
- "ampless": "^1.0.0-alpha.13",
36
+ "ampless": "^1.0.0-alpha.14",
37
37
  "aws-amplify": "^6.17.0",
38
38
  "class-variance-authority": "^0.7.1",
39
39
  "clsx": "^2.1.1",
@@ -7,8 +7,9 @@
7
7
  // rename.
8
8
  //
9
9
  // See `@ampless/runtime/middleware` for behaviour details: AppSync
10
- // flag fetch + Lambda-memory LRU + `/r/<slug>(/<path>)` rewrite for
11
- // no_layout HTML / static bundles + per-post Cache-Control.
10
+ // flag fetch + Lambda-memory LRU + `/raw/<slug>` rewrite for no_layout
11
+ // HTML, `/static/<slug>(/<path>)` rewrite for static bundles, plus
12
+ // per-post Cache-Control.
12
13
 
13
14
  import cmsConfig from './cms.config'
14
15
  import outputs from './amplify_outputs.json'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ampless",
3
- "version": "1.0.0-alpha.51",
3
+ "version": "1.0.0-alpha.54",
4
4
  "description": "Create a new ampless project",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,18 +0,0 @@
1
- import { ampless } from '@/lib/ampless'
2
- import { createUnderscoreRouteHandler } from '@ampless/runtime/routes'
3
-
4
- // Internal handler for no_layout HTML and static-bundle posts. Reached
5
- // via middleware rewrite from `/<slug>(/<path>)` — never directly.
6
- // Covers two cases that both bypass the themed post page:
7
- //
8
- // - `format: 'html'` posts with `metadata.no_layout === true`
9
- // → bare HTML response, no Next.js root layout, no theme chrome
10
- // - `format: 'static'` posts
11
- // → S3 presigned URL redirect for the entrypoint and every bundle file
12
- //
13
- // The literal folder is `r/` (not `_/` etc.) because Next.js's App
14
- // Router excludes any path part starting with `_` from route
15
- // discovery. The browser URL stays `/<slug>(/<path>)` throughout —
16
- // middleware does the public→internal translation.
17
- export const dynamic = 'force-dynamic'
18
- export const GET = createUnderscoreRouteHandler(ampless)