@writedocs/generator 0.10.20 → 0.11.0
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/astro.config.mjs +32 -8
- package/package.json +1 -1
- package/src/cli/base-path-layout.js +44 -0
- package/src/cli/build.js +177 -168
- package/src/cli/check-built-styles.js +41 -33
- package/src/cli/dev.js +261 -244
- package/src/cli/run-pagefind.js +154 -148
- package/src/cli/write-mcp-files.js +103 -96
- package/src/cli/write-redirects-file.js +25 -8
- package/src/components/AppIcon.astro +51 -50
- package/src/components/Card.astro +193 -192
- package/src/components/CopyPageMenu.astro +374 -370
- package/src/components/Hint.astro +188 -187
- package/src/components/Icon.astro +72 -71
- package/src/components/Image.astro +3 -2
- package/src/components/Tile.astro +67 -66
- package/src/components/Video.astro +137 -136
- package/src/layout/BaseLayout.astro +21 -12
- package/src/layout/components/AnalyticsScripts.astro +6 -2
- package/src/layout/components/Breadcrumbs.astro +98 -97
- package/src/layout/components/ConsentBanner.astro +119 -118
- package/src/layout/components/MobileMenu.astro +229 -228
- package/src/layout/components/NavTree.astro +393 -392
- package/src/layout/components/Sidebar.astro +232 -231
- package/src/layout/components/SiteFooter.astro +87 -86
- package/src/layout/components/TopBar.astro +386 -385
- package/src/lib/agent-markdown.js +164 -162
- package/src/lib/asset-dimensions.js +89 -89
- package/src/lib/base-path.js +90 -0
- package/src/lib/config-schema.js +10 -0
- package/src/lib/config-schema.ts +17 -0
- package/src/lib/config.ts +1314 -1289
- package/src/lib/consent.js +108 -102
- package/src/lib/json-schema-descriptions.js +1 -0
- package/src/lib/link-check.js +7 -2
- package/src/lib/llms-index.ts +90 -88
- package/src/lib/mcp-dev-integration.js +65 -60
- package/src/lib/mcp-index.ts +102 -101
- package/src/lib/project-files-integration.js +2 -2
- package/src/lib/rehype-base-path.js +62 -0
- package/src/lib/robots-txt.js +21 -16
- package/src/lib/seo-tags.js +155 -140
- package/src/lib/site-base.ts +27 -0
- package/src/lib/styles-asset-integration.js +23 -10
- package/src/lib/wdignore-cases.json +195 -195
- package/src/lib/wdignore.js +177 -177
- package/src/pages/404.astro +63 -62
- package/src/pages/[...slug].astro +1604 -1597
- package/src/pages/[...slug].md.ts +93 -93
- package/src/pages/llms-full.txt.ts +88 -86
- package/src/scripts/search.ts +241 -237
- package/writedocs.schema.json +6 -0
|
@@ -1,195 +1,195 @@
|
|
|
1
|
-
{
|
|
2
|
-
"description": "Test cases for @writedocs/generator/wdignore. For each case: createWdignore(case.wdignore).ignores(path, directory === true) must equal `ignored` for every entry in `paths`. Paths are POSIX, relative to the project root. The generator's own tests (scripts/wdignore.test.js) run this file; any other implementation of the rules should too.",
|
|
3
|
-
"cases": [
|
|
4
|
-
{
|
|
5
|
-
"name": "default exclusions, no .wdignore",
|
|
6
|
-
"wdignore": "",
|
|
7
|
-
"paths": [
|
|
8
|
-
{ "path": ".env", "ignored": true },
|
|
9
|
-
{ "path": ".env.local", "ignored": true },
|
|
10
|
-
{ "path": ".env.example", "ignored": true },
|
|
11
|
-
{ "path": "docs/.env", "ignored": true },
|
|
12
|
-
{ "path": ".git/config", "ignored": true },
|
|
13
|
-
{ "path": ".git", "directory": true, "ignored": true },
|
|
14
|
-
{ "path": ".gitignore", "ignored": true },
|
|
15
|
-
{ "path": ".gitmodules", "ignored": true },
|
|
16
|
-
{ "path": ".gitattributes", "ignored": true },
|
|
17
|
-
{ "path": ".github/workflows/ci.yml", "ignored": true },
|
|
18
|
-
{ "path": ".github", "directory": true, "ignored": true },
|
|
19
|
-
{ "path": ".vscode/settings.json", "ignored": true },
|
|
20
|
-
{ "path": ".DS_Store", "ignored": true },
|
|
21
|
-
{ "path": "docs/.DS_Store", "ignored": true },
|
|
22
|
-
{ "path": "docs/.drafts/plan.pdf", "ignored": true },
|
|
23
|
-
{ "path": ".npmrc", "ignored": true },
|
|
24
|
-
{ "path": ".wdignore", "ignored": true },
|
|
25
|
-
{ "path": ".mintignore", "ignored": true },
|
|
26
|
-
{ "path": ".writedocs/asset-dimensions.json", "ignored": true },
|
|
27
|
-
{ "path": ".writedocs", "directory": true, "ignored": true },
|
|
28
|
-
{ "path": "package.json", "ignored": true },
|
|
29
|
-
{ "path": "examples/package.json", "ignored": true },
|
|
30
|
-
{ "path": "package-lock.json", "ignored": true },
|
|
31
|
-
{ "path": "yarn.lock", "ignored": true },
|
|
32
|
-
{ "path": "pnpm-lock.yaml", "ignored": true },
|
|
33
|
-
{ "path": "bun.lockb", "ignored": true },
|
|
34
|
-
{ "path": "bun.lock", "ignored": true },
|
|
35
|
-
{ "path": "composer.json", "ignored": true },
|
|
36
|
-
{ "path": "composer.lock", "ignored": true },
|
|
37
|
-
{ "path": "node_modules/pkg/index.js", "ignored": true },
|
|
38
|
-
{ "path": "node_modules", "directory": true, "ignored": true },
|
|
39
|
-
{ "path": "examples/app/node_modules/x/a.json", "ignored": true },
|
|
40
|
-
{ "path": "dist/index.html", "ignored": true },
|
|
41
|
-
{ "path": "dist", "directory": true, "ignored": true },
|
|
42
|
-
{ "path": "examples/dist/app.zip", "ignored": true },
|
|
43
|
-
{ "path": "dist", "ignored": false },
|
|
44
|
-
{ "path": "tsconfig.json", "ignored": true },
|
|
45
|
-
{ "path": "jsconfig.json", "ignored": true },
|
|
46
|
-
{ "path": "vercel.json", "ignored": true },
|
|
47
|
-
{ "path": "netlify.json", "ignored": true },
|
|
48
|
-
{ "path": "netlify.toml", "ignored": true },
|
|
49
|
-
{ "path": "wrangler.json", "ignored": true },
|
|
50
|
-
{ "path": "wrangler.jsonc", "ignored": true },
|
|
51
|
-
{ "path": "wrangler.toml", "ignored": true },
|
|
52
|
-
{ "path": "Dockerfile", "ignored": true },
|
|
53
|
-
{ "path": "docker-compose.yml", "ignored": true },
|
|
54
|
-
{ "path": "docker-compose.prod.yaml", "ignored": true },
|
|
55
|
-
{ "path": "certs/server.pem", "ignored": true },
|
|
56
|
-
{ "path": "private.key", "ignored": true },
|
|
57
|
-
{ "path": "store.p12", "ignored": true },
|
|
58
|
-
{ "path": "store.pfx", "ignored": true },
|
|
59
|
-
{ "path": "id_rsa", "ignored": true },
|
|
60
|
-
{ "path": "id_rsa.pub", "ignored": true },
|
|
61
|
-
{ "path": "keys/id_dsa", "ignored": true },
|
|
62
|
-
{ "path": "keys/id_ecdsa", "ignored": true },
|
|
63
|
-
{ "path": "keys/id_ed25519", "ignored": true },
|
|
64
|
-
{ "path": "certs/site.crt", "ignored": true },
|
|
65
|
-
{ "path": "android/release.jks", "ignored": true },
|
|
66
|
-
{ "path": "android/release.keystore", "ignored": true },
|
|
67
|
-
{ "path": "data/app.sqlite", "ignored": true },
|
|
68
|
-
{ "path": "data/app.sqlite3", "ignored": true },
|
|
69
|
-
{ "path": "data/app.db", "ignored": true },
|
|
70
|
-
{ "path": "data/dump.sql", "ignored": true },
|
|
71
|
-
{ "path": "debug.log", "ignored": true },
|
|
72
|
-
{ "path": "Package.JSON", "ignored": true },
|
|
73
|
-
{ "path": "certs/SERVER.PEM", "ignored": true },
|
|
74
|
-
|
|
75
|
-
{ "path": "writedocs.json", "ignored": false },
|
|
76
|
-
{ "path": "docs/intro.mdx", "ignored": false },
|
|
77
|
-
{ "path": "docs", "directory": true, "ignored": false },
|
|
78
|
-
{ "path": "images/hero.png", "ignored": false },
|
|
79
|
-
{ "path": "data/rates.json", "ignored": false },
|
|
80
|
-
{ "path": "docs/guides/export.csv", "ignored": false },
|
|
81
|
-
{ "path": "files/terms.pdf", "ignored": false },
|
|
82
|
-
{ "path": "robots.txt", "ignored": false },
|
|
83
|
-
{ "path": "openapi/api.yaml", "ignored": false },
|
|
84
|
-
{ "path": "snippets/Chart.jsx", "ignored": false },
|
|
85
|
-
{ "path": "theme.css", "ignored": false },
|
|
86
|
-
{ "path": "distribution/notes.txt", "ignored": false },
|
|
87
|
-
{ "path": "docs/environment.txt", "ignored": false },
|
|
88
|
-
{ "path": "docs/keys.txt", "ignored": false },
|
|
89
|
-
{ "path": "docs/package.json.txt", "ignored": false },
|
|
90
|
-
|
|
91
|
-
{ "path": "public/images/logo.svg", "ignored": false },
|
|
92
|
-
{ "path": "public", "directory": true, "ignored": false },
|
|
93
|
-
{ "path": "public/.well-known/security.txt", "ignored": false },
|
|
94
|
-
{ "path": "public/package.json", "ignored": false },
|
|
95
|
-
{ "path": "public/data/dump.sql", "ignored": false },
|
|
96
|
-
{ "path": "public/.env", "ignored": true },
|
|
97
|
-
{ "path": "public/server.key", "ignored": true },
|
|
98
|
-
{ "path": "public/.git/config", "ignored": true },
|
|
99
|
-
{ "path": "public/.npmrc", "ignored": true },
|
|
100
|
-
|
|
101
|
-
{ "path": "", "ignored": true },
|
|
102
|
-
{ "path": "../secret.txt", "ignored": true },
|
|
103
|
-
{ "path": "a/../b.txt", "ignored": true },
|
|
104
|
-
{ "path": "./a.txt", "ignored": true },
|
|
105
|
-
{ "path": "/abs/a.txt", "ignored": true },
|
|
106
|
-
{ "path": "a\\b.txt", "ignored": true }
|
|
107
|
-
]
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"name": "a .wdignore with folder patterns, an anchored pattern, a wildcard and a negation",
|
|
111
|
-
"wdignore": "# drafts and internal data\ndrafts/\n/internal\n\n*.csv\n!docs/public-data/*.csv\n",
|
|
112
|
-
"paths": [
|
|
113
|
-
{ "path": "drafts/a.mdx", "ignored": true },
|
|
114
|
-
{ "path": "drafts", "directory": true, "ignored": true },
|
|
115
|
-
{ "path": "docs/drafts/b.mdx", "ignored": true },
|
|
116
|
-
{ "path": "drafts", "ignored": false },
|
|
117
|
-
{ "path": "internal/x.pdf", "ignored": true },
|
|
118
|
-
{ "path": "docs/internal/x.pdf", "ignored": false },
|
|
119
|
-
{ "path": "data/a.csv", "ignored": true },
|
|
120
|
-
{ "path": "docs/public-data/rates.csv", "ignored": false },
|
|
121
|
-
{ "path": "docs/public-data/deep/x.csv", "ignored": true },
|
|
122
|
-
{ "path": "docs/a.mdx", "ignored": false },
|
|
123
|
-
{ "path": "images/hero.png", "ignored": false },
|
|
124
|
-
{ "path": "public/files/list.csv", "ignored": true },
|
|
125
|
-
{ "path": "public/drafts/a.png", "ignored": true },
|
|
126
|
-
{ "path": "package.json", "ignored": true },
|
|
127
|
-
{ "path": ".env", "ignored": true }
|
|
128
|
-
]
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
"name": "a .wdignore with CRLF line endings and a byte order mark",
|
|
132
|
-
"wdignore": "
|
|
133
|
-
"paths": [
|
|
134
|
-
{ "path": "drafts/a.mdx", "ignored": true },
|
|
135
|
-
{ "path": "data/a.csv", "ignored": true },
|
|
136
|
-
{ "path": "docs/a.mdx", "ignored": false }
|
|
137
|
-
]
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"name": "default exclusions brought back with !",
|
|
141
|
-
"wdignore": "!.well-known/\n!examples/package.json\n!*.sql\n!examples/dist/\n",
|
|
142
|
-
"paths": [
|
|
143
|
-
{ "path": ".well-known/security.txt", "ignored": false },
|
|
144
|
-
{ "path": ".well-known", "directory": true, "ignored": false },
|
|
145
|
-
{ "path": ".github/workflows/ci.yml", "ignored": true },
|
|
146
|
-
{ "path": ".gitignore", "ignored": true },
|
|
147
|
-
{ "path": "examples/package.json", "ignored": false },
|
|
148
|
-
{ "path": "package.json", "ignored": true },
|
|
149
|
-
{ "path": "other/package.json", "ignored": true },
|
|
150
|
-
{ "path": "data/schema.sql", "ignored": false },
|
|
151
|
-
{ "path": "data/app.db", "ignored": true },
|
|
152
|
-
{ "path": "examples/dist/bundle.zip", "ignored": false },
|
|
153
|
-
{ "path": "dist/bundle.zip", "ignored": true },
|
|
154
|
-
{ "path": "other/dist/bundle.zip", "ignored": true }
|
|
155
|
-
]
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"name": "a folder brought back, with one file in it left out again",
|
|
159
|
-
"wdignore": "!.well-known/\n.well-known/private.txt\n",
|
|
160
|
-
"paths": [
|
|
161
|
-
{ "path": ".well-known/security.txt", "ignored": false },
|
|
162
|
-
{ "path": ".well-known/private.txt", "ignored": true }
|
|
163
|
-
]
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"name": "a file can't be brought back while its folder is left out (the .gitignore rule)",
|
|
167
|
-
"wdignore": "!.well-known/security.txt\n",
|
|
168
|
-
"paths": [
|
|
169
|
-
{ "path": ".well-known/security.txt", "ignored": true },
|
|
170
|
-
{ "path": ".well-known", "directory": true, "ignored": true }
|
|
171
|
-
]
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"name": "the locked exclusions can't be brought back",
|
|
175
|
-
"wdignore": "!.env\n!.env.*\n!*.pem\n!*.key\n!*.p12\n!*.pfx\n!.git/\n!.npmrc\n!id_rsa*\n!id_ed25519*\n!*\n",
|
|
176
|
-
"paths": [
|
|
177
|
-
{ "path": ".env", "ignored": true },
|
|
178
|
-
{ "path": ".env.example", "ignored": true },
|
|
179
|
-
{ "path": "certs/server.pem", "ignored": true },
|
|
180
|
-
{ "path": "private.key", "ignored": true },
|
|
181
|
-
{ "path": "store.p12", "ignored": true },
|
|
182
|
-
{ "path": "store.pfx", "ignored": true },
|
|
183
|
-
{ "path": ".git/HEAD", "ignored": true },
|
|
184
|
-
{ "path": ".npmrc", "ignored": true },
|
|
185
|
-
{ "path": "id_rsa.pub", "ignored": true },
|
|
186
|
-
{ "path": "keys/id_ed25519", "ignored": true },
|
|
187
|
-
{ "path": "public/.env", "ignored": true },
|
|
188
|
-
{ "path": "public/server.key", "ignored": true },
|
|
189
|
-
{ "path": "package.json", "ignored": false },
|
|
190
|
-
{ "path": ".gitignore", "ignored": false },
|
|
191
|
-
{ "path": "data/dump.sql", "ignored": false }
|
|
192
|
-
]
|
|
193
|
-
}
|
|
194
|
-
]
|
|
195
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"description": "Test cases for @writedocs/generator/wdignore. For each case: createWdignore(case.wdignore).ignores(path, directory === true) must equal `ignored` for every entry in `paths`. Paths are POSIX, relative to the project root. The generator's own tests (scripts/wdignore.test.js) run this file; any other implementation of the rules should too.",
|
|
3
|
+
"cases": [
|
|
4
|
+
{
|
|
5
|
+
"name": "default exclusions, no .wdignore",
|
|
6
|
+
"wdignore": "",
|
|
7
|
+
"paths": [
|
|
8
|
+
{ "path": ".env", "ignored": true },
|
|
9
|
+
{ "path": ".env.local", "ignored": true },
|
|
10
|
+
{ "path": ".env.example", "ignored": true },
|
|
11
|
+
{ "path": "docs/.env", "ignored": true },
|
|
12
|
+
{ "path": ".git/config", "ignored": true },
|
|
13
|
+
{ "path": ".git", "directory": true, "ignored": true },
|
|
14
|
+
{ "path": ".gitignore", "ignored": true },
|
|
15
|
+
{ "path": ".gitmodules", "ignored": true },
|
|
16
|
+
{ "path": ".gitattributes", "ignored": true },
|
|
17
|
+
{ "path": ".github/workflows/ci.yml", "ignored": true },
|
|
18
|
+
{ "path": ".github", "directory": true, "ignored": true },
|
|
19
|
+
{ "path": ".vscode/settings.json", "ignored": true },
|
|
20
|
+
{ "path": ".DS_Store", "ignored": true },
|
|
21
|
+
{ "path": "docs/.DS_Store", "ignored": true },
|
|
22
|
+
{ "path": "docs/.drafts/plan.pdf", "ignored": true },
|
|
23
|
+
{ "path": ".npmrc", "ignored": true },
|
|
24
|
+
{ "path": ".wdignore", "ignored": true },
|
|
25
|
+
{ "path": ".mintignore", "ignored": true },
|
|
26
|
+
{ "path": ".writedocs/asset-dimensions.json", "ignored": true },
|
|
27
|
+
{ "path": ".writedocs", "directory": true, "ignored": true },
|
|
28
|
+
{ "path": "package.json", "ignored": true },
|
|
29
|
+
{ "path": "examples/package.json", "ignored": true },
|
|
30
|
+
{ "path": "package-lock.json", "ignored": true },
|
|
31
|
+
{ "path": "yarn.lock", "ignored": true },
|
|
32
|
+
{ "path": "pnpm-lock.yaml", "ignored": true },
|
|
33
|
+
{ "path": "bun.lockb", "ignored": true },
|
|
34
|
+
{ "path": "bun.lock", "ignored": true },
|
|
35
|
+
{ "path": "composer.json", "ignored": true },
|
|
36
|
+
{ "path": "composer.lock", "ignored": true },
|
|
37
|
+
{ "path": "node_modules/pkg/index.js", "ignored": true },
|
|
38
|
+
{ "path": "node_modules", "directory": true, "ignored": true },
|
|
39
|
+
{ "path": "examples/app/node_modules/x/a.json", "ignored": true },
|
|
40
|
+
{ "path": "dist/index.html", "ignored": true },
|
|
41
|
+
{ "path": "dist", "directory": true, "ignored": true },
|
|
42
|
+
{ "path": "examples/dist/app.zip", "ignored": true },
|
|
43
|
+
{ "path": "dist", "ignored": false },
|
|
44
|
+
{ "path": "tsconfig.json", "ignored": true },
|
|
45
|
+
{ "path": "jsconfig.json", "ignored": true },
|
|
46
|
+
{ "path": "vercel.json", "ignored": true },
|
|
47
|
+
{ "path": "netlify.json", "ignored": true },
|
|
48
|
+
{ "path": "netlify.toml", "ignored": true },
|
|
49
|
+
{ "path": "wrangler.json", "ignored": true },
|
|
50
|
+
{ "path": "wrangler.jsonc", "ignored": true },
|
|
51
|
+
{ "path": "wrangler.toml", "ignored": true },
|
|
52
|
+
{ "path": "Dockerfile", "ignored": true },
|
|
53
|
+
{ "path": "docker-compose.yml", "ignored": true },
|
|
54
|
+
{ "path": "docker-compose.prod.yaml", "ignored": true },
|
|
55
|
+
{ "path": "certs/server.pem", "ignored": true },
|
|
56
|
+
{ "path": "private.key", "ignored": true },
|
|
57
|
+
{ "path": "store.p12", "ignored": true },
|
|
58
|
+
{ "path": "store.pfx", "ignored": true },
|
|
59
|
+
{ "path": "id_rsa", "ignored": true },
|
|
60
|
+
{ "path": "id_rsa.pub", "ignored": true },
|
|
61
|
+
{ "path": "keys/id_dsa", "ignored": true },
|
|
62
|
+
{ "path": "keys/id_ecdsa", "ignored": true },
|
|
63
|
+
{ "path": "keys/id_ed25519", "ignored": true },
|
|
64
|
+
{ "path": "certs/site.crt", "ignored": true },
|
|
65
|
+
{ "path": "android/release.jks", "ignored": true },
|
|
66
|
+
{ "path": "android/release.keystore", "ignored": true },
|
|
67
|
+
{ "path": "data/app.sqlite", "ignored": true },
|
|
68
|
+
{ "path": "data/app.sqlite3", "ignored": true },
|
|
69
|
+
{ "path": "data/app.db", "ignored": true },
|
|
70
|
+
{ "path": "data/dump.sql", "ignored": true },
|
|
71
|
+
{ "path": "debug.log", "ignored": true },
|
|
72
|
+
{ "path": "Package.JSON", "ignored": true },
|
|
73
|
+
{ "path": "certs/SERVER.PEM", "ignored": true },
|
|
74
|
+
|
|
75
|
+
{ "path": "writedocs.json", "ignored": false },
|
|
76
|
+
{ "path": "docs/intro.mdx", "ignored": false },
|
|
77
|
+
{ "path": "docs", "directory": true, "ignored": false },
|
|
78
|
+
{ "path": "images/hero.png", "ignored": false },
|
|
79
|
+
{ "path": "data/rates.json", "ignored": false },
|
|
80
|
+
{ "path": "docs/guides/export.csv", "ignored": false },
|
|
81
|
+
{ "path": "files/terms.pdf", "ignored": false },
|
|
82
|
+
{ "path": "robots.txt", "ignored": false },
|
|
83
|
+
{ "path": "openapi/api.yaml", "ignored": false },
|
|
84
|
+
{ "path": "snippets/Chart.jsx", "ignored": false },
|
|
85
|
+
{ "path": "theme.css", "ignored": false },
|
|
86
|
+
{ "path": "distribution/notes.txt", "ignored": false },
|
|
87
|
+
{ "path": "docs/environment.txt", "ignored": false },
|
|
88
|
+
{ "path": "docs/keys.txt", "ignored": false },
|
|
89
|
+
{ "path": "docs/package.json.txt", "ignored": false },
|
|
90
|
+
|
|
91
|
+
{ "path": "public/images/logo.svg", "ignored": false },
|
|
92
|
+
{ "path": "public", "directory": true, "ignored": false },
|
|
93
|
+
{ "path": "public/.well-known/security.txt", "ignored": false },
|
|
94
|
+
{ "path": "public/package.json", "ignored": false },
|
|
95
|
+
{ "path": "public/data/dump.sql", "ignored": false },
|
|
96
|
+
{ "path": "public/.env", "ignored": true },
|
|
97
|
+
{ "path": "public/server.key", "ignored": true },
|
|
98
|
+
{ "path": "public/.git/config", "ignored": true },
|
|
99
|
+
{ "path": "public/.npmrc", "ignored": true },
|
|
100
|
+
|
|
101
|
+
{ "path": "", "ignored": true },
|
|
102
|
+
{ "path": "../secret.txt", "ignored": true },
|
|
103
|
+
{ "path": "a/../b.txt", "ignored": true },
|
|
104
|
+
{ "path": "./a.txt", "ignored": true },
|
|
105
|
+
{ "path": "/abs/a.txt", "ignored": true },
|
|
106
|
+
{ "path": "a\\b.txt", "ignored": true }
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "a .wdignore with folder patterns, an anchored pattern, a wildcard and a negation",
|
|
111
|
+
"wdignore": "# drafts and internal data\ndrafts/\n/internal\n\n*.csv\n!docs/public-data/*.csv\n",
|
|
112
|
+
"paths": [
|
|
113
|
+
{ "path": "drafts/a.mdx", "ignored": true },
|
|
114
|
+
{ "path": "drafts", "directory": true, "ignored": true },
|
|
115
|
+
{ "path": "docs/drafts/b.mdx", "ignored": true },
|
|
116
|
+
{ "path": "drafts", "ignored": false },
|
|
117
|
+
{ "path": "internal/x.pdf", "ignored": true },
|
|
118
|
+
{ "path": "docs/internal/x.pdf", "ignored": false },
|
|
119
|
+
{ "path": "data/a.csv", "ignored": true },
|
|
120
|
+
{ "path": "docs/public-data/rates.csv", "ignored": false },
|
|
121
|
+
{ "path": "docs/public-data/deep/x.csv", "ignored": true },
|
|
122
|
+
{ "path": "docs/a.mdx", "ignored": false },
|
|
123
|
+
{ "path": "images/hero.png", "ignored": false },
|
|
124
|
+
{ "path": "public/files/list.csv", "ignored": true },
|
|
125
|
+
{ "path": "public/drafts/a.png", "ignored": true },
|
|
126
|
+
{ "path": "package.json", "ignored": true },
|
|
127
|
+
{ "path": ".env", "ignored": true }
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "a .wdignore with CRLF line endings and a byte order mark",
|
|
132
|
+
"wdignore": "\uFEFFdrafts/\r\n*.csv\r\n",
|
|
133
|
+
"paths": [
|
|
134
|
+
{ "path": "drafts/a.mdx", "ignored": true },
|
|
135
|
+
{ "path": "data/a.csv", "ignored": true },
|
|
136
|
+
{ "path": "docs/a.mdx", "ignored": false }
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "default exclusions brought back with !",
|
|
141
|
+
"wdignore": "!.well-known/\n!examples/package.json\n!*.sql\n!examples/dist/\n",
|
|
142
|
+
"paths": [
|
|
143
|
+
{ "path": ".well-known/security.txt", "ignored": false },
|
|
144
|
+
{ "path": ".well-known", "directory": true, "ignored": false },
|
|
145
|
+
{ "path": ".github/workflows/ci.yml", "ignored": true },
|
|
146
|
+
{ "path": ".gitignore", "ignored": true },
|
|
147
|
+
{ "path": "examples/package.json", "ignored": false },
|
|
148
|
+
{ "path": "package.json", "ignored": true },
|
|
149
|
+
{ "path": "other/package.json", "ignored": true },
|
|
150
|
+
{ "path": "data/schema.sql", "ignored": false },
|
|
151
|
+
{ "path": "data/app.db", "ignored": true },
|
|
152
|
+
{ "path": "examples/dist/bundle.zip", "ignored": false },
|
|
153
|
+
{ "path": "dist/bundle.zip", "ignored": true },
|
|
154
|
+
{ "path": "other/dist/bundle.zip", "ignored": true }
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "a folder brought back, with one file in it left out again",
|
|
159
|
+
"wdignore": "!.well-known/\n.well-known/private.txt\n",
|
|
160
|
+
"paths": [
|
|
161
|
+
{ "path": ".well-known/security.txt", "ignored": false },
|
|
162
|
+
{ "path": ".well-known/private.txt", "ignored": true }
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "a file can't be brought back while its folder is left out (the .gitignore rule)",
|
|
167
|
+
"wdignore": "!.well-known/security.txt\n",
|
|
168
|
+
"paths": [
|
|
169
|
+
{ "path": ".well-known/security.txt", "ignored": true },
|
|
170
|
+
{ "path": ".well-known", "directory": true, "ignored": true }
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "the locked exclusions can't be brought back",
|
|
175
|
+
"wdignore": "!.env\n!.env.*\n!*.pem\n!*.key\n!*.p12\n!*.pfx\n!.git/\n!.npmrc\n!id_rsa*\n!id_ed25519*\n!*\n",
|
|
176
|
+
"paths": [
|
|
177
|
+
{ "path": ".env", "ignored": true },
|
|
178
|
+
{ "path": ".env.example", "ignored": true },
|
|
179
|
+
{ "path": "certs/server.pem", "ignored": true },
|
|
180
|
+
{ "path": "private.key", "ignored": true },
|
|
181
|
+
{ "path": "store.p12", "ignored": true },
|
|
182
|
+
{ "path": "store.pfx", "ignored": true },
|
|
183
|
+
{ "path": ".git/HEAD", "ignored": true },
|
|
184
|
+
{ "path": ".npmrc", "ignored": true },
|
|
185
|
+
{ "path": "id_rsa.pub", "ignored": true },
|
|
186
|
+
{ "path": "keys/id_ed25519", "ignored": true },
|
|
187
|
+
{ "path": "public/.env", "ignored": true },
|
|
188
|
+
{ "path": "public/server.key", "ignored": true },
|
|
189
|
+
{ "path": "package.json", "ignored": false },
|
|
190
|
+
{ "path": ".gitignore", "ignored": false },
|
|
191
|
+
{ "path": "data/dump.sql", "ignored": false }
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
}
|