@kineticdata/react 6.0.5 → 6.1.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/README.md +110 -110
- package/assets/task/icons/defer.svg +12 -12
- package/assets/task/icons/drag-handle.svg +3 -3
- package/assets/task/icons/filter.svg +11 -11
- package/assets/task/icons/loop.svg +10 -10
- package/assets/task/icons/plus_small.svg +5 -5
- package/assets/task/icons/routine.svg +9 -9
- package/assets/task/icons/scale-minus.svg +11 -11
- package/assets/task/icons/scale-plus.svg +13 -13
- package/assets/task/icons/start.svg +11 -11
- package/assets/task/icons/stop.svg +8 -8
- package/lib/apis/core/activity.js +4 -4
- package/lib/apis/core/attributeDefinitions.js +64 -6
- package/lib/apis/core/attributeDefinitions.test.js +7 -4
- package/lib/apis/core/authentication.js +12 -1
- package/lib/apis/core/bridgeModels.test.js +46 -23
- package/lib/apis/core/bridgedresources.js +41 -41
- package/lib/apis/core/fileResources.js +2 -6
- package/lib/apis/core/forms.js +51 -2
- package/lib/apis/core/forms.test.js +32 -19
- package/lib/apis/core/integrations.js +61 -0
- package/lib/apis/core/kapps.js +49 -0
- package/lib/apis/core/kapps.test.js +16 -10
- package/lib/apis/core/notices.js +7 -0
- package/lib/apis/core/securityPolicyDefinitions.test.js +7 -4
- package/lib/apis/core/space.js +18 -0
- package/lib/apis/core/space.test.js +16 -10
- package/lib/apis/core/submissionActivities.js +38 -0
- package/lib/apis/core/submissions.js +114 -15
- package/lib/apis/core/translations.test.js +126 -55
- package/lib/apis/core/userPreferences.js +59 -0
- package/lib/apis/core/webApis.js +32 -2
- package/lib/apis/core/webhooks.test.js +7 -4
- package/lib/apis/http.js +30 -5
- package/lib/apis/index.js +48 -0
- package/lib/apis/integrator/index.js +337 -0
- package/lib/apis/system/index.js +64 -12
- package/lib/apis/task/index.js +9 -2
- package/lib/components/agent/filestore/FilestoreForm.js +1 -1
- package/lib/components/common/AttributeSelect.js +11 -2
- package/lib/components/common/BridgeSelect.js +3 -1
- package/lib/components/common/ConnectionSelect.js +73 -0
- package/lib/components/common/FormSelect.js +3 -1
- package/lib/components/common/NodeSelect.js +1 -0
- package/lib/components/common/StaticSelect.js +16 -6
- package/lib/components/common/TableInput.js +4 -1
- package/lib/components/common/TeamSelect.js +3 -1
- package/lib/components/common/ToastContainer.js +34 -10
- package/lib/components/common/Typeahead.js +62 -23
- package/lib/components/common/UserSelect.js +3 -1
- package/lib/components/common/authentication/AuthenticationContainer.js +121 -55
- package/lib/components/common/authentication/RequestInterceptor.js +1 -1
- package/lib/components/common/preferences/PreferencesProvider.js +461 -0
- package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +10 -7
- package/lib/components/core/bridge_model/BridgeModelTable.js +19 -0
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +6 -9
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +0 -4
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +7 -10
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +2 -15
- package/lib/components/core/category/CategoryForm.js +4 -1
- package/lib/components/core/category/CategoryTable.js +2 -2
- package/lib/components/core/core_form/CoreForm.js +18 -10
- package/lib/components/core/field_definition/FieldDefinitionForm.js +3 -3
- package/lib/components/core/file_resource/FileResourceForm.js +2 -1
- package/lib/components/core/file_resource/FileResourceTable.js +14 -7
- package/lib/components/core/form/FormForm.js +42 -19
- package/lib/components/core/form/FormTable.js +13 -14
- package/lib/components/core/form_type/FormTypeForm.js +3 -0
- package/lib/components/core/i18n/Moment.js +1 -0
- package/lib/components/core/integration/IntegrationForm.js +232 -0
- package/lib/components/core/integration/IntegrationTable.js +142 -0
- package/lib/components/core/kapp/KappForm.js +18 -5
- package/lib/components/core/kapp/KappTable.js +3 -3
- package/lib/components/core/log/LogTable.js +1 -1
- package/lib/components/core/security_definition/SecurityDefinitionForm.js +48 -10
- package/lib/components/core/space/SpaceForm.js +17 -36
- package/lib/components/core/submission/DatastoreSubmissionTable.js +4 -4
- package/lib/components/core/submission/FormSubmissionTable.js +12 -7
- package/lib/components/core/submission/KappSubmissionTable.js +4 -4
- package/lib/components/core/submission/SubmissionActivityForm.js +79 -0
- package/lib/components/core/submission/SubmissionForm.js +15 -3
- package/lib/components/core/team/TeamTable.js +17 -7
- package/lib/components/core/translation/EntryTable.js +8 -7
- package/lib/components/core/user/UserForm.js +2 -0
- package/lib/components/core/user/UserTable.js +22 -22
- package/lib/components/core/webapi/WebApiForm.js +5 -2
- package/lib/components/core/webapi/WebApiTable.js +2 -2
- package/lib/components/core/webhook/WebhookForm.js +43 -33
- package/lib/components/core/webhook/WebhookTable.js +16 -16
- package/lib/components/core/webhook_job/WebhookJobTable.js +17 -6
- package/lib/components/form/Form.helpers.js +10 -4
- package/lib/components/form/Form.js +264 -171
- package/lib/components/form/Form.models.js +6 -1
- package/lib/components/form/FormState.js +9 -5
- package/lib/components/form/SimpleForm.js +2 -2
- package/lib/components/form/defaults/CodeField.js +44 -1
- package/lib/components/index.js +152 -3
- package/lib/components/integrator/connection/ConnectionForm.js +156 -0
- package/lib/components/integrator/connection/ConnectionTable.js +82 -0
- package/lib/components/integrator/connection/config_fields/http.js +570 -0
- package/lib/components/integrator/connection/config_fields/sql.js +123 -0
- package/lib/components/integrator/integrationTypes.js +120 -0
- package/lib/components/integrator/operation/OperationForm.js +148 -0
- package/lib/components/integrator/operation/OperationTable.js +62 -0
- package/lib/components/integrator/operation/config_fields/http.js +185 -0
- package/lib/components/integrator/operation/config_fields/sql.js +81 -0
- package/lib/components/system/SystemSecurityForm.js +1 -1
- package/lib/components/system/SystemTaskAdapterForm.js +9 -9
- package/lib/components/system/SystemUserForm.js +2 -0
- package/lib/components/system/helpers.js +123 -100
- package/lib/components/system/spaces/SystemSpaceForm.js +9 -37
- package/lib/components/system/spaces/SystemTenantForm.js +276 -104
- package/lib/components/system/spaces/SystemTenantMigrateForm.js +449 -0
- package/lib/components/system/spaces/SystemTenantTable.js +20 -16
- package/lib/components/table/Table.js +75 -15
- package/lib/components/table/Table.redux.js +297 -73
- package/lib/components/table/defaults/FilterControl.js +24 -0
- package/lib/components/table/defaults/index.js +2 -0
- package/lib/components/table/tests/Table.test.js +22 -22
- package/lib/components/table/tests/components.js +9 -2
- package/lib/components/task/builder/Connector.js +51 -41
- package/lib/components/task/builder/ConnectorForm.js +11 -7
- package/lib/components/task/builder/Node.js +31 -35
- package/lib/components/task/builder/NodeForm.js +93 -22
- package/lib/components/task/builder/NodeParametersForm.js +29 -17
- package/lib/components/task/builder/SvgCanvas.js +3 -17
- package/lib/components/task/builder/TaskDefinitionConfigForm.js +18 -50
- package/lib/components/task/builder/TreeBuilder.js +23 -3
- package/lib/components/task/builder/builder.redux.js +342 -197
- package/lib/components/task/builder/constants.js +10 -2
- package/lib/components/task/builder/helpers.js +231 -81
- package/lib/components/task/builder/models.js +7 -6
- package/lib/components/task/category/TaskCategoryTable.js +3 -3
- package/lib/components/task/common/UsageTable.js +9 -2
- package/lib/components/task/handlers/HandlerTable.js +44 -37
- package/lib/components/task/policy_rule/PolicyRuleTable.js +3 -3
- package/lib/components/task/runs/CreateManualTriggerForm.js +2 -0
- package/lib/components/task/runs/RunTable.js +10 -14
- package/lib/components/task/runs/RunTaskTable.js +1 -1
- package/lib/components/task/sources/SourceTable.js +2 -2
- package/lib/components/task/triggers/TriggerTable.js +2 -2
- package/lib/components/task/workflows/LinkedWorkflowTable.js +16 -11
- package/lib/components/task/workflows/WorkflowForm.js +27 -8
- package/lib/components/task/workflows/WorkflowTable.js +27 -26
- package/lib/helpers/index.js +307 -74
- package/lib/index.js +2 -1
- package/lib/saga.js +4 -4
- package/lib/store.js +2 -1
- package/package.json +7 -6
- package/proxyhelper.js +201 -176
- package/CHANGELOG.md +0 -94
package/proxyhelper.js
CHANGED
|
@@ -1,176 +1,201 @@
|
|
|
1
|
-
const { createProxyMiddleware: proxy } = require('http-proxy-middleware');
|
|
2
|
-
const removeSecure = cookie => cookie.replace(/;\s*Secure/i, '');
|
|
3
|
-
const removeSameSiteNone = cookie => cookie.replace(/;\s*SameSite=None/i, '');
|
|
4
|
-
|
|
5
|
-
const getProxyData = request => ({
|
|
6
|
-
host: request.socket._host,
|
|
7
|
-
scheme: request.agent.protocol.replace(':', ''),
|
|
8
|
-
method: request.method,
|
|
9
|
-
path: request.path,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const getRequestData = request => ({
|
|
13
|
-
host: request.headers.host,
|
|
14
|
-
scheme: request.headers['x-forwarded-proto'],
|
|
15
|
-
method: request.method,
|
|
16
|
-
path: request.url,
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
const getResponseData = response => ({
|
|
20
|
-
statusCode: response.statusCode,
|
|
21
|
-
message: response.message,
|
|
22
|
-
host: response.socket.servername,
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const defaultProxyLogger = ({
|
|
26
|
-
proxyRequest,
|
|
27
|
-
originalRequest,
|
|
28
|
-
proxyResponse,
|
|
29
|
-
}) => {
|
|
30
|
-
try {
|
|
31
|
-
if (proxyRequest) {
|
|
32
|
-
const proxyData = getProxyData(proxyRequest);
|
|
33
|
-
const originalData = getRequestData(originalRequest);
|
|
34
|
-
console.log(
|
|
35
|
-
`[proxy] [original] -> ${originalData.method}\t${
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
1
|
+
const { createProxyMiddleware: proxy } = require('http-proxy-middleware');
|
|
2
|
+
const removeSecure = cookie => cookie.replace(/;\s*Secure/i, '');
|
|
3
|
+
const removeSameSiteNone = cookie => cookie.replace(/;\s*SameSite=None/i, '');
|
|
4
|
+
|
|
5
|
+
const getProxyData = request => ({
|
|
6
|
+
host: request.socket._host,
|
|
7
|
+
scheme: request.agent.protocol.replace(':', ''),
|
|
8
|
+
method: request.method,
|
|
9
|
+
path: request.path,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const getRequestData = request => ({
|
|
13
|
+
host: request.headers.host,
|
|
14
|
+
scheme: request.headers['x-forwarded-proto'],
|
|
15
|
+
method: request.method,
|
|
16
|
+
path: request.url,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const getResponseData = response => ({
|
|
20
|
+
statusCode: response.statusCode,
|
|
21
|
+
message: response.message,
|
|
22
|
+
host: response.socket.servername,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const defaultProxyLogger = ({
|
|
26
|
+
proxyRequest,
|
|
27
|
+
originalRequest,
|
|
28
|
+
proxyResponse,
|
|
29
|
+
}) => {
|
|
30
|
+
try {
|
|
31
|
+
if (proxyRequest) {
|
|
32
|
+
const proxyData = getProxyData(proxyRequest);
|
|
33
|
+
const originalData = getRequestData(originalRequest);
|
|
34
|
+
console.log(
|
|
35
|
+
`[proxy] [original] -> ${originalData.method}\t${
|
|
36
|
+
originalData.scheme
|
|
37
|
+
}\t${originalData.host}\t${originalData.path}`,
|
|
38
|
+
);
|
|
39
|
+
console.log(
|
|
40
|
+
`[proxy] [proxied] -> ${proxyData.method}\t${proxyData.scheme}\t${
|
|
41
|
+
proxyData.host
|
|
42
|
+
}\t${proxyData.path}`,
|
|
43
|
+
);
|
|
44
|
+
} else if (proxyResponse) {
|
|
45
|
+
const responseData = getResponseData(proxyResponse);
|
|
46
|
+
const requestData = getRequestData(originalRequest);
|
|
47
|
+
console.log(
|
|
48
|
+
`[proxy] [original] <- ${responseData.statusCode}\t${
|
|
49
|
+
requestData.method
|
|
50
|
+
}\t${requestData.scheme}\t${requestData.host} (${responseData.host})\t${
|
|
51
|
+
requestData.path
|
|
52
|
+
}`,
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
} catch (e) {
|
|
56
|
+
console.warn(
|
|
57
|
+
'[proxy] There was a problem logging proxy request/response information',
|
|
58
|
+
e,
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const setupProxy = ({
|
|
64
|
+
target = process.env.REACT_APP_PROXY_HOST,
|
|
65
|
+
proxyLogger,
|
|
66
|
+
pathRewrite,
|
|
67
|
+
onlyTenant = false,
|
|
68
|
+
} = {}) => {
|
|
69
|
+
return {
|
|
70
|
+
target,
|
|
71
|
+
secure: false,
|
|
72
|
+
pathRewrite,
|
|
73
|
+
changeOrigin: true,
|
|
74
|
+
onProxyReq: (proxyRequest, originalRequest) => {
|
|
75
|
+
// Browsers may send Origin headers even with same-origin
|
|
76
|
+
// requests. To prevent CORS issues, we have to change
|
|
77
|
+
// the Origin to match the target URL.
|
|
78
|
+
if (proxyRequest.getHeader('origin')) {
|
|
79
|
+
proxyRequest.setHeader('origin', target);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (
|
|
83
|
+
!onlyTenant &&
|
|
84
|
+
process.env.REACT_APP_PROXY_SUBDOMAIN &&
|
|
85
|
+
!proxyRequest.path.endsWith('pack') &&
|
|
86
|
+
!proxyRequest.path.endsWith('favicon.ico')
|
|
87
|
+
) {
|
|
88
|
+
proxyRequest.setHeader(
|
|
89
|
+
'X-Kinetic-Subdomain',
|
|
90
|
+
process.env.REACT_APP_PROXY_SUBDOMAIN,
|
|
91
|
+
);
|
|
92
|
+
proxyRequest.path =
|
|
93
|
+
'/' + process.env.REACT_APP_PROXY_SUBDOMAIN + proxyRequest.path;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (process.env.PROXY_DEBUGGING)
|
|
97
|
+
(proxyLogger || defaultProxyLogger)({
|
|
98
|
+
proxyRequest,
|
|
99
|
+
originalRequest,
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
onProxyRes: (proxyResponse, originalRequest) => {
|
|
103
|
+
if (process.env.PROXY_DEBUGGING)
|
|
104
|
+
(proxyLogger || defaultProxyLogger)({
|
|
105
|
+
proxyResponse,
|
|
106
|
+
originalRequest,
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
const setCookie = proxyResponse.headers['set-cookie'];
|
|
110
|
+
if (setCookie && originalRequest.protocol === 'http') {
|
|
111
|
+
proxyResponse.headers['set-cookie'] = Array.isArray(setCookie)
|
|
112
|
+
? setCookie.map(removeSecure).map(removeSameSiteNone)
|
|
113
|
+
: removeSameSiteNone(removeSecure(setCookie));
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
const getProxyConfig = (
|
|
120
|
+
app,
|
|
121
|
+
{
|
|
122
|
+
mainTarget = process.env.REACT_APP_PROXY_HOST,
|
|
123
|
+
loghubTarget = process.env.REACT_APP_LOGHUB_PROXY_HOST,
|
|
124
|
+
systemCoordinatorTarget = process.env.REACT_APP_SYS_COORDINATOR_PROXY_HOST,
|
|
125
|
+
integratorTarget = process.env.REACT_APP_INTEGRATOR_PROXY_HOST,
|
|
126
|
+
proxyLogger,
|
|
127
|
+
} = {},
|
|
128
|
+
) => {
|
|
129
|
+
const mainPaths = [
|
|
130
|
+
'**',
|
|
131
|
+
'!/',
|
|
132
|
+
'!/favicon.ico',
|
|
133
|
+
'!/index.html',
|
|
134
|
+
'!/images/**',
|
|
135
|
+
'!/static/**',
|
|
136
|
+
'!/sockjs-node',
|
|
137
|
+
'!/manifest.json',
|
|
138
|
+
'!/*.hot-update.js*',
|
|
139
|
+
];
|
|
140
|
+
|
|
141
|
+
const finalConfigs = [
|
|
142
|
+
{
|
|
143
|
+
paths: mainPaths,
|
|
144
|
+
options: setupProxy({ target: mainTarget, proxyLogger }),
|
|
145
|
+
},
|
|
146
|
+
];
|
|
147
|
+
|
|
148
|
+
if (loghubTarget) {
|
|
149
|
+
// If we're overriding the underlying Loghub host, bypass it in the main.
|
|
150
|
+
mainPaths.push('!/app/loghub/**');
|
|
151
|
+
const options = setupProxy({
|
|
152
|
+
target: loghubTarget,
|
|
153
|
+
proxyLogger,
|
|
154
|
+
pathRewrite: {
|
|
155
|
+
'^/app/loghub': '/app',
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
finalConfigs.push({ paths: ['/app/loghub/**'], options });
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (systemCoordinatorTarget) {
|
|
162
|
+
// If we're overriding the underlying Loghub host, bypass it in the main.
|
|
163
|
+
mainPaths.push('!/app/system-coordinator/**');
|
|
164
|
+
const options = setupProxy({
|
|
165
|
+
target: systemCoordinatorTarget,
|
|
166
|
+
proxyLogger,
|
|
167
|
+
pathRewrite: {
|
|
168
|
+
'^/app/system-coordinator': '/app',
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
finalConfigs.push({ paths: ['/app/system-coordinator/**'], options });
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (integratorTarget) {
|
|
175
|
+
// If we're overriding the underlying Integrator host, bypass it in the main.
|
|
176
|
+
mainPaths.push('!/app/integrator/**');
|
|
177
|
+
const options = setupProxy({
|
|
178
|
+
target: integratorTarget,
|
|
179
|
+
proxyLogger,
|
|
180
|
+
pathRewrite: {
|
|
181
|
+
'^/app/integrator/': '/',
|
|
182
|
+
},
|
|
183
|
+
onlyTenant: true,
|
|
184
|
+
});
|
|
185
|
+
finalConfigs.push({ paths: ['/app/integrator/**'], options });
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return finalConfigs.map(config => {
|
|
189
|
+
config.proxy = ({
|
|
190
|
+
paths = config.paths,
|
|
191
|
+
options = config.options,
|
|
192
|
+
} = {}) => {
|
|
193
|
+
app.use(proxy(paths, options));
|
|
194
|
+
};
|
|
195
|
+
return config;
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
setupProxy.getProxyConfig = getProxyConfig;
|
|
200
|
+
|
|
201
|
+
module.exports = setupProxy;
|
package/CHANGELOG.md
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
# Changelog for `@kineticdata/react`
|
|
2
|
-
|
|
3
|
-
When upgrading `@kineticdata/react` to a newer version, remember that all `@kineticdata/*` libraries must be on the same exact version. This is because each `@kineticdata/bundle-*` library has `@kineticdata/react` as a dependency, and if two different versions of `@kineticdata/react` are installed in a bundle, the bundle will never load because authentication happens in a different version of `@kineticdata/react` than the one used during rendering the packages.
|
|
4
|
-
|
|
5
|
-
Remember to always run `yarn install` after upgrading any dependency versions.
|
|
6
|
-
|
|
7
|
-
## 6.0.4 (January 22, 2024)
|
|
8
|
-
|
|
9
|
-
- Fixed bug with SAML logout options
|
|
10
|
-
|
|
11
|
-
## 6.0.3 (December 11, 2023)
|
|
12
|
-
|
|
13
|
-
_No relevant changes._
|
|
14
|
-
|
|
15
|
-
## 6.0.2 (November 6, 2023)
|
|
16
|
-
|
|
17
|
-
- Removed XSRF header setting from Request Interceptor
|
|
18
|
-
- Added SAML logout options
|
|
19
|
-
- Upgraded various `dependencies` to resolve vulnerabilities
|
|
20
|
-
- Updated the `react` and `react-dom` `peerDependencies` to `>=17.0.2` to support the latest versions of React
|
|
21
|
-
|
|
22
|
-
### Bundle Issues
|
|
23
|
-
|
|
24
|
-
One of the `dependencies` that was updated is `axios` whose latest version causes some issues with the latest `react-scripts`. If the bundle has a `craco.config.js` file, the following steps must be taken when upgrading to this version.
|
|
25
|
-
|
|
26
|
-
1. In `craco.config.js`, add the following function to the very end of the file:
|
|
27
|
-
|
|
28
|
-
```javascript
|
|
29
|
-
function getFileLoaderRule(rules) {
|
|
30
|
-
for (const rule of rules) {
|
|
31
|
-
if ('oneOf' in rule) {
|
|
32
|
-
const found = getFileLoaderRule(rule.oneOf);
|
|
33
|
-
if (found) {
|
|
34
|
-
return found;
|
|
35
|
-
}
|
|
36
|
-
} else if (rule.test === undefined && rule.type === 'asset/resource') {
|
|
37
|
-
return rule;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
2. In `craco.config.js`, add the following code inside the `configure` function of the `webpack` object:
|
|
44
|
-
|
|
45
|
-
```javascript
|
|
46
|
-
// Fix for CJS files not being treated as JavaScript files
|
|
47
|
-
// https://github.com/facebook/create-react-app/issues/11889#issuecomment-1114928008
|
|
48
|
-
const fileLoaderRule = getFileLoaderRule(webpackConfig.module.rules);
|
|
49
|
-
if (!fileLoaderRule) {
|
|
50
|
-
throw new Error('File loader not found');
|
|
51
|
-
}
|
|
52
|
-
fileLoaderRule.exclude.push(/\.cjs$/);
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## 6.0.1 (September 20, 2023)
|
|
56
|
-
|
|
57
|
-
- Updated the `react` and `react-dom` `peerDependencies` to `^17.0.2` to support React v17
|
|
58
|
-
|
|
59
|
-
### Bundle Issues
|
|
60
|
-
|
|
61
|
-
It is recommended to upgrade the bundle's `react` and `react-dom` versions to `^17.0.2`. This upgrade should not have any breaking changes. To do so, update these two dependency versions in `bundle/packages/app/package.json` and the peer dependency versions in all of the `package.json` files of the other packages.
|
|
62
|
-
|
|
63
|
-
If you do upgrade `react` to v17, the following steps must also be taken if the bundle has testing configured:
|
|
64
|
-
|
|
65
|
-
1. In `bundle/package.json`, remove the `enzyme-adapter-react-16` dependency, and add the following dependency:
|
|
66
|
-
`"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0"`
|
|
67
|
-
2. In `bundle/packages/app/src/setupTests.js`, change the `Adapter` import from `enzyme-adapter-react-16` to be from `@wojtekmaj/enzyme-adapter-react-17`.
|
|
68
|
-
|
|
69
|
-
## 6.0.0 (February 22, 2023)
|
|
70
|
-
|
|
71
|
-
- Removed all code related to Discussions
|
|
72
|
-
- Removed most `devDependencies`, which were move to the project root
|
|
73
|
-
|
|
74
|
-
### Bundle Issues
|
|
75
|
-
|
|
76
|
-
Because all discussions code was removed from the library, any bundles that are upgraded to this version must have all of their discussions code removed as well, since the various imports from this library that bundles used no longer exist.
|
|
77
|
-
|
|
78
|
-
We consolidated most of our `devDependencies` into the root of our project, of which `@kineticdata/react` is just one part. Any bundles upgrading to this version must add the following `devDependencies` to the `package.json` file in the root of their `bundle` folder:
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
"@babel/cli": "^7.23.0",
|
|
82
|
-
"@babel/runtime": "^7.23.2",
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
If you get the following error when trying to run your bundle:
|
|
86
|
-
`Uncaught Error: Cannot find module '@babel/runtime/helpers/esm/regeneratorRuntime'`
|
|
87
|
-
You will need to run the following commands in your `bundle` directory:
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
npx yarn-deduplicate --packages @babel/runtime -- yarn.lock
|
|
91
|
-
yarn install
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
The above step will always be required when first upgrading to a v6+ version of `@kineticdata/react`.
|