tering-serieuze-types 1.25.0 → 1.27.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/.eslintrc.js +40 -0
- package/.gitlab-ci.yml +15 -0
- package/dist/index.js +6 -1
- package/index.d.ts +7 -1
- package/interfaces/index.ts +3 -1
- package/package.json +12 -3
- package/src/authenticator.ts +1 -0
- package/src/button.ts +2 -1
- package/src/k8s.ts +3 -0
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
parser: '@typescript-eslint/parser',
|
|
3
|
+
parserOptions: {
|
|
4
|
+
project: 'tsconfig.json',
|
|
5
|
+
tsconfigRootDir: __dirname,
|
|
6
|
+
sourceType: 'module',
|
|
7
|
+
},
|
|
8
|
+
plugins: ['@typescript-eslint/eslint-plugin'],
|
|
9
|
+
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', 'airbnb-base'],
|
|
10
|
+
root: true,
|
|
11
|
+
env: {
|
|
12
|
+
node: true,
|
|
13
|
+
},
|
|
14
|
+
ignorePatterns: ['.eslintrc.js'],
|
|
15
|
+
rules: {
|
|
16
|
+
'@typescript-eslint/interface-name-prefix': 'off',
|
|
17
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
18
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
19
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
20
|
+
indent: ['error', 4, { SwitchCase: 1, ignoredNodes: ['PropertyDefinition'] }],
|
|
21
|
+
'import/prefer-default-export': 'off',
|
|
22
|
+
'no-useless-constructor': 'off',
|
|
23
|
+
'no-empty-function': 'off',
|
|
24
|
+
'no-unused-vars': 'off',
|
|
25
|
+
'import/no-unresolved': 'off',
|
|
26
|
+
'import/extensions': 'off',
|
|
27
|
+
'class-methods-use-this': 'off',
|
|
28
|
+
'no-param-reassign': 'off',
|
|
29
|
+
'no-console': 'off',
|
|
30
|
+
'max-len': ['error', { code: 120 }],
|
|
31
|
+
'no-underscore-dangle': 'off',
|
|
32
|
+
'no-shadow': 'off',
|
|
33
|
+
'object-curly-newline': 'off',
|
|
34
|
+
'import/no-extraneous-dependencies': 'off',
|
|
35
|
+
'arrow-body-style': 'off',
|
|
36
|
+
|
|
37
|
+
// tering-serieuze-types specific
|
|
38
|
+
'max-classes-per-file': 'off',
|
|
39
|
+
},
|
|
40
|
+
};
|
package/.gitlab-ci.yml
ADDED
package/dist/index.js
CHANGED
|
@@ -119,6 +119,9 @@ __decorateClass([
|
|
|
119
119
|
var VerificationResponseDto = class {
|
|
120
120
|
};
|
|
121
121
|
|
|
122
|
+
// src/button.ts
|
|
123
|
+
var import_swagger5 = require("@nestjs/swagger");
|
|
124
|
+
|
|
122
125
|
// src/user.ts
|
|
123
126
|
var import_swagger4 = require("@nestjs/swagger");
|
|
124
127
|
var import_class_validator = require("class-validator");
|
|
@@ -264,7 +267,6 @@ __decorateClass([
|
|
|
264
267
|
], ToggleBoolDto.prototype, "field", 2);
|
|
265
268
|
|
|
266
269
|
// src/button.ts
|
|
267
|
-
var import_swagger5 = require("@nestjs/swagger");
|
|
268
270
|
var WebsocketAction = class {
|
|
269
271
|
};
|
|
270
272
|
__decorateClass([
|
|
@@ -382,6 +384,9 @@ __decorateClass([
|
|
|
382
384
|
__decorateClass([
|
|
383
385
|
(0, import_swagger8.ApiProperty)({ type: Date, nullable: true })
|
|
384
386
|
], Pod.prototype, "createdAt", 2);
|
|
387
|
+
__decorateClass([
|
|
388
|
+
(0, import_swagger8.ApiProperty)({ type: String })
|
|
389
|
+
], Pod.prototype, "node", 2);
|
|
385
390
|
var DeletePodDto = class extends (0, import_swagger8.PickType)(Pod, ["name"]) {
|
|
386
391
|
};
|
|
387
392
|
|
package/index.d.ts
CHANGED
|
@@ -3,12 +3,18 @@ import { City } from './src';
|
|
|
3
3
|
export * from './interfaces';
|
|
4
4
|
export * from './src';
|
|
5
5
|
|
|
6
|
+
export enum ClickType {
|
|
7
|
+
SINGLE = 'ButtonSingleClick',
|
|
8
|
+
DOUBLE = 'ButtonDoubleClick',
|
|
9
|
+
HOLD = 'ButtonHold',
|
|
10
|
+
}
|
|
11
|
+
|
|
6
12
|
export type FlicButtonPayload = {
|
|
7
13
|
bdAddr: string;
|
|
8
14
|
};
|
|
9
15
|
|
|
10
16
|
export type FlicButtonClickPayload = FlicButtonPayload & {
|
|
11
|
-
clickType:
|
|
17
|
+
clickType: ClickType;
|
|
12
18
|
};
|
|
13
19
|
|
|
14
20
|
export type FlicButtonBatteryPayload = FlicButtonPayload & {
|
package/interfaces/index.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ClickType } from '../index';
|
|
2
|
+
|
|
1
3
|
export * from './mopidy';
|
|
2
4
|
export * from './webamp';
|
|
3
5
|
|
|
@@ -16,5 +18,5 @@ export interface SaveButtonEventDto {
|
|
|
16
18
|
|
|
17
19
|
export interface HandleClickDto {
|
|
18
20
|
bdAddr: string;
|
|
19
|
-
clickType:
|
|
21
|
+
clickType: ClickType;
|
|
20
22
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tering-serieuze-types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.0",
|
|
4
4
|
"description": "Tering serieuze types",
|
|
5
5
|
"author": "Frank",
|
|
6
6
|
"repository": {
|
|
@@ -8,14 +8,23 @@
|
|
|
8
8
|
"url": "https://gitlab.com/tering-serieuze-shit/tering-serieuze-types.git"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
+
"prebuild": "npm run lint && npm run format",
|
|
11
12
|
"build": "esbuild src/index.ts --bundle --platform=node --outfile=dist/index.js --packages=external",
|
|
12
|
-
"version": "npm run build && git add -A dist"
|
|
13
|
+
"version": "npm run build && git add -A dist",
|
|
14
|
+
"lint": "eslint \"{src,interfaces}/**/*.ts\"",
|
|
15
|
+
"format": "prettier \"src/**/*.ts\" \"interfaces/**/*.ts\" --check"
|
|
13
16
|
},
|
|
14
17
|
"main": "dist/index.js",
|
|
15
18
|
"types": "index.d.ts",
|
|
16
19
|
"devDependencies": {
|
|
20
|
+
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
|
21
|
+
"@typescript-eslint/parser": "^7.7.0",
|
|
17
22
|
"esbuild": "^0.16.10",
|
|
18
|
-
"
|
|
23
|
+
"eslint": "^8.57.0",
|
|
24
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
25
|
+
"eslint-config-prettier": "^9.1.0",
|
|
26
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
27
|
+
"prettier": "^3.2.5"
|
|
19
28
|
},
|
|
20
29
|
"dependencies": {
|
|
21
30
|
"@nestjs/swagger": "^7.1.16",
|
package/src/authenticator.ts
CHANGED
package/src/button.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { User } from './user';
|
|
2
1
|
import { ApiProperty } from '@nestjs/swagger';
|
|
2
|
+
import { User } from './user';
|
|
3
3
|
|
|
4
4
|
export class WebsocketAction {
|
|
5
5
|
@ApiProperty({ type: String })
|
|
@@ -37,5 +37,6 @@ export class Button {
|
|
|
37
37
|
@ApiProperty({ type: Number, nullable: true })
|
|
38
38
|
batteryState?: number;
|
|
39
39
|
|
|
40
|
+
// eslint-disable-next-line no-undef
|
|
40
41
|
[key: string]: any;
|
|
41
42
|
}
|