@modern-js/utils 3.1.5 → 3.2.1

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.
@@ -33,8 +33,8 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
- getUserAlias: ()=>getUserAlias,
37
36
  getAliasConfig: ()=>getAliasConfig,
37
+ getUserAlias: ()=>getUserAlias,
38
38
  mergeAlias: ()=>mergeAlias
39
39
  });
40
40
  const external_fs_namespaceObject = require("fs");
@@ -24,10 +24,10 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- getCommand: ()=>getCommand,
27
+ deprecatedCommands: ()=>deprecatedCommands,
28
28
  getArgv: ()=>getArgv,
29
+ getCommand: ()=>getCommand,
29
30
  getFullArgv: ()=>getFullArgv,
30
- deprecatedCommands: ()=>deprecatedCommands,
31
31
  isDevCommand: ()=>isDevCommand
32
32
  });
33
33
  const external_logger_js_namespaceObject = require("./logger.js");
@@ -34,8 +34,8 @@ var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
36
  clearConsole: ()=>clearConsole,
37
- wait: ()=>wait,
38
- createDebugger: ()=>createDebugger
37
+ createDebugger: ()=>createDebugger,
38
+ wait: ()=>wait
39
39
  });
40
40
  const index_js_namespaceObject = require("../../compiled/debug/index.js");
41
41
  var index_js_default = /*#__PURE__*/ __webpack_require__.n(index_js_namespaceObject);
@@ -24,30 +24,31 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- SERVER_PLUGIN_POLYFILL: ()=>constants_js_namespaceObject.SERVER_PLUGIN_POLYFILL,
27
+ API_DIR: ()=>API_DIR,
28
+ CONFIG_CACHE_DIR: ()=>CONFIG_CACHE_DIR,
29
+ CONFIG_FILE_EXTENSIONS: ()=>CONFIG_FILE_EXTENSIONS,
28
30
  DEFAULT_API_PREFIX: ()=>DEFAULT_API_PREFIX,
31
+ DEFAULT_DEV_HOST: ()=>DEFAULT_DEV_HOST,
32
+ DEFAULT_ENTRY_NAME: ()=>constants_js_namespaceObject.DEFAULT_ENTRY_NAME,
33
+ DEFAULT_RUNTIME_CONFIG: ()=>DEFAULT_RUNTIME_CONFIG,
34
+ ENTRY_NAME_PATTERN: ()=>ENTRY_NAME_PATTERN,
29
35
  INTERNAL_RUNTIME_PLUGINS: ()=>INTERNAL_RUNTIME_PLUGINS,
30
36
  JS_EXTENSIONS: ()=>JS_EXTENSIONS,
31
- SHARED_DIR: ()=>SHARED_DIR,
32
- ROUTE_SPEC_FILE: ()=>constants_js_namespaceObject.ROUTE_SPEC_FILE,
33
- SERVER_DIR: ()=>SERVER_DIR,
34
- DEFAULT_RUNTIME_CONFIG: ()=>DEFAULT_RUNTIME_CONFIG,
35
- OUTPUT_CONFIG_FILE: ()=>OUTPUT_CONFIG_FILE,
36
- NESTED_ROUTE_SPEC_FILE: ()=>constants_js_namespaceObject.NESTED_ROUTE_SPEC_FILE,
37
- API_DIR: ()=>API_DIR,
38
- CONFIG_CACHE_DIR: ()=>CONFIG_CACHE_DIR,
39
37
  LOADABLE_STATS_FILE: ()=>LOADABLE_STATS_FILE,
40
- DEFAULT_DEV_HOST: ()=>DEFAULT_DEV_HOST,
38
+ LOADER_ROUTES_DIR: ()=>LOADER_ROUTES_DIR,
41
39
  MAIN_ENTRY_NAME: ()=>constants_js_namespaceObject.MAIN_ENTRY_NAME,
40
+ NESTED_ROUTE_SPEC_FILE: ()=>constants_js_namespaceObject.NESTED_ROUTE_SPEC_FILE,
41
+ OUTPUT_CONFIG_FILE: ()=>OUTPUT_CONFIG_FILE,
42
42
  ROUTE_MANIFEST_FILE: ()=>ROUTE_MANIFEST_FILE,
43
+ ROUTE_SPEC_FILE: ()=>constants_js_namespaceObject.ROUTE_SPEC_FILE,
43
44
  SERVER_BUNDLE_DIRECTORY: ()=>constants_js_namespaceObject.SERVER_BUNDLE_DIRECTORY,
45
+ SERVER_DIR: ()=>SERVER_DIR,
44
46
  SERVER_PLUGIN_BFF: ()=>constants_js_namespaceObject.SERVER_PLUGIN_BFF,
47
+ SERVER_PLUGIN_POLYFILL: ()=>constants_js_namespaceObject.SERVER_PLUGIN_POLYFILL,
45
48
  SERVER_RENDER_FUNCTION_NAME: ()=>constants_js_namespaceObject.SERVER_RENDER_FUNCTION_NAME,
46
49
  SERVER_WORKER_BUNDLE_DIRECTORY: ()=>SERVER_WORKER_BUNDLE_DIRECTORY,
47
- CONFIG_FILE_EXTENSIONS: ()=>CONFIG_FILE_EXTENSIONS,
48
- ENTRY_NAME_PATTERN: ()=>ENTRY_NAME_PATTERN,
49
- LOADER_ROUTES_DIR: ()=>LOADER_ROUTES_DIR,
50
- DEFAULT_ENTRY_NAME: ()=>constants_js_namespaceObject.DEFAULT_ENTRY_NAME
50
+ SHARED_DIR: ()=>SHARED_DIR,
51
+ TS_CONFIG_FILENAME: ()=>TS_CONFIG_FILENAME
51
52
  });
52
53
  const constants_js_namespaceObject = require("../universal/constants.js");
53
54
  const JS_EXTENSIONS = [
@@ -63,6 +64,7 @@ const API_DIR = 'api';
63
64
  const DEFAULT_API_PREFIX = '/api';
64
65
  const SERVER_DIR = 'server';
65
66
  const SHARED_DIR = 'shared';
67
+ const TS_CONFIG_FILENAME = 'tsconfig.json';
66
68
  const CONFIG_CACHE_DIR = './node_modules/.cache/bundle-require';
67
69
  const CONFIG_FILE_EXTENSIONS = [
68
70
  '.js',
@@ -101,6 +103,7 @@ exports.SERVER_PLUGIN_POLYFILL = __webpack_exports__.SERVER_PLUGIN_POLYFILL;
101
103
  exports.SERVER_RENDER_FUNCTION_NAME = __webpack_exports__.SERVER_RENDER_FUNCTION_NAME;
102
104
  exports.SERVER_WORKER_BUNDLE_DIRECTORY = __webpack_exports__.SERVER_WORKER_BUNDLE_DIRECTORY;
103
105
  exports.SHARED_DIR = __webpack_exports__.SHARED_DIR;
106
+ exports.TS_CONFIG_FILENAME = __webpack_exports__.TS_CONFIG_FILENAME;
104
107
  for(var __rspack_i in __webpack_exports__)if (-1 === [
105
108
  "API_DIR",
106
109
  "CONFIG_CACHE_DIR",
@@ -125,7 +128,8 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
125
128
  "SERVER_PLUGIN_POLYFILL",
126
129
  "SERVER_RENDER_FUNCTION_NAME",
127
130
  "SERVER_WORKER_BUNDLE_DIRECTORY",
128
- "SHARED_DIR"
131
+ "SHARED_DIR",
132
+ "TS_CONFIG_FILENAME"
129
133
  ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
130
134
  Object.defineProperty(exports, '__esModule', {
131
135
  value: true
@@ -24,8 +24,8 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- findExists: ()=>findExists,
28
- emptyDir: ()=>emptyDir
27
+ emptyDir: ()=>emptyDir,
28
+ findExists: ()=>findExists
29
29
  });
30
30
  const external_compiled_js_namespaceObject = require("../compiled.js");
31
31
  const findExists = (files)=>{
@@ -33,9 +33,9 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
- getPackageManager: ()=>getPackageManager,
37
36
  getCoreJsVersion: ()=>getCoreJsVersion,
38
37
  getInternalPlugins: ()=>getInternalPlugins,
38
+ getPackageManager: ()=>getPackageManager,
39
39
  readTsConfig: ()=>readTsConfig,
40
40
  readTsConfigByFile: ()=>readTsConfigByFile
41
41
  });
@@ -60,6 +60,9 @@ var __webpack_modules__ = {
60
60
  "./runtimeExports" (module) {
61
61
  module.exports = require("./runtimeExports.js");
62
62
  },
63
+ "./tsconfig" (module) {
64
+ module.exports = require("./tsconfig.js");
65
+ },
63
66
  "./version" (module) {
64
67
  module.exports = require("./version.js");
65
68
  },
@@ -198,6 +201,10 @@ var __webpack_exports__ = {};
198
201
  var __rspack_reexport = {};
199
202
  for(const __rspack_import_key in _modulePath__rspack_import_21)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_modulePath__rspack_import_21[__rspack_import_key];
200
203
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
204
+ var _tsconfig__rspack_import_22 = __webpack_require__("./tsconfig");
205
+ var __rspack_reexport = {};
206
+ for(const __rspack_import_key in _tsconfig__rspack_import_22)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_tsconfig__rspack_import_22[__rspack_import_key];
207
+ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
201
208
  })();
202
209
  for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
203
210
  Object.defineProperty(exports, '__esModule', {
@@ -25,11 +25,11 @@ var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
27
  isSSGEntry: ()=>isSSGEntry,
28
- isUseSSRBundle: ()=>isUseSSRBundle,
28
+ isSSR: ()=>isSSR,
29
+ isServiceWorker: ()=>isServiceWorker,
29
30
  isSingleEntry: ()=>isSingleEntry,
30
31
  isUseRsc: ()=>isUseRsc,
31
- isSSR: ()=>isSSR,
32
- isServiceWorker: ()=>isServiceWorker
32
+ isUseSSRBundle: ()=>isUseSSRBundle
33
33
  });
34
34
  const external_constants_js_namespaceObject = require("../constants.js");
35
35
  const external_type_js_namespaceObject = require("./type.js");
@@ -33,16 +33,16 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
- isVersionBeyond17: ()=>isVersionBeyond17,
37
- isReact18: ()=>isReact18,
38
- isWebOnly: ()=>isWebOnly,
39
36
  getReactVersion: ()=>getReactVersion,
40
37
  isApiOnly: ()=>isApiOnly,
41
38
  isBeyondReact17: ()=>isBeyondReact17,
42
39
  isDepExists: ()=>isDepExists,
43
- isTypescript: ()=>isTypescript,
40
+ isPackageInstalled: ()=>isPackageInstalled,
41
+ isReact18: ()=>isReact18,
44
42
  isSupportAutomaticJsx: ()=>isSupportAutomaticJsx,
45
- isPackageInstalled: ()=>isPackageInstalled
43
+ isTypescript: ()=>isTypescript,
44
+ isVersionBeyond17: ()=>isVersionBeyond17,
45
+ isWebOnly: ()=>isWebOnly
46
46
  });
47
47
  const external_path_namespaceObject = require("path");
48
48
  var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
@@ -33,10 +33,10 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
+ JS_LIKE_EXTENSION_RE: ()=>JS_LIKE_EXTENSION_RE,
36
37
  SOURCE_EXTENSIONS: ()=>SOURCE_EXTENSIONS,
37
38
  findMatchedSourcePath: ()=>findMatchedSourcePath,
38
- findSourceEntry: ()=>findSourceEntry,
39
- JS_LIKE_EXTENSION_RE: ()=>JS_LIKE_EXTENSION_RE
39
+ findSourceEntry: ()=>findSourceEntry
40
40
  });
41
41
  const external_node_fs_namespaceObject = require("node:fs");
42
42
  var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
@@ -33,12 +33,12 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
- isPnpmWorkspaces: ()=>isPnpmWorkspaces,
37
36
  findMonorepoRoot: ()=>findMonorepoRoot,
38
37
  getMonorepoPackages: ()=>getMonorepoPackages,
38
+ isLerna: ()=>isLerna,
39
39
  isMonorepo: ()=>isMonorepo,
40
- isYarnWorkspaces: ()=>isYarnWorkspaces,
41
- isLerna: ()=>isLerna
40
+ isPnpmWorkspaces: ()=>isPnpmWorkspaces,
41
+ isYarnWorkspaces: ()=>isYarnWorkspaces
42
42
  });
43
43
  const external_fs_namespaceObject = require("fs");
44
44
  var external_fs_default = /*#__PURE__*/ __webpack_require__.n(external_fs_namespaceObject);
@@ -24,11 +24,11 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- canUsePnpm: ()=>canUsePnpm,
28
- removeModuleSyncFromExports: ()=>removeModuleSyncFromExports,
29
27
  canUseNpm: ()=>canUseNpm,
28
+ canUsePnpm: ()=>canUsePnpm,
29
+ canUseYarn: ()=>canUseYarn,
30
30
  getPnpmVersion: ()=>getPnpmVersion,
31
- canUseYarn: ()=>canUseYarn
31
+ removeModuleSyncFromExports: ()=>removeModuleSyncFromExports
32
32
  });
33
33
  const external_compiled_js_namespaceObject = require("../compiled.js");
34
34
  async function getPnpmVersion() {
@@ -33,17 +33,17 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
+ formatImportPath: ()=>formatImportPath,
36
37
  getRealTemporaryDirectory: ()=>getRealTemporaryDirectory,
37
- removeLeadingSlash: ()=>removeLeadingSlash,
38
- removeTailSlash: ()=>removeTailSlash,
39
- normalizeToPosixPath: ()=>normalizeToPosixPath,
40
- isRelativePath: ()=>isRelativePath,
41
38
  getTemplatePath: ()=>getTemplatePath,
42
- removeSlash: ()=>removeSlash,
43
- splitPathString: ()=>splitPathString,
44
39
  isPathString: ()=>isPathString,
40
+ isRelativePath: ()=>isRelativePath,
45
41
  normalizeOutputPath: ()=>normalizeOutputPath,
46
- formatImportPath: ()=>formatImportPath
42
+ normalizeToPosixPath: ()=>normalizeToPosixPath,
43
+ removeLeadingSlash: ()=>removeLeadingSlash,
44
+ removeSlash: ()=>removeSlash,
45
+ removeTailSlash: ()=>removeTailSlash,
46
+ splitPathString: ()=>splitPathString
47
47
  });
48
48
  const external_fs_namespaceObject = require("fs");
49
49
  var external_fs_default = /*#__PURE__*/ __webpack_require__.n(external_fs_namespaceObject);
@@ -33,8 +33,8 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
- prettyInstructions: ()=>prettyInstructions,
37
- getAddressUrls: ()=>getAddressUrls
36
+ getAddressUrls: ()=>getAddressUrls,
37
+ prettyInstructions: ()=>prettyInstructions
38
38
  });
39
39
  const external_net_namespaceObject = require("net");
40
40
  const external_os_namespaceObject = require("os");
@@ -24,12 +24,12 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
+ cleanRequireCache: ()=>cleanRequireCache,
27
28
  compatibleRequire: ()=>compatibleRequire,
28
29
  dynamicImport: ()=>dynamicImport,
30
+ loadFromProject: ()=>loadFromProject,
29
31
  requireExistModule: ()=>requireExistModule,
30
- tryResolve: ()=>tryResolve,
31
- cleanRequireCache: ()=>cleanRequireCache,
32
- loadFromProject: ()=>loadFromProject
32
+ tryResolve: ()=>tryResolve
33
33
  });
34
34
  const external_node_path_namespaceObject = require("node:path");
35
35
  const external_node_url_namespaceObject = require("node:url");
@@ -24,9 +24,9 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- markRoutes: ()=>markRoutes,
28
27
  filterRoutesForServer: ()=>filterRoutesForServer,
29
- filterRoutesLoader: ()=>filterRoutesLoader
28
+ filterRoutesLoader: ()=>filterRoutesLoader,
29
+ markRoutes: ()=>markRoutes
30
30
  });
31
31
  const external_compiled_js_namespaceObject = require("../compiled.js");
32
32
  const { cloneDeep } = external_compiled_js_namespaceObject.lodash;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.n = (module)=>{
5
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
6
+ __webpack_require__.d(getter, {
7
+ a: getter
8
+ });
9
+ return getter;
10
+ };
11
+ })();
12
+ (()=>{
13
+ __webpack_require__.d = (exports1, definition)=>{
14
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
15
+ enumerable: true,
16
+ get: definition[key]
17
+ });
18
+ };
19
+ })();
20
+ (()=>{
21
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
22
+ })();
23
+ (()=>{
24
+ __webpack_require__.r = (exports1)=>{
25
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
26
+ value: 'Module'
27
+ });
28
+ Object.defineProperty(exports1, '__esModule', {
29
+ value: true
30
+ });
31
+ };
32
+ })();
33
+ var __webpack_exports__ = {};
34
+ __webpack_require__.r(__webpack_exports__);
35
+ __webpack_require__.d(__webpack_exports__, {
36
+ resolveServerTsconfig: ()=>resolveServerTsconfig
37
+ });
38
+ const external_path_namespaceObject = require("path");
39
+ var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
40
+ const external_constants_js_namespaceObject = require("./constants.js");
41
+ const resolveServerTsconfig = (appDirectory, configuredPath)=>{
42
+ if (configuredPath) return external_path_default().isAbsolute(configuredPath) ? configuredPath : external_path_default().resolve(appDirectory, configuredPath);
43
+ return external_path_default().resolve(appDirectory, external_constants_js_namespaceObject.TS_CONFIG_FILENAME);
44
+ };
45
+ exports.resolveServerTsconfig = __webpack_exports__.resolveServerTsconfig;
46
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
47
+ "resolveServerTsconfig"
48
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
49
+ Object.defineProperty(exports, '__esModule', {
50
+ value: true
51
+ });
@@ -33,8 +33,8 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
- watch: ()=>watch,
37
- WatchChangeType: ()=>WatchChangeType
36
+ WatchChangeType: ()=>WatchChangeType,
37
+ watch: ()=>watch
38
38
  });
39
39
  const external_path_namespaceObject = require("path");
40
40
  var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
@@ -36,38 +36,38 @@ var __webpack_require__ = {};
36
36
  var __webpack_exports__ = {};
37
37
  __webpack_require__.r(__webpack_exports__);
38
38
  __webpack_require__.d(__webpack_exports__, {
39
- urlJoin: ()=>url_join_index_js_default(),
40
- stripAnsi: ()=>strip_ansi_index_js_default(),
41
- gzipSize: ()=>gzip_size_index_js_default(),
42
- inquirer: ()=>inquirer,
43
- dotenvExpand: ()=>dotenv_expand_index_js_default(),
44
- nanoid: ()=>nanoid_index_js_namespaceObject.nanoid,
45
- signale: ()=>signale_index_js_default(),
39
+ Command: ()=>commander_index_js_namespaceObject.Command,
40
+ Signale: ()=>Signale,
41
+ address: ()=>address_index_js_default(),
42
+ browserslist: ()=>browserslist_index_js_default(),
46
43
  chalk: ()=>chalk_index_js_default(),
47
- glob: ()=>glob_index_js_default(),
48
- json5: ()=>json5_index_js_default(),
49
44
  chokidar: ()=>chokidar,
50
- slash: ()=>slash_index_js_default(),
45
+ debug: ()=>debug_index_js_default(),
46
+ dotenv: ()=>dotenv_index_js_default(),
47
+ dotenvExpand: ()=>dotenv_expand_index_js_default(),
48
+ execa: ()=>execa_index_js_default(),
49
+ fastGlob: ()=>fast_glob_index_js_default(),
51
50
  filesize: ()=>filesize_index_js_default(),
51
+ fs: ()=>index_js_default(),
52
+ glob: ()=>glob_index_js_default(),
53
+ globby: ()=>globby_index_js_default(),
54
+ gzipSize: ()=>gzip_size_index_js_default(),
55
+ inquirer: ()=>inquirer,
56
+ json5: ()=>json5_index_js_default(),
52
57
  lodash: ()=>lodash_index_js_default(),
53
- Command: ()=>commander_index_js_namespaceObject.Command,
54
- address: ()=>address_index_js_default(),
55
- debug: ()=>debug_index_js_default(),
56
- yaml: ()=>js_yaml_index_js_default(),
58
+ mime: ()=>mime,
59
+ minimist: ()=>minimist_index_js_default(),
60
+ nanoid: ()=>nanoid_index_js_namespaceObject.nanoid,
57
61
  ora: ()=>ora_index_js_default(),
58
- browserslist: ()=>browserslist_index_js_default(),
59
- globby: ()=>globby_index_js_default(),
60
62
  pkgUp: ()=>pkg_up_index_js_default(),
61
- fs: ()=>index_js_default(),
62
63
  program: ()=>commander_index_js_namespaceObject.program,
63
- minimist: ()=>minimist_index_js_default(),
64
- upath: ()=>upath_index_js_default(),
65
64
  semver: ()=>semver_index_js_default(),
66
- Signale: ()=>Signale,
67
- fastGlob: ()=>fast_glob_index_js_default(),
68
- dotenv: ()=>dotenv_index_js_default(),
69
- mime: ()=>mime,
70
- execa: ()=>execa_index_js_default()
65
+ signale: ()=>signale_index_js_default(),
66
+ slash: ()=>slash_index_js_default(),
67
+ stripAnsi: ()=>strip_ansi_index_js_default(),
68
+ upath: ()=>upath_index_js_default(),
69
+ urlJoin: ()=>url_join_index_js_default(),
70
+ yaml: ()=>js_yaml_index_js_default()
71
71
  });
72
72
  const external_node_module_namespaceObject = require("node:module");
73
73
  const external_import_js_namespaceObject = require("./import.js");
@@ -11,6 +11,7 @@ const API_DIR = 'api';
11
11
  const DEFAULT_API_PREFIX = '/api';
12
12
  const SERVER_DIR = 'server';
13
13
  const SHARED_DIR = 'shared';
14
+ const TS_CONFIG_FILENAME = 'tsconfig.json';
14
15
  const CONFIG_CACHE_DIR = './node_modules/.cache/bundle-require';
15
16
  const CONFIG_FILE_EXTENSIONS = [
16
17
  '.js',
@@ -26,4 +27,4 @@ const INTERNAL_RUNTIME_PLUGINS = {
26
27
  '@modern-js/runtime': '@modern-js/runtime/cli'
27
28
  };
28
29
  export { DEFAULT_ENTRY_NAME, MAIN_ENTRY_NAME, NESTED_ROUTE_SPEC_FILE, ROUTE_SPEC_FILE, SERVER_BUNDLE_DIRECTORY, SERVER_PLUGIN_BFF, SERVER_PLUGIN_POLYFILL, SERVER_RENDER_FUNCTION_NAME } from "../universal/constants.mjs";
29
- export { API_DIR, CONFIG_CACHE_DIR, CONFIG_FILE_EXTENSIONS, DEFAULT_API_PREFIX, DEFAULT_DEV_HOST, DEFAULT_RUNTIME_CONFIG, ENTRY_NAME_PATTERN, INTERNAL_RUNTIME_PLUGINS, JS_EXTENSIONS, LOADABLE_STATS_FILE, LOADER_ROUTES_DIR, OUTPUT_CONFIG_FILE, ROUTE_MANIFEST_FILE, SERVER_DIR, SERVER_WORKER_BUNDLE_DIRECTORY, SHARED_DIR };
30
+ export { API_DIR, CONFIG_CACHE_DIR, CONFIG_FILE_EXTENSIONS, DEFAULT_API_PREFIX, DEFAULT_DEV_HOST, DEFAULT_RUNTIME_CONFIG, ENTRY_NAME_PATTERN, INTERNAL_RUNTIME_PLUGINS, JS_EXTENSIONS, LOADABLE_STATS_FILE, LOADER_ROUTES_DIR, OUTPUT_CONFIG_FILE, ROUTE_MANIFEST_FILE, SERVER_DIR, SERVER_WORKER_BUNDLE_DIRECTORY, SHARED_DIR, TS_CONFIG_FILENAME };
@@ -20,3 +20,4 @@ export * from "./config.mjs";
20
20
  export * from "./version.mjs";
21
21
  export * from "./route.mjs";
22
22
  export * from "./modulePath.mjs";
23
+ export * from "./tsconfig.mjs";
@@ -0,0 +1,7 @@
1
+ import path from "path";
2
+ import { TS_CONFIG_FILENAME } from "./constants.mjs";
3
+ const resolveServerTsconfig = (appDirectory, configuredPath)=>{
4
+ if (configuredPath) return path.isAbsolute(configuredPath) ? configuredPath : path.resolve(appDirectory, configuredPath);
5
+ return path.resolve(appDirectory, TS_CONFIG_FILENAME);
6
+ };
7
+ export { resolveServerTsconfig };
@@ -12,6 +12,7 @@ const API_DIR = 'api';
12
12
  const DEFAULT_API_PREFIX = '/api';
13
13
  const SERVER_DIR = 'server';
14
14
  const SHARED_DIR = 'shared';
15
+ const TS_CONFIG_FILENAME = 'tsconfig.json';
15
16
  const CONFIG_CACHE_DIR = './node_modules/.cache/bundle-require';
16
17
  const CONFIG_FILE_EXTENSIONS = [
17
18
  '.js',
@@ -27,4 +28,4 @@ const INTERNAL_RUNTIME_PLUGINS = {
27
28
  '@modern-js/runtime': '@modern-js/runtime/cli'
28
29
  };
29
30
  export { DEFAULT_ENTRY_NAME, MAIN_ENTRY_NAME, NESTED_ROUTE_SPEC_FILE, ROUTE_SPEC_FILE, SERVER_BUNDLE_DIRECTORY, SERVER_PLUGIN_BFF, SERVER_PLUGIN_POLYFILL, SERVER_RENDER_FUNCTION_NAME } from "../universal/constants.mjs";
30
- export { API_DIR, CONFIG_CACHE_DIR, CONFIG_FILE_EXTENSIONS, DEFAULT_API_PREFIX, DEFAULT_DEV_HOST, DEFAULT_RUNTIME_CONFIG, ENTRY_NAME_PATTERN, INTERNAL_RUNTIME_PLUGINS, JS_EXTENSIONS, LOADABLE_STATS_FILE, LOADER_ROUTES_DIR, OUTPUT_CONFIG_FILE, ROUTE_MANIFEST_FILE, SERVER_DIR, SERVER_WORKER_BUNDLE_DIRECTORY, SHARED_DIR };
31
+ export { API_DIR, CONFIG_CACHE_DIR, CONFIG_FILE_EXTENSIONS, DEFAULT_API_PREFIX, DEFAULT_DEV_HOST, DEFAULT_RUNTIME_CONFIG, ENTRY_NAME_PATTERN, INTERNAL_RUNTIME_PLUGINS, JS_EXTENSIONS, LOADABLE_STATS_FILE, LOADER_ROUTES_DIR, OUTPUT_CONFIG_FILE, ROUTE_MANIFEST_FILE, SERVER_DIR, SERVER_WORKER_BUNDLE_DIRECTORY, SHARED_DIR, TS_CONFIG_FILENAME };
@@ -21,3 +21,4 @@ export * from "./config.mjs";
21
21
  export * from "./version.mjs";
22
22
  export * from "./route.mjs";
23
23
  export * from "./modulePath.mjs";
24
+ export * from "./tsconfig.mjs";
@@ -0,0 +1,8 @@
1
+ import "node:module";
2
+ import path from "path";
3
+ import { TS_CONFIG_FILENAME } from "./constants.mjs";
4
+ const resolveServerTsconfig = (appDirectory, configuredPath)=>{
5
+ if (configuredPath) return path.isAbsolute(configuredPath) ? configuredPath : path.resolve(appDirectory, configuredPath);
6
+ return path.resolve(appDirectory, TS_CONFIG_FILENAME);
7
+ };
8
+ export { resolveServerTsconfig };
@@ -23,6 +23,10 @@ export declare const API_DIR = "api";
23
23
  export declare const DEFAULT_API_PREFIX = "/api";
24
24
  export declare const SERVER_DIR = "server";
25
25
  export declare const SHARED_DIR = "shared";
26
+ /**
27
+ * Project root tsconfig filename.
28
+ */
29
+ export declare const TS_CONFIG_FILENAME = "tsconfig.json";
26
30
  /**
27
31
  * Modern.config.ts cached dir
28
32
  */
@@ -20,3 +20,4 @@ export * from './config';
20
20
  export * from './version';
21
21
  export * from './route';
22
22
  export * from './modulePath';
23
+ export * from './tsconfig';
@@ -0,0 +1 @@
1
+ export declare const resolveServerTsconfig: (appDirectory: string, configuredPath?: string) => string;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.1.5",
18
+ "version": "3.2.1",
19
19
  "types": "./dist/types/index.d.ts",
20
20
  "main": "./dist/cjs/index.js",
21
21
  "module": "./dist/esm/index.mjs",
@@ -142,17 +142,17 @@
142
142
  "rslog": "^1.3.2"
143
143
  },
144
144
  "devDependencies": {
145
- "@rslib/core": "0.21.2",
145
+ "@rslib/core": "0.21.5",
146
146
  "@types/node": "^20",
147
- "happy-dom": "^20.8.9",
147
+ "happy-dom": "^20.9.0",
148
148
  "typescript": "^5",
149
149
  "@modern-js/rslib": "2.68.10",
150
- "@scripts/rstest-config": "2.66.0",
151
- "@modern-js/types": "3.1.5"
150
+ "@modern-js/types": "3.2.1",
151
+ "@scripts/rstest-config": "2.66.0"
152
152
  },
153
153
  "peerDependencies": {
154
- "react": "^19.2.4",
155
- "react-dom": "^19.2.4"
154
+ "react": "^19.2.6",
155
+ "react-dom": "^19.2.6"
156
156
  },
157
157
  "peerDependenciesMeta": {
158
158
  "react": {