@farm.js/workos 0.1.35 → 0.1.37

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAuC,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAgBhG,OAAO,KAAK,EAAuB,oBAAoB,EAAuB,MAAM,aAAa,CAAC;AAQlG,MAAM,WAAW,sBAAsB;IACrC,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACpC;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,GAAG,CAAC,EAAE,qBAAqB,CAAC;CAC7B;AAED,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC;AAc/C,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;CACxB;AAgGD,wBAAgB,MAAM,CAAC,KAAK,GAAE,sBAA2B;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAgPG,MAAM;;;;yBAyE7B,OAAO;;mDAe3C"}
package/dist/index.js CHANGED
@@ -3,13 +3,13 @@ import { WorkOS } from "@workos-inc/node";
3
3
  import { defineIntegration, integrationRoute } from "@farm.js/core";
4
4
  import { describeIntegrationOriginRejection, resolveIntegrationAllowedOrigins, validateIntegrationRequestOrigin, } from "@farm.js/core/integrations";
5
5
  import { clearRequestCookie, createPathInferredClientApi, createDocumentNavigationMatchers, createRequestCookie, getCookieValue, getReturnTo, integrationConfig, normalizeMatchers, } from "@farm.js/integration-utils";
6
+ import { resolveDevelopmentSecret } from "@farm.js/integration-utils/dev-secret";
6
7
  import { workosClient } from "./client.js";
7
- const DEV_COOKIE_PASSWORD = "farmjs-workos-cookie-password-development-2026";
8
8
  // The built server re-evaluates farm.config.ts at runtime to instantiate
9
9
  // integrations, and Farm does not force NODE_ENV=production into that process.
10
10
  // Treating an absent NODE_ENV as "development" would silently seal production
11
- // sessions with the public DEV_COOKIE_PASSWORD, so only an explicit dev/test
12
- // value may use it. `farm dev` runs through Vite, which sets
11
+ // sessions with a development password, so only an explicit dev/test value
12
+ // may use one. `farm dev` runs through Vite, which sets
13
13
  // NODE_ENV="development".
14
14
  function isExplicitDevelopmentEnv() {
15
15
  return process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
@@ -35,7 +35,7 @@ function resolveEnv(input) {
35
35
  const cookiePassword = input.cookiePassword ??
36
36
  process.env.WORKOS_COOKIE_PASSWORD ??
37
37
  process.env.FARM_WORKOS_COOKIE_PASSWORD ??
38
- (isExplicitDevelopmentEnv() ? DEV_COOKIE_PASSWORD : "");
38
+ (isExplicitDevelopmentEnv() ? resolveDevelopmentSecret("workos") : "");
39
39
  if (!clientId || (!input.instance && !apiKey)) {
40
40
  throw new Error("WorkOS integration requires a client ID and either a WorkOS instance or WORKOS_API_KEY.");
41
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farm.js/workos",
3
- "version": "0.1.35",
3
+ "version": "0.1.37",
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/core": "0.1.35",
34
- "@farm.js/integration-utils": "0.1.35"
33
+ "@farm.js/core": "0.1.37",
34
+ "@farm.js/integration-utils": "0.1.37"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc",