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 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
@@ -0,0 +1,15 @@
1
+ stages:
2
+ - lint
3
+
4
+ lint:
5
+ image: docker.io/node:20-alpine
6
+ stage: lint
7
+ variables:
8
+ ARCH: arm64
9
+ tags:
10
+ - arm64
11
+ before_script:
12
+ - npm ci
13
+ script:
14
+ - npm run format
15
+ - npm run lint
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: string;
17
+ clickType: ClickType;
12
18
  };
13
19
 
14
20
  export type FlicButtonBatteryPayload = FlicButtonPayload & {
@@ -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: string;
21
+ clickType: ClickType;
20
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tering-serieuze-types",
3
- "version": "1.25.0",
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
- "prettier": "^2.8.0"
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",
@@ -26,5 +26,6 @@ export class VerificationResponseDto {
26
26
  verification: {
27
27
  verified: boolean;
28
28
  };
29
+
29
30
  accessToken: string | null;
30
31
  }
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
  }
package/src/k8s.ts CHANGED
@@ -21,6 +21,9 @@ export class Pod {
21
21
 
22
22
  @ApiProperty({ type: Date, nullable: true })
23
23
  createdAt?: Date;
24
+
25
+ @ApiProperty({ type: String })
26
+ node: string;
24
27
  }
25
28
 
26
29
  export class DeletePodDto extends PickType(Pod, ['name'] as const) {}