wp-studio 1.7.7-beta3 → 1.7.7

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,4 +1,4 @@
1
- import { t as toDate } from "./index-B3pLQBzz.js";
1
+ import { t as toDate } from "./index-CwurJiGr.js";
2
2
  function constructFrom(date, value) {
3
3
  if (date instanceof Date) {
4
4
  return new date.constructor(value);
@@ -3,12 +3,11 @@ import path from "path";
3
3
  import { u as pathExists, r as recursiveCopyDirectory } from "./mu-plugins-2SkYFeJu.js";
4
4
  import { i as isErrnoException } from "./is-errno-exception-t38xF2pB.js";
5
5
  const MANAGED_INSTRUCTION_FILES = ["STUDIO.md"];
6
- async function installAiInstructionsToSite(sitePath, bundledPath, overwrite = false) {
6
+ async function installAiInstructionsToSite(sitePath, bundledPath, userSelectedGlobalSkills = [], overwrite = false) {
7
7
  if (!await pathExists(bundledPath)) {
8
8
  return;
9
9
  }
10
10
  const entries = await fs.promises.readdir(bundledPath, { withFileTypes: true });
11
- const userSelectedGlobalSkills = [];
12
11
  const tasks = [];
13
12
  for (const entry of entries) {
14
13
  if (entry.isFile() && entry.name.endsWith(".md")) {
@@ -11,7 +11,7 @@ import require$$0$1 from "buffer";
11
11
  import { b as requireString_decoder$1, c as requireWrappy, e as requireOnce } from "./api-Bv0vz7ML.js";
12
12
  import require$$5 from "assert";
13
13
  import require$$0$3 from "zlib";
14
- import { c as requireBufferCrc32 } from "./index-B3pLQBzz.js";
14
+ import { c as requireBufferCrc32 } from "./index-CwurJiGr.js";
15
15
  var path$1;
16
16
  var hasRequiredPath$1;
17
17
  function requirePath$1() {
@@ -4,12 +4,12 @@ import os from "os";
4
4
  import path from "path";
5
5
  import { SupportedPHPVersions } from "@php-wasm/universal";
6
6
  import { M as MINIMUM_WORDPRESS_VERSION, f as commonjsGlobal, i as getServerFilesPath, r as DEFAULT_WORDPRESS_VERSION, D as DEFAULT_PHP_VERSION, e as LoggerError, l as Logger } from "./logger-Cqf2Cd_R.js";
7
- import { i as installAiInstructionsToSite } from "./agent-skills-BK3c6w7Z.js";
7
+ import { i as installAiInstructionsToSite } from "./agent-skills-BJcuCp-3.js";
8
8
  import { __, sprintf } from "@wordpress/i18n";
9
9
  import { r as readCliConfig, l as lockCliConfig, s as saveCliConfig, u as unlockCliConfig, f as SITE_EVENTS } from "./core-Dyii87aC.js";
10
10
  import { g as getDomainNameValidationError, V as ValidationError$1 } from "./validation-error-DqLxqQuA.js";
11
11
  import { t as isWordPressBetaVersion, m as isWordPressDevVersion, j as getLanguagePacksPath, u as pathExists, v as isEmptyDir, n as isWordPressDirectory, w as arePathsEqual, r as recursiveCopyDirectory, x as keepSqliteIntegrationUpdated, k as getAiInstructionsPath, y as isValidWordPressVersion, z as isWordPressVersionAtLeast } from "./mu-plugins-2SkYFeJu.js";
12
- import { g as getAppLocale, D as DEFAULT_LOCALE, e as untildify, f as updateServerFiles } from "./index-B3pLQBzz.js";
12
+ import { g as getAppLocale, D as DEFAULT_LOCALE, e as untildify, f as updateServerFiles, h as readSharedConfig } from "./index-CwurJiGr.js";
13
13
  import dns from "dns/promises";
14
14
  import { v as validateAdminUsername, a as validateAdminEmail, e as encodePassword, c as createPassword } from "./passwords-DyzWd9Xi.js";
15
15
  import require$$0$1 from "http";
@@ -40455,7 +40455,9 @@ async function runCommand(sitePath, options) {
40455
40455
  isSqliteUpdated ? __("SQLite integration configured") : __("SQLite integration skipped")
40456
40456
  );
40457
40457
  try {
40458
- await installAiInstructionsToSite(sitePath, getAiInstructionsPath());
40458
+ const sharedConfig = await readSharedConfig();
40459
+ const selectedSkills = sharedConfig.selectedSkills ?? [];
40460
+ await installAiInstructionsToSite(sitePath, getAiInstructionsPath(), selectedSkills);
40459
40461
  } catch (error) {
40460
40462
  logger.reportError(
40461
40463
  new LoggerError(__("Failed to install AI instructions. Proceeding anyway…"), error),
@@ -2,11 +2,11 @@ import os from "os";
2
2
  import path from "path";
3
3
  import { e as SNAPSHOT_EVENTS } from "./core-Dyii87aC.js";
4
4
  import { g as getWordPressVersion } from "./get-wordpress-version-CwHHGEmm.js";
5
- import { r as readAuthToken } from "./index-B3pLQBzz.js";
5
+ import { r as readAuthToken } from "./index-CwurJiGr.js";
6
6
  import { P as PreviewCommandLoggerAction } from "./logger-actions-B6ATrIMn.js";
7
7
  import { sprintf, __ } from "@wordpress/i18n";
8
8
  import { u as uploadArchive, w as waitForSiteReady } from "./api-Bv0vz7ML.js";
9
- import { a as archiveSiteContent, c as cleanup } from "./archive-B1WJwrcB.js";
9
+ import { a as archiveSiteContent, c as cleanup } from "./archive-NQ6VSP6r.js";
10
10
  import { g as getSiteByFolder } from "./sites-tP0lSO72.js";
11
11
  import { g as getSnapshotsFromConfig, a as getNextSnapshotSequence, s as saveSnapshotToConfig } from "./snapshots-DtPSlA-8.js";
12
12
  import { e as emitCliEvent } from "./daemon-client-D9gfGb3f.js";
@@ -1,7 +1,7 @@
1
1
  import fs from "fs";
2
2
  import { l as lockCliConfig, r as readCliConfig, s as saveCliConfig, u as unlockCliConfig, f as SITE_EVENTS } from "./core-Dyii87aC.js";
3
3
  import { w as arePathsEqual } from "./mu-plugins-2SkYFeJu.js";
4
- import { r as readAuthToken } from "./index-B3pLQBzz.js";
4
+ import { r as readAuthToken } from "./index-CwurJiGr.js";
5
5
  import { S as SiteCommandLoggerAction } from "./logger-actions-B6ATrIMn.js";
6
6
  import { __, sprintf, _n } from "@wordpress/i18n";
7
7
  import { d as deleteSnapshot } from "./api-Bv0vz7ML.js";
@@ -1,5 +1,5 @@
1
1
  import { e as SNAPSHOT_EVENTS } from "./core-Dyii87aC.js";
2
- import { n as normalizeHostname, r as readAuthToken } from "./index-B3pLQBzz.js";
2
+ import { n as normalizeHostname, r as readAuthToken } from "./index-CwurJiGr.js";
3
3
  import { P as PreviewCommandLoggerAction } from "./logger-actions-B6ATrIMn.js";
4
4
  import { __ } from "@wordpress/i18n";
5
5
  import { d as deleteSnapshot, a as deleteAllSnapshots } from "./api-Bv0vz7ML.js";