electron-builder 27.0.0-alpha.3 → 27.0.0-alpha.4
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/dist/cli/migrate-schema-programmatic.d.ts +24 -0
- package/dist/cli/migrate-schema-programmatic.d.ts.map +1 -0
- package/dist/cli/migrate-schema-programmatic.js +1051 -0
- package/dist/cli/migrate-schema-programmatic.js.map +1 -0
- package/dist/cli/migrate-schema.d.ts +5 -0
- package/dist/cli/migrate-schema.d.ts.map +1 -1
- package/dist/cli/migrate-schema.js +37 -8
- package/dist/cli/migrate-schema.js.map +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { MigrationChange } from "./migrate-schema.js";
|
|
2
|
+
export declare function loadTypeScript(): any | null;
|
|
3
|
+
export type ProgrammaticMigrationStatus = "migrated" | "no-op" | "unsupported";
|
|
4
|
+
export interface ProgrammaticMigrationResult {
|
|
5
|
+
/** Rewritten source. Equal to the input when nothing changed or the config is unsupported. */
|
|
6
|
+
readonly code: string;
|
|
7
|
+
readonly changes: MigrationChange[];
|
|
8
|
+
readonly warnings: string[];
|
|
9
|
+
readonly status: ProgrammaticMigrationStatus;
|
|
10
|
+
/** Set when status === "unsupported": why the config could not be auto-migrated. */
|
|
11
|
+
readonly unsupportedReason?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Migrates a programmatic JS/TS electron-builder config (the same v26→v27 transforms as
|
|
15
|
+
* {@link migrateConfig}) by surgically rewriting the source text. The TypeScript parser is used only
|
|
16
|
+
* to locate node ranges; everything outside an edited range is preserved byte-for-byte, so comments,
|
|
17
|
+
* imports, functions, and formatting are untouched.
|
|
18
|
+
*
|
|
19
|
+
* Pure: source string in, result out. No file I/O. Returns status "unsupported" (with the source
|
|
20
|
+
* unchanged) when typescript is not installed or the config cannot be statically reduced to a single
|
|
21
|
+
* object literal (function that builds the object dynamically, spreads, computed keys, …).
|
|
22
|
+
*/
|
|
23
|
+
export declare function migrateProgrammaticSource(sourceText: string, fileName: string): ProgrammaticMigrationResult;
|
|
24
|
+
//# sourceMappingURL=migrate-schema-programmatic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-schema-programmatic.d.ts","sourceRoot":"","sources":["../../src/cli/migrate-schema-programmatic.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAQ1D,wBAAgB,cAAc,IAAI,GAAG,GAAG,IAAI,CAU3C;AAED,MAAM,MAAM,2BAA2B,GAAG,UAAU,GAAG,OAAO,GAAG,aAAa,CAAA;AAE9E,MAAM,WAAW,2BAA2B;IAC1C,8FAA8F;IAC9F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,eAAe,EAAE,CAAA;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;IAC3B,QAAQ,CAAC,MAAM,EAAE,2BAA2B,CAAA;IAC5C,oFAAoF;IACpF,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CACpC;AAQD;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,2BAA2B,CAoB3G"}
|