@nocobase/plugin-action-custom-request 2.1.0-alpha.12 → 2.1.0-alpha.13
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/dist/externalVersion.js
CHANGED
|
@@ -8,23 +8,23 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.1.0-alpha.
|
|
11
|
+
"@nocobase/client": "2.1.0-alpha.13",
|
|
12
12
|
"react": "18.2.0",
|
|
13
13
|
"react-i18next": "11.18.6",
|
|
14
14
|
"@formily/react": "2.3.7",
|
|
15
|
-
"@nocobase/
|
|
16
|
-
"@nocobase/
|
|
17
|
-
"@nocobase/
|
|
18
|
-
"@nocobase/test": "2.1.0-alpha.12",
|
|
15
|
+
"@nocobase/logger": "2.1.0-alpha.13",
|
|
16
|
+
"@nocobase/server": "2.1.0-alpha.13",
|
|
17
|
+
"@nocobase/test": "2.1.0-alpha.13",
|
|
19
18
|
"@formily/antd-v5": "1.2.3",
|
|
20
19
|
"lodash": "4.17.21",
|
|
21
|
-
"@nocobase/utils": "2.1.0-alpha.
|
|
20
|
+
"@nocobase/utils": "2.1.0-alpha.13",
|
|
22
21
|
"antd": "5.24.2",
|
|
23
22
|
"file-saver": "2.0.5",
|
|
24
23
|
"@formily/shared": "2.3.7",
|
|
25
24
|
"@emotion/css": "11.13.0",
|
|
26
|
-
"@nocobase/
|
|
27
|
-
"@nocobase/
|
|
25
|
+
"@nocobase/flow-engine": "2.1.0-alpha.13",
|
|
26
|
+
"@nocobase/actions": "2.1.0-alpha.13",
|
|
27
|
+
"@nocobase/evaluators": "2.1.0-alpha.13",
|
|
28
28
|
"axios": "1.7.7",
|
|
29
|
-
"@nocobase/database": "2.1.0-alpha.
|
|
29
|
+
"@nocobase/database": "2.1.0-alpha.13"
|
|
30
30
|
};
|
package/dist/server/plugin.d.ts
CHANGED
|
@@ -6,12 +6,10 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import type { FlowSchemaContribution } from '@nocobase/flow-engine';
|
|
10
9
|
import { Logger } from '@nocobase/logger';
|
|
11
10
|
import { InstallOptions, Plugin } from '@nocobase/server';
|
|
12
11
|
export declare class PluginActionCustomRequestServer extends Plugin {
|
|
13
12
|
logger: Logger;
|
|
14
|
-
getFlowSchemaContributions(): FlowSchemaContribution;
|
|
15
13
|
afterAdd(): void;
|
|
16
14
|
beforeLoad(): void;
|
|
17
15
|
getLogger(): Logger;
|
package/dist/server/plugin.js
CHANGED
|
@@ -33,12 +33,8 @@ module.exports = __toCommonJS(plugin_exports);
|
|
|
33
33
|
var import_server = require("@nocobase/server");
|
|
34
34
|
var import_listByCurrentRole = require("./actions/listByCurrentRole");
|
|
35
35
|
var import_send = require("./actions/send");
|
|
36
|
-
var import_flow_schema_contributions = require("./flow-schema-contributions");
|
|
37
36
|
class PluginActionCustomRequestServer extends import_server.Plugin {
|
|
38
37
|
logger;
|
|
39
|
-
getFlowSchemaContributions() {
|
|
40
|
-
return import_flow_schema_contributions.flowSchemaContribution;
|
|
41
|
-
}
|
|
42
38
|
afterAdd() {
|
|
43
39
|
}
|
|
44
40
|
beforeLoad() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-action-custom-request",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.13",
|
|
4
4
|
"main": "dist/server/index.js",
|
|
5
5
|
"homepage": "https://docs.nocobase.com/handbook/action-custom-request",
|
|
6
6
|
"homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/action-custom-request",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@nocobase/server": "2.x",
|
|
32
32
|
"@nocobase/test": "2.x"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "2807a8948412d9c235115a31a81a66f7c82dd173",
|
|
35
35
|
"keywords": [
|
|
36
36
|
"Actions"
|
|
37
37
|
]
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import type { FlowActionSchemaContribution, FlowSchemaContribution } from '@nocobase/flow-engine';
|
|
10
|
-
export declare const customRequestActionSchemaContribution: FlowActionSchemaContribution;
|
|
11
|
-
export declare const flowSchemaContribution: FlowSchemaContribution;
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var flow_schema_contributions_exports = {};
|
|
28
|
-
__export(flow_schema_contributions_exports, {
|
|
29
|
-
customRequestActionSchemaContribution: () => customRequestActionSchemaContribution,
|
|
30
|
-
flowSchemaContribution: () => flowSchemaContribution
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(flow_schema_contributions_exports);
|
|
33
|
-
const requestNameValueSchema = {
|
|
34
|
-
type: "object",
|
|
35
|
-
properties: {
|
|
36
|
-
name: { type: "string" },
|
|
37
|
-
value: { type: "string" }
|
|
38
|
-
},
|
|
39
|
-
additionalProperties: false
|
|
40
|
-
};
|
|
41
|
-
const customRequestActionSchemaContribution = {
|
|
42
|
-
name: "customRequest",
|
|
43
|
-
title: "Custom request",
|
|
44
|
-
source: "plugin",
|
|
45
|
-
strict: false,
|
|
46
|
-
paramsSchema: {
|
|
47
|
-
type: "object",
|
|
48
|
-
properties: {
|
|
49
|
-
key: { type: "string" },
|
|
50
|
-
method: {
|
|
51
|
-
type: "string",
|
|
52
|
-
enum: ["GET", "POST", "PUT", "PATCH", "DELETE"]
|
|
53
|
-
},
|
|
54
|
-
url: { type: "string" },
|
|
55
|
-
headers: {
|
|
56
|
-
type: "array",
|
|
57
|
-
items: requestNameValueSchema
|
|
58
|
-
},
|
|
59
|
-
params: {
|
|
60
|
-
type: "array",
|
|
61
|
-
items: requestNameValueSchema
|
|
62
|
-
},
|
|
63
|
-
data: {},
|
|
64
|
-
timeout: { type: "number" },
|
|
65
|
-
responseType: {
|
|
66
|
-
type: "string",
|
|
67
|
-
enum: ["json", "stream"]
|
|
68
|
-
},
|
|
69
|
-
variablePaths: {
|
|
70
|
-
type: "array",
|
|
71
|
-
items: { type: "string" }
|
|
72
|
-
},
|
|
73
|
-
roles: {
|
|
74
|
-
type: "array",
|
|
75
|
-
items: { type: "string" }
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
additionalProperties: false
|
|
79
|
-
},
|
|
80
|
-
docs: {
|
|
81
|
-
minimalExample: {
|
|
82
|
-
key: "req_demo",
|
|
83
|
-
method: "POST",
|
|
84
|
-
url: "https://api.example.com/orders",
|
|
85
|
-
headers: [
|
|
86
|
-
{
|
|
87
|
-
name: "Authorization",
|
|
88
|
-
value: "Bearer {{ctx.token}}"
|
|
89
|
-
}
|
|
90
|
-
],
|
|
91
|
-
params: [
|
|
92
|
-
{
|
|
93
|
-
name: "id",
|
|
94
|
-
value: "{{ctx.record.id}}"
|
|
95
|
-
}
|
|
96
|
-
],
|
|
97
|
-
data: {
|
|
98
|
-
status: "processed"
|
|
99
|
-
},
|
|
100
|
-
timeout: 5e3,
|
|
101
|
-
responseType: "json"
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
const flowSchemaContribution = {
|
|
106
|
-
actions: [customRequestActionSchemaContribution],
|
|
107
|
-
defaults: {
|
|
108
|
-
source: "plugin"
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
112
|
-
0 && (module.exports = {
|
|
113
|
-
customRequestActionSchemaContribution,
|
|
114
|
-
flowSchemaContribution
|
|
115
|
-
});
|