@wyxos/zephyr 0.7.4 → 0.7.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wyxos/zephyr",
3
- "version": "0.7.4",
3
+ "version": "0.7.5",
4
4
  "description": "A streamlined deployment tool for web applications with intelligent Laravel project detection",
5
5
  "type": "module",
6
6
  "main": "./src/index.mjs",
@@ -109,6 +109,7 @@ export async function selectDeploymentTarget(rootDir, {
109
109
  logSuccess,
110
110
  logWarning,
111
111
  emitEvent,
112
+ promptPresetOptions = true,
112
113
  executionMode = {}
113
114
  } = {}) {
114
115
  const nonInteractive = executionMode?.interactive === false
@@ -247,24 +248,25 @@ export async function selectDeploymentTarget(rootDir, {
247
248
  logWarning?.('Cannot save preset: app configuration missing ID.')
248
249
  } else {
249
250
  const existingPreset = findPresetByName(projectConfig, trimmedName)
250
- const autoCommitEnabled = await promptPresetAutoCommit(
251
- runPrompt,
252
- executionMode.autoCommit === true || existingPreset?.options?.autoCommit === true
253
- )
254
251
  const nextPreset = existingPreset ?? {
255
252
  name: trimmedName,
256
253
  appId,
257
254
  branch: deploymentConfig.branch,
258
255
  options: normalizePresetOptions()
259
256
  }
257
+ const nextOptions = buildPresetOptionsFromExecutionMode(executionMode, nextPreset.options)
258
+
259
+ if (promptPresetOptions) {
260
+ nextOptions.autoCommit = await promptPresetAutoCommit(
261
+ runPrompt,
262
+ executionMode.autoCommit === true || existingPreset?.options?.autoCommit === true
263
+ )
264
+ }
260
265
 
261
266
  nextPreset.name = trimmedName
262
267
  nextPreset.appId = appId
263
268
  nextPreset.branch = deploymentConfig.branch
264
- nextPreset.options = normalizePresetOptions({
265
- ...buildPresetOptionsFromExecutionMode(executionMode, nextPreset.options),
266
- autoCommit: autoCommitEnabled
267
- })
269
+ nextPreset.options = normalizePresetOptions(nextOptions)
268
270
 
269
271
  if (!existingPreset) {
270
272
  projectConfig.presets = [...(projectConfig.presets ?? []), nextPreset]
@@ -13,12 +13,13 @@ const {
13
13
  } = appContext
14
14
  const configurationService = createConfigurationService(appContext)
15
15
 
16
- export async function selectDeploymentTarget({rootDir = process.cwd()} = {}) {
16
+ export async function selectDeploymentTarget({rootDir = process.cwd(), promptPresetOptions = false} = {}) {
17
17
  return selectDeploymentTargetImpl(rootDir, {
18
18
  configurationService,
19
19
  runPrompt,
20
20
  logProcessing,
21
21
  logSuccess,
22
- logWarning
22
+ logWarning,
23
+ promptPresetOptions
23
24
  })
24
25
  }