@jayfong/x-server 2.2.0 → 2.2.1

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.
@@ -1,2 +1,2 @@
1
- // @index(['../../src/crons/**/*.ts', '!**/_*'], (f, _) => `import '${f.path}'`)
1
+ // @index(['../../src/crons/**/*.ts', '!**/_*', '!**/_*/**'], (f, _) => `import '${f.path}'`)
2
2
  // @endindex
@@ -1,3 +1,3 @@
1
- // @index(['../../src/handlers/**/*.ts', '!**/_*'], (f, _) => `export * as __${_.pascal(f.path.replace('/src/handlers/', ''))}__ from '${f.path}'`)
1
+ // @index(['../../src/handlers/**/*.ts', '!**/_*', '!**/_*/**'], (f, _) => `export * as __${_.pascal(f.path.replace('/src/handlers/', ''))}__ from '${f.path}'`)
2
2
 
3
3
  // @endindex
@@ -1,2 +1,2 @@
1
- // @index(['../../src/hooks/**/*.ts', '!**/_*'], (f, _) => `import '${f.path}'`)
1
+ // @index(['../../src/hooks/**/*.ts', '!**/_*', '!**/_*/**'], (f, _) => `import '${f.path}'`)
2
2
  // @endindex
@@ -2,7 +2,7 @@ import * as handlers from './handlers'
2
2
  import { Handler, XServer } from '@jayfong/x-server'
3
3
 
4
4
  const basePathWithHandlers: Array<[string, Record<string, Handler>]> = [
5
- // @index(['../../src/handlers/**/*.ts', '!**/_*'], (f, _) => `['${(f.path+'/').replace('../../src/handlers/', '/').replace(/\/index\/$/, '/').split('/').map(v => _.snake(v)).join('/')}', handlers.__${_.pascal(f.path.replace('/src/handlers/', ''))}__ as any],`)
5
+ // @index(['../../src/handlers/**/*.ts', '!**/_*', '!**/_*/**'], (f, _) => `['${(f.path+'/').replace('../../src/handlers/', '/').replace(/\/index\/$/, '/').split('/').map(v => _.snake(v)).join('/')}', handlers.__${_.pascal(f.path.replace('/src/handlers/', ''))}__ as any],`)
6
6
  // @endindex
7
7
  ]
8
8
 
@@ -13,7 +13,7 @@ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
13
13
  ? I
14
14
  : never
15
15
  type RouteMap = {
16
- // @index(['../../src/handlers/**/*.ts', '!**/_*'], (f, _) => `'${(f.path+'/').replace('../../src/handlers/', '/').replace(/\/index\/$/, '/').split('/').map(v => _.snake(v)).join('/')}': typeof handlers.__${_.pascal(f.path.replace('/src/handlers/', ''))}__,`)
16
+ // @index(['../../src/handlers/**/*.ts', '!**/_*', '!**/_*/**'], (f, _) => `'${(f.path+'/').replace('../../src/handlers/', '/').replace(/\/index\/$/, '/').split('/').map(v => _.snake(v)).join('/')}': typeof handlers.__${_.pascal(f.path.replace('/src/handlers/', ''))}__,`)
17
17
  // @endindex
18
18
  }
19
19
  export type HandlerMap = UnionToIntersection<
@@ -1,2 +1,2 @@
1
- // @index(['../../src/crons/**/*.ts', '!**/_*'], (f, _) => `import '${f.path}'`)
1
+ // @index(['../../src/crons/**/*.ts', '!**/_*', '!**/_*/**'], (f, _) => `import '${f.path}'`)
2
2
  // @endindex
@@ -1,3 +1,3 @@
1
- // @index(['../../src/handlers/**/*.ts', '!**/_*'], (f, _) => `export * as __${_.pascal(f.path.replace('/src/handlers/', ''))}__ from '${f.path}'`)
1
+ // @index(['../../src/handlers/**/*.ts', '!**/_*', '!**/_*/**'], (f, _) => `export * as __${_.pascal(f.path.replace('/src/handlers/', ''))}__ from '${f.path}'`)
2
2
 
3
3
  // @endindex
@@ -1,2 +1,2 @@
1
- // @index(['../../src/hooks/**/*.ts', '!**/_*'], (f, _) => `import '${f.path}'`)
1
+ // @index(['../../src/hooks/**/*.ts', '!**/_*', '!**/_*/**'], (f, _) => `import '${f.path}'`)
2
2
  // @endindex
@@ -2,7 +2,7 @@ import * as handlers from './handlers'
2
2
  import { Handler, XServer } from '@jayfong/x-server'
3
3
 
4
4
  const basePathWithHandlers: Array<[string, Record<string, Handler>]> = [
5
- // @index(['../../src/handlers/**/*.ts', '!**/_*'], (f, _) => `['${(f.path+'/').replace('../../src/handlers/', '/').replace(/\/index\/$/, '/').split('/').map(v => _.snake(v)).join('/')}', handlers.__${_.pascal(f.path.replace('/src/handlers/', ''))}__ as any],`)
5
+ // @index(['../../src/handlers/**/*.ts', '!**/_*', '!**/_*/**'], (f, _) => `['${(f.path+'/').replace('../../src/handlers/', '/').replace(/\/index\/$/, '/').split('/').map(v => _.snake(v)).join('/')}', handlers.__${_.pascal(f.path.replace('/src/handlers/', ''))}__ as any],`)
6
6
  // @endindex
7
7
  ]
8
8
 
@@ -13,7 +13,7 @@ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
13
13
  ? I
14
14
  : never
15
15
  type RouteMap = {
16
- // @index(['../../src/handlers/**/*.ts', '!**/_*'], (f, _) => `'${(f.path+'/').replace('../../src/handlers/', '/').replace(/\/index\/$/, '/').split('/').map(v => _.snake(v)).join('/')}': typeof handlers.__${_.pascal(f.path.replace('/src/handlers/', ''))}__,`)
16
+ // @index(['../../src/handlers/**/*.ts', '!**/_*', '!**/_*/**'], (f, _) => `'${(f.path+'/').replace('../../src/handlers/', '/').replace(/\/index\/$/, '/').split('/').map(v => _.snake(v)).join('/')}': typeof handlers.__${_.pascal(f.path.replace('/src/handlers/', ''))}__,`)
17
17
  // @endindex
18
18
  }
19
19
  export type HandlerMap = UnionToIntersection<
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayfong/x-server",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",