@adminforth/rich-editor 1.6.0 → 1.6.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/build.log +2 -2
- package/custom/quillEditor.vue +1 -1
- package/dist/custom/quillEditor.vue +1 -1
- package/dist/index.js +3 -3
- package/index.ts +1 -1
- package/package.json +1 -1
package/build.log
CHANGED
|
@@ -10,5 +10,5 @@ custom/package.json
|
|
|
10
10
|
custom/quillEditor.vue
|
|
11
11
|
custom/tsconfig.json
|
|
12
12
|
|
|
13
|
-
sent 28,
|
|
14
|
-
total size is 28,
|
|
13
|
+
sent 28,577 bytes received 115 bytes 57,384.00 bytes/sec
|
|
14
|
+
total size is 28,160 speedup is 0.98
|
package/custom/quillEditor.vue
CHANGED
|
@@ -129,7 +129,7 @@ async function saveToServer(file: File) {
|
|
|
129
129
|
const originalExtension = file.name.split('.').pop();
|
|
130
130
|
// send fd to s3
|
|
131
131
|
const { uploadUrl, tagline, previewUrl, s3Path, error } = await callAdminForthApi({
|
|
132
|
-
path: `/plugin/${props.meta.uploadPluginInstanceId}/
|
|
132
|
+
path: `/plugin/${props.meta.uploadPluginInstanceId}/get_file_upload_url`,
|
|
133
133
|
method: 'POST',
|
|
134
134
|
body: {
|
|
135
135
|
originalFilename,
|
|
@@ -129,7 +129,7 @@ async function saveToServer(file: File) {
|
|
|
129
129
|
const originalExtension = file.name.split('.').pop();
|
|
130
130
|
// send fd to s3
|
|
131
131
|
const { uploadUrl, tagline, previewUrl, s3Path, error } = await callAdminForthApi({
|
|
132
|
-
path: `/plugin/${props.meta.uploadPluginInstanceId}/
|
|
132
|
+
path: `/plugin/${props.meta.uploadPluginInstanceId}/get_file_upload_url`,
|
|
133
133
|
method: 'POST',
|
|
134
134
|
body: {
|
|
135
135
|
originalFilename,
|
package/dist/index.js
CHANGED
|
@@ -18,14 +18,14 @@ import * as cheerio from 'cheerio';
|
|
|
18
18
|
// },
|
|
19
19
|
export default class RichEditorPlugin extends AdminForthPlugin {
|
|
20
20
|
constructor(options) {
|
|
21
|
-
var _a, _b;
|
|
21
|
+
var _a, _b, _c;
|
|
22
22
|
super(options, import.meta.url);
|
|
23
23
|
this.resourceConfig = undefined;
|
|
24
24
|
this.activationOrder = 100000;
|
|
25
25
|
this.attachmentResource = undefined;
|
|
26
26
|
this.options = options;
|
|
27
|
-
if ((_a = this.options.completion
|
|
28
|
-
this.rateLimiter = new RateLimiter((
|
|
27
|
+
if ((_b = (_a = this.options.completion) === null || _a === void 0 ? void 0 : _a.rateLimit) === null || _b === void 0 ? void 0 : _b.limit) {
|
|
28
|
+
this.rateLimiter = new RateLimiter((_c = this.options.completion.rateLimit) === null || _c === void 0 ? void 0 : _c.limit);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
modifyResourceConfig(adminforth, resourceConfig) {
|
package/index.ts
CHANGED
|
@@ -30,7 +30,7 @@ export default class RichEditorPlugin extends AdminForthPlugin {
|
|
|
30
30
|
constructor(options: PluginOptions) {
|
|
31
31
|
super(options, import.meta.url);
|
|
32
32
|
this.options = options;
|
|
33
|
-
if (this.options.completion
|
|
33
|
+
if (this.options.completion?.rateLimit?.limit) {
|
|
34
34
|
this.rateLimiter = new RateLimiter(this.options.completion.rateLimit?.limit);
|
|
35
35
|
}
|
|
36
36
|
}
|