@anu8151/adonisjs-blueprint 0.3.2 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/base_generator-DnmbQ4rq.d.ts +3009 -0
- package/build/event_generator-oIEH7_oz.d.ts +8 -0
- package/build/job_generator-HTTatdkn.d.ts +8 -0
- package/build/mail_generator-DDzgqB7F.d.ts +8 -0
- package/build/notification_generator-Ckyi9uwv.d.ts +8 -0
- package/build/service_generator-JwNPzTLC.d.ts +8 -0
- package/build/src/commands/build.d.ts +1 -2
- package/build/src/commands/build.js +1 -1
- package/build/src/commands/main.d.ts +3 -1
- package/build/types-Cyzao-RJ.d.ts +53 -0
- package/package.json +13 -5
- package/build/src/commands/main.js +0 -10
- /package/build/{init-JJYCiAqQ.js → src/commands/init.js} +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as BaseGenerator } from "./base_generator-DnmbQ4rq.js";
|
|
2
|
+
|
|
3
|
+
//#region src/generators/event_generator.d.ts
|
|
4
|
+
declare class EventGenerator extends BaseGenerator {
|
|
5
|
+
generate(name: string, _definition?: any): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { EventGenerator as t };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as BaseGenerator } from "./base_generator-DnmbQ4rq.js";
|
|
2
|
+
|
|
3
|
+
//#region src/generators/job_generator.d.ts
|
|
4
|
+
declare class JobGenerator extends BaseGenerator {
|
|
5
|
+
generate(name: string, _definition?: any): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { JobGenerator as t };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as BaseGenerator } from "./base_generator-DnmbQ4rq.js";
|
|
2
|
+
|
|
3
|
+
//#region src/generators/mail_generator.d.ts
|
|
4
|
+
declare class MailGenerator extends BaseGenerator {
|
|
5
|
+
generate(name: string, _definition?: any): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { MailGenerator as t };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as BaseGenerator } from "./base_generator-DnmbQ4rq.js";
|
|
2
|
+
|
|
3
|
+
//#region src/generators/notification_generator.d.ts
|
|
4
|
+
declare class NotificationGenerator extends BaseGenerator {
|
|
5
|
+
generate(name: string, _definition?: any): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { NotificationGenerator as t };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as BaseGenerator } from "./base_generator-DnmbQ4rq.js";
|
|
2
|
+
|
|
3
|
+
//#region src/generators/service_generator.d.ts
|
|
4
|
+
declare class ServiceGenerator extends BaseGenerator {
|
|
5
|
+
generate(name: string): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ServiceGenerator as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCommand } from '@adonisjs/core/ace';
|
|
2
|
-
export
|
|
2
|
+
export default class BuildBlueprint extends BaseCommand {
|
|
3
3
|
static commandName: string;
|
|
4
4
|
static description: string;
|
|
5
5
|
draftFile: string;
|
|
@@ -11,4 +11,3 @@ export declare class BuildBlueprint extends BaseCommand {
|
|
|
11
11
|
private eraseExisting;
|
|
12
12
|
private build;
|
|
13
13
|
}
|
|
14
|
-
export default BuildBlueprint;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
//#region src/types.d.ts
|
|
2
|
+
interface Entity {
|
|
3
|
+
name: string;
|
|
4
|
+
path: string;
|
|
5
|
+
className: string;
|
|
6
|
+
tableName?: string;
|
|
7
|
+
}
|
|
8
|
+
interface ModelAttribute {
|
|
9
|
+
name: string;
|
|
10
|
+
type: string;
|
|
11
|
+
modifiers: string[];
|
|
12
|
+
}
|
|
13
|
+
interface ModelRelationship {
|
|
14
|
+
type: 'belongsTo' | 'hasMany' | 'belongsToMany' | 'hasOne';
|
|
15
|
+
model: string;
|
|
16
|
+
}
|
|
17
|
+
interface ModelDefinition {
|
|
18
|
+
name: string;
|
|
19
|
+
attributes: Record<string, string | {
|
|
20
|
+
type: string;
|
|
21
|
+
modifiers?: string[];
|
|
22
|
+
}>;
|
|
23
|
+
relationships?: Record<string, string>;
|
|
24
|
+
}
|
|
25
|
+
interface ControllerAction {
|
|
26
|
+
query?: string;
|
|
27
|
+
render?: string;
|
|
28
|
+
validate?: string;
|
|
29
|
+
save?: string | boolean;
|
|
30
|
+
flash?: string;
|
|
31
|
+
redirect?: string;
|
|
32
|
+
delete?: string | boolean;
|
|
33
|
+
}
|
|
34
|
+
interface ControllerDefinition {
|
|
35
|
+
name: string;
|
|
36
|
+
middleware?: string[];
|
|
37
|
+
actions: Record<string, ControllerAction>;
|
|
38
|
+
}
|
|
39
|
+
interface BlueprintSchema {
|
|
40
|
+
settings?: {
|
|
41
|
+
api?: boolean;
|
|
42
|
+
inertia?: {
|
|
43
|
+
enabled: boolean;
|
|
44
|
+
adapter: 'react' | 'vue' | 'svelte';
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
auth?: Record<string, any> | boolean;
|
|
48
|
+
models?: Record<string, any>;
|
|
49
|
+
controllers?: Record<string, any>;
|
|
50
|
+
channels?: Record<string, any>;
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { Entity as n, BlueprintSchema as t };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anu8151/adonisjs-blueprint",
|
|
3
3
|
"description": "Blueprint for AdonisJS 7",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.5",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=24.0.0"
|
|
7
7
|
},
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
"exports": {
|
|
17
17
|
".": "./build/index.js",
|
|
18
18
|
"./types": "./build/src/types.js",
|
|
19
|
-
"./commands": "./build/src/commands/
|
|
19
|
+
"./commands/build": "./build/src/commands/build.js",
|
|
20
|
+
"./commands/erase": "./build/src/commands/erase.js",
|
|
21
|
+
"./commands/init": "./build/src/commands/init.js",
|
|
22
|
+
"./commands/stubs": "./build/src/commands/stubs.js",
|
|
23
|
+
"./commands/trace": "./build/src/commands/trace.js"
|
|
20
24
|
},
|
|
21
25
|
"scripts": {
|
|
22
26
|
"copy:templates": "copyfiles \"stubs/**/*.stub\" build",
|
|
@@ -81,7 +85,11 @@
|
|
|
81
85
|
],
|
|
82
86
|
"adonisjs": {
|
|
83
87
|
"commands": [
|
|
84
|
-
"
|
|
88
|
+
"@anu8151/adonisjs-blueprint/commands/build",
|
|
89
|
+
"@anu8151/adonisjs-blueprint/commands/erase",
|
|
90
|
+
"@anu8151/adonisjs-blueprint/commands/init",
|
|
91
|
+
"@anu8151/adonisjs-blueprint/commands/stubs",
|
|
92
|
+
"@anu8151/adonisjs-blueprint/commands/trace"
|
|
85
93
|
]
|
|
86
94
|
},
|
|
87
95
|
"author": "ANU8151",
|
|
@@ -95,11 +103,11 @@
|
|
|
95
103
|
"./index.ts",
|
|
96
104
|
"./configure.ts",
|
|
97
105
|
"./stubs/main.ts",
|
|
98
|
-
"./src/commands/main.ts",
|
|
99
106
|
"./src/commands/build.ts",
|
|
100
107
|
"./src/commands/erase.ts",
|
|
101
108
|
"./src/commands/trace.ts",
|
|
102
109
|
"./src/commands/stubs.ts",
|
|
110
|
+
"./src/commands/init.ts",
|
|
103
111
|
"./src/generators/*.ts",
|
|
104
112
|
"./src/parser.ts"
|
|
105
113
|
],
|
|
@@ -108,7 +116,7 @@
|
|
|
108
116
|
"format": "esm",
|
|
109
117
|
"minify": "dce-only",
|
|
110
118
|
"fixedExtension": false,
|
|
111
|
-
"dts":
|
|
119
|
+
"dts": true,
|
|
112
120
|
"treeshake": false,
|
|
113
121
|
"sourcemaps": false,
|
|
114
122
|
"target": "esnext"
|
|
File without changes
|