@ampless/backend 1.0.0-alpha.72 → 1.0.0-beta.74

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/README.ja.md CHANGED
@@ -5,14 +5,14 @@
5
5
 
6
6
  [ampless](https://github.com/heavymoons/ampless) 向け Amplify Gen 2 バックエンドファクトリー。IAM / SQS / DynamoDB ストリームの配線、認証 / データ / ストレージの定義、およびすべてのイベント処理 Lambda を `defineAmplessBackend(...)` ひとつのファクトリーにまとめます。
7
7
 
8
- > **プレリリース / アルファ版。** v1.0 まではマイナーバージョンでも破壊的変更が入る可能性があります。
8
+ > **プレリリース / ベータ版。** v1.0 まではマイナーバージョンでも破壊的変更が入る可能性があります。
9
9
 
10
10
  テンプレートから切り出すことで、スキャフォールダーを再実行せずに `npm update @ampless/backend` でアップデートできます。バックエンドのバグ修正やインフラ改善はパッケージ経由で届きます。ユーザー側の `amplify/` ツリーは、ファクトリーを組み合わせる 1〜5 行のシェルだけで済みます。
11
11
 
12
12
  ## インストール
13
13
 
14
14
  ```bash
15
- npm install @ampless/backend@alpha ampless@alpha
15
+ npm install @ampless/backend@beta ampless@beta
16
16
  ```
17
17
 
18
18
  ピア依存: `@aws-amplify/backend`(^1)、`aws-cdk-lib`(^2)。CLI スキャフォールダーがテンプレートの `package.json` に互換バージョンをピン留めします。
package/README.md CHANGED
@@ -5,14 +5,14 @@
5
5
 
6
6
  Amplify Gen 2 backend factories for [ampless](https://github.com/heavymoons/ampless). Bundles the IAM / SQS / DynamoDB-stream wiring, the auth / data / storage definitions, and every event-processing Lambda behind one `defineAmplessBackend(...)` factory.
7
7
 
8
- > **Pre-release / alpha.** Breaking changes possible in any minor version until v1.0.
8
+ > **Pre-release / beta.** Breaking changes possible in any minor version until v1.0.
9
9
 
10
10
  Splitting this out of the template lets you `npm update @ampless/backend` without re-running the scaffolder. Backend bug fixes and infrastructure improvements arrive through the package; the user-side `amplify/` tree becomes a handful of 1–5 line shells that compose the factories.
11
11
 
12
12
  ## Install
13
13
 
14
14
  ```bash
15
- npm install @ampless/backend@alpha ampless@alpha
15
+ npm install @ampless/backend@beta ampless@beta
16
16
  ```
17
17
 
18
18
  Peer dependencies: `@aws-amplify/backend` (^1), `aws-cdk-lib` (^2). The CLI scaffolder pins compatible versions in the template's `package.json`.
@@ -222,7 +222,7 @@ function createProcessorTrustedHandler(opts) {
222
222
  }
223
223
  } else {
224
224
  console.warn(
225
- `[trusted-processor] ${label}: ctx.secret("${key}") \u2014 no encryption key found; returning undefined. Run \`npx create-ampless setup-encryption-key\` and rotate secrets.`
225
+ `[trusted-processor] ${label}: ctx.secret("${key}") \u2014 no encryption key found; returning undefined. Run \`npx create-ampless@beta setup-encryption-key\` and rotate secrets.`
226
226
  );
227
227
  secretCache.set(cacheKey, void 0);
228
228
  return void 0;
@@ -18,13 +18,13 @@ function requireEnv(name) {
18
18
  var _encKeyB64 = process.env.PLUGIN_SECRET_ENCRYPTION_KEY;
19
19
  if (!_encKeyB64) {
20
20
  throw new Error(
21
- "[plugin-secret-handler] PLUGIN_SECRET_ENCRYPTION_KEY env var is not set. Run `npx create-ampless setup-encryption-key` and configure pluginSecretEncryptionKey in defineAmplessBackend()."
21
+ "[plugin-secret-handler] PLUGIN_SECRET_ENCRYPTION_KEY env var is not set. Run `npx create-ampless@beta setup-encryption-key` and configure pluginSecretEncryptionKey in defineAmplessBackend()."
22
22
  );
23
23
  }
24
24
  var _encKeyBuf = Buffer.from(_encKeyB64, "base64");
25
25
  if (_encKeyBuf.byteLength !== 32) {
26
26
  throw new Error(
27
- `[plugin-secret-handler] PLUGIN_SECRET_ENCRYPTION_KEY must encode 32 bytes (got ${_encKeyBuf.byteLength}). Re-run \`npx create-ampless setup-encryption-key\`.`
27
+ `[plugin-secret-handler] PLUGIN_SECRET_ENCRYPTION_KEY must encode 32 bytes (got ${_encKeyBuf.byteLength}). Re-run \`npx create-ampless@beta setup-encryption-key\`.`
28
28
  );
29
29
  }
30
30
  var ENCRYPTION_KEY = _encKeyBuf;
package/dist/index.d.ts CHANGED
@@ -24,7 +24,7 @@ interface DefineAmplessBackendOpts {
24
24
  * and writes only ciphertext to DDB. The admin browser never touches
25
25
  * PluginSecret directly.
26
26
  *
27
- * Generate and commit the key with `npx create-ampless setup-encryption-key`,
27
+ * Generate and commit the key with `npx create-ampless@beta setup-encryption-key`,
28
28
  * then pass it via `pluginSecretEncryptionKey` below. No AWS credentials
29
29
  * required for key provisioning.
30
30
  *
@@ -37,7 +37,7 @@ interface DefineAmplessBackendOpts {
37
37
  * AES-256-GCM encryption key for plugin secret storage (v2.2).
38
38
  *
39
39
  * A base64-encoded 32-byte key generated by
40
- * `npx create-ampless setup-encryption-key` and stored in
40
+ * `npx create-ampless@beta setup-encryption-key` and stored in
41
41
  * `amplify/secrets/encryption-key.ts` (adjacent to `amplify/backend.ts`).
42
42
  *
43
43
  * Example wiring in `amplify/backend.ts`:
package/dist/index.js CHANGED
@@ -31,9 +31,19 @@ function defineAmplessBackend(opts) {
31
31
  cfnBucket.corsConfiguration = {
32
32
  corsRules: [
33
33
  {
34
- allowedMethods: ["GET", "HEAD"],
34
+ allowedMethods: ["GET", "HEAD", "PUT", "POST", "DELETE"],
35
35
  allowedOrigins: ["*"],
36
36
  allowedHeaders: ["*"],
37
+ // multipart upload completion reads part ETags from response
38
+ // headers; expose them so the Amplify Storage SDK can assemble
39
+ // the final object. The other headers are standard AWS request
40
+ // tracing that SDKs may also read.
41
+ exposedHeaders: [
42
+ "ETag",
43
+ "x-amz-server-side-encryption",
44
+ "x-amz-request-id",
45
+ "x-amz-id-2"
46
+ ],
37
47
  maxAge: 3e3
38
48
  }
39
49
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampless/backend",
3
- "version": "1.0.0-alpha.72",
3
+ "version": "1.0.0-beta.74",
4
4
  "description": "Amplify Gen 2 backend factories for ampless: auth, data, storage, event processors, API key renewer",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -69,8 +69,8 @@
69
69
  "@smithy/protocol-http": "^5.4.4",
70
70
  "@smithy/signature-v4": "^5.4.4",
71
71
  "fflate": "^0.8.3",
72
- "@ampless/mcp-server": "1.0.0-alpha.56",
73
- "ampless": "1.0.0-alpha.50"
72
+ "@ampless/mcp-server": "1.0.0-beta.57",
73
+ "ampless": "1.0.0-beta.51"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "@aws-amplify/backend": "^1",