@newlogic-digital/cli 0.0.14 → 0.0.15

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newlogic-digital/cli",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.mjs",
5
5
  "bin": {
6
6
  "newlogic-cli": "index.mjs",
@@ -110,7 +110,7 @@ export default function prepare(options) {
110
110
  const type = typeof controls[control]
111
111
  const value = typeof controls[control] === 'object' ? JSON.stringify(controls[control]) : controls[control]
112
112
 
113
- let phpType = type;
113
+ let phpType = type
114
114
 
115
115
  if (type === 'object' && Array.isArray(controls[control])) {
116
116
  phpType = 'array'
@@ -126,7 +126,7 @@ export default function prepare(options) {
126
126
  * @title ${getTitle(control)}
127
127
  * @value ${value}
128
128
  */
129
- public ${phpType} $${control}${type === 'string' ? " = '" + value + "'" : ""};
129
+ public ${phpType} $${control}${type === 'string' ? " = '" + value + "'" : ''};
130
130
  `)
131
131
 
132
132
  if (type === 'object') {
@@ -138,15 +138,15 @@ export default function prepare(options) {
138
138
  })
139
139
 
140
140
  if (annotations.length > 0) {
141
- annotations = annotations.map(item => item).join("");
141
+ annotations = annotations.map(item => item).join('')
142
142
  } else {
143
- annotations = "";
143
+ annotations = ''
144
144
  }
145
145
 
146
146
  if (objects.length > 0) {
147
- objects = objects.map(item => item).join("");
147
+ objects = objects.map(item => item).join('')
148
148
  } else {
149
- objects = "";
149
+ objects = ''
150
150
  }
151
151
 
152
152
  fs.writeFileSync(join(options.path.app.sections, `${name}.php`),
@@ -228,17 +228,16 @@ export default function prepare(options) {
228
228
 
229
229
  sections.forEach((section) => {
230
230
  if (section.src) {
231
- if (typeof sectionsUnsorted[section.src] === "undefined") {
231
+ if (typeof sectionsUnsorted[section.src] === 'undefined') {
232
232
  sectionsUnsorted[section.src] = []
233
- sectionsUnsorted[section.src].push(section);
233
+ sectionsUnsorted[section.src].push(section)
234
234
  } else {
235
- sectionsUnsorted[section.src].push(section);
235
+ sectionsUnsorted[section.src].push(section)
236
236
  }
237
237
  }
238
238
  })
239
239
  })
240
240
 
241
-
242
241
  Object.keys(sectionsUnsorted).forEach(key => {
243
242
  const sortedSection = {}
244
243
 
@@ -9,7 +9,7 @@ import prompts from 'prompts'
9
9
  const tempDir = join(os.tmpdir(), 'newlogic-cms-web')
10
10
 
11
11
  async function move(path, options = {}) {
12
- await fse.move(join(tempDir, path), resolve(process.cwd(), path), options).catch(err => console.log(`${pc.red(err)} - ${path}` ))
12
+ await fse.move(join(tempDir, path), resolve(process.cwd(), path), options).catch(err => console.log(`${pc.red(err)} - ${path}`))
13
13
  }
14
14
 
15
15
  function clone(path, { variant, branch }) {
@@ -54,7 +54,7 @@ async function prepare() {
54
54
  ])
55
55
 
56
56
  if (install === 'yes') {
57
- execSync(`newlogic cms prepare`)
57
+ execSync('newlogic cms prepare')
58
58
  }
59
59
  }
60
60
 
@@ -87,6 +87,7 @@ export default async function cms(name, { variant, branch }) {
87
87
  await move('docker-compose.yml')
88
88
  await move('phpstan.neon')
89
89
  await move('pint.json')
90
+ await fse.move(join(tempDir, '.gitlab-ci.prod.yml'), resolve(process.cwd(), '.gitlab-ci.yml'), { overwrite: true }).catch(err => console.log(`${pc.red(err)} - .gitlab-ci.yml`))
90
91
 
91
92
  fse.removeSync(tempDir)
92
93