2016-11-14 16:16:51 +03:00
|
|
|
/* eslint-env node */
|
2017-03-28 13:29:18 +03:00
|
|
|
'use strict';
|
2015-02-19 03:11:42 +03:00
|
|
|
|
|
|
|
module.exports = function (environment) {
|
2017-03-28 13:29:18 +03:00
|
|
|
let ENV = {
|
2016-05-24 15:06:59 +03:00
|
|
|
modulePrefix: 'ghost-admin',
|
2017-03-28 13:29:18 +03:00
|
|
|
environment,
|
2023-07-17 11:48:08 +03:00
|
|
|
cdnUrl: process.env.GHOST_CDN_URL || '',
|
2022-08-02 15:43:28 +03:00
|
|
|
rootURL: '',
|
2017-03-14 19:04:46 +03:00
|
|
|
locationType: 'trailing-hash',
|
2015-02-19 03:11:42 +03:00
|
|
|
EmberENV: {
|
|
|
|
FEATURES: {
|
|
|
|
// Here you can enable experimental features on an ember canary build
|
2019-04-09 16:21:48 +03:00
|
|
|
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
|
2016-07-31 22:47:19 +03:00
|
|
|
},
|
|
|
|
// @TODO verify that String/Function need to be enabled
|
|
|
|
EXTEND_PROTOTYPES: {
|
|
|
|
Date: false,
|
|
|
|
Array: true,
|
|
|
|
String: true,
|
2019-07-01 17:53:58 +03:00
|
|
|
Function: false
|
2015-02-19 03:11:42 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
APP: {
|
2016-06-03 13:51:06 +03:00
|
|
|
// Here you can pass flags/options to your application instance
|
|
|
|
// when it is created
|
|
|
|
|
|
|
|
// override the default version string which contains git info from
|
|
|
|
// https://github.com/cibernox/git-repo-version. Only include the
|
|
|
|
// `major.minor` version numbers
|
2016-06-03 16:47:47 +03:00
|
|
|
version: require('../package.json').version.match(/^(\d+\.)?(\d+)/)[0]
|
2015-05-13 08:27:59 +03:00
|
|
|
},
|
|
|
|
|
2017-04-05 20:45:35 +03:00
|
|
|
'ember-simple-auth': { },
|
2017-02-06 18:53:04 +03:00
|
|
|
|
2023-07-17 11:48:08 +03:00
|
|
|
'ember-websockets': {
|
2023-02-17 13:25:51 +03:00
|
|
|
socketIO: true
|
|
|
|
},
|
|
|
|
|
2021-05-26 19:01:18 +03:00
|
|
|
'@sentry/ember': {
|
|
|
|
disablePerformance: true,
|
|
|
|
sentry: {}
|
2017-09-04 22:17:04 +03:00
|
|
|
}
|
2015-02-19 03:11:42 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
if (environment === 'development') {
|
|
|
|
// ENV.APP.LOG_RESOLVER = true;
|
|
|
|
ENV.APP.LOG_ACTIVE_GENERATION = true;
|
|
|
|
ENV.APP.LOG_TRANSITIONS = true;
|
|
|
|
ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
|
|
|
|
ENV.APP.LOG_VIEW_LOOKUPS = true;
|
2018-03-19 13:51:40 +03:00
|
|
|
|
2016-04-13 12:44:09 +03:00
|
|
|
// Enable mirage here in order to mock API endpoints during development
|
2015-10-13 16:52:41 +03:00
|
|
|
ENV['ember-cli-mirage'] = {
|
2020-10-16 21:22:00 +03:00
|
|
|
enabled: false
|
2015-10-13 16:52:41 +03:00
|
|
|
};
|
2015-02-13 07:22:32 +03:00
|
|
|
}
|
|
|
|
|
2015-02-19 03:11:42 +03:00
|
|
|
if (environment === 'test') {
|
|
|
|
// Testem prefers this...
|
2022-08-02 15:43:28 +03:00
|
|
|
ENV.rootURL = '/';
|
2015-02-19 03:11:42 +03:00
|
|
|
ENV.locationType = 'none';
|
2015-02-13 07:22:32 +03:00
|
|
|
|
2015-02-19 03:11:42 +03:00
|
|
|
// keep test console output quieter
|
|
|
|
ENV.APP.LOG_ACTIVE_GENERATION = false;
|
|
|
|
ENV.APP.LOG_VIEW_LOOKUPS = false;
|
2015-02-13 07:22:32 +03:00
|
|
|
|
2015-02-19 03:11:42 +03:00
|
|
|
ENV.APP.rootElement = '#ember-testing';
|
2019-01-02 12:58:55 +03:00
|
|
|
ENV.APP.autoboot = false;
|
2018-03-19 12:53:17 +03:00
|
|
|
|
|
|
|
// Withuot manually setting this, pretender won't track requests
|
|
|
|
ENV['ember-cli-mirage'] = {
|
|
|
|
trackRequests: true
|
|
|
|
};
|
2015-02-19 03:11:42 +03:00
|
|
|
}
|
2015-02-13 07:22:32 +03:00
|
|
|
|
2015-02-19 03:11:42 +03:00
|
|
|
return ENV;
|
2015-02-13 07:22:32 +03:00
|
|
|
};
|