create-ampless 1.0.0-alpha.57 → 1.0.0-alpha.59
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 +1 -10
- package/dist/templates/_shared/AGENTS.ja.md +16 -26
- package/dist/templates/_shared/AGENTS.md +16 -26
- package/dist/templates/_shared/README.ja.md +29 -3
- package/dist/templates/_shared/README.md +29 -3
- package/dist/templates/_shared/THEMES.ja.md +495 -0
- package/dist/templates/_shared/THEMES.md +523 -0
- package/dist/templates/_shared/app/layout.tsx +8 -8
- package/dist/templates/_shared/app/providers.tsx +0 -2
- package/dist/templates/_shared/components/site-chrome/site-sidebar.tsx +2 -2
- package/dist/templates/_shared/components.json +1 -1
- package/dist/templates/_shared/lib/admin.ts +4 -6
- package/dist/templates/_shared/lib/ampless.ts +2 -8
- package/dist/templates/_shared/lib/amplify.ts +0 -5
- package/dist/templates/_shared/package.json +2 -2
- package/dist/templates/blog/pages/feed.ts +2 -2
- package/dist/templates/blog/pages/home.tsx +8 -10
- package/dist/templates/blog/pages/post.tsx +9 -12
- package/dist/templates/blog/pages/sitemap.ts +2 -2
- package/dist/templates/blog/pages/tag.tsx +7 -9
- package/dist/templates/corporate/pages/feed.ts +2 -2
- package/dist/templates/corporate/pages/home.tsx +6 -8
- package/dist/templates/corporate/pages/post.tsx +9 -12
- package/dist/templates/corporate/pages/sitemap.ts +2 -2
- package/dist/templates/corporate/pages/tag.tsx +7 -9
- package/dist/templates/dads/pages/feed.ts +2 -2
- package/dist/templates/dads/pages/home.tsx +6 -8
- package/dist/templates/dads/pages/post.tsx +9 -12
- package/dist/templates/dads/pages/sitemap.ts +2 -2
- package/dist/templates/dads/pages/tag.tsx +7 -9
- package/dist/templates/docs/pages/feed.ts +2 -2
- package/dist/templates/docs/pages/home.tsx +4 -6
- package/dist/templates/docs/pages/post.tsx +7 -10
- package/dist/templates/docs/pages/sitemap.ts +2 -2
- package/dist/templates/docs/pages/tag.tsx +6 -8
- package/dist/templates/landing/pages/feed.ts +2 -2
- package/dist/templates/landing/pages/home.tsx +6 -8
- package/dist/templates/landing/pages/post.tsx +9 -12
- package/dist/templates/landing/pages/sitemap.ts +2 -2
- package/dist/templates/landing/pages/tag.tsx +7 -9
- package/dist/templates/minimal/pages/feed.ts +2 -2
- package/dist/templates/minimal/pages/home.tsx +5 -6
- package/dist/templates/minimal/pages/post.tsx +8 -10
- package/dist/templates/minimal/pages/sitemap.ts +2 -2
- package/dist/templates/minimal/pages/tag.tsx +6 -7
- package/package.json +1 -1
- package/dist/templates/_shared/components/i18n-provider.tsx +0 -15
- package/dist/templates/_shared/lib/amplify-server.ts +0 -7
- package/dist/templates/_shared/lib/auth-server.ts +0 -15
- package/dist/templates/_shared/lib/cn.ts +0 -5
- package/dist/templates/_shared/lib/i18n.ts +0 -35
- package/dist/templates/_shared/lib/kv-provider.ts +0 -8
- package/dist/templates/_shared/lib/media.ts +0 -6
- package/dist/templates/_shared/lib/posts-provider.ts +0 -8
- package/dist/templates/_shared/lib/posts-public.ts +0 -27
- package/dist/templates/_shared/lib/posts.ts +0 -12
- package/dist/templates/_shared/lib/seo.ts +0 -11
- package/dist/templates/_shared/lib/site-settings.ts +0 -11
- package/dist/templates/_shared/lib/storage.ts +0 -10
- package/dist/templates/_shared/lib/theme-actions.ts +0 -5
- package/dist/templates/_shared/lib/theme-active.ts +0 -10
- package/dist/templates/_shared/lib/theme-config.ts +0 -12
- package/dist/templates/_shared/lib/upload.ts +0 -6
package/dist/index.js
CHANGED
|
@@ -1747,16 +1747,7 @@ var AMPLESS_MANAGED_APP_PATHS = [
|
|
|
1747
1747
|
"app/login",
|
|
1748
1748
|
"app/site"
|
|
1749
1749
|
];
|
|
1750
|
-
var AMPLESS_RETIRED_PATHS = [
|
|
1751
|
-
// Retired alongside the in-deploy multi-site drop.
|
|
1752
|
-
"lib/admin-site.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"
|
|
1759
|
-
];
|
|
1750
|
+
var AMPLESS_RETIRED_PATHS = [];
|
|
1760
1751
|
var AMPLESS_PACKAGES = /* @__PURE__ */ new Set([
|
|
1761
1752
|
"ampless",
|
|
1762
1753
|
"@ampless/admin",
|
|
@@ -36,42 +36,31 @@
|
|
|
36
36
|
- `.amplify/` — Amplify CLI の作業ディレクトリ。
|
|
37
37
|
- `pnpm-lock.yaml` / `package-lock.json` — パッケージマネージャーに任せる。
|
|
38
38
|
|
|
39
|
-
##
|
|
39
|
+
## テーマのカスタマイズ
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
`my-` プレフィックスがついているコピーは `npm run update-ampless` で上書きされない。ターゲット名が `my-` で始まらない場合、コマンドは実行を拒否する。
|
|
41
|
+
テーマのカスタマイズ手順 — ベーステーマの選び方、`themes/my-*/`
|
|
42
|
+
へのコピーフロー、Claude Design からの反映、AI 支援の実装、
|
|
43
|
+
レスポンシブの目視確認、Markdown 要素のデザイン方針、よくある失敗
|
|
44
|
+
— は [THEMES.ja.md](./THEMES.ja.md) を参照する。
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
- `themes/my-blog/tokens.css` — 色、タイポグラフィ、スペーシング(`[data-theme='my-blog']` スコープの CSS カスタムプロパティ)。
|
|
49
|
-
- `themes/my-blog/manifest.ts` — 管理 UI(`/admin/sites/<id>/theme`)に公開するフィールドの宣言。
|
|
50
|
-
- `themes/my-blog/pages/` — レイアウト / 構造(Next.js ページモジュール: フィード、サイトマップ、投稿テンプレート)。
|
|
46
|
+
## MCP サーバー(HTTP トランスポート)
|
|
51
47
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
4. 動作確認:
|
|
55
|
-
```bash
|
|
56
|
-
npm run dev # http://localhost:3000
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## MCP サーバー(`@ampless/mcp-server`)
|
|
60
|
-
|
|
61
|
-
エージェントが投稿コンテンツを直接クエリ・編集できる。公開ツール: `list_posts`、`get_post`、`create_post`、`update_post`、`delete_post`、`upload_media`、`get_schema`。
|
|
48
|
+
エージェントが `mcp-handler` Lambda 経由で投稿コンテンツを直接クエリ・編集できる。公開ツール: `list_posts`、`get_post`、`create_post`、`update_post`、`delete_post`、`upload_media`、`get_schema`、`upload_static_bundle`、`list_static_files`、`delete_static_file`、`get_site_context`。
|
|
62
49
|
|
|
63
50
|
登録方法:
|
|
64
51
|
|
|
65
|
-
|
|
52
|
+
1. 管理画面の `/admin/mcp-tokens` で Bearer トークンを発行する。
|
|
53
|
+
2. Amplify コンソールまたは `amplify_outputs.json` で `mcp-handler` の Function URL を確認する。
|
|
54
|
+
3. プロジェクトルートの `.mcp.json` に追加する:
|
|
55
|
+
|
|
66
56
|
```json
|
|
67
57
|
{
|
|
68
58
|
"mcpServers": {
|
|
69
59
|
"ampless": {
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"AMPLESS_MCP_PASSWORD": "<your-admin-password>"
|
|
60
|
+
"url": "https://<function-url-id>.lambda-url.<region>.on.aws/",
|
|
61
|
+
"transport": "http",
|
|
62
|
+
"headers": {
|
|
63
|
+
"Authorization": "Bearer amk_..."
|
|
75
64
|
}
|
|
76
65
|
}
|
|
77
66
|
}
|
|
@@ -99,6 +88,7 @@ UI / テーマを変更した場合、型チェックだけを根拠にタスク
|
|
|
99
88
|
|
|
100
89
|
## 参照先
|
|
101
90
|
|
|
91
|
+
- `THEMES.ja.md` — テーマカスタマイズの実務ガイド(ベーステーマの選び方、Claude Design からの反映、AI への依頼、ブラウザ確認、Markdown 要素のスタイリング、よくある失敗)。
|
|
102
92
|
- `README.ja.md` — サイト運営者向けの日常利用ガイド。
|
|
103
93
|
- `RUNBOOK.ja.md` — 定期的な運用手順(キーローテーション、バックアップ復元など)。
|
|
104
94
|
- `themes/<name>/README.ja.md` — テーマごとのカスタマイズ詳細。
|
|
@@ -36,42 +36,31 @@ This file is written for AI coding agents (Claude Code, Cursor, Codex, etc.). Fo
|
|
|
36
36
|
- `.amplify/` — Amplify CLI working directory.
|
|
37
37
|
- `pnpm-lock.yaml` / `package-lock.json` — let the package manager update these.
|
|
38
38
|
|
|
39
|
-
##
|
|
39
|
+
## Theme customization
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
The `my-` prefix marks the copy as user-owned so `npm run update-ampless` leaves it alone. The target name must start with `my-` or the command refuses to run.
|
|
41
|
+
For theme customization workflows — choosing a base theme, the
|
|
42
|
+
standard copy-and-edit flow, Claude Design handoff, AI-assisted
|
|
43
|
+
implementation, responsive visual QA, Markdown styling expectations,
|
|
44
|
+
and the common failure modes — see [THEMES.md](./THEMES.md).
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
- `themes/my-blog/tokens.css` — colours, typography, spacing (CSS custom properties scoped under `[data-theme='my-blog']`).
|
|
49
|
-
- `themes/my-blog/manifest.ts` — declare which fields are exposed in the admin UI (`/admin/sites/<id>/theme`).
|
|
50
|
-
- `themes/my-blog/pages/` — layout / structure (Next.js page modules: feed, sitemap, post templates).
|
|
46
|
+
## MCP server (HTTP transport)
|
|
51
47
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
4. Verify:
|
|
55
|
-
```bash
|
|
56
|
-
npm run dev # http://localhost:3000
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## MCP server (`@ampless/mcp-server`)
|
|
60
|
-
|
|
61
|
-
Lets agents query and modify post content directly. Tools exposed: `list_posts`, `get_post`, `create_post`, `update_post`, `delete_post`, `upload_media`, `get_schema`.
|
|
48
|
+
Lets agents query and modify post content directly via the `mcp-handler` Lambda. Tools exposed: `list_posts`, `get_post`, `create_post`, `update_post`, `delete_post`, `upload_media`, `get_schema`, `upload_static_bundle`, `list_static_files`, `delete_static_file`, `get_site_context`.
|
|
62
49
|
|
|
63
50
|
Registration:
|
|
64
51
|
|
|
65
|
-
|
|
52
|
+
1. Issue a Bearer token from `/admin/mcp-tokens` in the admin UI.
|
|
53
|
+
2. Find the `mcp-handler` Function URL in the Amplify console or `amplify_outputs.json`.
|
|
54
|
+
3. Add to `.mcp.json` at the project root:
|
|
55
|
+
|
|
66
56
|
```json
|
|
67
57
|
{
|
|
68
58
|
"mcpServers": {
|
|
69
59
|
"ampless": {
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"AMPLESS_MCP_PASSWORD": "<your-admin-password>"
|
|
60
|
+
"url": "https://<function-url-id>.lambda-url.<region>.on.aws/",
|
|
61
|
+
"transport": "http",
|
|
62
|
+
"headers": {
|
|
63
|
+
"Authorization": "Bearer amk_..."
|
|
75
64
|
}
|
|
76
65
|
}
|
|
77
66
|
}
|
|
@@ -99,6 +88,7 @@ Do not report a task complete based solely on type checks if a UI/theme was modi
|
|
|
99
88
|
|
|
100
89
|
## See also
|
|
101
90
|
|
|
91
|
+
- `THEMES.md` — theme customization workflows (base-theme selection, Claude Design handoff, AI prompts, browser QA, Markdown styling, common pitfalls).
|
|
102
92
|
- `README.md` — day-to-day usage for site owners.
|
|
103
93
|
- `RUNBOOK.md` — occasional ops procedures (key rotation, backup restore, etc.).
|
|
104
94
|
- `themes/<name>/README.md` — per-theme customization details.
|
|
@@ -86,7 +86,13 @@ npm run sandbox
|
|
|
86
86
|
npm run copy-theme
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
インストール済みテーマを `npm run update-ampless` で上書きされない形でカスタマイズしたい場合は、`my-` プレフィックス付きにコピーする:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npm run copy-theme blog my-blog
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
テーマカスタマイズの実務ガイド — ベーステーマの選び方、コピー / 編集 / 切り替えの標準フロー、Claude Design からの反映、AI を使った実装、レスポンシブ確認、Markdown 要素のスタイリング、よくある失敗 — はこのプロジェクト内の [THEMES.ja.md](./THEMES.ja.md)([English](./THEMES.md))に集約しています。
|
|
90
96
|
|
|
91
97
|
## プラグイン
|
|
92
98
|
|
|
@@ -184,9 +190,29 @@ Amplify Hosting アプリの **Domain management** からドメインをバイ
|
|
|
184
190
|
|
|
185
191
|
## AI 連携(MCP)
|
|
186
192
|
|
|
187
|
-
ampless は MCP(Model Context Protocol)サーバーを同梱しているので、Claude Desktop / Cursor / Claude Code など MCP に対応した AI クライアントから投稿の読み書きができます。
|
|
193
|
+
ampless は HTTP トランスポート + Bearer トークン認証による MCP(Model Context Protocol)サーバーを同梱しているので、Claude Desktop / Cursor / Claude Code など MCP に対応した AI クライアントから投稿の読み書きができます。
|
|
194
|
+
|
|
195
|
+
**セットアップ手順:**
|
|
196
|
+
|
|
197
|
+
1. 管理画面の `/admin/mcp-tokens` にアクセスし、Bearer トークン(`amk_...`)を発行する。
|
|
198
|
+
2. Amplify コンソールまたは `amplify_outputs.json` で `mcp-handler` Lambda の Function URL を確認する。
|
|
199
|
+
3. MCP クライアントの設定ファイル(プロジェクトルートの `.mcp.json`、`claude_desktop_config.json` など)にエントリを追加する:
|
|
200
|
+
|
|
201
|
+
```json
|
|
202
|
+
{
|
|
203
|
+
"mcpServers": {
|
|
204
|
+
"ampless": {
|
|
205
|
+
"url": "https://<function-url-id>.lambda-url.<region>.on.aws/",
|
|
206
|
+
"transport": "http",
|
|
207
|
+
"headers": {
|
|
208
|
+
"Authorization": "Bearer amk_..."
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
```
|
|
188
214
|
|
|
189
|
-
|
|
215
|
+
MCP のセットアップとトークン管理の詳細については [docs/architecture/04-access-layer-mcp.md](./docs/architecture/04-access-layer-mcp.md) を参照してください。
|
|
190
216
|
|
|
191
217
|
## ampless の更新
|
|
192
218
|
|
|
@@ -86,7 +86,13 @@ To install another official theme into this project:
|
|
|
86
86
|
npm run copy-theme
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
To
|
|
89
|
+
To customize an installed theme without losing the customization on `npm run update-ampless`, copy it under the `my-` prefix:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npm run copy-theme blog my-blog
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The full working guide for theme customization — base-theme selection, the standard copy / edit / activate flow, Claude Design handoff, AI-assisted implementation, responsive QA, Markdown styling, and the common pitfalls — lives in [THEMES.md](./THEMES.md) (and [THEMES.ja.md](./THEMES.ja.md)) right in this project.
|
|
90
96
|
|
|
91
97
|
## Plugins
|
|
92
98
|
|
|
@@ -184,9 +190,29 @@ Bind a domain to your Amplify Hosting app in **Domain management** — Amplify p
|
|
|
184
190
|
|
|
185
191
|
## AI integration (MCP)
|
|
186
192
|
|
|
187
|
-
ampless ships an MCP (Model Context Protocol) server so Claude Desktop / Cursor / Claude Code / anything that speaks MCP can read and write your posts.
|
|
193
|
+
ampless ships an MCP (Model Context Protocol) server so Claude Desktop / Cursor / Claude Code / anything that speaks MCP can read and write your posts via HTTP transport with Bearer token authentication.
|
|
194
|
+
|
|
195
|
+
**Setup:**
|
|
196
|
+
|
|
197
|
+
1. Go to `/admin/mcp-tokens` in your admin UI and issue a Bearer token (`amk_...`).
|
|
198
|
+
2. Find the `mcp-handler` Lambda Function URL in your Amplify console or `amplify_outputs.json`.
|
|
199
|
+
3. Add an entry to your MCP client's config (`.mcp.json` at the project root, `claude_desktop_config.json`, etc.):
|
|
200
|
+
|
|
201
|
+
```json
|
|
202
|
+
{
|
|
203
|
+
"mcpServers": {
|
|
204
|
+
"ampless": {
|
|
205
|
+
"url": "https://<function-url-id>.lambda-url.<region>.on.aws/",
|
|
206
|
+
"transport": "http",
|
|
207
|
+
"headers": {
|
|
208
|
+
"Authorization": "Bearer amk_..."
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
```
|
|
188
214
|
|
|
189
|
-
|
|
215
|
+
See [docs/architecture/04-access-layer-mcp.md](./docs/architecture/04-access-layer-mcp.md) for the full MCP setup and token management guide.
|
|
190
216
|
|
|
191
217
|
## Updating ampless
|
|
192
218
|
|