-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from p10ns11y/fix-bundling-and-make-utils-isomo…
…rphic fix: Bundling and make utils isomorphic
- Loading branch information
Showing
18 changed files
with
681 additions
and
149 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ | |
|
||
build | ||
|
||
ssr-build | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,10 +1,12 @@ | ||
export { | ||
getDereferencedOpenAPIDocument, | ||
// Features such as max, min, minLength, maxLength, pattern are missing | ||
openAPISchemaToZod as simple_OpenAPISchemaToZod, | ||
zodToOpenAPISchema as simple_ZodToOpenAPISchema, | ||
openAPISchemaToZod as partial_OpenAPISchemaToZod, | ||
zodToOpenAPISchema as partial_ZodToOpenAPISchema, | ||
openAPISchemaToZod as incomplete_OpenAPISchemaToZod, | ||
zodToOpenAPISchema as incomplete_ZodToOpenAPISchema, | ||
// Check: https://github.com/StefanTerdell/json-schema-to-zod | ||
// And zod-to-json-schema | ||
openAPISchemaToZod as simple_openAPISchemaToZod, | ||
openAPISchemaToZod as incomplete_openAPISchemaToZod, | ||
openAPISchemaToZod as partial_openAPISchemaToZod, | ||
zodToOpenAPISchema as simple_zodToOpenAPISchema, | ||
zodToOpenAPISchema as incomplete_zodToOpenAPISchema, | ||
zodToOpenAPISchema as partial_zodToOpenAPISchema, | ||
} from './openapi'; |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import yaml from 'js-yaml'; | ||
|
||
export async function getYamlContent(fileURL: string, relativePath: string) { | ||
let fs = await import('node:fs'); | ||
let path = await import('node:path'); | ||
let { fileURLToPath } = await import('node:url'); | ||
let { dirname } = path; | ||
let fileURLPath = fileURLToPath(fileURL); | ||
let callerDirectoryName = dirname(fileURLPath); | ||
let yamlFilePath = path.resolve(callerDirectoryName, relativePath); | ||
let openapiDocument = yaml.load( | ||
fs.readFileSync(yamlFilePath, 'utf8') | ||
) as string; | ||
|
||
return openapiDocument; | ||
} |
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.