-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for frontend v2 for nuxt #1345
Conversation
@@ -105,6 +105,7 @@ export async function getAllFilesFromCurrentPath( | |||
export async function zipDirectory( | |||
sourceDir: string, | |||
outPath: string, | |||
includeHiddenFiles: boolean = false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be true
by default.
So before this change dot: true
, hence all of the previous method calls assume that hidden files will be included by default, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't matter. I changed in all places where this is used. The default value is for future usage and I think false is a more safe default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's okay to let it be false, but can you also update the following references:
https://github.com/Genez-io/genezio/blob/dev/src/commands/bundle.ts#L117
https://github.com/Genez-io/genezio/blob/dev/src/bundlers/dart/dartBundler.ts#L214
const presignedUrlForProjectCode = await getPresignedURLForProjectCodePush(region, name, stage); | ||
return uploadContentToS3( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should clean tmpFolderProject
here with something like:
await deleteFolder(path.dirname(tmpFolderProject));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All temporary folders are already deleted at process exit:
Line 40 in a5e3ea5
await deleteFolder(temporaryFolder).catch((error) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, disregard my comment
[ | ||
"**/node_modules/*", | ||
"./node_modules/*", | ||
"node_modules/*", | ||
"**/node_modules", | ||
"./node_modules", | ||
"node_modules", | ||
"node_modules/**", | ||
"**/node_modules/**", | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that the exclusion list is smaller than it was before refactoring.
I believe we are adding the .git
directory and any other temporary directories used by vercel, opennnext in the zip.
Is this something we want?
I think we should at least keep ignoring the .git
related stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All dot files and folders are ignored. That's why I did the change with zipDirectory
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
presignedUrlForProjectCode, | ||
path.join(tmpFolderProject, "projectCode.zip"), | ||
); | ||
await uploadUserCode(configuration.name, configuration.region, options.stage); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this refactoring! It was DEFINITELY needed.
const presignedUrlForProjectCode = await getPresignedURLForProjectCodePush(region, name, stage); | ||
return uploadContentToS3( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All temporary folders are already deleted at process exit:
Line 40 in a5e3ea5
await deleteFolder(temporaryFolder).catch((error) => { |
return; | ||
} | ||
|
||
const paths: CreateFrontendV2Path[] = files.map((file) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if there are more than 250 files? π₯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cry. I'll add a task for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM π¦
Pull Request Template
Type of change
Description
Add CDN support for Nuxt.
Checklist