@stacksjs/buddy 0.56.23 → 0.56.27

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.
package/dist/cli.mjs CHANGED
@@ -6,7 +6,7 @@ import { env } from '@stacksjs/validation';
6
6
  import { installIfVersionMismatch, isProjectCreated, frameworkVersion } from '@stacksjs/utils';
7
7
  import { projectPath } from '@stacksjs/path';
8
8
  import { Action } from '@stacksjs/types';
9
- import { o as setup, k as key, e as create, n as preinstall, p as prepublish, u as upgrade, i as generate, f as dev, b as build, c as changelog, a as clean, d as commit, h as fresh, l as lint, r as release, m as make, j as migrate, s as seed, g as example, t as test, v as version } from './shared/buddy.4ed611cb.mjs';
9
+ import { q as setup, k as key, o as preinstall, p as prepublish, u as upgrade, j as generate, g as dev, b as build, c as changelog, a as clean, d as commit, f as deploy, i as fresh, l as lint, r as release, m as make, n as migrate, s as seed, h as example, t as test, v as version, e as create } from './shared/buddy.a9cc0bdf.mjs';
10
10
  import '@stacksjs/actions/generate';
11
11
  import '@stacksjs/actions/commit';
12
12
  import '@stacksjs/storage';
@@ -23,17 +23,8 @@ async function main() {
23
23
  await installIfVersionMismatch();
24
24
  await setup(cli);
25
25
  await key(cli);
26
- if (!await isProjectCreated()) {
27
- if (env.APP_ENV !== "production")
28
- log.info("Project not yet initialized, generating application key...");
29
- else
30
- handleError(new Error("Please run `buddy key:generate` to generate an application key"));
31
- const result = await runAction(Action.KeyGenerate, { cwd: projectPath() });
32
- if (result.isErr())
33
- handleError(result.error);
34
- log.info("Application key generated.");
35
- await create(cli);
36
- }
26
+ if (!await isProjectCreated())
27
+ await initProject();
37
28
  await preinstall(cli);
38
29
  await prepublish(cli);
39
30
  await upgrade(cli);
@@ -43,6 +34,7 @@ async function main() {
43
34
  await changelog(cli);
44
35
  await clean(cli);
45
36
  await commit(cli);
37
+ await deploy(cli);
46
38
  await fresh(cli);
47
39
  await lint(cli);
48
40
  await release(cli);
@@ -56,4 +48,17 @@ async function main() {
56
48
  cli.version(await frameworkVersion());
57
49
  cli.parse();
58
50
  }
51
+ async function initProject() {
52
+ console.log("env.APP_ENV?");
53
+ console.log("env.APP_ENV", env.APP_ENV);
54
+ if (env.APP_ENV !== "production")
55
+ log.info("Project not yet initialized, generating application key...");
56
+ else
57
+ handleError(new Error("Please run `buddy key:generate` to generate an application key"));
58
+ const result = await runAction(Action.KeyGenerate, { cwd: projectPath() });
59
+ if (result.isErr())
60
+ handleError(result.error);
61
+ log.info("Application key generated.");
62
+ await create(cli);
63
+ }
59
64
  main();
package/dist/index.d.ts CHANGED
@@ -30,8 +30,6 @@ declare function make(buddy: CLI): Promise<void>;
30
30
 
31
31
  declare function migrate(buddy: CLI): Promise<void>;
32
32
 
33
- declare function onboarding(buddy: CLI): Promise<void>;
34
-
35
33
  declare function prepublish(buddy: CLI): Promise<void>;
36
34
 
37
35
  declare function preinstall(buddy: CLI): Promise<void>;
@@ -40,8 +38,6 @@ declare function release(buddy: CLI): Promise<void>;
40
38
 
41
39
  declare function seed(buddy: CLI): Promise<void>;
42
40
 
43
- declare function setting(buddy: CLI): Promise<void>;
44
-
45
41
  declare function setup(buddy: CLI): Promise<void>;
46
42
 
47
43
  declare function test(buddy: CLI): Promise<void>;
@@ -54,4 +50,4 @@ declare function upgrade(buddy: CLI): Promise<void>;
54
50
 
55
51
  declare function version(buddy: CLI): Promise<void>;
56
52
 
57
- export { build, changelog, clean, commit, create, deploy, dev, example, fresh, generate, inspire, key, lint, make, migrate, onboarding, preinstall, prepublish, release, seed, setting, setup, test, tinker, types, upgrade, version };
53
+ export { build, changelog, clean, commit, create, deploy, dev, example, fresh, generate, inspire, key, lint, make, migrate, preinstall, prepublish, release, seed, setup, test, tinker, types, upgrade, version };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { b as build, c as changelog, a as clean, d as commit, e as create, f as dev, g as example, h as fresh, i as generate, k as key, l as lint, m as make, j as migrate, n as preinstall, p as prepublish, r as release, s as seed, o as setup, t as test, u as upgrade, v as version } from './shared/buddy.4ed611cb.mjs';
1
+ export { b as build, c as changelog, a as clean, d as commit, e as create, f as deploy, g as dev, h as example, i as fresh, j as generate, k as key, l as lint, m as make, n as migrate, o as preinstall, p as prepublish, r as release, s as seed, q as setup, t as test, u as upgrade, v as version } from './shared/buddy.a9cc0bdf.mjs';
2
2
  import { runAction } from '@stacksjs/actions';
3
3
  import { intro, outro } from '@stacksjs/cli';
4
4
  import { Action, ExitCode } from '@stacksjs/types';
@@ -13,23 +13,6 @@ import '@stacksjs/actions/make';
13
13
  import '@stacksjs/actions/preinstall';
14
14
  import '@stacksjs/logging';
15
15
 
16
- async function deploy(buddy) {
17
- const descriptions = {
18
- deploy: "Reinstalls your npm dependencies",
19
- verbose: "Enable verbose output"
20
- };
21
- buddy.command("deploy", descriptions.deploy).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
22
- const perf = await intro("buddy deploy");
23
- const result = await runAction(Action.Deploy, options);
24
- if (result.isErr()) {
25
- outro("While running the `buddy deploy`, there was an issue", { startTime: perf, useSeconds: true, isError: true }, result.error);
26
- process.exit();
27
- }
28
- outro("Deployment succeeded.", { startTime: perf, useSeconds: true });
29
- process.exit(ExitCode.Success);
30
- });
31
- }
32
-
33
16
  async function inspire(buddy) {
34
17
  buddy.command("inspire", "Inspire yourself with a random quote").option("--two", "Show two quotes", { default: false }).action(async () => {
35
18
  const perf = await intro("buddy inspire");
@@ -43,26 +26,6 @@ async function inspire(buddy) {
43
26
  });
44
27
  }
45
28
 
46
- async function onboarding(buddy) {
47
- const descriptions = {
48
- command: "Generate Onboarding Pages",
49
- verbose: "Enable verbose output"
50
- };
51
- buddy.command("page:onboarding", descriptions.command).option("--verbose", descriptions.verbose, { default: false }).action(async () => {
52
- console.log("onboarding");
53
- });
54
- }
55
-
56
- async function setting(buddy) {
57
- const descriptions = {
58
- command: "Generate Setting Pages",
59
- verbose: "Enable verbose output"
60
- };
61
- buddy.command("page:setting", descriptions.command).option("--verbose", descriptions.verbose, { default: false }).action(async () => {
62
- console.log("Generating setting views...");
63
- });
64
- }
65
-
66
29
  async function tinker(buddy) {
67
30
  const descriptions = {
68
31
  tinker: "Tinker with your code",
@@ -93,4 +56,4 @@ async function types(buddy) {
93
56
  });
94
57
  }
95
58
 
96
- export { deploy, inspire, onboarding, setting, tinker, types };
59
+ export { inspire, tinker, types };
@@ -216,6 +216,33 @@ async function install(path, options) {
216
216
  log.success("Installed & set-up \u{1F680}");
217
217
  }
218
218
 
219
+ async function deploy(buddy) {
220
+ const descriptions = {
221
+ deploy: "Reinstalls your npm dependencies",
222
+ verbose: "Enable verbose output"
223
+ };
224
+ buddy.command("deploy", descriptions.deploy).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
225
+ const perf = await intro("buddy deploy");
226
+ const result = await runAction(Action.Deploy, options);
227
+ if (result.isErr()) {
228
+ outro("While running the `buddy deploy`, there was an issue", { startTime: perf, useSeconds: true, isError: true }, result.error);
229
+ process.exit();
230
+ }
231
+ outro("Deployment succeeded.", { startTime: perf, useSeconds: true });
232
+ process.exit(ExitCode.Success);
233
+ });
234
+ buddy.command("deploy:domains", descriptions.deploy).option("--verbose", descriptions.verbose, { default: false }).action(async (options) => {
235
+ const perf = await intro("buddy deploy:domains");
236
+ const result = await runAction(Action.Deploy, { ...options, domains: true });
237
+ if (result.isErr()) {
238
+ outro("While running the `buddy deploy`, there was an issue", { startTime: perf, useSeconds: true, isError: true }, result.error);
239
+ process.exit();
240
+ }
241
+ outro("Deployment succeeded.", { startTime: perf, useSeconds: true });
242
+ process.exit(ExitCode.Success);
243
+ });
244
+ }
245
+
219
246
  async function dev(buddy) {
220
247
  const descriptions = {
221
248
  components: "Start the Components development server",
@@ -836,4 +863,4 @@ async function version(buddy) {
836
863
  });
837
864
  }
838
865
 
839
- export { clean as a, build as b, changelog as c, commit as d, create as e, dev as f, example as g, fresh as h, generate as i, migrate as j, key as k, lint as l, make as m, preinstall as n, setup as o, prepublish as p, release as r, seed as s, test as t, upgrade as u, version as v };
866
+ export { clean as a, build as b, changelog as c, commit as d, create as e, deploy as f, dev as g, example as h, fresh as i, generate as j, key as k, lint as l, make as m, migrate as n, preinstall as o, prepublish as p, setup as q, release as r, seed as s, test as t, upgrade as u, version as v };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/buddy",
3
3
  "type": "module",
4
- "version": "0.56.23",
4
+ "version": "0.56.27",
5
5
  "packageManager": "pnpm@8.6.5",
6
6
  "description": "Meet Buddy. The Stacks runtime.",
7
7
  "author": "Chris Breuer",
@@ -46,7 +46,6 @@
46
46
  "import": "./dist/cli.mjs"
47
47
  }
48
48
  },
49
- "main": "dist/index.mjs",
50
49
  "module": "dist/index.mjs",
51
50
  "types": "dist/index.d.ts",
52
51
  "contributors": [
@@ -63,53 +62,53 @@
63
62
  "README.md"
64
63
  ],
65
64
  "peerDependencies": {
66
- "@stacksjs/actions": "0.56.23",
67
- "@stacksjs/ai": "0.56.23",
68
- "@stacksjs/alias": "0.56.23",
69
- "@stacksjs/arrays": "0.56.23",
70
- "@stacksjs/auth": "0.56.23",
71
- "@stacksjs/build": "0.56.23",
72
- "@stacksjs/cache": "0.56.23",
73
- "@stacksjs/cli": "0.56.23",
74
- "@stacksjs/cloud": "0.56.23",
75
- "@stacksjs/collections": "0.56.23",
76
- "@stacksjs/config": "0.56.23",
77
- "@stacksjs/database": "0.56.23",
78
- "@stacksjs/desktop": "0.56.23",
79
- "@stacksjs/development": "0.56.23",
80
- "@stacksjs/dns": "0.56.23",
81
- "@stacksjs/docs": "0.56.23",
82
- "@stacksjs/email": "0.56.23",
83
- "@stacksjs/error-handling": "0.56.23",
84
- "@stacksjs/events": "0.56.23",
85
- "@stacksjs/faker": "0.56.23",
86
- "@stacksjs/git": "0.56.23",
87
- "@stacksjs/health": "0.56.23",
88
- "@stacksjs/lint": "0.56.23",
89
- "@stacksjs/logging": "0.56.23",
90
- "@stacksjs/modules": "0.56.23",
91
- "@stacksjs/notifications": "0.56.23",
92
- "@stacksjs/objects": "0.56.23",
93
- "@stacksjs/orm": "0.56.23",
94
- "@stacksjs/pages": "0.56.23",
95
- "@stacksjs/path": "0.56.23",
96
- "@stacksjs/payments": "0.56.23",
97
- "@stacksjs/realtime": "0.56.23",
98
- "@stacksjs/router": "0.56.23",
99
- "@stacksjs/search-engine": "0.56.23",
100
- "@stacksjs/security": "0.56.23",
101
- "@stacksjs/server": "0.56.23",
102
- "@stacksjs/signals": "0.56.23",
103
- "@stacksjs/storage": "0.56.23",
104
- "@stacksjs/strings": "0.56.23",
105
- "@stacksjs/testing": "0.56.23",
106
- "@stacksjs/types": "0.56.23",
107
- "@stacksjs/ui": "0.56.23",
108
- "@stacksjs/utils": "0.56.23",
109
- "@stacksjs/validation": "0.56.23"
65
+ "@stacksjs/actions": "0.56.27",
66
+ "@stacksjs/ai": "0.56.27",
67
+ "@stacksjs/alias": "0.56.27",
68
+ "@stacksjs/arrays": "0.56.27",
69
+ "@stacksjs/auth": "0.56.27",
70
+ "@stacksjs/build": "0.56.27",
71
+ "@stacksjs/cache": "0.56.27",
72
+ "@stacksjs/cli": "0.56.27",
73
+ "@stacksjs/cloud": "0.56.27",
74
+ "@stacksjs/collections": "0.56.27",
75
+ "@stacksjs/config": "0.56.27",
76
+ "@stacksjs/database": "0.56.27",
77
+ "@stacksjs/desktop": "0.56.27",
78
+ "@stacksjs/development": "0.56.27",
79
+ "@stacksjs/dns": "0.56.27",
80
+ "@stacksjs/docs": "0.56.27",
81
+ "@stacksjs/email": "0.56.27",
82
+ "@stacksjs/error-handling": "0.56.27",
83
+ "@stacksjs/events": "0.56.27",
84
+ "@stacksjs/faker": "0.56.27",
85
+ "@stacksjs/git": "0.56.27",
86
+ "@stacksjs/health": "0.56.27",
87
+ "@stacksjs/lint": "0.56.27",
88
+ "@stacksjs/logging": "0.56.27",
89
+ "@stacksjs/modules": "0.56.27",
90
+ "@stacksjs/notifications": "0.56.27",
91
+ "@stacksjs/objects": "0.56.27",
92
+ "@stacksjs/orm": "0.56.27",
93
+ "@stacksjs/pages": "0.56.27",
94
+ "@stacksjs/path": "0.56.27",
95
+ "@stacksjs/payments": "0.56.27",
96
+ "@stacksjs/realtime": "0.56.27",
97
+ "@stacksjs/router": "0.56.27",
98
+ "@stacksjs/search-engine": "0.56.27",
99
+ "@stacksjs/security": "0.56.27",
100
+ "@stacksjs/server": "0.56.27",
101
+ "@stacksjs/signals": "0.56.27",
102
+ "@stacksjs/storage": "0.56.27",
103
+ "@stacksjs/strings": "0.56.27",
104
+ "@stacksjs/testing": "0.56.27",
105
+ "@stacksjs/types": "0.56.27",
106
+ "@stacksjs/ui": "0.56.27",
107
+ "@stacksjs/utils": "0.56.27",
108
+ "@stacksjs/validation": "0.56.27"
110
109
  },
111
110
  "devDependencies": {
112
- "@stacksjs/development": "0.56.23"
111
+ "@stacksjs/development": "0.56.27"
113
112
  },
114
113
  "config": {
115
114
  "commitizen": {