Skip to content

Commit

Permalink
Merge pull request #1466 from cloudflare/jsnell/more-api-header-cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell authored Dec 4, 2023
2 parents ce6dfa3 + 2d11e67 commit a133abb
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 25 deletions.
5 changes: 2 additions & 3 deletions src/workerd/api/form-data.c++
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
#include "util.h"
#include <kj/vector.h>
#include <kj/encoding.h>
#include <algorithm>
#include <functional>
#include <regex>
#include <kj/parse/char.h>
#include <kj/compat/http.h>
#include <workerd/util/mimetype.h>
#include <algorithm>
#include <regex>

#if !_MSC_VER
#include <strings.h>
Expand Down
9 changes: 1 addition & 8 deletions src/workerd/api/form-data.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@

#pragma once

#include "blob.h"
#include <kj/vector.h>
#include <kj/compat/url.h>
#include <workerd/jsg/jsg.h>
#include "blob.h"
#include <workerd/io/compatibility-date.capnp.h>

namespace workerd::api {

namespace url {
class URLSearchParams;
} // namespace url

// Implements the FormData interface as prescribed by:
// https://xhr.spec.whatwg.org/#interface-formdata
//
Expand Down Expand Up @@ -168,8 +163,6 @@ class FormData: public jsg::Object {
KJ_UNREACHABLE;
}
}

friend class url::URLSearchParams;
};

#define EW_FORMDATA_ISOLATE_TYPES \
Expand Down
6 changes: 2 additions & 4 deletions src/workerd/api/hyperdrive.c++
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
// https://opensource.org/licenses/Apache-2.0

#include "hyperdrive.h"
#include "sockets.h"
#include "http.h"
#include <openssl/rand.h>
#include <cstdint>
#include <kj/compat/http.h>
#include <kj/encoding.h>
#include "sockets.h"
#include "global-scope.h"
#include <kj/string.h>
#include <workerd/util/uuid.h>

namespace workerd::api {
Hyperdrive::Hyperdrive(uint clientIndex, kj::String database,
Expand Down
11 changes: 4 additions & 7 deletions src/workerd/api/hyperdrive.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@

#pragma once

#include "streams.h"
#include <capnp/compat/json.h>
#include <cstdint>
#include <kj/common.h>
#include <kj/async-io.h>
#include <workerd/jsg/jsg.h>
#include <workerd/util/http-util.h>
#include <kj/async-io.h>

namespace workerd::api {

class Socket;

// A Hyperdrive resource for development integrations.
//
// Provides the same interface as Hyperdrive while sending connection
Expand All @@ -35,7 +32,7 @@ class Hyperdrive : public jsg::Object {

kj::String getConnectionString();

JSG_RESOURCE_TYPE(Hyperdrive, CompatibilityFlags::Reader flags) {
JSG_RESOURCE_TYPE(Hyperdrive) {
JSG_LAZY_READONLY_INSTANCE_PROPERTY(database, getDatabase);
JSG_LAZY_READONLY_INSTANCE_PROPERTY(user, getUser);
JSG_LAZY_READONLY_INSTANCE_PROPERTY(password, getPassword);
Expand Down
2 changes: 0 additions & 2 deletions src/workerd/api/queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

#pragma once

#include <atomic>

#include <kj/async.h>
#include <kj/common.h>

Expand Down
1 change: 0 additions & 1 deletion src/workerd/api/rtti.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#pragma once

#include <initializer_list>
#include <kj/array.h>
#include <kj/string.h>
#include <workerd/io/compatibility-date.h>
Expand Down

0 comments on commit a133abb

Please sign in to comment.