Faust.js™ - The Headless WordPress Framework
OTHER License
Bot releases are visible (Hide)
Published by blakewilson almost 3 years ago
wpac/v1
to faustwp/v1
wpe_headless
to faustwp_settings
wpe_headless_setting
to faustwp_setting
wpe_headless_settings
to faustwp_settings
wpe_headless_domain_replacement_enabled
to faustwp_domain_replacement_enabled
faustwp
.generalSettings
.Published by github-actions[bot] almost 3 years ago
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.
Published by github-actions[bot] almost 3 years ago
Published by github-actions[bot] almost 3 years ago
Published by github-actions[bot] almost 3 years ago
Published by github-actions[bot] almost 3 years ago
Published by github-actions[bot] almost 3 years ago
TypeError: Cannot read property 'get' of undefined
when running in dev mode.Published by github-actions[bot] almost 3 years ago
HeadlessProvider
to FaustProvider
Published by github-actions[bot] almost 3 years ago
Published by github-actions[bot] almost 3 years ago
Published by github-actions[bot] almost 3 years ago
Published by github-actions[bot] about 3 years ago
Published by github-actions[bot] about 3 years ago
068f3c3: Introduced the useLogout
hook to facilitate logging out a user
See https://faustjs.org/docs/next/reference/custom-hooks#uselogout for more details.
Updated dependencies [068f3c3]
Published by github-actions[bot] about 3 years ago
getNextStaticProps
and getNextServerSideProps
now allow and protect custom props.Published by github-actions[bot] about 3 years ago
logQueries
is can now be called and will log GraphQL queries if desired.Published by github-actions[bot] about 3 years ago
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 torevalidate: 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>;
}
changesets
🦋Published by github-actions[bot] about 3 years ago
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 torevalidate: 900
(15 minutes).
f0f2706: Introduced the apiRouter
that will handle all of the Faust.js related endpoints for you.
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.
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.
changesets
🦋Content-Type
response header to the authorizeHandler
middlewarePublished by github-actions[bot] about 3 years ago
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 torevalidate: 900
(15 minutes).
changesets
🦋Published by blakewilson about 3 years ago
Published by blakewilson about 3 years ago