@webiny/api-headless-cms-ddb 5.33.1 → 5.33.2-beta.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.
- package/index.js +5 -5
- package/index.js.map +1 -1
- package/package.json +10 -10
package/index.js
CHANGED
|
@@ -76,10 +76,6 @@ const createStorageOperations = params => {
|
|
|
76
76
|
})
|
|
77
77
|
};
|
|
78
78
|
const plugins = new _plugins.PluginsContainer([
|
|
79
|
-
/**
|
|
80
|
-
* User defined custom plugins.
|
|
81
|
-
*/
|
|
82
|
-
...(userPlugins || []),
|
|
83
79
|
/**
|
|
84
80
|
* DynamoDB filter plugins for the where conditions.
|
|
85
81
|
*/
|
|
@@ -87,7 +83,11 @@ const createStorageOperations = params => {
|
|
|
87
83
|
/**
|
|
88
84
|
* Field plugins for DynamoDB.
|
|
89
85
|
*/
|
|
90
|
-
(0, _dynamoDb.default)()
|
|
86
|
+
(0, _dynamoDb.default)(),
|
|
87
|
+
/**
|
|
88
|
+
* User defined custom plugins.
|
|
89
|
+
*/
|
|
90
|
+
...(userPlugins || [])]);
|
|
91
91
|
return {
|
|
92
92
|
beforeInit: async context => {
|
|
93
93
|
/**
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createStorageOperations","params","attributes","table","documentClient","plugins","userPlugins","tableInstance","createTable","entities","settings","createSettingsEntity","entityName","ENTITIES","SETTINGS","system","createSystemEntity","SYSTEM","groups","createGroupEntity","GROUPS","models","createModelEntity","MODELS","entries","createEntryEntity","ENTRIES","PluginsContainer","dynamoDbValueFilters","dynamoDbPlugins","beforeInit","context","fieldPlugins","byType","register","getEntities","getTable","createSystemStorageOperations","entity","createSettingsStorageOperations","createGroupsStorageOperations","createModelsStorageOperations","createEntriesStorageOperations"],"sources":["index.ts"],"sourcesContent":["import dynamoDbValueFilters from \"@webiny/db-dynamodb/plugins/filters\";\nimport dynamoDbPlugins from \"./dynamoDb\";\nimport { ENTITIES, StorageOperationsFactory } from \"~/types\";\nimport { createTable } from \"~/definitions/table\";\nimport { createSettingsEntity } from \"~/definitions/settings\";\nimport { createSystemEntity } from \"~/definitions/system\";\nimport { createGroupEntity } from \"~/definitions/group\";\nimport { createModelEntity } from \"~/definitions/model\";\nimport { createEntryEntity } from \"~/definitions/entry\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { createSystemStorageOperations } from \"~/operations/system\";\nimport { createSettingsStorageOperations } from \"~/operations/settings\";\nimport { createGroupsStorageOperations } from \"~/operations/group\";\nimport { createModelsStorageOperations } from \"~/operations/model\";\nimport { createEntriesStorageOperations } from \"./operations/entry\";\nimport { CmsModelFieldToGraphQLPlugin } from \"@webiny/api-headless-cms/types\";\n\nexport const createStorageOperations: StorageOperationsFactory = params => {\n const { attributes, table, documentClient, plugins: userPlugins } = params;\n\n const tableInstance = createTable({\n table,\n documentClient\n });\n\n const entities = {\n settings: createSettingsEntity({\n entityName: ENTITIES.SETTINGS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.SETTINGS] : {}\n }),\n system: createSystemEntity({\n entityName: ENTITIES.SYSTEM,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.SYSTEM] : {}\n }),\n groups: createGroupEntity({\n entityName: ENTITIES.GROUPS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.GROUPS] : {}\n }),\n models: createModelEntity({\n entityName: ENTITIES.MODELS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.MODELS] : {}\n }),\n entries: createEntryEntity({\n entityName: ENTITIES.ENTRIES,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.ENTRIES] : {}\n })\n };\n\n const plugins = new PluginsContainer([\n /**\n *
|
|
1
|
+
{"version":3,"names":["createStorageOperations","params","attributes","table","documentClient","plugins","userPlugins","tableInstance","createTable","entities","settings","createSettingsEntity","entityName","ENTITIES","SETTINGS","system","createSystemEntity","SYSTEM","groups","createGroupEntity","GROUPS","models","createModelEntity","MODELS","entries","createEntryEntity","ENTRIES","PluginsContainer","dynamoDbValueFilters","dynamoDbPlugins","beforeInit","context","fieldPlugins","byType","register","getEntities","getTable","createSystemStorageOperations","entity","createSettingsStorageOperations","createGroupsStorageOperations","createModelsStorageOperations","createEntriesStorageOperations"],"sources":["index.ts"],"sourcesContent":["import dynamoDbValueFilters from \"@webiny/db-dynamodb/plugins/filters\";\nimport dynamoDbPlugins from \"./dynamoDb\";\nimport { ENTITIES, StorageOperationsFactory } from \"~/types\";\nimport { createTable } from \"~/definitions/table\";\nimport { createSettingsEntity } from \"~/definitions/settings\";\nimport { createSystemEntity } from \"~/definitions/system\";\nimport { createGroupEntity } from \"~/definitions/group\";\nimport { createModelEntity } from \"~/definitions/model\";\nimport { createEntryEntity } from \"~/definitions/entry\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { createSystemStorageOperations } from \"~/operations/system\";\nimport { createSettingsStorageOperations } from \"~/operations/settings\";\nimport { createGroupsStorageOperations } from \"~/operations/group\";\nimport { createModelsStorageOperations } from \"~/operations/model\";\nimport { createEntriesStorageOperations } from \"./operations/entry\";\nimport { CmsModelFieldToGraphQLPlugin } from \"@webiny/api-headless-cms/types\";\n\nexport const createStorageOperations: StorageOperationsFactory = params => {\n const { attributes, table, documentClient, plugins: userPlugins } = params;\n\n const tableInstance = createTable({\n table,\n documentClient\n });\n\n const entities = {\n settings: createSettingsEntity({\n entityName: ENTITIES.SETTINGS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.SETTINGS] : {}\n }),\n system: createSystemEntity({\n entityName: ENTITIES.SYSTEM,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.SYSTEM] : {}\n }),\n groups: createGroupEntity({\n entityName: ENTITIES.GROUPS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.GROUPS] : {}\n }),\n models: createModelEntity({\n entityName: ENTITIES.MODELS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.MODELS] : {}\n }),\n entries: createEntryEntity({\n entityName: ENTITIES.ENTRIES,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.ENTRIES] : {}\n })\n };\n\n const plugins = new PluginsContainer([\n /**\n * DynamoDB filter plugins for the where conditions.\n */\n dynamoDbValueFilters(),\n /**\n * Field plugins for DynamoDB.\n */\n dynamoDbPlugins(),\n /**\n * User defined custom plugins.\n */\n ...(userPlugins || [])\n ]);\n\n return {\n beforeInit: async context => {\n /**\n * Collect all required plugins from parent context.\n */\n const fieldPlugins = context.plugins.byType<CmsModelFieldToGraphQLPlugin>(\n \"cms-model-field-to-graphql\"\n );\n plugins.register(fieldPlugins);\n\n /**\n * Pass the plugins to the parent context.\n */\n context.plugins.register([dynamoDbPlugins()]);\n },\n getEntities: () => entities,\n getTable: () => tableInstance,\n system: createSystemStorageOperations({\n entity: entities.system\n }),\n settings: createSettingsStorageOperations({\n entity: entities.settings\n }),\n groups: createGroupsStorageOperations({\n entity: entities.groups,\n plugins\n }),\n models: createModelsStorageOperations({\n entity: entities.models\n }),\n entries: createEntriesStorageOperations({\n entity: entities.entries,\n plugins\n })\n };\n};\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGO,MAAMA,uBAAiD,GAAGC,MAAM,IAAI;EACvE,MAAM;IAAEC,UAAF;IAAcC,KAAd;IAAqBC,cAArB;IAAqCC,OAAO,EAAEC;EAA9C,IAA8DL,MAApE;EAEA,MAAMM,aAAa,GAAG,IAAAC,kBAAA,EAAY;IAC9BL,KAD8B;IAE9BC;EAF8B,CAAZ,CAAtB;EAKA,MAAMK,QAAQ,GAAG;IACbC,QAAQ,EAAE,IAAAC,8BAAA,EAAqB;MAC3BC,UAAU,EAAEC,eAAA,CAASC,QADM;MAE3BX,KAAK,EAAEI,aAFoB;MAG3BL,UAAU,EAAEA,UAAU,GAAGA,UAAU,CAACW,eAAA,CAASC,QAAV,CA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AAO,CAAC6B,QAAR,CAAiBF,YAAjB;MAEA;AACZ;AACA;;MACYD,OAAO,CAAC1B,OAAR,CAAgB6B,QAAhB,CAAyB,CAAC,IAAAL,iBAAA,GAAD,CAAzB;IACH,CAdE;IAeHM,WAAW,EAAE,MAAM1B,QAfhB;IAgBH2B,QAAQ,EAAE,MAAM7B,aAhBb;IAiBHQ,MAAM,EAAE,IAAAsB,sCAAA,EAA8B;MAClCC,MAAM,EAAE7B,QAAQ,CAACM;IADiB,CAA9B,CAjBL;IAoBHL,QAAQ,EAAE,IAAA6B,0CAAA,EAAgC;MACtCD,MAAM,EAAE7B,QAAQ,CAACC;IADqB,CAAhC,CApBP;IAuBHQ,MAAM,EAAE,IAAAsB,qCAAA,EAA8B;MAClCF,MAAM,EAAE7B,QAAQ,CAACS,MADiB;MAElCb;IAFkC,CAA9B,CAvBL;IA2BHgB,MAAM,EAAE,IAAAoB,qCAAA,EAA8B;MAClCH,MAAM,EAAE7B,QAAQ,CAACY;IADiB,CAA9B,CA3BL;IA8BHG,OAAO,EAAE,IAAAkB,sCAAA,EAA+B;MACpCJ,MAAM,EAAE7B,QAAQ,CAACe,OADmB;MAEpCnB;IAFoC,CAA/B;EA9BN,CAAP;AAmCH,CAtFM"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-headless-cms-ddb",
|
|
3
|
-
"version": "5.33.1",
|
|
3
|
+
"version": "5.33.2-beta.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"@webiny/api-headless-cms",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@babel/runtime": "7.18.9",
|
|
25
|
-
"@webiny/api-headless-cms": "5.33.1",
|
|
26
|
-
"@webiny/db-dynamodb": "5.33.1",
|
|
27
|
-
"@webiny/error": "5.33.1",
|
|
28
|
-
"@webiny/handler-db": "5.33.1",
|
|
29
|
-
"@webiny/utils": "5.33.1",
|
|
25
|
+
"@webiny/api-headless-cms": "5.33.2-beta.1",
|
|
26
|
+
"@webiny/db-dynamodb": "5.33.2-beta.1",
|
|
27
|
+
"@webiny/error": "5.33.2-beta.1",
|
|
28
|
+
"@webiny/handler-db": "5.33.2-beta.1",
|
|
29
|
+
"@webiny/utils": "5.33.2-beta.1",
|
|
30
30
|
"aws-sdk": "2.1188.0",
|
|
31
31
|
"dataloader": "2.1.0",
|
|
32
32
|
"dot-prop": "6.0.1",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"@babel/preset-env": "^7.16.4",
|
|
41
41
|
"@babel/preset-flow": "^7.16.0",
|
|
42
42
|
"@types/jsonpack": "^1.1.0",
|
|
43
|
-
"@webiny/cli": "^5.33.1",
|
|
44
|
-
"@webiny/plugins": "^5.33.1",
|
|
45
|
-
"@webiny/project-utils": "^5.33.1",
|
|
43
|
+
"@webiny/cli": "^5.33.2-beta.1",
|
|
44
|
+
"@webiny/plugins": "^5.33.2-beta.1",
|
|
45
|
+
"@webiny/project-utils": "^5.33.2-beta.1",
|
|
46
46
|
"jest": "^28.1.0",
|
|
47
47
|
"jest-dynalite": "^3.2.0",
|
|
48
48
|
"jest-environment-node": "^27.2.4",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"build": "yarn webiny run build",
|
|
58
58
|
"watch": "yarn webiny run watch"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "7d317aae0597e02bbd21501da0fadff18a7b3a9b"
|
|
61
61
|
}
|