@lenne.tech/cli 1.28.0 → 1.29.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/build/cli.js +7 -1
- package/build/commands/frontend/angular.js +48 -46
- package/build/commands/frontend/convert-mode.js +41 -39
- package/build/commands/frontend/nuxt.js +49 -47
- package/build/commands/fullstack/add-api.js +34 -32
- package/build/commands/fullstack/add-app.js +25 -23
- package/build/commands/fullstack/convert-mode.js +85 -65
- package/build/commands/fullstack/init.js +12 -0
- package/build/commands/fullstack/update.js +24 -0
- package/build/commands/server/add-property.js +42 -40
- package/build/commands/server/convert-mode.js +41 -39
- package/build/commands/server/create.js +65 -63
- package/build/commands/server/module.js +56 -54
- package/build/commands/server/object.js +42 -40
- package/build/commands/server/permissions.js +60 -58
- package/build/commands/tools/crawl.js +92 -90
- package/build/extensions/frontend-helper.js +8 -37
- package/build/extensions/server.js +8 -38
- package/build/lib/command-help.js +161 -0
- package/build/lib/vendor-claude-md.js +227 -0
- package/package.json +1 -1
package/build/cli.js
CHANGED
|
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const gluegun_1 = require("gluegun");
|
|
13
13
|
const path_1 = require("path");
|
|
14
|
+
const command_help_1 = require("./lib/command-help");
|
|
14
15
|
/**
|
|
15
16
|
* Create the cli and kick it off
|
|
16
17
|
*/
|
|
@@ -26,9 +27,14 @@ function run(argv) {
|
|
|
26
27
|
commandFilePattern: ['*.js'],
|
|
27
28
|
extensionFilePattern: ['*.js'],
|
|
28
29
|
})
|
|
29
|
-
.help() // provides default for help, h, --help, -h
|
|
30
|
+
.help() // provides default for top-level help, h, --help, -h
|
|
30
31
|
.version() // provides default for version, v, --version, -v
|
|
31
32
|
.create();
|
|
33
|
+
// Generic per-command `--help` / `-h`: gluegun's `.help()` only covers the
|
|
34
|
+
// top level, so without this a subcommand like `lt fullstack convert-mode
|
|
35
|
+
// --help` would actually RUN. The interceptor makes every command print
|
|
36
|
+
// help and return without executing when help is requested.
|
|
37
|
+
(0, command_help_1.installHelpInterceptor)(cli.commands, cli.defaultCommand);
|
|
32
38
|
// Run cli
|
|
33
39
|
const toolbox = yield cli.run(argv);
|
|
34
40
|
// Record command in history (if history extension is available)
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.help = void 0;
|
|
12
13
|
const workspace_integration_1 = require("../../lib/workspace-integration");
|
|
13
14
|
/**
|
|
14
15
|
* Create a new Angular workspace
|
|
@@ -18,6 +19,52 @@ const workspace_integration_1 = require("../../lib/workspace-integration");
|
|
|
18
19
|
* Mirrors the same dry-run / workspace-detection surface as the Nuxt
|
|
19
20
|
* sibling so behaviour is consistent across the four flows.
|
|
20
21
|
*/
|
|
22
|
+
exports.help = {
|
|
23
|
+
aliases: ['a'],
|
|
24
|
+
configuration: 'commands.frontend.angular.*',
|
|
25
|
+
description: 'Create a new Angular workspace from ng-base-starter',
|
|
26
|
+
name: 'angular',
|
|
27
|
+
options: [
|
|
28
|
+
{ description: 'Workspace name', flag: '--name', required: false, type: 'string' },
|
|
29
|
+
{ description: 'Branch of ng-base-starter to clone', flag: '--branch', required: false, type: 'string' },
|
|
30
|
+
{ description: 'Copy from local template directory', flag: '--copy', required: false, type: 'string' },
|
|
31
|
+
{ description: 'Symlink to local template directory', flag: '--link', required: false, type: 'string' },
|
|
32
|
+
{ description: 'Initialize Angular localize', flag: '--localize', required: false, type: 'boolean' },
|
|
33
|
+
{
|
|
34
|
+
description: 'Skip Angular localize initialisation',
|
|
35
|
+
flag: '--noLocalize',
|
|
36
|
+
required: false,
|
|
37
|
+
type: 'boolean',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
description: 'Git remote URL to push initial commit to',
|
|
41
|
+
flag: '--gitLink',
|
|
42
|
+
required: false,
|
|
43
|
+
type: 'string',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
default: false,
|
|
47
|
+
description: 'Print resolved plan and exit without making any changes',
|
|
48
|
+
flag: '--dry-run',
|
|
49
|
+
required: false,
|
|
50
|
+
type: 'boolean',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
default: false,
|
|
54
|
+
description: 'Override the workspace-detection abort under --noConfirm',
|
|
55
|
+
flag: '--force',
|
|
56
|
+
required: false,
|
|
57
|
+
type: 'boolean',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
default: false,
|
|
61
|
+
description: 'Skip all interactive prompts',
|
|
62
|
+
flag: '--noConfirm',
|
|
63
|
+
required: false,
|
|
64
|
+
type: 'boolean',
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
};
|
|
21
68
|
const NewCommand = {
|
|
22
69
|
alias: ['a'],
|
|
23
70
|
description: 'Create Angular workspace',
|
|
@@ -27,52 +74,7 @@ const NewCommand = {
|
|
|
27
74
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
28
75
|
// Retrieve the tools we need
|
|
29
76
|
const { config, filesystem, frontendHelper, git, helper, parameters, print: { error, info, spin, success }, prompt: { confirm }, strings: { kebabCase }, system, } = toolbox;
|
|
30
|
-
if (toolbox.tools.helpJson({
|
|
31
|
-
aliases: ['a'],
|
|
32
|
-
configuration: 'commands.frontend.angular.*',
|
|
33
|
-
description: 'Create a new Angular workspace from ng-base-starter',
|
|
34
|
-
name: 'angular',
|
|
35
|
-
options: [
|
|
36
|
-
{ description: 'Workspace name', flag: '--name', required: false, type: 'string' },
|
|
37
|
-
{ description: 'Branch of ng-base-starter to clone', flag: '--branch', required: false, type: 'string' },
|
|
38
|
-
{ description: 'Copy from local template directory', flag: '--copy', required: false, type: 'string' },
|
|
39
|
-
{ description: 'Symlink to local template directory', flag: '--link', required: false, type: 'string' },
|
|
40
|
-
{ description: 'Initialize Angular localize', flag: '--localize', required: false, type: 'boolean' },
|
|
41
|
-
{
|
|
42
|
-
description: 'Skip Angular localize initialisation',
|
|
43
|
-
flag: '--noLocalize',
|
|
44
|
-
required: false,
|
|
45
|
-
type: 'boolean',
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
description: 'Git remote URL to push initial commit to',
|
|
49
|
-
flag: '--gitLink',
|
|
50
|
-
required: false,
|
|
51
|
-
type: 'string',
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
default: false,
|
|
55
|
-
description: 'Print resolved plan and exit without making any changes',
|
|
56
|
-
flag: '--dry-run',
|
|
57
|
-
required: false,
|
|
58
|
-
type: 'boolean',
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
default: false,
|
|
62
|
-
description: 'Override the workspace-detection abort under --noConfirm',
|
|
63
|
-
flag: '--force',
|
|
64
|
-
required: false,
|
|
65
|
-
type: 'boolean',
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
default: false,
|
|
69
|
-
description: 'Skip all interactive prompts',
|
|
70
|
-
flag: '--noConfirm',
|
|
71
|
-
required: false,
|
|
72
|
-
type: 'boolean',
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
})) {
|
|
77
|
+
if (toolbox.tools.helpJson(exports.help)) {
|
|
76
78
|
return;
|
|
77
79
|
}
|
|
78
80
|
// Load configuration
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.help = void 0;
|
|
12
13
|
const frontend_framework_detection_1 = require("../../lib/frontend-framework-detection");
|
|
13
14
|
/**
|
|
14
15
|
* Convert an existing frontend project between npm mode and vendor mode.
|
|
@@ -17,6 +18,45 @@ const frontend_framework_detection_1 = require("../../lib/frontend-framework-det
|
|
|
17
18
|
* lt frontend convert-mode --to vendor [--upstream-branch 1.5.3]
|
|
18
19
|
* lt frontend convert-mode --to npm [--version 1.5.3]
|
|
19
20
|
*/
|
|
21
|
+
exports.help = {
|
|
22
|
+
description: 'Convert frontend project between npm and vendor framework modes',
|
|
23
|
+
name: 'convert-mode',
|
|
24
|
+
options: [
|
|
25
|
+
{
|
|
26
|
+
description: 'Target mode',
|
|
27
|
+
flag: '--to',
|
|
28
|
+
required: true,
|
|
29
|
+
type: 'string',
|
|
30
|
+
values: ['vendor', 'npm'],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
description: 'Upstream branch/tag to vendor from (only with --to vendor)',
|
|
34
|
+
flag: '--upstream-branch',
|
|
35
|
+
required: false,
|
|
36
|
+
type: 'string',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
description: 'nuxt-extensions version to install (only with --to npm, default: from VENDOR.md baseline)',
|
|
40
|
+
flag: '--version',
|
|
41
|
+
required: false,
|
|
42
|
+
type: 'string',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
default: false,
|
|
46
|
+
description: 'Skip confirmation prompt',
|
|
47
|
+
flag: '--noConfirm',
|
|
48
|
+
required: false,
|
|
49
|
+
type: 'boolean',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
default: false,
|
|
53
|
+
description: 'Show the resolved plan without making any changes',
|
|
54
|
+
flag: '--dry-run',
|
|
55
|
+
required: false,
|
|
56
|
+
type: 'boolean',
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
};
|
|
20
60
|
const ConvertModeCommand = {
|
|
21
61
|
description: 'Convert app framework mode',
|
|
22
62
|
hidden: false,
|
|
@@ -24,45 +64,7 @@ const ConvertModeCommand = {
|
|
|
24
64
|
run: (toolbox) => __awaiter(void 0, void 0, void 0, function* () {
|
|
25
65
|
const { filesystem, frontendHelper, parameters, print: { error, info, spin, success, warning }, prompt: { confirm }, } = toolbox;
|
|
26
66
|
// Handle --help-json flag
|
|
27
|
-
if (toolbox.tools.helpJson({
|
|
28
|
-
description: 'Convert frontend project between npm and vendor framework modes',
|
|
29
|
-
name: 'convert-mode',
|
|
30
|
-
options: [
|
|
31
|
-
{
|
|
32
|
-
description: 'Target mode',
|
|
33
|
-
flag: '--to',
|
|
34
|
-
required: true,
|
|
35
|
-
type: 'string',
|
|
36
|
-
values: ['vendor', 'npm'],
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
description: 'Upstream branch/tag to vendor from (only with --to vendor)',
|
|
40
|
-
flag: '--upstream-branch',
|
|
41
|
-
required: false,
|
|
42
|
-
type: 'string',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
description: 'nuxt-extensions version to install (only with --to npm, default: from VENDOR.md baseline)',
|
|
46
|
-
flag: '--version',
|
|
47
|
-
required: false,
|
|
48
|
-
type: 'string',
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
default: false,
|
|
52
|
-
description: 'Skip confirmation prompt',
|
|
53
|
-
flag: '--noConfirm',
|
|
54
|
-
required: false,
|
|
55
|
-
type: 'boolean',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
default: false,
|
|
59
|
-
description: 'Show the resolved plan without making any changes',
|
|
60
|
-
flag: '--dry-run',
|
|
61
|
-
required: false,
|
|
62
|
-
type: 'boolean',
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
})) {
|
|
67
|
+
if (toolbox.tools.helpJson(exports.help)) {
|
|
66
68
|
return;
|
|
67
69
|
}
|
|
68
70
|
const targetMode = parameters.options.to;
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.help = void 0;
|
|
12
13
|
const workspace_integration_1 = require("../../lib/workspace-integration");
|
|
13
14
|
/**
|
|
14
15
|
* Create a new nuxt workspace
|
|
@@ -18,6 +19,53 @@ const workspace_integration_1 = require("../../lib/workspace-integration");
|
|
|
18
19
|
* a brand-new directory. Mirrors the same surface area as add-app where
|
|
19
20
|
* applicable so behaviour is consistent across the four flows.
|
|
20
21
|
*/
|
|
22
|
+
exports.help = {
|
|
23
|
+
aliases: ['n'],
|
|
24
|
+
configuration: 'commands.frontend.nuxt.*',
|
|
25
|
+
description: 'Create a new Nuxt workspace from nuxt-base-starter',
|
|
26
|
+
name: 'nuxt',
|
|
27
|
+
options: [
|
|
28
|
+
{ description: 'Workspace name', flag: '--name', required: false, type: 'string' },
|
|
29
|
+
{ description: 'Branch of nuxt-base-starter to clone', flag: '--branch', required: false, type: 'string' },
|
|
30
|
+
{ description: 'Copy from local template directory', flag: '--copy', required: false, type: 'string' },
|
|
31
|
+
{ description: 'Symlink to local template directory', flag: '--link', required: false, type: 'string' },
|
|
32
|
+
{
|
|
33
|
+
description: 'Frontend framework consumption mode',
|
|
34
|
+
flag: '--frontend-framework-mode',
|
|
35
|
+
required: false,
|
|
36
|
+
type: 'string',
|
|
37
|
+
values: ['npm', 'vendor'],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
default: false,
|
|
41
|
+
description: 'Default branch to nuxt-base-starter#next (auth basePath aligned with experimental --next API)',
|
|
42
|
+
flag: '--next',
|
|
43
|
+
required: false,
|
|
44
|
+
type: 'boolean',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
default: false,
|
|
48
|
+
description: 'Print resolved plan and exit without making any changes',
|
|
49
|
+
flag: '--dry-run',
|
|
50
|
+
required: false,
|
|
51
|
+
type: 'boolean',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
default: false,
|
|
55
|
+
description: 'Override the workspace-detection abort under --noConfirm',
|
|
56
|
+
flag: '--force',
|
|
57
|
+
required: false,
|
|
58
|
+
type: 'boolean',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
default: false,
|
|
62
|
+
description: 'Skip all interactive prompts',
|
|
63
|
+
flag: '--noConfirm',
|
|
64
|
+
required: false,
|
|
65
|
+
type: 'boolean',
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
};
|
|
21
69
|
const NewCommand = {
|
|
22
70
|
alias: ['n'],
|
|
23
71
|
description: 'Creates a new nuxt workspace',
|
|
@@ -26,53 +74,7 @@ const NewCommand = {
|
|
|
26
74
|
run: (toolbox) => __awaiter(void 0, void 0, void 0, function* () {
|
|
27
75
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
28
76
|
const { config, filesystem, frontendHelper, helper, parameters, print: { error, info, spin }, prompt: { ask, confirm }, strings: { kebabCase }, system, } = toolbox;
|
|
29
|
-
if (toolbox.tools.helpJson({
|
|
30
|
-
aliases: ['n'],
|
|
31
|
-
configuration: 'commands.frontend.nuxt.*',
|
|
32
|
-
description: 'Create a new Nuxt workspace from nuxt-base-starter',
|
|
33
|
-
name: 'nuxt',
|
|
34
|
-
options: [
|
|
35
|
-
{ description: 'Workspace name', flag: '--name', required: false, type: 'string' },
|
|
36
|
-
{ description: 'Branch of nuxt-base-starter to clone', flag: '--branch', required: false, type: 'string' },
|
|
37
|
-
{ description: 'Copy from local template directory', flag: '--copy', required: false, type: 'string' },
|
|
38
|
-
{ description: 'Symlink to local template directory', flag: '--link', required: false, type: 'string' },
|
|
39
|
-
{
|
|
40
|
-
description: 'Frontend framework consumption mode',
|
|
41
|
-
flag: '--frontend-framework-mode',
|
|
42
|
-
required: false,
|
|
43
|
-
type: 'string',
|
|
44
|
-
values: ['npm', 'vendor'],
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
default: false,
|
|
48
|
-
description: 'Default branch to nuxt-base-starter#next (auth basePath aligned with experimental --next API)',
|
|
49
|
-
flag: '--next',
|
|
50
|
-
required: false,
|
|
51
|
-
type: 'boolean',
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
default: false,
|
|
55
|
-
description: 'Print resolved plan and exit without making any changes',
|
|
56
|
-
flag: '--dry-run',
|
|
57
|
-
required: false,
|
|
58
|
-
type: 'boolean',
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
default: false,
|
|
62
|
-
description: 'Override the workspace-detection abort under --noConfirm',
|
|
63
|
-
flag: '--force',
|
|
64
|
-
required: false,
|
|
65
|
-
type: 'boolean',
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
default: false,
|
|
69
|
-
description: 'Skip all interactive prompts',
|
|
70
|
-
flag: '--noConfirm',
|
|
71
|
-
required: false,
|
|
72
|
-
type: 'boolean',
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
})) {
|
|
77
|
+
if (toolbox.tools.helpJson(exports.help)) {
|
|
76
78
|
return;
|
|
77
79
|
}
|
|
78
80
|
// Load configuration. Nuxt-specific keys live under
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.help = void 0;
|
|
12
13
|
const hoist_workspace_pnpm_config_1 = require("../../lib/hoist-workspace-pnpm-config");
|
|
13
14
|
const workspace_integration_1 = require("../../lib/workspace-integration");
|
|
14
15
|
/**
|
|
@@ -20,6 +21,38 @@ const workspace_integration_1 = require("../../lib/workspace-integration");
|
|
|
20
21
|
* `lt fullstack init` workflow on a fresh directory instead, or remove
|
|
21
22
|
* the existing API first.
|
|
22
23
|
*/
|
|
24
|
+
exports.help = {
|
|
25
|
+
aliases: ['add-api'],
|
|
26
|
+
configuration: 'commands.fullstack.*',
|
|
27
|
+
description: 'Add a NestJS API to an existing fullstack workspace',
|
|
28
|
+
name: 'add-api',
|
|
29
|
+
options: [
|
|
30
|
+
{ description: 'API mode', flag: '--api-mode', type: 'string', values: ['Rest', 'GraphQL', 'Both'] },
|
|
31
|
+
{
|
|
32
|
+
description: 'Framework consumption mode',
|
|
33
|
+
flag: '--framework-mode',
|
|
34
|
+
type: 'string',
|
|
35
|
+
values: ['npm', 'vendor'],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
description: 'Branch/tag/commit of upstream nest-server (vendor mode)',
|
|
39
|
+
flag: '--framework-upstream-branch',
|
|
40
|
+
type: 'string',
|
|
41
|
+
},
|
|
42
|
+
{ description: 'Branch of nest-server-starter to clone', flag: '--api-branch', type: 'string' },
|
|
43
|
+
{ description: 'Path to local API template to copy from', flag: '--api-copy', type: 'string' },
|
|
44
|
+
{ description: 'Path to local API template to symlink', flag: '--api-link', type: 'string' },
|
|
45
|
+
{
|
|
46
|
+
description: 'Use experimental nest-base template (Bun + Prisma + Postgres + Better-Auth)',
|
|
47
|
+
flag: '--next',
|
|
48
|
+
type: 'boolean',
|
|
49
|
+
},
|
|
50
|
+
{ description: 'Workspace root (defaults to cwd)', flag: '--workspace-dir', type: 'string' },
|
|
51
|
+
{ description: 'Skip install / format after API integration', flag: '--skip-install', type: 'boolean' },
|
|
52
|
+
{ description: 'Print resolved plan and exit without disk changes', flag: '--dry-run', type: 'boolean' },
|
|
53
|
+
{ description: 'Skip all interactive prompts', flag: '--noConfirm', type: 'boolean' },
|
|
54
|
+
],
|
|
55
|
+
};
|
|
23
56
|
const NewCommand = {
|
|
24
57
|
alias: ['add-api'],
|
|
25
58
|
description: 'Add API to fullstack workspace',
|
|
@@ -29,38 +62,7 @@ const NewCommand = {
|
|
|
29
62
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
30
63
|
const { config, filesystem, git, parameters, patching, print: { error, info, spin, success, warning }, prompt: { ask }, server, system, } = toolbox;
|
|
31
64
|
// Help-JSON support so AI agents can introspect the flags.
|
|
32
|
-
if (toolbox.tools.helpJson({
|
|
33
|
-
aliases: ['add-api'],
|
|
34
|
-
configuration: 'commands.fullstack.*',
|
|
35
|
-
description: 'Add a NestJS API to an existing fullstack workspace',
|
|
36
|
-
name: 'add-api',
|
|
37
|
-
options: [
|
|
38
|
-
{ description: 'API mode', flag: '--api-mode', type: 'string', values: ['Rest', 'GraphQL', 'Both'] },
|
|
39
|
-
{
|
|
40
|
-
description: 'Framework consumption mode',
|
|
41
|
-
flag: '--framework-mode',
|
|
42
|
-
type: 'string',
|
|
43
|
-
values: ['npm', 'vendor'],
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
description: 'Branch/tag/commit of upstream nest-server (vendor mode)',
|
|
47
|
-
flag: '--framework-upstream-branch',
|
|
48
|
-
type: 'string',
|
|
49
|
-
},
|
|
50
|
-
{ description: 'Branch of nest-server-starter to clone', flag: '--api-branch', type: 'string' },
|
|
51
|
-
{ description: 'Path to local API template to copy from', flag: '--api-copy', type: 'string' },
|
|
52
|
-
{ description: 'Path to local API template to symlink', flag: '--api-link', type: 'string' },
|
|
53
|
-
{
|
|
54
|
-
description: 'Use experimental nest-base template (Bun + Prisma + Postgres + Better-Auth)',
|
|
55
|
-
flag: '--next',
|
|
56
|
-
type: 'boolean',
|
|
57
|
-
},
|
|
58
|
-
{ description: 'Workspace root (defaults to cwd)', flag: '--workspace-dir', type: 'string' },
|
|
59
|
-
{ description: 'Skip install / format after API integration', flag: '--skip-install', type: 'boolean' },
|
|
60
|
-
{ description: 'Print resolved plan and exit without disk changes', flag: '--dry-run', type: 'boolean' },
|
|
61
|
-
{ description: 'Skip all interactive prompts', flag: '--noConfirm', type: 'boolean' },
|
|
62
|
-
],
|
|
63
|
-
})) {
|
|
65
|
+
if (toolbox.tools.helpJson(exports.help)) {
|
|
64
66
|
return;
|
|
65
67
|
}
|
|
66
68
|
const timer = system.startTimer();
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.help = void 0;
|
|
12
13
|
const hoist_workspace_pnpm_config_1 = require("../../lib/hoist-workspace-pnpm-config");
|
|
13
14
|
const workspace_integration_1 = require("../../lib/workspace-integration");
|
|
14
15
|
/**
|
|
@@ -19,6 +20,29 @@ const workspace_integration_1 = require("../../lib/workspace-integration");
|
|
|
19
20
|
*
|
|
20
21
|
* Refuses to run if `projects/app/` already exists.
|
|
21
22
|
*/
|
|
23
|
+
exports.help = {
|
|
24
|
+
aliases: ['add-app'],
|
|
25
|
+
configuration: 'commands.fullstack.*',
|
|
26
|
+
description: 'Add a frontend app to an existing fullstack workspace',
|
|
27
|
+
name: 'add-app',
|
|
28
|
+
options: [
|
|
29
|
+
{ description: 'Frontend framework', flag: '--frontend', type: 'string', values: ['nuxt', 'angular'] },
|
|
30
|
+
{
|
|
31
|
+
description: 'Frontend framework consumption mode',
|
|
32
|
+
flag: '--frontend-framework-mode',
|
|
33
|
+
type: 'string',
|
|
34
|
+
values: ['npm', 'vendor'],
|
|
35
|
+
},
|
|
36
|
+
{ description: 'Branch of the frontend starter to clone', flag: '--frontend-branch', type: 'string' },
|
|
37
|
+
{ description: 'Path to local frontend template to copy from', flag: '--frontend-copy', type: 'string' },
|
|
38
|
+
{ description: 'Path to local frontend template to symlink', flag: '--frontend-link', type: 'string' },
|
|
39
|
+
{ description: 'Use experimental nuxt-base-starter `next` branch', flag: '--next', type: 'boolean' },
|
|
40
|
+
{ description: 'Workspace root (defaults to cwd)', flag: '--workspace-dir', type: 'string' },
|
|
41
|
+
{ description: 'Skip install / format after app integration', flag: '--skip-install', type: 'boolean' },
|
|
42
|
+
{ description: 'Print resolved plan and exit without disk changes', flag: '--dry-run', type: 'boolean' },
|
|
43
|
+
{ description: 'Skip all interactive prompts', flag: '--noConfirm', type: 'boolean' },
|
|
44
|
+
],
|
|
45
|
+
};
|
|
22
46
|
const NewCommand = {
|
|
23
47
|
alias: ['add-app'],
|
|
24
48
|
description: 'Add app to fullstack workspace',
|
|
@@ -27,29 +51,7 @@ const NewCommand = {
|
|
|
27
51
|
run: (toolbox) => __awaiter(void 0, void 0, void 0, function* () {
|
|
28
52
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
29
53
|
const { config, filesystem, frontendHelper, git, parameters, print: { error, info, spin, success, warning }, prompt: { ask }, system, } = toolbox;
|
|
30
|
-
if (toolbox.tools.helpJson({
|
|
31
|
-
aliases: ['add-app'],
|
|
32
|
-
configuration: 'commands.fullstack.*',
|
|
33
|
-
description: 'Add a frontend app to an existing fullstack workspace',
|
|
34
|
-
name: 'add-app',
|
|
35
|
-
options: [
|
|
36
|
-
{ description: 'Frontend framework', flag: '--frontend', type: 'string', values: ['nuxt', 'angular'] },
|
|
37
|
-
{
|
|
38
|
-
description: 'Frontend framework consumption mode',
|
|
39
|
-
flag: '--frontend-framework-mode',
|
|
40
|
-
type: 'string',
|
|
41
|
-
values: ['npm', 'vendor'],
|
|
42
|
-
},
|
|
43
|
-
{ description: 'Branch of the frontend starter to clone', flag: '--frontend-branch', type: 'string' },
|
|
44
|
-
{ description: 'Path to local frontend template to copy from', flag: '--frontend-copy', type: 'string' },
|
|
45
|
-
{ description: 'Path to local frontend template to symlink', flag: '--frontend-link', type: 'string' },
|
|
46
|
-
{ description: 'Use experimental nuxt-base-starter `next` branch', flag: '--next', type: 'boolean' },
|
|
47
|
-
{ description: 'Workspace root (defaults to cwd)', flag: '--workspace-dir', type: 'string' },
|
|
48
|
-
{ description: 'Skip install / format after app integration', flag: '--skip-install', type: 'boolean' },
|
|
49
|
-
{ description: 'Print resolved plan and exit without disk changes', flag: '--dry-run', type: 'boolean' },
|
|
50
|
-
{ description: 'Skip all interactive prompts', flag: '--noConfirm', type: 'boolean' },
|
|
51
|
-
],
|
|
52
|
-
})) {
|
|
54
|
+
if (toolbox.tools.helpJson(exports.help)) {
|
|
53
55
|
return;
|
|
54
56
|
}
|
|
55
57
|
const timer = system.startTimer();
|