@kravc/serverless 0.11.0 → 1.0.0

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/build.js +7 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kravc/serverless",
3
- "version": "0.11.0",
3
+ "version": "1.0.0",
4
4
  "description": "Serverless configuration builder and deployment tool for @kravc/dos service.",
5
5
  "main": "src/index.js",
6
6
  "repository": {
@@ -16,7 +16,7 @@
16
16
  "info": "bin/info.sh",
17
17
  "logs": "bin/logs.sh"
18
18
  },
19
- "author": "Alexander Kravets <a@kra.vc>",
19
+ "author": "Oleksandr Kravets <a@kra.vc>",
20
20
  "license": "ISC",
21
21
  "dependencies": {
22
22
  "config": "^4.3.0",
package/src/build.js CHANGED
@@ -10,7 +10,7 @@ const { name, version } = require(`${ROOT_PATH}/package.json`);
10
10
  const [ MAJOR_VERSION ] = version.split('.');
11
11
  const DEFAULT_SERVICE = name.replace('@', '').replace('/', '-') + `-v${MAJOR_VERSION}`;
12
12
  const DEFAULT_TABLE = name.replace('@', '').replace('/', '-');
13
- const DEFAULT_RUNTIME = 'nodejs22.x';
13
+ const DEFAULT_RUNTIME = 'nodejs24.x';
14
14
 
15
15
  const build = config => {
16
16
  const AWS = get(config, 'aws', {});
@@ -113,7 +113,12 @@ const build = config => {
113
113
  result.custom = SERVERLESS.custom;
114
114
  }
115
115
 
116
- const TABLES = get(config, 'tables');
116
+ let TABLES = get(config, 'tables');
117
+ const TABLE = get(config, 'dynamodb');
118
+
119
+ if (TABLE) {
120
+ TABLES = { default: TABLE };
121
+ }
117
122
 
118
123
  if (TABLES) {
119
124
  const DEFAULT_TABLE_ACTIONS = [