The Wayback Machine - https://web.archive.org/web/20210609193629/https://github.com/Kong/insomnia/commits/develop
Skip to content
Permalink
develop

Commits on Jun 4, 2021

  1. Fetch and store remote spaces (#3441)

    Co-authored-by: Dimitri Mitropoulos <[email protected]>
    develohpanda and dimitropoulos committed Jun 4, 2021

Commits on Jun 1, 2021

Commits on May 27, 2021

  1. Fix issue chaining multiple requests (#3385)

    * Fix issue chaining multiple requests
    
    * refactor: use switch to prepare for leveraging exhaustiveness checking
    
    since this will be in TypeScript soon, and this was as topical a time as any to make this change.
    
    * fixes failing test with new behavior (and removes unused `fromResponseTag`)
    
    * fix tests
    
    Co-authored-by: Vincenzo De Petris <[email protected]>
    Co-authored-by: Dimitri Mitropoulos <[email protected]>
    Co-authored-by: Opender Singh <[email protected]>
    4 people committed May 27, 2021
  2. 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 <[email protected]>
    develohpanda and dimitropoulos committed May 27, 2021
  3. INS-674 - First pass at making the send button more visible (#3414)

    * INS-674 - First pass at making the send button more visible
    
    * [wip] adds rect for send button
    
    * Update colors in the SVG to match send button
    
    * Update the gRPC send button to also use theme colors
    
    * Adding left margin to send button
    
    Co-authored-by: Eric Reynolds <[email protected]>
    Co-authored-by: Dimitri Mitropoulos <[email protected]>
    Co-authored-by: Opender Singh <[email protected]>
    4 people committed May 27, 2021

Commits on May 26, 2021

  1. fix: insomnia open dialog for proto directory can't select directories (

    #3348)
    
    * fix: insomnia open dialog for proto directory can't select directories
    
    * uses a named export for selectFileOrFolder
    
    (also, removes original js file from rebase)
    
    * clears error by leveraging exhaustiveness check
    
    * fixes bug: the `name` field is actually for a file filter
    
    see the referenced pull request.
    
    As for the `extensions: ['*']`, there's no reason I can see to include a filter and then tell the filter to then accept everything.
    
    * update selectFileOrFolder mocks
    
    * use switch (for exhaustiveness checking) and type selectedFormat
    
    * removes unnecessary filters from _save_ dialog
    
    from the docs:
    > The filters specifies an array of file types that can be displayed
    
    As suspected, this is not needed.  A user is free to save it wherever they want.
    
    * adds extension to saved file
    
    not sure why this was missing before, but it appears to have been a bug
    
    * formatting updates
    
    best to "ignore whitespace" for this commit.  I did this with the hope of using the `ThunkAction` type from `redux-thunk`, but once I got them all looking good and started adding the type I quickly learned there's quite a bit more work to do in this area before we can have such a thing.  I therefore opted to just call it a day at that and take the (no-op) formatting changes and typings.
    
    * removes remaining name filters from save dialogs
    
    same reason as the 2nd to prior commit - they cause the bug
    
    Co-authored-by: Dimitri Mitropoulos <[email protected]>
    Co-authored-by: Opender Singh <[email protected]>
    3 people committed May 26, 2021

Commits on May 25, 2021

  1. [o2k] copy plugin objects as is (and respect enabled flag) (#3419)

    * clears all errors in tests, enables overrides for spec generators
    
    * removes copy/pasta in tests, uses spec generator, removes useless async
    
    continuing from the last commit, but separated out for easier review
    
    * consolidates openapi x-kong extension to one place, uses consistently
    
    these were used for some things, not used for others, exported in some places, not exported in others.  now it's uniform and we can look up references for each type.
    
    * adds failing test for ticket
    
    * only adds `enabled` where it was specified
    
    * allows adding passing top-level properties to config
    
    now, the line that was there specifically for `config` is redundant.
    
    * adds tags to test result per review feedback
    
    * removes unnecessary generic
    
    for some reason, this didn't error before, but now it is.
    
    * removes unnecessary argument
    
    this failed on the CI with:
    
    openapi-2-kong: FAIL src/generate.test.ts
    openapi-2-kong:   ● Test suite failed to run
    openapi-2-kong:     src/generate.test.ts:90:58 - error TS2769: No overload matches this call.
    openapi-2-kong:       Overload 1 of 2, '(src: string, options?: (ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions) | undefined): any', gave the following error.
    openapi-2-kong:         Argument of type '"utf8"' is not assignable to parameter of type '(ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions) | undefined'.
    openapi-2-kong:       Overload 2 of 2, '(src: string, reviver: Reviver, options?: (ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions) | undefined): any', gave the following error.
    openapi-2-kong:         Argument of type 'string' is not assignable to parameter of type 'Reviver'.
    openapi-2-kong:     90       const parsedSpec = YAML.parse(dcFixtureFileString, 'utf8');
    openapi-2-kong:                                                                 ~~~~~~
    openapi-2-kong:     src/generate.test.ts💯59 - error TS2769: No overload matches this call.
    openapi-2-kong:       Overload 1 of 2, '(src: string, options?: (ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions) | undefined): any', gave the following error.
    openapi-2-kong:         Argument of type '"utf8"' is not assignable to parameter of type '(ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions) | undefined'.
    openapi-2-kong:       Overload 2 of 2, '(src: string, reviver: Reviver, options?: (ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions) | undefined): any', gave the following error.
    openapi-2-kong:         Argument of type 'string' is not assignable to parameter of type 'Reviver'.
    openapi-2-kong:     100       const parsedSpec = YAML.parse(k8sFixtureFileString, 'utf8');
    dimitropoulos committed May 25, 2021
  2. fix spelling (#2976)

    jsoref committed May 25, 2021
  3. 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 <[email protected]>
    dimitropoulos and develohpanda committed May 25, 2021
  4. update lockfile

    develohpanda committed May 25, 2021

Commits on May 24, 2021

  1. Fix the Purple theme to be the same as it was before single app (#3418)

    Co-authored-by: Eric Reynolds <[email protected]>
    reynolek and Eric Reynolds committed May 24, 2021
  2. fixes 'previewHidden' of undefined error (#3409)

    * readability improvements and reduced indirection
    
    * adds type for handleShowModifyCookieModal
    
    * correctly types wrapperProps property, thereby fixing bug.
    
    if you add `console.log({ previewHidden, propsOne: this.props.wrapperProps.activeWorkspaceMeta });` to the third line of `_renderPreview()` you'll see that `activeWorkspaceMeta` is indeed, sometimes, `undefined.
    
    Also, there's no reason to use `await` on `this.setState`.  I didn't find any more of these in the codebase, I just found this one.
    
    * adds type for swaggerUiSpec
    
    * undoes lifting props to state
    
    almost always, this is done for performance reasons, but I removed it the app is working pretty quick-and-snappy for me without needing to introduced duplicated application state and keep track of it.
    
    I went ahead and measured it before and after this commit (using performance.now):
    
    before = [
      1.93500000750646,
      1.149999996414408,
      0.9499999869149178,
      0.9950000094249845,
      0.8650000090710819,
      1.560000004246831,
      1.5699999930802733,
      0.8450000023003668,
      1.4550000196322799,
      1.3299999991431832,
      1.3050000125076622,
      1.4099999971222132,
      1.3099999923724681,
      1.3100000214762986,
      1.1999999987892807,
      1.0099999781232327,
      0.830000004498288,
      1.2449999921955168,
      1.2500000011641532,
      1.4349999837577343,
    ]
    
    after = [
      2.9400000057648867,
      2.449999999953434,
      2.33499999740161,
      2.2849999950267375,
      1.7700000025797635,
      1.8149999959859997,
      2.1249999990686774,
      1.9150000007357448,
      2.074999996693805,
      1.9899999897461385,
      2.0200000144541264,
      2.869999996619299,
      2.1450000058393925,
      2.33499999740161,
      2.130000008037314,
      2.119999990100041,
      2.144999976735562,
      2.130000008037314,
      2.380000009201467,
      2.8999999922234565,
    ]
    
    > R.mean(before)
    > 1.2480000004870817
    
    > R.mean(after)
    > 2.243749999080319
    
    > R.median(before)
    > 1.2775000068359077
    
    > R.median(after)
    > 2.137499992386438
    
    So basically, considering a 16ms render rate (i.e. 60hz), 1ms saved by lifting props to state makes no difference in application performance.
    
    This is committed separately so that if there's any reason we want to keep the prior implementation, we can just still do so.
    dimitropoulos committed May 24, 2021
  3. [o2k] fix: kubernetes TLS implementation is (very) wrong (#3410)

    * updates Kubernetes types to actually match Kuberenetes Ingress/v1beta1 API
    
    * checks type of result in tests
    
    among other cosmetic changes
    
    * enables strict mode in o2k (but leaves bug it uncovered that this PR fixes)
    
    I really do need this to complete the task at hand.  For example, there was an existing error in `ingressDocWithOverride`:
    
    ```
    Type 'string | null | undefined' is not assignable to type 'string | undefined'.
      Type 'null' is not assignable to type 'string | undefined'.ts(2322)
    kubernetes-config.ts(36, 3): The expected type comes from property 'path' which is declared here on type 'K8sHTTPIngressPath'
    ```
    
    That is caught only by strict mode.  This is literally what I am fixing in this PR, so it seems like as good a time as any.  Thankfully, only took me ~30 minutes to do because it was already super close.
    
    * fixtures for `kong-for-kubernetes`
    
    * index exporters for actual exports
    
    when I made these files, I didn't understand that the lower-level helpers are not actually exported by the library, therefore there's no reason to have these index.ts files.
    
    Furthermore, the types file could use it's own for the same reason, because those types _are_ actually exported.
    
    * fixes bug: TLS is now an array and a child of K8sIngress.spec
    
    * updates 'yaml'
    
    for some reason I cannot explain, suddenly the CI is failing constantly because of this package.  https://github.com/Kong/insomnia/runs/2639615988
    
    The only `yaml` exports we use in`o2k` are `parse` and `stringify` and we don't re-export it in any way.  Therefore, we should be safe to update it (many other projects in the monorepo are on different versions anyway).  This recent version is written purely in TypeScript, so we don't need the types packages anymore.
    
    * adds a few more docs
    dimitropoulos committed May 24, 2021
  4. adds logging for when setting default protocol client fails (#3408)

    * adds logging for when setting default protocol client fails
    
    https://www.electronjs.org/docs/api/app#appsetasdefaultprotocolclientprotocol-path-args
    
    * logs `isDefaultProtocolClient` and `getApplicationNameForProtocol`
    dimitropoulos committed May 24, 2021

Commits on May 20, 2021

Older