Skip to content
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

Git block remapper script #663

Merged
merged 7 commits into from
Oct 26, 2020
Merged

Git block remapper script #663

merged 7 commits into from
Oct 26, 2020

Conversation

freeqaz
Copy link
Collaborator

@freeqaz freeqaz commented Oct 24, 2020

The changes in the front-end folder are all re-organizing imports to avoid importing assets (css and png files). Webpack handles those files, and Typescript cannot.

Besides that, the actual "meat" of this PR is the tweak-uuids-git.ts file and is fairly straightfoward.

Most of the work was wrangling Typescript to work with the existing code setup (which leverage Webpack for module resolution) and refactoring imports to break the import chain away from the assets.

Otherwise, yeah, the tool to rewrite the Block UUIDs for a given Git project is very simple. We should figure out how we can fix this going forward in a cleaner way that doesn't require us manually checking out a customer Git repo and making a commit in it.

stdout, tmp = process_handler.communicate()
stdout, stderr = process_handler.communicate()
print("ngrok stdout: ", stdout)
print("ngrok stderr: ", stderr)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use logit here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a good point. I added these because I was trying to debug, and then I realized that they only print when there is an error. So I went ahead and left them. I can move to logit though!

@@ -329,11 +329,11 @@ export class EditLambdaBlock extends Vue implements EditBlockPaneProps {
max={inputProps.max}
min={inputProps.min}
step={inputProps.step}
{...inputProps}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this argument move?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumped up the version of Typescript and it found this was a bug (it was, kind of). I had to move this for the app to even compile.

const response = await importRawProjectJson(config.json, false);

// Attempt to make the project with a stupid and unique name.
if (response && response.code === 'PROJECT_NAME_EXISTS') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should 'PROJECT_NAME_EXISTS' be a global constant?

@freeqaz freeqaz merged commit 788a3ac into master Oct 26, 2020
@freeqaz freeqaz deleted the git-block-remapper-script branch October 26, 2020 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants