@lowdefy/server-dev 4.0.0-alpha.6 → 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.
- package/next.config.js +6 -4
- package/package.json +34 -32
- package/src/components/App.js +9 -7
- package/src/components/LowdefyContext.js +13 -13
- package/src/components/Page.js +2 -2
- package/src/components/Reload.js +2 -2
- package/src/components/block/CategorySwitch.js +2 -5
- package/src/components/block/Container.js +1 -2
- package/src/components/block/List.js +1 -2
- package/src/components/{components.js → createComponents.js} +8 -4
- package/src/components/createLinkComponent.js +97 -0
- package/src/manager/getContext.mjs +36 -21
- package/src/manager/{initialBuild.mjs → processes/initialBuild.mjs} +7 -4
- package/src/manager/processes/installPlugins.mjs +2 -2
- package/src/manager/processes/lowdefyBuild.mjs +4 -3
- package/src/manager/processes/nextBuild.mjs +4 -4
- package/src/manager/{watchers/configWatcher.mjs → processes/readDotEnv.mjs} +8 -8
- package/src/manager/processes/reloadClients.mjs +1 -1
- package/src/manager/processes/{startServerProcess.mjs → restartServer.mjs} +8 -15
- package/src/manager/processes/shutdownServer.mjs +35 -0
- package/src/manager/processes/startNextServer.mjs +45 -0
- package/src/manager/processes/startServer.mjs +3 -3
- package/src/manager/processes/startWatchers.mjs +31 -0
- package/src/manager/run.mjs +57 -6
- package/src/manager/{BatchChanges.mjs → utils/BatchChanges.mjs} +1 -0
- package/src/manager/utils/getLowdefyVersion.mjs +51 -0
- package/src/manager/{watchers → utils}/setupWatcher.mjs +12 -6
- package/src/manager/{spawnProcess.mjs → utils/spawnProcess.mjs} +0 -0
- package/src/manager/watchers/envWatcher.mjs +5 -3
- package/src/manager/watchers/lowdefyBuildWatcher.mjs +45 -0
- package/src/manager/watchers/nextBuildWatcher.mjs +93 -0
- package/src/pages/_app.js +4 -2
- package/src/pages/api/reload.js +0 -2
- package/src/pages/api/request/[pageId]/[requestId].js +1 -0
- package/src/utils/callRequest.js +2 -2
- package/src/utils/setPageId.js +3 -3
- package/src/utils/setupLink.js +22 -14
- package/src/utils/useMutateCache.js +3 -3
- package/src/utils/usePageConfig.js +2 -5
- package/src/utils/useRootConfig.js +4 -4
- package/src/utils/waitForRestartedServer.js +1 -1
- package/src/manager/watchers/startWatchers.mjs +0 -64
|
@@ -1,64 +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
|
-
*/
|
|
16
|
-
|
|
17
|
-
import configWatcher from './configWatcher.mjs';
|
|
18
|
-
import envWatcher from './envWatcher.mjs';
|
|
19
|
-
|
|
20
|
-
/*
|
|
21
|
-
Config change
|
|
22
|
-
Watch <config-dir>, <watch-dirs>, !<ignore-dirs>
|
|
23
|
-
- Lowdefy build
|
|
24
|
-
- Trigger soft reload
|
|
25
|
-
----------------------------------------
|
|
26
|
-
Install new plugin
|
|
27
|
-
Watch <server>/package.json
|
|
28
|
-
|
|
29
|
-
- Install Server.
|
|
30
|
-
- Next build.
|
|
31
|
-
- No need for Lowdefy build (confirm?)
|
|
32
|
-
- Trigger hard reload
|
|
33
|
-
- Restart server.
|
|
34
|
-
|
|
35
|
-
----------------------------------------
|
|
36
|
-
.env change
|
|
37
|
-
Watch <config-dir>/.env
|
|
38
|
-
- Trigger hard reload
|
|
39
|
-
- Restart server.
|
|
40
|
-
----------------------------------------
|
|
41
|
-
Lowdefy version changed
|
|
42
|
-
Watch <config-dir>/lowdefy.yaml
|
|
43
|
-
- Warn and process.exit()
|
|
44
|
-
----------------------------------------
|
|
45
|
-
Style vars/app config change
|
|
46
|
-
Watch <server-dir>/build/app.json
|
|
47
|
-
Watch <server-dir>/build/config.json
|
|
48
|
-
- Next build.
|
|
49
|
-
- Trigger hard reload
|
|
50
|
-
- Restart server.
|
|
51
|
-
|
|
52
|
-
----------------------------------------
|
|
53
|
-
New plugin or icon used.
|
|
54
|
-
Watch <server-dir>/build/plugins/*
|
|
55
|
-
- Next build. (or dynamic import?)
|
|
56
|
-
- Trigger hard reload
|
|
57
|
-
- Restart server.
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
async function startWatchers(context) {
|
|
61
|
-
await Promise.all([configWatcher(context), envWatcher(context)]);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export default startWatchers;
|