rootless-config 1.4.1 → 1.4.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rootless-config",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Store project config files outside the project root, auto-deploy them where tools expect them.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,8 +17,8 @@ function validateConfig(rawConfig) {
17
17
  errors.push(new ValidationError('"containerPath" must be a string', 'containerPath'))
18
18
  }
19
19
 
20
- if (rawConfig.mode !== undefined && !['proxy', 'copy'].includes(rawConfig.mode)) {
21
- errors.push(new ValidationError('"mode" must be "proxy" or "copy"', 'mode'))
20
+ if (rawConfig.mode !== undefined && !['proxy', 'copy', 'clean'].includes(rawConfig.mode)) {
21
+ errors.push(new ValidationError('"mode" must be "proxy", "copy", or "clean"', 'mode'))
22
22
  }
23
23
 
24
24
  if (rawConfig.plugins !== undefined && !Array.isArray(rawConfig.plugins)) {
@@ -287,6 +287,18 @@ const WEB_ASSET_PATTERNS = [
287
287
  /^health\.json$/,
288
288
  /^_redirects$/,
289
289
  /^_headers$/,
290
+ // Generic web pages served from root (GitHub Pages, static sites)
291
+ /\.html?$/,
292
+ /\.php$/,
293
+ /\.md$/,
294
+ // Scripts that must run from root
295
+ /\.ps1$/,
296
+ /\.sh$/,
297
+ /\.(bat|cmd)$/,
298
+ // GitHub Pages markers
299
+ /^\.nojekyll$/,
300
+ /^CNAME$/i,
301
+ /^CXNAME$/i,
290
302
  ]
291
303
 
292
304
  /**
@@ -342,7 +354,6 @@ function isRootRequired(filename) {
342
354
  if (NEVER_MIGRATE.has(filename)) return false
343
355
  if (ROOT_REQUIRED_FILES.has(filename)) return true
344
356
  if (ROOT_REQUIRED_PATTERNS.some(p => p.test(filename))) return true
345
- if (!isPatchable(filename)) return true // unknown file → safe default: copy to root
346
357
  return false
347
358
  }
348
359