bluedither 1.0.4 → 1.0.5
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/cli/commands/extract.js
CHANGED
|
@@ -124,5 +124,11 @@ export default async function extract(args) {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
console.log(`\n${allPresent ? '✓ Package is complete.' : '✗ Package is incomplete — missing required files.'}`);
|
|
127
|
+
|
|
128
|
+
// When called directly from CLI, exit. When imported, return result.
|
|
129
|
+
if (args._calledFromPublish) {
|
|
130
|
+
if (!allPresent) throw new Error('Package incomplete');
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
127
133
|
process.exit(allPresent ? 0 : 1);
|
|
128
134
|
}
|
package/cli/commands/publish.js
CHANGED
|
@@ -51,7 +51,9 @@ export default async function publish(args) {
|
|
|
51
51
|
console.log('\nStep 2: Validating package...');
|
|
52
52
|
const { default: extract } = await import('./extract.js');
|
|
53
53
|
try {
|
|
54
|
-
|
|
54
|
+
const validateArgs = ['--validate'];
|
|
55
|
+
validateArgs._calledFromPublish = true;
|
|
56
|
+
await extract(validateArgs);
|
|
55
57
|
} catch {
|
|
56
58
|
// extract calls process.exit on failure
|
|
57
59
|
}
|