@webiny/api-website-builder-workflows 6.6.0-alpha.0 → 6.6.0-alpha.2

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,8 +1,5 @@
1
1
  import type { IGraphQLSchemaFactory, GraphQLSchemaFactory as GQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.js";
2
- import { WcpContext } from "@webiny/api-core/features/wcp/WcpContext/index.js";
3
2
  declare class WebsiteBuilderPageSchemaFactoryImpl implements IGraphQLSchemaFactory {
4
- private wcpContext;
5
- constructor(wcpContext: WcpContext.Interface);
6
3
  execute(builder: GQLSchemaFactory.SchemaBuilder): Promise<GQLSchemaFactory.SchemaBuilder>;
7
4
  }
8
5
  export declare const WebsiteBuilderPageSchemaFactory: typeof WebsiteBuilderPageSchemaFactoryImpl & {
@@ -1,11 +1,6 @@
1
1
  import { GraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.js";
2
- import { WcpContext } from "@webiny/api-core/features/wcp/WcpContext/index.js";
3
2
  class WebsiteBuilderPageSchemaFactoryImpl {
4
- constructor(wcpContext){
5
- this.wcpContext = wcpContext;
6
- }
7
3
  async execute(builder) {
8
- if (!this.wcpContext.canUseWorkflows()) return builder;
9
4
  builder.addTypeDefs(`
10
5
  extend type WbPage {
11
6
  system: CmsEntrySystem
@@ -21,9 +16,7 @@ class WebsiteBuilderPageSchemaFactoryImpl {
21
16
  }
22
17
  const WebsiteBuilderPageSchemaFactory = GraphQLSchemaFactory.createImplementation({
23
18
  implementation: WebsiteBuilderPageSchemaFactoryImpl,
24
- dependencies: [
25
- WcpContext
26
- ]
19
+ dependencies: []
27
20
  });
28
21
  export { WebsiteBuilderPageSchemaFactory };
29
22
 
@@ -1 +1 @@
1
- {"version":3,"file":"WebsiteBuilderPageSchemaFactory.js","sources":["../src/WebsiteBuilderPageSchemaFactory.ts"],"sourcesContent":["import { GraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.js\";\nimport type {\n IGraphQLSchemaFactory,\n GraphQLSchemaFactory as GQLSchemaFactory\n} from \"@webiny/api-graphql/graphql/abstractions.js\";\nimport { WcpContext } from \"@webiny/api-core/features/wcp/WcpContext/index.js\";\nimport type { WbPage } from \"@webiny/api-website-builder/domain/page/abstractions.js\";\n\nclass WebsiteBuilderPageSchemaFactoryImpl implements IGraphQLSchemaFactory {\n constructor(private wcpContext: WcpContext.Interface) {}\n\n async execute(\n builder: GQLSchemaFactory.SchemaBuilder\n ): Promise<GQLSchemaFactory.SchemaBuilder> {\n // WCP-gated, per-tenant: `system` is only exposed on WbPage when the workflows license\n // allows it. The base /graphql schema is rebuilt per request (post-auth), so the gate is\n // evaluated per tenant. (Previously this was a GraphQLSchemaPlugin with `isApplicable`,\n // routed into the no-longer-read ctx.plugins bag, so it never actually reached the schema.)\n if (!this.wcpContext.canUseWorkflows()) {\n return builder;\n }\n\n builder.addTypeDefs(/* GraphQL */ `\n extend type WbPage {\n system: CmsEntrySystem\n }\n `);\n builder.addLegacyResolvers({\n WbPage: {\n system: (page: WbPage) => page.system\n }\n });\n\n return builder;\n }\n}\n\nexport const WebsiteBuilderPageSchemaFactory = GraphQLSchemaFactory.createImplementation({\n implementation: WebsiteBuilderPageSchemaFactoryImpl,\n dependencies: [WcpContext]\n});\n"],"names":["WebsiteBuilderPageSchemaFactoryImpl","wcpContext","builder","page","WebsiteBuilderPageSchemaFactory","GraphQLSchemaFactory","WcpContext"],"mappings":";;AAQA,MAAMA;IACF,YAAoBC,UAAgC,CAAE;aAAlCA,UAAU,GAAVA;IAAmC;IAEvD,MAAM,QACFC,OAAuC,EACA;QAKvC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,eAAe,IAChC,OAAOA;QAGXA,QAAQ,WAAW,CAAe,CAAC;;;;QAInC,CAAC;QACDA,QAAQ,kBAAkB,CAAC;YACvB,QAAQ;gBACJ,QAAQ,CAACC,OAAiBA,KAAK,MAAM;YACzC;QACJ;QAEA,OAAOD;IACX;AACJ;AAEO,MAAME,kCAAkCC,qBAAqB,oBAAoB,CAAC;IACrF,gBAAgBL;IAChB,cAAc;QAACM;KAAW;AAC9B"}
1
+ {"version":3,"file":"WebsiteBuilderPageSchemaFactory.js","sources":["../src/WebsiteBuilderPageSchemaFactory.ts"],"sourcesContent":["import { GraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.js\";\nimport type {\n IGraphQLSchemaFactory,\n GraphQLSchemaFactory as GQLSchemaFactory\n} from \"@webiny/api-graphql/graphql/abstractions.js\";\nimport type { WbPage } from \"@webiny/api-website-builder/domain/page/abstractions.js\";\n\n// Only registered when advancedPublishingWorkflow is licensed (WebsiteBuilderWorkflowsFeature gates\n// on the flag at register time), so no per-request license guard is needed here.\nclass WebsiteBuilderPageSchemaFactoryImpl implements IGraphQLSchemaFactory {\n async execute(\n builder: GQLSchemaFactory.SchemaBuilder\n ): Promise<GQLSchemaFactory.SchemaBuilder> {\n builder.addTypeDefs(/* GraphQL */ `\n extend type WbPage {\n system: CmsEntrySystem\n }\n `);\n builder.addLegacyResolvers({\n WbPage: {\n system: (page: WbPage) => page.system\n }\n });\n\n return builder;\n }\n}\n\nexport const WebsiteBuilderPageSchemaFactory = GraphQLSchemaFactory.createImplementation({\n implementation: WebsiteBuilderPageSchemaFactoryImpl,\n dependencies: []\n});\n"],"names":["WebsiteBuilderPageSchemaFactoryImpl","builder","page","WebsiteBuilderPageSchemaFactory","GraphQLSchemaFactory"],"mappings":";AASA,MAAMA;IACF,MAAM,QACFC,OAAuC,EACA;QACvCA,QAAQ,WAAW,CAAe,CAAC;;;;QAInC,CAAC;QACDA,QAAQ,kBAAkB,CAAC;YACvB,QAAQ;gBACJ,QAAQ,CAACC,OAAiBA,KAAK,MAAM;YACzC;QACJ;QAEA,OAAOD;IACX;AACJ;AAEO,MAAME,kCAAkCC,qBAAqB,oBAAoB,CAAC;IACrF,gBAAgBJ;IAChB,cAAc,EAAE;AACpB"}
@@ -1,9 +1,11 @@
1
1
  import { createFeature } from "@webiny/feature/api";
2
+ import { FeatureFlags } from "@webiny/api-core/features/featureFlags/abstractions.js";
2
3
  import { PageWorkflowsFeature } from "./features/PageWorkflows/feature.js";
3
4
  import { WebsiteBuilderPageSchemaFactory } from "./WebsiteBuilderPageSchemaFactory.js";
4
5
  const WebsiteBuilderWorkflowsFeature = createFeature({
5
6
  name: "WebsiteBuilderWorkflows",
6
7
  register (container) {
8
+ if (!container.resolve(FeatureFlags).get().isEnabled("advancedPublishingWorkflow")) return;
7
9
  PageWorkflowsFeature.register(container);
8
10
  container.register(WebsiteBuilderPageSchemaFactory);
9
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"WebsiteBuilderWorkflowsFeature.js","sources":["../src/WebsiteBuilderWorkflowsFeature.ts"],"sourcesContent":["import { type Container, createFeature } from \"@webiny/feature/api\";\nimport { PageWorkflowsFeature } from \"./features/PageWorkflows/feature.js\";\nimport { WebsiteBuilderPageSchemaFactory } from \"./WebsiteBuilderPageSchemaFactory.js\";\n\nexport const WebsiteBuilderWorkflowsFeature = createFeature({\n name: \"WebsiteBuilderWorkflows\",\n register(container: Container) {\n // Page workflow handlers/decorators are register-time-safe and inert without workflow state\n // (no license → no workflow states), so register unconditionally — matching CmsWorkflowsFeature.\n // The WbPage.system schema extension is WCP-gated inside WebsiteBuilderPageSchemaFactory.\n PageWorkflowsFeature.register(container);\n container.register(WebsiteBuilderPageSchemaFactory);\n }\n});\n"],"names":["WebsiteBuilderWorkflowsFeature","createFeature","container","PageWorkflowsFeature","WebsiteBuilderPageSchemaFactory"],"mappings":";;;AAIO,MAAMA,iCAAiCC,cAAc;IACxD,MAAM;IACN,UAASC,SAAoB;QAIzBC,qBAAqB,QAAQ,CAACD;QAC9BA,UAAU,QAAQ,CAACE;IACvB;AACJ"}
1
+ {"version":3,"file":"WebsiteBuilderWorkflowsFeature.js","sources":["../src/WebsiteBuilderWorkflowsFeature.ts"],"sourcesContent":["import { type Container, createFeature } from \"@webiny/feature/api\";\nimport { FeatureFlags } from \"@webiny/api-core/features/featureFlags/abstractions.js\";\nimport { PageWorkflowsFeature } from \"./features/PageWorkflows/feature.js\";\nimport { WebsiteBuilderPageSchemaFactory } from \"./WebsiteBuilderPageSchemaFactory.js\";\n\nexport const WebsiteBuilderWorkflowsFeature = createFeature({\n name: \"WebsiteBuilderWorkflows\",\n register(container: 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 PageWorkflowsFeature.register(container);\n container.register(WebsiteBuilderPageSchemaFactory);\n }\n});\n"],"names":["WebsiteBuilderWorkflowsFeature","createFeature","container","FeatureFlags","PageWorkflowsFeature","WebsiteBuilderPageSchemaFactory"],"mappings":";;;;AAKO,MAAMA,iCAAiCC,cAAc;IACxD,MAAM;IACN,UAASC,SAAoB;QAGzB,IAAI,CAACA,UAAU,OAAO,CAACC,cAAc,GAAG,GAAG,SAAS,CAAC,+BACjD;QAGJC,qBAAqB,QAAQ,CAACF;QAC9BA,UAAU,QAAQ,CAACG;IACvB;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-website-builder-workflows",
3
- "version": "6.6.0-alpha.0",
3
+ "version": "6.6.0-alpha.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -17,24 +17,23 @@
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-graphql": "6.6.0-alpha.0",
24
- "@webiny/api-website-builder": "6.6.0-alpha.0",
25
- "@webiny/api-workflows": "6.6.0-alpha.0",
26
- "@webiny/error": "6.6.0-alpha.0",
27
- "@webiny/feature": "6.6.0-alpha.0",
28
- "@webiny/shared-aco": "6.6.0-alpha.0"
20
+ "@webiny/api": "6.6.0-alpha.2",
21
+ "@webiny/api-aco": "6.6.0-alpha.2",
22
+ "@webiny/api-core": "6.6.0-alpha.2",
23
+ "@webiny/api-graphql": "6.6.0-alpha.2",
24
+ "@webiny/api-website-builder": "6.6.0-alpha.2",
25
+ "@webiny/api-workflows": "6.6.0-alpha.2",
26
+ "@webiny/error": "6.6.0-alpha.2",
27
+ "@webiny/feature": "6.6.0-alpha.2",
28
+ "@webiny/shared-aco": "6.6.0-alpha.2"
29
29
  },
30
30
  "devDependencies": {
31
- "@webiny/api-headless-cms": "6.6.0-alpha.0",
32
- "@webiny/api-headless-cms-testing": "6.6.0-alpha.0",
33
- "@webiny/build-tools": "6.6.0-alpha.0",
34
- "@webiny/plugins": "6.6.0-alpha.0",
35
- "@webiny/project-utils": "6.6.0-alpha.0",
31
+ "@webiny/api-headless-cms": "6.6.0-alpha.2",
32
+ "@webiny/api-headless-cms-testing": "6.6.0-alpha.2",
33
+ "@webiny/build-tools": "6.6.0-alpha.2",
34
+ "@webiny/plugins": "6.6.0-alpha.2",
36
35
  "typescript": "7.0.2",
37
- "vitest": "4.1.10"
36
+ "vitest": "4.1.11"
38
37
  },
39
38
  "publishConfig": {
40
39
  "access": "public"