@kravc/serverless 0.8.4 → 0.10.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/README.md CHANGED
@@ -14,7 +14,7 @@ files, e.g. `config/serverless-dev.yaml`.
14
14
 
15
15
  ## Scripts
16
16
 
17
- Deploy service to specific environment (e.g. `stg`, default: 'dev'):
17
+ Deploy service to specific environment (e.g. `stg`, default: `dev`):
18
18
 
19
19
  ```sh
20
20
  npx deploy [ENV]
@@ -0,0 +1,55 @@
1
+ import globals from "globals";
2
+ import path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import js from "@eslint/js";
5
+ import { FlatCompat } from "@eslint/eslintrc";
6
+
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = path.dirname(__filename);
9
+ const compat = new FlatCompat({
10
+ baseDirectory: __dirname,
11
+ recommendedConfig: js.configs.recommended,
12
+ allConfig: js.configs.all
13
+ });
14
+
15
+ export default [...compat.extends("eslint:recommended"), {
16
+ languageOptions: {
17
+ globals: {
18
+ ...globals.node,
19
+ ...globals.mocha,
20
+ },
21
+
22
+ ecmaVersion: 2018,
23
+ sourceType: "commonjs",
24
+ },
25
+
26
+ rules: {
27
+ "comma-style": "error",
28
+ "consistent-this": ["error", "_this"],
29
+
30
+ indent: ["error", 2, {
31
+ SwitchCase: 1,
32
+ VariableDeclarator: 2,
33
+ }],
34
+
35
+ "keyword-spacing": "error",
36
+ "no-multi-spaces": "off",
37
+ "no-spaced-func": "error",
38
+ "no-trailing-spaces": "error",
39
+ quotes: ["error", "single"],
40
+ semi: ["error", "never"],
41
+ curly: ["error"],
42
+ "prefer-arrow-callback": "error",
43
+ "space-before-blocks": "error",
44
+
45
+ "space-before-function-paren": [1, {
46
+ anonymous: "always",
47
+ named: "never",
48
+ }],
49
+
50
+ "space-infix-ops": "error",
51
+ "space-unary-ops": "error",
52
+ "no-return-await": "error",
53
+ eqeqeq: "error",
54
+ },
55
+ }];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kravc/serverless",
3
- "version": "0.8.4",
3
+ "version": "0.10.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,18 @@
19
19
  "author": "Alexander Kravets <a@kra.vc>",
20
20
  "license": "ISC",
21
21
  "dependencies": {
22
- "config": "^3.3.9",
22
+ "config": "^4.1.0",
23
23
  "js-yaml": "^4.1.0",
24
- "lodash.get": "^4.4.2",
25
- "serverless": "^3.35.2"
24
+ "lodash": "^4.17.21",
25
+ "serverless": "^4.17.2"
26
26
  },
27
27
  "devDependencies": {
28
- "chai": "^4.3.10",
29
- "eslint": "^8.51.0",
30
- "mocha": "^10.2.0",
31
- "nyc": "^15.1.0"
28
+ "@eslint/eslintrc": "^3.2.0",
29
+ "@eslint/js": "^9.15.0",
30
+ "chai": "^5.1.2",
31
+ "eslint": "^9.15.0",
32
+ "globals": "^15.12.0",
33
+ "mocha": "^10.8.2",
34
+ "nyc": "^17.1.0"
32
35
  }
33
36
  }
package/src/build.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- const get = require('lodash.get')
3
+ const { get } = require('lodash')
4
4
 
5
5
  const NODE_ENV = process.env.NODE_ENV || 'serverless'
6
6
  const INSTANCE = process.env.NODE_APP_INSTANCE || 'localhost'
@@ -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 = 'nodejs18.x'
13
+ const DEFAULT_RUNTIME = 'nodejs22.x'
14
14
 
15
15
  const build = config => {
16
16
  const AWS = get(config, 'aws', {})
package/.eslintrc.yaml DELETED
@@ -1,44 +0,0 @@
1
- extends: 'eslint:recommended'
2
-
3
- parserOptions:
4
- ecmaVersion: 2018
5
-
6
- env:
7
- node: true
8
- mocha: true
9
-
10
- globals:
11
- Promise: true
12
-
13
- rules:
14
- comma-style: error
15
- consistent-this:
16
- - error
17
- - _this
18
- indent:
19
- - error
20
- - 2
21
- - SwitchCase: 1
22
- VariableDeclarator: 2
23
- keyword-spacing: error
24
- no-multi-spaces: off
25
- no-spaced-func: error
26
- no-trailing-spaces: error
27
- quotes:
28
- - error
29
- - single
30
- semi:
31
- - error
32
- - never
33
- curly:
34
- - error
35
- prefer-arrow-callback: error
36
- space-before-blocks: error
37
- space-before-function-paren:
38
- - 1
39
- - anonymous: always
40
- named: never
41
- space-infix-ops: error
42
- space-unary-ops: error
43
- no-return-await: error
44
- eqeqeq: error