Skip to content

Commit

Permalink
[semver:patch] Add default version assessment recorder css
Browse files Browse the repository at this point in the history
  • Loading branch information
DvirMalka committed Aug 21, 2022
1 parent cedd9d4 commit a293b17
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
3 changes: 2 additions & 1 deletion dist/development/strigo.sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -10989,6 +10989,7 @@
var CDN_BASE_PATH = "https://cdn.statically.io/gh/strigo/strigo-sdk";
var ASSESSMENT_RECORDER_URL = "https://assessment-recorder.web.app";
var LOCAL_STRIGO_URL = "http://local.strigo.io:3000";
var DEFAULT_ASSESSMENT_RECORDER_CSS_VERSION = "v1.1.40";

// src/modules/config/config.ts
function getLocalStorageConfig() {
Expand Down Expand Up @@ -11966,7 +11967,7 @@ ${JSON.stringify(parsedContext)}` : "");
if (version) {
return `${CDN_BASE_PATH}@${version}/dist/production/styles/strigo-assessment-recorder.min.css`;
}
return `${CDN_BASE_PATH}@master/dist/production/styles/strigo-assessment-recorder.min.css`;
return `${CDN_BASE_PATH}@${DEFAULT_ASSESSMENT_RECORDER_CSS_VERSION}/dist/production/styles/strigo-assessment-recorder.min.css`;
}
function generateAssessmentRecorderURL() {
return window.Strigo.isDevelopment() ? RECORDER_LOCAL_URL : ASSESSMENT_RECORDER_URL;
Expand Down
22 changes: 11 additions & 11 deletions dist/production/strigo.sdk.min.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/modules/url/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
CDN_BASE_PATH,
INIT_SCRIPT_ID,
LOCAL_STRIGO_URL,
DEFAULT_ASSESSMENT_RECORDER_CSS_VERSION,
} from '../../strigo/consts';
import { StrigoConfig, SiteConfig } from '../config/config.types';
import { WidgetFlavors } from '../widgets/widget.types';
Expand Down Expand Up @@ -131,7 +132,10 @@ export function generateRecorderCssURL(version?: string): string {
return `${CDN_BASE_PATH}@${version}/dist/production/styles/strigo-assessment-recorder.min.css`;
}

return `${CDN_BASE_PATH}@master/dist/production/styles/strigo-assessment-recorder.min.css`;
return (
`${CDN_BASE_PATH}@${DEFAULT_ASSESSMENT_RECORDER_CSS_VERSION}` +
`/dist/production/styles/strigo-assessment-recorder.min.css`
);
}

export function generateAssessmentRecorderURL(): string {
Expand Down
2 changes: 2 additions & 0 deletions src/strigo/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ export const PAGE_LISTENER_MAX_TIMEOUT = 50000;
export const ASSESSMENT_RECORDER_URL = 'https://assessment-recorder.web.app';

export const LOCAL_STRIGO_URL = 'http://local.strigo.io:3000';

export const DEFAULT_ASSESSMENT_RECORDER_CSS_VERSION = 'v1.1.40';

0 comments on commit a293b17

Please sign in to comment.