faustjs

Faust.js™ - The Headless WordPress Framework

OTHER License

Downloads
65.5K
Stars
1.3K
Committers
47

Bot releases are visible (Hide)

faustjs - plugin/faustwp/v0.7.0

Published by blakewilson almost 3 years ago

Minor Changes

  • Changed the plugin name to FaustWP.
  • Changed all internal PHP function names to use namespaces.
  • Changed the WP_HEADLESS_SECRET_KEY constant to FAUSTWP_SECRET_KEY.
  • Changed the authentication endpoint namespace from wpac/v1 to faustwp/v1
  • Changed settings option name from wpe_headless to faustwp_settings
  • Changed the following filter names:
    • wpe_headless_setting to faustwp_setting
    • wpe_headless_settings to faustwp_settings
    • wpe_headless_domain_replacement_enabled to faustwp_domain_replacement_enabled
  • Changed the text domain to faustwp.
  • Changed minimum required PHP version to 7.2.
  • Changed minimum required WordPress version to 5.7.
  • Changed the hook used for public route redirection.
  • Fixed the "headless post preview" link on the FaustWP settings page.
  • Fixed "unexpected output" error during plugin activation.
  • Fixed skipped domain replacement in GraphQL responses that include generalSettings.
  • Added LICENSE file.
faustjs - @faustjs/[email protected]

Published by github-actions[bot] almost 3 years ago

Minor Changes

  • dc936a5: Updated internal auth endpoints and headers for WPE Headless plugin rename.

    The FaustWP plugin has deprecated the REST endpoint that @faustjs/core uses for authorization.
    Both the plugin and the @faustjs/core package will continue to work with the deprecated endpoint
    until it is removed in a future version. Make sure to always update your FaustWP plugin and @faustjs
    packages together to avoid any issues that may arise from incompatible versions.

faustjs - @faustjs/[email protected]

Published by github-actions[bot] almost 3 years ago

Patch Changes

faustjs - @faustjs/[email protected]

Published by github-actions[bot] almost 3 years ago

Patch Changes

faustjs - @faustjs/[email protected]

Published by github-actions[bot] almost 3 years ago

Patch Changes

  • a3b08d6: Updated dependencies
  • Updated dependencies [a3b08d6]
faustjs - @faustjs/[email protected]

Published by github-actions[bot] almost 3 years ago

Patch Changes

  • a3b08d6: Updated dependencies
faustjs - @faustjs/[email protected]

Published by github-actions[bot] almost 3 years ago

Patch Changes

  • a3b08d6: Fixed an intermittent error TypeError: Cannot read property 'get' of undefined when running in dev mode.
  • a3b08d6: Updated dependencies
  • Updated dependencies [a3b08d6]
faustjs - @faustjs/[email protected]

Published by github-actions[bot] almost 3 years ago

Minor Changes

  • 8630834: BREAKING: Rename HeadlessProvider to FaustProvider
faustjs - @faustjs/[email protected]

Published by github-actions[bot] almost 3 years ago

Patch Changes

  • 81d6162: Refactored core exports and naming to make root namespace cleaner
  • Updated dependencies [81d6162]
faustjs - @faustjs/[email protected]

Published by github-actions[bot] almost 3 years ago

Patch Changes

faustjs - @faustjs/[email protected]

Published by github-actions[bot] almost 3 years ago

Patch Changes

  • 81d6162: Refactored core exports and naming to make root namespace cleaner
faustjs - @faustjs/[email protected]

Published by github-actions[bot] about 3 years ago

Patch Changes

  • 068f3c3: Fixed an issue that caused the API Router to not route requests with an authorization code
faustjs - @faustjs/[email protected]

Published by github-actions[bot] about 3 years ago

Patch Changes

faustjs - @faustjs/[email protected]

Published by github-actions[bot] about 3 years ago

Patch Changes

  • 1e32f81: Typeings for getNextStaticProps and getNextServerSideProps now allow and protect custom props.
faustjs - @faustjs/[email protected]

Published by github-actions[bot] about 3 years ago

Patch Changes

  • 7d30277: logQueries is can now be called and will log GraphQL queries if desired.
faustjs - @faustjs/[email protected]

Published by github-actions[bot] about 3 years ago

Minor Changes

  • 8243e9f: headlessConfig from @faustjs/core is now just config, and @faustjs/next has its own config with a global revalidate option.

    Your faust.config.js needs to change to look like this:

    import { config as coreConfig } from '@faustjs/core';
    
    if (!process.env.NEXT_PUBLIC_WORDPRESS_URL) {
      console.error(
        'You must provide a NEXT_PUBLIC_WORDPRESS_URL environment variable, did you forget to load your .env.local file?',
      );
    }
    
    /**
     * @type {import("@faustjs/core").Config}
     */
    export default coreConfig({
      wpUrl: process.env.NEXT_PUBLIC_WORDPRESS_URL,
      apiClientSecret: process.env.WP_HEADLESS_SECRET,
    });
    

    Or, to configure the global revalidate option in @faustjs/next:

    import { config as coreConfig } from '@faustjs/core';
    import { config as nextConfig } from '@faustjs/next';
    
    if (!process.env.NEXT_PUBLIC_WORDPRESS_URL) {
      console.error(
        'You must provide a NEXT_PUBLIC_WORDPRESS_URL environment variable, did you forget to load your .env.local file?',
      );
    }
    
    nextConfig({
      revalidate: 60, // 1 minute
    });
    
    /**
     * @type {import("@faustjs/core").Config}
     */
    export default coreConfig({
      wpUrl: process.env.NEXT_PUBLIC_WORDPRESS_URL,
      apiClientSecret: process.env.WP_HEADLESS_SECRET,
    });
    

    NOTE: @faustjs/next defaults to revalidate: 900 (15 minutes).

  • 5c7f662: Introduced an argument to the useAuth hook, UseAuthOptions, to provide users the ability to disable automatic redirect from the useAuth hook upon an unauthenticated user.

    import { client } from 'client';
    
    export default function Page() {
      const { isLoading, isAuthenticated, authResult } = client.auth.useAuth({
        shouldRedirect: false,
      });
    
      if (isLoading) {
        return <p>Loading...</p>;
      }
    
      if (!isAuthenticated) {
        return (
          <p>You need to be authenticated to see this content. Please login.</p>
        );
      }
    
      return <p>Authenticated content</p>;
    }
    

Patch Changes

  • c4b205a: Implemented changesets 🦋
  • Updated dependencies [4ded997]
  • Updated dependencies [8243e9f]
  • Updated dependencies [f0f2706]
  • Updated dependencies [c4b205a]
  • Updated dependencies [5c7f662]
faustjs - @faustjs/[email protected]

Published by github-actions[bot] about 3 years ago

Minor Changes

  • 4ded997: Implement logoutHandler middleware

  • 8243e9f: headlessConfig from @faustjs/core is now just config, and @faustjs/next has its own config with a global revalidate option.

    Your faust.config.js needs to change to look like this:

    import { config as coreConfig } from '@faustjs/core';
    
    if (!process.env.NEXT_PUBLIC_WORDPRESS_URL) {
      console.error(
        'You must provide a NEXT_PUBLIC_WORDPRESS_URL environment variable, did you forget to load your .env.local file?',
      );
    }
    
    /**
     * @type {import("@faustjs/core").Config}
     */
    export default coreConfig({
      wpUrl: process.env.NEXT_PUBLIC_WORDPRESS_URL,
      apiClientSecret: process.env.WP_HEADLESS_SECRET,
    });
    

    Or, to configure the global revalidate option in @faustjs/next:

    import { config as coreConfig } from '@faustjs/core';
    import { config as nextConfig } from '@faustjs/next';
    
    if (!process.env.NEXT_PUBLIC_WORDPRESS_URL) {
      console.error(
        'You must provide a NEXT_PUBLIC_WORDPRESS_URL environment variable, did you forget to load your .env.local file?',
      );
    }
    
    nextConfig({
      revalidate: 60, // 1 minute
    });
    
    /**
     * @type {import("@faustjs/core").Config}
     */
    export default coreConfig({
      wpUrl: process.env.NEXT_PUBLIC_WORDPRESS_URL,
      apiClientSecret: process.env.WP_HEADLESS_SECRET,
    });
    

    NOTE: @faustjs/next defaults to revalidate: 900 (15 minutes).

  • f0f2706: Introduced the apiRouter that will handle all of the Faust.js related endpoints for you.

    Breaking Changes

    With the introduction of apiRouter we have introduced a breaking change. You will need to remove your pages/api/auth/wpe-headless.ts file, and create a new file, pages/api/faust/[[...route]].ts with the following content:

    import 'faust.config';
    import { apiRouter } from '@faustjs/core/api';
    
    export default apiRouter;
    

    Note: The [[...route]] naming convention is a Next.js convention for a catch-all route.

    Config changes

    The apiEndpoint and apiUrl config options have been removed in exchange for the apiBasePath option. This option specifies the base path for all of the Faust.js endpoints. The blogUrlPrefix is no longer necessary and has been removed from the config interface.

Patch Changes

  • c4b205a: Implemented changesets 🦋
  • 5c7f662: Added the appropriate Content-Type response header to the authorizeHandler middleware
faustjs - @faustjs/[email protected]

Published by github-actions[bot] about 3 years ago

Minor Changes

  • 8243e9f: headlessConfig from @faustjs/core is now just config, and @faustjs/next has its own config with a global revalidate option.

    Your faust.config.js needs to change to look like this:

    import { config as coreConfig } from '@faustjs/core';
    
    if (!process.env.NEXT_PUBLIC_WORDPRESS_URL) {
      console.error(
        'You must provide a NEXT_PUBLIC_WORDPRESS_URL environment variable, did you forget to load your .env.local file?',
      );
    }
    
    /**
     * @type {import("@faustjs/core").Config}
     */
    export default coreConfig({
      wpUrl: process.env.NEXT_PUBLIC_WORDPRESS_URL,
      apiClientSecret: process.env.WP_HEADLESS_SECRET,
    });
    

    Or, to configure the global revalidate option in @faustjs/next:

    import { config as coreConfig } from '@faustjs/core';
    import { config as nextConfig } from '@faustjs/next';
    
    if (!process.env.NEXT_PUBLIC_WORDPRESS_URL) {
      console.error(
        'You must provide a NEXT_PUBLIC_WORDPRESS_URL environment variable, did you forget to load your .env.local file?',
      );
    }
    
    nextConfig({
      revalidate: 60, // 1 minute
    });
    
    /**
     * @type {import("@faustjs/core").Config}
     */
    export default coreConfig({
      wpUrl: process.env.NEXT_PUBLIC_WORDPRESS_URL,
      apiClientSecret: process.env.WP_HEADLESS_SECRET,
    });
    

    NOTE: @faustjs/next defaults to revalidate: 900 (15 minutes).

Patch Changes

  • c4b205a: Implemented changesets 🦋
  • Updated dependencies [4ded997]
  • Updated dependencies [8243e9f]
  • Updated dependencies [f0f2706]
  • Updated dependencies [c4b205a]
  • Updated dependencies [5c7f662]
faustjs - package/core/0.11.0

Published by blakewilson about 3 years ago

faustjs - package/core/0.10.2

Published by blakewilson about 3 years ago