create-platformatic 2.5.0 → 2.5.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/package.json +9 -9
- package/src/index.mjs +1 -9
- package/src/utils.mjs +0 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-platformatic",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.2",
|
|
4
4
|
"description": "Create platformatic application interactive tool",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"create-platformatic": "./create-platformatic.mjs"
|
|
14
14
|
},
|
|
15
15
|
"license": "Apache-2.0",
|
|
16
|
-
"author": "
|
|
16
|
+
"author": "Platformatic Inc. <oss@platformatic.dev> (https://platformatic.dev)",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"boring-name-generator": "^1.0.3",
|
|
19
19
|
"chalk": "^5.3.0",
|
|
@@ -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/
|
|
38
|
-
"@platformatic/
|
|
39
|
-
"@platformatic/utils": "2.5.
|
|
37
|
+
"@platformatic/config": "2.5.2",
|
|
38
|
+
"@platformatic/generators": "2.5.2",
|
|
39
|
+
"@platformatic/utils": "2.5.2"
|
|
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/
|
|
56
|
-
"@platformatic/
|
|
57
|
-
"@platformatic/
|
|
54
|
+
"@platformatic/composer": "2.5.2",
|
|
55
|
+
"@platformatic/db": "2.5.2",
|
|
56
|
+
"@platformatic/runtime": "2.5.2",
|
|
57
|
+
"@platformatic/service": "2.5.2"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"test:cli": "borp --pattern \"test/cli/*test.mjs\" --timeout=180000 --concurrency=1",
|
package/src/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import resolve from 'resolve'
|
|
|
14
14
|
import { request } from 'undici'
|
|
15
15
|
import { createGitRepository } from './create-git-repository.mjs'
|
|
16
16
|
import { say } from './say.mjs'
|
|
17
|
-
import { getUsername, getVersion
|
|
17
|
+
import { getUsername, getVersion } from './utils.mjs'
|
|
18
18
|
|
|
19
19
|
const MARKETPLACE_HOST = 'https://marketplace.platformatic.dev'
|
|
20
20
|
const defaultStackables = ['@platformatic/composer', '@platformatic/db', '@platformatic/service']
|
|
@@ -98,14 +98,6 @@ export const createPlatformatic = async argv => {
|
|
|
98
98
|
const greeting = username ? `Hello ${username},` : 'Hello,'
|
|
99
99
|
await say(`${greeting} welcome to ${version ? `Platformatic ${version}!` : 'Platformatic!'}`)
|
|
100
100
|
|
|
101
|
-
const currentVersion = process.versions.node
|
|
102
|
-
const supported = isCurrentVersionSupported(currentVersion)
|
|
103
|
-
if (!supported) {
|
|
104
|
-
const supportedVersions = minimumSupportedNodeVersions.join(' or >= ')
|
|
105
|
-
await say(`Platformatic is not supported on Node.js v${currentVersion}.`)
|
|
106
|
-
await say(`Please use one of the following Node.js versions >= ${supportedVersions}.`)
|
|
107
|
-
}
|
|
108
|
-
|
|
109
101
|
const logger = pino(
|
|
110
102
|
pretty({
|
|
111
103
|
translateTime: 'SYS:HH:MM:ss',
|
package/src/utils.mjs
CHANGED
|
@@ -3,7 +3,6 @@ import { execa } from 'execa'
|
|
|
3
3
|
import { access, constants, readFile } from 'fs/promises'
|
|
4
4
|
import { createRequire } from 'module'
|
|
5
5
|
import { dirname, join, resolve } from 'path'
|
|
6
|
-
import semver from 'semver'
|
|
7
6
|
import * as url from 'url'
|
|
8
7
|
|
|
9
8
|
import ConfigManager from '@platformatic/config'
|
|
@@ -116,18 +115,6 @@ export const getDependencyVersion = async dependencyName => {
|
|
|
116
115
|
}
|
|
117
116
|
}
|
|
118
117
|
|
|
119
|
-
export const minimumSupportedNodeVersions = ['18.8.0', '20.6.0']
|
|
120
|
-
|
|
121
|
-
export const isCurrentVersionSupported = currentVersion => {
|
|
122
|
-
// TODO: add try/catch if some unsupported node version is passed
|
|
123
|
-
for (const version of minimumSupportedNodeVersions) {
|
|
124
|
-
if (semver.major(currentVersion) === semver.major(version) && semver.gte(currentVersion, version)) {
|
|
125
|
-
return true
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
return false
|
|
129
|
-
}
|
|
130
|
-
|
|
131
118
|
export function convertServiceNameToPrefix (serviceName) {
|
|
132
119
|
return serviceName.replace(/-/g, '_').toUpperCase()
|
|
133
120
|
}
|