mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
move errors
This commit is contained in:
2472
website/client/package-lock.json
generated
2472
website/client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@
|
||||
"build": "vue-cli-service build",
|
||||
"test:unit": "vue-cli-service test:unit --require ./tests/unit/helpers.js",
|
||||
"lint": "vue-cli-service lint",
|
||||
"postinstall": "[ \"$NODE_ENV\" == production ] && npm run build"
|
||||
"postinstall": "if [ -n \"$npm_config_production\" ]; then npm run build-for-production; fi"
|
||||
},
|
||||
"dependencies": {
|
||||
"amplitude-js": "^5.3.1",
|
||||
@@ -32,15 +32,15 @@
|
||||
"vuejs-datepicker": "git://github.com/habitrpg/vuejs-datepicker.git#5d237615463a84a23dd6f3f77c6ab577d68593ec"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^4.0.0-rc.6",
|
||||
"@vue/cli-plugin-eslint": "^4.0.0-rc.6",
|
||||
"@vue/cli-plugin-router": "^4.0.0-rc.6",
|
||||
"@vue/cli-plugin-unit-mocha": "^4.0.0-rc.6",
|
||||
"@vue/cli-service": "^4.0.0-rc.6",
|
||||
"@vue/cli-plugin-babel": "^3.12.0",
|
||||
"@vue/cli-plugin-eslint": "^3.12.0",
|
||||
"@vue/cli-plugin-router": "^4.0.0-alpha.4",
|
||||
"@vue/cli-plugin-unit-mocha": "^3.12.0",
|
||||
"@vue/cli-service": "^3.12.0",
|
||||
"@vue/test-utils": "1.0.0-beta.29",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"chai": "^4.1.2",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint": "^6.5.1",
|
||||
"eslint-config-habitrpg": "^6.1.0",
|
||||
"eslint-plugin-mocha": "^5.3.0",
|
||||
"eslint-plugin-vue": "^5.0.0",
|
||||
|
||||
@@ -6,7 +6,7 @@ describe('Store', () => {
|
||||
let store;
|
||||
|
||||
beforeEach(() => {
|
||||
store = new StoreModule({ // eslint-disable-line babel/new-cap
|
||||
store = new StoreModule({
|
||||
state: {
|
||||
name: 'test',
|
||||
nested: {
|
||||
|
||||
@@ -6,6 +6,9 @@ import content from './content/index';
|
||||
import * as errors from './libs/errors';
|
||||
import i18n from './i18n';
|
||||
|
||||
import commonErrors from './errors/commonErrorMessages';
|
||||
import apiErrors from './errors/apiErrorMessages';
|
||||
|
||||
// TODO under api.libs.cron?
|
||||
import { shouldDo, daysSince, DAY_MAPPING } from './cron';
|
||||
|
||||
@@ -196,4 +199,9 @@ api.ops = {
|
||||
pinnedGearUtils,
|
||||
};
|
||||
|
||||
api.errorMessages = {
|
||||
common: commonErrors,
|
||||
api: apiErrors,
|
||||
};
|
||||
|
||||
export default api;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import _clone from 'lodash/clone';
|
||||
import _template from 'lodash/template';
|
||||
|
||||
import messages from '../../errors/commonErrorMessages';
|
||||
import messages from '../errors/commonErrorMessages';
|
||||
|
||||
export default function (msgKey, vars = {}) {
|
||||
const message = messages[msgKey];
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
|
||||
import _ from 'lodash';
|
||||
|
||||
import commonErrors from '../../common/errors/commonErrorMessages';
|
||||
import apiErrors from '../../common/errors/apiErrorMessages';
|
||||
import common from '../../common';
|
||||
|
||||
const commonErrors = common.errorMessages.common;
|
||||
const apiErrors = common.errorMessages.api;
|
||||
|
||||
export default function (msgKey, vars = {}) {
|
||||
let message = apiErrors[msgKey];
|
||||
|
||||
Reference in New Issue
Block a user