Commit Graph

59 Commits

Author SHA1 Message Date
Filipe Freire
45704e43f1
Fix inso cli lint fail on relative path INS-2219 (#5541)
* Investigating inso cli lint spec error INS-2219

* force absolute path

* Revert "Investigating inso cli lint spec error INS-2219"

This reverts commit eb7a3fd7c3.

* fix tests

* fix test

* fix path in test

* fix test

* fix test
2022-12-16 15:25:46 +00:00
Jack Kavanagh
ed34090384
Support custom spectral ruleset in inso (#5488)
* first pass

* package lock

* provided ruleset is not an object

* works

* support multiple extensions

* fix test

* lower coverage threshold

* remove unused test

* remove only
2022-12-14 12:47:28 +01:00
Filipe Freire
4fa2e4e81e
[INS-2119] Inso CLI logging parity (#5408)
* [INS-2119] Inso CLI logging parity

* fix bootstrap
2022-11-15 16:49:31 +00:00
Jack Kavanagh
fb97b17e50
Remove/ramda (#5412)
* remove ramda

* wip groupby

* remove last ramda

* fix sort projects

* fix lowercase

* feeling like giving up

* clean up groupBy

* simplify dropdown

* yep ignore types

* fixed monkey settings

* remove ramda

* package locks
2022-11-15 15:42:40 +00:00
mod42
88b940321e
Additional option "skipAnnotations" for the export of spec (#5398)
* I added an additional option "skipAnnotations" for the export of spec. When we export the spec and the user wants to share the spec with others,
outside the organization, the annotations reveal sensitive information about the configuration of
the kong gateway, like client_ids and
clients_secrets. If the flag -s is set, all x-kong-*
annotations are removed. I also adjusted the tests.

* fix lint

* Fix ouput when not saving to file

Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2022-11-09 16:29:26 +00:00
Dimitri Mitropoulos
c6a17d8a3e
chore: single letter variables (#4848) 2022-06-08 12:27:21 -04:00
Filipe Freire
0517a0c103
chore: Upgrade Spectral (new clean attempt) (#4834)
* Upgrade Spectral Dep (clean attempt)

* Add smoke test for OpenAPI import (INS-1425)

* Remove immer and unnecessary await
2022-06-03 11:44:54 +01:00
Dimitri Mitropoulos
cc9f11be30
chore(build): move insomnia-inso to esbuild (#4806) 2022-05-25 09:58:28 -04:00
Dimitri Mitropoulos
8bc653388c
chore(deps) @jest/globals for insomnia (#4798) 2022-05-20 07:05:25 -04:00
Dimitri Mitropoulos
6e5476de70
chore(deps) updates (all but insomnia) to use @jest/globals (#4793) 2022-05-18 17:27:31 -04:00
Dimitri Mitropoulos
213e1dd1c8
rename insomnia-app/app to insomnia/src (#4491) 2022-04-20 17:42:19 +00:00
Dimitri Mitropoulos
305df5109b
removes duplicated "config.longName" (#4706) 2022-04-19 16:03:52 -04:00
Dimitri Mitropoulos
727c1f3366
chore: bracket lint rules (#4694) 2022-04-13 17:04:29 -04:00
Dimitri Mitropoulos
58ab0c636d
chore(deps): reselect (#4620) 2022-03-22 15:21:32 -04:00
CommanderRoot
600e0af1fd
Replace deprecated String.prototype.substr() (#4578)
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2022-03-17 16:48:05 +00:00
Filipe Freire
b3aa6b9cec
Easier Alpha/Beta/Stable releases (INS-1435) (#4516)
Co-authored-by: David Marby <david@dmarby.se>
2022-03-09 16:06:53 +01:00
Dimitri Mitropoulos
29479b8bcf
removes lodash (#4550) 2022-03-08 14:28:37 +00:00
Jack Kavanagh
1f05683fad
Chore/upgrade-electron-17 (#4529)
* bump node, electron, libcurl

* bump electron-builder

* stub performance, because inso imports react

* bump @types/node

* match up builder versions

* Disable consent prompts for oidc server

* bump electron and libcurl to latest

* waitForCookies for oauth tests

* Bump NodeJS to 16.13.0

* removes node 14 hack for BufferEncoding

* Replace oidc-provider html interaction pages with a simple html form

* make document cookie wait explicit

Co-authored-by: David Marby <david@dmarby.se>
2022-03-07 13:10:35 +00:00
Jack Kavanagh
8585eea9e6
electron v15 pre-upgrade refactoring (#4524)
* now with 100% fat free cancellation

Co-authored-by: James Gatz <jamesgatzos@gmail.com>

* unblock electron 15

* fix cookielist and temp fix curl types

* fix types

* fix inso

* default to verbose inso test

* implement readdata function

* fix test

* revert test changes

* isomorphic cancel

* reduce typing issues

* curl types

* turns out the tests were wrong

* handle errors

* remove unused inso mock

* remove request delay

* fix lint and add logs

* Revert "remove request delay"

This reverts commit f07d8c90a7a7279ca10f8a8de1ea0c82caa06390.

* simplify and add cancel fallback

* skip cancel test

* playwright is fast and insomnia is slow

* trailing spaces are serious yo

* cancel is flake town

* hmm

* unblock nunjucks and storeTimeline

* fix nunjucks tests

* preload writeFile

* oops forgot to remove the reload

* debugging CI takes all day, log stuff and pray

* also warn if nunjucks is being lame

* Stop using environment variables

* revert debugging logs

Co-authored-by: James Gatz <jamesgatzos@gmail.com>
Co-authored-by: David Marby <david@dmarby.se>
2022-03-03 13:42:04 +00:00
Dimitri Mitropoulos
4940348dd9
removes insomnia designer migration code (#4404) 2022-01-25 11:14:24 -05:00
Jack Kavanagh
c858df990d
don't eat logs in verbose mode (#4368) 2022-01-18 18:33:29 +00:00
John Chadwick
914bcf30ed
Apple M1 support (#4140)
* Apple M1 support

* Fix appUrl calculation.

* adds guard for targetPlatform

Co-Authored-By: John Chadwick <john.chadwick@konghq.com>

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2022-01-12 16:31:33 -05:00
Jack Kavanagh
21ab3dd081
Chore/upgrade-electron-12 (#4232)
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2021-12-21 13:03:36 -05:00
Jack Kavanagh
df9617ed0b
feat: add format option to inso generate config (#4203)
* feat: add json arg to inso

* feedback
2021-11-16 12:49:49 +00:00
Opender Singh
c0aaa8f64f
use explicit filename with tar (#4202) 2021-11-11 09:44:58 +13:00
Opender Singh
24d2d4d76f
use tar -J instead of tar -j (#4192) 2021-11-10 06:53:53 +13:00
James Gatz
46db5beb97
inso: use --src for loading a git dir (#4162)
* Use --src as an override to workingDir for loading a git dir

* update test snapshots
2021-11-02 09:18:47 +01:00
Opender Singh
b29a0f2602
improve wording (#4146) 2021-10-25 09:03:06 +00:00
Jack Kavanagh
e0ff79a2a6
Transform OAS -> Kong DC JSON rather than YAML (#4129)
* output JSON

* add test for declarative config

* feedback

Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2021-10-20 14:21:19 +02:00
Opender Singh
71f8393fba
Notarize raw binary (#4108) 2021-10-14 22:16:30 +00:00
Opender Singh
c3465204aa
Rename "compress" terminology to "artifacts" to be more representative (#4091) 2021-10-12 21:23:25 +00:00
Opender Singh
210db0dd01
Allow specifying a custom version for Inso (#4086) 2021-10-12 00:35:59 +00:00
Opender Singh
3b7b505c74
Inso binaries codesign & notarize on macOS (#4082) 2021-10-12 13:10:09 +13:00
Opender Singh
615287ccfc
Create single inso executable using pkg (#4049)
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2021-10-06 22:01:43 +00:00
Giuseppe B
e8551bd792
Insomnia v4 support for CLI (#3055)
* Initial draft for insomnia-adapter.js

* Added global options on cli types

* Added command description on cli

* Updating commands to support global flag

* First adapter implementation

* Fix object representation for send-request package

* Improved command description

* Fix test expected result

* Added db & adapter tests

* Improved flow on the InsomniaAdaptor

* Reverting to previous version

* Applying requested fixes

* Revised insomnia-adapter.js

* Applying requested changes

* Fixed new path for fixtures

* Introducing typescript support

* A few minor updates

* fixes from rebase

* update type mapping

* Use __dirname for fixture paths

* and tests for malformed data or unexpected version

* Update docs & use src with generate config cmd

* runs lint:fix

* minor error message copy adjustment

Co-authored-by: Opender Singh <opender.singh@konghq.com>
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2021-09-01 17:17:19 +00:00
Opender Singh
7ffc391428
add eslint rules for semi colons (#3989)
* add rules for semi colons

* run lint fix

* remove invalid eslint disable
2021-09-01 10:50:26 -04:00
Opender Singh
f48cef02bd
Update some ESLint rules (#3883) 2021-08-08 05:08:56 +00:00
Opender Singh
4dda066254
Update help text to disable cert validation (#3875)
* update help text

* fix snapshots
2021-08-05 10:39:26 +03:00
Opender Singh
706b0f076a
Disable cert validation option while running tests in inso (#3492) 2021-07-30 03:10:19 +00:00
Dimitri Mitropoulos
0178533e52
Feat/eslint import order (#3782) 2021-07-23 11:04:56 +12:00
Ross McDonald
c24d08ad66
Update Spectral to latest release (#3179) 2021-06-30 15:11:20 +00:00
Opender Singh
d7b630f17b
Add formatting ESLint rules (#3425)
* add rules

* run lint:fix

* quick manual fix for lint errors

* indent fix

* add jsx prop multiline

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2021-05-27 14:00:32 -04:00
Josh Soref
9006babd38
fix spelling (#2976) 2021-05-25 12:16:43 -04:00
Dimitri Mitropoulos
5cd52b2bc9
Fix: o2k optional tags signatures (#3416)
* removes unnecessary plugin indirection

there is no reason to have functions that literally call other functions with the same argument.  well... maybe not _no_ reason, but the one valid reason I can think of (to satisfy an abstraction's constraints) is not met here.  This serves no documentational value either because it creates indirection rather than showing what it's really doing (which is, to generate a plugin).

* reworks generatePlugins and generatePlugin signatures

adds Entry, removes optional `tags`, curries

* use option parameter syntax for generateRequestValidatorPlugin

also, many errors were occurring for OA3Operation.responses not being passed over and over again, leading me to believe it's valid to do so.

* ensures `generateOperationPlugins` has tags, uses option parameter

* removes flowtype comments

* updates readme examples along with readme function signatures

parseSpec and generate were `async` but never awaited

Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-05-25 08:26:42 -04:00
Dimitri Mitropoulos
3605bc17cc
Feat/o2k improvements (#3396)
* makes this `yaml` import match all others

for better or for worse, until we upgrade `YAML` (it's now written in TypeScript) we should probably aim for consistency.

* adds overloads so that types of package exports

it would be FAR preferable to use an object with the arguments instead because then we don't have to fall into all the traps that come with overloads, but I am avoiding changing the actual call signature of these function.

* fixes and updates types

* corrects mispelling

* removes shim types and exports actual types from openapi-2-kong

we had everything in place for the rest of the build pipeline to consume these types, but were missing the main exports at the root index.ts file

* use actual openapi-2-kong types now that they're available

* use existing variable for filePath

* extracts o2k-specific helper data to live in o2k

evidently, this data is useful for the usage of o2k, therefore o2k should be the thing exporting it.

* use KubernetesManifest for name of kubernetes manifest union

when first naming this, I didn't have much more context than the property name (documents), so after taking a look,  it's clear that these are kubernetes manifests

* removes attempt at correctly typing overloads

I will return to this, and so I'm leaving it here in a commit rather than squashing it out, but I can't see a way to get it to work without changing the signature in a big way.

* fixes error (now that there are yaml types)

* makes `K8s` vs `Kubernetes` type terminology consistent

part of the motivation for this is that there are significant things in common between the two kinds of configs, making them closer in form is therefore ideal.

* updates mistake in name per review feedback
2021-05-19 22:49:50 -04:00
Opender Singh
5525e6c87f
Allow inso generate config to specify tags (#3381)
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2021-05-14 11:30:44 +12:00
Dimitri Mitropoulos
5a1f793547
adds mocha polyfill to clear it.each errors (#3383) 2021-05-13 16:45:17 -05:00
Dimitri Mitropoulos
5f4c19da35
[TypeScript] Phase 1 & 2 (#3370)
Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-05-12 18:35:00 +12:00
David Marby
3ea65b4240
Use the correct the application data directory for inso (#3114) 2021-02-26 18:41:15 +01:00
Joe Mirizio
cf047322a9
Add specification linting for files (#2773)
Co-authored-by: Opender Singh <opender.singh@konghq.com>
2020-11-24 15:44:05 +13:00