@modern-js/plugin-garfish 2.58.1 → 2.58.2
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/utils.js +3 -3
- package/dist/cjs/runtime/plugin.js +1 -1
- package/dist/esm/cli/utils.js +3 -3
- package/dist/esm/runtime/plugin.js +1 -1
- package/dist/esm-node/cli/utils.js +3 -3
- package/dist/esm-node/runtime/plugin.js +1 -1
- package/dist/types/cli/code.d.ts +1 -1
- package/dist/types/cli/index.d.ts +2 -2
- package/dist/types/runtime/loadable.d.ts +1 -1
- package/dist/types/runtime/plugin.d.ts +1 -1
- package/dist/types/runtime/useModuleApps.d.ts +2 -1
- package/dist/types/runtime/utils/Context.d.ts +1 -1
- package/dist/types/runtime/utils/MApp.d.ts +1 -1
- package/dist/types/runtime/utils/apps.d.ts +3 -3
- package/dist/types/util.d.ts +1 -1
- package/package.json +12 -12
- package/type.d.ts +2 -2
package/dist/cjs/cli/utils.js
CHANGED
|
@@ -32,12 +32,12 @@ function getRuntimeConfig(config) {
|
|
|
32
32
|
return (config === null || config === void 0 ? void 0 : config.runtime) || {};
|
|
33
33
|
}
|
|
34
34
|
function setRuntimeConfig(config, key, value) {
|
|
35
|
-
var _config_runtime, _config_runtime1;
|
|
36
|
-
if (
|
|
35
|
+
var _config_runtime_features, _config_runtime, _config_runtime1;
|
|
36
|
+
if (config === null || config === void 0 ? void 0 : (_config_runtime = config.runtime) === null || _config_runtime === void 0 ? void 0 : (_config_runtime_features = _config_runtime.features) === null || _config_runtime_features === void 0 ? void 0 : _config_runtime_features[key]) {
|
|
37
37
|
config.runtime.features[key] = value;
|
|
38
38
|
return void 0;
|
|
39
39
|
}
|
|
40
|
-
if (
|
|
40
|
+
if (config === null || config === void 0 ? void 0 : (_config_runtime1 = config.runtime) === null || _config_runtime1 === void 0 ? void 0 : _config_runtime1[key]) {
|
|
41
41
|
config.runtime[key] = value;
|
|
42
42
|
return void 0;
|
|
43
43
|
}
|
|
@@ -41,7 +41,7 @@ var import_Context = require("./utils/Context");
|
|
|
41
41
|
var import_setExternal = __toESM(require("./utils/setExternal"));
|
|
42
42
|
var import_MApp = require("./utils/MApp");
|
|
43
43
|
var import_apps = require("./utils/apps");
|
|
44
|
-
async function initOptions(manifest = {}, options) {
|
|
44
|
+
async function initOptions(manifest = {}, options = {}) {
|
|
45
45
|
var _window_modern_manifest, _window, _window_modern_manifest1, _window1;
|
|
46
46
|
let apps = options.apps || [];
|
|
47
47
|
if (manifest === null || manifest === void 0 ? void 0 : manifest.modules) {
|
package/dist/esm/cli/utils.js
CHANGED
|
@@ -7,12 +7,12 @@ function getRuntimeConfig(config) {
|
|
|
7
7
|
return (config === null || config === void 0 ? void 0 : config.runtime) || {};
|
|
8
8
|
}
|
|
9
9
|
function setRuntimeConfig(config, key, value) {
|
|
10
|
-
var _config_runtime, _config_runtime1;
|
|
11
|
-
if (
|
|
10
|
+
var _config_runtime_features, _config_runtime, _config_runtime1;
|
|
11
|
+
if (config === null || config === void 0 ? void 0 : (_config_runtime = config.runtime) === null || _config_runtime === void 0 ? void 0 : (_config_runtime_features = _config_runtime.features) === null || _config_runtime_features === void 0 ? void 0 : _config_runtime_features[key]) {
|
|
12
12
|
config.runtime.features[key] = value;
|
|
13
13
|
return void 0;
|
|
14
14
|
}
|
|
15
|
-
if (
|
|
15
|
+
if (config === null || config === void 0 ? void 0 : (_config_runtime1 = config.runtime) === null || _config_runtime1 === void 0 ? void 0 : _config_runtime1[key]) {
|
|
16
16
|
config.runtime[key] = value;
|
|
17
17
|
return void 0;
|
|
18
18
|
}
|
|
@@ -27,7 +27,7 @@ function _initOptions() {
|
|
|
27
27
|
return _ts_generator(this, function(_state) {
|
|
28
28
|
switch (_state.label) {
|
|
29
29
|
case 0:
|
|
30
|
-
manifest = _arguments.length > 0 && _arguments[0] !== void 0 ? _arguments[0] : {}, options = _arguments.length > 1
|
|
30
|
+
manifest = _arguments.length > 0 && _arguments[0] !== void 0 ? _arguments[0] : {}, options = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : {};
|
|
31
31
|
apps = options.apps || [];
|
|
32
32
|
if (manifest === null || manifest === void 0 ? void 0 : manifest.modules) {
|
|
33
33
|
if ((manifest === null || manifest === void 0 ? void 0 : manifest.modules.length) > 0) {
|
|
@@ -7,12 +7,12 @@ function getRuntimeConfig(config) {
|
|
|
7
7
|
return (config === null || config === void 0 ? void 0 : config.runtime) || {};
|
|
8
8
|
}
|
|
9
9
|
function setRuntimeConfig(config, key, value) {
|
|
10
|
-
var _config_runtime, _config_runtime1;
|
|
11
|
-
if (
|
|
10
|
+
var _config_runtime_features, _config_runtime, _config_runtime1;
|
|
11
|
+
if (config === null || config === void 0 ? void 0 : (_config_runtime = config.runtime) === null || _config_runtime === void 0 ? void 0 : (_config_runtime_features = _config_runtime.features) === null || _config_runtime_features === void 0 ? void 0 : _config_runtime_features[key]) {
|
|
12
12
|
config.runtime.features[key] = value;
|
|
13
13
|
return void 0;
|
|
14
14
|
}
|
|
15
|
-
if (
|
|
15
|
+
if (config === null || config === void 0 ? void 0 : (_config_runtime1 = config.runtime) === null || _config_runtime1 === void 0 ? void 0 : _config_runtime1[key]) {
|
|
16
16
|
config.runtime[key] = value;
|
|
17
17
|
return void 0;
|
|
18
18
|
}
|
|
@@ -7,7 +7,7 @@ import { GarfishProvider } from "./utils/Context";
|
|
|
7
7
|
import setExternal from "./utils/setExternal";
|
|
8
8
|
import { generateMApp } from "./utils/MApp";
|
|
9
9
|
import { generateApps } from "./utils/apps";
|
|
10
|
-
async function initOptions(manifest = {}, options) {
|
|
10
|
+
async function initOptions(manifest = {}, options = {}) {
|
|
11
11
|
var _window_modern_manifest, _window, _window_modern_manifest1, _window1;
|
|
12
12
|
let apps = options.apps || [];
|
|
13
13
|
if (manifest === null || manifest === void 0 ? void 0 : manifest.modules) {
|
package/dist/types/cli/code.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AppTools, IAppContext, NormalizedConfig } from '@modern-js/app-tools';
|
|
2
|
-
import { Entrypoint } from '@modern-js/types';
|
|
2
|
+
import type { Entrypoint } from '@modern-js/types';
|
|
3
3
|
import type { MaybeAsync } from '@modern-js/plugin';
|
|
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: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CliHookCallbacks, useConfigContext } from '@modern-js/core';
|
|
2
2
|
import { type AsyncWorkflow } from '@modern-js/plugin';
|
|
3
3
|
import type { CliPlugin, AppTools } from '@modern-js/app-tools';
|
|
4
|
-
import { Entrypoint } from '@modern-js/types';
|
|
4
|
+
import type { Entrypoint } from '@modern-js/types';
|
|
5
5
|
export type UseConfig = ReturnType<typeof useConfigContext>;
|
|
6
6
|
export declare const externals: {
|
|
7
7
|
'react-dom': string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import garfish
|
|
1
|
+
import type garfish from 'garfish';
|
|
2
|
+
import type { interfaces as GarfishInterfaces } from 'garfish';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
export type Options = typeof garfish.options;
|
|
4
5
|
export type ModuleInfo = GarfishInterfaces.AppInfo & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Garfish, { interfaces } from 'garfish';
|
|
3
|
-
import { Manifest, MicroComponentProps, ModulesInfo } from '../useModuleApps';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import Garfish, { type interfaces } from 'garfish';
|
|
3
|
+
import type { Manifest, MicroComponentProps, ModulesInfo } from '../useModuleApps';
|
|
4
4
|
export interface Provider extends interfaces.Provider {
|
|
5
5
|
SubModuleComponent?: React.ComponentType<any>;
|
|
6
6
|
jupiter_submodule_app_key?: React.ComponentType<any>;
|
package/dist/types/util.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Tips: this package will be bundled and running in the browser, do not import from `@modern-js/utils`.
|
|
3
3
|
*/
|
|
4
4
|
import createDebug from 'debug';
|
|
5
|
-
import { ModuleInfo } from './runtime';
|
|
5
|
+
import type { ModuleInfo } from './runtime';
|
|
6
6
|
export declare const logger: createDebug.Debugger;
|
|
7
7
|
export declare const SUBMODULE_APP_COMPONENT_KEY = "SubModuleComponent";
|
|
8
8
|
export declare function generateSubAppContainerKey(moduleInfo?: ModuleInfo): string;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.58.
|
|
18
|
+
"version": "2.58.2",
|
|
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/
|
|
73
|
-
"@modern-js/
|
|
74
|
-
"@modern-js/utils": "2.58.
|
|
72
|
+
"@modern-js/plugin": "2.58.2",
|
|
73
|
+
"@modern-js/runtime-utils": "2.58.2",
|
|
74
|
+
"@modern-js/utils": "2.58.2"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@modern-js/runtime": "^2.58.
|
|
77
|
+
"@modern-js/runtime": "^2.58.2",
|
|
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/
|
|
97
|
-
"@modern-js/
|
|
98
|
-
"@modern-js/
|
|
99
|
-
"@modern-js/
|
|
100
|
-
"@
|
|
101
|
-
"@scripts/build": "2.58.
|
|
102
|
-
"@
|
|
96
|
+
"@modern-js/app-tools": "2.58.2",
|
|
97
|
+
"@modern-js/plugin-router-v5": "2.58.2",
|
|
98
|
+
"@modern-js/core": "2.58.2",
|
|
99
|
+
"@modern-js/runtime": "2.58.2",
|
|
100
|
+
"@modern-js/types": "2.58.2",
|
|
101
|
+
"@scripts/build": "2.58.2",
|
|
102
|
+
"@scripts/jest-config": "2.58.2"
|
|
103
103
|
},
|
|
104
104
|
"sideEffects": false,
|
|
105
105
|
"publishConfig": {
|
package/type.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@modern-js/plugin-router-v5';
|
|
2
|
-
import { Config } from './dist/types/runtime';
|
|
2
|
+
import type { Config } from './dist/types/runtime';
|
|
3
3
|
declare module '@modern-js/runtime/garfish' {
|
|
4
4
|
export const useModuleApp: typeof import('./dist/types/runtime').useModuleApp;
|
|
5
5
|
export const useModuleApps: typeof import('./dist/types/runtime').useModuleApps;
|
|
@@ -13,7 +13,7 @@ declare module '@modern-js/runtime' {
|
|
|
13
13
|
interface RuntimeConfig {
|
|
14
14
|
garfish?: Config;
|
|
15
15
|
garfishByEntries?: {
|
|
16
|
-
[name: string]: Config
|
|
16
|
+
[name: string]: Config;
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
}
|