Skip to content

Commit 4fbc9e0

Browse files
feat: make juno functions init default instead of eject (#510)
Signed-off-by: David Dal Busco <david.dalbusco@outlook.com>
1 parent ccd0d16 commit 4fbc9e0

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/commands/deprecated/dev.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {logHelpDev} from '../../help/deprecated/dev.help';
33
import {logHelpEmulatorStart} from '../../help/emulator.start.help';
44
import {logHelpEmulatorWait} from '../../help/emulator.wait.help';
55
import {logHelpFunctionsBuild} from '../../help/functions.build.help';
6-
import {logHelpFunctionsEject} from '../../help/functions.eject.help';
6+
import {logHelpFunctionsEject} from '../../help/functions.init.help';
77
import {start} from '../../services/emulator/start.services';
88
import {stop} from '../../services/emulator/stop.services';
99
import {wait} from '../../services/emulator/wait.services';
@@ -27,6 +27,7 @@ export const dev = async (args?: string[]) => {
2727
await wait(args);
2828
break;
2929
case 'eject':
30+
case 'init':
3031
await eject(args);
3132
break;
3233
case 'build':

src/commands/functions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {red} from 'kleur';
22
import {logHelpFunctionsBuild} from '../help/functions.build.help';
3-
import {logHelpFunctionsEject} from '../help/functions.eject.help';
43
import {logHelpFunctions} from '../help/functions.help';
4+
import {logHelpFunctionsEject} from '../help/functions.init.help';
55
import {logHelpFunctionsPublish} from '../help/functions.publish.help';
66
import {logHelpFunctionsUpgrade} from '../help/functions.upgrade.help';
77
import {build} from '../services/functions/build/build.services';

src/constants/help.constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const EMULATOR_CLEAR_DESCRIPTION = 'Clear the local emulator state (volum
3838
export const FUNCTIONS_PUBLISH_DESCRIPTION = 'Publish a new version of your serverless functions.';
3939
export const FUNCTIONS_UPGRADE_DESCRIPTION = 'Upgrade your serverless functions.';
4040
export const FUNCTIONS_BUILD_DESCRIPTION = 'Build your serverless functions.';
41-
export const FUNCTIONS_EJECT_DESCRIPTION =
41+
export const FUNCTIONS_INIT_DESCRIPTION =
4242
'Generate the required files to begin developing serverless functions in your project.';
4343

4444
export const FUNCTIONS_BUILD_NOTES = `- If no language is provided, the CLI attempts to determine the appropriate build.

src/help/deprecated/dev.help.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Subcommands:
1010
${magenta('stop')} Alias for ${green('juno')} ${cyan('emulator')} ${magenta('stop')}.
1111
${magenta('wait')} Alias for ${green('juno')} ${cyan('emulator')} ${magenta('wait')}.
1212
${magenta('build')} Alias for ${green('juno')} ${cyan('functions')} ${magenta('build')}.
13-
${magenta('eject')} Alias for ${green('juno')} ${cyan('functions')} ${magenta('eject')}.`;
13+
${magenta('init')} Alias for ${green('juno')} ${cyan('functions')} ${magenta('init')}.`;
1414

1515
const doc = `${EMULATOR_DESCRIPTION}
1616

src/help/functions.help.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ const usage = `Usage: ${green('juno')} ${cyan('functions')} ${magenta('<subcomma
77
88
Subcommands:
99
${magenta('build')} Build your functions.
10-
${magenta('eject')} Scaffold the necessary files for developing your serverless functions.
11-
${magenta('init')} Alias for ${magenta('eject')}.
10+
${magenta('init')} Scaffold the necessary files for developing your serverless functions.
1211
${magenta('publish')} Publish a new version of your functions.
1312
${magenta('upgrade')} Upgrade your satellite's serverless functions.
1413
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {cyan, green, magenta, yellow} from 'kleur';
2-
import {FUNCTIONS_EJECT_DESCRIPTION, OPTION_HELP} from '../constants/help.constants';
2+
import {FUNCTIONS_INIT_DESCRIPTION, OPTION_HELP} from '../constants/help.constants';
33
import {helpOutput} from './common.help';
44
import {TITLE} from './help';
55

6-
const usage = `Usage: ${green('juno')} ${cyan('functions')} ${magenta('eject')} ${yellow('[options]')}
6+
const usage = `Usage: ${green('juno')} ${cyan('functions')} ${magenta('init')} ${yellow('[options]')}
77
88
Options:
99
${yellow('-l, --lang')} Specify the language for building the serverless functions: ${magenta('rust')}, ${magenta('typescript')} or ${magenta('javascript')}.
@@ -13,7 +13,7 @@ Notes:
1313
1414
- Language can be shortened to ${magenta('rs')} for Rust, ${magenta('ts')} for TypeScript and ${magenta('mjs')} for JavaScript.`;
1515

16-
const doc = `${FUNCTIONS_EJECT_DESCRIPTION}
16+
const doc = `${FUNCTIONS_INIT_DESCRIPTION}
1717
1818
\`\`\`
1919
${usage}
@@ -22,7 +22,7 @@ ${usage}
2222

2323
const help = `${TITLE}
2424
25-
${FUNCTIONS_EJECT_DESCRIPTION}
25+
${FUNCTIONS_INIT_DESCRIPTION}
2626
2727
${usage}
2828
`;

0 commit comments

Comments
 (0)