@vuepress/plugin-redirect 2.0.0-rc.126 → 2.0.0-rc.127

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,27 @@
1
+ import { t as RedirectBehaviorConfig } from "./behavior-C8vQI65c.js";
2
+ import { t as RedirectPluginLocaleConfig } from "./types-B9aizXKO.js";
3
+ import * as _$vue from "vue";
4
+ import { VNode } from "vue";
5
+ //#region src/client/components/RedirectModal.d.ts
6
+ declare const _default: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
7
+ readonly config: {
8
+ readonly type: _$vue.PropType<RedirectBehaviorConfig>;
9
+ readonly required: true;
10
+ };
11
+ readonly locales: {
12
+ readonly type: _$vue.PropType<RedirectPluginLocaleConfig>;
13
+ readonly required: true;
14
+ };
15
+ }>, () => VNode | null, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
16
+ readonly config: {
17
+ readonly type: _$vue.PropType<RedirectBehaviorConfig>;
18
+ readonly required: true;
19
+ };
20
+ readonly locales: {
21
+ readonly type: _$vue.PropType<RedirectPluginLocaleConfig>;
22
+ readonly required: true;
23
+ };
24
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
25
+ //#endregion
26
+ export { _default as t };
27
+ //# sourceMappingURL=RedirectModal-BcXrVGpm.d.ts.map
package/dist/cli/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"../getRedirectHTML-C9SBJAfB.js";import{removeEndingSlash as t,removeLeadingSlash as n}from"@vuepress/helper";import{createCommand as r}from"commander";import{loadUserConfig as i,resolveAppConfig as a,resolveCliAppConfig as o,resolveUserConfigConventionalPath as s,resolveUserConfigPath as c,transformUserConfigToPlugin as l}from"vuepress/cli";import{createBuildApp as u}from"vuepress/core";import{fs as d,logger as f,path as p}from"vuepress/utils";var m=`2.0.0-rc.126`;const h=r(`vp-redirect`);h.summary(`Generate redirect site`).description(`Generate redirect site for current VuePress project`).option(`--hostname <hostname>`,`Hostname to redirect to (E.g.: https://new.example.com/)`,`/`).option(`-c, --config [config]`,`Set path to config file`).option(`--cache [cache]`,`Set the directory of the cache files`).option(`--temp [temp]`,`Set the directory of the temporary files`).option(`--clean-cache`,`Clean the cache files before generation`).option(`--clean-temp`,`Clean the temporary files before generation`).argument(`<source>`,`Source directory of VuePress project`).argument(`[output]`,`Output folder (default: .vuepress/redirect relative to source folder)`).action(async(r,m,g)=>{process.env.NODE_ENV??=`production`,d.existsSync(r)||h.error(`Source directory ${r} does not exist!`);let _=o(r,{}),{userConfig:v}=await i(g.config?c(g.config):s(_.source)),y=a({defaultAppConfig:{cache:g.cache,temp:g.temp},cliAppConfig:_,userConfig:v});if(y==null)return;let b=u(y);b.use(l(v,_.source)),g.cleanTemp===!0&&(f.info(`Cleaning temp...`),await d.remove(b.dir.temp())),g.cleanCache===!0&&(f.info(`Cleaning cache...`),await d.remove(b.dir.cache()));let x=m?p.join(process.cwd(),m):p.join(b.dir.source(),`.vuepress`,`redirect`);await d.emptyDir(x),f.info(`Initializing VuePress and preparing data...`),await b.init(),f.info(`Generating redirect pages...`),await Promise.all(b.pages.map(r=>{let i=`${t(g.hostname)}${b.siteData.base}${n(r.path)}`,a=p.join(x,n(r.path.replace(/\/$/,`/index.html`)));return d.ensureDir(p.dirname(a)).then(()=>d.writeFile(a,e(i)))}))}),h.version(m),h.showHelpAfterError(`add --help for additional information`),await h.parseAsync();export{};
2
+ import{t as e}from"../getRedirectHTML-C9SBJAfB.js";import{removeEndingSlash as t,removeLeadingSlash as n}from"@vuepress/helper";import{createCommand as r}from"commander";import{loadUserConfig as i,resolveAppConfig as a,resolveCliAppConfig as o,resolveUserConfigConventionalPath as s,resolveUserConfigPath as c,transformUserConfigToPlugin as l}from"vuepress/cli";import{createBuildApp as u}from"vuepress/core";import{fs as d,logger as f,path as p}from"vuepress/utils";var m=`2.0.0-rc.127`;const h=r(`vp-redirect`);h.summary(`Generate redirect site`).description(`Generate redirect site for current VuePress project`).option(`--hostname <hostname>`,`Hostname to redirect to (E.g.: https://new.example.com/)`,`/`).option(`-c, --config [config]`,`Set path to config file`).option(`--cache [cache]`,`Set the directory of the cache files`).option(`--temp [temp]`,`Set the directory of the temporary files`).option(`--clean-cache`,`Clean the cache files before generation`).option(`--clean-temp`,`Clean the temporary files before generation`).argument(`<source>`,`Source directory of VuePress project`).argument(`[output]`,`Output folder (default: .vuepress/redirect relative to source folder)`).action(async(r,m,g)=>{process.env.NODE_ENV??=`production`,d.existsSync(r)||h.error(`Source directory ${r} does not exist!`);let _=o(r,{}),{userConfig:v}=await i(g.config?c(g.config):s(_.source)),y=a({defaultAppConfig:{cache:g.cache,temp:g.temp},cliAppConfig:_,userConfig:v});if(y==null)return;let b=u(y);b.use(l(v,_.source)),g.cleanTemp===!0&&(f.info(`Cleaning temp...`),await d.remove(b.dir.temp())),g.cleanCache===!0&&(f.info(`Cleaning cache...`),await d.remove(b.dir.cache()));let x=m?p.join(process.cwd(),m):p.join(b.dir.source(),`.vuepress`,`redirect`);await d.emptyDir(x),f.info(`Initializing VuePress and preparing data...`),await b.init(),f.info(`Generating redirect pages...`),await Promise.all(b.pages.map(r=>{let i=`${t(g.hostname)}${b.siteData.base}${n(r.path)}`,a=p.join(x,n(r.path.replace(/\/$/,`/index.html`)));return d.ensureDir(p.dirname(a)).then(()=>d.writeFile(a,e(i)))}))}),h.version(m),h.showHelpAfterError(`add --help for additional information`),await h.parseAsync();export{};
3
3
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import { t as _default } from "../../RedirectModal-D92Hfvs1.js";
1
+ import { t as _default } from "../../RedirectModal-BcXrVGpm.js";
2
2
  export { _default as default };
@@ -1,27 +1,27 @@
1
1
  import { t as RedirectBehaviorConfig } from "../../behavior-C8vQI65c.js";
2
2
  import { t as RedirectPluginLocaleConfig } from "../../types-B9aizXKO.js";
3
- import * as vue from "vue";
3
+ import * as _$vue from "vue";
4
4
  import { VNode } from "vue";
5
5
  //#region src/client/components/RedirectPopup.d.ts
6
- declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
6
+ declare const _default: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
7
7
  readonly config: {
8
- readonly type: vue.PropType<RedirectBehaviorConfig>;
8
+ readonly type: _$vue.PropType<RedirectBehaviorConfig>;
9
9
  readonly required: true;
10
10
  };
11
11
  readonly locales: {
12
- readonly type: vue.PropType<RedirectPluginLocaleConfig>;
12
+ readonly type: _$vue.PropType<RedirectPluginLocaleConfig>;
13
13
  readonly required: true;
14
14
  };
15
- }>, () => VNode | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
15
+ }>, () => VNode | null, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
16
16
  readonly config: {
17
- readonly type: vue.PropType<RedirectBehaviorConfig>;
17
+ readonly type: _$vue.PropType<RedirectBehaviorConfig>;
18
18
  readonly required: true;
19
19
  };
20
20
  readonly locales: {
21
- readonly type: vue.PropType<RedirectPluginLocaleConfig>;
21
+ readonly type: _$vue.PropType<RedirectPluginLocaleConfig>;
22
22
  readonly required: true;
23
23
  };
24
- }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
24
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
25
25
  //#endregion
26
26
  export { _default as default };
27
27
  //# sourceMappingURL=RedirectPopup.d.ts.map
@@ -1,9 +1,9 @@
1
1
  import { t as RedirectBehaviorConfig } from "../behavior-C8vQI65c.js";
2
- import * as vuepress_client0 from "vuepress/client";
2
+ import * as _$vuepress_client0 from "vuepress/client";
3
3
 
4
4
  //#region src/client/config.d.ts
5
5
  declare const config: RedirectBehaviorConfig;
6
- declare const _default: vuepress_client0.ClientConfig;
6
+ declare const _default: _$vuepress_client0.ClientConfig;
7
7
  //#endregion
8
8
  export { config, _default as default };
9
9
  //# sourceMappingURL=config.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { t as RedirectBehaviorConfig } from "../behavior-C8vQI65c.js";
2
2
  import { t as RedirectPluginLocaleConfig } from "../types-B9aizXKO.js";
3
- import { t as _default } from "../RedirectModal-D92Hfvs1.js";
3
+ import { t as _default } from "../RedirectModal-BcXrVGpm.js";
4
4
  import { ComputedRef, ExtractPropTypes, PropType, Ref } from "vue";
5
5
 
6
6
  //#region src/client/composables/setupDevServerRedirect.d.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuepress/plugin-redirect",
3
- "version": "2.0.0-rc.126",
3
+ "version": "2.0.0-rc.127",
4
4
  "description": "VuePress plugin - redirect",
5
5
  "keywords": [
6
6
  "plugin",
@@ -48,7 +48,7 @@
48
48
  "access": "public"
49
49
  },
50
50
  "dependencies": {
51
- "@vuepress/helper": "2.0.0-rc.126",
51
+ "@vuepress/helper": "2.0.0-rc.127",
52
52
  "@vueuse/core": "^14.2.1",
53
53
  "commander": "^14.0.3",
54
54
  "vue": "^3.5.31"
@@ -56,5 +56,5 @@
56
56
  "peerDependencies": {
57
57
  "vuepress": "2.0.0-rc.27"
58
58
  },
59
- "gitHead": "3ff37676288f188ca791287db55a55b57ec062d0"
59
+ "gitHead": "405b7cdccc7ed0ee2efea0dfa2b3f0036cc25e87"
60
60
  }
@@ -1,27 +0,0 @@
1
- import { t as RedirectBehaviorConfig } from "./behavior-C8vQI65c.js";
2
- import { t as RedirectPluginLocaleConfig } from "./types-B9aizXKO.js";
3
- import * as vue from "vue";
4
- import { VNode } from "vue";
5
- //#region src/client/components/RedirectModal.d.ts
6
- declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
7
- readonly config: {
8
- readonly type: vue.PropType<RedirectBehaviorConfig>;
9
- readonly required: true;
10
- };
11
- readonly locales: {
12
- readonly type: vue.PropType<RedirectPluginLocaleConfig>;
13
- readonly required: true;
14
- };
15
- }>, () => VNode | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
16
- readonly config: {
17
- readonly type: vue.PropType<RedirectBehaviorConfig>;
18
- readonly required: true;
19
- };
20
- readonly locales: {
21
- readonly type: vue.PropType<RedirectPluginLocaleConfig>;
22
- readonly required: true;
23
- };
24
- }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
25
- //#endregion
26
- export { _default as t };
27
- //# sourceMappingURL=RedirectModal-D92Hfvs1.d.ts.map