@todesktop/shared 7.197.0 → 7.198.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @todesktop/shared
2
2
 
3
+ ## 7.198.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4949c71: Added support for Electron app migration builds that keep publishing from the
8
+ original app while updating from a target app, including macOS migration signing
9
+ requirements.
10
+
3
11
  ## 7.197.0
4
12
 
5
13
  ### Minor Changes
package/lib/cjs/base.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { CIRunner, ExtraFileReference, FilePath, IAppBuilderLib, PlatformName, Release } from './desktopify';
2
- import { MacTarget, WindowsTarget } from './hsm';
1
+ import type { CIRunner, ExtraFileReference, FilePath, IAppBuilderLib, PlatformName, Release } from './desktopify';
2
+ import type { MacTarget, WindowsTarget } from './hsm';
3
3
  export interface Schemable {
4
4
  schemaVersion?: number;
5
5
  }
@@ -121,6 +121,14 @@ export interface ElectronFuses {
121
121
  /** Controls whether the ELECTRON_RUN_AS_NODE environment variable is respected. Default: true (enabled). */
122
122
  runAsNode?: boolean;
123
123
  }
124
+ export interface ElectronAppMigration {
125
+ targetAppId: string;
126
+ targetOrganizationUnitId: string;
127
+ }
128
+ export interface MacMigrationBuildConfig {
129
+ currentOrganizationUnitId: string;
130
+ targetOrganizationUnitId: string;
131
+ }
124
132
  export interface ToDesktopJson {
125
133
  appBuilderLibVersion?: string;
126
134
  appFiles?: string[];
@@ -179,6 +187,7 @@ export interface ToDesktopJson {
179
187
  provisioningProfile?: FilePath;
180
188
  requirements?: FilePath;
181
189
  };
190
+ macMigration?: MacMigrationBuildConfig;
182
191
  mas?: {
183
192
  entitlements?: FilePath;
184
193
  entitlementsInherit?: FilePath;
@@ -301,9 +310,11 @@ export interface BaseApp extends Schemable {
301
310
  customNotarization?: CustomMacNotarization;
302
311
  customWindowsCodeSign?: CustomWindowsCodeSignAzureTrustedSigning | CustomWindowsCodeSignEV | CustomWindowsCodeSignFile;
303
312
  debConfig?: {
313
+ enableUnattendedUpgrades?: boolean;
304
314
  installAptSources?: boolean;
305
315
  };
306
316
  domainVerificationCode?: string;
317
+ electronAppMigration?: ElectronAppMigration;
307
318
  id: string;
308
319
  macHsmCertNames?: Record<MacTarget, string>;
309
320
  macUniversalInstallerConfig?: {
@@ -1,7 +1,7 @@
1
- import { Configuration, PackagerOptions, PublishOptions } from 'app-builder-lib';
2
- import { IApp2 } from './desktopify2';
1
+ import type { Configuration, PackagerOptions, PublishOptions } from 'app-builder-lib';
2
+ import type { IApp2 } from './desktopify2';
3
3
  import { BreakpointPauseLease, BreakpointQueueEntry, CurrentBreakpointState } from './introspection/breakpoints';
4
- import { IApp } from './toDesktop';
4
+ import type { IApp } from './toDesktop';
5
5
  type appBuilderLib = PackagerOptions & PublishOptions;
6
6
  export interface IAppBuilderLib extends appBuilderLib {
7
7
  config: Configuration;
@@ -1,8 +1,8 @@
1
- import { BrowserWindowConstructorOptions, MenuItemConstructorOptions, MessageBoxOptions, NotificationConstructorOptions, WebPreferences } from '@todesktop/client-electron-types';
2
- import { BaseApp } from './base';
3
- import { CustomPlugin, DesktopAppPlugin } from './plugin';
4
- import { ISwitchableValue } from './toDesktop';
5
- import { ValidTranslationKeys, ValidTranslationLanguages } from './translation';
1
+ import type { BrowserWindowConstructorOptions, MenuItemConstructorOptions, MessageBoxOptions, NotificationConstructorOptions, WebPreferences } from '@todesktop/client-electron-types';
2
+ import type { BaseApp } from './base';
3
+ import type { CustomPlugin, DesktopAppPlugin } from './plugin';
4
+ import type { ISwitchableValue } from './toDesktop';
5
+ import type { ValidTranslationKeys, ValidTranslationLanguages } from './translation';
6
6
  interface BaseAssetDetails {
7
7
  /**
8
8
  * Local path where the asset is/should be stored. This path is relative to the app directory
package/lib/cjs/hsm.d.ts CHANGED
@@ -17,7 +17,7 @@ export declare function isWindowsTarget(type: string): type is MacTarget;
17
17
  * @param target the target type
18
18
  * @returns the name of the secret that is required for downloading the cert from HSM.
19
19
  */
20
- export declare const getCertificateNameFromHSM: (appId: string, target: MacTarget | WindowsTarget) => string;
20
+ export declare const getCertificateNameFromHSM: (appId: string, target: "windows" | MacTarget) => string;
21
21
  /**
22
22
  * Files that are uploaded to HSM have a unique secretName that depends on the appId and target.
23
23
  * This function returns the key name that is used for key files that have a `.p8` postfix.
package/lib/cjs/index.js CHANGED
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.schemaVersion = void 0;
18
- /* eslint-disable @typescript-eslint/no-require-imports */
18
+ /* eslint-disable @typescript-eslint/no-require-imports, no-undef */
19
19
  // CJS-specific entry point
20
20
  // Path is relative to lib/cjs/ output directory
21
21
  const packageJson = require('../../package.json');
@@ -1,4 +1,3 @@
1
- import { UserIHaveSentInviteTo } from './toDesktop';
2
1
  export type InvitePermissionKey = 'canBuild' | 'canManageBilling' | 'canManageUsers' | 'canRelease';
3
2
  export type InvitePermissionFlags = Record<InvitePermissionKey, boolean>;
4
3
  export declare const INVITE_PERMISSION_LABELS: Record<InvitePermissionKey, string>;
@@ -10,4 +9,4 @@ export type NormalizedInvitePermissions = {
10
9
  canRelease: boolean;
11
10
  };
12
11
  export declare const FULL_OWNER_PERMISSIONS: NormalizedInvitePermissions;
13
- export declare const normalizeInvitePermissions: (permissions?: UserIHaveSentInviteTo["permissions"]) => NormalizedInvitePermissions;
12
+ export declare const normalizeInvitePermissions: (permissions?: import("./toDesktop").InvitePermissions | undefined) => NormalizedInvitePermissions;
@@ -58,7 +58,7 @@ export declare const products: {
58
58
  readonly professional: Product<"monthly_199" | "monthly_240" | "monthly_300" | "yearly_2880">;
59
59
  };
60
60
  readonly cli: {
61
- readonly founder: Product<"monthly_125" | "yearly_1200" | "monthly_100">;
61
+ readonly founder: Product<"monthly_100" | "monthly_125" | "yearly_1200">;
62
62
  readonly founder30: Product<"monthly_30">;
63
63
  readonly founder50: Product<"monthly_50" | "monthly_90">;
64
64
  readonly performance: Product<"monthly_300" | "monthly_375" | "yearly_3600">;
@@ -80,7 +80,7 @@ export declare const products: {
80
80
  readonly professional: Product<"monthly_199" | "monthly_240" | "monthly_300" | "yearly_2880">;
81
81
  };
82
82
  readonly cli: {
83
- readonly founder: Product<"monthly_125" | "yearly_1200" | "monthly_100">;
83
+ readonly founder: Product<"monthly_100" | "monthly_125" | "yearly_1200">;
84
84
  readonly founder30: Product<"monthly_30">;
85
85
  readonly founder50: Product<"monthly_50" | "monthly_90">;
86
86
  readonly performance: Product<"monthly_300" | "monthly_375" | "yearly_3600">;
@@ -123,8 +123,8 @@ export declare const configurations: {
123
123
  };
124
124
  };
125
125
  };
126
- export declare const hasActiveSub: (sub?: Subscription) => boolean;
127
- export declare const hasPlan: (plan: Plan, sub?: Subscription) => boolean;
128
- export declare const getPlan: (sub?: Pick<Subscription, "planId" | "productId">) => null | Plan;
126
+ export declare const hasActiveSub: (sub?: Subscription | undefined) => boolean;
127
+ export declare const hasPlan: (plan: Plan, sub?: Subscription | undefined) => boolean;
128
+ export declare const getPlan: (sub?: Pick<Subscription, "planId" | "productId"> | undefined) => Plan | null;
129
129
  export type LegacyProductKey = 'builder_essential' | 'builder_professional' | 'business' | 'cli_founder_30' | 'cli_founder_50' | 'cli_founder' | 'cli_performance' | 'cli_scale' | 'enterprise' | 'essential_new' | 'essential' | 'growth' | 'professional_annual_full_price' | 'professional_annual' | 'professional' | 'startup';
130
130
  export declare const LegacyProductRecord: Record<LegacyProductKey, Record<'dev' | 'prod', Product>>;
@@ -1,6 +1,6 @@
1
- import { BaseApp, Schemable } from './base';
2
- import { IAppBuilderLib } from './desktopify';
3
- import { PatSummary } from './personalAccessTokens';
1
+ import type { BaseApp, Schemable } from './base';
2
+ import type { IAppBuilderLib } from './desktopify';
3
+ import type { PatSummary } from './personalAccessTokens';
4
4
  export type IUploadFileStatus = 'done' | 'error' | 'removed' | 'success' | 'uploading';
5
5
  export interface IUploadFile {
6
6
  error?: any;
@@ -22,14 +22,14 @@ export declare const appConfigValidation: yup.ObjectSchema<{
22
22
  internalURLs: string;
23
23
  isFrameBlocked: NonNullable<boolean | undefined>;
24
24
  meta: {
25
- schemaVersion: number;
26
25
  appIterations: number;
27
26
  hasAppChanged: NonNullable<boolean | undefined>;
28
27
  publishedVersions: {
28
+ desktopify?: yup.Maybe<string | undefined>;
29
29
  electron?: yup.Maybe<string | undefined>;
30
30
  version?: yup.Maybe<string | undefined>;
31
- desktopify?: yup.Maybe<string | undefined>;
32
31
  };
32
+ schemaVersion: number;
33
33
  };
34
34
  name: string;
35
35
  secret: string;
@@ -38,23 +38,23 @@ export declare const appConfigValidation: yup.ObjectSchema<{
38
38
  windowOptions: {
39
39
  alwaysOnTop: NonNullable<boolean | undefined>;
40
40
  autoHideMenuBar: NonNullable<boolean | undefined>;
41
- height: number;
42
- maxHeight: number;
43
- maxWidth: number;
44
- minHeight: number;
45
- minWidth: number;
46
- width: number;
47
41
  hasMaxHeight: NonNullable<boolean | undefined>;
48
42
  hasMaxWidth: NonNullable<boolean | undefined>;
49
43
  hasMinHeight: NonNullable<boolean | undefined>;
50
44
  hasMinWidth: NonNullable<boolean | undefined>;
45
+ height: number;
51
46
  isFullscreenable: NonNullable<boolean | undefined>;
52
47
  isMaximizable: NonNullable<boolean | undefined>;
53
48
  isMinimizable: NonNullable<boolean | undefined>;
54
49
  isResizable: NonNullable<boolean | undefined>;
50
+ maxHeight: number;
51
+ maxWidth: number;
52
+ minHeight: number;
53
+ minWidth: number;
55
54
  startInFullscreenMode: NonNullable<boolean | undefined>;
56
55
  transparentInsetTitlebar: NonNullable<boolean | undefined>;
57
56
  transparentTitlebar: NonNullable<boolean | undefined>;
57
+ width: number;
58
58
  };
59
59
  }, yup.AnyObject, {
60
60
  customUserAgent: undefined;
package/lib/esm/base.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { CIRunner, ExtraFileReference, FilePath, IAppBuilderLib, PlatformName, Release } from './desktopify';
2
- import { MacTarget, WindowsTarget } from './hsm';
1
+ import type { CIRunner, ExtraFileReference, FilePath, IAppBuilderLib, PlatformName, Release } from './desktopify';
2
+ import type { MacTarget, WindowsTarget } from './hsm';
3
3
  export interface Schemable {
4
4
  schemaVersion?: number;
5
5
  }
@@ -121,6 +121,14 @@ export interface ElectronFuses {
121
121
  /** Controls whether the ELECTRON_RUN_AS_NODE environment variable is respected. Default: true (enabled). */
122
122
  runAsNode?: boolean;
123
123
  }
124
+ export interface ElectronAppMigration {
125
+ targetAppId: string;
126
+ targetOrganizationUnitId: string;
127
+ }
128
+ export interface MacMigrationBuildConfig {
129
+ currentOrganizationUnitId: string;
130
+ targetOrganizationUnitId: string;
131
+ }
124
132
  export interface ToDesktopJson {
125
133
  appBuilderLibVersion?: string;
126
134
  appFiles?: string[];
@@ -179,6 +187,7 @@ export interface ToDesktopJson {
179
187
  provisioningProfile?: FilePath;
180
188
  requirements?: FilePath;
181
189
  };
190
+ macMigration?: MacMigrationBuildConfig;
182
191
  mas?: {
183
192
  entitlements?: FilePath;
184
193
  entitlementsInherit?: FilePath;
@@ -301,9 +310,11 @@ export interface BaseApp extends Schemable {
301
310
  customNotarization?: CustomMacNotarization;
302
311
  customWindowsCodeSign?: CustomWindowsCodeSignAzureTrustedSigning | CustomWindowsCodeSignEV | CustomWindowsCodeSignFile;
303
312
  debConfig?: {
313
+ enableUnattendedUpgrades?: boolean;
304
314
  installAptSources?: boolean;
305
315
  };
306
316
  domainVerificationCode?: string;
317
+ electronAppMigration?: ElectronAppMigration;
307
318
  id: string;
308
319
  macHsmCertNames?: Record<MacTarget, string>;
309
320
  macUniversalInstallerConfig?: {
@@ -1,7 +1,7 @@
1
- import { Configuration, PackagerOptions, PublishOptions } from 'app-builder-lib';
2
- import { IApp2 } from './desktopify2';
1
+ import type { Configuration, PackagerOptions, PublishOptions } from 'app-builder-lib';
2
+ import type { IApp2 } from './desktopify2';
3
3
  import { BreakpointPauseLease, BreakpointQueueEntry, CurrentBreakpointState } from './introspection/breakpoints';
4
- import { IApp } from './toDesktop';
4
+ import type { IApp } from './toDesktop';
5
5
  type appBuilderLib = PackagerOptions & PublishOptions;
6
6
  export interface IAppBuilderLib extends appBuilderLib {
7
7
  config: Configuration;
@@ -1,8 +1,8 @@
1
- import { BrowserWindowConstructorOptions, MenuItemConstructorOptions, MessageBoxOptions, NotificationConstructorOptions, WebPreferences } from '@todesktop/client-electron-types';
2
- import { BaseApp } from './base';
3
- import { CustomPlugin, DesktopAppPlugin } from './plugin';
4
- import { ISwitchableValue } from './toDesktop';
5
- import { ValidTranslationKeys, ValidTranslationLanguages } from './translation';
1
+ import type { BrowserWindowConstructorOptions, MenuItemConstructorOptions, MessageBoxOptions, NotificationConstructorOptions, WebPreferences } from '@todesktop/client-electron-types';
2
+ import type { BaseApp } from './base';
3
+ import type { CustomPlugin, DesktopAppPlugin } from './plugin';
4
+ import type { ISwitchableValue } from './toDesktop';
5
+ import type { ValidTranslationKeys, ValidTranslationLanguages } from './translation';
6
6
  interface BaseAssetDetails {
7
7
  /**
8
8
  * Local path where the asset is/should be stored. This path is relative to the app directory
package/lib/esm/hsm.d.ts CHANGED
@@ -17,7 +17,7 @@ export declare function isWindowsTarget(type: string): type is MacTarget;
17
17
  * @param target the target type
18
18
  * @returns the name of the secret that is required for downloading the cert from HSM.
19
19
  */
20
- export declare const getCertificateNameFromHSM: (appId: string, target: MacTarget | WindowsTarget) => string;
20
+ export declare const getCertificateNameFromHSM: (appId: string, target: "windows" | MacTarget) => string;
21
21
  /**
22
22
  * Files that are uploaded to HSM have a unique secretName that depends on the appId and target.
23
23
  * This function returns the key name that is used for key files that have a `.p8` postfix.
@@ -1,4 +1,3 @@
1
- import { UserIHaveSentInviteTo } from './toDesktop';
2
1
  export type InvitePermissionKey = 'canBuild' | 'canManageBilling' | 'canManageUsers' | 'canRelease';
3
2
  export type InvitePermissionFlags = Record<InvitePermissionKey, boolean>;
4
3
  export declare const INVITE_PERMISSION_LABELS: Record<InvitePermissionKey, string>;
@@ -10,4 +9,4 @@ export type NormalizedInvitePermissions = {
10
9
  canRelease: boolean;
11
10
  };
12
11
  export declare const FULL_OWNER_PERMISSIONS: NormalizedInvitePermissions;
13
- export declare const normalizeInvitePermissions: (permissions?: UserIHaveSentInviteTo["permissions"]) => NormalizedInvitePermissions;
12
+ export declare const normalizeInvitePermissions: (permissions?: import("./toDesktop").InvitePermissions | undefined) => NormalizedInvitePermissions;
@@ -58,7 +58,7 @@ export declare const products: {
58
58
  readonly professional: Product<"monthly_199" | "monthly_240" | "monthly_300" | "yearly_2880">;
59
59
  };
60
60
  readonly cli: {
61
- readonly founder: Product<"monthly_125" | "yearly_1200" | "monthly_100">;
61
+ readonly founder: Product<"monthly_100" | "monthly_125" | "yearly_1200">;
62
62
  readonly founder30: Product<"monthly_30">;
63
63
  readonly founder50: Product<"monthly_50" | "monthly_90">;
64
64
  readonly performance: Product<"monthly_300" | "monthly_375" | "yearly_3600">;
@@ -80,7 +80,7 @@ export declare const products: {
80
80
  readonly professional: Product<"monthly_199" | "monthly_240" | "monthly_300" | "yearly_2880">;
81
81
  };
82
82
  readonly cli: {
83
- readonly founder: Product<"monthly_125" | "yearly_1200" | "monthly_100">;
83
+ readonly founder: Product<"monthly_100" | "monthly_125" | "yearly_1200">;
84
84
  readonly founder30: Product<"monthly_30">;
85
85
  readonly founder50: Product<"monthly_50" | "monthly_90">;
86
86
  readonly performance: Product<"monthly_300" | "monthly_375" | "yearly_3600">;
@@ -123,8 +123,8 @@ export declare const configurations: {
123
123
  };
124
124
  };
125
125
  };
126
- export declare const hasActiveSub: (sub?: Subscription) => boolean;
127
- export declare const hasPlan: (plan: Plan, sub?: Subscription) => boolean;
128
- export declare const getPlan: (sub?: Pick<Subscription, "planId" | "productId">) => null | Plan;
126
+ export declare const hasActiveSub: (sub?: Subscription | undefined) => boolean;
127
+ export declare const hasPlan: (plan: Plan, sub?: Subscription | undefined) => boolean;
128
+ export declare const getPlan: (sub?: Pick<Subscription, "planId" | "productId"> | undefined) => Plan | null;
129
129
  export type LegacyProductKey = 'builder_essential' | 'builder_professional' | 'business' | 'cli_founder_30' | 'cli_founder_50' | 'cli_founder' | 'cli_performance' | 'cli_scale' | 'enterprise' | 'essential_new' | 'essential' | 'growth' | 'professional_annual_full_price' | 'professional_annual' | 'professional' | 'startup';
130
130
  export declare const LegacyProductRecord: Record<LegacyProductKey, Record<'dev' | 'prod', Product>>;
@@ -1,6 +1,6 @@
1
- import { BaseApp, Schemable } from './base';
2
- import { IAppBuilderLib } from './desktopify';
3
- import { PatSummary } from './personalAccessTokens';
1
+ import type { BaseApp, Schemable } from './base';
2
+ import type { IAppBuilderLib } from './desktopify';
3
+ import type { PatSummary } from './personalAccessTokens';
4
4
  export type IUploadFileStatus = 'done' | 'error' | 'removed' | 'success' | 'uploading';
5
5
  export interface IUploadFile {
6
6
  error?: any;
@@ -22,14 +22,14 @@ export declare const appConfigValidation: yup.ObjectSchema<{
22
22
  internalURLs: string;
23
23
  isFrameBlocked: NonNullable<boolean | undefined>;
24
24
  meta: {
25
- schemaVersion: number;
26
25
  appIterations: number;
27
26
  hasAppChanged: NonNullable<boolean | undefined>;
28
27
  publishedVersions: {
28
+ desktopify?: yup.Maybe<string | undefined>;
29
29
  electron?: yup.Maybe<string | undefined>;
30
30
  version?: yup.Maybe<string | undefined>;
31
- desktopify?: yup.Maybe<string | undefined>;
32
31
  };
32
+ schemaVersion: number;
33
33
  };
34
34
  name: string;
35
35
  secret: string;
@@ -38,23 +38,23 @@ export declare const appConfigValidation: yup.ObjectSchema<{
38
38
  windowOptions: {
39
39
  alwaysOnTop: NonNullable<boolean | undefined>;
40
40
  autoHideMenuBar: NonNullable<boolean | undefined>;
41
- height: number;
42
- maxHeight: number;
43
- maxWidth: number;
44
- minHeight: number;
45
- minWidth: number;
46
- width: number;
47
41
  hasMaxHeight: NonNullable<boolean | undefined>;
48
42
  hasMaxWidth: NonNullable<boolean | undefined>;
49
43
  hasMinHeight: NonNullable<boolean | undefined>;
50
44
  hasMinWidth: NonNullable<boolean | undefined>;
45
+ height: number;
51
46
  isFullscreenable: NonNullable<boolean | undefined>;
52
47
  isMaximizable: NonNullable<boolean | undefined>;
53
48
  isMinimizable: NonNullable<boolean | undefined>;
54
49
  isResizable: NonNullable<boolean | undefined>;
50
+ maxHeight: number;
51
+ maxWidth: number;
52
+ minHeight: number;
53
+ minWidth: number;
55
54
  startInFullscreenMode: NonNullable<boolean | undefined>;
56
55
  transparentInsetTitlebar: NonNullable<boolean | undefined>;
57
56
  transparentTitlebar: NonNullable<boolean | undefined>;
57
+ width: number;
58
58
  };
59
59
  }, yup.AnyObject, {
60
60
  customUserAgent: undefined;
@@ -0,0 +1,5 @@
1
+ import { configs, defineConfig } from '@todesktop/dev-config/oxlint';
2
+
3
+ export default defineConfig({
4
+ overrides: [configs.base, configs.strict, configs.perfectionist, configs.ts],
5
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todesktop/shared",
3
- "version": "7.197.0",
3
+ "version": "7.198.0",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "main": "./lib/cjs/index.js",
@@ -20,16 +20,16 @@
20
20
  },
21
21
  "scripts": {
22
22
  "build": "rm -rf ./lib && pnpm run build:cjs && pnpm run build:esm && pnpm run build:rename-cjs-index",
23
- "build:cjs": "tsc -p tsconfig.json",
24
- "build:esm": "tsc -p tsconfig.esm.json",
23
+ "build:cjs": "tsgo -p tsconfig.json",
24
+ "build:esm": "tsgo -p tsconfig.esm.json",
25
25
  "build:rename-cjs-index": "mv ./lib/cjs/index.cjs.js ./lib/cjs/index.js && mv ./lib/cjs/index.cjs.d.ts ./lib/cjs/index.d.ts",
26
26
  "bump": "npm version minor && git push && npm publish",
27
- "dev": "tsc",
28
- "format": "prettier . --write && eslint --fix",
29
- "lint": "prettier . --check && eslint",
27
+ "dev": "tsgo",
28
+ "format": "env NODE_NO_WARNINGS=1 oxfmt && env NODE_NO_WARNINGS=1 oxlint --fix",
29
+ "lint": "env NODE_NO_WARNINGS=1 oxfmt --check && env NODE_NO_WARNINGS=1 oxlint",
30
30
  "prepublishOnly": "npm run build",
31
31
  "test": "vitest run",
32
- "typecheck": "tsc --noEmit"
32
+ "typecheck": "tsgo --noEmit"
33
33
  },
34
34
  "author": "Dave Jeffery <dave@davejeffery.com>",
35
35
  "license": "UNLICENSED",
@@ -44,10 +44,10 @@
44
44
  "devDependencies": {
45
45
  "@todesktop/dev-config": "workspace:*",
46
46
  "@types/semver": "^7.3.9",
47
+ "@typescript/native-preview": "catalog:",
47
48
  "app-builder-lib": "^25.1.8",
48
- "eslint": "catalog:",
49
- "prettier": "catalog:",
50
- "typescript": "catalog:",
49
+ "oxfmt": "catalog:",
50
+ "oxlint": "catalog:",
51
51
  "vitest": "^1.6.1"
52
52
  }
53
53
  }
package/src/base.ts CHANGED
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  CIRunner,
3
3
  ExtraFileReference,
4
4
  FilePath,
@@ -6,7 +6,7 @@ import {
6
6
  PlatformName,
7
7
  Release,
8
8
  } from './desktopify';
9
- import { MacTarget, WindowsTarget } from './hsm';
9
+ import type { MacTarget, WindowsTarget } from './hsm';
10
10
 
11
11
  export interface Schemable {
12
12
  schemaVersion?: number;
@@ -137,6 +137,16 @@ export interface ElectronFuses {
137
137
  runAsNode?: boolean;
138
138
  }
139
139
 
140
+ export interface ElectronAppMigration {
141
+ targetAppId: string;
142
+ targetOrganizationUnitId: string;
143
+ }
144
+
145
+ export interface MacMigrationBuildConfig {
146
+ currentOrganizationUnitId: string;
147
+ targetOrganizationUnitId: string;
148
+ }
149
+
140
150
  export interface ToDesktopJson {
141
151
  appBuilderLibVersion?: string;
142
152
  appFiles?: string[];
@@ -195,6 +205,7 @@ export interface ToDesktopJson {
195
205
  provisioningProfile?: FilePath;
196
206
  requirements?: FilePath;
197
207
  };
208
+ macMigration?: MacMigrationBuildConfig;
198
209
  mas?: {
199
210
  entitlements?: FilePath;
200
211
  entitlementsInherit?: FilePath;
@@ -343,9 +354,11 @@ export interface BaseApp extends Schemable {
343
354
  | CustomWindowsCodeSignEV
344
355
  | CustomWindowsCodeSignFile;
345
356
  debConfig?: {
357
+ enableUnattendedUpgrades?: boolean;
346
358
  installAptSources?: boolean;
347
359
  };
348
360
  domainVerificationCode?: string;
361
+ electronAppMigration?: ElectronAppMigration;
349
362
  id: string;
350
363
 
351
364
  macHsmCertNames?: Record<MacTarget, string>;
package/src/desktopify.ts CHANGED
@@ -1,16 +1,16 @@
1
1
  // eslint-disable-next-line import-x/no-extraneous-dependencies
2
- import {
2
+ import type {
3
3
  Configuration,
4
4
  PackagerOptions,
5
5
  PublishOptions,
6
6
  } from 'app-builder-lib';
7
- import { IApp2 } from './desktopify2';
7
+ import type { IApp2 } from './desktopify2';
8
8
  import {
9
9
  BreakpointPauseLease,
10
10
  BreakpointQueueEntry,
11
11
  CurrentBreakpointState,
12
12
  } from './introspection/breakpoints';
13
- import { IApp } from './toDesktop';
13
+ import type { IApp } from './toDesktop';
14
14
 
15
15
  type appBuilderLib = PackagerOptions & PublishOptions;
16
16
  export interface IAppBuilderLib extends appBuilderLib {
@@ -1,14 +1,17 @@
1
- import {
1
+ import type {
2
2
  BrowserWindowConstructorOptions,
3
3
  MenuItemConstructorOptions,
4
4
  MessageBoxOptions,
5
5
  NotificationConstructorOptions,
6
6
  WebPreferences,
7
7
  } from '@todesktop/client-electron-types';
8
- import { BaseApp } from './base';
9
- import { CustomPlugin, DesktopAppPlugin } from './plugin';
10
- import { ISwitchableValue } from './toDesktop';
11
- import { ValidTranslationKeys, ValidTranslationLanguages } from './translation';
8
+ import type { BaseApp } from './base';
9
+ import type { CustomPlugin, DesktopAppPlugin } from './plugin';
10
+ import type { ISwitchableValue } from './toDesktop';
11
+ import type {
12
+ ValidTranslationKeys,
13
+ ValidTranslationLanguages,
14
+ } from './translation';
12
15
 
13
16
  interface BaseAssetDetails {
14
17
  /**
@@ -67,8 +70,10 @@ type todesktopRoles =
67
70
  | 'todesktop:toggle-window3'
68
71
  | 'todesktop:toggle-window4';
69
72
 
70
- export interface DesktopifyMenuItemConstructorOptions
71
- extends Omit<MenuItemConstructorOptions, 'role' | 'submenu'> {
73
+ export interface DesktopifyMenuItemConstructorOptions extends Omit<
74
+ MenuItemConstructorOptions,
75
+ 'role' | 'submenu'
76
+ > {
72
77
  // 'none' is kept for legacy reasons
73
78
  acceleratorBehaviour?: 'custom' | 'default' | 'explicit-none' | 'none';
74
79
  actionType?: 'jsEvent' | 'role';
package/src/index.cjs.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* eslint-disable @typescript-eslint/no-require-imports */
1
+ /* eslint-disable @typescript-eslint/no-require-imports, no-undef */
2
2
  // CJS-specific entry point
3
3
  // Path is relative to lib/cjs/ output directory
4
4
  const packageJson = require('../../package.json');
@@ -15,7 +15,6 @@ export * from './personalAccessTokens';
15
15
  export * from './plans';
16
16
  export * from './plugin';
17
17
  export * from './toDesktop';
18
-
19
18
  export * from './validations';
20
19
 
21
20
  export const schemaVersion = packageJson.version;
package/src/index.ts CHANGED
@@ -13,7 +13,6 @@ export * from './personalAccessTokens.js';
13
13
  export * from './plans.js';
14
14
  export * from './plugin.js';
15
15
  export * from './toDesktop.js';
16
-
17
16
  export * from './validations.js';
18
17
 
19
18
  export const schemaVersion = packageJson.version;
package/src/toDesktop.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { BaseApp, Schemable } from './base';
2
- import { IAppBuilderLib } from './desktopify';
3
- import { PatSummary } from './personalAccessTokens';
1
+ import type { BaseApp, Schemable } from './base';
2
+ import type { IAppBuilderLib } from './desktopify';
3
+ import type { PatSummary } from './personalAccessTokens';
4
4
 
5
5
  export type IUploadFileStatus =
6
6
  | 'done'
package/.prettierignore DELETED
@@ -1 +0,0 @@
1
- lib
package/eslint.config.mjs DELETED
@@ -1,10 +0,0 @@
1
- import { configs, defineConfig } from '@todesktop/dev-config/eslint';
2
-
3
- export default defineConfig(
4
- configs.base,
5
- configs.strict,
6
- configs.ts,
7
- configs.prettier,
8
-
9
- { ignores: ['lib'] },
10
- );