@yannick-z/modulo 0.2.0 → 0.3.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.
- package/.vscode/extensions.json +3 -0
- package/README.md +57 -60
- package/bin/modulo.js +29 -19
- package/biome.json +34 -0
- package/package.json +36 -35
- package/rslib.config.ts +19 -19
- package/src/args/get-framework-name.ts +7 -7
- package/src/args/index.ts +16 -74
- package/src/args/preset.ts +16 -16
- package/src/cli/init.ts +10 -6
- package/src/cli/pack-code.ts +20 -9
- package/src/config/example/example-config.ts +50 -39
- package/src/config/example/example-externals.ts +21 -37
- package/src/config/index.ts +186 -16
- package/src/config/presets.ts +100 -0
- package/src/config/type.ts +34 -12
- package/src/index.ts +104 -10
- package/src/initiator/create-config-file.ts +52 -36
- package/src/initiator/create-project.ts +249 -0
- package/src/initiator/modify-scripts.ts +42 -42
- package/src/packer/auto-external-plugin.ts +205 -0
- package/src/packer/collect-modules.ts +58 -69
- package/src/packer/get-externals-and-tags.ts +82 -55
- package/src/packer/lib.ts +78 -70
- package/src/packer/page.ts +105 -82
- package/src/packer/prepare.ts +63 -57
- package/src/tools/cli.ts +21 -0
- package/src/tools/file.ts +84 -14
- package/src/tools/find-path-root.ts +52 -25
- package/src/tools/get-framework-name.ts +7 -7
- package/src/tools/get-ui-plugin.ts +27 -13
- package/src/tools/json.ts +63 -9
- package/src/tools/log.ts +58 -0
- package/src/tools/merge-user-config.ts +17 -17
- package/src/tools/omit-root-path.ts +17 -7
- package/src/tools/panic.ts +12 -8
- package/src/tools/string.ts +13 -2
- package/src/type/guard.ts +22 -3
- package/tsconfig.json +9 -9
- package/dist/index.js +0 -773
- package/src/args/cmd.ts +0 -16
- package/src/args/mode.ts +0 -38
- package/src/args/node_env.ts +0 -15
- package/src/args/target.ts +0 -44
- package/src/config/externals.ts +0 -70
- package/src/config/generate_config.ts +0 -105
- package/src/config/preset/alias.ts +0 -3
- package/src/config/preset/dev-server.ts +0 -6
- package/src/config/preset/dirs.ts +0 -12
- package/src/config/preset/html.ts +0 -19
- package/src/config/preset/index.ts +0 -23
- package/src/config/preset/libs.ts +0 -5
- package/src/config/preset/minify.ts +0 -24
- package/src/config/preset/url.ts +0 -4
- package/src/tools/debug-log.ts +0 -37
package/src/args/cmd.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type minimist from "minimist";
|
|
2
|
-
import { PANIC_IF } from "../tools/panic.ts";
|
|
3
|
-
|
|
4
|
-
// 命令
|
|
5
|
-
export function get_cmd(argv: minimist.ParsedArgs) {
|
|
6
|
-
const cmd_list = ["build", "dev", "init"] as const;
|
|
7
|
-
const cmd = argv._[0] as (typeof cmd_list)[number];
|
|
8
|
-
PANIC_IF(
|
|
9
|
-
!cmd_list.includes(cmd),
|
|
10
|
-
`modulo必须执行 ${cmd_list.join(" 或 ")} 命令`
|
|
11
|
-
);
|
|
12
|
-
return cmd;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export type ModuloCmd_Pack = "build" | "dev";
|
|
16
|
-
export type ModuloCmd_Init = "init";
|
package/src/args/mode.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type minimist from "minimist";
|
|
2
|
-
import picocolors from "picocolors";
|
|
3
|
-
import { PANIC_IF } from "../tools/panic.ts";
|
|
4
|
-
|
|
5
|
-
const mode_list = ["dev", "development", "prd", "production"];
|
|
6
|
-
|
|
7
|
-
export function get_env(argv: minimist.ParsedArgs, cmd: "dev" | "build") {
|
|
8
|
-
// mode参数
|
|
9
|
-
let env = "" as "dev" | "prd";
|
|
10
|
-
if (argv.env) {
|
|
11
|
-
if (argv.env === "dev" || argv.env === "development") {
|
|
12
|
-
env = "dev";
|
|
13
|
-
} else if (argv.env === "prd" || argv.env === "production") {
|
|
14
|
-
env = "prd";
|
|
15
|
-
} else {
|
|
16
|
-
PANIC_IF(true, `env参数只能为 ${mode_list.join(" 或 ")}`);
|
|
17
|
-
}
|
|
18
|
-
console.log(picocolors.blue(`env = ${env}`));
|
|
19
|
-
} else if (cmd === "build" || cmd === "dev") {
|
|
20
|
-
if (process.env.NODE_ENV) {
|
|
21
|
-
env = process.env.NODE_ENV === "production" ? "prd" : "dev";
|
|
22
|
-
console.log(
|
|
23
|
-
picocolors.yellow("\n未设置env,将根据process.env.NODE_ENV自动设置\n"),
|
|
24
|
-
picocolors.yellow(
|
|
25
|
-
`process.env.NODE_ENV = ${process.env.NODE_ENV}, env = ${env}`
|
|
26
|
-
)
|
|
27
|
-
);
|
|
28
|
-
} else {
|
|
29
|
-
env = cmd === "build" ? "prd" : "dev";
|
|
30
|
-
console.log(
|
|
31
|
-
picocolors.yellow("\n未设置env,将根据build或dev命令自动设置\n"),
|
|
32
|
-
picocolors.yellow(`cmd = ${cmd}, env = ${env}`)
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return env;
|
|
38
|
-
}
|
package/src/args/node_env.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import picocolors from 'picocolors';
|
|
2
|
-
|
|
3
|
-
export function set_node_env(mode: 'dev' | 'prd') {
|
|
4
|
-
/**
|
|
5
|
-
* 保证process.env.NODE_ENV有值
|
|
6
|
-
*/
|
|
7
|
-
const _node_env = mode === 'dev' ? 'development' : 'production';
|
|
8
|
-
if (process.env.NODE_ENV !== _node_env) {
|
|
9
|
-
console.log(
|
|
10
|
-
picocolors.yellow('\nprocess.env.NODE_ENV 与 mode 不一致, 将被强制设置为与mode匹配的值\n'),
|
|
11
|
-
picocolors.yellow(`mode = ${mode}, process.env.NODE_ENV = ${_node_env}\n`),
|
|
12
|
-
);
|
|
13
|
-
process.env.NODE_ENV = _node_env;
|
|
14
|
-
}
|
|
15
|
-
}
|
package/src/args/target.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type minimist from "minimist";
|
|
2
|
-
import { PANIC_IF } from "../tools/panic.ts";
|
|
3
|
-
import type { ModuloCmd_Init, ModuloCmd_Pack } from "./cmd";
|
|
4
|
-
|
|
5
|
-
const pack_options = {
|
|
6
|
-
page: "构建页面",
|
|
7
|
-
module: "构建模块",
|
|
8
|
-
all: "页面和模块",
|
|
9
|
-
};
|
|
10
|
-
const init_options = {
|
|
11
|
-
config: "modulo的配置文件",
|
|
12
|
-
script: "package.json中modulo的启动命令",
|
|
13
|
-
};
|
|
14
|
-
const options = {
|
|
15
|
-
build: pack_options,
|
|
16
|
-
dev: {
|
|
17
|
-
page: pack_options.page,
|
|
18
|
-
module: pack_options.module,
|
|
19
|
-
},
|
|
20
|
-
init: init_options,
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export type ModuloTarget_Pack = keyof typeof pack_options;
|
|
24
|
-
export type ModuloTarget_Init = keyof typeof init_options;
|
|
25
|
-
|
|
26
|
-
export function get_cmd_target<T extends ModuloCmd_Pack | ModuloCmd_Init>(
|
|
27
|
-
argv: minimist.ParsedArgs,
|
|
28
|
-
cmd: T
|
|
29
|
-
) {
|
|
30
|
-
const target = argv._[1];
|
|
31
|
-
|
|
32
|
-
const target_list = options[cmd];
|
|
33
|
-
|
|
34
|
-
PANIC_IF(
|
|
35
|
-
!(target in target_list),
|
|
36
|
-
`modulo ${cmd} 命令必须执行 ${Object.entries(target_list).map(
|
|
37
|
-
([k, v]) => `\n${k} - ${v}`
|
|
38
|
-
)} 几种目标`
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
return target as T extends ModuloCmd_Init
|
|
42
|
-
? ModuloTarget_Init
|
|
43
|
-
: ModuloTarget_Pack;
|
|
44
|
-
}
|
package/src/config/externals.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { is_record, is_string } from "../type/guard.ts";
|
|
2
|
-
|
|
3
|
-
export interface UmdExternalUrl {
|
|
4
|
-
umd: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface EsmExternalUrl {
|
|
8
|
-
esm: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function is_umd_url(data: unknown): data is UmdExternalUrl {
|
|
12
|
-
return is_record(data) && is_string(data.umd);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function is_esm_url(data: unknown): data is EsmExternalUrl {
|
|
16
|
-
return is_record(data) && is_string(data.esm);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type ModuleTypedExternalUrl = UmdExternalUrl | EsmExternalUrl;
|
|
20
|
-
|
|
21
|
-
export function is_module_typed_external_url(
|
|
22
|
-
data: unknown
|
|
23
|
-
): data is ModuleTypedExternalUrl {
|
|
24
|
-
return is_umd_url(data) || is_esm_url(data);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface EnvExternalUrl {
|
|
28
|
-
dev: ModuleTypedExternalUrl | string;
|
|
29
|
-
prd: ModuleTypedExternalUrl | string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export function is_env_external(data: unknown): data is EnvExternalUrl {
|
|
33
|
-
return (
|
|
34
|
-
is_record(data) &&
|
|
35
|
-
(is_string(data.dev) || is_module_typed_external_url(data.dev)) &&
|
|
36
|
-
(is_string(data.prd) || is_module_typed_external_url(data.prd))
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export type ConfigExternalUrl =
|
|
41
|
-
| ModuleTypedExternalUrl
|
|
42
|
-
| EnvExternalUrl
|
|
43
|
-
| string;
|
|
44
|
-
|
|
45
|
-
export interface ImportExternal {
|
|
46
|
-
url: ConfigExternalUrl;
|
|
47
|
-
importName?: string | string[];
|
|
48
|
-
preset?: string;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export function is_url_config(data: unknown): data is ConfigExternalUrl {
|
|
52
|
-
return (
|
|
53
|
-
is_module_typed_external_url(data) ||
|
|
54
|
-
is_env_external(data) ||
|
|
55
|
-
is_string(data)
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function is_import_external(data: unknown): data is ImportExternal {
|
|
60
|
-
// 没有global的一概作为import的依赖
|
|
61
|
-
return is_record(data) && is_url_config(data.url) && !is_string(data.global);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export type ExternalLibs = {
|
|
65
|
-
[name: string]:
|
|
66
|
-
| ImportExternal
|
|
67
|
-
| ModuleTypedExternalUrl
|
|
68
|
-
| EnvExternalUrl
|
|
69
|
-
| string;
|
|
70
|
-
};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { resolve } from "node:path";
|
|
2
|
-
import { cwd } from "node:process";
|
|
3
|
-
import type { ModuloArgs_Pack } from "../args/index.ts";
|
|
4
|
-
import { debug_log } from "../tools/debug-log.ts";
|
|
5
|
-
import { resolve_and_read } from "../tools/file.ts";
|
|
6
|
-
import { jsonparse } from "../tools/json.ts";
|
|
7
|
-
import { merge_user_config } from "../tools/merge-user-config.ts";
|
|
8
|
-
import { PANIC_IF } from "../tools/panic.ts";
|
|
9
|
-
import { preset_config } from "./preset/index.ts";
|
|
10
|
-
import { preset_minify_config } from "./preset/minify.ts";
|
|
11
|
-
import type { GLOBAL_CONFIG, USER_CONFIG } from "./type.ts";
|
|
12
|
-
/**
|
|
13
|
-
* 命令启动时候的目录作为根目录
|
|
14
|
-
*/
|
|
15
|
-
export const root = cwd();
|
|
16
|
-
let global_config: GLOBAL_CONFIG;
|
|
17
|
-
|
|
18
|
-
export function get_global_config(args: ModuloArgs_Pack): GLOBAL_CONFIG {
|
|
19
|
-
if (!global_config) {
|
|
20
|
-
/**
|
|
21
|
-
* 读取配置文件
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
// biome-ignore lint/style/noNonNullAssertion: <有panic保护>
|
|
25
|
-
const user_config = jsonparse<USER_CONFIG>(
|
|
26
|
-
resolve_and_read(root, args.pack.config)
|
|
27
|
-
)!;
|
|
28
|
-
PANIC_IF(!user_config, "根目录下没有配置文件");
|
|
29
|
-
debug_log("input user config", user_config);
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* 将配置文件和默认配置合并
|
|
33
|
-
*/
|
|
34
|
-
merge_user_config(preset_config, user_config);
|
|
35
|
-
const _config: GLOBAL_CONFIG = preset_config;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* src目录
|
|
39
|
-
*/
|
|
40
|
-
const src = resolve(root, _config.input.src);
|
|
41
|
-
const input = {
|
|
42
|
-
modules: resolve(src, _config.input.modules),
|
|
43
|
-
pages: resolve(src, _config.input.pages),
|
|
44
|
-
src: src,
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* dist目录
|
|
49
|
-
*/
|
|
50
|
-
const dist = resolve(root, _config.output.dist);
|
|
51
|
-
const output = {
|
|
52
|
-
..._config.output,
|
|
53
|
-
dist: dist,
|
|
54
|
-
modules: resolve(dist, _config.output.modules),
|
|
55
|
-
pages: resolve(dist, _config.output.pages),
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* 允许定制template
|
|
60
|
-
*/
|
|
61
|
-
const html = _config.html?.template
|
|
62
|
-
? { ..._config.html, template: resolve(root, _config.html.template) }
|
|
63
|
-
: _config.html;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* 所有define的值都序列化以正确传入
|
|
67
|
-
*/
|
|
68
|
-
const define = Object.fromEntries(
|
|
69
|
-
Object.entries({
|
|
70
|
-
..._config.define,
|
|
71
|
-
"process.env.NODE_ENV": process.env.NODE_ENV,
|
|
72
|
-
"import.meta.env.MOUNT_ID": _config.html.root,
|
|
73
|
-
}).map(([k, v]) => [k, JSON.stringify(v)])
|
|
74
|
-
);
|
|
75
|
-
debug_log("当前模式", process.env.NODE_ENV);
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* minify代码的开关
|
|
79
|
-
*/
|
|
80
|
-
const minify =
|
|
81
|
-
_config.minify === true ? preset_minify_config : _config.minify;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* alias 允许使用{src}作为占位符,取值来自input.src
|
|
85
|
-
*/
|
|
86
|
-
const alias = Object.fromEntries(
|
|
87
|
-
Object.entries(_config.alias).map(([k, v]) => [
|
|
88
|
-
k,
|
|
89
|
-
v.replace("{input.src}", input.src),
|
|
90
|
-
])
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
global_config = {
|
|
94
|
-
..._config,
|
|
95
|
-
define,
|
|
96
|
-
html,
|
|
97
|
-
input,
|
|
98
|
-
minify,
|
|
99
|
-
output,
|
|
100
|
-
alias,
|
|
101
|
-
};
|
|
102
|
-
debug_log("global config", global_config);
|
|
103
|
-
}
|
|
104
|
-
return global_config;
|
|
105
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export const preset_dev_server_config = {
|
|
2
|
-
open: false as false | string[], // dev时是否自动打开指定页面
|
|
3
|
-
port: 8080, // 开发页面时, dev-server服务器端口
|
|
4
|
-
proxy: {} as Record<string, string | { target: string; pathRewrite?: Record<string, string> }>, // dev时的代理配置
|
|
5
|
-
};
|
|
6
|
-
export type DEV_SERVER_CONFIG = typeof preset_dev_server_config;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export const preset_input_dirs = {
|
|
2
|
-
src: "src", // 源码目录
|
|
3
|
-
pages: "pages", // 页面目录
|
|
4
|
-
modules: "modules", // 组件目录
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export const preset_output_dirs = {
|
|
8
|
-
dist: "dist", // 源码目录
|
|
9
|
-
pages: "", // 页面目录输出目录,默认使用dist/..
|
|
10
|
-
modules: "modules", // 组件输出目录,默认使用dist/modules/..
|
|
11
|
-
filenameHash: true,
|
|
12
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface Tag {
|
|
2
|
-
append?: boolean;
|
|
3
|
-
attrs?: Record<string, string>;
|
|
4
|
-
children?: string;
|
|
5
|
-
hash?: boolean | string;
|
|
6
|
-
head?: boolean;
|
|
7
|
-
publicPath?: string | boolean;
|
|
8
|
-
tag: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const default_html_config = {
|
|
12
|
-
meta: {} as Record<string, string>,
|
|
13
|
-
root: '', // html挂载点id, 只允许id
|
|
14
|
-
tags: [] as Tag[],
|
|
15
|
-
template: '', // html模板的路径
|
|
16
|
-
title: '', // html标题
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export type HTML_CONFIG = typeof default_html_config;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { OutputConfig } from "@rsbuild/core";
|
|
2
|
-
import { preset_alias } from "./alias.ts";
|
|
3
|
-
import { preset_dev_server_config } from "./dev-server.ts";
|
|
4
|
-
import { preset_input_dirs, preset_output_dirs } from "./dirs.ts";
|
|
5
|
-
import { default_html_config } from "./html.ts";
|
|
6
|
-
import { preset_ui_libs } from "./libs.ts";
|
|
7
|
-
import { preset_minify_config } from "./minify.ts";
|
|
8
|
-
import { preset_url_config } from "./url.ts";
|
|
9
|
-
import type { ExternalLibs } from "../externals.ts";
|
|
10
|
-
|
|
11
|
-
export const preset_config = {
|
|
12
|
-
analyze: false, // 是否执行bundleAnalyze
|
|
13
|
-
define: {} as Record<string, string | boolean | number>, // 配置全局变量,用于打包时替换代码中的全局变量
|
|
14
|
-
dev_server: preset_dev_server_config,
|
|
15
|
-
externals: {} as ExternalLibs,
|
|
16
|
-
html: default_html_config,
|
|
17
|
-
input: preset_input_dirs,
|
|
18
|
-
minify: preset_minify_config as OutputConfig["minify"], // 是否压缩产物,同时进行mangle
|
|
19
|
-
output: preset_output_dirs,
|
|
20
|
-
ui_lib: preset_ui_libs,
|
|
21
|
-
url: preset_url_config,
|
|
22
|
-
alias: preset_alias,
|
|
23
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { OutputConfig } from "@rsbuild/core";
|
|
2
|
-
|
|
3
|
-
export const preset_minify_config: OutputConfig["minify"] = {
|
|
4
|
-
js: true,
|
|
5
|
-
jsOptions: {
|
|
6
|
-
minimizerOptions: {
|
|
7
|
-
compress: {
|
|
8
|
-
dead_code: true,
|
|
9
|
-
defaults: false,
|
|
10
|
-
toplevel: true,
|
|
11
|
-
unused: true,
|
|
12
|
-
},
|
|
13
|
-
format: {
|
|
14
|
-
comments: "some",
|
|
15
|
-
ecma: 2015,
|
|
16
|
-
preserve_annotations: true,
|
|
17
|
-
safari10: true,
|
|
18
|
-
semicolons: false,
|
|
19
|
-
},
|
|
20
|
-
mangle: true,
|
|
21
|
-
minify: true,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
};
|
package/src/config/preset/url.ts
DELETED
package/src/tools/debug-log.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as fs from "node:fs";
|
|
2
|
-
import * as path from "node:path";
|
|
3
|
-
import picocolors from "picocolors";
|
|
4
|
-
import { argv_debug, argv_verbose } from "../args/index.ts";
|
|
5
|
-
|
|
6
|
-
const logFile = path.join(process.cwd(), "modulo.debug.log");
|
|
7
|
-
let index = 0;
|
|
8
|
-
|
|
9
|
-
let debug_log_function: (hint: string, ...params: any) => void;
|
|
10
|
-
|
|
11
|
-
export function debug_log(_hint: string, ..._params: any) {
|
|
12
|
-
if (!debug_log_function) {
|
|
13
|
-
debug_log_function = (hint: string, ...params: any) => {
|
|
14
|
-
if (argv_debug || argv_verbose) {
|
|
15
|
-
const timestamp = new Date().toISOString();
|
|
16
|
-
const sn = String(index++).padStart(3, "0");
|
|
17
|
-
const logEntry = `--------------\n${sn} [${timestamp}] ${hint}\n${params
|
|
18
|
-
.map((p: unknown) =>
|
|
19
|
-
typeof p === "object" ? JSON.stringify(p, null, 2) : String(p)
|
|
20
|
-
)
|
|
21
|
-
.join("\n")}\n---------------\n\n`;
|
|
22
|
-
|
|
23
|
-
if (argv_verbose) {
|
|
24
|
-
console.log(logEntry);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
if (argv_debug) {
|
|
28
|
-
// 打印序列号方便debug
|
|
29
|
-
console.log(picocolors.blue(`\ndebug log ${sn}`));
|
|
30
|
-
|
|
31
|
-
fs.appendFileSync(logFile, logEntry);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
debug_log_function(_hint, ..._params);
|
|
37
|
-
}
|