UNPKG

922 BTypeScriptView Raw
1export interface Json2EnvOptions {
2 jsonPath: string;
3 prefix?: string;
4 /**
5 * @default true
6 */
7 saveEnvFile?: boolean;
8 /**
9 * @default true
10 */
11 bashEnv?: boolean;
12 /**
13 * @default true
14 */
15 githubEnv?: boolean;
16 /**
17 * @default true
18 */
19 fail?: boolean;
20 debug?: boolean;
21 silent?: boolean;
22}
23export declare function json2env(opt: Json2EnvOptions): void;
24/**
25 * Turns Object with keys/values into a *.sh script that exports all keys as values.
26 *
27 * @example
28 * { a: 'b', b: 'c'}
29 *
30 * will turn into:
31 *
32 * export a="b"
33 * export b="c"
34 */
35export declare function objectToShellExport(o: any, prefix?: string): string;
36/**
37 * Turns Object with keys/values into a file of key-value pairs
38 *
39 * @example
40 * { a: 'b', b: 'c'}
41 *
42 * will turn into:
43 *
44 * a=b
45 * b=c
46 */
47export declare function objectToGithubActionsEnv(o: any, prefix?: string): string;