File tree Expand file tree Collapse file tree 4 files changed +24
-6
lines changed
Expand file tree Collapse file tree 4 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @sigmacomputing/react-embed-sdk " : minor
3+ " @sigmacomputing/embed-sdk " : minor
4+ ---
5+
6+ Fix mutation URL to production
Original file line number Diff line number Diff line change @@ -9,17 +9,27 @@ import {
99 WorkbookVariablesUpdateEventName ,
1010} from "./types" ;
1111
12+ let SIGMA_COMPUTING_URL = "https://app.sigmacomputing.com" ;
13+
1214const sendIframeMessage = (
1315 iframe : HTMLIFrameElement ,
1416 message : { type : string ; [ key : string ] : unknown } ,
1517) => {
1618 if ( ! iframe . contentWindow ) {
1719 throw new Error ( "iframe contentWindow is not available" ) ;
1820 }
19- iframe . contentWindow . postMessage (
20- message ,
21- "https://staging.sigmacomputing.io" ,
22- ) ;
21+ iframe . contentWindow . postMessage ( message , SIGMA_COMPUTING_URL ) ;
22+ } ;
23+
24+ /**
25+ * DO NOT USE IN PRODUCTION.
26+ *
27+ * This will override the Sigma Computing URL used for mutations.
28+ *
29+ * @param url the URL to use instead of the default
30+ */
31+ export const DO_NOT_USE_IN_PRODUCTION_overrideMutationUrl = ( url : string ) => {
32+ SIGMA_COMPUTING_URL = url ;
2333} ;
2434
2535export const workbookBookmarkCreate = (
Original file line number Diff line number Diff line change 3535 " dist"
3636 ],
3737 "peerDependencies" : {
38- "react" : " ^16.8.0 || ^17.0.0 || ^18.0.0 || ^ 19.0.0" ,
39- "react-dom" : " ^16.8.0 || ^17.0.0 || ^18.0.0 || ^ 19.0.0"
38+ "react" : " ^16.8.0 || ^17.0 || ^18.0 || ^19 .0 || 19.0.0-rc " ,
39+ "react-dom" : " ^16.8.0 || ^17.0 || ^18.0 || ^19 .0 || 19.0.0-rc "
4040 },
4141 "devDependencies" : {
4242 "@sigmacomputing/eslint-config" : " workspace:*" ,
Original file line number Diff line number Diff line change 99 workbookSharingLinkUpdate ,
1010} from "@sigmacomputing/embed-sdk" ;
1111
12+ export { DO_NOT_USE_IN_PRODUCTION_overrideMutationUrl } from "@sigmacomputing/embed-sdk" ;
13+
1214export function getWorkbookVariables (
1315 iframeRef : React . RefObject < HTMLIFrameElement > ,
1416) {
You can’t perform that action at this time.
0 commit comments