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
@@ -23,37 +23,11 @@ class Completions {
23
23
  array_shift( $this->words );
24
24
 
25
25
  // Last word is either empty or an incomplete subcommand.
26
- $this->cur_word = (string) end( $this->words );
26
+ $this->cur_word = end( $this->words );
27
27
  if ( '' !== $this->cur_word && ! preg_match( '/^\-/', $this->cur_word ) ) {
28
28
  array_pop( $this->words );
29
29
  }
30
30
 
31
- // Last word is an incomplete `--url` parameter.
32
- if ( 0 === strpos( $this->cur_word, '--url=' ) ) {
33
- $parameter = explode( '=', $this->cur_word, 2 );
34
- $this->cur_word = isset( $parameter[1] ) ? $parameter[1] : '';
35
- $urls = $this->get_network_urls();
36
-
37
- // So we can remove the network URL from the subdirectory.
38
- $home_url = $this->get_network_home_url();
39
- $home_url_no_scheme = (string) preg_replace( '#^https?://#', '', $home_url );
40
-
41
- foreach ( $urls as $url ) {
42
- $this->add( $url );
43
- $url_no_scheme = (string) preg_replace( '#^https?://#', '', $url );
44
- if ( $url_no_scheme !== $url ) {
45
- $this->add( rtrim( $url_no_scheme, '/\\' ) );
46
- }
47
-
48
- $url_no_home = str_replace( Path::trailingslashit( $home_url_no_scheme ), '', $url_no_scheme );
49
- if ( $url_no_home !== $url ) {
50
- $this->add( rtrim( $url_no_home, '/\\' ) );
51
- }
52
- }
53
-
54
- return;
55
- }
56
-
57
31
  $is_alias = false;
58
32
  $is_help = false;
59
33
  if ( ! empty( $this->words[0] ) && preg_match( '/^@/', $this->words[0] ) ) {
@@ -83,20 +57,12 @@ class Completions {
83
57
  }
84
58
  }
85
59
 
86
- // Check if we're trying to complete a flag value (e.g., --format=<cursor>)
87
- if ( preg_match( '/^--([a-z-_0-9]+)=(.*)$/i', $this->cur_word, $matches ) ) {
88
- $param_name = $matches[1];
89
- $param_value = $matches[2];
90
- $this->add_param_values( $command, $param_name, $param_value );
91
- return;
92
- }
93
-
94
60
  if ( $command->can_have_subcommands() ) {
95
61
  // Add completion when command is `wp` and alias isn't set.
96
62
  if ( 'wp' === $command->get_name() && false === $is_alias && false === $is_help ) {
97
63
  $aliases = WP_CLI::get_configurator()->get_aliases();
98
64
  foreach ( $aliases as $name => $_ ) {
99
- $this->add( "@$name " );
65
+ $this->add( "$name " );
100
66
  }
101
67
  }
102
68
  foreach ( $command->get_subcommands() as $name => $_ ) {
@@ -144,7 +110,7 @@ class Completions {
144
110
  *
145
111
  * @param array $words Individual input line words.
146
112
  *
147
- * @return array{0: \WP_CLI\Dispatcher\CompositeCommand, 1: array, 2: array}|string Array with command, args, and assoc_args on success; error string on failure.
113
+ * @return array|mixed Array with command and arguments, or error result if command detection failed.
148
114
  */
149
115
  private function get_command( $words ) {
150
116
  $positional_args = [];
@@ -169,10 +135,6 @@ class Completions {
169
135
  $r = WP_CLI::get_runner()->find_command_to_run( $positional_args );
170
136
  }
171
137
 
172
- /**
173
- * @var array{0: \WP_CLI\Dispatcher\CompositeCommand, 1: array, 2: array}|string $r
174
- */
175
-
176
138
  if ( ! is_array( $r ) ) {
177
139
  return $r;
178
140
  }
@@ -212,119 +174,14 @@ class Completions {
212
174
  return $params;
213
175
  }
214
176
 
215
- /**
216
- * Get the current network's home URL.
217
- *
218
- * @return string Home URL.
219
- */
220
- private function get_network_home_url() {
221
- $cache = WP_CLI::get_cache();
222
-
223
- // Use the WP root to key the cache, so we don't mix results from different projects.
224
- $wp_root = WP_CLI::get_runner()->find_wp_root();
225
- $cache_key = sprintf( 'network-home:%s', md5( $wp_root ) );
226
-
227
- $result = $cache->read( $cache_key, 300 ); // 5 minutes TTL
228
-
229
- if ( false === $result ) {
230
- $result = WP_CLI::runcommand(
231
- 'option get home',
232
- [
233
- 'return' => 'stdout',
234
- ]
235
- );
236
-
237
- $cache->write( $cache_key, $result );
238
- }
239
-
240
- return $result;
241
- }
242
-
243
- /**
244
- * Get URLs in the Multisite network matching the input.
245
- *
246
- * @return string[] All of the URLs.
247
- */
248
- private function get_network_urls() {
249
- $cache = WP_CLI::get_cache();
250
-
251
- // Use the WP root to key the cache, so we don't mix results from different projects.
252
- $wp_root = WP_CLI::get_runner()->find_wp_root();
253
- $cache_key = sprintf( 'network-urls:%s', md5( $wp_root ) );
254
-
255
- $result = $cache->read( $cache_key, 300 ); // 5 minutes TTL
256
-
257
- if ( false === $result ) {
258
- $result = WP_CLI::runcommand(
259
- 'site list',
260
- [
261
- 'return' => 'stdout',
262
- 'command_args' => [ '--field=url', '--number=-1', '--format=json' ],
263
- ]
264
- );
265
-
266
- $cache->write( $cache_key, $result );
267
- }
268
-
269
- /**
270
- * @var string[]|null $urls
271
- */
272
- $urls = json_decode( (string) $result, true );
273
-
274
- return is_array( $urls ) ? $urls : [];
275
- }
276
-
277
- /**
278
- * Add parameter values to completions if the parameter has defined options.
279
- *
280
- * Extracts enum options from the command's PHPdoc YAML blocks using DocParser.
281
- * If options are found, they are filtered by the partial value and added to completions.
282
- *
283
- * @param \WP_CLI\Dispatcher\CompositeCommand $command Command object.
284
- * @param string $param_name Parameter name.
285
- * @param string $param_value Current partial value.
286
- */
287
- private function add_param_values( $command, $param_name, $param_value ) {
288
- $options = [];
289
-
290
- // First, try to get options from the command's documentation
291
- $longdesc = $command->get_longdesc();
292
- if ( $longdesc ) {
293
- $parser = new DocParser( $longdesc );
294
- $param_args = $parser->get_param_args( $param_name );
295
-
296
- if ( $param_args && isset( $param_args['options'] ) ) {
297
- $options = $param_args['options'];
298
- }
299
- }
300
-
301
- // If no options found in command doc, check global parameters
302
- if ( empty( $options ) ) {
303
- $global_params = WP_CLI::get_configurator()->get_spec();
304
- if ( isset( $global_params[ $param_name ]['enum'] ) ) {
305
- $options = $global_params[ $param_name ]['enum'];
306
- }
307
- }
308
-
309
- if ( empty( $options ) ) {
310
- return;
311
- }
312
-
313
- // Add each option as a completion
314
- foreach ( $options as $option ) {
315
- // Check if the option matches the current partial value
316
- if ( '' === $param_value || 0 === strpos( (string) $option, $param_value ) ) {
317
- $this->opts[] = $option . ' ';
318
- }
319
- }
320
- }
321
-
322
177
  /**
323
178
  * Store individual option.
324
179
  *
325
180
  * @param string $opt Option to store.
181
+ *
182
+ * @return void
326
183
  */
327
- private function add( $opt ): void {
184
+ private function add( $opt ) {
328
185
  if ( '' !== $this->cur_word ) {
329
186
  if ( 0 !== strpos( $opt, $this->cur_word ) ) {
330
187
  return;
@@ -5,6 +5,9 @@ namespace WP_CLI;
5
5
  use Mustangostang\Spyc;
6
6
  use SplFileInfo;
7
7
 
8
+ use function WP_CLI\Utils\is_path_absolute;
9
+ use function WP_CLI\Utils\normalize_path;
10
+
8
11
  /**
9
12
  * Handles file- and runtime-based configuration values.
10
13
  *
@@ -40,13 +43,6 @@ class Configurator {
40
43
  */
41
44
  private $aliases = [];
42
45
 
43
- /**
44
- * Raw aliases without environment variable interpolation.
45
- *
46
- * @var array
47
- */
48
- private $raw_aliases = [];
49
-
50
46
  /**
51
47
  * Regex pattern used to define an alias.
52
48
  *
@@ -64,7 +60,6 @@ class Configurator {
64
60
  'url',
65
61
  'path',
66
62
  'ssh',
67
- 'ssh-args',
68
63
  'http',
69
64
  'proxyjump',
70
65
  'key',
@@ -91,7 +86,7 @@ class Configurator {
91
86
  }
92
87
 
93
88
  $env_files = getenv( 'WP_CLI_REQUIRE' )
94
- ? array_filter( array_map( 'trim', explode( ',', (string) getenv( 'WP_CLI_REQUIRE' ) ) ) )
89
+ ? array_filter( array_map( 'trim', explode( ',', getenv( 'WP_CLI_REQUIRE' ) ) ) )
95
90
  : [];
96
91
 
97
92
  if ( ! empty( $env_files ) ) {
@@ -118,59 +113,6 @@ class Configurator {
118
113
  $this->spec = $config_spec;
119
114
  }
120
115
 
121
- /**
122
- * Add the given alias to the internal aliases array.
123
- *
124
- * @param string $key The alias name (with or without @ prefix).
125
- * @param array $value The alias configuration.
126
- * @param string $yml_file_dir The directory of the YAML file for path resolution.
127
- * @return void
128
- */
129
- private function add_alias( $key, $value, $yml_file_dir ) {
130
- if ( preg_match( '#' . self::ALIAS_REGEX . '#', $key ) ) {
131
- // Remove the @ character from the alias name
132
- $key = substr( $key, 1 );
133
- }
134
-
135
- $this->aliases[ $key ] = [];
136
- $this->raw_aliases[ $key ] = [];
137
- $is_alias = false;
138
- foreach ( self::$alias_spec as $i ) {
139
- if ( isset( $value[ $i ] ) ) {
140
- // Store raw value before interpolation.
141
- $this->raw_aliases[ $key ][ $i ] = $value[ $i ];
142
-
143
- // Interpolate environment variables in alias values.
144
- $value[ $i ] = self::interpolate_env_vars( $value[ $i ] );
145
- if ( 'path' === $i && ! isset( $value['ssh'] ) ) {
146
- self::absolutize( $value[ $i ], $yml_file_dir );
147
- $value[ $i ] = Path::normalize( $value[ $i ] );
148
- }
149
- $this->aliases[ $key ][ $i ] = $value[ $i ];
150
- $is_alias = true;
151
- }
152
- }
153
-
154
- // If it's not an alias, it might be a group of aliases.
155
- if ( ! $is_alias && is_array( $value ) ) {
156
- /**
157
- * @var list<string> $value
158
- */
159
- $alias_group = [];
160
- foreach ( $value as $k ) {
161
- if ( preg_match( '#' . self::ALIAS_REGEX . '#', $k ) ) {
162
- // Remove the @ character from the alias name
163
- $alias_group[] = substr( $k, 1 );
164
- } elseif ( array_key_exists( $k, $this->aliases ) ) {
165
- // Check if the alias has been properly declared before adding it to the group
166
- $alias_group[] = $k;
167
- }
168
- }
169
- $this->aliases[ $key ] = $alias_group;
170
- $this->raw_aliases[ $key ] = $alias_group;
171
- }
172
- }
173
-
174
116
  /**
175
117
  * Get declared configuration values as an array.
176
118
  *
@@ -195,68 +137,30 @@ class Configurator {
195
137
  * @return array
196
138
  */
197
139
  public function get_aliases() {
198
- $runtime_aliases = $this->get_runtime_aliases( true );
199
- if ( null !== $runtime_aliases ) {
200
- return $runtime_aliases;
201
- }
202
-
203
- return $this->aliases;
204
- }
205
-
206
- /**
207
- * Get raw aliases without environment variable interpolation.
208
- *
209
- * @return array
210
- */
211
- public function get_raw_aliases() {
212
- $runtime_aliases = $this->get_runtime_aliases( false );
213
- if ( null !== $runtime_aliases ) {
214
- return $runtime_aliases;
215
- }
216
-
217
- return $this->raw_aliases;
218
- }
219
-
220
- /**
221
- * Get runtime aliases from environment variable.
222
- *
223
- * @param bool $interpolate Whether to interpolate environment variables.
224
- * @return array|null Returns aliases array if runtime alias is set, null otherwise.
225
- */
226
- private function get_runtime_aliases( $interpolate ) {
227
140
  $runtime_alias = getenv( 'WP_CLI_RUNTIME_ALIAS' );
228
- if ( false === $runtime_alias ) {
229
- return null;
230
- }
231
-
232
- $returned_aliases = [];
233
-
234
- /**
235
- * @var string $key
236
- * @var array<string, string> $value
237
- */
238
- foreach ( (array) json_decode( $runtime_alias, true ) as $key => $value ) {
239
- if ( preg_match( '#' . self::ALIAS_REGEX . '#', $key ) ) {
240
- $normalized_key = substr( $key, 1 );
241
- $returned_aliases[ $normalized_key ] = [];
242
- foreach ( self::$alias_spec as $i ) {
243
- if ( isset( $value[ $i ] ) ) {
244
- $returned_aliases[ $normalized_key ][ $i ] = $interpolate
245
- ? self::interpolate_env_vars( $value[ $i ] )
246
- : $value[ $i ];
141
+ if ( false !== $runtime_alias ) {
142
+ $returned_aliases = [];
143
+ foreach ( json_decode( $runtime_alias, true ) as $key => $value ) {
144
+ if ( preg_match( '#' . self::ALIAS_REGEX . '#', $key ) ) {
145
+ $returned_aliases[ $key ] = [];
146
+ foreach ( self::$alias_spec as $i ) {
147
+ if ( isset( $value[ $i ] ) ) {
148
+ $returned_aliases[ $key ][ $i ] = $value[ $i ];
149
+ }
247
150
  }
248
151
  }
249
152
  }
153
+ return $returned_aliases;
250
154
  }
251
155
 
252
- return $returned_aliases;
156
+ return $this->aliases;
253
157
  }
254
158
 
255
159
  /**
256
160
  * Splits a list of arguments into positional, associative and config.
257
161
  *
258
162
  * @param array<string> $arguments
259
- * @return array{0: array<string>, 1: array<string, mixed>, 2: array<string, array<int, string>|int|string|true>}
163
+ * @return array<array<string>>
260
164
  */
261
165
  public function parse_args( $arguments ) {
262
166
  list( $positional_args, $mixed_args, $global_assoc, $local_assoc ) = self::extract_assoc( $arguments );
@@ -275,35 +179,17 @@ class Configurator {
275
179
  $assoc_args = [];
276
180
  $global_assoc = [];
277
181
  $local_assoc = [];
278
- $end_of_options = false;
279
182
 
280
183
  foreach ( $arguments as $arg ) {
281
184
  $positional = null;
282
185
  $assoc_arg = null;
283
186
 
284
- // Check for the `--` delimiter indicating end of options.
285
- if ( '--' === $arg ) {
286
- $end_of_options = true;
287
- continue;
288
- }
289
-
290
- // After `--`, treat all arguments as positional.
291
- if ( $end_of_options ) {
292
- $positional = $arg;
293
- } elseif ( preg_match( '|^--no-([^=]+)$|', $arg, $matches ) ) {
187
+ if ( preg_match( '|^--no-([^=]+)$|', $arg, $matches ) ) {
294
188
  $assoc_arg = [ $matches[1], false ];
295
189
  } elseif ( preg_match( '|^--([^=]+)$|', $arg, $matches ) ) {
296
190
  $assoc_arg = [ $matches[1], true ];
297
191
  } elseif ( preg_match( '|^--([^=]+)=(.*)|s', $arg, $matches ) ) {
298
192
  $assoc_arg = [ $matches[1], $matches[2] ];
299
- } elseif ( preg_match( '|^-([a-zA-Z])$|', $arg, $matches ) ) {
300
- // Support single-dash single-letter short arguments (e.g., -w, -v)
301
- // Note: Only single letters are supported to follow common CLI conventions
302
- // Multi-character aliases should use double-dash (e.g., --debug not -debug)
303
- $assoc_arg = [ $matches[1], true ];
304
- } elseif ( preg_match( '|^-([a-zA-Z])=(.*)|s', $arg, $matches ) ) {
305
- // Support single-dash single-letter short arguments with values (e.g., -n=5)
306
- $assoc_arg = [ $matches[1], $matches[2] ];
307
193
  } else {
308
194
  $positional = $arg;
309
195
  }
@@ -327,7 +213,7 @@ class Configurator {
327
213
  * Separate runtime parameters from command-specific parameters.
328
214
  *
329
215
  * @param array $mixed_args
330
- * @return array{0: array<string, mixed>, 1: array<string, array<int, string>|int|string|true>}
216
+ * @return array
331
217
  */
332
218
  private function unmix_assoc_args( $mixed_args, $global_assoc = [], $local_assoc = [] ) {
333
219
  $assoc_args = [];
@@ -335,45 +221,20 @@ class Configurator {
335
221
 
336
222
  if ( getenv( 'WP_CLI_STRICT_ARGS_MODE' ) ) {
337
223
  foreach ( $global_assoc as $tmp ) {
338
- [ $key, $value ] = $tmp;
224
+ list( $key, $value ) = $tmp;
339
225
  if ( isset( $this->spec[ $key ] ) && false !== $this->spec[ $key ]['runtime'] ) {
340
226
  $this->assoc_arg_to_runtime_config( $key, $value, $runtime_config );
341
227
  }
342
228
  }
343
229
  foreach ( $local_assoc as $tmp ) {
344
- [ $key, $value ] = $tmp;
345
- // Collect multiple values for the same key into an array, except for boolean flags
346
- if ( isset( $assoc_args[ $key ] ) ) {
347
- // Boolean flags (--flag or --no-flag) use last-wins behavior
348
- if ( is_bool( $value ) ) {
349
- $assoc_args[ $key ] = $value;
350
- } else {
351
- if ( ! is_array( $assoc_args[ $key ] ) ) {
352
- $assoc_args[ $key ] = [ $assoc_args[ $key ] ];
353
- }
354
- $assoc_args[ $key ][] = $value;
355
- }
356
- } else {
357
- $assoc_args[ $key ] = $value;
358
- }
230
+ $assoc_args[ $tmp[0] ] = $tmp[1];
359
231
  }
360
232
  } else {
361
233
  foreach ( $mixed_args as $tmp ) {
362
- [ $key, $value ] = $tmp;
234
+ list( $key, $value ) = $tmp;
363
235
 
364
236
  if ( isset( $this->spec[ $key ] ) && false !== $this->spec[ $key ]['runtime'] ) {
365
237
  $this->assoc_arg_to_runtime_config( $key, $value, $runtime_config );
366
- } elseif ( isset( $assoc_args[ $key ] ) ) {
367
- // Collect multiple values for the same key into an array, except for boolean flags
368
- // Boolean flags (--flag or --no-flag) use last-wins behavior
369
- if ( is_bool( $value ) ) {
370
- $assoc_args[ $key ] = $value;
371
- } else {
372
- if ( ! is_array( $assoc_args[ $key ] ) ) {
373
- $assoc_args[ $key ] = [ $assoc_args[ $key ] ];
374
- }
375
- $assoc_args[ $key ][] = $value;
376
- }
377
238
  } else {
378
239
  $assoc_args[ $key ] = $value;
379
240
  }
@@ -407,20 +268,38 @@ class Configurator {
407
268
  public function merge_yml( $path, $current_alias = null ) {
408
269
  $yaml = self::load_yml( $path );
409
270
  if ( ! empty( $yaml['_']['inherit'] ) ) {
410
- $inherit_path = Path::is_absolute( $yaml['_']['inherit'] )
271
+ // Refactor with the WP-CLI `Path` class, once it's available.
272
+ // See: https://github.com/wp-cli/wp-cli/issues/5007
273
+ $inherit_path = is_path_absolute( $yaml['_']['inherit'] )
411
274
  ? $yaml['_']['inherit']
412
- : ( new SplFileInfo( Path::normalize( dirname( $path ) . '/' . $yaml['_']['inherit'] ) ) )->getRealPath();
275
+ : ( new SplFileInfo( normalize_path( dirname( $path ) . '/' . $yaml['_']['inherit'] ) ) )->getRealPath();
413
276
 
414
277
  $this->merge_yml( $inherit_path, $current_alias );
415
278
  }
416
279
  // Prepare the base path for absolutized alias paths.
417
- $yml_file_dir = $path ? dirname( $path ) : '';
280
+ $yml_file_dir = $path ? dirname( $path ) : false;
418
281
  foreach ( $yaml as $key => $value ) {
419
282
  if ( preg_match( '#' . self::ALIAS_REGEX . '#', $key ) ) {
420
- $this->add_alias( $key, $value, $yml_file_dir );
421
- } elseif ( 'aliases' === $key ) {
422
- foreach ( $value as $alias => $alias_config ) {
423
- $this->add_alias( $alias, $alias_config, $yml_file_dir );
283
+ $this->aliases[ $key ] = [];
284
+ $is_alias = false;
285
+ foreach ( self::$alias_spec as $i ) {
286
+ if ( isset( $value[ $i ] ) ) {
287
+ if ( 'path' === $i && ! isset( $value['ssh'] ) ) {
288
+ self::absolutize( $value[ $i ], $yml_file_dir );
289
+ }
290
+ $this->aliases[ $key ][ $i ] = $value[ $i ];
291
+ $is_alias = true;
292
+ }
293
+ }
294
+ // If it's not an alias, it might be a group of aliases.
295
+ if ( ! $is_alias && is_array( $value ) ) {
296
+ $alias_group = [];
297
+ foreach ( $value as $k ) {
298
+ if ( preg_match( '#' . self::ALIAS_REGEX . '#', $k ) ) {
299
+ $alias_group[] = $k;
300
+ }
301
+ }
302
+ $this->aliases[ $key ] = $alias_group;
424
303
  }
425
304
  } elseif ( ! isset( $this->spec[ $key ] ) || false === $this->spec[ $key ]['file'] ) {
426
305
  if ( isset( $this->extra_config[ $key ] )
@@ -489,8 +368,7 @@ class Configurator {
489
368
 
490
369
  if ( isset( $config['require'] ) ) {
491
370
  self::arrayify( $config['require'] );
492
- // @phpstan-ignore argument.type
493
- $config['require'] = Utils\expand_globs( array_map( 'strval', $config['require'] ) );
371
+ $config['require'] = Utils\expand_globs( $config['require'] );
494
372
  foreach ( $config['require'] as &$path ) {
495
373
  self::absolutize( $path, $yml_file_dir );
496
374
  }
@@ -520,8 +398,6 @@ class Configurator {
520
398
  * Conform a variable to an array.
521
399
  *
522
400
  * @param mixed $val A string or an array
523
- *
524
- * @param-out array<mixed> $val
525
401
  */
526
402
  private static function arrayify( &$val ) {
527
403
  $val = (array) $val;
@@ -534,37 +410,8 @@ class Configurator {
534
410
  * @param string $base Base path to prepend.
535
411
  */
536
412
  private static function absolutize( &$path, $base ) {
537
- if ( ! empty( $path ) ) {
538
- $path = Path::expand_tilde( $path );
539
- if ( ! Path::is_absolute( $path ) ) {
540
- $path = $base . DIRECTORY_SEPARATOR . $path;
541
- }
413
+ if ( ! empty( $path ) && ! Utils\is_path_absolute( $path ) ) {
414
+ $path = $base . DIRECTORY_SEPARATOR . $path;
542
415
  }
543
416
  }
544
-
545
- /**
546
- * Interpolate environment variables in a string.
547
- *
548
- * Replaces ${env.VARIABLE_NAME} with the value of the VARIABLE_NAME environment variable.
549
- *
550
- * @param string $value The string value to interpolate.
551
- * @return string The interpolated string.
552
- */
553
- private static function interpolate_env_vars( $value ) {
554
- if ( ! is_string( $value ) ) {
555
- return $value;
556
- }
557
-
558
- $result = preg_replace_callback(
559
- '/\$\{env\.([A-Za-z0-9_]+)\}/',
560
- function ( $matches ) {
561
- $env_var = getenv( $matches[1] );
562
- return false !== $env_var ? $env_var : $matches[0];
563
- },
564
- $value
565
- );
566
-
567
- // Ensure we always return a string, even if preg_replace_callback fails.
568
- return is_string( $result ) ? $result : $value;
569
- }
570
417
  }