lowdefy 4.0.0-alpha.13 → 4.0.0-alpha.16

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
  });
@@ -26,7 +26,6 @@ async function runStart({ context , directory }) {
26
26
  cwd: directory,
27
27
  env: {
28
28
  ...process.env,
29
- LOWDEFY_DIRECTORY_CONFIG: context.directories.config,
30
29
  PORT: context.options.port
31
30
  }
32
31
  },
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('--output-directory <output-directory>', 'Change the directory to which build artifacts are saved. Default is "<config-directory>/.lowdefy".').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
  }));
@@ -37,7 +37,7 @@ program.command('init').description('Initialize a Lowdefy project.').usage(`[opt
37
37
  cliVersion,
38
38
  handler: init
39
39
  }));
40
- program.command('start').description('Start 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('--output-directory <output-directory>', 'Change the directory to which build artifacts are saved. Default is "<config-directory>/.lowdefy".').option('--package-manager <package-manager>', 'The package manager to use. Options are "npm" or "yarn".').option('--port <port>', 'Change the port the server is hosted at. Default is 3000.').option('--server-directory <server-directory>', 'Change the server directory. Default is "<config-directory>/.lowdefy/server".').action(runCommand({
40
+ program.command('start').description('Start 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('--port <port>', 'Change the port the server is hosted at. Default is 3000.').option('--server-directory <server-directory>', 'Change the server directory. Default is "<config-directory>/.lowdefy/server".').action(runCommand({
41
41
  cliVersion,
42
42
  handler: start
43
43
  }));
@@ -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
  }
@@ -14,17 +14,14 @@
14
14
  limitations under the License.
15
15
  */ import path from 'path';
16
16
  function getDirectories({ configDirectory , options }) {
17
- let dotLowdefy;
18
- if (options.outputDirectory) {
19
- dotLowdefy = path.resolve(options.outputDirectory);
20
- } else {
21
- dotLowdefy = path.resolve(configDirectory, '.lowdefy');
22
- }
17
+ const dotLowdefy = path.resolve(configDirectory, '.lowdefy');
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
23
21
  return {
24
22
  config: configDirectory,
25
- build: path.join(dotLowdefy, 'server', 'build'),
26
- dotLowdefy,
27
- server: options.serverDirectory ? path.resolve(options.serverDirectory) : path.join(dotLowdefy, 'server'),
23
+ build: path.join(server, 'build'),
24
+ server,
28
25
  dev: options.devDirectory ? path.resolve(options.devDirectory) : path.join(dotLowdefy, 'dev')
29
26
  };
30
27
  }
@@ -28,9 +28,7 @@ async function runLowdefyBuild({ context , directory }) {
28
28
  env: {
29
29
  ...process.env,
30
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
31
+ LOWDEFY_DIRECTORY_CONFIG: context.directories.config
34
32
  }
35
33
  },
36
34
  silent: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lowdefy",
3
- "version": "4.0.0-alpha.13",
3
+ "version": "4.0.0-alpha.16",
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.13",
44
- "@lowdefy/node-utils": "4.0.0-alpha.13",
43
+ "@lowdefy/helpers": "4.0.0-alpha.16",
44
+ "@lowdefy/node-utils": "4.0.0-alpha.16",
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": "e99b4b6c1f59804982fc148c0fe39dcf13b35d77"
65
+ "gitHead": "91459befdeb9b22aaba40e8c51d6a173a11ea939"
66
66
  }