@puls-atlas/cli
Version:
The Puls Atlas CLI tool for managing Atlas projects
31 lines • 1.31 kB
JavaScript
import firestore from './firestore/index.js';
import initialize from './initialize.js';
import { logger } from '../../utils/index.js';
const FEATURE_NAME = 'export';
export const EXPORT_DEPRECATION_MESSAGE = 'Atlas export is deprecated. Prefer "atlas sync ..." for new sync workloads.';
export const warnDeprecatedExportCommand = (loggerImpl = logger) => {
loggerImpl.warning(EXPORT_DEPRECATION_MESSAGE);
return loggerImpl;
};
export const runPlaceholderExportAction = async (actionName, options, dependencies = {}) => {
const projectId = options?.project ?? 'selected Firebase project';
const loggerImpl = dependencies.logger ?? logger;
loggerImpl.warning(`Atlas ${FEATURE_NAME} ${actionName} is scaffolded but not implemented yet.`).summary('Export context', [{
label: 'Action',
value: actionName
}, {
label: 'Project',
value: projectId
}]);
};
const createPlaceholderAction = actionName => async options => runPlaceholderExportAction(actionName, options);
export default {
deploy: createPlaceholderAction('deploy'),
destroy: createPlaceholderAction('destroy'),
firestore,
initialize,
logs: createPlaceholderAction('logs'),
provision: createPlaceholderAction('provision'),
status: createPlaceholderAction('status'),
verify: createPlaceholderAction('verify')
};