Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added adobe-spacecat-shared-data-access-3.36.1.tgz
Binary file not shown.
6 changes: 6 additions & 0 deletions docs/openapi/llmo-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,12 @@ llmo-onboard:
format: uuid
description: The created or existing site ID
example: "987fcdeb-51a2-43d1-9f12-345678901234"
detectedCdn:
type:
- string
- 'null'
description: CDN provider detected via DNS during onboarding
example: "aem-cs-fastly"
status:
type: string
enum: ["initiated", "in_progress", "completed", "failed"]
Expand Down
48 changes: 12 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@
"@adobe/helix-status": "10.1.5",
"@adobe/helix-universal-logger": "3.0.29",
"@adobe/spacecat-helix-content-sdk": "1.4.33",
"@adobe/spacecat-shared-data-access": "3.48.0",
"@adobe/spacecat-shared-ahrefs-client": "1.10.10",
"@adobe/spacecat-shared-athena-client": "1.9.11",
"@adobe/spacecat-shared-brand-client": "1.1.41",
"@adobe/spacecat-shared-content-client": "1.8.23",
"@adobe/spacecat-shared-data-access": "https://gist.github.com/AddyKen-ghost/971fd9594bd50443363e6a93d3842145/raw/adobe-spacecat-shared-data-access-3.36.1.tgz",
"@adobe/spacecat-shared-data-access-v2": "npm:@adobe/spacecat-shared-data-access@2.109.0",
"@adobe/spacecat-shared-drs-client": "1.4.2",
"@adobe/spacecat-shared-gpt-client": "1.6.22",
Expand Down
12 changes: 12 additions & 0 deletions src/controllers/llmo/llmo-onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
LLMO_BRANDALF_FLAG,
} from '../../support/llmo-onboarding-mode.js';
import { upsertFeatureFlag } from '../../support/feature-flags-storage.js';
import { detectCdnForDomain } from '../../support/cdn-detection.js';
import { upsertBrand } from '../../support/brands-storage.js';

// LLMO Constants
Expand Down Expand Up @@ -1254,6 +1255,7 @@ export async function performLlmoOnboarding(params, context, say = () => {}) {
const dataFolder = generateDataFolder(baseURL, env.ENV);

let site;
let detectedCdn = null;
try {
log.info(`Starting LLMO onboarding for IMS org ${imsOrgId}, baseURL ${baseURL}, brand ${brandName}`);

Expand Down Expand Up @@ -1323,6 +1325,15 @@ export async function performLlmoOnboarding(params, context, say = () => {}) {
log.info(`Site ${site.getId()} already has overrideBaseURL: ${currentFetchConfig.overrideBaseURL}, skipping auto-detection`);
}

detectedCdn = await detectCdnForDomain(new URL(baseURL).hostname);
if (detectedCdn) {
siteConfig.updateLlmoDetectedCdn?.(detectedCdn);
log.info(`Detected CDN ${detectedCdn} for site ${site.getId()}`);
say(`:mag: Detected CDN: ${detectedCdn}`);
} else {
log.info(`CDN detection inconclusive for site ${site.getId()}`);
}

// update the site config object
site.setConfig(Config.toDynamoItem(siteConfig));
await site.save();
Expand Down Expand Up @@ -1441,6 +1452,7 @@ export async function performLlmoOnboarding(params, context, say = () => {}) {
organizationId: organization.getId(),
baseURL,
dataFolder,
detectedCdn,
message: 'LLMO onboarding completed successfully',
};
} catch (error) {
Expand Down
1 change: 1 addition & 0 deletions src/controllers/llmo/llmo.js
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,7 @@ function LlmoController(ctx) {
dataFolder: result.dataFolder,
organizationId: result.organizationId,
siteId: result.siteId,
detectedCdn: result.detectedCdn,
status: 'completed',
createdAt: new Date().toISOString(),
brandProfileExecutionName,
Expand Down
5 changes: 4 additions & 1 deletion src/dto/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const toListJSON = (config) => {
if (isNonEmptyObject(json.llmo)) {
result.llmo = {};
const {
dataFolder, brand, tags, customerIntent,
dataFolder, brand, tags, customerIntent, detectedCdn,
} = json.llmo;
if (dataFolder) {
result.llmo.dataFolder = dataFolder;
Expand All @@ -54,6 +54,9 @@ const toListJSON = (config) => {
if (customerIntent) {
result.llmo.customerIntent = customerIntent;
}
if (detectedCdn) {
result.llmo.detectedCdn = detectedCdn;
}
}
if (isNonEmptyObject(json.edgeOptimizeConfig)) {
result.edgeOptimizeConfig = json.edgeOptimizeConfig;
Expand Down
Loading
Loading