Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade all deps including common-admin #191

Merged
merged 4 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 0 additions & 57 deletions .eslintrc.cjs

This file was deleted.

69 changes: 69 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import stylistic from '@stylistic/eslint-plugin'
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
import vueTsEslintConfig from '@vue/eslint-config-typescript'
import pluginVue from 'eslint-plugin-vue'

export default [
{
name: 'app/files-to-lint',
files: ['**/*.{ts,mts,tsx,vue}'],
},
{
name: 'app/files-to-ignore',
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**', '.stylelintrc.js', '**/cypress/**'],
},
...pluginVue.configs['flat/essential'],
...vueTsEslintConfig(),
{
plugins: {
'@stylistic': stylistic,
},
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'vue/script-setup-uses-vars': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@stylistic/semi': ['error', 'never'],
'@stylistic/quotes': ['error', 'single', 'avoid-escape'],
'vue/multi-word-component-names': [
'error',
{
ignores: ['Acl'],
},
],
'vue/valid-v-slot': ['error', { allowModifiers: true }],
'@stylistic/object-curly-spacing': ['error', 'always'],
'@stylistic/no-multiple-empty-lines': ['error', { max: 1, maxEOF: 1 }],
'@stylistic/no-trailing-spaces': 'error',
'@stylistic/comma-dangle': ['error', 'only-multiline'],
'@stylistic/max-len': [
'error',
{
code: 120,
ignoreTrailingComments: true,
ignoreUrls: true,
ignoreRegExpLiterals: true,
ignorePattern: '^import .*',
},
],
'vue/no-template-target-blank': ['error'],
'vue/block-order': ['error', { order: [['script', 'template'], 'style'] }],
'vue/define-macros-order': ['error'],
'vue/component-name-in-template-casing': ['error'],
'vue/component-api-style': ['error'],
'vue/prefer-define-options': ['error'],
'vue/require-typed-ref': ['error'],
'vue/no-setup-props-reactivity-loss': ['error'],
'vue/no-ref-object-reactivity-loss': ['error'],
'@typescript-eslint/no-unused-vars': [
'error',
{
caughtErrors: 'none',
},
],
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
},
},
skipFormatting,
]
69 changes: 33 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adam-admin",
"packageManager": "yarn@4.3.1",
"packageManager": "yarn@4.5.1",
"license": "Apache-2.0",
"version": "0.0.1",
"scripts": {
Expand All @@ -12,69 +12,66 @@
"ci": "run-s --print-name lint:tsc lint:eslint lint:stylelint",
"lint": "yarn ci",
"lint:tsc": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
"lint:eslint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore",
"lint:eslint:fix": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"lint:eslint": "eslint",
"lint:eslint:fix": "eslint --fix",
"lint:stylelint": "stylelint **/*.{scss,vue}",
"lint:stylelint:fix": "stylelint **/*.{scss,vue} --fix",
"lint:prettier": "prettier -c \"src/**/*.{ts,vue}\"",
"lint:prettier:fix": "prettier -w \"src/**/*.{ts,vue}\"",
"cy:open": "CYPRESS_CACHE_FOLDER='node_modules/.cache/Cypress' yarn cypress open -C cypress/config/cypress.config.ts"
},
"dependencies": {
"@anzusystems/common-admin": "1.47.0-beta.14",
"@anzusystems/common-admin": "1.47.0-beta.68",
"@mdi/font": "7.4.47",
"@vuelidate/core": "^2.0.3",
"@vuelidate/validators": "^2.0.4",
"@vueuse/core": "10.11.0",
"@vueuse/integrations": "10.11.0",
"@vueuse/core": "11.1.0",
"@vueuse/integrations": "11.1.0",
"axios": "^1.7.7",
"cropperjs": "^1.6.2",
"jwt-decode": "^4.0.0",
"pinia": "^2.1.7",
"pinia": "^2.2.4",
"rusha": "^0.8.14",
"socket.io-client": "^4.7.5",
"sortablejs": "^1.15.2",
"universal-cookie": "^7.1.4",
"socket.io-client": "^4.8.0",
"sortablejs": "^1.15.3",
"universal-cookie": "^7.2.1",
"uuid": "^10.0.0",
"vue": "3.4.31",
"vue-i18n": "^9.13.1",
"vue-router": "^4.4.0",
"vuetify": "^3.6.11"
"vue": "3.5.12",
"vue-i18n": "^10.0.4",
"vue-router": "^4.4.5",
"vuetify": "^3.7.3"
},
"devDependencies": {
"@cypress/grep": "^4.1.0",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@rushstack/eslint-patch": "^1.10.3",
"@stylistic/eslint-plugin": "^2.3.0",
"@intlify/unplugin-vue-i18n": "^5.2.0",
"@stylistic/eslint-plugin": "^2.9.0",
"@tsconfig/node18": "^18.2.4",
"@types/node": "^20.14.9",
"@types/node": "^20.16.13",
"@types/rusha": "^0.8.3",
"@types/sortablejs": "^1.15.8",
"@types/uuid": "^10.0.0",
"@typescript-eslint/parser": "^7.15.0",
"@vitejs/plugin-vue": "^5.0.5",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^13.0.0",
"@vue/language-server": "^1.8.27",
"@vue/language-service": "^1.8.27",
"@vitejs/plugin-vue": "^5.1.4",
"@vue/eslint-config-prettier": "^10.0.0",
"@vue/eslint-config-typescript": "^14.1.1",
"@vue/language-server": "2.1.6",
"@vue/tsconfig": "^0.5.1",
"cypress": "^13.13.0",
"cypress": "^13.15.0",
"cypress-downloadfile": "1.2.4",
"cypress-mochawesome-reporter": "^3.8.2",
"eslint": "8.57.0",
"eslint-plugin-cypress": "^3.3.0",
"eslint-plugin-vue": "^9.27.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.39",
"eslint": "9.13.0",
"eslint-plugin-vue": "^9.29.0",
"npm-run-all2": "^6.2.4",
"postcss": "^8.4.47",
"postcss-html": "^1.7.0",
"prettier": "^3.3.2",
"sass": "^1.77.6",
"stylelint": "^16.6.1",
"prettier": "^3.3.3",
"sass": "^1.80.3",
"stylelint": "^16.10.0",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard-scss": "^13.1.0",
"typescript": "5.4.5",
"vite": "^5.4.8",
"vite-plugin-vuetify": "^2.0.3",
"vue-tsc": "2.0.24"
"unplugin": "^1.14.1",
"vite": "^5.4.9",
"vite-plugin-vuetify": "^2.0.4",
"vue-tsc": "2.1.6"
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script lang="ts" setup>
import { ACustomDataForm, type DamAssetType, isUndefined, useDamConfigState } from '@anzusystems/common-admin'
import { computed } from 'vue'
import { useCurrentExtSystem } from '@/composables/system/currentExtSystem'
import { damClient } from '@/services/api/clients/damClient'
import { ACustomDataForm, type DamAssetTypeType, isUndefined, useDamConfigState } from '@anzusystems/common-admin'
import { computed } from 'vue'

const props = withDefaults(
defineProps<{
assetType: DamAssetType
assetType: DamAssetTypeType
modelValue: { [key: string]: any }
dataCy?: string
}>(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
<script lang="ts" setup>
import { type DamAssetType, isUndefined } from '@anzusystems/common-admin'
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { ACustomDataFormElement, useDamConfigState } from '@anzusystems/common-admin'
import { useCurrentExtSystem } from '@/composables/system/currentExtSystem'
import { damClient } from '@/services/api/clients/damClient'
import { ACustomDataFormElement, type DamAssetTypeType, isUndefined, useDamConfigState } from '@anzusystems/common-admin'
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'

const props = withDefaults(
defineProps<{
assetType: DamAssetType
assetType: DamAssetTypeType
modelValue: { [key: string]: any }
}>(),
{}
)

const emit = defineEmits<{
(e: 'update:modelValue', data: any): void
(e: 'fillEmptyField', data: { assetType: DamAssetType; elementProperty: string; value: any }): void
(e: 'replaceField', data: { assetType: DamAssetType; elementProperty: string; value: any }): void
(e: 'fillEmptyField', data: { assetType: DamAssetTypeType; elementProperty: string; value: any }): void
(e: 'replaceField', data: { assetType: DamAssetTypeType; elementProperty: string; value: any }): void
}>()

const { t } = useI18n()
Expand Down
11 changes: 6 additions & 5 deletions src/components/filter/FilterClosestColor.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<script lang="ts" setup>
import { pickTextColorBasedOnBgColor } from '@/utils/colors'
import {
arrayItemToggle,
cloneDeep,
type Filter,
isArray,
useDamConfigState,
useFilterHelpers,
useDamConfigStore,
useFilterHelpers
} from '@anzusystems/common-admin'
import { storeToRefs } from 'pinia'
import { computed } from 'vue'
import { pickTextColorBasedOnBgColor } from '@/utils/colors'
import { useI18n } from 'vue-i18n'
import { damClient } from '@/services/api/clients/damClient'

const props = withDefaults(
defineProps<{
Expand All @@ -36,7 +36,8 @@ const value = computed({
},
})

const { damPrvConfig } = useDamConfigState(damClient)
const damConfigStore = useDamConfigStore()
const { damPrvConfig } = storeToRefs(damConfigStore)

const items = computed(() => {
return Object.keys(damPrvConfig.value.colorSet).map((key) => ({
Expand Down
2 changes: 1 addition & 1 deletion src/composables/auth/auth.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SYSTEM_DAM } from '@/model/systems'
import { defineAuth } from '@anzusystems/common-admin'
import { SYSTEM_CORE_DAM, SYSTEM_DAM } from '@/model/systems'

export const ACL = {
DAM_ASSET_CREATE: 'dam_asset_create',
Expand Down
22 changes: 11 additions & 11 deletions src/composables/system/appInitialize.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { useCookies } from '@vueuse/integrations/useCookies'
import { ref } from 'vue'
import type { NavigationGuardNext, RouteLocationNormalized } from 'vue-router'
import { isDefined, isUndefined, useDamConfigState } from '@anzusystems/common-admin'
import { ROUTE } from '@/router/routes'
import { checkAbility } from '@/router/checkAbility'
import { envConfig } from '@/services/EnvConfigService'
import { initCurrentExtSystemAndLicence, useCurrentExtSystem } from '@/composables/system/currentExtSystem'
import { useAuth } from '@/composables/auth/auth'
import { initAppNotificationListeners } from '@/composables/system/appNotificationListeners'
import { initCurrentExtSystemAndLicence, useCurrentExtSystem } from '@/composables/system/currentExtSystem'
import { useLoginStatus } from '@/composables/system/loginStatus'
import { damClient } from '@/services/api/clients/damClient'
import { useAuth } from '@/composables/auth/auth'
import { SYSTEM_DAM } from '@/model/systems'
import { checkAbility } from '@/router/checkAbility'
import { ROUTE } from '@/router/routes'
import { damClient } from '@/services/api/clients/damClient'
import { envConfig } from '@/services/EnvConfigService'
import { isDefined, isUndefined, useDamConfigState } from '@anzusystems/common-admin'
import { useCookies } from '@vueuse/integrations/useCookies'
import { ref } from 'vue'
import type { NavigationGuardNext, RouteLocationNormalized } from 'vue-router'

const initialized = ref(false)

Expand All @@ -27,7 +27,7 @@ export async function createAppInitialize(
const { fetchCurrentUser, currentUser } = useCurrentUser(SYSTEM_DAM)

try {
const updateCurrentUserPromise = fetchCurrentUser(damClient)
const updateCurrentUserPromise = fetchCurrentUser(damClient, '/adm/users/current')
const loadDamConfigPromise = loadDamPrvConfig()
await Promise.allSettled([updateCurrentUserPromise, loadDamConfigPromise])
} catch (error) {
Expand Down
10 changes: 5 additions & 5 deletions src/composables/system/appNotificationListeners.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { useUploadQueuesStore } from '@/stores/coreDam/uploadQueuesStore'
import { useAuth } from '@/composables/auth/auth'
import { SYSTEM_DAM } from '@/model/systems'
import { damClient } from '@/services/api/clients/damClient'
import { useDistributionListStore } from '@/stores/coreDam/distributionListStore'
import { useUploadQueuesStore } from '@/stores/coreDam/uploadQueuesStore'
import {
DamDistributionStatus,
DamNotificationName,
initDamNotifications,
useDamNotifications,
} from '@anzusystems/common-admin'
import { damClient } from '@/services/api/clients/damClient'
import { useAuth } from '@/composables/auth/auth'
import { SYSTEM_CORE_DAM, SYSTEM_DAM } from '@/model/systems'

export const initAppNotificationListeners = () => {
const { openConnection } = initDamNotifications()
Expand Down Expand Up @@ -50,7 +50,7 @@ export const initAppNotificationListeners = () => {
case DamNotificationName.UserUpdated: {
const { useCurrentUser } = useAuth()
const { fetchCurrentUser } = useCurrentUser(SYSTEM_DAM)
fetchCurrentUser(damClient)
fetchCurrentUser(damClient, '/adm/users/current')
break
}
}
Expand Down
Loading
Loading