asherah 4.0.36 → 4.0.38

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.md CHANGED
@@ -14,6 +14,18 @@ npm install asherah
14
14
 
15
15
  Requires Node.js >= 18.
16
16
 
17
+ ## Documentation
18
+
19
+ Task-oriented walkthroughs under [`docs/`](./docs/):
20
+
21
+ | Guide | When to read |
22
+ |---|---|
23
+ | [Getting started](./docs/getting-started.md) | First-time install through round-trip encrypt/decrypt. |
24
+ | [Framework integration](./docs/framework-integration.md) | Express, Fastify, NestJS, Koa, AWS Lambda, worker patterns. |
25
+ | [AWS production setup](./docs/aws-production-setup.md) | KMS keys, DynamoDB, IAM policy, region routing. |
26
+ | [Testing](./docs/testing.md) | Jest/Vitest fixtures, Testcontainers, mocking patterns. |
27
+ | [Troubleshooting](./docs/troubleshooting.md) | Common errors with what to check first. |
28
+
17
29
  ## Choosing an API style
18
30
 
19
31
  Two API styles are exposed; both are fully supported and produce the same
@@ -201,6 +213,7 @@ SDK) — both are auto-mapped. Pass to `setup()`, `setupAsync()`, or the
201
213
  | `sessionCacheDuration` | `number` | | Session cache TTL in seconds. |
202
214
  | `regionMap` | `Record<string, string>` | | AWS KMS multi-region key ARN map. |
203
215
  | `preferredRegion` | `string` | | Preferred AWS region from `regionMap`. |
216
+ | `awsProfileName` | `string` | | AWS credentials profile name for KMS/DynamoDB/Secrets Manager clients. |
204
217
  | `enableRegionSuffix` | `boolean` | | Append AWS region suffix to key IDs. |
205
218
  | `expireAfter` | `number` | 90 days | Intermediate-key expiration in seconds. |
206
219
  | `checkInterval` | `number` | 60 minutes | Revoke-check interval in seconds. |
package/index.d.ts CHANGED
@@ -92,6 +92,8 @@ export type AsherahConfig = {
92
92
  regionMap?: Record<string, string> | null;
93
93
  /** Preferred AWS region when `regionMap` is set. */
94
94
  preferredRegion?: string | null;
95
+ /** AWS shared-credentials profile name (typically from `~/.aws/credentials`); forwarded to the Rust aws-config loader for KMS, DynamoDB, and Secrets Manager clients. Omit to use the default credential chain. */
96
+ awsProfileName?: string | null;
95
97
  /** Append the AWS region as a suffix to the key ID. */
96
98
  enableRegionSuffix?: boolean | null;
97
99
 
@@ -139,6 +141,7 @@ export type AsherahConfigCompat = {
139
141
  readonly KMS?: 'aws' | 'static' | 'test-debug-static' | null;
140
142
  readonly RegionMap?: Record<string, string> | null;
141
143
  readonly PreferredRegion?: string | null;
144
+ readonly AwsProfileName?: string | null;
142
145
  readonly EnableRegionSuffix?: boolean | null;
143
146
  readonly EnableSessionCaching?: boolean | null;
144
147
  readonly Verbose?: boolean | null;
package/npm/index.js CHANGED
@@ -116,6 +116,7 @@ const CONFIG_MAP = {
116
116
  KMS: 'kms',
117
117
  RegionMap: 'regionMap',
118
118
  PreferredRegion: 'preferredRegion',
119
+ AwsProfileName: 'awsProfileName',
119
120
  EnableRegionSuffix: 'enableRegionSuffix',
120
121
  EnableSessionCaching: 'enableSessionCaching',
121
122
  Verbose: 'verbose',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asherah",
3
- "version": "4.0.36",
3
+ "version": "4.0.38",
4
4
  "private": false,
5
5
  "description": "Asherah application-layer encryption for Node.js with automatic key rotation, powered by the native Rust implementation.",
6
6
  "author": "Jay Gowdy",
@@ -70,13 +70,13 @@
70
70
  "node": ">= 18"
71
71
  },
72
72
  "optionalDependencies": {
73
- "asherah-darwin-arm64": "4.0.36",
74
- "asherah-darwin-x64": "4.0.36",
75
- "asherah-linux-x64-gnu": "4.0.36",
76
- "asherah-linux-arm64-gnu": "4.0.36",
77
- "asherah-linux-x64-musl": "4.0.36",
78
- "asherah-linux-arm64-musl": "4.0.36",
79
- "asherah-windows-x64": "4.0.36",
80
- "asherah-windows-arm64": "4.0.36"
73
+ "asherah-darwin-arm64": "4.0.38",
74
+ "asherah-darwin-x64": "4.0.38",
75
+ "asherah-linux-x64-gnu": "4.0.38",
76
+ "asherah-linux-arm64-gnu": "4.0.38",
77
+ "asherah-linux-x64-musl": "4.0.38",
78
+ "asherah-linux-arm64-musl": "4.0.38",
79
+ "asherah-windows-x64": "4.0.38",
80
+ "asherah-windows-arm64": "4.0.38"
81
81
  }
82
82
  }