proteum 2.1.1 → 2.1.2
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/README.md +25 -6
- package/agents/framework/AGENTS.md +14 -1
- package/agents/project/AGENTS.md +3 -0
- package/cli/commands/create.ts +5 -0
- package/cli/commands/dev.ts +2 -1
- package/cli/commands/init.ts +2 -94
- package/cli/index.ts +1 -4
- package/cli/presentation/commands.ts +45 -9
- package/cli/presentation/devSession.ts +17 -3
- package/cli/presentation/proteum_logo_400x400_square_icon.txt +400 -0
- package/cli/runtime/commands.ts +61 -3
- package/cli/scaffold/index.ts +720 -0
- package/cli/scaffold/templates.ts +344 -0
- package/cli/scaffold/types.ts +26 -0
- package/client/dev/profiler/index.tsx +1230 -230
- package/common/dev/profiler.ts +1 -0
- package/common/dev/requestTrace.ts +6 -0
- package/docs/dev-commands.md +7 -0
- package/docs/diagnostics.md +88 -0
- package/docs/request-tracing.md +10 -0
- package/eslint.js +11 -6
- package/package.json +3 -2
- package/server/app/index.ts +2 -2
- package/server/index.ts +0 -1
- package/server/services/auth/index.ts +525 -61
- package/server/services/auth/router/index.ts +106 -7
- package/server/services/router/http/index.ts +22 -6
package/cli/runtime/commands.ts
CHANGED
|
@@ -9,15 +9,71 @@ class InitCommand extends ProteumCommand {
|
|
|
9
9
|
|
|
10
10
|
public static usage = buildUsage('init');
|
|
11
11
|
|
|
12
|
-
public
|
|
12
|
+
public name = Option.String('--name', { description: 'Human-readable app name.' });
|
|
13
|
+
public description = Option.String('--description', { description: 'App description used in identity.yaml and package.json.' });
|
|
14
|
+
public identifier = Option.String('--identifier', { description: 'Application class and identity identifier.' });
|
|
15
|
+
public port = Option.String('--port', { description: 'Default local router port used in .env.' });
|
|
16
|
+
public url = Option.String('--url', { description: 'Default absolute URL used in .env.' });
|
|
17
|
+
public proteumVersion = Option.String('--proteum-version', {
|
|
18
|
+
description: 'Override the Proteum dependency written to package.json.',
|
|
19
|
+
});
|
|
20
|
+
public install = Option.Boolean('--install', false, { description: 'Run npm install after scaffolding.' });
|
|
21
|
+
public dryRun = Option.Boolean('--dry-run', false, { description: 'Print the scaffold plan without writing files.' });
|
|
22
|
+
public json = Option.Boolean('--json', false, { description: 'Print machine-readable scaffold output.' });
|
|
23
|
+
public force = Option.Boolean('--force', false, { description: 'Allow writing into a non-empty target directory.' });
|
|
24
|
+
public args = Option.Rest();
|
|
13
25
|
|
|
14
26
|
public async execute() {
|
|
15
|
-
|
|
16
|
-
|
|
27
|
+
const [directory = ''] = this.args;
|
|
28
|
+
|
|
29
|
+
this.setCliArgs({
|
|
30
|
+
directory,
|
|
31
|
+
name: this.name ?? '',
|
|
32
|
+
description: this.description ?? '',
|
|
33
|
+
identifier: this.identifier ?? '',
|
|
34
|
+
port: this.port ?? '',
|
|
35
|
+
url: this.url ?? '',
|
|
36
|
+
proteumVersion: this.proteumVersion ?? '',
|
|
37
|
+
install: this.install,
|
|
38
|
+
dryRun: this.dryRun,
|
|
39
|
+
json: this.json,
|
|
40
|
+
force: this.force,
|
|
41
|
+
});
|
|
17
42
|
await runCommandModule(() => import('../commands/init'));
|
|
18
43
|
}
|
|
19
44
|
}
|
|
20
45
|
|
|
46
|
+
class CreateCommand extends ProteumCommand {
|
|
47
|
+
public static paths = [['create']];
|
|
48
|
+
|
|
49
|
+
public static usage = buildUsage('create');
|
|
50
|
+
|
|
51
|
+
public route = Option.String('--route', { description: 'Explicit URL path used for page or route scaffolds.' });
|
|
52
|
+
public method = Option.String('--method', { description: 'Method name used for controller or command scaffolds.' });
|
|
53
|
+
public httpMethod = Option.String('--http-method', { description: 'HTTP verb used for route scaffolds.' });
|
|
54
|
+
public json = Option.Boolean('--json', false, { description: 'Print machine-readable scaffold output.' });
|
|
55
|
+
public dryRun = Option.Boolean('--dry-run', false, { description: 'Print the scaffold plan without writing files.' });
|
|
56
|
+
public force = Option.Boolean('--force', false, { description: 'Allow overwriting generated target files.' });
|
|
57
|
+
public args = Option.Rest();
|
|
58
|
+
|
|
59
|
+
public async execute() {
|
|
60
|
+
const [kind = '', target = ''] = this.args;
|
|
61
|
+
|
|
62
|
+
this.setCliArgs({
|
|
63
|
+
kind,
|
|
64
|
+
target,
|
|
65
|
+
route: this.route ?? '',
|
|
66
|
+
method: this.method ?? '',
|
|
67
|
+
httpMethod: this.httpMethod ?? '',
|
|
68
|
+
json: this.json,
|
|
69
|
+
dryRun: this.dryRun,
|
|
70
|
+
force: this.force,
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
await runCommandModule(() => import('../commands/create'));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
21
77
|
class DevCommand extends ProteumCommand {
|
|
22
78
|
public static paths = [['dev']];
|
|
23
79
|
|
|
@@ -242,6 +298,7 @@ class CommandCommand extends ProteumCommand {
|
|
|
242
298
|
|
|
243
299
|
export const registeredCommands = {
|
|
244
300
|
init: InitCommand,
|
|
301
|
+
create: CreateCommand,
|
|
245
302
|
dev: DevCommand,
|
|
246
303
|
refresh: RefreshCommand,
|
|
247
304
|
build: BuildCommand,
|
|
@@ -265,6 +322,7 @@ export const createCli = (version: string) => {
|
|
|
265
322
|
clipanion.register(Builtins.VersionCommand);
|
|
266
323
|
clipanion.register(Builtins.DefinitionsCommand);
|
|
267
324
|
clipanion.register(InitCommand);
|
|
325
|
+
clipanion.register(CreateCommand);
|
|
268
326
|
clipanion.register(DevCommand);
|
|
269
327
|
clipanion.register(RefreshCommand);
|
|
270
328
|
clipanion.register(BuildCommand);
|