-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
breaking: move shared HTTP utils to the framework (#9402)
Fixes: FRMW-2728, FRMW-2729 After this PR gets merged the following middleware will be exported from the `@medusajs/framework/http` import path. - applyParamsAsFilters - clearFiltersByKey - applyDefaultFilters - setContext - getQueryConfig - httpCompression - maybeApplyLinkFilter - refetchEntities - unlessPath - validateBody - validateQuery Co-authored-by: Adrien de Peretti <[email protected]>
- Loading branch information
1 parent
193f934
commit 48e0016
Showing
557 changed files
with
2,368 additions
and
3,502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
export function getNodeVersion(): number { | ||
const [major] = process.versions.node.split('.').map(Number) | ||
const [major] = process.versions.node.split(".").map(Number) | ||
|
||
return major | ||
} | ||
|
||
export const MIN_SUPPORTED_NODE_VERSION = 20 | ||
export const MIN_SUPPORTED_NODE_VERSION = 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import pg from "pg" | ||
|
||
const { Client } = pg | ||
|
||
export const DEFAULT_HOST = "localhost" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 11 additions & 11 deletions
22
packages/cli/medusa-dev-cli/src/local-npm-registry/cleanup-tasks.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
const signalExit = require(`signal-exit`); | ||
const signalExit = require(`signal-exit`) | ||
|
||
const cleanupTasks = new Set(); | ||
const cleanupTasks = new Set() | ||
|
||
exports.registerCleanupTask = (taskFn) => { | ||
cleanupTasks.add(taskFn); | ||
cleanupTasks.add(taskFn) | ||
return () => { | ||
const result = taskFn(); | ||
cleanupTasks.delete(taskFn); | ||
return result; | ||
}; | ||
}; | ||
const result = taskFn() | ||
cleanupTasks.delete(taskFn) | ||
return result | ||
} | ||
} | ||
|
||
signalExit(() => { | ||
if (cleanupTasks.size) { | ||
console.log(`Process exitted in middle of publishing - cleaning up`); | ||
cleanupTasks.forEach((taskFn) => taskFn()); | ||
console.log(`Process exitted in middle of publishing - cleaning up`) | ||
cleanupTasks.forEach((taskFn) => taskFn()) | ||
} | ||
}); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
exports.getVersionInfo = () => { | ||
const { version: devCliVersion } = require(`../../package.json`); | ||
return `Medusa Dev CLI version: ${devCliVersion}`; | ||
}; | ||
const { version: devCliVersion } = require(`../../package.json`) | ||
return `Medusa Dev CLI version: ${devCliVersion}` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.