mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 13:25:19 +00:00
Merge branch 'fix/examples-node'
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"jsx": "react",
|
||||
"module": "Node16",
|
||||
"moduleResolution": "Node16",
|
||||
"types": ["@cloudflare/workers-types"],
|
||||
"types": ["@cloudflare/workers-types", "node"],
|
||||
"resolveJsonModule": true,
|
||||
"allowJs": true,
|
||||
"checkJs": false,
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
"@types/express": "5.0.0",
|
||||
"@types/express-serve-static-core": "^5.0.4",
|
||||
"tsx": "^4.19.2",
|
||||
"typescript": "^5.7.3"
|
||||
"typescript": "^5.7.3",
|
||||
"@types/node": "^20.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,11 +32,11 @@ export function removeHidden(from: Array<string>): Array<string> {
|
||||
async function readFileOrDirectory(filePath: string) {
|
||||
if ((await fs.lstat(filePath)).isDirectory()) {
|
||||
return Promise.all(await readDirectory(filePath));
|
||||
} else {
|
||||
return fs
|
||||
.readFile(filePath)
|
||||
.then((content) => getObjectFromModelFile(filePath, content, 1));
|
||||
}
|
||||
|
||||
const fileBuffer = await fs.readFile(filePath);
|
||||
|
||||
return getObjectFromModelFile(filePath, fileBuffer, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,7 @@ app.route("/scratch/:modelName").get(async (request, response) => {
|
||||
"../../models/exampleBooking.pass/icon.png",
|
||||
),
|
||||
),
|
||||
await getCertificates(),
|
||||
getCertificates(),
|
||||
]);
|
||||
|
||||
try {
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
"serverless-plugin-typescript": "^2.1.5",
|
||||
"serverless-s3-local": "^0.8.5",
|
||||
"typescript": "^5.7.3",
|
||||
"@types/node": "^18"
|
||||
"@types/node": "^20"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user