@staticbolt/core 1.0.0-beta.1 → 1.0.0-beta.11

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,20 @@
1
+ import { createRequire } from "node:module";
2
+
3
+ //#region \0rolldown/runtime.js
4
+ var __defProp = Object.defineProperty;
5
+ var __exportAll = (all, no_symbols) => {
6
+ let target = {};
7
+ for (var name in all) {
8
+ __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ }
13
+ if (!no_symbols) {
14
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
15
+ }
16
+ return target;
17
+ };
18
+
19
+ //#endregion
20
+ export { __exportAll as t };
package/lib/cli/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
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";
2
+ import { c as join, g as CONFIG_FILE_NAME, h as resolve, o as isAbsolute, t as Log } from "../logger-BfIn1ytK.mjs";
3
3
  import * as z from "zod";
4
4
  import { parseArgs } from "node:util";
5
5
  import { coerce, defineArguments, defineCLI, defineOptions, defineSubcommand } from "@staticbolt/args-parser";
@@ -1 +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,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AAM,EAAE,WAAW,UAAU;CAC3B,SAAS;EACP,KAAK,EACH,MAAM,UACP;EACD,QAAQ,EACN,MAAM,UACP;EACF;CACD,kBAAkB;CAClB,QAAQ;CACT,CAAC;AAEF,MAAM,WAAoB,OAAO,OAAO,QAAQ,KAAK;AACrD,MAAM,kBAA2B,OAAO;AAExC,MAAM,mBAAmB,QAAQ,SAAS;AAC1C,MAAM,aAAa,WAAW,gBAAgB,GAAG,kBAAkB,KAAK,kBAAkB,gBAAgB;AAE1G,MAAM,CAAC,cAAc,eAAe,MAAM,eAAe,WAAW;AACpE,IAAI,aAAa;CACf,IAAI,KAAK,kCAAkC,WAAW,GAAG;CACzD,MAAM;;AAGR,MAAM,SAAS,gBAAgB,EAAE;AAEjC,IAAI,OAAO,QAAQ,CAAC,WAAW,OAAO,KAAK,EACzC,OAAO,OAAO,KAAK,kBAAkB,OAAO,KAAK;AAGnD,IAAI,CAAC,OAAO,MACV,OAAO,OAAO;AAIhB,MAAM,WAAU,MADE,WAAW,KAAK,QAAQ,WAAW,EACjC,IAAI,QAAQ,KAAK,MAAM,EAAE,CAAC;AAE9C,IAAI,QAAQ,OAAO;CACjB,QAAQ,MAAM,QAAQ,MAAM,QAAQ;CACpC,QAAQ,IAAI,iGAAiG;CAC7G,QAAQ,KAAK,EAAE"}
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,IAAI;EACpE,IAAI,CAAC,aAAa,SAChB,OAAO,CAAC,sBAAM,IAAI,MAAM,kCAAkC,WAAW,EAAE,CAAC;EAG1E,OAAO,CAAC,aAAa,SAAS,IAAI;CACpC,SAAS,OAAO;EACd,OAAO,CAAC,MAAM,KAAc;CAC9B;AACF;;;;ACXA,MAAa,cAAc,iBAAiB;CAC1C,MAAM;CACN,MAAM;EACJ,aAAa;EACb,aAAa;EACb,SAAS;CACX;CAEA,WAAW,EACT,SAAS;EACP,QAAQ,EAAE,OAAO,EAAE,SAAS;EAC5B,MAAM,EACJ,aAAa,+BACf;CACF,EACF;AACF,CAAC;AAED,YAAY,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