aboutsummaryrefslogtreecommitdiff
path: root/src/javascript/jsc/config.zig
blob: 2f91e433d3db7f725f84d7c761388894df25eba4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
usingnamespace @import("../../global.zig");
const std = @import("std");

const Fs = @import("../../fs.zig");
const resolver = @import("../../resolver/resolver.zig");
const ast = @import("../../import_record.zig");
const NodeModuleBundle = @import("../../node_module_bundle.zig").NodeModuleBundle;
const logger = @import("../../logger.zig");
const Api = @import("../../api/schema.zig").Api;
const options = @import("../../options.zig");
const Bundler = @import("../../bundler.zig").ServeBundler;
const js_printer = @import("../../js_printer.zig");
const hash_map = @import("../../hash_map.zig");
const http = @import("../../http.zig");

usingnamespace @import("./node_env_buf_map.zig");

pub const DefaultBunDefines = struct {
    pub const Keys = struct {
        const window = "window";
    };
    pub const Values = struct {
        const window = "undefined";
    };
};

pub fn configureTransformOptionsForBunVM(allocator: *std.mem.Allocator, _args: Api.TransformOptions) !Api.TransformOptions {
    var args = _args;

    // args.serve = false;
    args.write = false;
    args.resolve = Api.ResolveMode.lazy;
    args.generate_node_module_bundle = false;
    return try configureTransformOptionsForBun(allocator, args);
}

pub fn configureTransformOptionsForBun(allocator: *std.mem.Allocator, _args: Api.TransformOptions) !Api.TransformOptions {
    var args = _args;
    args.platform = Api.Platform.bun;
    return args;
}
/packages/integrations/vercel/src/serverless/adapter.ts?h=@astrojs/vercel@3.7.2&id=ea910de61f9bd5c082914b5c6a7c083dff5e02a8&follow=1'>[ci] formatGravatar natemoo-re 2-4/+4 2023-07-14fix(#7654): exclude @vercel/nft (#7659)Gravatar Nate Moore 3-0/+11 2023-07-14[ci] formatGravatar natemoo-re 2-26/+28 2023-07-14Sitemap should only exclude 404 and 500 pages (#7655)Gravatar Nate Moore 7-29/+60 2023-07-14Revert "Clarify SSR limitations of sitemaps of dynamic routes (#7625)" (#7653)Gravatar Matthew Phillips 1-2/+0 2023-07-14[ci] formatGravatar ematipico 1-3/+2 2023-07-14refactor: use SSR manifest in dev (#7587)Gravatar Emanuele Stoppa 8-97/+182 2023-07-14[ci] formatGravatar matthewp 1-2/+1 2023-07-14Clarify SSR limitations of sitemaps of dynamic routes (#7625)Gravatar paulrudy 1-0/+3 2023-07-14[ci] release (#7645)astro@2.8.3Gravatar Houston (Bot) 44-85/+77 2023-07-14nit: export props has been unnecessary.. forever (#7646)Gravatar Erika 32-39/+39 2023-07-14fix(squoosh): Fix wrong file path in rotation check (#7650)Gravatar Erika 1-1/+3 2023-07-14[docs] fix link in image integration README (#7649)Gravatar Sarah Rainsberger 1-1/+1 2023-07-14Remove weird changeset symbols (#7648)Gravatar Bjorn Lu 2-2/+2 2023-07-14Refactor merge server config (#7639)Gravatar Bjorn Lu 3-28/+26 2023-07-13[ci] formatGravatar matthewp 4-16/+19 2023-07-13Fixes for redirects config (#7644)Gravatar Matthew Phillips 9-14/+110 2023-07-13fix(assets): Fix images not following EXIF rotation (#7637)Gravatar Erika 7-8/+46 2023-07-13[ci] formatGravatar Princesseuh 1-1/+1 2023-07-13Allow SVGs when using Assets (#7643)Gravatar Alvin Bryan 8-17/+46 2023-07-13Convert CLI top-level imports as dynamic imports (#7635)Gravatar Bjorn Lu 4-46/+45 2023-07-13[ci] release (#7624)astro@2.8.2@astrojs/vercel@3.7.1@astrojs/underscore-redirects@0.2.0@astrojs/netlify@2.4.0@astrojs/cloudflare@6.6.1Gravatar Houston (Bot) 49-108/+129 2023-07-13[ci] formatGravatar sarah11918 1-5/+10 2023-07-13[docs] update image integration README (#7633)Gravatar Sarah Rainsberger 1-2/+69 2023-07-13[ci] formatGravatar bluwy 1-1/+1 2023-07-13Move all CLI commands to their subfolders (#7634)Gravatar Bjorn Lu 7-102/+170 2023-07-13[ci] formatGravatar ematipico 1-2/+2 2023-07-13feat(@astrojs/netlify): add `build.split` support (#7615)Gravatar Emanuele Stoppa 20-35/+234 2023-07-13Update turbo cache flow (#7631)Gravatar Bjorn Lu 1-33/+36 2023-07-12Fix `build.excludeMiddleware` default type docs (#7630)Gravatar Yan Thomas 1-1/+1 2023-07-12Refactor config loading (#7622)Gravatar Bjorn Lu 6-151/+90 2023-07-12[ci] formatGravatar bluwy 1-1/+1 2023-07-12feat: bumped typescript-eslint to v6 stable 🥳 (#7626)Gravatar Josh Goldberg ✨ 4-43/+49 2023-07-12fix(@astrojs/vercel): improve file detection (#7621)Gravatar Emanuele Stoppa 16-25/+113 2023-07-11[ci] formatGravatar matthewp 1-1/+1 2023-07-11Fixes Response not being cloneable by middleware (#7623)Gravatar Matthew Phillips 5-0/+37 2023-07-11[ci] release (#7594)astro@2.8.1@astrojs/prefetch@0.3.0@astrojs/markdoc@0.4.2Gravatar Houston (Bot) 50-104/+100 2023-07-11Filter out astro from `peerDependencies` in `astro add` (#7620)Gravatar Chris Swithinbank 2-1/+7 2023-07-11[ci] formatGravatar bluwy 1-1/+1 2023-07-11Refactor simple CLI commands (#7619)Gravatar Bjorn Lu 12-115/+123 2023-07-10fix: `astro info` command fallback for package manager (#7618)Gravatar Emanuele Stoppa 2-1/+7 2023-07-10Add CLI startup speed benchmark (#7617)Gravatar Bjorn Lu 5-11/+95 2023-07-10[ci] formatGravatar bluwy 1-1/+1