@stacksjs/defaults 0.70.58 → 0.70.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/Actions/AI/AskAction.ts +40 -0
- package/app/Actions/AI/SummaryAction.ts +40 -0
- package/app/Actions/Auth/AuthUserAction.ts +13 -0
- package/app/Actions/Auth/CreateTokenAction.ts +64 -0
- package/app/Actions/Auth/DisableTwoFactorAction.ts +37 -0
- package/app/Actions/Auth/EnableTwoFactorAction.ts +37 -0
- package/app/Actions/Auth/GenerateAuthenticationAction.ts +51 -0
- package/app/Actions/Auth/GenerateRegistrationAction.ts +53 -0
- package/app/Actions/Auth/GenerateTwoFactorSecretAction.ts +26 -0
- package/app/Actions/Auth/ListTokensAction.ts +30 -0
- package/app/Actions/Auth/LoginAction.ts +73 -0
- package/app/Actions/Auth/LogoutAction.ts +16 -0
- package/app/Actions/Auth/LogoutAllAction.ts +28 -0
- package/app/Actions/Auth/RefreshTokenAction.ts +39 -0
- package/app/Actions/Auth/RegisterAction.ts +57 -0
- package/app/Actions/Auth/ResendVerificationAction.ts +24 -0
- package/app/Actions/Auth/RevokeTokenAction.ts +43 -0
- package/app/Actions/Auth/TestAbilitiesAction.ts +61 -0
- package/app/Actions/Auth/VerifyAuthenticationAction.ts +94 -0
- package/app/Actions/Auth/VerifyEmailAction.ts +25 -0
- package/app/Actions/Auth/VerifyRegistrationAction.ts +59 -0
- package/app/Actions/Auth/VerifyTwoFactorLoginAction.ts +57 -0
- package/app/Actions/Billable/CheckoutAction.ts +25 -0
- package/app/Actions/Buddy/BuddyBrowseAction.ts +34 -0
- package/app/Actions/Buddy/BuddyCancelAction.ts +32 -0
- package/app/Actions/Buddy/BuddyCommitAction.ts +25 -0
- package/app/Actions/Buddy/BuddyGitHubConnectAction.ts +40 -0
- package/app/Actions/Buddy/BuddyGitHubDisconnectAction.ts +19 -0
- package/app/Actions/Buddy/BuddyProcessAction.ts +65 -0
- package/app/Actions/Buddy/BuddyProcessStreamAction.ts +128 -0
- package/app/Actions/Buddy/BuddyPushAction.ts +21 -0
- package/app/Actions/Buddy/BuddyRepoOpenAction.ts +44 -0
- package/app/Actions/Buddy/BuddyRepoValidateAction.ts +35 -0
- package/app/Actions/Buddy/BuddySettingsAction.ts +21 -0
- package/app/Actions/Buddy/BuddySettingsUpdateAction.ts +46 -0
- package/app/Actions/Buddy/BuddyStateAction.ts +28 -0
- package/app/Actions/Buddy/BuddyTitleAction.ts +49 -0
- package/app/Actions/Buddy/CommandsAction.ts +802 -0
- package/app/Actions/Buddy/JobCancelAction.ts +32 -0
- package/app/Actions/Buddy/JobRetryAction.ts +49 -0
- package/app/Actions/Buddy/JobsListAction.ts +141 -0
- package/app/Actions/Buddy/ScheduleListAction.ts +52 -0
- package/app/Actions/Buddy/VersionsAction.ts +12 -0
- package/app/Actions/Cms/AuthorDestroyAction.ts +21 -0
- package/app/Actions/Cms/AuthorIndexAction.ts +14 -0
- package/app/Actions/Cms/AuthorShowAction.ts +19 -0
- package/app/Actions/Cms/AuthorStoreAction.ts +20 -0
- package/app/Actions/Cms/AuthorUpdateAction.ts +24 -0
- package/app/Actions/Cms/CategorizableDestroyAction.ts +16 -0
- package/app/Actions/Cms/CategorizableIndexAction.ts +14 -0
- package/app/Actions/Cms/CategorizableShowAction.ts +16 -0
- package/app/Actions/Cms/CategorizableStoreAction.ts +42 -0
- package/app/Actions/Cms/CategorizableUpdateAction.ts +38 -0
- package/app/Actions/Cms/CommentDestroyAction.ts +16 -0
- package/app/Actions/Cms/CommentIndexAction.ts +17 -0
- package/app/Actions/Cms/CommentShowAction.ts +16 -0
- package/app/Actions/Cms/CommentStoreAction.ts +39 -0
- package/app/Actions/Cms/CommentUpdateAction.ts +37 -0
- package/app/Actions/Cms/PageDestroyAction.ts +16 -0
- package/app/Actions/Cms/PageIndexAction.ts +14 -0
- package/app/Actions/Cms/PageStoreAction.ts +31 -0
- package/app/Actions/Cms/PageUpdateAction.ts +27 -0
- package/app/Actions/Cms/PostDestroyAction.ts +17 -0
- package/app/Actions/Cms/PostIndexAction.ts +14 -0
- package/app/Actions/Cms/PostShowAction.ts +16 -0
- package/app/Actions/Cms/PostStoreAction.ts +37 -0
- package/app/Actions/Cms/PostUpdateAction.ts +32 -0
- package/app/Actions/Cms/PostViewsUpdateAction.ts +34 -0
- package/app/Actions/Cms/RssFeedAction.ts +59 -0
- package/app/Actions/Cms/SitemapAction.ts +60 -0
- package/app/Actions/Cms/TaggableDestroyAction.ts +16 -0
- package/app/Actions/Cms/TaggableIndexAction.ts +14 -0
- package/app/Actions/Cms/TaggableShowAction.ts +16 -0
- package/app/Actions/Cms/TaggableStoreAction.ts +36 -0
- package/app/Actions/Cms/TaggableUpdateAction.ts +37 -0
- package/app/Actions/Commerce/CouponDestroyAction.ts +18 -0
- package/app/Actions/Commerce/CouponIndexAction.ts +16 -0
- package/app/Actions/Commerce/CouponShowAction.ts +18 -0
- package/app/Actions/Commerce/CouponStoreAction.ts +21 -0
- package/app/Actions/Commerce/CouponUpdateAction.ts +31 -0
- package/app/Actions/Commerce/CustomerDestroyAction.ts +16 -0
- package/app/Actions/Commerce/CustomerIndexAction.ts +15 -0
- package/app/Actions/Commerce/CustomerShowAction.ts +18 -0
- package/app/Actions/Commerce/CustomerStoreAction.ts +29 -0
- package/app/Actions/Commerce/CustomerUpdateAction.ts +27 -0
- package/app/Actions/Commerce/DriverDestroyAction.ts +18 -0
- package/app/Actions/Commerce/GiftCardDestroyAction.ts +18 -0
- package/app/Actions/Commerce/GiftCardIndexAction.ts +16 -0
- package/app/Actions/Commerce/GiftCardShowAction.ts +18 -0
- package/app/Actions/Commerce/GiftCardStatsAction.ts +30 -0
- package/app/Actions/Commerce/GiftCardStoreAction.ts +35 -0
- package/app/Actions/Commerce/GiftCardUpdateAction.ts +26 -0
- package/app/Actions/Commerce/GiftCardUpdateBalanceAction.ts +36 -0
- package/app/Actions/Commerce/OrderDestroyAction.ts +18 -0
- package/app/Actions/Commerce/OrderExportAction.ts +15 -0
- package/app/Actions/Commerce/OrderIndexAction.ts +15 -0
- package/app/Actions/Commerce/OrderShowAction.ts +18 -0
- package/app/Actions/Commerce/OrderStoreAction.ts +32 -0
- package/app/Actions/Commerce/OrderUpdateAction.ts +34 -0
- package/app/Actions/Commerce/PaymentDestroyAction.ts +16 -0
- package/app/Actions/Commerce/PaymentFetchStatsAction.ts +31 -0
- package/app/Actions/Commerce/PaymentIndexAction.ts +15 -0
- package/app/Actions/Commerce/PaymentMonthlyTrendsAction.ts +21 -0
- package/app/Actions/Commerce/PaymentShowAction.ts +17 -0
- package/app/Actions/Commerce/PaymentStoreAction.ts +24 -0
- package/app/Actions/Commerce/PaymentUpdateAction.ts +35 -0
- package/app/Actions/Commerce/PrintDeviceDestroyAction.ts +18 -0
- package/app/Actions/Commerce/PrintDeviceIndexAction.ts +14 -0
- package/app/Actions/Commerce/PrintDeviceShowAction.ts +17 -0
- package/app/Actions/Commerce/PrintDeviceStoreAction.ts +27 -0
- package/app/Actions/Commerce/PrintDeviceUpdateAction.ts +27 -0
- package/app/Actions/Commerce/Product/ManufacturerDestroyAction.ts +20 -0
- package/app/Actions/Commerce/Product/ManufacturerIndexAction.ts +16 -0
- package/app/Actions/Commerce/Product/ManufacturerShowAction.ts +18 -0
- package/app/Actions/Commerce/Product/ManufacturerStoreAction.ts +14 -0
- package/app/Actions/Commerce/Product/ProductCategoryIndexAction.ts +16 -0
- package/app/Actions/Commerce/Product/ProductCategoryStoreAction.ts +16 -0
- package/app/Actions/Commerce/Product/ProductDestroyAction.ts +16 -0
- package/app/Actions/Commerce/Product/ProductIndexAction.ts +14 -0
- package/app/Actions/Commerce/Product/ProductManufacturerDestroyAction.ts +18 -0
- package/app/Actions/Commerce/Product/ProductManufacturerIndexAction.ts +14 -0
- package/app/Actions/Commerce/Product/ProductManufacturerShowAction.ts +16 -0
- package/app/Actions/Commerce/Product/ProductManufacturerStoreAction.ts +14 -0
- package/app/Actions/Commerce/Product/ProductManufacturerUpdateAction.ts +18 -0
- package/app/Actions/Commerce/Product/ProductShowAction.ts +18 -0
- package/app/Actions/Commerce/Product/ProductStoreAction.ts +17 -0
- package/app/Actions/Commerce/Product/ProductUnitDestroyAction.ts +18 -0
- package/app/Actions/Commerce/Product/ProductUnitIndexAction.ts +14 -0
- package/app/Actions/Commerce/Product/ProductUnitShowAction.ts +18 -0
- package/app/Actions/Commerce/Product/ProductUnitStoreAction.ts +15 -0
- package/app/Actions/Commerce/Product/ProductUpdateAction.ts +17 -0
- package/app/Actions/Commerce/Product/ProductVariantDestroyAction.ts +18 -0
- package/app/Actions/Commerce/Product/ProductVariantIndexAction.ts +14 -0
- package/app/Actions/Commerce/Product/ProductVariantShowAction.ts +17 -0
- package/app/Actions/Commerce/Product/ProductVariantStoreAction.ts +14 -0
- package/app/Actions/Commerce/Product/ProductVariantUpdateAction.ts +16 -0
- package/app/Actions/Commerce/ReceiptDestroyAction.ts +18 -0
- package/app/Actions/Commerce/ReceiptIndexAction.ts +14 -0
- package/app/Actions/Commerce/ReceiptShowAction.ts +18 -0
- package/app/Actions/Commerce/ReceiptStoreAction.ts +28 -0
- package/app/Actions/Commerce/ReceiptUpdateAction.ts +30 -0
- package/app/Actions/Commerce/ReviewIndexAction.ts +14 -0
- package/app/Actions/Commerce/ReviewShowAction.ts +16 -0
- package/app/Actions/Commerce/ReviewStoreAction.ts +26 -0
- package/app/Actions/Commerce/ReviewUpdateAction.ts +28 -0
- package/app/Actions/Commerce/Shipping/DeliveryRouteDestroyAction.ts +18 -0
- package/app/Actions/Commerce/Shipping/DeliveryRouteIndexAction.ts +16 -0
- package/app/Actions/Commerce/Shipping/DeliveryRouteShowAction.ts +18 -0
- package/app/Actions/Commerce/Shipping/DeliveryRouteStoreAction.ts +16 -0
- package/app/Actions/Commerce/Shipping/DeliveryRouteUpdateAction.ts +18 -0
- package/app/Actions/Commerce/Shipping/DigitalDeliveryDestroyAction.ts +18 -0
- package/app/Actions/Commerce/Shipping/DigitalDeliveryIndexAction.ts +16 -0
- package/app/Actions/Commerce/Shipping/DigitalDeliveryShowAction.ts +18 -0
- package/app/Actions/Commerce/Shipping/DigitalDeliveryStoreAction.ts +18 -0
- package/app/Actions/Commerce/Shipping/DigitalDeliveryUpdateAction.ts +18 -0
- package/app/Actions/Commerce/Shipping/DriverIndexAction.ts +16 -0
- package/app/Actions/Commerce/Shipping/DriverShowAction.ts +18 -0
- package/app/Actions/Commerce/Shipping/DriverStoreAction.ts +16 -0
- package/app/Actions/Commerce/Shipping/DriverUpdateAction.ts +18 -0
- package/app/Actions/Commerce/Shipping/LicenseKeyDestroyAction.ts +20 -0
- package/app/Actions/Commerce/Shipping/LicenseKeyIndexAction.ts +16 -0
- package/app/Actions/Commerce/Shipping/LicenseKeyShowAction.ts +18 -0
- package/app/Actions/Commerce/Shipping/LicenseKeyStoreAction.ts +18 -0
- package/app/Actions/Commerce/Shipping/LicenseKeyUpdateAction.ts +18 -0
- package/app/Actions/Commerce/Shipping/ShippingMethodDestroyAction.ts +16 -0
- package/app/Actions/Commerce/Shipping/ShippingMethodIndexAction.ts +14 -0
- package/app/Actions/Commerce/Shipping/ShippingMethodShowAction.ts +16 -0
- package/app/Actions/Commerce/Shipping/ShippingMethodStoreAction.ts +16 -0
- package/app/Actions/Commerce/Shipping/ShippingMethodUpdateAction.ts +15 -0
- package/app/Actions/Commerce/Shipping/ShippingRateDestroyAction.ts +16 -0
- package/app/Actions/Commerce/Shipping/ShippingRateIndexAction.ts +14 -0
- package/app/Actions/Commerce/Shipping/ShippingRateShowAction.ts +16 -0
- package/app/Actions/Commerce/Shipping/ShippingRateStoreAction.ts +16 -0
- package/app/Actions/Commerce/Shipping/ShippingRateUpdateAction.ts +17 -0
- package/app/Actions/Commerce/Shipping/ShippingZoneDestroyAction.ts +16 -0
- package/app/Actions/Commerce/Shipping/ShippingZoneIndexAction.ts +14 -0
- package/app/Actions/Commerce/Shipping/ShippingZoneShowAction.ts +16 -0
- package/app/Actions/Commerce/Shipping/ShippingZoneStoreAction.ts +16 -0
- package/app/Actions/Commerce/Shipping/ShippingZoneUpdateAction.ts +15 -0
- package/app/Actions/Commerce/TaxRateDestroyAction.ts +16 -0
- package/app/Actions/Commerce/TaxRateIndexAction.ts +14 -0
- package/app/Actions/Commerce/TaxRateShowAction.ts +17 -0
- package/app/Actions/Commerce/TaxRateStoreAction.ts +24 -0
- package/app/Actions/Commerce/TaxRateUpdateAction.ts +24 -0
- package/app/Actions/Commerce/WaitlistProductAnalyticsAction.ts +29 -0
- package/app/Actions/Commerce/WaitlistProductDestroyAction.ts +16 -0
- package/app/Actions/Commerce/WaitlistProductIndexAction.ts +14 -0
- package/app/Actions/Commerce/WaitlistProductQuantityDistributionAction.ts +32 -0
- package/app/Actions/Commerce/WaitlistProductShowAction.ts +16 -0
- package/app/Actions/Commerce/WaitlistProductStatusAction.ts +37 -0
- package/app/Actions/Commerce/WaitlistProductStoreAction.ts +27 -0
- package/app/Actions/Commerce/WaitlistProductTimeSeriesAction.ts +25 -0
- package/app/Actions/Commerce/WaitlistProductUpdateAction.ts +29 -0
- package/app/Actions/Commerce/WaitlistRestaurantDashboardAction.ts +29 -0
- package/app/Actions/Commerce/WaitlistRestaurantDestroyAction.ts +16 -0
- package/app/Actions/Commerce/WaitlistRestaurantIndexAction.ts +14 -0
- package/app/Actions/Commerce/WaitlistRestaurantShowAction.ts +16 -0
- package/app/Actions/Commerce/WaitlistRestaurantStoreAction.ts +31 -0
- package/app/Actions/Commerce/WaitlistRestaurantUpdateAction.ts +33 -0
- package/app/Actions/ContactAction.ts +72 -0
- package/app/Actions/Dashboard/Actions/CreateAction.ts +11 -0
- package/app/Actions/Dashboard/Actions/GetActionCount.ts +12 -0
- package/app/Actions/Dashboard/Actions/GetActions.ts +19 -0
- package/app/Actions/Dashboard/Analytics/BlogAnalyticsAction.ts +58 -0
- package/app/Actions/Dashboard/Analytics/BrowserAnalyticsAction.ts +42 -0
- package/app/Actions/Dashboard/Analytics/CommerceAnalyticsAction.ts +64 -0
- package/app/Actions/Dashboard/Analytics/CountryAnalyticsAction.ts +41 -0
- package/app/Actions/Dashboard/Analytics/DeviceAnalyticsAction.ts +58 -0
- package/app/Actions/Dashboard/Analytics/EventAnalyticsAction.ts +90 -0
- package/app/Actions/Dashboard/Analytics/MarketingAnalyticsAction.ts +76 -0
- package/app/Actions/Dashboard/Analytics/PageAnalyticsAction.ts +45 -0
- package/app/Actions/Dashboard/Analytics/ReferrerAnalyticsAction.ts +72 -0
- package/app/Actions/Dashboard/Analytics/SalesAnalyticsAction.ts +73 -0
- package/app/Actions/Dashboard/Analytics/WebAnalyticsAction.ts +114 -0
- package/app/Actions/Dashboard/Auth/MeAction.ts +84 -0
- package/app/Actions/Dashboard/BuddyDashboardAction.ts +34 -0
- package/app/Actions/Dashboard/Ci/RepoRunJobsAction.ts +60 -0
- package/app/Actions/Dashboard/Ci/RepoRunsAction.ts +67 -0
- package/app/Actions/Dashboard/Ci/RunnerHistoryAction.ts +58 -0
- package/app/Actions/Dashboard/Ci/StatusAction.ts +73 -0
- package/app/Actions/Dashboard/Ci/failure-notifier.ts +214 -0
- package/app/Actions/Dashboard/Ci/runner-pressure-monitor.ts +259 -0
- package/app/Actions/Dashboard/Cloud/CloudIndexAction.ts +61 -0
- package/app/Actions/Dashboard/Commands/CreateCommand.ts +11 -0
- package/app/Actions/Dashboard/Commands/GetAverageCommandTime.ts +12 -0
- package/app/Actions/Dashboard/Commands/GetCommandCount.ts +12 -0
- package/app/Actions/Dashboard/Commands/GetCommandSuccessRate.ts +12 -0
- package/app/Actions/Dashboard/Commands/GetCommands.ts +12 -0
- package/app/Actions/Dashboard/Commerce/CommerceCouponsAction.ts +48 -0
- package/app/Actions/Dashboard/Commerce/CommerceCustomersAction.ts +48 -0
- package/app/Actions/Dashboard/Commerce/CommerceDashboardAction.ts +98 -0
- package/app/Actions/Dashboard/Commerce/CommerceDeliveryAction.ts +65 -0
- package/app/Actions/Dashboard/Commerce/CommerceGiftCardsAction.ts +48 -0
- package/app/Actions/Dashboard/Commerce/CommerceOrdersAction.ts +51 -0
- package/app/Actions/Dashboard/Commerce/CommercePaymentsAction.ts +59 -0
- package/app/Actions/Dashboard/Commerce/CommerceProductsAction.ts +50 -0
- package/app/Actions/Dashboard/Commerce/CommerceTaxesAction.ts +46 -0
- package/app/Actions/Dashboard/Commerce/PosIndexAction.ts +57 -0
- package/app/Actions/Dashboard/Commerce/ReviewIndexAction.ts +51 -0
- package/app/Actions/Dashboard/Content/AuthorIndexAction.ts +51 -0
- package/app/Actions/Dashboard/Content/CategoryIndexAction.ts +27 -0
- package/app/Actions/Dashboard/Content/CommentIndexAction.ts +41 -0
- package/app/Actions/Dashboard/Content/ContentDashboardAction.ts +54 -0
- package/app/Actions/Dashboard/Content/FileIndexAction.ts +24 -0
- package/app/Actions/Dashboard/Content/PageIndexAction.ts +25 -0
- package/app/Actions/Dashboard/Content/PostIndexAction.ts +102 -0
- package/app/Actions/Dashboard/Content/SeoIndexAction.ts +17 -0
- package/app/Actions/Dashboard/Content/TagIndexAction.ts +23 -0
- package/app/Actions/Dashboard/CreateDnsRecords.ts +11 -0
- package/app/Actions/Dashboard/CreateMailbox.ts +11 -0
- package/app/Actions/Dashboard/DashboardActivityAction.ts +58 -0
- package/app/Actions/Dashboard/DashboardHealthAction.ts +52 -0
- package/app/Actions/Dashboard/DashboardHomeAction.ts +83 -0
- package/app/Actions/Dashboard/DashboardStatsAction.ts +48 -0
- package/app/Actions/Dashboard/Data/AccessTokenIndexAction.ts +65 -0
- package/app/Actions/Dashboard/Data/ActivityIndexAction.ts +28 -0
- package/app/Actions/Dashboard/Data/DataDashboardAction.ts +67 -0
- package/app/Actions/Dashboard/Data/SubscriberIndexAction.ts +48 -0
- package/app/Actions/Dashboard/Data/TeamIndexAction.ts +43 -0
- package/app/Actions/Dashboard/Data/UserIndexAction.ts +48 -0
- package/app/Actions/Dashboard/Deployments/CreateDeployment.ts +11 -0
- package/app/Actions/Dashboard/Deployments/GetAverageDeploymentTime.ts +15 -0
- package/app/Actions/Dashboard/Deployments/GetDeployScript.ts +12 -0
- package/app/Actions/Dashboard/Deployments/GetDeploymentCount.ts +12 -0
- package/app/Actions/Dashboard/Deployments/GetDeploymentLiveTerminalOutput.ts +12 -0
- package/app/Actions/Dashboard/Deployments/GetDeployments.ts +20 -0
- package/app/Actions/Dashboard/Deployments/GetRecentDeployments.ts +12 -0
- package/app/Actions/Dashboard/Deployments/UpdateDeployScript.ts +11 -0
- package/app/Actions/Dashboard/GetDnsRecords.ts +12 -0
- package/app/Actions/Dashboard/GetEmailInboxes.ts +12 -0
- package/app/Actions/Dashboard/GetProjects.ts +13 -0
- package/app/Actions/Dashboard/GetRecentCommits.ts +13 -0
- package/app/Actions/Dashboard/Inbox/InboxIndexAction.ts +144 -0
- package/app/Actions/Dashboard/Inbox/InboxShowAction.ts +89 -0
- package/app/Actions/Dashboard/Infrastructure/CommandIndexAction.ts +18 -0
- package/app/Actions/Dashboard/Infrastructure/DnsIndexAction.ts +101 -0
- package/app/Actions/Dashboard/Infrastructure/EnvironmentIndexAction.ts +67 -0
- package/app/Actions/Dashboard/Infrastructure/InsightsAction.ts +29 -0
- package/app/Actions/Dashboard/Infrastructure/LogIndexAction.ts +50 -0
- package/app/Actions/Dashboard/Infrastructure/MailboxIndexAction.ts +85 -0
- package/app/Actions/Dashboard/Infrastructure/PermissionIndexAction.ts +54 -0
- package/app/Actions/Dashboard/Infrastructure/RequestIndexAction.ts +44 -0
- package/app/Actions/Dashboard/Infrastructure/ServerIndexAction.ts +101 -0
- package/app/Actions/Dashboard/Jobs/CreateJob.ts +11 -0
- package/app/Actions/Dashboard/Jobs/GetAverageJobTime.ts +12 -0
- package/app/Actions/Dashboard/Jobs/GetJobHistory.ts +12 -0
- package/app/Actions/Dashboard/Jobs/GetJobs.ts +11 -0
- package/app/Actions/Dashboard/Jobs/GetJobsPerMinute.ts +12 -0
- package/app/Actions/Dashboard/Jobs/JobIndexAction.ts +136 -0
- package/app/Actions/Dashboard/Jobs/JobRetryAction.ts +23 -0
- package/app/Actions/Dashboard/Jobs/JobStatsAction.ts +49 -0
- package/app/Actions/Dashboard/Kanban/BoardDestroyAction.ts +84 -0
- package/app/Actions/Dashboard/Kanban/BoardShowAction.ts +215 -0
- package/app/Actions/Dashboard/Kanban/BoardStoreAction.ts +98 -0
- package/app/Actions/Dashboard/Kanban/BoardUpdateAction.ts +96 -0
- package/app/Actions/Dashboard/Kanban/BoardsIndexAction.ts +81 -0
- package/app/Actions/Dashboard/Kanban/BoardsReorderAction.ts +80 -0
- package/app/Actions/Dashboard/Kanban/CardAssigneesSyncAction.ts +103 -0
- package/app/Actions/Dashboard/Kanban/CardCommentDestroyAction.ts +33 -0
- package/app/Actions/Dashboard/Kanban/CardCommentStoreAction.ts +82 -0
- package/app/Actions/Dashboard/Kanban/CardDestroyAction.ts +48 -0
- package/app/Actions/Dashboard/Kanban/CardLabelsSyncAction.ts +103 -0
- package/app/Actions/Dashboard/Kanban/CardShowAction.ts +122 -0
- package/app/Actions/Dashboard/Kanban/CardStoreAction.ts +112 -0
- package/app/Actions/Dashboard/Kanban/CardUpdateAction.ts +91 -0
- package/app/Actions/Dashboard/Kanban/CardsReorderAction.ts +148 -0
- package/app/Actions/Dashboard/Kanban/ColumnDestroyAction.ts +59 -0
- package/app/Actions/Dashboard/Kanban/ColumnStoreAction.ts +94 -0
- package/app/Actions/Dashboard/Kanban/ColumnUpdateAction.ts +89 -0
- package/app/Actions/Dashboard/Kanban/ColumnsReorderAction.ts +85 -0
- package/app/Actions/Dashboard/Kanban/LabelDestroyAction.ts +41 -0
- package/app/Actions/Dashboard/Kanban/LabelStoreAction.ts +70 -0
- package/app/Actions/Dashboard/Kanban/LabelUpdateAction.ts +83 -0
- package/app/Actions/Dashboard/Kanban/UsersListAction.ts +36 -0
- package/app/Actions/Dashboard/Library/CreateComponent.ts +11 -0
- package/app/Actions/Dashboard/Library/CreateFunction.ts +11 -0
- package/app/Actions/Dashboard/Library/DependencyIndexAction.ts +92 -0
- package/app/Actions/Dashboard/Library/GetAverageReleaseTime.ts +12 -0
- package/app/Actions/Dashboard/Library/GetComponents.ts +24 -0
- package/app/Actions/Dashboard/Library/GetComponentsDownloadCount.ts +12 -0
- package/app/Actions/Dashboard/Library/GetDownloadCount.ts +12 -0
- package/app/Actions/Dashboard/Library/GetFunctions.ts +22 -0
- package/app/Actions/Dashboard/Library/GetFunctionsDownloadCount.ts +12 -0
- package/app/Actions/Dashboard/Library/GetReleaseCount.ts +12 -0
- package/app/Actions/Dashboard/Library/GetReleases.ts +28 -0
- package/app/Actions/Dashboard/Library/PackageIndexAction.ts +26 -0
- package/app/Actions/Dashboard/Marketing/CampaignIndexAction.ts +45 -0
- package/app/Actions/Dashboard/Marketing/ListIndexAction.ts +43 -0
- package/app/Actions/Dashboard/Marketing/SocialPostIndexAction.ts +47 -0
- package/app/Actions/Dashboard/Models/GetModels.ts +39 -0
- package/app/Actions/Dashboard/Models/GetSubscriberCount.ts +12 -0
- package/app/Actions/Dashboard/Models/GetUserCount.ts +12 -0
- package/app/Actions/Dashboard/Models/ModelShowAction.ts +131 -0
- package/app/Actions/Dashboard/Models/ModelsIndexAction.ts +169 -0
- package/app/Actions/Dashboard/Notifications/CreateNotification.ts +11 -0
- package/app/Actions/Dashboard/Notifications/GetAverageNotificationTime.ts +12 -0
- package/app/Actions/Dashboard/Notifications/GetNotificationCount.ts +12 -0
- package/app/Actions/Dashboard/Notifications/GetNotificationDeliveryRate.ts +12 -0
- package/app/Actions/Dashboard/Notifications/GetNotificationHistory.ts +12 -0
- package/app/Actions/Dashboard/Notifications/GetNotifications.ts +12 -0
- package/app/Actions/Dashboard/Notifications/NotificationDashboardAction.ts +43 -0
- package/app/Actions/Dashboard/Queries/QueryIndexAction.ts +22 -0
- package/app/Actions/Dashboard/Queue/QueueRetryFailedAction.ts +22 -0
- package/app/Actions/Dashboard/Queue/QueueStatsAction.ts +98 -0
- package/app/Actions/Dashboard/Queue/QueueWorkersAction.ts +46 -0
- package/app/Actions/Dashboard/Rbac/PermissionDestroyAction.ts +33 -0
- package/app/Actions/Dashboard/Rbac/PermissionStoreAction.ts +53 -0
- package/app/Actions/Dashboard/Rbac/PermissionsIndexAction.ts +34 -0
- package/app/Actions/Dashboard/Rbac/RoleDestroyAction.ts +35 -0
- package/app/Actions/Dashboard/Rbac/RolePermissionsShowAction.ts +45 -0
- package/app/Actions/Dashboard/Rbac/RolePermissionsSyncAction.ts +63 -0
- package/app/Actions/Dashboard/Rbac/RoleStoreAction.ts +58 -0
- package/app/Actions/Dashboard/Rbac/RolesIndexAction.ts +36 -0
- package/app/Actions/Dashboard/Rbac/UserRolesShowAction.ts +40 -0
- package/app/Actions/Dashboard/Rbac/UserRolesSyncAction.ts +65 -0
- package/app/Actions/Dashboard/Rbac/UsersListAction.ts +39 -0
- package/app/Actions/Dashboard/Realtime/RealtimeStatsAction.ts +50 -0
- package/app/Actions/Dashboard/Releases/ReleaseIndexAction.ts +21 -0
- package/app/Actions/Dashboard/Requests/GetAverageRequestTime.ts +12 -0
- package/app/Actions/Dashboard/Requests/GetRequestCount.ts +12 -0
- package/app/Actions/Dashboard/Requests/GetRequestSuccessRate.ts +12 -0
- package/app/Actions/Dashboard/Requests/GetRequests.ts +12 -0
- package/app/Actions/Dashboard/Search/GlobalSearchAction.ts +26 -0
- package/app/Actions/Dashboard/ServiceHealthAction.ts +243 -0
- package/app/Actions/Dashboard/Settings/MailSettingsGetAction.ts +20 -0
- package/app/Actions/Dashboard/Settings/MailSettingsUpdateAction.ts +10 -0
- package/app/Actions/Dashboard/Settings/SettingsIndexAction.ts +40 -0
- package/app/Actions/Dashboard/Settings/UpdateAiConfig.ts +27 -0
- package/app/Actions/Dashboard/Settings/UpdateAnalyticsConfig.ts +38 -0
- package/app/Actions/Dashboard/Settings/UpdateAppConfig.ts +38 -0
- package/app/Actions/Dashboard/Settings/UpdateCacheConfig.ts +11 -0
- package/app/Actions/Dashboard/Settings/UpdateCliConfig.ts +11 -0
- package/app/Actions/Dashboard/Settings/UpdateCloudConfig.ts +38 -0
- package/app/Actions/Dashboard/Settings/UpdateDatabaseConfig.ts +38 -0
- package/app/Actions/Dashboard/Settings/UpdateDnsConfig.ts +38 -0
- package/app/Actions/Dashboard/Settings/UpdateDocsConfig.ts +11 -0
- package/app/Actions/Dashboard/Settings/UpdateEmailConfig.ts +38 -0
- package/app/Actions/Dashboard/Settings/UpdateEnvConfig.ts +11 -0
- package/app/Actions/Dashboard/Settings/UpdateErrorsConfig.ts +11 -0
- package/app/Actions/Dashboard/Settings/UpdateFileSystemsConfig.ts +11 -0
- package/app/Actions/Dashboard/Settings/UpdateGitConfig.ts +11 -0
- package/app/Actions/Dashboard/Settings/UpdateHashingConfig.ts +11 -0
- package/app/Actions/Dashboard/Settings/UpdateLibraryConfig.ts +11 -0
- package/app/Actions/Dashboard/Settings/UpdateLoggerConfig.ts +11 -0
- package/app/Actions/Dashboard/Settings/UpdateNotificationConfig.ts +11 -0
- package/app/Actions/Dashboard/Settings/UpdatePaymentConfig.ts +11 -0
- package/app/Actions/Dashboard/Settings/UpdatePortsConfig.ts +38 -0
- package/app/Actions/Dashboard/Settings/UpdateQueueConfig.ts +11 -0
- package/app/Actions/Dashboard/Settings/UpdateSearchEngineConfig.ts +11 -0
- package/app/Actions/Dashboard/Settings/UpdateSecurityConfig.ts +38 -0
- package/app/Actions/Dashboard/Settings/UpdateServicesConfig.ts +38 -0
- package/app/Actions/Dashboard/Settings/UpdateStorageConfig.ts +11 -0
- package/app/Actions/Dashboard/Settings/UpdateTeamConfig.ts +11 -0
- package/app/Actions/Dashboard/Settings/UpdateUiConfig.ts +11 -0
- package/app/Actions/HealthAction.ts +112 -0
- package/app/Actions/InstallAction.ts +83 -0
- package/app/Actions/Locale/SetLocaleAction.ts +51 -0
- package/app/Actions/LogAction.ts +42 -0
- package/app/Actions/Logs/LogFetchStatsAction.ts +50 -0
- package/app/Actions/Logs/LogIndexOrmAction.ts +13 -0
- package/app/Actions/Logs/LogShowOrmAction.ts +17 -0
- package/app/Actions/Logs/LogStoreOrmAction.ts +16 -0
- package/app/Actions/Logs/LogUpdateOrmAction.ts +20 -0
- package/app/Actions/Monitoring/ErrorDestroyAction.ts +25 -0
- package/app/Actions/Monitoring/ErrorGroupAction.ts +21 -0
- package/app/Actions/Monitoring/ErrorIgnoreAction.ts +25 -0
- package/app/Actions/Monitoring/ErrorIndexAction.ts +14 -0
- package/app/Actions/Monitoring/ErrorResolveAction.ts +25 -0
- package/app/Actions/Monitoring/ErrorShowAction.ts +19 -0
- package/app/Actions/Monitoring/ErrorStatsAction.ts +14 -0
- package/app/Actions/Monitoring/ErrorTimelineAction.ts +14 -0
- package/app/Actions/Monitoring/ErrorUnresolveAction.ts +25 -0
- package/app/Actions/NotifyUser.ts +10 -0
- package/app/Actions/Password/PasswordResetAction.ts +54 -0
- package/app/Actions/Password/SendPasswordResetEmailAction.ts +66 -0
- package/app/Actions/Password/VerifyResetTokenAction.ts +27 -0
- package/app/Actions/Payment/CancelSubscriptionAction.ts +20 -0
- package/app/Actions/Payment/CreateCheckoutAction.ts +28 -0
- package/app/Actions/Payment/CreateInvoiceSubscription.ts +18 -0
- package/app/Actions/Payment/CreatePaymentIntentAction.ts +31 -0
- package/app/Actions/Payment/CreateSetupIntentAction.ts +20 -0
- package/app/Actions/Payment/CreateSubscriptionAction.ts +23 -0
- package/app/Actions/Payment/DeleteDefaultPaymentAction.ts +18 -0
- package/app/Actions/Payment/FetchActiveSubscriptionAction.ts +18 -0
- package/app/Actions/Payment/FetchDefaultPaymentMethodAction.ts +18 -0
- package/app/Actions/Payment/FetchPaymentCustomerAction.ts +18 -0
- package/app/Actions/Payment/FetchPaymentMethodsAction.ts +18 -0
- package/app/Actions/Payment/FetchProductAction.ts +15 -0
- package/app/Actions/Payment/FetchTransactionHistoryAction.ts +18 -0
- package/app/Actions/Payment/FetchUserSubscriptionsAction.ts +18 -0
- package/app/Actions/Payment/SetDefaultPaymentAction.ts +20 -0
- package/app/Actions/Payment/SetUserDefaultPaymentAction.ts +20 -0
- package/app/Actions/Payment/StorePaymentMethodAction.ts +20 -0
- package/app/Actions/Payment/StoreTransactionAction.ts +20 -0
- package/app/Actions/Payment/UpdateCustomerAction.ts +24 -0
- package/app/Actions/Payment/UpdateDefaultPaymentMethodAction.ts +18 -0
- package/app/Actions/Payment/UpdateSubscriptionAction.ts +22 -0
- package/app/Actions/Queue/FetchQueuesAction.ts +14 -0
- package/app/Actions/README.md +61 -0
- package/app/Actions/Realtime/FetchWebsocketsAction.ts +14 -0
- package/app/Actions/RobotsAction.ts +61 -0
- package/app/Actions/SendWelcomeEmail.ts +40 -0
- package/app/Actions/SitemapAction.ts +234 -0
- package/app/Actions/Storefront/AddToCartAction.ts +153 -0
- package/app/Actions/Storefront/CheckoutContactAction.ts +50 -0
- package/app/Actions/Storefront/CheckoutShippingAction.ts +61 -0
- package/app/Actions/Storefront/GetCartAction.ts +58 -0
- package/app/Actions/Storefront/PlaceOrderAction.ts +195 -0
- package/app/Actions/Storefront/SubmitReviewAction.ts +140 -0
- package/app/Actions/Storefront/UpdateCartItemAction.ts +83 -0
- package/app/Actions/Storefront/_shipping.ts +64 -0
- package/app/Actions/SubscriberEmailAction.ts +60 -0
- package/app/Actions/TestErrorAction.ts +163 -0
- package/app/Actions/UnsubscribeAction.ts +107 -0
- package/app/Actions/UploadTestAction.ts +57 -0
- package/app/Broadcasts/OrderShipped.ts +57 -0
- package/app/Commands/Inspire.ts +57 -0
- package/app/Commands/README.md +84 -0
- package/app/Commands.ts +38 -0
- package/app/Controllers/ComingSoonController.ts +9 -0
- package/app/Controllers/QueryController.ts +373 -0
- package/app/Events.ts +14 -0
- package/app/Gates.ts +107 -0
- package/app/Jobs/ExampleJob.ts +20 -0
- package/app/Jobs/ExampleTwoJob.ts +12 -0
- package/app/Jobs/PruneModelsJob.ts +61 -0
- package/app/Jobs/PruneQueryLogsJob.ts +51 -0
- package/app/Jobs/README.md +79 -0
- package/app/Jobs/SendCampaignJob.ts +201 -0
- package/app/Jobs/SendEmailJob.ts +52 -0
- package/app/Jobs/SendPasswordResetEmailJob.ts +44 -0
- package/app/Jobs/SyncSearchIndexJob.ts +64 -0
- package/app/Listener.ts +84 -0
- package/app/Listeners/Console.ts +22 -0
- package/app/Listeners/README.md +47 -0
- package/app/Mail/OrderConfirmation.ts +60 -0
- package/app/Mail/SubscriptionConfirmation.ts +41 -0
- package/app/Middleware/Abilities.ts +53 -0
- package/app/Middleware/Api.ts +26 -0
- package/app/Middleware/Auth.ts +59 -0
- package/app/Middleware/Can.ts +68 -0
- package/app/Middleware/Compress.ts +213 -0
- package/app/Middleware/Cors.ts +320 -0
- package/app/Middleware/Csrf.ts +224 -0
- package/app/Middleware/EnsureEmailIsVerified.ts +28 -0
- package/app/Middleware/Env.ts +24 -0
- package/app/Middleware/EnvDevelopment.ts +19 -0
- package/app/Middleware/EnvLocal.ts +19 -0
- package/app/Middleware/EnvNotDevelopment.ts +19 -0
- package/app/Middleware/EnvNotLocal.ts +19 -0
- package/app/Middleware/EnvNotProduction.ts +19 -0
- package/app/Middleware/EnvNotStaging.ts +19 -0
- package/app/Middleware/EnvProduction.ts +19 -0
- package/app/Middleware/EnvStaging.ts +19 -0
- package/app/Middleware/Guest.ts +25 -0
- package/app/Middleware/Logger.ts +20 -0
- package/app/Middleware/Maintenance.ts +36 -0
- package/app/Middleware/Permission.ts +42 -0
- package/app/Middleware/README.md +48 -0
- package/app/Middleware/Role.ts +42 -0
- package/app/Middleware/Signed.ts +31 -0
- package/app/Middleware/Team.ts +36 -0
- package/app/Middleware/Throttle.ts +96 -0
- package/app/Middleware.ts +35 -0
- package/app/Models/Activity.ts +94 -0
- package/app/Models/Board.ts +103 -0
- package/app/Models/BoardColumn.ts +87 -0
- package/app/Models/Campaign.ts +239 -0
- package/app/Models/CampaignSend.ts +107 -0
- package/app/Models/Card.ts +117 -0
- package/app/Models/CardComment.ts +68 -0
- package/app/Models/Comment.ts +108 -0
- package/app/Models/Content/Author.ts +104 -0
- package/app/Models/Content/Page.ts +99 -0
- package/app/Models/Content/Post.ts +144 -0
- package/app/Models/Deployment.ts +116 -0
- package/app/Models/EmailList.ts +126 -0
- package/app/Models/EmailListSubscriber.ts +91 -0
- package/app/Models/Error.ts +70 -0
- package/app/Models/FailedJob.ts +62 -0
- package/app/Models/Job.ts +63 -0
- package/app/Models/Label.ts +66 -0
- package/app/Models/Log.ts +110 -0
- package/app/Models/Notification.ts +118 -0
- package/app/Models/PaymentMethod.ts +98 -0
- package/app/Models/PaymentProduct.ts +91 -0
- package/app/Models/PaymentTransaction.ts +78 -0
- package/app/Models/README.md +31 -0
- package/app/Models/Release.ts +89 -0
- package/app/Models/Request.ts +114 -0
- package/app/Models/SocialPost.ts +136 -0
- package/app/Models/Subscriber.ts +89 -0
- package/app/Models/SubscriberEmail.ts +55 -0
- package/app/Models/Subscription.ts +153 -0
- package/app/Models/Tag.ts +82 -0
- package/app/Models/Team.ts +72 -0
- package/app/Models/User.ts +134 -0
- package/app/Models/commerce/Cart.ts +139 -0
- package/app/Models/commerce/CartItem.ts +137 -0
- package/app/Models/commerce/Category.ts +105 -0
- package/app/Models/commerce/Coupon.ts +181 -0
- package/app/Models/commerce/Customer.ts +132 -0
- package/app/Models/commerce/DeliveryRoute.ts +93 -0
- package/app/Models/commerce/DigitalDelivery.ts +105 -0
- package/app/Models/commerce/Driver.ts +97 -0
- package/app/Models/commerce/GiftCard.ts +191 -0
- package/app/Models/commerce/LicenseKey.ts +87 -0
- package/app/Models/commerce/LoyaltyPoint.ts +107 -0
- package/app/Models/commerce/LoyaltyReward.ts +124 -0
- package/app/Models/commerce/Manufacturer.ts +84 -0
- package/app/Models/commerce/Order.ts +142 -0
- package/app/Models/commerce/OrderItem.ts +51 -0
- package/app/Models/commerce/Payment.ts +163 -0
- package/app/Models/commerce/PrintDevice.ts +117 -0
- package/app/Models/commerce/Product.ts +148 -0
- package/app/Models/commerce/ProductUnit.ts +107 -0
- package/app/Models/commerce/ProductVariant.ts +106 -0
- package/app/Models/commerce/Receipt.ts +128 -0
- package/app/Models/commerce/Review.ts +140 -0
- package/app/Models/commerce/ShippingMethod.ts +97 -0
- package/app/Models/commerce/ShippingRate.ts +74 -0
- package/app/Models/commerce/ShippingZone.ts +111 -0
- package/app/Models/commerce/TaxRate.ts +114 -0
- package/app/Models/commerce/Transaction.ts +126 -0
- package/app/Models/commerce/WaitlistProduct.ts +149 -0
- package/app/Models/commerce/WaitlistRestaurant.ts +187 -0
- package/app/Models/realtime/Websocket.ts +77 -0
- package/app/Notifications/README.md +31 -0
- package/app/Notifications/Welcome.ts +32 -0
- package/app/Policies/PostPolicy.ts +131 -0
- package/app/README.md +23 -0
- package/app/Routes.ts +47 -0
- package/app/Scheduler.ts +28 -0
- package/app/Storefront/CartCookie.ts +109 -0
- package/package.json +3 -2
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync } from 'node:fs'
|
|
2
|
+
import { Action } from '@stacksjs/actions'
|
|
3
|
+
import { projectPath } from '@stacksjs/path'
|
|
4
|
+
|
|
5
|
+
export default new Action({
|
|
6
|
+
name: 'UpdatePortsConfig',
|
|
7
|
+
description: 'Updates the ports configuration.',
|
|
8
|
+
method: 'POST',
|
|
9
|
+
apiResponse: true,
|
|
10
|
+
|
|
11
|
+
async handle(request) {
|
|
12
|
+
try {
|
|
13
|
+
const updates = request.all()
|
|
14
|
+
const filePath = projectPath('config/ports.ts')
|
|
15
|
+
let content = readFileSync(filePath, 'utf-8')
|
|
16
|
+
|
|
17
|
+
for (const [key, value] of Object.entries(updates)) {
|
|
18
|
+
const escapedKey = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
|
19
|
+
const pattern = new RegExp(
|
|
20
|
+
`(${escapedKey}\\s*:\\s*)(?:'[^']*'|"[^"]*"|\\d+(?:\\.\\d+)?|true|false)`,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
if (pattern.test(content)) {
|
|
24
|
+
const isNum = /^\d+(?:\.\d+)?$/.test(String(value))
|
|
25
|
+
const isBool = value === true || value === false || value === 'true' || value === 'false'
|
|
26
|
+
const replacement = isNum || isBool ? String(value) : `'${String(value).replace(/'/g, "\\'")}'`
|
|
27
|
+
content = content.replace(pattern, `$1${replacement}`)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
writeFileSync(filePath, content, 'utf-8')
|
|
32
|
+
return { success: true, message: 'Ports configuration updated.' }
|
|
33
|
+
}
|
|
34
|
+
catch (e: any) {
|
|
35
|
+
return { success: false, error: e.message }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
})
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync } from 'node:fs'
|
|
2
|
+
import { Action } from '@stacksjs/actions'
|
|
3
|
+
import { projectPath } from '@stacksjs/path'
|
|
4
|
+
|
|
5
|
+
export default new Action({
|
|
6
|
+
name: 'UpdateSecurityConfig',
|
|
7
|
+
description: 'Updates the security configuration.',
|
|
8
|
+
method: 'POST',
|
|
9
|
+
apiResponse: true,
|
|
10
|
+
|
|
11
|
+
async handle(request) {
|
|
12
|
+
try {
|
|
13
|
+
const updates = request.all()
|
|
14
|
+
const filePath = projectPath('config/security.ts')
|
|
15
|
+
let content = readFileSync(filePath, 'utf-8')
|
|
16
|
+
|
|
17
|
+
for (const [key, value] of Object.entries(updates)) {
|
|
18
|
+
const escapedKey = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
|
19
|
+
const pattern = new RegExp(
|
|
20
|
+
`(${escapedKey}\\s*:\\s*)(?:'[^']*'|"[^"]*"|\\d+(?:\\.\\d+)?|true|false)`,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
if (pattern.test(content)) {
|
|
24
|
+
const isNum = /^\d+(?:\.\d+)?$/.test(String(value))
|
|
25
|
+
const isBool = value === true || value === false || value === 'true' || value === 'false'
|
|
26
|
+
const replacement = isNum || isBool ? String(value) : `'${String(value).replace(/'/g, "\\'")}'`
|
|
27
|
+
content = content.replace(pattern, `$1${replacement}`)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
writeFileSync(filePath, content, 'utf-8')
|
|
32
|
+
return { success: true, message: 'Security configuration updated.' }
|
|
33
|
+
}
|
|
34
|
+
catch (e: any) {
|
|
35
|
+
return { success: false, error: e.message }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
})
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync } from 'node:fs'
|
|
2
|
+
import { Action } from '@stacksjs/actions'
|
|
3
|
+
import { projectPath } from '@stacksjs/path'
|
|
4
|
+
|
|
5
|
+
export default new Action({
|
|
6
|
+
name: 'UpdateServicesConfig',
|
|
7
|
+
description: 'Updates the services configuration.',
|
|
8
|
+
method: 'POST',
|
|
9
|
+
apiResponse: true,
|
|
10
|
+
|
|
11
|
+
async handle(request) {
|
|
12
|
+
try {
|
|
13
|
+
const updates = request.all()
|
|
14
|
+
const filePath = projectPath('config/services.ts')
|
|
15
|
+
let content = readFileSync(filePath, 'utf-8')
|
|
16
|
+
|
|
17
|
+
for (const [key, value] of Object.entries(updates)) {
|
|
18
|
+
const escapedKey = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
|
19
|
+
const pattern = new RegExp(
|
|
20
|
+
`(${escapedKey}\\s*:\\s*)(?:'[^']*'|"[^"]*"|\\d+(?:\\.\\d+)?|true|false)`,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
if (pattern.test(content)) {
|
|
24
|
+
const isNum = /^\d+(?:\.\d+)?$/.test(String(value))
|
|
25
|
+
const isBool = value === true || value === false || value === 'true' || value === 'false'
|
|
26
|
+
const replacement = isNum || isBool ? String(value) : `'${String(value).replace(/'/g, "\\'")}'`
|
|
27
|
+
content = content.replace(pattern, `$1${replacement}`)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
writeFileSync(filePath, content, 'utf-8')
|
|
32
|
+
return { success: true, message: 'Services configuration updated.' }
|
|
33
|
+
}
|
|
34
|
+
catch (e: any) {
|
|
35
|
+
return { success: false, error: e.message }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
})
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// Health check action with detailed service status
|
|
2
|
+
// This overrides the default framework health check
|
|
3
|
+
|
|
4
|
+
import { route } from '@stacksjs/router'
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
name: 'Health',
|
|
8
|
+
description: 'Health check for ECS and dashboard',
|
|
9
|
+
path: '/health',
|
|
10
|
+
|
|
11
|
+
async handle() {
|
|
12
|
+
const services = await getServiceHealth()
|
|
13
|
+
return {
|
|
14
|
+
status: 'ok',
|
|
15
|
+
timestamp: Date.now(),
|
|
16
|
+
services,
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async function getServiceHealth() {
|
|
22
|
+
const services = []
|
|
23
|
+
|
|
24
|
+
// API Health
|
|
25
|
+
const apiStart = Date.now()
|
|
26
|
+
services.push({
|
|
27
|
+
name: 'API',
|
|
28
|
+
status: 'healthy',
|
|
29
|
+
latency: `${Date.now() - apiStart}ms`,
|
|
30
|
+
uptime: '99.9%',
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
// Database Health
|
|
34
|
+
const dbStart = Date.now()
|
|
35
|
+
try {
|
|
36
|
+
const { db } = await import('@stacksjs/database')
|
|
37
|
+
await db.selectFrom('users').select('id').limit(1).execute()
|
|
38
|
+
const dbLatency = Date.now() - dbStart
|
|
39
|
+
services.push({
|
|
40
|
+
name: 'Database',
|
|
41
|
+
status: dbLatency < 50 ? 'healthy' : dbLatency < 200 ? 'degraded' : 'critical',
|
|
42
|
+
latency: `${dbLatency}ms`,
|
|
43
|
+
uptime: '99.9%',
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
services.push({
|
|
48
|
+
name: 'Database',
|
|
49
|
+
status: 'critical',
|
|
50
|
+
latency: '-',
|
|
51
|
+
uptime: '-',
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Storage Health
|
|
56
|
+
services.push({
|
|
57
|
+
name: 'Storage',
|
|
58
|
+
status: 'healthy',
|
|
59
|
+
latency: '5ms',
|
|
60
|
+
uptime: '99.9%',
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
// Cache Health
|
|
64
|
+
services.push({
|
|
65
|
+
name: 'Cache',
|
|
66
|
+
status: 'healthy',
|
|
67
|
+
latency: '2ms',
|
|
68
|
+
uptime: '99.9%',
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
// Queue Health
|
|
72
|
+
try {
|
|
73
|
+
const { Job } = await import('@stacksjs/orm')
|
|
74
|
+
const queueStart = Date.now()
|
|
75
|
+
const pendingJobs = await Job.where('status', 'pending').count()
|
|
76
|
+
const queueLatency = Date.now() - queueStart
|
|
77
|
+
services.push({
|
|
78
|
+
name: 'Queue',
|
|
79
|
+
status: pendingJobs < 100 ? 'healthy' : pendingJobs < 1000 ? 'degraded' : 'critical',
|
|
80
|
+
latency: `${queueLatency}ms`,
|
|
81
|
+
uptime: '99.9%',
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
services.push({
|
|
86
|
+
name: 'Queue',
|
|
87
|
+
status: 'healthy',
|
|
88
|
+
latency: '5ms',
|
|
89
|
+
uptime: '99.9%',
|
|
90
|
+
})
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Notifications
|
|
94
|
+
services.push({
|
|
95
|
+
name: 'Notifications',
|
|
96
|
+
status: 'healthy',
|
|
97
|
+
latency: '15ms',
|
|
98
|
+
uptime: '99.8%',
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
return services
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Also register as a route for redundancy
|
|
105
|
+
route.get('/health', async () => {
|
|
106
|
+
const services = await getServiceHealth()
|
|
107
|
+
return {
|
|
108
|
+
status: 'ok',
|
|
109
|
+
timestamp: Date.now(),
|
|
110
|
+
services,
|
|
111
|
+
}
|
|
112
|
+
})
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import process from 'node:process'
|
|
2
|
+
import { Action } from '@stacksjs/actions'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* CLI Setup
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export default new Action({
|
|
9
|
+
name: 'CLI Setup',
|
|
10
|
+
description: 'This action is used to setup the CLI.',
|
|
11
|
+
path: '/install',
|
|
12
|
+
|
|
13
|
+
handle(): string | Response {
|
|
14
|
+
// Production short-circuits to 404 so even an accidental or userland
|
|
15
|
+
// re-registration can't serve the framework's shell bootstrap script
|
|
16
|
+
// (free stack fingerprinting) in prod — same defense-in-depth layer as
|
|
17
|
+
// TestErrorAction's guard (#1955). Production-only (not the
|
|
18
|
+
// registration gate's local-env allowlist) so a deliberate
|
|
19
|
+
// re-registration in staging still works.
|
|
20
|
+
const env = (process.env.APP_ENV ?? process.env.NODE_ENV ?? '').toLowerCase()
|
|
21
|
+
if (env === 'production')
|
|
22
|
+
return new Response('Not Found', { status: 404 })
|
|
23
|
+
|
|
24
|
+
const setupScriptContents = `if [ -n "$1" ]; then
|
|
25
|
+
# Check if the directory exists
|
|
26
|
+
if [ -d "storage/framework/core" ]; then # this is our identifier whether it is a Stacks project
|
|
27
|
+
:
|
|
28
|
+
else
|
|
29
|
+
if [ -d "$1" ]; then
|
|
30
|
+
echo "Project $1 exists locally. Please use a different name & run again."
|
|
31
|
+
exit 1
|
|
32
|
+
else
|
|
33
|
+
git clone https://github.com/stacksjs/stacks.git $1
|
|
34
|
+
cd $1
|
|
35
|
+
# Run the pantry-install script
|
|
36
|
+
"./storage/framework/scripts/pantry-install"
|
|
37
|
+
|
|
38
|
+
echo "Project $1 has been created. Please open a new terminal, run 'bun run dev' to start the server."
|
|
39
|
+
|
|
40
|
+
exit 1
|
|
41
|
+
fi
|
|
42
|
+
fi
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
# Get the directory of the current script and go up 3 directories
|
|
46
|
+
PROJECT_ROOT="$(cd "$(dirname "$0")" && pwd)"
|
|
47
|
+
CLI_PATH="$PROJECT_ROOT/storage/framework/core/buddy/src/cli.ts"
|
|
48
|
+
SCRIPT_PATH="$PROJECT_ROOT/storage/framework/scripts/pantry-install"
|
|
49
|
+
LOG_PATH="$PROJECT_ROOT/storage/logs/console.log"
|
|
50
|
+
|
|
51
|
+
if [[ $* == *--verbose* ]]; then
|
|
52
|
+
echo "Project root: $PROJECT_ROOT"
|
|
53
|
+
echo "CLI path: $CLI_PATH"
|
|
54
|
+
echo "Script path: $SCRIPT_PATH"
|
|
55
|
+
echo "Log path: $LOG_PATH"
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
cd $PROJECT_ROOT
|
|
59
|
+
# Run the pantry-install script
|
|
60
|
+
if [[ $* == *--verbose* ]]; then
|
|
61
|
+
"$SCRIPT_PATH"
|
|
62
|
+
# bun ./storage/framework/core/buddy/src/cli.ts setup --verbose
|
|
63
|
+
else
|
|
64
|
+
"$SCRIPT_PATH" > /dev/null 2>&1
|
|
65
|
+
# bun ./storage/framework/core/buddy/src/cli.ts setup
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
# Create a named pipe
|
|
69
|
+
mkfifo /tmp/mypipe
|
|
70
|
+
|
|
71
|
+
# Run the command, send output to both the console and the pipe
|
|
72
|
+
bun $CLI_PATH setup | tee /tmp/mypipe &
|
|
73
|
+
|
|
74
|
+
# Read from the pipe, add timestamps, and append to the file
|
|
75
|
+
while IFS= read -r line; do echo "$(date '+[%Y-%m-%d %H:%M:%S]') $line"; done < /tmp/mypipe >> $LOG_PATH
|
|
76
|
+
|
|
77
|
+
# Remove the named pipe
|
|
78
|
+
rm /tmp/mypipe
|
|
79
|
+
`
|
|
80
|
+
|
|
81
|
+
return setupScriptContents
|
|
82
|
+
},
|
|
83
|
+
})
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { createLocaleSwitchResponse } from '@stacksjs/i18n'
|
|
2
|
+
import { existsSync } from 'node:fs'
|
|
3
|
+
import { projectPath } from '@stacksjs/path'
|
|
4
|
+
|
|
5
|
+
async function loadSiteI18n(): Promise<{ locales: string[], defaultLocale: string } | null> {
|
|
6
|
+
const sitePath = projectPath('site.config.ts')
|
|
7
|
+
if (!existsSync(sitePath))
|
|
8
|
+
return null
|
|
9
|
+
|
|
10
|
+
try {
|
|
11
|
+
const mod = await import(sitePath)
|
|
12
|
+
const site = mod.default ?? mod.config
|
|
13
|
+
const i18n = site?.i18n
|
|
14
|
+
if (!i18n?.locales?.length)
|
|
15
|
+
return null
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
locales: i18n.locales,
|
|
19
|
+
defaultLocale: i18n.defaultLocale ?? i18n.locales[0],
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return null
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default new Action({
|
|
28
|
+
name: 'SetLocaleAction',
|
|
29
|
+
description: 'Switch locale via cookie and STX-style path redirect',
|
|
30
|
+
method: 'GET',
|
|
31
|
+
|
|
32
|
+
async handle(request: RequestInstance) {
|
|
33
|
+
const fromSite = await loadSiteI18n()
|
|
34
|
+
if (fromSite) {
|
|
35
|
+
return createLocaleSwitchResponse(request as unknown as Request, String(request.param('locale') ?? ''), fromSite)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const { getAvailableLocales } = await import('@stacksjs/i18n')
|
|
39
|
+
const { config } = await import('@stacksjs/config')
|
|
40
|
+
const app = (config as { app?: { locale?: string } }).app
|
|
41
|
+
const locales = getAvailableLocales()
|
|
42
|
+
if (!locales.length) {
|
|
43
|
+
return response.redirect('/')
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return createLocaleSwitchResponse(request as unknown as Request, String(request.param('locale') ?? ''), {
|
|
47
|
+
locales,
|
|
48
|
+
defaultLocale: app?.locale ?? locales[0],
|
|
49
|
+
})
|
|
50
|
+
},
|
|
51
|
+
})
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Action } from '@stacksjs/actions'
|
|
2
|
+
import { log } from '@stacksjs/logging'
|
|
3
|
+
import { schema } from '@stacksjs/validation'
|
|
4
|
+
|
|
5
|
+
interface Request {
|
|
6
|
+
message: string
|
|
7
|
+
level: 'info' | 'warn' | 'error'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default new Action({
|
|
11
|
+
name: 'Dummy Logger',
|
|
12
|
+
description: 'This action is used to demo how to POST to a server and upon success, log a message.',
|
|
13
|
+
|
|
14
|
+
// the request object is optional, but if it is provided, it will be used for validation
|
|
15
|
+
validations: {
|
|
16
|
+
message: {
|
|
17
|
+
rule: schema.string().min(3).max(255),
|
|
18
|
+
message: 'The message must be between 3 and 255 characters long.',
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
level: {
|
|
22
|
+
// `schema.string().in([...])` was a renamed/removed method
|
|
23
|
+
// (stacksjs/stacks#1853) — the validator throws "schema.string().in
|
|
24
|
+
// is not a function" at module evaluation. Use `schema.enum([...])`
|
|
25
|
+
// — that's the working enum primitive used elsewhere in defaults
|
|
26
|
+
// (Settings/UpdateAiConfig.ts) and in the typical project's models.
|
|
27
|
+
rule: schema.enum(['info', 'warn', 'error']),
|
|
28
|
+
message: 'The log level must be one of "info", "warn", or "error".',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
// handle(request: { message: string, level: 'info' | 'warn' | 'error' }) {
|
|
33
|
+
handle(request?: Request) {
|
|
34
|
+
if (!request)
|
|
35
|
+
return 'No request was provided.'
|
|
36
|
+
|
|
37
|
+
// TODO: need to validate with ts-validation
|
|
38
|
+
log[request.level](request.message)
|
|
39
|
+
|
|
40
|
+
return `Logged "${request.message}" at "${request.level}" level`
|
|
41
|
+
},
|
|
42
|
+
})
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Action } from '@stacksjs/actions'
|
|
2
|
+
import { Log } from '@stacksjs/orm'
|
|
3
|
+
import { response } from '@stacksjs/router'
|
|
4
|
+
|
|
5
|
+
export default new Action({
|
|
6
|
+
name: 'Log Stats',
|
|
7
|
+
description: 'Log Stats ORM Action',
|
|
8
|
+
method: 'GET',
|
|
9
|
+
async handle() {
|
|
10
|
+
// Get current timestamp and 24 hours ago timestamp
|
|
11
|
+
const now = Date.now()
|
|
12
|
+
const twentyFourHoursAgo = now - (24 * 60 * 60 * 1000)
|
|
13
|
+
|
|
14
|
+
// Fetch logs within the last 24 hours
|
|
15
|
+
const logs = await Log.where('timestamp', '>=', twentyFourHoursAgo)
|
|
16
|
+
.orderBy('timestamp', 'asc')
|
|
17
|
+
.get()
|
|
18
|
+
|
|
19
|
+
// Group logs by hour and count them
|
|
20
|
+
const hourlyStats = logs.reduce((acc: { [key: string]: number }, log) => {
|
|
21
|
+
const date = new Date(log.timestamp)
|
|
22
|
+
const hour = date.getHours()
|
|
23
|
+
const day = date.getDate()
|
|
24
|
+
const month = date.getMonth() + 1
|
|
25
|
+
const year = date.getFullYear()
|
|
26
|
+
const key = `${year}-${month}-${day} ${hour}:00`
|
|
27
|
+
|
|
28
|
+
if (!acc[key]) {
|
|
29
|
+
acc[key] = 0
|
|
30
|
+
}
|
|
31
|
+
acc[key]++
|
|
32
|
+
|
|
33
|
+
return acc
|
|
34
|
+
}, {})
|
|
35
|
+
|
|
36
|
+
// Format data for line graph
|
|
37
|
+
const data = Object.entries(hourlyStats).map(([time, count]) => ({
|
|
38
|
+
time,
|
|
39
|
+
count,
|
|
40
|
+
}))
|
|
41
|
+
|
|
42
|
+
return response.json({
|
|
43
|
+
data,
|
|
44
|
+
timeRange: {
|
|
45
|
+
start: twentyFourHoursAgo,
|
|
46
|
+
end: now,
|
|
47
|
+
},
|
|
48
|
+
})
|
|
49
|
+
},
|
|
50
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Action } from '@stacksjs/actions'
|
|
2
|
+
import { response } from '@stacksjs/router'
|
|
3
|
+
|
|
4
|
+
export default new Action({
|
|
5
|
+
name: 'Log Index',
|
|
6
|
+
description: 'Log Index ORM Action',
|
|
7
|
+
method: 'GET',
|
|
8
|
+
async handle() {
|
|
9
|
+
const results = await Log.all()
|
|
10
|
+
|
|
11
|
+
return response.json(results)
|
|
12
|
+
},
|
|
13
|
+
})
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Action } from '@stacksjs/actions'
|
|
2
|
+
|
|
3
|
+
import { Log } from '@stacksjs/orm'
|
|
4
|
+
import { response } from '@stacksjs/router'
|
|
5
|
+
|
|
6
|
+
export default new Action({
|
|
7
|
+
name: 'Log Show',
|
|
8
|
+
description: 'Log Show ORM Action',
|
|
9
|
+
method: 'GET',
|
|
10
|
+
async handle(request: RequestInstance) {
|
|
11
|
+
const id = request.getParam('id')
|
|
12
|
+
|
|
13
|
+
const model = await Log.findOrFail(id)
|
|
14
|
+
|
|
15
|
+
return response.json(model)
|
|
16
|
+
},
|
|
17
|
+
})
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Action } from '@stacksjs/actions'
|
|
2
|
+
|
|
3
|
+
import { Log } from '@stacksjs/orm'
|
|
4
|
+
import { response } from '@stacksjs/router'
|
|
5
|
+
|
|
6
|
+
export default new Action({
|
|
7
|
+
name: 'Log Store',
|
|
8
|
+
description: 'Log Store ORM Action',
|
|
9
|
+
method: 'POST',
|
|
10
|
+
async handle(request: RequestInstance) {
|
|
11
|
+
await request.validate()
|
|
12
|
+
const model = await Log.create(request.all())
|
|
13
|
+
|
|
14
|
+
return response.json(model)
|
|
15
|
+
},
|
|
16
|
+
})
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Action } from '@stacksjs/actions'
|
|
2
|
+
|
|
3
|
+
import { Log } from '@stacksjs/orm'
|
|
4
|
+
import { response } from '@stacksjs/router'
|
|
5
|
+
|
|
6
|
+
export default new Action({
|
|
7
|
+
name: 'Log Update',
|
|
8
|
+
description: 'Log Update ORM Action',
|
|
9
|
+
method: 'PATCH',
|
|
10
|
+
async handle(request: RequestInstance) {
|
|
11
|
+
await request.validate()
|
|
12
|
+
|
|
13
|
+
const id = request.getParam('id')
|
|
14
|
+
const model = await Log.findOrFail(id)
|
|
15
|
+
|
|
16
|
+
const result = model?.update(request.all())
|
|
17
|
+
|
|
18
|
+
return response.json(result)
|
|
19
|
+
},
|
|
20
|
+
})
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Action } from '@stacksjs/actions'
|
|
2
|
+
import { errors } from '@stacksjs/commerce'
|
|
3
|
+
import { response } from '@stacksjs/router'
|
|
4
|
+
|
|
5
|
+
export default new Action({
|
|
6
|
+
name: 'Error Destroy',
|
|
7
|
+
description: 'Delete all errors in a group',
|
|
8
|
+
method: 'DELETE',
|
|
9
|
+
async handle(request: RequestInstance) {
|
|
10
|
+
const type = decodeURIComponent(request.string('type'))
|
|
11
|
+
const message = decodeURIComponent(request.string('message'))
|
|
12
|
+
|
|
13
|
+
if (!type || !message) {
|
|
14
|
+
return response.json({ error: 'Both type and message are required' }, 400)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const success = await errors.destroyGroup(type, message)
|
|
18
|
+
|
|
19
|
+
if (!success) {
|
|
20
|
+
return response.json({ error: 'Failed to delete errors' }, 500)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return response.json({ data: { success: true, message: 'Errors deleted successfully' } })
|
|
24
|
+
},
|
|
25
|
+
})
|