|
| 1 | +# Medusa Plugin Data Schema |
| 2 | + |
| 3 | +A dependency like this is one thats used and found in the webpack graph |
| 4 | +```json |
| 5 | + { |
| 6 | + "name": "@ant-design/icons", |
| 7 | + "version": "4.7.0", |
| 8 | + "license": "MIT", |
| 9 | + "size": 43030 |
| 10 | + }, |
| 11 | +``` |
| 12 | + |
| 13 | +one like this is found in the package.json file, but was not actually used in the webpack final build graph |
| 14 | +```json |
| 15 | + { |
| 16 | + "name": "antd", |
| 17 | + "version": "4.19" |
| 18 | + }, |
| 19 | +``` |
| 20 | + |
| 21 | +The whole schema as current |
| 22 | +```json |
| 23 | +{ |
| 24 | + "dependencies": [ |
| 25 | + { |
| 26 | + "name": "@ant-design/icons", |
| 27 | + "version": "4.7.0", |
| 28 | + "license": "MIT", |
| 29 | + "size": 43030 |
| 30 | + }, |
| 31 | + { |
| 32 | + "name": "antd", |
| 33 | + "version": "4.19" |
| 34 | + }, |
| 35 | + { |
| 36 | + "name": "esbuild-loader", |
| 37 | + "version": "2.19" |
| 38 | + }, |
| 39 | + { |
| 40 | + "name": "lodash", |
| 41 | + "version": "4.17.21", |
| 42 | + "license": "MIT", |
| 43 | + "size": 87725 |
| 44 | + }, |
| 45 | + { |
| 46 | + "name": "react", |
| 47 | + "version": "17.0.2", |
| 48 | + "license": "MIT", |
| 49 | + "size": 6640 |
| 50 | + }, |
| 51 | + { |
| 52 | + "name": "react-dom", |
| 53 | + "version": "17.0.2", |
| 54 | + "license": "MIT", |
| 55 | + "size": 122051 |
| 56 | + } |
| 57 | + ], |
| 58 | + "devDependencies": [ |
| 59 | + { |
| 60 | + "name": "@babel/core", |
| 61 | + "version": "7.17" |
| 62 | + }, |
| 63 | + { |
| 64 | + "name": "@module-federation/dashboard-plugin", |
| 65 | + "version": "2.4" |
| 66 | + }, |
| 67 | + { |
| 68 | + "name": "@webpack-cli/serve", |
| 69 | + "version": "1.5" |
| 70 | + }, |
| 71 | + { |
| 72 | + "name": "css-loader", |
| 73 | + "version": "5.2.7", |
| 74 | + "license": "MIT", |
| 75 | + "size": 1605 |
| 76 | + }, |
| 77 | + { |
| 78 | + "name": "html-webpack-plugin", |
| 79 | + "version": "5.3" |
| 80 | + }, |
| 81 | + { |
| 82 | + "name": "less", |
| 83 | + "version": "4.1" |
| 84 | + }, |
| 85 | + { |
| 86 | + "name": "less-loader", |
| 87 | + "version": "8.1" |
| 88 | + }, |
| 89 | + { |
| 90 | + "name": "style-loader", |
| 91 | + "version": "2.0.0", |
| 92 | + "license": "MIT", |
| 93 | + "size": 6827 |
| 94 | + }, |
| 95 | + { |
| 96 | + "name": "webpack", |
| 97 | + "version": "5.61" |
| 98 | + }, |
| 99 | + { |
| 100 | + "name": "webpack-cli", |
| 101 | + "version": "4.7" |
| 102 | + }, |
| 103 | + { |
| 104 | + "name": "webpack-dev-server", |
| 105 | + "version": "4.7" |
| 106 | + } |
| 107 | + ], |
| 108 | + "optionalDependencies": [], |
| 109 | + "id": "home", |
| 110 | + "name": "home", |
| 111 | + "remote": "http://localhost:3001/remoteEntry.js", |
| 112 | + "metadata": { |
| 113 | + "clientUrl": "http://localhost:3333", |
| 114 | + "baseUrl": "http://localhost:3001", |
| 115 | + "source": { |
| 116 | + "url": "https://github.com/module-federation/federation-dashboard/tree/master/dashboard-example/home" |
| 117 | + }, |
| 118 | + "remote": "http://localhost:3001/remoteEntry.js" |
| 119 | + }, |
| 120 | + "overrides": [ |
| 121 | + { |
| 122 | + "version": "", |
| 123 | + "applicationID": "home" |
| 124 | + }, |
| 125 | + { |
| 126 | + "id": "react", |
| 127 | + "name": "react", |
| 128 | + "version": "17.0.2", |
| 129 | + "location": "react", |
| 130 | + "applicationID": "home" |
| 131 | + }, |
| 132 | + { |
| 133 | + "id": "antd", |
| 134 | + "name": "antd", |
| 135 | + "version": "4.19", |
| 136 | + "location": "antd", |
| 137 | + "applicationID": "home" |
| 138 | + }, |
| 139 | + { |
| 140 | + "id": "react-dom", |
| 141 | + "name": "react-dom", |
| 142 | + "version": "17.0.2", |
| 143 | + "location": "react-dom", |
| 144 | + "applicationID": "home" |
| 145 | + } |
| 146 | + ], |
| 147 | + "consumes": [ |
| 148 | + { |
| 149 | + "consumingApplicationID": "home", |
| 150 | + "applicationID": "dsl", |
| 151 | + "name": "Carousel", |
| 152 | + "usedIn": [ |
| 153 | + { |
| 154 | + "file": "src/ProductCarousel.js", |
| 155 | + "url": "https://github.com/module-federation/federation-dashboard/tree/master/dashboard-example/home/src/ProductCarousel.js" |
| 156 | + } |
| 157 | + ] |
| 158 | + }, |
| 159 | + { |
| 160 | + "consumingApplicationID": "home", |
| 161 | + "applicationID": "nav", |
| 162 | + "name": "Header", |
| 163 | + "usedIn": [ |
| 164 | + { |
| 165 | + "file": "src/App.js", |
| 166 | + "url": "https://github.com/module-federation/federation-dashboard/tree/master/dashboard-example/home/src/App.js" |
| 167 | + } |
| 168 | + ] |
| 169 | + }, |
| 170 | + { |
| 171 | + "consumingApplicationID": "home", |
| 172 | + "applicationID": "nav", |
| 173 | + "name": "Footer", |
| 174 | + "usedIn": [ |
| 175 | + { |
| 176 | + "file": "src/App.js", |
| 177 | + "url": "https://github.com/module-federation/federation-dashboard/tree/master/dashboard-example/home/src/App.js" |
| 178 | + } |
| 179 | + ] |
| 180 | + }, |
| 181 | + { |
| 182 | + "consumingApplicationID": "home", |
| 183 | + "applicationID": "search", |
| 184 | + "name": "SearchList", |
| 185 | + "usedIn": [ |
| 186 | + { |
| 187 | + "file": "src/App.js", |
| 188 | + "url": "https://github.com/module-federation/federation-dashboard/tree/master/dashboard-example/home/src/App.js" |
| 189 | + } |
| 190 | + ] |
| 191 | + }, |
| 192 | + { |
| 193 | + "consumingApplicationID": "home", |
| 194 | + "applicationID": "utils", |
| 195 | + "name": "analytics", |
| 196 | + "usedIn": [ |
| 197 | + { |
| 198 | + "file": "src/analytics.js", |
| 199 | + "url": "https://github.com/module-federation/federation-dashboard/tree/master/dashboard-example/home/src/analytics.js" |
| 200 | + } |
| 201 | + ] |
| 202 | + }, |
| 203 | + { |
| 204 | + "consumingApplicationID": "home", |
| 205 | + "applicationID": "dsl", |
| 206 | + "name": "Button", |
| 207 | + "usedIn": [ |
| 208 | + { |
| 209 | + "file": "src/PageLG.js", |
| 210 | + "url": "https://github.com/module-federation/federation-dashboard/tree/master/dashboard-example/home/src/PageLG.js" |
| 211 | + }, |
| 212 | + { |
| 213 | + "file": "src/PageMimi.js", |
| 214 | + "url": "https://github.com/module-federation/federation-dashboard/tree/master/dashboard-example/home/src/PageMimi.js" |
| 215 | + }, |
| 216 | + { |
| 217 | + "file": "src/PageSally.js", |
| 218 | + "url": "https://github.com/module-federation/federation-dashboard/tree/master/dashboard-example/home/src/PageSally.js" |
| 219 | + }, |
| 220 | + { |
| 221 | + "file": "src/PageSammy.js", |
| 222 | + "url": "https://github.com/module-federation/federation-dashboard/tree/master/dashboard-example/home/src/PageSammy.js" |
| 223 | + } |
| 224 | + ] |
| 225 | + } |
| 226 | + ], |
| 227 | + "modules": [ |
| 228 | + { |
| 229 | + "id": "home:ProductCarousel", |
| 230 | + "name": "ProductCarousel", |
| 231 | + "applicationID": "home", |
| 232 | + "requires": [ |
| 233 | + "react", |
| 234 | + "antd" |
| 235 | + ], |
| 236 | + "file": "./src/ProductCarousel" |
| 237 | + }, |
| 238 | + { |
| 239 | + "id": "home:HeroImage", |
| 240 | + "name": "HeroImage", |
| 241 | + "applicationID": "home", |
| 242 | + "requires": [ |
| 243 | + "react" |
| 244 | + ], |
| 245 | + "file": "./src/HeroImage" |
| 246 | + } |
| 247 | + ], |
| 248 | + "version": "43d3485d2ac9432112c4a7cd0fce44f1cb0f3dc3", |
| 249 | + "sha": "43d3485d2ac9432112c4a7cd0fce44f1cb0f3dc3", |
| 250 | + "buildHash": "1bcd665347afd646ec1a" |
| 251 | +} |
| 252 | +``` |
| 253 | + |
| 254 | + |
| 255 | +## Ideal Schema |
| 256 | +TBD? |
0 commit comments