Skip to content

Commit

Permalink
Show elaborate comment for breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
fraxachun committed Sep 25, 2024
1 parent 49f0995 commit dea0a1d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/api/cms-api/src/page-tree/page-tree.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface PageTreeModuleOptions {
Documents: Type<DocumentInterface>[];
Scope?: Type<ScopeInterface>;
reservedPaths?: string[];
sitePreviewSecret: string;
sitePreviewSecret?: string;
}

@Global()
Expand All @@ -44,6 +44,13 @@ export class PageTreeModule {
throw new Error(`PageTreeModule: Your PageTreeNode entity must be named ${PAGE_TREE_ENTITY}`);
}

// TODO v8: Make sitePreviewSecret mandatory and remove this error
if (!options.sitePreviewSecret) {
throw new Error(
"BREAKING: this update of Comet v7 requires to have set sitePreviewSecret (which has to be the same value like possibly already set for site). Please refer to https://github.com/vivid-planet/comet-starter/pull/371 for more information on how to upgrade.",
);
}

const PageTreeResolver = createPageTreeResolver({
PageTreeNode,
Documents,
Expand Down

0 comments on commit dea0a1d

Please sign in to comment.