2021-03-12 05:28:58 +03:00
|
|
|
const _ = require('lodash');
|
|
|
|
|
2021-03-12 08:28:48 +03:00
|
|
|
const exportedBodyV2 = () => {
|
2021-03-12 05:28:58 +03:00
|
|
|
return _.clone({
|
|
|
|
db: [{
|
|
|
|
meta: {
|
|
|
|
exported_on: 1504269105806,
|
|
|
|
version: '2.0.0'
|
|
|
|
},
|
|
|
|
data: {
|
|
|
|
app_fields: [],
|
|
|
|
app_settings: [],
|
|
|
|
apps: [],
|
|
|
|
brute: [],
|
|
|
|
invites: [],
|
|
|
|
migrations: [],
|
|
|
|
permissions: [],
|
|
|
|
permissions_roles: [],
|
|
|
|
permissions_users: [],
|
|
|
|
posts: [],
|
|
|
|
posts_tags: [],
|
|
|
|
posts_authors: [],
|
|
|
|
roles: [],
|
|
|
|
roles_users: [],
|
|
|
|
settings: [],
|
|
|
|
subscribers: [],
|
|
|
|
tags: [],
|
|
|
|
users: []
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2021-03-12 08:28:48 +03:00
|
|
|
const exportedBodyV1 = () => {
|
2021-03-12 05:28:58 +03:00
|
|
|
return _.clone({
|
|
|
|
db: [{
|
|
|
|
meta: {
|
|
|
|
exported_on: 1504269105806,
|
|
|
|
version: '1.20.0'
|
|
|
|
},
|
|
|
|
data: {
|
|
|
|
app_fields: [],
|
|
|
|
app_settings: [],
|
|
|
|
apps: [],
|
|
|
|
brute: [],
|
|
|
|
invites: [],
|
|
|
|
migrations: [],
|
|
|
|
permissions: [],
|
|
|
|
permissions_roles: [],
|
|
|
|
permissions_users: [],
|
|
|
|
posts: [],
|
|
|
|
posts_tags: [],
|
|
|
|
posts_authors: [],
|
|
|
|
roles: [],
|
|
|
|
roles_users: [],
|
|
|
|
settings: [],
|
|
|
|
subscribers: [],
|
|
|
|
tags: [],
|
|
|
|
users: []
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2021-03-12 08:28:48 +03:00
|
|
|
const exportedBodyLegacy = () => {
|
2021-03-12 05:28:58 +03:00
|
|
|
return _.clone({
|
|
|
|
db: [{
|
|
|
|
meta: {
|
|
|
|
exported_on: 1504269105806,
|
|
|
|
version: '300'
|
|
|
|
},
|
|
|
|
data: {
|
|
|
|
app_fields: [],
|
|
|
|
app_settings: [],
|
|
|
|
apps: [],
|
|
|
|
brute: [],
|
|
|
|
invites: [],
|
|
|
|
permissions: [],
|
|
|
|
permissions_roles: [],
|
|
|
|
permissions_users: [],
|
|
|
|
posts: [],
|
|
|
|
posts_tags: [],
|
|
|
|
roles: [],
|
|
|
|
roles_users: [],
|
|
|
|
settings: [],
|
|
|
|
subscribers: [],
|
|
|
|
tags: [],
|
|
|
|
users: []
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2021-03-12 09:42:33 +03:00
|
|
|
// NOTE: clone the fixture before changing in and alias to v5, v6 or whatever the newest version is
|
|
|
|
const exportedBodyLatest = () => {
|
|
|
|
return _.clone({
|
|
|
|
db: [{
|
|
|
|
meta: {
|
|
|
|
exported_on: 1615520875631,
|
|
|
|
version: '4.0.0'
|
|
|
|
},
|
|
|
|
data: {
|
|
|
|
actions: [],
|
|
|
|
api_keys: [],
|
|
|
|
brute: [],
|
|
|
|
emails: [],
|
|
|
|
integrations: [],
|
|
|
|
invites: [],
|
|
|
|
labels: [],
|
|
|
|
members: [],
|
|
|
|
members_labels: [],
|
|
|
|
members_stripe_customers: [],
|
|
|
|
members_stripe_customers_subscriptions: [],
|
|
|
|
migrations: [],
|
|
|
|
migrations_lock: [],
|
|
|
|
permissions: [],
|
|
|
|
permissions_roles: [],
|
|
|
|
permissions_users: [],
|
|
|
|
posts: [],
|
|
|
|
posts_authors: [],
|
|
|
|
posts_meta: [],
|
|
|
|
posts_tags: [],
|
|
|
|
roles: [],
|
|
|
|
roles_users: [],
|
|
|
|
settings: [],
|
|
|
|
snippets: [],
|
|
|
|
tags: [],
|
|
|
|
tokens: [],
|
|
|
|
users: [],
|
|
|
|
webhooks: []
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports.exportedBodyLatest = exportedBodyLatest;
|
|
|
|
module.exports.exportedBodyV4 = exportedBodyLatest;
|
2021-03-12 08:28:48 +03:00
|
|
|
module.exports.exportedBodyV2 = exportedBodyV2;
|
|
|
|
module.exports.exportedBodyV1 = exportedBodyV1;
|
|
|
|
module.exports.exportedBodyLegacy = exportedBodyLegacy;
|