Skip to content
Merged
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
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"type": "module",
"packageManager": "pnpm@11.1.1+sha512.d1fdf5f73c617b64fa1a56a81c3c8dfe0e966e33a6010aa256b517ae77be21d93e05affc0de1a83b0e4f29d569f68b446ae8f068cd7247c0bb3df0fb4d7bdf9a",
"packageManager": "pnpm@11.8.0+sha512.c1f5e7c4cb241c8f174b743851d82f42b802324afc8b0f116b96adb15aa06664948dde36960a3ba1079ba5b4b29dd0140135b94b5b5f5263592249d68e555f26",
"scripts": {
"prepare": "effect-language-service patch",
"build": "tspc -b tsconfig.packages.json && pnpm --recursive --parallel --filter \"./packages/**/*\" run build",
Expand All @@ -17,10 +17,10 @@
},
"devDependencies": {
"@amp/oxc": "workspace:^",
"@babel/cli": "^7.28.6",
"@babel/core": "^7.29.0",
"@babel/plugin-transform-export-namespace-from": "^7.27.1",
"@babel/plugin-transform-modules-commonjs": "^7.28.6",
"@babel/cli": "^8.0.1",
"@babel/core": "^8.0.1",
"@babel/plugin-transform-export-namespace-from": "^8.0.1",
"@babel/plugin-transform-modules-commonjs": "^8.0.1",
"@effect/language-service": "catalog:",
"@effect/vitest": "catalog:",
"@types/node": "catalog:",
Expand All @@ -30,10 +30,10 @@
"babel-plugin-annotate-pure-calls": "^0.5.0",
"dprint": "^0.54.0",
"glob": "^13.0.6",
"globals": "^17.6.0",
"globals": "^17.7.0",
"madge": "^8.0.0",
"oxlint": "^1.64.0",
"rulesync": "^8.17.0",
"oxlint": "^1.71.0",
"rulesync": "^8.31.0",
"ts-patch": "^4.0.1",
"typescript": "^6.0.3",
"vite-tsconfig-paths": "^6.1.1",
Expand Down
16 changes: 8 additions & 8 deletions packages/amp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@
"coverage": "vitest --coverage"
},
"peerDependencies": {
"@bufbuild/protobuf": "^2.12.0",
"@connectrpc/connect": "^2.1.1",
"@connectrpc/connect-node": "^2.1.1",
"@bufbuild/protobuf": "^2.12.1",
"@connectrpc/connect": "^2.1.2",
"@connectrpc/connect-node": "^2.1.2",
"effect": "catalog:"
},
"devDependencies": {
"@bufbuild/buf": "^1.69.0",
"@bufbuild/protobuf": "^2.12.0",
"@bufbuild/protoc-gen-es": "^2.12.0",
"@connectrpc/connect": "^2.1.1",
"@connectrpc/connect-node": "^2.1.1",
"@bufbuild/buf": "^1.71.0",
"@bufbuild/protobuf": "^2.12.1",
"@bufbuild/protoc-gen-es": "^2.12.1",
"@connectrpc/connect": "^2.1.2",
"@connectrpc/connect-node": "^2.1.2",
"effect": "catalog:"
},
"dependencies": {
Expand Down
30 changes: 15 additions & 15 deletions packages/amp/src/admin/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const getDatasets = HttpApiEndpoint.get("getDatasets", "/datasets", {
success: Domain.GetDatasetsResponse
})

export type GetDatasetsError = typeof getDatasets["~Error"]
export type GetDatasetsError = typeof getDatasets["~Error"]["Type"]

// POST /datasets - Register a dataset
const registerDataset = HttpApiEndpoint.post("registerDataset", "/datasets", {
Expand All @@ -90,7 +90,7 @@ const registerDataset = HttpApiEndpoint.post("registerDataset", "/datasets", {
success: Schema.Void
})

export type RegisterDatasetError = typeof registerDataset["~Error"]
export type RegisterDatasetError = typeof registerDataset["~Error"]["Type"]

// GET /datasets/{namespace}/{name}/versions - List versions
const getDatasetVersions = HttpApiEndpoint.get(
Expand All @@ -111,7 +111,7 @@ const getDatasetVersions = HttpApiEndpoint.get(
}
)

export type GetDatasetVersionsError = typeof getDatasetVersions["~Error"]
export type GetDatasetVersionsError = typeof getDatasetVersions["~Error"]["Type"]

// GET /datasets/{namespace}/{name}/versions/{revision} - Get dataset version
const getDatasetVersion = HttpApiEndpoint.get(
Expand All @@ -137,7 +137,7 @@ const getDatasetVersion = HttpApiEndpoint.get(
}
)

export type GetDatasetVersionError = typeof getDatasetVersion["~Error"]
export type GetDatasetVersionError = typeof getDatasetVersion["~Error"]["Type"]

// POST /datasets/{namespace}/{name}/versions/{revision}/deploy - Deploy dataset
const deployDataset = HttpApiEndpoint.post(
Expand Down Expand Up @@ -166,7 +166,7 @@ const deployDataset = HttpApiEndpoint.post(
}
)

export type DeployDatasetError = typeof deployDataset["~Error"]
export type DeployDatasetError = typeof deployDataset["~Error"]["Type"]

// GET /datasets/{namespace}/{name}/versions/{revision}/manifest - Get manifest
const getDatasetManifest = HttpApiEndpoint.get(
Expand All @@ -191,7 +191,7 @@ const getDatasetManifest = HttpApiEndpoint.get(
}
)

export type GetDatasetManifestError = typeof getDatasetManifest["~Error"]
export type GetDatasetManifestError = typeof getDatasetManifest["~Error"]["Type"]

// GET /datasets/{namespace}/{name}/versions/{revision}/sync-progress - Get sync progress
const getDatasetSyncProgress = HttpApiEndpoint.get(
Expand All @@ -215,7 +215,7 @@ const getDatasetSyncProgress = HttpApiEndpoint.get(
}
)

export type GetDatasetSyncProgressError = typeof getDatasetSyncProgress["~Error"]
export type GetDatasetSyncProgressError = typeof getDatasetSyncProgress["~Error"]["Type"]

// =============================================================================
// Job Endpoints
Expand All @@ -233,7 +233,7 @@ const getJobs = HttpApiEndpoint.get("getJobs", "/jobs", {
success: Domain.GetJobsResponse
})

export type GetJobsError = typeof getJobs["~Error"]
export type GetJobsError = typeof getJobs["~Error"]["Type"]

// GET /jobs/{jobId} - Get job by ID
const getJobById = HttpApiEndpoint.get("getJobById", "/jobs/:id", {
Expand All @@ -248,7 +248,7 @@ const getJobById = HttpApiEndpoint.get("getJobById", "/jobs/:id", {
success: Models.JobInfo
})

export type GetJobByIdError = typeof getJobById["~Error"]
export type GetJobByIdError = typeof getJobById["~Error"]["Type"]

// PUT /jobs/{jobId}/stop - Stop job
const stopJob = HttpApiEndpoint.put("stopJob", "/jobs/:id/stop", {
Expand All @@ -264,7 +264,7 @@ const stopJob = HttpApiEndpoint.put("stopJob", "/jobs/:id/stop", {
success: Schema.Void.pipe(HttpApiSchema.status(200))
})

export type StopJobError = typeof stopJob["~Error"]
export type StopJobError = typeof stopJob["~Error"]["Type"]

// DELETE /jobs/{jobId} - Delete job
const deleteJob = HttpApiEndpoint.delete("deleteJob", "/jobs/:id", {
Expand All @@ -280,7 +280,7 @@ const deleteJob = HttpApiEndpoint.delete("deleteJob", "/jobs/:id", {
success: Schema.Void.pipe(HttpApiSchema.status(204))
})

export type DeleteJobError = typeof deleteJob["~Error"]
export type DeleteJobError = typeof deleteJob["~Error"]["Type"]

// =============================================================================
// Worker Endpoints
Expand All @@ -292,7 +292,7 @@ const getWorkers = HttpApiEndpoint.get("getWorkers", "/workers", {
success: Domain.GetWorkersResponse
})

export type GetWorkersError = typeof getWorkers["~Error"]
export type GetWorkersError = typeof getWorkers["~Error"]["Type"]

// =============================================================================
// Schema Endpoints
Expand Down Expand Up @@ -328,7 +328,7 @@ const getOutputSchema = HttpApiEndpoint.post("getOutputSchema", "/schema", {
success: Domain.GetOutputSchemaResponse
})

export type GetOutputSchemaError = typeof getOutputSchema["~Error"]
export type GetOutputSchemaError = typeof getOutputSchema["~Error"]["Type"]

// =============================================================================
// Manifest Endpoints
Expand All @@ -348,7 +348,7 @@ const registerManifest = HttpApiEndpoint.post("registerManifest", "/manifests",
success: Domain.RegisterManifestResponse.pipe(HttpApiSchema.status(201))
})

export type RegisterManifestError = typeof registerManifest["~Error"]
export type RegisterManifestError = typeof registerManifest["~Error"]["Type"]

// =============================================================================
// Provider Endpoints
Expand All @@ -359,7 +359,7 @@ const getProviders = HttpApiEndpoint.get("getProviders", "/providers", {
success: Domain.GetProvidersResponse
})

export type GetProvidersError = typeof getProviders["~Error"]
export type GetProvidersError = typeof getProviders["~Error"]["Type"]

// =============================================================================
// Admin API Groups
Expand Down
8 changes: 4 additions & 4 deletions packages/amp/src/arrow-flight/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class RpcError extends Schema.TaggedErrorClass<RpcError>(
/**
* The underlying reason for the failed RPC request.
*/
cause: Schema.Defect
cause: Schema.Defect()
}) {}

/**
Expand Down Expand Up @@ -84,7 +84,7 @@ export class ParseRecordBatchError extends Schema.TaggedErrorClass<ParseRecordBa
/**
* The underlying reason for the failure to parse a record batch.
*/
cause: Schema.Defect
cause: Schema.Defect()
}) {}

/**
Expand All @@ -97,7 +97,7 @@ export class ParseDictionaryBatchError extends Schema.TaggedErrorClass<ParseDict
/**
* The underlying reason for the failure to parse a dictionary batch.
*/
cause: Schema.Defect
cause: Schema.Defect()
}) {}

/**
Expand All @@ -110,5 +110,5 @@ export class ParseSchemaError extends Schema.TaggedErrorClass<ParseSchemaError>(
/**
* The underlying reason for the failure to parse a schema.
*/
cause: Schema.Defect
cause: Schema.Defect()
}) {}
12 changes: 6 additions & 6 deletions packages/amp/src/auth/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const AuthRefreshError = makeError(
"AuthRefreshError",
{
status: Schema.OptionFromOptional(Schema.Int),
cause: Schema.OptionFromOptional(Schema.Defect)
cause: Schema.OptionFromOptional(Schema.Defect())
}
)

Expand Down Expand Up @@ -167,7 +167,7 @@ export const AuthCacheError = makeError(
"AuthCacheError",
{
operation: CacheOperation,
cause: Schema.OptionFromOptional(Schema.Defect)
cause: Schema.OptionFromOptional(Schema.Defect())
}
)

Expand All @@ -182,7 +182,7 @@ export const AuthNetworkError = makeError(
{
endpoint: Schema.OptionFromOptional(Schema.String),
isTimeout: Schema.Boolean,
cause: Schema.OptionFromOptional(Schema.Defect)
cause: Schema.OptionFromOptional(Schema.Defect())
}
)

Expand All @@ -196,7 +196,7 @@ export const AuthRequestError = makeError(
"AuthRequestError",
{
endpoint: Schema.OptionFromOptional(Schema.String),
cause: Schema.OptionFromOptional(Schema.Defect)
cause: Schema.OptionFromOptional(Schema.Defect())
}
)

Expand All @@ -211,7 +211,7 @@ export const AuthProtocolError = makeError(
{
endpoint: Schema.OptionFromOptional(Schema.String),
status: Schema.OptionFromOptional(Schema.Int),
cause: Schema.OptionFromOptional(Schema.Defect)
cause: Schema.OptionFromOptional(Schema.Defect())
}
)

Expand All @@ -226,7 +226,7 @@ export const AuthVerifyTokenError = makeError(
{
reason: VerifyTokenFailureReason,
claim: Schema.OptionFromOptional(Schema.String),
cause: Schema.OptionFromOptional(Schema.Defect)
cause: Schema.OptionFromOptional(Schema.Defect())
}
)

Expand Down
2 changes: 1 addition & 1 deletion packages/amp/src/auth/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export type RefreshTokenResponse = typeof RefreshTokenResponse.Type

export class VerifySignedAccessTokenError extends Schema.TaggedErrorClass<VerifySignedAccessTokenError>(
"Amp/Auth/VerifySignedAccessTokenError"
)("VerifySignedAccessTokenError", { cause: Schema.Defect }) {}
)("VerifySignedAccessTokenError", { cause: Schema.Defect() }) {}

// =============================================================================
// Service
Expand Down
2 changes: 1 addition & 1 deletion packages/amp/src/cdc-stream/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class BatchStoreError extends Schema.TaggedErrorClass<BatchStoreError>(
)("BatchStoreError", {
reason: Schema.String,
operation: Schema.Literals(["append", "seek", "load", "prune"]),
cause: Schema.optional(Schema.Defect)
cause: Schema.optional(Schema.Defect())
}) {}

// =============================================================================
Expand Down
4 changes: 2 additions & 2 deletions packages/amp/src/protocol-stream/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export class ProtocolValidationError extends Schema.TaggedErrorClass<ProtocolVal
/**
* The underlying validation error.
*/
cause: Schema.Defect
cause: Schema.Defect()
}) {
override get message(): string {
const cause = this.cause as ValidationError
Expand All @@ -226,7 +226,7 @@ export class ProtocolArrowFlightError extends Schema.TaggedErrorClass<ProtocolAr
/**
* The underlying Arrow Flight error.
*/
cause: Schema.Defect
cause: Schema.Defect()
}) {}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/amp/src/transactional-stream/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class StateStoreError extends Schema.TaggedErrorClass<StateStoreError>(
)("StateStoreError", {
reason: Schema.String,
operation: Schema.Literals(["advance", "commit", "truncate", "load"]),
cause: Schema.optional(Schema.Defect)
cause: Schema.optional(Schema.Defect())
}) {}

// =============================================================================
Expand Down
Loading
Loading