@todesktop/shared 7.184.18 → 7.184.19

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,33 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ root: true,
5
+
6
+ extends: [
7
+ 'eslint:recommended',
8
+ 'plugin:@typescript-eslint/recommended',
9
+ 'prettier',
10
+ ],
11
+
12
+ parser: '@typescript-eslint/parser',
13
+ parserOptions: {
14
+ ecmaVersion: 2020,
15
+ sourceType: 'module',
16
+ project: './tsconfig.json',
17
+ },
18
+
19
+ env: {
20
+ es6: true,
21
+ node: true,
22
+ },
23
+
24
+ plugins: ['@typescript-eslint', 'prettier'],
25
+
26
+ rules: {
27
+ 'prettier/prettier': 'error',
28
+ '@typescript-eslint/no-misused-promises': [
29
+ 'error',
30
+ { checksVoidReturn: false },
31
+ ],
32
+ },
33
+ };
@@ -1,7 +1,7 @@
1
1
  on:
2
2
  push:
3
3
  branches:
4
- - master
4
+ - master
5
5
 
6
6
  jobs:
7
7
  release:
@@ -9,23 +9,23 @@ jobs:
9
9
  runs-on: ubuntu-latest
10
10
  if: "!contains(github.event.head_commit.message, '#no-publish')"
11
11
  steps:
12
- - uses: actions/checkout@v3
13
- - uses: actions/setup-node@v3
14
- - run: npm ci
12
+ - uses: actions/checkout@v3
13
+ - uses: actions/setup-node@v3
14
+ - run: npm ci
15
15
 
16
- - name: Bump version
17
- run: |
18
- current_ver="$(node -p -e "require('./package.json').version")"
19
- npm_ver="$(npm view @todesktop/shared version)"
20
- latest_ver="$(npx semver "${current_ver}" ${npm_ver} | tail -n 1)"
21
-
22
- if [ "${current_ver}" != "${latest_ver}" ]; then
23
- npm version "${latest_ver}" --no-git-tag-version -f
24
- fi
25
-
26
- npm version --no-git-tag-version patch
16
+ - name: Bump version
17
+ run: |
18
+ current_ver="$(node -p -e "require('./package.json').version")"
19
+ npm_ver="$(npm view @todesktop/shared version)"
20
+ latest_ver="$(npx semver "${current_ver}" ${npm_ver} | tail -n 1)"
27
21
 
28
- - name: Publish
29
- run: |
30
- npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_AUTH_TOKEN }}"
31
- npm publish
22
+ if [ "${current_ver}" != "${latest_ver}" ]; then
23
+ npm version "${latest_ver}" --no-git-tag-version -f
24
+ fi
25
+
26
+ npm version --no-git-tag-version patch
27
+
28
+ - name: Publish
29
+ run: |
30
+ npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_AUTH_TOKEN }}"
31
+ npm publish
@@ -0,0 +1,14 @@
1
+ name: Test
2
+
3
+ on:
4
+ - push
5
+
6
+ jobs:
7
+ test:
8
+ name: Test
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v3
12
+ - uses: actions/setup-node@v3
13
+ - run: npm ci
14
+ - run: npm run lint
@@ -0,0 +1,3 @@
1
+ .vscode
2
+ lib
3
+ node_modules
package/.prettierrc ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "tabWidth": 2,
3
+ "semi": true,
4
+ "singleQuote": true
5
+ }
package/lib/base.d.ts CHANGED
@@ -1,37 +1,37 @@
1
- import { ExtraFileReference, FilePath, IAppBuilderLib, Release } from "./desktopify";
1
+ import { ExtraFileReference, FilePath, IAppBuilderLib, Release } from './desktopify';
2
2
  export interface Schemable {
3
3
  schemaVersion?: number;
4
4
  }
5
- export declare type ProgressTypes = "progress" | "done" | "error";
5
+ export declare type ProgressTypes = 'progress' | 'done' | 'error';
6
6
  export interface IChecklistItem {
7
7
  [id: string]: boolean;
8
8
  }
9
9
  export interface IDownloadButtonOptions {
10
- buttonSize: "small" | "medium" | "large";
11
- fontFamily: "serif" | "sans-serif";
10
+ buttonSize: 'small' | 'medium' | 'large';
11
+ fontFamily: 'serif' | 'sans-serif';
12
12
  bgColor: string;
13
13
  fgColor: string;
14
14
  borderRadius: number;
15
15
  showAppIcon: {
16
16
  enabled: boolean;
17
- alignment: "right" | "left";
17
+ alignment: 'right' | 'left';
18
18
  };
19
19
  showDownloadIcon: {
20
20
  enabled: boolean;
21
- alignment: "right" | "left";
21
+ alignment: 'right' | 'left';
22
22
  };
23
23
  btnText: string;
24
24
  }
25
25
  export declare enum WindowsEVOnboardingSteps {
26
- "hasChosenProvider" = "hasChosenProvider",
27
- "hasOrderedCert" = "hasOrderedCert",
28
- "hasBeenVerified" = "hasBeenVerified",
29
- "hasGeneratedCert" = "hasGeneratedCert",
30
- "hasUploadedCert" = "hasUploadedCert"
26
+ 'hasChosenProvider' = "hasChosenProvider",
27
+ 'hasOrderedCert' = "hasOrderedCert",
28
+ 'hasBeenVerified' = "hasBeenVerified",
29
+ 'hasGeneratedCert' = "hasGeneratedCert",
30
+ 'hasUploadedCert' = "hasUploadedCert"
31
31
  }
32
32
  export declare enum WindowsEVOnboardingProvider {
33
- "globalsign" = "globalsign",
34
- "other" = "other"
33
+ 'globalsign' = "globalsign",
34
+ 'other' = "other"
35
35
  }
36
36
  export interface IAppBuildProgress {
37
37
  isBuilding: boolean;
@@ -46,7 +46,7 @@ export interface IAppMeta {
46
46
  currentBuildProgress?: {
47
47
  channel?: string;
48
48
  id?: string;
49
- releaseId?: Release["id"];
49
+ releaseId?: Release['id'];
50
50
  linux?: IAppBuildProgress;
51
51
  mac?: IAppBuildProgress;
52
52
  projectConfig?: {
@@ -65,14 +65,14 @@ export interface IAppMeta {
65
65
  iconSize?: number;
66
66
  iconTextSize?: number;
67
67
  title?: string;
68
- contents?: IAppBuilderLib["config"]["dmg"]["contents"];
69
- window?: IAppBuilderLib["config"]["dmg"]["window"];
68
+ contents?: IAppBuilderLib['config']['dmg']['contents'];
69
+ window?: IAppBuilderLib['config']['dmg']['window'];
70
70
  };
71
71
  extraContentFiles?: ExtraFileReference[];
72
72
  electronMirror?: string;
73
73
  electronVersion?: string;
74
74
  extraResources?: ExtraFileReference[];
75
- fileAssociations?: IAppBuilderLib["config"]["fileAssociations"];
75
+ fileAssociations?: IAppBuilderLib['config']['fileAssociations'];
76
76
  filesForDistribution?: string[];
77
77
  icon: FilePath;
78
78
  id: string;
@@ -86,14 +86,14 @@ export interface IAppMeta {
86
86
  category?: string;
87
87
  dmgBackground?: FilePath;
88
88
  entitlements?: FilePath;
89
- extendInfo?: IAppBuilderLib["config"]["mac"]["extendInfo"];
89
+ extendInfo?: IAppBuilderLib['config']['mac']['extendInfo'];
90
90
  icon?: FilePath;
91
91
  };
92
92
  nodeVersion?: string;
93
- packageManager?: "npm" | "yarn" | "pnpm";
93
+ packageManager?: 'npm' | 'yarn' | 'pnpm';
94
94
  productName?: string;
95
95
  schemaVersion: number;
96
- snap?: IAppBuilderLib["config"]["snap"];
96
+ snap?: IAppBuilderLib['config']['snap'];
97
97
  windows?: {
98
98
  icon?: FilePath;
99
99
  nsisCustomBinary?: {
@@ -153,7 +153,7 @@ export interface CustomWindowsCodeSignFile {
153
153
  certUrl?: URL;
154
154
  }
155
155
  export interface CustomWindowsCodeSignEV {
156
- certType: "hsm";
156
+ certType: 'hsm';
157
157
  hsmCertType: WindowsHSMCertType.ev;
158
158
  hsmCertName: string;
159
159
  }
@@ -195,8 +195,8 @@ export interface BaseApp extends Schemable {
195
195
  shouldCreateRPMPackages?: boolean;
196
196
  shouldCreateSnapFiles?: boolean;
197
197
  shouldCreateMacUniversalInstaller?: boolean;
198
- appxConfig?: Partial<IAppBuilderLib["config"]["appx"]>;
199
- nsisConfig?: Partial<IAppBuilderLib["config"]["nsis"]>;
198
+ appxConfig?: Partial<IAppBuilderLib['config']['appx']>;
199
+ nsisConfig?: Partial<IAppBuilderLib['config']['nsis']>;
200
200
  snapStore?: {
201
201
  login?: string;
202
202
  description?: string;
@@ -1,6 +1,6 @@
1
- import { IApp2 } from "./desktopify2";
2
- import { IApp } from "./toDesktop";
3
- import { Configuration, PackagerOptions, PublishOptions } from "app-builder-lib";
1
+ import { IApp2 } from './desktopify2';
2
+ import { IApp } from './toDesktop';
3
+ import { Configuration, PackagerOptions, PublishOptions } from 'app-builder-lib';
4
4
  declare type appBuilderLib = PackagerOptions & PublishOptions;
5
5
  export interface IAppBuilderLib extends appBuilderLib {
6
6
  config: Configuration;
@@ -31,11 +31,11 @@ export declare enum BuildStatus {
31
31
  succeeded = "succeeded",
32
32
  cancelled = "cancelled"
33
33
  }
34
- export declare type Arch = "ia32" | "x64" | "arm64";
35
- export declare type MacArch = "ia32" | "x64" | "arm64" | "universal";
36
- export declare type LinuxArtifactName = "appImage" | "deb" | "rpm" | "snap";
37
- export declare type MacArtifactName = "dmg" | "zip" | "installer";
38
- export declare type WindowsArtifactName = "msi" | "nsis" | "nsis-web" | "nsis-web-7z" | "appx";
34
+ export declare type Arch = 'ia32' | 'x64' | 'arm64';
35
+ export declare type MacArch = 'ia32' | 'x64' | 'arm64' | 'universal';
36
+ export declare type LinuxArtifactName = 'appImage' | 'deb' | 'rpm' | 'snap';
37
+ export declare type MacArtifactName = 'dmg' | 'zip' | 'installer';
38
+ export declare type WindowsArtifactName = 'msi' | 'nsis' | 'nsis-web' | 'nsis-web-7z' | 'appx';
39
39
  declare type ArtifactDownload = Record<Arch, {
40
40
  size: number;
41
41
  standardUrl: URL;
@@ -44,7 +44,7 @@ declare type ArtifactDownload = Record<Arch, {
44
44
  export declare type LinuxArtifactDownloads = Record<LinuxArtifactName, ArtifactDownload>;
45
45
  export declare type MacArtifactDownloads = Record<MacArtifactName, ArtifactDownload>;
46
46
  export declare type WindowsArtifactDownloads = Record<WindowsArtifactName, ArtifactDownload>;
47
- export declare type CodeSignSkipReason = "no-cert" | "user-disabled";
47
+ export declare type CodeSignSkipReason = 'no-cert' | 'user-disabled';
48
48
  export interface PlatformBuild {
49
49
  appBuilderLibConfig?: IAppBuilderLib;
50
50
  artifactDownloads?: LinuxArtifactDownloads | MacArtifactDownloads | WindowsArtifactDownloads;
@@ -71,7 +71,7 @@ export interface PlatformBuild {
71
71
  startedAt: ISODate;
72
72
  status: BuildStatus;
73
73
  }
74
- export declare type CIRunner = "circle" | "azure";
74
+ export declare type CIRunner = 'circle' | 'azure';
75
75
  export interface Build {
76
76
  appCustomDomain?: string;
77
77
  appName: string;
@@ -88,7 +88,7 @@ export interface Build {
88
88
  endedAt?: ISODate;
89
89
  electronVersionSpecified?: SemanticVersion;
90
90
  electronVersionUsed?: SemanticVersion;
91
- environmentVariables?: IApp["environmentVariables"];
91
+ environmentVariables?: IApp['environmentVariables'];
92
92
  errorMessage?: string;
93
93
  icon?: string;
94
94
  id: string;
@@ -123,7 +123,7 @@ export interface Build {
123
123
  };
124
124
  windows?: PlatformBuild;
125
125
  }
126
- export declare type ComputedBuildProperties = Pick<Build, "desktopifyVersion" | "electronVersionUsed" | "endedAt" | "errorMessage" | "releasedAt" | "standardUniversalDownloadUrl" | "startedAt" | "status" | "universalDownloadUrl">;
126
+ export declare type ComputedBuildProperties = Pick<Build, 'desktopifyVersion' | 'electronVersionUsed' | 'endedAt' | 'errorMessage' | 'releasedAt' | 'standardUniversalDownloadUrl' | 'startedAt' | 'status' | 'universalDownloadUrl'>;
127
127
  export declare enum ManifestCategory {
128
128
  primary = "primary",
129
129
  buildStamped = "build-stamped",
@@ -155,7 +155,7 @@ export interface SmokeTestProgress {
155
155
  message?: string;
156
156
  progress: number;
157
157
  screenshot?: string;
158
- state: "progress" | "done" | "error" | "skipped";
158
+ state: 'progress' | 'done' | 'error' | 'skipped';
159
159
  updatedAppHasNoMainErrors?: boolean;
160
160
  }
161
161
  export declare const hasBuildKickedOff: (build: Build) => boolean;
@@ -179,7 +179,7 @@ export interface DesktopifyApp {
179
179
  maxWidth?: number;
180
180
  singleInstance: boolean;
181
181
  disableContextMenu: boolean;
182
- titleBarStyle?: "hidden" | "hiddenInset" | "customButtonsOnHover";
182
+ titleBarStyle?: 'hidden' | 'hiddenInset' | 'customButtonsOnHover';
183
183
  alwaysOnTop: boolean;
184
184
  internalUrls?: string;
185
185
  isNativeWindowOpenDisabled?: boolean;
@@ -202,8 +202,8 @@ export interface DesktopifyApp {
202
202
  shouldReuseRendererProcess?: boolean;
203
203
  shouldMakeSameDomainAnExternalLink?: boolean;
204
204
  enablePushNotifications?: boolean;
205
- themeSource?: "system" | "light" | "dark";
206
- themeSourceMac?: "system" | "light" | "dark";
205
+ themeSource?: 'system' | 'light' | 'dark';
206
+ themeSourceMac?: 'system' | 'light' | 'dark';
207
207
  crashReporter?: string;
208
208
  companyName?: string;
209
209
  pollForAppUpdatesEveryXMinutes?: number;
package/lib/desktopify.js CHANGED
@@ -39,8 +39,8 @@ exports.isPlatformBuildRunning = (platformBuild) => {
39
39
  return false;
40
40
  }
41
41
  return (!platformBuild.shouldSkip && // <-- Noteworthy
42
- !["cancelled", "succeeded"].includes(platformBuild.status) &&
43
- ("failed" !== platformBuild.status ||
42
+ !['cancelled', 'succeeded'].includes(platformBuild.status) &&
43
+ ('failed' !== platformBuild.status ||
44
44
  platformBuild.numberOfAttemptedBuilds < 2));
45
45
  };
46
46
  // NOTE: this relies on Firestore solely
@@ -48,16 +48,16 @@ exports.isCiBuildRunning = (build) => {
48
48
  if (!build) {
49
49
  return false;
50
50
  }
51
- return (build.status === "building" ||
52
- (build.status === "failed" &&
53
- ["linux", "mac", "windows"].some((platform) => build.status === "building" ||
54
- (build.status === "failed" && exports.isPlatformBuildRunning(build[platform])))));
51
+ return (build.status === 'building' ||
52
+ (build.status === 'failed' &&
53
+ ['linux', 'mac', 'windows'].some((platform) => build.status === 'building' ||
54
+ (build.status === 'failed' && exports.isPlatformBuildRunning(build[platform])))));
55
55
  };
56
56
  exports.isBuildRunning = (build) => {
57
57
  if (!build) {
58
58
  return false;
59
59
  }
60
- return (!["cancelled", "succeeded"].includes(build.status) &&
61
- ["linux", "mac", "windows"].some((platform) => exports.isPlatformBuildRunning(build[platform])));
60
+ return (!['cancelled', 'succeeded'].includes(build.status) &&
61
+ ['linux', 'mac', 'windows'].some((platform) => exports.isPlatformBuildRunning(build[platform])));
62
62
  };
63
63
  exports.isBuildCancellable = (build) => exports.hasBuildKickedOff(build) && exports.isBuildRunning(build);
@@ -1,9 +1,9 @@
1
1
  /// <reference types="node" />
2
- import { ISwitchableValue } from "./toDesktop";
3
- import { MenuItemConstructorOptions, BrowserWindowConstructorOptions, WebPreferences } from "@todesktop/client-electron-types";
4
- import { BaseApp } from "./base";
5
- import { DesktopAppPlugin } from "./plugin";
6
- import { ValidTranslationKeys, ValidTranslationLanguages } from "./translation";
2
+ import { ISwitchableValue } from './toDesktop';
3
+ import { MenuItemConstructorOptions, BrowserWindowConstructorOptions, WebPreferences } from '@todesktop/client-electron-types';
4
+ import { BaseApp } from './base';
5
+ import { DesktopAppPlugin } from './plugin';
6
+ import { ValidTranslationKeys, ValidTranslationLanguages } from './translation';
7
7
  interface BaseAssetDetails {
8
8
  /**
9
9
  * Remote URL where the asset can be downloaded
@@ -15,36 +15,36 @@ interface BaseAssetDetails {
15
15
  relativeLocalPath: string;
16
16
  }
17
17
  export interface AppIconAssetDetails extends BaseAssetDetails {
18
- type: "appIcon";
18
+ type: 'appIcon';
19
19
  }
20
20
  export interface MenuIconAssetDetails extends BaseAssetDetails {
21
- type: "menuIcon";
21
+ type: 'menuIcon';
22
22
  }
23
23
  export interface TrayMenubarIconAssetDetails extends BaseAssetDetails {
24
- type: "trayMenubarIcon";
24
+ type: 'trayMenubarIcon';
25
25
  }
26
26
  export interface FileAssetDetails extends BaseAssetDetails {
27
27
  md5Hash: string;
28
- type: "file";
28
+ type: 'file';
29
29
  }
30
30
  export declare type AssetDetails = AppIconAssetDetails | MenuIconAssetDetails | TrayMenubarIconAssetDetails | FileAssetDetails;
31
31
  /**
32
32
  * Custom ToDesktop Roles for Application & Tray Menus
33
33
  */
34
- declare type todesktopRoles = "todesktop:launch-at-startup" | "todesktop:check-for-updates" | "todesktop:quit" | "todesktop:quit-completely" | "todesktop:new-window" | "todesktop:new-tab" | "todesktop:check-for-updates" | "todesktop:history-home" | "todesktop:history-back" | "todesktop:history-forward" | "todesktop:show-window" | "todesktop:hide-window" | "todesktop:toggle-window" | "todesktop:toggle-window0" | "todesktop:toggle-window1" | "todesktop:toggle-window2" | "todesktop:toggle-window3" | "todesktop:toggle-window4";
35
- export interface DesktopifyMenuItemConstructorOptions extends Omit<MenuItemConstructorOptions, "role" | "submenu"> {
34
+ declare type todesktopRoles = 'todesktop:launch-at-startup' | 'todesktop:check-for-updates' | 'todesktop:quit' | 'todesktop:quit-completely' | 'todesktop:new-window' | 'todesktop:new-tab' | 'todesktop:check-for-updates' | 'todesktop:history-home' | 'todesktop:history-back' | 'todesktop:history-forward' | 'todesktop:show-window' | 'todesktop:hide-window' | 'todesktop:toggle-window' | 'todesktop:toggle-window0' | 'todesktop:toggle-window1' | 'todesktop:toggle-window2' | 'todesktop:toggle-window3' | 'todesktop:toggle-window4';
35
+ export interface DesktopifyMenuItemConstructorOptions extends Omit<MenuItemConstructorOptions, 'role' | 'submenu'> {
36
36
  platforms?: NodeJS.Platform[];
37
37
  submenu?: DesktopifyMenuItemConstructorOptions[];
38
- role?: MenuItemConstructorOptions["role"] | todesktopRoles;
38
+ role?: MenuItemConstructorOptions['role'] | todesktopRoles;
39
39
  useSystemLabel?: boolean;
40
40
  event?: string;
41
41
  targetWindowId?: string;
42
- actionType?: "jsEvent" | "role";
42
+ actionType?: 'jsEvent' | 'role';
43
43
  iconUrl?: string;
44
44
  bundledIcon?: string;
45
45
  iconAssetDetails?: MenuIconAssetDetails;
46
46
  useTemplateImage?: boolean;
47
- acceleratorBehaviour?: "none" | "default" | "custom";
47
+ acceleratorBehaviour?: 'none' | 'default' | 'custom';
48
48
  }
49
49
  /**
50
50
  * Toggle Window Tray Action
@@ -52,7 +52,7 @@ export interface DesktopifyMenuItemConstructorOptions extends Omit<MenuItemConst
52
52
  * @param windowId - The id of the window to toggle
53
53
  */
54
54
  export declare type DesktopifyAppTrayToggleWindowAction = {
55
- role: "toggleWindow";
55
+ role: 'toggleWindow';
56
56
  windowId: string;
57
57
  };
58
58
  /**
@@ -61,14 +61,14 @@ export declare type DesktopifyAppTrayToggleWindowAction = {
61
61
  * @param menu - The menu to show when action triggered
62
62
  */
63
63
  export declare type DesktopifyAppTrayToggleMenuAction = {
64
- role: "toggleMenu";
64
+ role: 'toggleMenu';
65
65
  menu: DesktopifyMenuItemConstructorOptions[];
66
66
  };
67
67
  /**
68
68
  * No Action Tray Action
69
69
  */
70
70
  export declare type DesktopifyAppTrayNoAction = {
71
- role: "noAction";
71
+ role: 'noAction';
72
72
  };
73
73
  export declare type DesktopifyAppTrayAction = DesktopifyAppTrayToggleMenuAction | DesktopifyAppTrayToggleWindowAction | DesktopifyAppTrayNoAction;
74
74
  export interface DesktopifyAppTray {
@@ -126,7 +126,7 @@ export interface DesktopifyAppWindow {
126
126
  /**
127
127
  * The type of window
128
128
  */
129
- type: "menubar" | "app" | "panel";
129
+ type: 'menubar' | 'app' | 'panel';
130
130
  /**
131
131
  * Keyboard shortcut to toggle window visibility
132
132
  */
@@ -151,7 +151,7 @@ export interface DesktopifyAppWindow {
151
151
  /**
152
152
  * Inital visibility of window
153
153
  */
154
- visibility: "visible" | "hidden" | "show-when-contents-loaded";
154
+ visibility: 'visible' | 'hidden' | 'show-when-contents-loaded';
155
155
  /**
156
156
  * MacOS option for whether the window should be visible on all workspaces
157
157
  */
@@ -333,13 +333,13 @@ export interface DesktopifyApp2 {
333
333
  *
334
334
  * See {@link https://www.electronjs.org/docs/api/native-theme#nativethemethemesource}
335
335
  */
336
- themeSource?: "system" | "light" | "dark";
336
+ themeSource?: 'system' | 'light' | 'dark';
337
337
  /**
338
338
  * Sets theme source for only mac
339
339
  *
340
340
  * See {@link https://www.electronjs.org/docs/api/native-theme#nativethemethemesource}
341
341
  */
342
- themeSourceMac?: "system" | "light" | "dark";
342
+ themeSourceMac?: 'system' | 'light' | 'dark';
343
343
  /**
344
344
  * URL that crash reports will be POSTed to
345
345
  */
@@ -7,52 +7,52 @@ exports.allowedWebPreferencesOptions = exports.allowedBrowserWindowConstructorOp
7
7
  * when the window is created
8
8
  */
9
9
  exports.allowedBrowserWindowConstructorOptions = [
10
- "width",
11
- "height",
10
+ 'width',
11
+ 'height',
12
12
  // "x",
13
13
  // "y",
14
- "useContentSize",
15
- "center",
16
- "minWidth",
17
- "minHeight",
18
- "maxWidth",
19
- "maxHeight",
20
- "resizable",
21
- "movable",
22
- "minimizable",
23
- "maximizable",
24
- "closable",
25
- "focusable",
26
- "alwaysOnTop",
27
- "fullscreen",
28
- "fullscreenable",
29
- "simpleFullscreen",
30
- "skipTaskbar",
31
- "kiosk",
32
- "icon",
33
- "paintWhenInitiallyHidden",
34
- "frame",
35
- "acceptFirstMouse",
36
- "disableAutoHideCursor",
37
- "autoHideMenuBar",
38
- "enableLargerThanScreen",
39
- "backgroundColor",
40
- "hasShadow",
41
- "opacity",
42
- "darkTheme",
43
- "transparent",
44
- "visualEffectState",
45
- "titleBarStyle",
46
- "trafficLightPosition",
14
+ 'useContentSize',
15
+ 'center',
16
+ 'minWidth',
17
+ 'minHeight',
18
+ 'maxWidth',
19
+ 'maxHeight',
20
+ 'resizable',
21
+ 'movable',
22
+ 'minimizable',
23
+ 'maximizable',
24
+ 'closable',
25
+ 'focusable',
26
+ 'alwaysOnTop',
27
+ 'fullscreen',
28
+ 'fullscreenable',
29
+ 'simpleFullscreen',
30
+ 'skipTaskbar',
31
+ 'kiosk',
32
+ 'icon',
33
+ 'paintWhenInitiallyHidden',
34
+ 'frame',
35
+ 'acceptFirstMouse',
36
+ 'disableAutoHideCursor',
37
+ 'autoHideMenuBar',
38
+ 'enableLargerThanScreen',
39
+ 'backgroundColor',
40
+ 'hasShadow',
41
+ 'opacity',
42
+ 'darkTheme',
43
+ 'transparent',
44
+ 'visualEffectState',
45
+ 'titleBarStyle',
46
+ 'trafficLightPosition',
47
47
  // "roundedCorners",
48
- "fullscreenWindowTitle",
49
- "thickFrame",
50
- "type",
51
- "vibrancy",
52
- "zoomToPageWidth",
53
- "tabbingIdentifier",
54
- "webPreferences",
55
- "titleBarOverlay",
48
+ 'fullscreenWindowTitle',
49
+ 'thickFrame',
50
+ 'type',
51
+ 'vibrancy',
52
+ 'zoomToPageWidth',
53
+ 'tabbingIdentifier',
54
+ 'webPreferences',
55
+ 'titleBarOverlay',
56
56
  ];
57
57
  /**
58
58
  * Whitelist of allowed DesktopifyWindow Web Preferences Options.
@@ -60,22 +60,22 @@ exports.allowedBrowserWindowConstructorOptions = [
60
60
  * when the window is created
61
61
  */
62
62
  exports.allowedWebPreferencesOptions = [
63
- "devTools",
64
- "zoomFactor",
65
- "textAreasAreResizable",
66
- "scrollBounce",
67
- "defaultFontFamily",
68
- "defaultFontSize",
69
- "defaultMonospaceFontSize",
70
- "minimumFontSize",
71
- "defaultEncoding",
72
- "backgroundThrottling",
73
- "offscreen",
74
- "safeDialogs",
75
- "safeDialogsMessage",
76
- "navigateOnDragDrop",
77
- "autoplayPolicy",
78
- "disableHtmlFullscreenWindowResize",
79
- "accessibleTitle",
80
- "spellcheck",
63
+ 'devTools',
64
+ 'zoomFactor',
65
+ 'textAreasAreResizable',
66
+ 'scrollBounce',
67
+ 'defaultFontFamily',
68
+ 'defaultFontSize',
69
+ 'defaultMonospaceFontSize',
70
+ 'minimumFontSize',
71
+ 'defaultEncoding',
72
+ 'backgroundThrottling',
73
+ 'offscreen',
74
+ 'safeDialogs',
75
+ 'safeDialogsMessage',
76
+ 'navigateOnDragDrop',
77
+ 'autoplayPolicy',
78
+ 'disableHtmlFullscreenWindowResize',
79
+ 'accessibleTitle',
80
+ 'spellcheck',
81
81
  ];
@@ -7,7 +7,7 @@ export interface IAppFromServerProps {
7
7
  html?: string;
8
8
  iconUrl?: string;
9
9
  secret: string;
10
- appType: "app" | "menubar" | "tabbed" | "electron";
10
+ appType: 'app' | 'menubar' | 'tabbed' | 'electron';
11
11
  }
12
12
  interface IAppFromServerPropsMeta {
13
13
  isFrameBlocked: boolean;
package/lib/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- export * from "./toDesktop";
2
- export * from "./desktopify";
3
- export * from "./validations";
4
- export * from "./getSiteInfo";
5
- export * from "./plans";
1
+ export * from './toDesktop';
2
+ export * from './desktopify';
3
+ export * from './validations';
4
+ export * from './getSiteInfo';
5
+ export * from './plans';
6
6
  export * from './base';
7
7
  export * from './plugin';
8
- export * from "./desktopify2";
8
+ export * from './desktopify2';
9
9
  declare const schemaVersion: string;
10
10
  export { schemaVersion };