Add necessary ids for initial import to metadata json. #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for adding my save as multiple files feature. I am going to hopefully get a lot of good use out of this plugin now. The only issue I have now is that the refactored code removed the part of the export where we save the ids for the base environment, api spec, and workspace. These are needed in order to load the meta.json as a design document, then loading the rest of the changes as the multiple files via the plugin. If these ids don't exist on the intial file import into insomnia:
This update will save the required base ids without their corresponding data making the import from file possible without breaking anything. Removing the content, data, and datapropertyorders is simply there to prevent extra unnecessary merge conflicts. Those properties are still saved, but in their corresponding file.
New format with ids and metadata for meta.json
{ "_type": "export", "__export_format": 4, "__export_date": "2023-03-21T15:20:09.622Z", "__export_source": "insomnia.desktop.app:v2023.1.0-beta.5", "resources": [ { "_id": "wrk_ee8098de4703424290a77216e055073f", "parentId": null, "modified": 1673459402110, "created": 1673459402110, "name": "Example.yaml", "description": "", "scope": "design", "_type": "workspace" }, { "_id": "env_103b2540f3eee6d74caaa227f79c70792ef3a879", "parentId": "wrk_ee8098de4703424290a77216e055073f", "modified": 1673459402113, "created": 1673459402113, "name": "Base Environment", "data": {}, "dataPropertyOrder": {}, "color": null, "isPrivate": false, "metaSortKey": 1673459402113, "_type": "environment" }, { "_id": "spc_80895865a0054444b354c73691eddfa4", "parentId": "wrk_ee8098de4703424290a77216e055073f", "modified": 1673459402110, "created": 1673459402110, "fileName": "Example", "contents": "", "contentType": "yaml", "_type": "api_spec" } ] }