fusion-framework 2.0.0 → 2.0.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.
Binary file
Binary file
Binary file
Binary file
package/index.js CHANGED
@@ -135,7 +135,7 @@ header.fingerprint = () =>
135
135
  : {
136
136
  'X-Powered-By': 'Fusion Framework',
137
137
  'X-Framework': 'Fusion',
138
- ['X-Fusion-Version']: '2.0.0',
138
+ ['X-Fusion-Version']: '2.0.1',
139
139
  }
140
140
 
141
141
  function isThenable(value) {
@@ -1667,6 +1667,15 @@ function snapshotMtimes(files) {
1667
1667
  return map
1668
1668
  }
1669
1669
 
1670
+ /**
1671
+ * Argv for the reload child process.
1672
+ * Forwards `execArgv` so loaders like tsx (`--import` / `--require`) survive
1673
+ * `spawn(process.execPath, …)` — unlike `fork()`, spawn does not inherit them.
1674
+ */
1675
+ function reloadChildArgv(execArgv = process.execArgv, argv = process.argv) {
1676
+ return [...execArgv, ...argv.slice(1)]
1677
+ }
1678
+
1670
1679
  async function runWithReloader({ watchDirs } = {}) {
1671
1680
  const roots = watchDirs?.length ? watchDirs : [process.cwd()]
1672
1681
  console.log(`fusion: reload enabled (watching ${roots.join(', ')})`)
@@ -1674,7 +1683,7 @@ async function runWithReloader({ watchDirs } = {}) {
1674
1683
  let child = null
1675
1684
  const spawnChild = () => {
1676
1685
  const env = { ...process.env, FUSION_RELOAD_CHILD: '1' }
1677
- child = spawn(process.execPath, process.argv.slice(1), {
1686
+ child = spawn(process.execPath, reloadChildArgv(), {
1678
1687
  env,
1679
1688
  stdio: 'inherit',
1680
1689
  })
@@ -1989,6 +1998,7 @@ module.exports = {
1989
1998
  openapiSpec,
1990
1999
  routeVersions,
1991
2000
  hasUnversionedRoutes,
2001
+ reloadChildArgv,
1992
2002
  getHttpMethods: () => HTTP_METHODS,
1993
2003
  apiResourceNameJs: native.apiResourceNameJs,
1994
2004
  resolveRoutePathJs: native.resolveRoutePathJs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fusion-framework",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Class-based HTTP framework for Node.js, powered by a shared Rust core via N-API",
5
5
  "keywords": [
6
6
  "fusion",