lowdefy 4.0.0-rc.5 → 4.0.0-rc.6

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.
@@ -16,15 +16,13 @@
16
16
  import { get, type } from '@lowdefy/helpers';
17
17
  import { readFile } from '@lowdefy/node-utils';
18
18
  import YAML from 'yaml';
19
- async function getLowdefyYaml({ configDirectory , command }) {
19
+ async function getLowdefyYaml({ configDirectory , requiresLowdefyYaml }) {
20
20
  let lowdefyYaml = await readFile(path.join(configDirectory, 'lowdefy.yaml'));
21
21
  if (!lowdefyYaml) {
22
22
  lowdefyYaml = await readFile(path.join(configDirectory, 'lowdefy.yml'));
23
23
  }
24
24
  if (!lowdefyYaml) {
25
- if (![
26
- 'init'
27
- ].includes(command)) {
25
+ if (requiresLowdefyYaml) {
28
26
  throw new Error(`Could not find "lowdefy.yaml" file in specified config directory ${configDirectory}.`);
29
27
  }
30
28
  return {
@@ -14,7 +14,7 @@
14
14
  limitations under the License.
15
15
  */ import path from 'path';
16
16
  import { type } from '@lowdefy/helpers';
17
- import checkForUpdatedVersions from './checkForUpdatedVersions.js';
17
+ import validateVersion from './validateVersion.js';
18
18
  import checkPnpmIsInstalled from './checkPnpmIsInstalled.js';
19
19
  import getCliJson from './getCliJson.js';
20
20
  import getDirectories from './getDirectories.js';
@@ -26,6 +26,9 @@ async function startUp({ context , options ={} , command }) {
26
26
  context.command = command.name();
27
27
  context.commandLineOptions = options;
28
28
  context.configDirectory = path.resolve(options.configDirectory || process.cwd());
29
+ context.requiresLowdefyYaml = ![
30
+ 'init'
31
+ ].includes(command.name());
29
32
  const { cliConfig , lowdefyVersion , plugins } = await getLowdefyYaml(context);
30
33
  context.cliConfig = cliConfig;
31
34
  context.lowdefyVersion = lowdefyVersion;
@@ -39,7 +42,7 @@ async function startUp({ context , options ={} , command }) {
39
42
  context.directories = getDirectories(context);
40
43
  context.pnpmCmd = process.platform === 'win32' ? 'pnpm.cmd' : 'pnpm';
41
44
  checkPnpmIsInstalled(context);
42
- await checkForUpdatedVersions(context);
45
+ await validateVersion(context);
43
46
  context.sendTelemetry = getSendTelemetry(context);
44
47
  if (type.isNone(lowdefyVersion)) {
45
48
  context.print.log(`Running 'lowdefy ${context.command}'.`);
@@ -14,7 +14,10 @@
14
14
  limitations under the License.
15
15
  */ import axios from 'axios';
16
16
  import semver from 'semver';
17
- async function checkForUpdatedVersions({ cliVersion , lowdefyVersion , print }) {
17
+ async function validateVersion({ cliVersion , lowdefyVersion , print , requiresLowdefyYaml }) {
18
+ if (!requiresLowdefyYaml) {
19
+ return;
20
+ }
18
21
  if (lowdefyVersion === 'local') {
19
22
  return;
20
23
  }
@@ -71,4 +74,4 @@ async function checkForUpdatedVersions({ cliVersion , lowdefyVersion , print })
71
74
  function isExperimentalVersion(version) {
72
75
  return version.includes('alpha') || version.includes('beta') || version.includes('rc');
73
76
  }
74
- export default checkForUpdatedVersions;
77
+ export default validateVersion;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lowdefy",
3
- "version": "4.0.0-rc.5",
3
+ "version": "4.0.0-rc.6",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Lowdefy CLI",
6
6
  "homepage": "https://lowdefy.com",
@@ -39,8 +39,8 @@
39
39
  "test": "FORCE_COLOR=3 node --experimental-vm-modules node_modules/jest/bin/jest.js"
40
40
  },
41
41
  "dependencies": {
42
- "@lowdefy/helpers": "4.0.0-rc.5",
43
- "@lowdefy/node-utils": "4.0.0-rc.5",
42
+ "@lowdefy/helpers": "4.0.0-rc.6",
43
+ "@lowdefy/node-utils": "4.0.0-rc.6",
44
44
  "axios": "1.2.2",
45
45
  "commander": "9.4.1",
46
46
  "decompress": "4.2.1",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "c45ba409f3824cad446d20789538ff14b05c7513"
64
+ "gitHead": "8238145a9eb26c6f3dc48661ab6eca6e3aca4f83"
65
65
  }