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
4 changes: 2 additions & 2 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"mode": "pre",
"tag": "next",
"tag": "rc",
"initialVersions": {
"@effect-libreoffice/server": "2.0.0-dev",
"@effect-libreoffice/api": "2.0.0-dev",
"effect-libreoffice": "2.0.0-dev"
},
"changesets": ["fifty-mice-flow"]
"changesets": ["fifty-mice-flow", "small-pandas-glow"]
}
6 changes: 6 additions & 0 deletions .changeset/small-pandas-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"effect-libreoffice": patch
"@effect-libreoffice/api": patch
---

Upgrade Effect 4 support to `4.0.0-rc.118` and migrate to the current HTTP, HTTP API, and RPC entry points.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
id: changesets
uses: changesets/action@v1
with:
publish: pnpm -r publish --no-git-checks --access public
publish: pnpm changeset publish
version: pnpm changeset version
commit: "chore(release): version packages"
title: "chore(release): version packages"
8 changes: 8 additions & 0 deletions apps/server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @effect-libreoffice/server

## 2.0.0-rc.118

### Patch Changes

- Updated dependencies [186d6d8]
- effect-libreoffice@2.0.0-rc.118
- @effect-libreoffice/api@2.0.0-rc.118

## 2.0.0-next.0

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions apps/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@effect-libreoffice/server",
"version": "2.0.0-next.0",
"version": "2.0.0-rc.118",
"private": true,
"type": "module",
"scripts": {
Expand All @@ -10,9 +10,9 @@
},
"dependencies": {
"@effect-libreoffice/api": "workspace:*",
"@effect/platform-node": "4.0.0-rc.112",
"@effect/platform-node": "4.0.0-rc.118",
"@matbee/libreoffice-converter": "^2.6.0",
"effect": "4.0.0-rc.112",
"effect": "4.0.0-rc.118",
"effect-libreoffice": "workspace:*"
},
"exports": {
Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
HttpClientRequest,
HttpRouter,
HttpServerResponse,
} from "effect/unstable/http";
import { HttpApiBuilder, HttpApiScalar } from "effect/unstable/httpapi";
} from "effect/http";
import { HttpApiBuilder, HttpApiScalar } from "effect/http-api";
import { LibreOffice } from "effect-libreoffice";

// LibreOfficeApi route implementation
Expand Down
10 changes: 3 additions & 7 deletions apps/server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@ import {
NodeRuntime,
} from "@effect/platform-node";
import { Config, Effect, Layer, Logger } from "effect";
import { HttpRouter } from "effect/unstable/http";
import { HttpRouter } from "effect/http";
import { LibreOfficeNode } from "effect-libreoffice/node";
import { AllRoutes } from "./index.ts";

const ServerLive = Layer.unwrap(
Effect.gen(function* () {
const h2c = yield* Config.schema(Config.Boolean, "H2C").pipe(
Config.withDefault(false),
);
const port = yield* Config.schema(Config.Port, "PORT").pipe(
Config.withDefault(3000),
);
const h2c = yield* Config.Boolean("H2C").pipe(Config.withDefault(false));
const port = yield* Config.Port("PORT").pipe(Config.withDefault(3000));
return h2c
? NodeHttpServer.layer(() => createServerH2() as unknown as Server, {
port,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"@biomejs/biome": "2.5.0",
"@changesets/cli": "^2.31.0",
"@effect/language-service": "^0.87.2",
"@effect/vitest": "4.0.0-rc.112",
"effect": "4.0.0-rc.112",
"@effect/vitest": "4.0.0-rc.118",
"effect": "4.0.0-rc.118",
"@types/node": "^25.9.3",
"pkg-pr-new": "^0.0.88",
"tsdown": "^0.22.2",
Expand Down
8 changes: 8 additions & 0 deletions packages/api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @effect-libreoffice/api

## 2.0.0-rc.118

### Patch Changes

- 186d6d8: Upgrade Effect 4 support to `4.0.0-rc.118` and migrate to the current HTTP, HTTP API, and RPC entry points.
- Updated dependencies [186d6d8]
- effect-libreoffice@2.0.0-rc.118

## 2.0.0-next.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@effect-libreoffice/api",
"version": "2.0.0-next.0",
"version": "2.0.0-rc.118",
"type": "module",
"description": "API Schema for LibreOffice microservice.",
"author": "Filip Weiss <me@fiws.net>",
Expand All @@ -24,6 +24,6 @@
"effect-libreoffice": "workspace:*"
},
"peerDependencies": {
"effect": "^4.0.0-rc.112"
"effect": "^4.0.0-rc.118"
}
}
2 changes: 1 addition & 1 deletion packages/api/src/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HttpApiClient } from "effect/unstable/httpapi";
import { HttpApiClient } from "effect/http-api";
import { LibreOfficeApi } from "./domain.ts";

export const make = (options?: Parameters<typeof HttpApiClient.make>[1]) =>
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/domain.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Effect, Schema } from "effect";
import { Multipart } from "effect/unstable/http";
import { Multipart } from "effect/http";
import {
HttpApi,
HttpApiEndpoint,
HttpApiGroup,
HttpApiSchema,
OpenApi,
} from "effect/unstable/httpapi";
} from "effect/http-api";
import { LibreOffice } from "effect-libreoffice";

// #MARK: Domain Schemas
Expand Down
7 changes: 7 additions & 0 deletions packages/effect-libreoffice/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# effect-libreoffice

## 2.0.0-rc.118

### Patch Changes

- 186d6d8: Upgrade Effect 4 support to `4.0.0-rc.118` and migrate to the current HTTP, HTTP API, and RPC entry points.
10 changes: 5 additions & 5 deletions packages/effect-libreoffice/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "effect-libreoffice",
"version": "2.0.0-dev",
"version": "2.0.0-rc.118",
"type": "module",
"description": "A effect based LibreOffice converter library. Can convert docx to pdf.",
"author": "Filip Weiss <me@fiws.net>",
Expand All @@ -22,9 +22,9 @@
"build": "tsdown"
},
"peerDependencies": {
"@effect/platform-node": "^4.0.0-rc.112",
"@effect/platform-node": "^4.0.0-rc.118",
"@matbee/libreoffice-converter": "^2.5.1",
"effect": "^4.0.0-rc.112"
"effect": "^4.0.0-rc.118"
},
"peerDependenciesMeta": {
"@effect/platform-node": {
Expand All @@ -35,7 +35,7 @@
}
},
"devDependencies": {
"@effect/platform-node": "4.0.0-rc.112",
"effect": "4.0.0-rc.112"
"@effect/platform-node": "4.0.0-rc.118",
"effect": "4.0.0-rc.118"
}
}
8 changes: 5 additions & 3 deletions packages/effect-libreoffice/src/wasm/layer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Effect, Layer, Option } from "effect";
import { RpcClient } from "effect/unstable/rpc";
import type { RpcClientError } from "effect/unstable/rpc/RpcClientError";
import { RpcClient, type RpcClientError } from "effect/rpc";
import { LibreOfficeError } from "../error.ts";
import { LibreOffice } from "../libreoffice.ts";
import { LibreOfficeRpcs } from "./schema.ts";
Expand All @@ -11,7 +10,10 @@ const clientLayer = Layer.effect(
const client = yield* RpcClient.make(LibreOfficeRpcs);

const mapErrors = <A>(
effect: Effect.Effect<A, LibreOfficeError | RpcClientError>,
effect: Effect.Effect<
A,
LibreOfficeError | RpcClientError.RpcClientError
>,
) =>
effect.pipe(
Effect.catchTag("RpcClientError", (error) =>
Expand Down
6 changes: 3 additions & 3 deletions packages/effect-libreoffice/src/wasm/schema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Schema } from "effect";
import { Rpc, RpcGroup } from "effect/unstable/rpc";
import { Rpc, RpcGroup } from "effect/rpc";
import { LibreOfficeError } from "../error.ts";

export const InputFormat = Schema.Literals([
Expand Down Expand Up @@ -193,7 +193,7 @@ export class GetPageNamesRequest extends Rpc.make("GetPageNames", {
},
}) {}

export class LibreOfficeRpcs extends RpcGroup.make(
export const LibreOfficeRpcs = RpcGroup.make(
ConvertRequest,
GetPageCountRequest,
GetDocumentInfoRequest,
Expand All @@ -202,4 +202,4 @@ export class LibreOfficeRpcs extends RpcGroup.make(
RenderPageFullQualityRequest,
GetDocumentTextRequest,
GetPageNamesRequest,
) {}
);
2 changes: 1 addition & 1 deletion packages/effect-libreoffice/src/wasm/worker-node.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NodeRuntime, NodeWorkerRunner } from "@effect/platform-node";
import { Effect, Layer } from "effect";
import { RpcServer } from "effect/unstable/rpc";
import { RpcServer } from "effect/rpc";
import { layerWorker } from "./worker.ts";

const runner = layerWorker.pipe(
Expand Down
2 changes: 1 addition & 1 deletion packages/effect-libreoffice/src/wasm/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
// @ts-expect-error untyped wasm loader
import loader from "@matbee/libreoffice-converter/wasm/loader";
import { Effect, Layer } from "effect";
import { RpcServer } from "effect/unstable/rpc";
import { RpcServer } from "effect/rpc";
import { LibreOfficeError } from "../error.ts";
import { LibreOfficeRpcs } from "./schema.ts";

Expand Down
Loading
Loading