@riebeckite/plugin-deploy 0.0.11 → 0.0.13

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.
Files changed (3) hide show
  1. package/README.md +68 -68
  2. package/README_ja.md +67 -67
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,68 +1,68 @@
1
- # @riebeckite/plugin-deploy
2
-
3
- Static hosting output helpers for Riebeckite. The plugin prepares the files a
4
- deploy target needs and emits them through the build's generated-output sink.
5
- It does not upload anything and never writes to the filesystem.
6
-
7
- [日本語](./README_ja.md)
8
-
9
- ## Overview
10
-
11
- `deployPlugin()` reads public redirects from the content manifest and plans the
12
- provider-specific files for Cloudflare Pages, Netlify, Vercel, or GitHub Pages.
13
- All planning is pure and deterministic: no timestamps, no randomness, and a
14
- stable path order.
15
-
16
- ## Usage
17
-
18
- ```ts
19
- import { defineConfig } from "@riebeckite/core";
20
- import { deployPlugin } from "@riebeckite/plugin-deploy";
21
-
22
- export default defineConfig({
23
- plugins: [
24
- deployPlugin({
25
- provider: ["cloudflare-pages", "github-pages"],
26
- baseUrl: "https://example.com",
27
- cname: "example.com",
28
- headers: { "X-Frame-Options": "DENY" },
29
- }),
30
- ],
31
- });
32
- ```
33
-
34
- Redirects come only from `manifest.publicRedirects`, so unpublished notes never
35
- leak their old paths into deploy files. A redirect whose target slug is missing
36
- is skipped and reported with a `deploy-unresolved-redirect` diagnostic.
37
-
38
- ## Per-provider output
39
-
40
- | Provider | Files |
41
- | --- | --- |
42
- | `cloudflare-pages`, `netlify` | `_redirects` (when redirects exist), `_headers` (when headers are configured) |
43
- | `vercel` | `vercel.json` |
44
- | `github-pages` | `.nojekyll`, `404.html`, `CNAME` (when configured), one `<from>/index.html` meta-refresh stub per redirect |
45
-
46
- GitHub Pages has no `_redirects` syntax, so every redirect becomes an HTML stub
47
- with a meta refresh and a `<link rel="canonical">`. A redirect from `/` is
48
- skipped because the root cannot be stubbed.
49
-
50
- ## Public API
51
-
52
- - `deployPlugin(options: DeployOptions): RiebeckitePlugin`
53
- - `planDeployOutputs({ provider, redirects, options }): DeployOutput[]`
54
- - `renderRedirectLines(redirects): string`
55
- - `renderVercelConfig({ redirects, options }): string`
56
- - `renderRedirectStub(redirect): string`
57
-
58
- ## Notes
59
-
60
- - Multiple providers are unioned. Identical files collapse into one; the same
61
- path with different content throws.
62
- - Redirect `from` values are resolved (`.` and `..` segments) before they become
63
- output paths, and every planned path passes `normalizeGeneratedOutputPath`.
64
- - Uploading, cache invalidation, and provider authentication are out of scope.
65
-
66
- ## See also
67
-
68
- - [Plugin guide](../../../docs/en/plugin-system.md)
1
+ # @riebeckite/plugin-deploy
2
+
3
+ Static hosting output helpers for Riebeckite. The plugin prepares the files a
4
+ deploy target needs and emits them through the build's generated-output sink.
5
+ It does not upload anything and never writes to the filesystem.
6
+
7
+ [日本語](./README_ja.md)
8
+
9
+ ## Overview
10
+
11
+ `deployPlugin()` reads public redirects from the content manifest and plans the
12
+ provider-specific files for Cloudflare Pages, Netlify, Vercel, or GitHub Pages.
13
+ All planning is pure and deterministic: no timestamps, no randomness, and a
14
+ stable path order.
15
+
16
+ ## Usage
17
+
18
+ ```ts
19
+ import { defineConfig } from "@riebeckite/core";
20
+ import { deployPlugin } from "@riebeckite/plugin-deploy";
21
+
22
+ export default defineConfig({
23
+ plugins: [
24
+ deployPlugin({
25
+ provider: ["cloudflare-pages", "github-pages"],
26
+ baseUrl: "https://example.com",
27
+ cname: "example.com",
28
+ headers: { "X-Frame-Options": "DENY" },
29
+ }),
30
+ ],
31
+ });
32
+ ```
33
+
34
+ Redirects come only from `manifest.publicRedirects`, so unpublished notes never
35
+ leak their old paths into deploy files. A redirect whose target slug is missing
36
+ is skipped and reported with a `deploy-unresolved-redirect` diagnostic.
37
+
38
+ ## Per-provider output
39
+
40
+ | Provider | Files |
41
+ | --- | --- |
42
+ | `cloudflare-pages`, `netlify` | `_redirects` (when redirects exist), `_headers` (when headers are configured) |
43
+ | `vercel` | `vercel.json` |
44
+ | `github-pages` | `.nojekyll`, `404.html`, `CNAME` (when configured), one `<from>/index.html` meta-refresh stub per redirect |
45
+
46
+ GitHub Pages has no `_redirects` syntax, so every redirect becomes an HTML stub
47
+ with a meta refresh and a `<link rel="canonical">`. A redirect from `/` is
48
+ skipped because the root cannot be stubbed.
49
+
50
+ ## Public API
51
+
52
+ - `deployPlugin(options: DeployOptions): RiebeckitePlugin`
53
+ - `planDeployOutputs({ provider, redirects, options }): DeployOutput[]`
54
+ - `renderRedirectLines(redirects): string`
55
+ - `renderVercelConfig({ redirects, options }): string`
56
+ - `renderRedirectStub(redirect): string`
57
+
58
+ ## Notes
59
+
60
+ - Multiple providers are unioned. Identical files collapse into one; the same
61
+ path with different content throws.
62
+ - Redirect `from` values are resolved (`.` and `..` segments) before they become
63
+ output paths, and every planned path passes `normalizeGeneratedOutputPath`.
64
+ - Uploading, cache invalidation, and provider authentication are out of scope.
65
+
66
+ ## See also
67
+
68
+ - [Plugin guide](../../../docs/en/reference/plugin-api.md)
package/README_ja.md CHANGED
@@ -1,67 +1,67 @@
1
- # @riebeckite/plugin-deploy
2
-
3
- Riebeckite の静的ホスティング向け出力ヘルパーです。デプロイ先が必要とする
4
- ファイルを組み立て、ビルドの generated-output シンク経由で出力します。
5
- アップロードは行わず、ファイルシステムにも書き込みません。
6
-
7
- [English](./README.md)
8
-
9
- ## 概要
10
-
11
- `deployPlugin()` はコンテンツマニフェストの公開リダイレクトを読み、
12
- Cloudflare Pages / Netlify / Vercel / GitHub Pages 向けのファイルを計画します。
13
- 計画は純粋かつ決定的です。タイムスタンプや乱数は使わず、パスの順序も安定します。
14
-
15
- ## 使い方
16
-
17
- ```ts
18
- import { defineConfig } from "@riebeckite/core";
19
- import { deployPlugin } from "@riebeckite/plugin-deploy";
20
-
21
- export default defineConfig({
22
- plugins: [
23
- deployPlugin({
24
- provider: ["cloudflare-pages", "github-pages"],
25
- baseUrl: "https://example.com",
26
- cname: "example.com",
27
- headers: { "X-Frame-Options": "DENY" },
28
- }),
29
- ],
30
- });
31
- ```
32
-
33
- リダイレクトは `manifest.publicRedirects` からのみ読み取ります。非公開ノートの
34
- 旧パスがデプロイファイルに漏れることはありません。遷移先の slug が見つからない
35
- リダイレクトはスキップし、`deploy-unresolved-redirect` の診断を出します。
36
-
37
- ## プロバイダごとの出力
38
-
39
- | プロバイダ | ファイル |
40
- | --- | --- |
41
- | `cloudflare-pages`, `netlify` | `_redirects`(リダイレクトがある場合)、`_headers`(ヘッダー設定時) |
42
- | `vercel` | `vercel.json` |
43
- | `github-pages` | `.nojekyll`、`404.html`、`CNAME`(設定時)、リダイレクトごとの `<from>/index.html` メタリフレッシュ |
44
-
45
- GitHub Pages には `_redirects` 構文がないため、各リダイレクトはメタリフレッシュと
46
- `<link rel="canonical">` を持つ HTML スタブになります。`/` からのリダイレクトは
47
- ルートをスタブ化できないためスキップします。
48
-
49
- ## 公開 API
50
-
51
- - `deployPlugin(options: DeployOptions): RiebeckitePlugin`
52
- - `planDeployOutputs({ provider, redirects, options }): DeployOutput[]`
53
- - `renderRedirectLines(redirects): string`
54
- - `renderVercelConfig({ redirects, options }): string`
55
- - `renderRedirectStub(redirect): string`
56
-
57
- ## 注意点
58
-
59
- - 複数プロバイダの出力は統合されます。同一ファイルは 1 つにまとまり、同じパスに
60
- 異なる内容が来た場合はエラーになります。
61
- - リダイレクトの `from` は出力パスにする前に `.` と `..` を解決し、すべてのパスが
62
- `normalizeGeneratedOutputPath` を通ります。
63
- - アップロード、キャッシュ無効化、プロバイダ認証は対象外です。
64
-
65
- ## ????
66
-
67
- - [?????????](../../../docs/ja/plugin-system.md)
1
+ # @riebeckite/plugin-deploy
2
+
3
+ Riebeckite の静的ホスティング向け出力ヘルパーです。デプロイ先が必要とする
4
+ ファイルを組み立て、ビルドの generated-output シンク経由で出力します。
5
+ アップロードは行わず、ファイルシステムにも書き込みません。
6
+
7
+ [English](./README.md)
8
+
9
+ ## 概要
10
+
11
+ `deployPlugin()` はコンテンツマニフェストの公開リダイレクトを読み、
12
+ Cloudflare Pages / Netlify / Vercel / GitHub Pages 向けのファイルを計画します。
13
+ 計画は純粋かつ決定的です。タイムスタンプや乱数は使わず、パスの順序も安定します。
14
+
15
+ ## 使い方
16
+
17
+ ```ts
18
+ import { defineConfig } from "@riebeckite/core";
19
+ import { deployPlugin } from "@riebeckite/plugin-deploy";
20
+
21
+ export default defineConfig({
22
+ plugins: [
23
+ deployPlugin({
24
+ provider: ["cloudflare-pages", "github-pages"],
25
+ baseUrl: "https://example.com",
26
+ cname: "example.com",
27
+ headers: { "X-Frame-Options": "DENY" },
28
+ }),
29
+ ],
30
+ });
31
+ ```
32
+
33
+ リダイレクトは `manifest.publicRedirects` からのみ読み取ります。非公開ノートの
34
+ 旧パスがデプロイファイルに漏れることはありません。遷移先の slug が見つからない
35
+ リダイレクトはスキップし、`deploy-unresolved-redirect` の診断を出します。
36
+
37
+ ## プロバイダごとの出力
38
+
39
+ | プロバイダ | ファイル |
40
+ | --- | --- |
41
+ | `cloudflare-pages`, `netlify` | `_redirects`(リダイレクトがある場合)、`_headers`(ヘッダー設定時) |
42
+ | `vercel` | `vercel.json` |
43
+ | `github-pages` | `.nojekyll`、`404.html`、`CNAME`(設定時)、リダイレクトごとの `<from>/index.html` メタリフレッシュ |
44
+
45
+ GitHub Pages には `_redirects` 構文がないため、各リダイレクトはメタリフレッシュと
46
+ `<link rel="canonical">` を持つ HTML スタブになります。`/` からのリダイレクトは
47
+ ルートをスタブ化できないためスキップします。
48
+
49
+ ## 公開 API
50
+
51
+ - `deployPlugin(options: DeployOptions): RiebeckitePlugin`
52
+ - `planDeployOutputs({ provider, redirects, options }): DeployOutput[]`
53
+ - `renderRedirectLines(redirects): string`
54
+ - `renderVercelConfig({ redirects, options }): string`
55
+ - `renderRedirectStub(redirect): string`
56
+
57
+ ## 注意点
58
+
59
+ - 複数プロバイダの出力は統合されます。同一ファイルは 1 つにまとまり、同じパスに
60
+ 異なる内容が来た場合はエラーになります。
61
+ - リダイレクトの `from` は出力パスにする前に `.` と `..` を解決し、すべてのパスが
62
+ `normalizeGeneratedOutputPath` を通ります。
63
+ - アップロード、キャッシュ無効化、プロバイダ認証は対象外です。
64
+
65
+ ## ????
66
+
67
+ - [?????????](../../../docs/ja/reference/plugin-api.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-deploy",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
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.11"
17
+ "@riebeckite/core": "0.0.13"
18
18
  },
19
19
  "devDependencies": {
20
20
  "tsx": "^4.22.4"