@postxl/cli 1.0.7 → 1.0.8
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.
|
@@ -48,10 +48,9 @@ function register(program) {
|
|
|
48
48
|
.command('create-project')
|
|
49
49
|
.alias('new')
|
|
50
50
|
.summary('Creates a new PostXL project.')
|
|
51
|
-
.description('Creates a new PostXL project with
|
|
51
|
+
.description('Creates a new PostXL project with the simple schema template.')
|
|
52
52
|
.option('-n, --name <name>', 'Project name')
|
|
53
53
|
.option('-s, --slug <slug>', 'Project slug')
|
|
54
|
-
.option('--schema <schema>', 'Schema to use (e.g. simple)')
|
|
55
54
|
.option('-p, --project-path <path>', 'Path where the generated project should be written. If not specified, a workspace project will be created in the projects folder')
|
|
56
55
|
.option('--skip-git', 'Skip initialing a git repository in the generated project directory')
|
|
57
56
|
.option('--skip-generate', 'Skip running the initial project generation')
|
|
@@ -60,7 +59,7 @@ function register(program) {
|
|
|
60
59
|
await checkNodeVersion();
|
|
61
60
|
const name = await getProjectName(options.name);
|
|
62
61
|
const slug = await getProjectSlug(options.slug, name);
|
|
63
|
-
const schema =
|
|
62
|
+
const schema = getProjectSchema();
|
|
64
63
|
const projectPath = await resolveProjectPath({ slug, projectPath: options.projectPath });
|
|
65
64
|
await createProjectStructure({
|
|
66
65
|
name,
|
|
@@ -114,14 +113,8 @@ async function getProjectSlug(providedSlug, projectName) {
|
|
|
114
113
|
}
|
|
115
114
|
return projectSlug;
|
|
116
115
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
let selectedSchemaKey = providedSchema;
|
|
120
|
-
if (!selectedSchemaKey || !schemaChoices.includes(selectedSchemaKey)) {
|
|
121
|
-
const selectedSchemaIndex = await select('Which schema would you like to use as a starter?', schemaChoices, 3);
|
|
122
|
-
selectedSchemaKey = schemaChoices[selectedSchemaIndex];
|
|
123
|
-
}
|
|
124
|
-
return schema_1.sampleSchemas[selectedSchemaKey];
|
|
116
|
+
function getProjectSchema() {
|
|
117
|
+
return schema_1.sampleSchemas.simple;
|
|
125
118
|
}
|
|
126
119
|
/**
|
|
127
120
|
* If projectPath is provided:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postxl/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Command-line interface for PostXL code generation framework",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"commander": "12.1.0",
|
|
45
45
|
"dotenv": "16.4.7",
|
|
46
46
|
"zod-validation-error": "3.4.0",
|
|
47
|
-
"@postxl/generator": "1.0.
|
|
48
|
-
"@postxl/generators": "1.0.
|
|
49
|
-
"@postxl/schema": "1.0.0"
|
|
47
|
+
"@postxl/generator": "^1.0.3",
|
|
48
|
+
"@postxl/generators": "^1.0.3",
|
|
49
|
+
"@postxl/schema": "^1.0.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {},
|
|
52
52
|
"wallaby": {
|