create-ampless 0.2.0-alpha.24 → 0.2.0-alpha.27

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
@@ -2002,23 +2002,23 @@ async function runUpgradeIn(destDir, sharedDir, opts = {}) {
2002
2002
  const preservedThemes = existingThemes.filter((t) => !shippedThemes.includes(t));
2003
2003
  const obsoleteFiles = await findObsoleteAppFiles(destDir, sharedDir);
2004
2004
  log3.info(
2005
- `replace: ${pc3.green(`\u8FFD\u52A0 ${replaceNew.length}`)} / ${pc3.yellow(`\u66F4\u65B0 ${replaceUpdate.length}`)}`
2005
+ `replace: ${pc3.green(`${replaceNew.length} added`)} / ${pc3.yellow(`${replaceUpdate.length} updated`)}`
2006
2006
  );
2007
- log3.info(`merge: ${pc3.cyan("package.json: ampless deps / managed scripts \u3092\u30C6\u30F3\u30D7\u30EC\u5074\u306B\u5408\u308F\u305B\u308B")}`);
2007
+ log3.info(`merge: ${pc3.cyan("package.json: sync ampless deps and managed scripts with the template")}`);
2008
2008
  if (classification.seed.length > 0) {
2009
2009
  log3.info(
2010
- `seed: ${pc3.green(`\u8FFD\u52A0 ${seedNew.length}`)} / ${pc3.dim(`\u65E2\u5B58\u30D5\u30A1\u30A4\u30EB\u306F\u4E0A\u66F8\u304D\u3057\u306A\u3044: ${seedSkipped.length}`)} (*.custom.ts)`
2010
+ `seed: ${pc3.green(`${seedNew.length} added`)} / ${pc3.dim(`${seedSkipped.length} kept (existing *.custom.ts left untouched)`)}`
2011
2011
  );
2012
2012
  }
2013
2013
  if (themeSyncEnabled) {
2014
2014
  log3.info(
2015
- `themes: ${pc3.cyan(`\u30C7\u30D5\u30A9\u30EB\u30C8\u30C6\u30FC\u30DE\u3092\u540C\u671F: ${shippedThemes.length}`)} / ${pc3.dim(`\u30AB\u30B9\u30BF\u30E0\u30C6\u30FC\u30DE (my-*) \u3092\u4FDD\u6301: ${preservedThemes.length}`)}`
2015
+ `themes: ${pc3.cyan(`${shippedThemes.length} default themes synced`)} / ${pc3.dim(`${preservedThemes.length} custom (my-*) themes preserved`)}`
2016
2016
  );
2017
2017
  }
2018
2018
  if (obsoleteFiles.length > 0) {
2019
- log3.info(`cleanup: ${pc3.yellow(`\u524A\u9664 ${obsoleteFiles.length}`)} (ampless-managed app/ \u914D\u4E0B\u3067\u30C6\u30F3\u30D7\u30EC\u306B\u7121\u3044\u30D5\u30A1\u30A4\u30EB)`);
2019
+ log3.info(`cleanup: ${pc3.yellow(`${obsoleteFiles.length} removed`)} (files under ampless-managed app/ paths that no longer exist in the template)`);
2020
2020
  }
2021
- log3.info(`protected: ${pc3.dim(`\u30C6\u30F3\u30D7\u30EC\u306B\u5B58\u5728\u3059\u308B\u304C\u89E6\u3089\u306A\u3044: ${classification.protected.length} \u500B`)}`);
2021
+ log3.info(`protected: ${pc3.dim(`${classification.protected.length} template files left untouched`)}`);
2022
2022
  if (opts.dryRun) {
2023
2023
  return {
2024
2024
  added: replaceNew,
@@ -3,6 +3,7 @@ import { dirname, resolve } from 'node:path'
3
3
  import { a, defineData, type ClientSchema } from '@aws-amplify/backend'
4
4
  import { amplessSchemaModels, defaultAuthorizationModes } from '@ampless/backend'
5
5
  import { userAdmin } from '../functions/user-admin/resource.js'
6
+ import { mcpHandler } from '../functions/mcp-handler/resource.js'
6
7
  import { customSchemaModels } from './resource.custom.js'
7
8
 
8
9
  // AppSync's `a.handler.custom({ entry })` paths are resolved by CDK
@@ -27,7 +28,15 @@ const resolverPaths = {
27
28
  }
28
29
 
29
30
  const schema = a.schema({
30
- ...amplessSchemaModels(a, { resolverPaths, userAdminFunction: userAdmin }),
31
+ ...amplessSchemaModels(a, {
32
+ resolverPaths,
33
+ userAdminFunction: userAdmin,
34
+ // Grants the MCP Lambda IAM auth on Post / PostTag so the HTTP
35
+ // transport can dispatch the post CRUD tools without sharing a
36
+ // Cognito identity or API key. See `@ampless/backend` data/index.ts
37
+ // for the exact authorization clause.
38
+ mcpHandlerFunction: mcpHandler,
39
+ }),
31
40
  ...customSchemaModels(a),
32
41
  })
33
42
 
@@ -27,7 +27,7 @@
27
27
  "@ampless/plugin-seo": "^0.2.0-alpha.6",
28
28
  "@ampless/plugin-webhook": "^0.2.0-alpha.6",
29
29
  "@ampless/admin": "^0.2.0-alpha.21",
30
- "@ampless/backend": "^0.2.0-alpha.10",
30
+ "@ampless/backend": "^0.2.0-alpha.11",
31
31
  "@ampless/runtime": "^0.2.0-alpha.9",
32
32
  "@digital-go-jp/tailwind-theme-plugin": "^0.3.4",
33
33
  "ampless": "^0.2.0-alpha.6",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ampless",
3
- "version": "0.2.0-alpha.24",
3
+ "version": "0.2.0-alpha.27",
4
4
  "description": "Create a new ampless project",
5
5
  "license": "MIT",
6
6
  "type": "module",