vue-cli-plugin-access
Advanced tools
Comparing version 1.2.4 to 1.4.0
module.exports = (api, opts, rootOptions) => { | ||
api.render({ | ||
'./.env': './templates/_env', | ||
'./pre-serve': './templates/pre-serve', | ||
'./pre-commit': './templates/pre-commit', | ||
'./pre-serve': './templates/pre-serve', | ||
'./vue.config.js': './templates/vue.config.js', | ||
'./public/index.html': './templates/public/index.html', | ||
'./public/favicon.ico': './templates/public/favicon.ico', | ||
'./.circleci/config.yml': './templates/.circleci/config.yml', | ||
'./src/assets/fundo_site.jpg': './templates/src/assets/fundo_site.jpg', | ||
'./public/apple-touch-icon.png': './templates/public/apple-touch-icon.png', | ||
'./src/assets/404_images/404.png': './templates/src/assets/404_images/404.png', | ||
'./public/android-chrome-144x144.png': './templates/public/android-chrome-144x144.png', | ||
'./src/assets/404_images/404_cloud.png': './templates/src/assets/404_images/404_cloud.png', | ||
'./src/assets/fundo_site.jpg': './templates/src/assets/fundo_site.jpg', | ||
'./public/android-chrome-144x144.png': './templates/public/android-chrome-144x144.png', | ||
'./public/apple-touch-icon.png': './templates/public/apple-touch-icon.png', | ||
'./public/browserconfig.xml': './templates/public/browserconfig.xml', | ||
'./public/favicon-16x16.png': './templates/public/favicon-16x16.png', | ||
'./public/favicon-32x32.png': './templates/public/favicon-32x32.png', | ||
'./public/favicon.ico': './templates/public/favicon.ico', | ||
'./public/index.html': './templates/public/index.html', | ||
'./public/mstile-150x150.png': './templates/public/mstile-150x150.png', | ||
'./public/safari-pinned-tab.svg': './templates/public/safari-pinned-tab.svg', | ||
'./public/site.webmanifest': './templates/public/site.webmanifest', | ||
'./src/components/A55Logo.vue': './templates/src/components/A55Logo.vue', | ||
'./src/components/ChartCard.vue': './templates/src/components/ChartCard.vue', | ||
'./src/graphql/Example.gql': './templates/src/graphql/Example.gql', | ||
'./src/graphql/access/Clients.gql': './templates/src/graphql/access/Clients.gql', | ||
'./src/graphql/monitor/Alerts.gql': './templates/src/graphql/monitor/Alerts.gql', | ||
'./src/plugins/apollo.js': './templates/src/plugins/apollo.js', | ||
'./src/plugins/axios.js': './templates/src/plugins/axios.js', | ||
'./src/plugins/element.js': './templates/src/plugins/element.js', | ||
'./src/plugins/event-bus.js': './templates/src/plugins/event-bus.js', | ||
'./src/plugins/i18n.js': './templates/src/plugins/i18n.js', | ||
'./src/plugins/pt_BR.js': './templates/src/plugins/pt_BR.js', | ||
'./src/plugins/index.js': './templates/src/plugins/index.js', | ||
'./src/plugins/money.js': './templates/src/plugins/money.js', | ||
'./src/plugins/axios.js': './templates/src/plugins/axios.js', | ||
'./src/plugins/moment.js': './templates/src/plugins/moment.js', | ||
'./src/plugins/moment.js': './templates/src/plugins/moment.js', | ||
'./src/plugins/pt_BR.js': './templates/src/plugins/pt_BR.js', | ||
'./src/plugins/apollo.js': './templates/src/plugins/apollo.js', | ||
'./src/plugins/element.js': './templates/src/plugins/element.js', | ||
'./src/plugins/event-bus.js': './templates/src/plugins/event-bus.js', | ||
'./src/plugins/permissions.js': './templates/src/plugins/permissions.js', | ||
@@ -48,3 +49,2 @@ | ||
'./src/views/Dashboard.vue': './templates/src/views/Dashboard.vue', | ||
'./src/views/Example.vue': './templates/src/views/Example.vue', | ||
'./src/views/NotFound.vue': './templates/src/views/NotFound.vue', | ||
@@ -77,6 +77,7 @@ './src/views/Private.vue': './templates/src/views/Private.vue', | ||
"nprogress": "^0.2.0", | ||
"plotly.js": "^1.44.1", | ||
"plotly.js": "^1.42.5", | ||
"v-money": "^0.8.1", | ||
"vue-apollo": "^3.0.0-beta.27", | ||
"vue-i18n": "^8.7.0", | ||
"vue-moment": "^4.0.0", | ||
"vue-router": "^3.0.1", | ||
@@ -88,7 +89,16 @@ "vuex": "^3.0.1", | ||
devDependencies: { | ||
'sass-loader': '^7.0.3', | ||
"@vue/cli-plugin-babel": "^3.4.0", | ||
"@vue/cli-plugin-eslint": "^3.4.0", | ||
"@vue/cli-service": "^3.4.0", | ||
"babel-eslint": "^10.0.1", | ||
"eslint": "^5.8.0", | ||
"eslint-plugin-graphql": "^3.0.1", | ||
"eslint-plugin-vue": "^5.0.0", | ||
"graphql-tag": "^2.10.1", | ||
"node-sass": "^4.9.2", | ||
"sass-loader": "^7.0.3", | ||
"vue-cli-plugin-access": "^1.2.0", | ||
"vue-cli-plugin-apollo": "^0.19.1", | ||
"graphql-tag": "^2.10.1", | ||
'node-sass': '^4.9.2' | ||
"vue-cli-plugin-s3-deploy": "^3.0.0", | ||
"vue-template-compiler": "^2.5.21" | ||
}, | ||
@@ -95,0 +105,0 @@ gitHooks: { |
@@ -7,2 +7,3 @@ import Vue from 'vue' | ||
import createProvider from "./plugins/apollo"; | ||
import i18n from "./plugins/i18n"; | ||
@@ -15,3 +16,4 @@ Vue.config.productionTip = false | ||
store, | ||
i18n, | ||
apolloProvider: createProvider(), | ||
}).$mount('#app') |
@@ -12,35 +12,58 @@ import Vue from "vue"; | ||
const defaultOptions = { | ||
getAuth: () => `Token ${store.getters[types.AUTH_TOKEN]}`, | ||
defaultHttpLink: false, | ||
link: createUploadLink({ | ||
uri: process.env.VUE_APP_MONITOR_GRAPHQL_URL | ||
}), | ||
cache: new InMemoryCache() | ||
getAuth: () => `Token ${store.getters[types.AUTH_TOKEN]}`, | ||
defaultHttpLink: false, | ||
cache: new InMemoryCache() | ||
} | ||
const monitorOptions = { | ||
...defaultOptions, | ||
link: createUploadLink({ | ||
uri: process.env.VUE_APP_A55_MONITOR_GRAPHQL | ||
}) | ||
}; | ||
export default function createProvider(options = {}) { | ||
const { apolloClient, wsClient } = createApolloClient({ | ||
...defaultOptions, | ||
...options | ||
}); | ||
apolloClient.wsClient = wsClient; | ||
const accessOptions = { | ||
...defaultOptions, | ||
link: createUploadLink({ | ||
uri: process.env.VUE_APP_A55_OPS_GRAPHQL | ||
}), | ||
}; | ||
const apolloProvider = new VueApollo({ | ||
defaultClient: apolloClient, | ||
defaultOptions: { | ||
$query: { | ||
fetchPolicy: "cache-and-network" | ||
} | ||
}, | ||
errorHandler(error) { | ||
// eslint-disable-next-line | ||
console.log( | ||
"%cError", | ||
"background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;", | ||
error.message | ||
); | ||
} | ||
}); | ||
export default function createProvider() { | ||
return apolloProvider; | ||
const monitorClient = createApolloClient({ | ||
...monitorOptions | ||
}); | ||
monitorClient.apolloClient.wsClient = monitorClient.wsClient; | ||
const accessClient = createApolloClient({ | ||
...accessOptions | ||
}); | ||
accessClient.apolloClient.wsClient = accessClient.wsClient; | ||
const apolloProvider = new VueApollo({ | ||
clients: { | ||
access: accessClient.apolloClient, | ||
monitor: monitorClient.apolloClient | ||
}, | ||
defaultClient: monitorClient.apolloClient, | ||
defaultOptions: { | ||
$query: { | ||
fetchPolicy: "cache-and-network" | ||
} | ||
}, | ||
errorHandler(error) { | ||
// eslint-disable-next-line | ||
console.log( | ||
"%cError", | ||
"background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;", | ||
error.message | ||
); | ||
} | ||
}); | ||
return apolloProvider; | ||
} |
import Vue from "vue"; | ||
import VueI18n from "vue-i18n"; | ||
import { numberFormats } from "./pt_BR"; | ||
Vue.use(VueI18n); | ||
Vue.use(VueI18n) | ||
export default new VueI18n({ locale: 'pt-BR', numberFormats }); |
import './axios'; | ||
import './element'; | ||
import './i18n'; | ||
import './money'; | ||
import './moment'; | ||
import './permissions'; |
import Vue from "vue"; | ||
import Router from "vue-router"; | ||
const Dashboard = () => import(/* webpackChunkName: 'private' */ "@/views/Dashboard"); | ||
const NotFound = () => import(/* webpackChunkName: 'public' */ "@/views/NotFound"); | ||
const Private = () => import(/* webpackChunkName: 'private' */ "@/views/Private"); | ||
const Dashboard = () => import(/* webpackChunkName: 'private' */ "@/views/Dashboard"); | ||
const Example = () => import(/* webpackChunkName: 'private' */ "@/views/Example"); | ||
@@ -21,10 +21,3 @@ | ||
name: "Dashboard", | ||
icon: "el-icon-picture", | ||
component: Dashboard | ||
}, | ||
{ | ||
path: "example", | ||
name: "Example", | ||
icon: "el-icon-star-off", | ||
component: Example | ||
} | ||
@@ -47,6 +40,2 @@ ] | ||
"icon": "dashboard" | ||
}, { | ||
"label": "Example", | ||
"path": "/example", | ||
"icon": "casino" | ||
} | ||
@@ -53,0 +42,0 @@ ]; |
@@ -9,2 +9,10 @@ import Vue from "vue"; | ||
const cookieKey = "a55-" + process.env.NODE_ENV | ||
const cookieOptions = { | ||
expires: 3, | ||
secure: process.env.NODE_ENV !== "development", | ||
domain: process.env.VUE_APP_A55_DOMAIN | ||
} | ||
const store = new Vuex.Store({ | ||
@@ -15,7 +23,11 @@ strict: true, | ||
versionState({ | ||
key: "a55-auth", | ||
key: cookieKey, | ||
paths: ["auth.token", "auth.user"], | ||
storage: { | ||
getItem: key => Cookies.get(key), | ||
setItem: (key, value) => Cookies.set(key, value, {expires: 3}), | ||
setItem: (key, value) => { | ||
if (key === cookieKey) { | ||
return Cookies.set(key, value, cookieOptions) | ||
} | ||
}, | ||
removeItem: key => Cookies.remove(key) | ||
@@ -22,0 +34,0 @@ } |
const fs = require('fs'); | ||
module.exports = { | ||
parallel: false, | ||
devServer: { | ||
host: '0.0.0.0' | ||
}, | ||
css: { | ||
@@ -11,3 +15,23 @@ sourceMap: true, | ||
} | ||
}, | ||
pluginOptions: { | ||
s3Deploy: { | ||
registry: undefined, | ||
awsProfile: 'default', | ||
region: 'us-east-1', | ||
bucket: 'bucket-name.access55.com', | ||
createBucket: false, | ||
staticHosting: true, | ||
staticIndexPage: 'index.html', | ||
staticErrorPage: 'index.html', | ||
assetPath: 'dist', | ||
assetMatch: '**', | ||
deployPath: '/', | ||
acl: 'public-read', | ||
pwa: false, | ||
enableCloudfront: true, | ||
uploadConcurrency: 5, | ||
pluginVersion: '3.0.0' | ||
} | ||
} | ||
} | ||
} |
{ | ||
"name": "vue-cli-plugin-access", | ||
"version": "1.2.4", | ||
"version": "1.4.0", | ||
"description": "vue-cli 3 plugin to add A55 presets", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
1773452
102
772
12