@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,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files": [
|
|
3
|
+
"README.md"
|
|
4
|
+
],
|
|
5
|
+
"imageSize": 100,
|
|
6
|
+
"commit": false,
|
|
7
|
+
"contributors": [
|
|
8
|
+
{
|
|
9
|
+
"login": "davidzwa",
|
|
10
|
+
"name": "David Zwart",
|
|
11
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/6005355?v=4",
|
|
12
|
+
"profile": "https://github.com/davidzwa",
|
|
13
|
+
"contributions": [
|
|
14
|
+
"bug",
|
|
15
|
+
"code",
|
|
16
|
+
"maintenance",
|
|
17
|
+
"userTesting"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"login": "Abdullah-Abuzaid",
|
|
22
|
+
"name": "Abdullah Abuzaid",
|
|
23
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/61384954?v=4",
|
|
24
|
+
"profile": "https://github.com/Abdullah-Abuzaid",
|
|
25
|
+
"contributions": [
|
|
26
|
+
"code",
|
|
27
|
+
"bug"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"login": "timmiedinnie",
|
|
32
|
+
"name": "Tim Dinh",
|
|
33
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/3026022?v=4",
|
|
34
|
+
"profile": "https://github.com/timmiedinnie",
|
|
35
|
+
"contributions": [
|
|
36
|
+
"code"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"login": "WindArrow3d",
|
|
41
|
+
"name": "WindArrow3d",
|
|
42
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/91099282?v=4",
|
|
43
|
+
"profile": "https://github.com/WindArrow3d",
|
|
44
|
+
"contributions": [
|
|
45
|
+
"bug"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"contributorsPerLine": 7,
|
|
50
|
+
"projectName": "fdm-monster-client",
|
|
51
|
+
"projectOwner": "fdm-monster",
|
|
52
|
+
"repoType": "github",
|
|
53
|
+
"repoHost": "https://github.com",
|
|
54
|
+
"skipCi": true,
|
|
55
|
+
"commitType": "docs",
|
|
56
|
+
"commitConvention": "angular"
|
|
57
|
+
}
|
package/.browserslistrc
ADDED
package/.editorconfig
ADDED
package/.env
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
BASE_URL=/
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"globals": {
|
|
3
|
+
"Component": true,
|
|
4
|
+
"ComponentPublicInstance": true,
|
|
5
|
+
"ComputedRef": true,
|
|
6
|
+
"EffectScope": true,
|
|
7
|
+
"ExtractDefaultPropTypes": true,
|
|
8
|
+
"ExtractPropTypes": true,
|
|
9
|
+
"ExtractPublicPropTypes": true,
|
|
10
|
+
"InjectionKey": true,
|
|
11
|
+
"PropType": true,
|
|
12
|
+
"Ref": true,
|
|
13
|
+
"VNode": true,
|
|
14
|
+
"WritableComputedRef": true,
|
|
15
|
+
"computed": true,
|
|
16
|
+
"createApp": true,
|
|
17
|
+
"customRef": true,
|
|
18
|
+
"defineAsyncComponent": true,
|
|
19
|
+
"defineComponent": true,
|
|
20
|
+
"effectScope": true,
|
|
21
|
+
"getCurrentInstance": true,
|
|
22
|
+
"getCurrentScope": true,
|
|
23
|
+
"h": true,
|
|
24
|
+
"inject": true,
|
|
25
|
+
"isProxy": true,
|
|
26
|
+
"isReactive": true,
|
|
27
|
+
"isReadonly": true,
|
|
28
|
+
"isRef": true,
|
|
29
|
+
"markRaw": true,
|
|
30
|
+
"nextTick": true,
|
|
31
|
+
"onActivated": true,
|
|
32
|
+
"onBeforeMount": true,
|
|
33
|
+
"onBeforeUnmount": true,
|
|
34
|
+
"onBeforeUpdate": true,
|
|
35
|
+
"onDeactivated": true,
|
|
36
|
+
"onErrorCaptured": true,
|
|
37
|
+
"onMounted": true,
|
|
38
|
+
"onRenderTracked": true,
|
|
39
|
+
"onRenderTriggered": true,
|
|
40
|
+
"onScopeDispose": true,
|
|
41
|
+
"onServerPrefetch": true,
|
|
42
|
+
"onUnmounted": true,
|
|
43
|
+
"onUpdated": true,
|
|
44
|
+
"provide": true,
|
|
45
|
+
"reactive": true,
|
|
46
|
+
"readonly": true,
|
|
47
|
+
"ref": true,
|
|
48
|
+
"resolveComponent": true,
|
|
49
|
+
"shallowReactive": true,
|
|
50
|
+
"shallowReadonly": true,
|
|
51
|
+
"shallowRef": true,
|
|
52
|
+
"toRaw": true,
|
|
53
|
+
"toRef": true,
|
|
54
|
+
"toRefs": true,
|
|
55
|
+
"toValue": true,
|
|
56
|
+
"triggerRef": true,
|
|
57
|
+
"unref": true,
|
|
58
|
+
"useAttrs": true,
|
|
59
|
+
"useCssModule": true,
|
|
60
|
+
"useCssVars": true,
|
|
61
|
+
"useRoute": true,
|
|
62
|
+
"useRouter": true,
|
|
63
|
+
"useSlots": true,
|
|
64
|
+
"watch": true,
|
|
65
|
+
"watchEffect": true,
|
|
66
|
+
"watchPostEffect": true,
|
|
67
|
+
"watchSyncEffect": true,
|
|
68
|
+
"onWatcherCleanup": true,
|
|
69
|
+
"useId": true,
|
|
70
|
+
"useModel": true,
|
|
71
|
+
"useTemplateRef": true
|
|
72
|
+
}
|
|
73
|
+
}
|
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* .eslint.js
|
|
3
|
+
*
|
|
4
|
+
* ESLint configuration file.
|
|
5
|
+
*/
|
|
6
|
+
module.exports = {
|
|
7
|
+
root: true,
|
|
8
|
+
env: {
|
|
9
|
+
node: true
|
|
10
|
+
},
|
|
11
|
+
parser: 'vue-eslint-parser',
|
|
12
|
+
parserOptions: {
|
|
13
|
+
parser: '@typescript-eslint/parser'
|
|
14
|
+
},
|
|
15
|
+
plugins: ['vue', 'prettier'],
|
|
16
|
+
extends: [
|
|
17
|
+
'plugin:@typescript-eslint/recommended',
|
|
18
|
+
'eslint:recommended',
|
|
19
|
+
'@vue/eslint-config-typescript',
|
|
20
|
+
'plugin:vue/vue3-recommended',
|
|
21
|
+
'prettier',
|
|
22
|
+
'plugin:vuetify/base'
|
|
23
|
+
],
|
|
24
|
+
rules: {
|
|
25
|
+
'vue/multi-word-component-names': 'off',
|
|
26
|
+
'prettier/prettier': ['error'],
|
|
27
|
+
// Note: you must disable the base rule as it can report incorrect errors
|
|
28
|
+
// Bye bye useless characters
|
|
29
|
+
// semi: ['error', 'never'],
|
|
30
|
+
// '@typescript-eslint/semi': ['error', 'never'],
|
|
31
|
+
// // "vue/multiline-"
|
|
32
|
+
// 'vue/singleline-html-element-content-newline': [
|
|
33
|
+
// 'error',
|
|
34
|
+
// {
|
|
35
|
+
// ignoreWhenNoAttributes: false,
|
|
36
|
+
// ignoreWhenEmpty: true,
|
|
37
|
+
// ignores: ['pre', 'textarea', 'v-icon'],
|
|
38
|
+
// externalIgnores: []
|
|
39
|
+
// }
|
|
40
|
+
// ],
|
|
41
|
+
'vue/html-self-closing': [
|
|
42
|
+
'error',
|
|
43
|
+
{
|
|
44
|
+
html: {
|
|
45
|
+
void: 'always',
|
|
46
|
+
normal: 'always',
|
|
47
|
+
component: 'always'
|
|
48
|
+
},
|
|
49
|
+
svg: 'always',
|
|
50
|
+
math: 'always'
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
// // Enforce certain multiline behavior
|
|
54
|
+
// 'vue/multiline-html-element-content-newline': [
|
|
55
|
+
// 'error',
|
|
56
|
+
// {
|
|
57
|
+
// ignoreWhenEmpty: true,
|
|
58
|
+
// ignores: ['pre', 'textarea'],
|
|
59
|
+
// allowEmptyLines: false
|
|
60
|
+
// }
|
|
61
|
+
// ],
|
|
62
|
+
// // Clear empty lines proactively, is very rough
|
|
63
|
+
// 'no-multiple-empty-lines': [
|
|
64
|
+
// 'warn',
|
|
65
|
+
// {
|
|
66
|
+
// max: 1
|
|
67
|
+
// }
|
|
68
|
+
// ],
|
|
69
|
+
// // This rule is left like the default, just for showing why formatting is the way it is
|
|
70
|
+
// 'vue/html-indent': [
|
|
71
|
+
// 'error',
|
|
72
|
+
// 2,
|
|
73
|
+
// {
|
|
74
|
+
// attribute: 1,
|
|
75
|
+
// baseIndent: 1,
|
|
76
|
+
// closeBracket: 0,
|
|
77
|
+
// alignAttributesVertically: true,
|
|
78
|
+
// ignores: []
|
|
79
|
+
// }
|
|
80
|
+
// ],
|
|
81
|
+
// 'vue/html-closing-bracket-newline': [
|
|
82
|
+
// 'error',
|
|
83
|
+
// {
|
|
84
|
+
// singleline: 'never',
|
|
85
|
+
// multiline: 'never',
|
|
86
|
+
// selfClosingTag: {
|
|
87
|
+
// singleline: 'never',
|
|
88
|
+
// multiline: 'never'
|
|
89
|
+
// }
|
|
90
|
+
// }
|
|
91
|
+
// ]
|
|
92
|
+
// 'vue/new-line-between-multi-line-property': [
|
|
93
|
+
// 'error',
|
|
94
|
+
// {
|
|
95
|
+
// minLineOfMultilineProperty: 2
|
|
96
|
+
// }
|
|
97
|
+
// ],
|
|
98
|
+
'vue/block-lang': [
|
|
99
|
+
'error',
|
|
100
|
+
{
|
|
101
|
+
script: {
|
|
102
|
+
lang: 'ts'
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
'vue/no-unused-vars': ['error', {}],
|
|
107
|
+
// // Throws an error ast undefined
|
|
108
|
+
// '@typescript-eslint/no-unused-vars': ['off'],
|
|
109
|
+
'vue/no-ref-object-reactivity-loss': ['error']
|
|
110
|
+
// "vue/no-undef-components": ["error", {
|
|
111
|
+
// "ignorePatterns": []
|
|
112
|
+
// }],
|
|
113
|
+
// 'vue/require-typed-object-prop': 'error',
|
|
114
|
+
// 'vue/valid-v-on': [
|
|
115
|
+
// 'error',
|
|
116
|
+
// {
|
|
117
|
+
// modifiers: []
|
|
118
|
+
// }
|
|
119
|
+
// ],
|
|
120
|
+
// Let prettier fix this
|
|
121
|
+
// quotes: ['error', 'single'],
|
|
122
|
+
// '@typescript-eslint/indent': ['error', 2],
|
|
123
|
+
// // {var:val} in f.e. template activator
|
|
124
|
+
// 'vue/object-curly-spacing': 'error',
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
name: Dist Release
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- 'develop'
|
|
6
|
+
- 'main'
|
|
7
|
+
- 'release/*' # Add this line to include all release branches
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
checkversion:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
outputs:
|
|
13
|
+
foundClientVersion: ${{ steps.init.outputs.foundClientVersion }}
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- name: get-client-version
|
|
17
|
+
# https://gist.github.com/DarrenN/8c6a5b969481725a4413?permalink_comment_id=3863317#gistcomment-3863317
|
|
18
|
+
run: |
|
|
19
|
+
echo "CLIENT_VERSION=$(npm pkg get version | sed 's/"//g')" >> $GITHUB_ENV
|
|
20
|
+
- uses: mukunku/tag-exists-action@v1.6.0
|
|
21
|
+
id: checkTag
|
|
22
|
+
with:
|
|
23
|
+
tag: ${{ env.CLIENT_VERSION }}
|
|
24
|
+
- run: echo ${{ steps.checkTag.outputs.exists }}
|
|
25
|
+
- name: Environment variables to output
|
|
26
|
+
id: init
|
|
27
|
+
run: |
|
|
28
|
+
echo "foundClientVersion=${{ steps.checkTag.outputs.exists }}" >> $GITHUB_OUTPUT
|
|
29
|
+
|
|
30
|
+
publish:
|
|
31
|
+
needs: checkversion
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
environment: npm-release
|
|
34
|
+
if: needs.checkversion.outputs.foundClientVersion == 'false'
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v4
|
|
37
|
+
- uses: actions/setup-node@v4
|
|
38
|
+
with:
|
|
39
|
+
node-version: 20.x
|
|
40
|
+
|
|
41
|
+
# https://stackoverflow.com/questions/57968497/how-do-i-set-an-env-var-with-a-bash-expression-in-github-actions
|
|
42
|
+
- name: get-client-version
|
|
43
|
+
# https://gist.github.com/DarrenN/8c6a5b969481725a4413?permalink_comment_id=3863317#gistcomment-3863317
|
|
44
|
+
run: |
|
|
45
|
+
echo "CLIENT_VERSION=$(npm pkg get version | sed 's/"//g')" >> $GITHUB_ENV
|
|
46
|
+
|
|
47
|
+
# Build bundle
|
|
48
|
+
- run: yarn set version berry
|
|
49
|
+
- run: yarn install --immutable
|
|
50
|
+
- run: yarn run build
|
|
51
|
+
|
|
52
|
+
# Clear fields that make installing harder
|
|
53
|
+
- name: Replace JSON Value
|
|
54
|
+
run: |
|
|
55
|
+
jq '.dependencies = {}' package.json > tmp.json && mv tmp.json package.json
|
|
56
|
+
jq '.devDependencies = {}' package.json > tmp.json && mv tmp.json package.json
|
|
57
|
+
- name: Output package.json
|
|
58
|
+
run: |
|
|
59
|
+
cat package.json
|
|
60
|
+
|
|
61
|
+
# Publish to NPM
|
|
62
|
+
- uses: JS-DevTools/npm-publish@v3
|
|
63
|
+
with:
|
|
64
|
+
token: ${{ secrets.NPM_TOKEN }}
|
|
65
|
+
package: package.json
|
|
66
|
+
|
|
67
|
+
# Create GitHub release
|
|
68
|
+
- name: Create release
|
|
69
|
+
uses: actions/create-release@v1
|
|
70
|
+
id: create_release
|
|
71
|
+
with:
|
|
72
|
+
draft: false
|
|
73
|
+
prerelease: ${{ contains(env.CLIENT_VERSION, 'rc') || contains(env.CLIENT_VERSION, 'unstable') }}
|
|
74
|
+
release_name: "fdm-monster-client-next ${{ env.CLIENT_VERSION }}"
|
|
75
|
+
tag_name: ${{ env.CLIENT_VERSION }}
|
|
76
|
+
body: "Release notes not added" # ${{ steps.build_changelog.outputs.changelog }}
|
|
77
|
+
env:
|
|
78
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
79
|
+
|
|
80
|
+
- name: action-zip
|
|
81
|
+
uses: montudor/action-zip@v1.0.0
|
|
82
|
+
with:
|
|
83
|
+
args: zip -qq -r dist-client-${{ env.CLIENT_VERSION }}.zip dist ./package.json
|
|
84
|
+
|
|
85
|
+
- name: Upload client bundle zip
|
|
86
|
+
uses: actions/upload-release-asset@v1
|
|
87
|
+
env:
|
|
88
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
89
|
+
with:
|
|
90
|
+
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
91
|
+
asset_path: dist-client-${{ env.CLIENT_VERSION }}.zip
|
|
92
|
+
asset_name: dist-client-${{ env.CLIENT_VERSION }}.zip
|
|
93
|
+
asset_content_type: application/zip
|
|
94
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Vue publish
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- 'main'
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
- uses: actions/setup-node@v4
|
|
13
|
+
with:
|
|
14
|
+
node-version: 20.x
|
|
15
|
+
cache: 'yarn'
|
|
16
|
+
|
|
17
|
+
- run: yarn set version berry
|
|
18
|
+
- run: yarn install --immutable
|
|
19
|
+
- run: yarn run build
|
|
20
|
+
- run: yarn run test:unit
|
|
21
|
+
- uses: JS-DevTools/npm-publish@v3
|
|
22
|
+
if: ${{ github.repository.name == 'fdm-monster-client' }}
|
|
23
|
+
with:
|
|
24
|
+
dry-run: true
|
|
25
|
+
token: ${{ secrets.NPM_TOKEN }}
|
|
26
|
+
package: package.json
|
package/.prettierignore
ADDED
package/.prettierrc.cjs
ADDED