@stacksjs/buddy 0.58.72 → 0.59.1

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.
Files changed (58) hide show
  1. package/dist/{chunk-94f0ae38d2d27d78.js → chunk-32440b2561f1e29c.js} +568 -485
  2. package/dist/cli.d.ts +1 -0
  3. package/dist/cli.js +44 -613
  4. package/dist/commands/build.d.ts +2 -0
  5. package/dist/commands/changelog.d.ts +2 -0
  6. package/dist/commands/clean.d.ts +2 -0
  7. package/dist/commands/cloud.d.ts +2 -0
  8. package/dist/commands/commit.d.ts +2 -0
  9. package/dist/commands/configure.d.ts +2 -0
  10. package/dist/commands/create.d.ts +2 -0
  11. package/dist/commands/deploy.d.ts +2 -0
  12. package/dist/commands/dev.d.ts +3 -0
  13. package/dist/commands/dns.d.ts +2 -0
  14. package/dist/commands/domains.d.ts +2 -0
  15. package/dist/commands/fresh.d.ts +2 -0
  16. package/dist/commands/generate.d.ts +2 -0
  17. package/dist/commands/http.d.ts +2 -0
  18. package/dist/commands/index.d.ts +31 -0
  19. package/dist/commands/install.d.ts +2 -0
  20. package/dist/commands/key.d.ts +2 -0
  21. package/dist/commands/lint.d.ts +2 -0
  22. package/dist/commands/list.d.ts +2 -0
  23. package/dist/commands/make.d.ts +2 -0
  24. package/dist/commands/migrate.d.ts +2 -0
  25. package/dist/commands/ports.d.ts +2 -0
  26. package/dist/commands/prepublish.d.ts +2 -0
  27. package/dist/commands/projects.d.ts +2 -0
  28. package/dist/commands/release.d.ts +2 -0
  29. package/dist/commands/seed.d.ts +2 -0
  30. package/dist/commands/setup.d.ts +4 -0
  31. package/dist/commands/test.d.ts +2 -0
  32. package/dist/commands/tinker.d.ts +2 -0
  33. package/dist/commands/types.d.ts +2 -0
  34. package/dist/commands/upgrade.d.ts +2 -0
  35. package/dist/commands/version.d.ts +2 -0
  36. package/dist/index.d.ts +1 -0
  37. package/dist/index.js +6 -3
  38. package/dist/stacks +0 -0
  39. package/package.json +3 -5
  40. package/src/cli.ts +36 -31
  41. package/src/commands/add.ts +1 -1
  42. package/src/commands/commit.ts +1 -1
  43. package/src/commands/create.ts +6 -0
  44. package/src/commands/deploy.ts +1 -1
  45. package/src/commands/dev.ts +1 -3
  46. package/src/commands/generate.ts +10 -0
  47. package/src/commands/index.ts +2 -0
  48. package/src/commands/key.ts +1 -1
  49. package/src/commands/list.ts +1 -1
  50. package/src/commands/make.ts +28 -2
  51. package/src/commands/ports.ts +180 -0
  52. package/src/commands/prepublish.ts +1 -1
  53. package/src/commands/projects.ts +58 -0
  54. package/src/commands/setup.ts +8 -54
  55. package/src/commands/types.ts +1 -1
  56. package/src/commands/upgrade.ts +51 -4
  57. package/dist/chunk-59a9de11428ba763.js +0 -993
  58. /package/dist/{chunk-0455e53fab4244b1.js → chunk-970e033f764e29fc.js} +0 -0
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function clean(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function cloud(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function commit(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function configure(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function create(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function deploy(buddy: CLI): void;
@@ -0,0 +1,3 @@
1
+ import type { CLI, DevOptions } from '@stacksjs/types';
2
+ export declare function dev(buddy: CLI): void;
3
+ export declare function startDevelopmentServer(options: DevOptions): Promise<void>;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function dns(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function domains(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function fresh(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import { type CLI } from '@stacksjs/types';
2
+ export declare function generate(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function http(buddy: CLI): void;
@@ -0,0 +1,31 @@
1
+ export * from './build';
2
+ export * from './changelog';
3
+ export * from './clean';
4
+ export * from './cloud';
5
+ export * from './commit';
6
+ export * from './configure';
7
+ export * from './create';
8
+ export * from './deploy';
9
+ export * from './dev';
10
+ export * from './domains';
11
+ export * from './dns';
12
+ export * from './fresh';
13
+ export * from './generate';
14
+ export * from './http';
15
+ export * from './lint';
16
+ export * from './list';
17
+ export * from './install';
18
+ export * from './key';
19
+ export * from './make';
20
+ export * from './migrate';
21
+ export * from './ports';
22
+ export * from './prepublish';
23
+ export * from './projects';
24
+ export * from './release';
25
+ export * from './seed';
26
+ export * from './setup';
27
+ export * from './test';
28
+ export * from './tinker';
29
+ export * from './types';
30
+ export * from './upgrade';
31
+ export * from './version';
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function install(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function key(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function lint(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function list(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function make(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function migrate(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function ports(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function prepublish(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function projects(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function release(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function seed(buddy: CLI): void;
@@ -0,0 +1,4 @@
1
+ import type { CLI, CliOptions } from '@stacksjs/types';
2
+ export declare function setup(buddy: CLI): void;
3
+ export declare function optimizePkgxDeps(): Promise<void>;
4
+ export declare function ensureEnvIsSet(options: CliOptions): Promise<void>;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function test(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function tinker(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function types(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function upgrade(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function version(buddy: CLI): void;
@@ -0,0 +1 @@
1
+ export * from './commands';
package/dist/index.js CHANGED
@@ -22,7 +22,9 @@ list,
22
22
  make,
23
23
  migrate,
24
24
  optimizePkgxDeps,
25
+ ports,
25
26
  prepublish,
27
+ projects,
26
28
  release,
27
29
  seed,
28
30
  setup,
@@ -32,9 +34,8 @@ tinker,
32
34
  types,
33
35
  upgrade,
34
36
  version
35
- } from "./chunk-94f0ae38d2d27d78.js";
36
- import"./chunk-0455e53fab4244b1.js";
37
- import"./chunk-59a9de11428ba763.js";
37
+ } from "./chunk-32440b2561f1e29c.js";
38
+ import"./chunk-970e033f764e29fc.js";
38
39
  export {
39
40
  version,
40
41
  upgrade,
@@ -45,7 +46,9 @@ export {
45
46
  setup,
46
47
  seed,
47
48
  release,
49
+ projects,
48
50
  prepublish,
51
+ ports,
49
52
  optimizePkgxDeps,
50
53
  migrate,
51
54
  make,
package/dist/stacks ADDED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/buddy",
3
3
  "type": "module",
4
- "version": "0.58.72",
4
+ "version": "0.59.1",
5
5
  "description": "Meet Buddy. The Stacks runtime.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -66,8 +66,8 @@
66
66
  ],
67
67
  "scripts": {
68
68
  "buddy": "bunx ./src/cli.ts",
69
- "build": "bun --bun build.ts",
70
- "compile": "bun build ./src/cli.ts --compile --outfile budd",
69
+ "build": "bun --bun build.ts && bun run compile",
70
+ "compile": "bun compile.ts",
71
71
  "typecheck": "bun --bun tsc --noEmit",
72
72
  "prepublishOnly": "bun --bun run build"
73
73
  },
@@ -107,7 +107,6 @@
107
107
  "@stacksjs/search-engine": "latest",
108
108
  "@stacksjs/security": "latest",
109
109
  "@stacksjs/server": "latest",
110
- "@stacksjs/signals": "latest",
111
110
  "@stacksjs/storage": "latest",
112
111
  "@stacksjs/strings": "latest",
113
112
  "@stacksjs/testing": "latest",
@@ -153,7 +152,6 @@
153
152
  "@stacksjs/search-engine": "latest",
154
153
  "@stacksjs/security": "latest",
155
154
  "@stacksjs/server": "latest",
156
- "@stacksjs/signals": "latest",
157
155
  "@stacksjs/storage": "latest",
158
156
  "@stacksjs/strings": "latest",
159
157
  "@stacksjs/testing": "latest",
package/src/cli.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import process from 'node:process'
2
- import { handleError } from '@stacksjs/error-handling'
3
- import { CAC } from 'cac'
2
+ import type { CAC } from '@stacksjs/cli'
3
+ import { cli, log } from '@stacksjs/cli'
4
4
  import { ensureProjectIsInitialized } from '@stacksjs/utils'
5
5
  import { path as p } from '@stacksjs/path'
6
6
  import { fs } from '@stacksjs/storage'
@@ -8,63 +8,73 @@ import * as cmd from './commands'
8
8
 
9
9
  // setup global error handlers
10
10
  process.on('uncaughtException', (error: Error) => {
11
- console.error('An error occurred:', error.message)
12
- // handleError(error)
11
+ log.debug('uncaughtException')
12
+ log.error(error)
13
13
  process.exit(1)
14
14
  })
15
15
 
16
- process.on('uncaughtException', (error: Error) => {
17
- console.error('An error occurred:', error.message)
18
- handleError(error)
16
+ process.on('unhandledRejection', (error: Error) => {
17
+ log.debug('unhandledRejection')
18
+ log.error(error)
19
19
  process.exit(1)
20
20
  })
21
21
 
22
- // process.on('unhandledRejection', errorHandler)
23
-
24
- // function errorHandler(error: Error) {
25
- // console.error('An error occurred:', error.message)
26
- // log.error(error.message)
27
- // process.exit(1)
28
- // }
29
-
30
22
  async function main() {
31
- // const buddy = cli('buddy')
32
- const buddy = new CAC('buddy')
23
+ const buddy = cli('buddy')
33
24
 
34
25
  // the following commands are not dependent on the project being initialized
35
26
  cmd.setup(buddy)
36
27
  cmd.key(buddy)
37
28
 
38
29
  // before running any commands, ensure the project is already initialized
39
- await ensureProjectIsInitialized()
30
+ const isAppKeySet = await ensureProjectIsInitialized()
31
+ if (isAppKeySet) {
32
+ log.info('Project is initialized')
33
+ }
34
+ else {
35
+ log.warn('Your `APP_KEY` is not yet')
36
+ // TODO: add prompt to set the key
37
+ process.exit(1)
38
+ }
40
39
 
41
40
  cmd.build(buddy)
42
41
  cmd.changelog(buddy)
43
42
  cmd.clean(buddy)
44
43
  cmd.cloud(buddy)
45
- // cmd.commit(buddy)
44
+ cmd.commit(buddy)
46
45
  cmd.configure(buddy)
47
46
  cmd.dev(buddy)
48
47
  cmd.domains(buddy)
49
48
  cmd.deploy(buddy)
50
49
  cmd.dns(buddy)
50
+ cmd.ports(buddy)
51
+ cmd.projects(buddy)
51
52
  cmd.fresh(buddy)
52
53
  cmd.generate(buddy)
53
54
  cmd.http(buddy)
54
55
  cmd.install(buddy)
55
56
  cmd.lint(buddy)
56
57
  cmd.list(buddy)
57
- // cmd.make(buddy)
58
- // cmd.migrate(buddy)
58
+ cmd.make(buddy)
59
+ cmd.migrate(buddy)
59
60
  cmd.release(buddy)
60
- // cmd.seed(buddy)
61
+ cmd.seed(buddy)
61
62
  cmd.setup(buddy)
62
- // cmd.example(buddy)
63
- // cmd.test(buddy)
64
- // cmd.version(buddy)
65
- // cmd.prepublish(buddy)
63
+ cmd.test(buddy)
64
+ cmd.version(buddy)
65
+ cmd.prepublish(buddy)
66
66
  cmd.upgrade(buddy)
67
67
 
68
+ // dynamic imports
69
+ await dynamicImports(buddy)
70
+
71
+ buddy.help()
72
+ buddy.parse()
73
+ }
74
+
75
+ await main()
76
+
77
+ async function dynamicImports(buddy: CAC) {
68
78
  // dynamically import and register commands from ./app/Commands/*
69
79
  const commandsDir = p.appPath('Commands')
70
80
  const commandFiles = fs.readdirSync(commandsDir).filter(file => file.endsWith('.ts'))
@@ -83,9 +93,4 @@ async function main() {
83
93
  const listenerImport = await import(p.listenersPath('Console.ts'))
84
94
  if (typeof listenerImport.default === 'function')
85
95
  listenerImport.default(buddy)
86
-
87
- buddy.help()
88
- buddy.parse()
89
96
  }
90
-
91
- await main()
@@ -2,7 +2,7 @@ import process from 'node:process'
2
2
  import type { AddOptions, BuildOptions, CLI } from '@stacksjs/types'
3
3
  import { ExitCode } from '@stacksjs/types'
4
4
  import { runAdd } from '@stacksjs/actions'
5
- import { log } from 'stacks/logging'
5
+ import { log } from '@stacksjs/logging'
6
6
 
7
7
  export function add(buddy: CLI) {
8
8
  const descriptions = {
@@ -1,7 +1,7 @@
1
1
  import process from 'node:process'
2
2
  import type { CLI, FreshOptions } from '@stacksjs/types'
3
3
  import { runCommit } from '@stacksjs/actions'
4
- import { log } from 'stacks/logging'
4
+ import { log } from '@stacksjs/logging'
5
5
 
6
6
  export function commit(buddy: CLI) {
7
7
  const descriptions = {
@@ -19,12 +19,16 @@ export function create(buddy: CLI) {
19
19
  functions: 'Are you developing functions/composables?',
20
20
  api: 'Are you building an API?',
21
21
  database: 'Do you need a database?',
22
+ notifications: 'Do you need notifications? e.g. email, SMS, push or chat notifications',
23
+ cache: 'Do you need caching?',
24
+ email: 'Do you need email?',
22
25
  project: 'Target a specific project',
23
26
  verbose: 'Enable verbose output',
24
27
  }
25
28
 
26
29
  buddy
27
30
  .command('new <name>', descriptions.command)
31
+ .alias('create <name>')
28
32
  .option('-u, --ui', descriptions.ui, { default: true }) // if no, disregard remainder of questions wrt UI
29
33
  .option('-c, --components', descriptions.components, { default: true }) // if no, -v and -w would be false
30
34
  .option('-w, --web-components', descriptions.webComponents, { default: true })
@@ -33,6 +37,8 @@ export function create(buddy: CLI) {
33
37
  .option('-f, --functions', descriptions.functions, { default: true }) // if no, API would be false
34
38
  .option('-a, --api', descriptions.api, { default: true }) // APIs need an HTTP server & assumes functions is true
35
39
  .option('-d, --database', descriptions.database, { default: true })
40
+ .option('-ca, --cache', descriptions.cache, { default: false })
41
+ .option('-e, --email', descriptions.email, { default: false })
36
42
  .option('-p, --project', descriptions.project, { default: false })
37
43
  .option('--verbose', descriptions.verbose, { default: false })
38
44
  // .option('--auth', 'Scaffold an authentication?', { default: true })
@@ -69,7 +69,7 @@ async function configureDomain(domain: string, options: DeployOptions, startTime
69
69
  // TODO: add check for whether the local APP_ENV is getting deployed, if so, ask if the user meant to deploy `dev`
70
70
  if (domain.includes('localhost')) {
71
71
  log.info('You are deploying to a local environment.')
72
- log.info('Please set your .env or ./config/app.ts properly.')
72
+ log.info('Please set your .env or ./config/app.ts properly. The domain we are deploying cannot be a `localhost` domain.')
73
73
  console.log('')
74
74
  log.info('Alternatively, specify a domain to deploy via the `--domain` flag.')
75
75
  console.log('')
@@ -52,7 +52,7 @@ export function dev(buddy: CLI) {
52
52
 
53
53
  const perf = await intro('buddy dev')
54
54
 
55
- // log.info('Ensuring web server/s running...') // in other words, ensure caddy is running
55
+ // log.info('Ensuring web server/s running...')
56
56
 
57
57
  // // check if port 443 is open
58
58
  // const result = await runCommand('lsof -i :443', { silent: true })
@@ -60,8 +60,6 @@ export function dev(buddy: CLI) {
60
60
  // if (result.isErr())
61
61
  // log.warn('While checking if port 443 is open, we noticed it may be in use')
62
62
 
63
- // runAction(Action.StartCaddy, { ...options, silent: true })
64
-
65
63
  switch (server) {
66
64
  case 'frontend':
67
65
  await runFrontendDevServer(options)
@@ -1,6 +1,7 @@
1
1
  import process from 'node:process'
2
2
  import {
3
3
  generateComponentMeta,
4
+ generateCoreSymlink,
4
5
  generateIdeHelpers,
5
6
  generateLibEntries,
6
7
  generateMigrations,
@@ -22,6 +23,7 @@ export function generate(buddy: CLI) {
22
23
  customData: 'Generate VS Code custom data (custom-elements.json) for IDEs',
23
24
  ideHelpers: 'Generate IDE helpers',
24
25
  componentMeta: 'Generate component meta information',
26
+ coreSymlink: 'Generate symlink of the core framework to the project root',
25
27
  pkgx: 'Generate the pkgx configuration file',
26
28
  select: 'What are you trying to generate?',
27
29
  project: 'Target a specific project',
@@ -38,6 +40,7 @@ export function generate(buddy: CLI) {
38
40
  .option('-c, --component-meta', descriptions.componentMeta)
39
41
  .option('-p, --pkgx', descriptions.pkgx)
40
42
  .option('-p, --project', descriptions.project, { default: false })
43
+ .option('--core-symlink', descriptions.coreSymlink)
41
44
  .option('--verbose', descriptions.verbose, { default: false })
42
45
  .action(async (options: GeneratorOptions) => {
43
46
  log.debug('Running `buddy generate` ...', options)
@@ -139,6 +142,13 @@ export function generate(buddy: CLI) {
139
142
  generateMigrations()
140
143
  })
141
144
 
145
+ buddy
146
+ .command('generate:core-symlink', 'Generate core symlink. A shortcut for core developers.')
147
+ .action(async (options: GeneratorOptions) => {
148
+ log.debug('Running `buddy core-symlink` ...', options)
149
+ await generateCoreSymlink()
150
+ })
151
+
142
152
  buddy.on('generate:*', () => {
143
153
  console.error('Invalid command: %s\nSee --help for a list of available commands.', buddy.args.join(' '))
144
154
  process.exit(1)
@@ -18,7 +18,9 @@ export * from './install'
18
18
  export * from './key'
19
19
  export * from './make'
20
20
  export * from './migrate'
21
+ export * from './ports'
21
22
  export * from './prepublish'
23
+ export * from './projects'
22
24
  export * from './release'
23
25
  export * from './seed'
24
26
  export * from './setup'
@@ -1,8 +1,8 @@
1
1
  import process from 'node:process'
2
2
  import type { CLI, KeyOptions } from '@stacksjs/types'
3
3
  import { intro, log, outro } from '@stacksjs/cli'
4
- import { Action } from '@stacksjs/enums'
5
4
  import { runAction } from '@stacksjs/actions'
5
+ import { Action } from '@stacksjs/enums'
6
6
 
7
7
  export function key(buddy: CLI) {
8
8
  const descriptions = {
@@ -2,7 +2,7 @@ import process from 'node:process'
2
2
  import type { CLI, CliOptions } from '@stacksjs/types'
3
3
  import { $ } from 'bun'
4
4
  import { projectPath } from '@stacksjs/path'
5
- import { log } from 'stacks/logging'
5
+ import { log } from '@stacksjs/logging'
6
6
 
7
7
  export function list(buddy: CLI) {
8
8
  const descriptions = {
@@ -10,7 +10,9 @@ import {
10
10
  makePage,
11
11
  makeStack,
12
12
  } from '@stacksjs/actions'
13
- import { intro, italic, outro } from '@stacksjs/cli'
13
+ import { intro, italic, outro, runCommand } from '@stacksjs/cli'
14
+ import { localUrl } from '@stacksjs/config'
15
+ import { path as p } from '@stacksjs/path'
14
16
  import { log } from '@stacksjs/logging'
15
17
  import type { CLI, MakeOptions } from '@stacksjs/types'
16
18
  import { ExitCode } from '@stacksjs/types'
@@ -26,7 +28,8 @@ export function make(buddy: CLI) {
26
28
  migration: 'Create a new migration',
27
29
  factory: 'Create a new factory',
28
30
  notification: 'Create a new notification',
29
- stack: 'Create a new new stack',
31
+ stack: 'Create a new stack',
32
+ certificate: 'Create a new SSL Certificate',
30
33
  select: 'What are you trying to make?',
31
34
  project: 'Target a specific project',
32
35
  verbose: 'Enable verbose output',
@@ -280,6 +283,29 @@ export function make(buddy: CLI) {
280
283
  log.info(path, name)
281
284
  })
282
285
 
286
+ buddy
287
+ .command('make:certificate', descriptions.certificate)
288
+ .alias('make:cert')
289
+ .example('buddy make:certificate')
290
+ .action(async (options: MakeOptions) => {
291
+ log.debug('Running `buddy make:certificate` ...', options)
292
+
293
+ const domain = await localUrl()
294
+ log.info(`Creating SSL certificate...`)
295
+
296
+ await runCommand(`mkcert ${domain}`, {
297
+ cwd: p.projectStoragePath('keys'),
298
+ })
299
+
300
+ log.success('Certificate created')
301
+
302
+ log.info(`Installing SSL certificate...`)
303
+ await runCommand(`mkcert -install`, {
304
+ cwd: p.projectStoragePath('keys'),
305
+ })
306
+ log.success('Certificate installed')
307
+ })
308
+
283
309
  buddy.on('make:*', () => {
284
310
  console.error('Invalid command: %s\nSee --help for a list of available commands.', buddy.args.join(' '))
285
311
  process.exit(1)