@stacksjs/actions 0.73.3 → 0.74.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.
@@ -1 +1 @@
1
- var {require}=import.meta;import{runCommand}from"@stacksjs/cli";import{projectPath}from"@stacksjs/path";function bunpressCommand(){try{const manifest=Bun.resolveSync("@stacksjs/bunpress/package.json",projectPath()),pkg=require(manifest),bin=typeof pkg.bin==="string"?pkg.bin:pkg.bin?.bunpress;if(!bin)return"bunpress";return`bun ${manifest.slice(0,manifest.lastIndexOf("/"))}/${bin.replace(/^\.\//,"")}`}catch{return"bunpress"}}await runCommand(`${bunpressCommand()} build`,{cwd:projectPath()});
1
+ var {require}=import.meta;import{projectPath}from"@stacksjs/path";import{runBuildStep}from"./run-build-step";function bunpressCommand(){try{const manifest=Bun.resolveSync("@stacksjs/bunpress/package.json",projectPath()),pkg=require(manifest),bin=typeof pkg.bin==="string"?pkg.bin:pkg.bin?.bunpress;if(!bin)return"bunpress";return`bun ${manifest.slice(0,manifest.lastIndexOf("/"))}/${bin.replace(/^\.\//,"")}`}catch{return"bunpress"}}await runBuildStep(`${bunpressCommand()} build`,{cwd:projectPath(),describe:"The documentation build"});
@@ -0,0 +1,24 @@
1
+ import type { CliOptions } from '@stacksjs/types';
2
+ /**
3
+ * Run one build subprocess and fail loudly but quietly.
4
+ *
5
+ * A build step's real diagnosis comes from the tool it spawns - a template
6
+ * parse error, a type error, a missing entry point - and that output has
7
+ * already been written to the terminal by the time control returns here. What
8
+ * happened next made it hard to find: `throw result.error` let a
9
+ * `Failed to execute command: bunx --bun @stacksjs/stx build …` error escape
10
+ * the action module uncaught, so Bun printed it with a stack through
11
+ * handleError, exec and runCommand. The last twenty lines of the build were
12
+ * then entirely about the framework's own plumbing, and the parse error that
13
+ * caused it had scrolled away.
14
+ *
15
+ * Worse for `build --views` specifically: `buddy serve` keeps serving whatever
16
+ * the previous successful build produced, so the visible symptom of a failed
17
+ * build is that newly added pages 404 while existing ones keep working. That
18
+ * is a long way from "a partial has a syntax error". stacksjs/stacks#2391.
19
+ *
20
+ * So: exit non-zero with one line that names the command and points at its
21
+ * output, and no stack. A caller that wants the framework-level trace can pass
22
+ * `--verbose`, which is already threaded through to the child.
23
+ */
24
+ export declare function runBuildStep(command: string, options: CliOptions & { describe: string }): Promise<void>;
@@ -0,0 +1,3 @@
1
+ import process from"node:process";import{runCommand}from"@stacksjs/cli";export async function runBuildStep(command,options){const{describe,...cliOptions}=options;if(!(await runCommand(command,cliOptions)).isErr)return;console.error(`
2
+ ${describe} failed: \`${command}\` exited non-zero.`);console.error(`The error it printed above is the cause - this step only relays its exit status.
3
+ `);process.exit(1)}
@@ -1 +1 @@
1
- import{runCommand}from"@stacksjs/cli";import{projectPath}from"@stacksjs/path";const projectBuild=projectPath("build.ts");if(await Bun.file(projectBuild).exists()){const result=await runCommand("bun build.ts",{cwd:projectPath()});if(result.isErr)throw result.error}else{const result=await runCommand("bunx --bun @stacksjs/stx build --pages resources/views --out dist",{cwd:projectPath()});if(result.isErr)throw result.error}
1
+ import{projectPath}from"@stacksjs/path";import{runBuildStep}from"./run-build-step";const projectBuild=projectPath("build.ts");if(await Bun.file(projectBuild).exists())await runBuildStep("bun build.ts",{cwd:projectPath(),describe:"The frontend build"});else await runBuildStep("bunx --bun @stacksjs/stx build --pages resources/views --out dist",{cwd:projectPath(),describe:"The frontend build"});
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/actions",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.73.3",
5
+ "version": "0.74.1",
6
6
  "description": "The Stacks actions.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -60,41 +60,55 @@
60
60
  "prepublishOnly": "bun run build"
61
61
  },
62
62
  "dependencies": {
63
- "@stacksjs/config": "0.73.3",
63
+ "@stacksjs/ai": "0.74.1",
64
+ "@stacksjs/analytics": "0.74.1",
65
+ "@stacksjs/api": "0.74.1",
66
+ "@stacksjs/auth": "0.74.1",
67
+ "@stacksjs/build": "0.74.1",
64
68
  "@stacksjs/bumpx": "^0.2.6",
65
69
  "@stacksjs/bunpress": "^0.2.8",
70
+ "@stacksjs/cli": "0.74.1",
71
+ "@stacksjs/cloud": "0.74.1",
72
+ "@stacksjs/cms": "0.74.1",
73
+ "@stacksjs/config": "0.74.1",
74
+ "@stacksjs/database": "0.74.1",
75
+ "@stacksjs/desktop-build": "0.74.1",
76
+ "@stacksjs/dns": "0.74.1",
77
+ "@stacksjs/enums": "0.74.1",
78
+ "@stacksjs/env": "0.74.1",
79
+ "@stacksjs/error-handling": "0.74.1",
80
+ "@stacksjs/gitit": "^0.2.5",
81
+ "@stacksjs/i18n": "0.74.1",
82
+ "@stacksjs/image": "0.74.1",
83
+ "@stacksjs/logging": "0.74.1",
66
84
  "@stacksjs/logsmith": "^0.2.3",
67
- "@stacksjs/registry": "0.73.3",
68
- "@stacksjs/stx": "^0.2.246",
69
- "@stacksjs/ts-cloud": "^0.12.10",
70
- "@stacksjs/ts-md": "^0.1.1"
71
- },
72
- "devDependencies": {
73
- "@stacksjs/api": "0.73.3",
74
- "@stacksjs/cli": "0.73.3",
75
- "@stacksjs/database": "0.73.3",
85
+ "@stacksjs/orm": "0.74.1",
86
+ "@stacksjs/path": "0.74.1",
87
+ "@stacksjs/payments": "0.74.1",
88
+ "@stacksjs/queue": "0.74.1",
89
+ "@stacksjs/registry": "0.74.1",
90
+ "@stacksjs/router": "0.74.1",
91
+ "@stacksjs/rpx": "^0.11.42",
92
+ "@stacksjs/scheduler": "0.74.1",
93
+ "@stacksjs/search-engine": "0.74.1",
94
+ "@stacksjs/security": "0.74.1",
95
+ "@stacksjs/server": "0.74.1",
96
+ "@stacksjs/sites": "0.74.1",
97
+ "@stacksjs/storage": "0.74.1",
98
+ "@stacksjs/strings": "0.74.1",
99
+ "@stacksjs/stx": "^0.2.253",
76
100
  "@stacksjs/tlsx": "^0.13.2",
77
- "better-dx": "^0.2.24",
78
- "@stacksjs/dns": "0.73.3",
79
- "@stacksjs/enums": "0.73.3",
80
- "@stacksjs/env": "0.73.3",
81
- "@stacksjs/error-handling": "0.73.3",
82
- "@stacksjs/image": "0.73.3",
83
- "@stacksjs/logging": "0.73.3",
84
- "@stacksjs/path": "0.73.3",
85
- "@stacksjs/security": "0.73.3",
86
- "@stacksjs/server": "0.73.3",
87
- "@stacksjs/cms": "0.73.3",
88
- "@stacksjs/sites": "0.73.3",
89
- "@stacksjs/storage": "0.73.3",
90
- "@stacksjs/strings": "0.73.3",
91
- "@stacksjs/utils": "0.73.3",
92
- "@stacksjs/validation": "0.73.3",
93
- "@stacksjs/build": "0.73.3"
101
+ "@stacksjs/ts-cloud": "^0.12.10",
102
+ "@stacksjs/ts-md": "^0.1.1",
103
+ "@stacksjs/tunnel": "0.74.1",
104
+ "@stacksjs/types": "0.74.1",
105
+ "@stacksjs/utils": "0.74.1",
106
+ "@stacksjs/whois": "0.74.1",
107
+ "bun-plugin-stx": "^0.2.246"
94
108
  },
95
109
  "peerDependencies": {
96
- "pickier": "^0.1.58",
97
- "craft-native": "^0.0.67"
110
+ "craft-native": ">=0.0.72",
111
+ "pickier": "^0.1.58"
98
112
  },
99
113
  "peerDependenciesMeta": {
100
114
  "pickier": {
@@ -103,5 +117,9 @@
103
117
  "craft-native": {
104
118
  "optional": true
105
119
  }
120
+ },
121
+ "devDependencies": {
122
+ "@stacksjs/validation": "0.74.1",
123
+ "better-dx": "^0.2.24"
106
124
  }
107
125
  }