Skip to content

Commit 2082a4f

Browse files
chore: upgrades boxyhq jackson (#13477)
* chore: upgrades boxyhq jackson * Update jackson.ts reduces bundle size * Update yarn.lock * Update apps/web/next.config.js * Upgrades again --------- Co-authored-by: Keith Williams <keithwillcode@gmail.com>
1 parent f06ef84 commit 2082a4f

File tree

5 files changed

+1934
-990
lines changed

5 files changed

+1934
-990
lines changed

apps/web/next.config.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,17 @@ const nextConfig = {
207207
images: {
208208
unoptimized: true,
209209
},
210-
webpack: (config, { webpack, buildId }) => {
210+
webpack: (config, { webpack, buildId, isServer }) => {
211+
if (isServer) {
212+
// Module not found fix @see https://github.com/boxyhq/jackson/issues/1535#issuecomment-1704381612
213+
config.plugins.push(
214+
new webpack.IgnorePlugin({
215+
resourceRegExp:
216+
/(^@google-cloud\/spanner|^@mongodb-js\/zstd|^@sap\/hana-client\/extension\/Stream$|^@sap\/hana-client|^@sap\/hana-client$|^aws-crt|^aws4$|^better-sqlite3$|^bson-ext$|^cardinal$|^cloudflare:sockets$|^hdb-pool$|^ioredis$|^kerberos$|^mongodb-client-encryption$|^mysql$|^oracledb$|^pg-native$|^pg-query-stream$|^react-native-sqlite-storage$|^snappy\/package\.json$|^snappy$|^sql.js$|^sqlite3$|^typeorm-aurora-data-api-driver$)/,
217+
})
218+
);
219+
}
220+
211221
config.plugins.push(
212222
new CopyWebpackPlugin({
213223
patterns: [

apps/web/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"yarn": "3.4.1"
2525
},
2626
"dependencies": {
27-
"@boxyhq/saml-jackson": "1.8.2",
27+
"@boxyhq/saml-jackson": "1.18.6",
2828
"@calcom/app-store": "*",
2929
"@calcom/app-store-cli": "*",
3030
"@calcom/core": "*",

packages/features/bookings/Booker/Booker.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ const BookerComponent = ({
491491
hasDarkBackground ? "dark" : "",
492492
layout === BookerLayouts.MONTH_VIEW ? "block" : "hidden"
493493
)}>
494-
<PoweredBy logoOnly />
494+
<PoweredBy logoOnly />
495495
</m.span>
496496
)}
497497
</div>

packages/features/ee/sso/lib/jackson.ts

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
import jackson from "@boxyhq/saml-jackson";
21
import type {
32
IConnectionAPIController,
43
IOAuthController,
4+
ISPSSOConfig,
55
JacksonOption,
6-
ISPSAMLConfig,
76
} from "@boxyhq/saml-jackson";
87

98
import { WEBAPP_URL } from "@calcom/lib/constants";
109

11-
import { samlDatabaseUrl, samlAudience, samlPath, oidcPath, clientSecretVerifier } from "./saml";
10+
import { clientSecretVerifier, oidcPath, samlAudience, samlDatabaseUrl, samlPath } from "./saml";
1211

1312
// Set the required options. Refer to https://github.com/boxyhq/jackson#configuration for the full list
1413
const opts: JacksonOption = {
@@ -24,19 +23,23 @@ const opts: JacksonOption = {
2423
},
2524
idpEnabled: true,
2625
clientSecretVerifier,
26+
ory: {
27+
projectId: undefined,
28+
sdkToken: undefined,
29+
},
2730
};
2831

2932
declare global {
3033
/* eslint-disable no-var */
3134
var connectionController: IConnectionAPIController | undefined;
3235
var oauthController: IOAuthController | undefined;
33-
var samlSPConfig: ISPSAMLConfig | undefined;
36+
var samlSPConfig: ISPSSOConfig | undefined;
3437
/* eslint-enable no-var */
3538
}
3639

3740
export default async function init() {
3841
if (!globalThis.connectionController || !globalThis.oauthController || !globalThis.samlSPConfig) {
39-
const ret = await jackson(opts);
42+
const ret = await (await import("@boxyhq/saml-jackson")).controllers(opts);
4043
globalThis.connectionController = ret.connectionAPIController;
4144
globalThis.oauthController = ret.oauthController;
4245
globalThis.samlSPConfig = ret.spConfig;

0 commit comments

Comments
 (0)