lowdefy 4.0.0-alpha.1 → 4.0.0-alpha.7

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.
Files changed (33) hide show
  1. package/dist/commands/build/build.js +21 -19
  2. package/dist/commands/build/installServer.js +43 -0
  3. package/dist/commands/build/runLowdefyBuild.js +43 -0
  4. package/dist/commands/build/runNextBuild.js +36 -0
  5. package/dist/commands/dev/dev.js +9 -57
  6. package/dist/commands/dev/installServer.js +43 -0
  7. package/dist/commands/dev/runDevServer.js +39 -0
  8. package/dist/commands/init/init.js +5 -11
  9. package/dist/commands/init/lowdefyFile.js +1 -1
  10. package/dist/commands/start/runStart.js +36 -0
  11. package/dist/{utils/checkChildProcessError.js → commands/start/start.js} +11 -6
  12. package/dist/index.js +23 -56
  13. package/dist/utils/BatchChanges.js +24 -11
  14. package/dist/utils/checkForUpdatedVersions.js +11 -0
  15. package/dist/utils/{print.js → createPrint.js} +1 -0
  16. package/dist/utils/errorHandler.js +2 -3
  17. package/dist/utils/fetchNpmTarball.js +2 -1
  18. package/dist/utils/getCliJson.js +5 -8
  19. package/dist/utils/getDirectories.js +9 -5
  20. package/dist/utils/getLowdefyYaml.js +10 -12
  21. package/dist/utils/getPackageManager.js +54 -0
  22. package/dist/utils/getSendTelemetry.js +17 -8
  23. package/dist/utils/getServer.js +45 -0
  24. package/dist/utils/runCommand.js +22 -23
  25. package/dist/utils/startUp.js +6 -6
  26. package/package.json +15 -18
  27. package/dist/commands/dev/buildWatcher.js +0 -48
  28. package/dist/commands/dev/envWatcher.js +0 -32
  29. package/dist/commands/dev/getBuild.js +0 -37
  30. package/dist/commands/dev/getExpress.js +0 -71
  31. package/dist/commands/dev/getGraphQL.js +0 -39
  32. package/dist/commands/dev/prepare.js +0 -27
  33. package/dist/commands/dev/versionWatcher.js +0 -36
@@ -1,36 +0,0 @@
1
- /*
2
- Copyright 2020-2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import chokidar from 'chokidar';
16
- import BatchChanges from '../../utils/BatchChanges';
17
- import getLowdefyYaml from '../../utils/getLowdefyYaml';
18
- function versionWatcher({ context }) {
19
- const changeLowdefyFileCallback = async ()=>{
20
- const { lowdefyVersion } = await getLowdefyYaml(context);
21
- if (lowdefyVersion !== context.lowdefyVersion) {
22
- context.print.warn('Lowdefy version changed. You should restart your development server.');
23
- process.exit();
24
- }
25
- };
26
- const changeLowdefyFileBatchChanges = new BatchChanges({
27
- fn: changeLowdefyFileCallback,
28
- context
29
- });
30
- const lowdefyFileWatcher = chokidar.watch('./lowdefy.yaml', {
31
- persistent: true
32
- });
33
- lowdefyFileWatcher.on('change', ()=>changeLowdefyFileBatchChanges.newChange()
34
- );
35
- }
36
- export default versionWatcher;