* sanitize all electron.shell.openExternal calls
* adds lint rule to disallow future usage of `openExternal`
* updates to use URL constructor per review feedback
* Prompt existing users about analytics
* Fix the tests
* Set hasPromptedAnalytics to true when going through the onboarding flow
* Add comments
* Show the analytics prompt after migrating if needed as well
* test: add a few more tests for analytics activity
Co-authored-by: Opender Singh <opender.singh@konghq.com>
* fix(import) do differential patching for design activity imports
This patch adds differential patching for imports that occur during the switching between
design and debug tabs inside of Designer. As reported through #2971, and others, this patch
favors existing data over imported data, values that exist already on the document will remain
unchanged, only new values (including array based values) will be added / removed.
This also includes a bypass feature for urls, currently these options are not exposed through
the interface but could be. This feature is an object to allow for future properties for
preference-based patching.
- Adds `options.enableDiffBasedPatching` and `options.enableDiffDeep` to `importRaw` for backwards compat.
- Adds `options.bypassDiffProps.url` for url bypassing and use an object for future items.
- Adds `diffPatchObj` based on differential patching for objects (works with arrays as well).
Future ideas:
- `hasBeenModifiedByUser` property map object to allow changing properties that haven't been touched by the user with options.
fixes: #2971, #2882, #3038, #2442
* adds some basic tests
- also adds jest (which was (mistakenly) not there before)
- does not call `.hasOwnProperty` directly, per https://eslint.org/docs/rules/no-prototype-builtins (which, we will add more formally at a later date)
* don't special-case workspaces
this ensures the behavior of the initial PR is more preserved
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
* feat: add prompt and update import logic
* feat: update usages and plugin api
* chore: WIP
* chore: convert to options
* chore: don't create workspace model until needed
* chore: add OR condition
* chore: add workspace name and don't change scope
* feat: prompt with appropriate name
* chore: rename
* chore: rename type
* chore: update signature
* chore: properly type the import functions
* feat: don't activate the workspace after importing
* chore: show loading on homepage
* fix: typo
* chore: fix tests and rename
* Update packages/insomnia-app/app/common/__tests__/import.test.js
Co-authored-by: David Marby <david@dmarby.se>
Co-authored-by: David Marby <david@dmarby.se>
The issue was located in the `exportHar` function. It was not handled `file` param correctly.
For this type of file, the `value` attribute is empty, therefore we should take instead the `fileName`
Closes#2282
* Initial commit
* WIP
* Fix lint
* Fix tests
* Add test for workspace migration
* Rename title to use fileName instead of workspace name for designer
* Linting
* Add breaking test
* Remove preferential ordering of tags over variables in nunjucks
* Remove preferential ordering of tags over variables in nunjucks
* simplify nunjucks sort
* Add breaking test for incorrect order
* Update json-order and consume
* Refine test with dataPropertyOrder
* Tests
* add note
* Add to test
* Missed the await