@illinois-grad/grad-vue 7.2.6 → 7.2.8

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.js","names":["VERSION_URL_PLACEHOLDER","appBuildVersion","fileName","options","buildId","ssr","referenceId","config","code"],"sources":["../src/vite.ts"],"sourcesContent":["import type { Plugin } from \"vite\";\n\n/** Placeholder in grad-vue's code that `appBuildVersion()` replaces with the version file URL. */\nexport const VERSION_URL_PLACEHOLDER = \"globalThis.__GRAD_VUE_APP_VERSION_URL__\";\n\nexport interface AppBuildVersionOptions {\n /** Name of the emitted version file. Defaults to `version.json`. */\n fileName?: string;\n}\n\n/**\n * Gives each production build a unique ID so `GAppUpdateNotice` can tell when a newer build\n * has been deployed.\n *\n * Adds `<meta name=\"app-build-id\">` to `index.html` and emits a version file with the same ID.\n * Serve the version file without caching, e.g. in nginx:\n *\n * ```nginx\n * location = /version.json {\n * add_header Cache-Control \"no-store\" always;\n * try_files $uri =404;\n * }\n * ```\n */\nexport function appBuildVersion(options: AppBuildVersionOptions = {}): Plugin {\n const fileName = options.fileName ?? \"version.json\";\n const buildId = globalThis.crypto.randomUUID();\n let ssr = false;\n let referenceId: string | undefined;\n\n return {\n name: \"grad-vue:app-build-version\",\n apply: \"build\",\n configResolved(config) {\n ssr = Boolean(config.build.ssr);\n },\n buildStart() {\n if (!ssr) {\n referenceId = this.emitFile({ type: \"asset\", fileName, source: JSON.stringify({ buildId }) });\n }\n },\n transform(code, _id, transformOptions) {\n if (!referenceId || transformOptions?.ssr || !code.includes(VERSION_URL_PLACEHOLDER)) {\n return;\n }\n // Resolved relative to the chunk's own URL, so it works with any base and on any route\n return {\n code: code.split(VERSION_URL_PLACEHOLDER).join(`import.meta.ROLLUP_FILE_URL_${referenceId}`),\n map: null,\n };\n },\n transformIndexHtml() {\n return [{ tag: \"meta\", attrs: { name: \"app-build-id\", content: buildId }, injectTo: \"head\" }];\n },\n };\n}\n"],"mappings":";AAGA,IAAaA,IAA0B;AAqBvC,SAAgBC,EAAgB,IAAkC,CAAC,GAAW;CAC1E,IAAMC,IAAWC,EAAQ,YAAY,gBAC/BC,IAAU,WAAW,OAAO,WAAW,GACzCC,IAAM,IACNC;CAEJ,OAAO;EACH,MAAM;EACN,OAAO;EACP,eAAe,GAAQ;GACnB,IAAM,EAAQC,EAAO,MAAM;EAC/B;EACA,aAAa;GACT,AAAKF,MACD,IAAc,KAAK,SAAS;IAAE,MAAM;IAAS;IAAU,QAAQ,KAAK,UAAU,EAAE,WAAQ,CAAC;GAAE,CAAC;EAEpG;EACA,UAAU,GAAM,GAAK,GAAkB;GACnC,IAAKC,KAAe,IAAkB,OAAQE,EAAK,SAAA,yCAAgC,GAInF,OAAO;IACH,MAAMA,EAAK,MAAMR,CAAuB,CAAC,CAAC,KAAK,+BAA+BM,GAAa;IAC3F,KAAK;GACT;EACJ;EACA,qBAAqB;GACjB,OAAO,CAAC;IAAE,KAAK;IAAQ,OAAO;KAAE,MAAM;KAAgB,SAASF;IAAQ;IAAG,UAAU;GAAO,CAAC;EAChG;CACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@illinois-grad/grad-vue",
3
- "version": "7.2.6",
3
+ "version": "7.2.8",
4
4
  "description": "Shared Vue.js components for Graduate College apps.",
5
5
  "keywords": [
6
6
  "vue",
@@ -24,6 +24,10 @@
24
24
  "./plugin": {
25
25
  "import": "./dist/plugin.js"
26
26
  },
27
+ "./vite": {
28
+ "types": "./dist/vite.d.ts",
29
+ "import": "./dist/vite.js"
30
+ },
27
31
  "./grad-vue-elements": {
28
32
  "import": "./dist/grad-vue-elements.js"
29
33
  },
@@ -52,11 +56,19 @@
52
56
  "focus-trap": "^8",
53
57
  "vue": "^3.5"
54
58
  },
59
+ "peerDependencies": {
60
+ "vite": ">=6"
61
+ },
62
+ "peerDependenciesMeta": {
63
+ "vite": {
64
+ "optional": true
65
+ }
66
+ },
55
67
  "devDependencies": {
56
68
  "@vitejs/plugin-vue": "^6.0.10",
57
69
  "typescript": "^7.0.2",
58
- "vite": "^8.3.5",
70
+ "vite": "^8.3.7",
59
71
  "vite-plugin-dts": "^5.1.2",
60
- "vue-tsc": "^3.3.13"
72
+ "vue-tsc": "^3.3.14"
61
73
  }
62
74
  }