* 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
* removes (unused and unwanted) husky scripts
might as well, it's only taking up space for nothing in our node_modules
* adds `lerna run clean` to main clean script
we didn't have `clean` scripts in the packages before, but now that we do, it makes sense to.... hahah... _use them_.
Note that it's important that we run the package scripts first, because otherwise after the rimraf (which is now at the end) there's no `lerna` left to call.
* adds missing clean script to insomnia-components
although it looks like there are other changes at first glance, there shouldn't be any behavioral differences now except the fact that build will always generate SVGs (which, was an oversight/bug that it wasn't before). We need this to occur so that when we clean it removes the things that were built, and when we build it replaces those same things.
* adds a postclean script to insomnia-app like every other package
I'll be honest, I'm not entirely sure what the reason is for having `postclean` scripts in every package with (mostly) `rimraf dist` (i.e. instead of just including that in the main clean script at the end), but that's clearly the convention - so for now I'm just following it
* removes references to old build artifact location
well, except for the .gitignore. I guess I could remove it from the .gitignore, commit it, commit deleting it, which would clear it from everyone's projects... but I'll just leave it there for a bit in the .gitignore. hopefully people either start fresh or run `clean` from the root every once in a while, which will clean this up.
After a few weeks or months we can remove these two references (in the package.json.clean and .gitignore) altogether if we feel like it.
* removes unused reference in config to build artifact
I searched high and low for every place I could find that consumes this file and none of them seem to use this field anyway. And even if they did, it's wrong. In fact, it's been wrong for a while I'd guess because (relative to the root, if that's what it was intended to mean).
As far as I can tell this was added c6a7c4d682 (diff-6918d2464ad7fb0f3e985d8587ce0c4218eeba6c6dea60c58642251f4db99ecb)
So I even checked out that commit and looked at all usages of that file at that time and it was, there too, unused (so far as I can tell). Appears to be a case of wishful thinking that it'd be useful for something, not sure.
* fix ts-expect-error
* removes useless await
see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/await-thenable.md
We're not quite ready to have this rule on everywhere, but in this case I can see that it's correct to follow.
* add comment about magic number
and moves the assignment to the one place it's used
I opted not to make a ticket because we are recently running out of tickets and this seems to be a relatively small thing @reynolek please confirm this is the correct course of action.
* initialize ref to reflect reality (and include actual type)
* fixes root cause of error, inlines one-liners
the error with the type of `_handleInputColorChange` was due to `onChange` being the wrong prop to use (where `onChange` is the one we want).
* use onChange instead of onInput to access correct types
ultimately, since react's behavior diverged from the DOM behavior to match onInput, this should have no effect on any functionality since react assigns this event to `onChange` anyway. see https://github.com/facebook/react/blob/master/fixtures/attribute-behavior/src/attributes.js#L2089
* clears remaining ts-expect-errors in file
* updates fallback call per review feedback
* no default export (prepping for hooks)
* makes logic match other implementation
note that above in `componentDidUpdate` it uses `<= 0`, whereas here it uses `> 0` but then only checks for false.
Also, logically, there's no way to ever get `aria-hidden="true"` since it returns early so that entire attribute can just be removed.
* removes fake private class member syntax
this is moving to hooks anyway, but in the meantime...
* undoes calling identical code twice in a row...
* condenses class methods to prepare for hooks
* hooks refactor
fairly faithful to the original, this attempts to just refactor to hooks. this exposes, again, the fact that we're setting state within useEffect.
* removes 200 ms offset for response time
so that, now, you know, the time reported is the actual time.
* adds logging for response timer lage
* removes timer logging and `responseTime` prop after PR discussion
it's definitely fruitful, but the fix for the callstack exceeded is what needs to be the focus.
* removes shadowed variable per PR feedback
* reinstates and documents 200ms compensation
* add delay endpoint to example server
* Update packages/insomnia-app/app/ui/components/response-timer.tsx
Co-authored-by: Opender Singh <opender.singh@konghq.com>
* chore: update CI to publish npm packages during a release
* chore: test on all OSs prior to publishing npm packages and running a release
* auth with npm before publish
* use jest-preset for all but app
* separate properties that are the same as the preset
for some reason, it doesn't work. you get:
```
Preset ../../jest-preset.js not found.
```
This needs to be investigated.
* removes unused/unneeded npm script in `app`, `test:jest`
* sanitize all electron.shell.openExternal calls
* adds lint rule to disallow future usage of `openExternal`
* updates to use URL constructor per review feedback
* split url into components on a `service`
also fixes a bug to use the upstream name in a service instead
of an actual hostname from the 'servers' block
* fix parseUrl to not return 'null:null'
* do not add targets if there is no hostname
previously a server with just a path; '/some/path' would generate
a target 'null:null'.
* Update packages/openapi-2-kong/src/declarative-config/services.js
* Update packages/openapi-2-kong/src/declarative-config/services.js
Co-authored-by: Opender Singh <opender.singh@konghq.com>