create-platformatic 1.3.1 → 1.4.1
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 +4 -4
- package/src/composer/create-composer.mjs +1 -2
- package/src/ghaction.mjs +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-platformatic",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Create platformatic-db interactive tool",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"strip-ansi": "^7.1.0",
|
|
36
36
|
"undici": "^5.25.4",
|
|
37
37
|
"which": "^3.0.1",
|
|
38
|
-
"@platformatic/config": "1.
|
|
38
|
+
"@platformatic/config": "1.4.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"ajv": "^8.12.0",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"tap": "^16.3.9",
|
|
49
49
|
"typescript": "~5.2.2",
|
|
50
50
|
"yaml": "^2.3.2",
|
|
51
|
-
"@platformatic/db": "1.
|
|
52
|
-
"@platformatic/service": "1.
|
|
51
|
+
"@platformatic/db": "1.4.1",
|
|
52
|
+
"@platformatic/service": "1.4.1"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"test:cli": "tap --no-coverage test/cli/*test.mjs -t120",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFile, writeFile, appendFile } from 'fs/promises'
|
|
2
2
|
import { join } from 'path'
|
|
3
3
|
import * as desm from 'desm'
|
|
4
|
-
import { generatePlugins
|
|
4
|
+
import { generatePlugins } from '../create-plugins.mjs'
|
|
5
5
|
import { createDynamicWorkspaceGHAction, createStaticWorkspaceGHAction } from '../ghaction.mjs'
|
|
6
6
|
import { getTsConfig } from '../get-tsconfig.mjs'
|
|
7
7
|
import { createGitRepository } from '../create-git-repository.mjs'
|
|
@@ -118,7 +118,6 @@ async function createComposer (
|
|
|
118
118
|
/* c8 ignore next 5 */
|
|
119
119
|
logger.info('Environment file .env successfully created.')
|
|
120
120
|
await generatePlugins(logger, currentDir, typescript, 'composer')
|
|
121
|
-
await generateRouteWithTypesSupport(logger, currentDir, true)
|
|
122
121
|
|
|
123
122
|
if (typescript === true) {
|
|
124
123
|
const tsConfigFileName = join(currentDir, 'tsconfig.json')
|
package/src/ghaction.mjs
CHANGED
|
@@ -39,6 +39,12 @@ on:
|
|
|
39
39
|
paths-ignore:
|
|
40
40
|
- 'docs/**'
|
|
41
41
|
- '**.md'
|
|
42
|
+
workflow_dispatch:
|
|
43
|
+
inputs:
|
|
44
|
+
label:
|
|
45
|
+
description: "Preview Label"
|
|
46
|
+
required: true
|
|
47
|
+
default: ""
|
|
42
48
|
|
|
43
49
|
jobs:
|
|
44
50
|
build_and_deploy:
|
|
@@ -65,6 +71,7 @@ ${envString}
|
|
|
65
71
|
platformatic_workspace_id: \${{ secrets.PLATFORMATIC_DYNAMIC_WORKSPACE_ID }}
|
|
66
72
|
platformatic_workspace_key: \${{ secrets.PLATFORMATIC_DYNAMIC_WORKSPACE_API_KEY }}
|
|
67
73
|
platformatic_config_path: ${config}
|
|
74
|
+
label: \${{ github.event.inputs.label }}
|
|
68
75
|
outputs:
|
|
69
76
|
deployment_id: \${{ steps.deploy-project.outputs.deployment_id }}
|
|
70
77
|
calculate_risk:
|
|
@@ -76,6 +83,7 @@ ${envString}
|
|
|
76
83
|
steps:
|
|
77
84
|
- name: Calculate risk
|
|
78
85
|
uses: platformatic/onestep/actions/calculate-risk@latest
|
|
86
|
+
if: github.event_name == 'pull_request'
|
|
79
87
|
with:
|
|
80
88
|
github_token: \${{ secrets.GITHUB_TOKEN }}
|
|
81
89
|
platformatic_workspace_id: \${{ secrets.PLATFORMATIC_DYNAMIC_WORKSPACE_ID }}
|
|
@@ -95,6 +103,8 @@ on:
|
|
|
95
103
|
paths-ignore:
|
|
96
104
|
- 'docs/**'
|
|
97
105
|
- '**.md'
|
|
106
|
+
workflow_dispatch:
|
|
107
|
+
inputs:
|
|
98
108
|
|
|
99
109
|
jobs:
|
|
100
110
|
build_and_deploy:
|