create-platformatic 2.5.2 → 2.5.4
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/package.json +8 -8
- package/src/index.mjs +11 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-platformatic",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.4",
|
|
4
4
|
"description": "Create platformatic application interactive tool",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"strip-ansi": "^7.1.0",
|
|
35
35
|
"undici": "^6.9.0",
|
|
36
36
|
"which": "^3.0.1",
|
|
37
|
-
"@platformatic/config": "2.5.
|
|
38
|
-
"@platformatic/generators": "2.5.
|
|
39
|
-
"@platformatic/utils": "2.5.
|
|
37
|
+
"@platformatic/config": "2.5.4",
|
|
38
|
+
"@platformatic/generators": "2.5.4",
|
|
39
|
+
"@platformatic/utils": "2.5.4"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^22.5.0",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"neostandard": "^0.11.1",
|
|
52
52
|
"typescript": "~5.6.0",
|
|
53
53
|
"yaml": "^2.4.1",
|
|
54
|
-
"@platformatic/composer": "2.5.
|
|
55
|
-
"@platformatic/db": "2.5.
|
|
56
|
-
"@platformatic/runtime": "2.5.
|
|
57
|
-
"@platformatic/service": "2.5.
|
|
54
|
+
"@platformatic/composer": "2.5.4",
|
|
55
|
+
"@platformatic/db": "2.5.4",
|
|
56
|
+
"@platformatic/runtime": "2.5.4",
|
|
57
|
+
"@platformatic/service": "2.5.4"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"test:cli": "borp --pattern \"test/cli/*test.mjs\" --timeout=180000 --concurrency=1",
|
package/src/index.mjs
CHANGED
|
@@ -15,6 +15,7 @@ import { request } from 'undici'
|
|
|
15
15
|
import { createGitRepository } from './create-git-repository.mjs'
|
|
16
16
|
import { say } from './say.mjs'
|
|
17
17
|
import { getUsername, getVersion } from './utils.mjs'
|
|
18
|
+
import { ConfigManager } from '@platformatic/config'
|
|
18
19
|
|
|
19
20
|
const MARKETPLACE_HOST = 'https://marketplace.platformatic.dev'
|
|
20
21
|
const defaultStackables = ['@platformatic/composer', '@platformatic/db', '@platformatic/service']
|
|
@@ -110,14 +111,17 @@ export const createPlatformatic = async argv => {
|
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
async function createApplication (args, logger, pkgManager) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
let projectDir = process.cwd()
|
|
115
|
+
if (!(await ConfigManager.findConfigFile())) {
|
|
116
|
+
const optionsDir = await inquirer.prompt({
|
|
117
|
+
type: 'input',
|
|
118
|
+
name: 'dir',
|
|
119
|
+
message: 'Where would you like to create your project?',
|
|
120
|
+
default: 'platformatic',
|
|
121
|
+
})
|
|
119
122
|
|
|
120
|
-
|
|
123
|
+
projectDir = path.resolve(process.cwd(), optionsDir.dir)
|
|
124
|
+
}
|
|
121
125
|
const projectName = basename(projectDir)
|
|
122
126
|
|
|
123
127
|
await createDirectory(projectDir)
|