xshell 1.0.134 → 1.0.135

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
@@ -77,6 +77,7 @@ export interface BundlerOptions {
77
77
  export declare class Bundler {
78
78
  name: string;
79
79
  fpd_root: string;
80
+ target: 'nodejs' | 'web';
80
81
  production: boolean;
81
82
  fpd_out: string;
82
83
  source_map: boolean;
@@ -121,7 +122,8 @@ export declare class Bundler {
121
122
  constructor(name: string, target: 'web' | 'nodejs', fpd_root: string, fpd_out: string, fpdt_cache: string, entry: Record<string, string>, { source_map, globals, external_dayjs, externals, htmls, assets, commonjs2, single_chunk, dynamic_import, resolve_alias, assets_stats, analyzer, dts, exclude_modules, cache_version, production, sass, dependencies, license, }?: BundlerOptions);
122
123
  build(print?: boolean): Promise<void>;
123
124
  close(): Promise<void>;
124
- build_and_close(print?: boolean): Promise<void>;
125
+ build_all(print?: boolean): Promise<void>;
126
+ build_all_and_close(print?: boolean): Promise<void>;
125
127
  build_htmls(print?: {
126
128
  info: boolean;
127
129
  files: boolean;
package/builder.js CHANGED
@@ -97,6 +97,7 @@ const dependencies = {
97
97
  export class Bundler {
98
98
  name;
99
99
  fpd_root;
100
+ target;
100
101
  production;
101
102
  fpd_out;
102
103
  source_map;
@@ -140,6 +141,7 @@ export class Bundler {
140
141
  this.name = name;
141
142
  this.analyzer = analyzer;
142
143
  this.production = production;
144
+ this.target = target;
143
145
  this.fpd_root = fpd_root;
144
146
  this.fpd_out = fpd_out;
145
147
  this.source_map = source_map;
@@ -440,9 +442,22 @@ export class Bundler {
440
442
  });
441
443
  }));
442
444
  }
443
- async build_and_close(print = true) {
444
- await this.build(print);
445
- await this.close();
445
+ async build_all(print = true) {
446
+ await Promise.all([
447
+ this.build(print),
448
+ this.copy_files({ print: { info: print, files: false } }),
449
+ this.target === 'web' && this.build_htmls({ info: print, files: false })
450
+ ]);
451
+ }
452
+ async build_all_and_close(print = true) {
453
+ await Promise.all([
454
+ (async () => {
455
+ await this.build(print);
456
+ await this.close();
457
+ })(),
458
+ this.copy_files({ print: { info: print, files: false } }),
459
+ this.target === 'web' && this.build_htmls({ info: print, files: false })
460
+ ]);
446
461
  }
447
462
  async build_htmls(print = { info: true, files: false }) {
448
463
  await Promise.all(Object.entries(this.htmls).map(async ([fp_html, { device_viewport: device_width = false, fp_icon, fp_manifest, dependencies: _dependencies = this.dependencies, title, scripts, mscripts, notice = false, heads, }]) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xshell",
3
- "version": "1.0.134",
3
+ "version": "1.0.135",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "bin": {