Erster Commit

This commit is contained in:
zed
2026-03-13 09:53:40 +01:00
commit 5ebcad02ed
3945 changed files with 974582 additions and 0 deletions

View File

@@ -0,0 +1 @@
export declare function getExactElectronVersionSync(): string;

View File

@@ -0,0 +1,43 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getExactElectronVersionSync = void 0;
const fs = __importStar(require("fs-extra"));
const path = __importStar(require("path"));
function electronVersionPath() {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const electronPath = require('electron');
if (process.platform === 'darwin') {
return path.resolve(path.dirname(electronPath), '..', '..', '..', 'version');
}
else {
return path.join(path.dirname(electronPath), 'version');
}
}
function getExactElectronVersionSync() {
return fs.readFileSync(electronVersionPath()).toString().trim();
}
exports.getExactElectronVersionSync = getExactElectronVersionSync;
//# sourceMappingURL=electron-version.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"electron-version.js","sourceRoot":"","sources":["../../../test/helpers/electron-version.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,2CAA6B;AAE7B,SAAS,mBAAmB;IAC1B,8DAA8D;IAC9D,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACzC,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;KAC9E;SAAM;QACL,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC,CAAC;KACzD;AACH,CAAC;AAED,SAAgB,2BAA2B;IACzC,OAAO,EAAE,CAAC,YAAY,CAAC,mBAAmB,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;AAClE,CAAC;AAFD,kEAEC"}

View File

@@ -0,0 +1,5 @@
export declare const MINUTES_IN_MILLISECONDS: number;
export declare const TIMEOUT_IN_MILLISECONDS: number;
export declare function resetMSVSVersion(): void;
export declare function resetTestModule(testModulePath: string, installModules?: boolean): Promise<void>;
export declare function cleanupTestModule(testModulePath: string): Promise<void>;

View File

@@ -0,0 +1,35 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.cleanupTestModule = exports.resetTestModule = exports.resetMSVSVersion = exports.TIMEOUT_IN_MILLISECONDS = exports.MINUTES_IN_MILLISECONDS = void 0;
const fs_extra_1 = __importDefault(require("fs-extra"));
const path_1 = __importDefault(require("path"));
const cross_spawn_promise_1 = require("@malept/cross-spawn-promise");
const originalGypMSVSVersion = process.env.GYP_MSVS_VERSION;
const TIMEOUT_IN_MINUTES = process.platform === 'win32' ? 5 : 2;
exports.MINUTES_IN_MILLISECONDS = 60 * 1000;
exports.TIMEOUT_IN_MILLISECONDS = TIMEOUT_IN_MINUTES * exports.MINUTES_IN_MILLISECONDS;
function resetMSVSVersion() {
if (originalGypMSVSVersion) {
process.env.GYP_MSVS_VERSION = originalGypMSVSVersion;
}
}
exports.resetMSVSVersion = resetMSVSVersion;
async function resetTestModule(testModulePath, installModules = true) {
await fs_extra_1.default.remove(testModulePath);
await fs_extra_1.default.mkdir(testModulePath, { recursive: true });
await fs_extra_1.default.copyFile(path_1.default.resolve(__dirname, '../../test/fixture/native-app1/package.json'), path_1.default.resolve(testModulePath, 'package.json'));
if (installModules) {
await (0, cross_spawn_promise_1.spawn)('npm', ['install'], { cwd: testModulePath });
}
resetMSVSVersion();
}
exports.resetTestModule = resetTestModule;
async function cleanupTestModule(testModulePath) {
await fs_extra_1.default.remove(testModulePath);
resetMSVSVersion();
}
exports.cleanupTestModule = cleanupTestModule;
//# sourceMappingURL=module-setup.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"module-setup.js","sourceRoot":"","sources":["../../../test/helpers/module-setup.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA0B;AAC1B,gDAAwB;AACxB,qEAAoD;AAEpD,MAAM,sBAAsB,GAAuB,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;AAChF,MAAM,kBAAkB,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnD,QAAA,uBAAuB,GAAG,EAAE,GAAG,IAAI,CAAC;AACpC,QAAA,uBAAuB,GAAG,kBAAkB,GAAG,+BAAuB,CAAC;AAEpF,SAAgB,gBAAgB;IAC9B,IAAI,sBAAsB,EAAE;QAC1B,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,sBAAsB,CAAC;KACvD;AACH,CAAC;AAJD,4CAIC;AAEM,KAAK,UAAU,eAAe,CAAC,cAAsB,EAAE,cAAc,GAAG,IAAI;IACjF,MAAM,kBAAE,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IAChC,MAAM,kBAAE,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,MAAM,kBAAE,CAAC,QAAQ,CACf,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,6CAA6C,CAAC,EACtE,cAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,CAC7C,CAAC;IACF,IAAI,cAAc,EAAE;QAClB,MAAM,IAAA,2BAAK,EAAC,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC,CAAC;KAC1D;IACD,gBAAgB,EAAE,CAAC;AACrB,CAAC;AAXD,0CAWC;AAEM,KAAK,UAAU,iBAAiB,CAAC,cAAsB;IAC5D,MAAM,kBAAE,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IAChC,gBAAgB,EAAE,CAAC;AACrB,CAAC;AAHD,8CAGC"}

View File

@@ -0,0 +1,7 @@
declare type ExpectRebuildOptions = {
buildType?: string;
metaShouldExist?: boolean;
};
export declare function expectNativeModuleToBeRebuilt(basePath: string, modulePath: string, options?: ExpectRebuildOptions): Promise<void>;
export declare function expectNativeModuleToNotBeRebuilt(basePath: string, modulePath: string, options?: ExpectRebuildOptions): Promise<void>;
export {};

View File

@@ -0,0 +1,42 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.expectNativeModuleToNotBeRebuilt = exports.expectNativeModuleToBeRebuilt = void 0;
const chai_1 = require("chai");
const fs = __importStar(require("fs-extra"));
const path = __importStar(require("path"));
async function expectNativeModuleToBeRebuilt(basePath, modulePath, options = {}) {
const metaShouldExist = Object.prototype.hasOwnProperty.call(options, 'metaShouldExist') ? options.metaShouldExist : true;
const message = `${path.basename(modulePath)} build meta should ${metaShouldExist ? '' : 'not '}exist`;
const buildType = options.buildType || 'Release';
const metaPath = path.resolve(basePath, 'node_modules', modulePath, 'build', buildType, '.forge-meta');
(0, chai_1.expect)(await fs.pathExists(metaPath), message).to.equal(metaShouldExist);
}
exports.expectNativeModuleToBeRebuilt = expectNativeModuleToBeRebuilt;
async function expectNativeModuleToNotBeRebuilt(basePath, modulePath, options = {}) {
await expectNativeModuleToBeRebuilt(basePath, modulePath, { ...options, metaShouldExist: false });
}
exports.expectNativeModuleToNotBeRebuilt = expectNativeModuleToNotBeRebuilt;
//# sourceMappingURL=rebuild.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"rebuild.js","sourceRoot":"","sources":["../../../test/helpers/rebuild.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA8B;AAC9B,6CAA+B;AAC/B,2CAA6B;AAOtB,KAAK,UAAU,6BAA6B,CACjD,QAAgB,EAChB,UAAkB,EAClB,UAAgC,EAAE;IAElC,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1H,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,sBAAsB,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC;IACvG,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,SAAS,CAAC;IACjD,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;IACvG,IAAA,aAAM,EAAC,MAAM,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;AAC3E,CAAC;AAVD,sEAUC;AAEM,KAAK,UAAU,gCAAgC,CACpD,QAAgB,EAChB,UAAkB,EAClB,UAAgC,EAAE;IAElC,MAAM,6BAA6B,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,GAAG,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC,CAAC;AACpG,CAAC;AAND,4EAMC"}