Skip to content

chore: standardize typescript files to use kebab case names #959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/actor-core/src/actor/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
handleSseConnect,
handleRpc,
handleConnectionMessage,
} from "./router_endpoints";
} from "./router-endpoints";

export type {
ConnectWebSocketOpts,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { importWebSocket } from "@/common/websocket";
import type { ActorQuery } from "@/manager/protocol/query";
import * as cbor from "cbor-x";
import pRetry from "p-retry";
import type { ActorDefinitionRpcs as ActorDefinitionRpcsImport } from "./actor_common";
import type { ActorDefinitionRpcs as ActorDefinitionRpcsImport } from "./actor-common";
import { ACTOR_CONNS_SYMBOL, type ClientRaw, TRANSPORT_SYMBOL } from "./client";
import * as errors from "./errors";
import { logger } from "./log";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type { AnyActorDefinition } from "@/actor/definition";
import type { RpcRequest, RpcResponse } from "@/actor/protocol/http/rpc";
import type { Encoding } from "@/actor/protocol/serde";
import type { ActorQuery } from "@/manager/protocol/query";
import { type ActorDefinitionRpcs, resolveActorId } from "./actor_common";
import { type ActorConn, ActorConnRaw } from "./actor_conn";
import { type ActorDefinitionRpcs, resolveActorId } from "./actor-common";
import { type ActorConn, ActorConnRaw } from "./actor-conn";
import { CREATE_ACTOR_CONN_PROXY, type ClientRaw } from "./client";
import { logger } from "./log";
import { sendHttpRequest } from "./utils";
Expand Down
6 changes: 3 additions & 3 deletions packages/actor-core/src/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import type { Transport } from "@/actor/protocol/message/mod";
import type { Encoding } from "@/actor/protocol/serde";
import type { ActorQuery } from "@/manager/protocol/query";
import * as errors from "./errors";
import { ActorConn, ActorConnRaw, CONNECT_SYMBOL } from "./actor_conn";
import { ActorHandle, ActorHandleRaw } from "./actor_handle";
import { ActorRPCFunction, resolveActorId } from "./actor_common";
import { ActorConn, ActorConnRaw, CONNECT_SYMBOL } from "./actor-conn";
import { ActorHandle, ActorHandleRaw } from "./actor-handle";
import { ActorRPCFunction, resolveActorId } from "./actor-common";
import { logger } from "./log";
import type { ActorCoreApp } from "@/mod";
import type { AnyActorDefinition } from "@/actor/definition";
Expand Down
12 changes: 6 additions & 6 deletions packages/actor-core/src/client/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ export type {
ExtractAppFromClient,
ClientRaw,
} from "./client";
export type { ActorConn } from "./actor_conn";
export { ActorConnRaw } from "./actor_conn";
export type { EventUnsubscribe } from "./actor_conn";
export type { ActorHandle } from "./actor_handle";
export { ActorHandleRaw } from "./actor_handle";
export type { ActorRPCFunction } from "./actor_common";
export type { ActorConn } from "./actor-conn";
export { ActorConnRaw } from "./actor-conn";
export type { EventUnsubscribe } from "./actor-conn";
export type { ActorHandle } from "./actor-handle";
export { ActorHandleRaw } from "./actor-handle";
export type { ActorRPCFunction } from "./actor-common";
export type { Transport } from "@/actor/protocol/message/mod";
export type { Encoding } from "@/actor/protocol/serde";
export type { CreateRequest } from "@/manager/protocol/query";
Expand Down
2 changes: 1 addition & 1 deletion packages/actor-core/src/common/router.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Context as HonoContext, Next } from "hono";
import { getLogger, Logger } from "./log";
import { deconstructError } from "./utils";
import { getRequestEncoding } from "@/actor/router_endpoints";
import { getRequestEncoding } from "@/actor/router-endpoints";
import { serialize } from "@/actor/protocol/serde";
import { ResponseError } from "@/actor/protocol/http/error";

Expand Down
2 changes: 1 addition & 1 deletion packages/actor-core/src/manager/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
handleRpc,
handleSseConnect,
handleWebSocketConnect,
} from "@/actor/router_endpoints";
} from "@/actor/router-endpoints";
import { assertUnreachable } from "@/actor/utils";
import type { AppConfig } from "@/app/config";
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/actor-core/src/test/driver/actor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ActorDriver, AnyActorInstance } from "@/driver-helpers/mod";
import type { TestGlobalState } from "./global_state";
import type { TestGlobalState } from "./global-state";

export interface ActorDriverContext {
// Used to test that the actor context works from tests
Expand Down
2 changes: 1 addition & 1 deletion packages/actor-core/src/test/driver/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
GetWithKeyInput,
ManagerDriver,
} from "@/driver-helpers/mod";
import type { TestGlobalState } from "./global_state";
import type { TestGlobalState } from "./global-state";
import { ManagerInspector } from "@/inspector/manager";
import type { ActorCoreApp } from "@/app/mod";

Expand Down
2 changes: 1 addition & 1 deletion packages/actor-core/src/test/driver/mod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { TestGlobalState } from "./global_state";
export { TestGlobalState } from "./global-state";
export { TestActorDriver } from "./actor";
export { TestManagerDriver } from "./manager";
2 changes: 1 addition & 1 deletion packages/actor-core/src/topologies/coordinate/topology.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import type {
ConnectSseOutput,
RpcOutput,
ConnectionHandlers,
} from "@/actor/router_endpoints";
} from "@/actor/router-endpoints";

export interface GlobalState {
nodeId: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/actor-core/src/topologies/partition/toplogy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import type {
ConnectWebSocketOutput,
ConnectSseOutput,
RpcOutput,
} from "@/actor/router_endpoints";
} from "@/actor/router-endpoints";

export class PartitionTopologyManager {
router: Hono;
Expand Down
2 changes: 1 addition & 1 deletion packages/actor-core/src/topologies/standalone/topology.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import type {
RpcOpts,
RpcOutput,
ConnectionHandlers,
} from "@/actor/router_endpoints";
} from "@/actor/router-endpoints";

class ActorHandler {
/** Will be undefined if not yet loaded. */
Expand Down
2 changes: 1 addition & 1 deletion packages/drivers/file-system/src/actor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ActorDriver, AnyActorInstance } from "actor-core/driver-helpers";
import type { FileSystemGlobalState } from "./global_state";
import type { FileSystemGlobalState } from "./global-state";

export type ActorDriverContext = Record<never, never>;

Expand Down
2 changes: 1 addition & 1 deletion packages/drivers/file-system/src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
ManagerDriver,
} from "actor-core/driver-helpers";
import { logger } from "./log";
import type { FileSystemGlobalState } from "./global_state";
import type { FileSystemGlobalState } from "./global-state";
import type { ActorCoreApp } from "actor-core";
import { ManagerInspector } from "actor-core/inspector";

Expand Down
2 changes: 1 addition & 1 deletion packages/drivers/file-system/src/mod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export { getStoragePath } from "./utils";
export { FileSystemActorDriver } from "./actor";
export { FileSystemManagerDriver } from "./manager";
export { FileSystemGlobalState } from "./global_state";
export { FileSystemGlobalState } from "./global-state";

2 changes: 1 addition & 1 deletion packages/drivers/memory/src/actor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ActorDriver, AnyActorInstance } from "actor-core/driver-helpers";
import type { MemoryGlobalState } from "./global_state";
import type { MemoryGlobalState } from "./global-state";

export type ActorDriverContext = Record<never, never>;

Expand Down
2 changes: 1 addition & 1 deletion packages/drivers/memory/src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
GetWithKeyInput,
ManagerDriver,
} from "actor-core/driver-helpers";
import type { MemoryGlobalState } from "./global_state";
import type { MemoryGlobalState } from "./global-state";
import { ManagerInspector } from "actor-core/inspector";
import type { ActorCoreApp } from "actor-core";

Expand Down
2 changes: 1 addition & 1 deletion packages/drivers/memory/src/mod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { MemoryGlobalState } from "./global_state";
export { MemoryGlobalState } from "./global-state";
export { MemoryActorDriver } from "./actor";
export { MemoryManagerDriver } from "./manager";
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { PartitionTopologyActor } from "actor-core/topologies/partition";
import {
CloudflareDurableObjectGlobalState,
CloudflareWorkersActorDriver,
} from "./actor_driver";
} from "./actor-driver";
import { upgradeWebSocket } from "./websocket";

const KEYS = {
Expand Down
4 changes: 2 additions & 2 deletions packages/platforms/cloudflare-workers/src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import {
type DurableObjectConstructor,
type ActorHandlerInterface,
createActorDurableObject,
} from "./actor_handler_do";
} from "./actor-handler-do";
import { ConfigSchema, type InputConfig } from "./config";
import { assertUnreachable } from "actor-core/utils";
import type { Hono } from "hono";
import { PartitionTopologyManager } from "actor-core/topologies/partition";
import { logger } from "./log";
import { CloudflareWorkersManagerDriver } from "./manager_driver";
import { CloudflareWorkersManagerDriver } from "./manager-driver";
import { ActorCoreApp } from "actor-core";
import { upgradeWebSocket } from "./websocket";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, test, expect, vi } from "vitest";
import { serializeNameAndKey } from "../src/util";
import { CloudflareWorkersManagerDriver } from "../src/manager_driver";
import { CloudflareWorkersManagerDriver } from "../src/manager-driver";

describe("Deterministic ID generation", () => {
test("should generate consistent IDs for the same name and key", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import type { RivetHandler } from "./util";
import { deserializeKeyFromTag } from "./util";
import { PartitionTopologyActor } from "actor-core/topologies/partition";
import { ConfigSchema, type InputConfig } from "./config";
import { RivetActorDriver } from "./actor_driver";
import { rivetRequest } from "./rivet_client";
import { RivetActorDriver } from "./actor-driver";
import { rivetRequest } from "./rivet-client";
import invariant from "invariant";

export function createActorHandler(inputConfig: InputConfig): RivetHandler {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
GetActorOutput,
} from "actor-core/driver-helpers";
import { logger } from "./log";
import { type RivetClientConfig, rivetRequest } from "./rivet_client";
import { type RivetClientConfig, rivetRequest } from "./rivet-client";
import { serializeKeyForTag, deserializeKeyFromTag } from "./util";

export interface ActorState {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { setupLogging } from "actor-core/log";
import type { ActorContext } from "@rivet-gg/actor-core";
import { logger } from "./log";
import { GetActorMeta, RivetManagerDriver } from "./manager_driver";
import type { RivetClientConfig } from "./rivet_client";
import { GetActorMeta, RivetManagerDriver } from "./manager-driver";
import type { RivetClientConfig } from "./rivet-client";
import type { RivetHandler } from "./util";
import { createWebSocketProxy } from "./ws_proxy";
import { createWebSocketProxy } from "./ws-proxy";
import { PartitionTopologyManager } from "actor-core/topologies/partition";
import { type InputConfig, ConfigSchema } from "./config";
import { proxy } from "hono/proxy";
Expand Down
4 changes: 2 additions & 2 deletions packages/platforms/rivet/src/mod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { createActorHandler } from "./actor_handler";
export { createManagerHandler } from "./manager_handler";
export { createActorHandler } from "./actor-handler";
export { createManagerHandler } from "./manager-handler";
export type { InputConfig as Config } from "./config";
Loading