wp-studio 1.7.8-beta2 → 1.7.8-beta3

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.
Files changed (219) hide show
  1. package/README.md +33 -0
  2. package/assets/demo.gif +0 -0
  3. package/dist/cli/{_events-BRGCap7g.mjs → _events-C60cNJ1W.mjs} +1 -1
  4. package/dist/cli/{index-9Oz-0bqF.mjs → index-D9syEMMz.mjs} +4 -4
  5. package/dist/cli/{index-CT4S2538.mjs → index-Ru6CUP6w.mjs} +24 -12
  6. package/dist/cli/{login-D4E3GoXe.mjs → login-C3QlGVbr.mjs} +1 -1
  7. package/dist/cli/{logout-DE-RoshK.mjs → logout-B63eZwJZ.mjs} +1 -1
  8. package/dist/cli/main.mjs +2 -1
  9. package/dist/cli/{resume-DLoXmzNG.mjs → resume-DQT_MK6A.mjs} +1 -1
  10. package/dist/cli/{set-B0L-QiXT.mjs → set-C805heQS.mjs} +1 -1
  11. package/dist/cli/{set-B8YYUENH.mjs → set-CjTbueyB.mjs} +1 -1
  12. package/dist/cli/{status-DEOAA0yx.mjs → status-SnKm1rRP.mjs} +1 -1
  13. package/dist/cli/{wp-CobSX6C6.mjs → wp-D0HZdudM.mjs} +1 -1
  14. package/dist/cli/wp-files/sqlite-command/composer.json +4 -3
  15. package/dist/cli/wp-files/sqlite-command/composer.lock +132 -80
  16. package/dist/cli/wp-files/sqlite-command/vendor/autoload.php +1 -1
  17. package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_classmap.php +58 -70
  18. package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_namespaces.php +1 -0
  19. package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_psr4.php +1 -1
  20. package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_real.php +5 -5
  21. package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_static.php +78 -80
  22. package/dist/cli/wp-files/sqlite-command/vendor/composer/installed.json +104 -49
  23. package/dist/cli/wp-files/sqlite-command/vendor/composer/installed.php +29 -16
  24. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/CHANGELOG.md +103 -0
  25. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Comparator/Comparator.php +62 -0
  26. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Comparator/DateComparator.php +50 -0
  27. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Comparator/NumberComparator.php +78 -0
  28. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Exception/AccessDeniedException.php +19 -0
  29. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Exception/DirectoryNotFoundException.php +19 -0
  30. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Finder.php +851 -0
  31. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Gitignore.php +91 -0
  32. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Glob.php +116 -0
  33. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/CustomFilterIterator.php +61 -0
  34. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php +58 -0
  35. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php +48 -0
  36. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php +110 -0
  37. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php +51 -0
  38. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php +58 -0
  39. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/FilenameFilterIterator.php +45 -0
  40. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/LazyIterator.php +32 -0
  41. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php +107 -0
  42. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/PathFilterIterator.php +56 -0
  43. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php +134 -0
  44. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php +57 -0
  45. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/SortableIterator.php +115 -0
  46. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php +173 -0
  47. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/LICENSE +19 -0
  48. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/README.md +14 -0
  49. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/SplFileInfo.php +80 -0
  50. package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/composer.json +31 -0
  51. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/mustache/.gitattributes +8 -0
  52. package/dist/cli/wp-files/sqlite-command/vendor/{mustache → wp-cli}/mustache/LICENSE +1 -1
  53. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/mustache/README.md +76 -0
  54. package/dist/cli/wp-files/sqlite-command/vendor/{mustache → wp-cli}/mustache/composer.json +6 -16
  55. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/mustache/src/Mustache/Autoloader.php +88 -0
  56. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Cache/AbstractCache.php +7 -15
  57. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Cache/FilesystemCache.php +15 -20
  58. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Cache/NoopCache.php +4 -8
  59. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Cache.php +7 -10
  60. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Compiler.php +87 -144
  61. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Context.php +19 -23
  62. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Engine.php +134 -251
  63. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/InvalidArgumentException.php +2 -6
  64. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/LogicException.php +2 -6
  65. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/RuntimeException.php +2 -6
  66. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/SyntaxException.php +8 -7
  67. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/UnknownFilterException.php +7 -7
  68. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/UnknownHelperException.php +7 -7
  69. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/UnknownTemplateException.php +7 -7
  70. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception.php +5 -4
  71. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/HelperCollection.php +17 -22
  72. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/LambdaHelper.php +8 -28
  73. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/ArrayLoader.php +9 -12
  74. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/CascadingLoader.php +15 -18
  75. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/FilesystemLoader.php +18 -24
  76. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/InlineLoader.php +13 -19
  77. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/MutableLoader.php +7 -4
  78. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/ProductionFilesystemLoader.php +16 -23
  79. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/StringLoader.php +4 -8
  80. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader.php +7 -8
  81. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Logger/AbstractLogger.php +26 -22
  82. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Logger/StreamLogger.php +20 -25
  83. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Logger.php +37 -13
  84. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Parser.php +93 -100
  85. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Source/FilesystemSource.php +7 -11
  86. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Source.php +5 -4
  87. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Template.php +32 -39
  88. package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Tokenizer.php +29 -33
  89. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/.actrc +3 -0
  90. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/.gitattributes +6 -0
  91. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/.mailmap +234 -0
  92. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/README.md +4 -4
  93. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/VERSION +1 -1
  94. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/CHANGELOG.md +0 -65
  95. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/README.md +1 -2
  96. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/certificates/cacert.pem +372 -315
  97. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/certificates/cacert.pem.sha256 +1 -1
  98. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/composer.json +5 -7
  99. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Iri.php +18 -20
  100. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Requests.php +1 -1
  101. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Response/Headers.php +1 -1
  102. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Transport/Curl.php +1 -5
  103. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Transport/Fsockopen.php +0 -2
  104. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Utility/CaseInsensitiveDictionary.php +0 -12
  105. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Utility/FilteredIterator.php +2 -2
  106. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/composer.json +13 -30
  107. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/dependencies.yml +6 -0
  108. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/manifest.json +1 -1
  109. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Autoloader.php +2 -4
  110. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/AutoloaderStep.php +1 -10
  111. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/CheckRoot.php +2 -20
  112. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/DefineProtectedCommands.php +3 -3
  113. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/IncludeFrameworkAutoloader.php +4 -3
  114. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/IncludeRequestsAutoloader.php +3 -4
  115. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/InitializeContexts.php +0 -3
  116. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/InitializeLogger.php +1 -1
  117. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php +3 -6
  118. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/{RegisterShutdownHandler.php → LoadDispatcher.php} +4 -6
  119. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LoadRequiredCommand.php +5 -9
  120. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LoadUtilityFunctions.php +0 -1
  121. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Completions.php +6 -149
  122. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Configurator.php +49 -202
  123. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Admin.php +21 -113
  124. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Auto.php +1 -1
  125. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Cli.php +1 -0
  126. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Frontend.php +1 -0
  127. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php +26 -63
  128. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php +9 -19
  129. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php +19 -284
  130. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/DocParser.php +5 -17
  131. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Exception/NonExistentKeyException.php +3 -6
  132. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Extractor.php +54 -30
  133. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Base.php +3 -7
  134. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Comment.php +2 -4
  135. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Post.php +3 -8
  136. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Signup.php +1 -3
  137. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Site.php +4 -12
  138. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/User.php +1 -3
  139. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/FileCache.php +33 -135
  140. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Formatter.php +57 -221
  141. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Inflector.php +4 -4
  142. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Iterators/CSV.php +1 -6
  143. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Iterators/Query.php +1 -3
  144. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Iterators/Table.php +1 -7
  145. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Iterators/Transform.php +0 -2
  146. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Loggers/Base.php +0 -15
  147. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Loggers/Quiet.php +3 -2
  148. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Loggers/Regular.php +3 -4
  149. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/NoOp.php +0 -4
  150. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Process.php +7 -40
  151. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/RequestsLibrary.php +1 -4
  152. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php +234 -795
  153. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/SynopsisParser.php +26 -116
  154. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/SynopsisValidator.php +1 -1
  155. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Traverser/RecursiveDataStructureTraverser.php +26 -69
  156. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/UpgraderSkin.php +1 -1
  157. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/WpHttpCacheManager.php +5 -67
  158. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/WpOrgApi.php +3 -3
  159. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/boot-fs.php +2 -2
  160. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/bootstrap.php +2 -5
  161. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/class-wp-cli.php +62 -311
  162. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/CLI_Alias_Command.php +60 -292
  163. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/CLI_Cache_Command.php +1 -1
  164. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/CLI_Command.php +31 -191
  165. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/Help_Command.php +35 -177
  166. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/config-spec.php +4 -28
  167. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/utils-wp.php +47 -81
  168. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/utils.php +200 -512
  169. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/wp-cli.php +2 -2
  170. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/wp-settings-cli.php +465 -0
  171. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/templates/man-params.mustache +4 -0
  172. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/templates/man.mustache +0 -8
  173. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/ArgValidationTest.php +74 -0
  174. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/CommandFactoryTest.php +420 -0
  175. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/ConfiguratorTest.php +87 -0
  176. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/DocParserTest.php +213 -0
  177. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/ExtractorTest.php +293 -0
  178. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/FileCacheTest.php +207 -0
  179. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/HelpTest.php +119 -0
  180. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/InflectorTest.php +37 -0
  181. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/LoggingTest.php +124 -0
  182. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/ProcessTest.php +30 -0
  183. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/SynopsisParserTest.php +194 -0
  184. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/UtilsTest.php +1092 -0
  185. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WPCLITest.php +16 -0
  186. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WP_CLI/Iterators/CSVTest.php +109 -0
  187. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WP_CLI/Traversers/RecursiveDataStructureTraverserTest.php +151 -0
  188. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WP_CLI/WpOrgApiTest.php +166 -0
  189. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WpVersionCompareTest.php +78 -0
  190. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/bootstrap.php +17 -0
  191. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/commandfactory-doc_comment-class-win.php +70 -0
  192. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/commandfactory-doc_comment-class.php +70 -0
  193. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/commandfactory-doc_comment-function-win.php +19 -0
  194. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/commandfactory-doc_comment-function.php +19 -0
  195. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/bar.ab2 +0 -0
  196. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/baz.ab1 +0 -0
  197. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/baz.ac1 +0 -0
  198. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/baz.efg2 +0 -0
  199. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/foo.ab1 +0 -0
  200. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/foo.ab2 +0 -0
  201. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/foo.efg1 +0 -0
  202. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/foo.efg2 +0 -0
  203. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/mock-requests-transport.php +34 -0
  204. package/dist/cli/wp-files/sqlite-command/version +1 -1
  205. package/package.json +4 -3
  206. package/dist/cli/wp-files/sqlite-command/vendor/mustache/mustache/.php-cs-fixer.php +0 -20
  207. package/dist/cli/wp-files/sqlite-command/vendor/mustache/mustache/README.md +0 -94
  208. package/dist/cli/wp-files/sqlite-command/vendor/mustache/mustache/src/RenderedString.php +0 -51
  209. package/dist/cli/wp-files/sqlite-command/vendor/mustache/mustache/src/compat.php +0 -282
  210. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/.typos.toml +0 -14
  211. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/AGENTS.md +0 -121
  212. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/scripts/proxy/proxy.py +0 -5
  213. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/scripts/proxy/start.sh +0 -19
  214. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/scripts/proxy/stop.sh +0 -10
  215. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Path.php +0 -260
  216. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/ShutdownHandler.php +0 -329
  217. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/schemas/wp-cli-config.json +0 -218
  218. package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/schemas/wp-cli.example.yml +0 -55
  219. /package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/{codecov.yml → tests/data/expand_globs/bar.ab1} +0 -0
@@ -13,24 +13,7 @@ use WP_CLI\Utils;
13
13
  *
14
14
  * Aliases are shorthand references to WordPress installs. For instance,
15
15
  * `@dev` could refer to a development install and `@prod` could refer to a production install.
16
- * This command gives you an option to add, update and delete, the registered aliases you have available.
17
- *
18
- * Environment variables can be used in alias definitions using the syntax `${env.VARIABLE_NAME}`.
19
- * This allows you to centralize configuration in environment variables or .env files.
20
- *
21
- * ## SECURITY CONSIDERATIONS
22
- *
23
- * When environment variables are used in aliases, their interpolated values will appear in command
24
- * output (e.g., `wp cli alias list` or `wp cli alias get`). If you have sensitive data in environment
25
- * variables (such as passwords or API keys), be aware that these values may be exposed in:
26
- *
27
- * - Terminal output when listing or viewing aliases
28
- * - Log files if command output is redirected
29
- * - Shell history if used in command arguments
30
- *
31
- * To view aliases without interpolating environment variables, use the `--raw` flag.
32
- *
33
- * Learn more about [running commands remotely](https://make.wordpress.org/cli/handbook/guides/running-commands-remotely/).
16
+ * This command gives you and option to add, update and delete, the registered aliases you have available.
34
17
  *
35
18
  * ## EXAMPLES
36
19
  *
@@ -59,20 +42,6 @@ use WP_CLI\Utils;
59
42
  * $ wp cli alias delete @prod
60
43
  * Success: Deleted '@prod' alias.
61
44
  *
62
- * # Use environment variables in alias definitions.
63
- * # In wp-cli.yml:
64
- * # @prod:
65
- * # ssh: ${env.PROD_USER}@${env.PROD_HOST}:${env.PROD_PATH}
66
- * # user: ${env.PROD_WP_USER}
67
- * $ export PROD_USER=myuser PROD_HOST=example.com PROD_PATH=/var/www PROD_WP_USER=admin
68
- * $ wp @prod option get home
69
- *
70
- * # View aliases without environment variable interpolation.
71
- * $ wp cli alias list --raw
72
- *
73
- * # Run a command against a group of aliases in parallel.
74
- * $ WP_CLI_ALIAS_GROUPS_PARALLEL=1 wp @all plugin status
75
- *
76
45
  * @package wp-cli
77
46
  * @when before_wp_load
78
47
  */
@@ -93,9 +62,6 @@ class CLI_Alias_Command extends WP_CLI_Command {
93
62
  * - var_export
94
63
  * ---
95
64
  *
96
- * [--raw]
97
- * : Display aliases without interpolating environment variables.
98
- *
99
65
  * ## EXAMPLES
100
66
  *
101
67
  * # List all available aliases.
@@ -110,44 +76,10 @@ class CLI_Alias_Command extends WP_CLI_Command {
110
76
  * - @prod
111
77
  * - @dev
112
78
  *
113
- * # List aliases without environment variable interpolation.
114
- * $ wp cli alias list --raw
115
- *
116
79
  * @subcommand list
117
- *
118
- * @param array $args Positional arguments. Unused.
119
- * @param array{format: string, raw?: bool} $assoc_args Associative arguments.
120
80
  */
121
81
  public function list_( $args, $assoc_args ) {
122
- $raw = Utils\get_flag_value( $assoc_args, 'raw', false );
123
- $aliases = $raw ? WP_CLI::get_runner()->raw_aliases : WP_CLI::get_runner()->aliases;
124
-
125
- // Add @ prefix to aliases for display (backward compatibility)
126
- $display_aliases = [];
127
- foreach ( $aliases as $alias => $value ) {
128
- $display_alias = '@' . $alias;
129
- if ( is_array( $value ) ) {
130
- // Check if it's a group (numeric indexed array)
131
- if ( isset( $value[0] ) && is_string( $value[0] ) ) {
132
- /** @var string[] $value */
133
- // It's a group, add @ prefix to each member
134
- $display_aliases[ $display_alias ] = array_map(
135
- function ( $member ) {
136
- return '@' . $member;
137
- },
138
- $value
139
- );
140
- } else {
141
- // It's a regular alias config
142
- $display_aliases[ $display_alias ] = $value;
143
- }
144
- } else {
145
- // It's a string (like the 'all' description)
146
- $display_aliases[ $display_alias ] = $value;
147
- }
148
- }
149
-
150
- WP_CLI::print_value( $display_aliases, $assoc_args );
82
+ WP_CLI::print_value( WP_CLI::get_runner()->aliases, $assoc_args );
151
83
  }
152
84
 
153
85
  /**
@@ -158,50 +90,19 @@ class CLI_Alias_Command extends WP_CLI_Command {
158
90
  * <key>
159
91
  * : Key for the alias.
160
92
  *
161
- * [--field=<field>]
162
- * : Get the value of a specific field.
163
- *
164
- * [--raw]
165
- * : Display alias without interpolating environment variables.
166
- *
167
93
  * ## EXAMPLES
168
94
  *
169
95
  * # Get alias.
170
96
  * $ wp cli alias get @prod
171
97
  * ssh: dev@somedeve.env:12345/home/dev/
172
- *
173
- * # Get a specific field of an alias.
174
- * $ wp cli alias get @prod --field=ssh
175
- * dev@somedeve.env:12345/home/dev/
176
- *
177
- * # Get alias without environment variable interpolation.
178
- * $ wp cli alias get @prod --raw
179
- * ssh: ${env.PROD_USER}@${env.PROD_HOST}:${env.PROD_PATH}
180
- *
181
- * @param array{string} $args Positional arguments.
182
- * @param array{field?: string, raw?: bool} $assoc_args Associative arguments.
183
98
  */
184
- public function get( $args, $assoc_args = [] ) {
99
+ public function get( $args, $assoc_args ) {
185
100
  list( $alias ) = $args;
186
101
 
187
- // Normalize alias (remove @ prefix if present)
188
- $alias = ltrim( $alias, '@' );
189
-
190
- $raw = Utils\get_flag_value( $assoc_args, 'raw', false );
191
- $aliases = $raw ? WP_CLI::get_runner()->raw_aliases : WP_CLI::get_runner()->aliases;
102
+ $aliases = WP_CLI::get_runner()->aliases;
192
103
 
193
104
  if ( empty( $aliases[ $alias ] ) ) {
194
- WP_CLI::error( "No alias found with key '@{$alias}'." );
195
- }
196
-
197
- $field = Utils\get_flag_value( $assoc_args, 'field', null );
198
-
199
- if ( null !== $field ) {
200
- if ( ! array_key_exists( $field, $aliases[ $alias ] ) ) {
201
- WP_CLI::error( "The '{$field}' property does not exist for '@{$alias}'." );
202
- }
203
- WP_CLI::log( $aliases[ $alias ][ $field ] );
204
- return;
105
+ WP_CLI::error( "No alias found with key '{$alias}'." );
205
106
  }
206
107
 
207
108
  foreach ( $aliases[ $alias ] as $key => $value ) {
@@ -257,9 +158,6 @@ class CLI_Alias_Command extends WP_CLI_Command {
257
158
  * # Add group of aliases.
258
159
  * $ wp cli alias add @multiservers --grouping=servera,serverb
259
160
  * Success: Added '@multiservers' alias.
260
- *
261
- * @param array{string} $args Positional arguments.
262
- * @param array{'set-user'?: string, 'set-url'?: string, 'set-path'?: string, 'set-ssh'?: string, 'set-http'?: string, grouping?: string, config?: string} $assoc_args Associative arguments.
263
161
  */
264
162
  public function add( $args, $assoc_args ) {
265
163
 
@@ -269,24 +167,19 @@ class CLI_Alias_Command extends WP_CLI_Command {
269
167
 
270
168
  $this->validate_config_file( $config_path );
271
169
 
272
- $alias = $args[0];
273
-
170
+ $alias = $args[0];
274
171
  $grouping = Utils\get_flag_value( $assoc_args, 'grouping' );
275
172
 
276
173
  $this->validate_input( $assoc_args, $grouping );
277
174
 
278
- $existing_key = $this->find_alias_key( $aliases, $alias );
279
- if ( null !== $existing_key ) {
280
- WP_CLI::error( "Key '@" . $this->normalize_alias( $alias ) . "' exists already." );
175
+ if ( isset( $aliases[ $alias ] ) ) {
176
+ WP_CLI::error( "Key '{$alias}' exists already." );
281
177
  }
282
178
 
283
- // When adding new aliases, normalize the key (no @ prefix)
284
- $normalized_alias = $this->normalize_alias( $alias );
285
-
286
179
  if ( null === $grouping ) {
287
- $aliases = $this->build_aliases( $aliases, $normalized_alias, $assoc_args, false );
180
+ $aliases = $this->build_aliases( $aliases, $alias, $assoc_args, false );
288
181
  } else {
289
- $aliases = $this->build_aliases( $aliases, $normalized_alias, $assoc_args, true, $grouping );
182
+ $aliases = $this->build_aliases( $aliases, $alias, $assoc_args, true, $grouping );
290
183
  }
291
184
 
292
185
  $this->process_aliases( $aliases, $alias, $config_path, 'Added' );
@@ -317,9 +210,6 @@ class CLI_Alias_Command extends WP_CLI_Command {
317
210
  * # Delete project alias.
318
211
  * $ wp cli alias delete @prod --config=project
319
212
  * Success: Deleted '@prod' alias.
320
- *
321
- * @param array{string} $args Positional arguments.
322
- * @param array{config?: string} $assoc_args Associative arguments
323
213
  */
324
214
  public function delete( $args, $assoc_args ) {
325
215
 
@@ -331,12 +221,11 @@ class CLI_Alias_Command extends WP_CLI_Command {
331
221
 
332
222
  $this->validate_config_file( $config_path );
333
223
 
334
- $alias_key = $this->find_alias_key( $aliases, $alias );
335
- if ( null === $alias_key ) {
336
- WP_CLI::error( "No alias found with key '@" . $this->normalize_alias( $alias ) . "'." );
224
+ if ( empty( $aliases[ $alias ] ) ) {
225
+ WP_CLI::error( "No alias found with key '{$alias}'." );
337
226
  }
338
227
 
339
- unset( $aliases[ $alias_key ] );
228
+ unset( $aliases[ $alias ] );
340
229
  $this->process_aliases( $aliases, $alias, $config_path, 'Deleted' );
341
230
  }
342
231
 
@@ -383,15 +272,11 @@ class CLI_Alias_Command extends WP_CLI_Command {
383
272
  * # Update project alias.
384
273
  * $ wp cli alias update @prod --set-user=newuser --set-path=/new/path/to/wordpress/install/ --config=project
385
274
  * Success: Updated 'prod' alias.
386
- *
387
- * @param array{string} $args Positional arguments.
388
- * @param array{'set-user'?: string, 'set-url'?: string, 'set-path'?: string, 'set-ssh'?: string, 'set-http'?: string, grouping?: string, config?: string} $assoc_args Associative arguments.
389
275
  */
390
276
  public function update( $args, $assoc_args ) {
391
277
 
392
- $config = ( ! empty( $assoc_args['config'] ) ? $assoc_args['config'] : '' );
393
- $alias = $args[0];
394
-
278
+ $config = ( ! empty( $assoc_args['config'] ) ? $assoc_args['config'] : '' );
279
+ $alias = $args[0];
395
280
  $grouping = Utils\get_flag_value( $assoc_args, 'grouping' );
396
281
 
397
282
  list( $config_path, $aliases ) = $this->get_aliases_data( $config, $alias, true );
@@ -400,18 +285,14 @@ class CLI_Alias_Command extends WP_CLI_Command {
400
285
 
401
286
  $this->validate_input( $assoc_args, $grouping );
402
287
 
403
- $alias_key = $this->find_alias_key( $aliases, $alias );
404
- if ( null === $alias_key ) {
405
- WP_CLI::error( "No alias found with key '@" . $this->normalize_alias( $alias ) . "'." );
288
+ if ( empty( $aliases[ $alias ] ) ) {
289
+ WP_CLI::error( "No alias found with key '{$alias}'." );
406
290
  }
407
291
 
408
- // For updates, we need to work with the actual YAML key
409
- // Pass the alias_key to build_aliases which will be normalized internally
410
- // But we need to remove the old key and add with the new one if structure changed
411
292
  if ( null === $grouping ) {
412
- $aliases = $this->build_aliases( $aliases, $alias_key, $assoc_args, false, '', true );
293
+ $aliases = $this->build_aliases( $aliases, $alias, $assoc_args, false, '', true );
413
294
  } else {
414
- $aliases = $this->build_aliases( $aliases, $alias_key, $assoc_args, true, $grouping, true );
295
+ $aliases = $this->build_aliases( $aliases, $alias, $assoc_args, true, $grouping, true );
415
296
  }
416
297
 
417
298
  $this->process_aliases( $aliases, $alias, $config_path, 'Updated' );
@@ -435,22 +316,23 @@ class CLI_Alias_Command extends WP_CLI_Command {
435
316
  * @subcommand is-group
436
317
  */
437
318
  public function is_group( $args, $assoc_args = array() ) {
438
- $alias = ltrim( $args[0], '@' );
319
+ $alias = $args[0];
439
320
 
440
321
  $aliases = WP_CLI::get_runner()->aliases;
441
322
 
442
323
  if ( empty( $aliases[ $alias ] ) ) {
443
- WP_CLI::error( "No alias found with key '@{$alias}'." );
324
+ WP_CLI::error( "No alias found with key '{$alias}'." );
444
325
  }
445
326
 
446
327
  // how do we know the alias is a group?
447
328
  // + array keys are numeric
448
- // + array values are strings (group members)
329
+ // + array values begin with '@'
449
330
 
450
- $first_item = $aliases[ $alias ];
451
- $first_item_key = key( $first_item );
331
+ $first_item = $aliases[ $alias ];
332
+ $first_item_key = key( $first_item );
333
+ $first_item_value = $first_item[ $first_item_key ];
452
334
 
453
- if ( is_numeric( $first_item_key ) ) {
335
+ if ( is_numeric( $first_item_key ) && substr( $first_item_value, 0, 1 ) === '@' ) {
454
336
  WP_CLI::halt( 0 );
455
337
  }
456
338
  WP_CLI::halt( 1 );
@@ -483,11 +365,11 @@ class CLI_Alias_Command extends WP_CLI_Command {
483
365
  $aliases = $project_aliases;
484
366
  } else {
485
367
 
486
- $is_global_alias = null !== $this->find_alias_key( $global_aliases, $alias );
487
- $is_project_alias = null !== $this->find_alias_key( $project_aliases, $alias );
368
+ $is_global_alias = array_key_exists( $alias, $global_aliases );
369
+ $is_project_alias = array_key_exists( $alias, $project_aliases );
488
370
 
489
371
  if ( $is_global_alias && $is_project_alias ) {
490
- WP_CLI::error( "Key '@" . $this->normalize_alias( $alias ) . "' found in more than one path. Please pass --config param." );
372
+ WP_CLI::error( "Key '{$alias}' found in more than one path. Please pass --config param." );
491
373
  } elseif ( $is_global_alias ) {
492
374
  $config_path = $global_config_path;
493
375
  $aliases = $global_aliases;
@@ -504,8 +386,10 @@ class CLI_Alias_Command extends WP_CLI_Command {
504
386
  * Check if the config file exists and is writable.
505
387
  *
506
388
  * @param string $config_path Path to config file.
389
+ *
390
+ * @return void
507
391
  */
508
- private function validate_config_file( $config_path ): void {
392
+ private function validate_config_file( $config_path ) {
509
393
  if ( ! file_exists( $config_path ) || ! is_writable( $config_path ) ) {
510
394
  WP_CLI::error( "Config file does not exist: {$config_path}" );
511
395
  }
@@ -521,12 +405,10 @@ class CLI_Alias_Command extends WP_CLI_Command {
521
405
  * @param string $grouping Grouping value.
522
406
  * @param bool $is_update Is this an update operation?
523
407
  *
524
- * @return array<string, array<string, mixed>>
408
+ * @return mixed
525
409
  */
526
410
  private function build_aliases( $aliases, $alias, $assoc_args, $is_grouping, $grouping = '', $is_update = false ) {
527
- // For updates, we might receive @foo or foo depending on YAML format
528
- // Normalize it for consistency
529
- $normalized_alias = $this->normalize_alias( $alias );
411
+ $alias = $this->normalize_alias( $alias );
530
412
 
531
413
  if ( $is_grouping ) {
532
414
  $valid_assoc_args = [ 'config', 'grouping' ];
@@ -539,65 +421,30 @@ class CLI_Alias_Command extends WP_CLI_Command {
539
421
  }
540
422
  }
541
423
 
542
- // Validate BEFORE modifying the aliases array
543
424
  if ( $is_update ) {
544
425
  $this->validate_alias_type( $aliases, $alias, $assoc_args, $grouping );
545
426
  }
546
427
 
547
- // If updating, we need to preserve existing data and only update specified fields
548
- $existing_data = [];
549
- if ( $is_update ) {
550
- // Find the existing alias data to preserve it
551
- $alias_key = $this->find_alias_key( $aliases, $alias );
552
- if ( null !== $alias_key ) {
553
- // Get existing data based on format
554
- if ( isset( $aliases['aliases'][ $normalized_alias ] ) ) {
555
- $existing_data = $aliases['aliases'][ $normalized_alias ];
556
- } elseif ( isset( $aliases[ $alias_key ] ) ) {
557
- $existing_data = $aliases[ $alias_key ];
558
- }
559
- }
560
-
561
- // Remove the old key structure
562
- if ( isset( $aliases[ $alias ] ) ) {
563
- unset( $aliases[ $alias ] );
564
- }
565
- // Also check if it's in the @format
566
- $at_key = '@' . $normalized_alias;
567
- if ( isset( $aliases[ $at_key ] ) ) {
568
- unset( $aliases[ $at_key ] );
569
- }
570
- // Check if it's under aliases:
571
- if ( isset( $aliases['aliases'][ $normalized_alias ] ) ) {
572
- unset( $aliases['aliases'][ $normalized_alias ] );
573
- }
574
- }
575
-
576
428
  if ( ! $is_grouping ) {
577
- // Start with existing data for updates, or empty array for new aliases
578
- if ( ! isset( $aliases[ $normalized_alias ] ) ) {
579
- $aliases[ $normalized_alias ] = $existing_data;
580
- }
581
-
582
429
  foreach ( $assoc_args as $key => $value ) {
583
430
  if ( strpos( $key, 'set-' ) !== false ) {
584
431
  $alias_key_info = explode( '-', $key );
585
432
  $alias_key = empty( $alias_key_info[1] ) ? '' : $alias_key_info[1];
586
433
  if ( ! empty( $alias_key ) && ! empty( $value ) ) {
587
- $aliases[ $normalized_alias ][ $alias_key ] = $value;
434
+ $aliases[ $alias ][ $alias_key ] = $value;
588
435
  }
589
436
  }
590
437
  }
591
438
  } elseif ( ! empty( $grouping ) ) {
592
- $group_alias_list = explode( ',', $grouping );
593
- $group_alias = array_map(
594
- function ( $current_alias ) {
595
- // Remove @ prefix if present
596
- return ltrim( $current_alias, '@' );
597
- },
598
- $group_alias_list
599
- );
600
- $aliases[ $normalized_alias ] = $group_alias;
439
+
440
+ $group_alias_list = explode( ',', $grouping );
441
+ $group_alias = array_map(
442
+ function ( $current_alias ) {
443
+ return '@' . ltrim( $current_alias, '@' );
444
+ },
445
+ $group_alias_list
446
+ );
447
+ $aliases[ $alias ] = $group_alias;
601
448
  }
602
449
 
603
450
  return $aliases;
@@ -606,14 +453,14 @@ class CLI_Alias_Command extends WP_CLI_Command {
606
453
  /**
607
454
  * Validate input of passed arguments.
608
455
  *
609
- * @param array $assoc_args Arguments array.
610
- * @param string|null $grouping Grouping argument value.
456
+ * @param array $assoc_args Arguments array.
457
+ * @param string $grouping Grouping argument value.
611
458
  *
612
459
  * @throws ExitException
613
460
  */
614
461
  private function validate_input( $assoc_args, $grouping ) {
615
462
  // Check if valid arguments were passed.
616
- $arg_match = (array) preg_grep( '/^set-(\w+)/i', array_keys( $assoc_args ) );
463
+ $arg_match = preg_grep( '/^set-(\w+)/i', array_keys( $assoc_args ) );
617
464
 
618
465
  // Verify passed-arguments.
619
466
  if ( empty( $grouping ) && empty( $arg_match ) ) {
@@ -632,7 +479,7 @@ class CLI_Alias_Command extends WP_CLI_Command {
632
479
  * Validate alias type before update.
633
480
  *
634
481
  * @param array $aliases Existing aliases data.
635
- * @param string $alias Alias Name (can be normalized or with @).
482
+ * @param string $alias Alias Name.
636
483
  * @param array $assoc_args Arguments array.
637
484
  * @param string $grouping Grouping argument value.
638
485
  *
@@ -640,37 +487,14 @@ class CLI_Alias_Command extends WP_CLI_Command {
640
487
  */
641
488
  private function validate_alias_type( $aliases, $alias, $assoc_args, $grouping ) {
642
489
 
643
- // Find the actual key in YAML
644
- $alias_key = $this->find_alias_key( $aliases, $alias );
645
- if ( null === $alias_key ) {
646
- $alias_data = null;
647
- } elseif ( isset( $aliases['aliases'] ) && isset( $aliases['aliases'][ $alias_key ] ) ) {
648
- $alias_data = $aliases['aliases'][ $alias_key ];
649
- } else {
650
- $alias_data = $aliases[ $alias_key ];
651
- }
652
-
653
- // Handle null or non-array data
654
- if ( ! is_array( $alias_data ) ) {
655
- $alias_data = [];
656
- }
657
-
658
- // Check if this is a group alias by looking for numeric keys with string values
659
- // Group aliases are stored as arrays like ['foo', 'bar'] without @ prefix
660
- $is_group_alias = false;
661
- if ( ! empty( $alias_data ) ) {
662
- $numeric_keys = array_filter( array_keys( $alias_data ), 'is_numeric' );
663
- if ( count( $numeric_keys ) === count( $alias_data ) ) {
664
- // All keys are numeric, so this is a group alias
665
- $is_group_alias = true;
666
- }
667
- }
490
+ $alias_data = $aliases[ $alias ];
668
491
 
669
- $arg_match = preg_grep( '/^set-(\w+)/i', array_keys( $assoc_args ) );
492
+ $group_aliases_match = preg_grep( '/^@(\w+)/i', $alias_data );
493
+ $arg_match = preg_grep( '/^set-(\w+)/i', array_keys( $assoc_args ) );
670
494
 
671
- if ( $is_group_alias && ! empty( $arg_match ) ) {
495
+ if ( ! empty( $group_aliases_match ) && ! empty( $arg_match ) ) {
672
496
  WP_CLI::error( 'Trying to update group alias with invalid arguments.' );
673
- } elseif ( ! $is_group_alias && ! empty( $grouping ) ) {
497
+ } elseif ( empty( $group_aliases_match ) && ! empty( $grouping ) ) {
674
498
  WP_CLI::error( 'Trying to update simple alias with invalid --grouping argument.' );
675
499
  }
676
500
  }
@@ -686,43 +510,11 @@ class CLI_Alias_Command extends WP_CLI_Command {
686
510
  private function process_aliases( $aliases, $alias, $config_path, $operation = '' ) {
687
511
  $alias = $this->normalize_alias( $alias );
688
512
 
689
- // Convert aliases to use the new 'aliases:' format for better cross-platform compatibility
690
- // Move any @-prefixed keys into the aliases: section
691
- $yaml_data = [];
692
- $aliases_section = [];
693
-
694
- foreach ( $aliases as $key => $value ) {
695
- // Skip special config keys that aren't aliases
696
- if ( in_array( $key, [ 'require', 'exec', 'disabled_commands', 'apache_modules', 'path', '_', 'url', 'user', 'ssh', 'http', 'color', 'debug', 'prompt', 'quiet', 'allow-root', 'skip-plugins', 'skip-themes', 'skip-packages', 'context', 'alias' ], true ) ) {
697
- $yaml_data[ $key ] = $value;
698
- } elseif ( 0 === strpos( $key, '@' ) ) {
699
- // Convert @foo to aliases: { foo: } format
700
- $normalized_key = substr( $key, 1 );
701
- $aliases_section[ $normalized_key ] = $value;
702
- } elseif ( 'aliases' === $key ) {
703
- // Already in aliases format, merge it
704
- if ( is_array( $value ) ) {
705
- $aliases_section = array_merge( $aliases_section, $value );
706
- }
707
- } elseif ( is_array( $value ) ) {
708
- // This is an alias (either config or group), add to aliases section
709
- $aliases_section[ $key ] = $value;
710
- } else {
711
- // Non-alias config value
712
- $yaml_data[ $key ] = $value;
713
- }
714
- }
715
-
716
- // Add the aliases section if we have any
717
- if ( ! empty( $aliases_section ) ) {
718
- $yaml_data['aliases'] = $aliases_section;
719
- }
720
-
721
513
  // Convert data to YAML string.
722
- $yaml_output = Spyc::YAMLDump( $yaml_data );
514
+ $yaml_data = Spyc::YAMLDump( $aliases );
723
515
 
724
516
  // Add data in config file.
725
- if ( file_put_contents( $config_path, $yaml_output ) ) {
517
+ if ( file_put_contents( $config_path, $yaml_data ) ) {
726
518
  WP_CLI::success( "$operation '{$alias}' alias." );
727
519
  }
728
520
  }
@@ -730,41 +522,17 @@ class CLI_Alias_Command extends WP_CLI_Command {
730
522
  /**
731
523
  * Normalize the alias to an expected format.
732
524
  *
733
- * - Remove @ if present.
525
+ * - Add @ if not present.
734
526
  *
735
527
  * @param string $alias Name of alias.
736
528
  */
737
529
  private function normalize_alias( $alias ) {
738
- // Remove the @ prefix if present for storage
530
+ // Check if the alias starts with the @.
739
531
  // See: https://github.com/wp-cli/wp-cli/issues/5391
740
- return ltrim( $alias, '@' );
741
- }
742
-
743
- /**
744
- * Find the actual key used for an alias in YAML data.
745
- *
746
- * Handles both @foo format and aliases: { foo: } format.
747
- *
748
- * @param array $yaml_data The raw YAML data.
749
- * @param string $alias The alias name (with or without @).
750
- * @return string|null The actual key in YAML, or null if not found.
751
- */
752
- private function find_alias_key( $yaml_data, $alias ) {
753
- $normalized = $this->normalize_alias( $alias );
754
-
755
- // Check for @foo format
756
- $at_key = '@' . $normalized;
757
- if ( array_key_exists( $at_key, $yaml_data ) ) {
758
- return $at_key;
759
- }
760
-
761
- // Check for aliases: { foo: } format
762
- if ( isset( $yaml_data['aliases'] ) && is_array( $yaml_data['aliases'] ) ) {
763
- if ( array_key_exists( $normalized, $yaml_data['aliases'] ) ) {
764
- return $normalized;
765
- }
532
+ if ( strpos( $alias, '@' ) !== 0 ) {
533
+ $alias = '@' . ltrim( $alias, '@' );
766
534
  }
767
535
 
768
- return null;
536
+ return $alias;
769
537
  }
770
538
  }
@@ -1,7 +1,7 @@
1
1
  <?php
2
2
 
3
3
  /**
4
- * Manages the internal WP-CLI cache.
4
+ * Manages the internal WP-CLI cache,.
5
5
  *
6
6
  * ## EXAMPLES
7
7
  *