Skip to content

Commit

Permalink
consume new ost
Browse files Browse the repository at this point in the history
  • Loading branch information
3ch023 committed Jun 6, 2024
1 parent d6f22ce commit 85286cc
Show file tree
Hide file tree
Showing 3 changed files with 10,669 additions and 7 deletions.
13 changes: 6 additions & 7 deletions libs/blocks/ost/ost.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ const IMS_COMMERCE_CLIENT_ID = 'aos_milo_commerce';
const IMS_SCOPE = 'AdobeID,openid';
const IMS_ENV = 'prod';
const IMS_PROD_URL = 'https://auth.services.adobe.com/imslib/imslib.min.js';
const OST_VERSION = '1.14.4';
const OST_BASE = `https://www.stage.adobe.com/special/tacocat/ost/lib/${OST_VERSION}`;
const OST_SCRIPT_URL = `${OST_BASE}/index.js`;
const OST_STYLE_URL = `${OST_BASE}/index.css`;
const OST_SCRIPT_URL = 'depsost.js';
const OST_STYLE_URL = 'depsost.css';
/** @see https://git.corp.adobe.com/PandoraUI/core/blob/master/packages/react-env-provider/src/component.tsx#L49 */
export const WCS_ENV = 'PROD';
export const WCS_API_KEY = 'wcms-commerce-ims-ro-user-cc';
Expand Down Expand Up @@ -238,13 +236,14 @@ export async function loadOstEnv() {

export default async function init(el) {
el.innerHTML = '<div />';

loadStyle(OST_STYLE_URL);
const config = getConfig();
const base = config.miloLibs || config.codeRoot;
loadStyle(`${base}/deps/${OST_STYLE_URL}`);
loadStyle('https://use.typekit.net/pps7abe.css');

const [ostEnv] = await Promise.all([
loadOstEnv(),
loadScript(OST_SCRIPT_URL),
loadScript(`${base}/deps/${OST_SCRIPT_URL}`),
]);

function openOst() {
Expand Down
Loading

0 comments on commit 85286cc

Please sign in to comment.