@webiny/api-headless-cms-bulk-actions 6.5.2-beta.1 → 6.5.2-beta.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.
|
@@ -36,6 +36,62 @@ const canMoveToFolder = async (context, folderId)=>{
|
|
|
36
36
|
rwd: "w"
|
|
37
37
|
});
|
|
38
38
|
};
|
|
39
|
+
const canActOnlyOnOwnedEntries = async (context, model, action)=>{
|
|
40
|
+
const { accessControl } = context.cms;
|
|
41
|
+
if (await accessControl.canAccessOnlyOwnedEntries({
|
|
42
|
+
model
|
|
43
|
+
})) return true;
|
|
44
|
+
const identity = context.security.getIdentity();
|
|
45
|
+
const canActOnOthers = await accessControl.canAccessEntry({
|
|
46
|
+
model,
|
|
47
|
+
entry: {
|
|
48
|
+
entryId: "",
|
|
49
|
+
createdBy: {
|
|
50
|
+
id: `${identity.id}#not-owner`,
|
|
51
|
+
displayName: "",
|
|
52
|
+
type: ""
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
...getRequiredAccess(action)
|
|
56
|
+
});
|
|
57
|
+
return !canActOnOthers;
|
|
58
|
+
};
|
|
59
|
+
const listDeniedFolderIds = async (context, model, action)=>{
|
|
60
|
+
const [flp] = context.container.resolveAll(FolderLevelPermissions);
|
|
61
|
+
if (!flp || !flp.canUseFolderLevelPermissions()) return [];
|
|
62
|
+
const rwd = "d" === getRequiredAccess(action).rwd ? "d" : "w";
|
|
63
|
+
const flps = await flp.listFolderLevelPermissions({
|
|
64
|
+
where: {
|
|
65
|
+
type: `cms:${model.modelId}`,
|
|
66
|
+
path_startsWith: `${ROOT_FOLDER}/`
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
const denied = [];
|
|
70
|
+
for (const item of flps)if (!await flp.canAccessFolderContent({
|
|
71
|
+
permissions: item.permissions,
|
|
72
|
+
rwd
|
|
73
|
+
})) denied.push(item.id);
|
|
74
|
+
return denied;
|
|
75
|
+
};
|
|
76
|
+
const restrictWhere = async (context, model, action, initialWhere)=>{
|
|
77
|
+
const where = {
|
|
78
|
+
...initialWhere
|
|
79
|
+
};
|
|
80
|
+
if (await canActOnlyOnOwnedEntries(context, model, action)) where.createdBy = context.security.getIdentity().id;
|
|
81
|
+
const deniedFolderIds = await listDeniedFolderIds(context, model, action);
|
|
82
|
+
if (deniedFolderIds.length > 0) {
|
|
83
|
+
const location = where.location ?? where.wbyAco_location ?? {};
|
|
84
|
+
delete where.location;
|
|
85
|
+
where.wbyAco_location = {
|
|
86
|
+
...location,
|
|
87
|
+
folderId_not_in: [
|
|
88
|
+
...location.folderId_not_in ?? [],
|
|
89
|
+
...deniedFolderIds
|
|
90
|
+
]
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
return where;
|
|
94
|
+
};
|
|
39
95
|
const createBulkActionGraphQL = async (context, bulkAction)=>{
|
|
40
96
|
const tenant = context.tenancy.getCurrentTenant();
|
|
41
97
|
if (!await isHeadlessCmsReady(context)) return;
|
|
@@ -74,11 +130,12 @@ const createBulkActionGraphQL = async (context, bulkAction)=>{
|
|
|
74
130
|
if (!await canMoveToFolder(context, folderId)) return new ErrorResponse(EntryNotAuthorizedError.fromModel(model));
|
|
75
131
|
}
|
|
76
132
|
const identity = context.security.getIdentity();
|
|
133
|
+
const where = await restrictWhere(context, model, args.action, args.where);
|
|
77
134
|
const response = await context.tasks.trigger({
|
|
78
135
|
definition: `hcmsBulkList${args.action}Entries`,
|
|
79
136
|
input: {
|
|
80
137
|
modelId: model.modelId,
|
|
81
|
-
where
|
|
138
|
+
where,
|
|
82
139
|
search: args.search,
|
|
83
140
|
data: args.data,
|
|
84
141
|
identity
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql/createBulkActionGraphQL.js","sources":["../../src/graphql/createBulkActionGraphQL.ts"],"sourcesContent":["import type { HcmsBulkActionsContext } from \"~/types.js\";\nimport { CmsGraphQLSchemaPlugin, isHeadlessCmsReady } from \"@webiny/api-headless-cms\";\nimport { ErrorResponse, Response } from \"@webiny/handler-graphql\";\nimport { EntryNotAuthorizedError } from \"@webiny/api-headless-cms/domain/contentEntry/errors.js\";\nimport { CMS_MODEL_SINGLETON_TAG } from \"@webiny/api-headless-cms/constants.js\";\nimport { EntriesBulkAction } from \"~/features/EntriesBulkAction/abstractions.js\";\nimport { BulkActionName } from \"~/domain/BulkActionName.js\";\nimport { FolderLevelPermissions } from \"@webiny/api-aco/features/flp/FolderLevelPermissions/index.js\";\nimport { ROOT_FOLDER } from \"@webiny/api-aco/constants.js\";\n\n/**\n * The permission each bulk action requires on the model, matching the single-entry use case it runs.\n * Custom bulk actions require write access.\n */\nconst getRequiredAccess = (action: string): { rwd?: string; pw?: string } => {\n switch (action) {\n case \"Delete\":\n case \"MoveToTrash\":\n return { rwd: \"d\" };\n case \"Publish\":\n return { pw: \"p\" };\n case \"Unpublish\":\n return { pw: \"u\" };\n default:\n return { rwd: \"w\" };\n }\n};\n\n/**\n * Bulk action tasks run without authorization, so the target folder of a move is checked here,\n * with the same folder-level permission check the single-entry move uses.\n */\nconst canMoveToFolder = async (\n context: HcmsBulkActionsContext,\n folderId: string\n): Promise<boolean> => {\n if (folderId === ROOT_FOLDER) {\n return true;\n }\n\n const [flp] = context.container.resolveAll(FolderLevelPermissions);\n if (!flp || !flp.canUseFolderLevelPermissions()) {\n return true;\n }\n\n const permissions = await flp.getFolderLevelPermissions(folderId);\n return flp.canAccessFolderContent({ permissions, rwd: \"w\" });\n};\n\nexport const createBulkActionGraphQL = async (\n context: HcmsBulkActionsContext,\n bulkAction: EntriesBulkAction.Interface\n) => {\n const tenant = context.tenancy.getCurrentTenant();\n\n // TODO: once we have GraphSchema plugin via an abstraction, we'll be able to remove this.\n if (!(await isHeadlessCmsReady(context))) {\n return;\n }\n\n const models = await context.security.withoutAuthorization(async () => {\n const allModels = await context.cms.listModels();\n return allModels.filter(model => {\n if (model.isPrivate) {\n return false;\n }\n const tags = Array.isArray(model.tags) ? model.tags : [];\n if (tags.includes(CMS_MODEL_SINGLETON_TAG)) {\n return false;\n }\n if (bulkAction.modelIds?.length) {\n return bulkAction.modelIds.includes(model.modelId);\n }\n return true;\n });\n });\n\n const plugins: CmsGraphQLSchemaPlugin<HcmsBulkActionsContext>[] = [];\n\n models.forEach(model => {\n const plugin = new CmsGraphQLSchemaPlugin<HcmsBulkActionsContext>({\n typeDefs: /* GraphQL */ `\n extend enum BulkAction${model.singularApiName}Name {\n ${BulkActionName.from(bulkAction.name)}\n }\n `,\n resolvers: {\n Mutation: {\n [`bulkAction${model.singularApiName}`]: async (_, args, context) => {\n const canAccess = await context.cms.accessControl.canAccessEntry({\n model,\n ...getRequiredAccess(args.action)\n });\n if (!canAccess) {\n return new ErrorResponse(EntryNotAuthorizedError.fromModel(model));\n }\n\n if (args.action === BulkActionName.from(\"moveToFolder\")) {\n const folderId = args.data?.folderId;\n if (!folderId) {\n return new ErrorResponse({\n code: \"VALIDATION_FAILED\",\n message: `Missing \"data.folderId\" in the input.`\n });\n }\n if (!(await canMoveToFolder(context, folderId))) {\n return new ErrorResponse(EntryNotAuthorizedError.fromModel(model));\n }\n }\n\n const identity = context.security.getIdentity();\n\n const response = await context.tasks.trigger({\n definition: `hcmsBulkList${args.action}Entries`,\n input: {\n modelId: model.modelId,\n where: args.where,\n search: args.search,\n data: args.data,\n identity\n }\n });\n\n return new Response({\n id: response.value.id\n });\n }\n }\n },\n // Bulk actions change entries, so they are only part of the manage API.\n isApplicable: context => {\n return context.cms.MANAGE && context.tenancy.getCurrentTenant().id === tenant.id;\n }\n });\n\n plugin.name = `headless-cms.graphql.schema.bulkAction.${model.modelId}.${bulkAction.name}`;\n plugins.push(plugin);\n });\n\n context.plugins.register([...plugins]);\n};\n"],"names":["getRequiredAccess","action","canMoveToFolder","context","folderId","ROOT_FOLDER","flp","FolderLevelPermissions","permissions","createBulkActionGraphQL","bulkAction","tenant","isHeadlessCmsReady","models","allModels","model","tags","Array","CMS_MODEL_SINGLETON_TAG","plugins","plugin","CmsGraphQLSchemaPlugin","BulkActionName","_","args","canAccess","ErrorResponse","EntryNotAuthorizedError","identity","response","Response"],"mappings":";;;;;;;AAcA,MAAMA,oBAAoB,CAACC;IACvB,OAAQA;QACJ,KAAK;QACL,KAAK;YACD,OAAO;gBAAE,KAAK;YAAI;QACtB,KAAK;YACD,OAAO;gBAAE,IAAI;YAAI;QACrB,KAAK;YACD,OAAO;gBAAE,IAAI;YAAI;QACrB;YACI,OAAO;gBAAE,KAAK;YAAI;IAC1B;AACJ;AAMA,MAAMC,kBAAkB,OACpBC,SACAC;IAEA,IAAIA,aAAaC,aACb,OAAO;IAGX,MAAM,CAACC,IAAI,GAAGH,QAAQ,SAAS,CAAC,UAAU,CAACI;IAC3C,IAAI,CAACD,OAAO,CAACA,IAAI,4BAA4B,IACzC,OAAO;IAGX,MAAME,cAAc,MAAMF,IAAI,yBAAyB,CAACF;IACxD,OAAOE,IAAI,sBAAsB,CAAC;QAAEE;QAAa,KAAK;IAAI;AAC9D;AAEO,MAAMC,0BAA0B,OACnCN,SACAO;IAEA,MAAMC,SAASR,QAAQ,OAAO,CAAC,gBAAgB;IAG/C,IAAI,CAAE,MAAMS,mBAAmBT,UAC3B;IAGJ,MAAMU,SAAS,MAAMV,QAAQ,QAAQ,CAAC,oBAAoB,CAAC;QACvD,MAAMW,YAAY,MAAMX,QAAQ,GAAG,CAAC,UAAU;QAC9C,OAAOW,UAAU,MAAM,CAACC,CAAAA;YACpB,IAAIA,MAAM,SAAS,EACf,OAAO;YAEX,MAAMC,OAAOC,MAAM,OAAO,CAACF,MAAM,IAAI,IAAIA,MAAM,IAAI,GAAG,EAAE;YACxD,IAAIC,KAAK,QAAQ,CAACE,0BACd,OAAO;YAEX,IAAIR,WAAW,QAAQ,EAAE,QACrB,OAAOA,WAAW,QAAQ,CAAC,QAAQ,CAACK,MAAM,OAAO;YAErD,OAAO;QACX;IACJ;IAEA,MAAMI,UAA4D,EAAE;IAEpEN,OAAO,OAAO,CAACE,CAAAA;QAC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gB,GAAG,EAAE,KAAKQ,OAAO,EAAE;QAExF;QAEAS,OAAO,IAAI,GAAG,CAAC,uCAAuC,EAAEL,MAAM,OAAO,CAAC,CAAC,EAAEL,WAAW,IAAI,EAAE;QAC1FS,QAAQ,IAAI,CAACC;IACjB;IAEAjB,QAAQ,OAAO,CAAC,QAAQ,CAAC;WAAIgB;KAAQ;AACzC"}
|
|
1
|
+
{"version":3,"file":"graphql/createBulkActionGraphQL.js","sources":["../../src/graphql/createBulkActionGraphQL.ts"],"sourcesContent":["import type { HcmsBulkActionsContext } from \"~/types.js\";\nimport { CmsGraphQLSchemaPlugin, isHeadlessCmsReady } from \"@webiny/api-headless-cms\";\nimport { ErrorResponse, Response } from \"@webiny/handler-graphql\";\nimport { EntryNotAuthorizedError } from \"@webiny/api-headless-cms/domain/contentEntry/errors.js\";\nimport { CMS_MODEL_SINGLETON_TAG } from \"@webiny/api-headless-cms/constants.js\";\nimport { EntriesBulkAction } from \"~/features/EntriesBulkAction/abstractions.js\";\nimport { BulkActionName } from \"~/domain/BulkActionName.js\";\nimport { FolderLevelPermissions } from \"@webiny/api-aco/features/flp/FolderLevelPermissions/index.js\";\nimport { ROOT_FOLDER } from \"@webiny/api-aco/constants.js\";\nimport type { CmsEntryListWhere, CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\n\n/**\n * The permission each bulk action requires on the model, matching the single-entry use case it runs.\n * Custom bulk actions require write access.\n */\nconst getRequiredAccess = (action: string): { rwd?: string; pw?: string } => {\n switch (action) {\n case \"Delete\":\n case \"MoveToTrash\":\n return { rwd: \"d\" };\n case \"Publish\":\n return { pw: \"p\" };\n case \"Unpublish\":\n return { pw: \"u\" };\n default:\n return { rwd: \"w\" };\n }\n};\n\n/**\n * Bulk action tasks run without authorization, so the target folder of a move is checked here,\n * with the same folder-level permission check the single-entry move uses.\n */\nconst canMoveToFolder = async (\n context: HcmsBulkActionsContext,\n folderId: string\n): Promise<boolean> => {\n if (folderId === ROOT_FOLDER) {\n return true;\n }\n\n const [flp] = context.container.resolveAll(FolderLevelPermissions);\n if (!flp || !flp.canUseFolderLevelPermissions()) {\n return true;\n }\n\n const permissions = await flp.getFolderLevelPermissions(folderId);\n return flp.canAccessFolderContent({ permissions, rwd: \"w\" });\n};\n\n/**\n * Whether the caller may run the action only on entries they created. Besides own-only access,\n * this covers several permission sets (e.g. read all entries, delete own), where the action\n * itself is allowed only on own entries: it is checked against an entry the caller doesn't own.\n */\nconst canActOnlyOnOwnedEntries = async (\n context: HcmsBulkActionsContext,\n model: CmsModel,\n action: string\n): Promise<boolean> => {\n const { accessControl } = context.cms;\n if (await accessControl.canAccessOnlyOwnedEntries({ model })) {\n return true;\n }\n\n const identity = context.security.getIdentity();\n const canActOnOthers = await accessControl.canAccessEntry({\n model,\n entry: {\n entryId: \"\",\n createdBy: {\n id: `${identity.id}#not-owner`,\n displayName: \"\",\n type: \"\"\n }\n },\n ...getRequiredAccess(action)\n });\n return !canActOnOthers;\n};\n\n/**\n * Ids of the model's folders whose content the caller can't change with this action.\n */\nconst listDeniedFolderIds = async (\n context: HcmsBulkActionsContext,\n model: CmsModel,\n action: string\n): Promise<string[]> => {\n const [flp] = context.container.resolveAll(FolderLevelPermissions);\n if (!flp || !flp.canUseFolderLevelPermissions()) {\n return [];\n }\n\n const rwd = getRequiredAccess(action).rwd === \"d\" ? \"d\" : \"w\";\n\n // Every folder path starts with the root folder.\n const flps = await flp.listFolderLevelPermissions({\n where: { type: `cms:${model.modelId}`, path_startsWith: `${ROOT_FOLDER}/` }\n });\n\n const denied: string[] = [];\n for (const item of flps) {\n if (!(await flp.canAccessFolderContent({ permissions: item.permissions, rwd }))) {\n denied.push(item.id);\n }\n }\n return denied;\n};\n\n/**\n * Bulk action tasks list and change entries without authorization, so the task query is\n * restricted here to the entries the caller may act on: own entries only, when that is all the\n * caller may change, and no entries from folders the caller can't change.\n * The restrictions are set on the top level of `where`, so the client `where` can only narrow them.\n */\nconst restrictWhere = async (\n context: HcmsBulkActionsContext,\n model: CmsModel,\n action: string,\n initialWhere: CmsEntryListWhere | undefined\n): Promise<CmsEntryListWhere> => {\n const where: CmsEntryListWhere = { ...initialWhere };\n\n if (await canActOnlyOnOwnedEntries(context, model, action)) {\n where.createdBy = context.security.getIdentity().id;\n }\n\n const deniedFolderIds = await listDeniedFolderIds(context, model, action);\n if (deniedFolderIds.length > 0) {\n // Listing replaces `wbyAco_location` with `location` when both are set, so use the same one.\n const location = where.location ?? where.wbyAco_location ?? {};\n delete where.location;\n where.wbyAco_location = {\n ...location,\n folderId_not_in: [...(location.folderId_not_in ?? []), ...deniedFolderIds]\n };\n }\n\n return where;\n};\n\nexport const createBulkActionGraphQL = async (\n context: HcmsBulkActionsContext,\n bulkAction: EntriesBulkAction.Interface\n) => {\n const tenant = context.tenancy.getCurrentTenant();\n\n // TODO: once we have GraphSchema plugin via an abstraction, we'll be able to remove this.\n if (!(await isHeadlessCmsReady(context))) {\n return;\n }\n\n const models = await context.security.withoutAuthorization(async () => {\n const allModels = await context.cms.listModels();\n return allModels.filter(model => {\n if (model.isPrivate) {\n return false;\n }\n const tags = Array.isArray(model.tags) ? model.tags : [];\n if (tags.includes(CMS_MODEL_SINGLETON_TAG)) {\n return false;\n }\n if (bulkAction.modelIds?.length) {\n return bulkAction.modelIds.includes(model.modelId);\n }\n return true;\n });\n });\n\n const plugins: CmsGraphQLSchemaPlugin<HcmsBulkActionsContext>[] = [];\n\n models.forEach(model => {\n const plugin = new CmsGraphQLSchemaPlugin<HcmsBulkActionsContext>({\n typeDefs: /* GraphQL */ `\n extend enum BulkAction${model.singularApiName}Name {\n ${BulkActionName.from(bulkAction.name)}\n }\n `,\n resolvers: {\n Mutation: {\n [`bulkAction${model.singularApiName}`]: async (_, args, context) => {\n const canAccess = await context.cms.accessControl.canAccessEntry({\n model,\n ...getRequiredAccess(args.action)\n });\n if (!canAccess) {\n return new ErrorResponse(EntryNotAuthorizedError.fromModel(model));\n }\n\n if (args.action === BulkActionName.from(\"moveToFolder\")) {\n const folderId = args.data?.folderId;\n if (!folderId) {\n return new ErrorResponse({\n code: \"VALIDATION_FAILED\",\n message: `Missing \"data.folderId\" in the input.`\n });\n }\n if (!(await canMoveToFolder(context, folderId))) {\n return new ErrorResponse(EntryNotAuthorizedError.fromModel(model));\n }\n }\n\n const identity = context.security.getIdentity();\n\n const where = await restrictWhere(context, model, args.action, args.where);\n\n const response = await context.tasks.trigger({\n definition: `hcmsBulkList${args.action}Entries`,\n input: {\n modelId: model.modelId,\n where,\n search: args.search,\n data: args.data,\n identity\n }\n });\n\n return new Response({\n id: response.value.id\n });\n }\n }\n },\n // Bulk actions change entries, so they are only part of the manage API.\n isApplicable: context => {\n return context.cms.MANAGE && context.tenancy.getCurrentTenant().id === tenant.id;\n }\n });\n\n plugin.name = `headless-cms.graphql.schema.bulkAction.${model.modelId}.${bulkAction.name}`;\n plugins.push(plugin);\n });\n\n context.plugins.register([...plugins]);\n};\n"],"names":["getRequiredAccess","action","canMoveToFolder","context","folderId","ROOT_FOLDER","flp","FolderLevelPermissions","permissions","canActOnlyOnOwnedEntries","model","accessControl","identity","canActOnOthers","listDeniedFolderIds","rwd","flps","denied","item","restrictWhere","initialWhere","where","deniedFolderIds","location","createBulkActionGraphQL","bulkAction","tenant","isHeadlessCmsReady","models","allModels","tags","Array","CMS_MODEL_SINGLETON_TAG","plugins","plugin","CmsGraphQLSchemaPlugin","BulkActionName","_","args","canAccess","ErrorResponse","EntryNotAuthorizedError","response","Response"],"mappings":";;;;;;;AAeA,MAAMA,oBAAoB,CAACC;IACvB,OAAQA;QACJ,KAAK;QACL,KAAK;YACD,OAAO;gBAAE,KAAK;YAAI;QACtB,KAAK;YACD,OAAO;gBAAE,IAAI;YAAI;QACrB,KAAK;YACD,OAAO;gBAAE,IAAI;YAAI;QACrB;YACI,OAAO;gBAAE,KAAK;YAAI;IAC1B;AACJ;AAMA,MAAMC,kBAAkB,OACpBC,SACAC;IAEA,IAAIA,aAAaC,aACb,OAAO;IAGX,MAAM,CAACC,IAA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AQ,OAAO,CAAC,gBAAgB,GAAG,EAAE,KAAKuB,OAAO,EAAE;QAExF;QAEAQ,OAAO,IAAI,GAAG,CAAC,uCAAuC,EAAExB,MAAM,OAAO,CAAC,CAAC,EAAEe,WAAW,IAAI,EAAE;QAC1FQ,QAAQ,IAAI,CAACC;IACjB;IAEA/B,QAAQ,OAAO,CAAC,QAAQ,CAAC;WAAI8B;KAAQ;AACzC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-headless-cms-bulk-actions",
|
|
3
|
-
"version": "6.5.2-beta.
|
|
3
|
+
"version": "6.5.2-beta.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -17,25 +17,25 @@
|
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@webiny/api-aco": "6.5.2-beta.
|
|
21
|
-
"@webiny/api-headless-cms": "6.5.2-beta.
|
|
22
|
-
"@webiny/background-tasks": "6.5.2-beta.
|
|
23
|
-
"@webiny/feature": "6.5.2-beta.
|
|
24
|
-
"@webiny/handler": "6.5.2-beta.
|
|
25
|
-
"@webiny/handler-aws": "6.5.2-beta.
|
|
26
|
-
"@webiny/utils": "6.5.2-beta.
|
|
20
|
+
"@webiny/api-aco": "6.5.2-beta.2",
|
|
21
|
+
"@webiny/api-headless-cms": "6.5.2-beta.2",
|
|
22
|
+
"@webiny/background-tasks": "6.5.2-beta.2",
|
|
23
|
+
"@webiny/feature": "6.5.2-beta.2",
|
|
24
|
+
"@webiny/handler": "6.5.2-beta.2",
|
|
25
|
+
"@webiny/handler-aws": "6.5.2-beta.2",
|
|
26
|
+
"@webiny/utils": "6.5.2-beta.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@webiny/api": "6.5.2-beta.
|
|
30
|
-
"@webiny/api-core": "6.5.2-beta.
|
|
31
|
-
"@webiny/build-tools": "6.5.2-beta.
|
|
32
|
-
"@webiny/handler-graphql": "6.5.2-beta.
|
|
33
|
-
"@webiny/plugins": "6.5.2-beta.
|
|
34
|
-
"@webiny/project-utils": "6.5.2-beta.
|
|
35
|
-
"@webiny/wcp": "6.5.2-beta.
|
|
36
|
-
"graphql": "16.
|
|
29
|
+
"@webiny/api": "6.5.2-beta.2",
|
|
30
|
+
"@webiny/api-core": "6.5.2-beta.2",
|
|
31
|
+
"@webiny/build-tools": "6.5.2-beta.2",
|
|
32
|
+
"@webiny/handler-graphql": "6.5.2-beta.2",
|
|
33
|
+
"@webiny/plugins": "6.5.2-beta.2",
|
|
34
|
+
"@webiny/project-utils": "6.5.2-beta.2",
|
|
35
|
+
"@webiny/wcp": "6.5.2-beta.2",
|
|
36
|
+
"graphql": "16.15.0",
|
|
37
37
|
"typescript": "7.0.2",
|
|
38
|
-
"vitest": "5.0
|
|
38
|
+
"vitest": "5.1.0"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|