@todesktop/shared 7.188.78 → 7.188.80
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/base.d.ts +1 -0
- package/lib/validations.d.ts +81 -33
- package/lib/validations.js +2 -1
- package/package.json +3 -4
- package/src/base.ts +1 -0
- package/src/validations.ts +2 -1
package/lib/base.d.ts
CHANGED
package/lib/validations.d.ts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
import { DesktopifyApp2 } from './desktopify2';
|
|
3
3
|
import { DesktopAppPlugin } from './plugin';
|
|
4
|
-
export declare const appTitleValidation: yup.StringSchema
|
|
5
|
-
export declare const forceVersionValidation: yup.StringSchema
|
|
6
|
-
export declare const iconValidation: yup.StringSchema
|
|
7
|
-
export declare const urlValidation: yup.StringSchema
|
|
4
|
+
export declare const appTitleValidation: yup.StringSchema<string, yup.AnyObject, undefined, "">;
|
|
5
|
+
export declare const forceVersionValidation: yup.StringSchema<string, yup.AnyObject, undefined, "">;
|
|
6
|
+
export declare const iconValidation: yup.StringSchema<string, yup.AnyObject, undefined, "">;
|
|
7
|
+
export declare const urlValidation: yup.StringSchema<string, yup.AnyObject, undefined, "">;
|
|
8
8
|
export declare const urlValidationForm: yup.ObjectSchema<{
|
|
9
9
|
url: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
10
|
+
}, yup.AnyObject, {
|
|
11
|
+
url: undefined;
|
|
12
|
+
}, "">;
|
|
13
|
+
export declare const heightValidation: yup.NumberSchema<number, yup.AnyObject, undefined, "">;
|
|
14
|
+
export declare const widthValidation: yup.NumberSchema<number, yup.AnyObject, undefined, "">;
|
|
15
|
+
export declare const internalAppRegexValidation: yup.StringSchema<string, yup.AnyObject, undefined, "">;
|
|
16
|
+
export declare const appProtocolValidation: yup.StringSchema<string, yup.AnyObject, undefined, "">;
|
|
15
17
|
export declare const appConfigValidation: yup.ObjectSchema<{
|
|
16
18
|
id: string;
|
|
17
19
|
name: string;
|
|
@@ -24,31 +26,77 @@ export declare const appConfigValidation: yup.ObjectSchema<{
|
|
|
24
26
|
internalURLs: string;
|
|
25
27
|
secret: string;
|
|
26
28
|
windowOptions: {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
29
|
+
alwaysOnTop?: boolean;
|
|
30
|
+
autoHideMenuBar?: boolean;
|
|
31
|
+
height?: number;
|
|
32
|
+
maxHeight?: number;
|
|
33
|
+
maxWidth?: number;
|
|
34
|
+
minHeight?: number;
|
|
35
|
+
minWidth?: number;
|
|
36
|
+
width?: number;
|
|
37
|
+
startInFullscreenMode?: boolean;
|
|
38
|
+
isResizable?: boolean;
|
|
39
|
+
hasMinWidth?: boolean;
|
|
40
|
+
hasMinHeight?: boolean;
|
|
41
|
+
hasMaxWidth?: boolean;
|
|
42
|
+
hasMaxHeight?: boolean;
|
|
43
|
+
isMaximizable?: boolean;
|
|
44
|
+
isMinimizable?: boolean;
|
|
45
|
+
isFullscreenable?: boolean;
|
|
46
|
+
transparentTitlebar?: boolean;
|
|
47
|
+
transparentInsetTitlebar?: boolean;
|
|
46
48
|
};
|
|
47
49
|
meta: {
|
|
48
|
-
schemaVersion
|
|
49
|
-
hasAppChanged
|
|
50
|
-
appIterations
|
|
51
|
-
publishedVersions
|
|
50
|
+
schemaVersion?: number;
|
|
51
|
+
hasAppChanged?: boolean;
|
|
52
|
+
appIterations?: number;
|
|
53
|
+
publishedVersions?: {
|
|
54
|
+
electron?: string;
|
|
55
|
+
desktopify?: string;
|
|
56
|
+
version?: string;
|
|
57
|
+
};
|
|
52
58
|
};
|
|
53
|
-
}
|
|
59
|
+
}, yup.AnyObject, {
|
|
60
|
+
id: undefined;
|
|
61
|
+
name: undefined;
|
|
62
|
+
url: undefined;
|
|
63
|
+
isFrameBlocked: undefined;
|
|
64
|
+
iconUrl: undefined;
|
|
65
|
+
disableDevTools: undefined;
|
|
66
|
+
singleInstance: undefined;
|
|
67
|
+
customUserAgent: undefined;
|
|
68
|
+
internalURLs: undefined;
|
|
69
|
+
secret: undefined;
|
|
70
|
+
windowOptions: {
|
|
71
|
+
startInFullscreenMode: undefined;
|
|
72
|
+
isResizable: undefined;
|
|
73
|
+
width: undefined;
|
|
74
|
+
height: undefined;
|
|
75
|
+
hasMinWidth: undefined;
|
|
76
|
+
hasMinHeight: undefined;
|
|
77
|
+
hasMaxWidth: undefined;
|
|
78
|
+
hasMaxHeight: undefined;
|
|
79
|
+
minWidth: undefined;
|
|
80
|
+
minHeight: undefined;
|
|
81
|
+
maxWidth: undefined;
|
|
82
|
+
maxHeight: undefined;
|
|
83
|
+
isMaximizable: undefined;
|
|
84
|
+
isMinimizable: undefined;
|
|
85
|
+
isFullscreenable: undefined;
|
|
86
|
+
transparentTitlebar: undefined;
|
|
87
|
+
alwaysOnTop: undefined;
|
|
88
|
+
transparentInsetTitlebar: undefined;
|
|
89
|
+
autoHideMenuBar: undefined;
|
|
90
|
+
};
|
|
91
|
+
meta: {
|
|
92
|
+
schemaVersion: undefined;
|
|
93
|
+
hasAppChanged: undefined;
|
|
94
|
+
appIterations: undefined;
|
|
95
|
+
publishedVersions: {
|
|
96
|
+
electron: undefined;
|
|
97
|
+
desktopify: undefined;
|
|
98
|
+
version: undefined;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
}, "">;
|
|
54
102
|
export declare const shouldMinimizeToTrayIsActive: <Plugin = DesktopAppPlugin>(desktopApp: DesktopifyApp2<Plugin>) => boolean;
|
package/lib/validations.js
CHANGED
|
@@ -29,7 +29,8 @@ exports.forceVersionValidation = yup
|
|
|
29
29
|
.string()
|
|
30
30
|
.label('App version')
|
|
31
31
|
.required()
|
|
32
|
-
|
|
32
|
+
// can have multiple keys included - https://www.npmjs.com/package/yup#schemawhenkeys-string--string-builder-object--values-any-schema--schema-schema
|
|
33
|
+
.when('$currentVersion', ([currentVersion], schema) => schema.test('semantic-version', 'App version must follow a numeric SemVer versioning scheme (e.g. 1.0.0) and be greater than prior version.', (forceVersion) => {
|
|
33
34
|
return (isNumericSemver(forceVersion) &&
|
|
34
35
|
semver.gt(forceVersion, currentVersion));
|
|
35
36
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@todesktop/shared",
|
|
3
|
-
"version": "7.188.
|
|
3
|
+
"version": "7.188.80",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -20,10 +20,9 @@
|
|
|
20
20
|
"@todesktop/client-electron-types": "^27.0.2",
|
|
21
21
|
"@types/debug": "^4.1.1",
|
|
22
22
|
"@types/node": "^16.4.12",
|
|
23
|
-
"@types/yup": "^0.26.9",
|
|
24
23
|
"is-regex": "^1.0.4",
|
|
25
24
|
"semver": "^7.3.5",
|
|
26
|
-
"yup": "^
|
|
25
|
+
"yup": "^1.4.0"
|
|
27
26
|
},
|
|
28
27
|
"devDependencies": {
|
|
29
28
|
"@eslint/eslintrc": "^3.1.0",
|
|
@@ -31,7 +30,7 @@
|
|
|
31
30
|
"@types/semver": "^7.3.9",
|
|
32
31
|
"@typescript-eslint/eslint-plugin": "^8.4.0",
|
|
33
32
|
"@typescript-eslint/parser": "^8.4.0",
|
|
34
|
-
"app-builder-lib": "^
|
|
33
|
+
"app-builder-lib": "^25.1.8",
|
|
35
34
|
"eslint": "^9.9.1",
|
|
36
35
|
"eslint-config-prettier": "^8.8.0",
|
|
37
36
|
"eslint-plugin-prettier": "^4.2.1",
|
package/src/base.ts
CHANGED
package/src/validations.ts
CHANGED
|
@@ -33,7 +33,8 @@ export const forceVersionValidation = yup
|
|
|
33
33
|
.string()
|
|
34
34
|
.label('App version')
|
|
35
35
|
.required()
|
|
36
|
-
|
|
36
|
+
// can have multiple keys included - https://www.npmjs.com/package/yup#schemawhenkeys-string--string-builder-object--values-any-schema--schema-schema
|
|
37
|
+
.when('$currentVersion', ([currentVersion], schema) =>
|
|
37
38
|
schema.test(
|
|
38
39
|
'semantic-version',
|
|
39
40
|
'App version must follow a numeric SemVer versioning scheme (e.g. 1.0.0) and be greater than prior version.',
|