@riebeckite/plugin-deploy 0.0.15 → 0.0.17
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/README.md +0 -1
- package/README_ja.md +2 -4
- package/dist/index.js +8 -3
- package/dist/src/providers.d.ts +1 -0
- package/dist/src/types.d.ts +0 -2
- package/package.json +2 -2
package/README.md
CHANGED
package/README_ja.md
CHANGED
|
@@ -22,7 +22,6 @@ export default defineConfig({
|
|
|
22
22
|
plugins: [
|
|
23
23
|
deployPlugin({
|
|
24
24
|
provider: ["cloudflare-pages", "github-pages"],
|
|
25
|
-
baseUrl: "https://example.com",
|
|
26
25
|
cname: "example.com",
|
|
27
26
|
headers: { "X-Frame-Options": "DENY" },
|
|
28
27
|
}),
|
|
@@ -62,7 +61,6 @@ GitHub Pages には `_redirects` 構文がないため、各リダイレクト
|
|
|
62
61
|
`normalizeGeneratedOutputPath` を通ります。
|
|
63
62
|
- アップロード、キャッシュ無効化、プロバイダ認証は対象外です。
|
|
64
63
|
|
|
65
|
-
##
|
|
66
|
-
|
|
67
|
-
- [?????????](../../../docs/ja/docs/reference/plugin-api.md)
|
|
64
|
+
## 関連リンク
|
|
68
65
|
|
|
66
|
+
- [プラグイン API](../../../docs/ja/docs/reference/plugin-api.md)
|
package/dist/index.js
CHANGED
|
@@ -167,7 +167,7 @@ function planDeployOutputs(args) {
|
|
|
167
167
|
for (const redirect of redirects) {
|
|
168
168
|
const path = redirectStubPath(redirect.from);
|
|
169
169
|
if (path === null) continue;
|
|
170
|
-
add(path, renderRedirectStubFor(redirect,
|
|
170
|
+
add(path, renderRedirectStubFor(redirect, args.baseUrl));
|
|
171
171
|
}
|
|
172
172
|
break;
|
|
173
173
|
}
|
|
@@ -222,7 +222,7 @@ function deployPlugin(options) {
|
|
|
222
222
|
return definePlugin({
|
|
223
223
|
name: PLUGIN_NAME,
|
|
224
224
|
options,
|
|
225
|
-
|
|
225
|
+
buildEnd(context) {
|
|
226
226
|
const redirects = resolvePublicRedirects(
|
|
227
227
|
context.manifest,
|
|
228
228
|
context.diagnostics
|
|
@@ -230,7 +230,12 @@ function deployPlugin(options) {
|
|
|
230
230
|
const providers = Array.isArray(options.provider) ? options.provider : [options.provider];
|
|
231
231
|
const outputs = mergePlannedOutputs(
|
|
232
232
|
providers.map(
|
|
233
|
-
(provider) => planDeployOutputs({
|
|
233
|
+
(provider) => planDeployOutputs({
|
|
234
|
+
provider,
|
|
235
|
+
redirects,
|
|
236
|
+
options,
|
|
237
|
+
baseUrl: context.config?.site.baseUrl
|
|
238
|
+
})
|
|
234
239
|
)
|
|
235
240
|
);
|
|
236
241
|
for (const entry of outputs) {
|
package/dist/src/providers.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export declare function planDeployOutputs(args: {
|
|
|
22
22
|
provider: DeployProvider;
|
|
23
23
|
redirects: readonly PublicRedirect[];
|
|
24
24
|
options?: DeployOptions;
|
|
25
|
+
baseUrl?: string;
|
|
25
26
|
}): DeployOutput[];
|
|
26
27
|
/**
|
|
27
28
|
* Merges the planned outputs of several providers. Identical files collapse to
|
package/dist/src/types.d.ts
CHANGED
|
@@ -17,8 +17,6 @@ export type PublicRedirect = {
|
|
|
17
17
|
export type DeployOptions = {
|
|
18
18
|
/** One or more deploy targets to prepare files for. */
|
|
19
19
|
provider: DeployProvider | DeployProvider[];
|
|
20
|
-
/** Absolute site origin used when an absolute canonical URL is required. */
|
|
21
|
-
baseUrl?: string;
|
|
22
20
|
/** Vercel `trailingSlash` preference. */
|
|
23
21
|
trailingSlash?: "always" | "never";
|
|
24
22
|
/** Additional hosting headers, rendered per provider when supported. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riebeckite/plugin-deploy",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@riebeckite/core": "0.0.
|
|
17
|
+
"@riebeckite/core": "0.0.17"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"tsx": "^4.22.4"
|