create-directus-docker 1.1.4 → 1.1.6
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.
- package/package.json +3 -2
- package/src/cli.js +12 -13
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-directus-docker",
|
|
3
3
|
"description": "An installer for Dockerized Directus + MySQL + Adminer + GraphiQL with a helper Node app",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Dave Kobrenski",
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"chalk": "^5.2.0",
|
|
35
|
-
"create-create-app": "^7.3.0"
|
|
35
|
+
"create-create-app": "^7.3.0",
|
|
36
|
+
"upath": "^2.0.1"
|
|
36
37
|
},
|
|
37
38
|
"license": "MIT",
|
|
38
39
|
"devDependencies": {
|
package/src/cli.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import upath from 'upath';
|
|
3
4
|
import chalk from 'chalk';
|
|
4
5
|
import path from 'path';
|
|
5
6
|
import {fileURLToPath} from 'url';
|
|
@@ -8,25 +9,23 @@ import { create } from 'create-create-app';
|
|
|
8
9
|
// const { resolve } = require('path');
|
|
9
10
|
//const { create } = require('create-create-app');
|
|
10
11
|
|
|
11
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
-
const __dirname = path.dirname(__filename);
|
|
13
|
-
let templateRoot = resolve(__dirname, '../templates');
|
|
12
|
+
// const __filename = fileURLToPath(import.meta.url);
|
|
13
|
+
// const __dirname = path.dirname(__filename);
|
|
14
|
+
// let templateRoot = resolve(__dirname, '../templates');
|
|
14
15
|
|
|
16
|
+
const templateRoot = upath.resolve(__dirname, '../templates')
|
|
17
|
+
|
|
18
|
+
console.log(chalk.redBright("DEBUG:"));
|
|
19
|
+
console.log(__filename);
|
|
20
|
+
console.log(__dirname)
|
|
15
21
|
console.log(templateRoot);
|
|
22
|
+
console.log(chalk.redBright("END DEBUG"));
|
|
23
|
+
//${chalk.yellow("Directus with MySQL, Adminer, and GraphiQL:")}
|
|
16
24
|
|
|
17
25
|
const caveat = `
|
|
18
|
-
${chalk.yellow("Directus with MySQL, Adminer, and GraphiQL:")}
|
|
19
|
-
|
|
20
26
|
Installed successfully.
|
|
21
|
-
|
|
22
27
|
`;
|
|
23
28
|
|
|
24
29
|
create('create-directus-docker', {
|
|
25
|
-
templateRoot
|
|
26
|
-
after: ({ answers }) => {
|
|
27
|
-
//custom stuff to do or print out here...
|
|
28
|
-
let msg = `cd ${answers.name} && npm start`
|
|
29
|
-
console.log(`To configure and launch all services, run ${chalk.green(msg)}`);
|
|
30
|
-
},
|
|
31
|
-
caveat,
|
|
30
|
+
templateRoot
|
|
32
31
|
});
|