@ingenyus/swarm-wasp 0.1.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/LICENSE +23 -0
- package/README.md +34 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/common/filesystem.d.ts +87 -0
- package/dist/common/filesystem.d.ts.map +1 -0
- package/dist/common/index.d.ts +6 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/plugin.d.ts +2 -0
- package/dist/common/plugin.d.ts.map +1 -0
- package/dist/common/prisma.d.ts +80 -0
- package/dist/common/prisma.d.ts.map +1 -0
- package/dist/common/schemas.d.ts +50 -0
- package/dist/common/schemas.d.ts.map +1 -0
- package/dist/common/templates.d.ts +15 -0
- package/dist/common/templates.d.ts.map +1 -0
- package/dist/generators/action/action-generator.d.ts +36 -0
- package/dist/generators/action/action-generator.d.ts.map +1 -0
- package/dist/generators/action/index.d.ts +2 -0
- package/dist/generators/action/index.d.ts.map +1 -0
- package/dist/generators/action/schema.d.ts +27 -0
- package/dist/generators/action/schema.d.ts.map +1 -0
- package/dist/generators/api/api-generator.d.ts +37 -0
- package/dist/generators/api/api-generator.d.ts.map +1 -0
- package/dist/generators/api/index.d.ts +2 -0
- package/dist/generators/api/index.d.ts.map +1 -0
- package/dist/generators/api/schema.d.ts +26 -0
- package/dist/generators/api/schema.d.ts.map +1 -0
- package/dist/generators/api/templates/api.eta +6 -0
- package/dist/generators/api/templates/config/api.eta +11 -0
- package/dist/generators/api-namespace/api-namespace-generator.d.ts +28 -0
- package/dist/generators/api-namespace/api-namespace-generator.d.ts.map +1 -0
- package/dist/generators/api-namespace/index.d.ts +2 -0
- package/dist/generators/api-namespace/index.d.ts.map +1 -0
- package/dist/generators/api-namespace/schema.d.ts +16 -0
- package/dist/generators/api-namespace/schema.d.ts.map +1 -0
- package/dist/generators/api-namespace/templates/config/api-namespace.eta +3 -0
- package/dist/generators/api-namespace/templates/middleware.eta +19 -0
- package/dist/generators/args.types.d.ts +85 -0
- package/dist/generators/args.types.d.ts.map +1 -0
- package/dist/generators/base/entity-generator.base.d.ts +57 -0
- package/dist/generators/base/entity-generator.base.d.ts.map +1 -0
- package/dist/generators/base/index.d.ts +3 -0
- package/dist/generators/base/index.d.ts.map +1 -0
- package/dist/generators/base/operation-generator.base.d.ts +60 -0
- package/dist/generators/base/operation-generator.base.d.ts.map +1 -0
- package/dist/generators/base/wasp-generator.base.d.ts +47 -0
- package/dist/generators/base/wasp-generator.base.d.ts.map +1 -0
- package/dist/generators/config/config-generator.d.ts +17 -0
- package/dist/generators/config/config-generator.d.ts.map +1 -0
- package/dist/generators/config/index.d.ts +3 -0
- package/dist/generators/config/index.d.ts.map +1 -0
- package/dist/generators/config/templates/api-namespace.eta +3 -0
- package/dist/generators/config/templates/api.eta +11 -0
- package/dist/generators/config/templates/crud.eta +4 -0
- package/dist/generators/config/templates/job.eta +9 -0
- package/dist/generators/config/templates/operation.eta +6 -0
- package/dist/generators/config/templates/route.eta +4 -0
- package/dist/generators/config/wasp-config-generator.d.ts +92 -0
- package/dist/generators/config/wasp-config-generator.d.ts.map +1 -0
- package/dist/generators/crud/crud-generator.d.ts +40 -0
- package/dist/generators/crud/crud-generator.d.ts.map +1 -0
- package/dist/generators/crud/index.d.ts +2 -0
- package/dist/generators/crud/index.d.ts.map +1 -0
- package/dist/generators/crud/schema.d.ts +22 -0
- package/dist/generators/crud/schema.d.ts.map +1 -0
- package/dist/generators/crud/templates/config/crud.eta +4 -0
- package/dist/generators/crud/templates/crud.eta +2 -0
- package/dist/generators/feature-directory/feature-directory-generator.d.ts +18 -0
- package/dist/generators/feature-directory/feature-directory-generator.d.ts.map +1 -0
- package/dist/generators/feature-directory/index.d.ts +2 -0
- package/dist/generators/feature-directory/index.d.ts.map +1 -0
- package/dist/generators/feature-directory/schema.d.ts +8 -0
- package/dist/generators/feature-directory/schema.d.ts.map +1 -0
- package/dist/generators/feature-directory/templates/feature.wasp.eta +22 -0
- package/dist/generators/index.d.ts +10 -0
- package/dist/generators/index.d.ts.map +1 -0
- package/dist/generators/job/index.d.ts +2 -0
- package/dist/generators/job/index.d.ts.map +1 -0
- package/dist/generators/job/job-generator.d.ts +35 -0
- package/dist/generators/job/job-generator.d.ts.map +1 -0
- package/dist/generators/job/schema.d.ts +22 -0
- package/dist/generators/job/schema.d.ts.map +1 -0
- package/dist/generators/job/templates/config/job.eta +9 -0
- package/dist/generators/job/templates/job.eta +5 -0
- package/dist/generators/operation/templates/config/operation.eta +6 -0
- package/dist/generators/operation/templates/create.eta +17 -0
- package/dist/generators/operation/templates/delete.eta +21 -0
- package/dist/generators/operation/templates/get.eta +19 -0
- package/dist/generators/operation/templates/getAll.eta +13 -0
- package/dist/generators/operation/templates/getFiltered.eta +17 -0
- package/dist/generators/operation/templates/update.eta +26 -0
- package/dist/generators/query/index.d.ts +2 -0
- package/dist/generators/query/index.d.ts.map +1 -0
- package/dist/generators/query/query-generator.d.ts +36 -0
- package/dist/generators/query/query-generator.d.ts.map +1 -0
- package/dist/generators/query/schema.d.ts +27 -0
- package/dist/generators/query/schema.d.ts.map +1 -0
- package/dist/generators/route/index.d.ts +2 -0
- package/dist/generators/route/index.d.ts.map +1 -0
- package/dist/generators/route/route-generator.d.ts +32 -0
- package/dist/generators/route/route-generator.d.ts.map +1 -0
- package/dist/generators/route/schema.d.ts +19 -0
- package/dist/generators/route/schema.d.ts.map +1 -0
- package/dist/generators/route/templates/config/route.eta +4 -0
- package/dist/generators/route/templates/page.eta +10 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2718 -0
- package/dist/plugin.d.ts +6 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/types/constants.d.ts +102 -0
- package/dist/types/constants.d.ts.map +1 -0
- package/dist/types/constants.js +63 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +63 -0
- package/dist/types/prisma.types.d.ts +23 -0
- package/dist/types/prisma.types.d.ts.map +1 -0
- package/dist/types/prisma.types.js +0 -0
- package/dist/wasp-config/app.d.ts +146 -0
- package/dist/wasp-config/app.d.ts.map +1 -0
- package/dist/wasp-config/index.d.ts +3 -0
- package/dist/wasp-config/index.d.ts.map +1 -0
- package/dist/wasp-config/stubs/index.d.ts +180 -0
- package/dist/wasp-config/stubs/index.d.ts.map +1 -0
- package/package.json +92 -0
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SwarmPluginInterface } from '@ingenyus/swarm';
|
|
2
|
+
export declare function createWaspPlugin(): SwarmPluginInterface;
|
|
3
|
+
declare function getWaspPlugin(): SwarmPluginInterface;
|
|
4
|
+
export declare const wasp: typeof getWaspPlugin;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAcvD,wBAAgB,gBAAgB,IAAI,oBAAoB,CAiBvD;AAKD,iBAAS,aAAa,IAAI,oBAAoB,CAM7C;AAGD,eAAO,MAAM,IAAI,sBAAgB,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { ApiFlags, ApiNamespaceFlags, CrudFlags, JobFlags, OperationFlags, RouteFlags } from '../generators/args.types.js';
|
|
2
|
+
export declare const PLUGIN_NAME: "wasp";
|
|
3
|
+
/**
|
|
4
|
+
* List of valid operation types.
|
|
5
|
+
*/
|
|
6
|
+
export declare const OPERATION_TYPES: readonly ["query", "action"];
|
|
7
|
+
/**
|
|
8
|
+
* Type for valid operation types.
|
|
9
|
+
*/
|
|
10
|
+
export type OperationType = (typeof OPERATION_TYPES)[number];
|
|
11
|
+
/**
|
|
12
|
+
* List of valid HTTP methods.
|
|
13
|
+
*/
|
|
14
|
+
export declare const HTTP_METHODS: readonly ["ALL", "GET", "POST", "PUT", "DELETE"];
|
|
15
|
+
/**
|
|
16
|
+
* Type for valid HTTP method values.
|
|
17
|
+
*/
|
|
18
|
+
export type HttpMethod = (typeof HTTP_METHODS)[number];
|
|
19
|
+
/**
|
|
20
|
+
* Map of valid operations.
|
|
21
|
+
*/
|
|
22
|
+
export declare const OPERATIONS: {
|
|
23
|
+
readonly CREATE: "create";
|
|
24
|
+
readonly UPDATE: "update";
|
|
25
|
+
readonly DELETE: "delete";
|
|
26
|
+
readonly GET: "get";
|
|
27
|
+
readonly GETALL: "getAll";
|
|
28
|
+
readonly GETFILTERED: "getFiltered";
|
|
29
|
+
};
|
|
30
|
+
export declare const CRUD_OPERATIONS: {
|
|
31
|
+
readonly CREATE: "create";
|
|
32
|
+
readonly GET: "get";
|
|
33
|
+
readonly GETALL: "getAll";
|
|
34
|
+
readonly UPDATE: "update";
|
|
35
|
+
readonly DELETE: "delete";
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Type for valid CRUD operation values.
|
|
39
|
+
*/
|
|
40
|
+
export type CrudOperation = (typeof CRUD_OPERATIONS)[keyof typeof CRUD_OPERATIONS];
|
|
41
|
+
/**
|
|
42
|
+
* Map of valid action operations.
|
|
43
|
+
*/
|
|
44
|
+
export declare const ACTION_OPERATIONS: {
|
|
45
|
+
readonly CREATE: "create";
|
|
46
|
+
readonly UPDATE: "update";
|
|
47
|
+
readonly DELETE: "delete";
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Type for valid action operation values.
|
|
51
|
+
*/
|
|
52
|
+
export type ActionOperation = (typeof ACTION_OPERATIONS)[keyof typeof ACTION_OPERATIONS];
|
|
53
|
+
/**
|
|
54
|
+
* Map of valid query operations.
|
|
55
|
+
*/
|
|
56
|
+
export declare const QUERY_OPERATIONS: {
|
|
57
|
+
readonly GET: "get";
|
|
58
|
+
readonly GETALL: "getAll";
|
|
59
|
+
readonly GETFILTERED: "getFiltered";
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Type for valid query operation values.
|
|
63
|
+
*/
|
|
64
|
+
export type QueryOperation = (typeof QUERY_OPERATIONS)[keyof typeof QUERY_OPERATIONS];
|
|
65
|
+
/**
|
|
66
|
+
* Maps file types to their directories.
|
|
67
|
+
*/
|
|
68
|
+
export declare const TYPE_DIRECTORIES: Record<string, string>;
|
|
69
|
+
/**
|
|
70
|
+
* List of valid config types.
|
|
71
|
+
*/
|
|
72
|
+
export declare const CONFIG_TYPES: {
|
|
73
|
+
readonly ROUTE: "Route";
|
|
74
|
+
readonly QUERY: "Query";
|
|
75
|
+
readonly ACTION: "Action";
|
|
76
|
+
readonly JOB: "Job";
|
|
77
|
+
readonly API: "Api";
|
|
78
|
+
readonly API_NAMESPACE: "ApiNamespace";
|
|
79
|
+
readonly CRUD: "Crud";
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Type for valid config type values.
|
|
83
|
+
*/
|
|
84
|
+
export type ConfigType = (typeof CONFIG_TYPES)[keyof typeof CONFIG_TYPES];
|
|
85
|
+
/**
|
|
86
|
+
* Maps config types to their corresponding flags types
|
|
87
|
+
*/
|
|
88
|
+
interface ConfigToFlagsMap {
|
|
89
|
+
API: ApiFlags;
|
|
90
|
+
JOB: JobFlags;
|
|
91
|
+
ROUTE: RouteFlags;
|
|
92
|
+
QUERY: OperationFlags;
|
|
93
|
+
ACTION: OperationFlags;
|
|
94
|
+
CRUD: CrudFlags;
|
|
95
|
+
API_NAMESPACE: ApiNamespaceFlags;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Type helper to get flags type from config type
|
|
99
|
+
*/
|
|
100
|
+
export type GetFlagsType<T extends ConfigType> = T extends keyof ConfigToFlagsMap ? ConfigToFlagsMap[T] : never;
|
|
101
|
+
export {};
|
|
102
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../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AAC;AAC1E;;GAEG;AACH,UAAU,gBAAgB;IACxB,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,SAAS,CAAC;IAChB,aAAa,EAAE,iBAAiB,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,UAAU,IAC3C,CAAC,SAAS,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// src/types/constants.ts
|
|
2
|
+
var PLUGIN_NAME = "wasp";
|
|
3
|
+
var OPERATION_TYPES = ["query", "action"];
|
|
4
|
+
var HTTP_METHODS = ["ALL", "GET", "POST", "PUT", "DELETE"];
|
|
5
|
+
var OPERATIONS = {
|
|
6
|
+
CREATE: "create",
|
|
7
|
+
UPDATE: "update",
|
|
8
|
+
DELETE: "delete",
|
|
9
|
+
GET: "get",
|
|
10
|
+
GETALL: "getAll",
|
|
11
|
+
GETFILTERED: "getFiltered"
|
|
12
|
+
};
|
|
13
|
+
var CRUD_OPERATIONS = {
|
|
14
|
+
CREATE: "create",
|
|
15
|
+
GET: "get",
|
|
16
|
+
GETALL: "getAll",
|
|
17
|
+
UPDATE: "update",
|
|
18
|
+
DELETE: "delete"
|
|
19
|
+
};
|
|
20
|
+
var ACTION_OPERATIONS = {
|
|
21
|
+
CREATE: "create",
|
|
22
|
+
UPDATE: "update",
|
|
23
|
+
DELETE: "delete"
|
|
24
|
+
};
|
|
25
|
+
var QUERY_OPERATIONS = {
|
|
26
|
+
GET: "get",
|
|
27
|
+
GETALL: "getAll",
|
|
28
|
+
GETFILTERED: "getFiltered"
|
|
29
|
+
};
|
|
30
|
+
var TYPE_DIRECTORIES = {
|
|
31
|
+
component: "client/components",
|
|
32
|
+
hook: "client/hooks",
|
|
33
|
+
layout: "client/layouts",
|
|
34
|
+
page: "client/pages",
|
|
35
|
+
util: "client/utils",
|
|
36
|
+
action: "server/actions",
|
|
37
|
+
query: "server/queries",
|
|
38
|
+
middleware: "server/middleware",
|
|
39
|
+
job: "server/jobs",
|
|
40
|
+
api: "server/apis",
|
|
41
|
+
crud: "server/cruds",
|
|
42
|
+
type: "types"
|
|
43
|
+
};
|
|
44
|
+
var CONFIG_TYPES = {
|
|
45
|
+
ROUTE: "Route",
|
|
46
|
+
QUERY: "Query",
|
|
47
|
+
ACTION: "Action",
|
|
48
|
+
JOB: "Job",
|
|
49
|
+
API: "Api",
|
|
50
|
+
API_NAMESPACE: "ApiNamespace",
|
|
51
|
+
CRUD: "Crud"
|
|
52
|
+
};
|
|
53
|
+
export {
|
|
54
|
+
ACTION_OPERATIONS,
|
|
55
|
+
CONFIG_TYPES,
|
|
56
|
+
CRUD_OPERATIONS,
|
|
57
|
+
HTTP_METHODS,
|
|
58
|
+
OPERATIONS,
|
|
59
|
+
OPERATION_TYPES,
|
|
60
|
+
PLUGIN_NAME,
|
|
61
|
+
QUERY_OPERATIONS,
|
|
62
|
+
TYPE_DIRECTORIES
|
|
63
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ACTION_OPERATIONS, CONFIG_TYPES, CRUD_OPERATIONS, HTTP_METHODS, OPERATION_TYPES, OPERATIONS, PLUGIN_NAME, QUERY_OPERATIONS, TYPE_DIRECTORIES, } from './constants';
|
|
2
|
+
export type { ActionOperation, ConfigType, CrudOperation, GetFlagsType, HttpMethod, OperationType, QueryOperation, } from './constants';
|
|
3
|
+
export type { EntityMetadata } from './prisma.types';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,eAAe,EACf,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,eAAe,EACf,UAAU,EACV,aAAa,EACb,YAAY,EACZ,UAAU,EACV,aAAa,EACb,cAAc,GACf,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// src/types/constants.ts
|
|
2
|
+
var PLUGIN_NAME = "wasp";
|
|
3
|
+
var OPERATION_TYPES = ["query", "action"];
|
|
4
|
+
var HTTP_METHODS = ["ALL", "GET", "POST", "PUT", "DELETE"];
|
|
5
|
+
var OPERATIONS = {
|
|
6
|
+
CREATE: "create",
|
|
7
|
+
UPDATE: "update",
|
|
8
|
+
DELETE: "delete",
|
|
9
|
+
GET: "get",
|
|
10
|
+
GETALL: "getAll",
|
|
11
|
+
GETFILTERED: "getFiltered"
|
|
12
|
+
};
|
|
13
|
+
var CRUD_OPERATIONS = {
|
|
14
|
+
CREATE: "create",
|
|
15
|
+
GET: "get",
|
|
16
|
+
GETALL: "getAll",
|
|
17
|
+
UPDATE: "update",
|
|
18
|
+
DELETE: "delete"
|
|
19
|
+
};
|
|
20
|
+
var ACTION_OPERATIONS = {
|
|
21
|
+
CREATE: "create",
|
|
22
|
+
UPDATE: "update",
|
|
23
|
+
DELETE: "delete"
|
|
24
|
+
};
|
|
25
|
+
var QUERY_OPERATIONS = {
|
|
26
|
+
GET: "get",
|
|
27
|
+
GETALL: "getAll",
|
|
28
|
+
GETFILTERED: "getFiltered"
|
|
29
|
+
};
|
|
30
|
+
var TYPE_DIRECTORIES = {
|
|
31
|
+
component: "client/components",
|
|
32
|
+
hook: "client/hooks",
|
|
33
|
+
layout: "client/layouts",
|
|
34
|
+
page: "client/pages",
|
|
35
|
+
util: "client/utils",
|
|
36
|
+
action: "server/actions",
|
|
37
|
+
query: "server/queries",
|
|
38
|
+
middleware: "server/middleware",
|
|
39
|
+
job: "server/jobs",
|
|
40
|
+
api: "server/apis",
|
|
41
|
+
crud: "server/cruds",
|
|
42
|
+
type: "types"
|
|
43
|
+
};
|
|
44
|
+
var CONFIG_TYPES = {
|
|
45
|
+
ROUTE: "Route",
|
|
46
|
+
QUERY: "Query",
|
|
47
|
+
ACTION: "Action",
|
|
48
|
+
JOB: "Job",
|
|
49
|
+
API: "Api",
|
|
50
|
+
API_NAMESPACE: "ApiNamespace",
|
|
51
|
+
CRUD: "Crud"
|
|
52
|
+
};
|
|
53
|
+
export {
|
|
54
|
+
ACTION_OPERATIONS,
|
|
55
|
+
CONFIG_TYPES,
|
|
56
|
+
CRUD_OPERATIONS,
|
|
57
|
+
HTTP_METHODS,
|
|
58
|
+
OPERATIONS,
|
|
59
|
+
OPERATION_TYPES,
|
|
60
|
+
PLUGIN_NAME,
|
|
61
|
+
QUERY_OPERATIONS,
|
|
62
|
+
TYPE_DIRECTORIES
|
|
63
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a field in a Prisma model.
|
|
3
|
+
*/
|
|
4
|
+
interface EntityField {
|
|
5
|
+
name: string;
|
|
6
|
+
type: string;
|
|
7
|
+
tsType: string;
|
|
8
|
+
isRequired: boolean;
|
|
9
|
+
isId: boolean;
|
|
10
|
+
isUnique: boolean;
|
|
11
|
+
hasDefaultValue: boolean;
|
|
12
|
+
isGenerated: boolean;
|
|
13
|
+
isUpdatedAt: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Represents metadata for a Prisma entity/model.
|
|
17
|
+
*/
|
|
18
|
+
export interface EntityMetadata {
|
|
19
|
+
name: string;
|
|
20
|
+
fields: Readonly<EntityField[]>;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=prisma.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prisma.types.d.ts","sourceRoot":"","sources":["../../src/types/prisma.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;CACjC"}
|
|
File without changes
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { ActionConfig, ApiConfig, ApiNamespaceConfig, AppConfig, AuthConfig, ClientConfig, CrudConfig, DbConfig, EmailSenderConfig, JobConfig, QueryConfig, RouteConfig, App as WaspApp } from 'wasp-config';
|
|
2
|
+
interface RouteOptions {
|
|
3
|
+
path: string;
|
|
4
|
+
auth?: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface ApiOptions {
|
|
7
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
8
|
+
route: string;
|
|
9
|
+
customMiddleware?: boolean;
|
|
10
|
+
entities?: string[];
|
|
11
|
+
auth?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface CrudOperationOptions {
|
|
14
|
+
entities?: string[];
|
|
15
|
+
isPublic?: boolean;
|
|
16
|
+
override?: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface CrudOptions {
|
|
19
|
+
entity: string;
|
|
20
|
+
getAll?: CrudOperationOptions;
|
|
21
|
+
get?: CrudOperationOptions;
|
|
22
|
+
create?: CrudOperationOptions;
|
|
23
|
+
update?: CrudOperationOptions;
|
|
24
|
+
delete?: CrudOperationOptions;
|
|
25
|
+
}
|
|
26
|
+
interface OperationOptions {
|
|
27
|
+
entities?: string[];
|
|
28
|
+
auth?: boolean;
|
|
29
|
+
}
|
|
30
|
+
interface JobOptions {
|
|
31
|
+
entities?: string[];
|
|
32
|
+
cron: string;
|
|
33
|
+
args?: Record<string, unknown>;
|
|
34
|
+
}
|
|
35
|
+
interface ApiNamespaceOptions {
|
|
36
|
+
path: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Enhanced Wasp App class with Swarm-specific functionality
|
|
40
|
+
*
|
|
41
|
+
* This class extends the default Wasp App class with:
|
|
42
|
+
* - Chainable helper methods for simplified configuration
|
|
43
|
+
* - Dynamic feature-based configuration loading
|
|
44
|
+
* - Enhanced error handling and validation
|
|
45
|
+
*/
|
|
46
|
+
export declare class App extends WaspApp {
|
|
47
|
+
constructor(name: string, config: AppConfig);
|
|
48
|
+
/**
|
|
49
|
+
* Static factory method that creates and initializes Swarm with configuration
|
|
50
|
+
* dynamically loaded from feature directories
|
|
51
|
+
*
|
|
52
|
+
* @param name The name of the application
|
|
53
|
+
* @param config The base configuration for the application
|
|
54
|
+
* @returns An initialized Swarm instance
|
|
55
|
+
*/
|
|
56
|
+
static create(name: string, config: AppConfig): Promise<App>;
|
|
57
|
+
auth(authConfig: AuthConfig): this;
|
|
58
|
+
client(clientConfig: ClientConfig): this;
|
|
59
|
+
db(dbConfig: DbConfig): this;
|
|
60
|
+
emailSender(emailSenderConfig: EmailSenderConfig): this;
|
|
61
|
+
job(name: string, jobConfig: JobConfig): this;
|
|
62
|
+
query(name: string, queryConfig: QueryConfig): this;
|
|
63
|
+
route(name: string, routeConfig: RouteConfig): this;
|
|
64
|
+
api(name: string, apiConfig: ApiConfig): this;
|
|
65
|
+
apiNamespace(name: string, apiNamespaceConfig: ApiNamespaceConfig): this;
|
|
66
|
+
crud(name: string, crudConfig: CrudConfig): this;
|
|
67
|
+
action(name: string, actionConfig: ActionConfig): this;
|
|
68
|
+
/**
|
|
69
|
+
* Helper method to add routes with simplified parameters
|
|
70
|
+
* @param featureName The name of the feature
|
|
71
|
+
* @param name Route name, e.g. "DashboardRoute"
|
|
72
|
+
* @param options Route configuration options
|
|
73
|
+
*/
|
|
74
|
+
addRoute(featureName: string, name: string, options: RouteOptions): this;
|
|
75
|
+
/**
|
|
76
|
+
* Helper method to add API endpoints with simplified parameters
|
|
77
|
+
* @param featureName The name of the feature
|
|
78
|
+
* @param name API endpoint name, e.g. "getTasksApi"
|
|
79
|
+
* @param options API configuration options
|
|
80
|
+
*/
|
|
81
|
+
addApi(featureName: string, name: string, options: ApiOptions): this;
|
|
82
|
+
/**
|
|
83
|
+
* Helper method to add CRUD operations with simplified parameters
|
|
84
|
+
* @param featureName The name of the feature
|
|
85
|
+
* @param name The CRUD name
|
|
86
|
+
* @param options CRUD configuration options
|
|
87
|
+
*/
|
|
88
|
+
addCrud(featureName: string, name: string, options: CrudOptions): this;
|
|
89
|
+
/**
|
|
90
|
+
* Helper method to add actions with simplified parameters
|
|
91
|
+
* @param featureName The name of the feature
|
|
92
|
+
* @param name The action name
|
|
93
|
+
* @param options Action configuration options
|
|
94
|
+
*/
|
|
95
|
+
addAction(featureName: string, name: string, options: OperationOptions): this;
|
|
96
|
+
/**
|
|
97
|
+
* Helper method to add queries with simplified parameters
|
|
98
|
+
* @param featureName The name of the feature
|
|
99
|
+
* @param name The query name
|
|
100
|
+
* @param options Query configuration options
|
|
101
|
+
*/
|
|
102
|
+
addQuery(featureName: string, name: string, options: OperationOptions): this;
|
|
103
|
+
/**
|
|
104
|
+
* Helper method to add background jobs with simplified parameters
|
|
105
|
+
* @param featureName The name of the feature
|
|
106
|
+
* @param name Job name
|
|
107
|
+
* @param options Job configuration options
|
|
108
|
+
*/
|
|
109
|
+
addJob(featureName: string, name: string, options: JobOptions): this;
|
|
110
|
+
/**
|
|
111
|
+
* Helper method to add API namespaces with simplified parameters
|
|
112
|
+
* @param featureName The name of the feature
|
|
113
|
+
* @param name Namespace name
|
|
114
|
+
* @param options API namespace configuration options
|
|
115
|
+
*/
|
|
116
|
+
addApiNamespace(featureName: string, name: string, options: ApiNamespaceOptions): this;
|
|
117
|
+
/**
|
|
118
|
+
* Calculates the import path for a feature component
|
|
119
|
+
* @param featureName The name of the feature
|
|
120
|
+
* @param type The type of component (client, server, etc.)
|
|
121
|
+
* @param subPath The sub-path within the feature directory
|
|
122
|
+
* @param fileName The name of the file (optional, defaults to featureName)
|
|
123
|
+
* @returns The calculated import path
|
|
124
|
+
*/
|
|
125
|
+
private getFeatureImportPath;
|
|
126
|
+
/**
|
|
127
|
+
* Converts a singular word to its plural form
|
|
128
|
+
* @param word The singular word to pluralize
|
|
129
|
+
* @returns The plural form of the word
|
|
130
|
+
*/
|
|
131
|
+
private getPlural;
|
|
132
|
+
/**
|
|
133
|
+
* Configures all feature modules by scanning the features directory
|
|
134
|
+
*/
|
|
135
|
+
configureFeatures(): Promise<this>;
|
|
136
|
+
/**
|
|
137
|
+
* Helper method to get the configuration for an action or query
|
|
138
|
+
* @param name The operation name
|
|
139
|
+
* @param importPath Import path (excluding `@src/` prefix), e.g. "features/dashboard/server/queries/getTasks"
|
|
140
|
+
* @param entities Comma-separated list of entities (optional, defaults to datatype)
|
|
141
|
+
* @param auth Require authentication (optional)
|
|
142
|
+
*/
|
|
143
|
+
private getOperationConfig;
|
|
144
|
+
}
|
|
145
|
+
export {};
|
|
146
|
+
//# sourceMappingURL=app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/wasp-config/app.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,WAAW,EACX,GAAG,IAAI,OAAO,EACf,MAAM,aAAa,CAAC;AAGrB,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CA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Z,OAAO,EAAE,gBAAgB,GACxB,IAAI;IAmBP;;;;;OAKG;IACI,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI;IA4B3E;;;;;OAKG;IACI,eAAe,CACpB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,mBAAmB,GAC3B,IAAI;IAmBP;;;;;;;OAOG;IACH,OAAO,CAAC,oBAAoB;IAW5B;;;;OAIG;IACH,OAAO,CAAC,SAAS;IAgBjB;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAoDxC;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;CAe3B"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { App } from './app.js';
|
|
2
|
+
export type { ActionConfig, ApiConfig, ApiNamespaceConfig, AppConfig, AuthConfig, ClientConfig, CrudConfig, CrudOperationOptions, DbConfig, EmailSenderConfig, JobConfig, QueryConfig, RouteConfig, } from 'wasp-config';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wasp-config/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAG/B,YAAY,EACV,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,WAAW,GACZ,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
export interface ActionConfig {
|
|
2
|
+
fn: {
|
|
3
|
+
import: string;
|
|
4
|
+
from: string;
|
|
5
|
+
};
|
|
6
|
+
entities?: string[];
|
|
7
|
+
auth: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface ApiConfig {
|
|
10
|
+
fn: {
|
|
11
|
+
import: string;
|
|
12
|
+
from: string;
|
|
13
|
+
};
|
|
14
|
+
middlewareConfigFn?: ExtImport;
|
|
15
|
+
entities?: string[];
|
|
16
|
+
httpRoute: {
|
|
17
|
+
method: string;
|
|
18
|
+
route: string;
|
|
19
|
+
};
|
|
20
|
+
auth: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface ApiNamespaceConfig {
|
|
23
|
+
path: string;
|
|
24
|
+
middlewareConfigFn: {
|
|
25
|
+
import: string;
|
|
26
|
+
from: string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
interface Wasp {
|
|
30
|
+
version: string;
|
|
31
|
+
}
|
|
32
|
+
export interface AppConfig {
|
|
33
|
+
title: string;
|
|
34
|
+
wasp: Wasp;
|
|
35
|
+
head?: string[];
|
|
36
|
+
}
|
|
37
|
+
interface AuthMethods {
|
|
38
|
+
usernameAndPassword?: UsernameAndPasswordConfig;
|
|
39
|
+
discord?: ExternalAuthConfig;
|
|
40
|
+
google?: ExternalAuthConfig;
|
|
41
|
+
gitHub?: ExternalAuthConfig;
|
|
42
|
+
keycloak?: ExternalAuthConfig;
|
|
43
|
+
email?: EmailAuthConfig;
|
|
44
|
+
}
|
|
45
|
+
export interface AuthConfig {
|
|
46
|
+
userEntity: string;
|
|
47
|
+
methods: AuthMethods;
|
|
48
|
+
externalAuthEntity?: string;
|
|
49
|
+
onAuthFailedRedirectTo: string;
|
|
50
|
+
onAuthSucceededRedirectTo?: string;
|
|
51
|
+
onBeforeSignup?: ExtImport;
|
|
52
|
+
onAfterSignup?: ExtImport;
|
|
53
|
+
onAfterEmailVerified?: ExtImport;
|
|
54
|
+
onBeforeOAuthRedirect?: ExtImport;
|
|
55
|
+
onBeforeLogin?: ExtImport;
|
|
56
|
+
onAfterLogin?: ExtImport;
|
|
57
|
+
}
|
|
58
|
+
interface UsernameAndPasswordConfig {
|
|
59
|
+
userSignupFields?: ExtImport;
|
|
60
|
+
}
|
|
61
|
+
interface EmailAuthConfig {
|
|
62
|
+
userSignupFields?: ExtImport;
|
|
63
|
+
fromField: EmailFromField;
|
|
64
|
+
emailVerification: EmailVerificationConfig;
|
|
65
|
+
passwordReset: PasswordResetConfig;
|
|
66
|
+
}
|
|
67
|
+
interface EmailVerificationConfig {
|
|
68
|
+
getEmailContentFn?: ExtImport;
|
|
69
|
+
clientRoute: string;
|
|
70
|
+
}
|
|
71
|
+
interface PasswordResetConfig {
|
|
72
|
+
getEmailContentFn?: ExtImport;
|
|
73
|
+
clientRoute: string;
|
|
74
|
+
}
|
|
75
|
+
interface ExternalAuthConfig {
|
|
76
|
+
configFn?: ExtImport;
|
|
77
|
+
userSignupFields?: ExtImport;
|
|
78
|
+
}
|
|
79
|
+
type ExtImport = {
|
|
80
|
+
import: string;
|
|
81
|
+
from: AppSpecExtImport['path'];
|
|
82
|
+
} | {
|
|
83
|
+
importDefault: string;
|
|
84
|
+
from: AppSpecExtImport['path'];
|
|
85
|
+
};
|
|
86
|
+
interface EmailFromField {
|
|
87
|
+
name?: string;
|
|
88
|
+
email: string;
|
|
89
|
+
}
|
|
90
|
+
type ExtImportKind = 'named' | 'default';
|
|
91
|
+
interface AppSpecExtImport {
|
|
92
|
+
kind: ExtImportKind;
|
|
93
|
+
name: string;
|
|
94
|
+
path: `@src/${string}`;
|
|
95
|
+
}
|
|
96
|
+
export interface ClientConfig {
|
|
97
|
+
rootComponent: string;
|
|
98
|
+
}
|
|
99
|
+
export interface CrudConfig {
|
|
100
|
+
entity: string;
|
|
101
|
+
operations: {
|
|
102
|
+
getAll?: CrudOperationOptions;
|
|
103
|
+
get?: CrudOperationOptions;
|
|
104
|
+
create?: CrudOperationOptions;
|
|
105
|
+
update?: CrudOperationOptions;
|
|
106
|
+
delete?: CrudOperationOptions;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
export interface CrudOperationOptions {
|
|
110
|
+
entities?: string[];
|
|
111
|
+
}
|
|
112
|
+
export interface DbConfig {
|
|
113
|
+
system: string;
|
|
114
|
+
}
|
|
115
|
+
export interface EmailSenderConfig {
|
|
116
|
+
[key: string]: unknown;
|
|
117
|
+
}
|
|
118
|
+
export interface JobConfig {
|
|
119
|
+
executor: string;
|
|
120
|
+
perform: {
|
|
121
|
+
fn: {
|
|
122
|
+
import: string;
|
|
123
|
+
from: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
entities?: string[];
|
|
127
|
+
schedule?: {
|
|
128
|
+
cron: string;
|
|
129
|
+
args: Record<string, unknown>;
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
export interface QueryConfig {
|
|
133
|
+
fn: {
|
|
134
|
+
import: string;
|
|
135
|
+
from: string;
|
|
136
|
+
};
|
|
137
|
+
entities?: string[];
|
|
138
|
+
auth: boolean;
|
|
139
|
+
}
|
|
140
|
+
export interface RouteConfig {
|
|
141
|
+
path: string;
|
|
142
|
+
to: {
|
|
143
|
+
authRequired: boolean;
|
|
144
|
+
component: {
|
|
145
|
+
import: string;
|
|
146
|
+
from: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
export declare class App {
|
|
151
|
+
name: string;
|
|
152
|
+
config: AppConfig;
|
|
153
|
+
constructor(name: string, config: AppConfig);
|
|
154
|
+
auth(_authConfig: AuthConfig): this;
|
|
155
|
+
client(_clientConfig: ClientConfig): this;
|
|
156
|
+
db(_dbConfig: DbConfig): this;
|
|
157
|
+
emailSender(_emailSenderConfig: EmailSenderConfig): this;
|
|
158
|
+
job(_name: string, _jobConfig: JobConfig): this;
|
|
159
|
+
query(_name: string, _queryConfig: QueryConfig): this;
|
|
160
|
+
route(_name: string, _routeConfig: RouteConfig): this;
|
|
161
|
+
api(_name: string, _apiConfig: ApiConfig): this;
|
|
162
|
+
apiNamespace(_name: string, _apiNamespaceConfig: ApiNamespaceConfig): this;
|
|
163
|
+
crud(_name: string, _crudConfig: CrudConfig): this;
|
|
164
|
+
action(_name: string, _actionConfig: ActionConfig): this;
|
|
165
|
+
page(_componentName: string, options: {
|
|
166
|
+
authRequired: boolean;
|
|
167
|
+
component: {
|
|
168
|
+
import: string;
|
|
169
|
+
from: string;
|
|
170
|
+
};
|
|
171
|
+
}): {
|
|
172
|
+
authRequired: boolean;
|
|
173
|
+
component: {
|
|
174
|
+
import: string;
|
|
175
|
+
from: string;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
export {};
|
|
180
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/wasp-config/stubs/index.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE;QACF,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE;QACF,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,UAAU,IAAI;IACZ,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IAC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