@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.
- package/dist/build/docs.js +1 -1
- package/dist/build/run-build-step.d.ts +24 -0
- package/dist/build/run-build-step.js +3 -0
- package/dist/build/views.js +1 -1
- package/package.json +48 -30
package/dist/build/docs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var {require}=import.meta;import{
|
|
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)}
|
package/dist/build/views.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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.
|
|
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/
|
|
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/
|
|
68
|
-
"@stacksjs/
|
|
69
|
-
"@stacksjs/
|
|
70
|
-
"@stacksjs/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"@stacksjs/
|
|
74
|
-
"@stacksjs/
|
|
75
|
-
"@stacksjs/
|
|
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
|
-
"
|
|
78
|
-
"@stacksjs/
|
|
79
|
-
"@stacksjs/
|
|
80
|
-
"@stacksjs/
|
|
81
|
-
"@stacksjs/
|
|
82
|
-
"@stacksjs/
|
|
83
|
-
"
|
|
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
|
-
"
|
|
97
|
-
"
|
|
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
|
}
|