bluedither 1.0.3 → 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.
@@ -113,12 +113,22 @@ export default async function extract(args) {
113
113
  allPresent = false;
114
114
  }
115
115
  } catch (e) {
116
- console.log(` ✗ Validation error: ${e.message}`);
117
- allPresent = false;
116
+ if (e.code === 'ERR_MODULE_NOT_FOUND' || e.code === 'MODULE_NOT_FOUND') {
117
+ console.log(' – Skipped (ajv not installed)');
118
+ } else {
119
+ console.log(` ✗ Validation error: ${e.message}`);
120
+ allPresent = false;
121
+ }
118
122
  }
119
123
  }
120
124
  }
121
125
 
122
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
+ }
123
133
  process.exit(allPresent ? 0 : 1);
124
134
  }
@@ -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
- await extract(['--validate']);
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bluedither",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "A bold, dithered-shader hero theme for Claude Code — skill + fine-tuner",
5
5
  "type": "module",
6
6
  "bin": {