Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ Theme: Test Locally, Secure by Default. Catch workflow problems before pushing,
- CLI restructured with standalone commands that don't require the app
- Improved help text with examples for all commands

## [0.2.1] - 2025-12-26

### Fixed
- Minor bug fixes

## [0.2.0] - 2025-12-26

Core improvements to architecture to enable multiple targets.
Expand All @@ -57,7 +52,6 @@ Core improvements to architecture to enable multiple targets.

Initial release of localmost, a Mac app which manages GitHub Actions runners.

[0.3.0]: https://github.com/bfulton/localmost/compare/v0.2.1...HEAD
[0.2.1]: https://github.com/bfulton/localmost/compare/v0.2.0...v0.2.1
[0.3.0]: https://github.com/bfulton/localmost/compare/v0.2.0...HEAD
[0.2.0]: https://github.com/bfulton/localmost/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/bfulton/localmost/releases/tag/v0.1.0
14 changes: 14 additions & 0 deletions e2e/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ test.describe('localmost App', () => {
expect(page).toBeDefined();
});

test('should load preload script successfully', async () => {
// Verify window.localmost API is exposed by preload script
const hasLocalmostAPI = await page.evaluate(() => {
return typeof (window as any).localmost !== 'undefined';
});
expect(hasLocalmostAPI).toBe(true);

// Verify window.zubridge API is exposed by preload script
const hasZubridgeAPI = await page.evaluate(() => {
return typeof (window as any).zubridge !== 'undefined';
});
expect(hasZubridgeAPI).toBe(true);
});

test('should display the app title', async () => {
const title = await page.locator('.titlebar h1').textContent();
expect(title).toBe('localmost');
Expand Down
22 changes: 22 additions & 0 deletions scripts/process-shim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Minimal process shim for sandboxed Electron preload scripts.
*
* The 'debug' library (bundled in @zubridge/electron) uses 'supports-color'
* which needs:
* - process.argv for hasFlag() checks
* - process.stderr.fd for useColors check
* - process.env for various environment checks
*
* DEBUG_COLORS=false disables color detection to avoid the process.stderr.fd check
*/
module.exports = {
argv: [],
env: {
DEBUG_COLORS: 'false',
},
platform: 'browser',
version: '',
versions: {},
stdout: { isTTY: false, fd: 1 },
stderr: { isTTY: false, fd: 2 },
};
9 changes: 9 additions & 0 deletions scripts/tty-shim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* Minimal tty shim for sandboxed Electron preload scripts.
*
* The 'supports-color' library (bundled in @zubridge/electron via debug)
* calls tty.isatty() to check if output is a terminal.
*/
module.exports = {
isatty: () => false,
};
4 changes: 2 additions & 2 deletions src/cli/env.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { jest, describe, it, expect, beforeEach } from '@jest/globals';
import { parseEnvArgs, EnvOptions } from './env';
import { describe, it, expect } from '@jest/globals';
import { parseEnvArgs } from './env';

describe('CLI env command', () => {
describe('parseEnvArgs', () => {
Expand Down
1 change: 0 additions & 1 deletion src/cli/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jest.mock('../shared/paths', () => ({
}));

// Import after mocks are set up
import { spawn } from 'child_process';

describe('CLI index', () => {
beforeEach(() => {
Expand Down
4 changes: 2 additions & 2 deletions src/cli/policy.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { jest, describe, it, expect, beforeEach } from '@jest/globals';
import { parsePolicyArgs, PolicyOptions } from './policy';
import { describe, it, expect } from '@jest/globals';
import { parsePolicyArgs } from './policy';

describe('CLI policy command', () => {
describe('parsePolicyArgs', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/cli/test.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { jest, describe, it, expect, beforeEach } from '@jest/globals';
import { parseTestArgs, TestOptions } from './test';
import { describe, it, expect } from '@jest/globals';
import { parseTestArgs } from './test';

describe('CLI test command', () => {
describe('parseTestArgs', () => {
Expand Down
Loading
Loading