@nocobase/plugin-file-manager 0.7.5-alpha.1 → 0.7.6-alpha.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/client.d.ts +4 -0
- package/client.js +30 -0
- package/lib/client/FileStorageShortcut.d.ts +1 -0
- package/lib/client/FileStorageShortcut.js +121 -0
- package/lib/client/StorageOptions.d.ts +2 -0
- package/lib/client/StorageOptions.js +178 -0
- package/lib/client/index.d.ts +2 -0
- package/lib/client/index.js +51 -0
- package/lib/client/schemas/storage.d.ts +2 -0
- package/lib/client/schemas/storage.js +373 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -15
- package/lib/{actions → server/actions}/upload.d.ts +0 -0
- package/lib/{actions → server/actions}/upload.js +0 -0
- package/lib/{collections → server/collections}/attachments.d.ts +0 -0
- package/lib/{collections → server/collections}/attachments.js +0 -0
- package/lib/{collections → server/collections}/storages.d.ts +0 -0
- package/lib/{collections → server/collections}/storages.js +0 -0
- package/lib/{constants.d.ts → server/constants.d.ts} +0 -0
- package/lib/{constants.js → server/constants.js} +0 -0
- package/lib/server/index.d.ts +2 -0
- package/lib/server/index.js +30 -0
- package/lib/{rules → server/rules}/index.d.ts +0 -0
- package/lib/{rules → server/rules}/index.js +0 -0
- package/lib/{rules → server/rules}/mimetype.d.ts +0 -0
- package/lib/{rules → server/rules}/mimetype.js +0 -0
- package/lib/{server.d.ts → server/server.d.ts} +0 -0
- package/lib/{server.js → server/server.js} +0 -0
- package/lib/{storages → server/storages}/ali-oss.d.ts +0 -0
- package/lib/{storages → server/storages}/ali-oss.js +0 -0
- package/lib/{storages → server/storages}/index.d.ts +0 -0
- package/lib/{storages → server/storages}/index.js +0 -0
- package/lib/{storages → server/storages}/local.d.ts +0 -0
- package/lib/{storages → server/storages}/local.js +0 -0
- package/lib/{storages → server/storages}/s3.d.ts +0 -0
- package/lib/{storages → server/storages}/s3.js +0 -0
- package/lib/{utils.d.ts → server/utils.d.ts} +0 -0
- package/lib/{utils.js → server/utils.js} +0 -0
- package/package.json +7 -4
- package/server.d.ts +4 -0
- package/server.js +30 -0
package/client.d.ts
ADDED
package/client.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
4
|
+
|
|
5
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
6
|
+
|
|
7
|
+
var _index = _interopRequireWildcard(require("./lib/client"));
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
var _exportNames = {};
|
|
13
|
+
Object.defineProperty(exports, "default", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function get() {
|
|
16
|
+
return _index.default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
Object.keys(_index).forEach(function (key) {
|
|
21
|
+
if (key === "default" || key === "__esModule") return;
|
|
22
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
23
|
+
if (key in exports && exports[key] === _index[key]) return;
|
|
24
|
+
Object.defineProperty(exports, key, {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _index[key];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FileStorageShortcut: () => JSX.Element;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FileStorageShortcut = void 0;
|
|
7
|
+
|
|
8
|
+
function _icons() {
|
|
9
|
+
const data = require("@ant-design/icons");
|
|
10
|
+
|
|
11
|
+
_icons = function _icons() {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function _shared() {
|
|
19
|
+
const data = require("@formily/shared");
|
|
20
|
+
|
|
21
|
+
_shared = function _shared() {
|
|
22
|
+
return data;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function _react() {
|
|
29
|
+
const data = _interopRequireWildcard(require("react"));
|
|
30
|
+
|
|
31
|
+
_react = function _react() {
|
|
32
|
+
return data;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function _reactI18next() {
|
|
39
|
+
const data = require("react-i18next");
|
|
40
|
+
|
|
41
|
+
_reactI18next = function _reactI18next() {
|
|
42
|
+
return data;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return data;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function _client() {
|
|
49
|
+
const data = require("@nocobase/client");
|
|
50
|
+
|
|
51
|
+
_client = function _client() {
|
|
52
|
+
return data;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
return data;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
var _storage = require("./schemas/storage");
|
|
59
|
+
|
|
60
|
+
var _StorageOptions = require("./StorageOptions");
|
|
61
|
+
|
|
62
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
63
|
+
|
|
64
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
65
|
+
|
|
66
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
67
|
+
|
|
68
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
69
|
+
|
|
70
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
71
|
+
|
|
72
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
73
|
+
|
|
74
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
75
|
+
|
|
76
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
77
|
+
|
|
78
|
+
const schema = {
|
|
79
|
+
type: 'object',
|
|
80
|
+
properties: {
|
|
81
|
+
[(0, _shared().uid)()]: {
|
|
82
|
+
'x-component': 'Action.Drawer',
|
|
83
|
+
type: 'void',
|
|
84
|
+
title: '{{t("File storages")}}',
|
|
85
|
+
properties: {
|
|
86
|
+
storageSchema: _storage.storageSchema
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const FileStorageShortcut = () => {
|
|
93
|
+
const _useState = (0, _react().useState)(false),
|
|
94
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
95
|
+
visible = _useState2[0],
|
|
96
|
+
setVisible = _useState2[1];
|
|
97
|
+
|
|
98
|
+
const _useTranslation = (0, _reactI18next().useTranslation)(),
|
|
99
|
+
t = _useTranslation.t;
|
|
100
|
+
|
|
101
|
+
return _react().default.createElement(_client().ActionContext.Provider, {
|
|
102
|
+
value: {
|
|
103
|
+
visible,
|
|
104
|
+
setVisible
|
|
105
|
+
}
|
|
106
|
+
}, _react().default.createElement(_client().PluginManager.Toolbar.Item, {
|
|
107
|
+
eventKey: 'FileStorage',
|
|
108
|
+
onClick: () => {
|
|
109
|
+
setVisible(true);
|
|
110
|
+
},
|
|
111
|
+
icon: _react().default.createElement(_icons().FileOutlined, null),
|
|
112
|
+
title: t('File storages')
|
|
113
|
+
}), _react().default.createElement(_client().SchemaComponent, {
|
|
114
|
+
components: {
|
|
115
|
+
StorageOptions: _StorageOptions.StorageOptions
|
|
116
|
+
},
|
|
117
|
+
schema: schema
|
|
118
|
+
}));
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
exports.FileStorageShortcut = FileStorageShortcut;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StorageOptions = void 0;
|
|
7
|
+
|
|
8
|
+
function _antd() {
|
|
9
|
+
const data = require("@formily/antd");
|
|
10
|
+
|
|
11
|
+
_antd = function _antd() {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function _react() {
|
|
19
|
+
const data = require("@formily/react");
|
|
20
|
+
|
|
21
|
+
_react = function _react() {
|
|
22
|
+
return data;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function _react2() {
|
|
29
|
+
const data = _interopRequireWildcard(require("react"));
|
|
30
|
+
|
|
31
|
+
_react2 = function _react2() {
|
|
32
|
+
return data;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
39
|
+
|
|
40
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
41
|
+
|
|
42
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
43
|
+
|
|
44
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
45
|
+
|
|
46
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
47
|
+
|
|
48
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
49
|
+
|
|
50
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
51
|
+
|
|
52
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
|
+
|
|
54
|
+
const schema = {
|
|
55
|
+
local: {
|
|
56
|
+
properties: {
|
|
57
|
+
documentRoot: {
|
|
58
|
+
title: '{{t("Destination")}}',
|
|
59
|
+
type: 'string',
|
|
60
|
+
'x-decorator': 'FormItem',
|
|
61
|
+
'x-component': 'Input',
|
|
62
|
+
default: 'uploads'
|
|
63
|
+
},
|
|
64
|
+
path: {
|
|
65
|
+
title: '{{t("Path")}}',
|
|
66
|
+
type: 'string',
|
|
67
|
+
'x-decorator': 'FormItem',
|
|
68
|
+
'x-component': 'Input'
|
|
69
|
+
},
|
|
70
|
+
serve: {
|
|
71
|
+
type: 'string',
|
|
72
|
+
'x-decorator': 'FormItem',
|
|
73
|
+
'x-component': 'Checkbox',
|
|
74
|
+
'x-content': '{{t("Use the built-in static file server")}}',
|
|
75
|
+
default: true
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
'ali-oss': {
|
|
80
|
+
properties: {
|
|
81
|
+
region: {
|
|
82
|
+
title: '{{t("Region")}}',
|
|
83
|
+
type: 'string',
|
|
84
|
+
'x-decorator': 'FormItem',
|
|
85
|
+
'x-component': 'Input',
|
|
86
|
+
required: true
|
|
87
|
+
},
|
|
88
|
+
accessKeyId: {
|
|
89
|
+
title: '{{t("AccessKey ID")}}',
|
|
90
|
+
type: 'string',
|
|
91
|
+
'x-decorator': 'FormItem',
|
|
92
|
+
'x-component': 'Input',
|
|
93
|
+
required: true
|
|
94
|
+
},
|
|
95
|
+
accessKeySecret: {
|
|
96
|
+
title: '{{t("AccessKey Secret")}}',
|
|
97
|
+
type: 'string',
|
|
98
|
+
'x-decorator': 'FormItem',
|
|
99
|
+
'x-component': 'Password',
|
|
100
|
+
required: true
|
|
101
|
+
},
|
|
102
|
+
bucket: {
|
|
103
|
+
title: '{{t("Bucket")}}',
|
|
104
|
+
type: 'string',
|
|
105
|
+
'x-decorator': 'FormItem',
|
|
106
|
+
'x-component': 'Input',
|
|
107
|
+
required: true
|
|
108
|
+
},
|
|
109
|
+
path: {
|
|
110
|
+
title: '{{t("Path")}}',
|
|
111
|
+
type: 'string',
|
|
112
|
+
'x-decorator': 'FormItem',
|
|
113
|
+
'x-component': 'Input'
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
s3: {
|
|
118
|
+
properties: {
|
|
119
|
+
region: {
|
|
120
|
+
title: '{{t("Region")}}',
|
|
121
|
+
type: 'string',
|
|
122
|
+
'x-decorator': 'FormItem',
|
|
123
|
+
'x-component': 'Input',
|
|
124
|
+
required: true
|
|
125
|
+
},
|
|
126
|
+
accessKeyId: {
|
|
127
|
+
title: '{{t("AccessKey ID")}}',
|
|
128
|
+
type: 'string',
|
|
129
|
+
'x-decorator': 'FormItem',
|
|
130
|
+
'x-component': 'Input',
|
|
131
|
+
required: true
|
|
132
|
+
},
|
|
133
|
+
secretAccessKey: {
|
|
134
|
+
title: '{{t("AccessKey Secret")}}',
|
|
135
|
+
type: 'string',
|
|
136
|
+
'x-decorator': 'FormItem',
|
|
137
|
+
'x-component': 'Password',
|
|
138
|
+
required: true
|
|
139
|
+
},
|
|
140
|
+
bucket: {
|
|
141
|
+
title: '{{t("Bucket")}}',
|
|
142
|
+
type: 'string',
|
|
143
|
+
'x-decorator': 'FormItem',
|
|
144
|
+
'x-component': 'Input',
|
|
145
|
+
required: true
|
|
146
|
+
},
|
|
147
|
+
path: {
|
|
148
|
+
title: '{{t("Path")}}',
|
|
149
|
+
type: 'string',
|
|
150
|
+
'x-decorator': 'FormItem',
|
|
151
|
+
'x-component': 'Input'
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
const StorageOptions = (0, _react().observer)(props => {
|
|
157
|
+
const form = (0, _react().useForm)();
|
|
158
|
+
const field = (0, _react().useField)();
|
|
159
|
+
|
|
160
|
+
const _useState = (0, _react2().useState)(new (_react().Schema)({})),
|
|
161
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
162
|
+
s = _useState2[0],
|
|
163
|
+
setSchema = _useState2[1];
|
|
164
|
+
|
|
165
|
+
(0, _react2().useEffect)(() => {
|
|
166
|
+
form.clearFormGraph('options.*');
|
|
167
|
+
setSchema(new (_react().Schema)(schema[form.values.type] || {}));
|
|
168
|
+
}, [form.values.type]);
|
|
169
|
+
return _react2().default.createElement("div", null, _react2().default.createElement(_antd().FormLayout, {
|
|
170
|
+
layout: 'vertical'
|
|
171
|
+
}, _react2().default.createElement(_react().RecursionField, {
|
|
172
|
+
key: form.values.type || 'local',
|
|
173
|
+
basePath: field.address,
|
|
174
|
+
onlyRenderProperties: true,
|
|
175
|
+
schema: s
|
|
176
|
+
})));
|
|
177
|
+
});
|
|
178
|
+
exports.StorageOptions = StorageOptions;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = _default;
|
|
7
|
+
|
|
8
|
+
function _react() {
|
|
9
|
+
const data = _interopRequireWildcard(require("react"));
|
|
10
|
+
|
|
11
|
+
_react = function _react() {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function _client() {
|
|
19
|
+
const data = require("@nocobase/client");
|
|
20
|
+
|
|
21
|
+
_client = function _client() {
|
|
22
|
+
return data;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var _FileStorageShortcut = require("./FileStorageShortcut");
|
|
29
|
+
|
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
|
|
32
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
+
|
|
34
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
35
|
+
|
|
36
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
37
|
+
|
|
38
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
39
|
+
|
|
40
|
+
function _default(props) {
|
|
41
|
+
const ctx = (0, _react().useContext)(_client().PluginManagerContext);
|
|
42
|
+
return _react().default.createElement(_client().PluginManagerContext.Provider, {
|
|
43
|
+
value: {
|
|
44
|
+
components: _objectSpread(_objectSpread({}, ctx === null || ctx === void 0 ? void 0 : ctx.components), {}, {
|
|
45
|
+
FileStorageShortcut: _FileStorageShortcut.FileStorageShortcut
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
}, props.children);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
;
|
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.storageSchema = void 0;
|
|
7
|
+
|
|
8
|
+
function _shared() {
|
|
9
|
+
const data = require("@formily/shared");
|
|
10
|
+
|
|
11
|
+
_shared = function _shared() {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function _client() {
|
|
19
|
+
const data = require("@nocobase/client");
|
|
20
|
+
|
|
21
|
+
_client = function _client() {
|
|
22
|
+
return data;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
+
|
|
30
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
|
+
|
|
32
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33
|
+
|
|
34
|
+
const collection = {
|
|
35
|
+
name: 'storages',
|
|
36
|
+
fields: [{
|
|
37
|
+
type: 'integer',
|
|
38
|
+
name: 'title',
|
|
39
|
+
interface: 'input',
|
|
40
|
+
uiSchema: {
|
|
41
|
+
title: '{{t("Storage display name")}}',
|
|
42
|
+
type: 'string',
|
|
43
|
+
'x-component': 'Input',
|
|
44
|
+
required: true
|
|
45
|
+
}
|
|
46
|
+
}, {
|
|
47
|
+
type: 'string',
|
|
48
|
+
name: 'name',
|
|
49
|
+
interface: 'input',
|
|
50
|
+
uiSchema: {
|
|
51
|
+
title: '{{t("Storage name")}}',
|
|
52
|
+
type: 'string',
|
|
53
|
+
'x-component': 'Input'
|
|
54
|
+
}
|
|
55
|
+
}, {
|
|
56
|
+
type: 'string',
|
|
57
|
+
name: 'type',
|
|
58
|
+
interface: 'select',
|
|
59
|
+
uiSchema: {
|
|
60
|
+
title: '{{t("Storage type")}}',
|
|
61
|
+
type: 'string',
|
|
62
|
+
'x-component': 'Select',
|
|
63
|
+
required: true,
|
|
64
|
+
enum: [{
|
|
65
|
+
label: '{{t("Local storage")}}',
|
|
66
|
+
value: 'local'
|
|
67
|
+
}, {
|
|
68
|
+
label: '{{t("Aliyun OSS")}}',
|
|
69
|
+
value: 'ali-oss'
|
|
70
|
+
}, {
|
|
71
|
+
label: '{{t("Amazon S3")}}',
|
|
72
|
+
value: 's3'
|
|
73
|
+
}]
|
|
74
|
+
}
|
|
75
|
+
}, {
|
|
76
|
+
type: 'string',
|
|
77
|
+
name: 'baseUrl',
|
|
78
|
+
interface: 'input',
|
|
79
|
+
uiSchema: {
|
|
80
|
+
title: '{{t("Storage base URL")}}',
|
|
81
|
+
type: 'string',
|
|
82
|
+
'x-component': 'Input'
|
|
83
|
+
}
|
|
84
|
+
}, {
|
|
85
|
+
type: 'boolean',
|
|
86
|
+
name: 'default',
|
|
87
|
+
interface: 'boolean',
|
|
88
|
+
uiSchema: {
|
|
89
|
+
title: '{{t("Default storage")}}',
|
|
90
|
+
type: 'boolean',
|
|
91
|
+
'x-component': 'Checkbox'
|
|
92
|
+
}
|
|
93
|
+
}]
|
|
94
|
+
};
|
|
95
|
+
const storageSchema = {
|
|
96
|
+
type: 'object',
|
|
97
|
+
properties: {
|
|
98
|
+
block1: {
|
|
99
|
+
type: 'void',
|
|
100
|
+
'x-decorator': 'ResourceActionProvider',
|
|
101
|
+
'x-decorator-props': {
|
|
102
|
+
collection,
|
|
103
|
+
resourceName: 'storages',
|
|
104
|
+
request: {
|
|
105
|
+
resource: 'storages',
|
|
106
|
+
action: 'list',
|
|
107
|
+
params: {
|
|
108
|
+
pageSize: 50,
|
|
109
|
+
sort: ['id'],
|
|
110
|
+
appends: []
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
'x-component': 'CollectionProvider',
|
|
115
|
+
'x-component-props': {
|
|
116
|
+
collection
|
|
117
|
+
},
|
|
118
|
+
properties: {
|
|
119
|
+
actions: {
|
|
120
|
+
type: 'void',
|
|
121
|
+
'x-component': 'ActionBar',
|
|
122
|
+
'x-component-props': {
|
|
123
|
+
style: {
|
|
124
|
+
marginBottom: 16
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
properties: {
|
|
128
|
+
delete: {
|
|
129
|
+
type: 'void',
|
|
130
|
+
title: '{{ t("Delete") }}',
|
|
131
|
+
'x-component': 'Action',
|
|
132
|
+
'x-component-props': {
|
|
133
|
+
useAction: '{{ cm.useBulkDestroyAction }}',
|
|
134
|
+
confirm: {
|
|
135
|
+
title: "{{t('Delete storage')}}",
|
|
136
|
+
content: "{{t('Are you sure you want to delete it?')}}"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
create: {
|
|
141
|
+
type: 'void',
|
|
142
|
+
title: '{{t("Add storage")}}',
|
|
143
|
+
'x-component': 'Action',
|
|
144
|
+
'x-component-props': {
|
|
145
|
+
type: 'primary'
|
|
146
|
+
},
|
|
147
|
+
properties: {
|
|
148
|
+
drawer: {
|
|
149
|
+
type: 'void',
|
|
150
|
+
'x-component': 'Action.Drawer',
|
|
151
|
+
'x-decorator': 'Form',
|
|
152
|
+
'x-decorator-props': {
|
|
153
|
+
useValues(options) {
|
|
154
|
+
const ctx = (0, _client().useActionContext)();
|
|
155
|
+
return (0, _client().useRequest)(() => Promise.resolve({
|
|
156
|
+
data: {
|
|
157
|
+
name: `s_${(0, _shared().uid)()}`
|
|
158
|
+
}
|
|
159
|
+
}), _objectSpread(_objectSpread({}, options), {}, {
|
|
160
|
+
refreshDeps: [ctx.visible]
|
|
161
|
+
}));
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
},
|
|
165
|
+
title: '{{t("Add storage")}}',
|
|
166
|
+
properties: {
|
|
167
|
+
title: {
|
|
168
|
+
'x-component': 'CollectionField',
|
|
169
|
+
'x-decorator': 'FormItem'
|
|
170
|
+
},
|
|
171
|
+
name: {
|
|
172
|
+
'x-component': 'CollectionField',
|
|
173
|
+
'x-decorator': 'FormItem',
|
|
174
|
+
description: '{{t("Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.")}}'
|
|
175
|
+
},
|
|
176
|
+
baseUrl: {
|
|
177
|
+
'x-component': 'CollectionField',
|
|
178
|
+
'x-decorator': 'FormItem'
|
|
179
|
+
},
|
|
180
|
+
type: {
|
|
181
|
+
'x-component': 'CollectionField',
|
|
182
|
+
'x-decorator': 'FormItem'
|
|
183
|
+
},
|
|
184
|
+
options: {
|
|
185
|
+
type: 'object',
|
|
186
|
+
'x-component': 'StorageOptions'
|
|
187
|
+
},
|
|
188
|
+
default: {
|
|
189
|
+
'x-component': 'CollectionField',
|
|
190
|
+
'x-decorator': 'FormItem',
|
|
191
|
+
title: '',
|
|
192
|
+
'x-content': '{{t("Default storage")}}'
|
|
193
|
+
},
|
|
194
|
+
footer: {
|
|
195
|
+
type: 'void',
|
|
196
|
+
'x-component': 'Action.Drawer.Footer',
|
|
197
|
+
properties: {
|
|
198
|
+
cancel: {
|
|
199
|
+
title: '{{t("Cancel")}}',
|
|
200
|
+
'x-component': 'Action',
|
|
201
|
+
'x-component-props': {
|
|
202
|
+
useAction: '{{ cm.useCancelAction }}'
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
submit: {
|
|
206
|
+
title: '{{t("Submit")}}',
|
|
207
|
+
'x-component': 'Action',
|
|
208
|
+
'x-component-props': {
|
|
209
|
+
type: 'primary',
|
|
210
|
+
useAction: '{{ cm.useCreateAction }}'
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
table: {
|
|
222
|
+
type: 'void',
|
|
223
|
+
'x-uid': 'input',
|
|
224
|
+
'x-component': 'Table.Void',
|
|
225
|
+
'x-component-props': {
|
|
226
|
+
rowKey: 'id',
|
|
227
|
+
rowSelection: {
|
|
228
|
+
type: 'checkbox'
|
|
229
|
+
},
|
|
230
|
+
useDataSource: '{{ cm.useDataSourceFromRAC }}'
|
|
231
|
+
},
|
|
232
|
+
properties: {
|
|
233
|
+
column1: {
|
|
234
|
+
type: 'void',
|
|
235
|
+
'x-decorator': 'Table.Column.Decorator',
|
|
236
|
+
'x-component': 'Table.Column',
|
|
237
|
+
properties: {
|
|
238
|
+
title: {
|
|
239
|
+
type: 'number',
|
|
240
|
+
'x-component': 'CollectionField',
|
|
241
|
+
'x-read-pretty': true
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
column2: {
|
|
246
|
+
type: 'void',
|
|
247
|
+
'x-decorator': 'Table.Column.Decorator',
|
|
248
|
+
'x-component': 'Table.Column',
|
|
249
|
+
properties: {
|
|
250
|
+
name: {
|
|
251
|
+
type: 'string',
|
|
252
|
+
'x-component': 'CollectionField',
|
|
253
|
+
'x-read-pretty': true
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
column3: {
|
|
258
|
+
type: 'void',
|
|
259
|
+
'x-decorator': 'Table.Column.Decorator',
|
|
260
|
+
'x-component': 'Table.Column',
|
|
261
|
+
properties: {
|
|
262
|
+
default: {
|
|
263
|
+
type: 'string',
|
|
264
|
+
'x-component': 'CollectionField',
|
|
265
|
+
'x-read-pretty': true
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
column4: {
|
|
270
|
+
type: 'void',
|
|
271
|
+
title: '{{t("Actions")}}',
|
|
272
|
+
'x-component': 'Table.Column',
|
|
273
|
+
properties: {
|
|
274
|
+
actions: {
|
|
275
|
+
type: 'void',
|
|
276
|
+
'x-component': 'Space',
|
|
277
|
+
'x-component-props': {
|
|
278
|
+
split: '|'
|
|
279
|
+
},
|
|
280
|
+
properties: {
|
|
281
|
+
update: {
|
|
282
|
+
type: 'void',
|
|
283
|
+
title: '{{t("Edit")}}',
|
|
284
|
+
'x-component': 'Action.Link',
|
|
285
|
+
'x-component-props': {
|
|
286
|
+
type: 'primary'
|
|
287
|
+
},
|
|
288
|
+
properties: {
|
|
289
|
+
drawer: {
|
|
290
|
+
type: 'void',
|
|
291
|
+
'x-component': 'Action.Drawer',
|
|
292
|
+
'x-decorator': 'Form',
|
|
293
|
+
'x-decorator-props': {
|
|
294
|
+
useValues: '{{ cm.useValuesFromRecord }}'
|
|
295
|
+
},
|
|
296
|
+
title: '{{t("Edit storage")}}',
|
|
297
|
+
properties: {
|
|
298
|
+
title: {
|
|
299
|
+
'x-component': 'CollectionField',
|
|
300
|
+
'x-decorator': 'FormItem'
|
|
301
|
+
},
|
|
302
|
+
name: {
|
|
303
|
+
'x-component': 'CollectionField',
|
|
304
|
+
'x-decorator': 'FormItem',
|
|
305
|
+
'x-disabled': true
|
|
306
|
+
},
|
|
307
|
+
baseUrl: {
|
|
308
|
+
'x-component': 'CollectionField',
|
|
309
|
+
'x-decorator': 'FormItem'
|
|
310
|
+
},
|
|
311
|
+
type: {
|
|
312
|
+
'x-component': 'CollectionField',
|
|
313
|
+
'x-decorator': 'FormItem',
|
|
314
|
+
'x-disabled': true
|
|
315
|
+
},
|
|
316
|
+
options: {
|
|
317
|
+
type: 'object',
|
|
318
|
+
'x-component': 'StorageOptions'
|
|
319
|
+
},
|
|
320
|
+
default: {
|
|
321
|
+
title: '',
|
|
322
|
+
'x-component': 'CollectionField',
|
|
323
|
+
'x-decorator': 'FormItem',
|
|
324
|
+
'x-content': '{{t("Default storage")}}'
|
|
325
|
+
},
|
|
326
|
+
footer: {
|
|
327
|
+
type: 'void',
|
|
328
|
+
'x-component': 'Action.Drawer.Footer',
|
|
329
|
+
properties: {
|
|
330
|
+
cancel: {
|
|
331
|
+
title: '{{t("Cancel")}}',
|
|
332
|
+
'x-component': 'Action',
|
|
333
|
+
'x-component-props': {
|
|
334
|
+
useAction: '{{ cm.useCancelAction }}'
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
submit: {
|
|
338
|
+
title: '{{t("Submit")}}',
|
|
339
|
+
'x-component': 'Action',
|
|
340
|
+
'x-component-props': {
|
|
341
|
+
type: 'primary',
|
|
342
|
+
useAction: '{{ cm.useUpdateAction }}'
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
delete: {
|
|
352
|
+
type: 'void',
|
|
353
|
+
title: '{{ t("Delete") }}',
|
|
354
|
+
'x-component': 'Action.Link',
|
|
355
|
+
'x-component-props': {
|
|
356
|
+
confirm: {
|
|
357
|
+
title: "{{t('Delete role')}}",
|
|
358
|
+
content: "{{t('Are you sure you want to delete it?')}}"
|
|
359
|
+
},
|
|
360
|
+
useAction: '{{cm.useDestroyAction}}'
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
exports.storageSchema = storageSchema;
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {};
|
|
7
6
|
Object.defineProperty(exports, "default", {
|
|
8
7
|
enumerable: true,
|
|
9
8
|
get: function get() {
|
|
@@ -11,20 +10,6 @@ Object.defineProperty(exports, "default", {
|
|
|
11
10
|
}
|
|
12
11
|
});
|
|
13
12
|
|
|
14
|
-
var _constants = require("./constants");
|
|
15
|
-
|
|
16
|
-
Object.keys(_constants).forEach(function (key) {
|
|
17
|
-
if (key === "default" || key === "__esModule") return;
|
|
18
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
19
|
-
if (key in exports && exports[key] === _constants[key]) return;
|
|
20
|
-
Object.defineProperty(exports, key, {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function get() {
|
|
23
|
-
return _constants[key];
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
|
|
28
13
|
var _server = _interopRequireDefault(require("./server"));
|
|
29
14
|
|
|
30
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {};
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _server.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
var _constants = require("./constants");
|
|
15
|
+
|
|
16
|
+
Object.keys(_constants).forEach(function (key) {
|
|
17
|
+
if (key === "default" || key === "__esModule") return;
|
|
18
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
19
|
+
if (key in exports && exports[key] === _constants[key]) return;
|
|
20
|
+
Object.defineProperty(exports, key, {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function get() {
|
|
23
|
+
return _constants[key];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
var _server = _interopRequireDefault(require("./server"));
|
|
29
|
+
|
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-file-manager",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6-alpha.1",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"licenses": [
|
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@koa/multer": "^3.0.0",
|
|
14
|
-
"@nocobase/
|
|
14
|
+
"@nocobase/actions": "0.7.6-alpha.1",
|
|
15
|
+
"@nocobase/client": "0.7.6-alpha.1",
|
|
16
|
+
"@nocobase/database": "0.7.6-alpha.1",
|
|
17
|
+
"@nocobase/server": "0.7.6-alpha.1",
|
|
15
18
|
"aws-sdk": "^2.2.32",
|
|
16
19
|
"koa-static": "^5.0.0",
|
|
17
20
|
"mime-match": "^1.0.2",
|
|
@@ -21,9 +24,9 @@
|
|
|
21
24
|
"multer-s3": "^2.10.0"
|
|
22
25
|
},
|
|
23
26
|
"devDependencies": {
|
|
24
|
-
"@nocobase/test": "0.7.
|
|
27
|
+
"@nocobase/test": "0.7.6-alpha.1",
|
|
25
28
|
"@types/koa-multer": "^1.0.1",
|
|
26
29
|
"@types/multer": "^1.4.5"
|
|
27
30
|
},
|
|
28
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "f20ce011a9ac516dc6aec110979f063a0e63f923"
|
|
29
32
|
}
|
package/server.d.ts
ADDED
package/server.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
4
|
+
|
|
5
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
6
|
+
|
|
7
|
+
var _index = _interopRequireWildcard(require("./lib/server"));
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
var _exportNames = {};
|
|
13
|
+
Object.defineProperty(exports, "default", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function get() {
|
|
16
|
+
return _index.default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
Object.keys(_index).forEach(function (key) {
|
|
21
|
+
if (key === "default" || key === "__esModule") return;
|
|
22
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
23
|
+
if (key in exports && exports[key] === _index[key]) return;
|
|
24
|
+
Object.defineProperty(exports, key, {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _index[key];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|