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 <[email protected]>
This commit is contained in:
1 parent
f06ef84f61
commit
2082a4f4ed
4 files changed
+1979
-1035
No files matched your search
+11
-1
@@ -207,7 +207,17 @@ const nextConfig = {
|
|||||||
images: {
|
images: {
|
||||||
unoptimized: true,
|
unoptimized: true,
|
||||||
},
|
},
|
||||||
webpack: (config, { webpack, buildId }) => {
|
webpack: (config, { webpack, buildId, isServer }) => {
|
||||||
|
if (isServer) {
|
||||||
|
// Module not found fix @see https://github.com/boxyhq/jackson/issues/1535#issuecomment-1704381612
|
||||||
|
config.plugins.push(
|
||||||
|
new webpack.IgnorePlugin({
|
||||||
|
resourceRegExp:
|
||||||
|
/(^@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$)/,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
config.plugins.push(
|
config.plugins.push(
|
||||||
new CopyWebpackPlugin({
|
new CopyWebpackPlugin({
|
||||||
patterns: [
|
patterns: [
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
"yarn": "3.4.1"
|
"yarn": "3.4.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@boxyhq/saml-jackson": "1.8.2",
|
"@boxyhq/saml-jackson": "1.18.6",
|
||||||
"@calcom/app-store": "*",
|
"@calcom/app-store": "*",
|
||||||
"@calcom/app-store-cli": "*",
|
"@calcom/app-store-cli": "*",
|
||||||
"@calcom/core": "*",
|
"@calcom/core": "*",
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
import jackson from "@boxyhq/saml-jackson";
|
|
||||||
import type {
|
import type {
|
||||||
IConnectionAPIController,
|
IConnectionAPIController,
|
||||||
IOAuthController,
|
IOAuthController,
|
||||||
|
ISPSSOConfig,
|
||||||
JacksonOption,
|
JacksonOption,
|
||||||
ISPSAMLConfig,
|
|
||||||
} from "@boxyhq/saml-jackson";
|
} from "@boxyhq/saml-jackson";
|
||||||
|
|
||||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||||
|
|
||||||
import { samlDatabaseUrl, samlAudience, samlPath, oidcPath, clientSecretVerifier } from "./saml";
|
import { clientSecretVerifier, oidcPath, samlAudience, samlDatabaseUrl, samlPath } from "./saml";
|
||||||
|
|
||||||
// Set the required options. Refer to https://github.com/boxyhq/jackson#configuration for the full list
|
// Set the required options. Refer to https://github.com/boxyhq/jackson#configuration for the full list
|
||||||
const opts: JacksonOption = {
|
const opts: JacksonOption = {
|
||||||
@@ -24,19 +23,23 @@ const opts: JacksonOption = {
|
|||||||
},
|
},
|
||||||
idpEnabled: true,
|
idpEnabled: true,
|
||||||
clientSecretVerifier,
|
clientSecretVerifier,
|
||||||
|
ory: {
|
||||||
|
projectId: undefined,
|
||||||
|
sdkToken: undefined,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
/* eslint-disable no-var */
|
/* eslint-disable no-var */
|
||||||
var connectionController: IConnectionAPIController | undefined;
|
var connectionController: IConnectionAPIController | undefined;
|
||||||
var oauthController: IOAuthController | undefined;
|
var oauthController: IOAuthController | undefined;
|
||||||
var samlSPConfig: ISPSAMLConfig | undefined;
|
var samlSPConfig: ISPSSOConfig | undefined;
|
||||||
/* eslint-enable no-var */
|
/* eslint-enable no-var */
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function init() {
|
export default async function init() {
|
||||||
if (!globalThis.connectionController || !globalThis.oauthController || !globalThis.samlSPConfig) {
|
if (!globalThis.connectionController || !globalThis.oauthController || !globalThis.samlSPConfig) {
|
||||||
const ret = await jackson(opts);
|
const ret = await (await import("@boxyhq/saml-jackson")).controllers(opts);
|
||||||
globalThis.connectionController = ret.connectionAPIController;
|
globalThis.connectionController = ret.connectionAPIController;
|
||||||
globalThis.oauthController = ret.oauthController;
|
globalThis.oauthController = ret.oauthController;
|
||||||
globalThis.samlSPConfig = ret.spConfig;
|
globalThis.samlSPConfig = ret.spConfig;
|
||||||
|
|||||||
Reference in new issue
Block a user