@flarum/cli 2.0.2 → 3.0.1

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 (623) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +40 -22
  3. package/boilerplate/skeleton/extension/.github/workflows/backend.yml +1 -1
  4. package/boilerplate/skeleton/extension/.github/workflows/frontend.yml +2 -1
  5. package/boilerplate/skeleton/extension/.github/workflows/phpstan.yml +12 -0
  6. package/boilerplate/skeleton/extension/composer.json +8 -4
  7. package/boilerplate/skeleton/extension/gitignore +1 -0
  8. package/boilerplate/skeleton/extension/js/jest.config.cjs +1 -0
  9. package/boilerplate/skeleton/extension/js/package.json +6 -3
  10. package/boilerplate/skeleton/extension/js/src/admin/extend.js +8 -0
  11. package/boilerplate/skeleton/extension/js/src/admin/extend.ts +8 -0
  12. package/boilerplate/skeleton/extension/js/src/admin/index.js +2 -0
  13. package/boilerplate/skeleton/extension/js/src/admin/index.ts +3 -1
  14. package/boilerplate/skeleton/extension/js/src/common/extend.js +5 -0
  15. package/boilerplate/skeleton/extension/js/src/common/extend.ts +5 -0
  16. package/boilerplate/skeleton/extension/js/src/common/index.ts +1 -1
  17. package/boilerplate/skeleton/extension/js/src/forum/extend.js +8 -0
  18. package/boilerplate/skeleton/extension/js/src/forum/extend.ts +8 -0
  19. package/boilerplate/skeleton/extension/js/src/forum/index.js +2 -0
  20. package/boilerplate/skeleton/extension/js/src/forum/index.ts +3 -1
  21. package/boilerplate/skeleton/extension/js/tests/unit/.gitkeep +0 -0
  22. package/boilerplate/skeleton/extension/js/tsconfig.test.json +10 -0
  23. package/boilerplate/skeleton/extension/locale/en.yml +1 -1
  24. package/boilerplate/skeleton/extension/phpstan.neon +12 -0
  25. package/boilerplate/skeleton/extension/tests/phpunit.integration.xml +5 -7
  26. package/boilerplate/skeleton/extension/tests/phpunit.unit.xml +5 -10
  27. package/boilerplate/stubs/backend/advanced-api-resource.php +85 -0
  28. package/boilerplate/stubs/backend/api-resource.php +73 -0
  29. package/boilerplate/stubs/backend/command.php +2 -2
  30. package/boilerplate/stubs/backend/controller.php +19 -0
  31. package/boilerplate/stubs/backend/event-listener.php +1 -1
  32. package/boilerplate/stubs/backend/filter.php +25 -0
  33. package/boilerplate/stubs/backend/handler/command.php +6 -20
  34. package/boilerplate/stubs/backend/handler/handler.php +6 -14
  35. package/boilerplate/stubs/backend/integration-test.php +10 -7
  36. package/boilerplate/stubs/backend/job.php +6 -11
  37. package/boilerplate/stubs/backend/mail-driver.php +36 -0
  38. package/boilerplate/stubs/backend/middleware.php +19 -0
  39. package/boilerplate/stubs/backend/model.php +1 -1
  40. package/boilerplate/stubs/backend/notification-blueprint.php +42 -0
  41. package/boilerplate/stubs/backend/notification-driver.php +32 -0
  42. package/boilerplate/stubs/backend/policy.php +1 -1
  43. package/boilerplate/stubs/backend/post-type.php +35 -0
  44. package/boilerplate/stubs/backend/repository.php +2 -10
  45. package/boilerplate/stubs/backend/search/driver.php +13 -0
  46. package/boilerplate/stubs/backend/search/searcher.php +41 -0
  47. package/boilerplate/stubs/backend/service-provider.php +1 -1
  48. package/boilerplate/stubs/backend/validator.php +1 -1
  49. package/boilerplate/stubs/frontend/component.js +1 -1
  50. package/boilerplate/stubs/frontend/forum-page.js +68 -0
  51. package/boilerplate/stubs/frontend/gambit/boolean.js +12 -0
  52. package/boilerplate/stubs/frontend/gambit/key-value.js +16 -0
  53. package/boilerplate/stubs/frontend/modal.js +1 -1
  54. package/boilerplate/stubs/frontend/model.js +1 -1
  55. package/boilerplate/stubs/frontend/notification.js +22 -0
  56. package/boilerplate/stubs/frontend/post-type.js +13 -0
  57. package/boilerplate/stubs/migration.php +1 -1
  58. package/boilerplate/stubs/views/email/html/information.blade.php +8 -0
  59. package/boilerplate/stubs/views/email/html/notification.blade.php +8 -0
  60. package/boilerplate/stubs/views/email/plain/information.blade.php +7 -0
  61. package/boilerplate/stubs/views/email/plain/notification.blade.php +6 -0
  62. package/lib/base-command.d.ts +19 -5
  63. package/lib/base-command.js +73 -28
  64. package/lib/boilersmith/io.d.ts +9 -7
  65. package/lib/boilersmith/io.js +28 -15
  66. package/lib/boilersmith/paths.d.ts +1 -1
  67. package/lib/boilersmith/scaffolding/audit-step-factory.js +1 -1
  68. package/lib/boilersmith/scaffolding/module.d.ts +4 -4
  69. package/lib/boilersmith/scaffolding/module.js +6 -6
  70. package/lib/boilersmith/scaffolding/scaffolder.d.ts +1 -1
  71. package/lib/boilersmith/scaffolding/scaffolder.js +1 -1
  72. package/lib/boilersmith/scaffolding/template-param.d.ts +1 -1
  73. package/lib/boilersmith/step-manager.d.ts +15 -10
  74. package/lib/boilersmith/step-manager.js +35 -9
  75. package/lib/boilersmith/steps/stub-base.js +1 -1
  76. package/lib/boilersmith/utils/json-leaf-paths.d.ts +2 -2
  77. package/lib/commands/audit/infra.d.ts +1 -4
  78. package/lib/commands/audit/infra.js +1 -1
  79. package/lib/commands/flarum/change.js +2 -2
  80. package/lib/commands/flarum/info.js +1 -1
  81. package/lib/commands/infra.d.ts +1 -9
  82. package/lib/commands/infra.js +2 -2
  83. package/lib/commands/init.d.ts +1 -4
  84. package/lib/commands/init.js +3 -3
  85. package/lib/commands/make/backend/{api-serializer.d.ts → api-resource.d.ts} +2 -5
  86. package/lib/commands/make/backend/api-resource.js +26 -0
  87. package/lib/commands/make/backend/command.d.ts +1 -4
  88. package/lib/commands/make/backend/command.js +2 -2
  89. package/lib/commands/make/backend/{api-controller.d.ts → controller.d.ts} +2 -5
  90. package/lib/commands/make/backend/controller.js +31 -0
  91. package/lib/commands/make/backend/event-listener.d.ts +1 -4
  92. package/lib/commands/make/backend/event-listener.js +1 -1
  93. package/lib/commands/make/backend/{api-serializer-attributes.d.ts → filter.d.ts} +3 -6
  94. package/lib/commands/make/backend/filter.js +26 -0
  95. package/lib/commands/make/backend/handler.d.ts +2 -5
  96. package/lib/commands/make/backend/handler.js +6 -6
  97. package/lib/commands/make/backend/integration-test.d.ts +1 -4
  98. package/lib/commands/make/backend/integration-test.js +2 -2
  99. package/lib/commands/make/backend/job.d.ts +1 -4
  100. package/lib/commands/make/backend/job.js +2 -2
  101. package/lib/commands/make/backend/mail-driver.d.ts +12 -0
  102. package/lib/commands/make/backend/mail-driver.js +29 -0
  103. package/lib/commands/make/backend/middleware.d.ts +11 -0
  104. package/lib/commands/make/backend/middleware.js +26 -0
  105. package/lib/commands/make/backend/migration.d.ts +1 -4
  106. package/lib/commands/make/backend/migration.js +9 -2
  107. package/lib/commands/make/backend/model.d.ts +6 -7
  108. package/lib/commands/make/backend/model.js +68 -447
  109. package/lib/commands/make/backend/notification-blueprint.d.ts +12 -0
  110. package/lib/commands/make/backend/notification-blueprint.js +29 -0
  111. package/lib/commands/make/backend/notification-driver.d.ts +12 -0
  112. package/lib/commands/make/backend/notification-driver.js +29 -0
  113. package/lib/commands/make/backend/policy.d.ts +1 -4
  114. package/lib/commands/make/backend/policy.js +1 -1
  115. package/lib/commands/make/backend/post-type.d.ts +12 -0
  116. package/lib/commands/make/backend/post-type.js +29 -0
  117. package/lib/commands/make/backend/repository.d.ts +1 -4
  118. package/lib/commands/make/backend/repository.js +1 -1
  119. package/lib/commands/make/backend/route.d.ts +1 -4
  120. package/lib/commands/make/backend/route.js +1 -1
  121. package/lib/commands/make/backend/search-driver.d.ts +11 -0
  122. package/lib/commands/make/backend/search-driver.js +51 -0
  123. package/lib/commands/make/backend/service-provider.d.ts +1 -4
  124. package/lib/commands/make/backend/service-provider.js +2 -2
  125. package/lib/commands/make/backend/validator.d.ts +1 -4
  126. package/lib/commands/make/backend/validator.js +2 -2
  127. package/lib/commands/make/frontend/component.d.ts +4 -5
  128. package/lib/commands/make/frontend/component.js +7 -2
  129. package/lib/commands/make/frontend/forum-page.d.ts +11 -0
  130. package/lib/commands/make/frontend/forum-page.js +92 -0
  131. package/lib/commands/make/frontend/gambit.d.ts +11 -0
  132. package/lib/commands/make/frontend/gambit.js +30 -0
  133. package/lib/commands/make/frontend/modal.d.ts +1 -4
  134. package/lib/commands/make/frontend/modal.js +3 -2
  135. package/lib/commands/make/frontend/model.d.ts +6 -7
  136. package/lib/commands/make/frontend/model.js +26 -24
  137. package/lib/commands/make/frontend/notification.d.ts +12 -0
  138. package/lib/commands/make/frontend/notification.js +62 -0
  139. package/lib/commands/make/frontend/post-type.d.ts +12 -0
  140. package/lib/commands/make/frontend/post-type.js +59 -0
  141. package/lib/commands/make/locale.d.ts +11 -0
  142. package/lib/commands/make/locale.js +27 -0
  143. package/lib/commands/make/model.d.ts +12 -0
  144. package/lib/commands/make/model.js +29 -0
  145. package/lib/commands/make/notification.d.ts +11 -0
  146. package/lib/commands/make/notification.js +33 -0
  147. package/lib/commands/make/post-type.d.ts +11 -0
  148. package/lib/commands/make/post-type.js +31 -0
  149. package/lib/commands/monorepo/create.d.ts +1 -4
  150. package/lib/commands/monorepo/create.js +1 -1
  151. package/lib/commands/monorepo/split.d.ts +1 -4
  152. package/lib/commands/monorepo/split.js +1 -1
  153. package/lib/commands/update/js-imports.d.ts +1 -4
  154. package/lib/commands/update/js-imports.js +1 -1
  155. package/lib/commands/upgrade/2.0.d.ts +17 -0
  156. package/lib/commands/upgrade/2.0.js +113 -0
  157. package/lib/help.js +1 -1
  158. package/lib/providers/php-provider.d.ts +7 -1
  159. package/lib/providers/php-provider.js +16 -3
  160. package/lib/steps/extenders/{api-serializer.d.ts → api-resource.d.ts} +1 -1
  161. package/lib/steps/extenders/api-resource.js +38 -0
  162. package/lib/steps/extenders/base.d.ts +1 -1
  163. package/lib/steps/extenders/base.js +13 -1
  164. package/lib/steps/extenders/console-command.js +1 -1
  165. package/lib/steps/extenders/event.js +1 -1
  166. package/lib/steps/extenders/mail-driver.d.ts +5 -0
  167. package/lib/steps/extenders/mail-driver.js +58 -0
  168. package/lib/steps/extenders/middleware.d.ts +5 -0
  169. package/lib/steps/extenders/middleware.js +57 -0
  170. package/lib/steps/extenders/notification-driver.d.ts +5 -0
  171. package/lib/steps/extenders/notification-driver.js +58 -0
  172. package/lib/steps/extenders/notification-type.d.ts +5 -0
  173. package/lib/steps/extenders/notification-type.js +55 -0
  174. package/lib/steps/extenders/policy.js +1 -1
  175. package/lib/steps/extenders/post-type.d.ts +5 -0
  176. package/lib/steps/extenders/post-type.js +42 -0
  177. package/lib/steps/extenders/route.js +11 -2
  178. package/lib/steps/extenders/search-driver.d.ts +5 -0
  179. package/lib/steps/extenders/search-driver.js +38 -0
  180. package/lib/steps/extenders/search-filter.d.ts +5 -0
  181. package/lib/steps/extenders/search-filter.js +67 -0
  182. package/lib/steps/extenders/service-provider.js +1 -1
  183. package/lib/steps/gen-ext-scaffolder.d.ts +3 -3
  184. package/lib/steps/gen-ext-scaffolder.js +79 -7
  185. package/lib/steps/js/base.d.ts +14 -5
  186. package/lib/steps/js/base.js +101 -25
  187. package/lib/steps/js/model.d.ts +4 -7
  188. package/lib/steps/js/model.js +45 -19
  189. package/lib/steps/js/notification.d.ts +7 -0
  190. package/lib/steps/js/notification.js +58 -0
  191. package/lib/steps/js/post-type.d.ts +8 -0
  192. package/lib/steps/js/post-type.js +60 -0
  193. package/lib/steps/js/routes.d.ts +7 -0
  194. package/lib/steps/js/routes.js +63 -0
  195. package/lib/steps/js/search-driver-locale.d.ts +8 -0
  196. package/lib/steps/js/search-driver-locale.js +36 -0
  197. package/lib/steps/js/search-gambit.d.ts +7 -0
  198. package/lib/steps/js/search-gambit.js +51 -0
  199. package/lib/steps/locale/base.d.ts +32 -0
  200. package/lib/steps/locale/base.js +97 -0
  201. package/lib/steps/misc/git.js +1 -1
  202. package/lib/steps/monorepo/create.d.ts +2 -0
  203. package/lib/steps/monorepo/create.js +5 -4
  204. package/lib/steps/monorepo/split.js +1 -1
  205. package/lib/steps/stubs/backend/advanced-api-resource.d.ts +13 -0
  206. package/lib/steps/stubs/backend/advanced-api-resource.js +81 -0
  207. package/lib/steps/stubs/backend/{api-serializer.d.ts → api-resource.d.ts} +1 -1
  208. package/lib/steps/stubs/backend/{api-serializer.js → api-resource.js} +9 -9
  209. package/lib/steps/stubs/backend/command.d.ts +2 -16
  210. package/lib/steps/stubs/backend/command.js +14 -1
  211. package/lib/steps/stubs/backend/{api-controller.d.ts → controller.d.ts} +3 -13
  212. package/lib/steps/stubs/backend/controller.js +40 -0
  213. package/lib/steps/stubs/backend/event-listener.js +1 -1
  214. package/lib/steps/stubs/backend/filter.d.ts +8 -0
  215. package/lib/steps/stubs/backend/filter.js +44 -0
  216. package/lib/steps/stubs/backend/handler-command.d.ts +2 -27
  217. package/lib/steps/stubs/backend/handler-command.js +2 -1
  218. package/lib/steps/stubs/backend/handler.js +1 -1
  219. package/lib/steps/stubs/backend/integration-test.js +0 -5
  220. package/lib/steps/stubs/backend/mail-driver.d.ts +7 -0
  221. package/lib/steps/stubs/backend/mail-driver.js +30 -0
  222. package/lib/steps/stubs/backend/middleware.d.ts +22 -0
  223. package/lib/steps/stubs/backend/middleware.js +31 -0
  224. package/lib/steps/stubs/backend/model.d.ts +2 -24
  225. package/lib/steps/stubs/backend/model.js +2 -5
  226. package/lib/steps/stubs/backend/notification-blueprint.d.ts +7 -0
  227. package/lib/steps/stubs/backend/notification-blueprint.js +44 -0
  228. package/lib/steps/stubs/backend/notification-driver.d.ts +7 -0
  229. package/lib/steps/stubs/backend/notification-driver.js +30 -0
  230. package/lib/steps/stubs/backend/policy.js +1 -1
  231. package/lib/steps/stubs/backend/post-type.d.ts +7 -0
  232. package/lib/steps/stubs/backend/post-type.js +44 -0
  233. package/lib/steps/stubs/backend/repository.js +1 -1
  234. package/lib/steps/stubs/backend/search-driver-searcher.d.ts +24 -0
  235. package/lib/steps/stubs/backend/search-driver-searcher.js +32 -0
  236. package/lib/steps/stubs/backend/search-driver.d.ts +8 -0
  237. package/lib/steps/stubs/backend/search-driver.js +49 -0
  238. package/lib/steps/stubs/flarum-base.js +1 -1
  239. package/lib/steps/stubs/frontend/forum-page.d.ts +25 -0
  240. package/lib/steps/stubs/frontend/forum-page.js +37 -0
  241. package/lib/steps/stubs/frontend/gambit.d.ts +7 -0
  242. package/lib/steps/stubs/frontend/gambit.js +50 -0
  243. package/lib/steps/stubs/frontend/model.d.ts +12 -0
  244. package/lib/steps/stubs/frontend/model.js +5 -0
  245. package/lib/steps/stubs/frontend/notification.d.ts +11 -0
  246. package/lib/steps/stubs/frontend/notification.js +48 -0
  247. package/lib/steps/stubs/frontend/post-type.d.ts +11 -0
  248. package/lib/steps/stubs/frontend/post-type.js +48 -0
  249. package/lib/steps/stubs/js-base.js +5 -1
  250. package/lib/steps/stubs/php-base.js +3 -1
  251. package/lib/steps/update/js-imports.js +1 -1
  252. package/lib/steps/upgrade/twopointoh/backend/email-views.d.ts +18 -0
  253. package/lib/steps/upgrade/twopointoh/backend/email-views.js +81 -0
  254. package/lib/steps/upgrade/twopointoh/backend/filesystem.d.ts +8 -0
  255. package/lib/steps/upgrade/twopointoh/backend/filesystem.js +40 -0
  256. package/lib/steps/upgrade/twopointoh/backend/intervention-image.d.ts +8 -0
  257. package/lib/steps/upgrade/twopointoh/backend/intervention-image.js +44 -0
  258. package/lib/steps/upgrade/twopointoh/backend/json-api.d.ts +12 -0
  259. package/lib/steps/upgrade/twopointoh/backend/json-api.js +111 -0
  260. package/lib/steps/upgrade/twopointoh/backend/mailer.d.ts +8 -0
  261. package/lib/steps/upgrade/twopointoh/backend/mailer.js +37 -0
  262. package/lib/steps/upgrade/twopointoh/backend/misc.d.ts +8 -0
  263. package/lib/steps/upgrade/twopointoh/backend/misc.js +42 -0
  264. package/lib/steps/upgrade/twopointoh/backend/phpunit.d.ts +8 -0
  265. package/lib/steps/upgrade/twopointoh/backend/phpunit.js +52 -0
  266. package/lib/steps/upgrade/twopointoh/backend/search.d.ts +28 -0
  267. package/lib/steps/upgrade/twopointoh/backend/search.js +200 -0
  268. package/lib/steps/upgrade/twopointoh/base.d.ts +58 -0
  269. package/lib/steps/upgrade/twopointoh/base.js +284 -0
  270. package/lib/steps/upgrade/twopointoh/dependencies.d.ts +10 -0
  271. package/lib/steps/upgrade/twopointoh/dependencies.js +108 -0
  272. package/lib/steps/upgrade/twopointoh/frontend/code-splitting/usage-of-lazy-modules.d.ts +26 -0
  273. package/lib/steps/upgrade/twopointoh/frontend/code-splitting/usage-of-lazy-modules.js +418 -0
  274. package/lib/steps/upgrade/twopointoh/frontend/export-registry/compat.d.ts +12 -0
  275. package/lib/steps/upgrade/twopointoh/frontend/export-registry/compat.js +75 -0
  276. package/lib/steps/upgrade/twopointoh/frontend/export-registry/import-ext.d.ts +13 -0
  277. package/lib/steps/upgrade/twopointoh/frontend/export-registry/import-ext.js +126 -0
  278. package/lib/steps/upgrade/twopointoh/frontend/format.d.ts +8 -0
  279. package/lib/steps/upgrade/twopointoh/frontend/format.js +32 -0
  280. package/lib/steps/upgrade/twopointoh/frontend/misc.d.ts +17 -0
  281. package/lib/steps/upgrade/twopointoh/frontend/misc.js +433 -0
  282. package/lib/steps/upgrade/twopointoh/infra.d.ts +10 -0
  283. package/lib/steps/upgrade/twopointoh/infra.js +51 -0
  284. package/lib/steps/upgrade/twopointoh/less.d.ts +12 -0
  285. package/lib/steps/upgrade/twopointoh/less.js +217 -0
  286. package/lib/utils/add-extenders.d.ts +2 -0
  287. package/lib/utils/add-extenders.js +115 -0
  288. package/lib/utils/ast.d.ts +22 -0
  289. package/lib/utils/ast.js +235 -0
  290. package/lib/utils/composer.d.ts +1 -1
  291. package/lib/utils/model-name.d.ts +1 -0
  292. package/lib/utils/model-name.js +7 -3
  293. package/lib/utils/monorepo.d.ts +2 -2
  294. package/lib/utils/validation.d.ts +4 -1
  295. package/lib/utils/validation.js +9 -0
  296. package/oclif.manifest.json +1 -1
  297. package/package.json +20 -13
  298. package/php-subsystem/composer.json +3 -1
  299. package/php-subsystem/composer.lock +13 -11
  300. package/php-subsystem/index.php +41 -6
  301. package/php-subsystem/src/CustomPrettyPrinter.php +1 -1
  302. package/php-subsystem/src/ExtenderUtil.php +7 -13
  303. package/php-subsystem/src/NodeUtil.php +72 -0
  304. package/php-subsystem/src/NodeVisitors/AddExtender.php +28 -12
  305. package/php-subsystem/src/NodeVisitors/AddUses.php +24 -0
  306. package/php-subsystem/src/NodeVisitors/ChangeSignatures.php +200 -0
  307. package/php-subsystem/src/NodeVisitors/ReplaceUses.php +175 -0
  308. package/php-subsystem/src/Upgrade/Replacement.php +51 -0
  309. package/php-subsystem/src/Upgrade/ReplacementResult.php +17 -0
  310. package/php-subsystem/src/Upgrade/TwoPointOh/EmailViews.php +94 -0
  311. package/php-subsystem/src/Upgrade/TwoPointOh/Filesystem.php +88 -0
  312. package/php-subsystem/src/Upgrade/TwoPointOh/InterventionImage.php +86 -0
  313. package/php-subsystem/src/Upgrade/TwoPointOh/JsonApi.php +186 -0
  314. package/php-subsystem/src/Upgrade/TwoPointOh/Misc.php +584 -0
  315. package/php-subsystem/src/Upgrade/TwoPointOh/PhpUnit.php +241 -0
  316. package/php-subsystem/src/Upgrade/TwoPointOh/Search.php +589 -0
  317. package/php-subsystem/vendor/autoload.php +18 -0
  318. package/php-subsystem/vendor/bin/php-parse +119 -0
  319. package/php-subsystem/vendor/composer/ClassLoader.php +166 -32
  320. package/php-subsystem/vendor/composer/InstalledVersions.php +350 -209
  321. package/php-subsystem/vendor/composer/autoload_classmap.php +1 -1
  322. package/php-subsystem/vendor/composer/autoload_namespaces.php +1 -1
  323. package/php-subsystem/vendor/composer/autoload_psr4.php +1 -1
  324. package/php-subsystem/vendor/composer/autoload_real.php +3 -22
  325. package/php-subsystem/vendor/composer/installed.json +12 -10
  326. package/php-subsystem/vendor/composer/installed.php +29 -30
  327. package/php-subsystem/vendor/composer/platform_check.php +2 -2
  328. package/php-subsystem/vendor/nikic/php-parser/README.md +74 -62
  329. package/php-subsystem/vendor/nikic/php-parser/bin/php-parse +12 -11
  330. package/php-subsystem/vendor/nikic/php-parser/composer.json +6 -4
  331. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php +58 -11
  332. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php +54 -25
  333. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php +11 -4
  334. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php +87 -0
  335. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php +116 -0
  336. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php +8 -9
  337. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php +22 -5
  338. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php +26 -7
  339. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php +31 -13
  340. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php +5 -5
  341. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php +69 -26
  342. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php +47 -18
  343. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php +6 -5
  344. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php +25 -28
  345. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php +31 -8
  346. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php +8 -8
  347. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder.php +2 -3
  348. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php +85 -70
  349. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php +119 -71
  350. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php +1 -2
  351. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Comment.php +35 -67
  352. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php +3 -3
  353. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php +17 -9
  354. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Error.php +24 -33
  355. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php +6 -9
  356. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php +2 -3
  357. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php +2 -3
  358. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php +11 -7
  359. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php +36 -22
  360. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +24 -14
  361. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php +237 -0
  362. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php +63 -69
  363. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php +15 -10
  364. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +74 -92
  365. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +11 -18
  366. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php +10 -15
  367. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +45 -0
  368. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +19 -25
  369. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php +6 -10
  370. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php +22 -29
  371. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php +31 -0
  372. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +31 -0
  373. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php +6 -5
  374. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +10 -5
  375. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer.php +70 -491
  376. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Modifiers.php +69 -0
  377. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NameContext.php +23 -24
  378. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php +13 -14
  379. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php +43 -0
  380. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php +9 -10
  381. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php +5 -7
  382. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php +36 -0
  383. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php +13 -0
  384. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php +12 -13
  385. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php +37 -0
  386. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php +10 -11
  387. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php +1 -39
  388. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php +11 -11
  389. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php +35 -30
  390. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php +9 -10
  391. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php +2 -3
  392. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php +2 -3
  393. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php +2 -3
  394. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php +2 -3
  395. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php +2 -3
  396. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php +2 -3
  397. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php +2 -3
  398. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php +2 -3
  399. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php +2 -3
  400. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php +2 -3
  401. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php +2 -3
  402. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php +2 -3
  403. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php +2 -3
  404. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php +7 -8
  405. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php +9 -10
  406. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php +4 -5
  407. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php +4 -5
  408. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php +4 -5
  409. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php +4 -5
  410. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php +4 -5
  411. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php +4 -5
  412. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php +4 -5
  413. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php +4 -5
  414. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php +4 -5
  415. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php +4 -5
  416. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php +4 -5
  417. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php +4 -5
  418. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php +4 -5
  419. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php +4 -5
  420. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php +4 -5
  421. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php +4 -5
  422. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php +4 -5
  423. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php +4 -5
  424. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php +4 -5
  425. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php +4 -5
  426. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php +4 -5
  427. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php +4 -5
  428. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php +4 -5
  429. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php +4 -5
  430. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php +4 -5
  431. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php +4 -5
  432. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php +4 -5
  433. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php +8 -11
  434. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php +7 -8
  435. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php +7 -8
  436. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php +35 -0
  437. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php +2 -3
  438. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php +2 -3
  439. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php +5 -6
  440. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php +2 -3
  441. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php +2 -3
  442. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php +2 -3
  443. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php +2 -3
  444. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php +5 -6
  445. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php +12 -12
  446. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php +7 -8
  447. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php +34 -27
  448. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php +1 -32
  449. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php +7 -8
  450. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php +7 -8
  451. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php +5 -6
  452. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php +7 -8
  453. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php +7 -8
  454. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php +10 -11
  455. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php +15 -12
  456. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php +13 -14
  457. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php +11 -11
  458. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php +7 -8
  459. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php +12 -8
  460. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php +8 -7
  461. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php +18 -13
  462. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php +17 -12
  463. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +18 -13
  464. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +10 -10
  465. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php +7 -8
  466. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php +7 -8
  467. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php +6 -7
  468. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php +7 -8
  469. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php +7 -8
  470. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php +10 -10
  471. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php +9 -9
  472. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php +19 -14
  473. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +11 -11
  474. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php +12 -13
  475. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php +6 -7
  476. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php +7 -8
  477. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php +7 -8
  478. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php +6 -7
  479. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php +7 -8
  480. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php +10 -11
  481. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php +1 -2
  482. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php +6 -9
  483. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php +13 -13
  484. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php +32 -0
  485. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php +27 -0
  486. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php +8 -9
  487. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php +8 -9
  488. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php +8 -9
  489. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php +80 -53
  490. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php +10 -11
  491. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php +47 -23
  492. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php +37 -0
  493. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php +1 -68
  494. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php +1 -29
  495. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php +1 -28
  496. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php +78 -0
  497. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php +82 -0
  498. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php +34 -0
  499. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php +1 -71
  500. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php +4 -5
  501. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php +4 -5
  502. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php +4 -5
  503. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php +4 -5
  504. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php +4 -5
  505. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php +4 -5
  506. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php +4 -5
  507. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php +4 -5
  508. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php +4 -5
  509. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php +44 -24
  510. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php +1 -2
  511. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php +39 -0
  512. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php +29 -0
  513. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php +8 -9
  514. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php +10 -11
  515. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php +11 -12
  516. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php +33 -27
  517. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php +15 -15
  518. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php +66 -71
  519. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php +48 -61
  520. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php +7 -8
  521. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php +8 -9
  522. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php +1 -32
  523. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php +12 -12
  524. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php +9 -10
  525. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php +7 -8
  526. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php +9 -10
  527. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php +7 -8
  528. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php +11 -12
  529. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php +17 -13
  530. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php +7 -8
  531. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php +7 -8
  532. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php +19 -15
  533. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php +20 -17
  534. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php +31 -27
  535. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php +7 -8
  536. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php +7 -8
  537. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php +16 -14
  538. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php +7 -8
  539. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php +18 -15
  540. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php +7 -8
  541. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php +13 -10
  542. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php +7 -8
  543. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php +11 -12
  544. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php +4 -5
  545. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php +35 -36
  546. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php +1 -32
  547. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php +8 -9
  548. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php +1 -35
  549. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php +8 -8
  550. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php +9 -10
  551. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php +8 -9
  552. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php +12 -13
  553. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +9 -10
  554. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php +3 -4
  555. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php +10 -8
  556. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php +11 -12
  557. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php +7 -8
  558. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php +1 -50
  559. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php +16 -16
  560. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php +9 -10
  561. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php +1 -2
  562. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php +8 -11
  563. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php +55 -0
  564. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php +2 -3
  565. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php +27 -0
  566. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node.php +24 -29
  567. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php +20 -20
  568. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php +169 -82
  569. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php +28 -19
  570. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php +71 -84
  571. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php +4 -7
  572. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php +1 -2
  573. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php +82 -0
  574. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php +4 -5
  575. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +6 -7
  576. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +40 -24
  577. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +2 -3
  578. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +8 -11
  579. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php +59 -7
  580. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php +1 -2
  581. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php +2011 -2058
  582. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php +2717 -0
  583. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser.php +9 -3
  584. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php +466 -248
  585. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php +31 -33
  586. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php +164 -0
  587. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php +419 -338
  588. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php +51 -0
  589. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +587 -431
  590. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Token.php +18 -0
  591. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php +63 -0
  592. package/boilerplate/stubs/backend/api-controller/create.php +0 -53
  593. package/boilerplate/stubs/backend/api-controller/delete.php +0 -52
  594. package/boilerplate/stubs/backend/api-controller/list.php +0 -61
  595. package/boilerplate/stubs/backend/api-controller/normal.php +0 -29
  596. package/boilerplate/stubs/backend/api-controller/show.php +0 -48
  597. package/boilerplate/stubs/backend/api-controller/update.php +0 -54
  598. package/boilerplate/stubs/backend/api-serializer.php +0 -36
  599. package/lib/commands/make/backend/api-controller.js +0 -26
  600. package/lib/commands/make/backend/api-serializer-attributes.js +0 -14
  601. package/lib/commands/make/backend/api-serializer.js +0 -15
  602. package/lib/steps/extenders/api-serializer.js +0 -77
  603. package/lib/steps/stubs/backend/api-controller.js +0 -65
  604. package/lib/steps/stubs/frontend/migration.js +0 -1
  605. package/php-subsystem/vendor/nikic/php-parser/.editorconfig +0 -9
  606. package/php-subsystem/vendor/nikic/php-parser/grammar/README.md +0 -27
  607. package/php-subsystem/vendor/nikic/php-parser/grammar/parser.template +0 -106
  608. package/php-subsystem/vendor/nikic/php-parser/grammar/php5.y +0 -1026
  609. package/php-subsystem/vendor/nikic/php-parser/grammar/php7.y +0 -1152
  610. package/php-subsystem/vendor/nikic/php-parser/grammar/phpyLang.php +0 -192
  611. package/php-subsystem/vendor/nikic/php-parser/grammar/rebuildParsers.php +0 -81
  612. package/php-subsystem/vendor/nikic/php-parser/grammar/tokens.template +0 -17
  613. package/php-subsystem/vendor/nikic/php-parser/grammar/tokens.y +0 -115
  614. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php +0 -47
  615. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php +0 -76
  616. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php +0 -23
  617. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php +0 -105
  618. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php +0 -30
  619. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php +0 -55
  620. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php +0 -2630
  621. package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php +0 -145
  622. /package/{lib/steps/stubs/frontend/migration.d.ts → boilerplate/skeleton/extension/js/tests/integration/.gitkeep} +0 -0
  623. /package/boilerplate/skeleton/extension/js/{webpack.config.js → webpack.config.cjs} +0 -0
@@ -1,2 +1,3 @@
1
1
  export declare function pluralSnakeCaseModel(className: string): string;
2
2
  export declare function pluralKebabCaseModel(className: string): string;
3
+ export declare function kebab(className: string): string;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.pluralKebabCaseModel = exports.pluralSnakeCaseModel = void 0;
3
+ exports.kebab = exports.pluralKebabCaseModel = exports.pluralSnakeCaseModel = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const pluralize_1 = (0, tslib_1.__importDefault)(require("pluralize"));
6
- const string_1 = (0, tslib_1.__importDefault)(require("string"));
5
+ const pluralize_1 = tslib_1.__importDefault(require("pluralize"));
6
+ const string_1 = tslib_1.__importDefault(require("string"));
7
7
  function pluralSnakeCaseModel(className) {
8
8
  let name;
9
9
  name = (0, string_1.default)(className).underscore().toString();
@@ -17,3 +17,7 @@ function pluralKebabCaseModel(className) {
17
17
  return className;
18
18
  }
19
19
  exports.pluralKebabCaseModel = pluralKebabCaseModel;
20
+ function kebab(className) {
21
+ return (0, string_1.default)(className.charAt(0).toLowerCase() + className.slice(1)).dasherize().s;
22
+ }
23
+ exports.kebab = kebab;
@@ -4,7 +4,7 @@ export declare function npmPath(name: string): string;
4
4
  export declare function composerPath(name: string): string;
5
5
  export declare function extensionPath(name: string): string;
6
6
  export declare function corePath(_name: string): string;
7
- declare type PackageInfo = {
7
+ type PackageInfo = {
8
8
  name: string;
9
9
  gitRemote: string;
10
10
  /**
@@ -12,7 +12,7 @@ declare type PackageInfo = {
12
12
  */
13
13
  mainBranch?: string;
14
14
  };
15
- export declare type FlarumMonorepoJsonSchema = {
15
+ export type FlarumMonorepoJsonSchema = {
16
16
  packages: {
17
17
  core?: PackageInfo;
18
18
  extensions: PackageInfo[];
@@ -1,14 +1,17 @@
1
- declare type ValidatorFunc = true | string;
1
+ type ValidatorFunc = true | string;
2
2
  export declare class Validator {
3
3
  static class(s: string): ValidatorFunc;
4
4
  static optionalClass(s: string): ValidatorFunc;
5
5
  static className(s: string): ValidatorFunc;
6
+ static module(s: string): ValidatorFunc;
6
7
  static routeName(s: string): ValidatorFunc;
8
+ static alphaNumeric(s: string): ValidatorFunc;
7
9
  static commandName(s: string): ValidatorFunc;
8
10
  static migrationName(s: string): ValidatorFunc;
9
11
  static tableName(s: string): ValidatorFunc;
10
12
  static modelType(s: string): ValidatorFunc;
11
13
  static fileName(s: string): ValidatorFunc;
12
14
  static gitRepo(s: string): ValidatorFunc;
15
+ static alphaDash(s: string): ValidatorFunc;
13
16
  }
14
17
  export {};
@@ -11,9 +11,15 @@ class Validator {
11
11
  static className(s) {
12
12
  return /^([\dA-Za-z]+)$/.test(s.trim()) || 'Invalid PHP class name: only alphanumerical characters allowed.';
13
13
  }
14
+ static module(s) {
15
+ return /^([\dA-Za-z]+)(\/([\dA-Za-z]+))*$/.test(s.trim()) || 'Invalid JS module. Must be fully qualified.';
16
+ }
14
17
  static routeName(s) {
15
18
  return /^([\d.A-z-]+)$/.test(s.trim()) || 'Invalid path name: only alphanumerical characters allowed and (._-).';
16
19
  }
20
+ static alphaNumeric(s) {
21
+ return /^[\w-]+$/.test(s.trim()) || 'Field is required; alphanumerical characters and dashes only!';
22
+ }
17
23
  static commandName(s) {
18
24
  return /^([\d.:A-z-]+)$/.test(s.trim()) || 'Invalid path name: only alphanumerical characters allowed and (._-:).';
19
25
  }
@@ -32,5 +38,8 @@ class Validator {
32
38
  static gitRepo(s) {
33
39
  return /^((git|ssh|http(s)?)|(git@[\w.]+))(:(\/\/)?)([\w./:@~-]+)(\.git)(\/)?$/.test(s.trim()) || 'Invalid git repo URL.';
34
40
  }
41
+ static alphaDash(s) {
42
+ return /^[\w-]+$/.test(s.trim()) || 'Field is required; alphanumerical characters and dashes only!';
43
+ }
35
44
  }
36
45
  exports.Validator = Validator;
@@ -1 +1 @@
1
- {"version":"2.0.2","commands":{"infra":{"id":"infra","description":"Add/Update infrastructure to the latest scaffolding for some module in an extension. For example, you can use this to add/update TypeScript, backend testing, GitHub Actions, and other features.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"monorepo":{"name":"monorepo","type":"boolean","char":"m","allowNo":false},"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"module","description":"The name of the module to enable/update.","required":true,"options":["core","icon","admin","forum","js","jsCommon","css","locale","gitConf","githubActions","prettier","typescript","bundlewatch","backendTesting","editorConfig","styleci"]},{"name":"path","description":"Where should this command be executed?"}]},"init":{"id":"init","description":"Create a new Flarum extension","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"audit:infra":{"id":"audit:infra","description":"Check for outdated config files, infrastructure, setup, etc.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"fix":{"name":"fix","type":"boolean","char":"f","allowNo":false},"monorepo":{"name":"monorepo","type":"boolean","char":"m","allowNo":false},"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"flarum:change":{"id":"flarum:change","description":"Related Flarum version information.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"flarum:info":{"id":"flarum:info","description":"Related Flarum version information.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"monorepo:create":{"id":"monorepo:create","description":"Create a monorepo of Flarum extensions.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","char":"c","required":false},"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"monorepo:split":{"id":"monorepo:split","description":"Split monorepo changes into subrepos.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","required":false,"allowNo":false},"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"update:js-imports":{"id":"update:js-imports","description":"Updates JS imports from core to use proper namespaces","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-controller":{"id":"make:backend:api-controller","description":"Generate an API controller class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-serializer-attributes":{"id":"make:backend:api-serializer-attributes","description":"Generate an API serializer attributes extender","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-serializer":{"id":"make:backend:api-serializer","description":"Generate an API serializer class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:command":{"id":"make:backend:command","description":"Generate a console command class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:event-listener":{"id":"make:backend:event-listener","description":"Generate an event listener class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:handler":{"id":"make:backend:handler","description":"Generate a domain logic handler class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:integration-test":{"id":"make:backend:integration-test","description":"Generate an integration test class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:job":{"id":"make:backend:job","description":"Generate a job class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:migration":{"id":"make:backend:migration","description":"Generate a migration","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:model":{"id":"make:backend:model","description":"Generate a model class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:policy":{"id":"make:backend:policy","description":"Generate a policy class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:repository":{"id":"make:backend:repository","description":"Generate a repository class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:route":{"id":"make:backend:route","description":"Generate a routes extender","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:service-provider":{"id":"make:backend:service-provider","description":"Generate a service provider class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:validator":{"id":"make:backend:validator","description":"Generate a validator class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:component":{"id":"make:frontend:component","description":"Generate a frontend component","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:modal":{"id":"make:frontend:modal","description":"Generate a modal component","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:model":{"id":"make:frontend:model","description":"Generate a model class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]}}}
1
+ {"version":"3.0.1","commands":{"infra":{"id":"infra","description":"Add/Update infrastructure to the latest scaffolding for some module in an extension. For example, you can use this to add/update TypeScript, backend testing, GitHub Actions, and other features.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"monorepo":{"name":"monorepo","type":"boolean","char":"m","allowNo":false},"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"module","description":"The name of the module to enable/update.","required":true,"options":["core","icon","admin","forum","js","jsCommon","css","locale","gitConf","githubActions","prettier","typescript","bundlewatch","frontendTesting","backendTesting","phpstan","editorConfig","styleci"]},{"name":"path","description":"Where should this command be executed?"}]},"init":{"id":"init","description":"Create a new Flarum extension","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"audit:infra":{"id":"audit:infra","description":"Check for outdated config files, infrastructure, setup, etc.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"fix":{"name":"fix","type":"boolean","char":"f","allowNo":false},"monorepo":{"name":"monorepo","type":"boolean","char":"m","allowNo":false},"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"flarum:change":{"id":"flarum:change","description":"Related Flarum version information.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"flarum:info":{"id":"flarum:info","description":"Related Flarum version information.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"make:locale":{"id":"make:locale","description":"Generate new locale key value pair.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"key","description":"The nested key of the locale (e.g. `forum.custom_modal.title`).","required":false},{"name":"value","description":"The value of the locale.","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:model":{"id":"make:model","description":"Generate a model class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:notification":{"id":"make:notification","description":"Generate a new notification","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:post-type":{"id":"make:post-type","description":"Generate a new post type","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"monorepo:create":{"id":"monorepo:create","description":"Create a monorepo of Flarum extensions.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","char":"c","required":false},"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"monorepo:split":{"id":"monorepo:split","description":"Split monorepo changes into subrepos.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","required":false,"allowNo":false},"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"update:js-imports":{"id":"update:js-imports","description":"Updates JS imports from core to use proper namespaces","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"upgrade:2.0":{"id":"upgrade:2.0","description":"Upgrade an extension to Flarum 2.0","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"step":{"name":"step","type":"option","description":"Optionally specify a specific step to run","required":false},"force-steps":{"name":"force-steps","type":"boolean","description":"Force run steps even if already ran","required":false,"allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-resource":{"id":"make:backend:api-resource","description":"Generate an API resource class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:command":{"id":"make:backend:command","description":"Generate a console command class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:controller":{"id":"make:backend:controller","description":"Generate a controller class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:event-listener":{"id":"make:backend:event-listener","description":"Generate an event listener class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:filter":{"id":"make:backend:filter","description":"Generate a filter class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:handler":{"id":"make:backend:handler","description":"Generate a domain logic handler class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:integration-test":{"id":"make:backend:integration-test","description":"Generate an integration test class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:job":{"id":"make:backend:job","description":"Generate a job class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:mail-driver":{"id":"make:backend:mail-driver","description":"Generate a mail driver class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:middleware":{"id":"make:backend:middleware","description":"Generate a middleware","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:migration":{"id":"make:backend:migration","description":"Generate a migration","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"name","description":"The name of the migration","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:model":{"id":"make:backend:model","description":"Generate a model class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:notification-blueprint":{"id":"make:backend:notification-blueprint","description":"Generate a notification blueprint class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:notification-driver":{"id":"make:backend:notification-driver","description":"Generate a notification driver class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:policy":{"id":"make:backend:policy","description":"Generate a policy class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:post-type":{"id":"make:backend:post-type","description":"Generate a new backend post type class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:repository":{"id":"make:backend:repository","description":"Generate a repository class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:route":{"id":"make:backend:route","description":"Generate a routes extender","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:search-driver":{"id":"make:backend:search-driver","description":"Generate a search driver","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:service-provider":{"id":"make:backend:service-provider","description":"Generate a service provider class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:validator":{"id":"make:backend:validator","description":"Generate a validator class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:component":{"id":"make:frontend:component","description":"Generate a frontend component","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"frontend","description":"The frontend name","required":false},{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:forum-page":{"id":"make:frontend:forum-page","description":"Generate a forum page class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"routeName","description":"Route name (unique)","required":false},{"name":"routePath","description":"Route path","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:gambit":{"id":"make:frontend:gambit","description":"Generate a frontend gambit class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:modal":{"id":"make:frontend:modal","description":"Generate a modal component","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"frontend","description":"The frontend name","required":false},{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:model":{"id":"make:frontend:model","description":"Generate a model class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:notification":{"id":"make:frontend:notification","description":"Generate a frontend notification class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:post-type":{"id":"make:frontend:post-type","description":"Generate a frontend post type class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]}}}
package/package.json CHANGED
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "name": "@flarum/cli",
3
3
  "description": "A CLI for developing Flarum extensions",
4
- "version": "2.0.2",
4
+ "version": "3.0.1",
5
5
  "author": "Flarum Team",
6
- "flarum": "1.x",
6
+ "flarum": "2.x",
7
7
  "bin": {
8
8
  "fl": "bin/run",
9
- "fl1": "bin/run",
9
+ "fl2": "bin/run",
10
10
  "flarum-cli": "bin/run"
11
11
  },
12
12
  "bugs": "https://github.com/flarum/cli/issues",
13
13
  "devDependencies": {
14
14
  "@babel/core": "^7.0.0",
15
15
  "@babel/preset-env": "^7.14.2",
16
+ "@babel/types": "^7.24.0",
16
17
  "@flarum/prettier-config": "^1.0.0",
17
18
  "@oclif/dev-cli": "^1.26.0",
18
19
  "@oclif/test": "^1.2.8",
@@ -25,9 +26,10 @@
25
26
  "@types/pluralize": "0.0.29",
26
27
  "@types/prompts": "^2.0.14",
27
28
  "@types/string": "0.0.31",
29
+ "@types/yaml": "^1.9.7",
28
30
  "@types/yosay": "^0.0.29",
29
31
  "@typescript-eslint/parser": "^5.8.1",
30
- "babel-jest": "^27.4.5",
32
+ "babel-jest": "^29.7.0",
31
33
  "babel-plugin-module-resolver": "^4.1.0",
32
34
  "chai": "^4.3.3",
33
35
  "eslint": "^7.32.0",
@@ -37,16 +39,16 @@
37
39
  "eslint-import-resolver-babel-module": "^5.3.1",
38
40
  "eslint-import-resolver-typescript": "^2.5.0",
39
41
  "eslint-plugin-import": "^2.25.3",
40
- "jest": "^27.4.5",
42
+ "jest": "^29.7.0",
41
43
  "jest-extended": "^1.2.0",
42
- "prettier": "^2.5.1",
43
- "ts-jest": "^27.1.2",
44
+ "prettier": "^3.3.2",
45
+ "ts-jest": "^29.2.5",
44
46
  "ts-node": "^8.10.2",
45
47
  "tsconfig-paths": "^3.12.0",
46
- "typescript": "4.4.4"
48
+ "typescript": "^4.9.0"
47
49
  },
48
50
  "engines": {
49
- "node": ">=12.0.0"
51
+ "node": ">=18.0.0"
50
52
  },
51
53
  "files": [
52
54
  "/bin",
@@ -104,29 +106,34 @@
104
106
  "postpack": "rm -f oclif.manifest.json",
105
107
  "posttest": "prettier --check . && eslint . --ext .ts --config .eslintrc && tsc --build --dry",
106
108
  "prepack": "rm -rf lib && tsc --project tsconfig.build.json && yarn oclif-dev manifest && yarn oclif-dev readme",
107
- "test": "jest",
109
+ "test": "yarn node --experimental-vm-modules $(yarn bin jest)",
108
110
  "version": "yarn oclif-dev readme && git add README.md"
109
111
  },
110
112
  "types": "lib/index.d.ts",
111
113
  "dependencies": {
114
+ "@babel/generator": "^7.23.6",
115
+ "@babel/parser": "^7.24.0",
116
+ "@babel/traverse": "^7.24.7",
112
117
  "@oclif/core": "^1.0.11",
113
118
  "@oclif/errors": "^1.3.5",
114
119
  "@oclif/plugin-help": "^5",
115
120
  "@oclif/plugin-version": "^1",
116
121
  "chalk": "^2.4.2",
117
122
  "cli-ux": "^6.0.6",
118
- "ejs": "^3.1.6",
123
+ "ejs": "^3.1.7",
119
124
  "globby": "^10.0.2",
120
125
  "mem-fs": "^2.2.1",
121
- "mem-fs-editor": "^8.0.0",
126
+ "mem-fs-editor": "^9.0.1",
122
127
  "module-alias": "^2.2.2",
123
128
  "pick-deep": "^1.0.0",
124
129
  "pluralize": "^8.0.0",
125
130
  "prompts": "^2.4.0",
126
- "simple-git": "^2.48.0",
131
+ "recast": "^0.23.9",
132
+ "simple-git": "^3.16.0",
127
133
  "spdx-license-list": "^6.4.0",
128
134
  "string": "^3.3.3",
129
135
  "tslib": "^1.14.1",
136
+ "yaml": "^2.4.1",
130
137
  "yosay": "^2.0.2"
131
138
  }
132
139
  }
@@ -2,7 +2,9 @@
2
2
  "name": "flarum/cli-php-util",
3
3
  "type": "library",
4
4
  "require": {
5
- "nikic/php-parser": "^4.10"
5
+ "ext-json": "*",
6
+ "nikic/php-parser": "^5.0",
7
+ "php": "^8.0"
6
8
  },
7
9
  "autoload": {
8
10
  "psr-4": {
@@ -4,35 +4,37 @@
4
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
5
  "This file is @generated automatically"
6
6
  ],
7
- "content-hash": "caa6572b7f23b2cf3f87cc3d62b8ca0f",
7
+ "content-hash": "89273c5fbd7314943fb360fb1529e970",
8
8
  "packages": [
9
9
  {
10
10
  "name": "nikic/php-parser",
11
- "version": "v4.10.5",
11
+ "version": "v5.0.2",
12
12
  "source": {
13
13
  "type": "git",
14
14
  "url": "https://github.com/nikic/PHP-Parser.git",
15
- "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f"
15
+ "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13"
16
16
  },
17
17
  "dist": {
18
18
  "type": "zip",
19
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f",
20
- "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f",
19
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13",
20
+ "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13",
21
21
  "shasum": ""
22
22
  },
23
23
  "require": {
24
+ "ext-ctype": "*",
25
+ "ext-json": "*",
24
26
  "ext-tokenizer": "*",
25
- "php": ">=7.0"
27
+ "php": ">=7.4"
26
28
  },
27
29
  "require-dev": {
28
30
  "ircmaxell/php-yacc": "^0.0.7",
29
- "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
31
+ "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
30
32
  },
31
33
  "bin": ["bin/php-parse"],
32
34
  "type": "library",
33
35
  "extra": {
34
36
  "branch-alias": {
35
- "dev-master": "4.9-dev"
37
+ "dev-master": "5.0-dev"
36
38
  }
37
39
  },
38
40
  "autoload": {
@@ -51,9 +53,9 @@
51
53
  "keywords": ["parser", "php"],
52
54
  "support": {
53
55
  "issues": "https://github.com/nikic/PHP-Parser/issues",
54
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5"
56
+ "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2"
55
57
  },
56
- "time": "2021-05-03T19:11:20+00:00"
58
+ "time": "2024-03-05T20:51:40+00:00"
57
59
  }
58
60
  ],
59
61
  "packages-dev": [],
@@ -64,5 +66,5 @@
64
66
  "prefer-lowest": false,
65
67
  "platform": [],
66
68
  "platform-dev": [],
67
- "plugin-api-version": "2.0.0"
69
+ "plugin-api-version": "2.3.0"
68
70
  }
@@ -6,12 +6,47 @@ require __DIR__ . '/vendor/autoload.php';
6
6
 
7
7
  $input = json_decode(file_get_contents("php://stdin"), true);
8
8
 
9
- switch ($input['op']) {
10
- case 'extender.add':
11
- $output = (new ExtenderUtil($input['extend.php']))->add($input['params']);
12
- break;
13
- }
9
+ try {
10
+ switch ($input['op']) {
11
+ case 'extender.add':
12
+ $output = (new ExtenderUtil($input['extend.php']))->add($input['params']);
13
+ break;
14
+
15
+ case 'upgrade.2-0.misc':
16
+ $output = (new Flarum\CliPhpSubsystem\Upgrade\TwoPointOh\Misc())->handle($input['file'], $input['code'] ?? null, $input['data'] ?? []);
17
+ break;
18
+
19
+ case 'upgrade.2-0.email-views':
20
+ $output = (new Flarum\CliPhpSubsystem\Upgrade\TwoPointOh\EmailViews())->handle($input['file'], $input['code'] ?? null, $input['data'] ?? []);
21
+ break;
22
+
23
+ case 'upgrade.2-0.filesystem':
24
+ $output = (new Flarum\CliPhpSubsystem\Upgrade\TwoPointOh\Filesystem())->handle($input['file'], $input['code'] ?? null, $input['data'] ?? []);
25
+ break;
26
+
27
+ case 'upgrade.2-0.intervention-image':
28
+ $output = (new Flarum\CliPhpSubsystem\Upgrade\TwoPointOh\InterventionImage())->handle($input['file'], $input['code'] ?? null, $input['data'] ?? []);
29
+ break;
14
30
 
15
- echo $output;
31
+ case 'upgrade.2-0.json-api':
32
+ $output = (new Flarum\CliPhpSubsystem\Upgrade\TwoPointOh\JsonApi())->handle($input['file'], $input['code'] ?? null, $input['data'] ?? []);
33
+ break;
34
+
35
+ case 'upgrade.2-0.search':
36
+ $output = (new Flarum\CliPhpSubsystem\Upgrade\TwoPointOh\Search())->handle($input['file'], $input['code'] ?? null, $input['data'] ?? []);
37
+ break;
38
+
39
+ case 'upgrade.2-0.phpunit':
40
+ $output = (new Flarum\CliPhpSubsystem\Upgrade\TwoPointOh\PhpUnit())->handle($input['file'], $input['code'] ?? null, $input['data'] ?? []);
41
+ break;
42
+ }
43
+
44
+ echo json_encode($output);
45
+ } catch (Throwable $e) {
46
+ echo json_encode([
47
+ 'error' => $e->getMessage(),
48
+ 'trace' => $e->getTraceAsString()
49
+ ]);
50
+ }
16
51
 
17
52
 
@@ -10,7 +10,7 @@ class CustomPrettyPrinter extends Standard
10
10
  /**
11
11
  * @todo this is just a temporary solution, we should look into formatters such as php cs fixer
12
12
  */
13
- protected function pExpr_MethodCall(Expr\MethodCall $node) {
13
+ protected function pExpr_MethodCall(Expr\MethodCall $node): string {
14
14
  return $this->pDereferenceLhs($node->var) . "\n ->" . $this->pObjectProperty($node->name)
15
15
  . '(' . $this->pMaybeMultiline($node->args) . ')';
16
16
  }
@@ -2,12 +2,11 @@
2
2
 
3
3
  namespace Flarum\CliPhpSubsystem;
4
4
 
5
- use Flarum\CliPhpSubsystem\CustomPrettyPrinter;
6
- use PhpParser\Lexer;
7
5
  use PhpParser\NodeTraverser;
8
6
  use PhpParser\NodeVisitor;
9
7
  use PhpParser\NodeVisitor\NameResolver;
10
8
  use PhpParser\Parser;
9
+ use PhpParser\ParserFactory;
11
10
  use PhpParser\PrettyPrinter;
12
11
 
13
12
  class ExtenderUtil
@@ -50,9 +49,11 @@ class ExtenderUtil
50
49
  $this->traverser->addVisitor($this->nameResolver);
51
50
  }
52
51
 
53
- public function add($params)
52
+ public function add($params): array
54
53
  {
55
- return $this->run(new NodeVisitors\AddExtender($params, $this->nameResolver->getNameContext()));
54
+ return [
55
+ 'code' => $this->run(new NodeVisitors\AddExtender($params, $this->nameResolver->getNameContext())),
56
+ ];
56
57
  }
57
58
 
58
59
  protected function run(NodeVisitor $visitor)
@@ -67,20 +68,13 @@ class ExtenderUtil
67
68
  }
68
69
 
69
70
  protected function backupOriginal($originalCode) {
70
- $lexer = new Lexer\Emulative([
71
- 'usedAttributes' => [
72
- 'comments',
73
- 'startLine', 'endLine',
74
- 'startTokenPos', 'endTokenPos',
75
- ],
76
- ]);
77
- $parser = new Parser\Php7($lexer);
71
+ $parser = (new ParserFactory())->createForHostVersion();
78
72
 
79
73
  $traverser = new NodeTraverser();
80
74
  $traverser->addVisitor(new NodeVisitor\CloningVisitor());
81
75
 
82
76
  $oldAst = $parser->parse($originalCode);
83
- $oldTokens = $lexer->getTokens();
77
+ $oldTokens = $parser->getTokens();
84
78
 
85
79
  $ast = $traverser->traverse($oldAst);
86
80
 
@@ -0,0 +1,72 @@
1
+ <?php
2
+
3
+ namespace Flarum\CliPhpSubsystem;
4
+
5
+ use PhpParser\Node;
6
+ use PhpParser\Node\Identifier;
7
+ use PhpParser\Node\Name;
8
+ use PhpParser\Node\NullableType;
9
+ use PhpParser\Node\UnionType;
10
+
11
+ class NodeUtil
12
+ {
13
+ public static function makeType(array $types): ?Node
14
+ {
15
+ $realTypes = array_map(function ($type) {
16
+ if (strpos($type, '\\') !== false || preg_match('/[A-Z]/', $type[0])) {
17
+ return new Name($type, [
18
+ 'resolvedName' => new Name($type)
19
+ ]);
20
+ }
21
+
22
+ return new Identifier($type);
23
+ }, array_filter($types, function ($type) {
24
+ return $type !== 'null';
25
+ }));
26
+
27
+ $returnType = null;
28
+
29
+ if (count($realTypes) > 1) {
30
+ $returnType = new UnionType($realTypes);
31
+ } elseif (! empty($realTypes[0])) {
32
+ $returnType = $realTypes[0];
33
+ }
34
+
35
+ if (in_array('null', $types)) {
36
+ $returnType = new NullableType($returnType);
37
+ }
38
+
39
+ return $returnType;
40
+ }
41
+
42
+ public static function addUsesToNamespace(Node\Stmt\Namespace_ $node, array $uses): void
43
+ {
44
+ $uses = array_map(function (string $fqn) {
45
+ return new \PhpParser\Node\Stmt\Use_([
46
+ new \PhpParser\Node\Stmt\UseUse(new Name($fqn))
47
+ ]);
48
+ }, array_filter($uses, function (string $fqn) use ($node) {
49
+ foreach ($node->stmts as $stmt) {
50
+ if ($stmt instanceof \PhpParser\Node\Stmt\Use_ && $stmt->uses[0]->name->toString() === $fqn) {
51
+ return false;
52
+ }
53
+ }
54
+
55
+ return true;
56
+ }));
57
+
58
+ $lastUseStatement = null;
59
+
60
+ foreach ($node->stmts as $index => $stmt) {
61
+ if ($stmt instanceof \PhpParser\Node\Stmt\Use_) {
62
+ $lastUseStatement = $index;
63
+ } elseif (! is_null($lastUseStatement)) {
64
+ break;
65
+ }
66
+ }
67
+
68
+ if (! is_null($lastUseStatement)) {
69
+ array_splice($node->stmts, $lastUseStatement + 1, 0, $uses);
70
+ }
71
+ }
72
+ }