@todesktop/shared 7.191.0 → 7.191.1
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/CHANGELOG.md +6 -0
- package/lib/{base.d.ts → cjs/base.d.ts} +1 -0
- package/lib/cjs/base.js +22 -0
- package/lib/cjs/desktopify.js +79 -0
- package/lib/cjs/desktopify2.js +80 -0
- package/lib/cjs/getSiteInfo.js +2 -0
- package/lib/cjs/hsm.js +42 -0
- package/lib/cjs/index.d.ts +12 -0
- package/lib/cjs/index.js +33 -0
- package/lib/cjs/invitePermissionLabels.js +29 -0
- package/lib/cjs/personalAccessTokens.js +2 -0
- package/lib/cjs/plans.js +632 -0
- package/lib/cjs/plugin.js +2 -0
- package/lib/cjs/toDesktop.js +2 -0
- package/lib/cjs/translation.js +14 -0
- package/lib/cjs/validations.js +178 -0
- package/lib/esm/base.d.ts +326 -0
- package/lib/esm/desktopify.d.ts +339 -0
- package/lib/esm/desktopify2.d.ts +506 -0
- package/lib/esm/getSiteInfo.d.ts +24 -0
- package/lib/esm/hsm.d.ts +30 -0
- package/lib/{index.d.ts → esm/index.d.ts} +1 -1
- package/lib/{index.js → esm/index.js} +2 -1
- package/lib/esm/invitePermissionLabels.d.ts +13 -0
- package/lib/esm/personalAccessTokens.d.ts +24 -0
- package/lib/esm/plans.d.ts +130 -0
- package/lib/esm/plugin.d.ts +55 -0
- package/lib/esm/toDesktop.d.ts +191 -0
- package/lib/esm/translation.d.ts +2 -0
- package/lib/esm/validations.d.ts +102 -0
- package/package.json +20 -5
- package/src/base.ts +1 -0
- package/src/index.cjs.ts +19 -0
- package/src/index.ts +2 -1
- package/tsconfig.esm.json +15 -0
- package/tsconfig.json +3 -4
- /package/lib/{desktopify.d.ts → cjs/desktopify.d.ts} +0 -0
- /package/lib/{desktopify2.d.ts → cjs/desktopify2.d.ts} +0 -0
- /package/lib/{getSiteInfo.d.ts → cjs/getSiteInfo.d.ts} +0 -0
- /package/lib/{hsm.d.ts → cjs/hsm.d.ts} +0 -0
- /package/lib/{invitePermissionLabels.d.ts → cjs/invitePermissionLabels.d.ts} +0 -0
- /package/lib/{personalAccessTokens.d.ts → cjs/personalAccessTokens.d.ts} +0 -0
- /package/lib/{plans.d.ts → cjs/plans.d.ts} +0 -0
- /package/lib/{plugin.d.ts → cjs/plugin.d.ts} +0 -0
- /package/lib/{toDesktop.d.ts → cjs/toDesktop.d.ts} +0 -0
- /package/lib/{translation.d.ts → cjs/translation.d.ts} +0 -0
- /package/lib/{validations.d.ts → cjs/validations.d.ts} +0 -0
- /package/lib/{base.js → esm/base.js} +0 -0
- /package/lib/{desktopify.js → esm/desktopify.js} +0 -0
- /package/lib/{desktopify2.js → esm/desktopify2.js} +0 -0
- /package/lib/{getSiteInfo.js → esm/getSiteInfo.js} +0 -0
- /package/lib/{hsm.js → esm/hsm.js} +0 -0
- /package/lib/{invitePermissionLabels.js → esm/invitePermissionLabels.js} +0 -0
- /package/lib/{personalAccessTokens.js → esm/personalAccessTokens.js} +0 -0
- /package/lib/{plans.js → esm/plans.js} +0 -0
- /package/lib/{plugin.js → esm/plugin.js} +0 -0
- /package/lib/{toDesktop.js → esm/toDesktop.js} +0 -0
- /package/lib/{translation.js → esm/translation.js} +0 -0
- /package/lib/{validations.js → esm/validations.js} +0 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { Configuration, PackagerOptions, PublishOptions } from 'app-builder-lib';
|
|
2
|
+
import { IApp2 } from './desktopify2';
|
|
3
|
+
import { IApp } from './toDesktop';
|
|
4
|
+
type appBuilderLib = PackagerOptions & PublishOptions;
|
|
5
|
+
export interface IAppBuilderLib extends appBuilderLib {
|
|
6
|
+
config: Configuration;
|
|
7
|
+
}
|
|
8
|
+
export interface ExtraFileReference {
|
|
9
|
+
from: FilePath;
|
|
10
|
+
to?: FilePath;
|
|
11
|
+
}
|
|
12
|
+
export type ISODate = string;
|
|
13
|
+
export declare enum PlatformName {
|
|
14
|
+
linux = "linux",
|
|
15
|
+
mac = "mac",
|
|
16
|
+
windows = "windows"
|
|
17
|
+
}
|
|
18
|
+
export type FilePath = string;
|
|
19
|
+
export type SemanticVersion = string;
|
|
20
|
+
export type URL = string;
|
|
21
|
+
export declare enum PackageManager {
|
|
22
|
+
npm = "npm",
|
|
23
|
+
pnpm = "pnpm",
|
|
24
|
+
yarn = "yarn"
|
|
25
|
+
}
|
|
26
|
+
export declare enum BuildStatus {
|
|
27
|
+
building = "building",
|
|
28
|
+
cancelled = "cancelled",
|
|
29
|
+
failed = "failed",
|
|
30
|
+
preparation = "preparation",
|
|
31
|
+
queued = "queued",
|
|
32
|
+
succeeded = "succeeded"
|
|
33
|
+
}
|
|
34
|
+
export declare enum AnalysisStatus {
|
|
35
|
+
analyzing = "analyzing",
|
|
36
|
+
done = "done",
|
|
37
|
+
downloading = "downloading",
|
|
38
|
+
error = "error",
|
|
39
|
+
extracting = "extracting",
|
|
40
|
+
initializing = "initializing",
|
|
41
|
+
notStarted = "notStarted"
|
|
42
|
+
}
|
|
43
|
+
export type Arch = 'arm64' | 'ia32' | 'universal' | 'x64';
|
|
44
|
+
export type MacArch = 'arm64' | 'universal' | 'x64';
|
|
45
|
+
export type LinuxArch = 'arm64' | 'x64';
|
|
46
|
+
export type WindowsArch = 'arm64' | 'ia32' | 'universal' | 'x64';
|
|
47
|
+
export type LinuxArtifactName = 'appImage' | 'deb' | 'rpm' | 'snap';
|
|
48
|
+
export type MacArtifactName = 'dmg' | 'installer' | 'mas' | 'pkg' | 'zip';
|
|
49
|
+
export type WindowsArtifactName = 'appx' | 'msi' | 'nsis-web-7z' | 'nsis-web' | 'nsis';
|
|
50
|
+
type ArtifactObject = {
|
|
51
|
+
size: number;
|
|
52
|
+
standardUrl: URL;
|
|
53
|
+
url: URL;
|
|
54
|
+
};
|
|
55
|
+
type ArtifactDownload = null | Record<Arch, ArtifactObject | null>;
|
|
56
|
+
type InstallerArtifact = {
|
|
57
|
+
[K in Arch]: ({
|
|
58
|
+
isPinnedToVersion?: boolean;
|
|
59
|
+
} & ArtifactObject) | null;
|
|
60
|
+
};
|
|
61
|
+
export type LinuxArtifactDownloads = Record<LinuxArtifactName, ArtifactDownload>;
|
|
62
|
+
export type MacArtifactDownloads = {
|
|
63
|
+
[K in MacArtifactName]: K extends 'installer' ? InstallerArtifact : ArtifactDownload;
|
|
64
|
+
};
|
|
65
|
+
export type WindowsArtifactDownloads = Record<WindowsArtifactName, ArtifactDownload>;
|
|
66
|
+
export type CodeSignSkipReason = 'no-cert' | 'user-disabled';
|
|
67
|
+
export interface PlatformBuild {
|
|
68
|
+
appBuilderLibConfig?: IAppBuilderLib;
|
|
69
|
+
artifactDownloads?: LinuxArtifactDownloads | MacArtifactDownloads | WindowsArtifactDownloads;
|
|
70
|
+
codeSignSkipReason?: CodeSignSkipReason;
|
|
71
|
+
desktopifyVersion?: SemanticVersion;
|
|
72
|
+
didCodeSign: boolean;
|
|
73
|
+
didUseCachedDependencies?: boolean;
|
|
74
|
+
downloadUrl?: URL;
|
|
75
|
+
electronVersionUsed?: SemanticVersion;
|
|
76
|
+
endedAt: ISODate;
|
|
77
|
+
errorMessage?: string;
|
|
78
|
+
isBeingCancelled?: boolean;
|
|
79
|
+
logs?: {
|
|
80
|
+
content: string;
|
|
81
|
+
label: string;
|
|
82
|
+
}[];
|
|
83
|
+
numberOfAttemptedBuilds: number;
|
|
84
|
+
platform: PlatformName;
|
|
85
|
+
progressActivityName: string;
|
|
86
|
+
progressActivityType: string;
|
|
87
|
+
progressPercentage: number;
|
|
88
|
+
screenshotUrl?: URL;
|
|
89
|
+
shouldSkip: boolean;
|
|
90
|
+
standardDownloadUrl?: URL;
|
|
91
|
+
startedAt: ISODate;
|
|
92
|
+
status: BuildStatus;
|
|
93
|
+
}
|
|
94
|
+
export type CIRunner = 'azure' | 'circle';
|
|
95
|
+
export interface Build {
|
|
96
|
+
appCustomDomain?: string;
|
|
97
|
+
appName: string;
|
|
98
|
+
appNotarizaionBundleId: string;
|
|
99
|
+
appVersion?: SemanticVersion;
|
|
100
|
+
buildServerExecutionId?: number;
|
|
101
|
+
bundlePhobiaData?: Record<string, BundlePhobiaItem>;
|
|
102
|
+
ciRunner?: CIRunner;
|
|
103
|
+
cliConfigSchemaVersion: number;
|
|
104
|
+
commitId?: string;
|
|
105
|
+
commitMessage?: string;
|
|
106
|
+
continuousIntegrationServiceName?: string;
|
|
107
|
+
createdAt: ISODate;
|
|
108
|
+
dependencyAnalysis?: {
|
|
109
|
+
result?: string;
|
|
110
|
+
status: AnalysisStatus;
|
|
111
|
+
};
|
|
112
|
+
desktopifyVersion?: SemanticVersion;
|
|
113
|
+
electronVersionSpecified?: SemanticVersion;
|
|
114
|
+
electronVersionUsed?: SemanticVersion;
|
|
115
|
+
endedAt?: ISODate;
|
|
116
|
+
environmentVariables?: IApp['environmentVariables'];
|
|
117
|
+
errorMessage?: string;
|
|
118
|
+
hash?: string;
|
|
119
|
+
icon?: string;
|
|
120
|
+
id: string;
|
|
121
|
+
isArtifactsPruned?: boolean;
|
|
122
|
+
isBeingCancelled?: boolean;
|
|
123
|
+
linux?: PlatformBuild;
|
|
124
|
+
mac?: PlatformBuild;
|
|
125
|
+
onBuildFinishedWebhook?: string;
|
|
126
|
+
partiallyReleasedAt?: ISODate;
|
|
127
|
+
projectConfig?: string;
|
|
128
|
+
releasedAt?: ISODate;
|
|
129
|
+
shouldCodeSign: boolean;
|
|
130
|
+
shouldRelease: boolean;
|
|
131
|
+
shouldRetainForever?: boolean;
|
|
132
|
+
smokeTest?: {
|
|
133
|
+
buildServerExecutionId?: string;
|
|
134
|
+
isCanceled?: boolean;
|
|
135
|
+
linux?: SmokeTestProgress;
|
|
136
|
+
mac?: SmokeTestProgress;
|
|
137
|
+
windows?: SmokeTestProgress;
|
|
138
|
+
};
|
|
139
|
+
sourcePackageManager?: PackageManager;
|
|
140
|
+
standardUniversalDownloadUrl?: URL;
|
|
141
|
+
startedAt: ISODate;
|
|
142
|
+
staticAnalysis?: {
|
|
143
|
+
error?: string;
|
|
144
|
+
result?: string;
|
|
145
|
+
status: AnalysisStatus;
|
|
146
|
+
};
|
|
147
|
+
status: BuildStatus;
|
|
148
|
+
todesktopRuntimeVersionSpecified?: SemanticVersion;
|
|
149
|
+
todesktopRuntimeVersionUsed?: SemanticVersion;
|
|
150
|
+
universalDownloadUrl?: URL;
|
|
151
|
+
url?: URL;
|
|
152
|
+
useCachedDependencies?: boolean;
|
|
153
|
+
versionControlInfo?: {
|
|
154
|
+
branchName: string;
|
|
155
|
+
commitDate: string;
|
|
156
|
+
commitId: string;
|
|
157
|
+
commitMessage: string;
|
|
158
|
+
hasUncommittedChanges: boolean;
|
|
159
|
+
repositoryRemoteUrl: string;
|
|
160
|
+
versionControlSystemName: string;
|
|
161
|
+
};
|
|
162
|
+
windows?: PlatformBuild;
|
|
163
|
+
}
|
|
164
|
+
export type BundlePhobiaItem = {
|
|
165
|
+
error: null | string;
|
|
166
|
+
result: {
|
|
167
|
+
description: string;
|
|
168
|
+
gzip: string;
|
|
169
|
+
name: string;
|
|
170
|
+
size: number;
|
|
171
|
+
} | null;
|
|
172
|
+
};
|
|
173
|
+
export type ComputedBuildProperties = Pick<Build, 'desktopifyVersion' | 'electronVersionUsed' | 'endedAt' | 'errorMessage' | 'releasedAt' | 'standardUniversalDownloadUrl' | 'startedAt' | 'status' | 'universalDownloadUrl'>;
|
|
174
|
+
export declare enum ManifestCategory {
|
|
175
|
+
buildStamped = "build-stamped",
|
|
176
|
+
primary = "primary",
|
|
177
|
+
versioned = "versioned"
|
|
178
|
+
}
|
|
179
|
+
export interface CustomManifestArtifactDetails {
|
|
180
|
+
path: FilePath;
|
|
181
|
+
url: URL;
|
|
182
|
+
}
|
|
183
|
+
export interface CustomManifest {
|
|
184
|
+
artifacts: {
|
|
185
|
+
[propertyName: string]: null | Record<string, CustomManifestArtifactDetails | null>;
|
|
186
|
+
};
|
|
187
|
+
createdAt: ISODate;
|
|
188
|
+
version: SemanticVersion;
|
|
189
|
+
}
|
|
190
|
+
export interface LinuxCustomManifest extends CustomManifest {
|
|
191
|
+
artifacts: Record<LinuxArtifactName, null | Record<LinuxArch, CustomManifestArtifactDetails | null>>;
|
|
192
|
+
}
|
|
193
|
+
export interface MacCustomManifest extends CustomManifest {
|
|
194
|
+
artifacts: Record<MacArtifactName, null | Record<MacArch, CustomManifestArtifactDetails | null>>;
|
|
195
|
+
}
|
|
196
|
+
export interface WindowsCustomManifest extends CustomManifest {
|
|
197
|
+
artifacts: Record<WindowsArtifactName, null | Record<WindowsArch, CustomManifestArtifactDetails | null>>;
|
|
198
|
+
}
|
|
199
|
+
export interface SmokeTestProgress {
|
|
200
|
+
abSkipReason?: string;
|
|
201
|
+
abState?: SmokeTestState;
|
|
202
|
+
appLaunched?: boolean;
|
|
203
|
+
appUpdated?: boolean;
|
|
204
|
+
bcState?: SmokeTestState;
|
|
205
|
+
buildAId?: string;
|
|
206
|
+
code?: string;
|
|
207
|
+
message?: string;
|
|
208
|
+
performance?: {
|
|
209
|
+
ab?: SmokeTestPerformance;
|
|
210
|
+
bc: SmokeTestPerformance;
|
|
211
|
+
};
|
|
212
|
+
progress: number;
|
|
213
|
+
screenshot?: string;
|
|
214
|
+
state: SmokeTestState;
|
|
215
|
+
updatedAppHasNoMainErrors?: boolean;
|
|
216
|
+
vm: {
|
|
217
|
+
agentVersion: string;
|
|
218
|
+
cpu?: string;
|
|
219
|
+
image: string;
|
|
220
|
+
imageVersion: string;
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
export interface SmokeTestPerformance {
|
|
224
|
+
/**
|
|
225
|
+
* Time between `process.getCreationTime()` and `App#redy event`
|
|
226
|
+
*/
|
|
227
|
+
appReadyMs: number;
|
|
228
|
+
/**
|
|
229
|
+
* Time between `process.getCreationTime()` and app is closed for update
|
|
230
|
+
*/
|
|
231
|
+
appReadyToRestartForUpdateMs: number;
|
|
232
|
+
/**
|
|
233
|
+
* Time between `process.getCreationTime()` and connect event received from
|
|
234
|
+
* the restarted app. It can be up to 4 minutes on Windows.
|
|
235
|
+
*/
|
|
236
|
+
appRestartedAfterUpdateMs: number;
|
|
237
|
+
/**
|
|
238
|
+
* From `process.cpuUsage()` user + system.
|
|
239
|
+
* This value measures time spent in user and system code, and may end up
|
|
240
|
+
* being greater than actual elapsed time if multiple CPU cores are
|
|
241
|
+
* performing work for this process.
|
|
242
|
+
* Under the hood, low-level calls like `getrusage` are used, so this value
|
|
243
|
+
* is calculated from the process start.
|
|
244
|
+
* It measures for the first 10-12 seconds of the app execution.
|
|
245
|
+
*/
|
|
246
|
+
cpuUsageMainProcessMs: number;
|
|
247
|
+
/**
|
|
248
|
+
* Maximum memory consumption by the main + renders + any other helper
|
|
249
|
+
* processes
|
|
250
|
+
*/
|
|
251
|
+
memoryUsageAllProcessesMb: number;
|
|
252
|
+
/**
|
|
253
|
+
* Maximum memory consumption by the main process
|
|
254
|
+
*/
|
|
255
|
+
memoryUsageMainProcessMb: number;
|
|
256
|
+
/**
|
|
257
|
+
* Maximum memory consumption by a renderer process (if started)
|
|
258
|
+
*/
|
|
259
|
+
memoryUsageRendererProcessMb?: number;
|
|
260
|
+
/**
|
|
261
|
+
* Time between `process.getCreationTime()` and `initSmokeTest()` of
|
|
262
|
+
* runtime execution
|
|
263
|
+
*/
|
|
264
|
+
runtimeLoadedMs: number;
|
|
265
|
+
/**
|
|
266
|
+
* Time between `process.getCreationTime()` and the update file downloaded
|
|
267
|
+
* from the server.
|
|
268
|
+
*/
|
|
269
|
+
updateDownloadedMs: number;
|
|
270
|
+
/**
|
|
271
|
+
* Time between `process.getCreationTime()` and the first firing of
|
|
272
|
+
* WebContents#dom-ready if any window is created
|
|
273
|
+
*/
|
|
274
|
+
webContentsDomReadyMs?: number;
|
|
275
|
+
/**
|
|
276
|
+
* Time between `process.getCreationTime()` and the first firing of
|
|
277
|
+
* WebContents#did-finish-load if any window is created
|
|
278
|
+
*/
|
|
279
|
+
webContentsFinishLoadMs?: number;
|
|
280
|
+
}
|
|
281
|
+
export type SmokeTestState = 'done' | 'error' | 'progress' | 'skipped';
|
|
282
|
+
export declare const hasBuildKickedOff: (build: Build) => boolean;
|
|
283
|
+
export declare const isPlatformBuildRunning: (platformBuild: PlatformBuild) => boolean;
|
|
284
|
+
export declare const isCiBuildRunning: (build: Build) => boolean;
|
|
285
|
+
export declare const isBuildRunning: (build: Build) => boolean;
|
|
286
|
+
export declare const isBuildCancellable: (build: Build) => boolean;
|
|
287
|
+
export interface DesktopifyApp {
|
|
288
|
+
alwaysOnTop: boolean;
|
|
289
|
+
appId: string;
|
|
290
|
+
appProtocol?: string;
|
|
291
|
+
appType?: string;
|
|
292
|
+
autoHideMenuBar?: boolean;
|
|
293
|
+
companyName?: string;
|
|
294
|
+
crashReporter?: string;
|
|
295
|
+
disableContextMenu: boolean;
|
|
296
|
+
disableDevTools: boolean;
|
|
297
|
+
enablePushNotifications?: boolean;
|
|
298
|
+
extraBrowserWindowOptions?: any;
|
|
299
|
+
fullScreen: boolean;
|
|
300
|
+
googleOAuthIsExternal?: boolean;
|
|
301
|
+
height: number;
|
|
302
|
+
insecure?: boolean;
|
|
303
|
+
internalUrls?: string;
|
|
304
|
+
isFindInPageEnabled?: boolean;
|
|
305
|
+
isNativeWindowOpenDisabled?: boolean;
|
|
306
|
+
isResizable: boolean;
|
|
307
|
+
isTitleStatic?: boolean;
|
|
308
|
+
maxHeight?: number;
|
|
309
|
+
maxWidth?: number;
|
|
310
|
+
menubarIcon?: string;
|
|
311
|
+
minHeight?: number;
|
|
312
|
+
minWidth?: number;
|
|
313
|
+
name: string;
|
|
314
|
+
pollForAppUpdatesEveryXMinutes?: number;
|
|
315
|
+
preventBackgroundThrottling?: boolean;
|
|
316
|
+
runtimeEnvs?: string;
|
|
317
|
+
shouldLaunchAtStartupByDefault?: boolean;
|
|
318
|
+
shouldMakeSameDomainAnExternalLink?: boolean;
|
|
319
|
+
shouldOnlySendAbsolutelyNecessaryRequests?: boolean;
|
|
320
|
+
shouldReuseRendererProcess?: boolean;
|
|
321
|
+
shouldUseRealUserAgent?: boolean;
|
|
322
|
+
singleInstance: boolean;
|
|
323
|
+
targetUrl: string;
|
|
324
|
+
themeSource?: 'dark' | 'light' | 'system';
|
|
325
|
+
themeSourceMac?: 'dark' | 'light' | 'system';
|
|
326
|
+
titleBarStyle?: 'customButtonsOnHover' | 'hidden' | 'hiddenInset';
|
|
327
|
+
toggleVisibilityKeyboardShortcut?: string;
|
|
328
|
+
trayIcon?: string;
|
|
329
|
+
userAgent?: string;
|
|
330
|
+
useSafeInternalUrlMatcher?: boolean;
|
|
331
|
+
width: number;
|
|
332
|
+
}
|
|
333
|
+
export interface Release {
|
|
334
|
+
appReleaseSnapshot?: IApp2;
|
|
335
|
+
id: string;
|
|
336
|
+
releasedAt?: string;
|
|
337
|
+
startedAt?: string;
|
|
338
|
+
}
|
|
339
|
+
export {};
|