@modern-js/storybook-next-generator 3.3.11 → 3.3.12
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/index.js +11 -21
- package/package.json +7 -7
- package/templates/storybook-ts/main.handlebars +0 -1
package/dist/index.js
CHANGED
|
@@ -118163,6 +118163,7 @@ var require_prettyInstructions2 = __commonJS({
|
|
|
118163
118163
|
});
|
|
118164
118164
|
module2.exports = __toCommonJS2(prettyInstructions_exports);
|
|
118165
118165
|
var import_os = __toESM2(require("os"));
|
|
118166
|
+
var import_node_net = require("net");
|
|
118166
118167
|
var import_compiled = require_compiled2();
|
|
118167
118168
|
var import_is = require_is2();
|
|
118168
118169
|
var import_constants3 = require_constants2();
|
|
@@ -118180,6 +118181,12 @@ var require_prettyInstructions2 = __commonJS({
|
|
|
118180
118181
|
});
|
|
118181
118182
|
return ipv4Interfaces;
|
|
118182
118183
|
};
|
|
118184
|
+
var getHostInUrl = (host) => {
|
|
118185
|
+
if ((0, import_node_net.isIPv6)(host)) {
|
|
118186
|
+
return host === "::" ? "[::1]" : `[${host}]`;
|
|
118187
|
+
}
|
|
118188
|
+
return host;
|
|
118189
|
+
};
|
|
118183
118190
|
var getAddressUrls = (protocol = "http", port, host) => {
|
|
118184
118191
|
const LOCAL_LABEL = "Local: ";
|
|
118185
118192
|
const NETWORK_LABEL = "Network: ";
|
|
@@ -118188,7 +118195,7 @@ var require_prettyInstructions2 = __commonJS({
|
|
|
118188
118195
|
return [
|
|
118189
118196
|
{
|
|
118190
118197
|
label: isLocalhost(host) ? LOCAL_LABEL : NETWORK_LABEL,
|
|
118191
|
-
url: `${protocol}://${host}:${port}`
|
|
118198
|
+
url: `${protocol}://${getHostInUrl(host)}:${port}`
|
|
118192
118199
|
}
|
|
118193
118200
|
];
|
|
118194
118201
|
}
|
|
@@ -129414,15 +129421,6 @@ var JsonAPI = class {
|
|
|
129414
129421
|
var import_path6 = __toESM(require("path"));
|
|
129415
129422
|
var import_utils15 = __toESM(require_cjs3());
|
|
129416
129423
|
|
|
129417
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_define_property.js
|
|
129418
|
-
function _define_property2(obj, key, value) {
|
|
129419
|
-
if (key in obj) {
|
|
129420
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
129421
|
-
} else
|
|
129422
|
-
obj[key] = value;
|
|
129423
|
-
return obj;
|
|
129424
|
-
}
|
|
129425
|
-
|
|
129426
129424
|
// ../../../cli/plugin-i18n/dist/esm-node/index.js
|
|
129427
129425
|
var import_lodash7 = __toESM(require_lodash5());
|
|
129428
129426
|
|
|
@@ -129481,8 +129479,8 @@ var I18n2 = class {
|
|
|
129481
129479
|
};
|
|
129482
129480
|
}
|
|
129483
129481
|
constructor() {
|
|
129484
|
-
|
|
129485
|
-
|
|
129482
|
+
this.language = "en";
|
|
129483
|
+
this.languageMap = {};
|
|
129486
129484
|
}
|
|
129487
129485
|
};
|
|
129488
129486
|
|
|
@@ -129515,10 +129513,8 @@ var ZH_LOCALE2 = {
|
|
|
129515
129513
|
i18n: "启用「国际化(i18n)」功能",
|
|
129516
129514
|
test: "启用「单元测试 / 集成测试」功能",
|
|
129517
129515
|
e2e_test: "启用「E2E 测试」功能",
|
|
129518
|
-
storybook: "启用「Storybook」",
|
|
129519
129516
|
storybookV7: "启用「Storybook」V7",
|
|
129520
129517
|
runtime_api: "启用「Runtime API」",
|
|
129521
|
-
mwa_storybook: "启用「Visual Testing (Storybook)」模式",
|
|
129522
129518
|
ssg: "启用「SSG」功能",
|
|
129523
129519
|
polyfill: "启用「基于 UA 的 Polyfill」功能",
|
|
129524
129520
|
proxy: "启用「全局代理」",
|
|
@@ -129613,10 +129609,8 @@ var EN_LOCALE2 = {
|
|
|
129613
129609
|
i18n: "Enable Internationalization (i18n)",
|
|
129614
129610
|
test: "Enable Unit Test / Integration Test",
|
|
129615
129611
|
e2e_test: "Enable E2E Test",
|
|
129616
|
-
storybook: "Enable Storybook",
|
|
129617
129612
|
storybookV7: "Enable Storybook V7",
|
|
129618
129613
|
runtime_api: "Enable Runtime API",
|
|
129619
|
-
mwa_storybook: "Enable Visual Testing (Storybook)",
|
|
129620
129614
|
ssg: "Enable SSG",
|
|
129621
129615
|
polyfill: "Enable UA-based Polyfill Feature",
|
|
129622
129616
|
proxy: "Enable Global Proxy",
|
|
@@ -129805,7 +129799,6 @@ function getMajorVersion(v) {
|
|
|
129805
129799
|
|
|
129806
129800
|
// src/index.ts
|
|
129807
129801
|
var ADDON_ESSENTIAL = "@storybook/addon-essentials";
|
|
129808
|
-
var BUILDER_WEBPACK = "@modern-js/builder-webpack-provider";
|
|
129809
129802
|
var handleTemplateFile = async (context, appApi, generator) => {
|
|
129810
129803
|
var _a2, _b, _c, _d, _e, _f;
|
|
129811
129804
|
const appDir = context.materials.default.basePath;
|
|
@@ -129857,8 +129850,6 @@ var handleTemplateFile = async (context, appApi, generator) => {
|
|
|
129857
129850
|
const addStorybookDependence = {
|
|
129858
129851
|
[ADDON_ESSENTIAL]: availableVersion
|
|
129859
129852
|
};
|
|
129860
|
-
const { isModuleProject } = context.config;
|
|
129861
|
-
const builderWebapckVersion = await getPackageVersion(BUILDER_WEBPACK);
|
|
129862
129853
|
const jsonAPI = new JsonAPI(generator);
|
|
129863
129854
|
await jsonAPI.update(
|
|
129864
129855
|
context.materials.default.get(import_path7.default.join(appDir, "./package.json")),
|
|
@@ -129884,8 +129875,7 @@ var handleTemplateFile = async (context, appApi, generator) => {
|
|
|
129884
129875
|
...context.config.devDependencies || {},
|
|
129885
129876
|
...addReactDomDependence,
|
|
129886
129877
|
...addReactDependence,
|
|
129887
|
-
...addStorybookDependence
|
|
129888
|
-
...isModuleProject ? { [BUILDER_WEBPACK]: builderWebapckVersion } : {}
|
|
129878
|
+
...addStorybookDependence
|
|
129889
129879
|
}
|
|
129890
129880
|
}
|
|
129891
129881
|
);
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.3.
|
|
18
|
+
"version": "3.3.12",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"files": [
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"@types/node": "^14",
|
|
31
31
|
"jest": "^29",
|
|
32
32
|
"typescript": "^5",
|
|
33
|
-
"@modern-js/generator
|
|
34
|
-
"@modern-js/
|
|
35
|
-
"@modern-js/generator-utils": "3.3.
|
|
36
|
-
"@scripts/build": "2.48.
|
|
37
|
-
"@scripts/jest-config": "2.48.
|
|
38
|
-
"@modern-js/plugin-i18n": "2.48.
|
|
33
|
+
"@modern-js/dependence-generator": "3.3.12",
|
|
34
|
+
"@modern-js/generator-common": "3.3.12",
|
|
35
|
+
"@modern-js/generator-utils": "3.3.12",
|
|
36
|
+
"@scripts/build": "2.48.1",
|
|
37
|
+
"@scripts/jest-config": "2.48.1",
|
|
38
|
+
"@modern-js/plugin-i18n": "2.48.1"
|
|
39
39
|
},
|
|
40
40
|
"sideEffects": false,
|
|
41
41
|
"publishConfig": {
|