@farm.js/workos 0.1.0-beta.99 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  WorkOS integration for Farm.js
4
4
 
5
- Farm.js is currently in beta.
5
+ See [Stability and Support](https://farmjs.dev/docs/stability) for what this package guarantees.
6
6
 
7
7
  ```bash
8
- npm install @farm.js/workos@beta
8
+ npm install @farm.js/workos
9
9
  ```
10
10
 
11
11
  See the [Farm.js repository](https://github.com/farming-labs/farm.js) for documentation, examples, and support.
package/dist/index.d.ts CHANGED
@@ -36,7 +36,7 @@ export declare function workos(input?: WorkOSIntegrationInput): import("@farm.js
36
36
  apiKey: string;
37
37
  protectedRoutes: string[];
38
38
  };
39
- config: import("@farm.js/core").FarmIntegrationConfigDefinition<ResolvedWorkOSConfig, import("@farm.js/core").FarmIntegrationSchema | undefined>;
39
+ config: import("@farm.js/core").FarmIntegrationConfigDefinition<ResolvedWorkOSConfig, import("@farm.js/core").FarmSchema | undefined>;
40
40
  api: {
41
41
  [x: string]: {
42
42
  get: {
@@ -95,9 +95,9 @@ export declare function workos(input?: WorkOSIntegrationInput): import("@farm.js
95
95
  documentNavigations: {
96
96
  matcher: string[];
97
97
  }[];
98
- routes: (import("@farm.js/core").FarmTypedIntegrationRoute<string, never, any, unknown, false, "GET", import("@farm.js/core").FarmIntegrationSchema | undefined> | import("@farm.js/core").FarmTypedIntegrationRoute<string, {
98
+ routes: (import("@farm.js/core").FarmTypedIntegrationRoute<string, never, any, unknown, false, "GET", import("@farm.js/core").FarmSchema | undefined> | import("@farm.js/core").FarmTypedIntegrationRoute<string, {
99
99
  returnTo?: string;
100
- }, never, WorkOSRedirectResult, false, "POST", import("@farm.js/core").FarmIntegrationSchema | undefined>)[];
100
+ }, never, WorkOSRedirectResult, false, "POST", import("@farm.js/core").FarmSchema | undefined>)[];
101
101
  middleware: {
102
102
  matcher: string[];
103
103
  handler(request: Request): Promise<Response | undefined>;
package/dist/index.js CHANGED
@@ -329,7 +329,7 @@ export function workos(input = {}) {
329
329
  const requestUrl = new URL(request.url);
330
330
  const loginUrl = new URL(loginPath, request.url);
331
331
  loginUrl.searchParams.set("returnTo", `${requestUrl.pathname}${requestUrl.search}`);
332
- return Response.redirect(loginUrl, 307);
332
+ return Response.redirect(loginUrl, 303); // 303 (See Other) mandates a GET on the GET-only login route regardless of the original method (RFC 7231 §6.4.4)
333
333
  },
334
334
  },
335
335
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farm.js/workos",
3
- "version": "0.1.0-beta.99",
3
+ "version": "0.1.0",
4
4
  "description": "WorkOS integration for Farm.js",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -30,8 +30,8 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@workos-inc/node": "^8.9.0",
33
- "@farm.js/integration-utils": "0.1.0-beta.99",
34
- "@farm.js/core": "0.1.0-beta.99"
33
+ "@farm.js/integration-utils": "0.1.0",
34
+ "@farm.js/core": "0.1.0"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc",