@signageos/lib-bundler 23.8.1 → 23.8.2-master.4407

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.
@@ -0,0 +1,32 @@
1
+ import { ServeOptions, BuildContext } from 'esbuild';
2
+ import { Options as swcOptions } from '@swc/core';
3
+ import { IBundlerConfig, IBundlerOptions } from './IBundler';
4
+ export declare const BUNDLED_FILE_NAME = "bundle.js";
5
+ export declare const BUNDLER_DIRECTORY_PATH = "./node_modules/@signageos/lib/dist/ESBuild/";
6
+ export declare const ES_6_FOLDER_NAME = "es6";
7
+ export declare const TEMP_FOLDER_NAME = "temp";
8
+ export declare class Bundler {
9
+ readonly DEFAULT_CHROME_VERSION: number;
10
+ readonly config: IBundlerConfig;
11
+ readonly serveOptions: ServeOptions & {
12
+ port: number;
13
+ };
14
+ readonly esbuildOptions: {
15
+ readonly outdir: string;
16
+ readonly bundle: true;
17
+ readonly format: "iife";
18
+ readonly logLevel: "info";
19
+ readonly sourcemap: true;
20
+ readonly target: "es6";
21
+ readonly treeShaking: true;
22
+ };
23
+ constructor({ outdir, parameters, serveOptions, argv }: IBundlerOptions);
24
+ static copyAssetsToEs6Folder(expression?: string): Promise<void>;
25
+ static enc(x: any): string;
26
+ static prepareEs6Folder(): Promise<void>;
27
+ build(ctx: BuildContext, watchInsteadOfServe?: boolean): Promise<void>;
28
+ compileTypescript(tscArgs?: string[], force?: boolean): Promise<void>;
29
+ transpileToES5(options?: swcOptions): Promise<void>;
30
+ writeIndexFile(source: string, destInOutdir?: string, origin?: string): Promise<void>;
31
+ cleanOutDir(preservedFiles?: string[]): Promise<void>;
32
+ }
@@ -0,0 +1,34 @@
1
+ import { EnvConfig, Options as swcOptions } from '@swc/core';
2
+ import { ServeOptions } from 'esbuild';
3
+ export declare const BUNDLER_NAME = "signageOS Assets Bundler";
4
+ type Environment = 'development' | 'test' | 'production';
5
+ export interface IEnvOptions {
6
+ environment: Environment;
7
+ NODE_ENV: Environment;
8
+ }
9
+ export interface IBundlerConfig extends IEnvOptions {
10
+ outdir: string;
11
+ mode: 'build' | 'serve' | 'watch';
12
+ typeCheck: boolean;
13
+ }
14
+ export interface IBundlerOptions {
15
+ argv: ('--watch' | '--serve' | '--skipTypeCheck' | (string & {}))[];
16
+ outdir: string;
17
+ parameters: IEnvOptions;
18
+ serveOptions?: ServeOptions;
19
+ }
20
+ interface BaseOptions {
21
+ options?: swcOptions;
22
+ filename?: string;
23
+ envConfig?: EnvConfig;
24
+ }
25
+ interface OutdirOptions extends BaseOptions {
26
+ outdir: string;
27
+ sourceFiles?: never;
28
+ }
29
+ interface SourceFilesOptions extends BaseOptions {
30
+ sourceFiles: string[];
31
+ outdir?: never;
32
+ }
33
+ export type ITranspileOptions = OutdirOptions | SourceFilesOptions;
34
+ export {};
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/alias/noop.ts
21
+ var noop_exports = {};
22
+ __export(noop_exports, {
23
+ default: () => noop_default
24
+ });
25
+ module.exports = __toCommonJS(noop_exports);
26
+ var noop_default = void 0;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export default undefined;
@@ -0,0 +1,3 @@
1
+ import path from 'path-browserify';
2
+ declare const pathWithPosix: typeof path;
3
+ export = pathWithPosix;
@@ -0,0 +1,9 @@
1
+ import compat from 'core-js-compat';
2
+ export declare function buildPolyfill({ entries, dest, minify, }: {
3
+ entries?: string[];
4
+ customTargets?: NonNullable<Parameters<typeof compat>[0]>['targets'] & object;
5
+ dest: string;
6
+ minify?: boolean;
7
+ }): Promise<{
8
+ dest: string;
9
+ }>;
@@ -0,0 +1 @@
1
+ export declare const getHtml5TestScript: (enginePath?: string) => Promise<string>;
@@ -0,0 +1,2 @@
1
+ declare function loadWhichBrowser(cb: any): void;
2
+ export { loadWhichBrowser };