@optimizely/ocp-local-env 1.0.0-beta.10

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.
Files changed (244) hide show
  1. package/README.md +51 -0
  2. package/dist/package.json +112 -0
  3. package/dist/public/bundle.82dc5d29fffb9f205051.js +3 -0
  4. package/dist/public/bundle.82dc5d29fffb9f205051.js.LICENSE.txt +92 -0
  5. package/dist/public/bundle.82dc5d29fffb9f205051.js.map +1 -0
  6. package/dist/public/index.html +1 -0
  7. package/dist/src/cli.d.ts +2 -0
  8. package/dist/src/cli.js +115 -0
  9. package/dist/src/cli.js.map +1 -0
  10. package/dist/src/executor/DestinationExecutor.d.ts +19 -0
  11. package/dist/src/executor/DestinationExecutor.js +72 -0
  12. package/dist/src/executor/DestinationExecutor.js.map +1 -0
  13. package/dist/src/executor/FunctionExecutor.d.ts +67 -0
  14. package/dist/src/executor/FunctionExecutor.js +189 -0
  15. package/dist/src/executor/FunctionExecutor.js.map +1 -0
  16. package/dist/src/executor/JobExecutor.d.ts +79 -0
  17. package/dist/src/executor/JobExecutor.js +215 -0
  18. package/dist/src/executor/JobExecutor.js.map +1 -0
  19. package/dist/src/executor/LifecycleExecutor.d.ts +64 -0
  20. package/dist/src/executor/LifecycleExecutor.js +167 -0
  21. package/dist/src/executor/LifecycleExecutor.js.map +1 -0
  22. package/dist/src/executor/SourceExecutor.d.ts +32 -0
  23. package/dist/src/executor/SourceExecutor.js +163 -0
  24. package/dist/src/executor/SourceExecutor.js.map +1 -0
  25. package/dist/src/executor/watcher.d.ts +62 -0
  26. package/dist/src/executor/watcher.js +213 -0
  27. package/dist/src/executor/watcher.js.map +1 -0
  28. package/dist/src/functions/hello.d.ts +4 -0
  29. package/dist/src/functions/hello.js +8 -0
  30. package/dist/src/functions/hello.js.map +1 -0
  31. package/dist/src/index.d.ts +1 -0
  32. package/dist/src/index.js +9 -0
  33. package/dist/src/index.js.map +1 -0
  34. package/dist/src/jobs/dailyJob.d.ts +4 -0
  35. package/dist/src/jobs/dailyJob.js +8 -0
  36. package/dist/src/jobs/dailyJob.js.map +1 -0
  37. package/dist/src/local_engine/LocalFunctionApi.d.ts +17 -0
  38. package/dist/src/local_engine/LocalFunctionApi.js +54 -0
  39. package/dist/src/local_engine/LocalFunctionApi.js.map +1 -0
  40. package/dist/src/local_engine/LocalJobApi.d.ts +67 -0
  41. package/dist/src/local_engine/LocalJobApi.js +205 -0
  42. package/dist/src/local_engine/LocalJobApi.js.map +1 -0
  43. package/dist/src/local_engine/LocalNotifier.d.ts +9 -0
  44. package/dist/src/local_engine/LocalNotifier.js +26 -0
  45. package/dist/src/local_engine/LocalNotifier.js.map +1 -0
  46. package/dist/src/local_engine/local-engine-child-base.d.ts +110 -0
  47. package/dist/src/local_engine/local-engine-child-base.js +607 -0
  48. package/dist/src/local_engine/local-engine-child-base.js.map +1 -0
  49. package/dist/src/local_engine/local-engine-client.d.ts +161 -0
  50. package/dist/src/local_engine/local-engine-client.js +888 -0
  51. package/dist/src/local_engine/local-engine-client.js.map +1 -0
  52. package/dist/src/local_engine/local-engine-types.d.ts +245 -0
  53. package/dist/src/local_engine/local-engine-types.js +6 -0
  54. package/dist/src/local_engine/local-engine-types.js.map +1 -0
  55. package/dist/src/local_engine/local-engine-unified.d.ts +71 -0
  56. package/dist/src/local_engine/local-engine-unified.js +723 -0
  57. package/dist/src/local_engine/local-engine-unified.js.map +1 -0
  58. package/dist/src/local_engine/local-engine-utils.d.ts +68 -0
  59. package/dist/src/local_engine/local-engine-utils.js +219 -0
  60. package/dist/src/local_engine/local-engine-utils.js.map +1 -0
  61. package/dist/src/local_engine/localSDKConfig.d.ts +40 -0
  62. package/dist/src/local_engine/localSDKConfig.js +247 -0
  63. package/dist/src/local_engine/localSDKConfig.js.map +1 -0
  64. package/dist/src/local_engine/storage/BaseKVStoreWrapper.d.ts +37 -0
  65. package/dist/src/local_engine/storage/BaseKVStoreWrapper.js +110 -0
  66. package/dist/src/local_engine/storage/BaseKVStoreWrapper.js.map +1 -0
  67. package/dist/src/local_engine/storage/LocalConfigStore.d.ts +74 -0
  68. package/dist/src/local_engine/storage/LocalConfigStore.js +178 -0
  69. package/dist/src/local_engine/storage/LocalConfigStore.js.map +1 -0
  70. package/dist/src/local_engine/storage/LocalJobStore.d.ts +111 -0
  71. package/dist/src/local_engine/storage/LocalJobStore.js +249 -0
  72. package/dist/src/local_engine/storage/LocalJobStore.js.map +1 -0
  73. package/dist/src/local_engine/storage/LocalKVStore.d.ts +106 -0
  74. package/dist/src/local_engine/storage/LocalKVStore.js +1061 -0
  75. package/dist/src/local_engine/storage/LocalKVStore.js.map +1 -0
  76. package/dist/src/local_engine/storage/LocalNotificationStore.d.ts +28 -0
  77. package/dist/src/local_engine/storage/LocalNotificationStore.js +149 -0
  78. package/dist/src/local_engine/storage/LocalNotificationStore.js.map +1 -0
  79. package/dist/src/local_engine/storage/LocalSecretsStore.d.ts +115 -0
  80. package/dist/src/local_engine/storage/LocalSecretsStore.js +350 -0
  81. package/dist/src/local_engine/storage/LocalSecretsStore.js.map +1 -0
  82. package/dist/src/local_engine/storage/LocalSecretsStoreWrapper.d.ts +19 -0
  83. package/dist/src/local_engine/storage/LocalSecretsStoreWrapper.js +52 -0
  84. package/dist/src/local_engine/storage/LocalSecretsStoreWrapper.js.map +1 -0
  85. package/dist/src/local_engine/storage/LocalSettingsStore.d.ts +168 -0
  86. package/dist/src/local_engine/storage/LocalSettingsStore.js +509 -0
  87. package/dist/src/local_engine/storage/LocalSettingsStore.js.map +1 -0
  88. package/dist/src/local_engine/storage/LocalSettingsStoreWrapper.d.ts +15 -0
  89. package/dist/src/local_engine/storage/LocalSettingsStoreWrapper.js +28 -0
  90. package/dist/src/local_engine/storage/LocalSettingsStoreWrapper.js.map +1 -0
  91. package/dist/src/local_engine/storage/NumberSet.d.ts +21 -0
  92. package/dist/src/local_engine/storage/NumberSet.js +32 -0
  93. package/dist/src/local_engine/storage/NumberSet.js.map +1 -0
  94. package/dist/src/local_engine/storage/SourceDataStore.d.ts +23 -0
  95. package/dist/src/local_engine/storage/SourceDataStore.js +83 -0
  96. package/dist/src/local_engine/storage/SourceDataStore.js.map +1 -0
  97. package/dist/src/local_engine/storage/SourceJobExecutionStore.d.ts +25 -0
  98. package/dist/src/local_engine/storage/SourceJobExecutionStore.js +61 -0
  99. package/dist/src/local_engine/storage/SourceJobExecutionStore.js.map +1 -0
  100. package/dist/src/local_engine/storage/StringSet.d.ts +21 -0
  101. package/dist/src/local_engine/storage/StringSet.js +32 -0
  102. package/dist/src/local_engine/storage/StringSet.js.map +1 -0
  103. package/dist/src/local_engine/types.d.ts +53 -0
  104. package/dist/src/local_engine/types.js +6 -0
  105. package/dist/src/local_engine/types.js.map +1 -0
  106. package/dist/src/local_engine/utils.d.ts +33 -0
  107. package/dist/src/local_engine/utils.js +143 -0
  108. package/dist/src/local_engine/utils.js.map +1 -0
  109. package/dist/src/logging/LogManager.d.ts +246 -0
  110. package/dist/src/logging/LogManager.js +343 -0
  111. package/dist/src/logging/LogManager.js.map +1 -0
  112. package/dist/src/server/api/destinations.d.ts +7 -0
  113. package/dist/src/server/api/destinations.js +170 -0
  114. package/dist/src/server/api/destinations.js.map +1 -0
  115. package/dist/src/server/api/functions.d.ts +7 -0
  116. package/dist/src/server/api/functions.js +80 -0
  117. package/dist/src/server/api/functions.js.map +1 -0
  118. package/dist/src/server/api/jobs.d.ts +10 -0
  119. package/dist/src/server/api/jobs.js +244 -0
  120. package/dist/src/server/api/jobs.js.map +1 -0
  121. package/dist/src/server/api/settings.d.ts +6 -0
  122. package/dist/src/server/api/settings.js +116 -0
  123. package/dist/src/server/api/settings.js.map +1 -0
  124. package/dist/src/server/api/sources.d.ts +7 -0
  125. package/dist/src/server/api/sources.js +382 -0
  126. package/dist/src/server/api/sources.js.map +1 -0
  127. package/dist/src/server/api/stores.d.ts +2 -0
  128. package/dist/src/server/api/stores.js +341 -0
  129. package/dist/src/server/api/stores.js.map +1 -0
  130. package/dist/src/server/api/v1.d.ts +10 -0
  131. package/dist/src/server/api/v1.js +718 -0
  132. package/dist/src/server/api/v1.js.map +1 -0
  133. package/dist/src/server/api.d.ts +8 -0
  134. package/dist/src/server/api.js +217 -0
  135. package/dist/src/server/api.js.map +1 -0
  136. package/dist/src/server/app-discovery.d.ts +5 -0
  137. package/dist/src/server/app-discovery.js +113 -0
  138. package/dist/src/server/app-discovery.js.map +1 -0
  139. package/dist/src/server/config.d.ts +26 -0
  140. package/dist/src/server/config.js +112 -0
  141. package/dist/src/server/config.js.map +1 -0
  142. package/dist/src/server/mockDataGenerator.d.ts +1 -0
  143. package/dist/src/server/mockDataGenerator.js +154 -0
  144. package/dist/src/server/mockDataGenerator.js.map +1 -0
  145. package/dist/src/server/websocket.d.ts +0 -0
  146. package/dist/src/server/websocket.js +2 -0
  147. package/dist/src/server/websocket.js.map +1 -0
  148. package/dist/src/server.d.ts +2 -0
  149. package/dist/src/server.js +735 -0
  150. package/dist/src/server.js.map +1 -0
  151. package/dist/src/types/app.d.ts +154 -0
  152. package/dist/src/types/app.js +24 -0
  153. package/dist/src/types/app.js.map +1 -0
  154. package/dist/src/types/kvstore.d.ts +320 -0
  155. package/dist/src/types/kvstore.js +5 -0
  156. package/dist/src/types/kvstore.js.map +1 -0
  157. package/dist/src/ui/components/App.d.ts +6 -0
  158. package/dist/src/ui/components/App.js +432 -0
  159. package/dist/src/ui/components/App.js.map +1 -0
  160. package/dist/src/ui/components/DestinationBatchEditor.d.ts +7 -0
  161. package/dist/src/ui/components/DestinationBatchEditor.js +160 -0
  162. package/dist/src/ui/components/DestinationBatchEditor.js.map +1 -0
  163. package/dist/src/ui/components/DestinationSchemaViewer.d.ts +7 -0
  164. package/dist/src/ui/components/DestinationSchemaViewer.js +61 -0
  165. package/dist/src/ui/components/DestinationSchemaViewer.js.map +1 -0
  166. package/dist/src/ui/components/DestinationsView.d.ts +14 -0
  167. package/dist/src/ui/components/DestinationsView.js +68 -0
  168. package/dist/src/ui/components/DestinationsView.js.map +1 -0
  169. package/dist/src/ui/components/FunctionsView.d.ts +13 -0
  170. package/dist/src/ui/components/FunctionsView.js +288 -0
  171. package/dist/src/ui/components/FunctionsView.js.map +1 -0
  172. package/dist/src/ui/components/JobsView.d.ts +13 -0
  173. package/dist/src/ui/components/JobsView.js +320 -0
  174. package/dist/src/ui/components/JobsView.js.map +1 -0
  175. package/dist/src/ui/components/KVStoreViewer.d.ts +11 -0
  176. package/dist/src/ui/components/KVStoreViewer.js +168 -0
  177. package/dist/src/ui/components/KVStoreViewer.js.map +1 -0
  178. package/dist/src/ui/components/MetadataModal.d.ts +14 -0
  179. package/dist/src/ui/components/MetadataModal.js +28 -0
  180. package/dist/src/ui/components/MetadataModal.js.map +1 -0
  181. package/dist/src/ui/components/MetadataModal.test.d.ts +1 -0
  182. package/dist/src/ui/components/MetadataModal.test.js +143 -0
  183. package/dist/src/ui/components/MetadataModal.test.js.map +1 -0
  184. package/dist/src/ui/components/NotificationViewer.d.ts +16 -0
  185. package/dist/src/ui/components/NotificationViewer.js +69 -0
  186. package/dist/src/ui/components/NotificationViewer.js.map +1 -0
  187. package/dist/src/ui/components/SecretsStoreViewer.d.ts +11 -0
  188. package/dist/src/ui/components/SecretsStoreViewer.js +179 -0
  189. package/dist/src/ui/components/SecretsStoreViewer.js.map +1 -0
  190. package/dist/src/ui/components/SettingsStoreViewer.d.ts +24 -0
  191. package/dist/src/ui/components/SettingsStoreViewer.js +132 -0
  192. package/dist/src/ui/components/SettingsStoreViewer.js.map +1 -0
  193. package/dist/src/ui/components/SourceDataViewer.d.ts +8 -0
  194. package/dist/src/ui/components/SourceDataViewer.js +84 -0
  195. package/dist/src/ui/components/SourceDataViewer.js.map +1 -0
  196. package/dist/src/ui/components/SourceJobsSection.d.ts +8 -0
  197. package/dist/src/ui/components/SourceJobsSection.js +99 -0
  198. package/dist/src/ui/components/SourceJobsSection.js.map +1 -0
  199. package/dist/src/ui/components/SourceLifecycleSection.d.ts +7 -0
  200. package/dist/src/ui/components/SourceLifecycleSection.js +58 -0
  201. package/dist/src/ui/components/SourceLifecycleSection.js.map +1 -0
  202. package/dist/src/ui/components/SourceSchemaViewer.d.ts +7 -0
  203. package/dist/src/ui/components/SourceSchemaViewer.js +65 -0
  204. package/dist/src/ui/components/SourceSchemaViewer.js.map +1 -0
  205. package/dist/src/ui/components/SourceWebhookEditor.d.ts +8 -0
  206. package/dist/src/ui/components/SourceWebhookEditor.js +181 -0
  207. package/dist/src/ui/components/SourceWebhookEditor.js.map +1 -0
  208. package/dist/src/ui/components/SourcesView.d.ts +14 -0
  209. package/dist/src/ui/components/SourcesView.js +74 -0
  210. package/dist/src/ui/components/SourcesView.js.map +1 -0
  211. package/dist/src/ui/components/StoreViewer.d.ts +16 -0
  212. package/dist/src/ui/components/StoreViewer.js +86 -0
  213. package/dist/src/ui/components/StoreViewer.js.map +1 -0
  214. package/dist/src/ui/components/TabbedConsole.d.ts +17 -0
  215. package/dist/src/ui/components/TabbedConsole.js +163 -0
  216. package/dist/src/ui/components/TabbedConsole.js.map +1 -0
  217. package/dist/src/ui/components/common/DataTree.d.ts +15 -0
  218. package/dist/src/ui/components/common/DataTree.js +95 -0
  219. package/dist/src/ui/components/common/DataTree.js.map +1 -0
  220. package/dist/src/ui/components/common/EyeIcon.d.ts +11 -0
  221. package/dist/src/ui/components/common/EyeIcon.js +11 -0
  222. package/dist/src/ui/components/common/EyeIcon.js.map +1 -0
  223. package/dist/src/ui/hooks/useEntityNavigation.d.ts +72 -0
  224. package/dist/src/ui/hooks/useEntityNavigation.js +150 -0
  225. package/dist/src/ui/hooks/useEntityNavigation.js.map +1 -0
  226. package/dist/src/ui/hooks/useQueryParams.d.ts +6 -0
  227. package/dist/src/ui/hooks/useQueryParams.js +39 -0
  228. package/dist/src/ui/hooks/useQueryParams.js.map +1 -0
  229. package/dist/src/ui/index.d.ts +1 -0
  230. package/dist/src/ui/index.js +23 -0
  231. package/dist/src/ui/index.js.map +1 -0
  232. package/dist/src/ui/store/formStateSlice.d.ts +54 -0
  233. package/dist/src/ui/store/formStateSlice.js +94 -0
  234. package/dist/src/ui/store/formStateSlice.js.map +1 -0
  235. package/dist/src/ui/store/hooks.d.ts +6 -0
  236. package/dist/src/ui/store/hooks.js +8 -0
  237. package/dist/src/ui/store/hooks.js.map +1 -0
  238. package/dist/src/ui/store/index.d.ts +11 -0
  239. package/dist/src/ui/store/index.js +107 -0
  240. package/dist/src/ui/store/index.js.map +1 -0
  241. package/dist/src/utils/functionEndpoints.d.ts +24 -0
  242. package/dist/src/utils/functionEndpoints.js +45 -0
  243. package/dist/src/utils/functionEndpoints.js.map +1 -0
  244. package/package.json +112 -0
@@ -0,0 +1,341 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const express_1 = require("express");
4
+ const LocalSettingsStore_1 = require("../../local_engine/storage/LocalSettingsStore");
5
+ const LocalSecretsStore_1 = require("../../local_engine/storage/LocalSecretsStore");
6
+ const LocalKVStore_1 = require("../../local_engine/storage/LocalKVStore");
7
+ const LocalNotificationStore_1 = require("../../local_engine/storage/LocalNotificationStore");
8
+ const config_1 = require("../config");
9
+ const router = (0, express_1.Router)();
10
+ /**
11
+ * GET /api/stores - Get all store data with merged settings.yml schema
12
+ */
13
+ router.get('/', (req, res) => {
14
+ try {
15
+ const appRootDir = config_1.config.app.rootDir;
16
+ // Get settings with metadata (server-side merging of settings.yml and local data)
17
+ const settingsStore = LocalSettingsStore_1.LocalSettingsStore.getInstance(appRootDir);
18
+ const settingsWithMetadata = settingsStore.getAllSettingsWithMetadata();
19
+ // Get secrets data
20
+ const secretsStore = LocalSecretsStore_1.LocalSecretsStore.getInstance(appRootDir);
21
+ const secretsData = secretsStore.getSecrets();
22
+ // Get KV store data
23
+ const kvStore = LocalKVStore_1.LocalKVStore.getInstance(appRootDir);
24
+ const kvData = kvStore.getAllData();
25
+ // Get shared KV store data
26
+ const sharedKvStore = LocalKVStore_1.LocalKVStore.getSharedInstance(appRootDir);
27
+ const sharedKvData = sharedKvStore.getAllData();
28
+ // Get notifications data
29
+ const notificationStore = LocalNotificationStore_1.LocalNotificationStore.getInstance(appRootDir);
30
+ const notificationsData = notificationStore.getAllNotifications();
31
+ const response = {
32
+ settings: settingsWithMetadata,
33
+ secrets: secretsData,
34
+ kv: kvData,
35
+ sharedKv: sharedKvData,
36
+ notifications: notificationsData
37
+ };
38
+ res.json(response);
39
+ }
40
+ catch (error) {
41
+ console.error('Error fetching store data:', error);
42
+ res.status(500).json({
43
+ error: 'Failed to fetch store data',
44
+ details: error instanceof Error ? error.message : String(error)
45
+ });
46
+ }
47
+ });
48
+ /**
49
+ * GET /api/stores/settings - Get settings store with metadata
50
+ */
51
+ router.get('/settings', (req, res) => {
52
+ try {
53
+ const appRootDir = config_1.config.app.rootDir;
54
+ const settingsStore = LocalSettingsStore_1.LocalSettingsStore.getInstance(appRootDir);
55
+ const settingsWithMetadata = settingsStore.getAllSettingsWithMetadata();
56
+ res.json({ settings: settingsWithMetadata });
57
+ }
58
+ catch (error) {
59
+ console.error('Error fetching settings store:', error);
60
+ res.status(500).json({
61
+ error: 'Failed to fetch settings store',
62
+ details: error instanceof Error ? error.message : String(error)
63
+ });
64
+ }
65
+ });
66
+ /**
67
+ * GET /api/stores/settings/:section - Get specific settings section with metadata
68
+ */
69
+ router.get('/settings/:section', (req, res) => {
70
+ try {
71
+ const appRootDir = config_1.config.app.rootDir;
72
+ const sectionName = req.params.section;
73
+ const settingsStore = LocalSettingsStore_1.LocalSettingsStore.getInstance(appRootDir);
74
+ const sectionWithMetadata = settingsStore.getSectionSettingsWithMetadata(sectionName);
75
+ res.json({ section: sectionName, fields: sectionWithMetadata });
76
+ }
77
+ catch (error) {
78
+ console.error('Error fetching settings section:', error);
79
+ res.status(500).json({
80
+ error: 'Failed to fetch settings section',
81
+ details: error instanceof Error ? error.message : String(error)
82
+ });
83
+ }
84
+ });
85
+ /**
86
+ * PUT /api/stores/settings/:section - Update settings section
87
+ */
88
+ router.put('/settings/:section', (req, res) => {
89
+ try {
90
+ const appRootDir = config_1.config.app.rootDir;
91
+ const sectionName = req.params.section;
92
+ const sectionSettings = req.body;
93
+ const settingsStore = LocalSettingsStore_1.LocalSettingsStore.getInstance(appRootDir);
94
+ settingsStore.updateSectionSettings(sectionName, sectionSettings);
95
+ // Return updated section with metadata
96
+ const updatedSection = settingsStore.getSectionSettingsWithMetadata(sectionName);
97
+ res.json({ section: sectionName, fields: updatedSection });
98
+ }
99
+ catch (error) {
100
+ console.error('Error updating settings section:', error);
101
+ res.status(500).json({
102
+ error: 'Failed to update settings section',
103
+ details: error instanceof Error ? error.message : String(error)
104
+ });
105
+ }
106
+ });
107
+ /**
108
+ * GET /api/stores/secrets - Get secrets store
109
+ */
110
+ router.get('/secrets', (req, res) => {
111
+ try {
112
+ const appRootDir = config_1.config.app.rootDir;
113
+ const secretsStore = LocalSecretsStore_1.LocalSecretsStore.getInstance(appRootDir);
114
+ const secretsData = secretsStore.getSecrets();
115
+ res.json({ secrets: secretsData });
116
+ }
117
+ catch (error) {
118
+ console.error('Error fetching secrets store:', error);
119
+ res.status(500).json({
120
+ error: 'Failed to fetch secrets store',
121
+ details: error instanceof Error ? error.message : String(error)
122
+ });
123
+ }
124
+ });
125
+ /**
126
+ * GET /api/stores/secrets/:section - Get specific secrets section
127
+ */
128
+ router.get('/secrets/:section', (req, res) => {
129
+ try {
130
+ const appRootDir = config_1.config.app.rootDir;
131
+ const sectionName = req.params.section;
132
+ const secretsStore = LocalSecretsStore_1.LocalSecretsStore.getInstance(appRootDir);
133
+ const sectionSecrets = secretsStore.getSectionSecrets(sectionName);
134
+ res.json({ section: sectionName, secrets: sectionSecrets });
135
+ }
136
+ catch (error) {
137
+ console.error('Error fetching secrets section:', error);
138
+ res.status(500).json({
139
+ error: 'Failed to fetch secrets section',
140
+ details: error instanceof Error ? error.message : String(error)
141
+ });
142
+ }
143
+ });
144
+ /**
145
+ * PUT /api/stores/secrets/:section - Update secrets section
146
+ */
147
+ router.put('/secrets/:section', (req, res) => {
148
+ try {
149
+ const appRootDir = config_1.config.app.rootDir;
150
+ const sectionName = req.params.section;
151
+ const sectionSecrets = req.body;
152
+ const secretsStore = LocalSecretsStore_1.LocalSecretsStore.getInstance(appRootDir);
153
+ secretsStore.updateSectionSecrets(sectionName, sectionSecrets);
154
+ // Return updated section
155
+ const updatedSection = secretsStore.getSectionSecrets(sectionName);
156
+ res.json({ section: sectionName, secrets: updatedSection });
157
+ }
158
+ catch (error) {
159
+ console.error('Error updating secrets section:', error);
160
+ res.status(500).json({
161
+ error: 'Failed to update secrets section',
162
+ details: error instanceof Error ? error.message : String(error)
163
+ });
164
+ }
165
+ });
166
+ /**
167
+ * GET /api/stores/kv - Get KV store
168
+ */
169
+ router.get('/kv', (req, res) => {
170
+ try {
171
+ const appRootDir = config_1.config.app.rootDir;
172
+ const kvStore = LocalKVStore_1.LocalKVStore.getInstance(appRootDir);
173
+ const kvData = kvStore.getAllData();
174
+ res.json({ kv: kvData });
175
+ }
176
+ catch (error) {
177
+ console.error('Error fetching KV store:', error);
178
+ res.status(500).json({
179
+ error: 'Failed to fetch KV store',
180
+ details: error instanceof Error ? error.message : String(error)
181
+ });
182
+ }
183
+ });
184
+ /**
185
+ * PUT /api/stores/kv/:key - Set KV store value
186
+ */
187
+ router.put('/kv/:key', async (req, res) => {
188
+ try {
189
+ const appRootDir = config_1.config.app.rootDir;
190
+ const key = req.params.key;
191
+ const value = req.body;
192
+ const kvStore = LocalKVStore_1.LocalKVStore.getInstance(appRootDir);
193
+ await kvStore.set(key, value);
194
+ res.json(value);
195
+ }
196
+ catch (error) {
197
+ console.error('Error setting KV store value:', error);
198
+ res.status(500).json({
199
+ error: 'Failed to set KV store value',
200
+ details: error instanceof Error ? error.message : String(error)
201
+ });
202
+ }
203
+ });
204
+ /**
205
+ * DELETE /api/stores/kv/:key - Delete KV store value
206
+ */
207
+ router.delete('/kv/:key', async (req, res) => {
208
+ try {
209
+ const appRootDir = config_1.config.app.rootDir;
210
+ const key = req.params.key;
211
+ const kvStore = LocalKVStore_1.LocalKVStore.getInstance(appRootDir);
212
+ const deleted = await kvStore.deleteKey(key);
213
+ res.json({ key, deleted });
214
+ }
215
+ catch (error) {
216
+ console.error('Error deleting KV store value:', error);
217
+ res.status(500).json({
218
+ error: 'Failed to delete KV store value',
219
+ details: error instanceof Error ? error.message : String(error)
220
+ });
221
+ }
222
+ });
223
+ /**
224
+ * GET /api/stores/shared-kv - Get shared KV store
225
+ */
226
+ router.get('/shared-kv', (req, res) => {
227
+ try {
228
+ const appRootDir = config_1.config.app.rootDir;
229
+ const sharedKvStore = LocalKVStore_1.LocalKVStore.getSharedInstance(appRootDir);
230
+ const sharedKvData = sharedKvStore.getAllData();
231
+ res.json({ sharedKv: sharedKvData });
232
+ }
233
+ catch (error) {
234
+ console.error('Error fetching shared KV store:', error);
235
+ res.status(500).json({
236
+ error: 'Failed to fetch shared KV store',
237
+ details: error instanceof Error ? error.message : String(error)
238
+ });
239
+ }
240
+ });
241
+ /**
242
+ * PUT /api/stores/shared-kv/:key - Set shared KV store value
243
+ */
244
+ router.put('/shared-kv/:key', async (req, res) => {
245
+ try {
246
+ const appRootDir = config_1.config.app.rootDir;
247
+ const key = req.params.key;
248
+ const value = req.body;
249
+ const sharedKvStore = LocalKVStore_1.LocalKVStore.getSharedInstance(appRootDir);
250
+ await sharedKvStore.set(key, value);
251
+ res.json(value);
252
+ }
253
+ catch (error) {
254
+ console.error('Error setting shared KV store value:', error);
255
+ res.status(500).json({
256
+ error: 'Failed to set shared KV store value',
257
+ details: error instanceof Error ? error.message : String(error)
258
+ });
259
+ }
260
+ });
261
+ /**
262
+ * DELETE /api/stores/shared-kv/:key - Delete shared KV store value
263
+ */
264
+ router.delete('/shared-kv/:key', async (req, res) => {
265
+ try {
266
+ const appRootDir = config_1.config.app.rootDir;
267
+ const key = req.params.key;
268
+ const sharedKvStore = LocalKVStore_1.LocalKVStore.getSharedInstance(appRootDir);
269
+ const deleted = await sharedKvStore.deleteKey(key);
270
+ res.json({ key, deleted });
271
+ }
272
+ catch (error) {
273
+ console.error('Error deleting shared KV store value:', error);
274
+ res.status(500).json({
275
+ error: 'Failed to delete shared KV store value',
276
+ details: error instanceof Error ? error.message : String(error)
277
+ });
278
+ }
279
+ });
280
+ /**
281
+ * GET /api/stores/notifications - Get notifications
282
+ */
283
+ router.get('/notifications', (req, res) => {
284
+ try {
285
+ const appRootDir = config_1.config.app.rootDir;
286
+ const notificationStore = LocalNotificationStore_1.LocalNotificationStore.getInstance(appRootDir);
287
+ const notifications = notificationStore.getAllNotifications();
288
+ res.json({ notifications });
289
+ }
290
+ catch (error) {
291
+ console.error('Error fetching notifications:', error);
292
+ res.status(500).json({
293
+ error: 'Failed to fetch notifications',
294
+ details: error instanceof Error ? error.message : String(error)
295
+ });
296
+ }
297
+ });
298
+ /**
299
+ * DELETE /api/stores/notifications - Clear all notifications
300
+ */
301
+ router.delete('/notifications', (req, res) => {
302
+ try {
303
+ const appRootDir = config_1.config.app.rootDir;
304
+ const notificationStore = LocalNotificationStore_1.LocalNotificationStore.getInstance(appRootDir);
305
+ notificationStore.clearNotifications();
306
+ res.json({ success: true });
307
+ }
308
+ catch (error) {
309
+ console.error('Error clearing notifications:', error);
310
+ res.status(500).json({
311
+ error: 'Failed to clear notifications',
312
+ details: error instanceof Error ? error.message : String(error)
313
+ });
314
+ }
315
+ });
316
+ /**
317
+ * DELETE /api/stores/notifications/:id - Delete specific notification
318
+ */
319
+ router.delete('/notifications/:id', (req, res) => {
320
+ try {
321
+ const appRootDir = config_1.config.app.rootDir;
322
+ const notificationId = req.params.id;
323
+ const notificationStore = LocalNotificationStore_1.LocalNotificationStore.getInstance(appRootDir);
324
+ const deleted = notificationStore.deleteNotification(notificationId);
325
+ if (deleted) {
326
+ res.json({ id: notificationId, deleted: true });
327
+ }
328
+ else {
329
+ res.status(404).json({ error: 'Notification not found' });
330
+ }
331
+ }
332
+ catch (error) {
333
+ console.error('Error deleting notification:', error);
334
+ res.status(500).json({
335
+ error: 'Failed to delete notification',
336
+ details: error instanceof Error ? error.message : String(error)
337
+ });
338
+ }
339
+ });
340
+ exports.default = router;
341
+ //# sourceMappingURL=stores.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stores.js","sourceRoot":"","sources":["../../../../src/server/api/stores.ts"],"names":[],"mappings":";;AAAA,qCAAoD;AACpD,sFAAmF;AACnF,oFAAiF;AACjF,0EAAuE;AACvE,8FAA2F;AAC3F,sCAAmC;AAEnC,MAAM,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;AA6CxB;;GAEG;AACH,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAY,EAAE,GAAa,EAAE,EAAE;IAC9C,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,eAAM,CAAC,GAAG,CAAC,OAAO,CAAC;QAEtC,kFAAkF;QAClF,MAAM,aAAa,GAAG,uCAAkB,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QACjE,MAAM,oBAAoB,GAAG,aAAa,CAAC,0BAA0B,EAAE,CAAC;QAExE,mBAAmB;QACnB,MAAM,YAAY,GAAG,qCAAiB,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAC/D,MAAM,WAAW,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC;QAE9C,oBAAoB;QACpB,MAAM,OAAO,GAAG,2BAAY,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QACrD,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QAEpC,2BAA2B;QAC3B,MAAM,aAAa,GAAG,2BAAY,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;QACjE,MAAM,YAAY,GAAG,aAAa,CAAC,UAAU,EAAE,CAAC;QAEhD,yBAAyB;QACzB,MAAM,iBAAiB,GAAG,+CAAsB,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QACzE,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,mBAAmB,EAAE,CAAC;QAElE,MAAM,QAAQ,GAAwB;YACp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CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;QACrD,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;YACnB,KAAK,EAAE,+BAA+B;YACtC,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;SAChE,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,kBAAe,MAAM,CAAC"}
@@ -0,0 +1,10 @@
1
+ import express from 'express';
2
+ import { App } from '../../types/app';
3
+ import { AppWatcher } from '../../executor/watcher';
4
+ import { LocalConfigStore } from "../../local_engine/storage/LocalConfigStore";
5
+ import { LocalSettingsStore } from "../../local_engine/storage/LocalSettingsStore";
6
+ import { LifecycleExecutor } from '../../executor/LifecycleExecutor';
7
+ /**
8
+ * Create v1 API routes matching the REST API documentation
9
+ */
10
+ export declare function createV1Routes(app: App, watcher: AppWatcher, configStore: LocalConfigStore, lifecycleExecutor: LifecycleExecutor, settingsStore: LocalSettingsStore): express.Router;