lowdefy 4.0.0-alpha.14 → 4.0.0-alpha.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.
@@ -48,10 +48,12 @@ async function build({ context }) {
48
48
  context,
49
49
  directory
50
50
  });
51
- await runNextBuild({
52
- context,
53
- directory
54
- });
51
+ if (context.options.nextBuild !== false) {
52
+ await runNextBuild({
53
+ context,
54
+ directory
55
+ });
56
+ }
55
57
  await context.sendTelemetry({
56
58
  sendTypes: true
57
59
  });
package/dist/index.js CHANGED
@@ -25,7 +25,7 @@ const packageJson = require('../package.json');
25
25
  const { description , version: cliVersion } = packageJson;
26
26
  const program = new Command();
27
27
  program.name('lowdefy').description(description).version(cliVersion, '-v, --version');
28
- program.command('build').description('Build a Lowdefy production app.').usage(`[options]`).option('--config-directory <config-directory>', 'Change config directory. Default is the current working directory.').option('--disable-telemetry', 'Disable telemetry.').option('--package-manager <package-manager>', 'The package manager to use. Options are "npm" or "yarn".').option('--ref-resolver <ref-resolver-function-path>', 'Path to a JavaScript file containing a _ref resolver function to be used as the app default _ref resolver.').option('--server-directory <server-directory>', 'Change the server directory. Default is "<config-directory>/.lowdefy/server".').action(runCommand({
28
+ program.command('build').description('Build a Lowdefy production app.').usage(`[options]`).option('--config-directory <config-directory>', 'Change config directory. Default is the current working directory.').option('--disable-telemetry', 'Disable telemetry.').option('--no-next-build', 'Do not build the Next.js server.').option('--package-manager <package-manager>', 'The package manager to use. Options are "npm" or "yarn".').option('--ref-resolver <ref-resolver-function-path>', 'Path to a JavaScript file containing a _ref resolver function to be used as the app default _ref resolver.').option('--server-directory <server-directory>', 'Change the server directory. Default is "<config-directory>/.lowdefy/server".').action(runCommand({
29
29
  cliVersion,
30
30
  handler: build
31
31
  }));
@@ -56,7 +56,7 @@ let print;
56
56
  function createPrint() {
57
57
  // TODO: Add debug
58
58
  if (print) return print;
59
- if (process.env.CI === 'true') {
59
+ if (process.env.CI === 'true' || process.env.CI === '1') {
60
60
  print = createBasicPrint();
61
61
  return print;
62
62
  }
@@ -16,6 +16,8 @@
16
16
  function getDirectories({ configDirectory , options }) {
17
17
  const dotLowdefy = path.resolve(configDirectory, '.lowdefy');
18
18
  const server = options.serverDirectory ? path.resolve(options.serverDirectory) : path.join(dotLowdefy, 'server');
19
+ // TODO: Read server directory from env var
20
+ // Priority should be CLI arguments, env var, CLI options in Lowdefy config
19
21
  return {
20
22
  config: configDirectory,
21
23
  build: path.join(server, 'build'),
@@ -21,17 +21,15 @@ async function runLowdefyBuild({ context , directory }) {
21
21
  command: context.packageManagerCmd,
22
22
  args: [
23
23
  'run',
24
- 'build:lowdefy'
24
+ 'build:lowdefy',
25
+ '--ref-resolver',
26
+ context.options.refResolver,
27
+ '--config-directory',
28
+ context.directories.config,
25
29
  ],
26
30
  processOptions: {
27
31
  cwd: directory,
28
- env: {
29
- ...process.env,
30
- LOWDEFY_BUILD_REF_RESOLVER: context.options.refResolver,
31
- LOWDEFY_DIRECTORY_BUILD: context.directories.build,
32
- LOWDEFY_DIRECTORY_CONFIG: context.directories.config,
33
- LOWDEFY_DIRECTORY_SERVER: context.directories.server
34
- }
32
+ env: process.env
35
33
  },
36
34
  silent: false
37
35
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lowdefy",
3
- "version": "4.0.0-alpha.14",
3
+ "version": "4.0.0-alpha.15",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Lowdefy CLI",
6
6
  "homepage": "https://lowdefy.com",
@@ -40,8 +40,8 @@
40
40
  "test": "FORCE_COLOR=3 yarn node --experimental-vm-modules $(yarn bin jest)"
41
41
  },
42
42
  "dependencies": {
43
- "@lowdefy/helpers": "4.0.0-alpha.14",
44
- "@lowdefy/node-utils": "4.0.0-alpha.14",
43
+ "@lowdefy/helpers": "4.0.0-alpha.15",
44
+ "@lowdefy/node-utils": "4.0.0-alpha.15",
45
45
  "axios": "0.27.2",
46
46
  "chalk": "4.1.2",
47
47
  "commander": "9.0.0",
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "9cc0b7280c82a16689c31aaf71be278f3a40edc6"
65
+ "gitHead": "b4e4538475e997f95baa37f01f39689240e6f01c"
66
66
  }