@corva/create-app 0.0.0-73c49372

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 (193) hide show
  1. package/README.md +211 -0
  2. package/bin/cca.js +5 -0
  3. package/bin/create-corva-app.cjs +30 -0
  4. package/common/node/.env +15 -0
  5. package/common/node/.env.sample +26 -0
  6. package/common/node/gitignore +130 -0
  7. package/common/package.json +3 -0
  8. package/common/python/.env +5 -0
  9. package/common/python/.env.sample +7 -0
  10. package/common/python/Makefile +15 -0
  11. package/common/python/gitignore +161 -0
  12. package/common/python/requirements.txt +2 -0
  13. package/lib/commands/attach.js +28 -0
  14. package/lib/commands/create.js +463 -0
  15. package/lib/commands/release.js +52 -0
  16. package/lib/commands/rerun.js +34 -0
  17. package/lib/commands/zip.js +39 -0
  18. package/lib/constants/cache.js +5 -0
  19. package/lib/constants/cli.js +24 -0
  20. package/lib/constants/manifest.js +262 -0
  21. package/lib/constants/messages.js +15 -0
  22. package/lib/constants/package.js +269 -0
  23. package/lib/flow.js +53 -0
  24. package/lib/flows/attach.js +8 -0
  25. package/lib/flows/lib/api.js +376 -0
  26. package/lib/flows/lib/create-zip-archive.js +83 -0
  27. package/lib/flows/lib/json.js +30 -0
  28. package/lib/flows/lib/manifest.js +81 -0
  29. package/lib/flows/lib/notification.js +142 -0
  30. package/lib/flows/lib/step-error.js +10 -0
  31. package/lib/flows/lib/waitForMs.js +3 -0
  32. package/lib/flows/prepare.js +6 -0
  33. package/lib/flows/release.js +26 -0
  34. package/lib/flows/rerun.js +8 -0
  35. package/lib/flows/steps/attach/add-app-to-stream.js +23 -0
  36. package/lib/flows/steps/attach/get-all-live-assets.js +135 -0
  37. package/lib/flows/steps/attach/index.js +5 -0
  38. package/lib/flows/steps/attach/prepare-data.js +19 -0
  39. package/lib/flows/steps/prepare-load-app-files.js +12 -0
  40. package/lib/flows/steps/release/add-label.js +10 -0
  41. package/lib/flows/steps/release/add-notes.js +10 -0
  42. package/lib/flows/steps/release/get-config.js +41 -0
  43. package/lib/flows/steps/release/prepare-data.js +12 -0
  44. package/lib/flows/steps/release/publish.js +11 -0
  45. package/lib/flows/steps/release/remove-failed-upload.js +21 -0
  46. package/lib/flows/steps/release/upload-zip-to-corva.js +62 -0
  47. package/lib/flows/steps/release/wait-for-build.js +36 -0
  48. package/lib/flows/steps/rerun/create-task.js +77 -0
  49. package/lib/flows/steps/rerun/ensure-that-app-in-stream.js +68 -0
  50. package/lib/flows/steps/rerun/get-app-version.js +111 -0
  51. package/lib/flows/steps/rerun/prepare-data.js +162 -0
  52. package/lib/flows/steps/rerun/prepare-well-and-stream-data.js +188 -0
  53. package/lib/flows/steps/rerun/rerun.js +13 -0
  54. package/lib/flows/steps/zip-cleanup.js +17 -0
  55. package/lib/flows/steps/zip-create-archive.js +15 -0
  56. package/lib/flows/steps/zip-file-list-resolve.js +260 -0
  57. package/lib/flows/steps/zip-prepare.js +20 -0
  58. package/lib/flows/steps/zip.js +6 -0
  59. package/lib/flows/zip-simple.js +6 -0
  60. package/lib/flows/zip.js +7 -0
  61. package/lib/helpers/cli-version.js +114 -0
  62. package/lib/helpers/commands.js +13 -0
  63. package/lib/helpers/logger.js +35 -0
  64. package/lib/helpers/manifest.js +74 -0
  65. package/lib/helpers/resolve-app-runtime.js +128 -0
  66. package/lib/helpers/utils.js +91 -0
  67. package/lib/helpers/versioning.js +94 -0
  68. package/lib/main.js +68 -0
  69. package/lib/options/api-key.js +6 -0
  70. package/lib/options/app-key.js +6 -0
  71. package/lib/options/app-version.js +3 -0
  72. package/lib/options/bump-version.js +19 -0
  73. package/lib/options/cache.js +11 -0
  74. package/lib/options/env.js +3 -0
  75. package/lib/options/original-cwd.js +3 -0
  76. package/lib/options/silent.js +3 -0
  77. package/package.json +104 -0
  78. package/template_extensions/corva/.commitlintrc.json +6 -0
  79. package/template_extensions/corva/.github/pull_request_template.md +14 -0
  80. package/template_extensions/corva/.github/workflows/code-checks.yml +15 -0
  81. package/template_extensions/corva/.github/workflows/develop.yml +17 -0
  82. package/template_extensions/corva/.github/workflows/feat-fix-delete.yml +14 -0
  83. package/template_extensions/corva/.github/workflows/feat-fix.yml +23 -0
  84. package/template_extensions/corva/.github/workflows/release-fix-X.X.X.yml +16 -0
  85. package/template_extensions/corva/.github/workflows/validate-pr-title.yml +19 -0
  86. package/template_extensions/corva/.husky/commit-msg +5 -0
  87. package/template_extensions/corva/.husky/pre-commit +4 -0
  88. package/templates/scheduler_data-time/javascript/README.md +19 -0
  89. package/templates/scheduler_data-time/javascript/__tests__/processor.spec.js +15 -0
  90. package/templates/scheduler_data-time/javascript/index.js +15 -0
  91. package/templates/scheduler_data-time/python/README.md +31 -0
  92. package/templates/scheduler_data-time/python/lambda_function.py +7 -0
  93. package/templates/scheduler_data-time/python/test/__init__.py +0 -0
  94. package/templates/scheduler_data-time/python/test/app_test.py +10 -0
  95. package/templates/scheduler_data-time/typescript/README.md +25 -0
  96. package/templates/scheduler_data-time/typescript/__tests__/processor.spec.ts +15 -0
  97. package/templates/scheduler_data-time/typescript/index.ts +8 -0
  98. package/templates/scheduler_depth/javascript/README.md +19 -0
  99. package/templates/scheduler_depth/javascript/__tests__/processor.spec.js +17 -0
  100. package/templates/scheduler_depth/javascript/index.js +15 -0
  101. package/templates/scheduler_depth/python/README.md +31 -0
  102. package/templates/scheduler_depth/python/lambda_function.py +7 -0
  103. package/templates/scheduler_depth/python/test/__init__.py +0 -0
  104. package/templates/scheduler_depth/python/test/app_test.py +10 -0
  105. package/templates/scheduler_depth/typescript/README.md +25 -0
  106. package/templates/scheduler_depth/typescript/__tests__/processor.spec.ts +17 -0
  107. package/templates/scheduler_depth/typescript/index.ts +8 -0
  108. package/templates/scheduler_natural-time/javascript/README.md +19 -0
  109. package/templates/scheduler_natural-time/javascript/__tests__/processor.spec.js +15 -0
  110. package/templates/scheduler_natural-time/javascript/index.js +15 -0
  111. package/templates/scheduler_natural-time/python/README.md +31 -0
  112. package/templates/scheduler_natural-time/python/lambda_function.py +7 -0
  113. package/templates/scheduler_natural-time/python/test/__init__.py +0 -0
  114. package/templates/scheduler_natural-time/python/test/app_test.py +10 -0
  115. package/templates/scheduler_natural-time/typescript/README.md +25 -0
  116. package/templates/scheduler_natural-time/typescript/__tests__/processor.spec.ts +15 -0
  117. package/templates/scheduler_natural-time/typescript/index.ts +8 -0
  118. package/templates/stream_depth/javascript/README.md +19 -0
  119. package/templates/stream_depth/javascript/__tests__/processor.spec.js +20 -0
  120. package/templates/stream_depth/javascript/index.js +14 -0
  121. package/templates/stream_depth/python/README.md +31 -0
  122. package/templates/stream_depth/python/lambda_function.py +7 -0
  123. package/templates/stream_depth/python/test/__init__.py +0 -0
  124. package/templates/stream_depth/python/test/app_test.py +16 -0
  125. package/templates/stream_depth/typescript/README.md +25 -0
  126. package/templates/stream_depth/typescript/__tests__/processor.spec.ts +20 -0
  127. package/templates/stream_depth/typescript/index.ts +8 -0
  128. package/templates/stream_time/javascript/README.md +19 -0
  129. package/templates/stream_time/javascript/__tests__/processor.spec.js +14 -0
  130. package/templates/stream_time/javascript/index.js +14 -0
  131. package/templates/stream_time/python/README.md +31 -0
  132. package/templates/stream_time/python/lambda_function.py +7 -0
  133. package/templates/stream_time/python/test/__init__.py +0 -0
  134. package/templates/stream_time/python/test/app_test.py +16 -0
  135. package/templates/stream_time/typescript/README.md +25 -0
  136. package/templates/stream_time/typescript/__tests__/processor.spec.ts +14 -0
  137. package/templates/stream_time/typescript/index.ts +8 -0
  138. package/templates/task/javascript/README.md +19 -0
  139. package/templates/task/javascript/__tests__/processor.spec.js +16 -0
  140. package/templates/task/javascript/index.js +15 -0
  141. package/templates/task/python/README.md +31 -0
  142. package/templates/task/python/lambda_function.py +7 -0
  143. package/templates/task/python/test/__init__.py +0 -0
  144. package/templates/task/python/test/app_test.py +8 -0
  145. package/templates/task/typescript/README.md +25 -0
  146. package/templates/task/typescript/__tests__/processor.spec.ts +16 -0
  147. package/templates/task/typescript/index.ts +8 -0
  148. package/templates/ui/javascript/.eslintrc +11 -0
  149. package/templates/ui/javascript/.prettierrc +1 -0
  150. package/templates/ui/javascript/README.md +31 -0
  151. package/templates/ui/javascript/config/jest/babelTransform.js +16 -0
  152. package/templates/ui/javascript/config/jest/cssTransform.js +16 -0
  153. package/templates/ui/javascript/config/jest/fileTransform.js +48 -0
  154. package/templates/ui/javascript/config/jest/globalSetup.js +5 -0
  155. package/templates/ui/javascript/config/jest/setupTests.js +11 -0
  156. package/templates/ui/javascript/config-overrides.js +10 -0
  157. package/templates/ui/javascript/gitignore +27 -0
  158. package/templates/ui/javascript/src/App.completion.js +64 -0
  159. package/templates/ui/javascript/src/App.css +30 -0
  160. package/templates/ui/javascript/src/App.drilling.js +58 -0
  161. package/templates/ui/javascript/src/AppSettings.js +42 -0
  162. package/templates/ui/javascript/src/__mocks__/mockAppProps.js +590 -0
  163. package/templates/ui/javascript/src/__mocks__/mockAppSettingsProps.js +290 -0
  164. package/templates/ui/javascript/src/__tests__/App.test.js +21 -0
  165. package/templates/ui/javascript/src/__tests__/AppSettings.test.js +21 -0
  166. package/templates/ui/javascript/src/__tests__/TestsExample.test.js +37 -0
  167. package/templates/ui/javascript/src/assets/logo.svg +7 -0
  168. package/templates/ui/javascript/src/constants.js +3 -0
  169. package/templates/ui/javascript/src/index.js +7 -0
  170. package/templates/ui/typescript/.eslintrc +28 -0
  171. package/templates/ui/typescript/.prettierrc +1 -0
  172. package/templates/ui/typescript/README.md +31 -0
  173. package/templates/ui/typescript/config/jest/babelTransform.js +16 -0
  174. package/templates/ui/typescript/config/jest/cssTransform.js +16 -0
  175. package/templates/ui/typescript/config/jest/fileTransform.js +48 -0
  176. package/templates/ui/typescript/config/jest/globalSetup.js +5 -0
  177. package/templates/ui/typescript/config/jest/setupTests.js +11 -0
  178. package/templates/ui/typescript/config-overrides.js +10 -0
  179. package/templates/ui/typescript/gitignore +27 -0
  180. package/templates/ui/typescript/src/App.completion.tsx +66 -0
  181. package/templates/ui/typescript/src/App.css +30 -0
  182. package/templates/ui/typescript/src/App.drilling.tsx +60 -0
  183. package/templates/ui/typescript/src/AppSettings.tsx +38 -0
  184. package/templates/ui/typescript/src/__mocks__/mockAppProps.ts +590 -0
  185. package/templates/ui/typescript/src/__mocks__/mockAppSettingsProps.ts +290 -0
  186. package/templates/ui/typescript/src/__tests__/App.test.tsx +21 -0
  187. package/templates/ui/typescript/src/__tests__/AppSettings.test.tsx +21 -0
  188. package/templates/ui/typescript/src/__tests__/TestsExample.test.tsx +37 -0
  189. package/templates/ui/typescript/src/assets/logo.svg +7 -0
  190. package/templates/ui/typescript/src/constants.ts +3 -0
  191. package/templates/ui/typescript/src/custom.d.ts +9 -0
  192. package/templates/ui/typescript/src/index.js +7 -0
  193. package/templates/ui/typescript/tsconfig.json +8 -0
@@ -0,0 +1,590 @@
1
+ /**
2
+ * This is a real example of the props that'll come
3
+ * to the App component. You'll need to manually update it
4
+ * if in the future some new properties are added
5
+ */
6
+
7
+ export const mockAppProps = {
8
+ onSettingChange: jest.fn(),
9
+ onSettingsChange: jest.fn(),
10
+ setIsFullscreenModalMode: jest.fn(),
11
+ setIsMaximized: jest.fn(),
12
+ setMainMenuItems: jest.fn(),
13
+ setSecondaryMenuItems: jest.fn(),
14
+ isExampleCheckboxChecked: true,
15
+ app: {
16
+ id: -1,
17
+ app: {
18
+ app_key: 'corva.app_key.ui',
19
+ platform: 'dev_center',
20
+ },
21
+ settings: {
22
+ package: '0.1.0',
23
+ rigId: 1,
24
+ wellId: 2,
25
+ isExampleCheckboxChecked: true,
26
+ },
27
+ package: {
28
+ manifest: {
29
+ format: 1,
30
+ license: {
31
+ type: 'MIT',
32
+ url: 'https://www.oandgexample.com/license/',
33
+ },
34
+ developer: {
35
+ name: 'company name',
36
+ identifier: 'companyIdentifier',
37
+ authors: [],
38
+ },
39
+ application: {
40
+ type: 'ui',
41
+ key: 'corva.app_key.ui',
42
+ visibility: 'private',
43
+ name: 'dc app name',
44
+ description: 'This is the description of my app. You can do great things with it!',
45
+ summary: 'More information about this app goes here',
46
+ category: 'analytics',
47
+ website: 'https://www.oandgexample.com/my-app/',
48
+ segments: ['drilling', 'completion'],
49
+ ui: {
50
+ initial_size: {
51
+ w: 4,
52
+ h: 10,
53
+ },
54
+ },
55
+ },
56
+ settings: {
57
+ entrypoint: {
58
+ file: 'src/index.js',
59
+ function: 'handler',
60
+ },
61
+ environment: {},
62
+ runtime: 'ui',
63
+ app: {
64
+ scheduler_type: 1,
65
+ cron_string: '*/5 * * * *',
66
+ },
67
+ },
68
+ datasets: {},
69
+ },
70
+ build: 'corva.app_key.ui-0.1.0',
71
+ version: '0.1.0',
72
+ },
73
+ },
74
+ package: '0.1.0',
75
+ rigId: 1,
76
+ wellId: 2,
77
+ well: {
78
+ name: 'well name 1',
79
+ settings: {
80
+ basin: 'Delaware',
81
+ county: 'Pecos',
82
+ timezone: 'America/Chicago',
83
+ top_hole: {
84
+ raw: '50.000000,-102.000000',
85
+ coordinates: [50.0, -102.0],
86
+ },
87
+ api_number: '11-222-33333',
88
+ bottom_hole: {},
89
+ mud_company: 'MudCompanyName',
90
+ spud_release: [
91
+ {
92
+ id: '1111111111-2222-aaaa-bbbb-3333333333',
93
+ spud: '01/08/2023 00:46',
94
+ rig_up: '01/08/2023 00:10',
95
+ release: '',
96
+ },
97
+ ],
98
+ string_design: '5',
99
+ contractor_name: 'Unit Drilling',
100
+ target_formation: 'Woodford',
101
+ last_mongo_refresh: '2023-02-23T16:52:58.462Z',
102
+ rig_classification: 'land',
103
+ directional_driller: 'Directional Driller',
104
+ drilling_afe_number: 'AB12345',
105
+ day_shift_start_time: '06:00',
106
+ off_bottom_tolerance: 1,
107
+ target_formation_standard: 'Woodford',
108
+ completion_day_shift_start_time: '06:00',
109
+ associations_last_active_at_updated_at: '2023-02-23T16:52:50.000Z',
110
+ },
111
+ asset_id: 12345678,
112
+ last_active_at: '2023-02-23T16:52:57.000Z',
113
+ id: '2',
114
+ companyId: '1',
115
+ },
116
+ rig: {
117
+ name: 'Some Test Rig Name',
118
+ id: '1',
119
+ asset_id: 9999999,
120
+ },
121
+ coordinates: {
122
+ w: 4,
123
+ h: 10,
124
+ x: 0,
125
+ y: 0,
126
+ pixelHeight: 390,
127
+ pixelWidth: 460,
128
+ },
129
+ currentUser: {
130
+ id: 1,
131
+ company_id: 2,
132
+ first_name: 'John',
133
+ last_name: 'Doe',
134
+ email: 'john.doe@corva.ai',
135
+ mobile: '',
136
+ created_at: '2020-11-03T08:42:53.161Z',
137
+ terms_acceptance_at: '2021-10-20T13:28:1.385Z',
138
+ profile_photo: null,
139
+ recently_viewed_asset_ids: [1],
140
+ unit_system: null,
141
+ role: 'developeradmin',
142
+ title: null,
143
+ group: null,
144
+ favorite_asset_id: null,
145
+ current_segment: null,
146
+ theme: 'dark',
147
+ messaging_id: '1',
148
+ restricted_assets: [],
149
+ restricted_programs: [],
150
+ settings: {
151
+ favorites: {},
152
+ sms_blacklisted: false,
153
+ restricted_assets: [],
154
+ restricted_programs: [],
155
+ participates_in_beta_apps: false,
156
+ last_new_dashboard_shares_check: '2021-11-24T18:57:13.679Z',
157
+ },
158
+ last_sign_in_at: '2023-02-23T10:19:06.349Z',
159
+ locked_access: false,
160
+ unit_ids: [],
161
+ intercom_admin_id: null,
162
+ resource: [],
163
+ intercom_user_hash: 'intercomUserHash',
164
+ profile_groups: [],
165
+ preference: {
166
+ id: 5,
167
+ user: {
168
+ id: 1,
169
+ company_id: 2,
170
+ first_name: 'John',
171
+ last_name: 'Doe',
172
+ email: 'oleksandr.krupko@corva.ai',
173
+ role: 'developeradmin',
174
+ created_at: '2020-11-03T08:42:53.161Z',
175
+ updated_at: '2023-02-23T12:26:46.835Z',
176
+ recently_viewed_asset_ids: [1],
177
+ unit_system: null,
178
+ mobile: '',
179
+ terms_acceptance_at: '2021-10-20T13:28:1.385Z',
180
+ messaging_id: '1',
181
+ settings: {
182
+ favorites: {},
183
+ sms_blacklisted: false,
184
+ restricted_assets: [],
185
+ restricted_programs: [],
186
+ participates_in_beta_apps: false,
187
+ last_new_dashboard_shares_check: '2021-11-24T18:57:13.679Z',
188
+ },
189
+ theme: 'dark',
190
+ title: null,
191
+ group: null,
192
+ profile_photo: null,
193
+ favorite_asset_id: null,
194
+ current_segment: null,
195
+ state: 'active',
196
+ created_by: null,
197
+ provisioner: 'internal',
198
+ intercom_admin_id: null,
199
+ resource: [],
200
+ },
201
+ push_notifications_enabled: true,
202
+ emails_enabled: true,
203
+ sms_enabled: true,
204
+ alert_levels: ['info', 'warning', 'critical'],
205
+ play_alerts_sound: true,
206
+ show_intercom_icon: true,
207
+ segment: ['drilling', 'completion'],
208
+ disable_create_dashboard: false,
209
+ disable_costs: false,
210
+ disable_documents: false,
211
+ realtime_operation_mode: false,
212
+ disable_file_upload: false,
213
+ stay_on_app_store: false,
214
+ },
215
+ company: {
216
+ id: 2,
217
+ name: 'Corva',
218
+ time_zone: 'America/Chicago',
219
+ language: 'en',
220
+ provider: 'corva',
221
+ unit_system: {
222
+ yp: 'hsf',
223
+ oil: 'bbl',
224
+ area: 'ft2',
225
+ mass: 'lb',
226
+ time: 'min',
227
+ angle: 'deg',
228
+ force: 'klbf',
229
+ power: 'hp',
230
+ speed: 'ft/min',
231
+ length: 'm',
232
+ system: 'imperial',
233
+ torque: 'ft-klbf',
234
+ volume: 'gal',
235
+ current: 'mA',
236
+ density: 'ppg',
237
+ gravity: 'g',
238
+ voltage: 'mV',
239
+ porosity: 'pu',
240
+ pressure: 'psi',
241
+ velocity: 'ft/min',
242
+ gasVolume: 'Mscf',
243
+ gravityRMS: 'gRMS',
244
+ msePressure: 'ksi',
245
+ oilFlowRate: 'bbl/min',
246
+ resistivity: 'ohmm',
247
+ shortLength: 'in',
248
+ temperature: 'F',
249
+ massFlowRate: 'lb/min',
250
+ permiability: 'md',
251
+ concentration: 'ppm',
252
+ fluidVelocity: 'ft/min',
253
+ massPerLength: 'lb-ft',
254
+ anglePerLength: 'dp100f',
255
+ lengthPerAngle: 'in/rev',
256
+ volumeFlowRate: 'gal/min',
257
+ angularVelocity: 'rpm',
258
+ inversePressure: 'i-psi',
259
+ acousticSlowness: 'us/ft',
260
+ formationDensity: 'g/l',
261
+ gasConcentration: 'Units (0-5000u)',
262
+ pressureGradient: 'psi/ft',
263
+ massConcentration: 'lb/gal',
264
+ revolutionPerVolume: 'rpg',
265
+ spontaneousPotential: 'mV',
266
+ chemMassConcentration: 'lb/Mgal',
267
+ chemVolumeConcentration: 'gal/Mgal',
268
+ },
269
+ dev_center_enabled: true,
270
+ workflows_enabled: true,
271
+ with_subscription: false,
272
+ competitor_analysis_enabled: true,
273
+ },
274
+ groups: [
275
+ {
276
+ id: 5,
277
+ name: 'developeradmin',
278
+ company_id: 2,
279
+ },
280
+ {
281
+ id: 9,
282
+ name: 'corvaadmin',
283
+ company_id: 2,
284
+ },
285
+ ],
286
+ },
287
+ devCenterRouter: {
288
+ location: {
289
+ pathname: '/app',
290
+ query: {},
291
+ },
292
+ },
293
+ appHeaderProps: {
294
+ app: {
295
+ id: -1,
296
+ app: {
297
+ app_key: 'corva.app_key.ui',
298
+ platform: 'dev_center',
299
+ },
300
+ settings: {
301
+ package: '0.1.0',
302
+ rigId: 1,
303
+ wellId: 2,
304
+ isExampleCheckboxChecked: true,
305
+ },
306
+ package: {
307
+ manifest: {
308
+ format: 1,
309
+ license: {
310
+ type: 'MIT',
311
+ url: 'https://www.oandgexample.com/license/',
312
+ },
313
+ developer: {
314
+ name: 'company name',
315
+ identifier: 'companyIdentifier',
316
+ authors: [],
317
+ },
318
+ application: {
319
+ type: 'ui',
320
+ key: 'corva.app_key.ui',
321
+ visibility: 'private',
322
+ name: 'dc app name',
323
+ description: 'This is the description of my app. You can do great things with it!',
324
+ summary: 'More information about this app goes here',
325
+ category: 'analytics',
326
+ website: 'https://www.oandgexample.com/my-app/',
327
+ segments: ['drilling', 'completion'],
328
+ ui: {
329
+ initial_size: {
330
+ w: 4,
331
+ h: 10,
332
+ },
333
+ },
334
+ },
335
+ settings: {
336
+ entrypoint: {
337
+ file: 'src/index.js',
338
+ function: 'handler',
339
+ },
340
+ environment: {},
341
+ runtime: 'ui',
342
+ app: {
343
+ scheduler_type: 1,
344
+ cron_string: '*/5 * * * *',
345
+ },
346
+ },
347
+ datasets: {},
348
+ },
349
+ build: 'corva.app_key.ui-0.1.0',
350
+ version: '0.1.0',
351
+ },
352
+ },
353
+ appLastAnnotation: null,
354
+ appSettings: {
355
+ package: '0.1.0',
356
+ rigId: 1,
357
+ wellId: 2,
358
+ },
359
+ coordinates: {
360
+ w: 4,
361
+ h: 10,
362
+ x: 0,
363
+ y: 0,
364
+ pixelHeight: 390,
365
+ pixelWidth: 460,
366
+ },
367
+ currentUser: {
368
+ id: 1,
369
+ company_id: 2,
370
+ first_name: 'John',
371
+ last_name: 'Doe',
372
+ email: 'oleksandr.krupko@corva.ai',
373
+ mobile: '',
374
+ created_at: '2020-11-03T08:42:53.161Z',
375
+ terms_acceptance_at: '2021-10-20T13:28:1.385Z',
376
+ profile_photo: null,
377
+ recently_viewed_asset_ids: [1],
378
+ unit_system: null,
379
+ role: 'developeradmin',
380
+ title: null,
381
+ group: null,
382
+ favorite_asset_id: null,
383
+ current_segment: null,
384
+ theme: 'dark',
385
+ messaging_id: '1',
386
+ restricted_assets: [],
387
+ restricted_programs: [],
388
+ settings: {
389
+ favorites: {},
390
+ sms_blacklisted: false,
391
+ restricted_assets: [],
392
+ restricted_programs: [],
393
+ participates_in_beta_apps: false,
394
+ last_new_dashboard_shares_check: '2021-11-24T18:57:13.679Z',
395
+ },
396
+ last_sign_in_at: '2023-02-23T10:19:06.349Z',
397
+ locked_access: false,
398
+ unit_ids: [],
399
+ intercom_admin_id: null,
400
+ resource: [],
401
+ intercom_user_hash: 'intercomUserHash',
402
+ profile_groups: [],
403
+ preference: {
404
+ id: 5,
405
+ user: {
406
+ id: 1,
407
+ company_id: 2,
408
+ first_name: 'John',
409
+ last_name: 'Doe',
410
+ email: 'oleksandr.krupko@corva.ai',
411
+ role: 'developeradmin',
412
+ created_at: '2020-11-03T08:42:53.161Z',
413
+ updated_at: '2023-02-23T12:26:46.835Z',
414
+ recently_viewed_asset_ids: [1],
415
+ unit_system: null,
416
+ mobile: '',
417
+ terms_acceptance_at: '2021-10-20T13:28:1.385Z',
418
+ messaging_id: '1',
419
+ settings: {
420
+ favorites: {},
421
+ sms_blacklisted: false,
422
+ restricted_assets: [],
423
+ restricted_programs: [],
424
+ participates_in_beta_apps: false,
425
+ last_new_dashboard_shares_check: '2021-11-24T18:57:13.679Z',
426
+ },
427
+ theme: 'dark',
428
+ title: null,
429
+ group: null,
430
+ profile_photo: null,
431
+ favorite_asset_id: null,
432
+ current_segment: null,
433
+ state: 'active',
434
+ created_by: null,
435
+ provisioner: 'internal',
436
+ intercom_admin_id: null,
437
+ resource: [],
438
+ },
439
+ push_notifications_enabled: true,
440
+ emails_enabled: true,
441
+ sms_enabled: true,
442
+ alert_levels: ['info', 'warning', 'critical'],
443
+ play_alerts_sound: true,
444
+ show_intercom_icon: true,
445
+ segment: ['drilling', 'completion'],
446
+ disable_create_dashboard: false,
447
+ disable_costs: false,
448
+ disable_documents: false,
449
+ realtime_operation_mode: false,
450
+ disable_file_upload: false,
451
+ stay_on_app_store: false,
452
+ },
453
+ company: {
454
+ id: 2,
455
+ name: 'Corva',
456
+ time_zone: 'America/Chicago',
457
+ language: 'en',
458
+ provider: 'corva',
459
+ unit_system: {
460
+ yp: 'hsf',
461
+ oil: 'bbl',
462
+ area: 'ft2',
463
+ mass: 'lb',
464
+ time: 'min',
465
+ angle: 'deg',
466
+ force: 'klbf',
467
+ power: 'hp',
468
+ speed: 'ft/min',
469
+ length: 'm',
470
+ system: 'imperial',
471
+ torque: 'ft-klbf',
472
+ volume: 'gal',
473
+ current: 'mA',
474
+ density: 'ppg',
475
+ gravity: 'g',
476
+ voltage: 'mV',
477
+ porosity: 'pu',
478
+ pressure: 'psi',
479
+ velocity: 'ft/min',
480
+ gasVolume: 'Mscf',
481
+ gravityRMS: 'gRMS',
482
+ msePressure: 'ksi',
483
+ oilFlowRate: 'bbl/min',
484
+ resistivity: 'ohmm',
485
+ shortLength: 'in',
486
+ temperature: 'F',
487
+ massFlowRate: 'lb/min',
488
+ permiability: 'md',
489
+ concentration: 'ppm',
490
+ fluidVelocity: 'ft/min',
491
+ massPerLength: 'lb-ft',
492
+ anglePerLength: 'dp100f',
493
+ lengthPerAngle: 'in/rev',
494
+ volumeFlowRate: 'gal/min',
495
+ angularVelocity: 'rpm',
496
+ inversePressure: 'i-psi',
497
+ acousticSlowness: 'us/ft',
498
+ formationDensity: 'g/l',
499
+ gasConcentration: 'Units (0-5000u)',
500
+ pressureGradient: 'psi/ft',
501
+ massConcentration: 'lb/gal',
502
+ revolutionPerVolume: 'rpg',
503
+ spontaneousPotential: 'mV',
504
+ chemMassConcentration: 'lb/Mgal',
505
+ chemVolumeConcentration: 'gal/Mgal',
506
+ },
507
+ dev_center_enabled: true,
508
+ workflows_enabled: true,
509
+ with_subscription: false,
510
+ competitor_analysis_enabled: true,
511
+ },
512
+ groups: [
513
+ {
514
+ id: 5,
515
+ name: 'developeradmin',
516
+ company_id: 2,
517
+ },
518
+ {
519
+ id: 9,
520
+ name: 'corvaadmin',
521
+ company_id: 2,
522
+ },
523
+ ],
524
+ },
525
+ isMaximized: false,
526
+ layoutEnvironment: {
527
+ type: 'general',
528
+ pdfReportMode: false,
529
+ },
530
+ well: {
531
+ name: 'well name 1',
532
+ settings: {
533
+ basin: 'Delaware',
534
+ county: 'Pecos',
535
+ timezone: 'America/Chicago',
536
+ top_hole: {
537
+ raw: '50.000000,-102.000000',
538
+ coordinates: [50.0, -102.0],
539
+ },
540
+ api_number: '11-222-33333',
541
+ bottom_hole: {},
542
+ mud_company: 'MudCompanyName',
543
+ spud_release: [
544
+ {
545
+ id: '1111111111-2222-aaaa-bbbb-3333333333',
546
+ spud: '01/08/2023 00:46',
547
+ rig_up: '01/08/2023 00:10',
548
+ release: '',
549
+ },
550
+ ],
551
+ string_design: '5',
552
+ contractor_name: 'Unit Drilling',
553
+ target_formation: 'Woodford',
554
+ last_mongo_refresh: '2023-02-23T16:52:58.462Z',
555
+ rig_classification: 'land',
556
+ directional_driller: 'Directional Driller',
557
+ drilling_afe_number: 'AB12345',
558
+ day_shift_start_time: '06:00',
559
+ off_bottom_tolerance: 1,
560
+ target_formation_standard: 'Woodford',
561
+ completion_day_shift_start_time: '06:00',
562
+ associations_last_active_at_updated_at: '2023-02-23T16:52:50.000Z',
563
+ },
564
+ asset_id: 12345678,
565
+ last_active_at: '2023-02-23T16:52:57.000Z',
566
+ id: '2',
567
+ companyId: '1',
568
+ },
569
+ rig: {
570
+ name: 'Some Test Rig Name',
571
+ id: '1',
572
+ asset_id: 9999999,
573
+ },
574
+ },
575
+ isNative: false,
576
+ layoutEnvironment: {
577
+ type: 'general',
578
+ pdfReportMode: false,
579
+ },
580
+ // Completion segment app props
581
+ fracFleet: {
582
+ current_pad_id: 101,
583
+ id: 1002,
584
+ name: 'Magic Frac Fleet',
585
+ },
586
+ wells: [
587
+ { id: 1, name: 'Well 1' },
588
+ { id: 2, name: 'Well 2' },
589
+ ],
590
+ };