wp-studio 1.9.0-beta1 → 1.9.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.
@@ -1,8 +1,8 @@
1
1
  import fs__default from "fs";
2
2
  import { L as LoggerError, c as Logger, y as socketEventSchema, S as SITE_EVENTS, f as SNAPSHOT_EVENTS, A as AUTH_EVENTS, r as readCliConfig, z as siteDetailsSchema } from "./certificate-manager-COt2A5Mi.mjs";
3
- import { e as isEmptyDir } from "./rewrite-wp-cli-post-content-Ctqn9LCA.mjs";
3
+ import { e as isEmptyDir } from "./rewrite-wp-cli-post-content-C1dkgiUn.mjs";
4
4
  import { s as sequential } from "./sequential-BQFuixXz.mjs";
5
- import { aF as SITE_EVENTS_SOCKET_PATH, ap as SiteCommandLoggerAction, at as connectToDaemon, aG as getDaemonBus, aH as SITE_PROCESS_PREFIX, aA as disconnectFromDaemon, aI as removeSiteFromConfig, ae as getSiteUrl, ad as isSiteRunning } from "./index-DTdWjCXa.mjs";
5
+ import { aF as SITE_EVENTS_SOCKET_PATH, ap as SiteCommandLoggerAction, at as connectToDaemon, aG as getDaemonBus, aH as SITE_PROCESS_PREFIX, aA as disconnectFromDaemon, aI as removeSiteFromConfig, ae as getSiteUrl, ad as isSiteRunning } from "./index-lbZbk8MB.mjs";
6
6
  import { __ } from "@wordpress/i18n";
7
7
  import { g as SocketServer } from "./process-manager-ipc-B5O2oKo2.mjs";
8
8
  const logger = new Logger();
@@ -3,7 +3,7 @@ import fs__default from "fs";
3
3
  import path__default from "path";
4
4
  import { i as isErrnoException } from "./is-errno-exception-t38xF2pB.mjs";
5
5
  import { r as getRemoteSessionPidPath, x as getRemoteSessionConfigPath } from "./well-known-paths-DJJyHACC.mjs";
6
- import { b as readAuthToken } from "./index-DTdWjCXa.mjs";
6
+ import { b as readAuthToken } from "./index-lbZbk8MB.mjs";
7
7
  import { readFile } from "atomically";
8
8
  import { z } from "zod";
9
9
  function findLastAssistant(messages) {
@@ -1,4 +1,4 @@
1
- import { c as chooseSessionForAction, l as listAiSessions, d as deleteAiSession } from "./helpers-CcEaoBI3.mjs";
1
+ import { c as chooseSessionForAction, l as listAiSessions, d as deleteAiSession } from "./helpers-DImOs-ud.mjs";
2
2
  import { __ } from "@wordpress/i18n";
3
3
  import { g as getAiSessionsRootDirectory } from "./migration-AVevhLH0.mjs";
4
4
  import { L as LoggerError, c as Logger } from "./certificate-manager-COt2A5Mi.mjs";
@@ -4,7 +4,7 @@ import "crypto";
4
4
  import fs from "fs/promises";
5
5
  import path__default from "path";
6
6
  import { i as isStudioCustomEntryOfType, m as migrateLegacyFileInPlace, g as getAiSessionsRootDirectory } from "./migration-AVevhLH0.mjs";
7
- import { aa as chalk } from "./index-DTdWjCXa.mjs";
7
+ import { aa as chalk } from "./index-lbZbk8MB.mjs";
8
8
  import { __ } from "@wordpress/i18n";
9
9
  function isPiHeader(value) {
10
10
  return !!value && typeof value === "object" && value.type === "session" && typeof value.id === "string" && typeof value.timestamp === "string";
@@ -9,7 +9,7 @@ import fs from "node:fs";
9
9
  import { h as hideDirectoryOnWindows, x as isDirectoryHiddenOnWindows } from "./certificate-manager-COt2A5Mi.mjs";
10
10
  import os from "node:os";
11
11
  import path from "node:path";
12
- import { l as lockSharedConfig, r as readSharedConfig, s as saveSharedConfig, u as unlockSharedConfig, a as syncSiteSchema } from "./index-DTdWjCXa.mjs";
12
+ import { l as lockSharedConfig, r as readSharedConfig, s as saveSharedConfig, u as unlockSharedConfig, a as syncSiteSchema } from "./index-lbZbk8MB.mjs";
13
13
  import { readFile } from "atomically";
14
14
  import { z } from "zod";
15
15
  function isInstalledOnMacOs() {
@@ -1,6 +1,6 @@
1
- import { g as getDaemonStatus, l as loadRemoteSessionConfig, s as startDaemon, D as DaemonAlreadyRunningError, c as stopDaemon, f as findLastAssistant, d as getAgentEndTurnResult } from "./config-CgZKSryj.mjs";
1
+ import { g as getDaemonStatus, l as loadRemoteSessionConfig, s as startDaemon, D as DaemonAlreadyRunningError, c as stopDaemon, f as findLastAssistant, d as getAgentEndTurnResult } from "./config-BjoVOLHP.mjs";
2
2
  import { __, sprintf, _n } from "@wordpress/i18n";
3
- import { I as IsObject, H as HasPropertyKey, c as IsEqual, d as IsSchema, C as Create, e as IsKind, D as Discard, U as Update, K as Keys, f as IsObjectNotArray, h as IsNull$1, i as IsBigInt$1, j as IsBoolean, k as IsNumber$1, m as IsString, T as TakeLeft, S as String$1, _ as _Object_, n as IsObject$1, O as OptionalRemove, o as OptionalAdd, p as IsOptional, q as IsString$1, t as IsInteger, v as IsBoolean$1, w as IsEnum, x as IntegerPattern, y as StringPattern, z as Integer, N as NewLine, W as WhiteSpace, V as Values, B as IsArray$1, P as PropertyValues, E as PropertyKeys, F as IsGreaterThan, G as Optional, J as ObjectOptions, b as readAuthToken, L as emitEvent, M as buildPluginRecommendationsSection, Q as defineTool, R as Enum, X as wpcomFactory, Y as wpcomXhrRequest, Z as textResult, $ as STUDIO_SITES_ROOT, a0 as takeScreenshotTool, a1 as createSiteTool, a2 as pullSiteTool, a3 as resolveStudioToolDefinitions, a4 as getSnapshotsFromConfig, a5 as isSnapshotExpired, a6 as captureCommandOutput, a7 as runCommand$3, a8 as runCommand$4, a9 as openBrowser, aa as chalk, ab as getSitesRunningStatus, ac as getWpComSites, ad as isSiteRunning, ae as getSiteUrl, af as findSiteByFolder, ag as closeSharedBrowser } from "./index-DTdWjCXa.mjs";
3
+ import { I as IsObject, H as HasPropertyKey, c as IsEqual, d as IsSchema, C as Create, e as IsKind, D as Discard, U as Update, K as Keys, f as IsObjectNotArray, h as IsNull$1, i as IsBigInt$1, j as IsBoolean, k as IsNumber$1, m as IsString, T as TakeLeft, S as String$1, _ as _Object_, n as IsObject$1, O as OptionalRemove, o as OptionalAdd, p as IsOptional, q as IsString$1, t as IsInteger, v as IsBoolean$1, w as IsEnum, x as IntegerPattern, y as StringPattern, z as Integer, N as NewLine, W as WhiteSpace, V as Values, B as IsArray$1, P as PropertyValues, E as PropertyKeys, F as IsGreaterThan, G as Optional, J as ObjectOptions, b as readAuthToken, L as emitEvent, M as buildPluginRecommendationsSection, Q as defineTool, R as Enum, X as wpcomFactory, Y as wpcomXhrRequest, Z as textResult, $ as STUDIO_SITES_ROOT, a0 as takeScreenshotTool, a1 as createSiteTool, a2 as pullSiteTool, a3 as resolveStudioToolDefinitions, a4 as getSnapshotsFromConfig, a5 as isSnapshotExpired, a6 as captureCommandOutput, a7 as runCommand$3, a8 as runCommand$4, a9 as openBrowser, aa as chalk, ab as getSitesRunningStatus, ac as getWpComSites, ad as isSiteRunning, ae as getSiteUrl, af as findSiteByFolder, ag as closeSharedBrowser } from "./index-lbZbk8MB.mjs";
4
4
  import { password } from "@inquirer/prompts";
5
5
  import { r as readCliConfig, L as LoggerError, n as updateCliConfigWithPartial, c as Logger, i as setProgressCallback } from "./certificate-manager-COt2A5Mi.mjs";
6
6
  import { isRemoteSessionEnabled } from "./feature-flags-w_Xl_naw.mjs";
@@ -11,8 +11,8 @@ import { DefaultResourceLoader, createAgentSession, createReadTool, createWriteT
11
11
  import path__default from "path";
12
12
  import { i as isStudioCustomEntryOfType, m as migrateLegacyFileInPlace, g as getAiSessionsRootDirectory } from "./migration-AVevhLH0.mjs";
13
13
  import fs from "fs/promises";
14
- import { runCommand as runCommand$1 } from "./login-KmehB2ii.mjs";
15
- import { runCommand as runCommand$2 } from "./logout-avLN2-Fw.mjs";
14
+ import { runCommand as runCommand$1 } from "./login-Bad3qtWI.mjs";
15
+ import { runCommand as runCommand$2 } from "./logout-CapZ243A.mjs";
16
16
  import { ProcessTerminal, TUI, Container, Loader, CombinedAutocompleteProvider, isKeyRelease, matchesKey, Text, SelectList, Input, Markdown, Editor, visibleWidth, CURSOR_MARKER, truncateToWidth } from "@mariozechner/pi-tui";
17
17
  function Assign(left, right) {
18
18
  return { ...left, ...right };
@@ -4913,7 +4913,7 @@ ${chalk.hex("#8839ef")(label)}
4913
4913
  this.tui.start();
4914
4914
  }
4915
4915
  showWelcome() {
4916
- const version = "1.9.0-beta1";
4916
+ const version = "1.9.0";
4917
4917
  const cwd = process.cwd();
4918
4918
  const home = process.env.HOME ?? process.env.USERPROFILE ?? "";
4919
4919
  const displayCwd = home && cwd.startsWith(home) ? "~" + cwd.slice(home.length) : cwd;
@@ -53,7 +53,7 @@ import { L as LOCKFILE_STALE_TIME, a as LOCKFILE_WAIT_TIME, D as DEFAULT_PHP_VER
53
53
  import * as fs from "fs";
54
54
  import fs__default, { promises, constants, existsSync } from "fs";
55
55
  import ignore from "ignore";
56
- import { D as DEPLOY_IGNORE_DEFAULTS, a as arePathsEqual, i as isWordPressDirectory, r as recursiveCopyDirectory, g as getWordPressVersionUrl, I as IS_JSPI_AVAILABLE, k as keepSqliteIntegrationUpdated, c as calculateDirectorySizeForArchive, p as pathExists$1, b as isWordPressBetaVersion, d as isWordPressDevVersion, e as isEmptyDir, f as isValidWordPressVersion, h as isWordPressVersionAtLeast, j as getUnsupportedWpCliPostContentMessage, l as installSqliteIntegration } from "./rewrite-wp-cli-post-content-Ctqn9LCA.mjs";
56
+ import { D as DEPLOY_IGNORE_DEFAULTS, a as arePathsEqual, i as isWordPressDirectory, r as recursiveCopyDirectory, g as getWordPressVersionUrl, I as IS_JSPI_AVAILABLE, k as keepSqliteIntegrationUpdated, c as calculateDirectorySizeForArchive, p as pathExists$1, b as isWordPressBetaVersion, d as isWordPressDevVersion, e as isEmptyDir, f as isValidWordPressVersion, h as isWordPressVersionAtLeast, j as getUnsupportedWpCliPostContentMessage, l as installSqliteIntegration } from "./rewrite-wp-cli-post-content-C1dkgiUn.mjs";
57
57
  import { i as isErrnoException } from "./is-errno-exception-t38xF2pB.mjs";
58
58
  import { z } from "zod";
59
59
  import { l as lockCliConfig, r as readCliConfig, L as LoggerError, s as saveCliConfig, u as unlockCliConfig, a as lockFileAsync, b as unlockFileAsync, c as Logger, S as SITE_EVENTS, d as authTokenSchema, h as hideDirectoryOnWindows, g as getDefaultExportFromCjs, e as commonjsGlobal, f as SNAPSHOT_EVENTS, i as setProgressCallback, j as getProgressCallback, k as StatsMetric, m as StatsGroup, n as updateCliConfigWithPartial, o as generateSiteCertificate, p as siteRuntimeSchema, q as deleteSiteCertificate, t as emitProgress, v as requireSignalExit, w as updateCheckSchema } from "./certificate-manager-COt2A5Mi.mjs";
@@ -63,7 +63,7 @@ import { EventEmitter } from "events";
63
63
  import { P as PROCESS_MANAGER_HOME, p as processDescriptionSchema, S as SocketRequestClient, a as PROCESS_MANAGER_EVENTS_SOCKET_PATH, b as PROCESS_MANAGER_CONTROL_SOCKET_PATH, d as daemonResponseSchema, c as SocketMessageDecoder, e as SocketStreamClient, f as daemonEventSchema } from "./process-manager-ipc-B5O2oKo2.mjs";
64
64
  import fs$2, { cp, mkdir, writeFile as writeFile$2, stat, readFile as readFile$2 } from "fs/promises";
65
65
  import os, { tmpdir, platform } from "os";
66
- import { g as getWordPressVersionPath, c as cleanupLegacyMuPlugins, a as getMuPlugins, b as getWpCliPharPath, d as getSqliteCommandPath, w as writeStudioMuPluginsForNativePhpRuntime, e as getPhpBinaryPath, S as STUDIO_LOADER_MU_PLUGIN_FILENAME, L as LEGACY_MU_PLUGIN_FILENAMES, f as getWpFilesPath, h as getLanguagePacksPath, D as DEFAULT_LOCALE, i as isSupportedLocale, j as getLocaleData, k as decodePassword, l as getAiInstructionsPath, v as validateAdminUsername, m as validateAdminEmail, n as encodePassword, o as createPassword } from "./passwords-D9b88a-q.mjs";
66
+ import { g as getWordPressVersionPath, c as cleanupLegacyMuPlugins, a as getMuPlugins, b as getWpCliPharPath, d as getSqliteCommandPath, w as writeStudioMuPluginsForNativePhpRuntime, e as getPhpBinaryPath, S as STUDIO_LOADER_MU_PLUGIN_FILENAME, L as LEGACY_MU_PLUGIN_FILENAMES, f as getWpFilesPath, h as getLanguagePacksPath, D as DEFAULT_LOCALE, i as isSupportedLocale, j as getLocaleData, k as decodePassword, l as getAiInstructionsPath, v as validateAdminUsername, m as validateAdminEmail, n as encodePassword, o as createPassword } from "./passwords-CdSEzJSy.mjs";
67
67
  import archiver from "archiver";
68
68
  import require$$1$2, { Writable, Readable as Readable$1 } from "stream";
69
69
  import require$$1, { promisify } from "util";
@@ -81516,7 +81516,7 @@ function formatUpdateBanner(currentVersion, latestVersion) {
81516
81516
  });
81517
81517
  return ["", top, ...paddedLines, bottom, ""].join("\n");
81518
81518
  }
81519
- const version = "1.9.0-beta1";
81519
+ const version = "1.9.0";
81520
81520
  suppressPunycodeWarning();
81521
81521
  async function main() {
81522
81522
  await setupUpdateNotifier(version);
@@ -81547,7 +81547,7 @@ async function main() {
81547
81547
  }
81548
81548
  }).middleware(async () => {
81549
81549
  const { runMigrations } = await import("./migration-B2m6ZEJz.mjs");
81550
- const { migrations } = await import("./index-C-37XeJI.mjs");
81550
+ const { migrations } = await import("./index-CWQmyvnM.mjs");
81551
81551
  await runMigrations(migrations);
81552
81552
  const { prunePmLogs } = await import("./prune-pm-logs-3VkI4SWK.mjs");
81553
81553
  await prunePmLogs();
@@ -81581,9 +81581,9 @@ async function main() {
81581
81581
  { registerCommand: registerAuthLogoutCommand },
81582
81582
  { registerCommand: registerAuthStatusCommand }
81583
81583
  ] = await Promise.all([
81584
- import("./login-KmehB2ii.mjs"),
81585
- import("./logout-avLN2-Fw.mjs"),
81586
- import("./status-1-wmqRpn.mjs")
81584
+ import("./login-Bad3qtWI.mjs"),
81585
+ import("./logout-CapZ243A.mjs"),
81586
+ import("./status-CCfKFjub.mjs")
81587
81587
  ]);
81588
81588
  registerAuthLoginCommand(authYargs);
81589
81589
  registerAuthLogoutCommand(authYargs);
@@ -81591,11 +81591,11 @@ async function main() {
81591
81591
  authYargs.version(false).demandCommand(1, __("You must provide a valid auth command"));
81592
81592
  });
81593
81593
  const studioCodeCommandBuilder = async (aiYargs) => {
81594
- const { registerCommand: registerAiCommand } = await import("./index-Br6pmZX3.mjs").then((n) => n.i);
81594
+ const { registerCommand: registerAiCommand } = await import("./index-CrejWZh7.mjs").then((n) => n.i);
81595
81595
  registerAiCommand(aiYargs);
81596
81596
  const { isRemoteSessionEnabled } = await import("./feature-flags-w_Xl_naw.mjs");
81597
81597
  if (isRemoteSessionEnabled()) {
81598
- const { registerRemoteSessionCommand } = await import("./remote-session-C3rlPHy2.mjs");
81598
+ const { registerRemoteSessionCommand } = await import("./remote-session-BqKWuk9Y.mjs");
81599
81599
  registerRemoteSessionCommand(aiYargs);
81600
81600
  }
81601
81601
  aiYargs.command("sessions", __("Manage code sessions"), async (sessionsYargs) => {
@@ -81604,9 +81604,9 @@ async function main() {
81604
81604
  { registerCommand: registerAiSessionsListCommand },
81605
81605
  { registerCommand: registerAiSessionsResumeCommand }
81606
81606
  ] = await Promise.all([
81607
- import("./delete-BlhONmU3.mjs"),
81608
- import("./list-C1DNDMuz.mjs"),
81609
- import("./resume-53kE5NUQ.mjs")
81607
+ import("./delete-Dh2vljg9.mjs"),
81608
+ import("./list-CHv5rl5V.mjs"),
81609
+ import("./resume-B5NVaJKg.mjs")
81610
81610
  ]);
81611
81611
  sessionsYargs.option("path", {
81612
81612
  hidden: true
@@ -81639,7 +81639,7 @@ async function main() {
81639
81639
  Promise.resolve().then(() => list$1),
81640
81640
  Promise.resolve().then(() => _delete$1),
81641
81641
  Promise.resolve().then(() => update),
81642
- import("./set-01CosNkD.mjs")
81642
+ import("./set-D6lFNKau.mjs")
81643
81643
  ]);
81644
81644
  registerPreviewCreateCommand(previewYargs);
81645
81645
  registerPreviewListCommand(previewYargs);
@@ -81669,7 +81669,7 @@ async function main() {
81669
81669
  Promise.resolve().then(() => start),
81670
81670
  Promise.resolve().then(() => stop),
81671
81671
  Promise.resolve().then(() => _delete),
81672
- import("./set-CRWWKyJe.mjs")
81672
+ import("./set-C806ek1i.mjs")
81673
81673
  ]);
81674
81674
  registerSiteStatusCommand(sitesYargs);
81675
81675
  registerSiteCreateCommand(sitesYargs);
@@ -81691,7 +81691,7 @@ async function main() {
81691
81691
  });
81692
81692
  },
81693
81693
  handler: async (argv) => {
81694
- const { commandHandler: wpCliCommandHandler } = await import("./wp-BHi4Bnz4.mjs");
81694
+ const { commandHandler: wpCliCommandHandler } = await import("./wp-CzivCj1O.mjs");
81695
81695
  return wpCliCommandHandler(argv);
81696
81696
  }
81697
81697
  }).command({
@@ -81699,7 +81699,7 @@ async function main() {
81699
81699
  describe: false,
81700
81700
  // Hidden command
81701
81701
  handler: async () => {
81702
- const { commandHandler: eventsCommandHandler } = await import("./_events-DY_b7zJc.mjs");
81702
+ const { commandHandler: eventsCommandHandler } = await import("./_events--5mwAK5o.mjs");
81703
81703
  return eventsCommandHandler();
81704
81704
  }
81705
81705
  }).demandCommand(1, __("You must provide a valid command")).strict();
@@ -1,4 +1,4 @@
1
- import { l as listAiSessions, a as displaySessionsCompact } from "./helpers-CcEaoBI3.mjs";
1
+ import { l as listAiSessions, a as displaySessionsCompact } from "./helpers-DImOs-ud.mjs";
2
2
  import { __ } from "@wordpress/i18n";
3
3
  import { g as getAiSessionsRootDirectory } from "./migration-AVevhLH0.mjs";
4
4
  import { L as LoggerError, c as Logger } from "./certificate-manager-COt2A5Mi.mjs";
@@ -1,7 +1,7 @@
1
1
  import { input } from "@inquirer/prompts";
2
2
  import { u as PROTOCOL_PREFIX, v as CLIENT_ID, w as DEFAULT_TOKEN_LIFETIME_MS } from "./well-known-paths-DJJyHACC.mjs";
3
3
  import { c as Logger, L as LoggerError, A as AUTH_EVENTS } from "./certificate-manager-COt2A5Mi.mjs";
4
- import { b as readAuthToken, A as AuthCommandLoggerAction, ah as getAppLocale, a9 as openBrowser, g as getUserInfo, ai as updateSharedConfig, aj as emitCliEvent } from "./index-DTdWjCXa.mjs";
4
+ import { b as readAuthToken, A as AuthCommandLoggerAction, ah as getAppLocale, a9 as openBrowser, g as getUserInfo, ai as updateSharedConfig, aj as emitCliEvent } from "./index-lbZbk8MB.mjs";
5
5
  import { __, sprintf } from "@wordpress/i18n";
6
6
  const SCOPES = "global";
7
7
  const REDIRECT_URI = `${PROTOCOL_PREFIX}://auth`;
@@ -1,5 +1,5 @@
1
1
  import { c as Logger, L as LoggerError, A as AUTH_EVENTS } from "./certificate-manager-COt2A5Mi.mjs";
2
- import { A as AuthCommandLoggerAction, b as readAuthToken, ak as revokeAuthToken, ai as updateSharedConfig, aj as emitCliEvent } from "./index-DTdWjCXa.mjs";
2
+ import { A as AuthCommandLoggerAction, b as readAuthToken, ak as revokeAuthToken, ai as updateSharedConfig, aj as emitCliEvent } from "./index-lbZbk8MB.mjs";
3
3
  import { __ } from "@wordpress/i18n";
4
4
  async function runCommand() {
5
5
  const logger = new Logger();
package/dist/cli/main.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import "node:path";
3
- import "./index-DTdWjCXa.mjs";
3
+ import "./index-lbZbk8MB.mjs";
4
4
  import "@wordpress/i18n";
5
5
  import "semver";
6
6
  import "yargs";