@webiny/api-file-manager 5.19.1-beta.0 → 5.20.0-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.
- package/package.json +16 -16
- package/plugins/crud/files.crud.js +1 -5
- package/plugins/crud/system.crud.js +7 -1
- package/plugins/graphql.js +1 -1
- package/types.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-file-manager",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.20.0-beta.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fm:base"
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@babel/runtime": "7.16.3",
|
|
22
22
|
"@commodo/fields": "1.1.2-beta.20",
|
|
23
|
-
"@webiny/api-i18n-content": "5.
|
|
24
|
-
"@webiny/api-security": "5.
|
|
25
|
-
"@webiny/api-tenancy": "5.
|
|
26
|
-
"@webiny/api-upgrade": "5.
|
|
27
|
-
"@webiny/error": "5.
|
|
28
|
-
"@webiny/handler": "5.
|
|
29
|
-
"@webiny/handler-client": "5.
|
|
30
|
-
"@webiny/handler-graphql": "5.
|
|
31
|
-
"@webiny/plugins": "5.
|
|
32
|
-
"@webiny/project-utils": "5.
|
|
33
|
-
"@webiny/validation": "5.
|
|
23
|
+
"@webiny/api-i18n-content": "5.20.0-beta.2",
|
|
24
|
+
"@webiny/api-security": "5.20.0-beta.2",
|
|
25
|
+
"@webiny/api-tenancy": "5.20.0-beta.2",
|
|
26
|
+
"@webiny/api-upgrade": "5.20.0-beta.2",
|
|
27
|
+
"@webiny/error": "5.20.0-beta.2",
|
|
28
|
+
"@webiny/handler": "5.20.0-beta.2",
|
|
29
|
+
"@webiny/handler-client": "5.20.0-beta.2",
|
|
30
|
+
"@webiny/handler-graphql": "5.20.0-beta.2",
|
|
31
|
+
"@webiny/plugins": "5.20.0-beta.2",
|
|
32
|
+
"@webiny/project-utils": "5.20.0-beta.2",
|
|
33
|
+
"@webiny/validation": "5.20.0-beta.2",
|
|
34
34
|
"aws-sdk": "2.1032.0",
|
|
35
35
|
"commodo-fields-object": "1.0.6",
|
|
36
36
|
"mdbid": "1.0.0",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"@babel/plugin-transform-runtime": "^7.5.5",
|
|
45
45
|
"@babel/preset-env": "^7.5.5",
|
|
46
46
|
"@babel/preset-typescript": "^7.0.0",
|
|
47
|
-
"@webiny/api-i18n": "^5.
|
|
48
|
-
"@webiny/api-i18n-ddb": "^5.
|
|
49
|
-
"@webiny/cli": "^5.
|
|
47
|
+
"@webiny/api-i18n": "^5.20.0-beta.2",
|
|
48
|
+
"@webiny/api-i18n-ddb": "^5.20.0-beta.2",
|
|
49
|
+
"@webiny/cli": "^5.20.0-beta.2",
|
|
50
50
|
"jest": "^26.6.3",
|
|
51
51
|
"rimraf": "^3.0.2",
|
|
52
52
|
"ttypescript": "^1.5.12",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
]
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "86c73ea3b5bf71372f255aa24ee8c6ed98466b7f"
|
|
75
75
|
}
|
|
@@ -317,7 +317,7 @@ const filesContextCrudPlugin = new _ContextPlugin.ContextPlugin(async context =>
|
|
|
317
317
|
|
|
318
318
|
const where = _objectSpread(_objectSpread({}, initialWhere), {}, {
|
|
319
319
|
private: false,
|
|
320
|
-
locale: context.i18nContent.
|
|
320
|
+
locale: context.i18nContent.getCurrentLocale().code,
|
|
321
321
|
tenant: context.tenancy.getCurrentTenant().id
|
|
322
322
|
});
|
|
323
323
|
/**
|
|
@@ -406,10 +406,6 @@ const filesContextCrudPlugin = new _ContextPlugin.ContextPlugin(async context =>
|
|
|
406
406
|
};
|
|
407
407
|
|
|
408
408
|
try {
|
|
409
|
-
/**
|
|
410
|
-
* There is a meta object on the second key.
|
|
411
|
-
* TODO: use when changing GraphQL output of the tags.
|
|
412
|
-
*/
|
|
413
409
|
const [tags] = await storageOperations.tags(params);
|
|
414
410
|
|
|
415
411
|
if (Array.isArray(tags) === false) {
|
|
@@ -45,6 +45,10 @@ const systemCrudContextPlugin = new _ContextPlugin.ContextPlugin(async context =
|
|
|
45
45
|
context.fileManager = {};
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
const getTenantId = () => {
|
|
49
|
+
return context.tenancy.getCurrentTenant().id;
|
|
50
|
+
};
|
|
51
|
+
|
|
48
52
|
context.fileManager.system = {
|
|
49
53
|
async getVersion() {
|
|
50
54
|
const system = await storageOperations.get();
|
|
@@ -56,6 +60,7 @@ const systemCrudContextPlugin = new _ContextPlugin.ContextPlugin(async context =
|
|
|
56
60
|
|
|
57
61
|
if (system) {
|
|
58
62
|
const data = _objectSpread(_objectSpread({}, system), {}, {
|
|
63
|
+
tenant: system.tenant || getTenantId(),
|
|
59
64
|
version
|
|
60
65
|
});
|
|
61
66
|
|
|
@@ -73,7 +78,8 @@ const systemCrudContextPlugin = new _ContextPlugin.ContextPlugin(async context =
|
|
|
73
78
|
}
|
|
74
79
|
|
|
75
80
|
const data = {
|
|
76
|
-
version
|
|
81
|
+
version,
|
|
82
|
+
tenant: getTenantId()
|
|
77
83
|
};
|
|
78
84
|
|
|
79
85
|
try {
|
package/plugins/graphql.js
CHANGED