@webiny/api-file-manager-aco 5.37.8 → 5.42.3-beta.0
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/LICENSE +2 -7
- package/README.md +18 -0
- package/index.d.ts +1 -0
- package/index.js +18 -0
- package/index.js.map +1 -0
- package/package.json +33 -4
- package/plugins/createFmFileFolderModelModifier.d.ts +10 -0
- package/plugins/createFmFileFolderModelModifier.js +40 -0
- package/plugins/createFmFileFolderModelModifier.js.map +1 -0
- package/plugins/index.d.ts +1 -0
- package/plugins/index.js +18 -0
- package/plugins/index.js.map +1 -0
package/LICENSE
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* All content that resides under the "enterprise/" directories of this repository, is licensed under the license defined in their respective "enterprise/LICENSE" file.
|
|
6
|
-
* All content that resides under the "packages/" sub-directories of this repository, is licensed under the license defined in their respective "packages/*/LICENSE" file.
|
|
7
|
-
* All third party components incorporated into the Webiny Software are licensed under the original license provided by the owner of the applicable component.
|
|
8
|
-
* Content outside of the above mentioned directories or restrictions above is available under the "MIT" license as defined below.
|
|
3
|
+
Copyright (c) Webiny
|
|
9
4
|
|
|
10
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# @webiny/api-file-manager-aco
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@webiny/api-file-manager-aco)
|
|
4
|
+
[](https://www.npmjs.com/package/@webiny/api-file-manager-aco)
|
|
5
|
+
[](https://github.com/prettier/prettier)
|
|
6
|
+
[](http://makeapullrequest.com)
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
npm install --save @webiny/api-file-manager-aco
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Or if you prefer yarn:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
yarn add @webiny/api-file-manager-aco
|
|
18
|
+
```
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./plugins";
|
package/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _plugins = require("./plugins");
|
|
7
|
+
Object.keys(_plugins).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _plugins[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _plugins[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_plugins","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["index.ts"],"sourcesContent":["export * from \"./plugins\";\n"],"mappings":";;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,QAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,QAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,QAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,17 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-file-manager-aco",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.42.3-beta.0",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"api-file-manager-aco:base"
|
|
7
|
+
],
|
|
4
8
|
"repository": {
|
|
5
9
|
"type": "git",
|
|
6
10
|
"url": "https://github.com/webiny/webiny-js.git",
|
|
7
11
|
"directory": "packages/api-file-manager-aco"
|
|
8
12
|
},
|
|
9
|
-
"description": "
|
|
13
|
+
"description": "Connect File Manager to ACO",
|
|
10
14
|
"author": "Webiny Ltd.",
|
|
11
15
|
"license": "MIT",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "node ../cli/bin.js run build",
|
|
18
|
+
"watch": "node ../cli/bin.js run watch"
|
|
19
|
+
},
|
|
12
20
|
"publishConfig": {
|
|
13
21
|
"access": "public",
|
|
14
|
-
"directory": "
|
|
22
|
+
"directory": "dist"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@webiny/api-aco": "5.42.3-beta.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@webiny/api": "5.42.3-beta.0",
|
|
29
|
+
"@webiny/api-admin-users": "5.42.3-beta.0",
|
|
30
|
+
"@webiny/api-headless-cms": "5.42.3-beta.0",
|
|
31
|
+
"@webiny/api-i18n": "5.42.3-beta.0",
|
|
32
|
+
"@webiny/api-security": "5.42.3-beta.0",
|
|
33
|
+
"@webiny/api-tenancy": "5.42.3-beta.0",
|
|
34
|
+
"@webiny/api-wcp": "5.42.3-beta.0",
|
|
35
|
+
"@webiny/handler": "5.42.3-beta.0",
|
|
36
|
+
"@webiny/handler-aws": "5.42.3-beta.0",
|
|
37
|
+
"@webiny/handler-graphql": "5.42.3-beta.0",
|
|
38
|
+
"@webiny/plugins": "5.42.3-beta.0",
|
|
39
|
+
"@webiny/project-utils": "5.42.3-beta.0",
|
|
40
|
+
"@webiny/wcp": "5.42.3-beta.0",
|
|
41
|
+
"graphql": "15.9.0",
|
|
42
|
+
"ttypescript": "1.5.15",
|
|
43
|
+
"typescript": "4.9.5"
|
|
15
44
|
},
|
|
16
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "3ff1f272d954a6d045c023595d94556af38f4b14"
|
|
17
46
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type CmsModelField, type CmsModelModifierCallable, FolderCmsModelModifierPlugin, type IFolderModelFieldsModifier } from "@webiny/api-aco";
|
|
2
|
+
import { CmsModelField as BaseModelField } from "@webiny/api-headless-cms/types";
|
|
3
|
+
export declare class FolderModelFieldsModifier implements IFolderModelFieldsModifier {
|
|
4
|
+
private fields;
|
|
5
|
+
private readonly namespace;
|
|
6
|
+
constructor(namespace: string);
|
|
7
|
+
setFields(fields: BaseModelField[]): void;
|
|
8
|
+
addField(field: CmsModelField): void;
|
|
9
|
+
}
|
|
10
|
+
export declare const createFmFileFolderModelModifier: (callback: CmsModelModifierCallable) => FolderCmsModelModifierPlugin;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createFmFileFolderModelModifier = exports.FolderModelFieldsModifier = void 0;
|
|
7
|
+
var _apiAco = require("@webiny/api-aco");
|
|
8
|
+
class FolderModelFieldsModifier {
|
|
9
|
+
fields = [];
|
|
10
|
+
constructor(namespace) {
|
|
11
|
+
this.namespace = namespace;
|
|
12
|
+
}
|
|
13
|
+
setFields(fields) {
|
|
14
|
+
this.fields = fields;
|
|
15
|
+
}
|
|
16
|
+
addField(field) {
|
|
17
|
+
const {
|
|
18
|
+
tags,
|
|
19
|
+
...rest
|
|
20
|
+
} = field;
|
|
21
|
+
this.fields.push({
|
|
22
|
+
...rest,
|
|
23
|
+
id: `${this.namespace}_${field.id}`,
|
|
24
|
+
fieldId: `${this.namespace}_${field.fieldId}`,
|
|
25
|
+
storageId: `${field.type}@${this.namespace}_${field.id}`,
|
|
26
|
+
tags: (tags ?? []).concat([`$namespace:${this.namespace}`])
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.FolderModelFieldsModifier = FolderModelFieldsModifier;
|
|
31
|
+
const createFmFileFolderModelModifier = callback => {
|
|
32
|
+
const modifier = new FolderModelFieldsModifier("fm_file");
|
|
33
|
+
return new _apiAco.FolderCmsModelModifierPlugin({
|
|
34
|
+
callback,
|
|
35
|
+
modifier
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
exports.createFmFileFolderModelModifier = createFmFileFolderModelModifier;
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=createFmFileFolderModelModifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_apiAco","require","FolderModelFieldsModifier","fields","constructor","namespace","setFields","addField","field","tags","rest","push","id","fieldId","storageId","type","concat","exports","createFmFileFolderModelModifier","callback","modifier","FolderCmsModelModifierPlugin"],"sources":["createFmFileFolderModelModifier.ts"],"sourcesContent":["import {\n type CmsModelField,\n type CmsModelModifierCallable,\n FolderCmsModelModifierPlugin,\n type IFolderModelFieldsModifier\n} from \"@webiny/api-aco\";\nimport { CmsModelField as BaseModelField } from \"@webiny/api-headless-cms/types\";\n\nexport class FolderModelFieldsModifier implements IFolderModelFieldsModifier {\n private fields: BaseModelField[] = [];\n private readonly namespace: string;\n\n constructor(namespace: string) {\n this.namespace = namespace;\n }\n\n setFields(fields: BaseModelField[]) {\n this.fields = fields;\n }\n\n addField(field: CmsModelField) {\n const { tags, ...rest } = field;\n\n this.fields.push({\n ...rest,\n id: `${this.namespace}_${field.id}`,\n fieldId: `${this.namespace}_${field.fieldId}`,\n storageId: `${field.type}@${this.namespace}_${field.id}`,\n tags: (tags ?? []).concat([`$namespace:${this.namespace}`])\n });\n }\n}\n\nexport const createFmFileFolderModelModifier = (callback: CmsModelModifierCallable) => {\n const modifier = new FolderModelFieldsModifier(\"fm_file\");\n\n return new FolderCmsModelModifierPlugin({\n callback,\n modifier\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAQO,MAAMC,yBAAyB,CAAuC;EACjEC,MAAM,GAAqB,EAAE;EAGrCC,WAAWA,CAACC,SAAiB,EAAE;IAC3B,IAAI,CAACA,SAAS,GAAGA,SAAS;EAC9B;EAEAC,SAASA,CAACH,MAAwB,EAAE;IAChC,IAAI,CAACA,MAAM,GAAGA,MAAM;EACxB;EAEAI,QAAQA,CAACC,KAAoB,EAAE;IAC3B,MAAM;MAAEC,IAAI;MAAE,GAAGC;IAAK,CAAC,GAAGF,KAAK;IAE/B,IAAI,CAACL,MAAM,CAACQ,IAAI,CAAC;MACb,GAAGD,IAAI;MACPE,EAAE,EAAE,GAAG,IAAI,CAACP,SAAS,IAAIG,KAAK,CAACI,EAAE,EAAE;MACnCC,OAAO,EAAE,GAAG,IAAI,CAACR,SAAS,IAAIG,KAAK,CAACK,OAAO,EAAE;MAC7CC,SAAS,EAAE,GAAGN,KAAK,CAACO,IAAI,IAAI,IAAI,CAACV,SAAS,IAAIG,KAAK,CAACI,EAAE,EAAE;MACxDH,IAAI,EAAE,CAACA,IAAI,IAAI,EAAE,EAAEO,MAAM,CAAC,CAAC,cAAc,IAAI,CAACX,SAAS,EAAE,CAAC;IAC9D,CAAC,CAAC;EACN;AACJ;AAACY,OAAA,CAAAf,yBAAA,GAAAA,yBAAA;AAEM,MAAMgB,+BAA+B,GAAIC,QAAkC,IAAK;EACnF,MAAMC,QAAQ,GAAG,IAAIlB,yBAAyB,CAAC,SAAS,CAAC;EAEzD,OAAO,IAAImB,oCAA4B,CAAC;IACpCF,QAAQ;IACRC;EACJ,CAAC,CAAC;AACN,CAAC;AAACH,OAAA,CAAAC,+BAAA,GAAAA,+BAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./createFmFileFolderModelModifier";
|
package/plugins/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _createFmFileFolderModelModifier = require("./createFmFileFolderModelModifier");
|
|
7
|
+
Object.keys(_createFmFileFolderModelModifier).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _createFmFileFolderModelModifier[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _createFmFileFolderModelModifier[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_createFmFileFolderModelModifier","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["index.ts"],"sourcesContent":["export * from \"./createFmFileFolderModelModifier\";\n"],"mappings":";;;;;AAAA,IAAAA,gCAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,gCAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,gCAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,gCAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|