@webiny/api-file-manager-ddb 5.36.2 → 5.37.0-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 +7 -9
- package/index.js.map +1 -1
- package/operations/AliasesStorageOperations.d.ts +16 -0
- package/operations/AliasesStorageOperations.js +107 -0
- package/operations/AliasesStorageOperations.js.map +1 -0
- package/operations/FilesStorageOperations.d.ts +15 -0
- package/operations/FilesStorageOperations.js +35 -0
- package/operations/FilesStorageOperations.js.map +1 -0
- package/operations/{settings/SettingsStorageOperations.js → SettingsStorageOperations.js} +7 -8
- package/operations/SettingsStorageOperations.js.map +1 -0
- package/operations/{system/SystemStorageOperations.js → SystemStorageOperations.js} +13 -5
- package/operations/SystemStorageOperations.js.map +1 -0
- package/package.json +16 -17
- package/plugins/SettingsAttributePlugin.js.map +1 -1
- package/plugins/SystemAttributePlugin.js.map +1 -1
- package/plugins/index.d.ts +0 -2
- package/plugins/index.js +0 -22
- package/plugins/index.js.map +1 -1
- package/definitions/settingsEntity.d.ts +0 -6
- package/definitions/settingsEntity.js +0 -38
- package/definitions/settingsEntity.js.map +0 -1
- package/definitions/systemEntity.d.ts +0 -6
- package/definitions/systemEntity.js +0 -32
- package/definitions/systemEntity.js.map +0 -1
- package/definitions/table.d.ts +0 -7
- package/definitions/table.js +0 -25
- package/definitions/table.js.map +0 -1
- package/operations/files/FilesStorageOperations.d.ts +0 -26
- package/operations/files/FilesStorageOperations.js +0 -400
- package/operations/files/FilesStorageOperations.js.map +0 -1
- package/operations/files/fields.d.ts +0 -2
- package/operations/files/fields.js +0 -39
- package/operations/files/fields.js.map +0 -1
- package/operations/settings/SettingsStorageOperations.js.map +0 -1
- package/operations/system/SystemStorageOperations.js.map +0 -1
- package/operations/utils.d.ts +0 -4
- package/operations/utils.js +0 -26
- package/operations/utils.js.map +0 -1
- package/plugins/FileAttributePlugin.d.ts +0 -4
- package/plugins/FileAttributePlugin.js +0 -17
- package/plugins/FileAttributePlugin.js.map +0 -1
- package/plugins/FileDynamoDbFieldPlugin.d.ts +0 -4
- package/plugins/FileDynamoDbFieldPlugin.js +0 -12
- package/plugins/FileDynamoDbFieldPlugin.js.map +0 -1
- package/types.d.ts +0 -0
- package/types.js +0 -1
- package/types.js.map +0 -1
- package/operations/{settings/SettingsStorageOperations.d.ts → SettingsStorageOperations.d.ts} +1 -1
- /package/operations/{system/SystemStorageOperations.d.ts → SystemStorageOperations.d.ts} +0 -0
package/index.js
CHANGED
|
@@ -10,10 +10,9 @@ var _exportNames = {
|
|
|
10
10
|
exports.createFileManagerStorageOperations = void 0;
|
|
11
11
|
var _plugins = _interopRequireDefault(require("@webiny/db-dynamodb/plugins"));
|
|
12
12
|
var _plugins2 = require("@webiny/plugins");
|
|
13
|
-
var _FilesStorageOperations = require("./operations/
|
|
14
|
-
var _SettingsStorageOperations = require("./operations/
|
|
15
|
-
var _SystemStorageOperations = require("./operations/
|
|
16
|
-
var _fields = require("./operations/files/fields");
|
|
13
|
+
var _FilesStorageOperations = require("./operations/FilesStorageOperations");
|
|
14
|
+
var _SettingsStorageOperations = require("./operations/SettingsStorageOperations");
|
|
15
|
+
var _SystemStorageOperations = require("./operations/SystemStorageOperations");
|
|
17
16
|
var _plugins3 = require("./plugins");
|
|
18
17
|
Object.keys(_plugins3).forEach(function (key) {
|
|
19
18
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -26,24 +25,23 @@ Object.keys(_plugins3).forEach(function (key) {
|
|
|
26
25
|
}
|
|
27
26
|
});
|
|
28
27
|
});
|
|
28
|
+
var _AliasesStorageOperations = require("./operations/AliasesStorageOperations");
|
|
29
29
|
const createFileManagerStorageOperations = ({
|
|
30
30
|
documentClient,
|
|
31
31
|
plugins: userPlugins
|
|
32
32
|
}) => {
|
|
33
33
|
const plugins = new _plugins2.PluginsContainer([(0, _plugins.default)(),
|
|
34
|
-
// Built-in plugins
|
|
35
|
-
...(0, _fields.createFileFieldsPlugins)(),
|
|
36
34
|
// User plugins
|
|
37
35
|
...(userPlugins || [])]);
|
|
38
36
|
return {
|
|
39
37
|
beforeInit: async context => {
|
|
40
|
-
const types = [_plugins3.
|
|
38
|
+
const types = [_plugins3.SettingsAttributePlugin.type, _plugins3.SystemAttributePlugin.type];
|
|
41
39
|
for (const type of types) {
|
|
42
40
|
plugins.mergeByType(context.plugins, type);
|
|
43
41
|
}
|
|
44
42
|
},
|
|
45
|
-
files: new _FilesStorageOperations.FilesStorageOperations(
|
|
46
|
-
|
|
43
|
+
files: new _FilesStorageOperations.FilesStorageOperations(),
|
|
44
|
+
aliases: new _AliasesStorageOperations.AliasesStorageOperations({
|
|
47
45
|
documentClient
|
|
48
46
|
}),
|
|
49
47
|
settings: new _SettingsStorageOperations.SettingsStorageOperations({
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createFileManagerStorageOperations","documentClient","plugins","userPlugins","PluginsContainer","ddbPlugins","
|
|
1
|
+
{"version":3,"names":["_plugins","_interopRequireDefault","require","_plugins2","_FilesStorageOperations","_SettingsStorageOperations","_SystemStorageOperations","_plugins3","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_AliasesStorageOperations","createFileManagerStorageOperations","documentClient","plugins","userPlugins","PluginsContainer","ddbPlugins","beforeInit","context","types","SettingsAttributePlugin","type","SystemAttributePlugin","mergeByType","files","FilesStorageOperations","aliases","AliasesStorageOperations","settings","SettingsStorageOperations","system","SystemStorageOperations"],"sources":["index.ts"],"sourcesContent":["import { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport ddbPlugins from \"@webiny/db-dynamodb/plugins\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { PluginCollection } from \"@webiny/plugins/types\";\nimport { FileManagerStorageOperations } from \"@webiny/api-file-manager/types\";\nimport { FilesStorageOperations } from \"~/operations/FilesStorageOperations\";\nimport { SettingsStorageOperations } from \"~/operations/SettingsStorageOperations\";\nimport { SystemStorageOperations } from \"~/operations/SystemStorageOperations\";\nimport { SettingsAttributePlugin, SystemAttributePlugin } from \"./plugins\";\nimport { AliasesStorageOperations } from \"~/operations/AliasesStorageOperations\";\n\nexport interface StorageOperationsConfig {\n documentClient: DocumentClient;\n plugins?: PluginCollection;\n}\n\nexport * from \"./plugins\";\n\nexport const createFileManagerStorageOperations = ({\n documentClient,\n plugins: userPlugins\n}: StorageOperationsConfig): FileManagerStorageOperations => {\n const plugins = new PluginsContainer([\n ddbPlugins(),\n // User plugins\n ...(userPlugins || [])\n ]);\n\n return {\n beforeInit: async context => {\n const types: string[] = [SettingsAttributePlugin.type, SystemAttributePlugin.type];\n for (const type of types) {\n plugins.mergeByType(context.plugins, type);\n }\n },\n files: new FilesStorageOperations(),\n aliases: new AliasesStorageOperations({ documentClient }),\n settings: new SettingsStorageOperations({ documentClient }),\n system: new SystemStorageOperations({ documentClient })\n };\n};\n"],"mappings":";;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAGA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,0BAAA,GAAAH,OAAA;AACA,IAAAI,wBAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAQAM,MAAA,CAAAC,IAAA,CAAAF,SAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,SAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,SAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAPA,IAAAS,yBAAA,GAAAlB,OAAA;AASO,MAAMmB,kCAAkC,GAAGA,CAAC;EAC/CC,cAAc;EACdC,OAAO,EAAEC;AACY,CAAC,KAAmC;EACzD,MAAMD,OAAO,GAAG,IAAIE,0BAAgB,CAAC,CACjC,IAAAC,gBAAU,EAAC,CAAC;EACZ;EACA,IAAIF,WAAW,IAAI,EAAE,CAAC,CACzB,CAAC;EAEF,OAAO;IACHG,UAAU,EAAE,MAAMC,OAAO,IAAI;MACzB,MAAMC,KAAe,GAAG,CAACC,iCAAuB,CAACC,IAAI,EAAEC,+BAAqB,CAACD,IAAI,CAAC;MAClF,KAAK,MAAMA,IAAI,IAAIF,KAAK,EAAE;QACtBN,OAAO,CAACU,WAAW,CAACL,OAAO,CAACL,OAAO,EAAEQ,IAAI,CAAC;MAC9C;IACJ,CAAC;IACDG,KAAK,EAAE,IAAIC,8CAAsB,CAAC,CAAC;IACnCC,OAAO,EAAE,IAAIC,kDAAwB,CAAC;MAAEf;IAAe,CAAC,CAAC;IACzDgB,QAAQ,EAAE,IAAIC,oDAAyB,CAAC;MAAEjB;IAAe,CAAC,CAAC;IAC3DkB,MAAM,EAAE,IAAIC,gDAAuB,CAAC;MAAEnB;IAAe,CAAC;EAC1D,CAAC;AACL,CAAC;AAACN,OAAA,CAAAK,kCAAA,GAAAA,kCAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DocumentClient } from "aws-sdk/clients/dynamodb";
|
|
2
|
+
import { FileManagerAliasesStorageOperations, File } from "@webiny/api-file-manager/types";
|
|
3
|
+
interface AliasesStorageOperationsConfig {
|
|
4
|
+
documentClient: DocumentClient;
|
|
5
|
+
}
|
|
6
|
+
export declare class AliasesStorageOperations implements FileManagerAliasesStorageOperations {
|
|
7
|
+
private readonly aliasEntity;
|
|
8
|
+
private readonly table;
|
|
9
|
+
constructor({ documentClient }: AliasesStorageOperationsConfig);
|
|
10
|
+
deleteAliases(file: File): Promise<void>;
|
|
11
|
+
storeAliases(file: File): Promise<void>;
|
|
12
|
+
private getExistingAliases;
|
|
13
|
+
private createPartitionKey;
|
|
14
|
+
private createNewAliasesRecords;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.AliasesStorageOperations = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _dbDynamodb = require("@webiny/db-dynamodb");
|
|
10
|
+
class AliasesStorageOperations {
|
|
11
|
+
constructor({
|
|
12
|
+
documentClient
|
|
13
|
+
}) {
|
|
14
|
+
(0, _defineProperty2.default)(this, "aliasEntity", void 0);
|
|
15
|
+
(0, _defineProperty2.default)(this, "table", void 0);
|
|
16
|
+
this.table = (0, _dbDynamodb.createTable)({
|
|
17
|
+
documentClient
|
|
18
|
+
});
|
|
19
|
+
this.aliasEntity = (0, _dbDynamodb.createStandardEntity)({
|
|
20
|
+
table: this.table,
|
|
21
|
+
name: "FM.FileAlias"
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
async deleteAliases(file) {
|
|
25
|
+
const aliasItems = await this.getExistingAliases(file);
|
|
26
|
+
const items = [];
|
|
27
|
+
aliasItems.forEach(item => {
|
|
28
|
+
items.push(this.aliasEntity.deleteBatch({
|
|
29
|
+
PK: this.createPartitionKey({
|
|
30
|
+
id: item.fileId,
|
|
31
|
+
tenant: item.tenant,
|
|
32
|
+
locale: item.locale
|
|
33
|
+
}),
|
|
34
|
+
SK: `ALIAS#${item.alias}`
|
|
35
|
+
}));
|
|
36
|
+
});
|
|
37
|
+
await (0, _dbDynamodb.batchWriteAll)({
|
|
38
|
+
table: this.table,
|
|
39
|
+
items
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
async storeAliases(file) {
|
|
43
|
+
const items = [];
|
|
44
|
+
const existingAliases = await this.getExistingAliases(file);
|
|
45
|
+
const newAliases = this.createNewAliasesRecords(file, existingAliases);
|
|
46
|
+
newAliases.forEach(alias => {
|
|
47
|
+
items.push(this.aliasEntity.putBatch(alias));
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// Delete aliases that are in the DB but are NOT in the file.
|
|
51
|
+
for (const data of existingAliases) {
|
|
52
|
+
if (!file.aliases.some(alias => data.alias === alias)) {
|
|
53
|
+
items.push(this.aliasEntity.deleteBatch({
|
|
54
|
+
PK: this.createPartitionKey(file),
|
|
55
|
+
SK: `ALIAS#${data.alias}`
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
await (0, _dbDynamodb.batchWriteAll)({
|
|
60
|
+
table: this.table,
|
|
61
|
+
items
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
async getExistingAliases(file) {
|
|
65
|
+
const aliases = await (0, _dbDynamodb.queryAll)({
|
|
66
|
+
entity: this.aliasEntity,
|
|
67
|
+
partitionKey: this.createPartitionKey(file),
|
|
68
|
+
options: {
|
|
69
|
+
beginsWith: "ALIAS#"
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return aliases.map(alias => alias.data);
|
|
73
|
+
}
|
|
74
|
+
createPartitionKey(params) {
|
|
75
|
+
const {
|
|
76
|
+
tenant,
|
|
77
|
+
locale,
|
|
78
|
+
id
|
|
79
|
+
} = params;
|
|
80
|
+
return `T#${tenant}#L#${locale}#FM#F${id}`;
|
|
81
|
+
}
|
|
82
|
+
createNewAliasesRecords(file, existingAliases = []) {
|
|
83
|
+
return (file.aliases || []).map(alias => {
|
|
84
|
+
// If alias is already in the DB, skip it.
|
|
85
|
+
if (existingAliases.find(item => item.alias === alias)) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Add a new alias.
|
|
90
|
+
return {
|
|
91
|
+
PK: this.createPartitionKey(file),
|
|
92
|
+
SK: `ALIAS#${alias}`,
|
|
93
|
+
GSI1_PK: `T#${file.tenant}#FM#FILE_ALIASES`,
|
|
94
|
+
GSI1_SK: alias,
|
|
95
|
+
TYPE: "fm.fileAlias",
|
|
96
|
+
data: {
|
|
97
|
+
alias,
|
|
98
|
+
tenant: file.tenant,
|
|
99
|
+
locale: file.locale,
|
|
100
|
+
fileId: file.id,
|
|
101
|
+
key: file.key
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}).filter(Boolean);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
exports.AliasesStorageOperations = AliasesStorageOperations;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_dbDynamodb","require","AliasesStorageOperations","constructor","documentClient","_defineProperty2","default","table","createTable","aliasEntity","createStandardEntity","name","deleteAliases","file","aliasItems","getExistingAliases","items","forEach","item","push","deleteBatch","PK","createPartitionKey","id","fileId","tenant","locale","SK","alias","batchWriteAll","storeAliases","existingAliases","newAliases","createNewAliasesRecords","putBatch","data","aliases","some","queryAll","entity","partitionKey","options","beginsWith","map","params","find","GSI1_PK","GSI1_SK","TYPE","key","filter","Boolean","exports"],"sources":["AliasesStorageOperations.ts"],"sourcesContent":["import { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport { Entity, Table } from \"dynamodb-toolbox\";\nimport {\n FileManagerAliasesStorageOperations,\n File,\n FileAlias\n} from \"@webiny/api-file-manager/types\";\nimport {\n BatchWriteItem,\n batchWriteAll,\n createStandardEntity,\n createTable,\n DbItem,\n queryAll\n} from \"@webiny/db-dynamodb\";\n\ninterface AliasesStorageOperationsConfig {\n documentClient: DocumentClient;\n}\n\ninterface CreatePartitionKeyParams {\n locale: string;\n tenant: string;\n id: string;\n}\n\nexport class AliasesStorageOperations implements FileManagerAliasesStorageOperations {\n private readonly aliasEntity: Entity<any>;\n private readonly table: Table;\n\n constructor({ documentClient }: AliasesStorageOperationsConfig) {\n this.table = createTable({ documentClient });\n\n this.aliasEntity = createStandardEntity({\n table: this.table,\n name: \"FM.FileAlias\"\n });\n }\n\n async deleteAliases(file: File): Promise<void> {\n const aliasItems = await this.getExistingAliases(file);\n const items: BatchWriteItem[] = [];\n\n aliasItems.forEach(item => {\n items.push(\n this.aliasEntity.deleteBatch({\n PK: this.createPartitionKey({\n id: item.fileId,\n tenant: item.tenant,\n locale: item.locale\n }),\n SK: `ALIAS#${item.alias}`\n })\n );\n });\n\n await batchWriteAll({ table: this.table, items });\n }\n\n async storeAliases(file: File): Promise<void> {\n const items: BatchWriteItem[] = [];\n const existingAliases = await this.getExistingAliases(file);\n const newAliases = this.createNewAliasesRecords(file, existingAliases);\n\n newAliases.forEach(alias => {\n items.push(this.aliasEntity.putBatch(alias));\n });\n\n // Delete aliases that are in the DB but are NOT in the file.\n for (const data of existingAliases) {\n if (!file.aliases.some(alias => data.alias === alias)) {\n items.push(\n this.aliasEntity.deleteBatch({\n PK: this.createPartitionKey(file),\n SK: `ALIAS#${data.alias}`\n })\n );\n }\n }\n\n await batchWriteAll({\n table: this.table,\n items\n });\n }\n\n private async getExistingAliases(file: File) {\n const aliases = await queryAll<{ data: FileAlias }>({\n entity: this.aliasEntity,\n partitionKey: this.createPartitionKey(file),\n options: {\n beginsWith: \"ALIAS#\"\n }\n });\n\n return aliases.map(alias => alias.data);\n }\n\n private createPartitionKey(params: CreatePartitionKeyParams): string {\n const { tenant, locale, id } = params;\n return `T#${tenant}#L#${locale}#FM#F${id}`;\n }\n\n private createNewAliasesRecords(\n file: File,\n existingAliases: FileAlias[] = []\n ): DbItem<FileAlias>[] {\n return (file.aliases || [])\n .map(alias => {\n // If alias is already in the DB, skip it.\n if (existingAliases.find(item => item.alias === alias)) {\n return null;\n }\n\n // Add a new alias.\n return {\n PK: this.createPartitionKey(file),\n SK: `ALIAS#${alias}`,\n GSI1_PK: `T#${file.tenant}#FM#FILE_ALIASES`,\n GSI1_SK: alias,\n TYPE: \"fm.fileAlias\",\n data: {\n alias,\n tenant: file.tenant,\n locale: file.locale,\n fileId: file.id,\n key: file.key\n }\n };\n })\n .filter(Boolean) as DbItem<FileAlias>[];\n }\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { File, FileManagerFilesStorageOperations, FileManagerFilesStorageOperationsListResponse, FileManagerFilesStorageOperationsTagsResponse } from "@webiny/api-file-manager/types";
|
|
2
|
+
/**
|
|
3
|
+
* This class is here to satisfy TS interface, but it will always be overridden by CMS storage operations
|
|
4
|
+
* within the `api-file-manager` package itself. This will remain here until we find a better approach to organizing
|
|
5
|
+
* storage operations, and connecting app logic to CMS.
|
|
6
|
+
*/
|
|
7
|
+
export declare class FilesStorageOperations implements FileManagerFilesStorageOperations {
|
|
8
|
+
create(): Promise<File>;
|
|
9
|
+
createBatch(): Promise<File[]>;
|
|
10
|
+
delete(): Promise<void>;
|
|
11
|
+
get(): Promise<File | null>;
|
|
12
|
+
list(): Promise<FileManagerFilesStorageOperationsListResponse>;
|
|
13
|
+
tags(): Promise<FileManagerFilesStorageOperationsTagsResponse[]>;
|
|
14
|
+
update(): Promise<File>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FilesStorageOperations = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* This class is here to satisfy TS interface, but it will always be overridden by CMS storage operations
|
|
9
|
+
* within the `api-file-manager` package itself. This will remain here until we find a better approach to organizing
|
|
10
|
+
* storage operations, and connecting app logic to CMS.
|
|
11
|
+
*/
|
|
12
|
+
class FilesStorageOperations {
|
|
13
|
+
create() {
|
|
14
|
+
throw new Error("api-file-manager-ddb does not implement the Files storage operations.");
|
|
15
|
+
}
|
|
16
|
+
createBatch() {
|
|
17
|
+
throw new Error("api-file-manager-ddb does not implement the Files storage operations.");
|
|
18
|
+
}
|
|
19
|
+
delete() {
|
|
20
|
+
throw new Error("api-file-manager-ddb does not implement the Files storage operations.");
|
|
21
|
+
}
|
|
22
|
+
get() {
|
|
23
|
+
throw new Error("api-file-manager-ddb does not implement the Files storage operations.");
|
|
24
|
+
}
|
|
25
|
+
list() {
|
|
26
|
+
throw new Error("api-file-manager-ddb does not implement the Files storage operations.");
|
|
27
|
+
}
|
|
28
|
+
tags() {
|
|
29
|
+
throw new Error("api-file-manager-ddb does not implement the Files storage operations.");
|
|
30
|
+
}
|
|
31
|
+
update() {
|
|
32
|
+
throw new Error("api-file-manager-ddb does not implement the Files storage operations.");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.FilesStorageOperations = FilesStorageOperations;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FilesStorageOperations","create","Error","createBatch","delete","get","list","tags","update","exports"],"sources":["FilesStorageOperations.ts"],"sourcesContent":["import {\n File,\n FileManagerFilesStorageOperations,\n FileManagerFilesStorageOperationsListResponse,\n FileManagerFilesStorageOperationsTagsResponse\n} from \"@webiny/api-file-manager/types\";\n\n/**\n * This class is here to satisfy TS interface, but it will always be overridden by CMS storage operations\n * within the `api-file-manager` package itself. This will remain here until we find a better approach to organizing\n * storage operations, and connecting app logic to CMS.\n */\nexport class FilesStorageOperations implements FileManagerFilesStorageOperations {\n create(): Promise<File> {\n throw new Error(\"api-file-manager-ddb does not implement the Files storage operations.\");\n }\n\n createBatch(): Promise<File[]> {\n throw new Error(\"api-file-manager-ddb does not implement the Files storage operations.\");\n }\n\n delete(): Promise<void> {\n throw new Error(\"api-file-manager-ddb does not implement the Files storage operations.\");\n }\n\n get(): Promise<File | null> {\n throw new Error(\"api-file-manager-ddb does not implement the Files storage operations.\");\n }\n\n list(): Promise<FileManagerFilesStorageOperationsListResponse> {\n throw new Error(\"api-file-manager-ddb does not implement the Files storage operations.\");\n }\n\n tags(): Promise<FileManagerFilesStorageOperationsTagsResponse[]> {\n throw new Error(\"api-file-manager-ddb does not implement the Files storage operations.\");\n }\n\n update(): Promise<File> {\n throw new Error(\"api-file-manager-ddb does not implement the Files storage operations.\");\n }\n}\n"],"mappings":";;;;;;AAOA;AACA;AACA;AACA;AACA;AACO,MAAMA,sBAAsB,CAA8C;EAC7EC,MAAMA,CAAA,EAAkB;IACpB,MAAM,IAAIC,KAAK,CAAC,uEAAuE,CAAC;EAC5F;EAEAC,WAAWA,CAAA,EAAoB;IAC3B,MAAM,IAAID,KAAK,CAAC,uEAAuE,CAAC;EAC5F;EAEAE,MAAMA,CAAA,EAAkB;IACpB,MAAM,IAAIF,KAAK,CAAC,uEAAuE,CAAC;EAC5F;EAEAG,GAAGA,CAAA,EAAyB;IACxB,MAAM,IAAIH,KAAK,CAAC,uEAAuE,CAAC;EAC5F;EAEAI,IAAIA,CAAA,EAA2D;IAC3D,MAAM,IAAIJ,KAAK,CAAC,uEAAuE,CAAC;EAC5F;EAEAK,IAAIA,CAAA,EAA6D;IAC7D,MAAM,IAAIL,KAAK,CAAC,uEAAuE,CAAC;EAC5F;EAEAM,MAAMA,CAAA,EAAkB;IACpB,MAAM,IAAIN,KAAK,CAAC,uEAAuE,CAAC;EAC5F;AACJ;AAACO,OAAA,CAAAT,sBAAA,GAAAA,sBAAA"}
|
|
@@ -7,30 +7,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.SettingsStorageOperations = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
10
|
-
var
|
|
11
|
-
var _get = require("@webiny/db-dynamodb/utils/get");
|
|
12
|
-
var _table = require("../../definitions/table");
|
|
10
|
+
var _dbDynamodb = require("@webiny/db-dynamodb");
|
|
13
11
|
const SORT_KEY = "A";
|
|
14
12
|
class SettingsStorageOperations {
|
|
15
13
|
constructor({
|
|
16
14
|
documentClient
|
|
17
15
|
}) {
|
|
18
16
|
(0, _defineProperty2.default)(this, "_entity", void 0);
|
|
19
|
-
this._entity = (0,
|
|
20
|
-
table: (0,
|
|
17
|
+
this._entity = (0, _dbDynamodb.createStandardEntity)({
|
|
18
|
+
table: (0, _dbDynamodb.createTable)({
|
|
21
19
|
documentClient
|
|
22
|
-
})
|
|
20
|
+
}),
|
|
21
|
+
name: "FM.Settings"
|
|
23
22
|
});
|
|
24
23
|
}
|
|
25
24
|
async get({
|
|
26
25
|
tenant
|
|
27
26
|
}) {
|
|
28
27
|
try {
|
|
29
|
-
const settings = await (0,
|
|
28
|
+
const settings = await (0, _dbDynamodb.get)({
|
|
30
29
|
entity: this._entity,
|
|
31
30
|
keys: {
|
|
32
31
|
PK: `T#${tenant}#FM#SETTINGS`,
|
|
33
|
-
SK:
|
|
32
|
+
SK: SORT_KEY
|
|
34
33
|
}
|
|
35
34
|
});
|
|
36
35
|
return settings ? settings.data : null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_error","_interopRequireDefault","require","_dbDynamodb","SORT_KEY","SettingsStorageOperations","constructor","documentClient","_defineProperty2","default","_entity","createStandardEntity","table","createTable","name","get","tenant","settings","entity","keys","PK","SK","data","ex","WebinyError","message","code","create","original","update","put","TYPE","delete","exports"],"sources":["SettingsStorageOperations.ts"],"sourcesContent":["import { Entity } from \"dynamodb-toolbox\";\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport {\n FileManagerSettings,\n FileManagerSettingsStorageOperations,\n FileManagerSettingsStorageOperationsCreateParams,\n FileManagerSettingsStorageOperationsUpdateParams,\n FileManagerStorageOperationsDeleteSettings,\n FileManagerStorageOperationsGetSettingsParams\n} from \"@webiny/api-file-manager/types\";\nimport WebinyError from \"@webiny/error\";\nimport { get, createStandardEntity, createTable } from \"@webiny/db-dynamodb\";\n\ninterface SettingsStorageOperationsConfig {\n documentClient: DocumentClient;\n}\n\nconst SORT_KEY = \"A\";\n\nexport class SettingsStorageOperations implements FileManagerSettingsStorageOperations {\n private readonly _entity: Entity<any>;\n\n public constructor({ documentClient }: SettingsStorageOperationsConfig) {\n this._entity = createStandardEntity({\n table: createTable({ documentClient }),\n name: \"FM.Settings\"\n });\n }\n\n public async get({\n tenant\n }: FileManagerStorageOperationsGetSettingsParams): Promise<FileManagerSettings | null> {\n try {\n const settings = await get<{ data: FileManagerSettings }>({\n entity: this._entity,\n keys: {\n PK: `T#${tenant}#FM#SETTINGS`,\n SK: SORT_KEY\n }\n });\n\n return settings ? settings.data : null;\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not fetch the FileManager settings.\",\n ex.code || \"GET_SETTINGS_ERROR\"\n );\n }\n }\n\n public async create({\n data\n }: FileManagerSettingsStorageOperationsCreateParams): Promise<FileManagerSettings> {\n const original = await this.get({ tenant: data.tenant });\n\n if (original) {\n return await this.update({ original, data });\n }\n\n try {\n await this._entity.put({\n PK: `T#${data.tenant}#FM#SETTINGS`,\n SK: SORT_KEY,\n TYPE: \"fm.settings\",\n data\n });\n return data;\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Cannot create FileManager settings.\",\n ex.code || \"CREATE_FM_SETTINGS_ERROR\",\n {\n data\n }\n );\n }\n }\n\n public async update({\n data\n }: FileManagerSettingsStorageOperationsUpdateParams): Promise<FileManagerSettings> {\n try {\n await this._entity.update({\n PK: `T#${data.tenant}#FM#SETTINGS`,\n SK: SORT_KEY,\n TYPE: \"fm.settings\",\n data\n });\n return data;\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Cannot update FileManager settings.\",\n ex.code || \"UPDATE_FM_SETTINGS_ERROR\",\n {\n data\n }\n );\n }\n }\n\n public async delete({ tenant }: FileManagerStorageOperationsDeleteSettings): Promise<void> {\n return this._entity.delete({\n PK: `T#${tenant}#FM#SETTINGS`,\n SK: SORT_KEY\n });\n }\n}\n"],"mappings":";;;;;;;;AAUA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAMA,MAAME,QAAQ,GAAG,GAAG;AAEb,MAAMC,yBAAyB,CAAiD;EAG5EC,WAAWA,CAAC;IAAEC;EAAgD,CAAC,EAAE;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IACpE,IAAI,CAACC,OAAO,GAAG,IAAAC,gCAAoB,EAAC;MAChCC,KAAK,EAAE,IAAAC,uBAAW,EAAC;QAAEN;MAAe,CAAC,CAAC;MACtCO,IAAI,EAAE;IACV,CAAC,CAAC;EACN;EAEA,MAAaC,GAAGA,CAAC;IACbC;EAC2C,CAAC,EAAuC;IACnF,IAAI;MACA,MAAMC,QAAQ,GAAG,MAAM,IAAAF,eAAG,EAAgC;QACtDG,MAAM,EAAE,IAAI,CAACR,OAAO;QACpBS,IAAI,EAAE;UACFC,EAAE,EAAG,KAAIJ,MAAO,cAAa;UAC7BK,EAAE,EAAEjB;QACR;MACJ,CAAC,CAAC;MAEF,OAAOa,QAAQ,GAAGA,QAAQ,CAACK,IAAI,GAAG,IAAI;IAC1C,CAAC,CAAC,OAAOC,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjBD,EAAE,CAACE,OAAO,IAAI,2CAA2C,EACzDF,EAAE,CAACG,IAAI,IAAI,oBACf,CAAC;IACL;EACJ;EAEA,MAAaC,MAAMA,CAAC;IAChBL;EAC8C,CAAC,EAAgC;IAC/E,MAAMM,QAAQ,GAAG,MAAM,IAAI,CAACb,GAAG,CAAC;MAAEC,MAAM,EAAEM,IAAI,CAACN;IAAO,CAAC,CAAC;IAExD,IAAIY,QAAQ,EAAE;MACV,OAAO,MAAM,IAAI,CAACC,MAAM,CAAC;QAAED,QAAQ;QAAEN;MAAK,CAAC,CAAC;IAChD;IAEA,IAAI;MACA,MAAM,IAAI,CAACZ,OAAO,CAACoB,GAAG,CAAC;QACnBV,EAAE,EAAG,KAAIE,IAAI,CAACN,MAAO,cAAa;QAClCK,EAAE,EAAEjB,QAAQ;QACZ2B,IAAI,EAAE,aAAa;QACnBT;MACJ,CAAC,CAAC;MACF,OAAOA,IAAI;IACf,CAAC,CAAC,OAAOC,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjBD,EAAE,CAACE,OAAO,IAAI,qCAAqC,EACnDF,EAAE,CAACG,IAAI,IAAI,0BAA0B,EACrC;QACIJ;MACJ,CACJ,CAAC;IACL;EACJ;EAEA,MAAaO,MAAMA,CAAC;IAChBP;EAC8C,CAAC,EAAgC;IAC/E,IAAI;MACA,MAAM,IAAI,CAACZ,OAAO,CAACmB,MAAM,CAAC;QACtBT,EAAE,EAAG,KAAIE,IAAI,CAACN,MAAO,cAAa;QAClCK,EAAE,EAAEjB,QAAQ;QACZ2B,IAAI,EAAE,aAAa;QACnBT;MACJ,CAAC,CAAC;MACF,OAAOA,IAAI;IACf,CAAC,CAAC,OAAOC,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjBD,EAAE,CAACE,OAAO,IAAI,qCAAqC,EACnDF,EAAE,CAACG,IAAI,IAAI,0BAA0B,EACrC;QACIJ;MACJ,CACJ,CAAC;IACL;EACJ;EAEA,MAAaU,MAAMA,CAAC;IAAEhB;EAAmD,CAAC,EAAiB;IACvF,OAAO,IAAI,CAACN,OAAO,CAACsB,MAAM,CAAC;MACvBZ,EAAE,EAAG,KAAIJ,MAAO,cAAa;MAC7BK,EAAE,EAAEjB;IACR,CAAC,CAAC;EACN;AACJ;AAAC6B,OAAA,CAAA5B,yBAAA,GAAAA,yBAAA"}
|
|
@@ -8,18 +8,26 @@ exports.SystemStorageOperations = void 0;
|
|
|
8
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
11
|
-
var
|
|
12
|
-
var _table = require("../../definitions/table");
|
|
11
|
+
var _dbDynamodb = require("@webiny/db-dynamodb");
|
|
13
12
|
const SORT_KEY = "FM";
|
|
14
13
|
class SystemStorageOperations {
|
|
15
14
|
constructor({
|
|
16
15
|
documentClient
|
|
17
16
|
}) {
|
|
18
17
|
(0, _defineProperty2.default)(this, "_entity", void 0);
|
|
19
|
-
this._entity = (0,
|
|
20
|
-
table: (0,
|
|
18
|
+
this._entity = (0, _dbDynamodb.createLegacyEntity)({
|
|
19
|
+
table: (0, _dbDynamodb.createTable)({
|
|
21
20
|
documentClient
|
|
22
|
-
})
|
|
21
|
+
}),
|
|
22
|
+
name: "System",
|
|
23
|
+
attributes: {
|
|
24
|
+
version: {
|
|
25
|
+
type: "string"
|
|
26
|
+
},
|
|
27
|
+
tenant: {
|
|
28
|
+
type: "string"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
23
31
|
});
|
|
24
32
|
}
|
|
25
33
|
async get({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_error","_interopRequireDefault","require","_dbDynamodb","SORT_KEY","SystemStorageOperations","constructor","documentClient","_defineProperty2","default","_entity","createLegacyEntity","table","createTable","name","attributes","version","type","tenant","get","system","PK","SK","Item","ex","WebinyError","message","code","create","params","data","put","_objectSpread2","update","original","exports"],"sources":["SystemStorageOperations.ts"],"sourcesContent":["import { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport { Entity } from \"dynamodb-toolbox\";\nimport {\n FileManagerSystem,\n FileManagerSystemStorageOperations,\n FileManagerSystemStorageOperationsCreateParams,\n FileManagerSystemStorageOperationsGetParams,\n FileManagerSystemStorageOperationsUpdateParams\n} from \"@webiny/api-file-manager/types\";\nimport WebinyError from \"@webiny/error\";\nimport { createLegacyEntity, createTable } from \"@webiny/db-dynamodb\";\n\ninterface SystemStorageOperationsConstructorParams {\n documentClient: DocumentClient;\n}\n\nconst SORT_KEY = \"FM\";\n\nexport class SystemStorageOperations implements FileManagerSystemStorageOperations {\n private readonly _entity: Entity<any>;\n\n public constructor({ documentClient }: SystemStorageOperationsConstructorParams) {\n this._entity = createLegacyEntity({\n table: createTable({ documentClient }),\n name: \"System\",\n attributes: {\n version: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n }\n }\n });\n }\n\n public async get({\n tenant\n }: FileManagerSystemStorageOperationsGetParams): Promise<FileManagerSystem | null> {\n try {\n const system = await this._entity.get({\n PK: `T#${tenant}#SYSTEM`,\n SK: SORT_KEY\n });\n if (!system || !system.Item) {\n return null;\n }\n return system.Item;\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not fetch the FileManager system.\",\n ex.code || \"GET_SYSTEM_ERROR\"\n );\n }\n }\n\n public async create(\n params: FileManagerSystemStorageOperationsCreateParams\n ): Promise<FileManagerSystem> {\n const { data } = params;\n try {\n await this._entity.put({\n PK: `T#${data.tenant}#SYSTEM`,\n SK: SORT_KEY,\n ...data\n });\n } catch (ex) {\n throw new WebinyError(\n \"Could not insert new system data into DynamoDB\",\n \"CREATE_SYSTEM_ERROR\",\n {\n data\n }\n );\n }\n return data;\n }\n\n public async update(\n params: FileManagerSystemStorageOperationsUpdateParams\n ): Promise<FileManagerSystem> {\n const { original, data } = params;\n\n try {\n await this._entity.update({\n PK: `T#${data.tenant}#SYSTEM`,\n SK: SORT_KEY,\n ...data\n });\n } catch (ex) {\n throw new WebinyError(\n \"Could not update system data in the DynamoDB.\",\n \"UPDATE_SYSTEM_ERROR\",\n {\n data\n }\n );\n }\n return {\n ...original,\n ...data\n };\n }\n}\n"],"mappings":";;;;;;;;;AASA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAMA,MAAME,QAAQ,GAAG,IAAI;AAEd,MAAMC,uBAAuB,CAA+C;EAGxEC,WAAWA,CAAC;IAAEC;EAAyD,CAAC,EAAE;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IAC7E,IAAI,CAACC,OAAO,GAAG,IAAAC,8BAAkB,EAAC;MAC9BC,KAAK,EAAE,IAAAC,uBAAW,EAAC;QAAEN;MAAe,CAAC,CAAC;MACtCO,IAAI,EAAE,QAAQ;MACdC,UAAU,EAAE;QACRC,OAAO,EAAE;UACLC,IAAI,EAAE;QACV,CAAC;QACDC,MAAM,EAAE;UACJD,IAAI,EAAE;QACV;MACJ;IACJ,CAAC,CAAC;EACN;EAEA,MAAaE,GAAGA,CAAC;IACbD;EACyC,CAAC,EAAqC;IAC/E,IAAI;MACA,MAAME,MAAM,GAAG,MAAM,IAAI,CAACV,OAAO,CAACS,GAAG,CAAC;QAClCE,EAAE,EAAG,KAAIH,MAAO,SAAQ;QACxBI,EAAE,EAAElB;MACR,CAAC,CAAC;MACF,IAAI,CAACgB,MAAM,IAAI,CAACA,MAAM,CAACG,IAAI,EAAE;QACzB,OAAO,IAAI;MACf;MACA,OAAOH,MAAM,CAACG,IAAI;IACtB,CAAC,CAAC,OAAOC,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjBD,EAAE,CAACE,OAAO,IAAI,yCAAyC,EACvDF,EAAE,CAACG,IAAI,IAAI,kBACf,CAAC;IACL;EACJ;EAEA,MAAaC,MAAMA,CACfC,MAAsD,EAC5B;IAC1B,MAAM;MAAEC;IAAK,CAAC,GAAGD,MAAM;IACvB,IAAI;MACA,MAAM,IAAI,CAACnB,OAAO,CAACqB,GAAG,KAAAC,cAAA,CAAAvB,OAAA;QAClBY,EAAE,EAAG,KAAIS,IAAI,CAACZ,MAAO,SAAQ;QAC7BI,EAAE,EAAElB;MAAQ,GACT0B,IAAI,CACV,CAAC;IACN,CAAC,CAAC,OAAON,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjB,gDAAgD,EAChD,qBAAqB,EACrB;QACIK;MACJ,CACJ,CAAC;IACL;IACA,OAAOA,IAAI;EACf;EAEA,MAAaG,MAAMA,CACfJ,MAAsD,EAC5B;IAC1B,MAAM;MAAEK,QAAQ;MAAEJ;IAAK,CAAC,GAAGD,MAAM;IAEjC,IAAI;MACA,MAAM,IAAI,CAACnB,OAAO,CAACuB,MAAM,KAAAD,cAAA,CAAAvB,OAAA;QACrBY,EAAE,EAAG,KAAIS,IAAI,CAACZ,MAAO,SAAQ;QAC7BI,EAAE,EAAElB;MAAQ,GACT0B,IAAI,CACV,CAAC;IACN,CAAC,CAAC,OAAON,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjB,+CAA+C,EAC/C,qBAAqB,EACrB;QACIK;MACJ,CACJ,CAAC;IACL;IACA,WAAAE,cAAA,CAAAvB,OAAA,MAAAuB,cAAA,CAAAvB,OAAA,MACOyB,QAAQ,GACRJ,IAAI;EAEf;AACJ;AAACK,OAAA,CAAA9B,uBAAA,GAAAA,uBAAA"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-file-manager-ddb",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.37.0-beta.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"@webiny/api-file-manager",
|
|
7
7
|
"storage-operations",
|
|
8
|
-
"
|
|
9
|
-
"fm:ddb"
|
|
8
|
+
"ddb"
|
|
10
9
|
],
|
|
11
10
|
"repository": {
|
|
12
11
|
"type": "git",
|
|
@@ -21,24 +20,24 @@
|
|
|
21
20
|
],
|
|
22
21
|
"license": "MIT",
|
|
23
22
|
"dependencies": {
|
|
24
|
-
"@babel/runtime": "7.
|
|
25
|
-
"@webiny/api-file-manager": "5.
|
|
26
|
-
"@webiny/db-dynamodb": "5.
|
|
27
|
-
"@webiny/error": "5.
|
|
28
|
-
"@webiny/plugins": "5.
|
|
29
|
-
"@webiny/project-utils": "5.
|
|
23
|
+
"@babel/runtime": "7.22.6",
|
|
24
|
+
"@webiny/api-file-manager": "5.37.0-beta.1",
|
|
25
|
+
"@webiny/db-dynamodb": "5.37.0-beta.1",
|
|
26
|
+
"@webiny/error": "5.37.0-beta.1",
|
|
27
|
+
"@webiny/plugins": "5.37.0-beta.1",
|
|
28
|
+
"@webiny/project-utils": "5.37.0-beta.1",
|
|
30
29
|
"aws-sdk": "2.1310.0",
|
|
31
30
|
"dynamodb-toolbox": "0.3.5"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
34
|
-
"@babel/cli": "7.
|
|
35
|
-
"@babel/core": "7.
|
|
33
|
+
"@babel/cli": "7.22.6",
|
|
34
|
+
"@babel/core": "7.22.8",
|
|
36
35
|
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
|
|
37
|
-
"@babel/plugin-transform-runtime": "7.
|
|
38
|
-
"@babel/preset-env": "7.
|
|
39
|
-
"@babel/preset-typescript": "7.
|
|
40
|
-
"@webiny/cli": "5.
|
|
41
|
-
"jest": "
|
|
36
|
+
"@babel/plugin-transform-runtime": "7.22.7",
|
|
37
|
+
"@babel/preset-env": "7.22.7",
|
|
38
|
+
"@babel/preset-typescript": "7.22.5",
|
|
39
|
+
"@webiny/cli": "5.37.0-beta.1",
|
|
40
|
+
"jest": "29.5.0",
|
|
42
41
|
"jest-dynalite": "3.6.1",
|
|
43
42
|
"jsonpack": "1.1.5",
|
|
44
43
|
"rimraf": "3.0.2",
|
|
@@ -64,5 +63,5 @@
|
|
|
64
63
|
]
|
|
65
64
|
}
|
|
66
65
|
},
|
|
67
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "176c29425477d1daaca1b7da79bacc79a1d35f6e"
|
|
68
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SettingsAttributePlugin","AttributePlugin","constructor","params","entity"],"sources":["SettingsAttributePlugin.ts"],"sourcesContent":["import {\n AttributePlugin,\n AttributePluginParams\n} from \"@webiny/db-dynamodb/plugins/definitions/AttributePlugin\";\n\nexport class SettingsAttributePlugin extends AttributePlugin {\n public constructor(params: Omit<AttributePluginParams, \"entity\">) {\n super({\n ...params,\n entity: \"FM.Settings\"\n });\n }\n}\n"],"mappings":";;;;;;;;AAAA;AAKO,
|
|
1
|
+
{"version":3,"names":["_AttributePlugin","require","SettingsAttributePlugin","AttributePlugin","constructor","params","_objectSpread2","default","entity","exports"],"sources":["SettingsAttributePlugin.ts"],"sourcesContent":["import {\n AttributePlugin,\n AttributePluginParams\n} from \"@webiny/db-dynamodb/plugins/definitions/AttributePlugin\";\n\nexport class SettingsAttributePlugin extends AttributePlugin {\n public constructor(params: Omit<AttributePluginParams, \"entity\">) {\n super({\n ...params,\n entity: \"FM.Settings\"\n });\n }\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAKO,MAAMC,uBAAuB,SAASC,gCAAe,CAAC;EAClDC,WAAWA,CAACC,MAA6C,EAAE;IAC9D,KAAK,KAAAC,cAAA,CAAAC,OAAA,MAAAD,cAAA,CAAAC,OAAA,MACEF,MAAM;MACTG,MAAM,EAAE;IAAa,EACxB,CAAC;EACN;AACJ;AAACC,OAAA,CAAAP,uBAAA,GAAAA,uBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SystemAttributePlugin","AttributePlugin","constructor","params","entity"],"sources":["SystemAttributePlugin.ts"],"sourcesContent":["import {\n AttributePlugin,\n AttributePluginParams\n} from \"@webiny/db-dynamodb/plugins/definitions/AttributePlugin\";\n\nexport class SystemAttributePlugin extends AttributePlugin {\n public constructor(params: Omit<AttributePluginParams, \"entity\">) {\n super({\n ...params,\n entity: \"System\"\n });\n }\n}\n"],"mappings":";;;;;;;;AAAA;AAKO,
|
|
1
|
+
{"version":3,"names":["_AttributePlugin","require","SystemAttributePlugin","AttributePlugin","constructor","params","_objectSpread2","default","entity","exports"],"sources":["SystemAttributePlugin.ts"],"sourcesContent":["import {\n AttributePlugin,\n AttributePluginParams\n} from \"@webiny/db-dynamodb/plugins/definitions/AttributePlugin\";\n\nexport class SystemAttributePlugin extends AttributePlugin {\n public constructor(params: Omit<AttributePluginParams, \"entity\">) {\n super({\n ...params,\n entity: \"System\"\n });\n }\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAKO,MAAMC,qBAAqB,SAASC,gCAAe,CAAC;EAChDC,WAAWA,CAACC,MAA6C,EAAE;IAC9D,KAAK,KAAAC,cAAA,CAAAC,OAAA,MAAAD,cAAA,CAAAC,OAAA,MACEF,MAAM;MACTG,MAAM,EAAE;IAAQ,EACnB,CAAC;EACN;AACJ;AAACC,OAAA,CAAAP,qBAAA,GAAAA,qBAAA"}
|
package/plugins/index.d.ts
CHANGED
package/plugins/index.js
CHANGED
|
@@ -3,28 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _FileAttributePlugin = require("./FileAttributePlugin");
|
|
7
|
-
Object.keys(_FileAttributePlugin).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _FileAttributePlugin[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _FileAttributePlugin[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _FileDynamoDbFieldPlugin = require("./FileDynamoDbFieldPlugin");
|
|
18
|
-
Object.keys(_FileDynamoDbFieldPlugin).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _FileDynamoDbFieldPlugin[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _FileDynamoDbFieldPlugin[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
6
|
var _SettingsAttributePlugin = require("./SettingsAttributePlugin");
|
|
29
7
|
Object.keys(_SettingsAttributePlugin).forEach(function (key) {
|
|
30
8
|
if (key === "default" || key === "__esModule") return;
|
package/plugins/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./
|
|
1
|
+
{"version":3,"names":["_SettingsAttributePlugin","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_SystemAttributePlugin"],"sources":["index.ts"],"sourcesContent":["export * from \"./SettingsAttributePlugin\";\nexport * from \"./SystemAttributePlugin\";\n"],"mappings":";;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,wBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,wBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,wBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,sBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,sBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,sBAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,sBAAA,CAAAL,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
8
|
-
var _default = params => {
|
|
9
|
-
const {
|
|
10
|
-
table
|
|
11
|
-
} = params;
|
|
12
|
-
const entityName = "FM.Settings";
|
|
13
|
-
return new _dynamodbToolbox.Entity({
|
|
14
|
-
name: entityName,
|
|
15
|
-
table,
|
|
16
|
-
attributes: {
|
|
17
|
-
PK: {
|
|
18
|
-
partitionKey: true
|
|
19
|
-
},
|
|
20
|
-
SK: {
|
|
21
|
-
sortKey: true
|
|
22
|
-
},
|
|
23
|
-
GSI1_PK: {
|
|
24
|
-
type: "string"
|
|
25
|
-
},
|
|
26
|
-
GSI1_SK: {
|
|
27
|
-
type: "string"
|
|
28
|
-
},
|
|
29
|
-
TYPE: {
|
|
30
|
-
type: "string"
|
|
31
|
-
},
|
|
32
|
-
data: {
|
|
33
|
-
type: "map"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
exports.default = _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["params","table","entityName","Entity","name","attributes","PK","partitionKey","SK","sortKey","GSI1_PK","type","GSI1_SK","TYPE","data"],"sources":["settingsEntity.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\n\nexport interface SettingsEntityParams {\n table: Table;\n}\nexport default (params: SettingsEntityParams): Entity<any> => {\n const { table } = params;\n const entityName = \"FM.Settings\";\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n GSI1_PK: {\n type: \"string\"\n },\n GSI1_SK: {\n type: \"string\"\n },\n TYPE: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n }\n }\n });\n};\n"],"mappings":";;;;;;AAAA;AAAiD,eAKjCA,MAA4B,IAAkB;EAC1D,MAAM;IAAEC;EAAM,CAAC,GAAGD,MAAM;EACxB,MAAME,UAAU,GAAG,aAAa;EAChC,OAAO,IAAIC,uBAAM,CAAC;IACdC,IAAI,EAAEF,UAAU;IAChBD,KAAK;IACLI,UAAU,EAAE;MACRC,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV,CAAC;MACDC,OAAO,EAAE;QACLD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACDG,IAAI,EAAE;QACFH,IAAI,EAAE;MACV;IACJ;EACJ,CAAC,CAAC;AACN,CAAC;AAAA"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
8
|
-
var _default = params => {
|
|
9
|
-
const {
|
|
10
|
-
table
|
|
11
|
-
} = params;
|
|
12
|
-
const entityName = "System";
|
|
13
|
-
return new _dynamodbToolbox.Entity({
|
|
14
|
-
name: entityName,
|
|
15
|
-
table,
|
|
16
|
-
attributes: {
|
|
17
|
-
PK: {
|
|
18
|
-
partitionKey: true
|
|
19
|
-
},
|
|
20
|
-
SK: {
|
|
21
|
-
sortKey: true
|
|
22
|
-
},
|
|
23
|
-
version: {
|
|
24
|
-
type: "string"
|
|
25
|
-
},
|
|
26
|
-
tenant: {
|
|
27
|
-
type: "string"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
exports.default = _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["params","table","entityName","Entity","name","attributes","PK","partitionKey","SK","sortKey","version","type","tenant"],"sources":["systemEntity.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\n\nexport interface SystemEntityParams {\n table: Table;\n}\nexport default (params: SystemEntityParams): Entity<any> => {\n const { table } = params;\n const entityName = \"System\";\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n version: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n }\n }\n });\n};\n"],"mappings":";;;;;;AAAA;AAAiD,eAKjCA,MAA0B,IAAkB;EACxD,MAAM;IAAEC;EAAM,CAAC,GAAGD,MAAM;EACxB,MAAME,UAAU,GAAG,QAAQ;EAC3B,OAAO,IAAIC,uBAAM,CAAC;IACdC,IAAI,EAAEF,UAAU;IAChBD,KAAK;IACLI,UAAU,EAAE;MACRC,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV,CAAC;MACDC,MAAM,EAAE;QACJD,IAAI,EAAE;MACV;IACJ;EACJ,CAAC,CAAC;AACN,CAAC;AAAA"}
|
package/definitions/table.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DocumentClient } from "aws-sdk/clients/dynamodb";
|
|
2
|
-
import { Table } from "dynamodb-toolbox";
|
|
3
|
-
export interface CreateTableParams {
|
|
4
|
-
table?: string;
|
|
5
|
-
documentClient: DocumentClient;
|
|
6
|
-
}
|
|
7
|
-
export declare const createTable: ({ table, documentClient }: CreateTableParams) => Table;
|
package/definitions/table.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createTable = void 0;
|
|
7
|
-
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
8
|
-
const createTable = ({
|
|
9
|
-
table,
|
|
10
|
-
documentClient
|
|
11
|
-
}) => {
|
|
12
|
-
return new _dynamodbToolbox.Table({
|
|
13
|
-
name: table || String(process.env.DB_TABLE),
|
|
14
|
-
partitionKey: "PK",
|
|
15
|
-
sortKey: "SK",
|
|
16
|
-
DocumentClient: documentClient,
|
|
17
|
-
indexes: {
|
|
18
|
-
GSI1: {
|
|
19
|
-
partitionKey: "GSI1_PK",
|
|
20
|
-
sortKey: "GSI1_SK"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
exports.createTable = createTable;
|
package/definitions/table.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["createTable","table","documentClient","Table","name","String","process","env","DB_TABLE","partitionKey","sortKey","DocumentClient","indexes","GSI1"],"sources":["table.ts"],"sourcesContent":["import { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport { Table } from \"dynamodb-toolbox\";\n\nexport interface CreateTableParams {\n table?: string;\n documentClient: DocumentClient;\n}\n\nexport const createTable = ({ table, documentClient }: CreateTableParams) => {\n return new Table({\n name: table || String(process.env.DB_TABLE),\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient,\n indexes: {\n GSI1: {\n partitionKey: \"GSI1_PK\",\n sortKey: \"GSI1_SK\"\n }\n }\n });\n};\n"],"mappings":";;;;;;AACA;AAOO,MAAMA,WAAW,GAAG,CAAC;EAAEC,KAAK;EAAEC;AAAkC,CAAC,KAAK;EACzE,OAAO,IAAIC,sBAAK,CAAC;IACbC,IAAI,EAAEH,KAAK,IAAII,MAAM,CAACC,OAAO,CAACC,GAAG,CAACC,QAAQ,CAAC;IAC3CC,YAAY,EAAE,IAAI;IAClBC,OAAO,EAAE,IAAI;IACbC,cAAc,EAAET,cAAc;IAC9BU,OAAO,EAAE;MACLC,IAAI,EAAE;QACFJ,YAAY,EAAE,SAAS;QACvBC,OAAO,EAAE;MACb;IACJ;EACJ,CAAC,CAAC;AACN,CAAC;AAAC"}
|