dynoport
Version:
Dynoport is a CLI tool that allows you to easily import and export data from a specified DynamoDB table. It provides a convenient way to transfer data between DynamoDB and JSON files
43 lines (42 loc) • 1.25 kB
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createSpinner = void 0;
// This file handles the dynamic import of ora
const chalk_1 = __importDefault(require("chalk"));
// A simple spinner implementation that works without ora
class SimpleSpinner {
constructor(initialText) {
this.text = initialText;
}
start() {
console.log(chalk_1.default.blue(`⏳ ${this.text}`));
return this;
}
stop() {
return this;
}
succeed(text) {
console.log(chalk_1.default.green(`✅ ${text || this.text}`));
return this;
}
fail(text) {
console.log(chalk_1.default.red(`❌ ${text || this.text}`));
return this;
}
info(text) {
console.log(chalk_1.default.blue(`ℹ️ ${text || this.text}`));
return this;
}
warn(text) {
console.log(chalk_1.default.yellow(`⚠️ ${text || this.text}`));
return this;
}
}
// Function to create a spinner
function createSpinner(text) {
return new SimpleSpinner(text);
}
exports.createSpinner = createSpinner;
;