@mulanjs/mulanjs 1.0.1-dev.20260314140816 → 1.0.1-dev.20260830064028

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/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@mulanjs/mulanjs",
3
- "version": "1.0.1-dev.20260314140816",
3
+ "version": "1.0.1-dev.20260830064028",
4
4
  "description": "A powerful, secure, and enterprise-grade JavaScript framework.",
5
5
  "main": "dist/mulan.js",
6
6
  "module": "dist/mulan.esm.js",
7
7
  "browser": "dist/mulan.js",
8
8
  "bin": {
9
- "mulan": "./src/cli/index.js"
9
+ "mulan": "src/cli/index.js"
10
10
  },
11
11
  "types": "dist/types/index.d.ts",
12
12
  "exports": {
@@ -61,14 +61,30 @@
61
61
  "fs-extra": "11.3.3",
62
62
  "webpack": "5.105.3",
63
63
  "webpack-cli": "6.0.1",
64
- "webpack-dev-server": "5.2.3",
64
+ "webpack-dev-server": "^5.2.6",
65
65
  "ts-loader": "9.5.4",
66
66
  "typescript": "5.3.3",
67
67
  "source-map": "0.6.1"
68
68
  },
69
69
  "overrides": {
70
70
  "minimatch": "^3.1.4",
71
- "serialize-javascript": "^7.0.3"
71
+ "serialize-javascript": "^7.0.5",
72
+ "ws": "^8.21.0",
73
+ "websocket-driver": "^0.7.5",
74
+ "uuid": "^11.1.1",
75
+ "shell-quote": "^1.8.5",
76
+ "picomatch": "^2.3.2",
77
+ "path-to-regexp": "^0.1.13",
78
+ "form-data": "^4.0.6",
79
+ "http-proxy-middleware": "^2.0.10",
80
+ "js-yaml": "^3.15.1",
81
+ "qs": "^6.15.2",
82
+ "@tootallnate/once": "^2.0.1",
83
+ "body-parser": "^1.20.6",
84
+ "brace-expansion": "^1.1.18",
85
+ "fast-uri": "^3.1.5",
86
+ "follow-redirects": "^1.15.12",
87
+ "@babel/core": "^7.29.1"
72
88
  },
73
89
  "devDependencies": {
74
90
  "@types/fs-extra": "11.0.4",
package/src/cli/index.js CHANGED
@@ -144,7 +144,7 @@ program
144
144
  devDependencies: {
145
145
  "webpack": "^5.105.3",
146
146
  "webpack-cli": "^6.0.1",
147
- "webpack-dev-server": "^5.2.3",
147
+ "webpack-dev-server": "^5.2.6",
148
148
  "css-loader": "^6.8.1",
149
149
  "style-loader": "^3.3.3",
150
150
  "sass": "^1.83.0",
@@ -152,7 +152,23 @@ program
152
152
  },
153
153
  "overrides": {
154
154
  "minimatch": "^3.1.4",
155
- "serialize-javascript": "^7.0.3"
155
+ "serialize-javascript": "^7.0.5",
156
+ "ws": "^8.21.0",
157
+ "websocket-driver": "^0.7.5",
158
+ "uuid": "^11.1.1",
159
+ "shell-quote": "^1.8.5",
160
+ "picomatch": "^2.3.2",
161
+ "path-to-regexp": "^0.1.13",
162
+ "form-data": "^4.0.6",
163
+ "http-proxy-middleware": "^2.0.10",
164
+ "js-yaml": "^3.15.1",
165
+ "qs": "^6.15.2",
166
+ "@tootallnate/once": "^2.0.1",
167
+ "body-parser": "^1.20.6",
168
+ "brace-expansion": "^1.1.18",
169
+ "fast-uri": "^3.1.5",
170
+ "follow-redirects": "^1.15.12",
171
+ "@babel/core": "^7.29.1"
156
172
  },
157
173
  scripts: {
158
174
  "start": "mulan dev",
@@ -492,16 +508,38 @@ if (app) {
492
508
  console.log(` 2. npm install`);
493
509
  console.log(` 3. npm run dev`);
494
510
 
495
- // Auto-install VS Code Extension
511
+ // Auto-install extension
496
512
  try {
497
- const vsixPath = path.join(__dirname, 'extensions', 'mulanjs-vscode-1.0.1.vsix');
513
+ const vsixPath = path.join(__dirname, 'extensions', 'mulanjs-vscode-1.1.0.vsix');
498
514
  if (fs.existsSync(vsixPath)) {
499
- console.log('\nšŸ“¦ Installing MulanJS VS Code Extension...');
500
- shell(`code --install-extension "${vsixPath}" --force`);
501
- console.log('āœ… Extension installed successfully!');
515
+ console.log('\nšŸ“¦ Installing MulanJS Extension...');
516
+
517
+ let installed = false;
518
+
519
+ // Try Antigravity first then VS Code
520
+ const commands = [
521
+ { cmd: 'antigravity', name: 'Antigravity' },
522
+ { cmd: 'code', name: 'VS Code' }
523
+ ];
524
+
525
+ for (const { cmd, name } of commands) {
526
+ try {
527
+ execSync(`${cmd} --version`, { stdio: 'ignore' });
528
+ console.log(`šŸš€ Installing extension via ${name} CLI...`);
529
+ shell(`${cmd} --install-extension "${vsixPath}" --force`);
530
+ console.log(`āœ… Extension installed successfully in ${name}!`);
531
+ installed = true;
532
+ } catch (e) {
533
+ // Command not found, continue to next
534
+ }
535
+ }
536
+
537
+ if (!installed) {
538
+ console.warn('āš ļø Could not auto-install extension (Neither Antigravity nor VS Code CLI found).');
539
+ }
502
540
  }
503
541
  } catch (e) {
504
- console.warn('āš ļø Could not install VS Code extension (VS Code CLI not found or failed).');
542
+ console.warn('āš ļø Extension installation process failed.');
505
543
  }
506
544
 
507
545
 
@@ -603,24 +641,40 @@ program
603
641
  .description('Install the MulanJS VS Code Extension for icons and syntax highlighting')
604
642
  .action(async () => {
605
643
  await printBanner();
606
- console.log('šŸ“¦ Locating MulanJS VS Code Extension...');
644
+ console.log('šŸ“¦ Locating MulanJS Extension...');
607
645
  try {
608
- // Find where mulanjs is installed. If run via npx, __dirname is the cli folder.
609
- const vsixPath = path.join(__dirname, 'extensions', 'mulanjs-vscode-1.0.1.vsix');
646
+ const vsixPath = path.join(__dirname, 'extensions', 'mulanjs-vscode-1.1.0.vsix');
610
647
 
611
648
  if (!fs.existsSync(vsixPath)) {
612
649
  console.error('āŒ Error: Extension file not found at:', vsixPath);
613
- console.log('Ensure you have a full installation of the mulanjs package.');
614
650
  return;
615
651
  }
616
652
 
617
- console.log('šŸš€ Installing extension via VS Code CLI...');
618
- shell(`code --install-extension "${vsixPath}" --force`);
619
- console.log('āœ… Success! Restart VS Code to see your new .mujs icons.');
653
+ let installed = false;
654
+ const commands = [
655
+ { cmd: 'antigravity', name: 'Antigravity' },
656
+ { cmd: 'code', name: 'VS Code' }
657
+ ];
658
+
659
+ for (const { cmd, name } of commands) {
660
+ try {
661
+ execSync(`${cmd} --version`, { stdio: 'ignore' });
662
+ console.log(`šŸš€ Installing extension via ${name} CLI...`);
663
+ shell(`${cmd} --install-extension "${vsixPath}" --force`);
664
+ console.log(`āœ… Success! Restart ${name} to see your new .mujs icons.`);
665
+ installed = true;
666
+ } catch (e) {
667
+ // Command not found
668
+ }
669
+ }
670
+
671
+ if (!installed) {
672
+ console.error('\nāŒ Failed to install extension.');
673
+ console.log('Make sure "antigravity" or "code" (VS Code CLI) is in your PATH.');
674
+ console.log('Manual Install: You can also drag the .vsix file from your node_modules/mulanjs/src/cli/extensions into your editor.');
675
+ }
620
676
  } catch (e) {
621
677
  console.error('\nāŒ Failed to install extension.');
622
- console.log('Make sure "code" (VS Code CLI) is in your PATH.');
623
- console.log('Manual Install: You can also drag the .vsix file from your node_modules/mulanjs/src/cli/extensions into VS Code.');
624
678
  }
625
679
  });
626
680