@modern-js/plugin-devtools 0.0.0-nightly-20231105170700 → 0.0.0-nightly-20231107030348

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/dist/cli.js CHANGED
@@ -62,7 +62,7 @@ const devtoolsPlugin = (options) => ({
62
62
  res.end();
63
63
  };
64
64
  const useMainRoute = () => {
65
- req.url = "/html/main/index.html";
65
+ req.url = "/html/client/index.html";
66
66
  serveMiddleware(req, res, usePageNotFound);
67
67
  };
68
68
  serveMiddleware(req, res, useMainRoute);
@@ -79,19 +79,6 @@ const devtoolsPlugin = (options) => ({
79
79
  return {
80
80
  prepare: rpc.hooks.prepare,
81
81
  modifyFileSystemRoutes: rpc.hooks.modifyFileSystemRoutes,
82
- validateSchema() {
83
- return [
84
- {
85
- target: "devtools",
86
- schema: {
87
- typeof: [
88
- "boolean",
89
- "object"
90
- ]
91
- }
92
- }
93
- ];
94
- },
95
82
  beforeRestart() {
96
83
  return new Promise((resolve, reject) => httpServer.close((err) => err ? reject(err) : resolve()));
97
84
  },
@@ -102,9 +89,10 @@ const devtoolsPlugin = (options) => ({
102
89
  const mountOpts = {
103
90
  dataSource: `${import_devtools_kit.ROUTE_BASENAME}/rpc`,
104
91
  endpoint: import_devtools_kit.ROUTE_BASENAME,
92
+ def: new import_devtools_kit.ClientDefinition(),
105
93
  __keep: true
106
94
  };
107
- let runtimeEntry = require.resolve("@modern-js/plugin-devtools/runtime");
95
+ let runtimeEntry = require.resolve("@modern-js/devtools-client/mount");
108
96
  runtimeEntry = (0, import_ufo.withQuery)(runtimeEntry, mountOpts);
109
97
  return {
110
98
  builderPlugins: [
@@ -113,10 +101,7 @@ const devtoolsPlugin = (options) => ({
113
101
  source: {
114
102
  preEntry: [
115
103
  runtimeEntry
116
- ],
117
- globalVars: {
118
- "process.env._MODERN_DEVTOOLS_LOGO_SRC": new import_devtools_kit.ClientDefinition().assets.logo
119
- }
104
+ ]
120
105
  },
121
106
  tools: {
122
107
  devServer: {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-nightly-20231105170700",
18
+ "version": "0.0.0-nightly-20231107030348",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/index.d.ts",
21
21
  "main": "./dist/index.js",
@@ -45,10 +45,9 @@
45
45
  "p-defer": "^3.0.0",
46
46
  "ws": "^8.13.0",
47
47
  "ufo": "^1.3.0",
48
- "@modern-js/devtools-kit": "0.0.0-nightly-20231105170700",
49
- "@modern-js/devtools-mount": "0.0.0-nightly-20231105170700",
50
- "@modern-js/devtools-client": "0.0.0-nightly-20231105170700",
51
- "@modern-js/utils": "0.0.0-nightly-20231105170700"
48
+ "@modern-js/devtools-kit": "0.0.0-nightly-20231107030348",
49
+ "@modern-js/devtools-client": "0.0.0-nightly-20231107030348",
50
+ "@modern-js/utils": "0.0.0-nightly-20231107030348"
52
51
  },
53
52
  "devDependencies": {
54
53
  "@types/serve-static": "^1.13.10",
@@ -57,19 +56,19 @@
57
56
  "@types/ws": "^8.5.5",
58
57
  "type-fest": "^4.1.0",
59
58
  "typescript": "^5",
60
- "@modern-js/app-tools": "0.0.0-nightly-20231105170700",
61
- "@modern-js/core": "0.0.0-nightly-20231105170700",
62
- "@modern-js/module-tools": "0.0.0-nightly-20231105170700",
63
- "@modern-js/runtime": "0.0.0-nightly-20231105170700",
64
- "@modern-js/server-core": "0.0.0-nightly-20231105170700",
65
- "@modern-js/types": "0.0.0-nightly-20231105170700",
66
- "@modern-js/builder-webpack-provider": "0.0.0-nightly-20231105170700",
67
- "@modern-js/builder-rspack-provider": "0.0.0-nightly-20231105170700",
68
- "@modern-js/builder-shared": "0.0.0-nightly-20231105170700",
69
- "@scripts/build": "0.0.0-nightly-20231105170700"
59
+ "@modern-js/app-tools": "0.0.0-nightly-20231107030348",
60
+ "@modern-js/module-tools": "0.0.0-nightly-20231107030348",
61
+ "@modern-js/core": "0.0.0-nightly-20231107030348",
62
+ "@modern-js/server-core": "0.0.0-nightly-20231107030348",
63
+ "@modern-js/runtime": "0.0.0-nightly-20231107030348",
64
+ "@modern-js/builder-webpack-provider": "0.0.0-nightly-20231107030348",
65
+ "@modern-js/types": "0.0.0-nightly-20231107030348",
66
+ "@modern-js/builder-shared": "0.0.0-nightly-20231107030348",
67
+ "@scripts/build": "0.0.0-nightly-20231107030348",
68
+ "@modern-js/builder-rspack-provider": "0.0.0-nightly-20231107030348"
70
69
  },
71
70
  "peerDependencies": {
72
- "@modern-js/runtime": "0.0.0-nightly-20231105170700"
71
+ "@modern-js/runtime": "0.0.0-nightly-20231107030348"
73
72
  },
74
73
  "peerDependenciesMeta": {
75
74
  "@modern-js/runtime": {
package/dist/runtime.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/dist/runtime.js DELETED
@@ -1,11 +0,0 @@
1
- "use strict";
2
- var import_devtools_mount = require("@modern-js/devtools-mount");
3
- var import_ufo = require("ufo");
4
- try {
5
- const opts = (0, import_ufo.parseQuery)(__resourceQuery);
6
- (0, import_devtools_mount.mountDevTools)(opts);
7
- } catch (err) {
8
- const e = new Error("Failed to execute mount point of DevTools.");
9
- e.cause = err;
10
- console.error(e);
11
- }