@staticbolt/core 1.0.0-beta.0
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/LICENSE +22 -0
- package/README.md +70 -0
- package/lib/cli/index.d.mts +1 -0
- package/lib/cli/index.mjs +177 -0
- package/lib/cli/index.mjs.map +1 -0
- package/lib/dependency-tracker-BuZfopIj.mjs +485 -0
- package/lib/dependency-tracker-BuZfopIj.mjs.map +1 -0
- package/lib/index.d.mts +1734 -0
- package/lib/index.d.mts.map +1 -0
- package/lib/index.mjs +11 -0
- package/lib/index.mjs.map +1 -0
- package/lib/logger-BuxMGhij.mjs +190 -0
- package/lib/logger-BuxMGhij.mjs.map +1 -0
- package/lib/plugins/index.d.mts +1181 -0
- package/lib/plugins/index.d.mts.map +1 -0
- package/lib/plugins/index.mjs +8559 -0
- package/lib/plugins/index.mjs.map +1 -0
- package/package.json +112 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Ahmed Alabsi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Static Bolt
|
|
2
|
+
|
|
3
|
+
## Plugins
|
|
4
|
+
|
|
5
|
+
### Core Plugins
|
|
6
|
+
|
|
7
|
+
- [Script Metadata Plugin](./src/plugins/core-plugins/script-metadata/README.md)
|
|
8
|
+
- [Style Metadata Plugin](./src/plugins/core-plugins/style-metadata/README.md)
|
|
9
|
+
- [HTML Metadata Plugin](./src/plugins/core-plugins/html-metadata/README.md)
|
|
10
|
+
- [SVG Metadata Plugin](./src/plugins/core-plugins/svg-metadata/README.md)
|
|
11
|
+
- [Markdown Metadata Plugin](./src/plugins/core-plugins/markdown-metadata/README.md)
|
|
12
|
+
- [Web Manifest Metadata Plugin](./src/plugins/core-plugins/web-manifest-metadata/README.md)
|
|
13
|
+
- [Development Server Plugin](./src/plugins/core-plugins/development-server/README.md)
|
|
14
|
+
|
|
15
|
+
### HTML
|
|
16
|
+
|
|
17
|
+
- [HTML Pages Plugin](./src/plugins/html-pages/README.md)
|
|
18
|
+
- [HTML Layout Plugin](./src/plugins/html-layout/README.md)
|
|
19
|
+
- [HTML Fragment Plugin](./src/plugins/html-fragment/README.md)
|
|
20
|
+
- [HTML Insert Plugin](./src/plugins/html-insert/README.md)
|
|
21
|
+
- [HTML Markdown Plugin](./src/plugins/html-markdown/README.md)
|
|
22
|
+
- [HTML Inline Script Plugin](./src/plugins/html-inline-script/README.md)
|
|
23
|
+
- [HTML Inline Style Plugin](./src/plugins/html-inline-style/README.md)
|
|
24
|
+
- [HTML Inline SVG Plugin](./src/plugins/html-import/README.md)
|
|
25
|
+
- [HTML Inline Text Plugin](./src/plugins/html-inline-text/README.md)
|
|
26
|
+
- [HTML Bundle Script Plugin](./src/plugins/html-bundle-script/README.md)
|
|
27
|
+
- [HTML Bundle Style Plugin](./src/plugins/html-bundle-style/README.md)
|
|
28
|
+
- [HTML IIFE Script Plugin](./src/plugins/html-iife-script/README.md)
|
|
29
|
+
- [HTML Build Time Script Plugin](./src/plugins/html-build-time-script/README.md)
|
|
30
|
+
- [HTML Preload Plugin](./src/plugins/html-preload/README.md)
|
|
31
|
+
- [HTML Merge Styles Plugin](./src/plugins/html-merge-styles/README.md)
|
|
32
|
+
|
|
33
|
+
### Scripts and Styles
|
|
34
|
+
|
|
35
|
+
- [Transform JS Plugin](./src/plugins/transform-js/README.md)
|
|
36
|
+
- [Transform CSS Plugin](./src/plugins/transform-css/README.md)
|
|
37
|
+
- [Bundle Packages Plugin](./src/plugins/bundle-packages/README.md)
|
|
38
|
+
- [Import As String Plugin](./src/plugins/import-as-string/README.md)
|
|
39
|
+
- [Custom Ease Plugin](./src/plugins/custom-ease/README.md)
|
|
40
|
+
|
|
41
|
+
### Assets
|
|
42
|
+
|
|
43
|
+
- [Convert Images Plugin](./src/plugins/convert-images/README.md)
|
|
44
|
+
- [Copy Assets Plugin](./src/plugins/copy-assets/README.md)
|
|
45
|
+
- [SVGO Plugin](./src/plugins/svgo/README.md)
|
|
46
|
+
- [Web Manifest Plugin](./src/plugins/web-manifest/README.md)
|
|
47
|
+
|
|
48
|
+
### Internationalization
|
|
49
|
+
|
|
50
|
+
- [I18n Plugin](./src/plugins/i18n/README.md)
|
|
51
|
+
|
|
52
|
+
### Build Pipeline
|
|
53
|
+
|
|
54
|
+
- [Load Sources Plugin](./src/plugins/load-sources/README.md)
|
|
55
|
+
- [Write Files Plugin](./src/plugins/write-files/README.md)
|
|
56
|
+
- [Analyze Output Plugin](./src/plugins/analyze-output/README.md)
|
|
57
|
+
|
|
58
|
+
### SEO and PWA
|
|
59
|
+
|
|
60
|
+
- [Robots Text Plugin](./src/plugins/robots-text/README.md)
|
|
61
|
+
- [Sitemap Plugin](./src/plugins/sitemap/README.md)
|
|
62
|
+
- [Service Worker Plugin](./src/plugins/service-worker/README.md)
|
|
63
|
+
|
|
64
|
+
### CLI
|
|
65
|
+
|
|
66
|
+
- [Build CLI Plugin](./src/plugins/cli-plugins/build/README.md)
|
|
67
|
+
- [Serve CLI Plugin](./src/plugins/cli-plugins/serve/README.md)
|
|
68
|
+
- [Convert Fonts CLI Plugin](./src/plugins/cli-plugins/convert-fonts/README.md)
|
|
69
|
+
- [Generate Font Face CLI Plugin](./src/plugins/cli-plugins/generate-font-face/README.md)
|
|
70
|
+
- [Material You CLI Plugin](./src/plugins/cli-plugins/material-you/README.md)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
#!/usr/bin/env -S node --experimental-vm-modules --no-warnings
|
|
2
|
+
import { f as join, r as CONFIG_FILE_NAME, t as Log, u as isAbsolute, y as resolve } from "../logger-BuxMGhij.mjs";
|
|
3
|
+
import * as z from "zod";
|
|
4
|
+
import { parseArgs } from "node:util";
|
|
5
|
+
import { coerce, defineArguments, defineCLI, defineOptions, defineSubcommand } from "@staticbolt/args-parser";
|
|
6
|
+
|
|
7
|
+
//#region src/helpers/load-config.ts
|
|
8
|
+
async function loadConfigFile(configPath) {
|
|
9
|
+
try {
|
|
10
|
+
const loadedConfig = await import(configPath + `?update=${Date.now()}`);
|
|
11
|
+
if (!loadedConfig.default) return [null, /* @__PURE__ */ new Error(`Failed to load config file at "${configPath}"`)];
|
|
12
|
+
return [loadedConfig.default, null];
|
|
13
|
+
} catch (error) {
|
|
14
|
+
return [null, error];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/cli/commands/help.ts
|
|
20
|
+
const helpCommand = defineSubcommand({
|
|
21
|
+
name: "help",
|
|
22
|
+
meta: {
|
|
23
|
+
placeholder: "<command>",
|
|
24
|
+
description: "Print help message for a specific command.",
|
|
25
|
+
example: "staticbolt help build"
|
|
26
|
+
},
|
|
27
|
+
arguments: { command: {
|
|
28
|
+
schema: z.string().optional(),
|
|
29
|
+
meta: { description: "The command to get help for." }
|
|
30
|
+
} }
|
|
31
|
+
});
|
|
32
|
+
helpCommand.onExecute((results) => {
|
|
33
|
+
const { command } = results.arguments;
|
|
34
|
+
if (!helpCommand.generateCliHelpMessage || !helpCommand.generateSubcommandHelpMessage) throw new Error("internal error: missing help functions");
|
|
35
|
+
if (command) {
|
|
36
|
+
console.log(helpCommand.generateSubcommandHelpMessage(command));
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
console.log(helpCommand.generateCliHelpMessage());
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/cli/cli.ts
|
|
44
|
+
var CliProgram = class CliProgram {
|
|
45
|
+
program = defineCLI({
|
|
46
|
+
cliName: "staticbolt",
|
|
47
|
+
meta: {
|
|
48
|
+
description: "Build fast static websites.",
|
|
49
|
+
example: "staticbolt build \nstaticbolt serve"
|
|
50
|
+
},
|
|
51
|
+
options: {
|
|
52
|
+
help: {
|
|
53
|
+
aliases: ["h"],
|
|
54
|
+
schema: z.boolean().optional(),
|
|
55
|
+
coerce: coerce.boolean,
|
|
56
|
+
meta: { description: "Show this help message." }
|
|
57
|
+
},
|
|
58
|
+
version: {
|
|
59
|
+
aliases: ["v"],
|
|
60
|
+
schema: z.boolean().optional(),
|
|
61
|
+
coerce: coerce.boolean,
|
|
62
|
+
meta: { description: "Show current version." }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
#programWideType = this.program;
|
|
67
|
+
constructor() {
|
|
68
|
+
this.addCommand(helpCommand);
|
|
69
|
+
this.program.onExecute((results) => {
|
|
70
|
+
const { help, version } = results.options;
|
|
71
|
+
if (help) {
|
|
72
|
+
if (!this.program.generateCliHelpMessage) throw new Error("internal error: missing help functions");
|
|
73
|
+
console.log(this.program.generateCliHelpMessage());
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (version) {
|
|
77
|
+
console.log("v0.0.0");
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
console.error("No arguments provided. Use `static --help` for more information");
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
async initializePlugins(config, configPath) {
|
|
84
|
+
const plugins = config.plugins ?? [];
|
|
85
|
+
for (const pluginOrPlugins of plugins) for (const plugin of Array.isArray(pluginOrPlugins) ? pluginOrPlugins : [pluginOrPlugins]) if (plugin.cli) await plugin.cli.call(this, config, configPath);
|
|
86
|
+
}
|
|
87
|
+
static async init(config, configPath) {
|
|
88
|
+
const cliProgram = new CliProgram();
|
|
89
|
+
await cliProgram.initializePlugins(config, configPath);
|
|
90
|
+
return cliProgram;
|
|
91
|
+
}
|
|
92
|
+
run(cliArguments) {
|
|
93
|
+
return this.program.run(cliArguments);
|
|
94
|
+
}
|
|
95
|
+
defineSubcommand = defineSubcommand;
|
|
96
|
+
defineOptions = defineOptions;
|
|
97
|
+
defineArguments = defineArguments;
|
|
98
|
+
coerce = coerce;
|
|
99
|
+
addCommand(newSubcommand) {
|
|
100
|
+
if (!this.#programWideType.subcommands) {
|
|
101
|
+
this.#programWideType.subcommands = [newSubcommand];
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
return this.#programWideType.subcommands.push(newSubcommand);
|
|
105
|
+
}
|
|
106
|
+
addOptions(newOptions) {
|
|
107
|
+
if (!this.#programWideType.options) {
|
|
108
|
+
this.#programWideType.options = newOptions;
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
return Object.assign(this.#programWideType.options, newOptions);
|
|
112
|
+
}
|
|
113
|
+
addArguments(newArguments) {
|
|
114
|
+
if (!this.#programWideType.arguments) {
|
|
115
|
+
this.#programWideType.arguments = newArguments;
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
return Object.assign(this.#programWideType.arguments, newArguments);
|
|
119
|
+
}
|
|
120
|
+
addOptionsToCommand(commandName, newOptions) {
|
|
121
|
+
const command = this.#programWideType.subcommands?.find((command) => command.name === commandName);
|
|
122
|
+
if (!command) {
|
|
123
|
+
Log.error(`Command "${commandName}" not found`);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if (!command.options) {
|
|
127
|
+
command.options = newOptions;
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
return Object.assign(command.options, newOptions);
|
|
131
|
+
}
|
|
132
|
+
addArgumentsToCommand(commandName, newArguments) {
|
|
133
|
+
const command = this.#programWideType.subcommands?.find((command) => command.name === commandName);
|
|
134
|
+
if (!command) {
|
|
135
|
+
Log.error(`Command "${commandName}" not found`);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (!command.arguments) {
|
|
139
|
+
command.arguments = newArguments;
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
return Object.assign(command.arguments, newArguments);
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region src/cli/index.ts
|
|
148
|
+
const { values } = parseArgs({
|
|
149
|
+
options: {
|
|
150
|
+
cwd: { type: "string" },
|
|
151
|
+
config: { type: "string" }
|
|
152
|
+
},
|
|
153
|
+
allowPositionals: true,
|
|
154
|
+
strict: false
|
|
155
|
+
});
|
|
156
|
+
const inputCwd = values.cwd ?? process.cwd();
|
|
157
|
+
const inputConfigPath = values.config ?? ".staticbolt.ts";
|
|
158
|
+
const projectDirectory = resolve(inputCwd);
|
|
159
|
+
const configPath = isAbsolute(inputConfigPath) ? inputConfigPath : join(projectDirectory, inputConfigPath);
|
|
160
|
+
const [loadedConfig, configError] = await loadConfigFile(configPath);
|
|
161
|
+
if (configError) {
|
|
162
|
+
Log.warn(`Failed to load config file at "${configPath}"`);
|
|
163
|
+
throw configError;
|
|
164
|
+
}
|
|
165
|
+
const config = loadedConfig ?? {};
|
|
166
|
+
if (config.root && !isAbsolute(config.root)) config.root = join(projectDirectory, config.root);
|
|
167
|
+
if (!config.root) config.root = projectDirectory;
|
|
168
|
+
const results = (await CliProgram.init(config, configPath)).run(process.argv.slice(2));
|
|
169
|
+
if (results.error) {
|
|
170
|
+
console.error(results.error.message);
|
|
171
|
+
console.log("\n`static --help` for more information, or `static help <command>` for command-specific help\n");
|
|
172
|
+
process.exit(1);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
//#endregion
|
|
176
|
+
export { };
|
|
177
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["#programWideType"],"sources":["../../src/helpers/load-config.ts","../../src/cli/commands/help.ts","../../src/cli/cli.ts","../../src/cli/index.ts"],"sourcesContent":["import type { ValueOrError } from \"../utilities/value-or-error.ts\";\nimport type { AppConfig } from \"@staticbolt/core\";\n\nexport async function loadConfigFile(configPath: string): Promise<ValueOrError<AppConfig>> {\n try {\n const loadedConfig = (await import(configPath + `?update=${Date.now()}`)) as { default: AppConfig };\n if (!loadedConfig.default) {\n return [null, new Error(`Failed to load config file at \"${configPath}\"`)];\n }\n\n return [loadedConfig.default, null];\n } catch (error) {\n return [null, error as Error];\n }\n}\n","import { defineSubcommand } from \"@staticbolt/args-parser\";\nimport * as z from \"zod\";\n\nexport const helpCommand = defineSubcommand({\n name: \"help\",\n meta: {\n placeholder: \"<command>\",\n description: \"Print help message for a specific command.\",\n example: \"staticbolt help build\",\n },\n\n arguments: {\n command: {\n schema: z.string().optional(),\n meta: {\n description: \"The command to get help for.\",\n },\n },\n },\n});\n\nhelpCommand.onExecute(results => {\n const { command } = results.arguments;\n\n if (!helpCommand.generateCliHelpMessage || !helpCommand.generateSubcommandHelpMessage) {\n throw new Error(\"internal error: missing help functions\");\n }\n\n if (command) {\n console.log(helpCommand.generateSubcommandHelpMessage(command));\n return;\n }\n\n console.log(helpCommand.generateCliHelpMessage());\n});\n","import { coerce, defineArguments, defineCLI, defineOptions, defineSubcommand } from \"@staticbolt/args-parser\";\nimport * as z from \"zod\";\n\nimport { Log } from \"../utilities/logger.ts\";\nimport { helpCommand } from \"./commands/help.ts\";\n\nimport type { Argument, Cli, Option, Subcommand } from \"@staticbolt/args-parser\";\nimport type { AppConfig } from \"@staticbolt/core\";\n\nexport class CliProgram {\n program = defineCLI({\n cliName: \"staticbolt\",\n meta: {\n description: \"Build fast static websites.\",\n example: \"staticbolt build \\nstaticbolt serve\",\n },\n\n options: {\n help: {\n aliases: [\"h\"],\n schema: z.boolean().optional(),\n coerce: coerce.boolean,\n meta: {\n description: \"Show this help message.\",\n },\n },\n version: {\n aliases: [\"v\"],\n schema: z.boolean().optional(),\n coerce: coerce.boolean,\n meta: {\n description: \"Show current version.\",\n },\n },\n },\n });\n\n #programWideType: Cli = this.program;\n\n constructor() {\n this.addCommand(helpCommand);\n\n this.program.onExecute(results => {\n const { help, version } = results.options;\n\n if (help) {\n if (!this.program.generateCliHelpMessage) throw new Error(\"internal error: missing help functions\");\n console.log(this.program.generateCliHelpMessage());\n return;\n }\n\n if (version) {\n console.log(\"v0.0.0\");\n return;\n }\n\n console.error(\"No arguments provided. Use `static --help` for more information\");\n });\n }\n\n async initializePlugins(config: AppConfig, configPath: string) {\n const plugins = config.plugins ?? [];\n\n for (const pluginOrPlugins of plugins) {\n for (const plugin of Array.isArray(pluginOrPlugins) ? pluginOrPlugins : [pluginOrPlugins]) {\n if (plugin.cli) {\n await plugin.cli.call(this, config, configPath);\n }\n }\n }\n }\n\n static async init(config: AppConfig, configPath: string) {\n const cliProgram = new CliProgram();\n await cliProgram.initializePlugins(config, configPath);\n return cliProgram;\n }\n\n run(cliArguments: string[]) {\n return this.program.run(cliArguments);\n }\n\n readonly defineSubcommand = defineSubcommand;\n readonly defineOptions = defineOptions;\n readonly defineArguments = defineArguments;\n readonly coerce = coerce;\n\n addCommand(newSubcommand: Subcommand) {\n if (!this.#programWideType.subcommands) {\n this.#programWideType.subcommands = [newSubcommand];\n return;\n }\n\n return this.#programWideType.subcommands.push(newSubcommand);\n }\n\n addOptions(newOptions: Record<string, Option>) {\n if (!this.#programWideType.options) {\n this.#programWideType.options = newOptions;\n return;\n }\n\n return Object.assign(this.#programWideType.options, newOptions);\n }\n\n addArguments(newArguments: Record<string, Argument>) {\n if (!this.#programWideType.arguments) {\n this.#programWideType.arguments = newArguments;\n return;\n }\n\n return Object.assign(this.#programWideType.arguments, newArguments);\n }\n\n addOptionsToCommand(commandName: string, newOptions: Record<string, Option>) {\n const command = this.#programWideType.subcommands?.find(command => command.name === commandName);\n if (!command) {\n Log.error(`Command \"${commandName}\" not found`);\n return;\n }\n\n if (!command.options) {\n command.options = newOptions;\n return;\n }\n\n return Object.assign(command.options, newOptions);\n }\n\n addArgumentsToCommand(commandName: string, newArguments: Record<string, Argument>) {\n const command = this.#programWideType.subcommands?.find(command => command.name === commandName);\n if (!command) {\n Log.error(`Command \"${commandName}\" not found`);\n return;\n }\n\n if (!command.arguments) {\n command.arguments = newArguments;\n return;\n }\n\n return Object.assign(command.arguments, newArguments);\n }\n}\n","#!/usr/bin/env -S node --experimental-vm-modules --no-warnings\nimport { parseArgs } from \"node:util\";\n\nimport { loadConfigFile } from \"../helpers/load-config.ts\";\nimport { CONFIG_FILE_NAME } from \"../types/common.ts\";\nimport { Log } from \"../utilities/logger.ts\";\nimport { isAbsolute, join, resolve } from \"../utilities/path.ts\";\nimport { CliProgram } from \"./cli.ts\";\n\nconst { values } = parseArgs({\n options: {\n cwd: {\n type: \"string\",\n },\n config: {\n type: \"string\",\n },\n },\n allowPositionals: true,\n strict: false,\n});\n\nconst inputCwd: string = (values.cwd ?? process.cwd()) as string;\nconst inputConfigPath: string = (values.config ?? CONFIG_FILE_NAME) as string;\n\nconst projectDirectory = resolve(inputCwd);\nconst configPath = isAbsolute(inputConfigPath) ? inputConfigPath : join(projectDirectory, inputConfigPath);\n\nconst [loadedConfig, configError] = await loadConfigFile(configPath);\nif (configError) {\n Log.warn(`Failed to load config file at \"${configPath}\"`);\n throw configError;\n}\n\nconst config = loadedConfig ?? {};\n\nif (config.root && !isAbsolute(config.root)) {\n config.root = join(projectDirectory, config.root);\n}\n\nif (!config.root) {\n config.root = projectDirectory;\n}\n\nconst cli = await CliProgram.init(config, configPath);\nconst results = cli.run(process.argv.slice(2));\n\nif (results.error) {\n console.error(results.error.message);\n console.log(\"\\n`static --help` for more information, or `static help <command>` for command-specific help\\n\");\n process.exit(1);\n}\n"],"mappings":";;;;;;;AAGA,eAAsB,eAAe,YAAsD;CACzF,IAAI;EACF,MAAM,eAAgB,MAAM,OAAO,aAAa,WAAW,KAAK,KAAK;EACrE,IAAI,CAAC,aAAa,SAChB,OAAO,CAAC,sBAAM,IAAI,MAAM,kCAAkC,WAAW,GAAG,CAAC;EAG3E,OAAO,CAAC,aAAa,SAAS,KAAK;UAC5B,OAAO;EACd,OAAO,CAAC,MAAM,MAAe;;;;;;ACTjC,MAAa,cAAc,iBAAiB;CAC1C,MAAM;CACN,MAAM;EACJ,aAAa;EACb,aAAa;EACb,SAAS;EACV;CAED,WAAW,EACT,SAAS;EACP,QAAQ,EAAE,QAAQ,CAAC,UAAU;EAC7B,MAAM,EACJ,aAAa,gCACd;EACF,EACF;CACF,CAAC;AAEF,YAAY,WAAU,YAAW;CAC/B,MAAM,EAAE,YAAY,QAAQ;CAE5B,IAAI,CAAC,YAAY,0BAA0B,CAAC,YAAY,+BACtD,MAAM,IAAI,MAAM,yCAAyC;CAG3D,IAAI,SAAS;EACX,QAAQ,IAAI,YAAY,8BAA8B,QAAQ,CAAC;EAC/D;;CAGF,QAAQ,IAAI,YAAY,wBAAwB,CAAC;EACjD;;;;ACzBF,IAAa,aAAb,MAAa,WAAW;CACtB,UAAU,UAAU;EAClB,SAAS;EACT,MAAM;GACJ,aAAa;GACb,SAAS;GACV;EAED,SAAS;GACP,MAAM;IACJ,SAAS,CAAC,IAAI;IACd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