@base44-preview/cli 0.0.1-pr.7.94b130d → 0.0.1-pr.7.e863045
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/commands/auth/login.d.ts.map +1 -1
- package/dist/cli/commands/auth/login.js +3 -3
- package/dist/cli/commands/auth/login.js.map +1 -1
- package/dist/cli/commands/project/show-project.d.ts.map +1 -1
- package/dist/cli/commands/project/show-project.js +1 -2
- package/dist/cli/commands/project/show-project.js.map +1 -1
- package/dist/cli/index.js +8 -8
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/utils/packageVersion.js +3 -3
- package/dist/cli/utils/packageVersion.js.map +1 -1
- package/dist/core/api/auth/client.d.ts +1 -1
- package/dist/core/api/auth/client.d.ts.map +1 -1
- package/dist/core/api/auth/client.js +2 -2
- package/dist/core/api/auth/client.js.map +1 -1
- package/dist/core/api/auth/index.d.ts +3 -3
- package/dist/core/api/auth/index.js +3 -3
- package/dist/core/api/auth/schema.d.ts +1 -1
- package/dist/core/api/auth/schema.js +8 -8
- package/dist/core/api/index.d.ts +1 -1
- package/dist/core/api/index.js +1 -1
- package/dist/core/config/auth.d.ts +1 -1
- package/dist/core/config/auth.d.ts.map +1 -1
- package/dist/core/config/auth.js +5 -5
- package/dist/core/config/auth.js.map +1 -1
- package/dist/core/config/entities.d.ts +1 -2
- package/dist/core/config/entities.d.ts.map +1 -1
- package/dist/core/config/entities.js +19 -55
- package/dist/core/config/entities.js.map +1 -1
- package/dist/core/config/functions.d.ts +1 -1
- package/dist/core/config/functions.d.ts.map +1 -1
- package/dist/core/config/functions.js +13 -25
- package/dist/core/config/functions.js.map +1 -1
- package/dist/core/config/index.d.ts +5 -5
- package/dist/core/config/index.d.ts.map +1 -1
- package/dist/core/config/index.js +5 -5
- package/dist/core/config/index.js.map +1 -1
- package/dist/core/config/project.d.ts +4 -4
- package/dist/core/config/project.d.ts.map +1 -1
- package/dist/core/config/project.js +44 -43
- package/dist/core/config/project.js.map +1 -1
- package/dist/core/consts.d.ts +6 -0
- package/dist/core/consts.d.ts.map +1 -0
- package/dist/core/consts.js +19 -0
- package/dist/core/consts.js.map +1 -0
- package/dist/core/errors/index.d.ts +1 -1
- package/dist/core/errors/index.js +1 -1
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +5 -5
- package/dist/core/schemas/auth.d.ts +1 -1
- package/dist/core/schemas/auth.js +3 -3
- package/dist/core/schemas/config.d.ts +22 -0
- package/dist/core/schemas/config.d.ts.map +1 -0
- package/dist/core/schemas/config.js +14 -0
- package/dist/core/schemas/config.js.map +1 -0
- package/dist/core/schemas/entity.d.ts +40 -9
- package/dist/core/schemas/entity.d.ts.map +1 -1
- package/dist/core/schemas/entity.js +26 -7
- package/dist/core/schemas/entity.js.map +1 -1
- package/dist/core/schemas/function.d.ts +67 -29
- package/dist/core/schemas/function.d.ts.map +1 -1
- package/dist/core/schemas/function.js +22 -5
- package/dist/core/schemas/function.js.map +1 -1
- package/dist/core/schemas/index.d.ts +5 -4
- package/dist/core/schemas/index.d.ts.map +1 -1
- package/dist/core/schemas/index.js +5 -4
- package/dist/core/schemas/index.js.map +1 -1
- package/dist/core/schemas/project.d.ts +0 -2
- package/dist/core/schemas/project.d.ts.map +1 -1
- package/dist/core/schemas/project.js +0 -2
- package/dist/core/schemas/project.js.map +1 -1
- package/dist/core/utils/fs.d.ts +1 -1
- package/dist/core/utils/fs.d.ts.map +1 -1
- package/dist/core/utils/fs.js +9 -8
- package/dist/core/utils/fs.js.map +1 -1
- package/dist/core/utils/index.d.ts +1 -1
- package/dist/core/utils/index.js +1 -1
- package/package.json +9 -4
- package/dist/core/config/constants.d.ts +0 -7
- package/dist/core/config/constants.d.ts.map +0 -1
- package/dist/core/config/constants.js +0 -9
- package/dist/core/config/constants.js.map +0 -1
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import { join, dirname } from "path";
|
|
1
|
+
import { join, dirname } from "node:path";
|
|
2
|
+
import { globby } from "globby";
|
|
2
3
|
import { ProjectConfigSchema } from "../schemas/project.js";
|
|
3
|
-
import {
|
|
4
|
-
import { readJsonFile
|
|
4
|
+
import { getProjectConfigPatterns, PROJECT_SUBDIR } from "../consts.js";
|
|
5
|
+
import { readJsonFile } from "../utils/fs.js";
|
|
5
6
|
import { readAllEntities } from "./entities.js";
|
|
6
7
|
import { readAllFunctions } from "./functions.js";
|
|
7
|
-
// Finds
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
8
|
+
// Finds config file in a directory using globby, respecting priority order.
|
|
9
|
+
async function findConfigInDir(dir) {
|
|
10
|
+
const files = await globby(getProjectConfigPatterns(), {
|
|
11
|
+
cwd: dir,
|
|
12
|
+
absolute: true,
|
|
13
|
+
});
|
|
14
|
+
return files[0] ?? null;
|
|
15
|
+
}
|
|
16
|
+
// Walks up the directory tree to locate a Base44 project config file.
|
|
17
|
+
export async function findProjectRoot(startPath) {
|
|
18
|
+
let current = startPath || process.cwd();
|
|
11
19
|
while (current !== dirname(current)) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if (fileExists(subdirConfigPath)) {
|
|
15
|
-
return { root: current, configPath: subdirConfigPath };
|
|
16
|
-
}
|
|
17
|
-
// Then check for config.jsonc in the current directory
|
|
18
|
-
const configPath = join(current, PROJECT_CONFIG_FILE);
|
|
19
|
-
if (fileExists(configPath)) {
|
|
20
|
+
const configPath = await findConfigInDir(current);
|
|
21
|
+
if (configPath) {
|
|
20
22
|
return { root: current, configPath };
|
|
21
23
|
}
|
|
22
24
|
current = dirname(current);
|
|
@@ -24,37 +26,36 @@ export function findProjectRoot(startPath) {
|
|
|
24
26
|
return null;
|
|
25
27
|
}
|
|
26
28
|
export async function readProjectConfig(projectRoot) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
let found;
|
|
30
|
+
if (projectRoot) {
|
|
31
|
+
const configPath = await findConfigInDir(projectRoot);
|
|
32
|
+
found = configPath ? { root: projectRoot, configPath } : null;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
found = await findProjectRoot();
|
|
36
|
+
}
|
|
30
37
|
if (!found) {
|
|
31
|
-
throw new Error(`Project root not found. Please ensure
|
|
38
|
+
throw new Error(`Project root not found. Please ensure config.jsonc or config.json exists in the project directory or ${PROJECT_SUBDIR}/ subdirectory.`);
|
|
32
39
|
}
|
|
33
40
|
const { root, configPath } = found;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
.map((e) => e.message)
|
|
40
|
-
.join(", ")}`);
|
|
41
|
-
}
|
|
42
|
-
const project = result.data;
|
|
43
|
-
const configDir = dirname(configPath);
|
|
44
|
-
const entitiesPath = join(configDir, project.entitySrc);
|
|
45
|
-
const functionsPath = join(configDir, project.functionSrc);
|
|
46
|
-
const [entities, functions] = await Promise.all([
|
|
47
|
-
fileExists(entitiesPath) ? readAllEntities(entitiesPath) : [],
|
|
48
|
-
fileExists(functionsPath) ? readAllFunctions(functionsPath) : [],
|
|
49
|
-
]);
|
|
50
|
-
return {
|
|
51
|
-
project: { ...project, root, configPath },
|
|
52
|
-
entities,
|
|
53
|
-
functions,
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
catch (error) {
|
|
57
|
-
throw new Error(`Failed to read project configuration: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
41
|
+
const parsed = await readJsonFile(configPath);
|
|
42
|
+
const result = ProjectConfigSchema.safeParse(parsed);
|
|
43
|
+
if (!result.success) {
|
|
44
|
+
const errors = result.error.issues.map((e) => e.message).join(", ");
|
|
45
|
+
throw new Error(`Invalid project configuration: ${errors}`);
|
|
58
46
|
}
|
|
47
|
+
const project = result.data;
|
|
48
|
+
const configDir = dirname(configPath);
|
|
49
|
+
const entitiesPath = join(configDir, project.entitySrc);
|
|
50
|
+
const functionsPath = join(configDir, project.functionSrc);
|
|
51
|
+
const [entities, functions] = await Promise.all([
|
|
52
|
+
readAllEntities(entitiesPath),
|
|
53
|
+
readAllFunctions(functionsPath),
|
|
54
|
+
]);
|
|
55
|
+
return {
|
|
56
|
+
project: { ...project, root, configPath },
|
|
57
|
+
entities,
|
|
58
|
+
functions,
|
|
59
|
+
};
|
|
59
60
|
}
|
|
60
61
|
//# sourceMappingURL=project.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../../src/core/config/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../../src/core/config/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAalD,4EAA4E;AAC5E,KAAK,UAAU,eAAe,CAAC,GAAW;IACxC,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,wBAAwB,EAAE,EAAE;QACrD,GAAG,EAAE,GAAG;QACR,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC;IACH,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AAC1B,CAAC;AAED,sEAAsE;AACtE,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,SAAkB;IAElB,IAAI,OAAO,GAAG,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAEzC,OAAO,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,EAAE,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AM,CAAC,IAAI,CAAC;IAC5B,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACtC,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACxD,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAE3D,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC9C,eAAe,CAAC,YAAY,CAAC;QAC7B,gBAAgB,CAAC,aAAa,CAAC;KAChC,CAAC,CAAC;IAEH,OAAO;QACL,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE;QACzC,QAAQ;QACR,SAAS;KACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const PROJECT_SUBDIR = "base44";
|
|
2
|
+
export declare const FUNCTION_CONFIG_FILE = "function.jsonc";
|
|
3
|
+
export declare function getBase44Dir(): string;
|
|
4
|
+
export declare function getAuthFilePath(): string;
|
|
5
|
+
export declare function getProjectConfigPatterns(): string[];
|
|
6
|
+
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/core/consts.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,WAAW,CAAC;AACvC,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AAErD,wBAAgB,YAAY,WAE3B;AAED,wBAAgB,eAAe,WAE9B;AAED,wBAAgB,wBAAwB,aAOvC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
export const PROJECT_SUBDIR = "base44";
|
|
4
|
+
export const FUNCTION_CONFIG_FILE = "function.jsonc";
|
|
5
|
+
export function getBase44Dir() {
|
|
6
|
+
return join(homedir(), ".base44");
|
|
7
|
+
}
|
|
8
|
+
export function getAuthFilePath() {
|
|
9
|
+
return join(getBase44Dir(), "auth", "auth.json");
|
|
10
|
+
}
|
|
11
|
+
export function getProjectConfigPatterns() {
|
|
12
|
+
return [
|
|
13
|
+
`${PROJECT_SUBDIR}/config.jsonc`,
|
|
14
|
+
`${PROJECT_SUBDIR}/config.json`,
|
|
15
|
+
"config.jsonc",
|
|
16
|
+
"config.json",
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=consts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/core/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC;AACvC,MAAM,CAAC,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;AAErD,MAAM,UAAU,YAAY;IAC1B,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,IAAI,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,wBAAwB;IACtC,OAAO;QACL,GAAG,cAAc,eAAe;QAChC,GAAG,cAAc,cAAc;QAC/B,cAAc;QACd,aAAa;KACd,CAAC;AACJ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./errors.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./errors.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./schemas/index.js";
|
|
2
|
+
export * from "./config/index.js";
|
|
3
|
+
export * from "./utils/index.js";
|
|
4
|
+
export * from "./api/index.js";
|
|
5
|
+
export * from "./errors/index.js";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./schemas/index.js";
|
|
2
|
+
export * from "./config/index.js";
|
|
3
|
+
export * from "./utils/index.js";
|
|
4
|
+
export * from "./api/index.js";
|
|
5
|
+
export * from "./errors/index.js";
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from "zod";
|
|
2
2
|
export const AuthDataSchema = z.object({
|
|
3
|
-
token: z.string().min(1,
|
|
3
|
+
token: z.string().min(1, "Token cannot be empty"),
|
|
4
4
|
email: z.email(),
|
|
5
|
-
name: z.string().min(1,
|
|
5
|
+
name: z.string().min(1, "Name cannot be empty"),
|
|
6
6
|
});
|
|
7
7
|
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const SiteConfigSchema: z.ZodObject<{
|
|
3
|
+
buildCommand: z.ZodOptional<z.ZodString>;
|
|
4
|
+
serveCommand: z.ZodOptional<z.ZodString>;
|
|
5
|
+
outputDirectory: z.ZodOptional<z.ZodString>;
|
|
6
|
+
installCommand: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export declare const AppConfigSchema: z.ZodObject<{
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
description: z.ZodOptional<z.ZodString>;
|
|
11
|
+
site: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
buildCommand: z.ZodOptional<z.ZodString>;
|
|
13
|
+
serveCommand: z.ZodOptional<z.ZodString>;
|
|
14
|
+
outputDirectory: z.ZodOptional<z.ZodString>;
|
|
15
|
+
installCommand: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type SiteConfig = z.infer<typeof SiteConfigSchema>;
|
|
20
|
+
export type AppConfig = z.infer<typeof AppConfigSchema>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/core/schemas/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,gBAAgB;;;;;iBAKpB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;iBAK1B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const SiteConfigSchema = z.object({
|
|
3
|
+
buildCommand: z.string().optional(),
|
|
4
|
+
serveCommand: z.string().optional(),
|
|
5
|
+
outputDirectory: z.string().optional(),
|
|
6
|
+
installCommand: z.string().optional(),
|
|
7
|
+
});
|
|
8
|
+
export const AppConfigSchema = z.object({
|
|
9
|
+
name: z.string().min(1, "App name cannot be empty"),
|
|
10
|
+
description: z.string().optional(),
|
|
11
|
+
site: SiteConfigSchema.optional(),
|
|
12
|
+
domains: z.array(z.string()).optional(),
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/core/schemas/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,0BAA0B,CAAC;IACnD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,IAAI,EAAE,gBAAgB,CAAC,QAAQ,EAAE;IACjC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC"}
|
|
@@ -1,16 +1,47 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
declare const
|
|
3
|
-
name: z.ZodString;
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const EntityPropertySchema: z.ZodObject<{
|
|
4
3
|
type: z.ZodString;
|
|
5
|
-
|
|
4
|
+
description: z.ZodOptional<z.ZodString>;
|
|
5
|
+
enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
7
|
+
format: z.ZodOptional<z.ZodString>;
|
|
8
|
+
items: z.ZodOptional<z.ZodAny>;
|
|
9
|
+
relation: z.ZodOptional<z.ZodObject<{
|
|
10
|
+
entity: z.ZodString;
|
|
11
|
+
type: z.ZodString;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
declare const EntityPoliciesSchema: z.ZodObject<{
|
|
15
|
+
read: z.ZodOptional<z.ZodString>;
|
|
16
|
+
create: z.ZodOptional<z.ZodString>;
|
|
17
|
+
update: z.ZodOptional<z.ZodString>;
|
|
18
|
+
delete: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, z.core.$strip>;
|
|
6
20
|
export declare const EntitySchema: z.ZodObject<{
|
|
7
21
|
name: z.ZodString;
|
|
8
|
-
|
|
9
|
-
|
|
22
|
+
type: z.ZodLiteral<"object">;
|
|
23
|
+
properties: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
10
24
|
type: z.ZodString;
|
|
11
|
-
|
|
12
|
-
|
|
25
|
+
description: z.ZodOptional<z.ZodString>;
|
|
26
|
+
enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
27
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
28
|
+
format: z.ZodOptional<z.ZodString>;
|
|
29
|
+
items: z.ZodOptional<z.ZodAny>;
|
|
30
|
+
relation: z.ZodOptional<z.ZodObject<{
|
|
31
|
+
entity: z.ZodString;
|
|
32
|
+
type: z.ZodString;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36
|
+
policies: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
read: z.ZodOptional<z.ZodString>;
|
|
38
|
+
create: z.ZodOptional<z.ZodString>;
|
|
39
|
+
update: z.ZodOptional<z.ZodString>;
|
|
40
|
+
delete: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export type EntityProperty = z.infer<typeof EntityPropertySchema>;
|
|
44
|
+
export type EntityPolicies = z.infer<typeof EntityPoliciesSchema>;
|
|
13
45
|
export type Entity = z.infer<typeof EntitySchema>;
|
|
14
|
-
export type EntityField = z.infer<typeof FieldSchema>;
|
|
15
46
|
export {};
|
|
16
47
|
//# sourceMappingURL=entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../src/core/schemas/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../src/core/schemas/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,oBAAoB;;;;;;;;;;;iBAaxB,CAAC;AAEH,QAAA,MAAM,oBAAoB;;;;;iBAKxB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;iBAMvB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -1,10 +1,29 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const EntityPropertySchema = z.object({
|
|
3
|
+
type: z.string(),
|
|
4
|
+
description: z.string().optional(),
|
|
5
|
+
enum: z.array(z.string()).optional(),
|
|
6
|
+
default: z.union([z.string(), z.number(), z.boolean()]).optional(),
|
|
7
|
+
format: z.string().optional(),
|
|
8
|
+
items: z.any().optional(),
|
|
9
|
+
relation: z
|
|
10
|
+
.object({
|
|
11
|
+
entity: z.string(),
|
|
12
|
+
type: z.string(),
|
|
13
|
+
})
|
|
14
|
+
.optional(),
|
|
5
15
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
16
|
+
const EntityPoliciesSchema = z.object({
|
|
17
|
+
read: z.string().optional(),
|
|
18
|
+
create: z.string().optional(),
|
|
19
|
+
update: z.string().optional(),
|
|
20
|
+
delete: z.string().optional(),
|
|
21
|
+
});
|
|
22
|
+
export const EntitySchema = z.object({
|
|
23
|
+
name: z.string().min(1, "Entity name cannot be empty"),
|
|
24
|
+
type: z.literal("object"),
|
|
25
|
+
properties: z.record(z.string(), EntityPropertySchema),
|
|
26
|
+
required: z.array(z.string()).optional(),
|
|
27
|
+
policies: EntityPoliciesSchema.optional(),
|
|
9
28
|
});
|
|
10
29
|
//# sourceMappingURL=entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../src/core/schemas/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,
|
|
1
|
+
{"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../src/core/schemas/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpC,OAAO,EAA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 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
declare const HttpTriggerSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodOptional<z.ZodString>;
|
|
4
|
+
name: z.ZodOptional<z.ZodString>;
|
|
5
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3
6
|
type: z.ZodLiteral<"http">;
|
|
4
|
-
|
|
5
|
-
method: z.ZodEnum<{
|
|
6
|
-
GET: "GET";
|
|
7
|
-
POST: "POST";
|
|
8
|
-
PUT: "PUT";
|
|
9
|
-
PATCH: "PATCH";
|
|
10
|
-
DELETE: "DELETE";
|
|
11
|
-
}>;
|
|
7
|
+
path: z.ZodString;
|
|
12
8
|
}, z.core.$strip>;
|
|
13
9
|
declare const ScheduleTriggerSchema: z.ZodObject<{
|
|
10
|
+
id: z.ZodOptional<z.ZodString>;
|
|
11
|
+
name: z.ZodOptional<z.ZodString>;
|
|
12
|
+
description: z.ZodOptional<z.ZodString>;
|
|
14
13
|
type: z.ZodLiteral<"schedule">;
|
|
15
|
-
|
|
14
|
+
scheduleMode: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
recurring: "recurring";
|
|
16
|
+
once: "once";
|
|
17
|
+
}>>;
|
|
18
|
+
cron: z.ZodString;
|
|
19
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
declare const EventTriggerSchema: z.ZodObject<{
|
|
23
|
+
id: z.ZodOptional<z.ZodString>;
|
|
24
|
+
name: z.ZodOptional<z.ZodString>;
|
|
25
|
+
description: z.ZodOptional<z.ZodString>;
|
|
26
|
+
type: z.ZodLiteral<"event">;
|
|
27
|
+
entity: z.ZodString;
|
|
28
|
+
event: z.ZodString;
|
|
16
29
|
}, z.core.$strip>;
|
|
17
30
|
declare const TriggerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
31
|
+
id: z.ZodOptional<z.ZodString>;
|
|
32
|
+
name: z.ZodOptional<z.ZodString>;
|
|
33
|
+
description: z.ZodOptional<z.ZodString>;
|
|
18
34
|
type: z.ZodLiteral<"http">;
|
|
19
|
-
|
|
20
|
-
method: z.ZodEnum<{
|
|
21
|
-
GET: "GET";
|
|
22
|
-
POST: "POST";
|
|
23
|
-
PUT: "PUT";
|
|
24
|
-
PATCH: "PATCH";
|
|
25
|
-
DELETE: "DELETE";
|
|
26
|
-
}>;
|
|
35
|
+
path: z.ZodString;
|
|
27
36
|
}, z.core.$strip>, z.ZodObject<{
|
|
37
|
+
id: z.ZodOptional<z.ZodString>;
|
|
38
|
+
name: z.ZodOptional<z.ZodString>;
|
|
39
|
+
description: z.ZodOptional<z.ZodString>;
|
|
28
40
|
type: z.ZodLiteral<"schedule">;
|
|
29
|
-
|
|
41
|
+
scheduleMode: z.ZodOptional<z.ZodEnum<{
|
|
42
|
+
recurring: "recurring";
|
|
43
|
+
once: "once";
|
|
44
|
+
}>>;
|
|
45
|
+
cron: z.ZodString;
|
|
46
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
49
|
+
id: z.ZodOptional<z.ZodString>;
|
|
50
|
+
name: z.ZodOptional<z.ZodString>;
|
|
51
|
+
description: z.ZodOptional<z.ZodString>;
|
|
52
|
+
type: z.ZodLiteral<"event">;
|
|
53
|
+
entity: z.ZodString;
|
|
54
|
+
event: z.ZodString;
|
|
30
55
|
}, z.core.$strip>], "type">;
|
|
31
56
|
export declare const FunctionConfigSchema: z.ZodObject<{
|
|
32
|
-
|
|
57
|
+
entry: z.ZodString;
|
|
33
58
|
triggers: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
59
|
+
id: z.ZodOptional<z.ZodString>;
|
|
60
|
+
name: z.ZodOptional<z.ZodString>;
|
|
61
|
+
description: z.ZodOptional<z.ZodString>;
|
|
34
62
|
type: z.ZodLiteral<"http">;
|
|
35
|
-
|
|
36
|
-
method: z.ZodEnum<{
|
|
37
|
-
GET: "GET";
|
|
38
|
-
POST: "POST";
|
|
39
|
-
PUT: "PUT";
|
|
40
|
-
PATCH: "PATCH";
|
|
41
|
-
DELETE: "DELETE";
|
|
42
|
-
}>;
|
|
63
|
+
path: z.ZodString;
|
|
43
64
|
}, z.core.$strip>, z.ZodObject<{
|
|
65
|
+
id: z.ZodOptional<z.ZodString>;
|
|
66
|
+
name: z.ZodOptional<z.ZodString>;
|
|
67
|
+
description: z.ZodOptional<z.ZodString>;
|
|
44
68
|
type: z.ZodLiteral<"schedule">;
|
|
45
|
-
|
|
69
|
+
scheduleMode: z.ZodOptional<z.ZodEnum<{
|
|
70
|
+
recurring: "recurring";
|
|
71
|
+
once: "once";
|
|
72
|
+
}>>;
|
|
73
|
+
cron: z.ZodString;
|
|
74
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
+
id: z.ZodOptional<z.ZodString>;
|
|
78
|
+
name: z.ZodOptional<z.ZodString>;
|
|
79
|
+
description: z.ZodOptional<z.ZodString>;
|
|
80
|
+
type: z.ZodLiteral<"event">;
|
|
81
|
+
entity: z.ZodString;
|
|
82
|
+
event: z.ZodString;
|
|
46
83
|
}, z.core.$strip>], "type">>>;
|
|
47
|
-
}, z.core.$
|
|
84
|
+
}, z.core.$strip>;
|
|
48
85
|
export type HttpTrigger = z.infer<typeof HttpTriggerSchema>;
|
|
49
86
|
export type ScheduleTrigger = z.infer<typeof ScheduleTriggerSchema>;
|
|
87
|
+
export type EventTrigger = z.infer<typeof EventTriggerSchema>;
|
|
50
88
|
export type Trigger = z.infer<typeof TriggerSchema>;
|
|
51
89
|
export type FunctionConfig = z.infer<typeof FunctionConfigSchema>;
|
|
52
90
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function.d.ts","sourceRoot":"","sources":["../../../src/core/schemas/function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"function.d.ts","sourceRoot":"","sources":["../../../src/core/schemas/function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,iBAAiB;;;;;;iBAMrB,CAAC;AAEH,QAAA,MAAM,qBAAqB;;;;;;;;;;;;iBASzB,CAAC;AAEH,QAAA,MAAM,kBAAkB;;;;;;;iBAOtB,CAAC;AAEH,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;2BAIjB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG/B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -1,19 +1,36 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
const HttpTriggerSchema = z.object({
|
|
3
|
+
id: z.string().optional(),
|
|
4
|
+
name: z.string().optional(),
|
|
5
|
+
description: z.string().optional(),
|
|
3
6
|
type: z.literal("http"),
|
|
4
|
-
|
|
5
|
-
method: z.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]),
|
|
7
|
+
path: z.string().min(1, "Path cannot be empty"),
|
|
6
8
|
});
|
|
7
9
|
const ScheduleTriggerSchema = z.object({
|
|
10
|
+
id: z.string().optional(),
|
|
11
|
+
name: z.string().optional(),
|
|
12
|
+
description: z.string().optional(),
|
|
8
13
|
type: z.literal("schedule"),
|
|
9
|
-
|
|
14
|
+
scheduleMode: z.enum(["recurring", "once"]).optional(),
|
|
15
|
+
cron: z.string().min(1, "Cron expression cannot be empty"),
|
|
16
|
+
isActive: z.boolean().optional(),
|
|
17
|
+
timezone: z.string().optional(),
|
|
18
|
+
});
|
|
19
|
+
const EventTriggerSchema = z.object({
|
|
20
|
+
id: z.string().optional(),
|
|
21
|
+
name: z.string().optional(),
|
|
22
|
+
description: z.string().optional(),
|
|
23
|
+
type: z.literal("event"),
|
|
24
|
+
entity: z.string().min(1, "Entity name cannot be empty"),
|
|
25
|
+
event: z.string().min(1, "Event type cannot be empty"),
|
|
10
26
|
});
|
|
11
27
|
const TriggerSchema = z.discriminatedUnion("type", [
|
|
12
28
|
HttpTriggerSchema,
|
|
13
29
|
ScheduleTriggerSchema,
|
|
30
|
+
EventTriggerSchema,
|
|
14
31
|
]);
|
|
15
|
-
export const FunctionConfigSchema = z.
|
|
16
|
-
|
|
32
|
+
export const FunctionConfigSchema = z.object({
|
|
33
|
+
entry: z.string().min(1, "Entry point cannot be empty"),
|
|
17
34
|
triggers: z.array(TriggerSchema).optional(),
|
|
18
35
|
});
|
|
19
36
|
//# sourceMappingURL=function.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function.js","sourceRoot":"","sources":["../../../src/core/schemas/function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACvB,
|
|
1
|
+
{"version":3,"file":"function.js","sourceRoot":"","sources":["../../../src/core/schemas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EAAE,CAAC,QAAQ,EAAE;IAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IACxB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,6BAA6B,CAAC;IACxD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,4BAA4B,CAAC;CACvD,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACjD,iBAAiB;IACjB,qBAAqB;IACrB,kBAAkB;CACnB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,6BAA6B,CAAC;IACvD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./auth.js";
|
|
2
|
+
export * from "./project.js";
|
|
3
|
+
export * from "./config.js";
|
|
4
|
+
export * from "./entity.js";
|
|
5
|
+
export * from "./function.js";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./auth.js";
|
|
2
|
+
export * from "./project.js";
|
|
3
|
+
export * from "./config.js";
|
|
4
|
+
export * from "./entity.js";
|
|
5
|
+
export * from "./function.js";
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/core/schemas/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/core/schemas/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export const ProjectConfigSchema = z.looseObject({
|
|
3
|
-
id: z.string().min(1, "Project ID cannot be empty"),
|
|
4
3
|
name: z.string().min(1, "Project name cannot be empty"),
|
|
5
|
-
createdAt: z.string(),
|
|
6
4
|
entitySrc: z.string().default("./entities"),
|
|
7
5
|
functionSrc: z.string().default("./functions"),
|
|
8
6
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../../src/core/schemas/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC;IAC/C,
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../../src/core/schemas/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC;IAC/C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,8BAA8B,CAAC;IACvD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC;IAC3C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC;CAC/C,CAAC,CAAC"}
|
package/dist/core/utils/fs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function
|
|
1
|
+
export declare function pathExists(path: string): Promise<boolean>;
|
|
2
2
|
export declare function readJsonFile(filePath: string): Promise<unknown>;
|
|
3
3
|
export declare function writeJsonFile(filePath: string, data: unknown): Promise<void>;
|
|
4
4
|
export declare function deleteFile(filePath: string): Promise<void>;
|