@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,10 +0,0 @@
|
|
|
1
|
-
export type KulalaOperatorName = "accept" | "no-redirect" | "no-log" | "no-cookie-jar" | "no-auto-encoding" | "timeout" | "connection-timeout" | "kulala-curl-insecure" | "kulala-file-contents-to-variable" | "kulala-expect-status-code" | "kulala-prompt";
|
|
2
|
-
export declare const kulalaOperatorNames: Set<KulalaOperatorName>;
|
|
3
|
-
export type KulalaOperatorArgs = string | number | boolean;
|
|
4
|
-
export type KulalaOperatorString = `# @${KulalaOperatorName}${KulalaOperatorArgs extends string ? ` ${KulalaOperatorArgs}` : ""}`;
|
|
5
|
-
export type KulalaOperator = {
|
|
6
|
-
name: KulalaOperatorName;
|
|
7
|
-
args?: KulalaOperatorArgs;
|
|
8
|
-
lineNumber: number;
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=operator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operator.d.ts","sourceRoot":"","sources":["../../../../src/lib/parser/types/operator.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,aAAa,GACb,QAAQ,GACR,eAAe,GACf,kBAAkB,GAClB,SAAS,GACT,oBAAoB,GACpB,sBAAsB,GACtB,kCAAkC,GAClC,2BAA2B,GAC3B,eAAe,CAAC;AAEpB,eAAO,MAAM,mBAAmB,EAAE,GAAG,CAAC,kBAAkB,CAYtD,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,MAAM,MAAM,oBAAoB,GAC9B,MAAM,kBAAkB,GAAG,kBAAkB,SAAS,MAAM,GACxD,IAAI,kBAAkB,EAAE,GACxB,EAAE,EAAE,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,kBAAkB,CAAC;IACzB,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../../src/lib/parser/types/parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC7C,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { KulalaComment } from "./comment";
|
|
2
|
-
export type KulalaHttpMethodAvailable = "DELETE" | "GET" | "GRAPHQL" | "GRPC" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "WS" | "WSS";
|
|
3
|
-
export type KulalaHttpVersion = "HTTP/1.0" | "HTTP/1.1" | "HTTP/2";
|
|
4
|
-
export type KulalaHttpMethodWithBody = Exclude<KulalaHttpMethodAvailable, "GET" | "HEAD" | "OPTIONS">;
|
|
5
|
-
export type KulalaHttpMethodWithoutBody = Extract<KulalaHttpMethodAvailable, "GET" | "HEAD" | "OPTIONS">;
|
|
6
|
-
export type KulalaHttpMethod = KulalaHttpMethodWithBody | KulalaHttpMethodWithoutBody;
|
|
7
|
-
export type KulalaHttpScheme = "http" | "https" | "ws" | "wss";
|
|
8
|
-
/** Request target as written in the file; may be a JetBrains-style `{{var}}` template (including full URLs). */
|
|
9
|
-
export type KulalaHttpURL = string;
|
|
10
|
-
export type KulalaHttpRequestLineString = `${KulalaHttpMethodAvailable} ${KulalaHttpURL} ${KulalaHttpVersion}`;
|
|
11
|
-
export type KulalaRequestLinePart = {
|
|
12
|
-
type: "url";
|
|
13
|
-
line: string;
|
|
14
|
-
} | {
|
|
15
|
-
type: "comment";
|
|
16
|
-
comment: KulalaComment;
|
|
17
|
-
};
|
|
18
|
-
export type KulalaHeaderSectionEntry = {
|
|
19
|
-
type: "header";
|
|
20
|
-
name: string;
|
|
21
|
-
value?: string;
|
|
22
|
-
} | {
|
|
23
|
-
type: "comment";
|
|
24
|
-
comment: KulalaComment;
|
|
25
|
-
};
|
|
26
|
-
type KulalaRequestBody = string | object;
|
|
27
|
-
/** Redirect response body to a file (JetBrains >> / >>! syntax). */
|
|
28
|
-
export type KulalaResponseRedirect = {
|
|
29
|
-
filePath: string;
|
|
30
|
-
overwrite: boolean;
|
|
31
|
-
};
|
|
32
|
-
export type KulalaRequest = {
|
|
33
|
-
method: KulalaHttpMethod;
|
|
34
|
-
url: KulalaHttpURL;
|
|
35
|
-
/** HTTP version from the request line (e.g. HTTP/1.1, HTTP/2). Omitted if not present. */
|
|
36
|
-
httpVersion?: KulalaHttpVersion;
|
|
37
|
-
headerSection: KulalaHeaderSectionEntry[];
|
|
38
|
-
requestLineParts?: KulalaRequestLinePart[];
|
|
39
|
-
body?: KulalaRequestBody;
|
|
40
|
-
/** When set, save response body to this file (>> = create/suffix, >>! = overwrite). */
|
|
41
|
-
responseRedirect?: KulalaResponseRedirect;
|
|
42
|
-
};
|
|
43
|
-
export {};
|
|
44
|
-
//# sourceMappingURL=request.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../src/lib/parser/types/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,MAAM,yBAAyB,GACjC,QAAQ,GACR,KAAK,GACL,SAAS,GACT,MAAM,GACN,MAAM,GACN,SAAS,GACT,OAAO,GACP,MAAM,GACN,KAAK,GACL,IAAI,GACJ,KAAK,CAAC;AAEV,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEnE,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC5C,yBAAyB,EACzB,KAAK,GAAG,MAAM,GAAG,SAAS,CAC3B,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAC/C,yBAAyB,EACzB,KAAK,GAAG,MAAM,GAAG,SAAS,CAC3B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GACxB,wBAAwB,GACxB,2BAA2B,CAAC;AAEhC,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,CAAC;AAE/D,gHAAgH;AAChH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAsBnC,MAAM,MAAM,2BAA2B,GACrC,GAAG,yBAAyB,IAAI,aAAa,IAAI,iBAAiB,EAAE,CAAC;AAIvE,MAAM,MAAM,qBAAqB,GAC7B;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC7B;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,aAAa,CAAA;CAAE,CAAC;AAGhD,MAAM,MAAM,wBAAwB,GAChC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,aAAa,CAAA;CAAE,CAAC;AAEhD,KAAK,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC,oEAAoE;AACpE,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAOF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,gBAAgB,CAAC;IAEzB,GAAG,EAAE,aAAa,CAAC;IACnB,0FAA0F;IAC1F,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAEhC,aAAa,EAAE,wBAAwB,EAAE,CAAC;IAE1C,gBAAgB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC3C,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;CAC3C,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type KulalaScriptType = "preRequest" | "postRequest";
|
|
2
|
-
export type KulalaScript = {
|
|
3
|
-
type: KulalaScriptType;
|
|
4
|
-
lang: "ts" | "js" | "lua";
|
|
5
|
-
/** The path to the script file, or if inline the path of the http file */
|
|
6
|
-
filepath?: string;
|
|
7
|
-
content: string;
|
|
8
|
-
lineNumber: number;
|
|
9
|
-
};
|
|
10
|
-
export type KulalaScripts = {
|
|
11
|
-
[key in KulalaScriptType]: KulalaScript[];
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=script.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"script.d.ts","sourceRoot":"","sources":["../../../../src/lib/parser/types/script.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,aAAa,CAAC;AAE5D,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAC1B,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;KACzB,GAAG,IAAI,gBAAgB,GAAG,YAAY,EAAE;CAC1C,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export type KulalaSessionItem = {
|
|
2
|
-
lastModified: Date;
|
|
3
|
-
data: string | null | undefined | Record<string, unknown> | Array<unknown> | number | boolean;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
Global session is a record of session items,
|
|
7
|
-
where the key is the session name and the value is a KulalaSessionItem.
|
|
8
|
-
This structure allows for easy retrieval and management of session data
|
|
9
|
-
across the entire application.
|
|
10
|
-
For example, to access a specific session item,
|
|
11
|
-
you would use `globalSession[itemName]`.
|
|
12
|
-
This design ensures that session data is both organized and easily accessible.
|
|
13
|
-
*/
|
|
14
|
-
export type KulalaGlobalSession = Record<string, KulalaSessionItem>;
|
|
15
|
-
/**
|
|
16
|
-
Local session is a record of sessions for each file, where the key is the file path
|
|
17
|
-
and the value is a record of session items for that file.
|
|
18
|
-
Each session item is a record where the key is the session name
|
|
19
|
-
and the value is a KulalaSessionItem.
|
|
20
|
-
This structure allows for easy retrieval and management of session data
|
|
21
|
-
specific to each file, while also maintaining a clear organization of session items.
|
|
22
|
-
For example, to access a specific session item for a file,
|
|
23
|
-
you would use `localSession[filePath][itemName]`.
|
|
24
|
-
This design ensures that session data is both file-specific and easily accessible.
|
|
25
|
-
*/
|
|
26
|
-
export type KulalaLocalSession = Record<string, Record<string, KulalaSessionItem>>;
|
|
27
|
-
//# sourceMappingURL=session.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../src/lib/parser/types/session.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,YAAY,EAAE,IAAI,CAAC;IACnB,IAAI,EACA,MAAM,GACN,IAAI,GACJ,SAAS,GACT,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,KAAK,CAAC,OAAO,CAAC,GACd,MAAM,GACN,OAAO,CAAC;CACb,CAAC;AAEF;;;;;;;;EAQE;AACF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAEpE;;;;;;;;;;EAUE;AACF,MAAM,MAAM,kBAAkB,GAAG,MAAM,CACrC,MAAM,EACN,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAClC,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export type KulalaStdinActionParse = {
|
|
2
|
-
action: "parse";
|
|
3
|
-
filepath?: string;
|
|
4
|
-
content: string;
|
|
5
|
-
};
|
|
6
|
-
export type KulalaStdinActionRunLimit = {
|
|
7
|
-
filter: "cursorPosition";
|
|
8
|
-
line: number;
|
|
9
|
-
column: number;
|
|
10
|
-
} | {
|
|
11
|
-
filter: "name";
|
|
12
|
-
name: string;
|
|
13
|
-
};
|
|
14
|
-
export type KulalaStdinActionRun = {
|
|
15
|
-
action: "run";
|
|
16
|
-
content: string;
|
|
17
|
-
filepath?: string;
|
|
18
|
-
/** Environment name for variable lookup (kuba, http-client.env.json). Defaults to "default". */
|
|
19
|
-
env?: string;
|
|
20
|
-
limit?: KulalaStdinActionRunLimit[];
|
|
21
|
-
};
|
|
22
|
-
export type KulalaStdinActionContinue = {
|
|
23
|
-
action: "continue";
|
|
24
|
-
promptId: string;
|
|
25
|
-
inputs: Array<{
|
|
26
|
-
id: string;
|
|
27
|
-
value: string;
|
|
28
|
-
}>;
|
|
29
|
-
};
|
|
30
|
-
export type KulalaStdinParsed = KulalaStdinActionParse | KulalaStdinActionRun | KulalaStdinActionContinue;
|
|
31
|
-
//# sourceMappingURL=stdinparsed.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stdinparsed.d.ts","sourceRoot":"","sources":["../../../../src/lib/parser/types/stdinparsed.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,OAAO,CAAC;IAEhB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GACjC;IAME,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,GACD;IACE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEN,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,KAAK,CAAC;IAEd,OAAO,EAAE,MAAM,CAAC;IAEhB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gGAAgG;IAChG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,yBAAyB,EAAE,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,KAAK,CAAC;QACZ,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;CACJ,CAAC;AAEF,MAAM,MAAM,iBAAiB,GACzB,sBAAsB,GACtB,oBAAoB,GACpB,yBAAyB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"variable.d.ts","sourceRoot":"","sources":["../../../../src/lib/parser/types/variable.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAC1C,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type CookieRecord = {
|
|
2
|
-
domain: string;
|
|
3
|
-
path: string;
|
|
4
|
-
name: string;
|
|
5
|
-
value: string;
|
|
6
|
-
expiresAt?: string;
|
|
7
|
-
secure: boolean;
|
|
8
|
-
httpOnly: boolean;
|
|
9
|
-
sameSite?: string;
|
|
10
|
-
};
|
|
11
|
-
export declare function storeCookiesFromResponse(urlStr: string, setCookieHeaders: string[]): void;
|
|
12
|
-
export declare function getCookieHeaderForRequest(urlStr: string): string | undefined;
|
|
13
|
-
//# sourceMappingURL=cookie-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cookie-store.d.ts","sourceRoot":"","sources":["../../../src/lib/persistence/cookie-store.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAqFF,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,EAAE,GACzB,IAAI,CAiDN;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAsC5E"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the OS-specific application data directory for Kulala Core.
|
|
3
|
-
* - Linux: $XDG_DATA_HOME/kulala-core (fallback: ~/.local/share/kulala-core)
|
|
4
|
-
* - macOS: ~/Library/Application Support/kulala-core
|
|
5
|
-
* - Windows: %APPDATA%/kulala-core (e.g. C:\Users\<user>\AppData\Roaming\kulala-core)
|
|
6
|
-
*/
|
|
7
|
-
export declare function getDataDir(): string;
|
|
8
|
-
/**
|
|
9
|
-
* Ensures the Kulala data directory exists and returns its path.
|
|
10
|
-
*/
|
|
11
|
-
export declare function ensureDataDir(): string;
|
|
12
|
-
//# sourceMappingURL=data-dir.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-dir.d.ts","sourceRoot":"","sources":["../../../src/lib/persistence/data-dir.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAoBnC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAMtC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Database } from "bun:sqlite";
|
|
2
|
-
import { isKeychainAvailable } from "./keychain";
|
|
3
|
-
/**
|
|
4
|
-
* Opens the Kulala SQLite database in the OS-specific data directory,
|
|
5
|
-
* creating the directory and schema if needed.
|
|
6
|
-
* Uses a single shared instance.
|
|
7
|
-
*
|
|
8
|
-
* Graceful fallback: if you never call unlockDb(), the DB is used unencrypted
|
|
9
|
-
* (plain SQLite file). When keychain is unavailable, getDb() also opens
|
|
10
|
-
* unencrypted. Encryption is only used when unlockDb()/lockDb() are used.
|
|
11
|
-
* If the DB was previously locked via keychain, call unlockDb() first.
|
|
12
|
-
*/
|
|
13
|
-
export declare function getDb(): Database;
|
|
14
|
-
/**
|
|
15
|
-
* Close the database connection. Useful for tests or graceful shutdown.
|
|
16
|
-
* Does not encrypt; use lockDb() for keychain lock.
|
|
17
|
-
*/
|
|
18
|
-
export declare function closeDb(): void;
|
|
19
|
-
/**
|
|
20
|
-
* Unlock the DB using the OS keychain (macOS Keychain, Linux Secret Service).
|
|
21
|
-
* Gets the encryption key from the keychain; if the DB file is encrypted, decrypts to a temp file and opens it.
|
|
22
|
-
* If no key exists yet, generates one and stores it (DB will be encrypted on first lock).
|
|
23
|
-
* Resolves to true if unlocked, false if keychain is not available or key retrieval failed.
|
|
24
|
-
*/
|
|
25
|
-
export declare function unlockDb(): Promise<boolean>;
|
|
26
|
-
/**
|
|
27
|
-
* Lock the DB: close it and encrypt the file using the key from the OS keychain.
|
|
28
|
-
* Only has an effect when the DB was opened via unlockDb().
|
|
29
|
-
*/
|
|
30
|
-
export declare function lockDb(): Promise<boolean>;
|
|
31
|
-
/** Whether the DB is currently unlocked with keychain (open and using keychain). */
|
|
32
|
-
export declare function isUnlockedWithKeychain(): boolean;
|
|
33
|
-
/** Whether the OS keychain is available on this platform. */
|
|
34
|
-
export { isKeychainAvailable };
|
|
35
|
-
/**
|
|
36
|
-
* For tests: open an in-memory database and run schema.
|
|
37
|
-
*/
|
|
38
|
-
export declare function getDbInMemory(): Database;
|
|
39
|
-
/**
|
|
40
|
-
* For tests: replace the shared DB instance (e.g. with in-memory).
|
|
41
|
-
* Call closeDb() or setDbForTesting(newDb) to restore normal behavior.
|
|
42
|
-
*/
|
|
43
|
-
export declare function setDbForTesting(database: Database): void;
|
|
44
|
-
//# sourceMappingURL=db.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../../src/lib/persistence/db.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,EAGL,mBAAmB,EACpB,MAAM,YAAY,CAAC;AA0GpB;;;;;;;;;GASG;AACH,wBAAgB,KAAK,IAAI,QAAQ,CAahC;AAED;;;GAGG;AACH,wBAAgB,OAAO,IAAI,IAAI,CAO9B;AAED;;;;;GAKG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,CA4BjD;AAED;;;GAGG;AACH,wBAAsB,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,CAwB/C;AAED,oFAAoF;AACpF,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD;AAED,6DAA6D;AAC7D,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B;;GAEG;AACH,wBAAgB,aAAa,IAAI,QAAQ,CAIxC;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAOxD"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { KulalaDocument } from "../parser/types";
|
|
2
|
-
/**
|
|
3
|
-
* Optional content hash (e.g. hash of raw file content) for cache invalidation.
|
|
4
|
-
* If provided and different from stored hash, the document is updated.
|
|
5
|
-
*/
|
|
6
|
-
export declare function saveDocument(doc: KulalaDocument, contentHash?: string): void;
|
|
7
|
-
/**
|
|
8
|
-
* Load a parsed document by filepath. Returns null if not found.
|
|
9
|
-
*/
|
|
10
|
-
export declare function loadDocument(filepath: string): KulalaDocument | null;
|
|
11
|
-
/**
|
|
12
|
-
* List all stored document filepaths.
|
|
13
|
-
*/
|
|
14
|
-
export declare function listDocumentFilepaths(): string[];
|
|
15
|
-
//# sourceMappingURL=document-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document-store.d.ts","sourceRoot":"","sources":["../../../src/lib/persistence/document-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,cAAc,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAe5E;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAcpE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,EAAE,CAMhD"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare const KEY_LEN = 32;
|
|
2
|
-
declare function keyFromKeychain(keychainSecret: string): Buffer;
|
|
3
|
-
declare function generateKey(): Buffer;
|
|
4
|
-
/**
|
|
5
|
-
* Encrypt data with AES-256-GCM. Format: magic (12) + iv (12) + tag (16) + ciphertext.
|
|
6
|
-
*/
|
|
7
|
-
export declare function encrypt(data: Buffer, key: Buffer): Buffer;
|
|
8
|
-
/**
|
|
9
|
-
* Decrypt data. Returns null if format is invalid or decryption fails.
|
|
10
|
-
*/
|
|
11
|
-
export declare function decrypt(encrypted: Buffer, key: Buffer): Buffer | null;
|
|
12
|
-
export declare function isEncryptedFile(path: string): boolean;
|
|
13
|
-
export declare function encryptFileToPath(sourcePath: string, destPath: string, keychainSecret: string): Promise<void>;
|
|
14
|
-
export declare function decryptFileToPath(sourcePath: string, destPath: string, keychainSecret: string): Promise<boolean>;
|
|
15
|
-
export { generateKey, keyFromKeychain, KEY_LEN };
|
|
16
|
-
export declare function keyToKeychainSecret(key: Buffer): string;
|
|
17
|
-
//# sourceMappingURL=encrypted-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encrypted-store.d.ts","sourceRoot":"","sources":["../../../src/lib/persistence/encrypted-store.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,OAAO,KAAK,CAAC;AAGnB,iBAAS,eAAe,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAMvD;AAED,iBAAS,WAAW,IAAI,MAAM,CAE7B;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAMzD;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgBrE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMrD;AAED,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,IAAI,CAAC,CAKf;AAED,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,OAAO,CAAC,CAOlB;AAED,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC;AACjD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvD"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export type HistoryEntry = {
|
|
2
|
-
id: number;
|
|
3
|
-
stableDocId: string | null;
|
|
4
|
-
blockName: string | null;
|
|
5
|
-
method: string;
|
|
6
|
-
url: string;
|
|
7
|
-
requestHeaders?: Record<string, string>;
|
|
8
|
-
requestBodyText?: string;
|
|
9
|
-
statusCode?: number;
|
|
10
|
-
responseHeaders?: Record<string, string>;
|
|
11
|
-
responseBodyText?: string;
|
|
12
|
-
createdAt: string;
|
|
13
|
-
};
|
|
14
|
-
export declare function saveHistoryEntry(entry: {
|
|
15
|
-
stableDocId?: string;
|
|
16
|
-
blockName?: string;
|
|
17
|
-
method: string;
|
|
18
|
-
url: string;
|
|
19
|
-
requestHeaders?: Record<string, string>;
|
|
20
|
-
requestBodyText?: string;
|
|
21
|
-
statusCode?: number;
|
|
22
|
-
responseHeaders?: Record<string, string>;
|
|
23
|
-
responseBodyText?: string;
|
|
24
|
-
}): number;
|
|
25
|
-
export declare function listHistoryEntries(limit?: number): HistoryEntry[];
|
|
26
|
-
//# sourceMappingURL=history-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"history-store.d.ts","sourceRoot":"","sources":["../../../src/lib/persistence/history-store.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAkBF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,GAAG,MAAM,CA+BT;AAED,wBAAgB,kBAAkB,CAAC,KAAK,GAAE,MAAW,GAAG,YAAY,EAAE,CA4CrE"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Persistence layer for Kulala: SQLite-backed storage in an OS-specific data directory.
|
|
3
|
-
*
|
|
4
|
-
* - Documents: parsed HTTP documents for replay (by filepath).
|
|
5
|
-
* - Request runs: replay count per request block.
|
|
6
|
-
* - Variables: global, per-document, or per-request.
|
|
7
|
-
*
|
|
8
|
-
* Data directory:
|
|
9
|
-
* - Linux: $XDG_DATA_HOME/kulala-core (~/.local/share/kulala-core)
|
|
10
|
-
* - macOS: ~/Library/Application Support/kulala-core
|
|
11
|
-
* - Windows: %APPDATA%/kulala-core
|
|
12
|
-
*
|
|
13
|
-
* Optional OS keychain lock/unlock:
|
|
14
|
-
* - macOS: Keychain Access; Linux: Secret Service (secret-tool); Windows: Credential Manager (PowerShell P/Invoke).
|
|
15
|
-
* - unlockDb() / lockDb() encrypt the DB at rest when locked.
|
|
16
|
-
* - Fallback: if keychain is unavailable or you never call unlockDb(), getDb() uses a normal unencrypted SQLite file.
|
|
17
|
-
*/
|
|
18
|
-
export { getDataDir, ensureDataDir } from "./data-dir";
|
|
19
|
-
export { getDb, closeDb, getDbInMemory, setDbForTesting, unlockDb, lockDb, isUnlockedWithKeychain, isKeychainAvailable, } from "./db";
|
|
20
|
-
export { saveDocument, loadDocument, listDocumentFilepaths, } from "./document-store";
|
|
21
|
-
export { incrementReplayCount, getReplayCount, listRequestRuns, type RequestRun, } from "./replay-store";
|
|
22
|
-
export { setVariable, getVariable, getVariables, deleteVariable, type VariableScope, } from "./variable-store";
|
|
23
|
-
export { createPrompt, getPrompt, deletePrompt, cleanupExpiredPrompts, type PromptType, type PromptContext, type PendingPrompt, } from "./prompt-store";
|
|
24
|
-
export { saveHistoryEntry, listHistoryEntries, type HistoryEntry, } from "./history-store";
|
|
25
|
-
export { storeCookiesFromResponse, getCookieHeaderForRequest, type CookieRecord, } from "./cookie-store";
|
|
26
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/persistence/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EACL,KAAK,EACL,OAAO,EACP,aAAa,EACb,eAAe,EACf,QAAQ,EACR,MAAM,EACN,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,MAAM,CAAC;AACd,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,KAAK,UAAU,GAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,cAAc,EACd,KAAK,aAAa,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,qBAAqB,EACrB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,YAAY,GAClB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get a secret from the OS keychain.
|
|
3
|
-
* - macOS: Keychain Access (security CLI)
|
|
4
|
-
* - Linux: Secret Service (secret-tool, requires libsecret)
|
|
5
|
-
* - Windows: Credential Manager via PowerShell P/Invoke (no extra deps).
|
|
6
|
-
* May trigger an OS unlock prompt (e.g. keychain password) on first access.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getKeychainSecret(): Promise<string | null>;
|
|
9
|
-
/**
|
|
10
|
-
* Store a secret in the OS keychain. Overwrites if it already exists.
|
|
11
|
-
*/
|
|
12
|
-
export declare function setKeychainSecret(secret: string): Promise<boolean>;
|
|
13
|
-
/**
|
|
14
|
-
* Remove the secret from the OS keychain.
|
|
15
|
-
*/
|
|
16
|
-
export declare function deleteKeychainSecret(): Promise<boolean>;
|
|
17
|
-
/**
|
|
18
|
-
* Whether the current platform has keychain support.
|
|
19
|
-
* - macOS: always
|
|
20
|
-
* - Linux/BSD: when secret-tool is available (libsecret)
|
|
21
|
-
* - Windows: when PowerShell is available (typical on Windows 7+)
|
|
22
|
-
*/
|
|
23
|
-
export declare function isKeychainAvailable(): boolean;
|
|
24
|
-
//# sourceMappingURL=keychain.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keychain.d.ts","sourceRoot":"","sources":["../../../src/lib/persistence/keychain.ts"],"names":[],"mappings":"AAkIA;;;;;;GAMG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA8BhE;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAgDxE;AAED;;GAEG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,OAAO,CAAC,CA2B7D;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAuB7C"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export type PromptType = "oauth2_authorization_code" | "oauth2_implicit_token" | "oauth2_device_code" | "custom";
|
|
2
|
-
export interface PromptContext {
|
|
3
|
-
promptType: PromptType;
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
}
|
|
6
|
-
export interface PendingPrompt {
|
|
7
|
-
id: string;
|
|
8
|
-
promptType: PromptType;
|
|
9
|
-
context: PromptContext;
|
|
10
|
-
createdAt: string;
|
|
11
|
-
expiresAt?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Create a pending prompt and return its ID.
|
|
15
|
-
* The context should contain all information needed to resume the operation.
|
|
16
|
-
*/
|
|
17
|
-
export declare function createPrompt(promptType: PromptType, context: PromptContext, expiresInSeconds?: number): string;
|
|
18
|
-
/**
|
|
19
|
-
* Get a pending prompt by ID.
|
|
20
|
-
* Returns null if not found or expired.
|
|
21
|
-
*/
|
|
22
|
-
export declare function getPrompt(id: string): PendingPrompt | null;
|
|
23
|
-
/**
|
|
24
|
-
* Delete a pending prompt (after it's been used or cancelled).
|
|
25
|
-
*/
|
|
26
|
-
export declare function deletePrompt(id: string): void;
|
|
27
|
-
/**
|
|
28
|
-
* Clean up expired prompts.
|
|
29
|
-
*/
|
|
30
|
-
export declare function cleanupExpiredPrompts(): number;
|
|
31
|
-
//# sourceMappingURL=prompt-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-store.d.ts","sourceRoot":"","sources":["../../../src/lib/persistence/prompt-store.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAClB,2BAA2B,GAC3B,uBAAuB,GACvB,oBAAoB,GACpB,QAAQ,CAAC;AAEb,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,aAAa,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,aAAa,EACtB,gBAAgB,CAAC,EAAE,MAAM,GACxB,MAAM,CAcR;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAwC1D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAG7C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAQ9C"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export type RequestRun = {
|
|
2
|
-
documentFilepath: string;
|
|
3
|
-
blockName: string;
|
|
4
|
-
runCount: number;
|
|
5
|
-
lastRunAt: string | null;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Increment replay count for a request block and return the new count.
|
|
9
|
-
*/
|
|
10
|
-
export declare function incrementReplayCount(documentFilepath: string, blockName: string): number;
|
|
11
|
-
/**
|
|
12
|
-
* Get replay count and last run time for a request block.
|
|
13
|
-
*/
|
|
14
|
-
export declare function getReplayCount(documentFilepath: string, blockName: string): RequestRun | null;
|
|
15
|
-
/**
|
|
16
|
-
* List all request runs for a document (or all documents if filepath omitted).
|
|
17
|
-
*/
|
|
18
|
-
export declare function listRequestRuns(documentFilepath?: string): RequestRun[];
|
|
19
|
-
//# sourceMappingURL=replay-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replay-store.d.ts","sourceRoot":"","sources":["../../../src/lib/persistence/replay-store.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,gBAAgB,EAAE,MAAM,EACxB,SAAS,EAAE,MAAM,GAChB,MAAM,CAoBR;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,gBAAgB,EAAE,MAAM,EACxB,SAAS,EAAE,MAAM,GAChB,UAAU,GAAG,IAAI,CAsBnB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,UAAU,EAAE,CAmCvE"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { KulalaVariable } from "../parser/types/variable";
|
|
2
|
-
export type VariableScope = "global" | "document" | "request";
|
|
3
|
-
/**
|
|
4
|
-
* Set a variable. Value is JSON-serialized.
|
|
5
|
-
* - global: document and blockName ignored
|
|
6
|
-
* - document: document required, blockName ignored
|
|
7
|
-
* - request: document and blockName required
|
|
8
|
-
*/
|
|
9
|
-
export declare function setVariable(scope: VariableScope, name: string, value: KulalaVariable[string] | Record<string, unknown>, options?: {
|
|
10
|
-
document?: string;
|
|
11
|
-
blockName?: string;
|
|
12
|
-
}): void;
|
|
13
|
-
/**
|
|
14
|
-
* Get a variable by scope and name. Returns undefined if not found.
|
|
15
|
-
*/
|
|
16
|
-
export declare function getVariable(scope: VariableScope, name: string, options?: {
|
|
17
|
-
document?: string;
|
|
18
|
-
blockName?: string;
|
|
19
|
-
}): KulalaVariable[string] | Record<string, unknown> | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* Get all variables for a scope (e.g. all global vars, or all vars for a document).
|
|
22
|
-
*/
|
|
23
|
-
export declare function getVariables(scope: VariableScope, options?: {
|
|
24
|
-
document?: string;
|
|
25
|
-
blockName?: string;
|
|
26
|
-
}): Record<string, KulalaVariable[string] | Record<string, unknown>>;
|
|
27
|
-
/**
|
|
28
|
-
* Delete a variable.
|
|
29
|
-
*/
|
|
30
|
-
export declare function deleteVariable(scope: VariableScope, name: string, options?: {
|
|
31
|
-
document?: string;
|
|
32
|
-
blockName?: string;
|
|
33
|
-
}): boolean;
|
|
34
|
-
//# sourceMappingURL=variable-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"variable-store.d.ts","sourceRoot":"","sources":["../../../src/lib/persistence/variable-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;AAY9D;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvD,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAClD,IAAI,CAeN;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAClD,cAAc,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAmB9D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,aAAa,EACpB,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAClD,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAwBlE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAClD,OAAO,CAST"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { KulalaDocument } from "../parser/types";
|
|
2
|
-
import type { KulalaBlock } from "../parser/types/block";
|
|
3
|
-
export declare function findBlockAtCursor(doc: KulalaDocument, cursorPosition: {
|
|
4
|
-
line: number;
|
|
5
|
-
column: number;
|
|
6
|
-
}): KulalaBlock | null;
|
|
7
|
-
//# sourceMappingURL=block.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../src/lib/runner/block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,cAAc,EACnB,cAAc,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC/C,WAAW,GAAG,IAAI,CAyBpB"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { RequestHeaderType } from "./types";
|
|
2
|
-
export declare function getRequestHeaderType(headers: unknown): RequestHeaderType;
|
|
3
|
-
export declare function getJSONRequestBody(body: unknown): Record<string, unknown> | undefined;
|
|
4
|
-
export declare function getGraphQLRequestBody(body: unknown): {
|
|
5
|
-
query: string;
|
|
6
|
-
variables?: Record<string, unknown>;
|
|
7
|
-
} | undefined;
|
|
8
|
-
/** Parse "key=value&key2=value2" into an object (application/x-www-form-urlencoded). */
|
|
9
|
-
export declare function parseFormUrlEncoded(body: string): Record<string, string>;
|
|
10
|
-
export declare function getFormRequestBody(body: unknown, formType: "form-data" | "form-urlencoded"): Record<string, unknown> | undefined;
|
|
11
|
-
/** True if body is a "read body from file" reference: { __bodyFromFile: string }. */
|
|
12
|
-
export declare function isBodyFromFileRef(body: unknown): body is {
|
|
13
|
-
__bodyFromFile: string;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Resolve body-from-file: read file at path (relative to baseDir) and return its contents as string.
|
|
17
|
-
* @throws if file cannot be read
|
|
18
|
-
*/
|
|
19
|
-
export declare function resolveBodyFromFile(filePath: string, baseDir: string): Promise<string>;
|
|
20
|
-
/** True if value looks like a file reference: { filePath: string, filename?: string }. */
|
|
21
|
-
export declare function isFileRef(value: unknown): value is {
|
|
22
|
-
filePath: string;
|
|
23
|
-
filename?: string;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Build FormData for multipart/form-data. Body entries can be strings or
|
|
27
|
-
* file refs { filePath, filename? }. Paths are resolved relative to baseDir.
|
|
28
|
-
*/
|
|
29
|
-
export declare function buildMultipartBody(body: Record<string, unknown>, baseDir: string): Promise<FormData>;
|
|
30
|
-
//# sourceMappingURL=body.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/lib/runner/body.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,CAuBxE;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,OAAO,GACZ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAKrC;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,OAAO,GACZ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG,SAAS,CAiBpE;AAED,wFAAwF;AACxF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgBxE;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,WAAW,GAAG,iBAAiB,GACxC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAoBrC;AAED,qFAAqF;AACrF,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,OAAO,GACZ,IAAI,IAAI;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,CAOpC;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CAMjB;AAED,0FAA0F;AAC1F,wBAAgB,SAAS,CACvB,KAAK,EAAE,OAAO,GACb,KAAK,IAAI;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAOlD;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,QAAQ,CAAC,CAiBnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"curl-transport.d.ts","sourceRoot":"","sources":["../../../src/lib/runner/curl-transport.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EAEvB,MAAM,eAAe,CAAC;AA6JvB,wBAAsB,eAAe,CACnC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,sBAAsB,CAAC,CAoQjC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { KulalaBlock } from "../parser/types/block";
|
|
2
|
-
import type { KulalaPromptResponse, KulalaRequestErrorResponse, KulalaRequestSuccessResponse, VariableResolver } from "./types";
|
|
3
|
-
export type { RunnerResponseLike } from "./types";
|
|
4
|
-
export declare function doRequestFromBlock(block: KulalaBlock, filePath: string | undefined, vars: Record<string, string> | undefined, stableDocIdForReplay: string | undefined, resolver: VariableResolver | undefined, env?: string, flow?: import("./scripts").ScriptFlowContext): Promise<KulalaRequestSuccessResponse | KulalaRequestErrorResponse | KulalaPromptResponse>;
|
|
5
|
-
//# sourceMappingURL=doRequest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"doRequest.d.ts","sourceRoot":"","sources":["../../../src/lib/runner/doRequest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAiCzD,OAAO,KAAK,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,4BAA4B,EAE5B,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EACxC,oBAAoB,EAAE,MAAM,GAAG,SAAS,EACxC,QAAQ,EAAE,gBAAgB,GAAG,SAAS,EACtC,GAAG,GAAE,MAAkB,EACvB,IAAI,CAAC,EAAE,OAAO,WAAW,EAAE,iBAAiB,GAC3C,OAAO,CACN,4BAA4B,GAC5B,0BAA0B,GAC1B,oBAAoB,CACvB,CA+kBA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"embedded-curl.d.ts","sourceRoot":"","sources":["../../../src/lib/runner/embedded-curl.ts"],"names":[],"mappings":"AAuGA,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CA4BvD"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { KulalaRequest } from "../parser/types/request";
|
|
2
|
-
export declare function buildHeadersFromSection(headerSection: KulalaRequest["headerSection"]): Record<string, string>;
|
|
3
|
-
export declare function setUserAgentHeaderIfNotPresent(headers: Record<string, string>): Record<string, string>;
|
|
4
|
-
/**
|
|
5
|
-
* Kulala-compatible Authorization header helpers.
|
|
6
|
-
*
|
|
7
|
-
* Currently supported:
|
|
8
|
-
* - Basic: if value is "Basic username:password" (or "Basic username password"),
|
|
9
|
-
* encode credentials as base64 and replace value with "Basic <base64>".
|
|
10
|
-
*
|
|
11
|
-
* If the value is already base64 (no ":" and not two tokens), it's left unchanged.
|
|
12
|
-
*/
|
|
13
|
-
export declare function normalizeAuthorizationHeader(headers: Record<string, string>): Record<string, string>;
|
|
14
|
-
//# sourceMappingURL=headers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../../src/lib/runner/headers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,aAAa,CAAC,eAAe,CAAC,GAC5C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAiBxB;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA+BxB"}
|