@modern-js/plugin-garfish 2.58.2 → 2.59.0
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/cjs/cli/index.js +2 -2
- package/dist/cjs/runtime/plugin.js +2 -2
- package/dist/cjs/runtime/provider.js +1 -1
- package/dist/cjs/runtime/utils/MApp.js +1 -1
- package/dist/cjs/runtime/utils/apps.js +1 -1
- package/dist/cjs/runtime/utils/setExternal.js +1 -1
- package/dist/esm/cli/index.js +2 -2
- package/dist/esm/runtime/loadable.js +1 -1
- package/dist/esm/runtime/plugin.js +2 -2
- package/dist/esm/runtime/provider.js +1 -1
- package/dist/esm/runtime/utils/MApp.js +2 -2
- package/dist/esm/runtime/utils/apps.js +2 -2
- package/dist/esm/runtime/utils/setExternal.js +1 -1
- package/dist/esm-node/cli/index.js +2 -2
- package/dist/esm-node/runtime/loadable.js +1 -1
- package/dist/esm-node/runtime/plugin.js +2 -2
- package/dist/esm-node/runtime/provider.js +1 -1
- package/dist/esm-node/runtime/utils/MApp.js +2 -2
- package/dist/esm-node/runtime/utils/apps.js +2 -2
- package/dist/esm-node/runtime/utils/setExternal.js +1 -1
- package/dist/types/cli/code.d.ts +1 -1
- package/dist/types/cli/index.d.ts +1 -1
- package/dist/types/runtime/utils/apps.d.ts +1 -1
- package/package.json +12 -12
package/dist/cjs/cli/index.js
CHANGED
|
@@ -24,11 +24,11 @@ __export(cli_exports, {
|
|
|
24
24
|
getDefaultMicroFrontedConfig: () => getDefaultMicroFrontedConfig
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(cli_exports);
|
|
27
|
-
var import_utils = require("@modern-js/utils");
|
|
28
27
|
var import_plugin = require("@modern-js/plugin");
|
|
28
|
+
var import_utils = require("@modern-js/utils");
|
|
29
29
|
var import_util = require("../util");
|
|
30
|
-
var import_utils2 = require("./utils");
|
|
31
30
|
var import_code = require("./code");
|
|
31
|
+
var import_utils2 = require("./utils");
|
|
32
32
|
const externals = {
|
|
33
33
|
"react-dom": "react-dom",
|
|
34
34
|
react: "react"
|
|
@@ -33,14 +33,14 @@ __export(plugin_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(plugin_exports);
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_merge = require("@modern-js/runtime-utils/merge");
|
|
36
37
|
var import_garfish = __toESM(require("garfish"));
|
|
37
38
|
var import_react = __toESM(require("react"));
|
|
38
|
-
var import_merge = require("@modern-js/runtime-utils/merge");
|
|
39
39
|
var import_util = require("../util");
|
|
40
40
|
var import_Context = require("./utils/Context");
|
|
41
|
-
var import_setExternal = __toESM(require("./utils/setExternal"));
|
|
42
41
|
var import_MApp = require("./utils/MApp");
|
|
43
42
|
var import_apps = require("./utils/apps");
|
|
43
|
+
var import_setExternal = __toESM(require("./utils/setExternal"));
|
|
44
44
|
async function initOptions(manifest = {}, options = {}) {
|
|
45
45
|
var _window_modern_manifest, _window, _window_modern_manifest1, _window1;
|
|
46
46
|
let apps = options.apps || [];
|
|
@@ -22,8 +22,8 @@ __export(provider_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(provider_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
-
var import_react = require("@meta/runtime/react");
|
|
26
25
|
var import_browser = require("@meta/runtime/browser");
|
|
26
|
+
var import_react = require("@meta/runtime/react");
|
|
27
27
|
var import_react_dom = require("react-dom");
|
|
28
28
|
function createProvider(id, { customBootstrap, beforeRender } = {}) {
|
|
29
29
|
return ({ basename, dom }) => {
|
|
@@ -32,8 +32,8 @@ __export(MApp_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(MApp_exports);
|
|
34
34
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
35
|
var import_garfish = __toESM(require("garfish"));
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
37
|
var import_util = require("../../util");
|
|
38
38
|
var import_loadable = require("../loadable");
|
|
39
39
|
function generateMApp(options, manifest) {
|
|
@@ -33,9 +33,9 @@ __export(apps_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(apps_exports);
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
-
var import_react = require("react");
|
|
37
36
|
var import_runtime = require("@meta/runtime");
|
|
38
37
|
var import_garfish = __toESM(require("garfish"));
|
|
38
|
+
var import_react = require("react");
|
|
39
39
|
var import_util = require("../../util");
|
|
40
40
|
var import_loadable = require("../loadable");
|
|
41
41
|
function pathJoin(...args) {
|
|
@@ -31,9 +31,9 @@ __export(setExternal_exports, {
|
|
|
31
31
|
default: () => setExternal_default
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(setExternal_exports);
|
|
34
|
+
var import_garfish = __toESM(require("garfish"));
|
|
34
35
|
var import_react = __toESM(require("react"));
|
|
35
36
|
var import_react_dom = __toESM(require("react-dom"));
|
|
36
|
-
var import_garfish = __toESM(require("garfish"));
|
|
37
37
|
var import_util = require("../../util");
|
|
38
38
|
var setExternal_default = () => {
|
|
39
39
|
(0, import_util.logger)("setExternal ", {
|
package/dist/esm/cli/index.js
CHANGED
|
@@ -2,11 +2,11 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
|
|
|
2
2
|
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
3
3
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
4
4
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
5
|
-
import { createRuntimeExportsUtils, getEntryOptions } from "@modern-js/utils";
|
|
6
5
|
import { createAsyncWorkflow } from "@modern-js/plugin";
|
|
6
|
+
import { createRuntimeExportsUtils, getEntryOptions } from "@modern-js/utils";
|
|
7
7
|
import { logger } from "../util";
|
|
8
|
-
import { getRuntimeConfig, setRuntimeConfig } from "./utils";
|
|
9
8
|
import { generateCode } from "./code";
|
|
9
|
+
import { getRuntimeConfig, setRuntimeConfig } from "./utils";
|
|
10
10
|
var externals = {
|
|
11
11
|
"react-dom": "react-dom",
|
|
12
12
|
react: "react"
|
|
@@ -3,7 +3,7 @@ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
|
3
3
|
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
|
|
4
4
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
5
5
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
-
import {
|
|
6
|
+
import { useCallback, useEffect, useState } from "react";
|
|
7
7
|
import { logger } from "../util";
|
|
8
8
|
var DEFAULT_LOADABLE = {
|
|
9
9
|
delay: 200,
|
|
@@ -9,14 +9,14 @@ import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
|
|
9
9
|
import { _ as _create_super } from "@swc/helpers/_/_create_super";
|
|
10
10
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { merge } from "@modern-js/runtime-utils/merge";
|
|
12
13
|
import GarfishInstance from "garfish";
|
|
13
14
|
import React from "react";
|
|
14
|
-
import { merge } from "@modern-js/runtime-utils/merge";
|
|
15
15
|
import { logger } from "../util";
|
|
16
16
|
import { GarfishProvider } from "./utils/Context";
|
|
17
|
-
import setExternal from "./utils/setExternal";
|
|
18
17
|
import { generateMApp } from "./utils/MApp";
|
|
19
18
|
import { generateApps } from "./utils/apps";
|
|
19
|
+
import setExternal from "./utils/setExternal";
|
|
20
20
|
function initOptions() {
|
|
21
21
|
return _initOptions.apply(this, arguments);
|
|
22
22
|
}
|
|
@@ -2,8 +2,8 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
|
|
|
2
2
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
3
3
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
import { createRoot } from "@meta/runtime/react";
|
|
6
5
|
import { render } from "@meta/runtime/browser";
|
|
6
|
+
import { createRoot } from "@meta/runtime/react";
|
|
7
7
|
import { createPortal, unmountComponentAtNode } from "react-dom";
|
|
8
8
|
function createProvider(id) {
|
|
9
9
|
var _ref = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, customBootstrap = _ref.customBootstrap, beforeRender = _ref.beforeRender;
|
|
@@ -5,9 +5,9 @@ import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_
|
|
|
5
5
|
import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
|
6
6
|
import { _ as _create_super } from "@swc/helpers/_/_create_super";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
import React from "react";
|
|
9
8
|
import Garfish from "garfish";
|
|
10
|
-
import
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { generateSubAppContainerKey, logger } from "../../util";
|
|
11
11
|
import { Loadable } from "../loadable";
|
|
12
12
|
function generateMApp(options, manifest) {
|
|
13
13
|
var MApp = /* @__PURE__ */ function(_React_Component) {
|
|
@@ -6,10 +6,10 @@ import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
|
6
6
|
import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
|
7
7
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
8
8
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
|
-
import { useContext, useState, useEffect, useRef } from "react";
|
|
10
9
|
import { RuntimeReactContext } from "@meta/runtime";
|
|
11
10
|
import Garfish from "garfish";
|
|
12
|
-
import {
|
|
11
|
+
import { useContext, useEffect, useRef, useState } from "react";
|
|
12
|
+
import { generateSubAppContainerKey, logger } from "../../util";
|
|
13
13
|
import { Loadable } from "../loadable";
|
|
14
14
|
function pathJoin() {
|
|
15
15
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createRuntimeExportsUtils, getEntryOptions } from "@modern-js/utils";
|
|
2
1
|
import { createAsyncWorkflow } from "@modern-js/plugin";
|
|
2
|
+
import { createRuntimeExportsUtils, getEntryOptions } from "@modern-js/utils";
|
|
3
3
|
import { logger } from "../util";
|
|
4
|
-
import { getRuntimeConfig, setRuntimeConfig } from "./utils";
|
|
5
4
|
import { generateCode } from "./code";
|
|
5
|
+
import { getRuntimeConfig, setRuntimeConfig } from "./utils";
|
|
6
6
|
const externals = {
|
|
7
7
|
"react-dom": "react-dom",
|
|
8
8
|
react: "react"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useCallback, useEffect, useState } from "react";
|
|
3
3
|
import { logger } from "../util";
|
|
4
4
|
const DEFAULT_LOADABLE = {
|
|
5
5
|
delay: 200,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { merge } from "@modern-js/runtime-utils/merge";
|
|
2
3
|
import GarfishInstance from "garfish";
|
|
3
4
|
import React from "react";
|
|
4
|
-
import { merge } from "@modern-js/runtime-utils/merge";
|
|
5
5
|
import { logger } from "../util";
|
|
6
6
|
import { GarfishProvider } from "./utils/Context";
|
|
7
|
-
import setExternal from "./utils/setExternal";
|
|
8
7
|
import { generateMApp } from "./utils/MApp";
|
|
9
8
|
import { generateApps } from "./utils/apps";
|
|
9
|
+
import setExternal from "./utils/setExternal";
|
|
10
10
|
async function initOptions(manifest = {}, options = {}) {
|
|
11
11
|
var _window_modern_manifest, _window, _window_modern_manifest1, _window1;
|
|
12
12
|
let apps = options.apps || [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createRoot } from "@meta/runtime/react";
|
|
3
2
|
import { render } from "@meta/runtime/browser";
|
|
3
|
+
import { createRoot } from "@meta/runtime/react";
|
|
4
4
|
import { createPortal, unmountComponentAtNode } from "react-dom";
|
|
5
5
|
function createProvider(id, { customBootstrap, beforeRender } = {}) {
|
|
6
6
|
return ({ basename, dom }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import React from "react";
|
|
3
2
|
import Garfish from "garfish";
|
|
4
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { generateSubAppContainerKey, logger } from "../../util";
|
|
5
5
|
import { Loadable } from "../loadable";
|
|
6
6
|
function generateMApp(options, manifest) {
|
|
7
7
|
class MApp extends React.Component {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useContext, useState, useEffect, useRef } from "react";
|
|
3
2
|
import { RuntimeReactContext } from "@meta/runtime";
|
|
4
3
|
import Garfish from "garfish";
|
|
5
|
-
import {
|
|
4
|
+
import { useContext, useEffect, useRef, useState } from "react";
|
|
5
|
+
import { generateSubAppContainerKey, logger } from "../../util";
|
|
6
6
|
import { Loadable } from "../loadable";
|
|
7
7
|
function pathJoin(...args) {
|
|
8
8
|
const res = args.reduce((res2, path) => {
|
package/dist/types/cli/code.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AppTools, IAppContext, NormalizedConfig } from '@modern-js/app-tools';
|
|
2
|
-
import type { Entrypoint } from '@modern-js/types';
|
|
3
2
|
import type { MaybeAsync } from '@modern-js/plugin';
|
|
3
|
+
import type { Entrypoint } from '@modern-js/types';
|
|
4
4
|
export declare const ENTRY_BOOTSTRAP_FILE_NAME = "bootstrap.jsx";
|
|
5
5
|
export declare const generateCode: (entrypoints: Entrypoint[], appContext: IAppContext, config: NormalizedConfig<AppTools>, appendEntryCode: (input: {
|
|
6
6
|
entrypoint: Entrypoint;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { AppTools, CliPlugin } from '@modern-js/app-tools';
|
|
1
2
|
import type { CliHookCallbacks, useConfigContext } from '@modern-js/core';
|
|
2
3
|
import { type AsyncWorkflow } from '@modern-js/plugin';
|
|
3
|
-
import type { CliPlugin, AppTools } from '@modern-js/app-tools';
|
|
4
4
|
import type { Entrypoint } from '@modern-js/types';
|
|
5
5
|
export type UseConfig = ReturnType<typeof useConfigContext>;
|
|
6
6
|
export declare const externals: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
1
|
import Garfish, { type interfaces } from 'garfish';
|
|
2
|
+
import type React from 'react';
|
|
3
3
|
import type { Manifest, MicroComponentProps, ModulesInfo } from '../useModuleApps';
|
|
4
4
|
export interface Provider extends interfaces.Provider {
|
|
5
5
|
SubModuleComponent?: React.ComponentType<any>;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.59.0",
|
|
19
19
|
"jsnext:source": "./src/cli/index.ts",
|
|
20
20
|
"types": "./dist/types/cli/index.d.ts",
|
|
21
21
|
"typesVersions": {
|
|
@@ -69,12 +69,12 @@
|
|
|
69
69
|
"debug": "4.3.4",
|
|
70
70
|
"garfish": "^1.8.1",
|
|
71
71
|
"react-loadable": "^5.5.0",
|
|
72
|
-
"@modern-js/plugin": "2.
|
|
73
|
-
"@modern-js/runtime-utils": "2.
|
|
74
|
-
"@modern-js/utils": "2.
|
|
72
|
+
"@modern-js/plugin": "2.59.0",
|
|
73
|
+
"@modern-js/runtime-utils": "2.59.0",
|
|
74
|
+
"@modern-js/utils": "2.59.0"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@modern-js/runtime": "^2.
|
|
77
|
+
"@modern-js/runtime": "^2.59.0",
|
|
78
78
|
"react": ">=17",
|
|
79
79
|
"react-dom": ">=17"
|
|
80
80
|
},
|
|
@@ -93,13 +93,13 @@
|
|
|
93
93
|
"react-dom": "^18",
|
|
94
94
|
"react-router-dom": "6.22.0",
|
|
95
95
|
"typescript": "^5",
|
|
96
|
-
"@modern-js/app-tools": "2.
|
|
97
|
-
"@modern-js/
|
|
98
|
-
"@modern-js/
|
|
99
|
-
"@modern-js/
|
|
100
|
-
"@modern-js/
|
|
101
|
-
"@scripts/build": "2.
|
|
102
|
-
"@scripts/jest-config": "2.
|
|
96
|
+
"@modern-js/app-tools": "2.59.0",
|
|
97
|
+
"@modern-js/core": "2.59.0",
|
|
98
|
+
"@modern-js/plugin-router-v5": "2.59.0",
|
|
99
|
+
"@modern-js/types": "2.59.0",
|
|
100
|
+
"@modern-js/runtime": "2.59.0",
|
|
101
|
+
"@scripts/build": "2.59.0",
|
|
102
|
+
"@scripts/jest-config": "2.59.0"
|
|
103
103
|
},
|
|
104
104
|
"sideEffects": false,
|
|
105
105
|
"publishConfig": {
|