From 9e15d401668d6269e5ba0b4c3e3204c7d7da9743 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Sun, 19 Apr 2026 12:27:45 +0200 Subject: [PATCH] feat: make juno functions init default instead of eject Signed-off-by: David Dal Busco --- src/commands/deprecated/dev.ts | 3 ++- src/commands/functions.ts | 2 +- src/constants/help.constants.ts | 2 +- src/help/deprecated/dev.help.ts | 2 +- src/help/functions.help.ts | 3 +-- .../{functions.eject.help.ts => functions.init.help.ts} | 8 ++++---- 6 files changed, 10 insertions(+), 10 deletions(-) rename src/help/{functions.eject.help.ts => functions.init.help.ts} (78%) diff --git a/src/commands/deprecated/dev.ts b/src/commands/deprecated/dev.ts index c555b313..cbde28d8 100644 --- a/src/commands/deprecated/dev.ts +++ b/src/commands/deprecated/dev.ts @@ -3,7 +3,7 @@ import {logHelpDev} from '../../help/deprecated/dev.help'; import {logHelpEmulatorStart} from '../../help/emulator.start.help'; import {logHelpEmulatorWait} from '../../help/emulator.wait.help'; import {logHelpFunctionsBuild} from '../../help/functions.build.help'; -import {logHelpFunctionsEject} from '../../help/functions.eject.help'; +import {logHelpFunctionsEject} from '../../help/functions.init.help'; import {start} from '../../services/emulator/start.services'; import {stop} from '../../services/emulator/stop.services'; import {wait} from '../../services/emulator/wait.services'; @@ -27,6 +27,7 @@ export const dev = async (args?: string[]) => { await wait(args); break; case 'eject': + case 'init': await eject(args); break; case 'build': diff --git a/src/commands/functions.ts b/src/commands/functions.ts index 9a83626c..b3bbe2c7 100644 --- a/src/commands/functions.ts +++ b/src/commands/functions.ts @@ -1,7 +1,7 @@ import {red} from 'kleur'; import {logHelpFunctionsBuild} from '../help/functions.build.help'; -import {logHelpFunctionsEject} from '../help/functions.eject.help'; import {logHelpFunctions} from '../help/functions.help'; +import {logHelpFunctionsEject} from '../help/functions.init.help'; import {logHelpFunctionsPublish} from '../help/functions.publish.help'; import {logHelpFunctionsUpgrade} from '../help/functions.upgrade.help'; import {build} from '../services/functions/build/build.services'; diff --git a/src/constants/help.constants.ts b/src/constants/help.constants.ts index 3d1da389..32fc76fc 100644 --- a/src/constants/help.constants.ts +++ b/src/constants/help.constants.ts @@ -38,7 +38,7 @@ export const EMULATOR_CLEAR_DESCRIPTION = 'Clear the local emulator state (volum export const FUNCTIONS_PUBLISH_DESCRIPTION = 'Publish a new version of your serverless functions.'; export const FUNCTIONS_UPGRADE_DESCRIPTION = 'Upgrade your serverless functions.'; export const FUNCTIONS_BUILD_DESCRIPTION = 'Build your serverless functions.'; -export const FUNCTIONS_EJECT_DESCRIPTION = +export const FUNCTIONS_INIT_DESCRIPTION = 'Generate the required files to begin developing serverless functions in your project.'; export const FUNCTIONS_BUILD_NOTES = `- If no language is provided, the CLI attempts to determine the appropriate build. diff --git a/src/help/deprecated/dev.help.ts b/src/help/deprecated/dev.help.ts index 662ed57c..98ca6284 100644 --- a/src/help/deprecated/dev.help.ts +++ b/src/help/deprecated/dev.help.ts @@ -10,7 +10,7 @@ Subcommands: ${magenta('stop')} Alias for ${green('juno')} ${cyan('emulator')} ${magenta('stop')}. ${magenta('wait')} Alias for ${green('juno')} ${cyan('emulator')} ${magenta('wait')}. ${magenta('build')} Alias for ${green('juno')} ${cyan('functions')} ${magenta('build')}. - ${magenta('eject')} Alias for ${green('juno')} ${cyan('functions')} ${magenta('eject')}.`; + ${magenta('init')} Alias for ${green('juno')} ${cyan('functions')} ${magenta('init')}.`; const doc = `${EMULATOR_DESCRIPTION} diff --git a/src/help/functions.help.ts b/src/help/functions.help.ts index 0a2ed86c..0411c64c 100644 --- a/src/help/functions.help.ts +++ b/src/help/functions.help.ts @@ -7,8 +7,7 @@ const usage = `Usage: ${green('juno')} ${cyan('functions')} ${magenta('