@webiny/api-headless-cms-workflows 6.6.0-alpha.0 → 6.6.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
1
  import { createFeature } from "@webiny/feature/api";
2
2
  import { CmsGraphQLSchemaFactory } from "@webiny/api-headless-cms";
3
+ import { FeatureFlags } from "@webiny/api-core/features/featureFlags/abstractions.js";
3
4
  import { EntryWorkflowsFeature } from "./features/EntryWorkflows/feature.js";
4
5
  import { WorkflowsFeature } from "./features/Workflows/index.js";
5
6
  import { WorkflowsFeature as api_workflows_WorkflowsFeature } from "@webiny/api-workflows";
@@ -7,6 +8,7 @@ import { createEntrySystemSchemaExtension } from "./graphql/entrySystemSchema.js
7
8
  const CmsWorkflowsFeature = createFeature({
8
9
  name: "CmsWorkflows",
9
10
  register (container) {
11
+ if (!container.resolve(FeatureFlags).get().isEnabled("advancedPublishingWorkflow")) return;
10
12
  EntryWorkflowsFeature.register(container);
11
13
  WorkflowsFeature.register(container);
12
14
  api_workflows_WorkflowsFeature.register(container);
@@ -1 +1 @@
1
- {"version":3,"file":"CmsWorkflowsFeature.js","sources":["../src/CmsWorkflowsFeature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport { CmsGraphQLSchemaFactory } from \"@webiny/api-headless-cms\";\nimport { EntryWorkflowsFeature } from \"./features/EntryWorkflows/feature.js\";\nimport { WorkflowsFeature as CmsLocalWorkflowsFeature } from \"./features/Workflows/index.js\";\nimport { WorkflowsFeature } from \"@webiny/api-workflows\";\nimport { createEntrySystemSchemaExtension } from \"./graphql/entrySystemSchema.js\";\n\nexport const CmsWorkflowsFeature = createFeature({\n name: \"CmsWorkflows\",\n register(container) {\n // WCP guard is enforced inside WorkflowsContextEnhancer — register unconditionally.\n EntryWorkflowsFeature.register(container);\n CmsLocalWorkflowsFeature.register(container);\n WorkflowsFeature.register(container);\n\n // Add the `workflow` field to CmsEntrySystem on the CMS endpoint. (api-workflows extends\n // CmsEntrySystem on the base /graphql schema via WorkflowsSchemaFactory, but CMS entries are\n // served from the separate CMS schema, which needs its own CmsGraphQLSchemaFactory entry.)\n container.registerInstance(CmsGraphQLSchemaFactory, {\n execute: () => [createEntrySystemSchemaExtension()]\n });\n }\n});\n"],"names":["CmsWorkflowsFeature","createFeature","container","EntryWorkflowsFeature","CmsLocalWorkflowsFeature","WorkflowsFeature","CmsGraphQLSchemaFactory","createEntrySystemSchemaExtension"],"mappings":";;;;;;AAOO,MAAMA,sBAAsBC,cAAc;IAC7C,MAAM;IACN,UAASC,SAAS;QAEdC,sBAAsB,QAAQ,CAACD;QAC/BE,iBAAAA,QAAiC,CAACF;QAClCG,+BAAAA,QAAyB,CAACH;QAK1BA,UAAU,gBAAgB,CAACI,yBAAyB;YAChD,SAAS,IAAM;oBAACC;iBAAmC;QACvD;IACJ;AACJ"}
1
+ {"version":3,"file":"CmsWorkflowsFeature.js","sources":["../src/CmsWorkflowsFeature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport { CmsGraphQLSchemaFactory } from \"@webiny/api-headless-cms\";\nimport { FeatureFlags } from \"@webiny/api-core/features/featureFlags/abstractions.js\";\nimport { EntryWorkflowsFeature } from \"./features/EntryWorkflows/feature.js\";\nimport { WorkflowsFeature as CmsLocalWorkflowsFeature } from \"./features/Workflows/index.js\";\nimport { WorkflowsFeature } from \"@webiny/api-workflows\";\nimport { createEntrySystemSchemaExtension } from \"./graphql/entrySystemSchema.js\";\n\nexport const CmsWorkflowsFeature = createFeature({\n name: \"CmsWorkflows\",\n register(container) {\n // Advanced publishing workflow is license-gated — check at register time (license is fresh\n // pre-register) so nothing wires up without the entitlement.\n if (!container.resolve(FeatureFlags).get().isEnabled(\"advancedPublishingWorkflow\")) {\n return;\n }\n\n EntryWorkflowsFeature.register(container);\n CmsLocalWorkflowsFeature.register(container);\n WorkflowsFeature.register(container);\n\n // Add the `workflow` field to CmsEntrySystem on the CMS endpoint. (api-workflows extends\n // CmsEntrySystem on the base /graphql schema via WorkflowsSchemaFactory, but CMS entries are\n // served from the separate CMS schema, which needs its own CmsGraphQLSchemaFactory entry.)\n container.registerInstance(CmsGraphQLSchemaFactory, {\n execute: () => [createEntrySystemSchemaExtension()]\n });\n }\n});\n"],"names":["CmsWorkflowsFeature","createFeature","container","FeatureFlags","EntryWorkflowsFeature","CmsLocalWorkflowsFeature","WorkflowsFeature","CmsGraphQLSchemaFactory","createEntrySystemSchemaExtension"],"mappings":";;;;;;;AAQO,MAAMA,sBAAsBC,cAAc;IAC7C,MAAM;IACN,UAASC,SAAS;QAGd,IAAI,CAACA,UAAU,OAAO,CAACC,cAAc,GAAG,GAAG,SAAS,CAAC,+BACjD;QAGJC,sBAAsB,QAAQ,CAACF;QAC/BG,iBAAAA,QAAiC,CAACH;QAClCI,+BAAAA,QAAyB,CAACJ;QAK1BA,UAAU,gBAAgB,CAACK,yBAAyB;YAChD,SAAS,IAAM;oBAACC;iBAAmC;QACvD;IACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-headless-cms-workflows",
3
- "version": "6.6.0-alpha.0",
3
+ "version": "6.6.0-alpha.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -17,26 +17,25 @@
17
17
  },
18
18
  "license": "MIT",
19
19
  "dependencies": {
20
- "@webiny/api": "6.6.0-alpha.0",
21
- "@webiny/api-aco": "6.6.0-alpha.0",
22
- "@webiny/api-core": "6.6.0-alpha.0",
23
- "@webiny/api-headless-cms": "6.6.0-alpha.0",
24
- "@webiny/api-workflows": "6.6.0-alpha.0",
25
- "@webiny/error": "6.6.0-alpha.0",
26
- "@webiny/feature": "6.6.0-alpha.0",
27
- "@webiny/shared-aco": "6.6.0-alpha.0"
20
+ "@webiny/api": "6.6.0-alpha.1",
21
+ "@webiny/api-aco": "6.6.0-alpha.1",
22
+ "@webiny/api-core": "6.6.0-alpha.1",
23
+ "@webiny/api-headless-cms": "6.6.0-alpha.1",
24
+ "@webiny/api-workflows": "6.6.0-alpha.1",
25
+ "@webiny/error": "6.6.0-alpha.1",
26
+ "@webiny/feature": "6.6.0-alpha.1",
27
+ "@webiny/shared-aco": "6.6.0-alpha.1"
28
28
  },
29
29
  "devDependencies": {
30
- "@webiny/api-core-testing": "6.6.0-alpha.0",
31
- "@webiny/api-headless-cms-testing": "6.6.0-alpha.0",
32
- "@webiny/api-opensearch": "6.6.0-alpha.0",
33
- "@webiny/build-tools": "6.6.0-alpha.0",
34
- "@webiny/handler": "6.6.0-alpha.0",
35
- "@webiny/plugins": "6.6.0-alpha.0",
36
- "@webiny/project-utils": "6.6.0-alpha.0",
37
- "@webiny/wcp": "6.6.0-alpha.0",
30
+ "@webiny/api-core-testing": "6.6.0-alpha.1",
31
+ "@webiny/api-headless-cms-testing": "6.6.0-alpha.1",
32
+ "@webiny/api-opensearch": "6.6.0-alpha.1",
33
+ "@webiny/build-tools": "6.6.0-alpha.1",
34
+ "@webiny/handler": "6.6.0-alpha.1",
35
+ "@webiny/plugins": "6.6.0-alpha.1",
36
+ "@webiny/wcp": "6.6.0-alpha.1",
38
37
  "typescript": "7.0.2",
39
- "vitest": "4.1.10"
38
+ "vitest": "4.1.11"
40
39
  },
41
40
  "publishConfig": {
42
41
  "access": "public"