alemonjs 2.1.30 → 2.1.32

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.
@@ -26,7 +26,9 @@ const definePlatform = (options) => {
26
26
  process.send(JSON.stringify({ type: 'ready' }));
27
27
  }
28
28
  };
29
- mainProcess();
29
+ if (!global.__client_loaded) {
30
+ mainProcess();
31
+ }
30
32
  return options.main;
31
33
  };
32
34
 
package/lib/client.js CHANGED
@@ -33,6 +33,7 @@ import './process/platform.js';
33
33
  import './process/module.js';
34
34
  import { createServer } from './server/main.js';
35
35
 
36
+ global.__client_loaded = true;
36
37
  const mainServer = () => {
37
38
  const port = process.env.serverPort;
38
39
  if (!port) {
@@ -168,6 +168,9 @@ function startPlatformAdapterWithFallback() {
168
168
  try {
169
169
  const data = typeof message === 'string' ? JSON.parse(message) : message;
170
170
  if (data?.type === 'ready') {
171
+ if (manager.ready) {
172
+ return;
173
+ }
171
174
  manager.ready = true;
172
175
  if (manager.timer) {
173
176
  clearTimeout(manager.timer);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alemonjs",
3
- "version": "2.1.30",
3
+ "version": "2.1.32",
4
4
  "description": "bot script",
5
5
  "author": "lemonade",
6
6
  "license": "MIT",