@sentry/junior 0.49.0 → 0.50.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.
- package/dist/cli/init.js +31 -0
- package/package.json +1 -1
package/dist/cli/init.js
CHANGED
|
@@ -55,6 +55,36 @@ function writeVercelJson(targetDir) {
|
|
|
55
55
|
`
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
+
function writeGitHubWorkflow(targetDir) {
|
|
59
|
+
const workflowDir = path.join(targetDir, ".github", "workflows");
|
|
60
|
+
fs.mkdirSync(workflowDir, { recursive: true });
|
|
61
|
+
fs.writeFileSync(
|
|
62
|
+
path.join(workflowDir, "ci.yml"),
|
|
63
|
+
`name: CI
|
|
64
|
+
|
|
65
|
+
on:
|
|
66
|
+
push:
|
|
67
|
+
branches: [main]
|
|
68
|
+
pull_request:
|
|
69
|
+
|
|
70
|
+
jobs:
|
|
71
|
+
build:
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
steps:
|
|
74
|
+
- uses: actions/checkout@v6
|
|
75
|
+
- uses: pnpm/action-setup@v6
|
|
76
|
+
with:
|
|
77
|
+
version: 10
|
|
78
|
+
- uses: actions/setup-node@v6
|
|
79
|
+
with:
|
|
80
|
+
node-version: 24
|
|
81
|
+
cache: pnpm
|
|
82
|
+
- run: pnpm install --frozen-lockfile
|
|
83
|
+
- run: pnpm check
|
|
84
|
+
- run: pnpm build
|
|
85
|
+
`
|
|
86
|
+
);
|
|
87
|
+
}
|
|
58
88
|
async function runInit(dir, log = console.log) {
|
|
59
89
|
const targetDir = dir.trim();
|
|
60
90
|
if (!targetDir) {
|
|
@@ -155,6 +185,7 @@ SENTRY_ORG_SLUG=
|
|
|
155
185
|
writeNitroConfig(target);
|
|
156
186
|
writeViteConfig(target);
|
|
157
187
|
writeVercelJson(target);
|
|
188
|
+
writeGitHubWorkflow(target);
|
|
158
189
|
log(`Created ${name} at ${target}`);
|
|
159
190
|
log("");
|
|
160
191
|
log(` cd ${targetDir} && pnpm install && pnpm dev`);
|