@atomicsmash/cli 9.0.0-beta.7 → 9.0.0-beta.9
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.
|
@@ -38,7 +38,7 @@ export async function handler() {
|
|
|
38
38
|
await (async () => {
|
|
39
39
|
const tmpFile = "/tmp/staging-database.sql";
|
|
40
40
|
const tmpFileProcessed = "/tmp/staging-database.processed.sql";
|
|
41
|
-
await execute(`ssh ${stagingSSHUsername}@${stagingSSHHost} -p ${stagingSSHPort} "cd public/current && wp db export - --add-drop-table" > ${tmpFile}`)
|
|
41
|
+
await execute(`ssh -o "StrictHostKeyChecking no" ${stagingSSHUsername}@${stagingSSHHost} -p ${stagingSSHPort} "cd public/current && wp db export - --add-drop-table" > ${tmpFile}`)
|
|
42
42
|
.then(async () => {
|
|
43
43
|
await stopRunningMessage();
|
|
44
44
|
console.log("Database downloaded.");
|
|
@@ -10,7 +10,7 @@ async function downloadFiles(remotePath, localPath, ssh) {
|
|
|
10
10
|
// Create local directory if it doesn't exist
|
|
11
11
|
await mkdir(localPath, { recursive: true });
|
|
12
12
|
// Download files using scp
|
|
13
|
-
await execute(`scp -r -p -O -P ${ssh.port} "${ssh.username}@${ssh.host}:${remotePath}" "${localPath}"`);
|
|
13
|
+
await execute(`scp -r -p -O -P -o "StrictHostKeyChecking no" ${ssh.port} "${ssh.username}@${ssh.host}:${remotePath}" "${localPath}"`);
|
|
14
14
|
}
|
|
15
15
|
catch (error) {
|
|
16
16
|
console.log(`Failed to download ${remotePath}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,QAAQ,kDAAkD,CAAC;AACxE,wBAAsB,OAAO,
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,QAAQ,kDAAkD,CAAC;AACxE,wBAAsB,OAAO,kBAwM5B"}
|
package/dist/commands/setup.js
CHANGED
|
@@ -44,11 +44,13 @@ export async function handler() {
|
|
|
44
44
|
throw new Error("Failed to copy .env file.");
|
|
45
45
|
}),
|
|
46
46
|
(async () => {
|
|
47
|
-
if ((
|
|
48
|
-
|
|
49
|
-
(
|
|
50
|
-
|
|
51
|
-
.
|
|
47
|
+
if (await execute(`herd --version`)
|
|
48
|
+
.then(() => true)
|
|
49
|
+
.catch(() => false)) {
|
|
50
|
+
if (!existsSync(resolve(process.cwd(), "herd.yaml")) &&
|
|
51
|
+
!existsSync(resolve(process.cwd(), "herd.yml"))) {
|
|
52
|
+
throw new Error("Herd is present on your machine, but the project is missing a herd.yaml file. Please do the initial setup by running herd init.");
|
|
53
|
+
}
|
|
52
54
|
await execute(`herd init`)
|
|
53
55
|
.then(() => {
|
|
54
56
|
console.log(`Herd is linked, secured and isolated. (${convertMeasureToPrettyString(performance.measure("herd-or-valet", "Start"))})`);
|
|
@@ -71,7 +73,7 @@ export async function handler() {
|
|
|
71
73
|
});
|
|
72
74
|
}
|
|
73
75
|
else {
|
|
74
|
-
|
|
76
|
+
throw new Error(`Neither Herd nor Valet is present on your machine, check everything is installed correctly.`);
|
|
75
77
|
}
|
|
76
78
|
})(),
|
|
77
79
|
]),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atomicsmash/cli",
|
|
3
|
-
"version": "9.0.0-beta.
|
|
3
|
+
"version": "9.0.0-beta.9",
|
|
4
4
|
"description": "A collection of CLI tools by Atomic Smash.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://www.atomicsmash.co.uk/",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"chalk": "^4.1.2",
|
|
52
52
|
"clean-webpack-plugin": "^4.0.0",
|
|
53
53
|
"copy-webpack-plugin": "^12.0.2",
|
|
54
|
+
"cosmiconfig": "^9.0.0",
|
|
54
55
|
"css-loader": "^7.1.2",
|
|
55
56
|
"cssnano": "^7.1.0",
|
|
56
57
|
"fast-glob": "^3.3.3",
|
|
@@ -86,6 +87,7 @@
|
|
|
86
87
|
"type-fest": "^4.41.0"
|
|
87
88
|
},
|
|
88
89
|
"peerDependencies": {
|
|
89
|
-
"dotenv": "^16.6.1"
|
|
90
|
+
"dotenv": "^16.6.1",
|
|
91
|
+
"typescript": ">=4.9.5"
|
|
90
92
|
}
|
|
91
93
|
}
|