@wyxos/zephyr 0.2.4 → 0.2.7
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/README.md +104 -104
- package/bin/zephyr.mjs +12 -12
- package/package.json +5 -1
- package/src/index.mjs +2121 -2109
- package/src/release-node.mjs +40 -9
- package/src/release-packagist.mjs +336 -336
- package/src/ssh-utils.mjs +277 -0
package/src/release-node.mjs
CHANGED
|
@@ -221,15 +221,43 @@ async function runTests(skipTests, pkg, rootDir = process.cwd()) {
|
|
|
221
221
|
|
|
222
222
|
logStep('Running test suite...')
|
|
223
223
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
224
|
+
let dotInterval = null
|
|
225
|
+
try {
|
|
226
|
+
// Capture output and show dots as progress
|
|
227
|
+
process.stdout.write(' ')
|
|
228
|
+
dotInterval = setInterval(() => {
|
|
229
|
+
process.stdout.write('.')
|
|
230
|
+
}, 200)
|
|
231
|
+
|
|
232
|
+
// Prefer test:run if available, otherwise use test with --run flag
|
|
233
|
+
if (hasScript(pkg, 'test:run')) {
|
|
234
|
+
await runCommand('npm', ['run', 'test:run'], { capture: true, cwd: rootDir })
|
|
235
|
+
} else {
|
|
236
|
+
// For test script, try to pass --run flag (works with vitest)
|
|
237
|
+
await runCommand('npm', ['test', '--', '--run'], { capture: true, cwd: rootDir })
|
|
238
|
+
}
|
|
231
239
|
|
|
232
|
-
|
|
240
|
+
if (dotInterval) {
|
|
241
|
+
clearInterval(dotInterval)
|
|
242
|
+
dotInterval = null
|
|
243
|
+
}
|
|
244
|
+
process.stdout.write('\n')
|
|
245
|
+
logSuccess('Tests passed.')
|
|
246
|
+
} catch (error) {
|
|
247
|
+
// Clear dots and show error output
|
|
248
|
+
if (dotInterval) {
|
|
249
|
+
clearInterval(dotInterval)
|
|
250
|
+
dotInterval = null
|
|
251
|
+
}
|
|
252
|
+
process.stdout.write('\n')
|
|
253
|
+
if (error.stdout) {
|
|
254
|
+
console.error(error.stdout)
|
|
255
|
+
}
|
|
256
|
+
if (error.stderr) {
|
|
257
|
+
console.error(error.stderr)
|
|
258
|
+
}
|
|
259
|
+
throw error
|
|
260
|
+
}
|
|
233
261
|
}
|
|
234
262
|
|
|
235
263
|
async function runBuild(skipBuild, pkg, rootDir = process.cwd()) {
|
|
@@ -337,7 +365,10 @@ async function publishPackage(pkg, rootDir = process.cwd()) {
|
|
|
337
365
|
const publishArgs = ['publish', '--ignore-scripts'] // Skip prepublishOnly since we already built lib
|
|
338
366
|
|
|
339
367
|
if (pkg.name.startsWith('@')) {
|
|
340
|
-
|
|
368
|
+
// For scoped packages, determine access level from publishConfig
|
|
369
|
+
// Default to 'public' for scoped packages if not specified (free npm accounts require public for scoped packages)
|
|
370
|
+
const access = pkg.publishConfig?.access || 'public'
|
|
371
|
+
publishArgs.push('--access', access)
|
|
341
372
|
}
|
|
342
373
|
|
|
343
374
|
logStep(`Publishing ${pkg.name}@${pkg.version} to npm...`)
|