Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
82c6631
Adopt monorepo structure
fredrikekelund Feb 11, 2026
5ea011d
Linting and formatting
fredrikekelund Feb 11, 2026
6b07929
Fix tests
fredrikekelund Feb 11, 2026
a1a8bff
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 11, 2026
114131c
Touch-ups after merge
fredrikekelund Feb 11, 2026
a073b57
New patch-package strategy
fredrikekelund Feb 11, 2026
f4be0de
Fix PATCHES_HASH
fredrikekelund Feb 11, 2026
f97e740
Debug install-node-dependencies.sh
fredrikekelund Feb 11, 2026
10dc912
More debug
fredrikekelund Feb 11, 2026
826ac80
No postinstall scripts in apps/
fredrikekelund Feb 11, 2026
e6c7afc
Fix linter
fredrikekelund Feb 11, 2026
2a59909
Fix compare-perf setup command
fredrikekelund Feb 11, 2026
c0e30ce
Attempt to fix E2E tests
fredrikekelund Feb 11, 2026
1e76006
New approach to loading wordpress/components styles
fredrikekelund Feb 11, 2026
40d93d1
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 11, 2026
f43fe64
Clean up after trunk merge
fredrikekelund Feb 11, 2026
98c3c67
require.resolve
fredrikekelund Feb 11, 2026
28b444d
Lint
fredrikekelund Feb 11, 2026
f310242
Debugging
fredrikekelund Feb 11, 2026
50ea2f8
normalizePath
fredrikekelund Feb 11, 2026
0e829a7
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 11, 2026
28d0ea8
Update @vitejs/plugin-react@^5.1.4
fredrikekelund Feb 11, 2026
39508fb
Tweak
fredrikekelund Feb 11, 2026
d7df253
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 12, 2026
5053f4c
Clean up and move `platformTestSuite` to tools/common/
fredrikekelund Feb 12, 2026
06fc0e1
Improve post-packaging cleanup
fredrikekelund Feb 12, 2026
8a30a78
New approach to packaging: do it in isolation
fredrikekelund Feb 12, 2026
b474826
Short-circuit script in CI
fredrikekelund Feb 12, 2026
099e741
Adjust paths in maker scripts
fredrikekelund Feb 12, 2026
ed11b23
Move start script to studio-app workspace
fredrikekelund Feb 12, 2026
6d44108
Fix artifact paths
fredrikekelund Feb 12, 2026
044813c
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 12, 2026
dbf3f9a
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 12, 2026
772859f
Update .gitignore
fredrikekelund Feb 12, 2026
155f93b
Canonical version definition in apps/studio
fredrikekelund Feb 12, 2026
69fa703
Move wpcom wrappers to common
fredrikekelund Feb 12, 2026
5de3185
No src/ imports in apps/cli
fredrikekelund Feb 12, 2026
8e081e3
Make @wp-playground/blueprints a devDependency in tools/common
fredrikekelund Feb 12, 2026
c5a33b2
Update Fastfile
fredrikekelund Feb 12, 2026
45bac1a
Update format script to use `eslint --fix`
fredrikekelund Feb 12, 2026
ab4f44b
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 13, 2026
a9adcdb
Packaging tweaks
fredrikekelund Feb 13, 2026
8c7a664
Tweak
fredrikekelund Feb 13, 2026
7a5cb84
Clean up
fredrikekelund Feb 13, 2026
8f3dec6
Bring back Windows specific behavior
fredrikekelund Feb 13, 2026
4dfe830
Back to exec
fredrikekelund Feb 13, 2026
2701d0a
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 16, 2026
6c441dc
Updated dependencies
fredrikekelund Feb 16, 2026
e37fcdc
Update version to `1.7.4-beta2`
fredrikekelund Feb 16, 2026
b1695f9
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 16, 2026
db4bbc6
Dependency fixes
fredrikekelund Feb 16, 2026
d66c9ca
Fix missing dependency
fredrikekelund Feb 16, 2026
0ec1476
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 17, 2026
adfa707
Fix package.json paths in scripts/
fredrikekelund Feb 17, 2026
f5f1069
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 17, 2026
4c8e25e
Fix import paths
fredrikekelund Feb 17, 2026
23a002d
Formatting
fredrikekelund Feb 17, 2026
80e9e59
Fix tsconfig.base.json
fredrikekelund Feb 17, 2026
8f4737b
Fix certificate lookup path in Windows build
fredrikekelund Feb 17, 2026
3f4a0a6
Fix unit tests
fredrikekelund Feb 17, 2026
500be81
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 17, 2026
bd549f6
Formatting
fredrikekelund Feb 17, 2026
7cf1ba3
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 17, 2026
b89c8ed
Fix lint errors
fredrikekelund Feb 17, 2026
d45dfb4
Update AGENTS.md
fredrikekelund Feb 17, 2026
deb485c
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 18, 2026
02a4d43
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 18, 2026
7ddeec8
Split up Vitest config
fredrikekelund Feb 18, 2026
95cccb0
Attempt to fix packaging error
fredrikekelund Feb 18, 2026
1895468
Preserve relative symlink targets in package-in-isolation.ts
fredrikekelund Feb 18, 2026
2221342
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 18, 2026
28c4c4b
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 19, 2026
1449a32
Merge branch 'trunk' into stu-1288-adopt-monorepo-structure
fredrikekelund Feb 19, 2026
b1a7c6d
Lock @wordpress/components version to match patch
fredrikekelund Feb 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .buildkite/commands/build-for-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if ($BuildType -eq $BUILD_TYPE_DEV) {
$env:FILE_ARCHITECTURE=$Architecture

Write-Host "Building for architecture: $Architecture"
npm run "make:windows-$Architecture"
npm -w studio-app run "make:windows-$Architecture"
If ($LastExitCode -ne 0) { Exit $LastExitCode }

# Rename NuGet package files with generic name
Expand Down
17 changes: 5 additions & 12 deletions .buildkite/commands/install-node-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ ARCHITECTURE=$(uname -m)
NODE_VERSION=$(node --version)
PACKAGE_HASH=$(hash_file package-lock.json)

if [ -d patches ]; then
PATCHES_HASH=$(hash_directory patches/)
else
PATCHES_HASH=nopatch
PATCHES_HASH=nopatch
if [ -d apps/cli/patches ] || [ -d apps/studio/patches ]; then
CLI_PATCHES_HASH=$( [ -d apps/cli/patches ] && hash_directory apps/cli/patches || echo none )
STUDIO_PATCHES_HASH=$( [ -d apps/studio/patches ] && hash_directory apps/studio/patches || echo none )
PATCHES_HASH="${CLI_PATCHES_HASH}-${STUDIO_PATCHES_HASH}"
fi

CACHEKEY="$BUILDKITE_PIPELINE_SLUG-npm-$PLATFORM-$ARCHITECTURE-node-$NODE_VERSION-$PACKAGE_HASH-$PATCHES_HASH"
Expand Down Expand Up @@ -44,14 +45,6 @@ npm ci \
--maxsockets "$MAX_SOCKETS" \
"$@"

cd cli
npm ci \
--prefer-offline \
--no-audit \
--no-progress \
--maxsockets "$MAX_SOCKETS"
cd -

echo "--- :npm: Save cache if necessary"
# Notice that we don't cache the local node_modules.
# Those get regenerated by npm ci as per Node reccomendations.
Expand Down
3 changes: 1 addition & 2 deletions .buildkite/commands/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ esac
# `make` creates signed distributables (installers), which requires code signing setup.
# `package` creates an unsigned app bundle, sufficient for E2E testing.
echo "--- :package: Package app for testing ($PLATFORM-$ARCH)"
npx electron-vite build --outDir=dist
npx electron-forge package --arch="$ARCH" --platform="$FORGE_PLATFORM"
npm -w studio-app run package -- --arch="$ARCH" --platform="$FORGE_PLATFORM"

echo '--- :playwright: Run End To End Tests'

Expand Down
18 changes: 6 additions & 12 deletions .buildkite/commands/run-metrics-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,32 @@ echo '--- :package: Install main dependencies'
bash .buildkite/commands/install-node-dependencies.sh

echo '--- :package: Install compare-perf dependencies'
cd scripts/compare-perf
npm ci
cd -
npm -w compare-perf install

export IS_DEV_BUILD=true
export ARTIFACTS_PATH=${PWD}/artifacts
export ARTIFACTS_PATH=${PWD}/tools/metrics/artifacts
export SKIP_WORKER_THREAD_BUILD='true'

# Detect if this is a PR or trunk push
if [ "${BUILDKITE_PULL_REQUEST}" != "false" ]; then
# PR context - compare against trunk
echo "--- :chart_with_upwards_trend: Running performance comparison against trunk"
cd scripts/compare-perf
npm run compare -- perf $BUILDKITE_COMMIT trunk --tests-branch $BUILDKITE_COMMIT --rounds 3
npm -w compare-perf run compare -- perf $BUILDKITE_COMMIT trunk --tests-branch $BUILDKITE_COMMIT --rounds 3

echo "--- :github: Posting results to PR"
# Parse repo from git@github.com:owner/repo.git or https://github.com/owner/repo.git format
REPO_PATH=$(echo $BUILDKITE_REPO | sed 's|^git@github\.com:||' | sed 's|^https://github\.com/||' | sed 's|\.git$||')
npm run post-to-github -- $GITHUB_TOKEN $REPO_PATH $BUILDKITE_PULL_REQUEST trunk $BUILDKITE_COMMIT
cd -
npm -w compare-perf run post-to-github -- $GITHUB_TOKEN $REPO_PATH $BUILDKITE_PULL_REQUEST trunk $BUILDKITE_COMMIT
elif [ "${BUILDKITE_BRANCH}" == "trunk" ]; then
# Trunk push context - compare against baseline
BASELINE_COMMIT="58c52bfee7e585614ced202f43f217a01f94f029"

echo "--- :chart_with_upwards_trend: Running performance comparison against baseline"
cd scripts/compare-perf
npm run compare -- perf $BUILDKITE_COMMIT $BASELINE_COMMIT --tests-branch $BUILDKITE_COMMIT --rounds 3
npm -w compare-perf run compare -- perf $BUILDKITE_COMMIT $BASELINE_COMMIT --tests-branch $BUILDKITE_COMMIT --rounds 3

echo "--- :bar_chart: Logging metrics to CodeVitals"
COMMITTED_AT=$(git show -s $BUILDKITE_COMMIT --format="%cI")
npm run log-to-codevitals -- $CODEVITALS_AUTH_TOKEN trunk $BUILDKITE_COMMIT $BASELINE_COMMIT $COMMITTED_AT
cd -
npm -w compare-perf run log-to-codevitals -- $CODEVITALS_AUTH_TOKEN trunk $BUILDKITE_COMMIT $BASELINE_COMMIT $COMMITTED_AT
else
# Other branches - skip metrics
echo "--- :information_source: Skipping metrics for non-trunk branch"
Expand Down
18 changes: 9 additions & 9 deletions .buildkite/commands/should-skip-job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set -eu
# Job types:
# - validation: Skip if changes are limited to documentation, config, localization, and non-code files.
# Used for lint, unit tests, and e2e tests.
# - metrics: Same as validation, but also skips on test-only changes (e2e/**, *.test.ts).
# - metrics: Same as validation, but also skips on test-only changes (apps/studio/e2e/**, *.test.ts).
# Since metrics measure app performance, test file changes don't affect them.
# - build: Skip if changes are limited to documentation and config files.
# Does NOT skip on localization changes since builds should include translation updates.
Expand Down Expand Up @@ -53,7 +53,7 @@ COMMON_NON_CODE_PATTERNS=(

# Installer assets and configuration
"installers/**"
"assets/appx/**"
"apps/studio/assets/appx/**"

# Claude AI configuration
".claude/**"
Expand All @@ -62,17 +62,17 @@ COMMON_NON_CODE_PATTERNS=(

# Localization files - changes here don't affect runtime behavior or performance
LOCALIZATION_PATTERNS=(
"common/translations/**"
"tools/common/translations/**"
)

# Test files - changes here don't affect app performance (for metrics)
TEST_PATTERNS=(
"e2e/**"
"src/tests/**"
"src/**/*.test.ts"
"src/**/*.test.tsx"
"cli/**/*.test.ts"
"common/**/*.test.ts"
"apps/studio/e2e/**"
"apps/studio/src/tests/**"
"apps/studio/src/**/*.test.ts"
"apps/studio/src/**/*.test.tsx"
"apps/cli/**/*.test.ts"
"tools/common/**/*.test.ts"
"metrics/**"
)

Expand Down
8 changes: 4 additions & 4 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ steps:
bundle exec fastlane notarize_binary
plugins: [$CI_TOOLKIT_PLUGIN, $NVM_PLUGIN]
artifact_paths:
- out/**/*.app.zip
- out/*.dmg
- apps/studio/out/**/*.app.zip
- apps/studio/out/*.dmg
matrix:
- x64
- arm64
Expand Down Expand Up @@ -220,8 +220,8 @@ steps:
bundle exec fastlane notarize_binary
plugins: [$CI_TOOLKIT_PLUGIN, $NVM_PLUGIN]
artifact_paths:
- out/**/*.app.zip
- out/*.dmg
- apps/studio/out/**/*.app.zip
- apps/studio/out/*.dmg
matrix:
- x64
- arm64
Expand Down
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ dist
test-results

# E2E test import files (not versioned)
e2e/imports/*.tar.gz
e2e/imports/*.zip
e2e/imports/*.wpress
apps/studio/e2e/imports/*.tar.gz
apps/studio/e2e/imports/*.zip
apps/studio/e2e/imports/*.wpress

# Metrics traces
artifacts
Expand All @@ -126,8 +126,8 @@ artifacts
CLAUDE.md

# Bundled Node binary (downloaded during build)
bin/node
bin/node.exe
apps/studio/bin/node
apps/studio/bin/node.exe

# CLI launcher executable (built during packaging via @yao-pkg/pkg)
bin/studio-cli.exe
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
src/translations
common/translations
tools/common/translations
32 changes: 16 additions & 16 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,50 +16,50 @@ WordPress Studio - Electron desktop app for managing local WordPress sites. Buil

**MUST** build CLI before testing: `npm run cli:build && node dist/cli/main.js <command>`
- **Auth**: `auth login|logout|status` - WordPress.com OAuth (tokens valid 2 weeks)
- **Preview Sites**: See `cli/commands/preview/`
- **Local Sites**: See `cli/commands/site/`
- **Preview Sites**: See `apps/cli/commands/preview/`
- **Local Sites**: See `apps/cli/commands/site/`

## Architecture

**Electron 3-Process**: Main (Node.js) β†’ Preload (IPC bridge) β†’ Renderer (React)
**Main Process** (`src/`): IPC handlers, site servers, storage, OAuth, sync, migrations
**Renderer** (`src/components`, `src/hooks`): React UI, Redux stores, TailwindCSS
**CLI** (`cli/`): WordPress Playground (PHP WASM), yargs commands, child process of desktop app
**Main Process** (`apps/studio/src/`): IPC handlers, site servers, storage, OAuth, sync, migrations
**Renderer** (`apps/studio/src/components`, `apps/studio/src/hooks`): React UI, Redux stores, TailwindCSS
**CLI** (`apps/cli/`): WordPress Playground (PHP WASM), yargs commands, child process of desktop app

## Directory Structure

**`/src`**: Main (index.ts, ipc-handlers.ts, site-server.ts, storage/, lib/) | Renderer (components/, hooks/, stores/) | modules/ (sync, cli, user-settings, preview-site)
**`/cli`**: index.ts, commands/ (auth, preview, site), lib/ (appdata, i18n, browser)
**`/common`**: Shared lib/ (fs-utils, port-finder, oauth), types/, translations/
**`/packages`**: eslint-plugin-studio
**`/apps/studio/src`**: Main (index.ts, ipc-handlers.ts, site-server.ts, storage/, lib/) | Renderer (components/, hooks/, stores/) | modules/ (sync, cli, user-settings, preview-site)
**`/apps/cli`**: index.ts, commands/ (auth, preview, site), lib/ (appdata, i18n, browser)
**`/tools/common`**: Shared lib/ (fs-utils, port-finder, oauth), types/, translations/
**`/tools/eslint-plugin-studio`**: eslint-plugin-studio

## Key Patterns

**IPC**: Renderer β†’ `window.ipcApi.*` β†’ Preload (contextBridge) β†’ Main `ipc-handlers.ts` β†’ Business logic
**CliServerProcess**: Desktop spawns CLI as child process (`src/modules/cli/lib/cli-server-process.ts`)
**CliServerProcess**: Desktop spawns CLI as child process (`apps/studio/src/modules/cli/lib/cli-server-process.ts`)
**Redux Stores**: chat, sync, connectedSites, snapshot, onboarding | RTK Query APIs: wpcomApi, installedAppsApi, wordpressVersionsApi
**SiteServer** (`src/site-server.ts`): Manages site instances, server start/stop, SSL certs, ports
**SiteServer** (`apps/studio/src/site-server.ts`): Manages site instances, server start/stop, SSL certs, ports

## Tech Stack

**Frontend**: React 18, Redux Toolkit + RTK Query, @wordpress/components, TailwindCSS, TypeScript, Vite
**Main**: Electron 38, express
**Main**: Electron, express
**CLI**: @wp-playground/cli, @php-wasm/node, @wp-playground/blueprints
**Dev**: electron-vite, electron-forge, Vitest, Playwright
**Other**: Sentry, wpcom, zod, yargs

## Build & Distribution

**Build**: CLI (`vite build --config vite.cli.config.ts`) β†’ Electron (`electron-vite build`) β†’ Package (`electron-forge make`)
**Build**: CLI (`vite build --config apps/cli/vite.config.ts`) β†’ Electron (`electron-vite build --config apps/studio/electron.vite.config.ts`) β†’ Package (`electron-forge make --config apps/studio/forge.config.ts`)
**Platforms**: macOS (x64/ARM64 DMG), Windows (x64/ARM64 MSIX), Linux (DEB)
**Bundling**: Rollup (main), Vite (renderer with code splitting), ASAR (resources)

## Conventions

**Files**: React components (PascalCase), utils (camelCase), tests (.test.ts/.tsx)
**IPC Handlers** (`src/ipc-handlers.ts`): **MUST** `export async function handlerName(event, ...args): Promise<ReturnType>` | Handler names in `src/constants.ts` | All handlers MUST be async and return Promises
**IPC Handlers** (`apps/studio/src/ipc-handlers.ts`): **MUST** `export async function handlerName(event, ...args): Promise<ReturnType>` | Handler names in `apps/studio/src/constants.ts` | All handlers MUST be async and return Promises
**Storage**: **CRITICAL** - Always use file locking: `lockAppdata()` / `unlockAppdata()` to prevent data corruption
**i18n**: `@wordpress/i18n` (`__()` function), `common/translations/`, `<I18nProvider>` (renderer), `loadTranslations()` (CLI)
**i18n**: `@wordpress/i18n` (`__()` function), `tools/common/translations/`, `<I18nProvider>` (renderer), `loadTranslations()` (CLI)

## WordPress Studio Paths

Expand Down Expand Up @@ -109,7 +109,7 @@ For in-depth information, see these docs:
## Quick Reference

**WP Playground**: CLI runs WordPress via PHP WASM, Blueprints for config, `filterUnsupportedBlueprintFeatures()` for compatibility
**Sync**: OAuth via `common/lib/oauth.ts`, Redux `sync` slice, pull/push WordPress.com sites
**Sync**: OAuth via `tools/common/lib/oauth.ts`, Redux `sync` slice, pull/push WordPress.com sites
**Security**: Renderer sandboxed, IPC validation, strict CSP, no Node integration, self-signed HTTPS certs

---
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions __mocks__/pm2.ts β†’ apps/cli/__mocks__/pm2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export class custom {
launchBus = vi.fn( ( callback: ( error?: Error, bus?: any ) => void ) =>
callback( undefined, {} )
);
sendDataToProcessId = vi.fn( ( processId: number, data: any, callback: ( error?: Error ) => void ) =>
callback()
sendDataToProcessId = vi.fn(
( processId: number, data: any, callback: ( error?: Error ) => void ) => callback()
);
}

Expand Down
6 changes: 3 additions & 3 deletions cli/commands/_events.ts β†’ apps/cli/commands/_events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
*
*/
import fs from 'fs';
import { sequential } from '@studio/common/lib/sequential';
import { SITE_EVENTS, siteDetailsSchema, SiteEvent } from '@studio/common/lib/site-events';
import { SiteCommandLoggerAction as LoggerAction } from '@studio/common/logger-actions';
import { __ } from '@wordpress/i18n';
import { sequential } from 'common/lib/sequential';
import { SITE_EVENTS, siteDetailsSchema, SiteEvent } from 'common/lib/site-events';
import { SiteCommandLoggerAction as LoggerAction } from 'common/logger-actions';
import axon from 'pm2-axon';
import { z } from 'zod';
import { getSiteUrl, readAppdata, SiteData } from 'cli/lib/appdata';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { input } from '@inquirer/prompts';
import { DEFAULT_TOKEN_LIFETIME_MS } from '@studio/common/constants';
import { getAuthenticationUrl } from '@studio/common/lib/oauth';
import { AuthCommandLoggerAction as LoggerAction } from '@studio/common/logger-actions';
import { __, sprintf } from '@wordpress/i18n';
import { DEFAULT_TOKEN_LIFETIME_MS } from 'common/constants';
import { getAuthenticationUrl } from 'common/lib/oauth';
import { AuthCommandLoggerAction as LoggerAction } from 'common/logger-actions';
import { getUserInfo } from 'cli/lib/api';
import {
getAuthToken,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AuthCommandLoggerAction as LoggerAction } from '@studio/common/logger-actions';
import { __ } from '@wordpress/i18n';
import { AuthCommandLoggerAction as LoggerAction } from 'common/logger-actions';
import { revokeAuthToken } from 'cli/lib/api';
import {
readAppdata,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AuthCommandLoggerAction as LoggerAction } from '@studio/common/logger-actions';
import { __, sprintf } from '@wordpress/i18n';
import { AuthCommandLoggerAction as LoggerAction } from 'common/logger-actions';
import { getUserInfo } from 'cli/lib/api';
import { getAuthToken } from 'cli/lib/appdata';
import { Logger, LoggerError } from 'cli/logger';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { input } from '@inquirer/prompts';
import { getAuthenticationUrl } from 'common/lib/oauth';
import { getAuthenticationUrl } from '@studio/common/lib/oauth';
import { vi } from 'vitest';
import { getUserInfo } from 'cli/lib/api';
import {
Expand All @@ -23,7 +23,7 @@ import {
import { runCommand } from '../login';

vi.mock( '@inquirer/prompts' );
vi.mock( 'common/lib/oauth' );
vi.mock( '@studio/common/lib/oauth' );
vi.mock( 'cli/lib/api' );
vi.mock( 'cli/lib/appdata' );
vi.mock( 'cli/lib/browser' );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os from 'os';
import path from 'path';
import { getWordPressVersion } from '@studio/common/lib/get-wordpress-version';
import { PreviewCommandLoggerAction as LoggerAction } from '@studio/common/logger-actions';
import { __, sprintf } from '@wordpress/i18n';
import { getWordPressVersion } from 'common/lib/get-wordpress-version';
import { PreviewCommandLoggerAction as LoggerAction } from 'common/logger-actions';
import { uploadArchive, waitForSiteReady } from 'cli/lib/api';
import { getAuthToken, getSiteByFolder } from 'cli/lib/appdata';
import { archiveSiteContent, cleanup } from 'cli/lib/archive';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PreviewCommandLoggerAction as LoggerAction } from '@studio/common/logger-actions';
import { __ } from '@wordpress/i18n';
import { PreviewCommandLoggerAction as LoggerAction } from 'common/logger-actions';
import { deleteSnapshot } from 'cli/lib/api';
import { getAuthToken } from 'cli/lib/appdata';
import { deleteSnapshotFromAppdata, getSnapshotsFromAppdata } from 'cli/lib/snapshots';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PreviewCommandLoggerAction as LoggerAction } from '@studio/common/logger-actions';
import { __, _n, sprintf } from '@wordpress/i18n';
import Table from 'cli-table3';
import { PreviewCommandLoggerAction as LoggerAction } from 'common/logger-actions';
import { format } from 'date-fns';
import { getAuthToken, getSiteByFolder } from 'cli/lib/appdata';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os from 'os';
import path from 'path';
import { getWordPressVersion } from 'common/lib/get-wordpress-version';
import { getWordPressVersion } from '@studio/common/lib/get-wordpress-version';
import { vi } from 'vitest';
import { uploadArchive, waitForSiteReady } from 'cli/lib/api';
import { getAuthToken, getSiteByFolder } from 'cli/lib/appdata';
Expand All @@ -17,7 +17,7 @@ const mockReportProgress = vi.fn();
const mockReportWarning = vi.fn();
const mockReportKeyValuePair = vi.fn();

vi.mock( 'common/lib/get-wordpress-version' );
vi.mock( '@studio/common/lib/get-wordpress-version' );
vi.mock( 'cli/lib/appdata', async () => ( {
...( await vi.importActual( 'cli/lib/appdata' ) ),
getAppdataDirectory: vi.fn().mockReturnValue( '/test/appdata' ),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os from 'os';
import path from 'path';
import { DEMO_SITE_EXPIRATION_DAYS } from '@studio/common/constants';
import { getWordPressVersion } from '@studio/common/lib/get-wordpress-version';
import { Archiver } from 'archiver';
import { DEMO_SITE_EXPIRATION_DAYS } from 'common/constants';
import { getWordPressVersion } from 'common/lib/get-wordpress-version';
import { vi } from 'vitest';
import { uploadArchive, waitForSiteReady } from 'cli/lib/api';
import { getAuthToken, getSiteByFolder } from 'cli/lib/appdata';
Expand All @@ -12,7 +12,7 @@ import { LoggerError } from 'cli/logger';
import { mockReportStart, mockReportSuccess, mockReportError } from 'cli/tests/test-utils';
import { runCommand } from '../update';

vi.mock( 'common/lib/get-wordpress-version' );
vi.mock( '@studio/common/lib/get-wordpress-version' );
vi.mock( 'cli/lib/appdata', async () => {
const actual = await vi.importActual( 'cli/lib/appdata' );
return {
Expand Down
Loading
Loading