@wyxos/zephyr 0.2.27 → 0.3.0
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/README.md +55 -2
- package/bin/zephyr.mjs +3 -1
- package/package.json +7 -2
- package/src/application/configuration/app-details.mjs +89 -0
- package/src/application/configuration/app-selection.mjs +87 -0
- package/src/application/configuration/preset-selection.mjs +59 -0
- package/src/application/configuration/select-deployment-target.mjs +165 -0
- package/src/application/configuration/server-selection.mjs +87 -0
- package/src/application/configuration/service.mjs +109 -0
- package/src/application/deploy/build-remote-deployment-plan.mjs +174 -0
- package/src/application/deploy/bump-local-package-version.mjs +81 -0
- package/src/application/deploy/execute-remote-deployment-plan.mjs +61 -0
- package/src/{utils/task-planner.mjs → application/deploy/plan-laravel-deployment-tasks.mjs} +5 -4
- package/src/application/deploy/prepare-local-deployment.mjs +52 -0
- package/src/application/deploy/resolve-local-deployment-context.mjs +17 -0
- package/src/application/deploy/resolve-pending-snapshot.mjs +45 -0
- package/src/application/deploy/run-deployment.mjs +147 -0
- package/src/application/deploy/run-local-deployment-checks.mjs +80 -0
- package/src/application/release/release-node-package.mjs +340 -0
- package/src/application/release/release-packagist-package.mjs +223 -0
- package/src/config/project.mjs +13 -0
- package/src/deploy/local-repo.mjs +187 -67
- package/src/deploy/preflight.mjs +10 -1
- package/src/deploy/remote-exec.mjs +2 -3
- package/src/index.mjs +27 -85
- package/src/main.mjs +80 -627
- package/src/release/shared.mjs +104 -0
- package/src/release-node.mjs +20 -481
- package/src/release-packagist.mjs +20 -291
- package/src/runtime/app-context.mjs +36 -0
- package/src/targets/index.mjs +24 -0
- package/src/utils/command.mjs +67 -5
- package/src/utils/output.mjs +41 -16
- package/src/utils/config-flow.mjs +0 -284
- /package/src/{utils/php-version.mjs → infrastructure/php/version.mjs} +0 -0
package/src/index.mjs
CHANGED
|
@@ -1,91 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import * as sshKeys from './ssh/keys.mjs'
|
|
16
|
-
import { writeToLogFile } from './utils/log-file.mjs'
|
|
17
|
-
|
|
18
|
-
export { main, runRemoteTasks } from './main.mjs'
|
|
19
|
-
export { connectToServer, executeRemoteCommand, readRemoteFile, downloadRemoteFile, deleteRemoteFile } from './ssh/index.mjs'
|
|
20
|
-
|
|
21
|
-
const { logProcessing, logSuccess, logWarning, logError } = createChalkLogger(chalk)
|
|
22
|
-
const runPrompt = createRunPrompt({ inquirer })
|
|
23
|
-
const { runCommand, runCommandCapture } = createLocalCommandRunners({
|
|
24
|
-
runCommandBase,
|
|
25
|
-
runCommandCaptureBase
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
// Keep this aligned with main's test injection behavior
|
|
29
|
-
const createSshClient = createSshClientFactory({ NodeSSH })
|
|
30
|
-
|
|
31
|
-
export { logProcessing, logSuccess, logWarning, logError, runCommand, runCommandCapture, writeToLogFile, createSshClient }
|
|
32
|
-
|
|
33
|
-
export async function loadServers() {
|
|
34
|
-
return await loadServersImpl({ logSuccess, logWarning })
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export async function loadProjectConfig(rootDir, servers) {
|
|
38
|
-
return await loadProjectConfigImpl(rootDir, servers, { logSuccess, logWarning })
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export function defaultProjectPath(currentDir) {
|
|
42
|
-
return configFlow.defaultProjectPath(currentDir)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export async function listGitBranches(currentDir) {
|
|
46
|
-
return await configFlow.listGitBranches(currentDir, { runCommandCapture, logWarning })
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export async function promptSshDetails(currentDir, existing = {}) {
|
|
50
|
-
return await sshKeys.promptSshDetails(currentDir, existing, { runPrompt })
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export async function promptServerDetails(existingServers = []) {
|
|
54
|
-
return await configFlow.promptServerDetails(existingServers, { runPrompt, generateId })
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export async function selectServer(servers) {
|
|
58
|
-
return await configFlow.selectServer(servers, {
|
|
59
|
-
runPrompt,
|
|
1
|
+
import {writeToLogFile} from './utils/log-file.mjs'
|
|
2
|
+
import {createAppContext} from './runtime/app-context.mjs'
|
|
3
|
+
|
|
4
|
+
export {main, runRemoteTasks} from './main.mjs'
|
|
5
|
+
export {
|
|
6
|
+
connectToServer,
|
|
7
|
+
executeRemoteCommand,
|
|
8
|
+
readRemoteFile,
|
|
9
|
+
downloadRemoteFile,
|
|
10
|
+
deleteRemoteFile
|
|
11
|
+
} from './ssh/index.mjs'
|
|
12
|
+
|
|
13
|
+
const appContext = createAppContext()
|
|
14
|
+
const {
|
|
60
15
|
logProcessing,
|
|
61
16
|
logSuccess,
|
|
62
|
-
saveServers,
|
|
63
|
-
promptServerDetails
|
|
64
|
-
})
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export async function promptAppDetails(currentDir, existing = {}) {
|
|
68
|
-
return await configFlow.promptAppDetails(currentDir, existing, {
|
|
69
|
-
runPrompt,
|
|
70
|
-
listGitBranches,
|
|
71
|
-
defaultProjectPath,
|
|
72
|
-
promptSshDetails
|
|
73
|
-
})
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export async function selectApp(projectConfig, server, currentDir) {
|
|
77
|
-
return await configFlow.selectApp(projectConfig, server, currentDir, {
|
|
78
|
-
runPrompt,
|
|
79
17
|
logWarning,
|
|
18
|
+
logError,
|
|
19
|
+
createSshClient,
|
|
20
|
+
runCommand,
|
|
21
|
+
runCommandCapture
|
|
22
|
+
} = appContext
|
|
23
|
+
|
|
24
|
+
export {
|
|
80
25
|
logProcessing,
|
|
81
26
|
logSuccess,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
export async function selectPreset(projectConfig, servers) {
|
|
89
|
-
return await configFlow.selectPreset(projectConfig, servers, { runPrompt })
|
|
27
|
+
logWarning,
|
|
28
|
+
logError,
|
|
29
|
+
runCommand,
|
|
30
|
+
runCommandCapture,
|
|
31
|
+
writeToLogFile,
|
|
32
|
+
createSshClient
|
|
90
33
|
}
|
|
91
|
-
|