rollipop 1.0.0-beta.3 → 1.0.0-beta.4
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/constants.js +1 -1
- package/dist/core/plugins/dev-server-plugin.js +30 -5
- package/dist/core/rolldown.js +1 -0
- package/dist/package.js +1 -1
- package/dist/server/devframe/index.js +1 -1
- package/dist/server/devframe/setup.js +1 -1
- package/dist/storage/file-storage.js +1 -1
- package/package.json +2 -2
package/dist/constants.js
CHANGED
|
@@ -20,7 +20,7 @@ var constants_exports = /* @__PURE__ */ __exportAll({
|
|
|
20
20
|
ROLLIPOP_VIRTUAL_ENTRY_ID: () => ROLLIPOP_VIRTUAL_ENTRY_ID,
|
|
21
21
|
ROLLIPOP_VIRTUAL_PREFIX: () => ROLLIPOP_VIRTUAL_PREFIX
|
|
22
22
|
});
|
|
23
|
-
const ROLLIPOP_VERSION = "1.0.0-beta.
|
|
23
|
+
const ROLLIPOP_VERSION = "1.0.0-beta.4";
|
|
24
24
|
const ROLLIPOP_VIRTUAL_PREFIX = "\0rollipop/";
|
|
25
25
|
const ROLLIPOP_VIRTUAL_BOOTSTRAP_ID = `${ROLLIPOP_VIRTUAL_PREFIX}bootstrap`;
|
|
26
26
|
const ROLLIPOP_VIRTUAL_ENTRY_ID = `${ROLLIPOP_VIRTUAL_PREFIX}entry`;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ROLLIPOP_VIRTUAL_BOOTSTRAP_ID } from "../../constants.js";
|
|
2
2
|
import { resolveFrom } from "../../utils/node-resolve.js";
|
|
3
|
+
import { createVirtualModuleId } from "../../utils/id.js";
|
|
3
4
|
import { replaceSourceMappingUrl } from "../../utils/source-map.js";
|
|
4
5
|
import { isNotNil } from "es-toolkit";
|
|
5
6
|
import dedent from "dedent";
|
|
6
7
|
import { rollipopReactRefreshWrapperPlugin } from "@rollipop/rolldown/experimental";
|
|
7
8
|
import { exactRegex, id, include } from "@rollipop/rolldown/filter";
|
|
8
9
|
//#region src/core/plugins/dev-server-plugin.ts
|
|
10
|
+
const DEV_GRAPH_META_MODULE_ID = createVirtualModuleId("dev-graph-meta");
|
|
9
11
|
const DEFAULT_REACT_REFRESH_INCLUDE_PATTERNS = [/\.[tj]sx?(?:$|\?)/];
|
|
10
12
|
const DEFAULT_REACT_REFRESH_EXCLUDE_PATTERNS = [/node_modules/];
|
|
11
13
|
function sourceMapUrlPlugin(sourceMapUrl) {
|
|
@@ -49,20 +51,43 @@ async function devServerPlugin(options) {
|
|
|
49
51
|
if (origin != null && bundleEntry != null) {
|
|
50
52
|
const registerHMRGraphPlugin = {
|
|
51
53
|
name: "rollipop:register-hmr-graph",
|
|
54
|
+
resolveId: {
|
|
55
|
+
filter: [include(id(exactRegex(DEV_GRAPH_META_MODULE_ID)))],
|
|
56
|
+
handler() {
|
|
57
|
+
return DEV_GRAPH_META_MODULE_ID;
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
load: {
|
|
61
|
+
filter: [include(id(exactRegex(DEV_GRAPH_META_MODULE_ID)))],
|
|
62
|
+
handler() {
|
|
63
|
+
return {
|
|
64
|
+
code: `export default ${JSON.stringify({
|
|
65
|
+
origin,
|
|
66
|
+
bundleEntry,
|
|
67
|
+
platform
|
|
68
|
+
})};`,
|
|
69
|
+
moduleType: "js"
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
},
|
|
52
73
|
transform: {
|
|
53
74
|
filter: [include(id(exactRegex(ROLLIPOP_VIRTUAL_BOOTSTRAP_ID)))],
|
|
54
75
|
handler(code) {
|
|
55
|
-
return [
|
|
76
|
+
return [
|
|
77
|
+
`import __graph_meta__ from ${JSON.stringify(DEV_GRAPH_META_MODULE_ID)};`,
|
|
78
|
+
code,
|
|
79
|
+
dedent`
|
|
56
80
|
if (import.meta.hot && globalThis.__rollipop_runtime__) {
|
|
57
81
|
globalThis.__rollipop_runtime__.registerGraph({
|
|
58
82
|
id: ${JSON.stringify(id$1)},
|
|
59
|
-
origin:
|
|
60
|
-
bundleEntry:
|
|
61
|
-
platform:
|
|
83
|
+
origin: __graph_meta__.origin,
|
|
84
|
+
bundleEntry: __graph_meta__.bundleEntry,
|
|
85
|
+
platform: __graph_meta__.platform,
|
|
62
86
|
runtime: import.meta.hot.runtime,
|
|
63
87
|
});
|
|
64
88
|
}
|
|
65
|
-
`
|
|
89
|
+
`
|
|
90
|
+
].join("\n");
|
|
66
91
|
}
|
|
67
92
|
}
|
|
68
93
|
};
|
package/dist/core/rolldown.js
CHANGED
|
@@ -145,6 +145,7 @@ async function resolveRolldownOptions(context, config, buildOptions, devEngineOp
|
|
|
145
145
|
await resolveOutputAddon(rolldownIntro, chunk)
|
|
146
146
|
].filter(isNotNil).join("\n");
|
|
147
147
|
},
|
|
148
|
+
postFooter: rolldownOutput.postFooter ?? "\n",
|
|
148
149
|
minify: buildOptions.minify ?? rolldownOutput.minify,
|
|
149
150
|
sourcemap: buildOptions.sourcemap ?? rolldownOutput.sourcemap,
|
|
150
151
|
sourcemapPathTransform: rolldownOutput.sourcemapPathTransform ?? createProjectRootSourcemapPathTransform(config.root),
|
package/dist/package.js
CHANGED
|
@@ -21,7 +21,7 @@ var RollipopDevframeController = class {
|
|
|
21
21
|
this.definition = defineDevframe({
|
|
22
22
|
id: "rollipop",
|
|
23
23
|
name: "Rollipop",
|
|
24
|
-
version: "1.0.0-beta.
|
|
24
|
+
version: "1.0.0-beta.4",
|
|
25
25
|
packageName: "rollipop",
|
|
26
26
|
homepage: "https://github.com/rollipop-dev/rollipop",
|
|
27
27
|
description: "React Native development dashboard powered by Rollipop.",
|
|
@@ -16,7 +16,7 @@ async function setupDevframe(context, server, inspectorDeviceServer) {
|
|
|
16
16
|
const controller = new RollipopDevframeController(context, createAgentToolContext(context));
|
|
17
17
|
const devtools = initHub({
|
|
18
18
|
name: DEVFRAME_NAME,
|
|
19
|
-
version: "1.0.0-beta.
|
|
19
|
+
version: "1.0.0-beta.4",
|
|
20
20
|
base: ROLLIPOP_DEVFRAME_BASE,
|
|
21
21
|
cwd: context.config.root,
|
|
22
22
|
ui: createUi({
|
|
@@ -28,7 +28,7 @@ var FileStorage = class FileStorage {
|
|
|
28
28
|
this.dataFilePath = path.join(FileStorage.getPath(basePath, { prepare: true }), DATA_FILENAME);
|
|
29
29
|
if (fs.existsSync(this.dataFilePath)) {
|
|
30
30
|
const loadedData = JSON.parse(fs.readFileSync(this.dataFilePath, "utf-8"));
|
|
31
|
-
if ("version" in loadedData && loadedData.version === "1.0.0-beta.
|
|
31
|
+
if ("version" in loadedData && loadedData.version === "1.0.0-beta.4") this.data = loadedData;
|
|
32
32
|
else {
|
|
33
33
|
this.data = createDefaultData();
|
|
34
34
|
this.flush();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollipop",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.4",
|
|
4
4
|
"homepage": "https://github.com/rollipop-dev/rollipop#readme",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/rollipop-dev/rollipop/issues"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@react-native-community/cli-server-api": "20.2.0",
|
|
68
68
|
"@react-native-community/cli-types": "20.2.0",
|
|
69
69
|
"@react-native/dev-middleware": "0.88.0",
|
|
70
|
-
"@rollipop/dashboard": "1.0.0-beta.
|
|
70
|
+
"@rollipop/dashboard": "1.0.0-beta.4",
|
|
71
71
|
"@rollipop/rolldown": "1.2.0",
|
|
72
72
|
"@swc/core": "1.16.13",
|
|
73
73
|
"@swc/helpers": "0.5.23",
|