xshell 1.0.179 → 1.0.180

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/builder.d.ts CHANGED
@@ -24,8 +24,8 @@ export interface Dependency {
24
24
  type DependencyId = 'react' | 'react-dom' | 'lodash' | 'jquery' | 'xterm' | 'swiper' | 'dayjs' | 'antd' | 'antd-icons' | 'vscode-oniguruma' | 'antd-plots' | 'gridstack' | 'quill' | 'monaco' | 'echarts';
25
25
  export interface HtmlOptions {
26
26
  title: string;
27
- /** `./index.js` 也可以设置 entries 中的其他项, 应填写相对于 .html 的路径 */
28
- fp_entry?: string;
27
+ /** `index.js` 也可以设置 entries 中的其他项, 应填写相对于 fpd_out 的路径 */
28
+ entry?: string;
29
29
  device_viewport?: boolean;
30
30
  /** 也会在 copy_files 中一并被复制,应填写相对于 fpd_root 和 fpd_out 的路径 */
31
31
  icon?: string | AssetOption;
package/builder.js CHANGED
@@ -493,7 +493,7 @@ export class Bundler {
493
493
  ]);
494
494
  }
495
495
  async build_htmls(print = { info: true, files: false }) {
496
- await Promise.all(Object.entries(this.htmls).map(async ([fp_html, { fp_entry = 'index.js', device_viewport: device_width = false, icon, manifest, dependencies: _dependencies = this.dependencies, title, scripts, mscripts, notice = false, heads, }]) => {
496
+ await Promise.all(Object.entries(this.htmls).map(async ([fp_html, { entry = 'index.js', device_viewport: device_width = false, icon, manifest, dependencies: _dependencies = this.dependencies, title, scripts, mscripts, notice = false, heads, }]) => {
497
497
  const get = (asset) => typeof asset === 'string' ? asset : asset.out;
498
498
  const html_template = '<!doctype html>\n' +
499
499
  '<html>\n' +
@@ -507,7 +507,7 @@ export class Bundler {
507
507
  this.resolve_dependency_files(_dependencies, false, { production: this.production }).map(fp => ` <script src='{root}vendors/${fp}' defer></script>`).join_lines() +
508
508
  (scripts?.before ? scripts.before.map(asset => ` <script src='{root}${get(asset)}' defer></script>`).join_lines() : '') +
509
509
  (mscripts ? mscripts.map(mscript => ` <script src='{root}${get(mscript)}' type='module'></script>`).join_lines() : '') +
510
- ` <script src='{root}${fp_entry}' type='module'></script>\n` +
510
+ ` <script src='{root}${entry}' type='module'></script>\n` +
511
511
  (scripts?.after ? scripts.after.map(asset => ` <script src='{root}${get(asset)}' defer></script>`).join_lines() : '') +
512
512
  ' </head>\n' +
513
513
  ' <body>\n' +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xshell",
3
- "version": "1.0.179",
3
+ "version": "1.0.180",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "bin": {