faustjs

Faust.js™ - The Headless WordPress Framework

OTHER License

Downloads
65.5K
Stars
1.3K
Committers
47

Bot releases are visible (Hide)

faustjs - @faustwp/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • a1b6fc0: Introduced a new API handler for App router projects called faustRouteHandler. It can be used by creating a file /app/api/faust/[route]/route.js with the following contents:

    // /app/api/faust/[route]/route.js
    import { faustRouteHandler } from '@faustwp/experimental-app-router';
    
    const { GET, POST } = faustRouteHandler;
    
    export { GET, POST };
    
  • a1b6fc0: Created getAuthClient for making authenticated server side requests in the Next.js App Router. It can be used like:

    import { getAuthClient } from '@faustwp/experimental-app-router';
    
    // app/my-account/posts/page.js
    export default async function Page() {
      const client = await getAuthClient();
    
      if (!client) {
        return <>You must be authenticated to view this page!</>;
      }
    
      const { data } = await client.query({
        query: gql`
          query GetMyPosts {
            viewer {
              posts {
                nodes {
                  id
                  title
                }
              }
            }
          }
        `,
      });
    
      return(
        <>
          <h2>My posts</h2>
           <ul>
            {data.viewer.posts.nodes.map((post) => (
              <li key={post.id}>{post.title}</li>
            ))}
          </ul>
        </>
      )
    

    Note: Our login/logout utils are still in the works.

  • Updated dependencies [a419252]

  • Updated dependencies [cf887d3]

  • Updated dependencies [795d956]

faustjs - @faustjs/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 176bc82: Chore: Fixes import order style lint error.
faustjs - @faustwp/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 176bc82: Chore: Fixes import order style lint error.
  • 3f5cee8: Prefix all api routes with the basePath from faust config when available. Fixes issue with preview tokens and logout with the toolbar.
  • 3810bbb: Fixes an issue where previews would get stuck in an endless loop when basePath was set.
faustjs - @faustwp/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 176bc82: Adds reference to parent tsconfig.json and fixes type resolution errors.
faustjs - @faustwp/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 3267c87: Added the getClient export that can be used to fetch data from your WordPress site
  • Updated dependencies [176bc82]
  • Updated dependencies [3f5cee8]
  • Updated dependencies [176bc82]
  • Updated dependencies [3810bbb]
faustjs - @faustwp/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 176bc82: Feat: Add registerFaustBlock helper that wraps edit and save functions used to register new blocks in Gutenberg.

    Usage:

    import metadata from './block.json';
    
    import MyFirstBlock from './MyFirstBlock';
    import { registerFaustBlock } from '@faustwp/block-editor-utils';
    
    import Edit from './edit';
    import save from './save';
    
    registerFaustBlock(MyFirstBlock, {
      blockJson: metadata,
      editFn: Edit,
      saveFn: save,
    });
    
  • d8c93fa: Feat: Added a default EditFunction.

    import metadata from './block.json';
    
    import MyFirstBlock from './MyFirstBlock';
    import { registerFaustBlock } from '@faustwp/block-editor-utils';
    registerFaustBlock(MyFirstBlock, { blockJson: metadata });
    
faustjs - @faustwp/[email protected]

Published by github-actions[bot] about 1 year ago

@faustwp/block-editor-utils

faustjs - @faustwp/[email protected]

Published by josephfusco about 1 year ago

188bd75: Auto-update enqueued asset versions whenenever the plugin is updated.

faustjs - @faustwp/[email protected]

Published by blakewilson about 1 year ago

Patch Changes

  • 0c9f9b5: Image URLs (and any URLs with file extensions) are now excluded from the replacement that Faust does in the GraphQL query results.
faustjs - @faustwp/[email protected]

Published by github-actions[bot] about 1 year ago

Minor Changes

  • f308cc5: Allow passing extra parameters in Page.variables(). This is allowed in getNextStaticProps, getServerSideProps and getWordPressProps:

    Ex:

    export function getStaticProps(ctx) {
      return getWordPressProps({ ctx, extra: {hello: 'world'} }); // extra parameter will be forwarded to the Template `variables` callback
    }
    
    Component.variables = ({ databaseId }, ctx, extra) => {
      console.log(extra) // {hello: 'world'}
      ...
    }
    
faustjs - @faustwp/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

faustjs - @faustwp/[email protected]

Published by blakewilson over 1 year ago

Patch Changes

  • 9ed3c40: Bug: Fixed an issue where the preview button could crash the browser
faustjs - @faustwp/[email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • 790b485: Bug Fix: useLogin and fetchAccessToken access token code parameter is now properly escaped. Fixes bug with authentication not workin on Vercel.
faustjs - @faustwp/[email protected]

Published by github-actions[bot] over 1 year ago

Minor Changes

  • 240a47b: Introduced the CoreList block. It can be used like:

    wp-blocks/index.js:

    import { CoreBlocks } from '@faustwp/blocks';
    
    export default {
      // Your other blocks...
      CoreList: CoreBlocks.CoreList,
    };
    
  • 19c7395: Added CoreHeading block implementation.

Patch Changes

  • 0cf14d4: Provide reference implementation of core image
  • Updated dependencies [790b485]
faustjs - @faustwp/[email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • 80e5605: Fixed a bug in the seed query when persisted queries are enabled. Thanks @justlevine!
faustjs - @faustwp/[email protected]

Published by github-actions[bot] over 1 year ago

Minor Changes

  • f087feb: Feat: Add CoreButton and CoreButtons blocks

Patch Changes

faustjs - @faustwp/[email protected]

Published by blakewilson over 1 year ago

Minor Changes

Patch Changes

  • ef92d02: Added @faustwp/blocks version to telemetry data.
faustjs - @faustwp/[email protected]

Published by blakewilson over 1 year ago

Major Changes

Minor Changes

  • 442c834: BREAKING: By default, Faust is now using GET for GraphQL requests in Apollo. If you would like to switch back to POST requests, you can do so by setting the useGETForQueries property to false in faust.config.js

  • 4cae3d9: BREAKING - Fixed seed query failing when attempting to view an unpublished WordPress post with a draft status.

    Previously the seed query would only receive data.node. These changes update the seed query to now receive both data.contentNode & data.nodeByUri. Note that projects hooking into Faust's seedQueryDocumentNode filter will need to refactor in order to use the new nodeByUri/contentNode syntax.

Patch Changes

  • 442c834: Added first party support for persisted queries in Apollo. They can be enabled by setting the usePersistedQueries property in your faust.config.js
  • 2934310: Added the ability to specify the base path for a site (ex. https://example.com/blog) with the basePath property in faust.config.js. Thanks @riderjensen!
  • f5dac42: Updated fast-xml-parser dependency
faustjs - @faustwp/[email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • c79d881: Bump to 1.0.1 since 1.0.0 release already existed in NPM from initial setup
faustjs - @faustwp/[email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • c79d881: Bump to 1.0.1 since 1.0.0 release already existed in NPM from initial setup