@platformatic/generators 1.50.0 → 2.0.0-alpha.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/README.md
CHANGED
|
@@ -21,8 +21,6 @@ The `setConfig({...})` function should be called to set the config generator. `B
|
|
|
21
21
|
- `initGitRepository`: Inits the git repository
|
|
22
22
|
- `dependencies`: A key value object to add dependencies in `package.json` file
|
|
23
23
|
- `devDependencies`: A key value object to add dev-dependencies in `package.json` file
|
|
24
|
-
- `staticWorkspaceGitHubActions`: Creates the GitHub action to deploy in a static workspace in Platformatic Cloud
|
|
25
|
-
- `dynamicWorkspaceGitHubActions`: Creates the GitHub action to deploy in a dynamic workspace in Platformatic Cloud
|
|
26
24
|
- `env`: A key/value object that will be automatically appended to the generated `.env` file
|
|
27
25
|
## Usage
|
|
28
26
|
|
package/lib/base-generator.d.ts
CHANGED
|
@@ -38,8 +38,6 @@ export namespace BaseGenerator {
|
|
|
38
38
|
devDependencies?: Dependency
|
|
39
39
|
typescript?: boolean
|
|
40
40
|
initGitRepository?: boolean
|
|
41
|
-
staticWorkspaceGitHubActions?: boolean
|
|
42
|
-
dynamicWorkspaceGitHubActions?: boolean
|
|
43
41
|
env?: KeyValue,
|
|
44
42
|
isRuntimeContext?: boolean,
|
|
45
43
|
serviceName?: string,
|
package/lib/base-generator.js
CHANGED
|
@@ -55,8 +55,6 @@ class BaseGenerator extends FileGenerator {
|
|
|
55
55
|
initGitRepository: false,
|
|
56
56
|
dependencies: {},
|
|
57
57
|
devDependencies: {},
|
|
58
|
-
staticWorkspaceGitHubActions: false,
|
|
59
|
-
dynamicWorkspaceGitHubActions: false,
|
|
60
58
|
isRuntimeContext: false,
|
|
61
59
|
serviceName: '',
|
|
62
60
|
envPrefix: '',
|
|
@@ -363,12 +363,12 @@ const { schema } = require('@platformatic/service')
|
|
|
363
363
|
const { version } = require('../package.json')
|
|
364
364
|
|
|
365
365
|
const ${schemaVarName} = {
|
|
366
|
-
...schema
|
|
366
|
+
...schema,
|
|
367
367
|
$id: '${schemaId}',
|
|
368
368
|
title: '${schemaTitle}',
|
|
369
369
|
version,
|
|
370
370
|
properties: {
|
|
371
|
-
...schema.
|
|
371
|
+
...schema.properties,
|
|
372
372
|
module: { type: 'string' },
|
|
373
373
|
greeting: {
|
|
374
374
|
type: 'object',
|
|
@@ -403,12 +403,12 @@ import { readFileSync } from 'node:fs'
|
|
|
403
403
|
const { version } = JSON.parse(readFileSync('package.json', 'utf8'))
|
|
404
404
|
|
|
405
405
|
const ${schemaVarName} = {
|
|
406
|
-
...schema
|
|
406
|
+
...schema,
|
|
407
407
|
$id: '${schemaId}',
|
|
408
408
|
title: '${schemaTitle}',
|
|
409
409
|
version,
|
|
410
410
|
properties: {
|
|
411
|
-
...schema.
|
|
411
|
+
...schema.properties,
|
|
412
412
|
module: { type: 'string' },
|
|
413
413
|
greeting: {
|
|
414
414
|
type: 'object',
|
package/package.json
CHANGED
|
@@ -92,8 +92,6 @@ test('setConfig', async (t) => {
|
|
|
92
92
|
plugin: false,
|
|
93
93
|
typescript: false,
|
|
94
94
|
initGitRepository: false,
|
|
95
|
-
staticWorkspaceGitHubActions: false,
|
|
96
|
-
dynamicWorkspaceGitHubActions: false,
|
|
97
95
|
env: {},
|
|
98
96
|
defaultEnv: {},
|
|
99
97
|
dependencies: {},
|
|
@@ -121,8 +119,6 @@ test('setConfig', async (t) => {
|
|
|
121
119
|
plugin: false,
|
|
122
120
|
typescript: false,
|
|
123
121
|
initGitRepository: false,
|
|
124
|
-
staticWorkspaceGitHubActions: false,
|
|
125
|
-
dynamicWorkspaceGitHubActions: false,
|
|
126
122
|
env: {},
|
|
127
123
|
defaultEnv: {},
|
|
128
124
|
dependencies: {},
|
|
@@ -142,8 +138,6 @@ test('setConfig', async (t) => {
|
|
|
142
138
|
plugin: false,
|
|
143
139
|
typescript: false,
|
|
144
140
|
initGitRepository: false,
|
|
145
|
-
staticWorkspaceGitHubActions: false,
|
|
146
|
-
dynamicWorkspaceGitHubActions: false,
|
|
147
141
|
env: {},
|
|
148
142
|
defaultEnv: {},
|
|
149
143
|
dependencies: {},
|
|
@@ -171,8 +165,6 @@ test('setConfig', async (t) => {
|
|
|
171
165
|
plugin: false,
|
|
172
166
|
typescript: false,
|
|
173
167
|
initGitRepository: false,
|
|
174
|
-
staticWorkspaceGitHubActions: false,
|
|
175
|
-
dynamicWorkspaceGitHubActions: false,
|
|
176
168
|
env: {},
|
|
177
169
|
defaultEnv: {},
|
|
178
170
|
dependencies: {},
|