directus-template-cli 0.7.0-beta.2 → 0.7.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,12 +35,8 @@ async function animatedBunny(customMessage) {
35
35
  const updateFrame = () => {
36
36
  if (isCleanedUp)
37
37
  return;
38
- const eyes = blinkState ? ' ' : '- -';
39
- const frame = `
40
- (\\(\\
41
- ( ${eyes}) ${chalk_1.default.dim('.')}${chalk_1.default.hex(constants_1.DIRECTUS_PINK).visible(`"${typedSaying}"`)}
42
- o_(")(")
43
- `;
38
+ const eyes = blinkState ? '- -' : 'Õ Õ';
39
+ const frame = `(\\ /)\n \\\\_//\n ( ${eyes}) ${chalk_1.default.dim('')}${chalk_1.default.hex(constants_1.DIRECTUS_PINK).visible(`"${typedSaying}"`)}\nC(")(")`;
44
40
  (0, log_update_1.default)(frame);
45
41
  };
46
42
  const animation = setInterval(() => {
@@ -56,10 +52,10 @@ o_(")(")
56
52
  else {
57
53
  clearInterval(typing);
58
54
  }
59
- }, 10);
55
+ }, 25);
60
56
  try {
61
57
  // Run the animation for the duration of typing plus 1 second
62
- await new Promise(resolve => setTimeout(resolve, saying.length * 10 + 1000));
58
+ await new Promise(resolve => setTimeout(resolve, saying.length * 25 + 1000));
63
59
  }
64
60
  finally {
65
61
  cleanup();
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createDocker = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const prompts_1 = require("@clack/prompts");
6
- const execa_1 = require("execa");
7
6
  const catch_error_1 = tslib_1.__importDefault(require("../lib/utils/catch-error"));
8
7
  const wait_1 = require("../lib/utils/wait");
9
8
  /**
@@ -13,13 +12,14 @@ const wait_1 = require("../lib/utils/wait");
13
12
  async function checkDocker() {
14
13
  try {
15
14
  // Check if Docker is installed
16
- const versionResult = await (0, execa_1.execa)('docker', ['--version']);
15
+ const { execa } = await Promise.resolve().then(() => tslib_1.__importStar(require('execa')));
16
+ const versionResult = await execa('docker', ['--version']);
17
17
  const isInstalled = versionResult.exitCode === 0;
18
18
  if (!isInstalled) {
19
19
  return { installed: false, message: 'Docker is not installed. Please install Docker at https://docs.docker.com/get-started/get-docker/', running: false };
20
20
  }
21
21
  // Check if Docker daemon is running
22
- const statusResult = await (0, execa_1.execa)('docker', ['info']);
22
+ const statusResult = await execa('docker', ['info']);
23
23
  const isRunning = statusResult.exitCode === 0;
24
24
  return {
25
25
  installed: true,
@@ -41,12 +41,13 @@ async function checkDocker() {
41
41
  * @param {string} cwd - The current working directory
42
42
  * @returns {Promise<void>} - Returns nothing
43
43
  */
44
- function startContainers(cwd) {
44
+ async function startContainers(cwd) {
45
45
  try {
46
+ const { execa } = await Promise.resolve().then(() => tslib_1.__importStar(require('execa')));
46
47
  // ux.action.start('Starting Docker containers')
47
48
  const s = (0, prompts_1.spinner)();
48
49
  s.start('Starting Docker containers');
49
- return (0, execa_1.execa)('docker-compose', ['up', '-d'], {
50
+ return execa('docker-compose', ['up', '-d'], {
50
51
  cwd,
51
52
  // stdio: 'inherit',
52
53
  }).then(() => {
@@ -59,7 +60,7 @@ function startContainers(cwd) {
59
60
  fatal: true,
60
61
  logToFile: true,
61
62
  });
62
- return Promise.reject(error);
63
+ throw error;
63
64
  }
64
65
  }
65
66
  /**
@@ -67,9 +68,10 @@ function startContainers(cwd) {
67
68
  * @param {string} cwd - The current working directory
68
69
  * @returns {Promise<void>} - Returns nothing
69
70
  */
70
- function stopContainers(cwd) {
71
+ async function stopContainers(cwd) {
71
72
  try {
72
- return (0, execa_1.execa)('docker-compose', ['down'], {
73
+ const { execa } = await Promise.resolve().then(() => tslib_1.__importStar(require('execa')));
74
+ return execa('docker-compose', ['down'], {
73
75
  cwd,
74
76
  // stdio: 'inherit',
75
77
  }).then(() => { });
@@ -80,7 +82,7 @@ function stopContainers(cwd) {
80
82
  fatal: false,
81
83
  logToFile: true,
82
84
  });
83
- return Promise.reject(error);
85
+ throw error;
84
86
  }
85
87
  }
86
88
  /**
@@ -359,5 +359,5 @@
359
359
  ]
360
360
  }
361
361
  },
362
- "version": "0.7.0-beta.2"
362
+ "version": "0.7.0-beta.4"
363
363
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "directus-template-cli",
3
- "version": "0.7.0-beta.2",
3
+ "version": "0.7.0-beta.4",
4
4
  "description": "CLI Utility for applying templates to a Directus instance.",
5
5
  "author": "bryantgillespie @bryantgillespie",
6
6
  "bin": {
@@ -24,7 +24,7 @@
24
24
  "@oclif/plugin-plugins": "^4.1.22",
25
25
  "@octokit/rest": "^21.1.1",
26
26
  "bottleneck": "^2.19.5",
27
- "chalk": "^5.4.1",
27
+ "chalk": "4.1.2",
28
28
  "defu": "^6.1.4",
29
29
  "dotenv": "^16.4.1",
30
30
  "execa": "^9.5.2",