@intra-mart/accel 0.1.0-dev.202604270532 → 0.1.0-dev.202604270910
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 +4 -2
- package/assets/assets.tar.gz +0 -0
- package/dist/asset/deployer.js +1 -0
- package/dist/asset/walker.js +1 -0
- package/dist/commands/attach.d.ts +4 -0
- package/dist/commands/attach.js +6 -0
- package/dist/commands/init.d.ts +4 -0
- package/dist/commands/init.js +6 -0
- package/dist/core/constants.js +2 -1
- package/dist/core/types.d.ts +2 -0
- package/dist/core/validators.d.ts +12 -0
- package/dist/core/validators.js +51 -0
- package/dist/core/variable-interpolator.js +1 -0
- package/dist/i18n/en.js +5 -0
- package/dist/i18n/ja.js +5 -0
- package/dist/i18n/zh_CN.js +5 -0
- package/dist/interactive/prompts.d.ts +3 -0
- package/dist/interactive/prompts.js +65 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,7 +51,8 @@ accel init my-project \
|
|
|
51
51
|
| `[project-name]` (位置引数) | string | プロジェクト名(ディレクトリ名と一致) | `my-accel-project`(対話で変更可) |
|
|
52
52
|
| `--agent` | string | エージェント種別(`claude-code`, `github-copilot`、カンマ区切り) | 自動検出 |
|
|
53
53
|
| `--locale` | string | ロケール(`ja`, `en`, `zh_CN`) | OS設定から自動検出 |
|
|
54
|
-
| `--
|
|
54
|
+
| `--artifact-id` | string | アーティファクトID(pomの `artifactId` に相当) | プロジェクト名と同値 |
|
|
55
|
+
| `--group` | string | グループ名(pomの `groupId` に相当) | `com.example` |
|
|
55
56
|
| `--project-version` | string | プロジェクトバージョン | `0.1.0` |
|
|
56
57
|
| `--description` | string | プロジェクトの説明 | `""` |
|
|
57
58
|
| `--database` | string | データベース種別(`postgresql`, `oracle`, `sqlserver`) | `postgresql` |
|
|
@@ -83,7 +84,8 @@ accel attach --non-interactive
|
|
|
83
84
|
| `--name` | string | プロジェクト名 | カレントディレクトリ名 |
|
|
84
85
|
| `--agent` | string | エージェント種別(`claude-code`, `github-copilot`、カンマ区切り) | 自動検出 |
|
|
85
86
|
| `--locale` | string | ロケール(`ja`, `en`, `zh_CN`) | OS設定から自動検出 |
|
|
86
|
-
| `--
|
|
87
|
+
| `--artifact-id` | string | アーティファクトID(pomの `artifactId` に相当) | プロジェクト名と同値 |
|
|
88
|
+
| `--group` | string | グループ名(pomの `groupId` に相当) | `com.example` |
|
|
87
89
|
| `--project-version` | string | プロジェクトバージョン | `0.1.0` |
|
|
88
90
|
| `--description` | string | プロジェクトの説明 | `""` |
|
|
89
91
|
| `--database` | string | データベース種別(`postgresql`, `oracle`, `sqlserver`) | `postgresql` |
|
package/assets/assets.tar.gz
CHANGED
|
Binary file
|
package/dist/asset/deployer.js
CHANGED
|
@@ -32,6 +32,7 @@ export const deployAssets = async (options) => {
|
|
|
32
32
|
locale: settings.locale,
|
|
33
33
|
agents: settings.agents,
|
|
34
34
|
name: settings.name,
|
|
35
|
+
artifactId: settings.artifactId,
|
|
35
36
|
group: settings.group,
|
|
36
37
|
description: settings.description,
|
|
37
38
|
accelplatformVersion: settings.accelplatformVersion,
|
package/dist/asset/walker.js
CHANGED
package/dist/commands/attach.js
CHANGED
|
@@ -60,6 +60,10 @@ export const attachCommand = defineCommand({
|
|
|
60
60
|
type: "string",
|
|
61
61
|
description: "Locale (ja, en, zh_CN)",
|
|
62
62
|
},
|
|
63
|
+
"artifact-id": {
|
|
64
|
+
type: "string",
|
|
65
|
+
description: "Maven artifactId (defaults to project name)",
|
|
66
|
+
},
|
|
63
67
|
"skip-install": {
|
|
64
68
|
type: "boolean",
|
|
65
69
|
description: "Skip dependency installation",
|
|
@@ -96,6 +100,7 @@ export const attachCommand = defineCommand({
|
|
|
96
100
|
const agentArg = args.agent;
|
|
97
101
|
const promptOpts = {
|
|
98
102
|
name: args.name ?? basename(projectDir),
|
|
103
|
+
artifactId: args["artifact-id"],
|
|
99
104
|
jugglingProject: args["juggling-project"],
|
|
100
105
|
accelplatformVersion: args["accelplatform-version"],
|
|
101
106
|
module: modules,
|
|
@@ -123,6 +128,7 @@ export const attachCommand = defineCommand({
|
|
|
123
128
|
cliVersion: CLI_VERSION,
|
|
124
129
|
createdAt: new Date().toISOString(),
|
|
125
130
|
name: resolved.name,
|
|
131
|
+
artifactId: resolved.artifactId,
|
|
126
132
|
group: resolved.group,
|
|
127
133
|
projectVersion: resolved.projectVersion,
|
|
128
134
|
description: resolved.description,
|
package/dist/commands/init.d.ts
CHANGED
package/dist/commands/init.js
CHANGED
|
@@ -63,6 +63,10 @@ export const initCommand = defineCommand({
|
|
|
63
63
|
type: "string",
|
|
64
64
|
description: "Locale (ja, en, zh_CN)",
|
|
65
65
|
},
|
|
66
|
+
"artifact-id": {
|
|
67
|
+
type: "string",
|
|
68
|
+
description: "Maven artifactId (defaults to project name)",
|
|
69
|
+
},
|
|
66
70
|
"git-init": {
|
|
67
71
|
type: "boolean",
|
|
68
72
|
description: "Initialize git repository (use --no-git-init to disable)",
|
|
@@ -97,6 +101,7 @@ export const initCommand = defineCommand({
|
|
|
97
101
|
const agentArg = args.agent;
|
|
98
102
|
const promptOpts = {
|
|
99
103
|
name: projectName,
|
|
104
|
+
artifactId: args["artifact-id"],
|
|
100
105
|
jugglingProject: args["juggling-project"],
|
|
101
106
|
accelplatformVersion: args["accelplatform-version"],
|
|
102
107
|
module: modules,
|
|
@@ -134,6 +139,7 @@ export const initCommand = defineCommand({
|
|
|
134
139
|
cliVersion: CLI_VERSION,
|
|
135
140
|
createdAt: new Date().toISOString(),
|
|
136
141
|
name: resolved.name,
|
|
142
|
+
artifactId: resolved.artifactId,
|
|
137
143
|
group: resolved.group,
|
|
138
144
|
projectVersion: resolved.projectVersion,
|
|
139
145
|
description: resolved.description,
|
package/dist/core/constants.js
CHANGED
|
@@ -12,7 +12,8 @@ export const MODULE_OPTIONS = [
|
|
|
12
12
|
export const LOCALE_OPTIONS = ["ja", "en", "zh_CN"];
|
|
13
13
|
export const DEFAULT_SETTINGS = {
|
|
14
14
|
name: "my-accel-project",
|
|
15
|
-
|
|
15
|
+
artifactId: "",
|
|
16
|
+
group: "com.example",
|
|
16
17
|
projectVersion: "0.1.0",
|
|
17
18
|
description: "",
|
|
18
19
|
accelplatformVersion: "2025-Autumn",
|
package/dist/core/types.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ export type AccelSettings = {
|
|
|
59
59
|
cliVersion: string;
|
|
60
60
|
createdAt: string;
|
|
61
61
|
name: string;
|
|
62
|
+
artifactId: string;
|
|
62
63
|
group: string;
|
|
63
64
|
projectVersion: string;
|
|
64
65
|
description: string;
|
|
@@ -86,6 +87,7 @@ export type EvalContext = {
|
|
|
86
87
|
locale: string;
|
|
87
88
|
agents: string[];
|
|
88
89
|
name: string;
|
|
90
|
+
artifactId: string;
|
|
89
91
|
group: string;
|
|
90
92
|
description: string;
|
|
91
93
|
accelplatformVersion: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type Validator = (value: string) => string | undefined;
|
|
2
|
+
export type Validators = {
|
|
3
|
+
name: Validator;
|
|
4
|
+
artifactId: Validator;
|
|
5
|
+
group: Validator;
|
|
6
|
+
projectVersion: Validator;
|
|
7
|
+
versionLabel: Validator;
|
|
8
|
+
module: Validator;
|
|
9
|
+
database: Validator;
|
|
10
|
+
agent: Validator;
|
|
11
|
+
};
|
|
12
|
+
export declare const createValidators: (locale: string) => Validators;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { getMessage } from "../i18n/index.js";
|
|
2
|
+
import { AGENT_OPTIONS, DATABASE_OPTIONS, MODULE_OPTIONS, } from "./constants.js";
|
|
3
|
+
import { SELECTABLE_VERSIONS } from "./version-map.js";
|
|
4
|
+
const ARTIFACT_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
5
|
+
const GROUP_PATTERN = /^[A-Za-z_$][\w$]*(\.[A-Za-z_$][\w$]*)*$/;
|
|
6
|
+
const PROJECT_VERSION_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
7
|
+
const NAME_FORBIDDEN_CHARS = /[\\/:*?"<>|\x00-\x1f]/;
|
|
8
|
+
const isValidName = (value) => {
|
|
9
|
+
if (value.length === 0)
|
|
10
|
+
return false;
|
|
11
|
+
if (NAME_FORBIDDEN_CHARS.test(value))
|
|
12
|
+
return false;
|
|
13
|
+
if (value !== value.trim())
|
|
14
|
+
return false;
|
|
15
|
+
if (value.startsWith(".") || value.endsWith("."))
|
|
16
|
+
return false;
|
|
17
|
+
return true;
|
|
18
|
+
};
|
|
19
|
+
const isValidArtifactId = (value) => ARTIFACT_ID_PATTERN.test(value);
|
|
20
|
+
const isValidGroup = (value) => GROUP_PATTERN.test(value);
|
|
21
|
+
const isValidProjectVersion = (value) => PROJECT_VERSION_PATTERN.test(value);
|
|
22
|
+
const isValidVersionLabel = (value) => SELECTABLE_VERSIONS.some((v) => v.label === value);
|
|
23
|
+
const isValidModule = (value) => MODULE_OPTIONS.includes(value);
|
|
24
|
+
const isValidDatabase = (value) => DATABASE_OPTIONS.includes(value);
|
|
25
|
+
const isValidAgent = (value) => AGENT_OPTIONS.includes(value);
|
|
26
|
+
export const createValidators = (locale) => ({
|
|
27
|
+
name: (value) => isValidName(value)
|
|
28
|
+
? undefined
|
|
29
|
+
: getMessage("error.invalidName", locale, { value }),
|
|
30
|
+
artifactId: (value) => isValidArtifactId(value)
|
|
31
|
+
? undefined
|
|
32
|
+
: getMessage("error.invalidArtifactId", locale, { value }),
|
|
33
|
+
group: (value) => isValidGroup(value)
|
|
34
|
+
? undefined
|
|
35
|
+
: getMessage("error.invalidGroup", locale, { value }),
|
|
36
|
+
projectVersion: (value) => isValidProjectVersion(value)
|
|
37
|
+
? undefined
|
|
38
|
+
: getMessage("error.invalidProjectVersion", locale, { value }),
|
|
39
|
+
versionLabel: (value) => isValidVersionLabel(value)
|
|
40
|
+
? undefined
|
|
41
|
+
: getMessage("error.invalidVersion", locale, { version: value }),
|
|
42
|
+
module: (value) => isValidModule(value)
|
|
43
|
+
? undefined
|
|
44
|
+
: getMessage("error.invalidModule", locale, { module: value }),
|
|
45
|
+
database: (value) => isValidDatabase(value)
|
|
46
|
+
? undefined
|
|
47
|
+
: getMessage("error.invalidDatabase", locale, { database: value }),
|
|
48
|
+
agent: (value) => isValidAgent(value)
|
|
49
|
+
? undefined
|
|
50
|
+
: getMessage("error.invalidAgent", locale, { agent: value }),
|
|
51
|
+
});
|
package/dist/i18n/en.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export const messages = {
|
|
2
2
|
"prompt.name": "Enter project name",
|
|
3
|
+
"prompt.artifactId": "Enter artifact ID (Maven artifactId)",
|
|
3
4
|
"prompt.jugglingProject": "Enter IM-Juggling project path (optional)",
|
|
4
5
|
"prompt.accelplatformVersion": "Select iAP version",
|
|
5
6
|
"prompt.modules": "Select modules to use",
|
|
@@ -32,6 +33,10 @@ export const messages = {
|
|
|
32
33
|
"error.invalidModule": "Invalid module: {module}",
|
|
33
34
|
"error.invalidDatabase": "Invalid database: {database}",
|
|
34
35
|
"error.invalidAgent": "Invalid agent: {agent}",
|
|
36
|
+
"error.invalidName": "Project name contains invalid characters for a directory name, or is empty: {value}",
|
|
37
|
+
"error.invalidArtifactId": "Artifact ID violates Maven naming rules (^[A-Za-z0-9][A-Za-z0-9._-]*$): {value}",
|
|
38
|
+
"error.invalidGroup": "Group name violates Maven groupId naming rules (dot-separated Java identifiers): {value}",
|
|
39
|
+
"error.invalidProjectVersion": "Project version violates Maven version naming rules (^[A-Za-z0-9][A-Za-z0-9._-]*$): {value}",
|
|
35
40
|
"progress.downloading": "Downloading assets...",
|
|
36
41
|
"progress.deploying": "Deploying assets...",
|
|
37
42
|
"progress.installing": "Installing dependencies...",
|
package/dist/i18n/ja.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export const messages = {
|
|
2
2
|
"prompt.name": "プロジェクト名を入力してください",
|
|
3
|
+
"prompt.artifactId": "アーティファクトID(pomのartifactId)を入力してください",
|
|
3
4
|
"prompt.jugglingProject": "IM-Jugglingプロジェクトのパスを入力してください(省略可)",
|
|
4
5
|
"prompt.accelplatformVersion": "iAPバージョンを選択してください",
|
|
5
6
|
"prompt.modules": "利用するモジュールを選択してください",
|
|
@@ -32,6 +33,10 @@ export const messages = {
|
|
|
32
33
|
"error.invalidModule": "無効なモジュールです: {module}",
|
|
33
34
|
"error.invalidDatabase": "無効なデータベースです: {database}",
|
|
34
35
|
"error.invalidAgent": "無効なエージェントです: {agent}",
|
|
36
|
+
"error.invalidName": "プロジェクト名にディレクトリ名として使用できない文字が含まれています、または空です: {value}",
|
|
37
|
+
"error.invalidArtifactId": "アーティファクトIDが Maven の規約に違反しています(^[A-Za-z0-9][A-Za-z0-9._-]*$): {value}",
|
|
38
|
+
"error.invalidGroup": "グループ名が Maven groupId の規約に違反しています(ドット区切りのJava識別子): {value}",
|
|
39
|
+
"error.invalidProjectVersion": "プロジェクトバージョンが Maven version の規約に違反しています(^[A-Za-z0-9][A-Za-z0-9._-]*$): {value}",
|
|
35
40
|
"progress.downloading": "資材をダウンロードしています...",
|
|
36
41
|
"progress.deploying": "資材を配備しています...",
|
|
37
42
|
"progress.installing": "依存関係をインストールしています...",
|
package/dist/i18n/zh_CN.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export const messages = {
|
|
2
2
|
"prompt.name": "请输入项目名称",
|
|
3
|
+
"prompt.artifactId": "请输入构件ID(Maven artifactId)",
|
|
3
4
|
"prompt.jugglingProject": "请输入IM-Juggling项目路径(可选)",
|
|
4
5
|
"prompt.accelplatformVersion": "请选择iAP版本",
|
|
5
6
|
"prompt.modules": "请选择要使用的模块",
|
|
@@ -32,6 +33,10 @@ export const messages = {
|
|
|
32
33
|
"error.invalidModule": "无效的模块: {module}",
|
|
33
34
|
"error.invalidDatabase": "无效的数据库: {database}",
|
|
34
35
|
"error.invalidAgent": "无效的代理: {agent}",
|
|
36
|
+
"error.invalidName": "项目名称包含不能用作目录名的字符或为空: {value}",
|
|
37
|
+
"error.invalidArtifactId": "构件ID违反Maven命名规则(^[A-Za-z0-9][A-Za-z0-9._-]*$): {value}",
|
|
38
|
+
"error.invalidGroup": "组名违反Maven groupId命名规则(点分隔的Java标识符): {value}",
|
|
39
|
+
"error.invalidProjectVersion": "项目版本违反Maven version命名规则(^[A-Za-z0-9][A-Za-z0-9._-]*$): {value}",
|
|
35
40
|
"progress.downloading": "正在下载资源...",
|
|
36
41
|
"progress.deploying": "正在部署资源...",
|
|
37
42
|
"progress.installing": "正在安装依赖...",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { AccelSettings } from "../core/types.js";
|
|
2
|
+
import { type Validators } from "../core/validators.js";
|
|
2
3
|
export type PromptOptions = {
|
|
3
4
|
name?: string;
|
|
5
|
+
artifactId?: string;
|
|
4
6
|
jugglingProject?: string;
|
|
5
7
|
accelplatformVersion?: string;
|
|
6
8
|
module?: string[];
|
|
@@ -19,4 +21,5 @@ export type ResolvedOptions = Omit<AccelSettings, "cliVersion" | "createdAt" | "
|
|
|
19
21
|
withGit: boolean;
|
|
20
22
|
};
|
|
21
23
|
export declare const validateNonInteractive: (opts: PromptOptions) => string[];
|
|
24
|
+
export declare const validateCliValues: (opts: PromptOptions, validators: Validators) => void;
|
|
22
25
|
export declare const runPrompts: (opts: PromptOptions) => Promise<ResolvedOptions>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as p from "@clack/prompts";
|
|
2
2
|
import { DATABASE_OPTIONS, AGENT_OPTIONS, DEFAULT_SETTINGS, } from "../core/constants.js";
|
|
3
|
+
import { createValidators } from "../core/validators.js";
|
|
3
4
|
import { getMessage } from "../i18n/index.js";
|
|
4
5
|
import { detectAgents, detectDefaultAgents } from "./agent-detect.js";
|
|
5
6
|
import { parseJugglingFile } from "../juggling/parser.js";
|
|
@@ -25,8 +26,56 @@ export const validateNonInteractive = (opts) => {
|
|
|
25
26
|
missing.push("--name");
|
|
26
27
|
return missing;
|
|
27
28
|
};
|
|
29
|
+
export const validateCliValues = (opts, validators) => {
|
|
30
|
+
if (opts.name !== undefined) {
|
|
31
|
+
const err = validators.name(opts.name);
|
|
32
|
+
if (err)
|
|
33
|
+
throw new Error(err);
|
|
34
|
+
}
|
|
35
|
+
if (opts.artifactId !== undefined) {
|
|
36
|
+
const err = validators.artifactId(opts.artifactId);
|
|
37
|
+
if (err)
|
|
38
|
+
throw new Error(err);
|
|
39
|
+
}
|
|
40
|
+
if (opts.group !== undefined) {
|
|
41
|
+
const err = validators.group(opts.group);
|
|
42
|
+
if (err)
|
|
43
|
+
throw new Error(err);
|
|
44
|
+
}
|
|
45
|
+
if (opts.projectVersion !== undefined) {
|
|
46
|
+
const err = validators.projectVersion(opts.projectVersion);
|
|
47
|
+
if (err)
|
|
48
|
+
throw new Error(err);
|
|
49
|
+
}
|
|
50
|
+
if (opts.accelplatformVersion !== undefined) {
|
|
51
|
+
const err = validators.versionLabel(opts.accelplatformVersion);
|
|
52
|
+
if (err)
|
|
53
|
+
throw new Error(err);
|
|
54
|
+
}
|
|
55
|
+
if (opts.module !== undefined) {
|
|
56
|
+
for (const m of opts.module) {
|
|
57
|
+
const err = validators.module(m);
|
|
58
|
+
if (err)
|
|
59
|
+
throw new Error(err);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (opts.database !== undefined) {
|
|
63
|
+
const err = validators.database(opts.database);
|
|
64
|
+
if (err)
|
|
65
|
+
throw new Error(err);
|
|
66
|
+
}
|
|
67
|
+
if (opts.agent !== undefined) {
|
|
68
|
+
for (const a of opts.agent) {
|
|
69
|
+
const err = validators.agent(a);
|
|
70
|
+
if (err)
|
|
71
|
+
throw new Error(err);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
28
75
|
export const runPrompts = async (opts) => {
|
|
29
76
|
const locale = opts.locale;
|
|
77
|
+
const validators = createValidators(locale);
|
|
78
|
+
validateCliValues(opts, validators);
|
|
30
79
|
if (opts.noInteraction) {
|
|
31
80
|
const missing = validateNonInteractive(opts);
|
|
32
81
|
if (missing.length > 0) {
|
|
@@ -41,8 +90,10 @@ export const runPrompts = async (opts) => {
|
|
|
41
90
|
jugglingVersion = resolved.version;
|
|
42
91
|
jugglingModules = resolved.modules;
|
|
43
92
|
}
|
|
93
|
+
const resolvedName = opts.name ?? DEFAULT_SETTINGS.name;
|
|
44
94
|
return {
|
|
45
|
-
name:
|
|
95
|
+
name: resolvedName,
|
|
96
|
+
artifactId: opts.artifactId ?? resolvedName,
|
|
46
97
|
group: opts.group ?? DEFAULT_SETTINGS.group,
|
|
47
98
|
projectVersion: opts.projectVersion ?? DEFAULT_SETTINGS.projectVersion,
|
|
48
99
|
description: opts.description ?? DEFAULT_SETTINGS.description,
|
|
@@ -61,9 +112,19 @@ export const runPrompts = async (opts) => {
|
|
|
61
112
|
message: getMessage("prompt.name", locale),
|
|
62
113
|
defaultValue: opts.name ?? DEFAULT_SETTINGS.name,
|
|
63
114
|
initialValue: opts.name ?? DEFAULT_SETTINGS.name,
|
|
115
|
+
validate: validators.name,
|
|
64
116
|
}));
|
|
65
117
|
if (p.isCancel(name))
|
|
66
118
|
process.exit(0);
|
|
119
|
+
const artifactIdInitial = opts.artifactId ?? name;
|
|
120
|
+
const artifactId = (await p.text({
|
|
121
|
+
message: getMessage("prompt.artifactId", locale),
|
|
122
|
+
defaultValue: artifactIdInitial,
|
|
123
|
+
initialValue: artifactIdInitial,
|
|
124
|
+
validate: validators.artifactId,
|
|
125
|
+
}));
|
|
126
|
+
if (p.isCancel(artifactId))
|
|
127
|
+
process.exit(0);
|
|
67
128
|
const jugglingInput = (await p.text({
|
|
68
129
|
message: getMessage("prompt.jugglingProject", locale),
|
|
69
130
|
defaultValue: opts.jugglingProject ?? "",
|
|
@@ -93,6 +154,7 @@ export const runPrompts = async (opts) => {
|
|
|
93
154
|
message: getMessage("prompt.group", locale),
|
|
94
155
|
defaultValue: opts.group ?? DEFAULT_SETTINGS.group,
|
|
95
156
|
initialValue: opts.group ?? DEFAULT_SETTINGS.group,
|
|
157
|
+
validate: validators.group,
|
|
96
158
|
}));
|
|
97
159
|
if (p.isCancel(group))
|
|
98
160
|
process.exit(0);
|
|
@@ -100,6 +162,7 @@ export const runPrompts = async (opts) => {
|
|
|
100
162
|
message: getMessage("prompt.projectVersion", locale),
|
|
101
163
|
defaultValue: opts.projectVersion ?? DEFAULT_SETTINGS.projectVersion,
|
|
102
164
|
initialValue: opts.projectVersion ?? DEFAULT_SETTINGS.projectVersion,
|
|
165
|
+
validate: validators.projectVersion,
|
|
103
166
|
}));
|
|
104
167
|
if (p.isCancel(projectVersion))
|
|
105
168
|
process.exit(0);
|
|
@@ -147,6 +210,7 @@ export const runPrompts = async (opts) => {
|
|
|
147
210
|
}
|
|
148
211
|
return {
|
|
149
212
|
name,
|
|
213
|
+
artifactId,
|
|
150
214
|
group,
|
|
151
215
|
projectVersion,
|
|
152
216
|
description,
|