@mexty/cli 1.9.0 → 1.10.0

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.
Files changed (44) hide show
  1. package/GITHUB_OAUTH_SETUP.md +1 -12
  2. package/dist/block-68f6a9dd608928af6fbea9ba/.eslintrc +14 -0
  3. package/dist/block-68f6a9dd608928af6fbea9ba/.prettierrc +10 -0
  4. package/dist/block-68f6a9dd608928af6fbea9ba/README.md +63 -0
  5. package/dist/block-68f6a9dd608928af6fbea9ba/index.html +13 -0
  6. package/dist/block-68f6a9dd608928af6fbea9ba/package-lock.json +6657 -0
  7. package/dist/block-68f6a9dd608928af6fbea9ba/package.json +34 -0
  8. package/dist/block-68f6a9dd608928af6fbea9ba/src/App.tsx +45 -0
  9. package/dist/block-68f6a9dd608928af6fbea9ba/src/block.tsx +111 -0
  10. package/dist/block-68f6a9dd608928af6fbea9ba/src/index.tsx +6 -0
  11. package/dist/block-68f6a9dd608928af6fbea9ba/src/styles.css +8 -0
  12. package/dist/block-68f6a9dd608928af6fbea9ba/tsconfig.json +27 -0
  13. package/dist/block-68f6a9dd608928af6fbea9ba/vite.config.ts +20 -0
  14. package/dist/block-68f6a9dd608928af6fbea9ba/webpack.config.js +59 -0
  15. package/dist/block-68f6aa43608928af6fbea9c9/.eslintrc +14 -0
  16. package/dist/block-68f6aa43608928af6fbea9c9/.prettierrc +10 -0
  17. package/dist/block-68f6aa43608928af6fbea9c9/README.md +63 -0
  18. package/dist/block-68f6aa43608928af6fbea9c9/coco +0 -0
  19. package/dist/block-68f6aa43608928af6fbea9c9/index.html +13 -0
  20. package/dist/block-68f6aa43608928af6fbea9c9/package-lock.json +6657 -0
  21. package/dist/block-68f6aa43608928af6fbea9c9/package.json +34 -0
  22. package/dist/block-68f6aa43608928af6fbea9c9/src/App.tsx +45 -0
  23. package/dist/block-68f6aa43608928af6fbea9c9/src/block.tsx +111 -0
  24. package/dist/block-68f6aa43608928af6fbea9c9/src/index.tsx +6 -0
  25. package/dist/block-68f6aa43608928af6fbea9c9/src/styles.css +8 -0
  26. package/dist/block-68f6aa43608928af6fbea9c9/tsconfig.json +27 -0
  27. package/dist/block-68f6aa43608928af6fbea9c9/vite.config.ts +20 -0
  28. package/dist/block-68f6aa43608928af6fbea9c9/webpack.config.js +59 -0
  29. package/dist/coco +0 -0
  30. package/dist/commands/create.d.ts.map +1 -1
  31. package/dist/commands/create.js +61 -1
  32. package/dist/commands/create.js.map +1 -1
  33. package/dist/utils/api.d.ts +7 -0
  34. package/dist/utils/api.d.ts.map +1 -1
  35. package/dist/utils/api.js +5 -1
  36. package/dist/utils/api.js.map +1 -1
  37. package/dist/utils/git.d.ts.map +1 -1
  38. package/dist/utils/git.js +55 -9
  39. package/dist/utils/git.js.map +1 -1
  40. package/package.json +42 -42
  41. package/src/commands/create.ts +69 -1
  42. package/src/commands/github-login.ts +107 -107
  43. package/src/utils/api.ts +9 -4
  44. package/src/utils/git.ts +269 -254
@@ -72,18 +72,7 @@ Update `package.json`:
72
72
 
73
73
  ```bash
74
74
  npm run build
75
- ```
76
-
77
- ## Usage
78
-
79
- ### Connect GitHub Account
80
-
81
- ```bash
82
- mexty github-login
83
- ```
84
-
85
- This will:
86
- 1. Request an OAuth URL from the backend
75
+ ```i
87
76
  2. Open your browser to GitHub authorization page
88
77
  3. Redirect back to the backend after authorization
89
78
  4. Store your GitHub access token securely
@@ -0,0 +1,14 @@
1
+ {
2
+ "extends": "react-app",
3
+ "rules": {
4
+ "react-hooks/rules-of-hooks": "error",
5
+ "react-hooks/exhaustive-deps": "warn",
6
+ "no-unused-vars": [
7
+ "warn",
8
+ {
9
+ "argsIgnorePattern": "^_",
10
+ "varsIgnorePattern": "^_"
11
+ }
12
+ ]
13
+ }
14
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "printWidth": 200,
3
+ "tabWidth": 2,
4
+ "useTabs": false,
5
+ "semi": false,
6
+ "singleQuote": true,
7
+ "trailingComma": "none",
8
+ "bracketSpacing": true,
9
+ "jsxBracketSameLine": true
10
+ }
@@ -0,0 +1,63 @@
1
+ # Webpack Block Template
2
+
3
+ This is a standardized template for creating Module Federation blocks in the MEXT system.
4
+
5
+ ## Features
6
+
7
+ - 🔧 **Webpack 5** with Module Federation
8
+ - ⚛️ **React 19** with TypeScript
9
+ - 🎨 **CSS Loader** support
10
+ - 🔥 **Hot Module Replacement** for development
11
+ - 📦 **Independent Dependencies** - no sharing to avoid conflicts
12
+
13
+ ## Structure
14
+
15
+ ```
16
+ src/
17
+ ├── index.tsx # Entry point for development
18
+ ├── App.tsx # Main component (exported as ./Block)
19
+ └── ... # Your custom components
20
+ ```
21
+
22
+ ## Development
23
+
24
+ ```bash
25
+ npm install
26
+ npm run dev # Start development server on port 3001
27
+ ```
28
+
29
+ ## Build for Production
30
+
31
+ ```bash
32
+ npm run build # Creates dist/ with remoteEntry.js
33
+ ```
34
+
35
+ ## Module Federation
36
+
37
+ This template exposes:
38
+ - `./Block` → `./src/App` component
39
+
40
+ The block can receive props from the host application:
41
+ - `title?: string` - Custom title for the block
42
+ - `data?: any` - Any data passed from the host
43
+
44
+ ## Usage as Federation Module
45
+
46
+ ```javascript
47
+ // In host application
48
+ const RemoteBlock = React.lazy(() => import('blockName/Block'));
49
+
50
+ <RemoteBlock title="Custom Title" data={someData} />
51
+ ```
52
+
53
+ ## Customization
54
+
55
+ 1. Replace `src/App.tsx` with your custom component
56
+ 2. Add dependencies to `package.json`
57
+ 3. The backend will automatically use this template and inject your files
58
+
59
+ ## Important Notes
60
+
61
+ - The `name` in `webpack.config.js` will be replaced automatically by the backend
62
+ - All dependencies are bundled independently (no sharing)
63
+ - CORS headers are configured for federation module loading
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
7
+ <title>Mexty Block</title>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ <script type="module" src="/src/index.tsx"></script>
12
+ </body>
13
+ </html>