Skip to content

Commit

Permalink
Merge pull request #41 from Space48/deprecations
Browse files Browse the repository at this point in the history
Add deprecation warnings for deprecated features
  • Loading branch information
S48-Mo authored Jan 19, 2022
2 parents 80177bd + 567074e commit fd5ca5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import serve from "../serve";

const BUILD_DIR = "./.build/functions";

export const cmdServe: cliCommand = (argv) => {
export const cmdServe: cliCommand = argv => {
const validArgs: arg.Spec = {
// Types
"--help": Boolean,
Expand All @@ -30,6 +30,7 @@ export const cmdServe: cliCommand = (argv) => {
if (args["--help"]) {
return printAndExit(
`
\x1b[93mDEPRECATION WARNING: This command is deprecated and will be removed in a future version.\x1b[0m
Usage
$ cloud-seed serve <name> [--options]
Serves the function <name> on the local machine
Expand Down
4 changes: 4 additions & 0 deletions serve/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export default (
env = "dev",
port = 5000,
) => {
console.log("> \x1b[93mDEPRECATION WARNING! 😢");
console.log(
"> I'm very sorry, but this commmand is deprecated and will be removed in a future version.\x1b[0m",
);
applyLocalConfig(projectId, env);
const path = resolve(buildDir + "/" + fnConfig.name);
const fn = require(path);
Expand Down

0 comments on commit fd5ca5f

Please sign in to comment.