From 6f7da8f2844783fe827be653644d2fef7db98fec Mon Sep 17 00:00:00 2001 From: Dimitri Mitropoulos Date: Wed, 20 Oct 2021 13:19:22 -0400 Subject: [PATCH 01/14] hides ad in account tab when `disablePaidFeatureAds` is `true` (#4137) --- .../app/ui/components/settings/account.tsx | 36 +++++++++++++++---- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/packages/insomnia-app/app/ui/components/settings/account.tsx b/packages/insomnia-app/app/ui/components/settings/account.tsx index 0ccd5352d..75c1a7676 100644 --- a/packages/insomnia-app/app/ui/components/settings/account.tsx +++ b/packages/insomnia-app/app/ui/components/settings/account.tsx @@ -1,14 +1,21 @@ import { autoBindMethodsForReact } from 'class-autobind-decorator'; import React, { Fragment, PureComponent } from 'react'; +import { connect } from 'react-redux'; import * as session from '../../../account/session'; import { AUTOBIND_CFG } from '../../../common/constants'; +import { RootState } from '../../redux/modules'; +import { selectSettings } from '../../redux/selectors'; import { Link } from '../base/link'; import { PromptButton } from '../base/prompt-button'; import { HelpTooltip } from '../help-tooltip'; import { hideAllModals, showModal } from '../modals/index'; import { LoginModal } from '../modals/login-modal'; +type ReduxProps = ReturnType; + +type Props = ReduxProps; + interface State { code: string; password: string; @@ -20,7 +27,7 @@ interface State { } @autoBindMethodsForReact(AUTOBIND_CFG) -export class Account extends PureComponent<{}, State> { +class UnconnectedAccount extends PureComponent { state: State = { code: '', password: '', @@ -124,7 +131,19 @@ export class Account extends PureComponent<{}, State> { await this._sendCode(); } - static renderUpgrade() { + renderUpgrade() { + const { disablePaidFeatureAds } = this.props; + + const logInButton = ( + + Log In + + ); + + if (disablePaidFeatureAds) { + return logInButton; + } + return (
@@ -152,10 +171,7 @@ export class Account extends PureComponent<{}, State> {

- Or{' '} - - Log In - + Or{' '}{logInButton}

); @@ -258,6 +274,12 @@ export class Account extends PureComponent<{}, State> { } render() { - return session.isLoggedIn() ? this.renderAccount() : Account.renderUpgrade(); + return session.isLoggedIn() ? this.renderAccount() : this.renderUpgrade(); } } + +const mapStateToProps = (state: RootState) => ({ + disablePaidFeatureAds: selectSettings(state).disablePaidFeatureAds, +}); + +export const Account = connect(mapStateToProps)(UnconnectedAccount); From 382009e1cccaefe8424c6e064b6dcef3af1ff9ab Mon Sep 17 00:00:00 2001 From: Dimitri Mitropoulos Date: Wed, 20 Oct 2021 14:06:24 -0400 Subject: [PATCH 02/14] human readable errors for insomnia config validation (#4133) Co-authored-by: Opender Singh Co-authored-by: Opender Singh --- .../validate-insomnia-config.test.ts | 5 ++- .../app/common/validate-insomnia-config.ts | 16 ++++--- .../models/helpers/__tests__/settings.test.ts | 9 ++-- .../app/models/helpers/settings.ts | 37 ++++++++-------- packages/insomnia-config/package-lock.json | 43 +++++++++++-------- packages/insomnia-config/package.json | 4 +- packages/insomnia-config/src/entities.ts | 3 ++ packages/insomnia-config/src/index.ts | 3 ++ packages/insomnia-config/src/validate.ts | 15 ++++++- 9 files changed, 85 insertions(+), 50 deletions(-) diff --git a/packages/insomnia-app/app/common/__tests__/validate-insomnia-config.test.ts b/packages/insomnia-app/app/common/__tests__/validate-insomnia-config.test.ts index 5648acc93..bdf45139d 100644 --- a/packages/insomnia-app/app/common/__tests__/validate-insomnia-config.test.ts +++ b/packages/insomnia-app/app/common/__tests__/validate-insomnia-config.test.ts @@ -16,8 +16,9 @@ describe('validateInsomniaConfig', () => { const errorReturn = { error: { errors: [], - insomniaConfig: 'abc', - configPath: 'configPath', + humanReadableErrors: [], + insomniaConfig: '{ "mock": ["insomnia", "config"] }', + configPath: '/mock/insomnia/config/path', }, }; getConfigSettings.mockReturnValue(errorReturn); diff --git a/packages/insomnia-app/app/common/validate-insomnia-config.ts b/packages/insomnia-app/app/common/validate-insomnia-config.ts index 2ebfd4bb8..dd6b8adb0 100644 --- a/packages/insomnia-app/app/common/validate-insomnia-config.ts +++ b/packages/insomnia-app/app/common/validate-insomnia-config.ts @@ -1,5 +1,4 @@ import electron from 'electron'; -import { omit } from 'ramda'; import { getConfigSettings } from '../models/helpers/settings'; import { exitApp } from './electron-helpers'; @@ -7,17 +6,22 @@ import { exitApp } from './electron-helpers'; export const validateInsomniaConfig = () => { const configSettings = getConfigSettings(); if ('error' in configSettings) { - const errors = configSettings.error.errors?.map(omit(['parentSchema', 'data'])); + const errors = configSettings.error.humanReadableErrors?.map(({ message, path, suggestion }, index) => ([ + `[Error ${index + 1}]`, + `Path: ${path}`, + `${message}.${suggestion ? ` ${suggestion}` : ''}`, + ]).join('\n')).join('\n\n'); electron.dialog.showErrorBox('Invalid Insomnia Config', [ - `Invalid Insomnia Config found at "${configSettings.error.configPath}"`, + `Your Insomnia Config was found to be invalid. Please check the path below for the following error${configSettings.error.humanReadableErrors?.length > 1 ? 's' : ''}:`, '', - 'errors:', - `${JSON.stringify(errors, null, 2)}`, + '[Path]', + configSettings.error.configPath, + '', + errors, ].join('\n'), ); - exitApp(); } }; diff --git a/packages/insomnia-app/app/models/helpers/__tests__/settings.test.ts b/packages/insomnia-app/app/models/helpers/__tests__/settings.test.ts index 12292be24..bebdb69ad 100644 --- a/packages/insomnia-app/app/models/helpers/__tests__/settings.test.ts +++ b/packages/insomnia-app/app/models/helpers/__tests__/settings.test.ts @@ -50,7 +50,8 @@ describe('getConfigFile', () => { const result = getConfigFile(); - expect(result).toMatchObject({ configPath: 'portableExecutable' }); + expect(result.configPath).toContain('portableExecutable'); + expect(result.configPath).toContain('insomnia.config.json'); }); it('prioritizes insomnia data directory over local dev when portable config is not found', () => { @@ -60,7 +61,8 @@ describe('getConfigFile', () => { const result = getConfigFile(); - expect(result).toMatchObject({ configPath: 'insomniaDataDirectory' }); + expect(result.configPath).toContain('insomniaDataDirectory'); + expect(result.configPath).toContain('insomnia.config.json'); }); it('returns the local dev config file if no others are found', () => { @@ -71,7 +73,8 @@ describe('getConfigFile', () => { const result = getConfigFile(); - expect(result).toMatchObject({ configPath: 'localDev' }); + expect(result.configPath).toContain('localDev'); + expect(result.configPath).toContain('insomnia.config.json'); }); it('returns an internal fallback if no configs are found (in production mode)', () => { diff --git a/packages/insomnia-app/app/models/helpers/settings.ts b/packages/insomnia-app/app/models/helpers/settings.ts index fc4d70247..240ba3e29 100644 --- a/packages/insomnia-app/app/models/helpers/settings.ts +++ b/packages/insomnia-app/app/models/helpers/settings.ts @@ -1,6 +1,6 @@ import { readFileSync } from 'fs'; import { Settings } from 'insomnia-common'; -import { InsomniaConfig, validate, ValidationResult } from 'insomnia-config/dist'; +import { ErrorResult, INSOMNIA_CONFIG_FILENAME, InsomniaConfig, isErrorResult, validate } from 'insomnia-config/dist'; import { resolve } from 'path'; import { mapObjIndexed, once } from 'ramda'; import { omitBy } from 'ramda-adjunct'; @@ -17,8 +17,7 @@ export const readConfigFile = (filePath?: string) => { let fileContents = ''; try { - const resolvedFilePath = resolve(filePath, 'insomnia.config.json'); - fileContents = readFileSync(resolvedFilePath, 'utf-8'); + fileContents = readFileSync(filePath, 'utf-8'); } catch (error: unknown) { return undefined; } @@ -39,6 +38,10 @@ export const getLocalDevConfigFilePath = () => ( isDevelopment() ? '../../packages/insomnia-app/app' as string : undefined ); +const addConfigFileToPath = (path: string | undefined) => ( + path ? resolve(path, INSOMNIA_CONFIG_FILENAME) : undefined +); + export const getConfigFile = () => { const portableExecutable = getPortableExecutableDir(); const insomniaDataDirectory = getDataDirectory(); @@ -47,7 +50,7 @@ export const getConfigFile = () => { portableExecutable, insomniaDataDirectory, localDev, - ]; + ].map(addConfigFileToPath); // note: this is written as to avoid unnecessary (synchronous) reads from disk. // The paths above are in priority order such that if we already found what we're looking for, there's no reason to keep reading other files. @@ -71,7 +74,8 @@ interface ConfigError { error: { configPath?: string; insomniaConfig: unknown; - errors: ValidationResult['errors']; + errors: ErrorResult['errors']; + humanReadableErrors: ErrorResult['humanReadableErrors']; }; } @@ -83,22 +87,21 @@ interface ConfigError { export const getConfigSettings: () => (NonNullable | ConfigError) = once(() => { const { configPath, insomniaConfig } = getConfigFile(); - const { valid, errors } = validate(insomniaConfig as InsomniaConfig); - if (!valid) { - const resolvedConfigPath = resolve(configPath); - console.error('invalid insomnia config', { - configPath: resolvedConfigPath, + const validationResult = validate(insomniaConfig as InsomniaConfig); + + if (isErrorResult(validationResult)) { + const { errors, humanReadableErrors } = validationResult; + const error = { + configPath, insomniaConfig, errors, - }); - return { - error: { - configPath: resolvedConfigPath, - insomniaConfig, - errors, - }, + humanReadableErrors, }; + + console.error('invalid insomnia config', error); + return { error }; } + // This cast is important for testing intentionally bad values (the above validation will catch it, anyway) return (insomniaConfig as InsomniaConfig).settings || {}; }); diff --git a/packages/insomnia-config/package-lock.json b/packages/insomnia-config/package-lock.json index 7f2ea3a26..94c0a75dd 100644 --- a/packages/insomnia-config/package-lock.json +++ b/packages/insomnia-config/package-lock.json @@ -4,6 +4,16 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@apideck/better-ajv-errors": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@apideck/better-ajv-errors/-/better-ajv-errors-0.2.6.tgz", + "integrity": "sha512-FvGcbFUdbPLexAhdvihkroCA3LQa7kGMa8Qj9f32BiOcV1Thscg/QCxp/kJibsFrhUrlKOzd07uJFOGTN0/awQ==", + "requires": { + "json-schema": "^0.3.0", + "jsonpointer": "^4.1.0", + "leven": "^3.1.0" + } + }, "@babel/code-frame": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", @@ -885,7 +895,6 @@ "version": "8.6.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", - "dev": true, "requires": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -893,12 +902,6 @@ "uri-js": "^4.2.2" } }, - "ajv-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "dev": true - }, "ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -1809,8 +1812,7 @@ "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-json-stable-stringify": { "version": "2.1.0", @@ -3059,11 +3061,15 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, + "json-schema": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.3.0.tgz", + "integrity": "sha512-TYfxx36xfl52Rf1LU9HyWSLGPdYLL+SQ8/E/0yVyKG8wCCDaSrhPap0vEdlsZWRaS6tnKKLPGiEJGiREVC8kxQ==" + }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "json-stable-stringify": { "version": "1.0.1", @@ -3089,6 +3095,11 @@ "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", "dev": true }, + "jsonpointer": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.1.0.tgz", + "integrity": "sha512-CXcRvMyTlnR53xMcKnuMzfCA5i/nfblTnnr74CZb6C4vG39eu6w51t7nKmU5MfLfbTgGItliNyjO/ciNPDqClg==" + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -3104,8 +3115,7 @@ "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==" }, "levn": { "version": "0.3.0", @@ -3634,8 +3644,7 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "react-is": { "version": "17.0.2", @@ -3711,8 +3720,7 @@ "require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" }, "require-main-filename": { "version": "2.0.0", @@ -4596,7 +4604,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "requires": { "punycode": "^2.1.0" } diff --git a/packages/insomnia-config/package.json b/packages/insomnia-config/package.json index bd498df36..c9d6d6bcf 100644 --- a/packages/insomnia-config/package.json +++ b/packages/insomnia-config/package.json @@ -27,11 +27,11 @@ "build": "tsc --build tsconfig.build.json" }, "dependencies": { + "ajv": "^8.6.2", + "@apideck/better-ajv-errors": "^0.2.6", "insomnia-common": "2.3.3-alpha.4" }, "devDependencies": { - "ajv": "^8.6.2", - "ajv-errors": "^3.0.0", "jest": "^26.6.3", "ts-node": "^10.2.1", "typescript-json-schema": "^0.50.1" diff --git a/packages/insomnia-config/src/entities.ts b/packages/insomnia-config/src/entities.ts index 9d8af2157..712a24870 100644 --- a/packages/insomnia-config/src/entities.ts +++ b/packages/insomnia-config/src/entities.ts @@ -1,5 +1,8 @@ import { Settings } from 'insomnia-common'; +/** While, by design, there is presently no specific restriction in the validation that _requires_ that the file have a particular filename, this is the canonical name of the file that we use in all current use-cases. */ +export const INSOMNIA_CONFIG_FILENAME = 'insomnia.config.json'; + export type ConfigVersion = '1.0.0'; export type AllowedSettings = Partial { export interface ValidResult { valid: true; errors: null; - humanError: null; + humanReadableErrors: null; } export interface ErrorResult { valid: false; errors: ErrorObject[]; + humanReadableErrors: ValidationError[]; } export type ValidationResult = ValidResult | ErrorResult; +export const isValidResult = (result: ValidationResult): result is ValidResult => result.valid === true; +export const isErrorResult = (result: ValidationResult): result is ErrorResult => result.valid === false; + export const validate = (input: string | InsomniaConfig | unknown): ValidationResult => { const data = ingest(input); const validator = ajv.compile(schema); @@ -41,7 +46,7 @@ export const validate = (input: string | InsomniaConfig | unknown): ValidationRe const validResult: ValidResult = { valid: true, errors: null, - humanError: null, + humanReadableErrors: null, }; return validResult; } @@ -55,6 +60,12 @@ export const validate = (input: string | InsomniaConfig | unknown): ValidationRe const errorResult: ErrorResult = { valid: false, errors, + humanReadableErrors: betterAjvErrors({ + basePath: '', + data, + errors, + schema: (schema as BetterAjvErrorsOptions['schema']), + }), }; return errorResult; }; From 2a1a18c76976b0a94fd55d2d17940211debc2a2e Mon Sep 17 00:00:00 2001 From: Dimitri Mitropoulos Date: Wed, 20 Oct 2021 15:34:28 -0400 Subject: [PATCH 03/14] fails validation if the config has a parse error (#4139) --- .../validate-insomnia-config.test.ts | 21 +++++- .../app/common/validate-insomnia-config.ts | 47 +++++++++---- .../app/models/helpers/settings.ts | 67 ++++++++++++++++--- 3 files changed, 110 insertions(+), 25 deletions(-) diff --git a/packages/insomnia-app/app/common/__tests__/validate-insomnia-config.test.ts b/packages/insomnia-app/app/common/__tests__/validate-insomnia-config.test.ts index bdf45139d..a7c66ed20 100644 --- a/packages/insomnia-app/app/common/__tests__/validate-insomnia-config.test.ts +++ b/packages/insomnia-app/app/common/__tests__/validate-insomnia-config.test.ts @@ -11,7 +11,26 @@ const electronShowErrorBox = mocked(electron.dialog.showErrorBox); const getConfigSettings = mocked(_getConfigSettings); describe('validateInsomniaConfig', () => { - it('should show error box and exit if there is an error', () => { + it('should show error box and exit if there is a parse error', () => { + // Arrange + const errorReturn = { + error: { + syntaxError: new SyntaxError('mock syntax error'), + fileContents: '{ "mock": ["insomnia", "config"] }', + configPath: '/mock/insomnia/config/path', + }, + }; + getConfigSettings.mockReturnValue(errorReturn); + + // Act + validateInsomniaConfig(); + + // Assert + expect(electronShowErrorBox).toHaveBeenCalled(); + expect(electronAppExit).toHaveBeenCalled(); + }); + + it('should show error box and exit if there is a config error', () => { // Arrange const errorReturn = { error: { diff --git a/packages/insomnia-app/app/common/validate-insomnia-config.ts b/packages/insomnia-app/app/common/validate-insomnia-config.ts index dd6b8adb0..f66cac841 100644 --- a/packages/insomnia-app/app/common/validate-insomnia-config.ts +++ b/packages/insomnia-app/app/common/validate-insomnia-config.ts @@ -1,27 +1,48 @@ import electron from 'electron'; -import { getConfigSettings } from '../models/helpers/settings'; +import { getConfigSettings, isConfigError, isParseError } from '../models/helpers/settings'; import { exitApp } from './electron-helpers'; export const validateInsomniaConfig = () => { const configSettings = getConfigSettings(); - if ('error' in configSettings) { - const errors = configSettings.error.humanReadableErrors?.map(({ message, path, suggestion }, index) => ([ + + if (!('error' in configSettings)) { + return; + } + + if (isParseError(configSettings)) { + const { syntaxError, configPath } = configSettings.error; + electron.dialog.showErrorBox('Invalid Insomnia Config', [ + 'Failed to parse JSON file for Insomnia Config.', + '', + '[Path]', + configPath, + '', + '[Syntax Error]', + syntaxError.message, + ].join('\n')); + } else if (isConfigError(configSettings)) { + const { humanReadableErrors, configPath } = configSettings.error; + const errors = humanReadableErrors.map(({ message, path, suggestion }, index) => ([ `[Error ${index + 1}]`, `Path: ${path}`, `${message}.${suggestion ? ` ${suggestion}` : ''}`, ]).join('\n')).join('\n\n'); - electron.dialog.showErrorBox('Invalid Insomnia Config', - [ - `Your Insomnia Config was found to be invalid. Please check the path below for the following error${configSettings.error.humanReadableErrors?.length > 1 ? 's' : ''}:`, - '', - '[Path]', - configSettings.error.configPath, - '', - errors, - ].join('\n'), + electron.dialog.showErrorBox('Invalid Insomnia Config', [ + `Your Insomnia Config was found to be invalid. Please check the path below for the following error${configSettings.error.humanReadableErrors?.length > 1 ? 's' : ''}:`, + '', + '[Path]', + configPath, + '', + errors, + ].join('\n')); + } else { + electron.dialog.showErrorBox( + 'An unexpected error occured while parsing Insomnia Config', + JSON.stringify(configSettings), ); - exitApp(); } + + exitApp(); }; diff --git a/packages/insomnia-app/app/models/helpers/settings.ts b/packages/insomnia-app/app/models/helpers/settings.ts index 240ba3e29..9f61fc197 100644 --- a/packages/insomnia-app/app/models/helpers/settings.ts +++ b/packages/insomnia-app/app/models/helpers/settings.ts @@ -9,27 +9,49 @@ import { ValueOf } from 'type-fest'; import { isDevelopment } from '../../common/constants'; import { getDataDirectory, getPortableExecutableDir } from '../../common/electron-helpers'; +interface FailedParseResult { + syntaxError: SyntaxError; + fileContents: string; + configPath: string; +} + +const isFailedParseResult = (input: any): input is FailedParseResult => ( + input ? input.syntaxError instanceof SyntaxError : false +); + /** takes an unresolved (or resolved will work fine too) filePath of the insomnia config and reads the insomniaConfig from disk */ -export const readConfigFile = (filePath?: string) => { - if (!filePath) { +export const readConfigFile = (configPath?: string): unknown | FailedParseResult | undefined => { + if (!configPath) { return undefined; } let fileContents = ''; try { - fileContents = readFileSync(filePath, 'utf-8'); + fileContents = readFileSync(configPath, 'utf-8'); } catch (error: unknown) { + // file not found return undefined; } - if (!fileContents) { + const fileIsFoundButEmpty = fileContents === ''; + if (fileIsFoundButEmpty) { return undefined; } try { return JSON.parse(fileContents) as unknown; - } catch (error: unknown) { - console.error('failed to parse insomnia config', { filePath, fileContents }, error); + } catch (syntaxError: unknown) { + // note: all JSON.parse errors are SyntaxErrors + // see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/JSON_bad_parse + if (syntaxError instanceof SyntaxError) { + console.error('failed to parse insomnia config', { configPath, fileContents, syntaxError }); + const failedParseResult: FailedParseResult = { + syntaxError, + fileContents, + configPath: configPath, + }; + return failedParseResult; + } return undefined; } }; @@ -55,10 +77,14 @@ export const getConfigFile = () => { // note: this is written as to avoid unnecessary (synchronous) reads from disk. // The paths above are in priority order such that if we already found what we're looking for, there's no reason to keep reading other files. for (const configPath of configPaths) { - const insomniaConfig = readConfigFile(configPath); - if (insomniaConfig !== undefined && configPath !== undefined) { + const fileReadResult = readConfigFile(configPath); + if (isFailedParseResult(fileReadResult)) { + return fileReadResult; + } + + if (fileReadResult !== undefined && configPath !== undefined) { return { - insomniaConfig, + insomniaConfig: fileReadResult, configPath, }; } @@ -79,14 +105,33 @@ interface ConfigError { }; } +export const isConfigError = (input: any): input is ConfigError => ( + input ? input.humanErrors?.length > 0 : false +); + +interface ParseError { + error: FailedParseResult; +} + +export const isParseError = (input: any): input is ParseError => ( + input ? isFailedParseResult(input.error) : false +); + /** * gets settings from the `insomnia.config.json` * * note that it is a business rule that the config is never read again after startup, hence the `once` usage. */ -export const getConfigSettings: () => (NonNullable | ConfigError) = once(() => { - const { configPath, insomniaConfig } = getConfigFile(); +export const getConfigSettings: () => (NonNullable | ConfigError | ParseError) = once(() => { + const configFileResult = getConfigFile(); + if (isFailedParseResult(configFileResult)) { + return { + error: configFileResult, + }; + } + + const { insomniaConfig, configPath } = configFileResult; const validationResult = validate(insomniaConfig as InsomniaConfig); if (isErrorResult(validationResult)) { From 096405fe15979a7faf29105b65bcea5ea184745d Mon Sep 17 00:00:00 2001 From: Opender Singh Date: Thu, 21 Oct 2021 22:08:17 +1300 Subject: [PATCH 04/14] add version all npm script --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 8a8d7dde7..b57b1a74e 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "lint:fix": "lerna run lint:fix --stream --no-bail", "bootstrap": "npm install && lerna bootstrap && lerna run --stream bootstrap", "version": "lerna version --exact --preid alpha", + "version:all": "npm run version -- --force-publish", "version:dry": "npm run version -- --no-git-tag-version", "release": "lerna publish from-git --pre-dist-tag alpha --no-verify-access --yes", "clean": "lerna run clean --parallel --stream && lerna clean --yes && rimraf node_modules", From accc426fdd03a30fb8d771d0d57329ea10d3c278 Mon Sep 17 00:00:00 2001 From: Opender Singh Date: Thu, 21 Oct 2021 22:08:36 +1300 Subject: [PATCH 05/14] bump version to alpha.6 --- packages/insomnia-app/config/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/insomnia-app/config/config.json b/packages/insomnia-app/config/config.json index 03e177758..0eef6e043 100644 --- a/packages/insomnia-app/config/config.json +++ b/packages/insomnia-app/config/config.json @@ -1,5 +1,5 @@ { - "version": "2021.6.0-alpha.4", + "version": "2021.6.0-alpha.6", "name": "insomnia", "executableName": "insomnia", "appId": "com.insomnia.app", From b7248025e77cb1f1f44391051b9ac27954a390e0 Mon Sep 17 00:00:00 2001 From: Opender Singh Date: Thu, 21 Oct 2021 22:15:57 +1300 Subject: [PATCH 06/14] version packages lib@2.4.0-alpha.1 --- lerna.json | 2 +- packages/insomnia-app/package-lock.json | 2 +- packages/insomnia-app/package.json | 52 +++++++++---------- packages/insomnia-common/package-lock.json | 2 +- packages/insomnia-common/package.json | 2 +- .../insomnia-components/package-lock.json | 2 +- packages/insomnia-components/package.json | 2 +- packages/insomnia-config/package-lock.json | 2 +- packages/insomnia-config/package.json | 6 +-- packages/insomnia-cookies/package-lock.json | 2 +- packages/insomnia-cookies/package.json | 2 +- packages/insomnia-importers/package-lock.json | 2 +- packages/insomnia-importers/package.json | 2 +- packages/insomnia-inso/package-lock.json | 2 +- packages/insomnia-inso/package.json | 32 ++++++------ packages/insomnia-prettify/package.json | 2 +- .../insomnia-send-request/package-lock.json | 2 +- packages/insomnia-send-request/package.json | 12 ++--- .../insomnia-smoke-test/package-lock.json | 2 +- packages/insomnia-smoke-test/package.json | 2 +- packages/insomnia-testing/package-lock.json | 2 +- packages/insomnia-testing/package.json | 2 +- packages/insomnia-url/package.json | 2 +- packages/insomnia-xpath/package-lock.json | 2 +- packages/insomnia-xpath/package.json | 4 +- packages/openapi-2-kong/package-lock.json | 2 +- packages/openapi-2-kong/package.json | 2 +- .../insomnia-plugin-base64/package-lock.json | 2 +- plugins/insomnia-plugin-base64/package.json | 2 +- .../package-lock.json | 2 +- .../insomnia-plugin-cookie-jar/package.json | 4 +- .../package-lock.json | 2 +- .../insomnia-plugin-core-themes/package.json | 2 +- .../package-lock.json | 2 +- .../package.json | 2 +- .../insomnia-plugin-file/package-lock.json | 2 +- plugins/insomnia-plugin-file/package.json | 2 +- .../insomnia-plugin-hash/package-lock.json | 2 +- plugins/insomnia-plugin-hash/package.json | 2 +- .../package-lock.json | 2 +- plugins/insomnia-plugin-jsonpath/package.json | 2 +- .../package-lock.json | 2 +- .../package.json | 4 +- .../package-lock.json | 2 +- .../package.json | 4 +- .../package-lock.json | 2 +- .../insomnia-plugin-kong-portal/package.json | 4 +- plugins/insomnia-plugin-now/package-lock.json | 2 +- plugins/insomnia-plugin-now/package.json | 2 +- plugins/insomnia-plugin-os/package-lock.json | 2 +- plugins/insomnia-plugin-os/package.json | 2 +- .../insomnia-plugin-prompt/package-lock.json | 2 +- plugins/insomnia-plugin-prompt/package.json | 2 +- .../insomnia-plugin-request/package-lock.json | 2 +- plugins/insomnia-plugin-request/package.json | 6 +-- .../package-lock.json | 2 +- plugins/insomnia-plugin-response/package.json | 4 +- .../insomnia-plugin-uuid/package-lock.json | 2 +- plugins/insomnia-plugin-uuid/package.json | 2 +- 59 files changed, 114 insertions(+), 114 deletions(-) diff --git a/lerna.json b/lerna.json index 1d48eb0f8..12e219690 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "tagVersionPrefix": "lib@", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "includeMergedTags": true, "command": { "version": { diff --git a/packages/insomnia-app/package-lock.json b/packages/insomnia-app/package-lock.json index 0c987b5fe..f267334a8 100644 --- a/packages/insomnia-app/package-lock.json +++ b/packages/insomnia-app/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-app", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-app/package.json b/packages/insomnia-app/package.json index 0f2645d82..9da422671 100644 --- a/packages/insomnia-app/package.json +++ b/packages/insomnia-app/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "name": "insomnia-app", "homepage": "https://konghq.com", "description": "The Collaborative API Design Tool", @@ -100,30 +100,30 @@ "html-entities": "^1.2.0", "httpsnippet": "^1.23.0", "iconv-lite": "^0.4.15", - "insomnia-common": "2.3.3-alpha.4", - "insomnia-components": "2.3.3-alpha.4", - "insomnia-config": "2.3.3-alpha.4", - "insomnia-cookies": "2.3.3-alpha.4", - "insomnia-importers": "2.3.3-alpha.4", - "insomnia-plugin-base64": "2.3.3-alpha.4", - "insomnia-plugin-cookie-jar": "2.3.3-alpha.4", - "insomnia-plugin-core-themes": "2.3.3-alpha.4", - "insomnia-plugin-file": "2.3.3-alpha.4", - "insomnia-plugin-hash": "2.3.3-alpha.4", - "insomnia-plugin-jsonpath": "2.3.3-alpha.4", - "insomnia-plugin-kong-declarative-config": "2.3.3-alpha.4", - "insomnia-plugin-kong-kubernetes-config": "2.3.3-alpha.4", - "insomnia-plugin-kong-portal": "2.3.3-alpha.4", - "insomnia-plugin-now": "2.3.3-alpha.4", - "insomnia-plugin-os": "2.3.3-alpha.4", - "insomnia-plugin-prompt": "2.3.2", - "insomnia-plugin-request": "2.3.3-alpha.4", - "insomnia-plugin-response": "2.3.3-alpha.4", - "insomnia-plugin-uuid": "2.3.3-alpha.4", - "insomnia-prettify": "2.3.2", - "insomnia-testing": "2.3.3-alpha.4", - "insomnia-url": "2.3.2", - "insomnia-xpath": "2.3.3-alpha.4", + "insomnia-common": "2.4.0-alpha.1", + "insomnia-components": "2.4.0-alpha.1", + "insomnia-config": "2.4.0-alpha.1", + "insomnia-cookies": "2.4.0-alpha.1", + "insomnia-importers": "2.4.0-alpha.1", + "insomnia-plugin-base64": "2.4.0-alpha.1", + "insomnia-plugin-cookie-jar": "2.4.0-alpha.1", + "insomnia-plugin-core-themes": "2.4.0-alpha.1", + "insomnia-plugin-file": "2.4.0-alpha.1", + "insomnia-plugin-hash": "2.4.0-alpha.1", + "insomnia-plugin-jsonpath": "2.4.0-alpha.1", + "insomnia-plugin-kong-declarative-config": "2.4.0-alpha.1", + "insomnia-plugin-kong-kubernetes-config": "2.4.0-alpha.1", + "insomnia-plugin-kong-portal": "2.4.0-alpha.1", + "insomnia-plugin-now": "2.4.0-alpha.1", + "insomnia-plugin-os": "2.4.0-alpha.1", + "insomnia-plugin-prompt": "2.4.0-alpha.1", + "insomnia-plugin-request": "2.4.0-alpha.1", + "insomnia-plugin-response": "2.4.0-alpha.1", + "insomnia-plugin-uuid": "2.4.0-alpha.1", + "insomnia-prettify": "2.4.0-alpha.1", + "insomnia-testing": "2.4.0-alpha.1", + "insomnia-url": "2.4.0-alpha.1", + "insomnia-xpath": "2.4.0-alpha.1", "isomorphic-git": "^1.8.1", "js-yaml": "^3.14.1", "jshint": "^2.11.1", @@ -142,7 +142,7 @@ "nunjucks": "^3.2.0", "oauth-1.0a": "^2.2.2", "objectpath": "^2.0.0", - "openapi-2-kong": "2.3.3-alpha.4", + "openapi-2-kong": "2.4.0-alpha.1", "papaparse": "^5.2.0", "pdfjs-dist": "^2.5.207", "prettier": "2.4.1", diff --git a/packages/insomnia-common/package-lock.json b/packages/insomnia-common/package-lock.json index f35efda16..1493f98bd 100644 --- a/packages/insomnia-common/package-lock.json +++ b/packages/insomnia-common/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-common", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-common/package.json b/packages/insomnia-common/package.json index 3de72684d..acee29b5e 100644 --- a/packages/insomnia-common/package.json +++ b/packages/insomnia-common/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-common", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "homepage": "https://insomnia.rest", "description": "Top-level entities and utilities for Insomnia", "author": "Kong ", diff --git a/packages/insomnia-components/package-lock.json b/packages/insomnia-components/package-lock.json index 5cfddfdb4..e9b3de4d9 100644 --- a/packages/insomnia-components/package-lock.json +++ b/packages/insomnia-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-components", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-components/package.json b/packages/insomnia-components/package.json index 0c099c045..6fddd6e62 100644 --- a/packages/insomnia-components/package.json +++ b/packages/insomnia-components/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-components", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Insomnia UI component library", "license": "MIT", diff --git a/packages/insomnia-config/package-lock.json b/packages/insomnia-config/package-lock.json index 94c0a75dd..0250caebd 100644 --- a/packages/insomnia-config/package-lock.json +++ b/packages/insomnia-config/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-config", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-config/package.json b/packages/insomnia-config/package.json index c9d6d6bcf..d73169ef5 100644 --- a/packages/insomnia-config/package.json +++ b/packages/insomnia-config/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-config", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "homepage": "https://insomnia.rest", "description": "Configuration for Insomnia", "author": "Kong ", @@ -27,9 +27,9 @@ "build": "tsc --build tsconfig.build.json" }, "dependencies": { - "ajv": "^8.6.2", "@apideck/better-ajv-errors": "^0.2.6", - "insomnia-common": "2.3.3-alpha.4" + "ajv": "^8.6.2", + "insomnia-common": "2.4.0-alpha.1" }, "devDependencies": { "jest": "^26.6.3", diff --git a/packages/insomnia-cookies/package-lock.json b/packages/insomnia-cookies/package-lock.json index 0ebfd4e75..214b7495d 100644 --- a/packages/insomnia-cookies/package-lock.json +++ b/packages/insomnia-cookies/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-cookies", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-cookies/package.json b/packages/insomnia-cookies/package.json index 1b7bdc7d8..9902baabb 100644 --- a/packages/insomnia-cookies/package.json +++ b/packages/insomnia-cookies/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-cookies", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Cookie utilities", "license": "MIT", diff --git a/packages/insomnia-importers/package-lock.json b/packages/insomnia-importers/package-lock.json index c135a6ee1..dd7bd1819 100644 --- a/packages/insomnia-importers/package-lock.json +++ b/packages/insomnia-importers/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-importers", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-importers/package.json b/packages/insomnia-importers/package.json index 824564d04..6080319d9 100755 --- a/packages/insomnia-importers/package.json +++ b/packages/insomnia-importers/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-importers", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Various data importers for Insomnia", "license": "MIT", diff --git a/packages/insomnia-inso/package-lock.json b/packages/insomnia-inso/package-lock.json index ac46caa19..7fcf006c5 100644 --- a/packages/insomnia-inso/package-lock.json +++ b/packages/insomnia-inso/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-inso", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-inso/package.json b/packages/insomnia-inso/package.json index 68db4adbc..52826b5df 100644 --- a/packages/insomnia-inso/package.json +++ b/packages/insomnia-inso/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-inso", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "homepage": "https://insomnia.rest", "description": "A CLI for Insomnia - The Collaborative API Design Tool", "author": "Kong ", @@ -73,24 +73,24 @@ "consola": "^2.15.0", "cosmiconfig": "^6.0.0", "enquirer": "^2.3.6", - "insomnia-plugin-base64": "2.3.3-alpha.4", - "insomnia-plugin-cookie-jar": "2.3.3-alpha.4", - "insomnia-plugin-core-themes": "2.3.3-alpha.4", - "insomnia-plugin-file": "2.3.3-alpha.4", - "insomnia-plugin-hash": "2.3.3-alpha.4", - "insomnia-plugin-jsonpath": "2.3.3-alpha.4", - "insomnia-plugin-now": "2.3.3-alpha.4", - "insomnia-plugin-os": "2.3.3-alpha.4", - "insomnia-plugin-prompt": "2.3.2", - "insomnia-plugin-request": "2.3.3-alpha.4", - "insomnia-plugin-response": "2.3.3-alpha.4", - "insomnia-plugin-uuid": "2.3.3-alpha.4", - "insomnia-send-request": "2.3.3-alpha.4", - "insomnia-testing": "2.3.3-alpha.4", + "insomnia-plugin-base64": "2.4.0-alpha.1", + "insomnia-plugin-cookie-jar": "2.4.0-alpha.1", + "insomnia-plugin-core-themes": "2.4.0-alpha.1", + "insomnia-plugin-file": "2.4.0-alpha.1", + "insomnia-plugin-hash": "2.4.0-alpha.1", + "insomnia-plugin-jsonpath": "2.4.0-alpha.1", + "insomnia-plugin-now": "2.4.0-alpha.1", + "insomnia-plugin-os": "2.4.0-alpha.1", + "insomnia-plugin-prompt": "2.4.0-alpha.1", + "insomnia-plugin-request": "2.4.0-alpha.1", + "insomnia-plugin-response": "2.4.0-alpha.1", + "insomnia-plugin-uuid": "2.4.0-alpha.1", + "insomnia-send-request": "2.4.0-alpha.1", + "insomnia-testing": "2.4.0-alpha.1", "lodash.flattendeep": "^4.4.0", "mkdirp": "^1.0.4", "nedb": "^1.8.0", - "openapi-2-kong": "2.3.3-alpha.4", + "openapi-2-kong": "2.4.0-alpha.1", "ramda": "^0.27.1", "ramda-adjunct": "^2.33.0", "string-argv": "^0.3.1", diff --git a/packages/insomnia-prettify/package.json b/packages/insomnia-prettify/package.json index 3b37be9a6..90772adca 100644 --- a/packages/insomnia-prettify/package.json +++ b/packages/insomnia-prettify/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-prettify", - "version": "2.3.2", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Prettification utilities for Insomnia", "license": "MIT", diff --git a/packages/insomnia-send-request/package-lock.json b/packages/insomnia-send-request/package-lock.json index 5cac7430c..c1fa1451f 100644 --- a/packages/insomnia-send-request/package-lock.json +++ b/packages/insomnia-send-request/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-send-request", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-send-request/package.json b/packages/insomnia-send-request/package.json index cd995abe7..9fe1e6ae1 100644 --- a/packages/insomnia-send-request/package.json +++ b/packages/insomnia-send-request/package.json @@ -1,7 +1,7 @@ { "name": "insomnia-send-request", "license": "Apache-2.0", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "main": "dist/index.js", "types": "dist/send-request/index.d.ts", @@ -18,10 +18,10 @@ "hkdf": "0.0.2", "html-entities": "^1.3.1", "httpsnippet": "^1.22.0", - "insomnia-common": "2.3.3-alpha.4", - "insomnia-config": "2.3.3-alpha.4", - "insomnia-importers": "2.3.3-alpha.4", - "insomnia-testing": "2.3.3-alpha.4", + "insomnia-common": "2.4.0-alpha.1", + "insomnia-config": "2.4.0-alpha.1", + "insomnia-importers": "2.4.0-alpha.1", + "insomnia-testing": "2.4.0-alpha.1", "isomorphic-git": "^1.5.0", "jshint": "^2.11.1", "jsonlint": "^1.6.3", @@ -35,7 +35,7 @@ "node-libcurl": "2.3.3", "nunjucks": "^3.2.1", "oauth-1.0a": "^2.2.6", - "openapi-2-kong": "2.3.3-alpha.4", + "openapi-2-kong": "2.4.0-alpha.1", "ramda": "^0.27.1", "ramda-adjunct": "^2.33.0", "tough-cookie": "^4.0.0", diff --git a/packages/insomnia-smoke-test/package-lock.json b/packages/insomnia-smoke-test/package-lock.json index 44c4dbce6..3bac92359 100644 --- a/packages/insomnia-smoke-test/package-lock.json +++ b/packages/insomnia-smoke-test/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-smoke-test", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-smoke-test/package.json b/packages/insomnia-smoke-test/package.json index 2c9c83942..979d312a8 100644 --- a/packages/insomnia-smoke-test/package.json +++ b/packages/insomnia-smoke-test/package.json @@ -11,7 +11,7 @@ "bugs": { "url": "https://github.com/kong/insomnia/issues" }, - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "scripts": { "bootstrap": "npm run build", "lint": "eslint . --ext .js,.ts,.tsx", diff --git a/packages/insomnia-testing/package-lock.json b/packages/insomnia-testing/package-lock.json index b05c4b2b9..2c66bebf8 100644 --- a/packages/insomnia-testing/package-lock.json +++ b/packages/insomnia-testing/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-testing", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-testing/package.json b/packages/insomnia-testing/package.json index b84a7436c..e81a1660a 100644 --- a/packages/insomnia-testing/package.json +++ b/packages/insomnia-testing/package.json @@ -1,7 +1,7 @@ { "name": "insomnia-testing", "license": "Apache-2.0", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "repository": { "type": "git", diff --git a/packages/insomnia-url/package.json b/packages/insomnia-url/package.json index 2141b83e0..6f147643a 100644 --- a/packages/insomnia-url/package.json +++ b/packages/insomnia-url/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-url", - "version": "2.3.2", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "URL Utilities", "license": "MIT", diff --git a/packages/insomnia-xpath/package-lock.json b/packages/insomnia-xpath/package-lock.json index 1aff61270..4f04e1300 100644 --- a/packages/insomnia-xpath/package-lock.json +++ b/packages/insomnia-xpath/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-xpath", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-xpath/package.json b/packages/insomnia-xpath/package.json index 38225e646..4c5c607bc 100644 --- a/packages/insomnia-xpath/package.json +++ b/packages/insomnia-xpath/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-xpath", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Query XML using XPath", "license": "MIT", @@ -32,7 +32,7 @@ "@types/xmldom": "0.1.30" }, "dependencies": { - "insomnia-cookies": "2.3.3-alpha.4", + "insomnia-cookies": "2.4.0-alpha.1", "xmldom": "^0.5.0", "xpath": "0.0.27" }, diff --git a/packages/openapi-2-kong/package-lock.json b/packages/openapi-2-kong/package-lock.json index 3a679dddb..cbb9cea9c 100644 --- a/packages/openapi-2-kong/package-lock.json +++ b/packages/openapi-2-kong/package-lock.json @@ -1,6 +1,6 @@ { "name": "openapi-2-kong", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/openapi-2-kong/package.json b/packages/openapi-2-kong/package.json index 08fbd0120..7c1e1f9bd 100644 --- a/packages/openapi-2-kong/package.json +++ b/packages/openapi-2-kong/package.json @@ -1,7 +1,7 @@ { "name": "openapi-2-kong", "license": "Apache-2.0", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/plugins/insomnia-plugin-base64/package-lock.json b/plugins/insomnia-plugin-base64/package-lock.json index 0eed1a7e8..4e45232ab 100644 --- a/plugins/insomnia-plugin-base64/package-lock.json +++ b/plugins/insomnia-plugin-base64/package-lock.json @@ -1,5 +1,5 @@ { "name": "insomnia-plugin-base64", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1 } diff --git a/plugins/insomnia-plugin-base64/package.json b/plugins/insomnia-plugin-base64/package.json index d6d693d38..a976fcf00 100644 --- a/plugins/insomnia-plugin-base64/package.json +++ b/plugins/insomnia-plugin-base64/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-base64", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Insomnia base64 template tag", "license": "MIT", diff --git a/plugins/insomnia-plugin-cookie-jar/package-lock.json b/plugins/insomnia-plugin-cookie-jar/package-lock.json index dcd89ade7..4f0e82ed8 100644 --- a/plugins/insomnia-plugin-cookie-jar/package-lock.json +++ b/plugins/insomnia-plugin-cookie-jar/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-cookie-jar", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-cookie-jar/package.json b/plugins/insomnia-plugin-cookie-jar/package.json index 32343c63d..2bc84868e 100644 --- a/plugins/insomnia-plugin-cookie-jar/package.json +++ b/plugins/insomnia-plugin-cookie-jar/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-cookie-jar", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "contributors": [ { @@ -28,7 +28,7 @@ "test": "jest --silent" }, "dependencies": { - "insomnia-cookies": "2.3.3-alpha.4" + "insomnia-cookies": "2.4.0-alpha.1" }, "gitHead": "e46bf021cf4b4379e31d2b2d9025d476d6839fa1" } diff --git a/plugins/insomnia-plugin-core-themes/package-lock.json b/plugins/insomnia-plugin-core-themes/package-lock.json index 27d9404ac..0a4d31b0e 100644 --- a/plugins/insomnia-plugin-core-themes/package-lock.json +++ b/plugins/insomnia-plugin-core-themes/package-lock.json @@ -1,5 +1,5 @@ { "name": "insomnia-plugin-core-themes", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1 } diff --git a/plugins/insomnia-plugin-core-themes/package.json b/plugins/insomnia-plugin-core-themes/package.json index 47c553f6e..1a6339800 100644 --- a/plugins/insomnia-plugin-core-themes/package.json +++ b/plugins/insomnia-plugin-core-themes/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-core-themes", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Insomnia core themes", "license": "MIT", diff --git a/plugins/insomnia-plugin-default-headers/package-lock.json b/plugins/insomnia-plugin-default-headers/package-lock.json index 525a160ec..ec44658c0 100644 --- a/plugins/insomnia-plugin-default-headers/package-lock.json +++ b/plugins/insomnia-plugin-default-headers/package-lock.json @@ -1,5 +1,5 @@ { "name": "insomnia-plugin-default-headers", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1 } diff --git a/plugins/insomnia-plugin-default-headers/package.json b/plugins/insomnia-plugin-default-headers/package.json index e5eab29fe..acf8d2c88 100644 --- a/plugins/insomnia-plugin-default-headers/package.json +++ b/plugins/insomnia-plugin-default-headers/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-default-headers", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Various data importers for Insomnia", "license": "MIT", diff --git a/plugins/insomnia-plugin-file/package-lock.json b/plugins/insomnia-plugin-file/package-lock.json index 3142074dd..f75cbd029 100644 --- a/plugins/insomnia-plugin-file/package-lock.json +++ b/plugins/insomnia-plugin-file/package-lock.json @@ -1,5 +1,5 @@ { "name": "insomnia-plugin-file", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1 } diff --git a/plugins/insomnia-plugin-file/package.json b/plugins/insomnia-plugin-file/package.json index 3ff90e013..21764a635 100644 --- a/plugins/insomnia-plugin-file/package.json +++ b/plugins/insomnia-plugin-file/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-file", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Insomnia file templte tag", "license": "MIT", diff --git a/plugins/insomnia-plugin-hash/package-lock.json b/plugins/insomnia-plugin-hash/package-lock.json index e84d9eb8d..7efaa8dfa 100644 --- a/plugins/insomnia-plugin-hash/package-lock.json +++ b/plugins/insomnia-plugin-hash/package-lock.json @@ -1,5 +1,5 @@ { "name": "insomnia-plugin-hash", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1 } diff --git a/plugins/insomnia-plugin-hash/package.json b/plugins/insomnia-plugin-hash/package.json index e1ac058a8..e48bfe09a 100644 --- a/plugins/insomnia-plugin-hash/package.json +++ b/plugins/insomnia-plugin-hash/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-hash", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Insomnia hash template tag", "license": "MIT", diff --git a/plugins/insomnia-plugin-jsonpath/package-lock.json b/plugins/insomnia-plugin-jsonpath/package-lock.json index 4a8c2689d..2c3ee27d2 100644 --- a/plugins/insomnia-plugin-jsonpath/package-lock.json +++ b/plugins/insomnia-plugin-jsonpath/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-jsonpath", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-jsonpath/package.json b/plugins/insomnia-plugin-jsonpath/package.json index f384d6f56..0cb9b76e2 100644 --- a/plugins/insomnia-plugin-jsonpath/package.json +++ b/plugins/insomnia-plugin-jsonpath/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-jsonpath", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Template tag to pull data from JSON strings", "license": "MIT", diff --git a/plugins/insomnia-plugin-kong-declarative-config/package-lock.json b/plugins/insomnia-plugin-kong-declarative-config/package-lock.json index 1d6ddda05..deb126d3a 100644 --- a/plugins/insomnia-plugin-kong-declarative-config/package-lock.json +++ b/plugins/insomnia-plugin-kong-declarative-config/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-kong-declarative-config", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-kong-declarative-config/package.json b/plugins/insomnia-plugin-kong-declarative-config/package.json index fb5e03f4f..ca182936e 100644 --- a/plugins/insomnia-plugin-kong-declarative-config/package.json +++ b/plugins/insomnia-plugin-kong-declarative-config/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-kong-declarative-config", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "main": "index.js", "author": "Kong ", "license": "Apache-2.0", @@ -17,7 +17,7 @@ "description": "Generate Kong Declarative Config" }, "dependencies": { - "openapi-2-kong": "2.3.3-alpha.4", + "openapi-2-kong": "2.4.0-alpha.1", "yaml": "^1.8.3" }, "gitHead": "d91e6735a76295166545a42c170328da4ab70dd3" diff --git a/plugins/insomnia-plugin-kong-kubernetes-config/package-lock.json b/plugins/insomnia-plugin-kong-kubernetes-config/package-lock.json index 618857a54..5075421e1 100644 --- a/plugins/insomnia-plugin-kong-kubernetes-config/package-lock.json +++ b/plugins/insomnia-plugin-kong-kubernetes-config/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-kong-kubernetes-config", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-kong-kubernetes-config/package.json b/plugins/insomnia-plugin-kong-kubernetes-config/package.json index f9f6e2a88..3da426993 100644 --- a/plugins/insomnia-plugin-kong-kubernetes-config/package.json +++ b/plugins/insomnia-plugin-kong-kubernetes-config/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-kong-kubernetes-config", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "main": "index.js", "author": "Kong ", "license": "Apache-2.0", @@ -17,7 +17,7 @@ "description": "Generate Kong For Kubernetes configuration" }, "dependencies": { - "openapi-2-kong": "2.3.3-alpha.4", + "openapi-2-kong": "2.4.0-alpha.1", "yaml": "^1.8.3" }, "gitHead": "d91e6735a76295166545a42c170328da4ab70dd3" diff --git a/plugins/insomnia-plugin-kong-portal/package-lock.json b/plugins/insomnia-plugin-kong-portal/package-lock.json index 1148ae9d9..2305ff51e 100644 --- a/plugins/insomnia-plugin-kong-portal/package-lock.json +++ b/plugins/insomnia-plugin-kong-portal/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-kong-portal", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-kong-portal/package.json b/plugins/insomnia-plugin-kong-portal/package.json index f1b04e95a..658301008 100644 --- a/plugins/insomnia-plugin-kong-portal/package.json +++ b/plugins/insomnia-plugin-kong-portal/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-kong-portal", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "main": "dist/index.js", "author": "Kong ", "license": "Apache-2.0", @@ -30,7 +30,7 @@ "@babel/preset-flow": "^7.9.0", "@babel/preset-react": "^7.9.4", "autobind-decorator": "^2.4.0", - "insomnia-components": "2.3.3-alpha.4", + "insomnia-components": "2.4.0-alpha.1", "react": "^16.8.3", "react-dom": "^16.8.3", "styled-components": "^4.4.1", diff --git a/plugins/insomnia-plugin-now/package-lock.json b/plugins/insomnia-plugin-now/package-lock.json index 77cd95013..01a43c1dd 100644 --- a/plugins/insomnia-plugin-now/package-lock.json +++ b/plugins/insomnia-plugin-now/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-now", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-now/package.json b/plugins/insomnia-plugin-now/package.json index 983df94b3..ddefd9d3a 100644 --- a/plugins/insomnia-plugin-now/package.json +++ b/plugins/insomnia-plugin-now/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-now", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Insomnia now template tag", "license": "MIT", diff --git a/plugins/insomnia-plugin-os/package-lock.json b/plugins/insomnia-plugin-os/package-lock.json index bc42c0396..d84e55425 100644 --- a/plugins/insomnia-plugin-os/package-lock.json +++ b/plugins/insomnia-plugin-os/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-os", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-os/package.json b/plugins/insomnia-plugin-os/package.json index 2f436cff4..c2555dac2 100644 --- a/plugins/insomnia-plugin-os/package.json +++ b/plugins/insomnia-plugin-os/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-os", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Template tag to get information about the OS", "license": "MIT", diff --git a/plugins/insomnia-plugin-prompt/package-lock.json b/plugins/insomnia-plugin-prompt/package-lock.json index cfd5a656f..f2e8818e4 100644 --- a/plugins/insomnia-plugin-prompt/package-lock.json +++ b/plugins/insomnia-plugin-prompt/package-lock.json @@ -1,5 +1,5 @@ { "name": "insomnia-plugin-prompt", - "version": "2.3.2", + "version": "2.4.0-alpha.1", "lockfileVersion": 1 } diff --git a/plugins/insomnia-plugin-prompt/package.json b/plugins/insomnia-plugin-prompt/package.json index 041d94416..4d0eff64d 100644 --- a/plugins/insomnia-plugin-prompt/package.json +++ b/plugins/insomnia-plugin-prompt/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-prompt", - "version": "2.3.2", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Insomnia prompt template tag", "license": "MIT", diff --git a/plugins/insomnia-plugin-request/package-lock.json b/plugins/insomnia-plugin-request/package-lock.json index 630143dca..5d2c4f9b9 100644 --- a/plugins/insomnia-plugin-request/package-lock.json +++ b/plugins/insomnia-plugin-request/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-request", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-request/package.json b/plugins/insomnia-plugin-request/package.json index 0d356a6d7..6ce563bce 100644 --- a/plugins/insomnia-plugin-request/package.json +++ b/plugins/insomnia-plugin-request/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-request", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Insomnia request template tag", "license": "MIT", @@ -22,8 +22,8 @@ "test": "jest --silent" }, "dependencies": { - "insomnia-cookies": "2.3.3-alpha.4", - "insomnia-url": "2.3.2" + "insomnia-cookies": "2.4.0-alpha.1", + "insomnia-url": "2.4.0-alpha.1" }, "gitHead": "d91e6735a76295166545a42c170328da4ab70dd3" } diff --git a/plugins/insomnia-plugin-response/package-lock.json b/plugins/insomnia-plugin-response/package-lock.json index b014253a2..20a071857 100644 --- a/plugins/insomnia-plugin-response/package-lock.json +++ b/plugins/insomnia-plugin-response/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-response", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-response/package.json b/plugins/insomnia-plugin-response/package.json index f26648f27..24dbdb240 100644 --- a/plugins/insomnia-plugin-response/package.json +++ b/plugins/insomnia-plugin-response/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-response", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Insomnia response template tag", "license": "MIT", @@ -23,7 +23,7 @@ }, "dependencies": { "iconv-lite": "^0.4.19", - "insomnia-xpath": "2.3.3-alpha.4", + "insomnia-xpath": "2.4.0-alpha.1", "jsonpath-plus": "^6.0.1" }, "gitHead": "e46bf021cf4b4379e31d2b2d9025d476d6839fa1" diff --git a/plugins/insomnia-plugin-uuid/package-lock.json b/plugins/insomnia-plugin-uuid/package-lock.json index f549425d1..0489c0a67 100644 --- a/plugins/insomnia-plugin-uuid/package-lock.json +++ b/plugins/insomnia-plugin-uuid/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-uuid", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-uuid/package.json b/plugins/insomnia-plugin-uuid/package.json index 4853070fc..47fa79a50 100644 --- a/plugins/insomnia-plugin-uuid/package.json +++ b/plugins/insomnia-plugin-uuid/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-uuid", - "version": "2.3.3-alpha.4", + "version": "2.4.0-alpha.1", "author": "Kong ", "description": "Insomnia uuid template tag", "license": "MIT", From 7527819b396ce774277c38e0eea9344c5e6d729f Mon Sep 17 00:00:00 2001 From: Opender Singh Date: Thu, 21 Oct 2021 23:21:45 +1300 Subject: [PATCH 07/14] empty commit to trigger build because npm publish passed and we don't want to publish npm again From 52c85cd6b79b439214ecb501d5becfb8c750ee6e Mon Sep 17 00:00:00 2001 From: Opender Singh Date: Sat, 23 Oct 2021 11:35:18 +1300 Subject: [PATCH 08/14] Prevent app initialization logic if config is invalid (#4134) --- .../validate-insomnia-config.test.ts.snap | 13 ++++++++ .../validate-insomnia-config.test.ts | 27 +++++++-------- .../app/common/validate-insomnia-config.ts | 33 +++++++++++-------- packages/insomnia-app/app/main.development.ts | 12 +++++-- 4 files changed, 53 insertions(+), 32 deletions(-) create mode 100644 packages/insomnia-app/app/common/__tests__/__snapshots__/validate-insomnia-config.test.ts.snap diff --git a/packages/insomnia-app/app/common/__tests__/__snapshots__/validate-insomnia-config.test.ts.snap b/packages/insomnia-app/app/common/__tests__/__snapshots__/validate-insomnia-config.test.ts.snap new file mode 100644 index 000000000..296fc44bd --- /dev/null +++ b/packages/insomnia-app/app/common/__tests__/__snapshots__/validate-insomnia-config.test.ts.snap @@ -0,0 +1,13 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`validateInsomniaConfig should return error if there is a config error 1`] = `"{\\"error\\":{\\"errors\\":[],\\"humanReadableErrors\\":[],\\"insomniaConfig\\":\\"{ \\\\\\"mock\\\\\\": [\\\\\\"insomnia\\\\\\", \\\\\\"config\\\\\\"] }\\",\\"configPath\\":\\"/mock/insomnia/config/path\\"}}"`; + +exports[`validateInsomniaConfig should return error if there is a parse error 1`] = ` +"Failed to parse JSON file for Insomnia Config. + +[Path] +/mock/insomnia/config/path + +[Syntax Error] +mock syntax error" +`; diff --git a/packages/insomnia-app/app/common/__tests__/validate-insomnia-config.test.ts b/packages/insomnia-app/app/common/__tests__/validate-insomnia-config.test.ts index a7c66ed20..6c88d8ce4 100644 --- a/packages/insomnia-app/app/common/__tests__/validate-insomnia-config.test.ts +++ b/packages/insomnia-app/app/common/__tests__/validate-insomnia-config.test.ts @@ -1,17 +1,13 @@ -import electron from 'electron'; import { mocked } from 'ts-jest/utils'; import { getConfigSettings as _getConfigSettings } from '../../models/helpers/settings'; import { validateInsomniaConfig } from '../validate-insomnia-config'; -jest.mock('electron'); jest.mock('../../models/helpers/settings'); -const electronAppExit = mocked(electron.app.exit); -const electronShowErrorBox = mocked(electron.dialog.showErrorBox); const getConfigSettings = mocked(_getConfigSettings); describe('validateInsomniaConfig', () => { - it('should show error box and exit if there is a parse error', () => { + it('should return error if there is a parse error', () => { // Arrange const errorReturn = { error: { @@ -23,14 +19,14 @@ describe('validateInsomniaConfig', () => { getConfigSettings.mockReturnValue(errorReturn); // Act - validateInsomniaConfig(); + const result = validateInsomniaConfig(); // Assert - expect(electronShowErrorBox).toHaveBeenCalled(); - expect(electronAppExit).toHaveBeenCalled(); + expect(result.error?.title).toBe('Invalid Insomnia Config'); + expect(result.error?.message).toMatchSnapshot(); }); - it('should show error box and exit if there is a config error', () => { + it('should return error if there is a config error', () => { // Arrange const errorReturn = { error: { @@ -43,23 +39,22 @@ describe('validateInsomniaConfig', () => { getConfigSettings.mockReturnValue(errorReturn); // Act - validateInsomniaConfig(); + const result = validateInsomniaConfig(); // Assert - expect(electronShowErrorBox).toHaveBeenCalled(); - expect(electronAppExit).toHaveBeenCalled(); + expect(result.error?.title).toBe('An unexpected error occured while parsing Insomnia Config'); + expect(result.error?.message).toMatchSnapshot(); }); - it('should not exit if there are no errors', () => { + it('should not return any errors', () => { // Arrange const validReturn = { enableAnalytics: true }; getConfigSettings.mockReturnValue(validReturn); // Act - validateInsomniaConfig(); + const result = validateInsomniaConfig(); // Assert - expect(electronShowErrorBox).not.toHaveBeenCalled(); - expect(electronAppExit).not.toHaveBeenCalled(); + expect(result.error).not.toBeDefined(); }); }); diff --git a/packages/insomnia-app/app/common/validate-insomnia-config.ts b/packages/insomnia-app/app/common/validate-insomnia-config.ts index f66cac841..8555e4990 100644 --- a/packages/insomnia-app/app/common/validate-insomnia-config.ts +++ b/packages/insomnia-app/app/common/validate-insomnia-config.ts @@ -1,18 +1,25 @@ -import electron from 'electron'; - import { getConfigSettings, isConfigError, isParseError } from '../models/helpers/settings'; -import { exitApp } from './electron-helpers'; -export const validateInsomniaConfig = () => { +interface Result { + error?:{ + title: string; + message: string; + }; +} + +export const validateInsomniaConfig = (): Result => { const configSettings = getConfigSettings(); if (!('error' in configSettings)) { - return; + return {}; } + let title = 'Invalid Insomnia Config'; + let message = ''; + if (isParseError(configSettings)) { const { syntaxError, configPath } = configSettings.error; - electron.dialog.showErrorBox('Invalid Insomnia Config', [ + message = [ 'Failed to parse JSON file for Insomnia Config.', '', '[Path]', @@ -20,7 +27,7 @@ export const validateInsomniaConfig = () => { '', '[Syntax Error]', syntaxError.message, - ].join('\n')); + ].join('\n'); } else if (isConfigError(configSettings)) { const { humanReadableErrors, configPath } = configSettings.error; const errors = humanReadableErrors.map(({ message, path, suggestion }, index) => ([ @@ -29,20 +36,18 @@ export const validateInsomniaConfig = () => { `${message}.${suggestion ? ` ${suggestion}` : ''}`, ]).join('\n')).join('\n\n'); - electron.dialog.showErrorBox('Invalid Insomnia Config', [ + message = [ `Your Insomnia Config was found to be invalid. Please check the path below for the following error${configSettings.error.humanReadableErrors?.length > 1 ? 's' : ''}:`, '', '[Path]', configPath, '', errors, - ].join('\n')); + ].join('\n'); } else { - electron.dialog.showErrorBox( - 'An unexpected error occured while parsing Insomnia Config', - JSON.stringify(configSettings), - ); + title = 'An unexpected error occured while parsing Insomnia Config'; + message = JSON.stringify(configSettings); } - exitApp(); + return { error: { title, message } }; }; diff --git a/packages/insomnia-app/app/main.development.ts b/packages/insomnia-app/app/main.development.ts index c10b7f7b0..42ac6f967 100644 --- a/packages/insomnia-app/app/main.development.ts +++ b/packages/insomnia-app/app/main.development.ts @@ -6,7 +6,7 @@ import appConfig from '../config/config.json'; import { trackNonInteractiveEventQueueable } from './common/analytics'; import { changelogUrl, getAppVersion, isDevelopment, isMac } from './common/constants'; import { database } from './common/database'; -import { disableSpellcheckerDownload } from './common/electron-helpers'; +import { disableSpellcheckerDownload, exitApp } from './common/electron-helpers'; import log, { initializeLogging } from './common/log'; import { validateInsomniaConfig } from './common/validate-insomnia-config'; import * as errorHandling from './main/error-handling'; @@ -42,7 +42,15 @@ global.window = global.window || undefined; // When the app is first launched app.on('ready', async () => { - validateInsomniaConfig(); + const { error } = validateInsomniaConfig(); + + if (error) { + electron.dialog.showErrorBox(error.title, error.message); + console.log('[config] Insomnia config is invalid, preventing app initialization'); + exitApp(); + return; + } + disableSpellcheckerDownload(); if (isDevelopment()) { From 7e93469f12e2c373f5e9e2d28133e274db4e8542 Mon Sep 17 00:00:00 2001 From: Opender Singh Date: Sun, 24 Oct 2021 16:05:03 +1300 Subject: [PATCH 09/14] exit with exit-code 1 (#4148) --- packages/insomnia-app/app/common/electron-helpers.ts | 4 ++-- packages/insomnia-app/app/main.development.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/insomnia-app/app/common/electron-helpers.ts b/packages/insomnia-app/app/common/electron-helpers.ts index 81ef7b778..b91fdcaa5 100644 --- a/packages/insomnia-app/app/common/electron-helpers.ts +++ b/packages/insomnia-app/app/common/electron-helpers.ts @@ -66,9 +66,9 @@ export function restartApp() { app.exit(); } -export const exitApp = () => { +export const exitAppFailure = () => { const { app } = electron.remote || electron; - app.exit(); + app.exit(1); }; export const setMenuBarVisibility = (visible: boolean) => { diff --git a/packages/insomnia-app/app/main.development.ts b/packages/insomnia-app/app/main.development.ts index 42ac6f967..c564cefda 100644 --- a/packages/insomnia-app/app/main.development.ts +++ b/packages/insomnia-app/app/main.development.ts @@ -6,7 +6,7 @@ import appConfig from '../config/config.json'; import { trackNonInteractiveEventQueueable } from './common/analytics'; import { changelogUrl, getAppVersion, isDevelopment, isMac } from './common/constants'; import { database } from './common/database'; -import { disableSpellcheckerDownload, exitApp } from './common/electron-helpers'; +import { disableSpellcheckerDownload, exitAppFailure } from './common/electron-helpers'; import log, { initializeLogging } from './common/log'; import { validateInsomniaConfig } from './common/validate-insomnia-config'; import * as errorHandling from './main/error-handling'; @@ -47,7 +47,7 @@ app.on('ready', async () => { if (error) { electron.dialog.showErrorBox(error.title, error.message); console.log('[config] Insomnia config is invalid, preventing app initialization'); - exitApp(); + exitAppFailure(); return; } From 75d48d5255155b772ccb9c9af2d1fe4529dec85c Mon Sep 17 00:00:00 2001 From: Opender Singh Date: Sun, 24 Oct 2021 16:05:41 +1300 Subject: [PATCH 10/14] Handle human readable errors correctly (#4147) --- .../validate-insomnia-config.test.ts.snap | 13 ++++++++- .../validate-insomnia-config.test.ts | 27 ++++++++++++++++++- .../app/models/helpers/settings.ts | 23 +++++++++------- 3 files changed, 52 insertions(+), 11 deletions(-) diff --git a/packages/insomnia-app/app/common/__tests__/__snapshots__/validate-insomnia-config.test.ts.snap b/packages/insomnia-app/app/common/__tests__/__snapshots__/validate-insomnia-config.test.ts.snap index 296fc44bd..5a29481b2 100644 --- a/packages/insomnia-app/app/common/__tests__/__snapshots__/validate-insomnia-config.test.ts.snap +++ b/packages/insomnia-app/app/common/__tests__/__snapshots__/validate-insomnia-config.test.ts.snap @@ -1,6 +1,15 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`validateInsomniaConfig should return error if there is a config error 1`] = `"{\\"error\\":{\\"errors\\":[],\\"humanReadableErrors\\":[],\\"insomniaConfig\\":\\"{ \\\\\\"mock\\\\\\": [\\\\\\"insomnia\\\\\\", \\\\\\"config\\\\\\"] }\\",\\"configPath\\":\\"/mock/insomnia/config/path\\"}}"`; +exports[`validateInsomniaConfig should return error if there is a config error 1`] = ` +"Your Insomnia Config was found to be invalid. Please check the path below for the following error: + +[Path] +/mock/insomnia/config/path + +[Error 1] +Path: path +message. suggestion" +`; exports[`validateInsomniaConfig should return error if there is a parse error 1`] = ` "Failed to parse JSON file for Insomnia Config. @@ -11,3 +20,5 @@ exports[`validateInsomniaConfig should return error if there is a parse error 1` [Syntax Error] mock syntax error" `; + +exports[`validateInsomniaConfig should return error if there is an unexpected error 1`] = `"{\\"error\\":{\\"errors\\":[],\\"humanReadableErrors\\":[],\\"insomniaConfig\\":\\"{ \\\\\\"mock\\\\\\": [\\\\\\"insomnia\\\\\\", \\\\\\"config\\\\\\"] }\\",\\"configPath\\":\\"/mock/insomnia/config/path\\"}}"`; diff --git a/packages/insomnia-app/app/common/__tests__/validate-insomnia-config.test.ts b/packages/insomnia-app/app/common/__tests__/validate-insomnia-config.test.ts index 6c88d8ce4..63249a4d2 100644 --- a/packages/insomnia-app/app/common/__tests__/validate-insomnia-config.test.ts +++ b/packages/insomnia-app/app/common/__tests__/validate-insomnia-config.test.ts @@ -1,6 +1,6 @@ import { mocked } from 'ts-jest/utils'; -import { getConfigSettings as _getConfigSettings } from '../../models/helpers/settings'; +import { ConfigError, getConfigSettings as _getConfigSettings } from '../../models/helpers/settings'; import { validateInsomniaConfig } from '../validate-insomnia-config'; jest.mock('../../models/helpers/settings'); @@ -27,6 +27,31 @@ describe('validateInsomniaConfig', () => { }); it('should return error if there is a config error', () => { + // Arrange + const errorReturn: ConfigError = { + error: { + errors: [], + humanReadableErrors: [{ + message: 'message', + path: 'path', + suggestion: 'suggestion', + context: { errorType: 'const' }, + }], + insomniaConfig: '{ "mock": ["insomnia", "config"] }', + configPath: '/mock/insomnia/config/path', + }, + }; + getConfigSettings.mockReturnValue(errorReturn); + + // Act + const result = validateInsomniaConfig(); + + // Assert + expect(result.error?.title).toBe('Invalid Insomnia Config'); + expect(result.error?.message).toMatchSnapshot(); + }); + + it('should return error if there is an unexpected error', () => { // Arrange const errorReturn = { error: { diff --git a/packages/insomnia-app/app/models/helpers/settings.ts b/packages/insomnia-app/app/models/helpers/settings.ts index 9f61fc197..cdf9a3b38 100644 --- a/packages/insomnia-app/app/models/helpers/settings.ts +++ b/packages/insomnia-app/app/models/helpers/settings.ts @@ -15,9 +15,13 @@ interface FailedParseResult { configPath: string; } -const isFailedParseResult = (input: any): input is FailedParseResult => ( - input ? input.syntaxError instanceof SyntaxError : false -); +const isFailedParseResult = (input: any): input is FailedParseResult => { + const typesafeInput = input as FailedParseResult; + + return ( + typesafeInput ? typesafeInput.syntaxError instanceof SyntaxError : false + ); +}; /** takes an unresolved (or resolved will work fine too) filePath of the insomnia config and reads the insomniaConfig from disk */ export const readConfigFile = (configPath?: string): unknown | FailedParseResult | undefined => { @@ -96,7 +100,7 @@ export const getConfigFile = () => { }; }; -interface ConfigError { +export interface ConfigError { error: { configPath?: string; insomniaConfig: unknown; @@ -105,16 +109,17 @@ interface ConfigError { }; } -export const isConfigError = (input: any): input is ConfigError => ( - input ? input.humanErrors?.length > 0 : false +export const isConfigError = (input: ConfigError | ParseError): input is ConfigError => ( + // Cast for typesafety + (input as ConfigError).error?.humanReadableErrors?.length > 0 ); -interface ParseError { +export interface ParseError { error: FailedParseResult; } -export const isParseError = (input: any): input is ParseError => ( - input ? isFailedParseResult(input.error) : false +export const isParseError = (input: ConfigError | ParseError): input is ParseError => ( + isFailedParseResult(input.error) ); /** From 0c4ad0bc114dc36aacb15dbf92848b7cf8eaa282 Mon Sep 17 00:00:00 2001 From: Opender Singh Date: Mon, 25 Oct 2021 21:43:06 +1300 Subject: [PATCH 11/14] bump version to alpha.7 --- packages/insomnia-app/config/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/insomnia-app/config/config.json b/packages/insomnia-app/config/config.json index 0eef6e043..3e35f6486 100644 --- a/packages/insomnia-app/config/config.json +++ b/packages/insomnia-app/config/config.json @@ -1,5 +1,5 @@ { - "version": "2021.6.0-alpha.6", + "version": "2021.6.0-alpha.7", "name": "insomnia", "executableName": "insomnia", "appId": "com.insomnia.app", From 0f134ea553d0965c94cc8ac7b68447b89a9332c8 Mon Sep 17 00:00:00 2001 From: James Gatz Date: Mon, 25 Oct 2021 23:37:45 +0200 Subject: [PATCH 12/14] =?UTF-8?q?fix(workspace-card-dropdown):=20restore?= =?UTF-8?q?=20the=20use=20the=20get-workspace-name=20=E2=80=A6=20(#4150)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../__tests__/get-workspace-name.test.ts | 19 +++++++++++++++++++ .../app/models/helpers/get-workspace-name.ts | 6 ++++++ .../dropdowns/workspace-card-dropdown.tsx | 17 ++++++++--------- .../modals/workspace-duplicate-modal.tsx | 11 +++++++---- .../modals/workspace-settings-modal.tsx | 4 ++-- 5 files changed, 42 insertions(+), 15 deletions(-) create mode 100644 packages/insomnia-app/app/models/helpers/__tests__/get-workspace-name.test.ts create mode 100644 packages/insomnia-app/app/models/helpers/get-workspace-name.ts diff --git a/packages/insomnia-app/app/models/helpers/__tests__/get-workspace-name.test.ts b/packages/insomnia-app/app/models/helpers/__tests__/get-workspace-name.test.ts new file mode 100644 index 000000000..89a706e6b --- /dev/null +++ b/packages/insomnia-app/app/models/helpers/__tests__/get-workspace-name.test.ts @@ -0,0 +1,19 @@ +import * as models from '../../../models'; +import { WorkspaceScopeKeys } from '../../workspace'; +import getWorkspaceName from '../get-workspace-name'; + +describe('getWorkspaceName', () => { + it('returns workspace name', () => { + const w = models.workspace.init(); + const s = models.apiSpec.init(); + w.scope = WorkspaceScopeKeys.collection; + expect(getWorkspaceName(w, s)).toBe(w.name); + }); + + it('returns api spec name', () => { + const w = models.workspace.init(); + const s = models.apiSpec.init(); + w.scope = WorkspaceScopeKeys.design; + expect(getWorkspaceName(w, s)).toBe(s.fileName); + }); +}); diff --git a/packages/insomnia-app/app/models/helpers/get-workspace-name.ts b/packages/insomnia-app/app/models/helpers/get-workspace-name.ts new file mode 100644 index 000000000..55db6f9a6 --- /dev/null +++ b/packages/insomnia-app/app/models/helpers/get-workspace-name.ts @@ -0,0 +1,6 @@ +import type { ApiSpec } from '../api-spec'; +import { isDesign, Workspace } from '../workspace'; + +export default function getWorkspaceName(w: Workspace, s: ApiSpec) { + return isDesign(w) ? s.fileName : w.name; +} diff --git a/packages/insomnia-app/app/ui/components/dropdowns/workspace-card-dropdown.tsx b/packages/insomnia-app/app/ui/components/dropdowns/workspace-card-dropdown.tsx index fbcd3054a..8b9754f35 100644 --- a/packages/insomnia-app/app/ui/components/dropdowns/workspace-card-dropdown.tsx +++ b/packages/insomnia-app/app/ui/components/dropdowns/workspace-card-dropdown.tsx @@ -1,12 +1,12 @@ import { SvgIcon } from 'insomnia-components'; import React, { FC, useCallback, useState } from 'react'; -import { useSelector } from 'react-redux'; import { parseApiSpec } from '../../../common/api-specs'; import { getWorkspaceLabel } from '../../../common/get-workspace-label'; import { RENDER_PURPOSE_NO_RENDER } from '../../../common/render'; import * as models from '../../../models'; import type { ApiSpec } from '../../../models/api-spec'; +import getWorkspaceName from '../../../models/helpers/get-workspace-name'; import * as workspaceOperations from '../../../models/helpers/workspace-operations'; import { Project } from '../../../models/project'; import type { Workspace } from '../../../models/workspace'; @@ -15,7 +15,6 @@ import type { DocumentAction } from '../../../plugins'; import { getDocumentActions } from '../../../plugins'; import * as pluginContexts from '../../../plugins/context'; import { useLoadingRecord } from '../../hooks/use-loading-record'; -import { selectActiveWorkspaceName } from '../../redux/selectors'; import { Dropdown } from '../base/dropdown/dropdown'; import { DropdownButton } from '../base/dropdown/dropdown-button'; import { DropdownDivider } from '../base/dropdown/dropdown-divider'; @@ -34,15 +33,15 @@ const spinner = ; const useWorkspaceHandlers = ({ workspace, apiSpec }: Props) => { const handleDuplicate = useCallback(() => { - showWorkspaceDuplicateModal({ workspace }); - }, [workspace]); + showWorkspaceDuplicateModal({ workspace, apiSpec }); + }, [workspace, apiSpec]); - const activeWorkspaceName = useSelector(selectActiveWorkspaceName); + const workspaceName = getWorkspaceName(workspace, apiSpec); const handleRename = useCallback(() => { showPrompt({ title: `Rename ${getWorkspaceLabel(workspace).singular}`, - defaultValue: activeWorkspaceName, + defaultValue: workspaceName, submitName: 'Rename', selectText: true, label: 'Name', @@ -50,13 +49,13 @@ const useWorkspaceHandlers = ({ workspace, apiSpec }: Props) => { await workspaceOperations.rename(workspace, apiSpec, name); }, }); - }, [apiSpec, workspace, activeWorkspaceName]); + }, [apiSpec, workspace, workspaceName]); const handleDelete = useCallback(() => { const label = getWorkspaceLabel(workspace); showModal(AskModal, { title: `Delete ${label.singular}`, - message: `Do you really want to delete "${activeWorkspaceName}"?`, + message: `Do you really want to delete "${workspaceName}"?`, yesText: 'Yes', noText: 'Cancel', onDone: async (isYes: boolean) => { @@ -68,7 +67,7 @@ const useWorkspaceHandlers = ({ workspace, apiSpec }: Props) => { await models.workspace.remove(workspace); }, }); - }, [workspace, activeWorkspaceName]); + }, [workspace, workspaceName]); return { handleDelete, handleDuplicate, handleRename }; }; diff --git a/packages/insomnia-app/app/ui/components/modals/workspace-duplicate-modal.tsx b/packages/insomnia-app/app/ui/components/modals/workspace-duplicate-modal.tsx index 5728d9226..ca7c9cb80 100644 --- a/packages/insomnia-app/app/ui/components/modals/workspace-duplicate-modal.tsx +++ b/packages/insomnia-app/app/ui/components/modals/workspace-duplicate-modal.tsx @@ -8,13 +8,15 @@ import { AUTOBIND_CFG } from '../../../common/constants'; import { getWorkspaceLabel } from '../../../common/get-workspace-label'; import { strings } from '../../../common/strings'; import * as models from '../../../models'; +import { ApiSpec } from '../../../models/api-spec'; +import getWorkspaceName from '../../../models/helpers/get-workspace-name'; import * as workspaceOperations from '../../../models/helpers/workspace-operations'; import { isDefaultProject, isLocalProject, isRemoteProject, Project } from '../../../models/project'; import { Workspace } from '../../../models/workspace'; import { initializeLocalBackendProjectAndMarkForSync } from '../../../sync/vcs/initialize-backend-project'; import { VCS } from '../../../sync/vcs/vcs'; import { activateWorkspace } from '../../redux/modules/workspace'; -import { selectActiveProject, selectActiveWorkspaceName, selectIsLoggedIn, selectProjects } from '../../redux/selectors'; +import { selectActiveProject, selectIsLoggedIn, selectProjects } from '../../redux/selectors'; import { Modal } from '../base/modal'; import { ModalBody } from '../base/modal-body'; import { ModalFooter } from '../base/modal-footer'; @@ -23,6 +25,7 @@ import { showModal } from '.'; interface Options { workspace: Workspace; + apiSpec: ApiSpec; onDone?: () => void; } @@ -41,7 +44,7 @@ const ProjectOption: FC = project => ( ); -const WorkspaceDuplicateModalInternalWithRef: ForwardRefRenderFunction = ({ workspace, onDone, hide, vcs }, ref) => { +const WorkspaceDuplicateModalInternalWithRef: ForwardRefRenderFunction = ({ workspace, apiSpec, onDone, hide, vcs }, ref) => { const dispatch = useDispatch(); const projects = useSelector(selectProjects); @@ -49,7 +52,7 @@ const WorkspaceDuplicateModalInternalWithRef: ForwardRefRenderFunction({ defaultValues: { - newName: activeWorkspaceName, + newName: defaultWorkspaceName, projectId: activeProject._id, }, }); diff --git a/packages/insomnia-app/app/ui/components/modals/workspace-settings-modal.tsx b/packages/insomnia-app/app/ui/components/modals/workspace-settings-modal.tsx index f611867b8..8be0099af 100644 --- a/packages/insomnia-app/app/ui/components/modals/workspace-settings-modal.tsx +++ b/packages/insomnia-app/app/ui/components/modals/workspace-settings-modal.tsx @@ -131,8 +131,8 @@ export class UnconnectedWorkspaceSettingsModal extends PureComponent Date: Thu, 28 Oct 2021 09:45:21 +1300 Subject: [PATCH 13/14] bump version --- packages/insomnia-app/config/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/insomnia-app/config/config.json b/packages/insomnia-app/config/config.json index 3e35f6486..2154918d6 100644 --- a/packages/insomnia-app/config/config.json +++ b/packages/insomnia-app/config/config.json @@ -1,5 +1,5 @@ { - "version": "2021.6.0-alpha.7", + "version": "2021.6.0", "name": "insomnia", "executableName": "insomnia", "appId": "com.insomnia.app", From e02e5d404fbfda077c9e6ffaf9b28a3171d58f1d Mon Sep 17 00:00:00 2001 From: Opender Singh Date: Thu, 28 Oct 2021 09:47:44 +1300 Subject: [PATCH 14/14] version packages lib@2.4.0 --- lerna.json | 2 +- packages/insomnia-app/package-lock.json | 2 +- packages/insomnia-app/package.json | 52 +++++++++---------- packages/insomnia-common/package-lock.json | 2 +- packages/insomnia-common/package.json | 2 +- .../insomnia-components/package-lock.json | 2 +- packages/insomnia-components/package.json | 2 +- packages/insomnia-config/package-lock.json | 2 +- packages/insomnia-config/package.json | 4 +- packages/insomnia-cookies/package-lock.json | 2 +- packages/insomnia-cookies/package.json | 2 +- packages/insomnia-importers/package-lock.json | 2 +- packages/insomnia-importers/package.json | 2 +- packages/insomnia-inso/package-lock.json | 2 +- packages/insomnia-inso/package.json | 32 ++++++------ packages/insomnia-prettify/package.json | 2 +- .../insomnia-send-request/package-lock.json | 2 +- packages/insomnia-send-request/package.json | 12 ++--- .../insomnia-smoke-test/package-lock.json | 2 +- packages/insomnia-smoke-test/package.json | 2 +- packages/insomnia-testing/package-lock.json | 2 +- packages/insomnia-testing/package.json | 2 +- packages/insomnia-url/package.json | 2 +- packages/insomnia-xpath/package-lock.json | 2 +- packages/insomnia-xpath/package.json | 4 +- packages/openapi-2-kong/package-lock.json | 2 +- packages/openapi-2-kong/package.json | 2 +- .../insomnia-plugin-base64/package-lock.json | 2 +- plugins/insomnia-plugin-base64/package.json | 2 +- .../package-lock.json | 2 +- .../insomnia-plugin-cookie-jar/package.json | 4 +- .../package-lock.json | 2 +- .../insomnia-plugin-core-themes/package.json | 2 +- .../package-lock.json | 2 +- .../package.json | 2 +- .../insomnia-plugin-file/package-lock.json | 2 +- plugins/insomnia-plugin-file/package.json | 2 +- .../insomnia-plugin-hash/package-lock.json | 2 +- plugins/insomnia-plugin-hash/package.json | 2 +- .../package-lock.json | 2 +- plugins/insomnia-plugin-jsonpath/package.json | 2 +- .../package-lock.json | 2 +- .../package.json | 4 +- .../package-lock.json | 2 +- .../package.json | 4 +- .../package-lock.json | 2 +- .../insomnia-plugin-kong-portal/package.json | 4 +- plugins/insomnia-plugin-now/package-lock.json | 2 +- plugins/insomnia-plugin-now/package.json | 2 +- plugins/insomnia-plugin-os/package-lock.json | 2 +- plugins/insomnia-plugin-os/package.json | 2 +- .../insomnia-plugin-prompt/package-lock.json | 2 +- plugins/insomnia-plugin-prompt/package.json | 2 +- .../insomnia-plugin-request/package-lock.json | 2 +- plugins/insomnia-plugin-request/package.json | 6 +-- .../package-lock.json | 2 +- plugins/insomnia-plugin-response/package.json | 4 +- .../insomnia-plugin-uuid/package-lock.json | 2 +- plugins/insomnia-plugin-uuid/package.json | 2 +- 59 files changed, 113 insertions(+), 113 deletions(-) diff --git a/lerna.json b/lerna.json index 12e219690..75253061d 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "tagVersionPrefix": "lib@", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "includeMergedTags": true, "command": { "version": { diff --git a/packages/insomnia-app/package-lock.json b/packages/insomnia-app/package-lock.json index f267334a8..0cdc2076f 100644 --- a/packages/insomnia-app/package-lock.json +++ b/packages/insomnia-app/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-app", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-app/package.json b/packages/insomnia-app/package.json index 9da422671..76c1371e2 100644 --- a/packages/insomnia-app/package.json +++ b/packages/insomnia-app/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "2.4.0-alpha.1", + "version": "2.4.0", "name": "insomnia-app", "homepage": "https://konghq.com", "description": "The Collaborative API Design Tool", @@ -100,30 +100,30 @@ "html-entities": "^1.2.0", "httpsnippet": "^1.23.0", "iconv-lite": "^0.4.15", - "insomnia-common": "2.4.0-alpha.1", - "insomnia-components": "2.4.0-alpha.1", - "insomnia-config": "2.4.0-alpha.1", - "insomnia-cookies": "2.4.0-alpha.1", - "insomnia-importers": "2.4.0-alpha.1", - "insomnia-plugin-base64": "2.4.0-alpha.1", - "insomnia-plugin-cookie-jar": "2.4.0-alpha.1", - "insomnia-plugin-core-themes": "2.4.0-alpha.1", - "insomnia-plugin-file": "2.4.0-alpha.1", - "insomnia-plugin-hash": "2.4.0-alpha.1", - "insomnia-plugin-jsonpath": "2.4.0-alpha.1", - "insomnia-plugin-kong-declarative-config": "2.4.0-alpha.1", - "insomnia-plugin-kong-kubernetes-config": "2.4.0-alpha.1", - "insomnia-plugin-kong-portal": "2.4.0-alpha.1", - "insomnia-plugin-now": "2.4.0-alpha.1", - "insomnia-plugin-os": "2.4.0-alpha.1", - "insomnia-plugin-prompt": "2.4.0-alpha.1", - "insomnia-plugin-request": "2.4.0-alpha.1", - "insomnia-plugin-response": "2.4.0-alpha.1", - "insomnia-plugin-uuid": "2.4.0-alpha.1", - "insomnia-prettify": "2.4.0-alpha.1", - "insomnia-testing": "2.4.0-alpha.1", - "insomnia-url": "2.4.0-alpha.1", - "insomnia-xpath": "2.4.0-alpha.1", + "insomnia-common": "2.4.0", + "insomnia-components": "2.4.0", + "insomnia-config": "2.4.0", + "insomnia-cookies": "2.4.0", + "insomnia-importers": "2.4.0", + "insomnia-plugin-base64": "2.4.0", + "insomnia-plugin-cookie-jar": "2.4.0", + "insomnia-plugin-core-themes": "2.4.0", + "insomnia-plugin-file": "2.4.0", + "insomnia-plugin-hash": "2.4.0", + "insomnia-plugin-jsonpath": "2.4.0", + "insomnia-plugin-kong-declarative-config": "2.4.0", + "insomnia-plugin-kong-kubernetes-config": "2.4.0", + "insomnia-plugin-kong-portal": "2.4.0", + "insomnia-plugin-now": "2.4.0", + "insomnia-plugin-os": "2.4.0", + "insomnia-plugin-prompt": "2.4.0", + "insomnia-plugin-request": "2.4.0", + "insomnia-plugin-response": "2.4.0", + "insomnia-plugin-uuid": "2.4.0", + "insomnia-prettify": "2.4.0", + "insomnia-testing": "2.4.0", + "insomnia-url": "2.4.0", + "insomnia-xpath": "2.4.0", "isomorphic-git": "^1.8.1", "js-yaml": "^3.14.1", "jshint": "^2.11.1", @@ -142,7 +142,7 @@ "nunjucks": "^3.2.0", "oauth-1.0a": "^2.2.2", "objectpath": "^2.0.0", - "openapi-2-kong": "2.4.0-alpha.1", + "openapi-2-kong": "2.4.0", "papaparse": "^5.2.0", "pdfjs-dist": "^2.5.207", "prettier": "2.4.1", diff --git a/packages/insomnia-common/package-lock.json b/packages/insomnia-common/package-lock.json index 1493f98bd..0fea2b002 100644 --- a/packages/insomnia-common/package-lock.json +++ b/packages/insomnia-common/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-common", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-common/package.json b/packages/insomnia-common/package.json index acee29b5e..4524c847e 100644 --- a/packages/insomnia-common/package.json +++ b/packages/insomnia-common/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-common", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "homepage": "https://insomnia.rest", "description": "Top-level entities and utilities for Insomnia", "author": "Kong ", diff --git a/packages/insomnia-components/package-lock.json b/packages/insomnia-components/package-lock.json index e9b3de4d9..46d922e23 100644 --- a/packages/insomnia-components/package-lock.json +++ b/packages/insomnia-components/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-components", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-components/package.json b/packages/insomnia-components/package.json index 6fddd6e62..5ca021127 100644 --- a/packages/insomnia-components/package.json +++ b/packages/insomnia-components/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-components", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Insomnia UI component library", "license": "MIT", diff --git a/packages/insomnia-config/package-lock.json b/packages/insomnia-config/package-lock.json index 0250caebd..dcd520c95 100644 --- a/packages/insomnia-config/package-lock.json +++ b/packages/insomnia-config/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-config", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-config/package.json b/packages/insomnia-config/package.json index d73169ef5..8a45b5e02 100644 --- a/packages/insomnia-config/package.json +++ b/packages/insomnia-config/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-config", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "homepage": "https://insomnia.rest", "description": "Configuration for Insomnia", "author": "Kong ", @@ -29,7 +29,7 @@ "dependencies": { "@apideck/better-ajv-errors": "^0.2.6", "ajv": "^8.6.2", - "insomnia-common": "2.4.0-alpha.1" + "insomnia-common": "2.4.0" }, "devDependencies": { "jest": "^26.6.3", diff --git a/packages/insomnia-cookies/package-lock.json b/packages/insomnia-cookies/package-lock.json index 214b7495d..92a8accc6 100644 --- a/packages/insomnia-cookies/package-lock.json +++ b/packages/insomnia-cookies/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-cookies", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-cookies/package.json b/packages/insomnia-cookies/package.json index 9902baabb..a689b0e45 100644 --- a/packages/insomnia-cookies/package.json +++ b/packages/insomnia-cookies/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-cookies", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Cookie utilities", "license": "MIT", diff --git a/packages/insomnia-importers/package-lock.json b/packages/insomnia-importers/package-lock.json index dd7bd1819..802693bfb 100644 --- a/packages/insomnia-importers/package-lock.json +++ b/packages/insomnia-importers/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-importers", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-importers/package.json b/packages/insomnia-importers/package.json index 6080319d9..be5b93cd1 100755 --- a/packages/insomnia-importers/package.json +++ b/packages/insomnia-importers/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-importers", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Various data importers for Insomnia", "license": "MIT", diff --git a/packages/insomnia-inso/package-lock.json b/packages/insomnia-inso/package-lock.json index 7fcf006c5..8bd404e68 100644 --- a/packages/insomnia-inso/package-lock.json +++ b/packages/insomnia-inso/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-inso", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-inso/package.json b/packages/insomnia-inso/package.json index 52826b5df..c4f55c424 100644 --- a/packages/insomnia-inso/package.json +++ b/packages/insomnia-inso/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-inso", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "homepage": "https://insomnia.rest", "description": "A CLI for Insomnia - The Collaborative API Design Tool", "author": "Kong ", @@ -73,24 +73,24 @@ "consola": "^2.15.0", "cosmiconfig": "^6.0.0", "enquirer": "^2.3.6", - "insomnia-plugin-base64": "2.4.0-alpha.1", - "insomnia-plugin-cookie-jar": "2.4.0-alpha.1", - "insomnia-plugin-core-themes": "2.4.0-alpha.1", - "insomnia-plugin-file": "2.4.0-alpha.1", - "insomnia-plugin-hash": "2.4.0-alpha.1", - "insomnia-plugin-jsonpath": "2.4.0-alpha.1", - "insomnia-plugin-now": "2.4.0-alpha.1", - "insomnia-plugin-os": "2.4.0-alpha.1", - "insomnia-plugin-prompt": "2.4.0-alpha.1", - "insomnia-plugin-request": "2.4.0-alpha.1", - "insomnia-plugin-response": "2.4.0-alpha.1", - "insomnia-plugin-uuid": "2.4.0-alpha.1", - "insomnia-send-request": "2.4.0-alpha.1", - "insomnia-testing": "2.4.0-alpha.1", + "insomnia-plugin-base64": "2.4.0", + "insomnia-plugin-cookie-jar": "2.4.0", + "insomnia-plugin-core-themes": "2.4.0", + "insomnia-plugin-file": "2.4.0", + "insomnia-plugin-hash": "2.4.0", + "insomnia-plugin-jsonpath": "2.4.0", + "insomnia-plugin-now": "2.4.0", + "insomnia-plugin-os": "2.4.0", + "insomnia-plugin-prompt": "2.4.0", + "insomnia-plugin-request": "2.4.0", + "insomnia-plugin-response": "2.4.0", + "insomnia-plugin-uuid": "2.4.0", + "insomnia-send-request": "2.4.0", + "insomnia-testing": "2.4.0", "lodash.flattendeep": "^4.4.0", "mkdirp": "^1.0.4", "nedb": "^1.8.0", - "openapi-2-kong": "2.4.0-alpha.1", + "openapi-2-kong": "2.4.0", "ramda": "^0.27.1", "ramda-adjunct": "^2.33.0", "string-argv": "^0.3.1", diff --git a/packages/insomnia-prettify/package.json b/packages/insomnia-prettify/package.json index 90772adca..242a5c54d 100644 --- a/packages/insomnia-prettify/package.json +++ b/packages/insomnia-prettify/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-prettify", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Prettification utilities for Insomnia", "license": "MIT", diff --git a/packages/insomnia-send-request/package-lock.json b/packages/insomnia-send-request/package-lock.json index c1fa1451f..073904a45 100644 --- a/packages/insomnia-send-request/package-lock.json +++ b/packages/insomnia-send-request/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-send-request", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-send-request/package.json b/packages/insomnia-send-request/package.json index 9fe1e6ae1..5920c0d86 100644 --- a/packages/insomnia-send-request/package.json +++ b/packages/insomnia-send-request/package.json @@ -1,7 +1,7 @@ { "name": "insomnia-send-request", "license": "Apache-2.0", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "main": "dist/index.js", "types": "dist/send-request/index.d.ts", @@ -18,10 +18,10 @@ "hkdf": "0.0.2", "html-entities": "^1.3.1", "httpsnippet": "^1.22.0", - "insomnia-common": "2.4.0-alpha.1", - "insomnia-config": "2.4.0-alpha.1", - "insomnia-importers": "2.4.0-alpha.1", - "insomnia-testing": "2.4.0-alpha.1", + "insomnia-common": "2.4.0", + "insomnia-config": "2.4.0", + "insomnia-importers": "2.4.0", + "insomnia-testing": "2.4.0", "isomorphic-git": "^1.5.0", "jshint": "^2.11.1", "jsonlint": "^1.6.3", @@ -35,7 +35,7 @@ "node-libcurl": "2.3.3", "nunjucks": "^3.2.1", "oauth-1.0a": "^2.2.6", - "openapi-2-kong": "2.4.0-alpha.1", + "openapi-2-kong": "2.4.0", "ramda": "^0.27.1", "ramda-adjunct": "^2.33.0", "tough-cookie": "^4.0.0", diff --git a/packages/insomnia-smoke-test/package-lock.json b/packages/insomnia-smoke-test/package-lock.json index 3bac92359..362b6d0fa 100644 --- a/packages/insomnia-smoke-test/package-lock.json +++ b/packages/insomnia-smoke-test/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-smoke-test", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-smoke-test/package.json b/packages/insomnia-smoke-test/package.json index 979d312a8..9c5bcce01 100644 --- a/packages/insomnia-smoke-test/package.json +++ b/packages/insomnia-smoke-test/package.json @@ -11,7 +11,7 @@ "bugs": { "url": "https://github.com/kong/insomnia/issues" }, - "version": "2.4.0-alpha.1", + "version": "2.4.0", "scripts": { "bootstrap": "npm run build", "lint": "eslint . --ext .js,.ts,.tsx", diff --git a/packages/insomnia-testing/package-lock.json b/packages/insomnia-testing/package-lock.json index 2c66bebf8..752ad6340 100644 --- a/packages/insomnia-testing/package-lock.json +++ b/packages/insomnia-testing/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-testing", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-testing/package.json b/packages/insomnia-testing/package.json index e81a1660a..826ded6e2 100644 --- a/packages/insomnia-testing/package.json +++ b/packages/insomnia-testing/package.json @@ -1,7 +1,7 @@ { "name": "insomnia-testing", "license": "Apache-2.0", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "repository": { "type": "git", diff --git a/packages/insomnia-url/package.json b/packages/insomnia-url/package.json index 6f147643a..c279ecc74 100644 --- a/packages/insomnia-url/package.json +++ b/packages/insomnia-url/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-url", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "URL Utilities", "license": "MIT", diff --git a/packages/insomnia-xpath/package-lock.json b/packages/insomnia-xpath/package-lock.json index 4f04e1300..037a39ccb 100644 --- a/packages/insomnia-xpath/package-lock.json +++ b/packages/insomnia-xpath/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-xpath", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/insomnia-xpath/package.json b/packages/insomnia-xpath/package.json index 4c5c607bc..e476d4fc3 100644 --- a/packages/insomnia-xpath/package.json +++ b/packages/insomnia-xpath/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-xpath", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Query XML using XPath", "license": "MIT", @@ -32,7 +32,7 @@ "@types/xmldom": "0.1.30" }, "dependencies": { - "insomnia-cookies": "2.4.0-alpha.1", + "insomnia-cookies": "2.4.0", "xmldom": "^0.5.0", "xpath": "0.0.27" }, diff --git a/packages/openapi-2-kong/package-lock.json b/packages/openapi-2-kong/package-lock.json index cbb9cea9c..5dfeb850e 100644 --- a/packages/openapi-2-kong/package-lock.json +++ b/packages/openapi-2-kong/package-lock.json @@ -1,6 +1,6 @@ { "name": "openapi-2-kong", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/openapi-2-kong/package.json b/packages/openapi-2-kong/package.json index 7c1e1f9bd..86f47f959 100644 --- a/packages/openapi-2-kong/package.json +++ b/packages/openapi-2-kong/package.json @@ -1,7 +1,7 @@ { "name": "openapi-2-kong", "license": "Apache-2.0", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/plugins/insomnia-plugin-base64/package-lock.json b/plugins/insomnia-plugin-base64/package-lock.json index 4e45232ab..96877c9b5 100644 --- a/plugins/insomnia-plugin-base64/package-lock.json +++ b/plugins/insomnia-plugin-base64/package-lock.json @@ -1,5 +1,5 @@ { "name": "insomnia-plugin-base64", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1 } diff --git a/plugins/insomnia-plugin-base64/package.json b/plugins/insomnia-plugin-base64/package.json index a976fcf00..a30c9f99e 100644 --- a/plugins/insomnia-plugin-base64/package.json +++ b/plugins/insomnia-plugin-base64/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-base64", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Insomnia base64 template tag", "license": "MIT", diff --git a/plugins/insomnia-plugin-cookie-jar/package-lock.json b/plugins/insomnia-plugin-cookie-jar/package-lock.json index 4f0e82ed8..36e465569 100644 --- a/plugins/insomnia-plugin-cookie-jar/package-lock.json +++ b/plugins/insomnia-plugin-cookie-jar/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-cookie-jar", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-cookie-jar/package.json b/plugins/insomnia-plugin-cookie-jar/package.json index 2bc84868e..798f852d0 100644 --- a/plugins/insomnia-plugin-cookie-jar/package.json +++ b/plugins/insomnia-plugin-cookie-jar/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-cookie-jar", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "contributors": [ { @@ -28,7 +28,7 @@ "test": "jest --silent" }, "dependencies": { - "insomnia-cookies": "2.4.0-alpha.1" + "insomnia-cookies": "2.4.0" }, "gitHead": "e46bf021cf4b4379e31d2b2d9025d476d6839fa1" } diff --git a/plugins/insomnia-plugin-core-themes/package-lock.json b/plugins/insomnia-plugin-core-themes/package-lock.json index 0a4d31b0e..a4ba5e2ea 100644 --- a/plugins/insomnia-plugin-core-themes/package-lock.json +++ b/plugins/insomnia-plugin-core-themes/package-lock.json @@ -1,5 +1,5 @@ { "name": "insomnia-plugin-core-themes", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1 } diff --git a/plugins/insomnia-plugin-core-themes/package.json b/plugins/insomnia-plugin-core-themes/package.json index 1a6339800..241e07f77 100644 --- a/plugins/insomnia-plugin-core-themes/package.json +++ b/plugins/insomnia-plugin-core-themes/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-core-themes", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Insomnia core themes", "license": "MIT", diff --git a/plugins/insomnia-plugin-default-headers/package-lock.json b/plugins/insomnia-plugin-default-headers/package-lock.json index ec44658c0..077c33350 100644 --- a/plugins/insomnia-plugin-default-headers/package-lock.json +++ b/plugins/insomnia-plugin-default-headers/package-lock.json @@ -1,5 +1,5 @@ { "name": "insomnia-plugin-default-headers", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1 } diff --git a/plugins/insomnia-plugin-default-headers/package.json b/plugins/insomnia-plugin-default-headers/package.json index acf8d2c88..1488221bc 100644 --- a/plugins/insomnia-plugin-default-headers/package.json +++ b/plugins/insomnia-plugin-default-headers/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-default-headers", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Various data importers for Insomnia", "license": "MIT", diff --git a/plugins/insomnia-plugin-file/package-lock.json b/plugins/insomnia-plugin-file/package-lock.json index f75cbd029..0ea1bb524 100644 --- a/plugins/insomnia-plugin-file/package-lock.json +++ b/plugins/insomnia-plugin-file/package-lock.json @@ -1,5 +1,5 @@ { "name": "insomnia-plugin-file", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1 } diff --git a/plugins/insomnia-plugin-file/package.json b/plugins/insomnia-plugin-file/package.json index 21764a635..412ed1220 100644 --- a/plugins/insomnia-plugin-file/package.json +++ b/plugins/insomnia-plugin-file/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-file", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Insomnia file templte tag", "license": "MIT", diff --git a/plugins/insomnia-plugin-hash/package-lock.json b/plugins/insomnia-plugin-hash/package-lock.json index 7efaa8dfa..41810b6e0 100644 --- a/plugins/insomnia-plugin-hash/package-lock.json +++ b/plugins/insomnia-plugin-hash/package-lock.json @@ -1,5 +1,5 @@ { "name": "insomnia-plugin-hash", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1 } diff --git a/plugins/insomnia-plugin-hash/package.json b/plugins/insomnia-plugin-hash/package.json index e48bfe09a..741ee12f3 100644 --- a/plugins/insomnia-plugin-hash/package.json +++ b/plugins/insomnia-plugin-hash/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-hash", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Insomnia hash template tag", "license": "MIT", diff --git a/plugins/insomnia-plugin-jsonpath/package-lock.json b/plugins/insomnia-plugin-jsonpath/package-lock.json index 2c3ee27d2..b94a266dc 100644 --- a/plugins/insomnia-plugin-jsonpath/package-lock.json +++ b/plugins/insomnia-plugin-jsonpath/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-jsonpath", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-jsonpath/package.json b/plugins/insomnia-plugin-jsonpath/package.json index 0cb9b76e2..a65877ce5 100644 --- a/plugins/insomnia-plugin-jsonpath/package.json +++ b/plugins/insomnia-plugin-jsonpath/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-jsonpath", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Template tag to pull data from JSON strings", "license": "MIT", diff --git a/plugins/insomnia-plugin-kong-declarative-config/package-lock.json b/plugins/insomnia-plugin-kong-declarative-config/package-lock.json index deb126d3a..2be5f1df0 100644 --- a/plugins/insomnia-plugin-kong-declarative-config/package-lock.json +++ b/plugins/insomnia-plugin-kong-declarative-config/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-kong-declarative-config", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-kong-declarative-config/package.json b/plugins/insomnia-plugin-kong-declarative-config/package.json index ca182936e..95c4d7302 100644 --- a/plugins/insomnia-plugin-kong-declarative-config/package.json +++ b/plugins/insomnia-plugin-kong-declarative-config/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-kong-declarative-config", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "main": "index.js", "author": "Kong ", "license": "Apache-2.0", @@ -17,7 +17,7 @@ "description": "Generate Kong Declarative Config" }, "dependencies": { - "openapi-2-kong": "2.4.0-alpha.1", + "openapi-2-kong": "2.4.0", "yaml": "^1.8.3" }, "gitHead": "d91e6735a76295166545a42c170328da4ab70dd3" diff --git a/plugins/insomnia-plugin-kong-kubernetes-config/package-lock.json b/plugins/insomnia-plugin-kong-kubernetes-config/package-lock.json index 5075421e1..e58a0b24c 100644 --- a/plugins/insomnia-plugin-kong-kubernetes-config/package-lock.json +++ b/plugins/insomnia-plugin-kong-kubernetes-config/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-kong-kubernetes-config", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-kong-kubernetes-config/package.json b/plugins/insomnia-plugin-kong-kubernetes-config/package.json index 3da426993..7e764d14e 100644 --- a/plugins/insomnia-plugin-kong-kubernetes-config/package.json +++ b/plugins/insomnia-plugin-kong-kubernetes-config/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-kong-kubernetes-config", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "main": "index.js", "author": "Kong ", "license": "Apache-2.0", @@ -17,7 +17,7 @@ "description": "Generate Kong For Kubernetes configuration" }, "dependencies": { - "openapi-2-kong": "2.4.0-alpha.1", + "openapi-2-kong": "2.4.0", "yaml": "^1.8.3" }, "gitHead": "d91e6735a76295166545a42c170328da4ab70dd3" diff --git a/plugins/insomnia-plugin-kong-portal/package-lock.json b/plugins/insomnia-plugin-kong-portal/package-lock.json index 2305ff51e..6f4a3dba8 100644 --- a/plugins/insomnia-plugin-kong-portal/package-lock.json +++ b/plugins/insomnia-plugin-kong-portal/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-kong-portal", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-kong-portal/package.json b/plugins/insomnia-plugin-kong-portal/package.json index 658301008..95e43d2b7 100644 --- a/plugins/insomnia-plugin-kong-portal/package.json +++ b/plugins/insomnia-plugin-kong-portal/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-kong-portal", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "main": "dist/index.js", "author": "Kong ", "license": "Apache-2.0", @@ -30,7 +30,7 @@ "@babel/preset-flow": "^7.9.0", "@babel/preset-react": "^7.9.4", "autobind-decorator": "^2.4.0", - "insomnia-components": "2.4.0-alpha.1", + "insomnia-components": "2.4.0", "react": "^16.8.3", "react-dom": "^16.8.3", "styled-components": "^4.4.1", diff --git a/plugins/insomnia-plugin-now/package-lock.json b/plugins/insomnia-plugin-now/package-lock.json index 01a43c1dd..2aa93cafa 100644 --- a/plugins/insomnia-plugin-now/package-lock.json +++ b/plugins/insomnia-plugin-now/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-now", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-now/package.json b/plugins/insomnia-plugin-now/package.json index ddefd9d3a..3de666f5e 100644 --- a/plugins/insomnia-plugin-now/package.json +++ b/plugins/insomnia-plugin-now/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-now", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Insomnia now template tag", "license": "MIT", diff --git a/plugins/insomnia-plugin-os/package-lock.json b/plugins/insomnia-plugin-os/package-lock.json index d84e55425..f189cfe97 100644 --- a/plugins/insomnia-plugin-os/package-lock.json +++ b/plugins/insomnia-plugin-os/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-os", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-os/package.json b/plugins/insomnia-plugin-os/package.json index c2555dac2..c3f5a57cc 100644 --- a/plugins/insomnia-plugin-os/package.json +++ b/plugins/insomnia-plugin-os/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-os", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Template tag to get information about the OS", "license": "MIT", diff --git a/plugins/insomnia-plugin-prompt/package-lock.json b/plugins/insomnia-plugin-prompt/package-lock.json index f2e8818e4..55dc61c78 100644 --- a/plugins/insomnia-plugin-prompt/package-lock.json +++ b/plugins/insomnia-plugin-prompt/package-lock.json @@ -1,5 +1,5 @@ { "name": "insomnia-plugin-prompt", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1 } diff --git a/plugins/insomnia-plugin-prompt/package.json b/plugins/insomnia-plugin-prompt/package.json index 4d0eff64d..994597688 100644 --- a/plugins/insomnia-plugin-prompt/package.json +++ b/plugins/insomnia-plugin-prompt/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-prompt", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Insomnia prompt template tag", "license": "MIT", diff --git a/plugins/insomnia-plugin-request/package-lock.json b/plugins/insomnia-plugin-request/package-lock.json index 5d2c4f9b9..15f273895 100644 --- a/plugins/insomnia-plugin-request/package-lock.json +++ b/plugins/insomnia-plugin-request/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-request", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-request/package.json b/plugins/insomnia-plugin-request/package.json index 6ce563bce..84282c892 100644 --- a/plugins/insomnia-plugin-request/package.json +++ b/plugins/insomnia-plugin-request/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-request", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Insomnia request template tag", "license": "MIT", @@ -22,8 +22,8 @@ "test": "jest --silent" }, "dependencies": { - "insomnia-cookies": "2.4.0-alpha.1", - "insomnia-url": "2.4.0-alpha.1" + "insomnia-cookies": "2.4.0", + "insomnia-url": "2.4.0" }, "gitHead": "d91e6735a76295166545a42c170328da4ab70dd3" } diff --git a/plugins/insomnia-plugin-response/package-lock.json b/plugins/insomnia-plugin-response/package-lock.json index 20a071857..7079cc19c 100644 --- a/plugins/insomnia-plugin-response/package-lock.json +++ b/plugins/insomnia-plugin-response/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-response", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-response/package.json b/plugins/insomnia-plugin-response/package.json index 24dbdb240..988f6f4b0 100644 --- a/plugins/insomnia-plugin-response/package.json +++ b/plugins/insomnia-plugin-response/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-response", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Insomnia response template tag", "license": "MIT", @@ -23,7 +23,7 @@ }, "dependencies": { "iconv-lite": "^0.4.19", - "insomnia-xpath": "2.4.0-alpha.1", + "insomnia-xpath": "2.4.0", "jsonpath-plus": "^6.0.1" }, "gitHead": "e46bf021cf4b4379e31d2b2d9025d476d6839fa1" diff --git a/plugins/insomnia-plugin-uuid/package-lock.json b/plugins/insomnia-plugin-uuid/package-lock.json index 0489c0a67..951fe2858 100644 --- a/plugins/insomnia-plugin-uuid/package-lock.json +++ b/plugins/insomnia-plugin-uuid/package-lock.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-uuid", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/plugins/insomnia-plugin-uuid/package.json b/plugins/insomnia-plugin-uuid/package.json index 47fa79a50..ca6569612 100644 --- a/plugins/insomnia-plugin-uuid/package.json +++ b/plugins/insomnia-plugin-uuid/package.json @@ -1,6 +1,6 @@ { "name": "insomnia-plugin-uuid", - "version": "2.4.0-alpha.1", + "version": "2.4.0", "author": "Kong ", "description": "Insomnia uuid template tag", "license": "MIT",