From 50eb339dc2a218d9c8e3ab4eecdac71a189eaf84 Mon Sep 17 00:00:00 2001 From: Michiel Gerritsen Date: Sat, 22 Jun 2024 20:52:03 +0200 Subject: [PATCH] Nuxt 3 --- .babelrc | 16 - .editorconfig | 13 - .eslintrc.js | 21 - .github/workflows/ci.yml | 3 - .gitignore | 104 +- .prettierrc | 4 - app.html | 12 - layouts/default.vue => app.vue | 2 +- assets/README.md | 7 - assets/css/tailwind.css | 11 - components/AdminGrid.vue | 128 +- components/BottomSidebar.vue | 20 +- components/DefineModelColumns.vue | 69 +- components/ModelColumn.vue | 111 +- components/ModelInformation.vue | 95 +- components/ModuleName.vue | 101 +- components/README.md | 7 - components/ScriptModal.vue | 54 +- components/TopSidebar.vue | 166 +- components/TreeItem.vue | 63 +- components/TreeView.vue | 17 +- cypress.config.ts | 4 +- cypress/e2e/data-models.cy.js | 1 + cypress/e2e/fields.cy.js | 2 + cypress/e2e/file-output.cy.js | 2 + cypress/index.d.ts | 18 +- cypress/support/commands.ts | 2 +- eslint.config.mjs | 6 + functions/xml.ts | 6 +- interfaces/GeneratesFileInterface.ts | 6 +- interfaces/TreeItemInterface.ts | 6 +- jest.config.js | 18 - jsconfig.json | 12 - layouts/README.md | 7 - middleware/README.md | 8 - nuxt.config.js | 68 - nuxt.config.ts | 12 + output/FileList.ts | 50 +- output/GeneratedFile.ts | 65 +- output/StateAware.ts | 62 +- output/listing/Column.ts | 2 +- output/listing/Columns.ts | 4 +- output/listing/DataArgument.ts | 2 +- output/listing/DataSource.ts | 2 +- output/listing/DbSchema.ts | 12 +- output/listing/DbSchemaWhitelist.ts | 22 +- output/listing/ListingTop.ts | 2 +- output/listing/NewButton.ts | 2 +- output/listing/Settings.ts | 2 +- output/listing/UiComponent.ts | 8 +- package.json | 65 +- pages/index.vue | 12 +- plugins/README.md | 7 - plugins/vuex-persist.js | 7 - public/favicon.ico | Bin 0 -> 4286 bytes renovate.json | 5 - run-cypress.sh | 4 +- server/tsconfig.json | 3 + store/README.md | 10 - store/admingrid.ts | 42 - store/download.ts | 14 - store/fathom.ts | 14 - store/model.ts | 25 - store/module.ts | 30 - store/table.ts | 50 - stores/admingridStore.ts | 55 + stores/downloadStore.ts | 20 + stores/fathomStore.ts | 20 + stores/modelStore.ts | 25 + stores/moduleStore.ts | 35 + stores/tableStore.ts | 64 + tailwind.config.js | 17 - test/TreeView.spec.js | 9 - tsconfig.json | 36 +- vue-code-highlight.d.ts | 1 - yarn.lock | 16163 ++++++++----------------- 76 files changed, 6207 insertions(+), 11963 deletions(-) delete mode 100644 .babelrc delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .prettierrc delete mode 100644 app.html rename layouts/default.vue => app.vue (70%) delete mode 100644 assets/README.md delete mode 100644 assets/css/tailwind.css delete mode 100644 components/README.md create mode 100644 eslint.config.mjs delete mode 100644 jest.config.js delete mode 100644 jsconfig.json delete mode 100644 layouts/README.md delete mode 100644 middleware/README.md delete mode 100644 nuxt.config.js create mode 100644 nuxt.config.ts delete mode 100644 plugins/README.md delete mode 100644 plugins/vuex-persist.js create mode 100644 public/favicon.ico delete mode 100644 renovate.json create mode 100644 server/tsconfig.json delete mode 100644 store/README.md delete mode 100644 store/admingrid.ts delete mode 100644 store/download.ts delete mode 100644 store/fathom.ts delete mode 100644 store/model.ts delete mode 100644 store/module.ts delete mode 100644 store/table.ts create mode 100644 stores/admingridStore.ts create mode 100644 stores/downloadStore.ts create mode 100644 stores/fathomStore.ts create mode 100644 stores/modelStore.ts create mode 100644 stores/moduleStore.ts create mode 100644 stores/tableStore.ts delete mode 100644 tailwind.config.js delete mode 100644 test/TreeView.spec.js delete mode 100644 vue-code-highlight.d.ts diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 84c2e570..00000000 --- a/.babelrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "env": { - "test": { - "presets": [ - [ - "@babel/preset-env", - { - "targets": { - "node": "current" - } - } - ] - ] - } - } -} diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 5d126348..00000000 --- a/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -# editorconfig.org -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 97c6a72f..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = { - root: true, - env: { - browser: true, - node: true, - }, - extends: [ - '@nuxtjs/eslint-config-typescript', - 'plugin:prettier/recommended', - 'plugin:nuxt/recommended', - ], - plugins: [], - // add your custom rules here - rules: {}, - overrides: [ - { - files: ['layouts/*.vue', 'pages/**/*.vue'], - rules: { 'vue/multi-word-component-names': 'off' }, - }, - ], -} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fdde93a..76f2f675 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,9 +40,6 @@ jobs: - name: Run linter ๐Ÿ‘€ run: yarn lint - - name: Run tests ๐Ÿงช - run: yarn test - - name: Run Cypress ๐ŸŒŽ run: yarn cypress diff --git a/.gitignore b/.gitignore index f16a210d..d47d716c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,93 +1,25 @@ -# Created by .ignore support plugin (hsz.mobi) -### Node template -# Logs -/logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# next.js build output -.next - -# nuxt.js build output +# Nuxt dev/build outputs +.output +.data .nuxt - -# Nuxt generate +.nitro +.cache dist -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless - -# IDE / Editor -.idea +# Node dependencies +node_modules -# Service worker -sw.* +# Logs +logs +*.log -# macOS +# Misc .DS_Store +.fleet +.idea -# Vim swap files -*.swp -.output/ -cypress/videos/ -cypress/screenshots/ +# Local env files +.env +.env.* +!.env.example +cypress/videos diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index b2095be8..00000000 --- a/.prettierrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "semi": false, - "singleQuote": true -} diff --git a/app.html b/app.html deleted file mode 100644 index 27af5dc2..00000000 --- a/app.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - {{ HEAD }} - {% if (process.env.NODE_ENV === 'production') { %} - - {% } %} - - - {{ APP }} - - diff --git a/layouts/default.vue b/app.vue similarity index 70% rename from layouts/default.vue rename to app.vue index 0acb4c79..2b1be090 100644 --- a/layouts/default.vue +++ b/app.vue @@ -1,5 +1,5 @@ diff --git a/assets/README.md b/assets/README.md deleted file mode 100644 index 34766f93..00000000 --- a/assets/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# ASSETS - -**This directory is not required, you can delete it if you don't want to use it.** - -This directory contains your un-compiled assets such as LESS, SASS, or JavaScript. - -More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked). diff --git a/assets/css/tailwind.css b/assets/css/tailwind.css deleted file mode 100644 index 785997be..00000000 --- a/assets/css/tailwind.css +++ /dev/null @@ -1,11 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -.heading { - @apply mt-6 text-lg leading-6 font-medium text-gray-900; -} - -.text { - @apply text-sm text-gray-500 leading-relaxed -} diff --git a/components/AdminGrid.vue b/components/AdminGrid.vue index 1fa87642..ec70dcb3 100644 --- a/components/AdminGrid.vue +++ b/components/AdminGrid.vue @@ -13,7 +13,7 @@ name="enabled" type="checkbox" class="focus:ring-green-500 h-4 w-4 text-green-400 border-gray-300 rounded" - /> + >
- diff --git a/components/ModelColumn.vue b/components/ModelColumn.vue index 598ef331..5fb4aded 100644 --- a/components/ModelColumn.vue +++ b/components/ModelColumn.vue @@ -16,7 +16,7 @@ stroke-linecap="round" stroke-linejoin="round" d="m4.5 15.75 7.5-7.5 7.5 7.5" - > + /> + /> @@ -50,8 +50,8 @@ v-model="fieldName" type="text" name="fieldname" - class="flex-1 block w-full focus:ring-green-500 focus:border-green-500 min-w-0 rounded sm:text-sm border-gray-300" - /> + class="block flex-1 py-2 px-3 m-0 w-full min-w-0 text-base leading-6 bg-white rounded border border-gray-300 border-solid appearance-none cursor-text sm:text-sm sm:leading-5 focus:border-blue-600 focus:outline-offset-2" + >
@@ -66,7 +66,7 @@ v-model="inputType" name="input_type" autocomplete="input_type" - class="flex-1 block w-full focus:ring-green-500 focus:border-green-500 min-w-0 rounded sm:text-sm border-gray-300" + class="block flex-1 py-2 px-3 m-0 w-full min-w-0 text-base leading-6 bg-white rounded border border-gray-300 border-solid appearance-none cursor-text sm:text-sm sm:leading-5 focus:border-blue-600 focus:outline-offset-2" > @@ -102,7 +102,7 @@ fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-11a1 1 0 10-2 0v2H7a1 1 0 100 2h2v2a1 1 0 102 0v-2h2a1 1 0 100-2h-2V7z" clip-rule="evenodd" - > + /> + />
- diff --git a/components/ModelInformation.vue b/components/ModelInformation.vue index 217d04a3..1adda035 100644 --- a/components/ModelInformation.vue +++ b/components/ModelInformation.vue @@ -14,10 +14,10 @@ type="text" name="modelName" placeholder="Model name" - class="flex-1 block w-full focus:ring-green-500 focus:border-green-500 min-w-0 rounded sm:text-sm border-gray-300" + class="block flex-1 py-2 px-3 m-0 w-full min-w-0 text-base leading-6 bg-white rounded border border-gray-300 border-solid appearance-none cursor-text sm:text-sm sm:leading-5 focus:border-blue-600 focus:outline-offset-2" @keypress="updateTableName()" @change="updateTableName()" - /> + > @@ -31,69 +31,58 @@ v-model="tableName" type="text" name="tablename" - class="flex-1 block w-full focus:ring-green-500 focus:border-green-500 min-w-0 rounded sm:text-sm border-gray-300" - /> + class="block flex-1 py-2 px-3 m-0 w-full min-w-0 text-base leading-6 bg-white rounded border border-gray-300 border-solid appearance-none cursor-text sm:text-sm sm:leading-5 focus:border-blue-600 focus:outline-offset-2" + > - diff --git a/components/ModuleName.vue b/components/ModuleName.vue index 6d7e1894..81a63fd4 100644 --- a/components/ModuleName.vue +++ b/components/ModuleName.vue @@ -8,7 +8,9 @@ Reset -

Module Definition

+

+ Module Definition +

@@ -22,8 +24,8 @@ type="text" name="vendor" placeholder="VendorNameExample" - class="flex-1 block w-full focus:ring-green-500 focus:border-green-500 min-w-0 rounded sm:text-sm border-gray-300" - /> + class="block flex-1 py-2 px-3 m-0 w-full min-w-0 text-base leading-6 bg-white rounded border border-gray-300 border-solid appearance-none cursor-text sm:text-sm sm:leading-5 focus:border-blue-600 focus:outline-offset-2" + >
@@ -38,8 +40,8 @@ type="text" name="module" placeholder="MyCustomModule" - class="flex-1 block w-full focus:ring-green-500 focus:border-green-500 min-w-0 rounded sm:text-sm border-gray-300" - /> + class="block flex-1 py-2 px-3 m-0 w-full min-w-0 text-base leading-6 bg-white rounded border border-gray-300 border-solid appearance-none cursor-text sm:text-sm sm:leading-5 focus:border-blue-600 focus:outline-offset-2" + > @@ -52,7 +54,7 @@ name="includeModuleRegistration" type="checkbox" class="focus:ring-green-500 h-4 w-4 text-green-400 border-gray-300 rounded" - /> + >
- diff --git a/components/README.md b/components/README.md deleted file mode 100644 index a079f106..00000000 --- a/components/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# COMPONENTS - -**This directory is not required, you can delete it if you don't want to use it.** - -The components directory contains your Vue.js Components. - -_Nuxt.js doesn't supercharge these components._ diff --git a/components/ScriptModal.vue b/components/ScriptModal.vue index 7f119e03..f0d4b303 100644 --- a/components/ScriptModal.vue +++ b/components/ScriptModal.vue @@ -13,7 +13,7 @@ class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true" @click="$emit('close')" - > + />