2024-04-20 10:21:41 +00:00
|
|
|
import * as early from '@push.rocks/early';
|
|
|
|
early.start('cloudly');
|
2024-05-28 16:45:34 +00:00
|
|
|
import * as plugins from './plugins.js';
|
|
|
|
import * as paths from './paths.js';
|
|
|
|
import { Cloudly } from './classes.cloudly.js';
|
2024-05-30 20:49:39 +00:00
|
|
|
import { logger } from './logger.js';
|
2024-04-20 10:21:41 +00:00
|
|
|
const cloudlyQenv = new plugins.qenv.Qenv(paths.packageDir, paths.nogitDir, true);
|
|
|
|
early.stop();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* starts the cloudly instance
|
|
|
|
*/
|
|
|
|
const runCli = async () => {
|
|
|
|
logger.log('info', process.env.SERVEZONE_ENVIRONMENT);
|
|
|
|
const cloudlyInstance = new Cloudly();
|
|
|
|
|
|
|
|
logger.log(
|
|
|
|
'info',
|
2024-10-27 18:50:39 +00:00
|
|
|
`running in environment ${await cloudlyQenv.getEnvVarOnDemand('SERVEZONE_ENVIRONMENT')}`,
|
2024-04-20 10:21:41 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
await cloudlyInstance.start();
|
2024-06-13 07:36:02 +00:00
|
|
|
const demoMod = await import('./00demo/index.js');
|
2024-04-20 10:21:41 +00:00
|
|
|
demoMod.installDemoData(cloudlyInstance);
|
|
|
|
};
|
|
|
|
|
|
|
|
export { runCli, Cloudly };
|
2024-06-05 12:13:03 +00:00
|
|
|
type ICloudlyConfig = plugins.servezoneInterfaces.data.ICloudlyConfig;
|
2024-10-27 18:50:39 +00:00
|
|
|
export { type ICloudlyConfig };
|