@todesktop/shared 7.188.65 → 7.188.67

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/lib/plugin.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare type AjvJSONSchemaType = object;
1
+ type AjvJSONSchemaType = object;
2
2
  export interface DesktopAppPlugin {
3
3
  /**
4
4
  * Configuration gathered from the todesktop plugin.
@@ -11,28 +11,28 @@ export interface DesktopAppPlugin {
11
11
  */
12
12
  package: string;
13
13
  }
14
- export declare type ToDesktopPlugin = {
14
+ export type ToDesktopPlugin = {
15
15
  namespace: string;
16
16
  version: number;
17
17
  main?: string;
18
18
  preload?: string;
19
19
  preferences?: PluginPreferences;
20
20
  };
21
- export declare type PluginPreferences = {
21
+ export type PluginPreferences = {
22
22
  [id: string]: PluginPreference;
23
23
  };
24
- export declare type PluginPreference = NumberSpec | TextSpec | CheckboxSpec;
25
- export declare type TextSpec = PreferenceSpec<'text', {
24
+ export type PluginPreference = NumberSpec | TextSpec | CheckboxSpec;
25
+ export type TextSpec = PreferenceSpec<'text', {
26
26
  validator?: AjvJSONSchemaType;
27
27
  value?: string;
28
28
  placeholder?: string;
29
29
  }>;
30
- export declare type NumberSpec = PreferenceSpec<'number', {
30
+ export type NumberSpec = PreferenceSpec<'number', {
31
31
  validator?: AjvJSONSchemaType;
32
32
  value?: number;
33
33
  placeholder?: number;
34
34
  }>;
35
- export declare type CheckboxSpec = PreferenceSpec<'checkbox', {
35
+ export type CheckboxSpec = PreferenceSpec<'checkbox', {
36
36
  validator?: AjvJSONSchemaType;
37
37
  value?: boolean;
38
38
  }>;
@@ -1,6 +1,6 @@
1
1
  import { BaseApp, Schemable } from './base';
2
2
  import { IAppBuilderLib } from './desktopify';
3
- export declare type IUploadFileStatus = 'error' | 'success' | 'done' | 'uploading' | 'removed';
3
+ export type IUploadFileStatus = 'error' | 'success' | 'done' | 'uploading' | 'removed';
4
4
  export interface IUploadFile {
5
5
  uid: string;
6
6
  size: number;
@@ -25,7 +25,7 @@ export interface IAppIcon {
25
25
  appId: string;
26
26
  icon: IHueIcon;
27
27
  }
28
- export declare type IAppIcons = IAppIcon[];
28
+ export type IAppIcons = IAppIcon[];
29
29
  export interface IAppWindowOptions {
30
30
  startInFullscreenMode: boolean;
31
31
  isResizable: boolean;
@@ -1,2 +1,2 @@
1
- export declare type ValidTranslationKeys = 'updateNotification.title' | 'updateNotification.body';
2
- export declare type ValidTranslationLanguages = 'default';
1
+ export type ValidTranslationKeys = 'updateNotification.title' | 'updateNotification.body';
2
+ export type ValidTranslationLanguages = 'default';
@@ -5,9 +5,9 @@ export declare const appTitleValidation: yup.StringSchema;
5
5
  export declare const forceVersionValidation: yup.StringSchema;
6
6
  export declare const iconValidation: yup.StringSchema;
7
7
  export declare const urlValidation: yup.StringSchema;
8
- export declare const urlValidationForm: yup.ObjectSchema<yup.Shape<object, {
8
+ export declare const urlValidationForm: yup.ObjectSchema<{
9
9
  url: string;
10
- }>>;
10
+ }>;
11
11
  export declare const heightValidation: yup.NumberSchema;
12
12
  export declare const widthValidation: yup.NumberSchema;
13
13
  export declare const internalAppRegexValidation: yup.StringSchema;
@@ -51,4 +51,4 @@ export declare const appConfigValidation: yup.ObjectSchema<{
51
51
  publishedVersions: any;
52
52
  };
53
53
  }>;
54
- export declare const shouldMinimizeToTrayIsActive: <Plugin_1 = DesktopAppPlugin>(desktopApp: DesktopifyApp2<Plugin_1>) => boolean;
54
+ export declare const shouldMinimizeToTrayIsActive: <Plugin = DesktopAppPlugin>(desktopApp: DesktopifyApp2<Plugin>) => boolean;
@@ -133,6 +133,7 @@ exports.appConfigValidation = yup.object({
133
133
  })
134
134
  .required(),
135
135
  });
136
- exports.shouldMinimizeToTrayIsActive = (desktopApp) => {
136
+ const shouldMinimizeToTrayIsActive = (desktopApp) => {
137
137
  return desktopApp.trays.some((t) => t.leftClick.role === 'toggleMenu' || t.rightClick.role === 'toggleMenu');
138
138
  };
139
+ exports.shouldMinimizeToTrayIsActive = shouldMinimizeToTrayIsActive;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todesktop/shared",
3
- "version": "7.188.65",
3
+ "version": "7.188.67",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -26,14 +26,17 @@
26
26
  "yup": "^0.26.10"
27
27
  },
28
28
  "devDependencies": {
29
+ "@eslint/eslintrc": "^3.1.0",
30
+ "@eslint/js": "^9.9.1",
29
31
  "@types/semver": "^7.3.9",
30
- "@typescript-eslint/eslint-plugin": "^5.60.1",
31
- "@typescript-eslint/parser": "^5.60.1",
32
+ "@typescript-eslint/eslint-plugin": "^8.4.0",
33
+ "@typescript-eslint/parser": "^8.4.0",
32
34
  "app-builder-lib": "^22.10.4",
33
- "eslint": "^8.43.0",
35
+ "eslint": "^9.9.1",
34
36
  "eslint-config-prettier": "^8.8.0",
35
37
  "eslint-plugin-prettier": "^4.2.1",
38
+ "globals": "^15.9.0",
36
39
  "prettier": "^2.8.8",
37
- "typescript": "^3.9.10"
40
+ "typescript": "^5.5.4"
38
41
  }
39
42
  }
package/src/base.ts CHANGED
@@ -268,12 +268,7 @@ export interface BaseApp extends Schemable {
268
268
  // this property is dynamically resolved at queueBuild in cloud functions
269
269
  parentApp?: BaseApp;
270
270
  parent?: { id: string; relationshipToParent: string } | null;
271
- subscription?: {
272
- status: string;
273
- subscriptionId: string;
274
- itemId: string;
275
- planId: string;
276
- };
271
+ subscription?: Subscription;
277
272
 
278
273
  // artifacts
279
274
  shouldCreate32BitWindowsArtifacts?: boolean;
@@ -304,3 +299,14 @@ export interface BaseApp extends Schemable {
304
299
  shouldPinToVersion?: boolean;
305
300
  };
306
301
  }
302
+
303
+ export type Subscription = {
304
+ status: string;
305
+ subscriptionId: string;
306
+ itemId: string;
307
+ planId: string;
308
+
309
+ // todo: remove optional qualifier once we complete migration
310
+ productId?: string;
311
+ priceId?: string;
312
+ };