@fdm-monster/client-next 0.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/.all-contributorsrc +57 -0
- package/.browserslistrc +4 -0
- package/.editorconfig +5 -0
- package/.env +1 -0
- package/.eslintrc-auto-import.json +73 -0
- package/.eslintrc.js +126 -0
- package/.github/FUNDING.yml +3 -0
- package/.github/workflows/release-client.yml +94 -0
- package/.github/workflows/vue-publish.yml +26 -0
- package/.prettierignore +15 -0
- package/.prettierrc.cjs +7 -0
- package/.whitesource +12 -0
- package/.yarn/releases/yarn-4.5.1.cjs +934 -0
- package/.yarnrc.yml +3 -0
- package/CODE_OF_CONDUCT.md +46 -0
- package/README.md +93 -0
- package/RELEASE_NOTES.MD +11 -0
- package/index.html +16 -0
- package/package.default.json +42 -0
- package/package.json +26 -0
- package/public/favicon.ico +0 -0
- package/public/img/DavidZwart.jpg +0 -0
- package/public/img/OIG.JYDC2RaWdz7g9.jpg +0 -0
- package/public/img/OIG.jpg +0 -0
- package/public/img/icons/android-chrome-192x192.png +0 -0
- package/public/img/icons/android-chrome-256x256.png +0 -0
- package/public/img/icons/android-chrome-384x384.png +0 -0
- package/public/img/icons/android-chrome-512x512.png +0 -0
- package/public/img/icons/favicon.svg +1 -0
- package/public/img/logo.png +0 -0
- package/public/img/logo.svg +1 -0
- package/public/img/manifest.webmanifest +33 -0
- package/public/img/octoprint-tentacle.svg +144 -0
- package/public/img/thumbail_unknown.jpg +0 -0
- package/public/img/vbanner.jpg +0 -0
- package/public/index.html +17 -0
- package/public/robots.txt +2 -0
- package/renovate.json +30 -0
- package/src/App.vue +60 -0
- package/src/AppLoader.vue +383 -0
- package/src/assets/adjectives.json +1468 -0
- package/src/assets/android-chrome-192x192.png +0 -0
- package/src/assets/logo.png +0 -0
- package/src/assets/logo.svg +6 -0
- package/src/assets/nouns.json +4309 -0
- package/src/auto-imports.d.ts +139 -0
- package/src/backend/app.service.ts +39 -0
- package/src/backend/auth.service.ts +56 -0
- package/src/backend/base.service.ts +57 -0
- package/src/backend/batch.service.ts +37 -0
- package/src/backend/camera-stream.service.ts +33 -0
- package/src/backend/custom-gcode.service.ts +11 -0
- package/src/backend/dto/octoprint-settings.dto.ts +168 -0
- package/src/backend/first-time-setup.service.ts +17 -0
- package/src/backend/floor.service.ts +84 -0
- package/src/backend/index.ts +4 -0
- package/src/backend/print-completions.service.ts +11 -0
- package/src/backend/printer-file.service.ts +91 -0
- package/src/backend/printer-group.service.ts +62 -0
- package/src/backend/printer-job.service.ts +20 -0
- package/src/backend/printer-settings.service.ts +28 -0
- package/src/backend/printers.service.ts +136 -0
- package/src/backend/server-private.service.ts +55 -0
- package/src/backend/server.api.ts +132 -0
- package/src/backend/settings.service.ts +85 -0
- package/src/backend/user.service.ts +51 -0
- package/src/components/AboutHelp/AboutView.vue +164 -0
- package/src/components/CameraGrid/CameraGridView.vue +111 -0
- package/src/components/FirstTimeSetup/FirstTimeSetupView.vue +354 -0
- package/src/components/Generic/Actions/PrinterConnectionAction.vue +56 -0
- package/src/components/Generic/Actions/PrinterCreateAction.vue +22 -0
- package/src/components/Generic/Actions/PrinterDeleteAction.vue +29 -0
- package/src/components/Generic/Actions/PrinterQuickStopAction.vue +35 -0
- package/src/components/Generic/Actions/PrinterSettingsAction.vue +35 -0
- package/src/components/Generic/Actions/PrinterUrlAction.vue +24 -0
- package/src/components/Generic/Actions/RefreshFilesAction.vue +50 -0
- package/src/components/Generic/Actions/SyncPrinterNameAction.vue +36 -0
- package/src/components/Generic/Dialogs/AddOrUpdateCameraStreamDialog.vue +131 -0
- package/src/components/Generic/Dialogs/AddOrUpdateFloorDialog.vue +141 -0
- package/src/components/Generic/Dialogs/AddOrUpdatePrinterDialog.vue +303 -0
- package/src/components/Generic/Dialogs/BaseDialog.vue +81 -0
- package/src/components/Generic/Dialogs/BatchJsonCreateDialog.vue +109 -0
- package/src/components/Generic/Dialogs/BatchReprintDialog.vue +190 -0
- package/src/components/Generic/Dialogs/PrinterChecksPanel.vue +37 -0
- package/src/components/Generic/Dialogs/PrinterControlDialog.vue +202 -0
- package/src/components/Generic/Dialogs/PrinterMaintenanceDialog.vue +130 -0
- package/src/components/Generic/Dialogs/YamlImportExportDialog.vue +186 -0
- package/src/components/Generic/Dialogs/dialog.constants.ts +19 -0
- package/src/components/Generic/FileExplorerSideNav.vue +734 -0
- package/src/components/Generic/Loaders/GridLoader.vue +68 -0
- package/src/components/Generic/NavigationDrawer.vue +69 -0
- package/src/components/Generic/PrintJobsMenu.vue +148 -0
- package/src/components/Generic/Snackbars/AppErrorSnackbar.vue +64 -0
- package/src/components/Generic/Snackbars/AppInfoSnackbar.vue +63 -0
- package/src/components/Generic/Snackbars/AppProgressSnackbar.vue +158 -0
- package/src/components/Generic/Vuetify/TooltipButton.vue +47 -0
- package/src/components/HelpOverlay/HelpOverlay.vue +57 -0
- package/src/components/Login/LoginForm.vue +206 -0
- package/src/components/Login/LoginView.spec.ts +64 -0
- package/src/components/Login/LoginView.vue +65 -0
- package/src/components/Login/Logo.vue +13 -0
- package/src/components/Login/PermissionDenied.vue +109 -0
- package/src/components/Login/RegistrationForm.vue +207 -0
- package/src/components/Login/RegistrationView.vue +17 -0
- package/src/components/Login/__snapshots__/LoginView.spec.ts.snap +1051 -0
- package/src/components/NotFound/NotFoundView.vue +39 -0
- package/src/components/PrintStatistics/PrintStatistics.vue +168 -0
- package/src/components/PrintStatistics/PrintStatisticsView.vue +15 -0
- package/src/components/PrinterGrid/HomeToolbar.vue +90 -0
- package/src/components/PrinterGrid/PrinterGrid.vue +164 -0
- package/src/components/PrinterGrid/PrinterGridTile.vue +438 -0
- package/src/components/PrinterGrid/PrinterGridView.vue +210 -0
- package/src/components/PrinterList/FileControlList.vue +40 -0
- package/src/components/PrinterList/PrinterDetails.vue +91 -0
- package/src/components/PrinterList/PrintersView.vue +492 -0
- package/src/components/Settings/AccountSettings.vue +163 -0
- package/src/components/Settings/DiagnosticsSettings.vue +137 -0
- package/src/components/Settings/EmergencyCommands.vue +265 -0
- package/src/components/Settings/FloorSettings.vue +276 -0
- package/src/components/Settings/GridSettings.vue +127 -0
- package/src/components/Settings/OctoPrintSettings.vue +188 -0
- package/src/components/Settings/ServerProtectionSettings.vue +370 -0
- package/src/components/Settings/SettingsView.vue +73 -0
- package/src/components/Settings/SoftwareUpgradeSettings.vue +297 -0
- package/src/components/Settings/UserManagementSettings.vue +257 -0
- package/src/components/TopBar.vue +147 -0
- package/src/components.d.ts +70 -0
- package/src/directives/file-upload.directive.ts +117 -0
- package/src/directives/printer-drop-position.directive.ts +92 -0
- package/src/env.d.ts +6 -0
- package/src/main.ts +76 -0
- package/src/models/batch/reprint.dto.ts +79 -0
- package/src/models/batch.model.ts +11 -0
- package/src/models/camera-streams/camera-stream.ts +19 -0
- package/src/models/floors/floor.model.ts +30 -0
- package/src/models/octoprint/connection-options.model.ts +8 -0
- package/src/models/plugins/firmware-updates/prusa-firmware-release.model.ts +57 -0
- package/src/models/print-completions/print-completions.model.ts +49 -0
- package/src/models/printers/crud/create-printer.model.ts +26 -0
- package/src/models/printers/file-upload-commands.model.ts +4 -0
- package/src/models/printers/gcode/gcode-analysis.model.ts +30 -0
- package/src/models/printers/printer-current-job.model.ts +90 -0
- package/src/models/printers/printer-file.model.ts +48 -0
- package/src/models/printers/printer.model.ts +18 -0
- package/src/models/server/client-releases.model.ts +27 -0
- package/src/models/server/export-yaml.model.ts +11 -0
- package/src/models/server/features.model.ts +37 -0
- package/src/models/server/github-rate-limit.model.ts +21 -0
- package/src/models/server/version.model.ts +14 -0
- package/src/models/settings/printer-file-clean-settings.model.ts +5 -0
- package/src/models/settings/server-settings.dto.ts +19 -0
- package/src/models/settings/settings.model.ts +57 -0
- package/src/models/socketio-messages/socketio-message.model.ts +53 -0
- package/src/models/uploads/queued-upload.model.ts +12 -0
- package/src/models/user.model.ts +15 -0
- package/src/plugins/README.md +3 -0
- package/src/plugins/index.ts +17 -0
- package/src/plugins/vuetify.ts +53 -0
- package/src/router/index.ts +192 -0
- package/src/router/route-names.ts +14 -0
- package/src/router/utils.ts +23 -0
- package/src/shared/alert.events.ts +14 -0
- package/src/shared/app.constants.ts +23 -0
- package/src/shared/auth.constants.ts +34 -0
- package/src/shared/dialog.composable.ts +41 -0
- package/src/shared/drag.constants.ts +19 -0
- package/src/shared/experimental.constants.ts +1 -0
- package/src/shared/http-client.ts +162 -0
- package/src/shared/noun-adjectives.data.ts +24 -0
- package/src/shared/printer-grid.constants.ts +5 -0
- package/src/shared/printer-state.constants.ts +194 -0
- package/src/shared/snackbar.composable.ts +66 -0
- package/src/shared/socketio.service.ts +104 -0
- package/src/store/auth.store.ts +255 -0
- package/src/store/connection.store.ts +66 -0
- package/src/store/dialog.store.ts +114 -0
- package/src/store/features.store.ts +57 -0
- package/src/store/floor.store.ts +173 -0
- package/src/store/grid.store.ts +10 -0
- package/src/store/index.ts +4 -0
- package/src/store/printer-state.store.ts +246 -0
- package/src/store/printer.store.ts +236 -0
- package/src/store/profile.store.ts +25 -0
- package/src/store/settings.store.ts +64 -0
- package/src/store/test-printer.store.ts +70 -0
- package/src/store/uploads.store.ts +75 -0
- package/src/styles/README.md +3 -0
- package/src/styles/settings.scss +10 -0
- package/src/types/global.d.ts +15 -0
- package/src/utils/array.utils.ts +15 -0
- package/src/utils/date.utils.ts +5 -0
- package/src/utils/download-file.util.ts +25 -0
- package/src/utils/error.utils.ts +3 -0
- package/src/utils/file-size.util.ts +11 -0
- package/src/utils/id.type.ts +1 -0
- package/src/utils/sentry.util.ts +8 -0
- package/src/utils/test.util.ts +30 -0
- package/src/utils/time.utils.ts +2 -0
- package/src/utils/uploads-state.utils.ts +58 -0
- package/src/utils/validation.utils.ts +14 -0
- package/src/vite-env.d.ts +7 -0
- package/test/setup-axios-mock.ts +15 -0
- package/tsconfig.json +47 -0
- package/tsconfig.node.json +9 -0
- package/vite.config.mts +106 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { beforeAll, afterAll } from 'vitest'
|
|
2
|
+
import axios from 'axios'
|
|
3
|
+
import MockAdapter from 'axios-mock-adapter'
|
|
4
|
+
|
|
5
|
+
const mock = new MockAdapter(axios)
|
|
6
|
+
|
|
7
|
+
beforeAll(() => {
|
|
8
|
+
mock.onGet('/api/auth/login-required').reply(200, {
|
|
9
|
+
loginRequired: true
|
|
10
|
+
})
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
afterAll(() => {
|
|
14
|
+
mock.restore() // Restore the original Axios behavior after all tests
|
|
15
|
+
})
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"jsx": "preserve",
|
|
5
|
+
"lib": [
|
|
6
|
+
"DOM",
|
|
7
|
+
"ESNext"
|
|
8
|
+
],
|
|
9
|
+
"baseUrl": "./",
|
|
10
|
+
"module": "ESNext",
|
|
11
|
+
"moduleResolution": "node",
|
|
12
|
+
"paths": {
|
|
13
|
+
"@/*": [
|
|
14
|
+
"./src/*"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"resolveJsonModule": true,
|
|
18
|
+
"types": [
|
|
19
|
+
"vite/client"
|
|
20
|
+
],
|
|
21
|
+
"allowJs": true,
|
|
22
|
+
"strict": true,
|
|
23
|
+
"strictNullChecks": true,
|
|
24
|
+
"noUnusedLocals": true,
|
|
25
|
+
"esModuleInterop": true,
|
|
26
|
+
"forceConsistentCasingInFileNames": true,
|
|
27
|
+
"isolatedModules": true,
|
|
28
|
+
"skipLibCheck": true,
|
|
29
|
+
"sourceMap": true
|
|
30
|
+
},
|
|
31
|
+
"include": [
|
|
32
|
+
"src/**/*.ts",
|
|
33
|
+
"src/**/*.d.ts",
|
|
34
|
+
"src/**/*.tsx",
|
|
35
|
+
"src/**/*.vue"
|
|
36
|
+
],
|
|
37
|
+
"exclude": [
|
|
38
|
+
"dist",
|
|
39
|
+
"node_modules",
|
|
40
|
+
"cypress"
|
|
41
|
+
],
|
|
42
|
+
"references": [
|
|
43
|
+
{
|
|
44
|
+
"path": "./tsconfig.node.json"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
package/vite.config.mts
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// Plugins
|
|
2
|
+
import AutoImport from 'unplugin-auto-import/vite'
|
|
3
|
+
import Components from 'unplugin-vue-components/vite'
|
|
4
|
+
import Fonts from 'unplugin-fonts/vite'
|
|
5
|
+
import Vue from '@vitejs/plugin-vue'
|
|
6
|
+
import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
|
|
7
|
+
|
|
8
|
+
// Utilities
|
|
9
|
+
import { defineConfig } from 'vite'
|
|
10
|
+
import { fileURLToPath, URL } from 'url'
|
|
11
|
+
import packageJson from './package.json'
|
|
12
|
+
import { sentryVitePlugin } from '@sentry/vite-plugin'
|
|
13
|
+
|
|
14
|
+
// https://vitejs.dev/config/
|
|
15
|
+
export default defineConfig({
|
|
16
|
+
plugins: [
|
|
17
|
+
// {
|
|
18
|
+
// name: "vitest-plugin-beforeall",
|
|
19
|
+
// config: () => ({
|
|
20
|
+
// test: { setupFiles: ["@vitest/web-worker", "./vitest/beforeall.ts"] },
|
|
21
|
+
// }),
|
|
22
|
+
// },
|
|
23
|
+
AutoImport({
|
|
24
|
+
imports: ['vue'],
|
|
25
|
+
dts: 'src/auto-imports.d.ts',
|
|
26
|
+
eslintrc: {
|
|
27
|
+
enabled: true
|
|
28
|
+
},
|
|
29
|
+
vueTemplate: true
|
|
30
|
+
}),
|
|
31
|
+
// https://github.com/unplugin/unplugin-vue-components
|
|
32
|
+
Components({
|
|
33
|
+
dts: 'src/components.d.ts'
|
|
34
|
+
}),
|
|
35
|
+
Vue({
|
|
36
|
+
template: { transformAssetUrls }
|
|
37
|
+
}),
|
|
38
|
+
// https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin#readme
|
|
39
|
+
Vuetify({
|
|
40
|
+
autoImport: true,
|
|
41
|
+
styles: {
|
|
42
|
+
configFile: 'src/styles/settings.scss'
|
|
43
|
+
}
|
|
44
|
+
}),
|
|
45
|
+
// Put the Sentry vite plugin after all other plugins
|
|
46
|
+
sentryVitePlugin({
|
|
47
|
+
telemetry: false,
|
|
48
|
+
org: 'fdm-monster',
|
|
49
|
+
project: 'fdm-monster-client',
|
|
50
|
+
// Specify the directory containing build artifacts
|
|
51
|
+
include: './dist',
|
|
52
|
+
// Auth tokens can be obtained from https://sentry.io/settings/account/api/auth-tokens/
|
|
53
|
+
// and needs the `project:releases` and `org:read` scopes
|
|
54
|
+
authToken: process.env.SENTRY_AUTH_TOKEN,
|
|
55
|
+
// Optionally uncomment the line below to override automatic release name detection
|
|
56
|
+
release: packageJson.version,
|
|
57
|
+
dryRun: !process.env.SENTRY_AUTH_TOKEN?.length
|
|
58
|
+
}),
|
|
59
|
+
Fonts({
|
|
60
|
+
google: {
|
|
61
|
+
families: [
|
|
62
|
+
{
|
|
63
|
+
name: 'Roboto',
|
|
64
|
+
styles: 'wght@100;300;400;500;700;900'
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
],
|
|
70
|
+
define: {
|
|
71
|
+
'process.env': {},
|
|
72
|
+
'import.meta.env.PACKAGE_VERSION': JSON.stringify(packageJson.version)
|
|
73
|
+
},
|
|
74
|
+
resolve: {
|
|
75
|
+
alias: {
|
|
76
|
+
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
77
|
+
},
|
|
78
|
+
extensions: [
|
|
79
|
+
'.js',
|
|
80
|
+
'.json',
|
|
81
|
+
'.jsx',
|
|
82
|
+
'.mjs',
|
|
83
|
+
'.ts',
|
|
84
|
+
'.tsx',
|
|
85
|
+
'.vue',
|
|
86
|
+
'.png',
|
|
87
|
+
'.css',
|
|
88
|
+
'.scss'
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
test: {
|
|
92
|
+
globals: true,
|
|
93
|
+
// globalSetup: ["./vitest/setup.ts"],
|
|
94
|
+
setupFiles: ['./test/setup-axios-mock.ts'],
|
|
95
|
+
environment: 'jsdom',
|
|
96
|
+
deps: {
|
|
97
|
+
inline: ['vuetify']
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
build: {
|
|
101
|
+
sourcemap: true
|
|
102
|
+
},
|
|
103
|
+
server: {
|
|
104
|
+
port: 3000
|
|
105
|
+
}
|
|
106
|
+
})
|