wirejs-deploy-amplify-basic 0.0.144-payments → 0.0.146-payments
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.
|
@@ -136,8 +136,6 @@ function byPathLength(a: Endpoint, b: Endpoint) {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
export const handler: LambdaFunctionURLHandler = async (event) => {
|
|
139
|
-
console.log('handling', event.rawPath, event.headers, event.body);
|
|
140
|
-
|
|
141
139
|
const calls = JSON.parse(event.body!);
|
|
142
140
|
const wjsContext = createContext(event);
|
|
143
141
|
const path = wjsContext.location.pathname;
|
|
@@ -306,7 +306,7 @@ async function proxyRequest(context, res, targetUrl) {
|
|
|
306
306
|
...context.requestHeaders,
|
|
307
307
|
'x-wirejs-location': context.location.toString()
|
|
308
308
|
};
|
|
309
|
-
const body = context.
|
|
309
|
+
const body = context.requestBody;
|
|
310
310
|
|
|
311
311
|
try {
|
|
312
312
|
const response = await fetch(targetUrl, { method, headers, body });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { env } from 'process';
|
|
2
2
|
import { DynamoDBClient, } from '@aws-sdk/client-dynamodb';
|
|
3
|
-
import { PutCommand, GetCommand, QueryCommand, ScanCommand, DeleteCommand, } from '@aws-sdk/lib-dynamodb';
|
|
3
|
+
import { DynamoDBDocumentClient, PutCommand, GetCommand, QueryCommand, ScanCommand, DeleteCommand, } from '@aws-sdk/lib-dynamodb';
|
|
4
4
|
import { Resource, indexName } from 'wirejs-resources';
|
|
5
5
|
import { addResource } from '../resource-collector.js';
|
|
6
6
|
function fieldAlias(name) {
|
|
@@ -126,7 +126,9 @@ export class DistributedTable extends Resource {
|
|
|
126
126
|
this.parse = options.parse;
|
|
127
127
|
this.key = options.key;
|
|
128
128
|
this.indexes = options.indexes;
|
|
129
|
-
this.ddbClient = new DynamoDBClient()
|
|
129
|
+
this.ddbClient = DynamoDBDocumentClient.from(new DynamoDBClient(), {
|
|
130
|
+
marshallOptions: { removeUndefinedValues: true }
|
|
131
|
+
});
|
|
130
132
|
this.table = env['TABLE_NAME_PREFIX'] + this.absoluteId.replace(/[^a-zA-Z0-9-_]/g, '_');
|
|
131
133
|
const resourceDefinition = {
|
|
132
134
|
absoluteId: this.absoluteId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wirejs-deploy-amplify-basic",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.146-payments",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"recursive-copy": "^2.0.14",
|
|
43
43
|
"rimraf": "^6.0.1",
|
|
44
44
|
"wirejs-dom": "^1.0.42",
|
|
45
|
-
"wirejs-resources": "^0.1.
|
|
45
|
+
"wirejs-resources": "^0.1.114-payments"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@aws-amplify/backend": "^1.14.0",
|