@openworkers/adapter-static 0.1.5 → 0.1.6

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 CHANGED
@@ -70,10 +70,10 @@ Assets with hashed filenames are served with long cache headers (`max-age=315360
70
70
 
71
71
  Auto-detected patterns:
72
72
 
73
- - `/_app/immutable/*` — SvelteKit
74
- - `/assets/*` — Vite
75
- - `/_next/static/*` — Next.js
76
- - `/_astro/*` — Astro
73
+ - `/_app/immutable/**` — SvelteKit
74
+ - `/assets/**` — Vite
75
+ - `/_next/static/**` — Next.js
76
+ - `/_astro/**` — Astro
77
77
 
78
78
  ## Deploy to OpenWorkers
79
79
 
package/bin/cli.js CHANGED
@@ -64,7 +64,7 @@ Options:
64
64
  -o, --out <dir> Output directory (default: dist-openworkers)
65
65
  -m, --mode <mode> Routing mode: 'directory' or 'flat' (default: auto-detect)
66
66
  -f, --fallback <f> SPA fallback file (e.g., /index.html or /200.html)
67
- --immutable <p> Comma-separated immutable patterns (e.g., /assets/*,/_app/*)
67
+ --immutable <p> Comma-separated immutable patterns (e.g., /assets/**,/_app/**)
68
68
  -h, --help Show this help message
69
69
  -v, --version Show version
70
70
 
package/files/worker.js CHANGED
@@ -461,8 +461,8 @@ var index_lite_default = new Mime_default(standard_default)._freeze();
461
461
  import routes from "ROUTES";
462
462
  function isImmutable(pathname) {
463
463
  for (const pattern of routes.immutable) {
464
- if (pattern.endsWith("/*")) {
465
- const prefix = pattern.slice(0, -1);
464
+ if (pattern.endsWith("/**") || pattern.endsWith("/*")) {
465
+ const prefix = pattern.endsWith("/**") ? pattern.slice(0, -2) : pattern.slice(0, -1);
466
466
  if (pathname.startsWith(prefix)) {
467
467
  return true;
468
468
  }
package/index.d.ts CHANGED
@@ -29,7 +29,7 @@ export interface AdapterOptions {
29
29
  /**
30
30
  * Glob patterns for immutable assets (hashed filenames)
31
31
  * These files get long cache headers
32
- * @default auto-detected (/_app/immutable/*, /assets/*, etc.)
32
+ * @default auto-detected (/_app/immutable/**, /assets/**, etc.)
33
33
  */
34
34
  immutable?: string[];
35
35
  }
package/index.js CHANGED
@@ -158,7 +158,7 @@ function detectImmutable(dir) {
158
158
 
159
159
  for (const pattern of commonImmutable) {
160
160
  if (existsSync(join(dir, pattern))) {
161
- patterns.push(`/${pattern}/*`);
161
+ patterns.push(`/${pattern}/**`);
162
162
  }
163
163
  }
164
164
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openworkers/adapter-static",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Static site adapter for OpenWorkers",
5
5
  "keywords": [
6
6
  "adapter",