wirejs-deploy-amplify-basic 0.0.145-payments → 0.0.147-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;
|
|
@@ -150,6 +148,7 @@ export const handler: LambdaFunctionURLHandler = async (event) => {
|
|
|
150
148
|
}
|
|
151
149
|
return {
|
|
152
150
|
statusCode: wjsContext.responseCode ?? 200,
|
|
151
|
+
cookies: extractSetCookies(wjsContext),
|
|
153
152
|
headers: {
|
|
154
153
|
...getResponseHeadersFromContext(wjsContext),
|
|
155
154
|
'Content-Type': 'application/json; charset=utf-8'
|
|
@@ -213,6 +212,7 @@ export const handler: LambdaFunctionURLHandler = async (event) => {
|
|
|
213
212
|
const response = await matchingEndpoint.handle(wjsContext);
|
|
214
213
|
return {
|
|
215
214
|
statusCode: wjsContext.responseCode ?? 200,
|
|
215
|
+
cookies: extractSetCookies(wjsContext),
|
|
216
216
|
headers: {
|
|
217
217
|
...getResponseHeadersFromContext(wjsContext),
|
|
218
218
|
},
|
|
@@ -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.147-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.115-payments"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@aws-amplify/backend": "^1.14.0",
|