@basictech/cli 0.0.22 → 0.0.24
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/commands/account.d.ts +2 -0
- package/dist/commands/account.d.ts.map +1 -0
- package/dist/commands/account.js +18 -0
- package/dist/commands/account.js.map +1 -0
- package/dist/commands/debug.d.ts +2 -0
- package/dist/commands/debug.d.ts.map +1 -0
- package/dist/commands/debug.js +6 -0
- package/dist/commands/debug.js.map +1 -0
- package/dist/commands/init.d.ts +10 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +111 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/login.d.ts +2 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +20 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +2 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +7 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/projects.d.ts +2 -0
- package/dist/commands/projects.d.ts.map +1 -0
- package/dist/commands/projects.js +90 -0
- package/dist/commands/projects.js.map +1 -0
- package/dist/commands/pull.d.ts +2 -0
- package/dist/commands/pull.d.ts.map +1 -0
- package/dist/commands/pull.js +366 -0
- package/dist/commands/pull.js.map +1 -0
- package/dist/commands/push.d.ts +2 -0
- package/dist/commands/push.d.ts.map +1 -0
- package/dist/commands/push.js +403 -0
- package/dist/commands/push.js.map +1 -0
- package/dist/commands/status.d.ts +2 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +385 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/teams.d.ts +2 -0
- package/dist/commands/teams.d.ts.map +1 -0
- package/dist/commands/teams.js +164 -0
- package/dist/commands/teams.js.map +1 -0
- package/dist/commands/update.d.ts +2 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +76 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/version.d.ts +2 -0
- package/dist/commands/version.d.ts.map +1 -0
- package/dist/commands/version.js +21 -0
- package/dist/commands/version.js.map +1 -0
- package/dist/components/Form.d.ts +15 -0
- package/dist/components/Form.d.ts.map +1 -0
- package/dist/components/Form.js +69 -0
- package/dist/components/Form.js.map +1 -0
- package/dist/components/InitForm.d.ts +17 -0
- package/dist/components/InitForm.d.ts.map +1 -0
- package/dist/components/InitForm.js +358 -0
- package/dist/components/InitForm.js.map +1 -0
- package/dist/components/Spinner.d.ts +7 -0
- package/dist/components/Spinner.d.ts.map +1 -0
- package/dist/components/Spinner.js +15 -0
- package/dist/components/Spinner.js.map +1 -0
- package/dist/components/Table.d.ts +24 -0
- package/dist/components/Table.d.ts.map +1 -0
- package/dist/components/Table.js +69 -0
- package/dist/components/Table.js.map +1 -0
- package/dist/components/TeamForm.d.ts +10 -0
- package/dist/components/TeamForm.d.ts.map +1 -0
- package/dist/components/TeamForm.js +193 -0
- package/dist/components/TeamForm.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +243 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/api.d.ts +23 -0
- package/dist/lib/api.d.ts.map +1 -0
- package/dist/lib/api.js +133 -0
- package/dist/lib/api.js.map +1 -0
- package/dist/lib/auth.d.ts +17 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +288 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/config-templates.d.ts +9 -0
- package/dist/lib/config-templates.d.ts.map +1 -0
- package/dist/lib/config-templates.js +117 -0
- package/dist/lib/config-templates.js.map +1 -0
- package/dist/lib/constants.d.ts +18 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +32 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/errors.d.ts +21 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +75 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/platform.d.ts +11 -0
- package/dist/lib/platform.d.ts.map +1 -0
- package/dist/lib/platform.js +133 -0
- package/dist/lib/platform.js.map +1 -0
- package/dist/lib/schema.d.ts +24 -0
- package/dist/lib/schema.d.ts.map +1 -0
- package/dist/lib/schema.js +162 -0
- package/dist/lib/schema.js.map +1 -0
- package/dist/lib/types.d.ts +111 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/version.d.ts +2 -0
- package/dist/lib/version.d.ts.map +1 -0
- package/dist/lib/version.js +22 -0
- package/dist/lib/version.js.map +1 -0
- package/package.json +63 -12
- package/readme.md +92 -35
- package/bin/readme.md +0 -61
- package/index.js +0 -108
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare class BasicCliError extends Error {
|
|
2
|
+
code: string;
|
|
3
|
+
suggestions?: string[] | undefined;
|
|
4
|
+
constructor(message: string, code: string, suggestions?: string[] | undefined);
|
|
5
|
+
}
|
|
6
|
+
export declare class AuthError extends BasicCliError {
|
|
7
|
+
constructor(message: string, suggestions?: string[]);
|
|
8
|
+
}
|
|
9
|
+
export declare class ApiError extends BasicCliError {
|
|
10
|
+
statusCode?: number | undefined;
|
|
11
|
+
constructor(message: string, statusCode?: number | undefined, suggestions?: string[]);
|
|
12
|
+
}
|
|
13
|
+
export declare class SchemaError extends BasicCliError {
|
|
14
|
+
constructor(message: string, suggestions?: string[]);
|
|
15
|
+
}
|
|
16
|
+
export declare class NetworkError extends BasicCliError {
|
|
17
|
+
constructor(message?: string);
|
|
18
|
+
}
|
|
19
|
+
export declare function handleError(error: unknown): BasicCliError;
|
|
20
|
+
export declare function formatError(error: BasicCliError): string;
|
|
21
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,aAAc,SAAQ,KAAK;IAG7B,IAAI,EAAE,MAAM;IACZ,WAAW,CAAC,EAAE,MAAM,EAAE;gBAF7B,OAAO,EAAE,MAAM,EACR,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,EAAE,YAAA;CAKhC;AAED,qBAAa,SAAU,SAAQ,aAAa;gBAC9B,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE;CAIpD;AAED,qBAAa,QAAS,SAAQ,aAAa;IAGhC,UAAU,CAAC,EAAE,MAAM;gBAD1B,OAAO,EAAE,MAAM,EACR,UAAU,CAAC,EAAE,MAAM,YAAA,EAC1B,WAAW,CAAC,EAAE,MAAM,EAAE;CAKzB;AAED,qBAAa,WAAY,SAAQ,aAAa;gBAChC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE;CAIpD;AAED,qBAAa,YAAa,SAAQ,aAAa;gBACjC,OAAO,GAAE,MAAoC;CAO1D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,CA6BzD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAWxD"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export class BasicCliError extends Error {
|
|
2
|
+
code;
|
|
3
|
+
suggestions;
|
|
4
|
+
constructor(message, code, suggestions) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.code = code;
|
|
7
|
+
this.suggestions = suggestions;
|
|
8
|
+
this.name = 'BasicCliError';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export class AuthError extends BasicCliError {
|
|
12
|
+
constructor(message, suggestions) {
|
|
13
|
+
super(message, 'AUTH_ERROR', suggestions);
|
|
14
|
+
this.name = 'AuthError';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export class ApiError extends BasicCliError {
|
|
18
|
+
statusCode;
|
|
19
|
+
constructor(message, statusCode, suggestions) {
|
|
20
|
+
super(message, 'API_ERROR', suggestions);
|
|
21
|
+
this.statusCode = statusCode;
|
|
22
|
+
this.name = 'ApiError';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export class SchemaError extends BasicCliError {
|
|
26
|
+
constructor(message, suggestions) {
|
|
27
|
+
super(message, 'SCHEMA_ERROR', suggestions);
|
|
28
|
+
this.name = 'SchemaError';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export class NetworkError extends BasicCliError {
|
|
32
|
+
constructor(message = 'Network connection failed') {
|
|
33
|
+
super(message, 'NETWORK_ERROR', [
|
|
34
|
+
'Check your internet connection',
|
|
35
|
+
'Try again in a moment'
|
|
36
|
+
]);
|
|
37
|
+
this.name = 'NetworkError';
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export function handleError(error) {
|
|
41
|
+
if (error instanceof BasicCliError) {
|
|
42
|
+
return error;
|
|
43
|
+
}
|
|
44
|
+
if (error instanceof Error) {
|
|
45
|
+
// Handle specific error patterns from the original Go code
|
|
46
|
+
if (error.message.includes('ENOTFOUND') || error.message.includes('network')) {
|
|
47
|
+
return new NetworkError();
|
|
48
|
+
}
|
|
49
|
+
if (error.message.includes('unauthorized') || error.message.includes('401')) {
|
|
50
|
+
return new AuthError('Authentication failed', [
|
|
51
|
+
'Try logging in again with \'basic login\'',
|
|
52
|
+
'Check if your token has expired'
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
55
|
+
if (error.message.includes('invalid character')) {
|
|
56
|
+
return new SchemaError('Invalid schema format', [
|
|
57
|
+
'Check for trailing commas in your schema',
|
|
58
|
+
'Ensure valid JSON syntax'
|
|
59
|
+
]);
|
|
60
|
+
}
|
|
61
|
+
return new BasicCliError(error.message, 'UNKNOWN_ERROR');
|
|
62
|
+
}
|
|
63
|
+
return new BasicCliError('An unknown error occurred', 'UNKNOWN_ERROR');
|
|
64
|
+
}
|
|
65
|
+
export function formatError(error) {
|
|
66
|
+
let output = `Error: ${error.message}`;
|
|
67
|
+
if (error.suggestions && error.suggestions.length > 0) {
|
|
68
|
+
output += '\n\nSuggestions:';
|
|
69
|
+
error.suggestions.forEach(suggestion => {
|
|
70
|
+
output += `\n - ${suggestion}`;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return output;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,aAAc,SAAQ,KAAK;IAG7B;IACA;IAHT,YACE,OAAe,EACR,IAAY,EACZ,WAAsB;QAE7B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,SAAI,GAAJ,IAAI,CAAQ;QACZ,gBAAW,GAAX,WAAW,CAAW;QAG7B,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED,MAAM,OAAO,SAAU,SAAQ,aAAa;IAC1C,YAAY,OAAe,EAAE,WAAsB;QACjD,KAAK,CAAC,OAAO,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IAC1B,CAAC;CACF;AAED,MAAM,OAAO,QAAS,SAAQ,aAAa;IAGhC;IAFT,YACE,OAAe,EACR,UAAmB,EAC1B,WAAsB;QAEtB,KAAK,CAAC,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;QAHlC,eAAU,GAAV,UAAU,CAAS;QAI1B,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;CACF;AAED,MAAM,OAAO,WAAY,SAAQ,aAAa;IAC5C,YAAY,OAAe,EAAE,WAAsB;QACjD,KAAK,CAAC,OAAO,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;QAC5C,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC5B,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,aAAa;IAC7C,YAAY,UAAkB,2B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,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtD,MAAM,IAAI,kBAAkB,CAAC;QAC7B,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;YACrC,MAAM,IAAI,SAAS,UAAU,EAAE,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function getConfigPath(): string;
|
|
2
|
+
export declare function getConfigDir(): string;
|
|
3
|
+
export declare function openBrowser(url: string): Promise<void>;
|
|
4
|
+
export declare function copyToClipboard(text: string): Promise<void>;
|
|
5
|
+
export declare function isOnline(): Promise<boolean>;
|
|
6
|
+
export declare function generateSlugFromName(name: string): string;
|
|
7
|
+
export declare function generateRandomTeamName(): string;
|
|
8
|
+
export declare function similarity(s1: string, s2: string): number;
|
|
9
|
+
export declare function findSimilarCommands(input: string): string[];
|
|
10
|
+
export declare function generateSlug(name: string): string;
|
|
11
|
+
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/lib/platform.ts"],"names":[],"mappings":"AAQA,wBAAgB,aAAa,IAAI,MAAM,CAGtC;AAED,wBAAgB,YAAY,IAAI,MAAM,CAGrC;AAED,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyB5D;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBjE;AAED,wBAAgB,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,CAI3C;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKzD;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAM/C;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAKzD;AA+BD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAe3D;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQjD"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { exec } from 'child_process';
|
|
2
|
+
import { promisify } from 'util';
|
|
3
|
+
import * as os from 'os';
|
|
4
|
+
import * as path from 'path';
|
|
5
|
+
import { CONSTANTS, COMMANDS } from './constants.js';
|
|
6
|
+
const execAsync = promisify(exec);
|
|
7
|
+
export function getConfigPath() {
|
|
8
|
+
const home = os.homedir();
|
|
9
|
+
return path.join(home, CONSTANTS.CLI_DIR, CONSTANTS.TOKEN_FILE);
|
|
10
|
+
}
|
|
11
|
+
export function getConfigDir() {
|
|
12
|
+
const home = os.homedir();
|
|
13
|
+
return path.join(home, CONSTANTS.CLI_DIR);
|
|
14
|
+
}
|
|
15
|
+
export async function openBrowser(url) {
|
|
16
|
+
const platform = process.platform;
|
|
17
|
+
const commands = {
|
|
18
|
+
darwin: 'open',
|
|
19
|
+
win32: 'start',
|
|
20
|
+
linux: 'xdg-open'
|
|
21
|
+
};
|
|
22
|
+
const command = commands[platform];
|
|
23
|
+
if (!command) {
|
|
24
|
+
throw new Error(`Unsupported platform: ${platform}`);
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
if (platform === 'win32') {
|
|
28
|
+
// Windows requires special handling for URLs
|
|
29
|
+
await execAsync(`${command} "" "${url}"`);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
await execAsync(`${command} "${url}"`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
throw new Error(`Failed to open browser: ${error}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export async function copyToClipboard(text) {
|
|
40
|
+
const platform = process.platform;
|
|
41
|
+
try {
|
|
42
|
+
if (platform === 'darwin') {
|
|
43
|
+
// macOS
|
|
44
|
+
await execAsync(`echo "${text}" | pbcopy`);
|
|
45
|
+
}
|
|
46
|
+
else if (platform === 'win32') {
|
|
47
|
+
// Windows
|
|
48
|
+
await execAsync(`echo ${text} | clip`);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
// Linux - try xclip first, then xsel
|
|
52
|
+
try {
|
|
53
|
+
await execAsync(`echo "${text}" | xclip -selection clipboard`);
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
await execAsync(`echo "${text}" | xsel --clipboard --input`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
throw new Error(`Failed to copy to clipboard: ${error}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export function isOnline() {
|
|
65
|
+
return fetch(CONSTANTS.API_BASE, { method: 'HEAD' })
|
|
66
|
+
.then(() => true)
|
|
67
|
+
.catch(() => false);
|
|
68
|
+
}
|
|
69
|
+
export function generateSlugFromName(name) {
|
|
70
|
+
return name
|
|
71
|
+
.toLowerCase()
|
|
72
|
+
.replace(/\s+/g, '-')
|
|
73
|
+
.replace(/[^a-zA-Z-]/g, '');
|
|
74
|
+
}
|
|
75
|
+
export function generateRandomTeamName() {
|
|
76
|
+
// Generate a random number between 1000 and 9999 using crypto
|
|
77
|
+
const array = new Uint16Array(1);
|
|
78
|
+
crypto.getRandomValues(array);
|
|
79
|
+
const randomNum = (array[0] % 9000) + 1000;
|
|
80
|
+
return `team-${randomNum}`;
|
|
81
|
+
}
|
|
82
|
+
export function similarity(s1, s2) {
|
|
83
|
+
const d = levenshteinDistance(s1, s2);
|
|
84
|
+
const maxLen = Math.max(s1.length, s2.length);
|
|
85
|
+
if (maxLen === 0)
|
|
86
|
+
return 1.0;
|
|
87
|
+
return 1.0 - d / maxLen;
|
|
88
|
+
}
|
|
89
|
+
function levenshteinDistance(s1, s2) {
|
|
90
|
+
if (s1.length === 0)
|
|
91
|
+
return s2.length;
|
|
92
|
+
if (s2.length === 0)
|
|
93
|
+
return s1.length;
|
|
94
|
+
const matrix = [];
|
|
95
|
+
for (let i = 0; i <= s1.length; i++) {
|
|
96
|
+
matrix[i] = [];
|
|
97
|
+
matrix[i][0] = i;
|
|
98
|
+
}
|
|
99
|
+
for (let j = 0; j <= s2.length; j++) {
|
|
100
|
+
matrix[0][j] = j;
|
|
101
|
+
}
|
|
102
|
+
for (let i = 1; i <= s1.length; i++) {
|
|
103
|
+
for (let j = 1; j <= s2.length; j++) {
|
|
104
|
+
const cost = s1[i - 1] === s2[j - 1] ? 0 : 1;
|
|
105
|
+
matrix[i][j] = Math.min(matrix[i - 1][j] + 1, matrix[i][j - 1] + 1, matrix[i - 1][j - 1] + cost);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return matrix[s1.length][s2.length];
|
|
109
|
+
}
|
|
110
|
+
export function findSimilarCommands(input) {
|
|
111
|
+
const commands = COMMANDS.filter(cmd => cmd !== input);
|
|
112
|
+
const suggestions = [];
|
|
113
|
+
for (const command of commands) {
|
|
114
|
+
const sim = similarity(input, command);
|
|
115
|
+
if (sim >= CONSTANTS.SIMILARITY_THRESHOLD) {
|
|
116
|
+
suggestions.push({ command, similarity: sim });
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return suggestions
|
|
120
|
+
.sort((a, b) => b.similarity - a.similarity)
|
|
121
|
+
.slice(0, 3)
|
|
122
|
+
.map(s => s.command);
|
|
123
|
+
}
|
|
124
|
+
export function generateSlug(name) {
|
|
125
|
+
return name
|
|
126
|
+
.toLowerCase()
|
|
127
|
+
.trim()
|
|
128
|
+
.replace(/[^a-z0-9\s-]/g, '') // Remove special characters except spaces and hyphens
|
|
129
|
+
.replace(/\s+/g, '-') // Replace spaces with hyphens
|
|
130
|
+
.replace(/-+/g, '-') // Replace multiple hyphens with single hyphen
|
|
131
|
+
.replace(/^-|-$/g, ''); // Remove leading/trailing hyphens
|
|
132
|
+
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,CAAC;QAC/B,MAAM,GAAG,GAAG,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACvC,IAAI,GAAG,IAAI,SAAS,CAAC,oBAAoB,EAAE,CAAC;YAC1C,WAAW,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IAED,OAAO,WAAW;SACf,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC;SAC3C,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;SACX,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,IAAI;SACR,WAAW,EAAE;SACb,IAAI,EAAE;SACN,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,sDAAsD;SACnF,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,8BAA8B;SACnD,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,8CAA8C;SAClE,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,kCAAkC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Schema } from './types';
|
|
2
|
+
export interface SchemaFileResult {
|
|
3
|
+
schema: Schema;
|
|
4
|
+
projectId: string;
|
|
5
|
+
filePath: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Read schema from local config files
|
|
9
|
+
* Supports basic.config.ts, basic.config.js, and basic.config.json
|
|
10
|
+
*/
|
|
11
|
+
export declare function readSchemaFromConfig(targetDir?: string): Promise<SchemaFileResult | null>;
|
|
12
|
+
/**
|
|
13
|
+
* Save schema to config file
|
|
14
|
+
*/
|
|
15
|
+
export declare function saveSchemaToConfig(schema: Schema, targetDir?: string): Promise<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Check if schema versions are different
|
|
18
|
+
*/
|
|
19
|
+
export declare function compareVersions(local: Schema, remote: Schema): {
|
|
20
|
+
status: 'current' | 'ahead' | 'behind' | 'equal';
|
|
21
|
+
localVersion: number;
|
|
22
|
+
remoteVersion: number;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/lib/schema.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEtC,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,SAAS,GAAE,MAAsB,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CA4C9G;AAgDD;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,SAAS,GAAE,MAAsB,GAChC,OAAO,CAAC,MAAM,CAAC,CAiBjB;AAqCD;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG;IAC9D,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB,CAmBA"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import * as fs from 'fs/promises';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
/**
|
|
4
|
+
* Read schema from local config files
|
|
5
|
+
* Supports basic.config.ts, basic.config.js, and basic.config.json
|
|
6
|
+
*/
|
|
7
|
+
export async function readSchemaFromConfig(targetDir = process.cwd()) {
|
|
8
|
+
const possibleFiles = [
|
|
9
|
+
'basic.config.ts',
|
|
10
|
+
'basic.config.js',
|
|
11
|
+
'basic.config.json'
|
|
12
|
+
];
|
|
13
|
+
for (const filename of possibleFiles) {
|
|
14
|
+
const filePath = path.join(targetDir, filename);
|
|
15
|
+
try {
|
|
16
|
+
await fs.access(filePath);
|
|
17
|
+
const content = await fs.readFile(filePath, 'utf8');
|
|
18
|
+
let schema;
|
|
19
|
+
if (filename.endsWith('.json')) {
|
|
20
|
+
// Direct JSON parsing
|
|
21
|
+
schema = JSON.parse(content);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
// Extract schema from JS/TS files
|
|
25
|
+
schema = extractSchemaFromCode(content);
|
|
26
|
+
}
|
|
27
|
+
// Validate required fields
|
|
28
|
+
if (!schema.project_id) {
|
|
29
|
+
throw new Error('No project_id found in schema');
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
schema,
|
|
33
|
+
projectId: schema.project_id,
|
|
34
|
+
filePath
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
if (error.code === 'ENOENT') {
|
|
39
|
+
continue; // File doesn't exist, try next
|
|
40
|
+
}
|
|
41
|
+
throw new Error(`Error reading ${filename}: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return null; // No config file found
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Extract schema object from TypeScript/JavaScript code
|
|
48
|
+
*/
|
|
49
|
+
function extractSchemaFromCode(content) {
|
|
50
|
+
// Remove comments and whitespace for easier parsing
|
|
51
|
+
const cleanContent = content
|
|
52
|
+
.replace(/\/\*[\s\S]*?\*\//g, '') // Remove /* */ comments
|
|
53
|
+
.replace(/\/\/.*$/gm, '') // Remove // comments
|
|
54
|
+
.replace(/\s+/g, ' ') // Normalize whitespace
|
|
55
|
+
.trim();
|
|
56
|
+
// Look for schema object - try different patterns
|
|
57
|
+
const patterns = [
|
|
58
|
+
/const\s+schema\s*=\s*({[^;]+});/, // const schema = {...};
|
|
59
|
+
/export\s+const\s+schema\s*=\s*({[^;]+});/, // export const schema = {...};
|
|
60
|
+
/schema\s*=\s*({[^;]+});/, // schema = {...};
|
|
61
|
+
/=\s*({[^;]+});/, // fallback pattern
|
|
62
|
+
];
|
|
63
|
+
for (const pattern of patterns) {
|
|
64
|
+
const match = cleanContent.match(pattern);
|
|
65
|
+
if (match) {
|
|
66
|
+
try {
|
|
67
|
+
// Parse the captured group as JSON
|
|
68
|
+
const schemaStr = match[1];
|
|
69
|
+
return JSON.parse(schemaStr);
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
// If direct JSON parsing fails, try to clean up the string
|
|
73
|
+
try {
|
|
74
|
+
const schemaStr = match[1]; // Re-declare in this scope
|
|
75
|
+
const cleanedStr = schemaStr
|
|
76
|
+
.replace(/(\w+):/g, '"$1":') // Add quotes around keys
|
|
77
|
+
.replace(/'/g, '"') // Convert single quotes to double quotes
|
|
78
|
+
.replace(/,(\s*[}\]])/g, '$1'); // Remove trailing commas
|
|
79
|
+
return JSON.parse(cleanedStr);
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
continue; // Try next pattern
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
throw new Error('Could not extract schema from config file');
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Save schema to config file
|
|
91
|
+
*/
|
|
92
|
+
export async function saveSchemaToConfig(schema, targetDir = process.cwd()) {
|
|
93
|
+
// Find existing config file
|
|
94
|
+
const existing = await readSchemaFromConfig(targetDir);
|
|
95
|
+
if (existing) {
|
|
96
|
+
// Update existing file
|
|
97
|
+
const content = await fs.readFile(existing.filePath, 'utf8');
|
|
98
|
+
const updatedContent = updateSchemaInCode(content, schema);
|
|
99
|
+
await fs.writeFile(existing.filePath, updatedContent, 'utf8');
|
|
100
|
+
return existing.filePath;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
// Create new TypeScript config file
|
|
104
|
+
const filePath = path.join(targetDir, 'basic.config.ts');
|
|
105
|
+
const content = generateConfigContent(schema);
|
|
106
|
+
await fs.writeFile(filePath, content, 'utf8');
|
|
107
|
+
return filePath;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Update schema in existing code
|
|
112
|
+
*/
|
|
113
|
+
function updateSchemaInCode(content, newSchema) {
|
|
114
|
+
const schemaStr = JSON.stringify(newSchema, null, 2);
|
|
115
|
+
// Try to replace existing schema
|
|
116
|
+
const patterns = [
|
|
117
|
+
/(const\s+schema\s*=\s*)({[^;]+})(;)/g,
|
|
118
|
+
/(export\s+const\s+schema\s*=\s*)({[^;]+})(;)/g,
|
|
119
|
+
/(schema\s*=\s*)({[^;]+})(;)/g,
|
|
120
|
+
];
|
|
121
|
+
for (const pattern of patterns) {
|
|
122
|
+
if (pattern.test(content)) {
|
|
123
|
+
return content.replace(pattern, `$1${schemaStr}$3`);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
throw new Error('Could not update schema in config file');
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Generate new config file content
|
|
130
|
+
*/
|
|
131
|
+
function generateConfigContent(schema) {
|
|
132
|
+
return `// Basic Project Configuration
|
|
133
|
+
// see the docs for more info: https://docs.basic.tech
|
|
134
|
+
|
|
135
|
+
const schema = ${JSON.stringify(schema, null, 2)};
|
|
136
|
+
|
|
137
|
+
export default schema;
|
|
138
|
+
`;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Check if schema versions are different
|
|
142
|
+
*/
|
|
143
|
+
export function compareVersions(local, remote) {
|
|
144
|
+
const localVersion = local.version || 0;
|
|
145
|
+
const remoteVersion = remote.version || 0;
|
|
146
|
+
let status;
|
|
147
|
+
if (localVersion === remoteVersion) {
|
|
148
|
+
status = 'equal';
|
|
149
|
+
}
|
|
150
|
+
else if (localVersion > remoteVersion) {
|
|
151
|
+
status = 'ahead';
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
status = 'behind';
|
|
155
|
+
}
|
|
156
|
+
return {
|
|
157
|
+
status,
|
|
158
|
+
localVersion,
|
|
159
|
+
remoteVersion
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/lib/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAS7B;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,YAAoB,OAAO,CAAC,GAAG,EAAE;IAC1E,MAAM,aAAa,GAAG;QACpB,iBAAiB;QACjB,iBAAiB;QACjB,mBAAmB;KACpB,CAAC;IAEF,KAAK,MAAM,QAAQ,IAAI,aAAa,EAAE,CAAC;QACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEhD,IAAI,CAAC;YACH,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC1B,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAEpD,IAAI,MAAc,CAAC;YAEnB,IAAI,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC/B,sBAAsB;gBACtB,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC/B,CAAC;iBAAM,CAAC;gBACN,kCAAkC;gBAClC,MAAM,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC;YAC1C,CAAC;YAED,2BAA2B;YAC3B,IAAI,CAAC,MAAM,CAAC,U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;QACxC,MAAM,GAAG,OAAO,CAAC;IACnB,CAAC;SAAM,CAAC;QACN,MAAM,GAAG,QAAQ,CAAC;IACpB,CAAC;IAED,OAAO;QACL,MAAM;QACN,YAAY;QACZ,aAAa;KACd,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
export interface Token {
|
|
2
|
+
access_token: string;
|
|
3
|
+
refresh_token: string;
|
|
4
|
+
expires_at: number;
|
|
5
|
+
token_type: string;
|
|
6
|
+
}
|
|
7
|
+
export interface Project {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
slug: string;
|
|
11
|
+
profile: {
|
|
12
|
+
icon_url?: string;
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
};
|
|
15
|
+
team_id: string;
|
|
16
|
+
team_name: string;
|
|
17
|
+
team_slug: string;
|
|
18
|
+
created_at: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ProjectDetails extends Project {
|
|
21
|
+
website?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface Team {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
slug: string;
|
|
27
|
+
roles?: string;
|
|
28
|
+
role_name?: string;
|
|
29
|
+
created_at: string;
|
|
30
|
+
}
|
|
31
|
+
export interface Schema {
|
|
32
|
+
project_id: string;
|
|
33
|
+
version: number;
|
|
34
|
+
tables: Record<string, TableSchema>;
|
|
35
|
+
}
|
|
36
|
+
export interface TableSchema {
|
|
37
|
+
type: 'collection' | 'document';
|
|
38
|
+
fields: Record<string, FieldSchema>;
|
|
39
|
+
}
|
|
40
|
+
export interface FieldSchema {
|
|
41
|
+
type: string;
|
|
42
|
+
required?: boolean;
|
|
43
|
+
default?: any;
|
|
44
|
+
}
|
|
45
|
+
export interface ValidationError {
|
|
46
|
+
message: string;
|
|
47
|
+
instancePath: string;
|
|
48
|
+
params?: {
|
|
49
|
+
field?: string;
|
|
50
|
+
originTable?: string;
|
|
51
|
+
project_id?: string;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export interface ValidationResult {
|
|
55
|
+
valid: boolean;
|
|
56
|
+
errors?: ValidationError[];
|
|
57
|
+
}
|
|
58
|
+
export interface UserInfo {
|
|
59
|
+
email: string;
|
|
60
|
+
id: string;
|
|
61
|
+
name?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface CreateProjectData {
|
|
64
|
+
name: string;
|
|
65
|
+
slug: string;
|
|
66
|
+
team_id: string;
|
|
67
|
+
}
|
|
68
|
+
export interface InitFormData {
|
|
69
|
+
createOption: 'new' | 'existing';
|
|
70
|
+
projectName: string;
|
|
71
|
+
projectId?: string;
|
|
72
|
+
configOption: 'typescript' | 'javascript' | 'none';
|
|
73
|
+
}
|
|
74
|
+
export interface InitProjectData {
|
|
75
|
+
projectName: string;
|
|
76
|
+
projectSlug: string;
|
|
77
|
+
teamId: string;
|
|
78
|
+
configTemplate: ConfigTemplate;
|
|
79
|
+
}
|
|
80
|
+
export interface InitExistingData {
|
|
81
|
+
projectId: string;
|
|
82
|
+
configTemplate: ConfigTemplate;
|
|
83
|
+
}
|
|
84
|
+
export type ConfigTemplate = 'typescript' | 'javascript' | 'none';
|
|
85
|
+
export interface InitFormState {
|
|
86
|
+
step: 'source' | 'project-details' | 'team-selection' | 'existing-selection' | 'config-template' | 'confirmation';
|
|
87
|
+
source: 'new' | 'existing' | null;
|
|
88
|
+
projectName: string;
|
|
89
|
+
projectSlug: string;
|
|
90
|
+
selectedTeamId: string | null;
|
|
91
|
+
selectedProjectId: string | null;
|
|
92
|
+
configTemplate: ConfigTemplate | null;
|
|
93
|
+
availableTeams: Team[];
|
|
94
|
+
availableProjects: Project[];
|
|
95
|
+
isLoading: boolean;
|
|
96
|
+
error: string | null;
|
|
97
|
+
}
|
|
98
|
+
export interface ConfigTemplateInfo {
|
|
99
|
+
name: string;
|
|
100
|
+
description: string;
|
|
101
|
+
filename: string;
|
|
102
|
+
extension: string;
|
|
103
|
+
}
|
|
104
|
+
export interface StatusResult {
|
|
105
|
+
status: 'current' | 'behind' | 'ahead' | 'conflict' | 'invalid';
|
|
106
|
+
message: string;
|
|
107
|
+
projectId: string;
|
|
108
|
+
schema?: string;
|
|
109
|
+
}
|
|
110
|
+
export type ProgramState = 'choosing' | 'success' | 'error' | 'unknown' | 'status';
|
|
111
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE;QACP,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAGD,MAAM,WAAW,cAAe,SAAQ,OAAO;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,MAAM;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM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@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/lib/version.ts"],"names":[],"mappings":"AAKA,wBAAgB,UAAU,IAAI,MAAM,CAiBnC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { readFileSync } from 'fs';
|
|
2
|
+
import { join } from 'path';
|
|
3
|
+
let cachedVersion = null;
|
|
4
|
+
export function getVersion() {
|
|
5
|
+
if (cachedVersion) {
|
|
6
|
+
return cachedVersion;
|
|
7
|
+
}
|
|
8
|
+
try {
|
|
9
|
+
// Read package.json from the project root
|
|
10
|
+
const packageJsonPath = join(__dirname, '../../package.json');
|
|
11
|
+
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
|
|
12
|
+
cachedVersion = packageJson.version;
|
|
13
|
+
return cachedVersion;
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
// Fallback version if package.json can't be read
|
|
17
|
+
const fallbackVersion = '0.0.22';
|
|
18
|
+
cachedVersion = fallbackVersion;
|
|
19
|
+
return fallbackVersion;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/lib/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,IAAI,aAAa,GAAkB,IAAI,CAAC;AAExC,MAAM,UAAU,UAAU;IACxB,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,IAAI,CAAC;QACH,0CAA0C;QAC1C,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;QAC9D,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;QACtE,aAAa,GAAG,WAAW,CAAC,OAAiB,CAAC;QAC9C,OAAO,aAAa,CAAC;IACvB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,iDAAiD;QACjD,MAAM,eAAe,GAAG,QAAQ,CAAC;QACjC,aAAa,GAAG,eAAe,CAAC;QAChC,OAAO,eAAe,CAAC;IACzB,CAAC;AACH,CAAC"}
|