├── .editorconfig ├── .gitignore ├── LICENSE.md ├── README.md ├── bin └── acorn ├── composer.json ├── config-stubs └── app.php ├── config ├── app.php ├── assets.php ├── auth.php ├── broadcasting.php ├── cache.php ├── concurrency.php ├── cors.php ├── database.php ├── filesystems.php ├── hashing.php ├── logging.php ├── mail.php ├── queue.php ├── services.php ├── session.php └── view.php ├── phpunit.xml.dist ├── pint.json ├── src ├── Illuminate │ └── Foundation │ │ ├── AliasLoader.php │ │ ├── Application.php │ │ ├── Auth │ │ ├── Access │ │ │ ├── Authorizable.php │ │ │ └── AuthorizesRequests.php │ │ ├── EmailVerificationRequest.php │ │ └── User.php │ │ ├── Bootstrap │ │ ├── BootProviders.php │ │ ├── HandleExceptions.php │ │ ├── LoadConfiguration.php │ │ ├── LoadEnvironmentVariables.php │ │ ├── RegisterFacades.php │ │ ├── RegisterProviders.php │ │ └── SetRequestForConsole.php │ │ ├── Bus │ │ ├── Dispatchable.php │ │ ├── DispatchesJobs.php │ │ ├── PendingChain.php │ │ ├── PendingClosureDispatch.php │ │ └── PendingDispatch.php │ │ ├── CacheBasedMaintenanceMode.php │ │ ├── Cloud.php │ │ ├── ComposerScripts.php │ │ ├── Concerns │ │ └── ResolvesDumpSource.php │ │ ├── Configuration │ │ ├── ApplicationBuilder.php │ │ ├── Exceptions.php │ │ └── Middleware.php │ │ ├── Console │ │ ├── AboutCommand.php │ │ ├── ApiInstallCommand.php │ │ ├── BroadcastingInstallCommand.php │ │ ├── CastMakeCommand.php │ │ ├── ChannelListCommand.php │ │ ├── ChannelMakeCommand.php │ │ ├── ClassMakeCommand.php │ │ ├── ClearCompiledCommand.php │ │ ├── CliDumper.php │ │ ├── ClosureCommand.php │ │ ├── ComponentMakeCommand.php │ │ ├── ConfigCacheCommand.php │ │ ├── ConfigClearCommand.php │ │ ├── ConfigPublishCommand.php │ │ ├── ConfigShowCommand.php │ │ ├── ConsoleMakeCommand.php │ │ ├── DocsCommand.php │ │ ├── DownCommand.php │ │ ├── EnumMakeCommand.php │ │ ├── EnvironmentCommand.php │ │ ├── EnvironmentDecryptCommand.php │ │ ├── EnvironmentEncryptCommand.php │ │ ├── EventCacheCommand.php │ │ ├── EventClearCommand.php │ │ ├── EventGenerateCommand.php │ │ ├── EventListCommand.php │ │ ├── EventMakeCommand.php │ │ ├── ExceptionMakeCommand.php │ │ ├── InteractsWithComposerPackages.php │ │ ├── InterfaceMakeCommand.php │ │ ├── JobMakeCommand.php │ │ ├── JobMiddlewareMakeCommand.php │ │ ├── Kernel.php │ │ ├── KeyGenerateCommand.php │ │ ├── LangPublishCommand.php │ │ ├── ListenerMakeCommand.php │ │ ├── MailMakeCommand.php │ │ ├── ModelMakeCommand.php │ │ ├── NotificationMakeCommand.php │ │ ├── ObserverMakeCommand.php │ │ ├── OptimizeClearCommand.php │ │ ├── OptimizeCommand.php │ │ ├── PackageDiscoverCommand.php │ │ ├── PolicyMakeCommand.php │ │ ├── ProviderMakeCommand.php │ │ ├── QueuedCommand.php │ │ ├── RequestMakeCommand.php │ │ ├── ResourceMakeCommand.php │ │ ├── RouteCacheCommand.php │ │ ├── RouteClearCommand.php │ │ ├── RouteListCommand.php │ │ ├── RuleMakeCommand.php │ │ ├── ScopeMakeCommand.php │ │ ├── ServeCommand.php │ │ ├── StorageLinkCommand.php │ │ ├── StorageUnlinkCommand.php │ │ ├── StubPublishCommand.php │ │ ├── TestMakeCommand.php │ │ ├── TraitMakeCommand.php │ │ ├── UpCommand.php │ │ ├── VendorPublishCommand.php │ │ ├── ViewCacheCommand.php │ │ ├── ViewClearCommand.php │ │ ├── ViewMakeCommand.php │ │ └── stubs │ │ │ ├── api-routes.stub │ │ │ ├── broadcasting-routes.stub │ │ │ ├── cast.inbound.stub │ │ │ ├── cast.stub │ │ │ ├── channel.stub │ │ │ ├── class.invokable.stub │ │ │ ├── class.stub │ │ │ ├── console.stub │ │ │ ├── echo-bootstrap-js.stub │ │ │ ├── echo-js-ably.stub │ │ │ ├── echo-js-pusher.stub │ │ │ ├── echo-js-reverb.stub │ │ │ ├── enum.backed.stub │ │ │ ├── enum.stub │ │ │ ├── event.stub │ │ │ ├── exception-render-report.stub │ │ │ ├── exception-render.stub │ │ │ ├── exception-report.stub │ │ │ ├── exception.stub │ │ │ ├── interface.stub │ │ │ ├── job.middleware.stub │ │ │ ├── job.queued.stub │ │ │ ├── job.stub │ │ │ ├── listener.queued.stub │ │ │ ├── listener.stub │ │ │ ├── listener.typed.queued.stub │ │ │ ├── listener.typed.stub │ │ │ ├── mail.stub │ │ │ ├── maintenance-mode.stub │ │ │ ├── markdown-mail.stub │ │ │ ├── markdown-notification.stub │ │ │ ├── markdown.stub │ │ │ ├── model.morph-pivot.stub │ │ │ ├── model.pivot.stub │ │ │ ├── model.stub │ │ │ ├── notification.stub │ │ │ ├── observer.plain.stub │ │ │ ├── observer.stub │ │ │ ├── pest.stub │ │ │ ├── pest.unit.stub │ │ │ ├── policy.plain.stub │ │ │ ├── policy.stub │ │ │ ├── provider.stub │ │ │ ├── request.stub │ │ │ ├── resource-collection.stub │ │ │ ├── resource.stub │ │ │ ├── routes.stub │ │ │ ├── rule.implicit.stub │ │ │ ├── rule.stub │ │ │ ├── scope.stub │ │ │ ├── test.stub │ │ │ ├── test.unit.stub │ │ │ ├── trait.stub │ │ │ ├── view-component.stub │ │ │ ├── view-mail.stub │ │ │ ├── view.pest.stub │ │ │ ├── view.stub │ │ │ └── view.test.stub │ │ ├── EnvironmentDetector.php │ │ ├── Events │ │ ├── DiagnosingHealth.php │ │ ├── DiscoverEvents.php │ │ ├── Dispatchable.php │ │ ├── LocaleUpdated.php │ │ ├── MaintenanceModeDisabled.php │ │ ├── MaintenanceModeEnabled.php │ │ ├── PublishingStubs.php │ │ ├── Terminating.php │ │ └── VendorTagPublished.php │ │ ├── Exceptions │ │ ├── Handler.php │ │ ├── RegisterErrorViewPaths.php │ │ ├── Renderer │ │ │ ├── Exception.php │ │ │ ├── Frame.php │ │ │ ├── Listener.php │ │ │ ├── Mappers │ │ │ │ └── BladeMapper.php │ │ │ └── Renderer.php │ │ ├── ReportableHandler.php │ │ ├── Whoops │ │ │ ├── WhoopsExceptionRenderer.php │ │ │ └── WhoopsHandler.php │ │ └── views │ │ │ ├── 401.blade.php │ │ │ ├── 402.blade.php │ │ │ ├── 403.blade.php │ │ │ ├── 404.blade.php │ │ │ ├── 419.blade.php │ │ │ ├── 429.blade.php │ │ │ ├── 500.blade.php │ │ │ ├── 503.blade.php │ │ │ ├── layout.blade.php │ │ │ └── minimal.blade.php │ │ ├── FileBasedMaintenanceMode.php │ │ ├── Http │ │ ├── Events │ │ │ └── RequestHandled.php │ │ ├── FormRequest.php │ │ ├── HtmlDumper.php │ │ ├── Kernel.php │ │ ├── MaintenanceModeBypassCookie.php │ │ └── Middleware │ │ │ ├── CheckForMaintenanceMode.php │ │ │ ├── Concerns │ │ │ └── ExcludesPaths.php │ │ │ ├── ConvertEmptyStringsToNull.php │ │ │ ├── HandlePrecognitiveRequests.php │ │ │ ├── InvokeDeferredCallbacks.php │ │ │ ├── PreventRequestsDuringMaintenance.php │ │ │ ├── TransformsRequest.php │ │ │ ├── TrimStrings.php │ │ │ ├── ValidateCsrfToken.php │ │ │ ├── ValidatePostSize.php │ │ │ └── VerifyCsrfToken.php │ │ ├── Inspiring.php │ │ ├── MaintenanceModeManager.php │ │ ├── Mix.php │ │ ├── MixFileNotFoundException.php │ │ ├── MixManifestNotFoundException.php │ │ ├── PackageManifest.php │ │ ├── Precognition.php │ │ ├── ProviderRepository.php │ │ ├── Providers │ │ ├── ArtisanServiceProvider.php │ │ ├── ComposerServiceProvider.php │ │ ├── ConsoleSupportServiceProvider.php │ │ ├── FormRequestServiceProvider.php │ │ └── FoundationServiceProvider.php │ │ ├── Queue │ │ ├── InteractsWithUniqueJobs.php │ │ └── Queueable.php │ │ ├── Routing │ │ ├── PrecognitionCallableDispatcher.php │ │ └── PrecognitionControllerDispatcher.php │ │ ├── Support │ │ └── Providers │ │ │ ├── AuthServiceProvider.php │ │ │ ├── EventServiceProvider.php │ │ │ └── RouteServiceProvider.php │ │ ├── Testing │ │ ├── Concerns │ │ │ ├── InteractsWithAuthentication.php │ │ │ ├── InteractsWithConsole.php │ │ │ ├── InteractsWithContainer.php │ │ │ ├── InteractsWithDatabase.php │ │ │ ├── InteractsWithDeprecationHandling.php │ │ │ ├── InteractsWithExceptionHandling.php │ │ │ ├── InteractsWithRedis.php │ │ │ ├── InteractsWithSession.php │ │ │ ├── InteractsWithTestCaseLifecycle.php │ │ │ ├── InteractsWithTime.php │ │ │ ├── InteractsWithViews.php │ │ │ ├── MakesHttpRequests.php │ │ │ └── WithoutExceptionHandlingHandler.php │ │ ├── DatabaseMigrations.php │ │ ├── DatabaseTransactions.php │ │ ├── DatabaseTransactionsManager.php │ │ ├── DatabaseTruncation.php │ │ ├── LazilyRefreshDatabase.php │ │ ├── RefreshDatabase.php │ │ ├── RefreshDatabaseState.php │ │ ├── TestCase.php │ │ ├── Traits │ │ │ └── CanConfigureMigrationCommands.php │ │ ├── WithConsoleEvents.php │ │ ├── WithFaker.php │ │ ├── WithoutMiddleware.php │ │ └── Wormhole.php │ │ ├── Validation │ │ └── ValidatesRequests.php │ │ ├── Vite.php │ │ ├── ViteException.php │ │ ├── ViteManifestNotFoundException.php │ │ ├── helpers.php │ │ ├── resources │ │ ├── exceptions │ │ │ └── renderer │ │ │ │ ├── components │ │ │ │ ├── card.blade.php │ │ │ │ ├── context.blade.php │ │ │ │ ├── editor.blade.php │ │ │ │ ├── header.blade.php │ │ │ │ ├── icons │ │ │ │ │ ├── chevron-down.blade.php │ │ │ │ │ ├── chevron-up.blade.php │ │ │ │ │ ├── computer-desktop.blade.php │ │ │ │ │ ├── moon.blade.php │ │ │ │ │ └── sun.blade.php │ │ │ │ ├── layout.blade.php │ │ │ │ ├── navigation.blade.php │ │ │ │ ├── theme-switcher.blade.php │ │ │ │ ├── trace-and-editor.blade.php │ │ │ │ └── trace.blade.php │ │ │ │ ├── dark-mode.css │ │ │ │ ├── dist │ │ │ │ ├── dark-mode.css │ │ │ │ ├── light-mode.css │ │ │ │ ├── scripts.js │ │ │ │ └── styles.css │ │ │ │ ├── light-mode.css │ │ │ │ ├── package-lock.json │ │ │ │ ├── package.json │ │ │ │ ├── postcss.config.js │ │ │ │ ├── scripts.js │ │ │ │ ├── show.blade.php │ │ │ │ ├── styles.css │ │ │ │ ├── tailwind.config.js │ │ │ │ └── vite.config.js │ │ ├── health-up.blade.php │ │ └── server.php │ │ └── stubs │ │ └── facade.stub ├── Roots │ ├── Acorn │ │ ├── Application.php │ │ ├── Application │ │ │ └── Concerns │ │ │ │ └── Bootable.php │ │ ├── Assets │ │ │ ├── Asset │ │ │ │ ├── Asset.php │ │ │ │ ├── JsonAsset.php │ │ │ │ ├── PhpAsset.php │ │ │ │ ├── SvgAsset.php │ │ │ │ └── TextAsset.php │ │ │ ├── AssetFactory.php │ │ │ ├── AssetsServiceProvider.php │ │ │ ├── Bundle.php │ │ │ ├── Concerns │ │ │ │ ├── Conditional.php │ │ │ │ └── Enqueuable.php │ │ │ ├── Contracts │ │ │ │ ├── Asset.php │ │ │ │ ├── Bundle.php │ │ │ │ ├── Manifest.php │ │ │ │ └── ManifestNotFoundException.php │ │ │ ├── Exceptions │ │ │ │ ├── BundleNotFoundException.php │ │ │ │ └── ManifestNotFoundException.php │ │ │ ├── Manager.php │ │ │ ├── Manifest.php │ │ │ ├── Middleware │ │ │ │ ├── LaravelMixMiddleware.php │ │ │ │ ├── RootsBudMiddleware.php │ │ │ │ └── ViteMiddleware.php │ │ │ ├── View │ │ │ │ └── BladeDirective.php │ │ │ └── Vite.php │ │ ├── Bootstrap │ │ │ ├── HandleExceptions.php │ │ │ ├── LoadConfiguration.php │ │ │ └── RegisterFacades.php │ │ ├── ComposerScripts.php │ │ ├── Configuration │ │ │ ├── ApplicationBuilder.php │ │ │ ├── Concerns │ │ │ │ └── Paths.php │ │ │ ├── Exceptions.php │ │ │ └── Middleware.php │ │ ├── Console │ │ │ ├── Commands │ │ │ │ ├── AboutCommand.php │ │ │ │ ├── AcornInitCommand.php │ │ │ │ ├── AcornInstallCommand.php │ │ │ │ ├── Command.php │ │ │ │ ├── ComposerMakeCommand.php │ │ │ │ ├── ConfigCacheCommand.php │ │ │ │ ├── GeneratorCommand.php │ │ │ │ ├── KeyGenerateCommand.php │ │ │ │ ├── OptimizeClearCommand.php │ │ │ │ ├── OptimizeCommand.php │ │ │ │ ├── RouteCacheCommand.php │ │ │ │ ├── SummaryCommand.php │ │ │ │ ├── VendorPublishCommand.php │ │ │ │ └── stubs │ │ │ │ │ ├── composer.stub │ │ │ │ │ └── paths │ │ │ │ │ └── storage │ │ │ │ │ ├── framework │ │ │ │ │ ├── cache │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ └── data │ │ │ │ │ │ │ └── .gitignore │ │ │ │ │ ├── sessions │ │ │ │ │ │ └── .gitignore │ │ │ │ │ └── views │ │ │ │ │ │ └── .gitignore │ │ │ │ │ └── logs │ │ │ │ │ └── .gitignore │ │ │ ├── Concerns │ │ │ │ ├── GetsFreshApplication.php │ │ │ │ └── GracefullyCallsCommands.php │ │ │ ├── Console.php │ │ │ └── Kernel.php │ │ ├── DefaultProviders.php │ │ ├── Exceptions │ │ │ ├── Handler.php │ │ │ ├── SkipProviderException.php │ │ │ └── Whoops │ │ │ │ ├── WhoopsExceptionRenderer.php │ │ │ │ └── WhoopsHandler.php │ │ ├── Filesystem │ │ │ ├── Filesystem.php │ │ │ └── FilesystemServiceProvider.php │ │ ├── Http │ │ │ └── Kernel.php │ │ ├── PackageManifest.php │ │ ├── Providers │ │ │ ├── AcornServiceProvider.php │ │ │ └── QueueServiceProvider.php │ │ ├── Sage │ │ │ ├── Concerns │ │ │ │ ├── FiltersBodyClass.php │ │ │ │ ├── FiltersEnqueues.php │ │ │ │ ├── FiltersTemplates.php │ │ │ │ ├── FiltersThePost.php │ │ │ │ └── FiltersViews.php │ │ │ ├── Sage.php │ │ │ ├── SageServiceProvider.php │ │ │ └── ViewFinder.php │ │ ├── ServiceProvider.php │ │ └── View │ │ │ ├── Component.php │ │ │ ├── Composer.php │ │ │ ├── Composers │ │ │ ├── Concerns │ │ │ │ ├── AcfFields.php │ │ │ │ ├── Arrayable.php │ │ │ │ ├── Cacheable.php │ │ │ │ └── Extractable.php │ │ │ └── Debugger.php │ │ │ ├── FileViewFinder.php │ │ │ └── ViewServiceProvider.php │ ├── globals.php │ └── helpers.php └── _ide-helpers.php └── tests ├── Application ├── ApplicationBuilderTest.php ├── ApplicationTest.php ├── DefaultProvidersTest.php └── __fixtures__ │ ├── base_path │ ├── base_app │ │ └── app │ │ │ └── .gitignore │ ├── base_composer │ │ └── composer.json │ └── base_empty │ │ └── .gitignore │ ├── get_namespace │ ├── a_bedrock_site │ │ ├── a_random_library │ │ │ └── composer.json │ │ ├── a_sage_theme │ │ │ └── app │ │ │ │ └── .gitignore │ │ └── composer.json │ └── a_sage_theme │ │ ├── app │ │ └── .gitignore │ │ └── composer.json │ ├── is_down_for_maintenance │ ├── storage │ │ └── framework │ │ │ └── down │ └── wp │ │ └── .maintenance │ └── use_paths │ ├── app │ └── .gitignore │ ├── bootstrap │ └── cache │ │ └── .gitignore │ ├── composer.json │ ├── config │ └── .gitignore │ ├── database │ └── .gitignore │ ├── public │ └── .gitignore │ ├── resources │ └── lang │ │ └── .gitignore │ └── storage │ └── .gitignore ├── Assets ├── AssetTest.php ├── AssetsHelpersTest.php ├── AssetsServiceProviderTest.php ├── BladeDirectiveTest.php ├── BudCompatibilityTest.php ├── BundleTest.php ├── LaravelMixMiddlewareTest.php ├── ManagerTest.php ├── ManifestTest.php ├── RootsBudMiddlewareTest.php └── __fixtures__ │ ├── asset_types │ └── public │ │ ├── assets │ │ ├── apray.cache-busted.ext │ │ ├── bdubs.cache-busted.svg │ │ ├── bnif.cache-busted.php │ │ └── kjo.cache-busted.json │ │ └── manifest.json │ ├── bud_multi_compiler │ └── public │ │ ├── app │ │ ├── entrypoints.json │ │ └── manifest.json │ │ └── editor │ │ ├── entrypoints.json │ │ └── manifest.json │ ├── bud_multi_runtime │ └── public │ │ ├── app.2.64da10a892a71df413b1.css │ │ ├── app.64da10a892a71df413b1.js │ │ ├── customizer.64da10a892a71df413b1.js │ │ ├── editor.4.64da10a892a71df413b1.css │ │ ├── editor.64da10a892a71df413b1.js │ │ ├── entrypoints.json │ │ ├── manifest.json │ │ ├── runtime~app.64da10a892a71df413b1.js │ │ ├── runtime~customizer.64da10a892a71df413b1.js │ │ ├── runtime~editor.64da10a892a71df413b1.js │ │ ├── vendor │ │ └── harmony-module.64da10a892a71df413b1.js │ │ └── wordpress.json │ ├── bud_single_runtime │ └── public │ │ ├── app.2.4476c5f869ee7584ba3c.css │ │ ├── app.4476c5f869ee7584ba3c.js │ │ ├── customizer.4476c5f869ee7584ba3c.js │ │ ├── editor.4.4476c5f869ee7584ba3c.css │ │ ├── editor.4476c5f869ee7584ba3c.js │ │ ├── entrypoints.json │ │ ├── manifest.json │ │ ├── runtime.4476c5f869ee7584ba3c.js │ │ ├── vendor │ │ └── harmony-module.4476c5f869ee7584ba3c.js │ │ └── wordpress.json │ ├── bud_single_runtime_dev │ └── public │ │ ├── app.js │ │ ├── bud.js │ │ ├── customizer.js │ │ ├── editor.js │ │ ├── entrypoints.json │ │ ├── manifest.json │ │ └── vendor-app~editor~customizer.js │ ├── bud_single_runtime_hmr │ └── public │ │ ├── entrypoints.json │ │ ├── hmr.json │ │ └── manifest.json │ ├── bud_v6_single_runtime │ └── public │ │ ├── css │ │ ├── app.5abc62.css │ │ └── editor.31d6cf.css │ │ ├── entrypoints.json │ │ ├── js │ │ ├── 575.baac18.js │ │ ├── app.ff5dd8.js │ │ ├── editor.6e8560.js │ │ └── runtime.8eb29a.js │ │ └── manifest.json │ ├── bud_v6_single_runtime_esm │ └── public │ │ ├── css │ │ ├── app.5abc62.css │ │ └── editor.31d6cf.css │ │ ├── entrypoints.json │ │ ├── js │ │ ├── 575.0d819a.mjs │ │ ├── app.e0da49.mjs │ │ ├── editor.9c37af.mjs │ │ └── runtime.bd5a57.mjs │ │ └── manifest.json │ ├── bud_v6_single_runtime_hmr │ └── public │ │ ├── entrypoints.json │ │ ├── hmr.json │ │ ├── js │ │ ├── app.js │ │ ├── app.js.map │ │ ├── editor.js │ │ └── editor.js.map │ │ └── manifest.json │ ├── bud_v6_single_runtime_hmr_esm │ └── public │ │ ├── entrypoints.json │ │ ├── hmr.json │ │ ├── js │ │ ├── app.mjs │ │ ├── app.mjs.map │ │ ├── editor.mjs │ │ └── editor.mjs.map │ │ └── manifest.json │ ├── mix_no_bundle │ └── public │ │ ├── fonts │ │ └── .gitkeep │ │ ├── images │ │ └── .gitkeep │ │ ├── mix-manifest.json │ │ ├── scripts │ │ ├── app.js │ │ ├── app.js.map │ │ ├── customizer.js │ │ ├── customizer.js.map │ │ ├── editor.js │ │ ├── editor.js.map │ │ ├── manifest.asset.php │ │ ├── manifest.js │ │ └── manifest.js.map │ │ └── styles │ │ ├── app.css │ │ ├── app.css.map │ │ ├── editor.css │ │ └── editor.css.map │ └── mix_no_bundle_hmr │ └── public │ ├── fonts │ └── .gitkeep │ ├── hot │ ├── images │ └── .gitkeep │ ├── mix-manifest.json │ ├── scripts │ ├── app.js │ ├── customizer.js │ ├── editor.js │ ├── manifest.asset.php │ └── manifest.js │ └── styles │ ├── app.css │ └── editor.css ├── Bootstrap ├── HandleExceptionsRegistrationTest.php └── HandleExceptionsTest.php ├── Console └── ConsoleTest.php ├── Exceptions ├── HandlerTest.php └── WhoopsHandlerTest.php ├── Filesystem ├── FilesystemTest.php └── __fixtures__ │ └── closest │ ├── a │ └── b │ │ └── bdubs.txt │ └── kjo.txt ├── Helpers.php ├── Integration └── Routing │ ├── RoutingTest.php │ └── RoutingTestCase.php ├── Sage └── SageTest.php ├── Test ├── Concerns │ ├── SupportsGlobalStubs.php │ ├── SupportsScopedFixtures.php │ ├── SupportsScopedSnapshots.php │ └── SupportsWordPressStubs.php ├── Stubs │ ├── BootableServiceProvider.php │ └── EmptyClass.php └── TestCase.php ├── View └── ViewTest.php ├── __snapshots__ ├── AssetTest__it_can_convert_json_to_array__1.yml ├── AssetTest__it_can_create_a_base64_data_URL__1.txt ├── AssetTest__it_can_create_a_data_URL__1.txt ├── AssetTest__it_can_decode_json__1.yml ├── AssetTest__it_can_get_a_relative_path__1.txt ├── AssetTest__it_can_include__once_a_php_asset__1.yml ├── AssetTest__it_can_include_a_php_asset__1.txt ├── AssetTest__it_can_re_encode_json__1.txt ├── AssetTest__it_can_require__once_a_php_asset__1.yml ├── AssetTest__it_can_require_a_php_asset__1.txt ├── AssetsHelpersTest__it_asset___can_access_a_specified_manifest__1.txt ├── AssetsHelpersTest__it_asset___can_access_the_default_manifest__1.txt ├── AssetsHelpersTest__it_bundle___can_access_a_specified_manifest__1.txt ├── AssetsHelpersTest__it_bundle___can_access_the_default_manifest__1.txt ├── AssetsServiceProviderTest__it_registers_a_default_manifest__1.txt ├── BladeDirectiveTest__it_loads_an_asset__1.txt ├── BundleTest__it_accepts_a_callback_for_styles_and_scripts__1.yml ├── BundleTest__it_accepts_a_callback_for_styles_and_scripts__2.yml ├── BundleTest__it_can_add_editor_styles__1.yml ├── BundleTest__it_can_conditionally_get_assets__1.json ├── BundleTest__it_can_dequeue_css__1.yml ├── BundleTest__it_can_dequeue_js__1.yml ├── BundleTest__it_can_enqueue_css__1.yml ├── BundleTest__it_can_enqueue_js__1.yml ├── BundleTest__it_can_get_styles_and_scripts_collections__1.json ├── BundleTest__it_can_get_styles_and_scripts_collections__2.json ├── BundleTest__it_can_inline_a_single_runtime__1.yml ├── LaravelMixMiddlewareTest__it_modifies_url_when_hot_file_is_present__1.txt ├── LaravelMixMiddlewareTest__it_skips_url_modification_if_hot_file_is_absent__1.txt ├── ManagerTest__it_reads_a_bundles_manifest__1.txt ├── ManagerTest__it_reads_a_bundles_manifest__2.txt ├── ManagerTest__it_reads_a_bundles_manifest__3.txt ├── ManagerTest__it_reads_a_mix_manifest__1.txt ├── ManagerTest__it_reads_a_mix_manifest__2.txt ├── ManagerTest__it_reads_an_assets_manifest__1.txt ├── ManagerTest__it_reads_an_assets_manifest__2.txt ├── ManagerTest__it_reads_multiple_manifests__1.txt ├── ManagerTest__it_reads_multiple_manifests__2.txt ├── RootsBudMiddlewareTest__it_modifies_url_when_hmr_file_is_present_with_matching_dev_origin__1.txt ├── RootsBudMiddlewareTest__it_skips_url_modification_if_dev_origin_is_invalid__1.txt └── RootsBudMiddlewareTest__it_skips_url_modification_if_hmr_file_is_absent__1.txt ├── api.php └── bootstrap.php /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.php] 12 | indent_size = 4 13 | 14 | [*.md] 15 | trim_trailing_whitespace = false 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .php_cs.cache 2 | .phpunit.* 3 | phpunit.xml 4 | /composer.lock 5 | /coverage 6 | /vendor 7 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) Roots Software LLC 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /bin/acorn: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | closest(dirname($autoloadPath, 2), 'composer.json'); 18 | 19 | $rootPath = dirname($composerPath); 20 | 21 | $composer = json_decode(file_get_contents($composerPath), true); 22 | 23 | define('WP_USE_THEMES', false); 24 | 25 | require_once "{$rootPath}/{$composer['extra']['wordpress-install-dir']}/wp-blog-header.php"; 26 | 27 | Roots\Acorn\Application::configure()->boot(); 28 | })(); 29 | -------------------------------------------------------------------------------- /config/assets.php: -------------------------------------------------------------------------------- 1 | 'theme', 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Assets Manifests 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Manifests contain lists of assets that are referenced by static keys that 24 | | point to dynamic locations, such as a cache-busted location. We currently 25 | | support two types of manifest: 26 | | 27 | | assets: key-value pairs to match assets to their revved counterparts 28 | | 29 | | bundles: a series of entrypoints for loading bundles 30 | | 31 | */ 32 | 33 | 'manifests' => [ 34 | 'theme' => [ 35 | 'path' => get_theme_file_path('public'), 36 | 'url' => get_theme_file_uri('public'), 37 | 'assets' => get_theme_file_path('public/manifest.json'), 38 | 'bundles' => get_theme_file_path('public/entrypoints.json'), 39 | ], 40 | ], 41 | ]; 42 | -------------------------------------------------------------------------------- /config/concurrency.php: -------------------------------------------------------------------------------- 1 | env('CONCURRENCY_DRIVER', 'process'), 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'token' => env('POSTMARK_TOKEN'), 19 | ], 20 | 21 | 'ses' => [ 22 | 'key' => env('AWS_ACCESS_KEY_ID'), 23 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 24 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 25 | ], 26 | 27 | 'resend' => [ 28 | 'key' => env('RESEND_KEY'), 29 | ], 30 | 31 | 'slack' => [ 32 | 'notifications' => [ 33 | 'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'), 34 | 'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'), 35 | ], 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | ./src/Roots 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /pint.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": [ 3 | "src/Illuminate", 4 | "tests/Assets/__fixtures__" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Auth/User.php: -------------------------------------------------------------------------------- 1 | boot(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Bootstrap/RegisterFacades.php: -------------------------------------------------------------------------------- 1 | make('config')->get('app.aliases', []), 26 | $app->make(PackageManifest::class)->aliases() 27 | ))->register(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php: -------------------------------------------------------------------------------- 1 | make('config')->get('app.url', 'http://localhost'); 19 | 20 | $components = parse_url($uri); 21 | 22 | $server = $_SERVER; 23 | 24 | if (isset($components['path'])) { 25 | $server = array_merge($server, [ 26 | 'SCRIPT_FILENAME' => $components['path'], 27 | 'SCRIPT_NAME' => $components['path'], 28 | ]); 29 | } 30 | 31 | $app->instance('request', Request::create( 32 | $uri, 'GET', [], [], [], $server 33 | )); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Bus/DispatchesJobs.php: -------------------------------------------------------------------------------- 1 | job->onFailure($callback); 18 | 19 | return $this; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/ClearCompiledCommand.php: -------------------------------------------------------------------------------- 1 | laravel->getCachedServicesPath())) { 33 | @unlink($servicesPath); 34 | } 35 | 36 | if (is_file($packagesPath = $this->laravel->getCachedPackagesPath())) { 37 | @unlink($packagesPath); 38 | } 39 | 40 | $this->components->info('Compiled services and packages files removed successfully.'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/ConfigClearCommand.php: -------------------------------------------------------------------------------- 1 | files = $files; 43 | } 44 | 45 | /** 46 | * Execute the console command. 47 | * 48 | * @return void 49 | */ 50 | public function handle() 51 | { 52 | $this->files->delete($this->laravel->getCachedConfigPath()); 53 | 54 | $this->components->info('Configuration cache cleared successfully.'); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/EnvironmentCommand.php: -------------------------------------------------------------------------------- 1 | components->info(sprintf( 33 | 'The application environment is [%s].', 34 | $this->laravel['env'], 35 | )); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/EventClearCommand.php: -------------------------------------------------------------------------------- 1 | files = $files; 43 | } 44 | 45 | /** 46 | * Execute the console command. 47 | * 48 | * @return void 49 | * 50 | * @throws \RuntimeException 51 | */ 52 | public function handle() 53 | { 54 | $this->files->delete($this->laravel->getCachedEventsPath()); 55 | 56 | $this->components->info('Cached events cleared successfully.'); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/InteractsWithComposerPackages.php: -------------------------------------------------------------------------------- 1 | phpBinary(), $composer, 'require']; 22 | } 23 | 24 | $command = array_merge( 25 | $command ?? ['composer', 'require'], 26 | $packages, 27 | ); 28 | 29 | return ! (new Process($command, $this->laravel->basePath(), ['COMPOSER_MEMORY_LIMIT' => '-1'])) 30 | ->setTimeout(null) 31 | ->run(function ($type, $output) { 32 | $this->output->write($output); 33 | }); 34 | } 35 | 36 | /** 37 | * Get the path to the appropriate PHP binary. 38 | * 39 | * @return string 40 | */ 41 | protected function phpBinary() 42 | { 43 | return php_binary(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/PackageDiscoverCommand.php: -------------------------------------------------------------------------------- 1 | components->info('Discovering packages'); 36 | 37 | $manifest->build(); 38 | 39 | (new Collection($manifest->manifest)) 40 | ->keys() 41 | ->each(fn ($description) => $this->components->task($description)) 42 | ->whenNotEmpty(fn () => $this->newLine()); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/QueuedCommand.php: -------------------------------------------------------------------------------- 1 | data = $data; 29 | } 30 | 31 | /** 32 | * Handle the job. 33 | * 34 | * @param \Illuminate\Contracts\Console\Kernel $kernel 35 | * @return void 36 | */ 37 | public function handle(KernelContract $kernel) 38 | { 39 | $kernel->call(...array_values($this->data)); 40 | } 41 | 42 | /** 43 | * Get the display name for the queued job. 44 | * 45 | * @return string 46 | */ 47 | public function displayName() 48 | { 49 | return array_values($this->data)[0]; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/RouteClearCommand.php: -------------------------------------------------------------------------------- 1 | files = $files; 43 | } 44 | 45 | /** 46 | * Execute the console command. 47 | * 48 | * @return void 49 | */ 50 | public function handle() 51 | { 52 | $this->files->delete($this->laravel->getCachedRoutesPath()); 53 | 54 | $this->components->info('Route cache cleared successfully.'); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/StorageUnlinkCommand.php: -------------------------------------------------------------------------------- 1 | links() as $link => $target) { 33 | if (! file_exists($link) || ! is_link($link)) { 34 | continue; 35 | } 36 | 37 | $this->laravel->make('files')->delete($link); 38 | 39 | $this->components->info("The [$link] link has been deleted."); 40 | } 41 | } 42 | 43 | /** 44 | * Get the symbolic links that are configured for the application. 45 | * 46 | * @return array 47 | */ 48 | protected function links() 49 | { 50 | return $this->laravel['config']['filesystems.links'] ?? 51 | [public_path('storage') => storage_path('app/public')]; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/api-routes.stub: -------------------------------------------------------------------------------- 1 | user(); 8 | })->middleware('auth:sanctum'); 9 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/broadcasting-routes.stub: -------------------------------------------------------------------------------- 1 | id === (int) $id; 7 | }); 8 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/cast.inbound.stub: -------------------------------------------------------------------------------- 1 | $attributes 14 | */ 15 | public function set(Model $model, string $key, mixed $value, array $attributes): mixed 16 | { 17 | return $value; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/cast.stub: -------------------------------------------------------------------------------- 1 | $attributes 14 | */ 15 | public function get(Model $model, string $key, mixed $value, array $attributes): mixed 16 | { 17 | return $value; 18 | } 19 | 20 | /** 21 | * Prepare the given value for storage. 22 | * 23 | * @param array $attributes 24 | */ 25 | public function set(Model $model, string $key, mixed $value, array $attributes): mixed 26 | { 27 | return $value; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/channel.stub: -------------------------------------------------------------------------------- 1 | 29 | */ 30 | public function broadcastOn(): array 31 | { 32 | return [ 33 | new PrivateChannel('channel-name'), 34 | ]; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/exception-render-report.stub: -------------------------------------------------------------------------------- 1 | 48 | */ 49 | public function attachments(): array 50 | { 51 | return []; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/markdown-mail.stub: -------------------------------------------------------------------------------- 1 | 48 | */ 49 | public function attachments(): array 50 | { 51 | return []; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/markdown-notification.stub: -------------------------------------------------------------------------------- 1 | 26 | */ 27 | public function via(object $notifiable): array 28 | { 29 | return ['mail']; 30 | } 31 | 32 | /** 33 | * Get the mail representation of the notification. 34 | */ 35 | public function toMail(object $notifiable): MailMessage 36 | { 37 | return (new MailMessage)->markdown('{{ view }}'); 38 | } 39 | 40 | /** 41 | * Get the array representation of the notification. 42 | * 43 | * @return array 44 | */ 45 | public function toArray(object $notifiable): array 46 | { 47 | return [ 48 | // 49 | ]; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/markdown.stub: -------------------------------------------------------------------------------- 1 | 2 | # Introduction 3 | 4 | The body of your message. 5 | 6 | 7 | Button Text 8 | 9 | 10 | Thanks,
11 | {{ config('app.name') }} 12 |
13 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/model.morph-pivot.stub: -------------------------------------------------------------------------------- 1 | 26 | */ 27 | public function via(object $notifiable): array 28 | { 29 | return ['mail']; 30 | } 31 | 32 | /** 33 | * Get the mail representation of the notification. 34 | */ 35 | public function toMail(object $notifiable): MailMessage 36 | { 37 | return (new MailMessage) 38 | ->line('The introduction to the notification.') 39 | ->action('Notification Action', url('/')) 40 | ->line('Thank you for using our application!'); 41 | } 42 | 43 | /** 44 | * Get the array representation of the notification. 45 | * 46 | * @return array 47 | */ 48 | public function toArray(object $notifiable): array 49 | { 50 | return [ 51 | // 52 | ]; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/observer.plain.stub: -------------------------------------------------------------------------------- 1 | get('/'); 5 | 6 | $response->assertStatus(200); 7 | }); 8 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/pest.unit.stub: -------------------------------------------------------------------------------- 1 | toBeTrue(); 5 | }); 6 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/policy.plain.stub: -------------------------------------------------------------------------------- 1 | |string> 21 | */ 22 | public function rules(): array 23 | { 24 | return [ 25 | // 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/resource-collection.stub: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | public function toArray(Request $request): array 16 | { 17 | return parent::toArray($request); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/resource.stub: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | public function toArray(Request $request): array 16 | { 17 | return parent::toArray($request); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/routes.stub: -------------------------------------------------------------------------------- 1 | setCompiledRoutes( 4 | {{routes}} 5 | ); 6 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/rule.implicit.stub: -------------------------------------------------------------------------------- 1 | get('/'); 17 | 18 | $response->assertStatus(200); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/test.unit.stub: -------------------------------------------------------------------------------- 1 | assertTrue(true); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/trait.stub: -------------------------------------------------------------------------------- 1 | 48 | */ 49 | public function attachments(): array 50 | { 51 | return []; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/view.pest.stub: -------------------------------------------------------------------------------- 1 | view('{{ name }}', [ 5 | // 6 | ]); 7 | 8 | $contents->assertSee(''); 9 | }); 10 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/view.stub: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Console/stubs/view.test.stub: -------------------------------------------------------------------------------- 1 | view('{{ name }}', [ 15 | // 16 | ]); 17 | 18 | $contents->assertSee(''); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Events/DiagnosingHealth.php: -------------------------------------------------------------------------------- 1 | locale = $locale; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Events/MaintenanceModeDisabled.php: -------------------------------------------------------------------------------- 1 | stubs = $stubs; 24 | } 25 | 26 | /** 27 | * Add a new stub to be published. 28 | * 29 | * @param string $path 30 | * @param string $name 31 | * @return $this 32 | */ 33 | public function add(string $path, string $name) 34 | { 35 | $this->stubs[$path] = $name; 36 | 37 | return $this; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Events/Terminating.php: -------------------------------------------------------------------------------- 1 | tag = $tag; 30 | $this->paths = $paths; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Exceptions/RegisterErrorViewPaths.php: -------------------------------------------------------------------------------- 1 | map(function ($path) { 18 | return "{$path}/errors"; 19 | })->push(__DIR__.'/views')->all()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Exceptions/Whoops/WhoopsExceptionRenderer.php: -------------------------------------------------------------------------------- 1 | appendHandler($this->whoopsHandler()); 22 | 23 | $whoops->writeToOutput(false); 24 | 25 | $whoops->allowQuit(false); 26 | })->handleException($throwable); 27 | } 28 | 29 | /** 30 | * Get the Whoops handler for the application. 31 | * 32 | * @return \Whoops\Handler\Handler 33 | */ 34 | protected function whoopsHandler() 35 | { 36 | return (new WhoopsHandler)->forDebug(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Exceptions/views/401.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Unauthorized')) 4 | @section('code', '401') 5 | @section('message', __('Unauthorized')) 6 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Exceptions/views/402.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Payment Required')) 4 | @section('code', '402') 5 | @section('message', __('Payment Required')) 6 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Exceptions/views/403.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Forbidden')) 4 | @section('code', '403') 5 | @section('message', __($exception->getMessage() ?: 'Forbidden')) 6 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Exceptions/views/404.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Not Found')) 4 | @section('code', '404') 5 | @section('message', __('Not Found')) 6 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Exceptions/views/419.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Page Expired')) 4 | @section('code', '419') 5 | @section('message', __('Page Expired')) 6 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Exceptions/views/429.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Too Many Requests')) 4 | @section('code', '429') 5 | @section('message', __('Too Many Requests')) 6 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Exceptions/views/500.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Server Error')) 4 | @section('code', '500') 5 | @section('message', __('Server Error')) 6 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Exceptions/views/503.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Service Unavailable')) 4 | @section('code', '503') 5 | @section('message', __('Service Unavailable')) 6 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Http/Events/RequestHandled.php: -------------------------------------------------------------------------------- 1 | request = $request; 30 | $this->response = $response; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Http/MaintenanceModeBypassCookie.php: -------------------------------------------------------------------------------- 1 | addHours(12); 19 | 20 | return new Cookie('laravel_maintenance', base64_encode(json_encode([ 21 | 'expires_at' => $expiresAt->getTimestamp(), 22 | 'mac' => hash_hmac('sha256', $expiresAt->getTimestamp(), $key), 23 | ])), $expiresAt, config('session.path'), config('session.domain')); 24 | } 25 | 26 | /** 27 | * Determine if the given maintenance mode bypass cookie is valid. 28 | * 29 | * @param string $cookie 30 | * @param string $key 31 | * @return bool 32 | */ 33 | public static function isValid(string $cookie, string $key) 34 | { 35 | $payload = json_decode(base64_decode($cookie), true); 36 | 37 | return is_array($payload) && 38 | is_numeric($payload['expires_at'] ?? null) && 39 | isset($payload['mac']) && 40 | hash_equals(hash_hmac('sha256', $payload['expires_at'], $key), $payload['mac']) && 41 | (int) $payload['expires_at'] >= Carbon::now()->getTimestamp(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php: -------------------------------------------------------------------------------- 1 | getExcludedPaths() as $except) { 16 | if ($except !== '/') { 17 | $except = trim($except, '/'); 18 | } 19 | 20 | if ($request->fullUrlIs($except) || $request->is($except)) { 21 | return true; 22 | } 23 | } 24 | 25 | return false; 26 | } 27 | 28 | /** 29 | * Get the URIs that should be excluded. 30 | * 31 | * @return array 32 | */ 33 | public function getExcludedPaths() 34 | { 35 | return $this->except ?? []; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Http/Middleware/InvokeDeferredCallbacks.php: -------------------------------------------------------------------------------- 1 | make(DeferredCallbackCollection::class) 36 | ->invokeWhen(fn ($callback) => $response->getStatusCode() < 400 || $callback->always); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Http/Middleware/ValidateCsrfToken.php: -------------------------------------------------------------------------------- 1 | container->make('cache'), 30 | $this->config->get('app.maintenance.store') ?: $this->config->get('cache.default'), 31 | 'illuminate:foundation:down' 32 | ); 33 | } 34 | 35 | /** 36 | * Get the default driver name. 37 | * 38 | * @return string 39 | */ 40 | public function getDefaultDriver(): string 41 | { 42 | return $this->config->get('app.maintenance.driver', 'file'); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/MixFileNotFoundException.php: -------------------------------------------------------------------------------- 1 | messages()->isEmpty() && $request->headers->has('Precognition-Validate-Only')) { 17 | abort(204, headers: ['Precognition-Success' => 'true']); 18 | } 19 | }; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Providers/ComposerServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->singleton('composer', function ($app) { 19 | return new Composer($app['files'], $app->basePath()); 20 | }); 21 | } 22 | 23 | /** 24 | * Get the services provided by the provider. 25 | * 26 | * @return array 27 | */ 28 | public function provides() 29 | { 30 | return ['composer']; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->afterResolving(ValidatesWhenResolved::class, function ($resolved) { 30 | $resolved->validateResolved(); 31 | }); 32 | 33 | $this->app->resolving(FormRequest::class, function ($request, $app) { 34 | $request = FormRequest::createFrom($app['request'], $request); 35 | 36 | $request->setContainer($app)->setRedirector($app->make(Redirector::class)); 37 | }); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Queue/Queueable.php: -------------------------------------------------------------------------------- 1 | resolveParameters($route, $callable); 20 | 21 | abort(204, headers: ['Precognition-Success' => 'true']); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Routing/PrecognitionControllerDispatcher.php: -------------------------------------------------------------------------------- 1 | ensureMethodExists($controller, $method); 22 | 23 | $this->resolveParameters($route, $controller, $method); 24 | 25 | abort(204, headers: ['Precognition-Success' => 'true']); 26 | } 27 | 28 | /** 29 | * Ensure that the given method exists on the controller. 30 | * 31 | * @param object $controller 32 | * @param string $method 33 | * @return $this 34 | */ 35 | protected function ensureMethodExists($controller, $method) 36 | { 37 | if (method_exists($controller, $method)) { 38 | return $this; 39 | } 40 | 41 | $class = $controller::class; 42 | 43 | throw new RuntimeException("Attempting to predict the outcome of the [{$class}::{$method}()] method but the method is not defined."); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Support/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | protected $policies = []; 16 | 17 | /** 18 | * Register the application's policies. 19 | * 20 | * @return void 21 | */ 22 | public function register() 23 | { 24 | $this->booting(function () { 25 | $this->registerPolicies(); 26 | }); 27 | } 28 | 29 | /** 30 | * Register the application's policies. 31 | * 32 | * @return void 33 | */ 34 | public function registerPolicies() 35 | { 36 | foreach ($this->policies() as $model => $policy) { 37 | Gate::policy($model, $policy); 38 | } 39 | } 40 | 41 | /** 42 | * Get the policies defined on the provider. 43 | * 44 | * @return array 45 | */ 46 | public function policies() 47 | { 48 | return $this->policies; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Testing/Concerns/InteractsWithDeprecationHandling.php: -------------------------------------------------------------------------------- 1 | originalDeprecationHandler) { 24 | set_error_handler(tap($this->originalDeprecationHandler, fn () => $this->originalDeprecationHandler = null)); 25 | } 26 | 27 | return $this; 28 | } 29 | 30 | /** 31 | * Disable deprecation handling for the test. 32 | * 33 | * @return $this 34 | */ 35 | protected function withoutDeprecationHandling() 36 | { 37 | if ($this->originalDeprecationHandler == null) { 38 | $this->originalDeprecationHandler = set_error_handler(function ($level, $message, $file = '', $line = 0) { 39 | if (in_array($level, [E_DEPRECATED, E_USER_DEPRECATED]) || (error_reporting() & $level)) { 40 | throw new ErrorException($message, 0, $level, $file, $line); 41 | } 42 | }); 43 | } 44 | 45 | return $this; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Testing/Concerns/InteractsWithSession.php: -------------------------------------------------------------------------------- 1 | session($data); 16 | 17 | return $this; 18 | } 19 | 20 | /** 21 | * Set the session to the given array. 22 | * 23 | * @param array $data 24 | * @return $this 25 | */ 26 | public function session(array $data) 27 | { 28 | $this->startSession(); 29 | 30 | foreach ($data as $key => $value) { 31 | $this->app['session']->put($key, $value); 32 | } 33 | 34 | return $this; 35 | } 36 | 37 | /** 38 | * Start the session for the application. 39 | * 40 | * @return $this 41 | */ 42 | protected function startSession() 43 | { 44 | if (! $this->app['session']->isStarted()) { 45 | $this->app['session']->start(); 46 | } 47 | 48 | return $this; 49 | } 50 | 51 | /** 52 | * Flush all of the current session data. 53 | * 54 | * @return $this 55 | */ 56 | public function flushSession() 57 | { 58 | $this->startSession(); 59 | 60 | $this->app['session']->flush(); 61 | 62 | return $this; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Testing/Concerns/WithoutExceptionHandlingHandler.php: -------------------------------------------------------------------------------- 1 | app->make('db'); 19 | 20 | $callback = function () { 21 | if (RefreshDatabaseState::$lazilyRefreshed) { 22 | return; 23 | } 24 | 25 | RefreshDatabaseState::$lazilyRefreshed = true; 26 | 27 | if (property_exists($this, 'mockConsoleOutput')) { 28 | $shouldMockOutput = $this->mockConsoleOutput; 29 | 30 | $this->mockConsoleOutput = false; 31 | } 32 | 33 | $this->baseRefreshDatabase(); 34 | 35 | if (property_exists($this, 'mockConsoleOutput')) { 36 | $this->mockConsoleOutput = $shouldMockOutput; 37 | } 38 | }; 39 | 40 | $database->beforeStartingTransaction($callback); 41 | $database->beforeExecuting($callback); 42 | 43 | $this->beforeApplicationDestroyed(function () { 44 | RefreshDatabaseState::$lazilyRefreshed = false; 45 | }); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Testing/RefreshDatabaseState.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | public static $inMemoryConnections = []; 13 | 14 | /** 15 | * Indicates if the test database has been migrated. 16 | * 17 | * @var bool 18 | */ 19 | public static $migrated = false; 20 | 21 | /** 22 | * Indicates if a lazy refresh hook has been invoked. 23 | * 24 | * @var bool 25 | */ 26 | public static $lazilyRefreshed = false; 27 | } 28 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Testing/WithConsoleEvents.php: -------------------------------------------------------------------------------- 1 | app[ConsoleKernel::class]->rerouteSymfonyCommandEvents(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Testing/WithFaker.php: -------------------------------------------------------------------------------- 1 | faker = $this->makeFaker(); 25 | } 26 | 27 | /** 28 | * Get the default Faker instance for a given locale. 29 | * 30 | * @param string|null $locale 31 | * @return \Faker\Generator 32 | */ 33 | protected function faker($locale = null) 34 | { 35 | return is_null($locale) ? $this->faker : $this->makeFaker($locale); 36 | } 37 | 38 | /** 39 | * Create a Faker instance for the given locale. 40 | * 41 | * @param string|null $locale 42 | * @return \Faker\Generator 43 | */ 44 | protected function makeFaker($locale = null) 45 | { 46 | if (isset($this->app)) { 47 | $locale ??= $this->app->make('config')->get('app.faker_locale', Factory::DEFAULT_LOCALE); 48 | 49 | if ($this->app->bound(Generator::class)) { 50 | return $this->app->make(Generator::class, ['locale' => $locale]); 51 | } 52 | } 53 | 54 | return Factory::create($locale ?? Factory::DEFAULT_LOCALE); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/Testing/WithoutMiddleware.php: -------------------------------------------------------------------------------- 1 | withoutMiddleware(); 18 | } else { 19 | throw new Exception('Unable to disable middleware. MakesHttpRequests trait not used.'); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/ViteException.php: -------------------------------------------------------------------------------- 1 | merge(['class' => "@container flex flex-col p-6 sm:p-12 bg-white dark:bg-gray-900/80 text-gray-900 dark:text-gray-100 rounded-lg default:col-span-full default:lg:col-span-6 default:row-span-1 dark:ring-1 dark:ring-gray-800 shadow-xl"]) }} 3 | > 4 | {{ $slot }} 5 | 6 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/components/header.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | 8 | 9 | {{ implode(' ', array_slice(explode('\\', $exception->class()), -1)) }} 10 | 11 |
12 |
13 | {{ $exception->message() }} 14 |
15 |
16 | 17 | 27 |
28 |
29 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/chevron-down.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/chevron-up.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/computer-desktop.blade.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/moon.blade.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/sun.blade.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/components/navigation.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 | 14 | 15 | 16 |
17 | 18 | 19 | {{ $exception->title() }} 20 | 21 |
22 | 23 |
24 | 25 |
26 |
27 |
28 |
29 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/components/trace-and-editor.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
8 |
9 | 10 | 11 |
12 |
13 |
14 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/dark-mode.css: -------------------------------------------------------------------------------- 1 | @import 'highlight.js/styles/atom-one-dark.min.css'; 2 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/dist/dark-mode.css: -------------------------------------------------------------------------------- 1 | pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline} 2 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/dist/light-mode.css: -------------------------------------------------------------------------------- 1 | pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! 2 | Theme: GitHub 3 | Description: Light theme as seen on github.com 4 | Author: github.com 5 | Maintainer: @Hirse 6 | Updated: 2021-05-15 7 | 8 | Outdated base version: https://github.com/primer/github-syntax-light 9 | Current colors taken from GitHub's CSS 10 | */.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#005cc5}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-code,.hljs-comment,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0} 11 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/light-mode.css: -------------------------------------------------------------------------------- 1 | @import 'highlight.js/styles/github.min.css'; 2 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "entry": "show.blade.php", 4 | "scripts": { 5 | "build": "vite build", 6 | "watch": "vite build --watch" 7 | }, 8 | "dependencies": { 9 | "alpinejs": "^3.13.10", 10 | "autoprefixer": "^10.4.19", 11 | "highlight.js": "^11.9.0", 12 | "postcss": "^8.4.38", 13 | "tailwindcss": "^3.4.3", 14 | "tippy.js": "^6.3.7", 15 | "vite": "^5.4.19", 16 | "vite-require": "^0.2.3" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/scripts.js: -------------------------------------------------------------------------------- 1 | import tippy from 'tippy.js'; 2 | import alpine from 'alpinejs'; 3 | import hljs from 'highlight.js/lib/core'; 4 | import php from 'highlight.js/lib/languages/php'; 5 | 6 | alpine.start(); 7 | 8 | hljs.registerLanguage('php', php); 9 | 10 | window.hljs = hljs; 11 | 12 | hljs.highlightElement(document.querySelector('.default-highlightable-code')); 13 | 14 | document.querySelectorAll('.highlightable-code').forEach((block) => { 15 | if (block.dataset.highlighted !== 'yes') { 16 | hljs.highlightElement(block); 17 | } 18 | }); 19 | 20 | tippy('[data-tippy-content]', { 21 | trigger: 'click', 22 | arrow: true, 23 | theme: 'material', 24 | animation: 'scale', 25 | }); 26 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/show.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 |
6 |
7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/tailwind.config.js: -------------------------------------------------------------------------------- 1 | const defaultTheme = require('tailwindcss/defaultTheme'); 2 | 3 | /** @type {import('tailwindcss').Config} */ 4 | module.exports = { 5 | content: ['./**/*.blade.php'], 6 | darkMode: 'class', 7 | theme: { 8 | extend: { 9 | fontFamily: { 10 | sans: ['Figtree', ...defaultTheme.fontFamily.sans], 11 | }, 12 | }, 13 | }, 14 | plugins: [], 15 | }; 16 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/exceptions/renderer/vite.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('vite').UserConfig} */ 2 | export default { 3 | plugins: [], 4 | build: { 5 | assetsDir: '', 6 | rollupOptions: { 7 | input: ['scripts.js', 'styles.css', 'dark-mode.css', 'light-mode.css'], 8 | output: { 9 | assetFileNames: '[name][extname]', 10 | entryFileNames: '[name].js', 11 | }, 12 | }, 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /src/Illuminate/Foundation/resources/server.php: -------------------------------------------------------------------------------- 1 | toArray(), $options); 16 | } 17 | 18 | /** 19 | * {@inheritdoc} 20 | */ 21 | public function toArray(): array 22 | { 23 | return (array) $this->decode(JSON_OBJECT_AS_ARRAY); 24 | } 25 | 26 | /** 27 | * Decode JSON data. 28 | * 29 | * @param int $options 30 | * @param int $depth 31 | * @return array|null 32 | */ 33 | public function decode($options = 0, $depth = 512) 34 | { 35 | return json_decode($this->contents(), null, $depth, $options); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Assets/Asset/PhpAsset.php: -------------------------------------------------------------------------------- 1 | assertExists(); 17 | 18 | return require_once $this->path(); 19 | } 20 | 21 | /** 22 | * Get the returned value of the asset 23 | * 24 | * @return mixed 25 | */ 26 | public function require() 27 | { 28 | $this->assertExists(); 29 | 30 | return require $this->path(); 31 | } 32 | 33 | /** 34 | * Get the returned value of the asset 35 | * 36 | * @return mixed 37 | */ 38 | public function includeOnce() 39 | { 40 | $this->assertExists(); 41 | 42 | return include_once $this->path(); 43 | } 44 | 45 | /** 46 | * Get the returned value of the asset 47 | * 48 | * @return mixed 49 | */ 50 | public function include() 51 | { 52 | $this->assertExists(); 53 | 54 | return include $this->path(); 55 | } 56 | 57 | /** 58 | * Assert that the asset exists. 59 | * 60 | * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException 61 | */ 62 | protected function assertExists() 63 | { 64 | if (! $this->exists()) { 65 | throw new FileNotFoundException("Asset [{$this->path()}] not found."); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Assets/Asset/SvgAsset.php: -------------------------------------------------------------------------------- 1 | conditional = is_callable($conditional) 23 | ? call_user_func($conditional, $args) 24 | : $conditional; 25 | 26 | return $this; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Assets/Contracts/Asset.php: -------------------------------------------------------------------------------- 1 | getMixHotUri($config['path'])) { 18 | $config['url'] = $url; 19 | } 20 | 21 | return $config; 22 | } 23 | 24 | /** 25 | * Get the URI to a Mix hot module replacement server. 26 | * 27 | * @link https://laravel-mix.com/docs/hot-module-replacement 28 | */ 29 | protected function getMixHotUri(string $path): ?string 30 | { 31 | if (! file_exists($hot = "{$path}/hot")) { 32 | return null; 33 | } 34 | 35 | $url = rtrim(rtrim(file_get_contents($hot)), '/'); 36 | 37 | return Str::after($url, ':'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Assets/Middleware/ViteMiddleware.php: -------------------------------------------------------------------------------- 1 | get_theme_file_uri('public/build'), 27 | 'path' => public_path('build'), 28 | 'bundles' => public_path('build/manifest.json'), 29 | 'assets' => public_path('build/manifest.json'), 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Assets/View/BladeDirective.php: -------------------------------------------------------------------------------- 1 | ', '\Roots\asset', $expression); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Assets/Vite.php: -------------------------------------------------------------------------------- 1 | uri()); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Bootstrap/RegisterFacades.php: -------------------------------------------------------------------------------- 1 | make('config')->get('app.aliases', []), 25 | $app->make(PackageManifest::class)->aliases() 26 | ))->register(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Roots/Acorn/ComposerScripts.php: -------------------------------------------------------------------------------- 1 | configClear(); 21 | $console->clearCompiled(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Configuration/Exceptions.php: -------------------------------------------------------------------------------- 1 | app = $laravel); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Console/Commands/ConfigCacheCommand.php: -------------------------------------------------------------------------------- 1 | getPristineConfiguration(); 24 | 25 | $config['app']['providers'] = array_filter($config['app']['providers'], 'class_exists'); 26 | 27 | return $config; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Console/Commands/OptimizeClearCommand.php: -------------------------------------------------------------------------------- 1 | components->info('Clearing cached bootstrap files.'); 20 | 21 | foreach ($this->getOptimizeClearTasks() as $description => $command) { 22 | $this->components->task($description, fn () => $this->gracefulCallSilent($command) == 0); 23 | } 24 | 25 | $this->newLine(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Console/Commands/OptimizeCommand.php: -------------------------------------------------------------------------------- 1 | components->info('Caching framework bootstrap, configuration, and metadata.'); 20 | 21 | foreach ($this->getOptimizeTasks() as $description => $command) { 22 | $this->components->task($description, fn () => $this->gracefulCallSilent($command) == 0); 23 | } 24 | 25 | $this->newLine(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Console/Commands/RouteCacheCommand.php: -------------------------------------------------------------------------------- 1 | parentGetFreshApplication(), function ($app) { 22 | $app->make(ConsoleKernelContract::class)->bootstrap(); 23 | }); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Console/Commands/VendorPublishCommand.php: -------------------------------------------------------------------------------- 1 | getLaravel()->basePath(), $to); 21 | 22 | $this->callAcornInit($from, $to); 23 | } 24 | 25 | parent::publishItem($from, $to); 26 | } 27 | 28 | /** 29 | * Call acorn:init if item cannot be published. 30 | * 31 | * @param string $from 32 | * @param string $to 33 | */ 34 | protected function callAcornInit($from, $to) 35 | { 36 | if (is_dir(dirname($to))) { 37 | return; 38 | } 39 | 40 | $this->info("Cannot publish [{$from}] until Acorn is initialized."); 41 | 42 | if (! $this->confirm('Would you like to initialize Acorn right now?', true)) { 43 | throw new \Exception('Please run wp acorn acorn:init'); 44 | } 45 | 46 | $this->call('acorn:init', ['--base' => $this->getLaravel()->basePath()]); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Console/Commands/stubs/composer.stub: -------------------------------------------------------------------------------- 1 | get_current_user_id(), 20 | ]); 21 | } catch (Throwable $e) { 22 | return []; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Exceptions/SkipProviderException.php: -------------------------------------------------------------------------------- 1 | package = $package; 20 | } 21 | 22 | /** 23 | * Name of the provider's package. 24 | * 25 | * @var string 26 | */ 27 | protected $package; 28 | 29 | /** 30 | * Set the name of the provider's package. 31 | * 32 | * @return void 33 | */ 34 | public function setPackage(string $package) 35 | { 36 | $this->package = $package; 37 | } 38 | 39 | /** 40 | * Get the provider's package. 41 | * 42 | * @return string 43 | */ 44 | public function package() 45 | { 46 | return $this->package; 47 | } 48 | 49 | /** 50 | * Report the exception. 51 | * 52 | * @return array 53 | */ 54 | public function context() 55 | { 56 | return [ 57 | 'package' => $this->package(), 58 | ]; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Exceptions/Whoops/WhoopsExceptionRenderer.php: -------------------------------------------------------------------------------- 1 | forDebug(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Filesystem/FilesystemServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->singleton('files', fn () => new Filesystem); 17 | 18 | $this->app->alias('files', \Roots\Acorn\Filesystem\Filesystem::class); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | app->alias('queue.worker', Worker::class); 18 | } 19 | 20 | /** 21 | * Bootstrap services. 22 | * 23 | * @return void 24 | */ 25 | public function boot() 26 | { 27 | // 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Sage/Concerns/FiltersBodyClass.php: -------------------------------------------------------------------------------- 1 | containsStrict($class = basename(get_permalink()))) { 21 | $classes->push($class); 22 | } 23 | } 24 | 25 | return $classes->map(fn ($class) => preg_replace(['/-blade(-php)?$/', '/^page-template-views/'], '', $class) 26 | )->filter()->all(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Sage/Concerns/FiltersEnqueues.php: -------------------------------------------------------------------------------- 1 | view->share('post', $post); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Roots/Acorn/Sage/Concerns/FiltersViews.php: -------------------------------------------------------------------------------- 1 | exists('partials.comments') ? view('partials.comments')->makeLoader() : $file; 24 | } 25 | 26 | /** 27 | * Use `forms/search.blade.php` for the search form. 28 | * 29 | * Filter: get_search_form 30 | * 31 | * @return string Rendered view 32 | */ 33 | public function filterSearchForm($view) 34 | { 35 | return view()->exists('forms.search') ? view('forms.search') : $view; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Roots/Acorn/ServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapWithKeys(function ($value, $key) { 20 | $value = is_array($value) ? new Fluent($value) : $value; 21 | $method = Str::camel($key); 22 | 23 | return [$key => method_exists($this, $method) ? $this->{$method}($value) : $value]; 24 | })->all(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Roots/Acorn/View/Composers/Concerns/Arrayable.php: -------------------------------------------------------------------------------- 1 | getMethods(ReflectionMethod::IS_PUBLIC)) 21 | ->reject(fn ($method) => $this->shouldIgnore($method->name) || $method->isStatic()) 22 | ->mapWithKeys(function ($method) { 23 | try { 24 | $data = $this->{$method->name}(); 25 | 26 | return [Str::snake($method->name) => is_array($data) ? new Fluent($data) : $data]; 27 | } catch (Throwable) { 28 | return []; 29 | } 30 | }) 31 | ->filter() 32 | ->all(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Roots/Acorn/View/Composers/Debugger.php: -------------------------------------------------------------------------------- 1 | debugLevel = $app['config']['view.debug']; 16 | } 17 | 18 | /** 19 | * Compose the view before rendering. 20 | * 21 | * @param View $view 22 | * @return void 23 | */ 24 | public function compose($view) 25 | { 26 | $name = $view->getName(); 27 | 28 | if ($this->debugLevel === 'view') { 29 | dump($name); 30 | 31 | return; 32 | } 33 | 34 | $data = array_map(function ($value) { 35 | if (is_object($value)) { 36 | return get_class($value); 37 | } 38 | 39 | return $value; 40 | }, $view->getData()); 41 | 42 | if ($this->debugLevel === 'data') { 43 | dump($data); 44 | 45 | return; 46 | } 47 | 48 | dump(['view' => $name, 'data' => $data]); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Roots/globals.php: -------------------------------------------------------------------------------- 1 | merge([ 10 | BootableServiceProvider::class, 11 | BootableServiceProvider::class, 12 | ]); 13 | 14 | expect($providers->toArray())->toBe(array_unique($providers->toArray())); 15 | }); 16 | 17 | it('replaces default providers', function () { 18 | $providers = \Roots\Acorn\ServiceProvider::defaultProviders()->replace([ 19 | \Roots\Acorn\Providers\AcornServiceProvider::class => BootableServiceProvider::class, 20 | ]); 21 | 22 | expect($providers->toArray()) 23 | ->toContain(BootableServiceProvider::class) 24 | ->not() 25 | ->toContain(\Roots\Acorn\Providers\AcornServiceProvider::class); 26 | }); 27 | -------------------------------------------------------------------------------- /tests/Application/__fixtures__/base_path/base_app/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Application/__fixtures__/base_path/base_composer/composer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roots/acorn/3471424548630c01a29746d1bcb289fafca9d141/tests/Application/__fixtures__/base_path/base_composer/composer.json -------------------------------------------------------------------------------- /tests/Application/__fixtures__/base_path/base_empty/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Application/__fixtures__/get_namespace/a_bedrock_site/a_random_library/composer.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/Application/__fixtures__/get_namespace/a_bedrock_site/a_sage_theme/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Application/__fixtures__/get_namespace/a_bedrock_site/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "autoload": { 3 | "psr-4": { 4 | "Bedrock\\Sage\\": "a_sage_theme/app/" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /tests/Application/__fixtures__/get_namespace/a_sage_theme/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Application/__fixtures__/get_namespace/a_sage_theme/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "autoload": { 3 | "psr-4": { 4 | "Sage\\": "app/" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /tests/Application/__fixtures__/is_down_for_maintenance/storage/framework/down: -------------------------------------------------------------------------------- 1 | // 2 | -------------------------------------------------------------------------------- /tests/Application/__fixtures__/is_down_for_maintenance/wp/.maintenance: -------------------------------------------------------------------------------- 1 | // 2 | -------------------------------------------------------------------------------- /tests/Application/__fixtures__/use_paths/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Application/__fixtures__/use_paths/bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Application/__fixtures__/use_paths/composer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roots/acorn/3471424548630c01a29746d1bcb289fafca9d141/tests/Application/__fixtures__/use_paths/composer.json -------------------------------------------------------------------------------- /tests/Application/__fixtures__/use_paths/config/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Application/__fixtures__/use_paths/database/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Application/__fixtures__/use_paths/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Application/__fixtures__/use_paths/resources/lang/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Application/__fixtures__/use_paths/storage/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/Assets/AssetsServiceProviderTest.php: -------------------------------------------------------------------------------- 1 | singleton('config', fn () => new \Illuminate\Config\Repository); 14 | $app->register(\Roots\Acorn\Assets\AssetsServiceProvider::class); 15 | 16 | expect($app->make('assets'))->toBeInstanceOf(Manager::class); 17 | }); 18 | 19 | it('registers a default manifest', function () { 20 | $app = new \Roots\Acorn\Application; 21 | $app->singleton('config', fn () => new \Illuminate\Config\Repository([ 22 | 'assets' => [ 23 | 'default' => 'app', 24 | 'manifests' => [ 25 | 'app' => [ 26 | 'path' => $this->fixture('bud_single_runtime/public/app'), 27 | 'url' => 'https://k.jo/app', 28 | 'assets' => $this->fixture('bud_multi_compiler/public/app/manifest.json'), 29 | 'bundles' => $this->fixture('bud_multi_compiler/public/app/entrypoints.json'), 30 | ], 31 | ], 32 | ], 33 | ])); 34 | $app->register(\Roots\Acorn\Assets\AssetsServiceProvider::class); 35 | 36 | expect($app->make('assets.manifest'))->toBeInstanceOf(ManifestContract::class); 37 | assertMatchesSnapshot($app->make('assets.manifest')->asset('app.js')->uri()); 38 | }); 39 | -------------------------------------------------------------------------------- /tests/Assets/BladeDirectiveTest.php: -------------------------------------------------------------------------------- 1 | handle([ 14 | 'path' => $this->fixture('mix_no_bundle/public'), 15 | 'url' => 'https://k.jo/public', 16 | ]); 17 | 18 | assertMatchesSnapshot($config['url']); 19 | }); 20 | 21 | it('modifies url when hot file is present', function () { 22 | $middleware = new LaravelMixMiddleware; 23 | 24 | $config = $middleware->handle([ 25 | 'path' => $this->fixture('mix_no_bundle_hmr/public'), 26 | 'url' => 'https://k.jo/public', 27 | ]); 28 | 29 | assertMatchesSnapshot($config['url']); 30 | }); 31 | -------------------------------------------------------------------------------- /tests/Assets/ManifestTest.php: -------------------------------------------------------------------------------- 1 | fixture('bud_single_runtime'), 13 | 'https://k.jo', 14 | json_decode(file_get_contents($this->fixture('bud_single_runtime/public/manifest.json')), JSON_OBJECT_AS_ARRAY) 15 | ); 16 | 17 | expect($manifest->asset('app.js'))->toBeInstanceOf(AssetContract::class); 18 | }); 19 | 20 | it('can get a bundle', function () { 21 | $manifest = new Manifest( 22 | $this->fixture('bud_single_runtime'), 23 | 'https://k.jo', 24 | [], 25 | json_decode(file_get_contents($this->fixture('bud_single_runtime/public/entrypoints.json')), JSON_OBJECT_AS_ARRAY) 26 | ); 27 | 28 | expect($manifest->bundle('app'))->toBeInstanceOf(BundleContract::class); 29 | }); 30 | -------------------------------------------------------------------------------- /tests/Assets/RootsBudMiddlewareTest.php: -------------------------------------------------------------------------------- 1 | handle([ 14 | 'path' => $this->fixture('bud_single_runtime/public'), 15 | 'url' => 'https://k.jo/public', 16 | ]); 17 | 18 | assertMatchesSnapshot($config['url']); 19 | }); 20 | 21 | it('skips url modification if dev origin is invalid', function () { 22 | $middleware = new RootsBudMiddleware('http://this-does-not-match/'); 23 | 24 | $config = $middleware->handle([ 25 | 'path' => $this->fixture('bud_single_runtime_hmr/public'), 26 | 'url' => 'https://k.jo/public', 27 | ]); 28 | 29 | assertMatchesSnapshot($config['url']); 30 | }); 31 | 32 | it('modifies url when hmr file is present with matching dev origin', function () { 33 | $middleware = new RootsBudMiddleware('http://localhost:3000/'); 34 | 35 | $config = $middleware->handle([ 36 | 'path' => $this->fixture('bud_single_runtime_hmr/public'), 37 | 'url' => 'https://k.jo/public', 38 | ]); 39 | 40 | assertMatchesSnapshot($config['url']); 41 | }); 42 | -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/asset_types/public/assets/apray.cache-busted.ext: -------------------------------------------------------------------------------- 1 | apray 2 | -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/asset_types/public/assets/bnif.cache-busted.php: -------------------------------------------------------------------------------- 1 | {}),(t=c==null?void 0:c.hot)==null||t.accept(s=>{console.err(s)})}.call(this,f("127c8cf59f228bb01a21"),f("044f282f6141fc605782")(n))},"5fe2b7aea34c8b17e55f":function(n,o,f){}},[[0,0,1]]]); 2 | -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_multi_runtime/public/customizer.64da10a892a71df413b1.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"127c8cf59f228bb01a21":function(c,o){(function(){c.exports=window.jQuery})()},"1cdf3ab34cc5add6fb62":function(c,o,n){(function(t){wp.customize("blogname",b=>{b.bind(f=>t(".brand").text(f))})}).call(this,n("127c8cf59f228bb01a21"))},2:function(c,o,n){c.exports=n("1cdf3ab34cc5add6fb62")}},[[2,5]]]); 2 | -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_multi_runtime/public/editor.4.64da10a892a71df413b1.css: -------------------------------------------------------------------------------- 1 | .block-editor-block-list__layout{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.wp-block{max-width:768px}.wp-block.editor-post-title__block .editor-post-title__input{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji} -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_multi_runtime/public/editor.64da10a892a71df413b1.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[4],{1:function(t,c,o){o("3fb2fb1ce45c8f1e3416"),t.exports=o("dbc9ab5c32059c1f0f52")},"3fb2fb1ce45c8f1e3416":function(t,c,o){"use strict";o.r(c),function(e){var d=o("caa2b3be1dc225f64af9"),_=o.n(d),f=o("a4a5d16b3e8d4c9fb95a"),a=o.n(f),n=o("d6bb49f98e8aeb9c5bec"),r=o.n(n),s;a()(()=>{Object(n.unregisterBlockStyle)("core/button","outline"),Object(n.registerBlockStyle)("core/button",{name:"outline",label:"Outline"})}),(s=e==null?void 0:e.hot)==null||s.accept(b=>{console.err(b)})}.call(this,o("044f282f6141fc605782")(t))},a4a5d16b3e8d4c9fb95a:function(t,c){(function(){t.exports=window.wp.domReady})()},caa2b3be1dc225f64af9:function(t,c){(function(){t.exports=window.wp.editPost})()},d6bb49f98e8aeb9c5bec:function(t,c){(function(){t.exports=window.wp.blocks})()},dbc9ab5c32059c1f0f52:function(t,c,o){}},[[1,6,1]]]); 2 | -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_multi_runtime/public/entrypoints.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "js": { 4 | "runtime~app": "public/runtime~app.64da10a892a71df413b1.js", 5 | "app": "public/app.64da10a892a71df413b1.js" 6 | }, 7 | "css": { 8 | "app": "public/app.2.64da10a892a71df413b1.css" 9 | }, 10 | "dependencies": ["jquery"] 11 | }, 12 | "editor": { 13 | "js": { 14 | "runtime~editor": "public/runtime~editor.64da10a892a71df413b1.js", 15 | "editor": "public/editor.64da10a892a71df413b1.js" 16 | }, 17 | "css": { 18 | "editor": "public/editor.4.64da10a892a71df413b1.css" 19 | }, 20 | "dependencies": [ 21 | "wp-dom-ready", 22 | "wp-edit-post", 23 | "wp-blocks" 24 | ] 25 | }, 26 | "customizer": { 27 | "js": { 28 | "runtime~customizer": "public/runtime~customizer.64da10a892a71df413b1.js", 29 | "customizer": "public/customizer.64da10a892a71df413b1.js" 30 | }, 31 | "dependencies": ["jquery"] 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_multi_runtime/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtime~app.js": "public/runtime~app.64da10a892a71df413b1.js", 3 | "vendor/harmony-module.js": "public/vendor/harmony-module.64da10a892a71df413b1.js", 4 | "app.css": "public/app.2.64da10a892a71df413b1.css", 5 | "app.js": "public/app.64da10a892a71df413b1.js", 6 | "customizer.js": "public/customizer.64da10a892a71df413b1.js", 7 | "editor.css": "public/editor.4.64da10a892a71df413b1.css", 8 | "editor.js": "public/editor.64da10a892a71df413b1.js", 9 | "runtime~customizer.js": "public/runtime~customizer.64da10a892a71df413b1.js", 10 | "runtime~editor.js": "public/runtime~editor.64da10a892a71df413b1.js", 11 | "wordpress.json": "public/wordpress.json" 12 | } -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_multi_runtime/public/runtime~app.64da10a892a71df413b1.js: -------------------------------------------------------------------------------- 1 | (function(a){function y(r){for(var e=r[0],n=r[1],u=r[2],o,c,b=0,h=[];b{}),(t=c==null?void 0:c.hot)==null||t.accept(s=>{console.err(s)})}.call(this,f("127c8cf59f228bb01a21"),f("044f282f6141fc605782")(n))},"5fe2b7aea34c8b17e55f":function(n,o,f){}},[[0,0,1]]]); 2 | -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_single_runtime/public/customizer.4476c5f869ee7584ba3c.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"127c8cf59f228bb01a21":function(c,o){(function(){c.exports=window.jQuery})()},"1cdf3ab34cc5add6fb62":function(c,o,n){(function(t){wp.customize("blogname",b=>{b.bind(f=>t(".brand").text(f))})}).call(this,n("127c8cf59f228bb01a21"))},2:function(c,o,n){c.exports=n("1cdf3ab34cc5add6fb62")}},[[2,0]]]); 2 | -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_single_runtime/public/editor.4.4476c5f869ee7584ba3c.css: -------------------------------------------------------------------------------- 1 | .block-editor-block-list__layout{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.wp-block{max-width:768px}.wp-block.editor-post-title__block .editor-post-title__input{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji} -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_single_runtime/public/editor.4476c5f869ee7584ba3c.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[4],{1:function(t,c,o){o("3fb2fb1ce45c8f1e3416"),t.exports=o("dbc9ab5c32059c1f0f52")},"3fb2fb1ce45c8f1e3416":function(t,c,o){"use strict";o.r(c),function(e){var d=o("caa2b3be1dc225f64af9"),_=o.n(d),f=o("a4a5d16b3e8d4c9fb95a"),a=o.n(f),n=o("d6bb49f98e8aeb9c5bec"),r=o.n(n),s;a()(()=>{Object(n.unregisterBlockStyle)("core/button","outline"),Object(n.registerBlockStyle)("core/button",{name:"outline",label:"Outline"})}),(s=e==null?void 0:e.hot)==null||s.accept(b=>{console.err(b)})}.call(this,o("044f282f6141fc605782")(t))},a4a5d16b3e8d4c9fb95a:function(t,c){(function(){t.exports=window.wp.domReady})()},caa2b3be1dc225f64af9:function(t,c){(function(){t.exports=window.wp.editPost})()},d6bb49f98e8aeb9c5bec:function(t,c){(function(){t.exports=window.wp.blocks})()},dbc9ab5c32059c1f0f52:function(t,c,o){}},[[1,0,1]]]); 2 | -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_single_runtime/public/entrypoints.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "js": { 4 | "runtime": "public/runtime.4476c5f869ee7584ba3c.js", 5 | "app": "public/app.4476c5f869ee7584ba3c.js" 6 | }, 7 | "css": { 8 | "app": "public/app.2.4476c5f869ee7584ba3c.css" 9 | }, 10 | "dependencies": ["jquery"] 11 | }, 12 | "editor": { 13 | "js": { 14 | "runtime": "public/runtime.4476c5f869ee7584ba3c.js", 15 | "editor": "public/editor.4476c5f869ee7584ba3c.js" 16 | }, 17 | "css": { 18 | "editor": "public/editor.4.4476c5f869ee7584ba3c.css" 19 | }, 20 | "dependencies": [ 21 | "wp-dom-ready", 22 | "wp-edit-post", 23 | "wp-blocks" 24 | ] 25 | }, 26 | "customizer": { 27 | "js": { 28 | "runtime": "public/runtime.4476c5f869ee7584ba3c.js", 29 | "customizer": "public/customizer.4476c5f869ee7584ba3c.js" 30 | }, 31 | "dependencies": ["jquery"] 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_single_runtime/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtime.js": "public/runtime.4476c5f869ee7584ba3c.js", 3 | "vendor/harmony-module.js": "public/vendor/harmony-module.4476c5f869ee7584ba3c.js", 4 | "app.css": "public/app.2.4476c5f869ee7584ba3c.css", 5 | "app.js": "public/app.4476c5f869ee7584ba3c.js", 6 | "customizer.js": "public/customizer.4476c5f869ee7584ba3c.js", 7 | "editor.css": "public/editor.4.4476c5f869ee7584ba3c.css", 8 | "editor.js": "public/editor.4476c5f869ee7584ba3c.js", 9 | "wordpress.json": "public/wordpress.json" 10 | } -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_single_runtime/public/runtime.4476c5f869ee7584ba3c.js: -------------------------------------------------------------------------------- 1 | (function(a){function y(r){for(var e=r[0],n=r[1],u=r[2],o,c,b=0,h=[];b{a.d(n,{Z:()=>s});const s=e=>{window.requestAnimationFrame((async function n(){document.body?await e():window.requestAnimationFrame(n)}))}}}]); -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_v6_single_runtime/public/js/app.ff5dd8.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunksage=self.webpackChunksage||[]).push([[143],{813:(s,e,a)=>{const c=async s=>{s&&console.error(s)};(0,a(575).Z)(c)},201:()=>{}},s=>{var e=e=>s(s.s=e);s.O(0,[575],(()=>(e(813),e(201)))),s.O()}]); -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_v6_single_runtime/public/js/editor.6e8560.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunksage=self.webpackChunksage||[]).push([[189],{464:(e,o,t)=>{var s=t(575);const l=window.wp.blocks;const n=e=>{e&&console.error(e),(0,l.unregisterBlockStyle)("core/button","outline"),(0,l.registerBlockStyle)("core/button",{name:"outline",label:"Outline"})};(0,s.Z)(n)},655:()=>{}},e=>{var o=o=>e(e.s=o);e.O(0,[575],(()=>(o(464),o(655)))),e.O()}]); -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_v6_single_runtime/public/js/runtime.8eb29a.js: -------------------------------------------------------------------------------- 1 | (()=>{"use strict";var r,e={},o={};function t(r){var n=o[r];if(void 0!==n)return n.exports;var a=o[r]={exports:{}};return e[r](a,a.exports,t),a.exports}t.m=e,r=[],t.O=(e,o,n,a)=>{if(!o){var i=1/0;for(v=0;v=a)&&Object.keys(t.O).every((r=>t.O[r](o[f])))?o.splice(f--,1):(s=!1,a0&&r[v-1][2]>a;v--)r[v]=r[v-1];r[v]=[o,n,a]},t.d=(r,e)=>{for(var o in e)t.o(e,o)&&!t.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:e[o]})},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={666:0};t.O.j=e=>0===r[e];var e=(e,o)=>{var n,a,i=o[0],s=o[1],f=o[2],l=0;if(i.some((e=>0!==r[e]))){for(n in s)t.o(s,n)&&(t.m[n]=s[n]);if(f)var v=f(t)}for(e&&e(o);l{t.d(n,{Z:()=>e});const e=o=>{window.requestAnimationFrame((async function n(){document.body?await o():window.requestAnimationFrame(n)}))}}}; -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_v6_single_runtime_esm/public/js/app.e0da49.mjs: -------------------------------------------------------------------------------- 1 | export const id=143;export const ids=[143];export const modules={813:(o,r,s)=>{const m=async o=>{o&&console.error(o)};(0,s(575).Z)(m)},201:()=>{}};import o from"./runtime.bd5a57.mjs";var r=r=>o(o.s=r);import*as s from"./575.0d819a.mjs";o.C(s);import*as m from"./app.e0da49.mjs";o.C(m),r(813),r(201); -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_v6_single_runtime_esm/public/js/editor.9c37af.mjs: -------------------------------------------------------------------------------- 1 | export const id=189;export const ids=[189];export const modules={464:(o,t,e)=>{var r=e(575);const s=window.wp.blocks;const n=o=>{o&&console.error(o),(0,s.unregisterBlockStyle)("core/button","outline"),(0,s.registerBlockStyle)("core/button",{name:"outline",label:"Outline"})};(0,r.Z)(n)},655:()=>{}};import o from"./runtime.bd5a57.mjs";var t=t=>o(o.s=t);import*as e from"./575.0d819a.mjs";o.C(e);import*as r from"./editor.9c37af.mjs";o.C(r),t(464),t(655); -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/bud_v6_single_runtime_esm/public/js/runtime.bd5a57.mjs: -------------------------------------------------------------------------------- 1 | var r,e={},o={};function t(r){var n=o[r];if(void 0!==n)return n.exports;var a=o[r]={exports:{}};return e[r](a,a.exports,t),a.exports}t.m=e,t.d=(r,e)=>{for(var o in e)t.o(e,o)&&!t.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:e[o]})},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e);export default t;r={666:0},t.C=e=>{var o,n,a=e.ids,p=e.modules,i=e.runtime,f=0;for(o in p)t.o(p,o)&&(t.m[o]=p[o]);for(i&&i(t);f {\n // console.log('Hello world');\n});\n","module.exports = window[\"jQuery\"];"],"sourceRoot":""} -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/mix_no_bundle/public/scripts/customizer.js: -------------------------------------------------------------------------------- 1 | (self.webpackChunk=self.webpackChunk||[]).push([[438],{477:function(n,e,t){var u=t(609);wp.customize("blogname",(function(n){n.bind((function(n){return u(".brand").text(n)}))}))},609:function(n){"use strict";n.exports=window.jQuery}},0,[[477,546]]]); 2 | //# sourceMappingURL=customizer.js.map -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/mix_no_bundle/public/scripts/customizer.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///./resources/scripts/customizer.js","webpack:///external \"jQuery\""],"names":["wp","value","to","$","module","exports","window"],"mappings":"wFAYAA,yBAAyB,SAAAC,GACvBA,QAAW,SAAAC,GAAE,OAAIC,iBAAJ,U,6BCbfC,EAAOC,QAAUC,OAAe,S","file":"/scripts/customizer.js","sourcesContent":["/**\n * This file allows you to add functionality to the Theme Customizer\n * live preview. jQuery is readily available.\n *\n * {@link https://codex.wordpress.org/Theme_Customization_API}\n */\n\n/**\n * Change the blog name value.\n *\n * @param {string} value\n */\nwp.customize('blogname', value => {\n value.bind(to => $('.brand').text(to));\n});\n","module.exports = window[\"jQuery\"];"],"sourceRoot":""} -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/mix_no_bundle/public/scripts/editor.js: -------------------------------------------------------------------------------- 1 | (self.webpackChunk=self.webpackChunk||[]).push([[804],{282:function(e,n,t){"use strict";window.wp.editPost;var o=window.wp.domReady,i=t.n(o),l=window.wp.blocks;i()((function(){(0,l.unregisterBlockStyle)("core/button","outline"),(0,l.registerBlockStyle)("core/button",{name:"outline",label:"Outline"})}))}},0,[[282,546]]]); 2 | //# sourceMappingURL=editor.js.map -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/mix_no_bundle/public/scripts/editor.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///external [\"wp\",\"editPost\"]","webpack:///external [\"wp\",\"domReady\"]","webpack:///external [\"wp\",\"blocks\"]","webpack:///./resources/scripts/editor.js"],"names":["window","domReady","unregisterBlockStyle","registerBlockStyle","name","label"],"mappings":"wFAAmCA,OAAW,GAAY,SAA1D,ICAI,EAA+BA,OAAW,GAAY,S,SCAtD,EAA+BA,OAAW,GAAU,OCIxDC,KAAS,YACPC,0BAAqB,cAArBA,YAEAC,wBAAmB,cAAe,CAChCC,KADgC,UAEhCC,MAAO,iB","file":"/scripts/editor.js","sourcesContent":["var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"editPost\"];","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"domReady\"];","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blocks\"];","import '@wordpress/edit-post';\nimport domReady from '@wordpress/dom-ready';\nimport { unregisterBlockStyle, registerBlockStyle } from '@wordpress/blocks';\n\ndomReady(() => {\n unregisterBlockStyle('core/button', 'outline');\n\n registerBlockStyle('core/button', {\n name: 'outline',\n label: 'Outline',\n });\n});\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/mix_no_bundle/public/scripts/manifest.asset.php: -------------------------------------------------------------------------------- 1 | array('wp-blocks', 'wp-dom-ready', 'wp-edit-post'), 'version' => 'e39511caf2eccc797793102b4a605369'); -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/mix_no_bundle/public/scripts/manifest.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";var n={},r={};function t(e){if(r[e])return r[e].exports;var o=r[e]={exports:{}};return n[e](o,o.exports,t),o.exports}t.m=n,t.x=function(){},t.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(r,{a:r}),r},t.d=function(n,r){for(var e in r)t.o(r,e)&&!t.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:r[e]})},t.o=function(n,r){return Object.prototype.hasOwnProperty.call(n,r)},function(){var n={546:0},r=[],e=function(){},o=function(o,u){for(var f,i,c=u[0],a=u[1],l=u[2],p=u[3],s=0,h=[];s array('wp-blocks', 'wp-dom-ready', 'wp-edit-post'), 'version' => 'aafb3aa27c9e6dd03dc133edc8aedb79'); -------------------------------------------------------------------------------- /tests/Assets/__fixtures__/mix_no_bundle_hmr/public/styles/editor.css: -------------------------------------------------------------------------------- 1 | .block-editor-block-list__layout { 2 | font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; 3 | } 4 | 5 | .wp-block { 6 | max-width: 768px; 7 | } 8 | 9 | .wp-block.editor-post-title__block .editor-post-title__input { 10 | font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important; 11 | } 12 | -------------------------------------------------------------------------------- /tests/Console/ConsoleTest.php: -------------------------------------------------------------------------------- 1 | create(); 30 | 31 | register_shutdown_function(fn () => $temp->delete()); 32 | } 33 | 34 | if ($path !== null) { 35 | return $temp->path($path); 36 | } 37 | 38 | return $temp; 39 | } 40 | 41 | function mock(string $class): MockInterface 42 | { 43 | return Mockery::mock($class); 44 | } 45 | -------------------------------------------------------------------------------- /tests/Sage/SageTest.php: -------------------------------------------------------------------------------- 1 | clearStubs(); 19 | $this->wordPressStubs(); 20 | parent::setUp(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/View/ViewTest.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/__snapshots__/BundleTest__it_accepts_a_callback_for_styles_and_scripts__1.yml: -------------------------------------------------------------------------------- 1 | handle: app/app 2 | src: 'https://k.jo/public/app.4476c5f869ee7584ba3c.js' 3 | dependencies: 4 | - jquery 5 | -------------------------------------------------------------------------------- /tests/__snapshots__/BundleTest__it_accepts_a_callback_for_styles_and_scripts__2.yml: -------------------------------------------------------------------------------- 1 | handle: app/app 2 | src: 'https://k.jo/public/app.2.4476c5f869ee7584ba3c.css' 3 | -------------------------------------------------------------------------------- /tests/__snapshots__/BundleTest__it_can_add_editor_styles__1.yml: -------------------------------------------------------------------------------- 1 | - ../../bud_single_runtime/public/app.2.4476c5f869ee7584ba3c.css 2 | -------------------------------------------------------------------------------- /tests/__snapshots__/BundleTest__it_can_conditionally_get_assets__1.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": "public\/app.4476c5f869ee7584ba3c.js" 3 | } 4 | -------------------------------------------------------------------------------- /tests/__snapshots__/BundleTest__it_can_dequeue_css__1.yml: -------------------------------------------------------------------------------- 1 | - app/app 2 | -------------------------------------------------------------------------------- /tests/__snapshots__/BundleTest__it_can_dequeue_js__1.yml: -------------------------------------------------------------------------------- 1 | - app/app 2 | -------------------------------------------------------------------------------- /tests/__snapshots__/BundleTest__it_can_enqueue_css__1.yml: -------------------------------------------------------------------------------- 1 | - app/app 2 | - 'https://k.jo/public/app.2.4476c5f869ee7584ba3c.css' 3 | - { } 4 | - null 5 | - all 6 | -------------------------------------------------------------------------------- /tests/__snapshots__/BundleTest__it_can_enqueue_js__1.yml: -------------------------------------------------------------------------------- 1 | - app/app 2 | - 'https://k.jo/public/app.4476c5f869ee7584ba3c.js' 3 | - 4 | - jquery 5 | - null 6 | - true 7 | -------------------------------------------------------------------------------- /tests/__snapshots__/BundleTest__it_can_get_styles_and_scripts_collections__1.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": "public\/app.4476c5f869ee7584ba3c.js" 3 | } 4 | -------------------------------------------------------------------------------- /tests/__snapshots__/BundleTest__it_can_get_styles_and_scripts_collections__2.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": "public\/app.2.4476c5f869ee7584ba3c.css" 3 | } 4 | -------------------------------------------------------------------------------- /tests/__snapshots__/BundleTest__it_can_inline_a_single_runtime__1.yml: -------------------------------------------------------------------------------- 1 | - app/0 2 | - | 3 | (function(a){function y(r){for(var e=r[0],n=r[1],u=r[2],o,c,b=0,h=[];b