@kravc/serverless 0.7.5 → 0.8.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.
- package/package.json +6 -6
- package/src/build.js +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kravc/serverless",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Serverless configuration builder and deployment tool for @kravc/dos service.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"author": "Alexander Kravets <a@kra.vc>",
|
|
20
20
|
"license": "ISC",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"config": "^3.3.
|
|
22
|
+
"config": "^3.3.8",
|
|
23
23
|
"js-yaml": "^4.1.0",
|
|
24
24
|
"lodash.get": "^4.4.2",
|
|
25
|
-
"serverless": "^
|
|
25
|
+
"serverless": "^3.25.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"chai": "^4.3.
|
|
29
|
-
"eslint": "^
|
|
30
|
-
"mocha": "^
|
|
28
|
+
"chai": "^4.3.7",
|
|
29
|
+
"eslint": "^8.29.0",
|
|
30
|
+
"mocha": "^10.2.0",
|
|
31
31
|
"nyc": "^15.1.0"
|
|
32
32
|
}
|
|
33
33
|
}
|
package/src/build.js
CHANGED
|
@@ -9,6 +9,8 @@ const ROOT_PATH = process.cwd()
|
|
|
9
9
|
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
|
+
const DEFAULT_TABLE = name.replace('@', '').replace('/', '-')
|
|
13
|
+
const DEFAULT_RUNTIME = 'nodejs18.x'
|
|
12
14
|
|
|
13
15
|
const build = config => {
|
|
14
16
|
const AWS = get(config, 'aws', {})
|
|
@@ -22,7 +24,7 @@ const build = config => {
|
|
|
22
24
|
result.provider = {
|
|
23
25
|
name: 'aws',
|
|
24
26
|
stage: INSTANCE,
|
|
25
|
-
runtime:
|
|
27
|
+
runtime: DEFAULT_RUNTIME,
|
|
26
28
|
environment: {
|
|
27
29
|
NODE_PATH: './',
|
|
28
30
|
NODE_APP_INSTANCE: INSTANCE,
|
|
@@ -125,7 +127,7 @@ const build = config => {
|
|
|
125
127
|
|
|
126
128
|
for (const tableKey in TABLES) {
|
|
127
129
|
const tableConfig = TABLES[tableKey]
|
|
128
|
-
const { name =
|
|
130
|
+
const { name = DEFAULT_TABLE, actions = DEFAULT_TABLE_ACTIONS } = tableConfig
|
|
129
131
|
|
|
130
132
|
const tableName = `${name}-${INSTANCE}`
|
|
131
133
|
|