@mistweaverco/kulala-core 0.1.5 → 0.18.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/dist/cli.js +232 -0
- package/dist/index.d.ts +2 -33
- package/dist/index.js +236 -14763
- package/dist/lib/downloader/index.d.ts +15 -0
- package/dist/lib/kulala-core/index.d.ts +17 -0
- package/dist/lib/kulala-core/types.d.ts +142 -0
- package/package.json +15 -22
- package/LICENSE +0 -21
- package/README.md +0 -84
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -58
- package/dist/lib/auth/oauth2/acquisition.d.ts +0 -39
- package/dist/lib/auth/oauth2/acquisition.d.ts.map +0 -1
- package/dist/lib/auth/oauth2/browser-flow.d.ts +0 -62
- package/dist/lib/auth/oauth2/browser-flow.d.ts.map +0 -1
- package/dist/lib/auth/oauth2/config.d.ts +0 -17
- package/dist/lib/auth/oauth2/config.d.ts.map +0 -1
- package/dist/lib/auth/oauth2/continuation.d.ts +0 -10
- package/dist/lib/auth/oauth2/continuation.d.ts.map +0 -1
- package/dist/lib/auth/oauth2/manager.d.ts +0 -21
- package/dist/lib/auth/oauth2/manager.d.ts.map +0 -1
- package/dist/lib/auth/oauth2/prompt-error.d.ts +0 -10
- package/dist/lib/auth/oauth2/prompt-error.d.ts.map +0 -1
- package/dist/lib/auth/oauth2/prompt-helper.d.ts +0 -16
- package/dist/lib/auth/oauth2/prompt-helper.d.ts.map +0 -1
- package/dist/lib/auth/oauth2/types.d.ts +0 -60
- package/dist/lib/auth/oauth2/types.d.ts.map +0 -1
- package/dist/lib/helpers/index.d.ts +0 -2
- package/dist/lib/helpers/index.d.ts.map +0 -1
- package/dist/lib/parser/at-variables.d.ts +0 -17
- package/dist/lib/parser/at-variables.d.ts.map +0 -1
- package/dist/lib/parser/body.d.ts +0 -5
- package/dist/lib/parser/body.d.ts.map +0 -1
- package/dist/lib/parser/comment.d.ts +0 -3
- package/dist/lib/parser/comment.d.ts.map +0 -1
- package/dist/lib/parser/directive.d.ts +0 -15
- package/dist/lib/parser/directive.d.ts.map +0 -1
- package/dist/lib/parser/header.d.ts +0 -4
- package/dist/lib/parser/header.d.ts.map +0 -1
- package/dist/lib/parser/index.d.ts +0 -6
- package/dist/lib/parser/index.d.ts.map +0 -1
- package/dist/lib/parser/lib/helpers/index.d.ts +0 -10
- package/dist/lib/parser/lib/helpers/index.d.ts.map +0 -1
- package/dist/lib/parser/operator.d.ts +0 -4
- package/dist/lib/parser/operator.d.ts.map +0 -1
- package/dist/lib/parser/parser.d.ts +0 -3
- package/dist/lib/parser/parser.d.ts.map +0 -1
- package/dist/lib/parser/request.d.ts +0 -10
- package/dist/lib/parser/request.d.ts.map +0 -1
- package/dist/lib/parser/script.d.ts +0 -8
- package/dist/lib/parser/script.d.ts.map +0 -1
- package/dist/lib/parser/types/block.d.ts +0 -31
- package/dist/lib/parser/types/block.d.ts.map +0 -1
- package/dist/lib/parser/types/body.d.ts +0 -41
- package/dist/lib/parser/types/body.d.ts.map +0 -1
- package/dist/lib/parser/types/comment.d.ts +0 -6
- package/dist/lib/parser/types/comment.d.ts.map +0 -1
- package/dist/lib/parser/types/directive.d.ts +0 -13
- package/dist/lib/parser/types/directive.d.ts.map +0 -1
- package/dist/lib/parser/types/document.d.ts +0 -17
- package/dist/lib/parser/types/document.d.ts.map +0 -1
- package/dist/lib/parser/types/error.d.ts +0 -7
- package/dist/lib/parser/types/error.d.ts.map +0 -1
- package/dist/lib/parser/types/header.d.ts +0 -5
- package/dist/lib/parser/types/header.d.ts.map +0 -1
- package/dist/lib/parser/types/index.d.ts +0 -4
- package/dist/lib/parser/types/index.d.ts.map +0 -1
- package/dist/lib/parser/types/operator.d.ts +0 -10
- package/dist/lib/parser/types/operator.d.ts.map +0 -1
- package/dist/lib/parser/types/parser.d.ts +0 -6
- package/dist/lib/parser/types/parser.d.ts.map +0 -1
- package/dist/lib/parser/types/request.d.ts +0 -44
- package/dist/lib/parser/types/request.d.ts.map +0 -1
- package/dist/lib/parser/types/script.d.ts +0 -13
- package/dist/lib/parser/types/script.d.ts.map +0 -1
- package/dist/lib/parser/types/session.d.ts +0 -27
- package/dist/lib/parser/types/session.d.ts.map +0 -1
- package/dist/lib/parser/types/stdinparsed.d.ts +0 -31
- package/dist/lib/parser/types/stdinparsed.d.ts.map +0 -1
- package/dist/lib/parser/types/variable.d.ts +0 -4
- package/dist/lib/parser/types/variable.d.ts.map +0 -1
- package/dist/lib/persistence/cookie-store.d.ts +0 -13
- package/dist/lib/persistence/cookie-store.d.ts.map +0 -1
- package/dist/lib/persistence/data-dir.d.ts +0 -12
- package/dist/lib/persistence/data-dir.d.ts.map +0 -1
- package/dist/lib/persistence/db.d.ts +0 -44
- package/dist/lib/persistence/db.d.ts.map +0 -1
- package/dist/lib/persistence/document-store.d.ts +0 -15
- package/dist/lib/persistence/document-store.d.ts.map +0 -1
- package/dist/lib/persistence/encrypted-store.d.ts +0 -17
- package/dist/lib/persistence/encrypted-store.d.ts.map +0 -1
- package/dist/lib/persistence/history-store.d.ts +0 -26
- package/dist/lib/persistence/history-store.d.ts.map +0 -1
- package/dist/lib/persistence/index.d.ts +0 -26
- package/dist/lib/persistence/index.d.ts.map +0 -1
- package/dist/lib/persistence/keychain.d.ts +0 -24
- package/dist/lib/persistence/keychain.d.ts.map +0 -1
- package/dist/lib/persistence/prompt-store.d.ts +0 -31
- package/dist/lib/persistence/prompt-store.d.ts.map +0 -1
- package/dist/lib/persistence/replay-store.d.ts +0 -19
- package/dist/lib/persistence/replay-store.d.ts.map +0 -1
- package/dist/lib/persistence/variable-store.d.ts +0 -34
- package/dist/lib/persistence/variable-store.d.ts.map +0 -1
- package/dist/lib/runner/block.d.ts +0 -7
- package/dist/lib/runner/block.d.ts.map +0 -1
- package/dist/lib/runner/body.d.ts +0 -30
- package/dist/lib/runner/body.d.ts.map +0 -1
- package/dist/lib/runner/curl-transport.d.ts +0 -3
- package/dist/lib/runner/curl-transport.d.ts.map +0 -1
- package/dist/lib/runner/doRequest.d.ts +0 -5
- package/dist/lib/runner/doRequest.d.ts.map +0 -1
- package/dist/lib/runner/embedded-curl.d.ts +0 -2
- package/dist/lib/runner/embedded-curl.d.ts.map +0 -1
- package/dist/lib/runner/headers.d.ts +0 -14
- package/dist/lib/runner/headers.d.ts.map +0 -1
- package/dist/lib/runner/http-client.d.ts +0 -61
- package/dist/lib/runner/http-client.d.ts.map +0 -1
- package/dist/lib/runner/http-transport.d.ts +0 -5
- package/dist/lib/runner/http-transport.d.ts.map +0 -1
- package/dist/lib/runner/index.d.ts +0 -10
- package/dist/lib/runner/index.d.ts.map +0 -1
- package/dist/lib/runner/scripts.d.ts +0 -14
- package/dist/lib/runner/scripts.d.ts.map +0 -1
- package/dist/lib/runner/types.d.ts +0 -91
- package/dist/lib/runner/types.d.ts.map +0 -1
- package/dist/lib/variables/env-files.d.ts +0 -17
- package/dist/lib/variables/env-files.d.ts.map +0 -1
- package/dist/lib/variables/flatten-json.d.ts +0 -7
- package/dist/lib/variables/flatten-json.d.ts.map +0 -1
- package/dist/lib/variables/index.d.ts +0 -22
- package/dist/lib/variables/index.d.ts.map +0 -1
- package/dist/lib/variables/kuba.d.ts +0 -15
- package/dist/lib/variables/kuba.d.ts.map +0 -1
- package/dist/lib/variables/magic.d.ts +0 -7
- package/dist/lib/variables/magic.d.ts.map +0 -1
- package/dist/lib/variables/request-vars.d.ts +0 -25
- package/dist/lib/variables/request-vars.d.ts.map +0 -1
- package/dist/lib/variables/resolve.d.ts +0 -16
- package/dist/lib/variables/resolve.d.ts.map +0 -1
- package/dist/lib/variables/stable-id.d.ts +0 -6
- package/dist/lib/variables/stable-id.d.ts.map +0 -1
- package/dist/lib/variables/substitute.d.ts +0 -28
- package/dist/lib/variables/substitute.d.ts.map +0 -1
- package/scripts/ensure-vendored-curl.ts +0 -223
- package/scripts/generate-vendored-curl.ts +0 -108
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { OAuth2Config, OAuth2TokenData } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* Acquire OAuth2 access token using Client Credentials grant.
|
|
4
|
-
*/
|
|
5
|
-
export declare function acquireClientCredentialsToken(config: OAuth2Config): Promise<OAuth2TokenData>;
|
|
6
|
-
/**
|
|
7
|
-
* Check if token is expired or will expire soon (within 60 seconds).
|
|
8
|
-
*/
|
|
9
|
-
export declare function isTokenExpired(tokenData: OAuth2TokenData): boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Exchange authorization code for access token.
|
|
12
|
-
* This is the second step of the Authorization Code flow.
|
|
13
|
-
*/
|
|
14
|
-
export declare function exchangeAuthorizationCode(config: OAuth2Config, code: string, pkce?: {
|
|
15
|
-
verifier: string;
|
|
16
|
-
challenge: string;
|
|
17
|
-
method: "S256" | "Plain";
|
|
18
|
-
}): Promise<OAuth2TokenData>;
|
|
19
|
-
/**
|
|
20
|
-
* Acquire OAuth2 access token using Authorization Code grant.
|
|
21
|
-
*/
|
|
22
|
-
export declare function acquireAuthorizationCodeToken(config: OAuth2Config, authId: string, env: string, startDir: string, code?: string, pkce?: {
|
|
23
|
-
verifier: string;
|
|
24
|
-
challenge: string;
|
|
25
|
-
method: "S256" | "Plain";
|
|
26
|
-
}): Promise<OAuth2TokenData>;
|
|
27
|
-
/**
|
|
28
|
-
* Acquire OAuth2 access token using Implicit grant (browser-based).
|
|
29
|
-
*/
|
|
30
|
-
export declare function acquireImplicitToken(config: OAuth2Config, authId: string, env: string, startDir: string): Promise<OAuth2TokenData>;
|
|
31
|
-
/**
|
|
32
|
-
* Acquire OAuth2 access token using Password grant.
|
|
33
|
-
*/
|
|
34
|
-
export declare function acquirePasswordToken(config: OAuth2Config): Promise<OAuth2TokenData>;
|
|
35
|
-
/**
|
|
36
|
-
* Refresh OAuth2 access token using refresh_token.
|
|
37
|
-
*/
|
|
38
|
-
export declare function refreshOAuth2Token(config: OAuth2Config, refreshToken: string): Promise<OAuth2TokenData>;
|
|
39
|
-
//# sourceMappingURL=acquisition.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acquisition.d.ts","sourceRoot":"","sources":["../../../../src/lib/auth/oauth2/acquisition.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAgB7D;;GAEG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,eAAe,CAAC,CAsG1B;AAkED;;GAEG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,eAAe,GAAG,OAAO,CAIlE;AAED;;;GAGG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GACvE,OAAO,CAAC,eAAe,CAAC,CAmF1B;AAED;;GAEG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,IAAI,CAAC,EAAE,MAAM,EACb,IAAI,CAAC,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GACvE,OAAO,CAAC,eAAe,CAAC,CAiI1B;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,eAAe,CAAC,CA+F1B;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,eAAe,CAAC,CAwF1B;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,eAAe,CAAC,CAmC1B"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { OAuth2Config } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* Generate PKCE code verifier and challenge.
|
|
4
|
-
*/
|
|
5
|
-
export declare function generatePKCE(): Promise<{
|
|
6
|
-
verifier: string;
|
|
7
|
-
challenge: string;
|
|
8
|
-
method: "S256";
|
|
9
|
-
}>;
|
|
10
|
-
/**
|
|
11
|
-
* Generate PKCE with plain method (for testing or when S256 not supported).
|
|
12
|
-
*/
|
|
13
|
-
export declare function generatePKCEPlain(): {
|
|
14
|
-
verifier: string;
|
|
15
|
-
challenge: string;
|
|
16
|
-
method: "Plain";
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Open browser with the given URL.
|
|
20
|
-
* Uses Browser CMD if provided, otherwise uses system default browser.
|
|
21
|
-
*/
|
|
22
|
-
export declare function openBrowser(url: string, browserCmd?: string): Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* Check if redirect URL is localhost or 127.0.0.1.
|
|
25
|
-
*/
|
|
26
|
-
export declare function isLocalhostRedirect(redirectUrl: string): boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Parse redirect input (URL, query string, or raw code/token) into OAuth2 result.
|
|
29
|
-
* Used for prompt continuation.
|
|
30
|
-
*/
|
|
31
|
-
export declare function parseRedirectInput(input: string, grantType: "Authorization Code" | "Implicit"): {
|
|
32
|
-
code?: string;
|
|
33
|
-
access_token?: string;
|
|
34
|
-
id_token?: string;
|
|
35
|
-
error?: string;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* Start a local HTTP server to intercept OAuth2 redirect.
|
|
39
|
-
* Returns the server and a promise that resolves with the authorization code/token.
|
|
40
|
-
* Only use this when redirect URL is localhost/127.0.0.1 or Browser CMD is specified.
|
|
41
|
-
*/
|
|
42
|
-
export declare function startRedirectServer(redirectUrl: string): {
|
|
43
|
-
server: {
|
|
44
|
-
stop: () => void;
|
|
45
|
-
port: number;
|
|
46
|
-
};
|
|
47
|
-
promise: Promise<{
|
|
48
|
-
code?: string;
|
|
49
|
-
access_token?: string;
|
|
50
|
-
id_token?: string;
|
|
51
|
-
error?: string;
|
|
52
|
-
}>;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* Build authorization URL for Authorization Code or Implicit grant.
|
|
56
|
-
*/
|
|
57
|
-
export declare function buildAuthorizationUrl(config: OAuth2Config, redirectUrl: string, pkce?: {
|
|
58
|
-
verifier: string;
|
|
59
|
-
challenge: string;
|
|
60
|
-
method: "S256" | "Plain";
|
|
61
|
-
}): string;
|
|
62
|
-
//# sourceMappingURL=browser-flow.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser-flow.d.ts","sourceRoot":"","sources":["../../../../src/lib/auth/oauth2/browser-flow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC,CAaD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;CACjB,CAKA;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,GAAG,EAAE,MAAM,EACX,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAyBf;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAehE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,oBAAoB,GAAG,UAAU,GAC3C;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAkEA;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG;IACxD,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,OAAO,EAAE,OAAO,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;CACJ,CAmEA;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GACvE,MAAM,CA+DR"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { OAuth2Config } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* Load OAuth2 configs from http-client.env.json and http-client.private.env.json.
|
|
4
|
-
* Configs are merged (private overrides public).
|
|
5
|
-
* Returns map of auth-id -> config.
|
|
6
|
-
*/
|
|
7
|
-
export declare function loadOAuth2Configs(env: string, startDir: string): Map<string, OAuth2Config>;
|
|
8
|
-
/**
|
|
9
|
-
* Load OAuth2 auth data (tokens) from http-client.private.env.json.
|
|
10
|
-
*/
|
|
11
|
-
export declare function loadOAuth2AuthData(env: string, startDir: string): Map<string, import("./types").OAuth2TokenData>;
|
|
12
|
-
/**
|
|
13
|
-
* Save OAuth2 auth data (tokens) to http-client.private.env.json.
|
|
14
|
-
* Creates file if it doesn't exist, updates existing file otherwise.
|
|
15
|
-
*/
|
|
16
|
-
export declare function saveOAuth2AuthData(env: string, startDir: string, authId: string, tokenData: import("./types").OAuth2TokenData): void;
|
|
17
|
-
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/lib/auth/oauth2/config.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAK5C;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,GACf,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CA4D3B;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,GACf,GAAG,CAAC,MAAM,EAAE,OAAO,SAAS,EAAE,eAAe,CAAC,CA0BhD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,OAAO,SAAS,EAAE,eAAe,GAC3C,IAAI,CAgDN"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { OAuth2TokenData } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* Continue OAuth2 flow from a prompt.
|
|
4
|
-
* This function loads the prompt context, processes the user input, and completes the token acquisition.
|
|
5
|
-
*/
|
|
6
|
-
export declare function continueOAuth2Flow(promptId: string, inputs: Array<{
|
|
7
|
-
id: string;
|
|
8
|
-
value: string;
|
|
9
|
-
}>): Promise<OAuth2TokenData>;
|
|
10
|
-
//# sourceMappingURL=continuation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"continuation.d.ts","sourceRoot":"","sources":["../../../../src/lib/auth/oauth2/continuation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,eAAe,EAAE,MAAM,SAAS,CAAC;AAM7D;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,GAC3C,OAAO,CAAC,eAAe,CAAC,CAmG1B"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OAuth2 token manager. Handles token acquisition, refresh, and storage.
|
|
3
|
-
*/
|
|
4
|
-
export declare class OAuth2Manager {
|
|
5
|
-
private configs;
|
|
6
|
-
private tokens;
|
|
7
|
-
private env;
|
|
8
|
-
private startDir;
|
|
9
|
-
constructor(env: string, startDir: string);
|
|
10
|
-
private loadConfigs;
|
|
11
|
-
private loadTokens;
|
|
12
|
-
/**
|
|
13
|
-
* Get access token for auth-id. Acquires or refreshes token if needed.
|
|
14
|
-
*/
|
|
15
|
-
getAccessToken(authId: string): Promise<string | undefined>;
|
|
16
|
-
/**
|
|
17
|
-
* Get ID token for auth-id.
|
|
18
|
-
*/
|
|
19
|
-
getIdToken(authId: string): Promise<string | undefined>;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../src/lib/auth/oauth2/manager.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,MAAM,CAA2C;IACzD,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,QAAQ,CAAS;gBAEb,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAOzC,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,UAAU;IAIlB;;OAEG;IACG,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAoEjE;;OAEG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAgB9D"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { KulalaPromptResponse } from "../../runner/types";
|
|
2
|
-
/**
|
|
3
|
-
* Error thrown when OAuth2 flow requires user input via prompt system.
|
|
4
|
-
* This error should be caught and converted to a KulalaPromptResponse.
|
|
5
|
-
*/
|
|
6
|
-
export declare class OAuth2PromptError extends Error {
|
|
7
|
-
readonly promptResponse: KulalaPromptResponse;
|
|
8
|
-
constructor(promptResponse: KulalaPromptResponse);
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=prompt-error.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-error.d.ts","sourceRoot":"","sources":["../../../../src/lib/auth/oauth2/prompt-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,SAAgB,cAAc,EAAE,oBAAoB,CAAC;gBAEzC,cAAc,EAAE,oBAAoB;CAKjD"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { OAuth2Config } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* Create a prompt for OAuth2 authorization code flow.
|
|
4
|
-
* Returns the prompt ID and opens the browser.
|
|
5
|
-
*/
|
|
6
|
-
export declare function createOAuth2AuthorizationCodePrompt(config: OAuth2Config, authId: string, env: string, startDir: string, pkce?: {
|
|
7
|
-
verifier: string;
|
|
8
|
-
challenge: string;
|
|
9
|
-
method: "S256" | "Plain";
|
|
10
|
-
}): Promise<string>;
|
|
11
|
-
/**
|
|
12
|
-
* Create a prompt for OAuth2 implicit flow.
|
|
13
|
-
* Returns the prompt ID and opens the browser.
|
|
14
|
-
*/
|
|
15
|
-
export declare function createOAuth2ImplicitPrompt(config: OAuth2Config, authId: string, env: string, startDir: string): Promise<string>;
|
|
16
|
-
//# sourceMappingURL=prompt-helper.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-helper.d.ts","sourceRoot":"","sources":["../../../../src/lib/auth/oauth2/prompt-helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C;;;GAGG;AACH,wBAAsB,mCAAmC,CACvD,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,IAAI,CAAC,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GACvE,OAAO,CAAC,MAAM,CAAC,CAuBjB;AAED;;;GAGG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,CAsBjB"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OAuth 2.0 configuration and token types.
|
|
3
|
-
* Based on Kulala/JetBrains HTTP Client OAuth2 spec.
|
|
4
|
-
*/
|
|
5
|
-
export type OAuth2GrantType = "Authorization Code" | "Client Credentials" | "Device Authorization" | "Implicit" | "Password";
|
|
6
|
-
export type OAuth2ClientCredentialsLocation = "none" | "in body" | "basic" | "jwt";
|
|
7
|
-
export interface OAuth2Config {
|
|
8
|
-
Type: "OAuth2";
|
|
9
|
-
"Grant Type": OAuth2GrantType;
|
|
10
|
-
"Auth URL"?: string;
|
|
11
|
-
"Token URL": string;
|
|
12
|
-
"Redirect URL"?: string;
|
|
13
|
-
"Revoke URL"?: string;
|
|
14
|
-
"Client ID": string;
|
|
15
|
-
"Client Secret"?: string;
|
|
16
|
-
"Device Auth URL"?: string;
|
|
17
|
-
"Response Type"?: string;
|
|
18
|
-
"Client Credentials"?: OAuth2ClientCredentialsLocation;
|
|
19
|
-
PKCE?: boolean | {
|
|
20
|
-
"Code Challenge Method"?: "Plain" | "S256";
|
|
21
|
-
"Code Verifier"?: string;
|
|
22
|
-
};
|
|
23
|
-
Assertion?: string;
|
|
24
|
-
JWT?: {
|
|
25
|
-
Header: {
|
|
26
|
-
alg: "RS256" | "HS256";
|
|
27
|
-
typ: "JWT";
|
|
28
|
-
};
|
|
29
|
-
Payload: {
|
|
30
|
-
exp?: number;
|
|
31
|
-
iat?: number;
|
|
32
|
-
[key: string]: unknown;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
Scope?: string;
|
|
36
|
-
"Expires In"?: number;
|
|
37
|
-
"Acquire Automatically"?: boolean;
|
|
38
|
-
Username?: string;
|
|
39
|
-
Password?: string;
|
|
40
|
-
"Custom Headers"?: Record<string, string>;
|
|
41
|
-
"Custom Request Parameters"?: Record<string, string | string[] | {
|
|
42
|
-
Value: string | string[];
|
|
43
|
-
Use: "In Token Request" | "In Auth Request" | "Everywhere";
|
|
44
|
-
}>;
|
|
45
|
-
"Browser CMD"?: string;
|
|
46
|
-
"Use ID Token"?: boolean;
|
|
47
|
-
}
|
|
48
|
-
export interface OAuth2TokenData {
|
|
49
|
-
access_token: string;
|
|
50
|
-
token_type?: string;
|
|
51
|
-
expires_in?: number;
|
|
52
|
-
refresh_token?: string;
|
|
53
|
-
id_token?: string;
|
|
54
|
-
scope?: string;
|
|
55
|
-
expires_at?: number;
|
|
56
|
-
}
|
|
57
|
-
export interface OAuth2AuthData {
|
|
58
|
-
[authId: string]: OAuth2TokenData;
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/auth/oauth2/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,eAAe,GACvB,oBAAoB,GACpB,oBAAoB,GACpB,sBAAsB,GACtB,UAAU,GACV,UAAU,CAAC;AAEf,MAAM,MAAM,+BAA+B,GACvC,MAAM,GACN,SAAS,GACT,OAAO,GACP,KAAK,CAAC;AAEV,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,YAAY,EAAE,eAAe,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,+BAA+B,CAAC;IACvD,IAAI,CAAC,EACD,OAAO,GACP;QACE,uBAAuB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACN,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE;QACJ,MAAM,EAAE;YACN,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC;YACvB,GAAG,EAAE,KAAK,CAAC;SACZ,CAAC;QACF,OAAO,EAAE;YACP,GAAG,CAAC,EAAE,MAAM,CAAC;YACb,GAAG,CAAC,EAAE,MAAM,CAAC;YACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;SACxB,CAAC;KACH,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,2BAA2B,CAAC,EAAE,MAAM,CAClC,MAAM,EACJ,MAAM,GACN,MAAM,EAAE,GACR;QACE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QACzB,GAAG,EAAE,kBAAkB,GAAG,iBAAiB,GAAG,YAAY,CAAC;KAC5D,CACJ,CAAC;IACF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,CAAC;CACnC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,uBAkBzC,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* JetBrains HTTP Client in-file variables: @name = value (or @name=value).
|
|
3
|
-
* See https://www.jetbrains.com/help/idea/http-client-variables.html
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Parse a single @variable = value line. Returns undefined if the line is not a definition.
|
|
7
|
-
* Strips an optional trailing # comment from the value (JetBrains-style).
|
|
8
|
-
*/
|
|
9
|
-
export declare function parseAtVariableLine(line: string): {
|
|
10
|
-
name: string;
|
|
11
|
-
value: string;
|
|
12
|
-
} | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* Collect @ variables from lines before the first ### block marker.
|
|
15
|
-
*/
|
|
16
|
-
export declare function extractFileHeaderAtVariables(content: string): Record<string, string>;
|
|
17
|
-
//# sourceMappingURL=at-variables.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"at-variables.d.ts","sourceRoot":"","sources":["../../../src/lib/parser/at-variables.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,GACX;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAU7C;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,GACd,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUxB"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { KulalaError } from "./types/error";
|
|
2
|
-
import type { KulalaRequestBody } from "./types/body";
|
|
3
|
-
export declare const isBody: (obj: unknown) => obj is KulalaRequestBody;
|
|
4
|
-
export declare const getBody: (blockLines: string[], lineIdx: number, method?: string) => Promise<KulalaRequestBody | KulalaError>;
|
|
5
|
-
//# sourceMappingURL=body.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/lib/parser/body.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EACV,iBAAiB,EAKlB,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,MAAM,GAAI,KAAK,OAAO,KAAG,GAAG,IAAI,iBAuD5C,CAAC;AAEF,eAAO,MAAM,OAAO,GAClB,YAAY,MAAM,EAAE,EACpB,SAAS,MAAM,EACf,SAAS,MAAM,KACd,OAAO,CAAC,iBAAiB,GAAG,WAAW,CA4FzC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../src/lib/parser/comment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,EAAE,SAAS,MAAM,KAAG,aAM1D,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { KulalaError } from "./types/error";
|
|
2
|
-
import type { KulalaImportDirective, KulalaRunDirective } from "./types/directive";
|
|
3
|
-
/**
|
|
4
|
-
* Parse an import directive: "import ./path/to/file.http"
|
|
5
|
-
*/
|
|
6
|
-
export declare function parseImportDirective(line: string, lineNumber: number): KulalaImportDirective | KulalaError;
|
|
7
|
-
/**
|
|
8
|
-
* Parse a run directive: "run ./file.http" or "run #BLOCK_NAME" or "run #BLOCK_NAME (@var=value, @var2=value2)"
|
|
9
|
-
*/
|
|
10
|
-
export declare function parseRunDirective(line: string, lineNumber: number): KulalaRunDirective | KulalaError;
|
|
11
|
-
/**
|
|
12
|
-
* Check if a line is a directive (import or run).
|
|
13
|
-
*/
|
|
14
|
-
export declare function isDirective(line: string): boolean;
|
|
15
|
-
//# sourceMappingURL=directive.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"directive.d.ts","sourceRoot":"","sources":["../../../src/lib/parser/directive.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,GACjB,qBAAqB,GAAG,WAAW,CA0BrC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,GACjB,kBAAkB,GAAG,WAAW,CAiElC;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAQjD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/lib/parser/header.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,eAAO,MAAM,SAAS,GACpB,MAAM,MAAM,EACZ,SAAS,MAAM,EACf,WAAU,MAAM,GAAG,IAAW,KAC7B,YAAY,GAAG,WA0BjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/parser/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5D,OAAO,EACL,kBAAkB,EAInB,MAAM,eAAe,CAAC;AAavB,QAAA,MAAM,YAAY,EAAE,YAwGnB,CAAC;AAEF,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { KulalaDocument, KulalaStdinParsed } from "../../types";
|
|
2
|
-
export declare const writeRequestResponseToStderr: (res: unknown) => void;
|
|
3
|
-
/** Write a kulala-core error message to stderr (same shape as runner errors, does not exit). */
|
|
4
|
-
export declare const writeErrorToStderr: (error: string) => void;
|
|
5
|
-
export declare const writeRequestResponseToStdout: (res: unknown) => void;
|
|
6
|
-
export declare const writeToStderr: (doc: KulalaDocument) => void;
|
|
7
|
-
export declare const writeToStdout: (doc: KulalaDocument) => void;
|
|
8
|
-
export declare const getAllContentsFromStdinAtOnce: () => Promise<KulalaStdinParsed>;
|
|
9
|
-
export declare const pad: (num: number | string, size: number, padWith?: string) => string;
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/parser/lib/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErE,eAAO,MAAM,4BAA4B,GAAI,KAAK,OAAO,KAAG,IAG3D,CAAC;AAEF,gGAAgG;AAChG,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,KAAG,IAElD,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,KAAK,OAAO,KAAG,IAG3D,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,KAAK,cAAc,KAAG,IAInD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,KAAK,cAAc,KAAG,IAInD,CAAC;AAEF,eAAO,MAAM,6BAA6B,QAC9B,OAAO,CAAC,iBAAiB,CAiBlC,CAAC;AAEJ,eAAO,MAAM,GAAG,GACd,KAAK,MAAM,GAAG,MAAM,EACpB,MAAM,MAAM,EACZ,UAAS,MAAY,KACpB,MAIF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operator.d.ts","sourceRoot":"","sources":["../../../src/lib/parser/operator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAYvD,eAAO,MAAM,WAAW,GACtB,MAAM,MAAM,EACZ,SAAS,MAAM,KACd,cAAc,GAAG,WAqCnB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../src/lib/parser/parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAka9C,eAAO,MAAM,WAAW,GACtB,SAAS,MAAM,EACf,WAAW,MAAM,EACjB,eAAc,GAAG,CAAC,MAAM,CAAa,KACpC,OAAO,CAAC,cAAc,CAmMxB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { KulalaRequest } from "./types/request";
|
|
2
|
-
import type { KulalaError } from "./types/error";
|
|
3
|
-
export declare const isRequestContinuationLine: (line: string) => boolean;
|
|
4
|
-
/**
|
|
5
|
-
* Parse request line(s).
|
|
6
|
-
* Handles multi-line request with URL continuations and comments.
|
|
7
|
-
* Returns [KulalaRequest, linesConsumed].
|
|
8
|
-
*/
|
|
9
|
-
export declare const getRequest: (lines: string[], startLineIdx: number) => [KulalaRequest | KulalaError, number];
|
|
10
|
-
//# sourceMappingURL=request.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/lib/parser/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,aAAa,EAEd,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AA8CjD,eAAO,MAAM,yBAAyB,GAAI,MAAM,MAAM,KAAG,OACpB,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,UAAU,GACrB,OAAO,MAAM,EAAE,EACf,cAAc,MAAM,KACnB,CAAC,aAAa,GAAG,WAAW,EAAE,MAAM,CA0HtC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { KulalaError } from "./types/error";
|
|
2
|
-
import type { KulalaScript } from "./types/script";
|
|
3
|
-
export declare const preRequestScriptMarker = "< ";
|
|
4
|
-
export declare const postRequestScriptMarker = "> ";
|
|
5
|
-
/** Lines consumed by an inline `{% ... %}` script (including the opening and closing lines). */
|
|
6
|
-
export declare function getInlineScriptConsumedLineCount(line: string, blockLines: string[], lineIdx: number): number;
|
|
7
|
-
export declare const getScript: (line: string, blockLines: string[], lineIdx: number, filepath?: string) => Promise<KulalaScript | KulalaError>;
|
|
8
|
-
//# sourceMappingURL=script.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"script.d.ts","sourceRoot":"","sources":["../../../src/lib/parser/script.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAYnD,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAE5C,gGAAgG;AAChG,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAAE,EACpB,OAAO,EAAE,MAAM,GACd,MAAM,CASR;AAED,eAAO,MAAM,SAAS,GACpB,MAAM,MAAM,EACZ,YAAY,MAAM,EAAE,EACpB,SAAS,MAAM,EACf,WAAW,MAAM,KAChB,OAAO,CAAC,YAAY,GAAG,WAAW,CAwDpC,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { KulalaRequest } from "./request.ts";
|
|
2
|
-
import type { KulalaOperator } from "./operator";
|
|
3
|
-
import type { KulalaComment } from "./comment";
|
|
4
|
-
import type { KulalaScripts } from "./script";
|
|
5
|
-
import type { KulalaError } from "./error.ts";
|
|
6
|
-
export type KulalaPreambleEntry = KulalaOperator | KulalaComment;
|
|
7
|
-
export type KulalaBlock = {
|
|
8
|
-
name: string;
|
|
9
|
-
errors: KulalaError[];
|
|
10
|
-
preamble: KulalaPreambleEntry[];
|
|
11
|
-
comments: KulalaComment[];
|
|
12
|
-
operators: KulalaOperator[];
|
|
13
|
-
request: KulalaRequest;
|
|
14
|
-
scripts: KulalaScripts;
|
|
15
|
-
position: {
|
|
16
|
-
start: number;
|
|
17
|
-
end: number;
|
|
18
|
-
};
|
|
19
|
-
/** @name=value lines in this block before the request (JetBrains in-file variables). */
|
|
20
|
-
preambleVariables?: Record<string, string>;
|
|
21
|
-
/** @ variables from the start of the .http file this block was parsed from (imports / run file). */
|
|
22
|
-
sourceFileHeaderVariables?: Record<string, string>;
|
|
23
|
-
};
|
|
24
|
-
export type KulalaBlockLineNumber = number;
|
|
25
|
-
export type KulalaBlockLineTypeName = "afterBody" | "afterHeaders" | "body" | "comment" | "docVariable" | "headers" | "name" | "operator" | "postRequestScript" | "preRequestScript" | "request" | "requestContinuation" | "responseRedirect" | "unknown";
|
|
26
|
-
export type KulalaBlockLineType = {
|
|
27
|
-
name: KulalaBlockLineTypeName;
|
|
28
|
-
lineNumber: KulalaBlockLineNumber;
|
|
29
|
-
};
|
|
30
|
-
export type KulalaSeenBlockLineTypes = Set<KulalaBlockLineTypeName>;
|
|
31
|
-
//# sourceMappingURL=block.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../../src/lib/parser/types/block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG9C,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG,aAAa,CAAC;AAEjE,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,EAAE,CAAC;IAEtB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,OAAO,EAAE,aAAa,CAAC;IACvB,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,oGAAoG;IACpG,yBAAyB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C,MAAM,MAAM,uBAAuB,GAC/B,WAAW,GACX,cAAc,GACd,MAAM,GACN,SAAS,GACT,aAAa,GACb,SAAS,GACT,MAAM,GACN,UAAU,GACV,mBAAmB,GACnB,kBAAkB,GAClB,SAAS,GACT,qBAAqB,GACrB,kBAAkB,GAClB,SAAS,CAAC;AAEd,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,uBAAuB,CAAC;IAC9B,UAAU,EAAE,qBAAqB,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,GAAG,CAAC,uBAAuB,CAAC,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export type KulalaRequestBodyType = "json" | "form" | "file" | "raw" | "graphql" | "bodyFromFile";
|
|
2
|
-
export type KulalaRequestGraphQLBody = {
|
|
3
|
-
query: string;
|
|
4
|
-
variables?: Record<string, unknown>;
|
|
5
|
-
};
|
|
6
|
-
export type KulalaRequestFormBody = {
|
|
7
|
-
[key: string]: string;
|
|
8
|
-
};
|
|
9
|
-
export type KulalaRequestFileBody = {
|
|
10
|
-
/** The path to the file to be uploaded */
|
|
11
|
-
filePath: string;
|
|
12
|
-
/** The filename to be used in the request, if different from the actual file name */
|
|
13
|
-
filename?: string;
|
|
14
|
-
};
|
|
15
|
-
/** Body read from a file (JetBrains-style `< path` syntax). Stored under __bodyFromFile to avoid conflicting with JSON payloads. */
|
|
16
|
-
export type KulalaRequestBodyFromFileContent = {
|
|
17
|
-
__bodyFromFile: string;
|
|
18
|
-
};
|
|
19
|
-
export type KulalaRequestRawBody = {
|
|
20
|
-
contentType?: string;
|
|
21
|
-
};
|
|
22
|
-
export type KulalaRequestBody = {
|
|
23
|
-
type: "json";
|
|
24
|
-
content: string;
|
|
25
|
-
} | {
|
|
26
|
-
type: "form";
|
|
27
|
-
content: KulalaRequestFormBody;
|
|
28
|
-
} | {
|
|
29
|
-
type: "file";
|
|
30
|
-
content: KulalaRequestFileBody;
|
|
31
|
-
} | {
|
|
32
|
-
type: "raw";
|
|
33
|
-
content: string;
|
|
34
|
-
} | {
|
|
35
|
-
type: "graphql";
|
|
36
|
-
content: KulalaRequestGraphQLBody;
|
|
37
|
-
} | {
|
|
38
|
-
type: "bodyFromFile";
|
|
39
|
-
content: KulalaRequestBodyFromFileContent;
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=body.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../../src/lib/parser/types/body.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC7B,MAAM,GACN,MAAM,GACN,MAAM,GACN,KAAK,GACL,SAAS,GACT,cAAc,CAAC;AAEnB,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,oIAAoI;AACpI,MAAM,MAAM,gCAAgC,GAAG;IAC7C,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GACzB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,qBAAqB,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,qBAAqB,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,wBAAwB,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,gCAAgC,CAAA;CAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../src/lib/parser/types/comment.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,KAAK,MAAM,EAAE,GAAG,MAAM,MAAM,EAAE,CAAC;AAEjE,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type KulalaImportDirective = {
|
|
2
|
-
type: "import";
|
|
3
|
-
filepath: string;
|
|
4
|
-
lineNumber: number;
|
|
5
|
-
};
|
|
6
|
-
export type KulalaRunDirective = {
|
|
7
|
-
type: "run";
|
|
8
|
-
target: string;
|
|
9
|
-
variableOverrides?: Record<string, string>;
|
|
10
|
-
lineNumber: number;
|
|
11
|
-
};
|
|
12
|
-
export type KulalaDirective = KulalaImportDirective | KulalaRunDirective;
|
|
13
|
-
//# sourceMappingURL=directive.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"directive.d.ts","sourceRoot":"","sources":["../../../../src/lib/parser/types/directive.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,qBAAqB,GAAG,kBAAkB,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { KulalaVariable } from "./variable";
|
|
2
|
-
import type { KulalaBlock } from "./block";
|
|
3
|
-
import type { KulalaDirective } from "./directive";
|
|
4
|
-
export type KulalaDocument = {
|
|
5
|
-
filepath?: string;
|
|
6
|
-
variables?: Record<string, KulalaVariable>;
|
|
7
|
-
/** @name=value definitions before the first ### block (JetBrains in-file variables). */
|
|
8
|
-
fileHeaderVariables?: Record<string, string>;
|
|
9
|
-
directives: KulalaDirective[];
|
|
10
|
-
blocks: KulalaBlock[];
|
|
11
|
-
hasErrors?: boolean;
|
|
12
|
-
/** Number of directive lines removed from the top of the file. Used to adjust cursor positions. */
|
|
13
|
-
directiveLinesRemoved?: number;
|
|
14
|
-
/** Number of native blocks (blocks from the current file, excluding imported/run blocks). */
|
|
15
|
-
nativeBlockCount?: number;
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=document.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../../src/lib/parser/types/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC3C,wFAAwF;IACxF,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mGAAmG;IACnG,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,6FAA6F;IAC7F,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../src/lib/parser/types/error.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../src/lib/parser/types/header.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/parser/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC"}
|