@adobe/aio-cli-plugin-app 10.0.3 → 10.1.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.
@@ -30,7 +30,7 @@ const { run: logPoller } = require('./log-poller')
30
30
  const getPort = require('get-port')
31
31
 
32
32
  /** @private */
33
- async function runDev (config, dataDir, options = {}, log = () => {}) {
33
+ async function runDev (config, dataDir, options = {}, log = () => {}, inprocHook) {
34
34
  /* parcel bundle options */
35
35
  const bundleOptions = {
36
36
  shouldDisableCache: true,
@@ -38,6 +38,7 @@ async function runDev (config, dataDir, options = {}, log = () => {}) {
38
38
  shouldOptimize: false,
39
39
  ...options.parcel
40
40
  }
41
+
41
42
  /* skip actions */
42
43
  const skipActions = !!options.skipActions
43
44
  /* fetch logs for actions option */
@@ -48,6 +49,7 @@ async function runDev (config, dataDir, options = {}, log = () => {}) {
48
49
  const withBackend = config.app.hasBackend && !skipActions
49
50
  const isLocal = options.isLocal // applies only for backend
50
51
  const portToUse = parseInt(process.env.PORT) || SERVER_DEFAULT_PORT
52
+
51
53
  const uiPort = await getPort({ port: portToUse })
52
54
  if (uiPort !== portToUse) {
53
55
  log(`Could not use port:${portToUse}, using port:${uiPort} instead`)
@@ -82,7 +84,7 @@ async function runDev (config, dataDir, options = {}, log = () => {}) {
82
84
  log('building actions..')
83
85
  await buildActions(devConfig, null, true /* force build */)
84
86
 
85
- const { cleanup: watcherCleanup } = await actionsWatcher({ config: devConfig, isLocal, log })
87
+ const { cleanup: watcherCleanup } = await actionsWatcher({ config: devConfig, isLocal, log, inprocHook })
86
88
  cleanup.add(() => watcherCleanup(), 'stopping action watcher...')
87
89
  }
88
90
 
@@ -121,7 +123,7 @@ async function runDev (config, dataDir, options = {}, log = () => {}) {
121
123
  // Deploy Phase - deploy actions
122
124
  if (withBackend) {
123
125
  log('redeploying actions..')
124
- await deployActions(devConfig, isLocal, log, true)
126
+ await deployActions(devConfig, isLocal, log, true, inprocHook)
125
127
  }
126
128
 
127
129
  // Deploy Phase - serve the web UI