Skip to content

Commit

Permalink
feat: optional publication
Browse files Browse the repository at this point in the history
  • Loading branch information
Plopix committed Feb 9, 2024
1 parent f9fce57 commit 53996d2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/fair-tigers-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@crystallize/import-utilities': minor
---

Add an option in the config to disable publish
1 change: 1 addition & 0 deletions src/bootstrap-tenant/bootstrapper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export class Bootstrapper extends EventEmitter {
shapeComponents: 'amend',
logLevel: 'silent',
experimental: {},
skipPublication: false
}

status: Status = {
Expand Down
4 changes: 4 additions & 0 deletions src/bootstrap-tenant/bootstrapper/items/publishItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ export function publishItem(
return Promise.resolve()
}

if (context.config.skipPublication === true) {
return Promise.resolve()
}

return context.callPIM({
query: gql`
mutation PUBLISH_ITEM($id: ID!, $language: String!) {
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap-tenant/bootstrapper/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export interface Config {
shapeComponents?: 'amend' | 'replace'
logLevel?: LogLevel
multilingual?: boolean
skipPublication?: boolean
experimental: {
parallelize?: boolean // Deprecated
}
Expand Down

0 comments on commit 53996d2

Please sign in to comment.