@mistweaverco/kulala-core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +80 -0
- package/dist/curl-1ra9mcaj. +0 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14823 -0
- package/dist/index.js.map +59 -0
- package/dist/lib/auth/oauth2/acquisition.d.ts +39 -0
- package/dist/lib/auth/oauth2/acquisition.d.ts.map +1 -0
- package/dist/lib/auth/oauth2/browser-flow.d.ts +62 -0
- package/dist/lib/auth/oauth2/browser-flow.d.ts.map +1 -0
- package/dist/lib/auth/oauth2/config.d.ts +17 -0
- package/dist/lib/auth/oauth2/config.d.ts.map +1 -0
- package/dist/lib/auth/oauth2/continuation.d.ts +10 -0
- package/dist/lib/auth/oauth2/continuation.d.ts.map +1 -0
- package/dist/lib/auth/oauth2/manager.d.ts +21 -0
- package/dist/lib/auth/oauth2/manager.d.ts.map +1 -0
- package/dist/lib/auth/oauth2/prompt-error.d.ts +10 -0
- package/dist/lib/auth/oauth2/prompt-error.d.ts.map +1 -0
- package/dist/lib/auth/oauth2/prompt-helper.d.ts +16 -0
- package/dist/lib/auth/oauth2/prompt-helper.d.ts.map +1 -0
- package/dist/lib/auth/oauth2/types.d.ts +60 -0
- package/dist/lib/auth/oauth2/types.d.ts.map +1 -0
- package/dist/lib/helpers/index.d.ts +2 -0
- package/dist/lib/helpers/index.d.ts.map +1 -0
- package/dist/lib/parser/at-variables.d.ts +17 -0
- package/dist/lib/parser/at-variables.d.ts.map +1 -0
- package/dist/lib/parser/body.d.ts +5 -0
- package/dist/lib/parser/body.d.ts.map +1 -0
- package/dist/lib/parser/comment.d.ts +3 -0
- package/dist/lib/parser/comment.d.ts.map +1 -0
- package/dist/lib/parser/directive.d.ts +15 -0
- package/dist/lib/parser/directive.d.ts.map +1 -0
- package/dist/lib/parser/header.d.ts +4 -0
- package/dist/lib/parser/header.d.ts.map +1 -0
- package/dist/lib/parser/index.d.ts +6 -0
- package/dist/lib/parser/index.d.ts.map +1 -0
- package/dist/lib/parser/lib/helpers/index.d.ts +10 -0
- package/dist/lib/parser/lib/helpers/index.d.ts.map +1 -0
- package/dist/lib/parser/operator.d.ts +4 -0
- package/dist/lib/parser/operator.d.ts.map +1 -0
- package/dist/lib/parser/parser.d.ts +3 -0
- package/dist/lib/parser/parser.d.ts.map +1 -0
- package/dist/lib/parser/request.d.ts +10 -0
- package/dist/lib/parser/request.d.ts.map +1 -0
- package/dist/lib/parser/script.d.ts +8 -0
- package/dist/lib/parser/script.d.ts.map +1 -0
- package/dist/lib/parser/types/block.d.ts +31 -0
- package/dist/lib/parser/types/block.d.ts.map +1 -0
- package/dist/lib/parser/types/body.d.ts +41 -0
- package/dist/lib/parser/types/body.d.ts.map +1 -0
- package/dist/lib/parser/types/comment.d.ts +6 -0
- package/dist/lib/parser/types/comment.d.ts.map +1 -0
- package/dist/lib/parser/types/directive.d.ts +13 -0
- package/dist/lib/parser/types/directive.d.ts.map +1 -0
- package/dist/lib/parser/types/document.d.ts +17 -0
- package/dist/lib/parser/types/document.d.ts.map +1 -0
- package/dist/lib/parser/types/error.d.ts +7 -0
- package/dist/lib/parser/types/error.d.ts.map +1 -0
- package/dist/lib/parser/types/header.d.ts +5 -0
- package/dist/lib/parser/types/header.d.ts.map +1 -0
- package/dist/lib/parser/types/index.d.ts +4 -0
- package/dist/lib/parser/types/index.d.ts.map +1 -0
- package/dist/lib/parser/types/operator.d.ts +10 -0
- package/dist/lib/parser/types/operator.d.ts.map +1 -0
- package/dist/lib/parser/types/parser.d.ts +6 -0
- package/dist/lib/parser/types/parser.d.ts.map +1 -0
- package/dist/lib/parser/types/request.d.ts +44 -0
- package/dist/lib/parser/types/request.d.ts.map +1 -0
- package/dist/lib/parser/types/script.d.ts +13 -0
- package/dist/lib/parser/types/script.d.ts.map +1 -0
- package/dist/lib/parser/types/session.d.ts +27 -0
- package/dist/lib/parser/types/session.d.ts.map +1 -0
- package/dist/lib/parser/types/stdinparsed.d.ts +31 -0
- package/dist/lib/parser/types/stdinparsed.d.ts.map +1 -0
- package/dist/lib/parser/types/variable.d.ts +4 -0
- package/dist/lib/parser/types/variable.d.ts.map +1 -0
- package/dist/lib/persistence/cookie-store.d.ts +13 -0
- package/dist/lib/persistence/cookie-store.d.ts.map +1 -0
- package/dist/lib/persistence/data-dir.d.ts +12 -0
- package/dist/lib/persistence/data-dir.d.ts.map +1 -0
- package/dist/lib/persistence/db.d.ts +44 -0
- package/dist/lib/persistence/db.d.ts.map +1 -0
- package/dist/lib/persistence/document-store.d.ts +15 -0
- package/dist/lib/persistence/document-store.d.ts.map +1 -0
- package/dist/lib/persistence/encrypted-store.d.ts +17 -0
- package/dist/lib/persistence/encrypted-store.d.ts.map +1 -0
- package/dist/lib/persistence/history-store.d.ts +26 -0
- package/dist/lib/persistence/history-store.d.ts.map +1 -0
- package/dist/lib/persistence/index.d.ts +26 -0
- package/dist/lib/persistence/index.d.ts.map +1 -0
- package/dist/lib/persistence/keychain.d.ts +24 -0
- package/dist/lib/persistence/keychain.d.ts.map +1 -0
- package/dist/lib/persistence/prompt-store.d.ts +31 -0
- package/dist/lib/persistence/prompt-store.d.ts.map +1 -0
- package/dist/lib/persistence/replay-store.d.ts +19 -0
- package/dist/lib/persistence/replay-store.d.ts.map +1 -0
- package/dist/lib/persistence/variable-store.d.ts +34 -0
- package/dist/lib/persistence/variable-store.d.ts.map +1 -0
- package/dist/lib/runner/block.d.ts +7 -0
- package/dist/lib/runner/block.d.ts.map +1 -0
- package/dist/lib/runner/body.d.ts +30 -0
- package/dist/lib/runner/body.d.ts.map +1 -0
- package/dist/lib/runner/curl-transport.d.ts +3 -0
- package/dist/lib/runner/curl-transport.d.ts.map +1 -0
- package/dist/lib/runner/doRequest.d.ts +5 -0
- package/dist/lib/runner/doRequest.d.ts.map +1 -0
- package/dist/lib/runner/embedded-curl.d.ts +2 -0
- package/dist/lib/runner/embedded-curl.d.ts.map +1 -0
- package/dist/lib/runner/headers.d.ts +14 -0
- package/dist/lib/runner/headers.d.ts.map +1 -0
- package/dist/lib/runner/http-client.d.ts +61 -0
- package/dist/lib/runner/http-client.d.ts.map +1 -0
- package/dist/lib/runner/http-transport.d.ts +5 -0
- package/dist/lib/runner/http-transport.d.ts.map +1 -0
- package/dist/lib/runner/index.d.ts +10 -0
- package/dist/lib/runner/index.d.ts.map +1 -0
- package/dist/lib/runner/scripts.d.ts +14 -0
- package/dist/lib/runner/scripts.d.ts.map +1 -0
- package/dist/lib/runner/types.d.ts +91 -0
- package/dist/lib/runner/types.d.ts.map +1 -0
- package/dist/lib/runner/vendored-curl.generated.d.ts +5 -0
- package/dist/lib/runner/vendored-curl.generated.d.ts.map +1 -0
- package/dist/lib/variables/env-files.d.ts +17 -0
- package/dist/lib/variables/env-files.d.ts.map +1 -0
- package/dist/lib/variables/flatten-json.d.ts +7 -0
- package/dist/lib/variables/flatten-json.d.ts.map +1 -0
- package/dist/lib/variables/index.d.ts +22 -0
- package/dist/lib/variables/index.d.ts.map +1 -0
- package/dist/lib/variables/kuba.d.ts +15 -0
- package/dist/lib/variables/kuba.d.ts.map +1 -0
- package/dist/lib/variables/magic.d.ts +7 -0
- package/dist/lib/variables/magic.d.ts.map +1 -0
- package/dist/lib/variables/request-vars.d.ts +25 -0
- package/dist/lib/variables/request-vars.d.ts.map +1 -0
- package/dist/lib/variables/resolve.d.ts +16 -0
- package/dist/lib/variables/resolve.d.ts.map +1 -0
- package/dist/lib/variables/stable-id.d.ts +6 -0
- package/dist/lib/variables/stable-id.d.ts.map +1 -0
- package/dist/lib/variables/substitute.d.ts +28 -0
- package/dist/lib/variables/substitute.d.ts.map +1 -0
- package/package.json +47 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025+ mistweaverco
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
# Kulala Core
|
|
6
|
+
|
|
7
|
+
[](https://github.com/mistweaverco/kulala-core/graphs/contributors)
|
|
8
|
+
[](https://github.com/mistweaverco/kulala-core/releases/latest)
|
|
9
|
+
[](https://github.com/orgs/mistweaverco/projects/3/views/1?filterQuery=repo%3Amistweaverco%2Fkulala-core)
|
|
10
|
+
[](https://discord.gg/QyVQmfY4Rt)
|
|
11
|
+
|
|
12
|
+
<p></p>
|
|
13
|
+
|
|
14
|
+
Kulala is swahili for "rest" or "relax."
|
|
15
|
+
|
|
16
|
+
A straightforwarded, powerful, and extendable HTTP client library.
|
|
17
|
+
It powers the [Kulala toolchain](https://getkulala.net),
|
|
18
|
+
and can be used as a standalone library.
|
|
19
|
+
|
|
20
|
+
<p></p>
|
|
21
|
+
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
## Overview
|
|
25
|
+
|
|
26
|
+
A RESTful API is a web service architecture that adheres to
|
|
27
|
+
specific constraints:
|
|
28
|
+
|
|
29
|
+
- statelessness,
|
|
30
|
+
- uniform interface,
|
|
31
|
+
- client-server separation
|
|
32
|
+
|
|
33
|
+
Typically using HTTP methods like `GET`, `POST`, `PUT`, and `DELETE`.
|
|
34
|
+
It uses standard web protocols to enable interoperability
|
|
35
|
+
between distributed systems.
|
|
36
|
+
|
|
37
|
+
## Features
|
|
38
|
+
|
|
39
|
+
### Request types
|
|
40
|
+
|
|
41
|
+
- HTTP RESTful (1.0, 1.1, 2, 3)
|
|
42
|
+
- GraphQL (queries, mutations)
|
|
43
|
+
|
|
44
|
+
### Variables
|
|
45
|
+
|
|
46
|
+
- Host Environment
|
|
47
|
+
- Document variables
|
|
48
|
+
- Request scoped variables
|
|
49
|
+
- `http-client.env` files
|
|
50
|
+
- Built-in support for [kuba](https://kuba.mwco.app)
|
|
51
|
+
|
|
52
|
+
### Scripting
|
|
53
|
+
|
|
54
|
+
Supports JavaScript, Lua, and TypeScript for:
|
|
55
|
+
|
|
56
|
+
- Pre-request
|
|
57
|
+
- Post-request
|
|
58
|
+
- Conditional
|
|
59
|
+
- Inline
|
|
60
|
+
- External
|
|
61
|
+
|
|
62
|
+
### Authentication
|
|
63
|
+
|
|
64
|
+
- Basic
|
|
65
|
+
- Bearer
|
|
66
|
+
- OAuth 2.0
|
|
67
|
+
|
|
68
|
+
### Automation and testing
|
|
69
|
+
|
|
70
|
+
Assertions, automated testing and reporting
|
|
71
|
+
is compatible with the IntelliJ HTTP Client:
|
|
72
|
+
|
|
73
|
+
## Usage
|
|
74
|
+
|
|
75
|
+
See the [examples][examples]
|
|
76
|
+
directory for usage examples.
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
[examples]: https://github.com/mistweaverco/kulala-core/tree/main/examples
|
|
Binary file
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export { KulalaParser, writeErrorToStderr } from "./lib/parser";
|
|
2
|
+
export { KulalaRunner } from "./lib/runner";
|
|
3
|
+
export type { KulalaDocument } from "./lib/parser/types";
|
|
4
|
+
export type { KulalaStdinParsed } from "./lib/parser/types/stdinparsed";
|
|
5
|
+
export type { KulalaRunOptions } from "./lib/runner";
|
|
6
|
+
export type { KulalaRequestErrorResponse, KulalaRequestSuccessResponse, KulalaResponseWrapper, } from "./lib/runner";
|
|
7
|
+
import type { KulalaStdinActionRunLimit } from "./lib/parser/types/stdinparsed";
|
|
8
|
+
import type { KulalaResponseWrapper, KulalaRunOptions } from "./lib/runner";
|
|
9
|
+
import type { KulalaDocument } from "./lib/parser/types";
|
|
10
|
+
export declare const kulalaCore: {
|
|
11
|
+
readonly parser: import("./lib/parser/types").KulalaParser;
|
|
12
|
+
readonly runner: {
|
|
13
|
+
run: (doc: KulalaDocument, limit?: KulalaStdinActionRunLimit[], options?: KulalaRunOptions) => Promise<void>;
|
|
14
|
+
};
|
|
15
|
+
readonly parse: (input: {
|
|
16
|
+
content: string;
|
|
17
|
+
filepath?: string;
|
|
18
|
+
}) => Promise<KulalaDocument>;
|
|
19
|
+
readonly validate: (input: {
|
|
20
|
+
content: string;
|
|
21
|
+
filepath?: string;
|
|
22
|
+
}) => Promise<KulalaDocument>;
|
|
23
|
+
readonly run: (input: {
|
|
24
|
+
content: string;
|
|
25
|
+
filepath?: string;
|
|
26
|
+
env?: string;
|
|
27
|
+
limit?: KulalaStdinActionRunLimit[];
|
|
28
|
+
}) => Promise<{
|
|
29
|
+
doc: KulalaDocument;
|
|
30
|
+
response: KulalaResponseWrapper;
|
|
31
|
+
}>;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@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