flowengine-mcp-app 2.0.1 → 3.0.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/build/cli/api.d.ts +19 -0
- package/build/cli/api.d.ts.map +1 -0
- package/build/cli/api.js +62 -0
- package/build/cli/api.js.map +1 -0
- package/build/cli/commands/delete.d.ts +4 -0
- package/build/cli/commands/delete.d.ts.map +1 -0
- package/build/cli/commands/delete.js +16 -0
- package/build/cli/commands/delete.js.map +1 -0
- package/build/cli/commands/deploy.d.ts +24 -0
- package/build/cli/commands/deploy.d.ts.map +1 -0
- package/build/cli/commands/deploy.js +103 -0
- package/build/cli/commands/deploy.js.map +1 -0
- package/build/cli/commands/domain.d.ts +9 -0
- package/build/cli/commands/domain.d.ts.map +1 -0
- package/build/cli/commands/domain.js +27 -0
- package/build/cli/commands/domain.js.map +1 -0
- package/build/cli/commands/env.d.ts +13 -0
- package/build/cli/commands/env.d.ts.map +1 -0
- package/build/cli/commands/env.js +53 -0
- package/build/cli/commands/env.js.map +1 -0
- package/build/cli/commands/list.d.ts +4 -0
- package/build/cli/commands/list.d.ts.map +1 -0
- package/build/cli/commands/list.js +25 -0
- package/build/cli/commands/list.js.map +1 -0
- package/build/cli/commands/login.d.ts +4 -0
- package/build/cli/commands/login.d.ts.map +1 -0
- package/build/cli/commands/login.js +37 -0
- package/build/cli/commands/login.js.map +1 -0
- package/build/cli/commands/logout.d.ts +2 -0
- package/build/cli/commands/logout.d.ts.map +1 -0
- package/build/cli/commands/logout.js +8 -0
- package/build/cli/commands/logout.js.map +1 -0
- package/build/cli/commands/logs.d.ts +4 -0
- package/build/cli/commands/logs.d.ts.map +1 -0
- package/build/cli/commands/logs.js +40 -0
- package/build/cli/commands/logs.js.map +1 -0
- package/build/cli/commands/show.d.ts +4 -0
- package/build/cli/commands/show.d.ts.map +1 -0
- package/build/cli/commands/show.js +13 -0
- package/build/cli/commands/show.js.map +1 -0
- package/build/cli/commands/usage.d.ts +7 -0
- package/build/cli/commands/usage.d.ts.map +1 -0
- package/build/cli/commands/usage.js +16 -0
- package/build/cli/commands/usage.js.map +1 -0
- package/build/cli/config.d.ts +17 -0
- package/build/cli/config.d.ts.map +1 -0
- package/build/cli/config.js +42 -0
- package/build/cli/config.js.map +1 -0
- package/build/cli/pack.d.ts +25 -0
- package/build/cli/pack.d.ts.map +1 -0
- package/build/cli/pack.js +111 -0
- package/build/cli/pack.js.map +1 -0
- package/build/cli/ui.d.ts +23 -0
- package/build/cli/ui.d.ts.map +1 -0
- package/build/cli/ui.js +105 -0
- package/build/cli/ui.js.map +1 -0
- package/build/cli.d.ts +10 -0
- package/build/cli.d.ts.map +1 -0
- package/build/cli.js +251 -0
- package/build/cli.js.map +1 -0
- package/build/client.d.ts +38 -0
- package/build/client.d.ts.map +1 -1
- package/build/client.js +124 -1
- package/build/client.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.js +918 -287
- package/build/index.js.map +1 -1
- package/build/tools/functions.d.ts +14 -0
- package/build/tools/functions.d.ts.map +1 -0
- package/build/tools/functions.js +241 -0
- package/build/tools/functions.js.map +1 -0
- package/build/types.d.ts +155 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +5 -0
- package/build/types.js.map +1 -0
- package/build/ui/component-viewer.d.ts +2 -2
- package/build/ui/component-viewer.js +4 -4
- package/build/ui/component-viewer.js.map +1 -1
- package/build/ui/dashboard.js +1 -1
- package/build/ui/ui/components.html +312 -0
- package/build/ui/ui/n8n.html +124 -0
- package/build/ui/ui/portals.html +211 -0
- package/build/ui/widgets.js +1 -1
- package/build/ui/widgets.js.map +1 -1
- package/package.json +23 -11
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI config: ~/.flowengine/config.json
|
|
3
|
+
*
|
|
4
|
+
* Stores the API key + base URL. FLOWENGINE_API_KEY env var overrides the
|
|
5
|
+
* stored key; FLOWENGINE_BASE_URL overrides the stored base URL.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEFAULT_BASE_URL = "https://flowengine.cloud";
|
|
8
|
+
export interface CliConfig {
|
|
9
|
+
apiKey?: string;
|
|
10
|
+
baseUrl?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function loadConfig(): Promise<CliConfig>;
|
|
13
|
+
export declare function saveConfig(cfg: CliConfig): Promise<void>;
|
|
14
|
+
export declare function clearConfig(): Promise<void>;
|
|
15
|
+
export declare function resolveApiKey(stored: CliConfig): string | undefined;
|
|
16
|
+
export declare function resolveBaseUrl(stored: CliConfig): string;
|
|
17
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/cli/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,eAAO,MAAM,gBAAgB,6BAA6B,CAAC;AAE3D,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAMD,wBAAsB,UAAU,IAAI,OAAO,CAAC,SAAS,CAAC,CAOrD;AAED,wBAAsB,UAAU,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAI9D;AAED,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAMjD;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAEnE;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAExD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI config: ~/.flowengine/config.json
|
|
3
|
+
*
|
|
4
|
+
* Stores the API key + base URL. FLOWENGINE_API_KEY env var overrides the
|
|
5
|
+
* stored key; FLOWENGINE_BASE_URL overrides the stored base URL.
|
|
6
|
+
*/
|
|
7
|
+
import { promises as fs } from 'node:fs';
|
|
8
|
+
import { homedir } from 'node:os';
|
|
9
|
+
import { dirname, join } from 'node:path';
|
|
10
|
+
export const DEFAULT_BASE_URL = 'https://flowengine.cloud';
|
|
11
|
+
function configPath() {
|
|
12
|
+
return join(homedir(), '.flowengine', 'config.json');
|
|
13
|
+
}
|
|
14
|
+
export async function loadConfig() {
|
|
15
|
+
try {
|
|
16
|
+
const raw = await fs.readFile(configPath(), 'utf-8');
|
|
17
|
+
return JSON.parse(raw);
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return {};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export async function saveConfig(cfg) {
|
|
24
|
+
const path = configPath();
|
|
25
|
+
await fs.mkdir(dirname(path), { recursive: true, mode: 0o700 });
|
|
26
|
+
await fs.writeFile(path, JSON.stringify(cfg, null, 2), { mode: 0o600 });
|
|
27
|
+
}
|
|
28
|
+
export async function clearConfig() {
|
|
29
|
+
try {
|
|
30
|
+
await fs.unlink(configPath());
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
// already gone
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export function resolveApiKey(stored) {
|
|
37
|
+
return process.env.FLOWENGINE_API_KEY || stored.apiKey;
|
|
38
|
+
}
|
|
39
|
+
export function resolveBaseUrl(stored) {
|
|
40
|
+
return process.env.FLOWENGINE_BASE_URL || stored.baseUrl || DEFAULT_BASE_URL;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/cli/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,CAAC,MAAM,gBAAgB,GAA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
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Walk a directory and produce a FormData payload that the
|
|
3
|
+
* /api/v1/functions/upload endpoint understands (field name = relative
|
|
4
|
+
* path, value = file Blob).
|
|
5
|
+
*
|
|
6
|
+
* Skips dev cruft by default so the upload doesn't blow past the 100MB
|
|
7
|
+
* total / 25MB per-file caps. Respects a .feignore file if present
|
|
8
|
+
* (extra patterns, one per line).
|
|
9
|
+
*/
|
|
10
|
+
export interface PackedFile {
|
|
11
|
+
path: string;
|
|
12
|
+
blob: Blob;
|
|
13
|
+
size: number;
|
|
14
|
+
}
|
|
15
|
+
export interface PackResult {
|
|
16
|
+
files: PackedFile[];
|
|
17
|
+
totalBytes: number;
|
|
18
|
+
}
|
|
19
|
+
export declare function packFolder(root: string): Promise<PackResult>;
|
|
20
|
+
export declare function buildUploadForm(packed: PackResult, meta: {
|
|
21
|
+
name?: string;
|
|
22
|
+
runtime?: string;
|
|
23
|
+
compute?: Record<string, string | number | boolean>;
|
|
24
|
+
}): FormData;
|
|
25
|
+
//# sourceMappingURL=pack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack.d.ts","sourceRoot":"","sources":["../../src/cli/pack.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2BH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAmDD,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAUlE;AAED,wBAAgB,eAAe,CAC7B,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAA;CAAE,GAC7F,QAAQ,CAcV"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Walk a directory and produce a FormData payload that the
|
|
3
|
+
* /api/v1/functions/upload endpoint understands (field name = relative
|
|
4
|
+
* path, value = file Blob).
|
|
5
|
+
*
|
|
6
|
+
* Skips dev cruft by default so the upload doesn't blow past the 100MB
|
|
7
|
+
* total / 25MB per-file caps. Respects a .feignore file if present
|
|
8
|
+
* (extra patterns, one per line).
|
|
9
|
+
*/
|
|
10
|
+
import { promises as fs } from 'node:fs';
|
|
11
|
+
import { join, relative, sep } from 'node:path';
|
|
12
|
+
const ALWAYS_SKIP = new Set([
|
|
13
|
+
'node_modules',
|
|
14
|
+
'.git',
|
|
15
|
+
'.next',
|
|
16
|
+
'.nuxt',
|
|
17
|
+
'.cache',
|
|
18
|
+
'.turbo',
|
|
19
|
+
'dist',
|
|
20
|
+
'build',
|
|
21
|
+
'.venv',
|
|
22
|
+
'venv',
|
|
23
|
+
'__pycache__',
|
|
24
|
+
'.pytest_cache',
|
|
25
|
+
'.DS_Store',
|
|
26
|
+
]);
|
|
27
|
+
const SKIP_FILE_PATTERNS = [
|
|
28
|
+
/^\.env(\..+)?$/, // .env, .env.local, .env.production, ...
|
|
29
|
+
/^\.envrc$/,
|
|
30
|
+
/\.log$/,
|
|
31
|
+
];
|
|
32
|
+
async function readIgnore(root) {
|
|
33
|
+
try {
|
|
34
|
+
const text = await fs.readFile(join(root, '.feignore'), 'utf-8');
|
|
35
|
+
return text
|
|
36
|
+
.split('\n')
|
|
37
|
+
.map((l) => l.trim())
|
|
38
|
+
.filter((l) => l && !l.startsWith('#'));
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function shouldSkipName(name, extraIgnore) {
|
|
45
|
+
if (ALWAYS_SKIP.has(name))
|
|
46
|
+
return true;
|
|
47
|
+
for (const re of SKIP_FILE_PATTERNS)
|
|
48
|
+
if (re.test(name))
|
|
49
|
+
return true;
|
|
50
|
+
for (const pat of extraIgnore) {
|
|
51
|
+
if (pat === name)
|
|
52
|
+
return true;
|
|
53
|
+
// very simple glob: trailing /* or leading * (full glob support is overkill)
|
|
54
|
+
if (pat.endsWith('/*') && name === pat.slice(0, -2))
|
|
55
|
+
return true;
|
|
56
|
+
if (pat.startsWith('*') && name.endsWith(pat.slice(1)))
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
async function walk(root, current, extraIgnore, out) {
|
|
62
|
+
const entries = await fs.readdir(current, { withFileTypes: true });
|
|
63
|
+
for (const e of entries) {
|
|
64
|
+
if (shouldSkipName(e.name, extraIgnore))
|
|
65
|
+
continue;
|
|
66
|
+
const full = join(current, e.name);
|
|
67
|
+
if (e.isDirectory()) {
|
|
68
|
+
await walk(root, full, extraIgnore, out);
|
|
69
|
+
}
|
|
70
|
+
else if (e.isFile()) {
|
|
71
|
+
const buf = await fs.readFile(full);
|
|
72
|
+
const rel = relative(root, full).split(sep).join('/');
|
|
73
|
+
out.push({
|
|
74
|
+
path: rel,
|
|
75
|
+
blob: new Blob([new Uint8Array(buf)]),
|
|
76
|
+
size: buf.length,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
// symlinks intentionally ignored - they don't tar safely
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export async function packFolder(root) {
|
|
83
|
+
const stat = await fs.stat(root);
|
|
84
|
+
if (!stat.isDirectory()) {
|
|
85
|
+
throw new Error(`Not a directory: ${root}`);
|
|
86
|
+
}
|
|
87
|
+
const extraIgnore = await readIgnore(root);
|
|
88
|
+
const files = [];
|
|
89
|
+
await walk(root, root, extraIgnore, files);
|
|
90
|
+
const totalBytes = files.reduce((n, f) => n + f.size, 0);
|
|
91
|
+
return { files, totalBytes };
|
|
92
|
+
}
|
|
93
|
+
export function buildUploadForm(packed, meta) {
|
|
94
|
+
const form = new FormData();
|
|
95
|
+
if (meta.name)
|
|
96
|
+
form.set('name', meta.name);
|
|
97
|
+
if (meta.runtime)
|
|
98
|
+
form.set('runtime', meta.runtime);
|
|
99
|
+
if (meta.compute) {
|
|
100
|
+
for (const [k, v] of Object.entries(meta.compute)) {
|
|
101
|
+
if (v === undefined || v === null)
|
|
102
|
+
continue;
|
|
103
|
+
form.set(k, String(v));
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
for (const f of packed.files) {
|
|
107
|
+
form.append(f.path, f.blob, f.path);
|
|
108
|
+
}
|
|
109
|
+
return form;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=pack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack.js","sourceRoot":"","sources":["../../src/cli/pack.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IAC1B,cAAc;IACd,MAAM;IACN,OAAO;IACP,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,OAAO;IACP,OAAO;IACP,MAAM;IACN,aAAa;IACb,eAAe;IACf,WAAW;CACZ,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG;IACzB,gBAAgB,EAAY,yCAAyC;IACrE,WAAW;IACX,QAAQ;CACT,CAAC;AAaF,KAAK,UAAU,UAAU,CAAC,IAAY;IACpC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC;Q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,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACzD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,MAAkB,EAClB,IAA8F;IAE9F,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;IAC5B,IAAI,IAAI,CAAC,IAAI;QAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3C,IAAI,IAAI,CAAC,OAAO;QAAE,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACpD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QACjB,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YAClD,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI;gBAAE,SAAS;YAC5C,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QAC7B,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tiny terminal helpers - no chalk/ora dep so the install stays light.
|
|
3
|
+
* Honors NO_COLOR per https://no-color.org.
|
|
4
|
+
*/
|
|
5
|
+
export declare const c: {
|
|
6
|
+
dim: (s: string) => string;
|
|
7
|
+
bold: (s: string) => string;
|
|
8
|
+
green: (s: string) => string;
|
|
9
|
+
red: (s: string) => string;
|
|
10
|
+
yellow: (s: string) => string;
|
|
11
|
+
cyan: (s: string) => string;
|
|
12
|
+
white: (s: string) => string;
|
|
13
|
+
};
|
|
14
|
+
export declare function ok(msg: string): void;
|
|
15
|
+
export declare function info(msg: string): void;
|
|
16
|
+
export declare function warn(msg: string): void;
|
|
17
|
+
export declare function err(msg: string): void;
|
|
18
|
+
export declare function bytes(n: number): string;
|
|
19
|
+
export declare function fmtTable(rows: Array<Record<string, string>>): string;
|
|
20
|
+
export declare function prompt(question: string, opts?: {
|
|
21
|
+
secret?: boolean;
|
|
22
|
+
}): Promise<string>;
|
|
23
|
+
//# sourceMappingURL=ui.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/cli/ui.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,eAAO,MAAM,CAAC;aACH,MAAM;cACL,MAAM;eACL,MAAM;aACR,MAAM;gBACH,MAAM;cACR,MAAM;eACL,MAAM;CAClB,CAAC;AAEF,wBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEpC;AAED,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEtC;AAED,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEtC;AAED,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAErC;AAED,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAIvC;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,MAAM,CAWpE;AAED,wBAAsB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAsD/F"}
|
package/build/cli/ui.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tiny terminal helpers - no chalk/ora dep so the install stays light.
|
|
3
|
+
* Honors NO_COLOR per https://no-color.org.
|
|
4
|
+
*/
|
|
5
|
+
const isTTY = process.stdout.isTTY === true;
|
|
6
|
+
const useColor = isTTY && !process.env.NO_COLOR;
|
|
7
|
+
function wrap(code, s) {
|
|
8
|
+
return useColor ? `\x1b[${code}m${s}\x1b[0m` : s;
|
|
9
|
+
}
|
|
10
|
+
export const c = {
|
|
11
|
+
dim: (s) => wrap('2', s),
|
|
12
|
+
bold: (s) => wrap('1', s),
|
|
13
|
+
green: (s) => wrap('32', s),
|
|
14
|
+
red: (s) => wrap('31', s),
|
|
15
|
+
yellow: (s) => wrap('33', s),
|
|
16
|
+
cyan: (s) => wrap('36', s),
|
|
17
|
+
white: (s) => wrap('37', s),
|
|
18
|
+
};
|
|
19
|
+
export function ok(msg) {
|
|
20
|
+
console.log(`${c.green('✓')} ${msg}`);
|
|
21
|
+
}
|
|
22
|
+
export function info(msg) {
|
|
23
|
+
console.log(`${c.cyan('·')} ${msg}`);
|
|
24
|
+
}
|
|
25
|
+
export function warn(msg) {
|
|
26
|
+
console.warn(`${c.yellow('!')} ${msg}`);
|
|
27
|
+
}
|
|
28
|
+
export function err(msg) {
|
|
29
|
+
console.error(`${c.red('✗')} ${msg}`);
|
|
30
|
+
}
|
|
31
|
+
export function bytes(n) {
|
|
32
|
+
if (n < 1024)
|
|
33
|
+
return `${n} B`;
|
|
34
|
+
if (n < 1024 * 1024)
|
|
35
|
+
return `${(n / 1024).toFixed(1)} KB`;
|
|
36
|
+
return `${(n / 1024 / 1024).toFixed(2)} MB`;
|
|
37
|
+
}
|
|
38
|
+
export function fmtTable(rows) {
|
|
39
|
+
if (rows.length === 0)
|
|
40
|
+
return '';
|
|
41
|
+
const keys = Object.keys(rows[0]);
|
|
42
|
+
const widths = keys.map((k) => Math.max(k.length, ...rows.map((r) => (r[k] || '').length)));
|
|
43
|
+
const head = keys.map((k, i) => c.dim(k.padEnd(widths[i]))).join(' ');
|
|
44
|
+
const body = rows
|
|
45
|
+
.map((r) => keys.map((k, i) => (r[k] || '').padEnd(widths[i])).join(' '))
|
|
46
|
+
.join('\n');
|
|
47
|
+
return `${head}\n${body}`;
|
|
48
|
+
}
|
|
49
|
+
export async function prompt(question, opts = {}) {
|
|
50
|
+
process.stdout.write(question);
|
|
51
|
+
return new Promise((resolve, reject) => {
|
|
52
|
+
const stdin = process.stdin;
|
|
53
|
+
if (opts.secret && stdin.isTTY && typeof stdin.setRawMode === 'function') {
|
|
54
|
+
stdin.setRawMode(true);
|
|
55
|
+
stdin.resume();
|
|
56
|
+
stdin.setEncoding('utf-8');
|
|
57
|
+
let input = '';
|
|
58
|
+
const onData = (key) => {
|
|
59
|
+
for (const ch of key) {
|
|
60
|
+
if (ch === '\r' || ch === '\n') {
|
|
61
|
+
stdin.setRawMode(false);
|
|
62
|
+
stdin.pause();
|
|
63
|
+
stdin.off('data', onData);
|
|
64
|
+
process.stdout.write('\n');
|
|
65
|
+
resolve(input);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (ch === '\x03') {
|
|
69
|
+
// Ctrl-C
|
|
70
|
+
stdin.setRawMode(false);
|
|
71
|
+
stdin.pause();
|
|
72
|
+
process.stdout.write('\n');
|
|
73
|
+
reject(new Error('Aborted'));
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (ch === '\x7f' || ch === '\b') {
|
|
77
|
+
if (input.length > 0) {
|
|
78
|
+
input = input.slice(0, -1);
|
|
79
|
+
process.stdout.write('\b \b');
|
|
80
|
+
}
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
input += ch;
|
|
84
|
+
process.stdout.write('*');
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
stdin.on('data', onData);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
let chunks = '';
|
|
91
|
+
const onData = (d) => {
|
|
92
|
+
chunks += d.toString('utf-8');
|
|
93
|
+
const nl = chunks.indexOf('\n');
|
|
94
|
+
if (nl !== -1) {
|
|
95
|
+
stdin.off('data', onData);
|
|
96
|
+
stdin.pause();
|
|
97
|
+
resolve(chunks.slice(0, nl).replace(/\r$/, ''));
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
stdin.resume();
|
|
101
|
+
stdin.on('data', onData);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=ui.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../src/cli/ui.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC;AAC5C,MAAM,QAAQ,GAAG,KAAK,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;AAEhD,SAAS,IAAI,CAAC,IAAY,EAAE,CAAS;IACnC,OAAO,QAAQ,CAAC,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,CAAC,MAAM,CAAC,GAAG;IACf,GAAG,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAChC,IAAI,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACjC,KAAK,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACnC,GAAG,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACjC,MAAM,EAAE,CAAC,CAAS,EAAE,EAAE,C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AAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;wBAChC,CAAC;wBACD,SAAS;oBACX,CAAC;oBACD,KAAK,IAAI,EAAE,CAAC;oBACZ,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBAC5B,CAAC;YACH,CAAC,CAAC;YACF,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,IAAI,MAAM,GAAG,EAAE,CAAC;YAChB,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE;gBAC3B,MAAM,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;gBAC9B,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBAChC,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC;oBACd,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;oBAC1B,KAAK,CAAC,KAAK,EAAE,CAAC;oBACd,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;gBAClD,CAAC;YACH,CAAC,CAAC;YACF,KAAK,CAAC,MAAM,EAAE,CAAC;YACf,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/build/cli.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* FlowEngine CLI - `fe` / `flowengine`
|
|
4
|
+
*
|
|
5
|
+
* Thin client over the public /api/v1/functions/* surface. Same auth
|
|
6
|
+
* (`fe_*` API key, Authorization: Bearer) as the MCP. Same package as
|
|
7
|
+
* the MCP server (`flowengine-mcp` bin); shared API surface.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;GAMG"}
|
package/build/cli.js
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* FlowEngine CLI - `fe` / `flowengine`
|
|
4
|
+
*
|
|
5
|
+
* Thin client over the public /api/v1/functions/* surface. Same auth
|
|
6
|
+
* (`fe_*` API key, Authorization: Bearer) as the MCP. Same package as
|
|
7
|
+
* the MCP server (`flowengine-mcp` bin); shared API surface.
|
|
8
|
+
*/
|
|
9
|
+
import { readFile } from 'node:fs/promises';
|
|
10
|
+
import { fileURLToPath } from 'node:url';
|
|
11
|
+
import { dirname, join } from 'node:path';
|
|
12
|
+
import { ApiError } from './cli/api.js';
|
|
13
|
+
import { err, c } from './cli/ui.js';
|
|
14
|
+
import { cmdLogin } from './cli/commands/login.js';
|
|
15
|
+
import { cmdLogout } from './cli/commands/logout.js';
|
|
16
|
+
import { cmdList } from './cli/commands/list.js';
|
|
17
|
+
import { cmdShow } from './cli/commands/show.js';
|
|
18
|
+
import { cmdDelete } from './cli/commands/delete.js';
|
|
19
|
+
import { cmdLogs } from './cli/commands/logs.js';
|
|
20
|
+
import { cmdEnvList, cmdEnvSet, cmdEnvUnset } from './cli/commands/env.js';
|
|
21
|
+
import { cmdDomainAdd, cmdDomainRm, cmdDomainStatus } from './cli/commands/domain.js';
|
|
22
|
+
import { cmdUsage } from './cli/commands/usage.js';
|
|
23
|
+
import { cmdDeploy } from './cli/commands/deploy.js';
|
|
24
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
25
|
+
const __dirname = dirname(__filename);
|
|
26
|
+
async function getVersion() {
|
|
27
|
+
try {
|
|
28
|
+
const raw = await readFile(join(__dirname, '..', 'package.json'), 'utf-8');
|
|
29
|
+
return JSON.parse(raw).version || 'unknown';
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return 'unknown';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function parseArgs(argv) {
|
|
36
|
+
const positionals = [];
|
|
37
|
+
const flags = {};
|
|
38
|
+
for (let i = 0; i < argv.length; i++) {
|
|
39
|
+
const a = argv[i];
|
|
40
|
+
if (a.startsWith('--')) {
|
|
41
|
+
const eq = a.indexOf('=');
|
|
42
|
+
if (eq !== -1) {
|
|
43
|
+
flags[a.slice(2, eq)] = a.slice(eq + 1);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
const next = argv[i + 1];
|
|
47
|
+
if (next !== undefined && !next.startsWith('-')) {
|
|
48
|
+
flags[a.slice(2)] = next;
|
|
49
|
+
i++;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
flags[a.slice(2)] = true;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
else if (a.startsWith('-') && a.length === 2) {
|
|
57
|
+
flags[a.slice(1)] = true;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
positionals.push(a);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return { positionals, flags };
|
|
64
|
+
}
|
|
65
|
+
const HELP = `${c.bold('FlowEngine CLI')}
|
|
66
|
+
|
|
67
|
+
Usage: fe <command> [...]
|
|
68
|
+
|
|
69
|
+
Auth
|
|
70
|
+
${c.bold('login')} Save your API key locally
|
|
71
|
+
${c.bold('logout')} Forget the saved API key
|
|
72
|
+
|
|
73
|
+
Functions
|
|
74
|
+
${c.bold('deploy')} [path] [opts] Deploy a folder (default: cwd)
|
|
75
|
+
${c.bold('list')} List your functions
|
|
76
|
+
${c.bold('show')} <id> Show details of one function
|
|
77
|
+
${c.bold('logs')} <id> Fetch recent log entries
|
|
78
|
+
${c.bold('delete')} <id> [--yes] Soft-delete a function
|
|
79
|
+
${c.bold('usage')} [--function-id <id>] vCPU-sec / GiB-sec / requests
|
|
80
|
+
|
|
81
|
+
Env vars
|
|
82
|
+
${c.bold('env list')} <id>
|
|
83
|
+
${c.bold('env set')} <id> KEY=VALUE
|
|
84
|
+
${c.bold('env unset')} <id> KEY
|
|
85
|
+
|
|
86
|
+
Custom domains
|
|
87
|
+
${c.bold('domain add')} <id> <domain>
|
|
88
|
+
${c.bold('domain status')} <id>
|
|
89
|
+
${c.bold('domain rm')} <id>
|
|
90
|
+
|
|
91
|
+
Deploy options
|
|
92
|
+
--name <name> Function name
|
|
93
|
+
--runtime <id> nodejs20 | nodejs22 | python311 | python312 | go122 | java17 | ruby32 | php82
|
|
94
|
+
--memory <size> 256Mi | 512Mi | 1Gi | 2Gi | 4Gi | 8Gi
|
|
95
|
+
--cpu <n> 1 | 2 | 4 | 8
|
|
96
|
+
--max-instances <n> 1-1000 (free=10, paid=100)
|
|
97
|
+
--min-instances <n> 0 to max-instances
|
|
98
|
+
--timeout <seconds> 1-3600
|
|
99
|
+
--region <id> GCP region (default us-central1)
|
|
100
|
+
--concurrency <n> 1-1000
|
|
101
|
+
--cpu-throttling Throttle CPU between requests
|
|
102
|
+
|
|
103
|
+
Global
|
|
104
|
+
--json Machine-readable JSON output
|
|
105
|
+
--base-url <url> Override server (default https://flowengine.cloud)
|
|
106
|
+
--version, -v
|
|
107
|
+
--help, -h
|
|
108
|
+
|
|
109
|
+
Examples
|
|
110
|
+
$ fe login
|
|
111
|
+
$ fe deploy ./my-fn --name scraper --runtime nodejs22 --memory 1Gi
|
|
112
|
+
$ fe list
|
|
113
|
+
$ fe logs <id>
|
|
114
|
+
$ fe env set <id> OPENAI_API_KEY=sk-...
|
|
115
|
+
`;
|
|
116
|
+
async function dispatch(argv) {
|
|
117
|
+
if (argv.length === 0 || argv[0] === 'help' || argv.includes('-h') || argv.includes('--help')) {
|
|
118
|
+
console.log(HELP);
|
|
119
|
+
return 0;
|
|
120
|
+
}
|
|
121
|
+
if (argv[0] === '--version' || argv[0] === '-v') {
|
|
122
|
+
console.log(await getVersion());
|
|
123
|
+
return 0;
|
|
124
|
+
}
|
|
125
|
+
const [cmd, ...rest] = argv;
|
|
126
|
+
const { positionals, flags } = parseArgs(rest);
|
|
127
|
+
if (typeof flags['base-url'] === 'string') {
|
|
128
|
+
process.env.FLOWENGINE_BASE_URL = flags['base-url'];
|
|
129
|
+
}
|
|
130
|
+
const json = flags.json === true;
|
|
131
|
+
switch (cmd) {
|
|
132
|
+
case 'login':
|
|
133
|
+
return cmdLogin({});
|
|
134
|
+
case 'logout':
|
|
135
|
+
return cmdLogout();
|
|
136
|
+
case 'deploy':
|
|
137
|
+
return cmdDeploy(positionals[0], {
|
|
138
|
+
name: flags.name,
|
|
139
|
+
runtime: flags.runtime,
|
|
140
|
+
memory: flags.memory,
|
|
141
|
+
cpu: flags.cpu,
|
|
142
|
+
maxInstances: flags['max-instances'],
|
|
143
|
+
minInstances: flags['min-instances'],
|
|
144
|
+
timeout: flags.timeout,
|
|
145
|
+
region: flags.region,
|
|
146
|
+
concurrency: flags.concurrency,
|
|
147
|
+
cpuThrottling: flags['cpu-throttling'] === true ? true : undefined,
|
|
148
|
+
});
|
|
149
|
+
case 'list':
|
|
150
|
+
case 'ls':
|
|
151
|
+
return cmdList({ json });
|
|
152
|
+
case 'show':
|
|
153
|
+
case 'get': {
|
|
154
|
+
const id = positionals[0];
|
|
155
|
+
if (!id) {
|
|
156
|
+
err(`Usage: fe ${cmd} <id>`);
|
|
157
|
+
return 1;
|
|
158
|
+
}
|
|
159
|
+
return cmdShow(id, { json });
|
|
160
|
+
}
|
|
161
|
+
case 'delete':
|
|
162
|
+
case 'rm': {
|
|
163
|
+
const id = positionals[0];
|
|
164
|
+
if (!id) {
|
|
165
|
+
err(`Usage: fe ${cmd} <id>`);
|
|
166
|
+
return 1;
|
|
167
|
+
}
|
|
168
|
+
return cmdDelete(id, { yes: flags.yes === true || flags.y === true });
|
|
169
|
+
}
|
|
170
|
+
case 'logs': {
|
|
171
|
+
const id = positionals[0];
|
|
172
|
+
if (!id) {
|
|
173
|
+
err('Usage: fe logs <id>');
|
|
174
|
+
return 1;
|
|
175
|
+
}
|
|
176
|
+
return cmdLogs(id, { json });
|
|
177
|
+
}
|
|
178
|
+
case 'usage':
|
|
179
|
+
return cmdUsage({
|
|
180
|
+
functionId: flags['function-id'],
|
|
181
|
+
from: flags.from,
|
|
182
|
+
to: flags.to,
|
|
183
|
+
json,
|
|
184
|
+
});
|
|
185
|
+
case 'env': {
|
|
186
|
+
const sub = positionals[0];
|
|
187
|
+
const id = positionals[1];
|
|
188
|
+
if (!sub || !id) {
|
|
189
|
+
err('Usage: fe env <list|set|unset> <id> [args]');
|
|
190
|
+
return 1;
|
|
191
|
+
}
|
|
192
|
+
if (sub === 'list')
|
|
193
|
+
return cmdEnvList(id, { json });
|
|
194
|
+
if (sub === 'set') {
|
|
195
|
+
if (!positionals[2]) {
|
|
196
|
+
err('Usage: fe env set <id> KEY=VALUE');
|
|
197
|
+
return 1;
|
|
198
|
+
}
|
|
199
|
+
return cmdEnvSet(id, positionals[2]);
|
|
200
|
+
}
|
|
201
|
+
if (sub === 'unset' || sub === 'rm') {
|
|
202
|
+
if (!positionals[2]) {
|
|
203
|
+
err('Usage: fe env unset <id> KEY');
|
|
204
|
+
return 1;
|
|
205
|
+
}
|
|
206
|
+
return cmdEnvUnset(id, positionals[2]);
|
|
207
|
+
}
|
|
208
|
+
err(`Unknown env subcommand: ${sub}`);
|
|
209
|
+
return 1;
|
|
210
|
+
}
|
|
211
|
+
case 'domain': {
|
|
212
|
+
const sub = positionals[0];
|
|
213
|
+
const id = positionals[1];
|
|
214
|
+
if (!sub || !id) {
|
|
215
|
+
err('Usage: fe domain <add|status|rm> <id> [domain]');
|
|
216
|
+
return 1;
|
|
217
|
+
}
|
|
218
|
+
if (sub === 'add') {
|
|
219
|
+
if (!positionals[2]) {
|
|
220
|
+
err('Usage: fe domain add <id> <domain>');
|
|
221
|
+
return 1;
|
|
222
|
+
}
|
|
223
|
+
return cmdDomainAdd(id, positionals[2]);
|
|
224
|
+
}
|
|
225
|
+
if (sub === 'status')
|
|
226
|
+
return cmdDomainStatus(id);
|
|
227
|
+
if (sub === 'rm' || sub === 'remove')
|
|
228
|
+
return cmdDomainRm(id);
|
|
229
|
+
err(`Unknown domain subcommand: ${sub}`);
|
|
230
|
+
return 1;
|
|
231
|
+
}
|
|
232
|
+
default:
|
|
233
|
+
err(`Unknown command: ${cmd}`);
|
|
234
|
+
console.log(`Run ${c.bold('fe help')} for usage.`);
|
|
235
|
+
return 1;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
dispatch(process.argv.slice(2))
|
|
239
|
+
.then((code) => {
|
|
240
|
+
process.exit(code);
|
|
241
|
+
})
|
|
242
|
+
.catch((e) => {
|
|
243
|
+
if (e instanceof ApiError) {
|
|
244
|
+
err(`API error (${e.status}): ${e.message}`);
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
err(e instanceof Error ? e.message : String(e));
|
|
248
|
+
}
|
|
249
|
+
process.exit(1);
|
|
250
|
+
});
|
|
251
|
+
//# sourceMappingURL=cli.js.map
|
package/build/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CA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