mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 19:02:29 +03:00
deps: ember-data@2.3.2
no issue - updates ember-data dependency and switches to direct es6 module import instead of destructuring assignment - fixes issue with `authenticationFailed` action being called before transitions have finished
This commit is contained in:
parent
3154dfe988
commit
d52989c982
@ -1,12 +1,11 @@
|
||||
import Ember from 'ember';
|
||||
import DS from 'ember-data';
|
||||
import RESTAdapter from 'ember-data/adapters/rest';
|
||||
import ghostPaths from 'ghost/utils/ghost-paths';
|
||||
import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';
|
||||
|
||||
const {
|
||||
inject: {service}
|
||||
} = Ember;
|
||||
const {RESTAdapter} = DS;
|
||||
|
||||
export default RESTAdapter.extend(DataAdapterMixin, {
|
||||
authorizer: 'authorizer:oauth2',
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Ember from 'ember';
|
||||
import DS from 'ember-data';
|
||||
import Model from 'ember-data/model';
|
||||
import getRequestErrorMessage from 'ghost/utils/ajax';
|
||||
|
||||
import ValidatorExtensions from 'ghost/utils/validator-extensions';
|
||||
@ -15,7 +16,7 @@ import NavItemValidator from 'ghost/validators/nav-item';
|
||||
import InviteUserValidator from 'ghost/validators/invite-user';
|
||||
|
||||
const {Mixin, RSVP, isArray} = Ember;
|
||||
const {Errors, Model} = DS;
|
||||
const {Errors} = DS;
|
||||
const emberA = Ember.A;
|
||||
|
||||
// our extensions to the validator library
|
||||
|
@ -1,6 +1,5 @@
|
||||
import DS from 'ember-data';
|
||||
|
||||
const {Model, attr} = DS;
|
||||
import Model from 'ember-data/model';
|
||||
import attr from 'ember-data/attr';
|
||||
|
||||
export default Model.extend({
|
||||
dismissible: attr('boolean'),
|
||||
|
@ -1,6 +1,8 @@
|
||||
/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
|
||||
import Ember from 'ember';
|
||||
import DS from 'ember-data';
|
||||
import Model from 'ember-data/model';
|
||||
import attr from 'ember-data/attr';
|
||||
import { belongsTo, hasMany } from 'ember-data/relationships';
|
||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||
|
||||
const {
|
||||
@ -8,7 +10,6 @@ const {
|
||||
inject: {service}
|
||||
} = Ember;
|
||||
const {equal} = computed;
|
||||
const {Model, attr, belongsTo, hasMany} = DS;
|
||||
|
||||
export default Model.extend(ValidationEngine, {
|
||||
validationType: 'post',
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
|
||||
import Ember from 'ember';
|
||||
import DS from 'ember-data';
|
||||
import Model from 'ember-data/model';
|
||||
import attr from 'ember-data/attr';
|
||||
|
||||
const {computed} = Ember;
|
||||
const {Model, attr} = DS;
|
||||
|
||||
export default Model.extend({
|
||||
uuid: attr('string'),
|
||||
|
@ -1,9 +1,8 @@
|
||||
/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
|
||||
import DS from 'ember-data';
|
||||
import Model from 'ember-data/model';
|
||||
import attr from 'ember-data/attr';
|
||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||
|
||||
const {Model, attr} = DS;
|
||||
|
||||
export default Model.extend(ValidationEngine, {
|
||||
validationType: 'setting',
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
|
||||
import DS from 'ember-data';
|
||||
import Model from 'ember-data/model';
|
||||
import attr from 'ember-data/attr';
|
||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||
|
||||
const {Model, attr} = DS;
|
||||
|
||||
export default Model.extend(ValidationEngine, {
|
||||
validationType: 'tag',
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
|
||||
import Ember from 'ember';
|
||||
import DS from 'ember-data';
|
||||
import Model from 'ember-data/model';
|
||||
import attr from 'ember-data/attr';
|
||||
import { hasMany } from 'ember-data/relationships';
|
||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||
|
||||
const {
|
||||
@ -8,7 +10,6 @@ const {
|
||||
inject: {service}
|
||||
} = Ember;
|
||||
const {equal, empty} = computed;
|
||||
const {Model, attr, hasMany} = DS;
|
||||
|
||||
export default Model.extend(ValidationEngine, {
|
||||
validationType: 'user',
|
||||
@ -36,7 +37,7 @@ export default Model.extend(ValidationEngine, {
|
||||
embedded: 'always',
|
||||
async: false
|
||||
}),
|
||||
count: DS.attr('raw'),
|
||||
count: attr('raw'),
|
||||
|
||||
ghostPaths: service(),
|
||||
ajax: service(),
|
||||
|
@ -7,7 +7,8 @@ import windowProxy from 'ghost/utils/window-proxy';
|
||||
|
||||
const {
|
||||
Route,
|
||||
inject: {service}
|
||||
inject: {service},
|
||||
run
|
||||
} = Ember;
|
||||
|
||||
function K() {
|
||||
@ -48,7 +49,9 @@ export default Route.extend(ApplicationRouteMixin, ShortcutsRoute, {
|
||||
},
|
||||
|
||||
sessionInvalidated() {
|
||||
this.send('authorizationFailed');
|
||||
run.scheduleOnce('routerTransitions', this, function () {
|
||||
this.send('authorizationFailed');
|
||||
});
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
@ -1,7 +1,5 @@
|
||||
import Ember from 'ember';
|
||||
import DS from 'ember-data';
|
||||
|
||||
const {RESTSerializer} = DS;
|
||||
import RESTSerializer from 'ember-data/serializers/rest';
|
||||
|
||||
export default RESTSerializer.extend({
|
||||
serializeIntoHash(hash, type, record, options) {
|
||||
|
@ -1,7 +1,5 @@
|
||||
/* global moment */
|
||||
import DS from 'ember-data';
|
||||
|
||||
const {Transform} = DS;
|
||||
import Transform from 'ember-data/transform';
|
||||
|
||||
export default Transform.extend({
|
||||
deserialize(serialized) {
|
||||
|
@ -1,6 +1,4 @@
|
||||
import DS from 'ember-data';
|
||||
|
||||
const {Transform} = DS;
|
||||
import Transform from 'ember-data/transform';
|
||||
|
||||
export default Transform.extend({
|
||||
deserialize(serialized) {
|
||||
|
@ -5,9 +5,8 @@
|
||||
"codemirror": "5.2.0",
|
||||
"devicejs": "0.2.7",
|
||||
"ember": "2.2.1",
|
||||
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.6",
|
||||
"ember-cli-shims": "0.1.0",
|
||||
"ember-cli-test-loader": "0.2.1",
|
||||
"ember-data": "2.2.1",
|
||||
"ember-mocha": "0.8.8",
|
||||
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.7",
|
||||
"es5-shim": "4.2.0",
|
||||
|
@ -37,7 +37,7 @@
|
||||
"ember-cli-selectize": "0.4.3",
|
||||
"ember-cli-sri": "1.2.0",
|
||||
"ember-cli-uglify": "1.2.0",
|
||||
"ember-data": "2.2.1",
|
||||
"ember-data": "2.3.2",
|
||||
"ember-data-filter": "1.13.0",
|
||||
"ember-disable-proxy-controllers": "1.0.1",
|
||||
"ember-export-application-global": "1.0.5",
|
||||
|
Loading…
Reference in New Issue
Block a user