@optimizely/ocp-local-env 1.0.0-beta.8 → 1.0.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 +18 -133
- package/dist/package.json +17 -9
- package/dist/public/bundle.fa87c838198caf8c051a.js +3 -0
- package/dist/public/{bundle.0a495807b6ef336cb500.js.LICENSE.txt → bundle.fa87c838198caf8c051a.js.LICENSE.txt} +13 -3
- package/dist/public/bundle.fa87c838198caf8c051a.js.map +1 -0
- package/dist/public/index.html +1 -1
- package/dist/src/cli.js +2 -2
- package/dist/src/cli.js.map +1 -1
- package/dist/src/executor/FunctionExecutor.js +8 -5
- package/dist/src/executor/FunctionExecutor.js.map +1 -1
- package/dist/src/executor/JobExecutor.js +0 -17
- package/dist/src/executor/JobExecutor.js.map +1 -1
- package/dist/src/executor/LifecycleExecutor.js +11 -2
- package/dist/src/executor/LifecycleExecutor.js.map +1 -1
- package/dist/src/executor/watcher.d.ts +6 -0
- package/dist/src/executor/watcher.js +45 -0
- package/dist/src/executor/watcher.js.map +1 -1
- package/dist/src/local_engine/LocalJobApi.d.ts +31 -2
- package/dist/src/local_engine/LocalJobApi.js +42 -17
- package/dist/src/local_engine/LocalJobApi.js.map +1 -1
- package/dist/src/local_engine/LocalNotifier.d.ts +3 -2
- package/dist/src/local_engine/LocalNotifier.js +7 -0
- package/dist/src/local_engine/LocalNotifier.js.map +1 -1
- package/dist/src/local_engine/LocalSourceApi.d.ts +40 -0
- package/dist/src/local_engine/LocalSourceApi.js +69 -0
- package/dist/src/local_engine/LocalSourceApi.js.map +1 -0
- package/dist/src/local_engine/local-engine-child-base.d.ts +0 -12
- package/dist/src/local_engine/local-engine-child-base.js +0 -127
- package/dist/src/local_engine/local-engine-child-base.js.map +1 -1
- package/dist/src/local_engine/local-engine-client.d.ts +19 -29
- package/dist/src/local_engine/local-engine-client.js +45 -94
- package/dist/src/local_engine/local-engine-client.js.map +1 -1
- package/dist/src/local_engine/local-engine-types.d.ts +13 -50
- package/dist/src/local_engine/local-engine-unified.d.ts +6 -13
- package/dist/src/local_engine/local-engine-unified.js +108 -222
- package/dist/src/local_engine/local-engine-unified.js.map +1 -1
- package/dist/src/local_engine/localSDKConfig.d.ts +6 -0
- package/dist/src/local_engine/localSDKConfig.js +66 -1
- package/dist/src/local_engine/localSDKConfig.js.map +1 -1
- package/dist/src/local_engine/storage/BaseKVStoreWrapper.d.ts +1 -2
- package/dist/src/local_engine/storage/BaseKVStoreWrapper.js.map +1 -1
- package/dist/src/local_engine/storage/LocalConfigStore.d.ts +7 -13
- package/dist/src/local_engine/storage/LocalConfigStore.js +9 -31
- package/dist/src/local_engine/storage/LocalConfigStore.js.map +1 -1
- package/dist/src/local_engine/storage/LocalKVStore.d.ts +4 -0
- package/dist/src/local_engine/storage/LocalKVStore.js +23 -0
- package/dist/src/local_engine/storage/LocalKVStore.js.map +1 -1
- package/dist/src/local_engine/storage/LocalSettingsStore.d.ts +7 -1
- package/dist/src/local_engine/storage/LocalSettingsStore.js +46 -4
- package/dist/src/local_engine/storage/LocalSettingsStore.js.map +1 -1
- package/dist/src/local_engine/storage/SourceDataStore.d.ts +16 -14
- package/dist/src/local_engine/storage/SourceDataStore.js +57 -57
- package/dist/src/local_engine/storage/SourceDataStore.js.map +1 -1
- package/dist/src/local_engine/utils.d.ts +2 -0
- package/dist/src/local_engine/utils.js +4 -2
- package/dist/src/local_engine/utils.js.map +1 -1
- package/dist/src/server/api/deploy.d.ts +20 -0
- package/dist/src/server/api/deploy.js +399 -0
- package/dist/src/server/api/deploy.js.map +1 -0
- package/dist/src/server/api/destinations.js +1 -1
- package/dist/src/server/api/destinations.js.map +1 -1
- package/dist/src/server/api/env.d.ts +2 -0
- package/dist/src/server/api/env.js +28 -0
- package/dist/src/server/api/env.js.map +1 -0
- package/dist/src/server/api/functions.js +13 -12
- package/dist/src/server/api/functions.js.map +1 -1
- package/dist/src/server/api/opalTools.d.ts +4 -0
- package/dist/src/server/api/opalTools.js +81 -0
- package/dist/src/server/api/opalTools.js.map +1 -0
- package/dist/src/server/api/schema.d.ts +6 -0
- package/dist/src/server/api/schema.js +95 -0
- package/dist/src/server/api/schema.js.map +1 -0
- package/dist/src/server/api/sources.d.ts +1 -2
- package/dist/src/server/api/sources.js +16 -275
- package/dist/src/server/api/sources.js.map +1 -1
- package/dist/src/server/api/v1.js +67 -70
- package/dist/src/server/api/v1.js.map +1 -1
- package/dist/src/server/api.d.ts +4 -0
- package/dist/src/server/api.js +133 -11
- package/dist/src/server/api.js.map +1 -1
- package/dist/src/server/app-discovery.js +37 -4
- package/dist/src/server/app-discovery.js.map +1 -1
- package/dist/src/server/app-env.d.ts +21 -0
- package/dist/src/server/app-env.js +122 -0
- package/dist/src/server/app-env.js.map +1 -0
- package/dist/src/server/browserFocus.d.ts +5 -0
- package/dist/src/server/browserFocus.js +39 -0
- package/dist/src/server/browserFocus.js.map +1 -0
- package/dist/src/server/config.d.ts +3 -0
- package/dist/src/server/config.js +7 -0
- package/dist/src/server/config.js.map +1 -1
- package/dist/src/server/mockDataGenerator.d.ts +1 -2
- package/dist/src/server/mockDataGenerator.js +77 -35
- package/dist/src/server/mockDataGenerator.js.map +1 -1
- package/dist/src/server/mockToolDataGenerator.d.ts +12 -0
- package/dist/src/server/mockToolDataGenerator.js +393 -0
- package/dist/src/server/mockToolDataGenerator.js.map +1 -0
- package/dist/src/server.js +152 -168
- package/dist/src/server.js.map +1 -1
- package/dist/src/types/app.d.ts +1 -3
- package/dist/src/types/app.js.map +1 -1
- package/dist/src/ui/components/App.js +311 -50
- package/dist/src/ui/components/App.js.map +1 -1
- package/dist/src/ui/components/DeployModal.d.ts +16 -0
- package/dist/src/ui/components/DeployModal.js +75 -0
- package/dist/src/ui/components/DeployModal.js.map +1 -0
- package/dist/src/ui/components/DestinationBatchEditor.d.ts +9 -1
- package/dist/src/ui/components/DestinationBatchEditor.js +30 -16
- package/dist/src/ui/components/DestinationBatchEditor.js.map +1 -1
- package/dist/src/ui/components/DestinationsView.js +5 -1
- package/dist/src/ui/components/DestinationsView.js.map +1 -1
- package/dist/src/ui/components/EntityNotAvailable.d.ts +15 -0
- package/dist/src/ui/components/EntityNotAvailable.js +27 -0
- package/dist/src/ui/components/EntityNotAvailable.js.map +1 -0
- package/dist/src/ui/components/EnvViewer.d.ts +8 -0
- package/dist/src/ui/components/EnvViewer.js +35 -0
- package/dist/src/ui/components/EnvViewer.js.map +1 -0
- package/dist/src/ui/components/FunctionsView.d.ts +2 -6
- package/dist/src/ui/components/FunctionsView.js +106 -124
- package/dist/src/ui/components/FunctionsView.js.map +1 -1
- package/dist/src/ui/components/JobsView.js +28 -5
- package/dist/src/ui/components/JobsView.js.map +1 -1
- package/dist/src/ui/components/KVStoreViewer.js +5 -5
- package/dist/src/ui/components/KVStoreViewer.js.map +1 -1
- package/dist/src/ui/components/KeyValueEditor.d.ts +15 -0
- package/dist/src/ui/components/KeyValueEditor.js +12 -0
- package/dist/src/ui/components/KeyValueEditor.js.map +1 -0
- package/dist/src/ui/components/NotificationViewer.d.ts +2 -11
- package/dist/src/ui/components/NotificationViewer.js +69 -15
- package/dist/src/ui/components/NotificationViewer.js.map +1 -1
- package/dist/src/ui/components/OdpSchemaView.d.ts +3 -0
- package/dist/src/ui/components/OdpSchemaView.js +58 -0
- package/dist/src/ui/components/OdpSchemaView.js.map +1 -0
- package/dist/src/ui/components/OpalToolsView.d.ts +9 -0
- package/dist/src/ui/components/OpalToolsView.js +399 -0
- package/dist/src/ui/components/OpalToolsView.js.map +1 -0
- package/dist/src/ui/components/ResponseViewer.d.ts +39 -0
- package/dist/src/ui/components/ResponseViewer.js +43 -0
- package/dist/src/ui/components/ResponseViewer.js.map +1 -0
- package/dist/src/ui/components/SecretsStoreViewer.js +3 -2
- package/dist/src/ui/components/SecretsStoreViewer.js.map +1 -1
- package/dist/src/ui/components/SettingsStoreViewer.js +3 -2
- package/dist/src/ui/components/SettingsStoreViewer.js.map +1 -1
- package/dist/src/ui/components/SourceEmittedDataPanel.d.ts +8 -0
- package/dist/src/ui/components/SourceEmittedDataPanel.js +103 -0
- package/dist/src/ui/components/SourceEmittedDataPanel.js.map +1 -0
- package/dist/src/ui/components/SourcesView.js +4 -8
- package/dist/src/ui/components/SourcesView.js.map +1 -1
- package/dist/src/ui/components/StoreViewer.js +2 -1
- package/dist/src/ui/components/StoreViewer.js.map +1 -1
- package/dist/src/ui/components/TabbedConsole.d.ts +11 -0
- package/dist/src/ui/components/TabbedConsole.js +134 -44
- package/dist/src/ui/components/TabbedConsole.js.map +1 -1
- package/dist/src/ui/components/ToolSettingsView.d.ts +7 -0
- package/dist/src/ui/components/ToolSettingsView.js +25 -0
- package/dist/src/ui/components/ToolSettingsView.js.map +1 -0
- package/dist/src/ui/components/common/EyeIcon.js +2 -1
- package/dist/src/ui/components/common/EyeIcon.js.map +1 -1
- package/dist/src/ui/hooks/useKeyValuePairs.d.ts +52 -0
- package/dist/src/ui/hooks/useKeyValuePairs.js +66 -0
- package/dist/src/ui/hooks/useKeyValuePairs.js.map +1 -0
- package/dist/src/ui/index.js +4 -2
- package/dist/src/ui/index.js.map +1 -1
- package/dist/src/ui/store/formStateSlice.d.ts +71 -0
- package/dist/src/ui/store/formStateSlice.js +159 -0
- package/dist/src/ui/store/formStateSlice.js.map +1 -0
- package/dist/src/ui/store/hooks.d.ts +6 -0
- package/dist/src/ui/store/hooks.js +8 -0
- package/dist/src/ui/store/hooks.js.map +1 -0
- package/dist/src/ui/store/index.d.ts +11 -0
- package/dist/src/ui/store/index.js +107 -0
- package/dist/src/ui/store/index.js.map +1 -0
- package/dist/src/ui/types/common.d.ts +33 -0
- package/dist/src/ui/types/common.js +6 -0
- package/dist/src/ui/types/common.js.map +1 -0
- package/package.json +17 -9
- package/dist/public/bundle.0a495807b6ef336cb500.js +0 -3
- package/dist/public/bundle.0a495807b6ef336cb500.js.map +0 -1
- package/dist/src/executor/SourceExecutor.d.ts +0 -32
- package/dist/src/executor/SourceExecutor.js +0 -163
- package/dist/src/executor/SourceExecutor.js.map +0 -1
- package/dist/src/local_engine/storage/SourceJobExecutionStore.d.ts +0 -25
- package/dist/src/local_engine/storage/SourceJobExecutionStore.js +0 -61
- package/dist/src/local_engine/storage/SourceJobExecutionStore.js.map +0 -1
- package/dist/src/ui/components/SourceDataViewer.d.ts +0 -8
- package/dist/src/ui/components/SourceDataViewer.js +0 -84
- package/dist/src/ui/components/SourceDataViewer.js.map +0 -1
- package/dist/src/ui/components/SourceJobsSection.d.ts +0 -8
- package/dist/src/ui/components/SourceJobsSection.js +0 -99
- package/dist/src/ui/components/SourceJobsSection.js.map +0 -1
- package/dist/src/ui/components/SourceLifecycleSection.d.ts +0 -7
- package/dist/src/ui/components/SourceLifecycleSection.js +0 -58
- package/dist/src/ui/components/SourceLifecycleSection.js.map +0 -1
- package/dist/src/ui/components/SourceWebhookEditor.d.ts +0 -8
- package/dist/src/ui/components/SourceWebhookEditor.js +0 -168
- package/dist/src/ui/components/SourceWebhookEditor.js.map +0 -1
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.hydrateFromStorage = exports.clearAllState = exports.updateOpalToolState = exports.updateSourceState = exports.updateDestinationState = exports.updateJobState = exports.updateFunctionState = exports.setAppName = exports.getDefaultOpalToolFormState = exports.getDefaultSourceFormState = exports.getDefaultDestinationFormState = exports.getDefaultJobFormState = exports.getDefaultFunctionFormState = void 0;
|
|
5
|
+
exports.generateDefaultAuthData = generateDefaultAuthData;
|
|
6
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
7
|
+
// Default state factories
|
|
8
|
+
const getDefaultFunctionFormState = () => ({
|
|
9
|
+
httpMethod: 'POST',
|
|
10
|
+
pathSuffix: '',
|
|
11
|
+
params: [{ key: '', value: '', enabled: true }],
|
|
12
|
+
headers: [{ key: 'Content-Type', value: 'application/json', enabled: true }],
|
|
13
|
+
requestBody: '{\n \n}',
|
|
14
|
+
});
|
|
15
|
+
exports.getDefaultFunctionFormState = getDefaultFunctionFormState;
|
|
16
|
+
const getDefaultJobFormState = () => ({
|
|
17
|
+
params: '{}',
|
|
18
|
+
});
|
|
19
|
+
exports.getDefaultJobFormState = getDefaultJobFormState;
|
|
20
|
+
const getDefaultDestinationFormState = () => ({
|
|
21
|
+
batchJson: '',
|
|
22
|
+
attempt: '1',
|
|
23
|
+
syncId: 'mock-sync-id',
|
|
24
|
+
syncName: 'Mock Data Sync',
|
|
25
|
+
});
|
|
26
|
+
exports.getDefaultDestinationFormState = getDefaultDestinationFormState;
|
|
27
|
+
const getDefaultSourceFormState = () => ({
|
|
28
|
+
webhookHttpMethod: 'POST',
|
|
29
|
+
webhookUrl: '',
|
|
30
|
+
webhookBody: '{\n \n}',
|
|
31
|
+
webhookParams: [{ key: '', value: '', enabled: true }],
|
|
32
|
+
webhookHeaders: [{ key: 'Content-Type', value: 'application/json', enabled: true }],
|
|
33
|
+
});
|
|
34
|
+
exports.getDefaultSourceFormState = getDefaultSourceFormState;
|
|
35
|
+
const getDefaultOpalToolFormState = () => ({
|
|
36
|
+
requestBody: '{\n \n}',
|
|
37
|
+
params: [{ key: '', value: '', enabled: true }],
|
|
38
|
+
headers: [{ key: 'Content-Type', value: 'application/json', enabled: true }],
|
|
39
|
+
authData: '', // Will be initialized based on tool's auth_requirements
|
|
40
|
+
});
|
|
41
|
+
exports.getDefaultOpalToolFormState = getDefaultOpalToolFormState;
|
|
42
|
+
/**
|
|
43
|
+
* Generate default auth data JSON based on auth requirements.
|
|
44
|
+
* - For non-OptiID providers: simpler template with just access_token
|
|
45
|
+
* - For OptiID: full template with customer_id, instance_id, access_token, product_sku
|
|
46
|
+
*/
|
|
47
|
+
function generateDefaultAuthData(authRequirements) {
|
|
48
|
+
if (!authRequirements || authRequirements.length === 0) {
|
|
49
|
+
// Default to OptiID if no requirements specified
|
|
50
|
+
return JSON.stringify({
|
|
51
|
+
provider: 'OptiID',
|
|
52
|
+
credentials: {
|
|
53
|
+
customer_id: '',
|
|
54
|
+
instance_id: '',
|
|
55
|
+
access_token: '',
|
|
56
|
+
product_sku: ''
|
|
57
|
+
}
|
|
58
|
+
}, null, 2);
|
|
59
|
+
}
|
|
60
|
+
// Find the first non-OptiID provider, or use OptiID if that's all there is
|
|
61
|
+
const nonOptiIdReq = authRequirements.find((req) => req.provider?.toLowerCase() !== 'optiid');
|
|
62
|
+
if (nonOptiIdReq) {
|
|
63
|
+
// Non-OptiID provider - simpler template
|
|
64
|
+
return JSON.stringify({
|
|
65
|
+
provider: nonOptiIdReq.provider,
|
|
66
|
+
credentials: {
|
|
67
|
+
access_token: ''
|
|
68
|
+
}
|
|
69
|
+
}, null, 2);
|
|
70
|
+
}
|
|
71
|
+
// OptiID provider - full template
|
|
72
|
+
return JSON.stringify({
|
|
73
|
+
provider: 'OptiID',
|
|
74
|
+
credentials: {
|
|
75
|
+
customer_id: '',
|
|
76
|
+
instance_id: '',
|
|
77
|
+
access_token: '',
|
|
78
|
+
product_sku: ''
|
|
79
|
+
}
|
|
80
|
+
}, null, 2);
|
|
81
|
+
}
|
|
82
|
+
const initialState = {
|
|
83
|
+
appName: '',
|
|
84
|
+
functions: {},
|
|
85
|
+
jobs: {},
|
|
86
|
+
destinations: {},
|
|
87
|
+
sources: {},
|
|
88
|
+
opalTools: {},
|
|
89
|
+
};
|
|
90
|
+
const formStateSlice = (0, toolkit_1.createSlice)({
|
|
91
|
+
name: 'formState',
|
|
92
|
+
initialState,
|
|
93
|
+
reducers: {
|
|
94
|
+
// Set app name (clears state if app changed)
|
|
95
|
+
setAppName(state, action) {
|
|
96
|
+
if (state.appName !== action.payload) {
|
|
97
|
+
state.appName = action.payload;
|
|
98
|
+
state.functions = {};
|
|
99
|
+
state.jobs = {};
|
|
100
|
+
state.destinations = {};
|
|
101
|
+
state.sources = {};
|
|
102
|
+
state.opalTools = {};
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
// Update function form state
|
|
106
|
+
updateFunctionState(state, action) {
|
|
107
|
+
const { id, data } = action.payload;
|
|
108
|
+
const existing = state.functions[id] || (0, exports.getDefaultFunctionFormState)();
|
|
109
|
+
state.functions[id] = { ...existing, ...data };
|
|
110
|
+
},
|
|
111
|
+
// Update job form state
|
|
112
|
+
updateJobState(state, action) {
|
|
113
|
+
const { id, data } = action.payload;
|
|
114
|
+
const existing = state.jobs[id] || (0, exports.getDefaultJobFormState)();
|
|
115
|
+
state.jobs[id] = { ...existing, ...data };
|
|
116
|
+
},
|
|
117
|
+
// Update destination form state
|
|
118
|
+
updateDestinationState(state, action) {
|
|
119
|
+
const { id, data } = action.payload;
|
|
120
|
+
const existing = state.destinations[id] || (0, exports.getDefaultDestinationFormState)();
|
|
121
|
+
state.destinations[id] = { ...existing, ...data };
|
|
122
|
+
},
|
|
123
|
+
// Update source form state
|
|
124
|
+
updateSourceState(state, action) {
|
|
125
|
+
const { id, data } = action.payload;
|
|
126
|
+
const existing = state.sources[id] || (0, exports.getDefaultSourceFormState)();
|
|
127
|
+
state.sources[id] = { ...existing, ...data };
|
|
128
|
+
},
|
|
129
|
+
// Update opal tool form state
|
|
130
|
+
updateOpalToolState(state, action) {
|
|
131
|
+
const { id, data } = action.payload;
|
|
132
|
+
// Ensure opalTools exists (handles hydration from localStorage without this field)
|
|
133
|
+
if (!state.opalTools) {
|
|
134
|
+
state.opalTools = {};
|
|
135
|
+
}
|
|
136
|
+
const existing = state.opalTools[id] || (0, exports.getDefaultOpalToolFormState)();
|
|
137
|
+
state.opalTools[id] = { ...existing, ...data };
|
|
138
|
+
},
|
|
139
|
+
// Clear all form state (manual reset)
|
|
140
|
+
clearAllState(state) {
|
|
141
|
+
state.functions = {};
|
|
142
|
+
state.jobs = {};
|
|
143
|
+
state.destinations = {};
|
|
144
|
+
state.sources = {};
|
|
145
|
+
state.opalTools = {};
|
|
146
|
+
},
|
|
147
|
+
// Hydrate from localStorage
|
|
148
|
+
hydrateFromStorage(_state, action) {
|
|
149
|
+
// Ensure all expected fields exist (handles old localStorage data)
|
|
150
|
+
return {
|
|
151
|
+
...initialState,
|
|
152
|
+
...action.payload,
|
|
153
|
+
};
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
_a = formStateSlice.actions, exports.setAppName = _a.setAppName, exports.updateFunctionState = _a.updateFunctionState, exports.updateJobState = _a.updateJobState, exports.updateDestinationState = _a.updateDestinationState, exports.updateSourceState = _a.updateSourceState, exports.updateOpalToolState = _a.updateOpalToolState, exports.clearAllState = _a.clearAllState, exports.hydrateFromStorage = _a.hydrateFromStorage;
|
|
158
|
+
exports.default = formStateSlice.reducer;
|
|
159
|
+
//# sourceMappingURL=formStateSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formStateSlice.js","sourceRoot":"","sources":["../../../../src/ui/store/formStateSlice.ts"],"names":[],"mappings":";;;;AA8FA,0DAuCC;AArID,8CAA8D;AAsD9D,0BAA0B;AACnB,MAAM,2BAA2B,GAAG,GAAsB,EAAE,CAAC,CAAC;IACnE,UAAU,EAAE,MAAM;IAClB,UAAU,EAAE,EAAE;IACd,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC/C,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC5E,WAAW,EAAE,UAAU;CACxB,CAAC,CAAC;AANU,QAAA,2BAA2B,+BAMrC;AAEI,MAAM,sBAAsB,GAAG,GAAiB,EAAE,CAAC,CAAC;IACzD,MAAM,EAAE,IAAI;CACb,CAAC,CAAC;AAFU,QAAA,sBAAsB,0BAEhC;AAEI,MAAM,8BAA8B,GAAG,GAAyB,EAAE,CAAC,CAAC;IACzE,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,GAAG;IACZ,MAAM,EAAE,cAAc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|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TypedUseSelectorHook } from 'react-redux';
|
|
2
|
+
import type { RootState } from './index';
|
|
3
|
+
export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<{
|
|
4
|
+
formState: import("./formStateSlice").FormState;
|
|
5
|
+
}, undefined, import("redux").UnknownAction> & import("redux").Dispatch<import("redux").UnknownAction>;
|
|
6
|
+
export declare const useAppSelector: TypedUseSelectorHook<RootState>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useAppSelector = exports.useAppDispatch = void 0;
|
|
4
|
+
const react_redux_1 = require("react-redux");
|
|
5
|
+
const useAppDispatch = () => (0, react_redux_1.useDispatch)();
|
|
6
|
+
exports.useAppDispatch = useAppDispatch;
|
|
7
|
+
exports.useAppSelector = react_redux_1.useSelector;
|
|
8
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../src/ui/store/hooks.ts"],"names":[],"mappings":";;;AAAA,6CAA6E;AAGtE,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,IAAA,yBAAW,GAAe,CAAC;AAAlD,QAAA,cAAc,kBAAoC;AAClD,QAAA,cAAc,GAAoC,yBAAW,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FormState } from './formStateSlice';
|
|
2
|
+
export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
3
|
+
formState: FormState;
|
|
4
|
+
}, import("redux").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
|
|
5
|
+
dispatch: import("redux-thunk").ThunkDispatch<{
|
|
6
|
+
formState: FormState;
|
|
7
|
+
}, undefined, import("redux").UnknownAction>;
|
|
8
|
+
}>, import("redux").StoreEnhancer]>>;
|
|
9
|
+
export declare function initializeStore(appName: string): void;
|
|
10
|
+
export type RootState = ReturnType<typeof store.getState>;
|
|
11
|
+
export type AppDispatch = typeof store.dispatch;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.store = void 0;
|
|
37
|
+
exports.initializeStore = initializeStore;
|
|
38
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
39
|
+
const formStateSlice_1 = __importStar(require("./formStateSlice"));
|
|
40
|
+
const STORAGE_KEY_PREFIX = 'ocp-local-tool-state';
|
|
41
|
+
// Debounce helper
|
|
42
|
+
function debounce(fn, ms) {
|
|
43
|
+
let timeoutId = null;
|
|
44
|
+
return (...args) => {
|
|
45
|
+
if (timeoutId)
|
|
46
|
+
clearTimeout(timeoutId);
|
|
47
|
+
timeoutId = setTimeout(() => fn(...args), ms);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
// Load state from localStorage
|
|
51
|
+
function loadState(appName) {
|
|
52
|
+
try {
|
|
53
|
+
const key = `${STORAGE_KEY_PREFIX}-${appName}`;
|
|
54
|
+
const serialized = localStorage.getItem(key);
|
|
55
|
+
if (serialized === null) {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
const parsed = JSON.parse(serialized);
|
|
59
|
+
// Verify appName matches
|
|
60
|
+
if (parsed.appName !== appName) {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
return parsed;
|
|
64
|
+
}
|
|
65
|
+
catch (err) {
|
|
66
|
+
console.warn('Failed to load form state from localStorage:', err);
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// Save state to localStorage
|
|
71
|
+
function saveState(state) {
|
|
72
|
+
try {
|
|
73
|
+
if (!state.appName)
|
|
74
|
+
return; // Don't save if no app name set
|
|
75
|
+
const key = `${STORAGE_KEY_PREFIX}-${state.appName}`;
|
|
76
|
+
const serialized = JSON.stringify(state);
|
|
77
|
+
localStorage.setItem(key, serialized);
|
|
78
|
+
}
|
|
79
|
+
catch (err) {
|
|
80
|
+
console.warn('Failed to save form state to localStorage:', err);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
// Create the store
|
|
84
|
+
exports.store = (0, toolkit_1.configureStore)({
|
|
85
|
+
reducer: {
|
|
86
|
+
formState: formStateSlice_1.default,
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
// Set up debounced persistence subscription
|
|
90
|
+
const debouncedSave = debounce((state) => {
|
|
91
|
+
saveState(state);
|
|
92
|
+
}, 500);
|
|
93
|
+
exports.store.subscribe(() => {
|
|
94
|
+
const state = exports.store.getState().formState;
|
|
95
|
+
debouncedSave(state);
|
|
96
|
+
});
|
|
97
|
+
// Initialize store with app name (call this when app loads)
|
|
98
|
+
function initializeStore(appName) {
|
|
99
|
+
const savedState = loadState(appName);
|
|
100
|
+
if (savedState) {
|
|
101
|
+
exports.store.dispatch((0, formStateSlice_1.hydrateFromStorage)(savedState));
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
exports.store.dispatch((0, formStateSlice_1.setAppName)(appName));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/store/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,0CAOC;AA1ED,8CAAkD;AAClD,mEAA+F;AAE/F,MAAM,kBAAkB,GAAG,sBAAsB,CAAC;AAElD,kBAAkB;AAClB,SAAS,QAAQ,CACf,EAA2B,EAC3B,EAAU;IAEV,IAAI,SAAS,GAAyC,IAAI,CAAC;IAC3D,OAAO,CAAC,GAAG,IAAU,EAAE,EAAE;QACvB,IAAI,SAAS;YAAE,YAAY,CAAC,SAAS,CAAC,CAAC;QACvC,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;AACJ,CAAC;AAED,+BAA+B;AAC/B,SAAS,SAAS,CAAC,OAAe;IAChC,IAAI,CAAC;QAC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C,CAAC;AACnB,CAAC,EAAE,GAAG,CAAC,CAAC;AAER,aAAK,CAAC,SAAS,CAAC,GAAG,EAAE;IACnB,MAAM,KAAK,GAAG,aAAK,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC;IACzC,aAAa,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC;AAEH,4DAA4D;AAC5D,SAAgB,eAAe,CAAC,OAAe;IAC7C,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IACtC,IAAI,UAAU,EAAE,CAAC;QACf,aAAK,CAAC,QAAQ,CAAC,IAAA,mCAAkB,EAAC,UAAU,CAAC,CAAC,CAAC;IACjD,CAAC;SAAM,CAAC;QACN,aAAK,CAAC,QAAQ,CAAC,IAAA,2BAAU,EAAC,OAAO,CAAC,CAAC,CAAC;IACtC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types used across multiple UI components
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Response from executing a function or tool request
|
|
6
|
+
*/
|
|
7
|
+
export interface ExecutionResponse {
|
|
8
|
+
result: any;
|
|
9
|
+
executionTime: number;
|
|
10
|
+
status?: number;
|
|
11
|
+
statusText?: string;
|
|
12
|
+
headers?: [string, string][];
|
|
13
|
+
error?: {
|
|
14
|
+
message: string;
|
|
15
|
+
stack?: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Extended execution response that includes input and logs (used by FunctionsView)
|
|
20
|
+
*/
|
|
21
|
+
export interface FunctionExecutionResponse extends ExecutionResponse {
|
|
22
|
+
input: any;
|
|
23
|
+
logs: string[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Build status information from the dev server
|
|
27
|
+
*/
|
|
28
|
+
export interface BuildStatus {
|
|
29
|
+
buildInProgress: boolean;
|
|
30
|
+
lastBuildSuccess: boolean | null;
|
|
31
|
+
lastBuildTimestamp: string | null;
|
|
32
|
+
lastBuildError: string | null;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/ui/types/common.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optimizely/ocp-local-env",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Local testing environment for Optimizely Connect Platform (OCP) applications",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -12,11 +12,15 @@
|
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "tsc && webpack --mode production",
|
|
15
|
-
"dev": "concurrently \"tsc --watch\" \"webpack --mode development --watch\" \"nodemon dist/src/server.js\"",
|
|
15
|
+
"dev": "concurrently \"tsc --watch\" \"webpack --mode development --watch\" \"OCP_LOCAL_OPEN_BROWSER=false nodemon dist/src/server.js\"",
|
|
16
16
|
"dev:server": "tsc --watch && nodemon dist/src/server.js",
|
|
17
17
|
"dev:ui": "webpack --mode development --watch",
|
|
18
18
|
"start": "node dist/src/server.js",
|
|
19
19
|
"test": "jest",
|
|
20
|
+
"test:e2e": "playwright test",
|
|
21
|
+
"test:e2e:setup": "node scripts/setup-e2e-apps.js",
|
|
22
|
+
"test:e2e:ui": "playwright test --ui",
|
|
23
|
+
"test:e2e:debug": "playwright test --debug",
|
|
20
24
|
"lint": "npx eslint 'src/**'",
|
|
21
25
|
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
22
26
|
"prepare": "npm run build",
|
|
@@ -41,8 +45,7 @@
|
|
|
41
45
|
"homepage": "https://github.com/ZaiusInc/ocp-local-env#readme",
|
|
42
46
|
"dependencies": {
|
|
43
47
|
"@faker-js/faker": "^10.1.0",
|
|
44
|
-
"@
|
|
45
|
-
"@zaiusinc/node-sdk": "^2.0.0",
|
|
48
|
+
"@reduxjs/toolkit": "^2.11.0",
|
|
46
49
|
"chalk": "^4.1.2",
|
|
47
50
|
"chokidar": "^3.5.3",
|
|
48
51
|
"commander": "^9.4.1",
|
|
@@ -53,10 +56,14 @@
|
|
|
53
56
|
"open": "^8.4.2",
|
|
54
57
|
"react": ">=17.0.0",
|
|
55
58
|
"react-dom": ">=17.0.0",
|
|
59
|
+
"react-redux": "^9.2.0",
|
|
56
60
|
"react-router-dom": "^6.28.0",
|
|
61
|
+
"semver": "^7.7.4",
|
|
57
62
|
"uuid": "^9.0.0"
|
|
58
63
|
},
|
|
59
64
|
"devDependencies": {
|
|
65
|
+
"@optimizely/axiom-icons": "^1.13.1",
|
|
66
|
+
"@playwright/test": "^1.40.0",
|
|
60
67
|
"@testing-library/dom": "^10.4.1",
|
|
61
68
|
"@testing-library/jest-dom": "^6.9.1",
|
|
62
69
|
"@testing-library/react": "^16.3.0",
|
|
@@ -67,24 +74,25 @@
|
|
|
67
74
|
"@types/node": "^18.19.122",
|
|
68
75
|
"@types/react": "^18.3.23",
|
|
69
76
|
"@types/react-dom": "^18.3.7",
|
|
77
|
+
"@types/semver": "^7.7.1",
|
|
70
78
|
"@types/uuid": "^9.0.0",
|
|
71
79
|
"@typescript-eslint/eslint-plugin": "^5.48.0",
|
|
72
80
|
"@typescript-eslint/parser": "^5.48.0",
|
|
73
81
|
"concurrently": "^7.6.0",
|
|
74
82
|
"css-loader": "^6.7.3",
|
|
75
|
-
"eslint": "^
|
|
83
|
+
"eslint": "^9.26.0",
|
|
76
84
|
"eslint-config-prettier": "^8.6.0",
|
|
77
85
|
"eslint-plugin-react": "^7.31.11",
|
|
78
86
|
"html-webpack-plugin": "^5.5.0",
|
|
79
87
|
"husky": "^8.0.3",
|
|
80
88
|
"identity-obj-proxy": "^3.0.0",
|
|
81
89
|
"jest": "^29.3.1",
|
|
82
|
-
"jest-environment-jsdom": "^
|
|
83
|
-
"lint-staged": "^
|
|
90
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
91
|
+
"lint-staged": "^15.2.0",
|
|
84
92
|
"nodemon": "^3.1.10",
|
|
85
93
|
"parse-path": "^7.0.0",
|
|
86
94
|
"prettier": "^2.8.1",
|
|
87
|
-
"release-it": "^
|
|
95
|
+
"release-it": "^17.10.0",
|
|
88
96
|
"style-loader": "^3.3.1",
|
|
89
97
|
"ts-jest": "^29.0.3",
|
|
90
98
|
"ts-loader": "^9.4.2",
|
|
@@ -97,7 +105,7 @@
|
|
|
97
105
|
"react-dom": ">=17.0.0"
|
|
98
106
|
},
|
|
99
107
|
"engines": {
|
|
100
|
-
"node": ">=
|
|
108
|
+
"node": ">=18.0.0"
|
|
101
109
|
},
|
|
102
110
|
"lint-staged": {
|
|
103
111
|
"*.{ts,tsx}": [
|