Refactor Zig imports and file structure (part 1) (#21270)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
taylor.fish
2025-07-22 17:51:38 -07:00
committed by GitHub
parent 73d92c7518
commit 07cd45deae
564 changed files with 9917 additions and 9697 deletions

View File

@@ -109,7 +109,7 @@ fn execTask(allocator: std.mem.Allocator, task_: string, cwd: string, _: string,
.stdin = .inherit,
.windows = if (Environment.isWindows) .{
.loop = bun.JSC.EventLoopHandle.init(bun.JSC.MiniEventLoop.initGlobal(null)),
.loop = bun.jsc.EventLoopHandle.init(bun.jsc.MiniEventLoop.initGlobal(null)),
},
}) catch return;
}
@@ -1483,7 +1483,7 @@ pub const CreateCommand = struct {
.stdin = .inherit,
.windows = if (Environment.isWindows) .{
.loop = bun.JSC.EventLoopHandle.init(bun.JSC.MiniEventLoop.initGlobal(null)),
.loop = bun.jsc.EventLoopHandle.init(bun.jsc.MiniEventLoop.initGlobal(null)),
},
});
_ = try process.unwrap();
@@ -1663,7 +1663,7 @@ pub const CreateCommand = struct {
.entry_points = &[_]string{analyzer.entry_point},
.onFetch = @ptrCast(&Analyzer.onAnalyze),
};
try bun.CLI.BuildCommand.exec(bun.CLI.Command.get(), &fetcher);
try bun.cli.BuildCommand.exec(bun.cli.Command.get(), &fetcher);
}
pub fn extractInfo(ctx: Command.Context) !struct { example_tag: Example.Tag, template: []const u8 } {
var example_tag = Example.Tag.unknown;
@@ -1672,7 +1672,7 @@ pub const CreateCommand = struct {
const create_options = try CreateOptions.parse(ctx);
const positionals = create_options.positionals;
if (positionals.len == 0) {
bun.CLI.Command.Tag.printHelp(.CreateCommand, false);
bun.cli.Command.Tag.printHelp(.CreateCommand, false);
Global.crash();
}
@@ -2422,6 +2422,8 @@ const GitHandler = struct {
}
};
const string = []const u8;
const CopyFile = @import("../copy_file.zig");
const DotEnv = @import("../env_loader.zig");
const SourceFileProjectGenerator = @import("../create/SourceFileProjectGenerator.zig");
@@ -2438,16 +2440,15 @@ const bun = @import("bun");
const Environment = bun.Environment;
const Futex = bun.Futex;
const Global = bun.Global;
const JSON = bun.JSON;
const JSON = bun.json;
const JSPrinter = bun.js_printer;
const MutableString = bun.MutableString;
const Output = bun.Output;
const Progress = bun.Progress;
const clap = bun.clap;
const default_allocator = bun.default_allocator;
const js_ast = bun.JSAst;
const js_ast = bun.ast;
const logger = bun.logger;
const string = bun.string;
const strings = bun.strings;
const Archiver = bun.libarchive.Archiver;