History

chore: remove dead code and widen lint allowlists

Rhys Sullivan committed 7 months ago

Commit 357bcae1 parent cd6773910 files · +5 −48Browse files

Unified · Split

10 files
  1. .oxlintrc.jsonc +3 −1
  2. apps/executor/src/cli/main.ts +0 −36
  3. packages/platform/sdk-file/src/index.ts +0 −2
  4. packages/platform/sdk/src/executor-effect.ts +0 −1
  5. packages/platform/sdk/src/local/secret-stores.ts +0 −1
  6. packages/platform/sdk/src/local/secrets.ts +0 −1
  7. packages/platform/sdk/src/plugins.ts +0 −1
  8. packages/platform/sdk/src/runtime/source-artifacts.ts +0 −3
  9. plugins/onepassword/http/index.ts +0 −2
  10. tools/oxlint/rules/no-manual-openapi-documents.mjs +2 −0
.oxlintrc.jsonc+3−1
@@ -59,7 +59,9 @@ · 58 unmodified lines
5959 // package-graph cycles from test-only dependencies.
6060 "files": [
6161 "packages/platform/sdk/src/executor.test.ts",
62− "packages/platform/sdk/src/runtime/executor-runtime.test.ts"
62+ "packages/platform/sdk/src/runtime/executor-runtime.test.ts",
63+ "packages/platform/server/src/index.test.ts",
64+ "packages/clients/react/src/index.test.tsx"
6365 ],
6466 "rules": {
6567 "executor-monorepo/no-cross-workspace-relative-imports": "off"
apps/executor/src/cli/main.ts+0−36
@@ -535,42 +535,6 @@ const startServerInBackground = (port: number) => · 534 unmodified lines
535535 }),
536536 );
537537
538−type LocalServerPidRecord = {
539− pid?: number;
540− port?: number;
541− host?: string;
542− baseUrl?: string;
543− startedAt?: number;
544− logFile?: string;
545−};
546−
547−const readPidRecord = (): Effect.Effect<
548− LocalServerPidRecord | null,
549− never,
550− FileSystem.FileSystem
551−> =>
552− Effect.gen(function* () {
553− const fs = yield* FileSystem.FileSystem;
554− const contents = yield* fs.readFileString(DEFAULT_SERVER_PID_FILE, "utf8").pipe(
555− Effect.catchAll(() => Effect.succeed<string | null>(null)),
556− );
557− if (contents === null) {
558− return null;
559− }
560−
561− return JSON.parse(contents) as LocalServerPidRecord;
562− }).pipe(Effect.catchAll(() => Effect.succeed(null)));
563−
564−const isPidRunning = (pid: number): boolean => {
565− try {
566− process.kill(pid, 0);
567− return true;
568− } catch (error) {
569− return error instanceof Error && "code" in error && error.code === "EPERM";
570− }
571−};
572−
573−
574538 const readServerLogTail = (
575539 logFile: string = DEFAULT_SERVER_LOG_FILE,
576540 maxLines: number = 40,
packages/platform/sdk-file/src/index.ts+0−2
@@ -12,7 +12,6 @@ import { · 11 unmodified lines
1212 } from "@executor/platform-sdk";
1313 import {
1414 createExecutorEffect,
15− type CreateExecutorEffectOptions,
1615 type ExecutorEffect,
1716 } from "@executor/platform-sdk/effect";
1817 import type {
@@ -247,7 +246,6 @@ export const createLocalExecutorRepositoriesEffect = ( · 228 unmodified lines
247246 workspaceContext,
248247 fileSystem,
249248 );
250− const loadedConfig = yield* workspaceConfigStore.load();
251249 const pluginRegistry = runtimeOptions.pluginRegistry ?? emptyExecutorPluginRegistry();
252250 yield* provisionBuiltinSecretStores({
253251 executorState: executorStateStorage.executorState,
packages/platform/sdk/src/executor-effect.ts+0−1
@@ -13,7 +13,6 @@ import type { · 12 unmodified lines
1313 } from "./executions/contracts";
1414 import type {
1515 BrowseSecretStorePayload,
16− BrowseSecretStoreResult,
1716 CreateSecretPayload,
1817 CreateSecretStorePayload,
1918 CreateSecretResult,
packages/platform/sdk/src/local/secret-stores.ts+0−1
@@ -9,7 +9,6 @@ import { · 8 unmodified lines
99 type DeleteSecretStoreResult,
1010 type ImportSecretFromStorePayload,
1111 type SecretStoreCapabilities,
12− type SecretStore as SecretStoreContract,
1312 type UpdateSecretStorePayload,
1413 } from "./contracts";
1514 import {
packages/platform/sdk/src/local/secrets.ts+0−1
@@ -3,7 +3,6 @@ import * as Option from "effect/Option"; · 2 unmodified lines
33
44 import {
55 SecretMaterialIdSchema,
6− type SecretStore,
76 } from "../schema";
87 import {
98 type CreateSecretPayload,
packages/platform/sdk/src/plugins.ts+0−1
@@ -13,7 +13,6 @@ import { · 12 unmodified lines
1313 type Source as ExecutorSource,
1414 type SecretMaterial,
1515 type SecretMaterialPurpose,
16− type SecretRef,
1716 type SecretStore,
1817 } from "./schema";
1918 import type {
packages/platform/sdk/src/runtime/source-artifacts.ts+0−3
@@ -53,9 +53,6 @@ const ReadableLocalSourceArtifactSchema = Schema.Struct({ · 52 unmodified lines
5353 snapshot: Schema.Unknown,
5454 });
5555
56−type ReadableLocalSourceArtifact =
57− typeof ReadableLocalSourceArtifactSchema.Type;
58−
5956 const decodeReadableLocalSourceArtifactOption = Schema.decodeUnknownOption(
6057 Schema.parseJson(
6158 ReadableLocalSourceArtifactSchema,
plugins/onepassword/http/index.ts+0−2
@@ -3,8 +3,6 @@ import { · 2 unmodified lines
33 HttpApiBuilder,
44 } from "@effect/platform";
55 import {
6− ControlPlaneBadRequestError,
7− ControlPlaneForbiddenError,
86 ControlPlaneStorageError,
97 type ExecutorHttpPlugin,
108 } from "@executor/platform-api";
tools/oxlint/rules/no-manual-openapi-documents.mjs+2−0
@@ -6,6 +6,8 @@ const MANUAL_OPENAPI_RULE_ALLOWED_PATH_SEGMENTS = [ · 5 unmodified lines
66 `${path.sep}packages${path.sep}platform${path.sep}sdk${path.sep}src${path.sep}runtime${path.sep}sources${path.sep}source-adapter-fixture-matrix.test.ts`,
77 `${path.sep}packages${path.sep}platform${path.sep}sdk${path.sep}src${path.sep}runtime${path.sep}sources${path.sep}source-discovery.test.ts`,
88 `${path.sep}packages${path.sep}platform${path.sep}sdk${path.sep}src${path.sep}runtime${path.sep}sources${path.sep}executor-tools.test.ts`,
9+ `${path.sep}packages${path.sep}platform${path.sep}sdk${path.sep}src${path.sep}runtime${path.sep}sources${path.sep}openapi-type-contract.test.ts`,
10+ `${path.sep}plugins${path.sep}openapi${path.sep}sdk${path.sep}document.test.ts`,
911 ];
1012
1113 const OPENAPI_MARKER_KEYS = new Set(["openapi", "swagger"]);