@stacksjs/actions 0.48.3 → 0.49.0

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.
@@ -2,5 +2,7 @@ import { frameworkPath } from "@stacksjs/path";
2
2
  import { runCommands } from "@stacksjs/cli";
3
3
  await runCommands([
4
4
  "pnpm --filter './core/**' --filter='!./core/config' --filter='!./core/x-ray' build",
5
- "pnpm --filter '../core/config' build"
5
+ // command to build the core packages, excluding the config & x-ray package
6
+ "pnpm --filter './core/config' build"
7
+ // command to build the config package
6
8
  ], { debug: true, cwd: frameworkPath(), shell: true });
@@ -2,7 +2,11 @@ import { frameworkPath } from "@stacksjs/path";
2
2
  import { runCommands } from "@stacksjs/cli";
3
3
  await runCommands([
4
4
  "npx mkdist -d",
5
+ // command to build the dist folder
5
6
  "pnpm build:cli",
7
+ // command to build the Buddy CLI
6
8
  "pnpm build:core",
9
+ // command to build the Stacks Core
7
10
  "cp -a ./core/. ./"
11
+ // copy the core stacks to the famework's root
8
12
  ], { debug: true, cwd: frameworkPath() });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { runCommand } from "@stacksjs/cli";
2
+ import { frameworkPath } from "@stacksjs/path";
3
+ import { NpmScript } from "@stacksjs/types";
4
+ await runCommand(NpmScript.DevComponents, { cwd: frameworkPath(), debug: true });
package/dist/dev.mjs CHANGED
@@ -2,6 +2,7 @@ import { log } from "@stacksjs/logging";
2
2
  import { runNpmScript } from "@stacksjs/utils";
3
3
  import { NpmScript } from "@stacksjs/types";
4
4
  export async function invoke(options) {
5
+ console.log("options are: ", options);
5
6
  if (options.components || options.all)
6
7
  await components(options);
7
8
  else if (options.docs || options.all)
@@ -17,6 +18,7 @@ export async function dev(options) {
17
18
  return invoke(options);
18
19
  }
19
20
  export async function components(options) {
21
+ console.log("here?");
20
22
  log.info("Starting your components dev server...");
21
23
  await runNpmScript(NpmScript.DevComponents, options);
22
24
  }
@@ -23,6 +23,7 @@ export async function generateComponentMeta() {
23
23
  props.push({
24
24
  name: `${name}${required ? "" : "?"}`,
25
25
  description: md.render(description),
26
+ // required,
26
27
  type,
27
28
  default: defaultValue || "unknown"
28
29
  });
@@ -2,7 +2,7 @@ import { log } from "@stacksjs/logging";
2
2
  import { writeTextFile } from "@stacksjs/storage";
3
3
  import { packageJsonPath } from "@stacksjs/path";
4
4
  import { library } from "@stacksjs/config";
5
- import { packageManager } from "../../package.json";
5
+ import { packageManager } from "../../package.json" assert { type: "json" };
6
6
  export async function generatePackageJson(type) {
7
7
  let name, description, directory, keywords, config, prettyName;
8
8
  if (type === "vue-components") {
@@ -8,7 +8,7 @@ export type ActionResult = Promise<Result<CommandResult<string>, Error> | Result
8
8
  * @param options The options to pass to the command.
9
9
  * @returns The result of the command.
10
10
  */
11
- export declare function runAction(action: string, options?: CliOptions): ActionResult;
11
+ export declare function runAction(action: string, options?: CliOptions): Promise<Result<CommandResult<string>, Error> | Err<CommandResult<string>, string>>;
12
12
  /**
13
13
  * Run Actions the Stacks way.
14
14
  *
package/dist/release.mjs CHANGED
@@ -4,6 +4,10 @@ import { runActions } from "@stacksjs/actions";
4
4
  import { Action } from "@stacksjs/types";
5
5
  await runActions([
6
6
  Action.GeneratePackageJsons,
7
+ // generate the package.json's for each package
7
8
  Action.LintFix,
9
+ // ensure there are no lint errors
10
+ // Action.Test, // run the tests
8
11
  Action.Bump
12
+ // bump the versions, create the git (version) tag, generate the changelog, commit & push the changes
9
13
  ], { debug: true, cwd: frameworkPath() });
package/dist/update.mjs CHANGED
@@ -41,7 +41,7 @@ export async function checkForUncommittedChanges(path = "./.stacks", options) {
41
41
  }
42
42
  }
43
43
  export async function updateFramework(options) {
44
- const perf = intro("buddy update:framework");
44
+ const perf = await intro("buddy update:framework");
45
45
  await checkForUncommittedChanges("./.stacks", options);
46
46
  await downloadFrameworkUpdate(options);
47
47
  log.info("Updating framework...");
@@ -68,7 +68,7 @@ export async function downloadFrameworkUpdate(options) {
68
68
  log.success("Your framework updated correctly to version: ", version);
69
69
  }
70
70
  export async function updateDependencies(options) {
71
- const perf = intro("buddy update:dependencies");
71
+ const perf = await intro("buddy update:dependencies");
72
72
  const result = await runCommand(NpmScript.UpdateDependencies, options);
73
73
  if (result.isErr()) {
74
74
  outro("While running the update:dependencies command, there was an issue", { startTime: perf, useSeconds: true, isError: true }, result.error);
@@ -78,7 +78,7 @@ export async function updateDependencies(options) {
78
78
  process.exit();
79
79
  }
80
80
  export async function updatePackageManager(options) {
81
- const perf = intro("buddy update:package-manager");
81
+ const perf = await intro("buddy update:package-manager");
82
82
  const version = options?.version || "latest";
83
83
  const result = await runCommand(`corepack prepare pnpm@${version} --activate`, options);
84
84
  if (result.isErr()) {
@@ -89,7 +89,7 @@ export async function updatePackageManager(options) {
89
89
  process.exit();
90
90
  }
91
91
  export async function updateNode(options) {
92
- const perf = intro("buddy update:node");
92
+ const perf = await intro("buddy update:node");
93
93
  const result = await runCommand(NpmScript.UpdateNode, options);
94
94
  if (result.isErr()) {
95
95
  outro("While running the update:node command, there was an issue", { startTime: perf, useSeconds: true, isError: true }, result.error);
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@stacksjs/actions",
3
3
  "type": "module",
4
- "version": "0.48.3",
5
- "packageManager": "pnpm@7.21.0",
4
+ "version": "0.49.0",
5
+ "packageManager": "pnpm@7.25.0",
6
6
  "description": "The Stacks actions.",
7
7
  "author": "Chris Breuer",
8
8
  "license": "MIT",
@@ -36,29 +36,29 @@
36
36
  "README.md"
37
37
  ],
38
38
  "engines": {
39
- "node": ">=v18.12.1",
40
- "pnpm": ">=7.21.0"
39
+ "node": ">=v18.13.0",
40
+ "pnpm": ">=7.25.0"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "markdown-it": "^13.0.1",
44
- "vue-component-meta": "^1.0.19",
45
- "@stacksjs/cli": "0.48.3",
46
- "@stacksjs/config": "0.48.3",
47
- "@stacksjs/logging": "0.48.3",
48
- "@stacksjs/path": "0.48.3",
49
- "@stacksjs/security": "0.48.3",
50
- "@stacksjs/storage": "0.48.3",
51
- "@stacksjs/types": "0.48.3",
52
- "@stacksjs/utils": "0.48.3"
44
+ "vue-component-meta": "^1.0.24",
45
+ "@stacksjs/cli": "0.49.0",
46
+ "@stacksjs/config": "0.49.0",
47
+ "@stacksjs/logging": "0.49.0",
48
+ "@stacksjs/path": "0.49.0",
49
+ "@stacksjs/security": "0.49.0",
50
+ "@stacksjs/storage": "0.49.0",
51
+ "@stacksjs/types": "0.49.0",
52
+ "@stacksjs/utils": "0.49.0"
53
53
  },
54
54
  "dependencies": {
55
55
  "esno": "^0.16.3",
56
- "@stacksjs/strings": "0.48.3"
56
+ "@stacksjs/strings": "0.49.0"
57
57
  },
58
58
  "devDependencies": {
59
- "mkdist": "^1.0.0",
59
+ "mkdist": "^1.1.0",
60
60
  "typescript": "^4.9.4",
61
- "@stacksjs/testing": "0.48.3"
61
+ "@stacksjs/testing": "0.49.0"
62
62
  },
63
63
  "scripts": {
64
64
  "build": "mkdist -d",