@vuepress/plugin-umami-analytics 2.0.0-rc.61 → 2.0.0-rc.63

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/lib/node/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{Logger as t}from"@vuepress/helper";import{getDirname as a,path as m,colors as s}from"vuepress/utils";const c=a(import.meta.url),n="@vuepress/plugin-umami-analytics",l=new t(n),u=({id:i,...r})=>o=>{const e={name:n};return i?o.env.isDev?e:{...e,define:{__UMM_OPTIONS__:{id:i,...r}},clientConfigFile:m.resolve(c,"../client/config.js")}:(l.warn(`${s.cyan("id")} is required!`),e)};export{u as umamiAnalyticsPlugin};
1
+ import{Logger as o}from"@vuepress/helper";import{getDirname as m,path as a,colors as s}from"vuepress/utils";const l=import.meta.dirname||m(import.meta.url),n="@vuepress/plugin-umami-analytics",c=new o(n),p=({id:i,...r})=>t=>{const e={name:n};return i?t.env.isDev?e:{...e,define:{__UMM_OPTIONS__:{id:i,...r}},clientConfigFile:a.resolve(l,"../client/config.js")}:(c.warn(`${s.cyan("id")} is required!`),e)};export{p as umamiAnalyticsPlugin};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/node/umamiAnalyticsPlugin.ts"],"sourcesContent":["import { Logger } from '@vuepress/helper'\nimport type { Plugin, PluginObject } from 'vuepress/core'\nimport { colors, getDirname, path } from 'vuepress/utils'\nimport type { UmamiOptions } from '../shared/index.js'\n\nconst __dirname = getDirname(import.meta.url)\n\nconst PLUGIN_NAME = '@vuepress/plugin-umami-analytics'\n\nconst logger = new Logger(PLUGIN_NAME)\n\nexport const umamiAnalyticsPlugin =\n ({ id, ...options }: UmamiOptions): Plugin =>\n (app) => {\n const plugin: PluginObject = {\n name: PLUGIN_NAME,\n }\n\n if (!id) {\n logger.warn(`${colors.cyan('id')} is required!`)\n\n return plugin\n }\n\n // returns an empty plugin in dev mode when debug mode is not enabled\n if (app.env.isDev) {\n return plugin\n }\n\n return {\n ...plugin,\n\n define: {\n __UMM_OPTIONS__: { id, ...options },\n },\n\n clientConfigFile: path.resolve(__dirname, '../client/config.js'),\n }\n }\n"],"names":["__dirname","getDirname","PLUGIN_NAME","logger","Logger","umamiAnalyticsPlugin","id","options","app","plugin","path","colors"],"mappings":"4GAKA,MAAMA,EAAYC,EAAW,YAAY,GAAG,EAEtCC,EAAc,mCAEdC,EAAS,IAAIC,EAAOF,CAAW,EAExBG,EACX,CAAC,CAAE,GAAAC,EAAI,GAAGC,CAAQ,IACjBC,GAAQ,CACP,MAAMC,EAAuB,CAC3B,KAAMP,CACR,EAEA,OAAKI,EAODE,EAAI,IAAI,MACHC,EAGF,CACL,GAAGA,EAEH,OAAQ,CACN,gBAAiB,CAAE,GAAAH,EAAI,GAAGC,CAAQ,CACpC,EAEA,iBAAkBG,EAAK,QAAQV,EAAW,qBAAqB,CACjE,GAlBEG,EAAO,KAAK,GAAGQ,EAAO,KAAK,IAAI,CAAC,eAAe,EAExCF,EAiBX"}
1
+ {"version":3,"file":"index.js","sources":["../../src/node/umamiAnalyticsPlugin.ts"],"sourcesContent":["import { Logger } from '@vuepress/helper'\nimport type { Plugin, PluginObject } from 'vuepress/core'\nimport { colors, getDirname, path } from 'vuepress/utils'\nimport type { UmamiOptions } from '../shared/index.js'\n\nconst __dirname = import.meta.dirname || getDirname(import.meta.url)\n\nconst PLUGIN_NAME = '@vuepress/plugin-umami-analytics'\n\nconst logger = new Logger(PLUGIN_NAME)\n\nexport const umamiAnalyticsPlugin =\n ({ id, ...options }: UmamiOptions): Plugin =>\n (app) => {\n const plugin: PluginObject = {\n name: PLUGIN_NAME,\n }\n\n if (!id) {\n logger.warn(`${colors.cyan('id')} is required!`)\n\n return plugin\n }\n\n // returns an empty plugin in dev mode when debug mode is not enabled\n if (app.env.isDev) {\n return plugin\n }\n\n return {\n ...plugin,\n\n define: {\n __UMM_OPTIONS__: { id, ...options },\n },\n\n clientConfigFile: path.resolve(__dirname, '../client/config.js'),\n }\n }\n"],"names":["__dirname","getDirname","PLUGIN_NAME","logger","Logger","umamiAnalyticsPlugin","id","options","app","plugin","path","colors"],"mappings":"4GAKA,MAAMA,EAAY,YAAY,SAAWC,EAAW,YAAY,GAAG,EAE7DC,EAAc,mCAEdC,EAAS,IAAIC,EAAOF,CAAW,EAExBG,EACX,CAAC,CAAE,GAAAC,EAAI,GAAGC,CAAQ,IACjBC,GAAQ,CACP,MAAMC,EAAuB,CAC3B,KAAMP,CACR,EAEA,OAAKI,EAODE,EAAI,IAAI,MACHC,EAGF,CACL,GAAGA,EAEH,OAAQ,CACN,gBAAiB,CAAE,GAAAH,EAAI,GAAGC,CAAQ,CACpC,EAEA,iBAAkBG,EAAK,QAAQV,EAAW,qBAAqB,CACjE,GAlBEG,EAAO,KAAK,GAAGQ,EAAO,KAAK,IAAI,CAAC,eAAe,EAExCF,EAiBX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuepress/plugin-umami-analytics",
3
- "version": "2.0.0-rc.61",
3
+ "version": "2.0.0-rc.63",
4
4
  "description": "VuePress plugin - umami-analytics",
5
5
  "keywords": [
6
6
  "vuepress-plugin",
@@ -36,7 +36,7 @@
36
36
  "lib"
37
37
  ],
38
38
  "dependencies": {
39
- "@vuepress/helper": "2.0.0-rc.61",
39
+ "@vuepress/helper": "2.0.0-rc.63",
40
40
  "vue": "^3.5.13"
41
41
  },
42
42
  "peerDependencies": {
@@ -45,5 +45,5 @@
45
45
  "publishConfig": {
46
46
  "access": "public"
47
47
  },
48
- "gitHead": "9bffe9a89f95871fe035432ce3048a655abb6140"
48
+ "gitHead": "339e0f9caa7b38d7fba0616194fdfa45415b914d"
49
49
  }