@medusajs/admin-vite-plugin 3.0.0-snapshot-20251106143524 → 3.0.0-snapshot-20251114155958

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/dist/index.js CHANGED
@@ -1180,12 +1180,13 @@ function generateCode3(results) {
1180
1180
  `;
1181
1181
  }
1182
1182
  function formatMenuItem(route) {
1183
- const { label, icon, path: path3, nested, translationNs } = route;
1183
+ const { label, icon, path: path3, nested, rank, translationNs } = route;
1184
1184
  return `{
1185
1185
  label: ${label},
1186
1186
  icon: ${icon || "undefined"},
1187
1187
  path: "${path3}",
1188
1188
  nested: ${nested ? `"${nested}"` : "undefined"},
1189
+ rank: ${rank !== void 0 ? rank : "undefined"},
1189
1190
  translationNs: ${translationNs ? `${translationNs}` : "undefined"}
1190
1191
  }`;
1191
1192
  }
@@ -1229,6 +1230,7 @@ function generateMenuItem(config, file, index) {
1229
1230
  icon: config.icon ? `${configName}.icon` : void 0,
1230
1231
  path: getRoute(file),
1231
1232
  nested: config.nested,
1233
+ rank: config.rank,
1232
1234
  translationNs: config.translationNs ? `${configName}.translationNs` : void 0
1233
1235
  };
1234
1236
  }
@@ -1301,7 +1303,7 @@ function processConfigProperties(properties, file) {
1301
1303
  const nested = properties.find(
1302
1304
  (prop) => (0, import_types.isObjectProperty)(prop) && (0, import_types.isIdentifier)(prop.key, { name: "nested" })
1303
1305
  );
1304
- let nestedValue = void 0;
1306
+ let nestedValue;
1305
1307
  if ((0, import_types.isStringLiteral)(nested?.value)) {
1306
1308
  nestedValue = nested.value.value;
1307
1309
  }
@@ -1321,10 +1323,18 @@ function processConfigProperties(properties, file) {
1321
1323
  if ((0, import_types.isStringLiteral)(translationNs?.value)) {
1322
1324
  translationNsValue = translationNs.value.value;
1323
1325
  }
1326
+ const rank = properties.find(
1327
+ (prop) => (0, import_types.isObjectProperty)(prop) && (0, import_types.isIdentifier)(prop.key, { name: "rank" })
1328
+ );
1329
+ let rankValue;
1330
+ if ((0, import_types.isNumericLiteral)(rank?.value)) {
1331
+ rankValue = rank.value.value;
1332
+ }
1324
1333
  return {
1325
1334
  label: hasLabel,
1326
1335
  icon: hasProperty("icon"),
1327
1336
  nested: nestedValue,
1337
+ rank: rankValue,
1328
1338
  translationNs: translationNsValue
1329
1339
  };
1330
1340
  }
package/dist/index.mjs CHANGED
@@ -20,6 +20,7 @@ import {
20
20
  isJSXElement,
21
21
  isJSXFragment,
22
22
  isMemberExpression,
23
+ isNumericLiteral,
23
24
  isObjectExpression,
24
25
  isObjectProperty,
25
26
  isStringLiteral,
@@ -1170,12 +1171,13 @@ function generateCode3(results) {
1170
1171
  `;
1171
1172
  }
1172
1173
  function formatMenuItem(route) {
1173
- const { label, icon, path: path3, nested, translationNs } = route;
1174
+ const { label, icon, path: path3, nested, rank, translationNs } = route;
1174
1175
  return `{
1175
1176
  label: ${label},
1176
1177
  icon: ${icon || "undefined"},
1177
1178
  path: "${path3}",
1178
1179
  nested: ${nested ? `"${nested}"` : "undefined"},
1180
+ rank: ${rank !== void 0 ? rank : "undefined"},
1179
1181
  translationNs: ${translationNs ? `${translationNs}` : "undefined"}
1180
1182
  }`;
1181
1183
  }
@@ -1219,6 +1221,7 @@ function generateMenuItem(config, file, index) {
1219
1221
  icon: config.icon ? `${configName}.icon` : void 0,
1220
1222
  path: getRoute(file),
1221
1223
  nested: config.nested,
1224
+ rank: config.rank,
1222
1225
  translationNs: config.translationNs ? `${configName}.translationNs` : void 0
1223
1226
  };
1224
1227
  }
@@ -1291,7 +1294,7 @@ function processConfigProperties(properties, file) {
1291
1294
  const nested = properties.find(
1292
1295
  (prop) => isObjectProperty(prop) && isIdentifier(prop.key, { name: "nested" })
1293
1296
  );
1294
- let nestedValue = void 0;
1297
+ let nestedValue;
1295
1298
  if (isStringLiteral(nested?.value)) {
1296
1299
  nestedValue = nested.value.value;
1297
1300
  }
@@ -1311,10 +1314,18 @@ function processConfigProperties(properties, file) {
1311
1314
  if (isStringLiteral(translationNs?.value)) {
1312
1315
  translationNsValue = translationNs.value.value;
1313
1316
  }
1317
+ const rank = properties.find(
1318
+ (prop) => isObjectProperty(prop) && isIdentifier(prop.key, { name: "rank" })
1319
+ );
1320
+ let rankValue;
1321
+ if (isNumericLiteral(rank?.value)) {
1322
+ rankValue = rank.value.value;
1323
+ }
1314
1324
  return {
1315
1325
  label: hasLabel,
1316
1326
  icon: hasProperty("icon"),
1317
1327
  nested: nestedValue,
1328
+ rank: rankValue,
1318
1329
  translationNs: translationNsValue
1319
1330
  };
1320
1331
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/admin-vite-plugin",
3
- "version": "3.0.0-snapshot-20251106143524",
3
+ "version": "3.0.0-snapshot-20251114155958",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -27,16 +27,16 @@
27
27
  "test:watch": "../../../node_modules/.bin/vitest"
28
28
  },
29
29
  "devDependencies": {
30
- "vite": "^5.4.14"
30
+ "vite": "^5.4.21"
31
31
  },
32
32
  "peerDependencies": {
33
- "vite": "^5.4.14"
33
+ "vite": "^5.4.21"
34
34
  },
35
35
  "dependencies": {
36
36
  "@babel/parser": "7.25.6",
37
37
  "@babel/traverse": "7.25.6",
38
38
  "@babel/types": "7.25.6",
39
- "@medusajs/admin-shared": "3.0.0-snapshot-20251106143524",
39
+ "@medusajs/admin-shared": "3.0.0-snapshot-20251114155958",
40
40
  "chokidar": "^3.5.3",
41
41
  "fdir": "6.1.1",
42
42
  "magic-string": "0.30.5",