wirejs-deploy-amplify-basic 0.0.69-table-resource → 0.0.70-table-resource
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.
|
@@ -7,8 +7,7 @@ import { Bucket, BlockPublicAccess } from 'aws-cdk-lib/aws-s3';
|
|
|
7
7
|
import { Table, AttributeType, BillingMode } from 'aws-cdk-lib/aws-dynamodb';
|
|
8
8
|
import { api } from './functions/api/resource';
|
|
9
9
|
import { auth } from './auth/resource';
|
|
10
|
-
import {
|
|
11
|
-
import type { TableDefinition } from '../wirejs-resources-overrides/resources/distributed-table';
|
|
10
|
+
import { TableDefinition } from 'wirejs-resources';
|
|
12
11
|
|
|
13
12
|
// @ts-ignore
|
|
14
13
|
import generated from './generated-resources';
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { DynamoDBClient } from '@aws-sdk/client-dynamodb';
|
|
2
|
-
import { AllIndexesByName, KeyCondition, IndexFieldNames, Filter, Index,
|
|
3
|
-
export type TableDefinition = {
|
|
4
|
-
absoluteId: string;
|
|
5
|
-
partitionKey: KeyFieldDefinition;
|
|
6
|
-
sortKey?: KeyFieldDefinition;
|
|
7
|
-
indexes?: Index<any>[];
|
|
8
|
-
};
|
|
2
|
+
import { AllIndexesByName, KeyCondition, IndexFieldNames, Filter, Index, KindaPretty, Parser, RecordKey, Resource, DistributedTable as BaseDistributedTable } from 'wirejs-resources';
|
|
9
3
|
/**
|
|
10
4
|
* A table of records that favors very high *overall* scalability at the expense of
|
|
11
5
|
* scalability *between* partitions. Providers will distribute your data across many
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { env } from 'process';
|
|
2
2
|
import { DynamoDBClient, } from '@aws-sdk/client-dynamodb';
|
|
3
3
|
import { PutCommand, GetCommand, QueryCommand, ScanCommand, DeleteCommand, } from '@aws-sdk/lib-dynamodb';
|
|
4
|
-
import { Resource, indexName
|
|
4
|
+
import { Resource, indexName } from 'wirejs-resources';
|
|
5
5
|
import { addResource } from '../resource-collector.js';
|
|
6
6
|
function isFieldComparison(filter) {
|
|
7
7
|
return !['and', 'or', 'not'].some(key => key in filter);
|
|
@@ -99,6 +99,7 @@ export class DistributedTable extends Resource {
|
|
|
99
99
|
super(scope, id);
|
|
100
100
|
this.parse = options.parse;
|
|
101
101
|
this.key = options.key;
|
|
102
|
+
this.indexes = options.indexes;
|
|
102
103
|
this.ddbClient = new DynamoDBClient();
|
|
103
104
|
this.table = env['TABLE_NAME_PREFIX'] + this.absoluteId.replace(/[^a-zA-Z0-9-_]/g, '_');
|
|
104
105
|
const resourceDefinition = {
|
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.70-table-resource",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"recursive-copy": "^2.0.14",
|
|
33
33
|
"rimraf": "^6.0.1",
|
|
34
34
|
"wirejs-dom": "^1.0.38",
|
|
35
|
-
"wirejs-resources": "^0.1.
|
|
35
|
+
"wirejs-resources": "^0.1.38-table-resource"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@aws-amplify/backend": "^1.14.0",
|