The new logging will enhance the visibility of important actions by the admin, including banning and unbanning users, deleting users and accounts. The features/admin logging dependency has been added. In the admin dashboard service, specific logging has been implemented to track errors in fetching data.
* Add workspace context and custom hooks for user and team accounts
The commit introduces a new workspace context for both user and team accounts. New custom hooks, useUserWorkspace and useAccountWorkspace, were created to access this context data. These changes allow for more streamlined data access and manipulation, enabling features that depend on account context information to function more efficiently.
* Upgrade pnpm action-setup to version 4
The commit updates the version of pnpm action-setup used in GitHub workflows from v2 to v4. This upgrade can provide enhancements and improved features offered by the newer version.
* Update pnpm/action-setup version in workflow
The commit removes the explicit "version: 8" specifier in the Github Action workflow for "pnpm/action-setup". The updated workflow now points to "pnpm/action-setup@v4" instead of "pnpm/action-setup@v2", aligning it with usage elsewhere in the workflow.
* Refactor magic link auth container for URL handling
The magic link auth container has been updated to use a standard URL interface for managing URL and query parameters. This improves readability and error handling in the code.URL-related operations are now conducted via the URL object.
Updated several package dependencies to their latest versions, improving the general robustness and bringing in the latest features and fixes. This includes the '@typescript-eslint' related packages, '@keystatic/core', and '@sentry/nextjs'.
The trigger "add_current_user_to_new_account" has been updated to execute only when a new account is not personal. This adjustment to the trigger condition will ensure the function kit.add_current_user_to_new_account() only fires in these circumstances.
This commit performs an update of the version numbers for several packages used across the project. Overall, this is part of a maintenance task to ensure the latest version of each package is used to gain performance improvements, bug fixes and new features where applicable.
Changed the 'monthly' interval value to 'month' and the 'yearly' interval to 'year'. This change improves code consistency and alignment with the expected format for interval values.
Refactored the condition handling for the next path in auth-callback.service.ts to only rely on the callbackUrl instead of an additional 'next' parameter. This not only simplifies the code but also reduces potential errors linked to multiple sources of truth for the next path direction.
This update improves the logic for handling the 'next' path in the auth callback service. Now, it first checks the query parameters for the 'next' path. If it's not found there, it looks into the callback URL
* Update webhook handler and tailwind paths, add first subscription item to types
In the lemon-squeezy-webhook-handler, changed logger from error to warning and refactored the generation of lineItems to use firstSubscriptionItem details and obtain the priceAmount. In tailwind's index file, adjusted the path to include src directories in packages. Also, the first_subscription_item has been added to the subscription-webhook type for better data representation.
* Refactor subscription interval calculation
The subscription interval calculation was refactored to use the new 'getSubscriptionIntervalType' function. This new function provides a more accurate calculation, where it determines the interval type ('monthly' or 'yearly') by comparing the renewal date with the current date.
* Update dependencies across multiple packages
This commit includes updates to the version of "supabase-js", "lucide-react", "react-query", "react-table", "postcss", "stripe" among other dependencies in multiple package.json files. The "pnpm-lock.yaml" file is also updated to reflect these changes. This ensures the project dependencies stay up-to-date to include new features, improvements and bug fixes.
Updated several dependency versions across multiple packages. This includes updating "@supabase/supabase-js" from "^2.43.5" to "^2.44.1", "lucide-react" from "^0.396.0" to "^0.397.0", and "@stripe/react-stripe-js" from "^2.7.1" to "^2.7.2". Also, some dependencies in the lock file were updated.
The keystatic.config.ts has been again refactor with new field validations and a new dedicated function to get collections. The "turbo.json" file is also updated with a new "ui" field. The refactor aims to streamline the collection generation, and the "ui" field in "turbo.json" enhances its configuration capabilities.
The '@tanstack/react-query' dependency version has been upgraded across several packages. Alongside, syntax and unnecessary semicolons in 'database.types.ts' have been cleaned up to adhere with the formatting standards.
This commit includes the upgrade of multiple packages to their latest versions, including "@supabase/ssr", "stripe", "@playwright/test", "@typescript-eslint/eslint-plugin" and "@typescript-eslint/parser". It also ensures consistent warning logs indentation in route.ts.
This commit updates the Keystatic version to 0.5.23 and changes the interval for version refetching. The environment variable used for the refetch interval has been modified to NEXT_PUBLIC_VERSION_UPDATER_REFETCH_INTERVAL_SECONDS. Additionally, the code for checking for new version has been refactored and a visual change has been implemented to include a RocketIcon in the dialog header.
Additional logic has been introduced to the getHashFromProcess function. It will now exit early if the runtime is not Node.js or if the environment is not a development environment to prevent calling a Node.js command. This is done to avoid potential issues in the edge runtime and non-development environments.
Added a version updater component that frequently checks for updates to the app and alerts the user if necessary. This requires a new route, config changes, and additional UI resources. A new feature flag 'enableVersionUpdater' has been added in the feature-flags.config.ts file to toggle this feature.
Updated the package versions of "typescript", "lucide-react", "@radix-ui/react-dialog" and several other dependencies across multiple json files. The pnpm-lock.yaml file was also updated to reflect these changes in dependencies. This ensures that we use the most up-to-date versions of these packages in our project.
Made several changes across different files primarily focusing on readability. Arranged CSS classes in a standardized order for easier reading and maintenance. Arranged and formatted import lines, function declarations, and component return statements for legibility. Removed unnecessary React imports in some files.
Two new functionalities for email templates have been introduced. A 'content' component which provides a container complete with border and padding specifications, and a 'header' component which simply encapsulates its child items. Both use the '@react-email/components' container for layout.
Enhanced the design of the 'invite-user' and 'confirm-email' templates by adding new CSS code. This CSS code professionaly styles the email, improving readability and user experience.
The process of retrieving stripe subscriptions has been updated in the 'stripe-webhook-handler.service.ts' file. Instead of expanding to 'line_items', the process now retrieves just the subscription and proceeds to build the payload. The refactor aims to improve the performance and simplicity of the subscription retrieval process.
The root metadata in the application config now uses the title instead of the name both in the metadata base and openGraph sections. Adding title into OpenGraph can significantly improve SEO and make the app more discoverable on the internet.
The documentation loader has been updated to limit the number of items to 500 from the previous limit of 'Number.MAX_SAFE_INTEGER'. Additionally, the handling of URL generation and item retrieval in 'server-sitemap.xml/route.ts' has been refactored for more effective sitemap generation. A new 'robots.ts' file was created to set up default rules for web robots accessing the site.
The yarn package, previously a dependency, has been removed from both pnpm-lock.yaml and package.json files. The removal is consistent across the application and the lockfile, ensuring that yarn will not be installed or used in any part of the project.
In response to paid invoices, a new callback method has been introduced in the billing services. This feature includes changes in billing-webhook-handler.service.ts, lemon-squeezy-webhook-handler.service.ts, and other related files. The new method fetches and handles paid invoice information from Stripe and LemonSqueezy subscriptions.
* Filter out metered line items from billing schema
This update refines the process of creating a billing schema by filtering out metered line items. The change is necessary as metered line items can be shared across different plans, potentially causing conflicts or duplicates in the schema.
* Update packages to newer versions
This update upgrades several packages across multiple project files to their latest version. These packages include "supabase-js", "react-query", "react-hook-form", and "pnpm". The commit ensures the project is up-to-date with recent package versions, potentially benefiting from bug fixes, new features, and performance improvements.
* Add subscription retrieval in billing services
Added a function to retrieve subscription info in both Stripe and LemonSqueezy billing services. To accomplish this, new methods were added to related services and types. This allows querying specific subscription data based on its id, and throws an error if it fails. Furthermore, PayloadBuilder classes were created to systematically build the subscription payload.
* Remove account ID retrieval from Lemon Squeezy billing service
The code that was querying the database to fetch the accountId has been removed from lemon-squeezy-billing-strategy.service.ts. It was unnecessary as the Lemon Squeezy API does not provide account ID and therefore it is always left empty. Also, adjustments have been made in billing-strategy-provider.service.ts to reflect that the target account ID can be optional.
* Extract 'next' parameter from callback URL
The update allows for the extraction of the 'next' parameter from the callback URL. If such a parameter is available, it is subsequently added to the search parameters. The enhancement improves URL parameter handling in the authentication callback service.
* Refactor URL redirection in auth-callback service
The update simplifies the redirection logic in the authentication callback service. This is achieved by setting the url pathname directly to the redirect path, instead of first setting it to the callback parameter. Moreover, the code handling the 'next' path has also been streamlined, setting the url pathname to the next path when available.
This update upgrades several packages across multiple project files to their latest version. These packages include "supabase-js", "react-query", "react-hook-form", and "pnpm". The commit ensures the project is up-to-date with recent package versions, potentially benefiting from bug fixes, new features, and performance improvements.
This update refines the process of creating a billing schema by filtering out metered line items. The change is necessary as metered line items can be shared across different plans, potentially causing conflicts or duplicates in the schema.
* Refactor password validation and enhance localization
A new PasswordSchema is introduced to handle the password validation in a centralized way and is used across all authentication schemas. The password requirements are also altered with additional special character, number, and uppercase letter checks. Error messages now utilize localization to provide dynamic error notifications.
* Sign out before impersonating a user
This update adds a call to sign out before impersonating a user. This is an additional measure to ensure the security of the system, accentuating the isolation of user sessions.
* Refactor password validation and refine password schemas
The password validation process has been restructured. The 'PasswordSchema' is now split into two separate schemas - 'PasswordSchema' and 'RefinedPasswordSchema'. The logic for validating repeating passwords has been moved into a separate function named 'refineRepeatPassword'. This streamlines the password validation process and ensures consistency across password checks.
This update modifies the multi-factor challenge execution in the auth component. By moving the onSuccess callback directly into the useVerifyMFAChallenge useMutation hook, it simplifies the code and removes unnecessary useCallback use. Also, it reduces the dependency on useEffect to handle the success scenario which enhances readability and maintainability.
This commit refines the Multi-Factor Authentication (MFA) handling by removing 'requireUser' method, optimizing 'useFetchMfaFactors' hook to avoid fetching stale data, and improving error logging. The changes enhance the system's user session management and the MFA challenge response, ensuring smoother user experience and potential troubleshooting.
The logic handling localhost in the auth-callback service has been updated. The host is no longer automatically set to the request host; instead, it's only updated if it's currently set to localhost and the request host does not include localhost itself. This change improves handling of different host configurations.
Expanded the Supabase configuration file to include new auth email templates and created corresponding HTML templates. These templates facilitate authentication emails such as invitations, confirmations, password resets, and magic link logins.
The commit introduces changes to the behavior of the "Update Password" page on a successful password update. Instead of redirecting the user back to the home page upon a successful update, the updated code now redirects the user to a specified URL passed in as a prop. The authentication configuration has also been updated to include a list of acceptable redirect URLs.
The sorting options in the CMS client have been updated. Specifically, the 'slug' option has been removed from 'sortBy'. This change simplifies the options available for sorting operations.
Several dependencies across multiple packages have been updated to their later versions. This includes updates to 'lucide-react', '@lemonsqueezy/lemonsqueezy.js', 'supabase' and 'eslint-config-turbo'. The lock file has been updated to reflect these changes.
Several dependencies across multiple packages have been updated to their later versions. This includes updates to 'lucide-react', '@lemonsqueezy/lemonsqueezy.js', 'supabase' and 'eslint-config-turbo'. The lock file has been updated to reflect these changes.
The team account layout sidebar has been simplified by removing collapsible functionality and unneeded dependencies. The changes aim to improve clarity and reduce complexity in the codebase. With a lesser number of dependencies, future updates or improvements should be easier.
Updated versions for "@tanstack/react-query" in several packages, "@lemonsqueezy/lemonsqueezy.js" in billing package and version references in "pnpm-lock.yaml". This commit aims for compatibility enhancement and potential bug fixes accompanying these updated versions.
The change includes the productName as a prop in the subject of the account-delete email. This aims to give a more personalised message when sending emails related to account deletion, improving user experience.
The environment variable prompts in the Turbo generator now include a link to the associated documentation. This addition helps guide end users in setting up their environment variables appropriately. The URL of the documentation page is declared as a constant, which is appended to each environment variable name to create the full documentation link.
* Add conditional checks for E2E and billing tests
Added a conditional check to only run the End-to-End (E2E) workflow if the environment variable ENABLE_E2E_JOB is set to true. Also added a similar check in the Playwright configuration for running billing tests only if the ENABLE_BILLING_TESTS environment variable is 'true'. This will allow more control over the tests run in different environments.
The 'next' package and its dependencies in several packages have been upgraded. The 'lemonsqueezy.js' and 'pino' libraries also received updates. This commit ensures that the project uses the latest features, performance improvements, and security patches from these dependencies.
Updated several package dependencies including 'react-hook-form' and '@types/node' in various package.json files, and '@typescript-eslint/eslint-plugin' and '@typescript-eslint/parser' in the ESLint configuration. Additionally, an unused import related to "prettier-plugin-tailwindcss" has been removed from the prettier tool configuration.
This commit updates the versions of several dependencies across various packages, with the primary updates being to `@tanstack/react-query`, `prettier`, and `lucide-react`. This helps to keep the project dependencies up-to-date and may also include minor bug fixes or improvements from the updated packages.
Several updates and refactorings have been made to the billing services and types. The "onInvoicePaid" method and some types related to line items have been removed. The comments and arguments for the "verifyWebhookSignature" and "handleWebhookEvent" methods in service classes have been updated for clarity. The "onEvent" method's arguments have also been adjusted in multiple places to improve consistency.