@moondreamsdev/dreamer-ui 1.3.9 → 1.4.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.
@@ -1,9 +1,12 @@
1
1
  import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
2
2
  import { join, dirname } from 'path';
3
3
  import { createInterface } from 'readline';
4
+ import { fileURLToPath } from 'url';
4
5
 
5
6
  function extractColorsFromSource() {
6
7
  try {
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = dirname(__filename);
7
10
  const sourceFile = join(__dirname, '../src/styles.lib.css');
8
11
  const sourceContent = readFileSync(sourceFile, 'utf8');
9
12
 
@@ -143,7 +146,8 @@ async function main() {
143
146
  }
144
147
 
145
148
  // Run if called directly
146
- if (require.main === module) {
149
+ // ES module-compatible entrypoint check
150
+ if (process.argv[1] === new URL(import.meta.url).pathname) {
147
151
  main().catch(console.error);
148
152
  }
149
153
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moondreamsdev/dreamer-ui",
3
- "version": "1.3.9",
3
+ "version": "1.4.1",
4
4
  "type": "module",
5
5
  "description": "A collection of Tailwind CSS components for React",
6
6
  "main": "dist/index.js",