openc3 5.19.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -7
  3. data/bin/openc3cli +12 -120
  4. data/bin/pipinstall +5 -3
  5. data/data/config/command_modifiers.yaml +17 -1
  6. data/data/config/interface_modifiers.yaml +21 -4
  7. data/data/config/item_modifiers.yaml +1 -1
  8. data/data/config/microservice.yaml +15 -2
  9. data/data/config/param_item_modifiers.yaml +1 -1
  10. data/data/config/parameter_modifiers.yaml +1 -1
  11. data/data/config/table_manager.yaml +2 -2
  12. data/data/config/target.yaml +11 -0
  13. data/data/config/telemetry_modifiers.yaml +17 -1
  14. data/data/config/tool.yaml +12 -0
  15. data/data/config/widgets.yaml +41 -17
  16. data/ext/openc3/ext/packet/packet.c +3 -0
  17. data/lib/openc3/accessors/form_accessor.rb +4 -3
  18. data/lib/openc3/accessors/html_accessor.rb +3 -3
  19. data/lib/openc3/accessors/http_accessor.rb +13 -13
  20. data/lib/openc3/accessors/xml_accessor.rb +16 -4
  21. data/lib/openc3/api/cmd_api.rb +4 -5
  22. data/lib/openc3/api/limits_api.rb +3 -3
  23. data/lib/openc3/api/target_api.rb +0 -30
  24. data/lib/openc3/api/tlm_api.rb +2 -1
  25. data/lib/openc3/bridge/bridge_config.rb +1 -2
  26. data/lib/openc3/ccsds/ccsds_parser.rb +12 -8
  27. data/lib/openc3/config/config_parser.rb +10 -3
  28. data/lib/openc3/conversions/bit_reverse_conversion.rb +1 -0
  29. data/lib/openc3/conversions/conversion.rb +5 -1
  30. data/lib/openc3/conversions/generic_conversion.rb +3 -8
  31. data/lib/openc3/conversions/object_read_conversion.rb +1 -8
  32. data/lib/openc3/conversions/polynomial_conversion.rb +3 -8
  33. data/lib/openc3/conversions/processor_conversion.rb +13 -11
  34. data/lib/openc3/conversions/segmented_polynomial_conversion.rb +3 -11
  35. data/lib/openc3/conversions/unix_time_conversion.rb +4 -7
  36. data/lib/openc3/conversions/unix_time_formatted_conversion.rb +4 -3
  37. data/lib/openc3/conversions/unix_time_seconds_conversion.rb +4 -3
  38. data/lib/openc3/core_ext/array.rb +0 -16
  39. data/lib/openc3/core_ext.rb +0 -1
  40. data/lib/openc3/interfaces/file_interface.rb +198 -0
  41. data/lib/openc3/interfaces/http_client_interface.rb +71 -39
  42. data/lib/openc3/interfaces/http_server_interface.rb +1 -9
  43. data/lib/openc3/interfaces/interface.rb +3 -2
  44. data/lib/openc3/interfaces/mqtt_interface.rb +32 -15
  45. data/lib/openc3/interfaces/mqtt_stream_interface.rb +19 -4
  46. data/lib/openc3/interfaces/protocols/crc_protocol.rb +7 -0
  47. data/lib/openc3/interfaces/serial_interface.rb +1 -0
  48. data/lib/openc3/interfaces/tcpip_server_interface.rb +1 -2
  49. data/lib/openc3/interfaces/udp_interface.rb +5 -3
  50. data/lib/openc3/interfaces.rb +2 -4
  51. data/lib/openc3/io/json_drb.rb +5 -0
  52. data/lib/openc3/io/json_rpc.rb +10 -9
  53. data/lib/openc3/io/udp_sockets.rb +7 -5
  54. data/lib/openc3/microservices/decom_microservice.rb +24 -7
  55. data/lib/openc3/microservices/interface_microservice.rb +65 -7
  56. data/lib/openc3/microservices/microservice.rb +1 -2
  57. data/lib/openc3/microservices/multi_microservice.rb +3 -3
  58. data/lib/openc3/migrations/20241208080000_no_critical_cmd.rb +31 -0
  59. data/lib/openc3/migrations/20241208080001_no_trigger_group.rb +46 -0
  60. data/lib/openc3/models/activity_model.rb +7 -3
  61. data/lib/openc3/models/cvt_model.rb +7 -1
  62. data/lib/openc3/models/interface_model.rb +9 -3
  63. data/lib/openc3/models/microservice_model.rb +8 -1
  64. data/lib/openc3/models/model.rb +1 -0
  65. data/lib/openc3/models/plugin_model.rb +11 -6
  66. data/lib/openc3/models/python_package_model.rb +10 -3
  67. data/lib/openc3/models/reaction_model.rb +14 -10
  68. data/lib/openc3/models/scope_model.rb +87 -25
  69. data/lib/openc3/models/target_model.rb +17 -1
  70. data/lib/openc3/models/timeline_model.rb +17 -5
  71. data/lib/openc3/models/tool_model.rb +15 -3
  72. data/lib/openc3/models/trigger_group_model.rb +6 -3
  73. data/lib/openc3/operators/microservice_operator.rb +10 -3
  74. data/lib/openc3/packets/commands.rb +17 -6
  75. data/lib/openc3/packets/limits.rb +0 -12
  76. data/lib/openc3/packets/packet.rb +10 -1
  77. data/lib/openc3/packets/packet_config.rb +34 -1
  78. data/lib/openc3/packets/packet_item.rb +30 -32
  79. data/lib/openc3/packets/structure_item.rb +2 -2
  80. data/lib/openc3/script/calendar.rb +1 -6
  81. data/lib/openc3/script/commands.rb +19 -13
  82. data/lib/openc3/script/critical_cmd.rb +91 -0
  83. data/lib/openc3/script/screen.rb +2 -2
  84. data/lib/openc3/script/script.rb +17 -10
  85. data/lib/openc3/script/web_socket_api.rb +5 -5
  86. data/lib/openc3/streams/mqtt_stream.rb +41 -33
  87. data/lib/openc3/streams/serial_stream.rb +27 -27
  88. data/lib/openc3/streams/stream.rb +17 -17
  89. data/lib/openc3/streams/tcpip_client_stream.rb +1 -1
  90. data/lib/openc3/streams/tcpip_socket_stream.rb +19 -19
  91. data/lib/openc3/system/system.rb +1 -1
  92. data/lib/openc3/system.rb +2 -3
  93. data/lib/openc3/tools/table_manager/table.rb +2 -2
  94. data/lib/openc3/tools/table_manager/table_parser.rb +1 -1
  95. data/lib/openc3/top_level.rb +9 -5
  96. data/lib/openc3/topics/command_decom_topic.rb +0 -7
  97. data/lib/openc3/topics/command_topic.rb +16 -0
  98. data/lib/openc3/topics/interface_topic.rb +2 -0
  99. data/lib/openc3/utilities/authentication.rb +7 -3
  100. data/lib/openc3/utilities/bucket_utilities.rb +1 -1
  101. data/lib/openc3/utilities/cli_generator.rb +0 -1
  102. data/lib/openc3/utilities/logger.rb +1 -0
  103. data/lib/openc3/utilities/store_queued.rb +1 -0
  104. data/lib/openc3/version.rb +6 -6
  105. data/templates/conversion/conversion.rb +2 -0
  106. data/templates/plugin/README.md +1 -1
  107. data/templates/target/targets/TARGET/lib/target.rb +1 -1
  108. data/templates/tool_angular/package.json +9 -9
  109. data/templates/tool_angular/src/app/app.component.html +4 -13
  110. data/templates/tool_angular/src/app/app.component.scss +5 -13
  111. data/templates/tool_angular/src/app/app.component.ts +5 -4
  112. data/templates/tool_angular/src/app/custom-overlay-container.ts +2 -2
  113. data/templates/tool_angular/src/app/openc3-api.d.ts +1 -1
  114. data/templates/tool_angular/src/main.single-spa.ts +1 -1
  115. data/templates/tool_react/package.json +1 -0
  116. data/templates/tool_react/src/root.component.js +1 -1
  117. data/templates/tool_svelte/build/smui.css +1 -1
  118. data/templates/tool_svelte/package.json +11 -9
  119. data/templates/tool_svelte/rollup.config.js +2 -0
  120. data/templates/tool_svelte/src/App.svelte +2 -2
  121. data/templates/tool_vue/eslint.config.mjs +68 -0
  122. data/templates/tool_vue/jsconfig.json +1 -1
  123. data/templates/tool_vue/package.json +26 -43
  124. data/templates/tool_vue/src/App.vue +3 -5
  125. data/templates/tool_vue/src/main.js +12 -23
  126. data/templates/tool_vue/src/router.js +19 -18
  127. data/templates/tool_vue/src/tools/tool_name/tool_name.vue +2 -2
  128. data/templates/tool_vue/vite.config.js +52 -0
  129. data/templates/widget/package.json +19 -26
  130. data/templates/widget/src/Widget.vue +13 -15
  131. data/templates/widget/vite.config.js +26 -0
  132. metadata +25 -39
  133. data/lib/openc3/core_ext/hash.rb +0 -40
  134. data/lib/openc3/core_ext/httpclient.rb +0 -11
  135. data/lib/openc3/interfaces/linc_interface.rb +0 -480
  136. data/lib/openc3/interfaces/protocols/override_protocol.rb +0 -4
  137. data/lib/openc3/microservices/reaction_microservice.rb +0 -607
  138. data/lib/openc3/microservices/timeline_microservice.rb +0 -400
  139. data/lib/openc3/microservices/trigger_group_microservice.rb +0 -698
  140. data/lib/openc3/migrations/20230615000000_autonomic.rb +0 -86
  141. data/lib/openc3/migrations/20240915000000_activity_uuid.rb +0 -28
  142. data/lib/openc3/system/system_config.rb +0 -413
  143. data/templates/tool_svelte/src/services/api.js +0 -92
  144. data/templates/tool_svelte/src/services/axios.js +0 -85
  145. data/templates/tool_svelte/src/services/cable.js +0 -65
  146. data/templates/tool_svelte/src/services/config-parser.js +0 -198
  147. data/templates/tool_svelte/src/services/openc3-api.js +0 -606
  148. data/templates/tool_vue/.eslintrc.js +0 -43
  149. data/templates/tool_vue/babel.config.json +0 -11
  150. data/templates/tool_vue/vue.config.js +0 -38
  151. data/templates/widget/.eslintrc.js +0 -43
  152. data/templates/widget/babel.config.json +0 -11
  153. data/templates/widget/vue.config.js +0 -28
  154. /data/templates/tool_vue/{.prettierrc.js → .prettierrc.cjs} +0 -0
  155. /data/templates/widget/{.prettierrc.js → .prettierrc.cjs} +0 -0
@@ -11,13 +11,14 @@
11
11
  "smui-theme": "smui-theme compile build/smui.css -i src/theme"
12
12
  },
13
13
  "dependencies": {
14
- "@astrouxds/astro-web-components": "7.22.1",
15
- "@openc3/tool-common": "5.19.0",
16
- "@smui/button": "^7.0.0-beta.16",
17
- "@smui/card": "^7.0.0-beta.16",
18
- "@smui/list": "^7.0.0-beta.16",
19
- "@smui/menu": "^7.0.0-beta.16",
20
- "axios": "1.7.7",
14
+ "@astrouxds/astro-web-components": "^7.24.0",
15
+ "@openc3/js-common": "6.0.0",
16
+ "@smui/button": "^7.0.0",
17
+ "@smui/common": "^7.0.0",
18
+ "@smui/card": "^7.0.0",
19
+ "@smui/list": "^7.0.0",
20
+ "@smui/menu": "^7.0.0",
21
+ "axios": "^1.7.7",
21
22
  "single-spa-svelte": "^2.1.1",
22
23
  "sirv-cli": "^2.0.2",
23
24
  "svelte-portal": "^2.2.0"
@@ -40,8 +41,9 @@
40
41
  "rollup-plugin-postcss": "^4.0.2",
41
42
  "rollup-plugin-svelte": "^7.1.6",
42
43
  "rollup-plugin-terser": "^7.0.2",
43
- "smui-theme": "^7.0.0-beta.16",
44
+ "smui-theme": "^7.0.0",
44
45
  "svelte": "^4.2.19",
45
46
  "svelte-jester": "^5.0.0"
46
- }
47
+ },
48
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
47
49
  }
@@ -31,6 +31,8 @@ export default {
31
31
  resolve({
32
32
  browser: true,
33
33
  dedupe: ["svelte"],
34
+ exportConditions: ['default', 'module', 'import', 'svelte'],
35
+ extensions: ['.mjs', '.js', '.json', '.node', '.svelte'],
34
36
  }),
35
37
  commonjs(),
36
38
  postcss({
@@ -27,7 +27,7 @@
27
27
  import List, { Item, Separator, Text } from '@smui/list';
28
28
  import Button, { Label } from '@smui/button';
29
29
  import Card from '@smui/card';
30
- import { OpenC3Api } from "./services/openc3-api";
30
+ import { OpenC3Api } from '@openc3/js-common/services';
31
31
 
32
32
  let menu;
33
33
 
@@ -39,4 +39,4 @@
39
39
  }
40
40
 
41
41
  document.title = "<%= tool_name_display %>";
42
- </script>
42
+ </script>
@@ -0,0 +1,68 @@
1
+ import prettier from 'eslint-plugin-prettier'
2
+ import globals from 'globals'
3
+ import parser from 'vue-eslint-parser'
4
+ import path from 'node:path'
5
+ import { fileURLToPath } from 'node:url'
6
+ import js from '@eslint/js'
7
+ import { FlatCompat } from '@eslint/eslintrc'
8
+
9
+ const __filename = fileURLToPath(import.meta.url)
10
+ const __dirname = path.dirname(__filename)
11
+ const compat = new FlatCompat({
12
+ baseDirectory: __dirname,
13
+ recommendedConfig: js.configs.recommended,
14
+ allConfig: js.configs.all,
15
+ })
16
+
17
+ export default [
18
+ ...compat.extends(
19
+ 'plugin:vue/vue3-essential',
20
+ 'plugin:prettier/recommended',
21
+ '@vue/prettier',
22
+ ),
23
+ {
24
+ plugins: {
25
+ prettier,
26
+ },
27
+
28
+ languageOptions: {
29
+ globals: {
30
+ ...globals.node,
31
+ },
32
+
33
+ parser: parser,
34
+ ecmaVersion: 2022,
35
+ sourceType: 'module',
36
+ },
37
+
38
+ rules: {
39
+ 'no-console': 'error',
40
+ 'no-debugger': 'error',
41
+
42
+ 'prettier/prettier': [
43
+ 'warn',
44
+ {
45
+ endOfLine: 'auto',
46
+ },
47
+ ],
48
+
49
+ 'vue/multi-word-component-names': 'off',
50
+
51
+ 'vue/valid-v-slot': [
52
+ 'error',
53
+ {
54
+ allowModifiers: true,
55
+ },
56
+ ],
57
+ },
58
+ },
59
+ {
60
+ files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)'],
61
+
62
+ languageOptions: {
63
+ globals: {
64
+ ...globals.jest,
65
+ },
66
+ },
67
+ },
68
+ ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "exclude": ["node_modules"],
3
3
  "vueCompilerOptions": {
4
- "target": 2.7
4
+ "target": "auto"
5
5
  }
6
6
  }
@@ -1,53 +1,36 @@
1
1
  {
2
2
  "name": "<%= tool_name %>",
3
- "version": "5.19.0",
3
+ "version": "6.0.0",
4
4
  "private": true,
5
+ "type": "module",
5
6
  "scripts": {
6
- "serve": "vue-cli-service serve",
7
- "build": "vue-cli-service build --no-module",
8
- "test:unit": "vue-cli-service test:unit",
9
- "lint": "vue-cli-service lint",
10
- "serve:standalone": "vue-cli-service serve --mode standalone",
11
- "test:components": "vue-cli-service test:components"
7
+ "serve": "vite build --watch --mode dev-server",
8
+ "build": "vite build",
9
+ "lint": "eslint src",
10
+ "serve:standalone": "vite preview --mode standalone"
12
11
  },
13
12
  "dependencies": {
14
- "@astrouxds/astro-web-components": "7.22.1",
15
- "@openc3/tool-common": "5.19.0",
16
- "axios": "1.7.7",
17
- "date-fns": "4.1.0",
18
- "portal-vue": "2.1.7",
19
- "single-spa-vue": "2.5.1",
20
- "sprintf-js": "1.1.3",
21
- "systemjs-webpack-interop": "2.3.7",
22
- "vue": "2.7.16",
23
- "vue-router": "3.5.3",
24
- "vuetify": "2.7.1",
25
- "vuex": "3.6.2"
13
+ "@astrouxds/astro-web-components": "^7.24.0",
14
+ "@openc3/js-common": "6.0.0",
15
+ "@openc3/vue-common": "6.0.0",
16
+ "axios": "^1.7.7",
17
+ "date-fns": "^4.1.0",
18
+ "lodash": "^4.17.21",
19
+ "single-spa-vue": "^3.0.0",
20
+ "sprintf-js": "^1.1.3"
26
21
  },
27
22
  "devDependencies": {
28
- "@babel/eslint-parser": "7.25.1",
29
- "@vue/babel-preset-app": "5.0.8",
30
- "@vue/cli": "5.0.8",
31
- "@vue/cli-plugin-babel": "5.0.8",
32
- "@vue/cli-plugin-eslint": "5.0.8",
33
- "@vue/cli-plugin-router": "5.0.8",
34
- "@vue/cli-plugin-vuex": "5.0.8",
35
- "@vue/cli-service": "5.0.8",
36
- "@vue/eslint-config-prettier": "9.0.0",
37
- "@vue/test-utils": "1.3.0",
38
- "babel-loader": "9.2.1",
39
- "babel-plugin-istanbul": "7.0.0",
40
- "eslint": "8.56.0",
41
- "eslint-config-prettier": "9.1.0",
42
- "eslint-plugin-prettier": "5.2.1",
43
- "eslint-plugin-vue": "9.28.0",
44
- "html-webpack-plugin": "^5.6.0",
45
- "prettier": "3.3.3",
46
- "sass": "1.79.3",
47
- "sass-loader": "16.0.2",
48
- "vue-cli-plugin-single-spa": "3.3.0",
49
- "vue-cli-plugin-vuetify": "2.5.8",
50
- "vue-template-compiler": "2.7.16",
51
- "webpack": "5.95.0"
23
+ "@vitejs/plugin-vue": "^5.1.5",
24
+ "@vue/eslint-config-prettier": "^9.0.0",
25
+ "@vue/test-utils": "^2.4.6",
26
+ "eslint": "^9.16.0",
27
+ "eslint-config-prettier": "^9.1.0",
28
+ "eslint-plugin-prettier": "^5.2.1",
29
+ "eslint-plugin-vue": "^9.30.0",
30
+ "prettier": "^3.3.3",
31
+ "sass": "^1.80.4",
32
+ "vite": "^5.4.11",
33
+ "vue": "^3.5.13",
34
+ "vue-eslint-parser": "^9.4.3"
52
35
  }
53
36
  }
@@ -7,9 +7,7 @@
7
7
  -->
8
8
 
9
9
  <template>
10
- <div>
11
- <v-app id="innerapp">
12
- <router-view></router-view>
13
- </v-app>
14
- </div>
10
+ <v-app id="innerapp">
11
+ <router-view></router-view>
12
+ </v-app>
15
13
  </template>
@@ -1,36 +1,25 @@
1
- import 'systemjs-webpack-interop/auto-public-path/2'
2
- import Vue from 'vue'
1
+ import { createApp, h } from 'vue'
3
2
  import singleSpaVue from 'single-spa-vue'
4
3
 
5
4
  import App from './App.vue'
6
5
  import router from './router'
7
- import store from '@openc3/tool-common/src/plugins/store'
8
-
9
- Vue.config.productionTip = false
10
-
11
- import '@openc3/tool-common/src/assets/stylesheets/layout/layout.scss'
12
- import vuetify from '@openc3/tool-common/src/plugins/vuetify'
13
- import Dialog from '@openc3/tool-common/src/plugins/dialog'
14
- import PortalVue from 'portal-vue'
15
- import Notify from '@openc3/tool-common/src/plugins/notify'
16
-
17
- Vue.use(PortalVue)
18
- Vue.use(Dialog)
19
- Vue.use(Notify, { store })
6
+ import { Dialog, Notify, store, vuetify } from '@openc3/vue-common/plugins'
20
7
 
21
8
  const vueLifecycles = singleSpaVue({
22
- Vue,
9
+ createApp,
23
10
  appOptions: {
24
- router,
25
- store,
26
- vuetify,
27
- render(h) {
28
- return h(App, {
29
- props: {},
30
- })
11
+ render() {
12
+ return h(App, {})
31
13
  },
32
14
  el: '#openc3-tool',
33
15
  },
16
+ handleInstance: (app) => {
17
+ app.use(router)
18
+ app.use(store)
19
+ app.use(vuetify)
20
+ app.use(Dialog)
21
+ app.use(Notify, { store })
22
+ },
34
23
  })
35
24
 
36
25
  export const bootstrap = vueLifecycles.bootstrap
@@ -6,24 +6,25 @@
6
6
  # if purchased from OpenC3, Inc.
7
7
  */
8
8
 
9
- import Vue from 'vue'
10
- import Router from 'vue-router'
9
+ import { createRouter, createWebHistory } from 'vue-router'
10
+ import { prependBasePath } from '@openc3/js-common/utils'
11
+ import { NotFound } from '@openc3/vue-common/components'
11
12
 
12
- Vue.use(Router)
13
+ const routes = [
14
+ {
15
+ path: '/',
16
+ name: 'jruby',
17
+ component: () => import('./tools/<%= tool_name %>/<%= tool_name %>.vue'),
18
+ },
19
+ {
20
+ path: '/:pathMatch(.*)*',
21
+ name: 'NotFound',
22
+ component: NotFound,
23
+ },
24
+ ]
25
+ routes.forEach(prependBasePath)
13
26
 
14
- export default new Router({
15
- mode: 'history',
16
- base: process.env.BASE_URL,
17
- routes: [
18
- {
19
- path: '/',
20
- name: '<%= tool_name %>',
21
- component: () => import('./tools/<%= tool_name %>/<%= tool_name %>.vue'),
22
- },
23
- {
24
- path: '*',
25
- name: 'NotFound',
26
- component: () => import('@openc3/tool-common/src/components/NotFound'),
27
- },
28
- ],
27
+ export default createRouter({
28
+ history: createWebHistory(),
29
+ routes,
29
30
  })
@@ -19,8 +19,8 @@
19
19
  </template>
20
20
 
21
21
  <script>
22
- import { OpenC3Api } from '@openc3/tool-common/src/services/openc3-api'
23
- import TopBar from '@openc3/tool-common/src/components/TopBar'
22
+ import { OpenC3Api } from '@openc3/js-common/services'
23
+ import { TopBar } from '@openc3/vue-common/components'
24
24
 
25
25
  export default {
26
26
  components: {
@@ -0,0 +1,52 @@
1
+ import { resolve } from 'path'
2
+ import { defineConfig } from 'vite'
3
+ import vue from '@vitejs/plugin-vue'
4
+ import { devServerPlugin } from '@openc3/js-common/viteDevServerPlugin'
5
+
6
+ const DEFAULT_EXTENSIONS = ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json']
7
+
8
+ export default defineConfig((options) => {
9
+ return {
10
+ build: {
11
+ outDir: 'tools/<%= tool_name %>',
12
+ emptyOutDir: true,
13
+ rollupOptions: {
14
+ input: 'src/main.js',
15
+ output: {
16
+ format: 'systemjs',
17
+ hashCharacters: 'hex',
18
+ entryFileNames: '[name].js',
19
+ chunkFileNames: '[name]-[hash:20].js',
20
+ assetFileNames: 'assets/[name]-[hash][extname]',
21
+ },
22
+ external: ['single-spa', 'vue', 'vuex', 'vue-router', 'vuetify'],
23
+ preserveEntrySignatures: 'strict',
24
+ },
25
+ },
26
+ server: {
27
+ port: 2999,
28
+ },
29
+ plugins: [
30
+ vue({
31
+ template: {
32
+ compilerOptions: {
33
+ isCustomElement: (tag) => tag.startsWith('rux-'),
34
+ },
35
+ },
36
+ }),
37
+ devServerPlugin(options),
38
+ ],
39
+ resolve: {
40
+ alias: {
41
+ '@': resolve(__dirname, './src'),
42
+ },
43
+ extensions: [...DEFAULT_EXTENSIONS, '.vue'], // not recommended but saves us from having to change every SFC import
44
+ },
45
+ define: {
46
+ __BASE_URL__: JSON.stringify('/tools/<%= tool_name %>'),
47
+ },
48
+ optimizeDeps: {
49
+ entries: [], // https://github.com/vituum/vituum/issues/25#issuecomment-1690080284
50
+ },
51
+ }
52
+ })
@@ -1,35 +1,28 @@
1
1
  {
2
- "name": "widget",
3
- "version": "5.19.0",
2
+ "name": "<%= widget_name %>",
3
+ "version": "6.0.0",
4
4
  "private": true,
5
+ "type": "module",
5
6
  "scripts": {
6
- "build": "vue-cli-service build --target lib --dest tools/widgets/<%= widget_name %> --formats umd-min <%= widget_path %> --name <%= widget_name %>"
7
+ "build": "vite build"
7
8
  },
8
9
  "dependencies": {
9
- "@astrouxds/astro-web-components": "7.22.1",
10
- "vue": "2.7.16",
11
- "vuetify": "2.7.1"
10
+ "@astrouxds/astro-web-components": "^7.24.0",
11
+ "@openc3/vue-common": "6.0.0",
12
+ "vuetify": "^3.7.1"
12
13
  },
13
14
  "devDependencies": {
14
- "@babel/eslint-parser": "7.25.1",
15
- "@rushstack/eslint-patch": "1.10.4",
16
- "@vue/babel-preset-app": "5.0.8",
17
- "@vue/cli": "5.0.8",
18
- "@vue/cli-plugin-babel": "5.0.8",
19
- "@vue/cli-plugin-eslint": "5.0.8",
20
- "@vue/cli-service": "5.0.8",
21
- "@vue/eslint-config-prettier": "9.0.0",
22
- "babel-loader": "9.2.1",
23
- "babel-plugin-istanbul": "7.0.0",
24
- "eslint": "8.56.0",
25
- "eslint-config-prettier": "9.1.0",
26
- "eslint-plugin-prettier": "5.2.1",
27
- "eslint-plugin-vue": "9.28.0",
28
- "prettier": "3.3.3",
29
- "sass": "1.79.3",
30
- "sass-loader": "16.0.2",
31
- "vue-cli-plugin-vuetify": "2.5.8",
32
- "vue-template-compiler": "2.7.16",
33
- "webpack": "5.95.0"
15
+ "@vitejs/plugin-vue": "^5.1.5",
16
+ "@vue/eslint-config-prettier": "^9.0.0",
17
+ "eslint": "^9.16.0",
18
+ "eslint-config-prettier": "^9.1.0",
19
+ "eslint-plugin-prettier": "^5.2.1",
20
+ "eslint-plugin-vue": "^9.30.0",
21
+ "prettier": "^3.3.3",
22
+ "sass": "^1.80.4",
23
+ "vite": "^5.4.11",
24
+ "vue": "^3.5.13",
25
+ "vite-plugin-style-inject": "^0.0.1",
26
+ "vue-eslint-parser": "^9.4.3"
34
27
  }
35
28
  }
@@ -8,25 +8,23 @@
8
8
 
9
9
  <template>
10
10
  <div class="value-widget-container">
11
- <template>
12
- <v-text-field
13
- solo
14
- dense
15
- readonly
16
- single-line
17
- hide-no-data
18
- hide-details
19
- :value="_value"
20
- :class="valueClass"
21
- :style="computedStyle"
22
- data-test="value"
23
- />
24
- </template>
11
+ <v-text-field
12
+ variant="solo"
13
+ density="compact"
14
+ readonly
15
+ single-line
16
+ hide-no-data
17
+ hide-details
18
+ :value="_value"
19
+ :class="valueClass"
20
+ :style="computedStyle"
21
+ data-test="value"
22
+ />
25
23
  </div>
26
24
  </template>
27
25
 
28
26
  <script>
29
- import VWidget from '@openc3/tool-common/src/components/widgets/VWidget'
27
+ import { VWidget } from '@openc3/vue-common/widgets'
30
28
 
31
29
  export default {
32
30
  mixins: [VWidget],
@@ -0,0 +1,26 @@
1
+ import { defineConfig } from 'vite'
2
+ import VitePluginStyleInject from 'vite-plugin-style-inject'
3
+ import vue from '@vitejs/plugin-vue'
4
+
5
+ const DEFAULT_EXTENSIONS = ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json']
6
+
7
+ export default defineConfig({
8
+ build: {
9
+ outDir: 'tools/widgets/<%= widget_name %>',
10
+ emptyOutDir: true,
11
+ sourcemap: true,
12
+ lib: {
13
+ entry: './src/<%= widget_name %>.vue',
14
+ name: '<%= widget_name %>',
15
+ fileName: (format, entryName) => `${entryName}.${format}.min.js`,
16
+ formats: ['umd'],
17
+ },
18
+ rollupOptions: {
19
+ external: ['vue', 'vuetify'],
20
+ },
21
+ },
22
+ plugins: [vue(), VitePluginStyleInject()],
23
+ resolve: {
24
+ extensions: [...DEFAULT_EXTENSIONS, '.vue'], // not recommended but saves us from having to change every SFC import
25
+ },
26
+ })