@wyxos/zephyr 0.4.4 → 0.4.5
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
CHANGED
|
@@ -52,7 +52,16 @@ export async function resolveLocalDeploymentCheckSupport({
|
|
|
52
52
|
isLaravel,
|
|
53
53
|
runCommandCapture
|
|
54
54
|
} = {}) {
|
|
55
|
-
|
|
55
|
+
let lintCommand = null
|
|
56
|
+
|
|
57
|
+
try {
|
|
58
|
+
lintCommand = await preflight.resolveSupportedLintCommand(rootDir, {commandExists})
|
|
59
|
+
} catch (error) {
|
|
60
|
+
if (error?.code !== 'ZEPHYR_LINT_COMMAND_NOT_FOUND') {
|
|
61
|
+
throw error
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
56
65
|
const testCommand = isLaravel
|
|
57
66
|
? await resolveSupportedLaravelTestCommand(rootDir, {runCommandCapture})
|
|
58
67
|
: null
|
|
@@ -115,14 +124,20 @@ export async function runLocalDeploymentChecks({
|
|
|
115
124
|
}
|
|
116
125
|
}
|
|
117
126
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
127
|
+
if (support.lintCommand === null) {
|
|
128
|
+
logWarning?.('No supported lint command was found. Skipping linting checks.')
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const lintRan = support.lintCommand === null
|
|
132
|
+
? false
|
|
133
|
+
: await preflight.runLinting(rootDir, {
|
|
134
|
+
runCommand,
|
|
135
|
+
logProcessing,
|
|
136
|
+
logSuccess,
|
|
137
|
+
logWarning,
|
|
138
|
+
commandExists,
|
|
139
|
+
lintCommand: support.lintCommand
|
|
140
|
+
})
|
|
126
141
|
|
|
127
142
|
if (lintRan) {
|
|
128
143
|
const hasChanges = await hasUncommittedChanges(rootDir, {runCommandCapture})
|
package/src/deploy/preflight.mjs
CHANGED
|
@@ -83,10 +83,12 @@ export async function resolveSupportedLintCommand(rootDir, {commandExists} = {})
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
const error = new Error(
|
|
87
87
|
'Release cannot run because no supported lint command was found.\n' +
|
|
88
88
|
'Zephyr requires either `npm run lint` or Laravel Pint (`vendor/bin/pint`) before deployment.'
|
|
89
89
|
)
|
|
90
|
+
error.code = 'ZEPHYR_LINT_COMMAND_NOT_FOUND'
|
|
91
|
+
throw error
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
export async function runLinting(rootDir, {
|