asherah 4.0.30 → 4.0.32
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/index.d.ts +9 -0
- package/npm/index.js +39 -4
- package/package.json +10 -10
package/index.d.ts
CHANGED
|
@@ -8,8 +8,14 @@ export type AsherahConfig = {
|
|
|
8
8
|
metastore: 'memory' | 'rdbms' | 'dynamodb';
|
|
9
9
|
connectionString?: string | null;
|
|
10
10
|
replicaReadConsistency?: string | null;
|
|
11
|
+
dynamoDbEndpoint?: string | null;
|
|
12
|
+
dynamoDbRegion?: string | null;
|
|
13
|
+
dynamoDbTableName?: string | null;
|
|
14
|
+
/** @deprecated Use dynamoDbEndpoint */
|
|
11
15
|
dynamoDBEndpoint?: string | null;
|
|
16
|
+
/** @deprecated Use dynamoDbRegion */
|
|
12
17
|
dynamoDBRegion?: string | null;
|
|
18
|
+
/** @deprecated Use dynamoDbTableName */
|
|
13
19
|
dynamoDBTableName?: string | null;
|
|
14
20
|
sessionCacheMaxSize?: number | null;
|
|
15
21
|
sessionCacheDuration?: number | null;
|
|
@@ -19,6 +25,9 @@ export type AsherahConfig = {
|
|
|
19
25
|
enableRegionSuffix?: boolean | null;
|
|
20
26
|
enableSessionCaching?: boolean | null;
|
|
21
27
|
verbose?: boolean | null;
|
|
28
|
+
dynamoDbSigningRegion?: string | null;
|
|
29
|
+
sqlMetastoreDbType?: string | null;
|
|
30
|
+
/** @deprecated Use sqlMetastoreDbType */
|
|
22
31
|
sqlMetastoreDBType?: string | null;
|
|
23
32
|
disableZeroCopy?: boolean | null;
|
|
24
33
|
nullDataCheck?: boolean | null;
|
package/npm/index.js
CHANGED
|
@@ -108,9 +108,9 @@ const CONFIG_MAP = {
|
|
|
108
108
|
CheckInterval: 'checkInterval',
|
|
109
109
|
Metastore: 'metastore',
|
|
110
110
|
ConnectionString: 'connectionString',
|
|
111
|
-
DynamoDBEndpoint: '
|
|
112
|
-
DynamoDBRegion: '
|
|
113
|
-
DynamoDBTableName: '
|
|
111
|
+
DynamoDBEndpoint: 'dynamoDbEndpoint',
|
|
112
|
+
DynamoDBRegion: 'dynamoDbRegion',
|
|
113
|
+
DynamoDBTableName: 'dynamoDbTableName',
|
|
114
114
|
SessionCacheMaxSize: 'sessionCacheMaxSize',
|
|
115
115
|
SessionCacheDuration: 'sessionCacheDuration',
|
|
116
116
|
KMS: 'kms',
|
|
@@ -119,11 +119,29 @@ const CONFIG_MAP = {
|
|
|
119
119
|
EnableRegionSuffix: 'enableRegionSuffix',
|
|
120
120
|
EnableSessionCaching: 'enableSessionCaching',
|
|
121
121
|
Verbose: 'verbose',
|
|
122
|
-
|
|
122
|
+
DynamoDBSigningRegion: 'dynamoDbSigningRegion',
|
|
123
|
+
SQLMetastoreDBType: 'sqlMetastoreDbType',
|
|
123
124
|
ReplicaReadConsistency: 'replicaReadConsistency',
|
|
124
125
|
DisableZeroCopy: 'disableZeroCopy',
|
|
125
126
|
NullDataCheck: 'nullDataCheck',
|
|
126
127
|
EnableCanaries: 'enableCanaries',
|
|
128
|
+
// KMS: AWS
|
|
129
|
+
KmsKeyId: 'kmsKeyId',
|
|
130
|
+
// KMS: Secrets Manager
|
|
131
|
+
SecretsManagerSecretId: 'secretsManagerSecretId',
|
|
132
|
+
// KMS: Vault Transit
|
|
133
|
+
VaultAddr: 'vaultAddr',
|
|
134
|
+
VaultToken: 'vaultToken',
|
|
135
|
+
VaultAuthMethod: 'vaultAuthMethod',
|
|
136
|
+
VaultAuthRole: 'vaultAuthRole',
|
|
137
|
+
VaultAuthMount: 'vaultAuthMount',
|
|
138
|
+
VaultApproleRoleId: 'vaultApproleRoleId',
|
|
139
|
+
VaultApproleSecretId: 'vaultApproleSecretId',
|
|
140
|
+
VaultClientCert: 'vaultClientCert',
|
|
141
|
+
VaultClientKey: 'vaultClientKey',
|
|
142
|
+
VaultK8sTokenPath: 'vaultK8sTokenPath',
|
|
143
|
+
VaultTransitKey: 'vaultTransitKey',
|
|
144
|
+
VaultTransitMount: 'vaultTransitMount',
|
|
127
145
|
};
|
|
128
146
|
|
|
129
147
|
// Legacy/debug metastore aliases (match Go behavior)
|
|
@@ -175,6 +193,23 @@ function normalizeConfig(config) {
|
|
|
175
193
|
out.kms = KMS_ALIASES[lower] || lower;
|
|
176
194
|
}
|
|
177
195
|
|
|
196
|
+
// Normalize DynamoDB field names: dynamoDB* → dynamoDb* (napi-rs convention)
|
|
197
|
+
// Users and docs may use either casing; napi-rs only accepts the latter.
|
|
198
|
+
// napi-rs generates camelCase from Rust snake_case: dynamo_db → dynamoDb.
|
|
199
|
+
// Users may write "DB" (natural) instead of "Db" (napi-rs convention).
|
|
200
|
+
for (const [wrong, right] of [
|
|
201
|
+
['dynamoDBEndpoint', 'dynamoDbEndpoint'],
|
|
202
|
+
['dynamoDBRegion', 'dynamoDbRegion'],
|
|
203
|
+
['dynamoDBTableName', 'dynamoDbTableName'],
|
|
204
|
+
['dynamoDBSigningRegion', 'dynamoDbSigningRegion'],
|
|
205
|
+
['sqlMetastoreDBType', 'sqlMetastoreDbType'],
|
|
206
|
+
]) {
|
|
207
|
+
if (wrong in out && !(right in out)) {
|
|
208
|
+
out[right] = out[wrong];
|
|
209
|
+
delete out[wrong];
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
178
213
|
return out;
|
|
179
214
|
}
|
|
180
215
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "asherah",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.32",
|
|
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",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"test:unit": "node test/roundtrip.js",
|
|
62
62
|
"test:e2e": "node test/e2e-consumer.js",
|
|
63
63
|
"test:e2e-aws": "node test/e2e-aws.js",
|
|
64
|
-
"test:bun": "bun test/roundtrip.js"
|
|
64
|
+
"test:bun": "bun test/roundtrip.js && bun test/e2e-consumer.js && bun test/bun-compat.js"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@napi-rs/cli": "^2.18.0"
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
"node": ">= 18"
|
|
71
71
|
},
|
|
72
72
|
"optionalDependencies": {
|
|
73
|
-
"asherah-darwin-arm64": "4.0.
|
|
74
|
-
"asherah-darwin-x64": "4.0.
|
|
75
|
-
"asherah-linux-x64-gnu": "4.0.
|
|
76
|
-
"asherah-linux-arm64-gnu": "4.0.
|
|
77
|
-
"asherah-linux-x64-musl": "4.0.
|
|
78
|
-
"asherah-linux-arm64-musl": "4.0.
|
|
79
|
-
"asherah-windows-x64": "4.0.
|
|
80
|
-
"asherah-windows-arm64": "4.0.
|
|
73
|
+
"asherah-darwin-arm64": "4.0.32",
|
|
74
|
+
"asherah-darwin-x64": "4.0.32",
|
|
75
|
+
"asherah-linux-x64-gnu": "4.0.32",
|
|
76
|
+
"asherah-linux-arm64-gnu": "4.0.32",
|
|
77
|
+
"asherah-linux-x64-musl": "4.0.32",
|
|
78
|
+
"asherah-linux-arm64-musl": "4.0.32",
|
|
79
|
+
"asherah-windows-x64": "4.0.32",
|
|
80
|
+
"asherah-windows-arm64": "4.0.32"
|
|
81
81
|
}
|
|
82
82
|
}
|