From db26a8bc8070d797bc32821f25984d00387caf01 Mon Sep 17 00:00:00 2001 From: Amit Joshi Date: Mon, 30 Mar 2026 12:41:22 +0530 Subject: [PATCH 1/3] Rename server-logics to server-logic in web extension Remove trailing 's' from the server-logics folder name and related constants/enums to use singular form (server-logic) consistently. Only VS Code-side naming is affected; Dataverse entity names remain unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/common/copilot/constants.ts | 2 +- src/web/client/common/constants.ts | 2 +- src/web/client/dal/fileSystemProvider.ts | 4 ++-- src/web/client/dal/remoteFetchProvider.ts | 10 +++++----- src/web/client/dal/remoteSaveProvider.ts | 4 ++-- src/web/client/schema/constants.ts | 6 +++--- src/web/client/schema/portalSchema.ts | 8 ++++---- src/web/client/utilities/commonUtil.ts | 2 +- src/web/client/utilities/schemaHelperUtil.ts | 8 ++++---- src/web/client/utilities/urlBuilderUtil.ts | 2 +- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/common/copilot/constants.ts b/src/common/copilot/constants.ts index 6a529c251..d076ec3e6 100644 --- a/src/common/copilot/constants.ts +++ b/src/common/copilot/constants.ts @@ -50,7 +50,7 @@ export const DataverseEntityNameMap = new Map([ ['webtemplate', 'adx_webtemplate'], ['basicform', 'adx_entityform'], ['advancedformstep', 'adx_entityform'], - ['serverlogics', 'server-logics'], + ['serverlogic', 'server-logic'], ]); export const EntityFieldMap = new Map([ diff --git a/src/web/client/common/constants.ts b/src/web/client/common/constants.ts index 63a79aaf0..2e4db85bf 100644 --- a/src/web/client/common/constants.ts +++ b/src/web/client/common/constants.ts @@ -143,5 +143,5 @@ export const WEB_EXTENSION_QUICK_PICK_PLACEHOLDER = "Search for people"; export const WEB_EXTENSION_COLLABORATION_OPTIONS_CONTACT = "Contact"; //Business logic constants -export const SERVERLOGICS = "server-logics"; +export const SERVERLOGIC = "server-logic"; export const SERVERLOGIC_FILE_EXTENSION = ".serverlogic.customjs.js"; diff --git a/src/web/client/dal/fileSystemProvider.ts b/src/web/client/dal/fileSystemProvider.ts index 975750d0c..f8ce2e799 100644 --- a/src/web/client/dal/fileSystemProvider.ts +++ b/src/web/client/dal/fileSystemProvider.ts @@ -10,7 +10,7 @@ import { PORTALS_URI_SCHEME, queryParameters, REFERRER, - SERVERLOGICS, + SERVERLOGIC, } from "../common/constants"; import WebExtensionContext from "../WebExtensionContext"; import { fetchDataFromDataverseAndUpdateVFS } from "./remoteFetchProvider"; @@ -234,7 +234,7 @@ export class PortalsFS implements vscode.FileSystemProvider { const dirname = uri.with({ path: path.posix.dirname(uri.path) }); const parent = await this._lookupAsDirectory(dirname, false); - if (basename === SERVERLOGICS && !enableServerLogicChanges) { + if (basename === SERVERLOGIC && !enableServerLogicChanges) { return; // Do not create the directory if the server logic is disabled } diff --git a/src/web/client/dal/remoteFetchProvider.ts b/src/web/client/dal/remoteFetchProvider.ts index 60ce5bfef..ade9f354c 100644 --- a/src/web/client/dal/remoteFetchProvider.ts +++ b/src/web/client/dal/remoteFetchProvider.ts @@ -73,7 +73,7 @@ export async function fetchDataFromDataverseAndUpdateVFS( await Promise.all(entityRequestURLs.map(async (entity) => { const startTime = new Date().getTime(); - if(entity.entityName != schemaEntityName.SERVERLOGICS || featureFlags.enableServerLogicChanges) { + if(entity.entityName != schemaEntityName.SERVERLOGIC || featureFlags.enableServerLogicChanges) { await fetchFromDataverseAndCreateFiles(entity.entityName, entity.requestUrl, dataverseOrgUrl, portalFs, defaultFileInfo, featureFlags); if (defaultFileInfo === undefined) { // This will be undefined for bulk entity load @@ -470,8 +470,8 @@ async function processDataAndCreateFile( else { let fileCreationValid = true; let fileNameWithExtension = GetFileNameWithExtension(entityName, fileName, languageCode, fileExtension); - if (entityName === schemaEntityName.SERVERLOGICS) { - // Modify filename for serverlogics: test.js -> test.serverlogics.customjs.js + if (entityName === schemaEntityName.SERVERLOGIC) { + // Modify filename for serverlogic: test.js -> test.serverlogic.customjs.js if (fileNameWithExtension.endsWith('.js')) { const baseName = fileNameWithExtension.slice(0, -3); // Remove .js fileNameWithExtension = `${baseName}${Constants.SERVERLOGIC_FILE_EXTENSION}`; @@ -667,7 +667,7 @@ async function fetchMappingEntityContent( // Gracefully handle 404 for optional entities (deleted/moved files or missing server logic) const notFoundTelemetryMap = new Map([ [schemaEntityName.WEBFILES, webExtensionTelemetryEventNames.WEB_EXTENSION_WEBFILE_NOT_FOUND], - [schemaEntityName.SERVERLOGICS, webExtensionTelemetryEventNames.WEB_EXTENSION_SERVERLOGIC_NOT_FOUND], + [schemaEntityName.SERVERLOGIC, webExtensionTelemetryEventNames.WEB_EXTENSION_SERVERLOGIC_NOT_FOUND], ]); if (!response.ok && response.status === 404 && notFoundTelemetryMap.has(entity)) { @@ -704,7 +704,7 @@ async function fetchMappingEntityContent( const result = await response.json(); const data = result.value ?? result; - if(entity === schemaEntityName.SERVERLOGICS) { + if(entity === schemaEntityName.SERVERLOGIC) { return data || Constants.NO_CONTENT; } if (isPortalVersionV1() && result[Constants.ODATA_COUNT] > 0 && data.length > 0) { diff --git a/src/web/client/dal/remoteSaveProvider.ts b/src/web/client/dal/remoteSaveProvider.ts index 98aef2788..93c2aba99 100644 --- a/src/web/client/dal/remoteSaveProvider.ts +++ b/src/web/client/dal/remoteSaveProvider.ts @@ -92,7 +92,7 @@ async function getSaveParameters( ); if (webFileV2) { let fileName = fileDataMap.get(fileUri.fsPath)?.fileName as string; - if (entityName === MultiFileSupportedEntityName.SERVERLOGICS && fileName && !fileName.endsWith('.sl')) { + if (entityName === MultiFileSupportedEntityName.SERVERLOGIC && fileName && !fileName.endsWith('.sl')) { // Handle filenames like test.serverlogic.customjs.js -> extract base name (test) and append .sl let baseName = fileName; // Remove .serverlogic.customjs.js if present @@ -168,7 +168,7 @@ async function saveDataToDataverse( let fileExtensionType = fileDataMap.get( fileUri.fsPath )?.entityFileExtensionType; - if(entityName == MultiFileSupportedEntityName.SERVERLOGICS ) { + if(entityName == MultiFileSupportedEntityName.SERVERLOGIC ) { fileExtensionType = 'sl'; } diff --git a/src/web/client/schema/constants.ts b/src/web/client/schema/constants.ts index a14204e33..bac32c169 100644 --- a/src/web/client/schema/constants.ts +++ b/src/web/client/schema/constants.ts @@ -46,7 +46,7 @@ export enum schemaEntityName { WEBFILES = "webfiles", WEBPAGES = "webpages", WEBTEMPLATES = "webtemplates", - SERVERLOGICS = "serverlogics", + SERVERLOGIC = "serverlogic", CONTENTSNIPPETS = "contentsnippet", LISTS = "lists", BASICFORMS = "basicforms", @@ -63,7 +63,7 @@ export enum schemaEntityName { export enum MultiFileSupportedEntityName { WEBFILES = "webfiles", WEBPAGES = "webpages", - SERVERLOGICS = "serverlogics", + SERVERLOGIC = "serverlogic", WEBTEMPLATES = "webtemplates", CONTENTSNIPPETS = "contentsnippet", LISTS = "lists", @@ -122,5 +122,5 @@ export const conditionalFolderEntities = [ schemaEntityName.IDEAFORUMS, schemaEntityName.FORUMANNOUNCEMENTS, schemaEntityName.FORUMPOSTS, - schemaEntityName.SERVERLOGICS, + schemaEntityName.SERVERLOGIC, ]; diff --git a/src/web/client/schema/portalSchema.ts b/src/web/client/schema/portalSchema.ts index 9879e68e3..af5e94e0c 100644 --- a/src/web/client/schema/portalSchema.ts +++ b/src/web/client/schema/portalSchema.ts @@ -109,14 +109,14 @@ export const portal_schema_V1 = { }, { relationships: "", - _vscodeentityname: "serverlogics", + _vscodeentityname: "serverlogic", _dataverseenityname: "adx_serverlogics", _displayname: "Server Logic", _etc: "11398", _primaryidfield: "adx_serverlogicid", _primarynamefield: "adx_name", _disableplugins: "true", - _foldername: "server-logics", + _foldername: "server-logic", _exporttype: "SingleFolder", _fetchQueryParameters: "?$filter=adx_serverlogicid eq {entityId} &$select=adx_name", @@ -450,7 +450,7 @@ export const portal_schema_V2 = { }, { relationships: "", - _vscodeentityname: "serverlogics", + _vscodeentityname: "serverlogic", _dataverseenityname: "powerpagecomponents", _displayname: "Server Logic", _etc: "10271", @@ -458,7 +458,7 @@ export const portal_schema_V2 = { _primarynamefield: "name", _disableplugins: "false", _exporttype: "SingleFolder", - _foldername: "server-logics", + _foldername: "server-logic", _fetchQueryParameters: "?$filter=powerpagecomponentid eq {entityId}&$select=name", _multiFileFetchQueryParameters: diff --git a/src/web/client/utilities/commonUtil.ts b/src/web/client/utilities/commonUtil.ts index 0e77cb776..231ec6aed 100644 --- a/src/web/client/utilities/commonUtil.ts +++ b/src/web/client/utilities/commonUtil.ts @@ -63,7 +63,7 @@ export function isExtensionNeededInFileName(entity: string) { || entity === schemaEntityName.BASICFORMS || entity === schemaEntityName.WEBPAGES || entity === schemaEntityName.CONTENTSNIPPETS - || entity === schemaEntityName.SERVERLOGICS + || entity === schemaEntityName.SERVERLOGIC || entity === schemaEntityName.BLOGS || entity === schemaEntityName.BLOGPOSTS || entity === schemaEntityName.IDEAS diff --git a/src/web/client/utilities/schemaHelperUtil.ts b/src/web/client/utilities/schemaHelperUtil.ts index cc0a11d91..65d4c9f56 100644 --- a/src/web/client/utilities/schemaHelperUtil.ts +++ b/src/web/client/utilities/schemaHelperUtil.ts @@ -65,7 +65,7 @@ export function isBase64Encoded( attributeType: string ): boolean { return ( - (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGICS) && + (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGIC) && (attributeType === entityAttributesWithBase64Encoding.documentbody || attributeType === entityAttributesWithBase64Encoding.filecontent || attributeType === entityAttributesWithBase64Encoding.adx_filecontent) @@ -74,7 +74,7 @@ export function isBase64Encoded( export function encodeAsBase64(entity: string, attributeType: string): boolean { return ( - (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGICS) && + (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGIC) && attributeType === entityAttributesWithBase64Encoding.documentbody ); } @@ -84,7 +84,7 @@ export function useOctetStreamContentType( attributeType: string ) { return ( - (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGICS) && + (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGIC) && (attributeType === entityAttributesWithBase64Encoding.filecontent || attributeType === entityAttributesWithBase64Encoding.adx_filecontent) ); @@ -92,7 +92,7 @@ export function useOctetStreamContentType( export function isWebFileV2(entity: string, attributeType: string) { return ( - (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGICS) && + (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGIC) && (attributeType === entityAttributesWithBase64Encoding.filecontent || attributeType === entityAttributesWithBase64Encoding.adx_filecontent) ); diff --git a/src/web/client/utilities/urlBuilderUtil.ts b/src/web/client/utilities/urlBuilderUtil.ts index aaee60785..9cb93e41a 100644 --- a/src/web/client/utilities/urlBuilderUtil.ts +++ b/src/web/client/utilities/urlBuilderUtil.ts @@ -146,7 +146,7 @@ export function getPatchRequestUrl( attributeType: string, requestUrl: string ) { - return (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGICS) && + return (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGIC) && (attributeType === entityAttributesWithBase64Encoding.filecontent || attributeType === entityAttributesWithBase64Encoding.adx_filecontent) ? requestUrl + "/" + attributeType From 3a3c3d4d0c99652f36e4f13f9dc55a5dd6b11fb3 Mon Sep 17 00:00:00 2001 From: Amit Joshi Date: Mon, 30 Mar 2026 14:25:49 +0530 Subject: [PATCH 2/3] Revert "Rename server-logics to server-logic in web extension" This reverts commit db26a8bc8070d797bc32821f25984d00387caf01. --- src/common/copilot/constants.ts | 2 +- src/web/client/common/constants.ts | 2 +- src/web/client/dal/fileSystemProvider.ts | 4 ++-- src/web/client/dal/remoteFetchProvider.ts | 10 +++++----- src/web/client/dal/remoteSaveProvider.ts | 4 ++-- src/web/client/schema/constants.ts | 6 +++--- src/web/client/schema/portalSchema.ts | 8 ++++---- src/web/client/utilities/commonUtil.ts | 2 +- src/web/client/utilities/schemaHelperUtil.ts | 8 ++++---- src/web/client/utilities/urlBuilderUtil.ts | 2 +- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/common/copilot/constants.ts b/src/common/copilot/constants.ts index d076ec3e6..6a529c251 100644 --- a/src/common/copilot/constants.ts +++ b/src/common/copilot/constants.ts @@ -50,7 +50,7 @@ export const DataverseEntityNameMap = new Map([ ['webtemplate', 'adx_webtemplate'], ['basicform', 'adx_entityform'], ['advancedformstep', 'adx_entityform'], - ['serverlogic', 'server-logic'], + ['serverlogics', 'server-logics'], ]); export const EntityFieldMap = new Map([ diff --git a/src/web/client/common/constants.ts b/src/web/client/common/constants.ts index 2e4db85bf..63a79aaf0 100644 --- a/src/web/client/common/constants.ts +++ b/src/web/client/common/constants.ts @@ -143,5 +143,5 @@ export const WEB_EXTENSION_QUICK_PICK_PLACEHOLDER = "Search for people"; export const WEB_EXTENSION_COLLABORATION_OPTIONS_CONTACT = "Contact"; //Business logic constants -export const SERVERLOGIC = "server-logic"; +export const SERVERLOGICS = "server-logics"; export const SERVERLOGIC_FILE_EXTENSION = ".serverlogic.customjs.js"; diff --git a/src/web/client/dal/fileSystemProvider.ts b/src/web/client/dal/fileSystemProvider.ts index f8ce2e799..975750d0c 100644 --- a/src/web/client/dal/fileSystemProvider.ts +++ b/src/web/client/dal/fileSystemProvider.ts @@ -10,7 +10,7 @@ import { PORTALS_URI_SCHEME, queryParameters, REFERRER, - SERVERLOGIC, + SERVERLOGICS, } from "../common/constants"; import WebExtensionContext from "../WebExtensionContext"; import { fetchDataFromDataverseAndUpdateVFS } from "./remoteFetchProvider"; @@ -234,7 +234,7 @@ export class PortalsFS implements vscode.FileSystemProvider { const dirname = uri.with({ path: path.posix.dirname(uri.path) }); const parent = await this._lookupAsDirectory(dirname, false); - if (basename === SERVERLOGIC && !enableServerLogicChanges) { + if (basename === SERVERLOGICS && !enableServerLogicChanges) { return; // Do not create the directory if the server logic is disabled } diff --git a/src/web/client/dal/remoteFetchProvider.ts b/src/web/client/dal/remoteFetchProvider.ts index ade9f354c..60ce5bfef 100644 --- a/src/web/client/dal/remoteFetchProvider.ts +++ b/src/web/client/dal/remoteFetchProvider.ts @@ -73,7 +73,7 @@ export async function fetchDataFromDataverseAndUpdateVFS( await Promise.all(entityRequestURLs.map(async (entity) => { const startTime = new Date().getTime(); - if(entity.entityName != schemaEntityName.SERVERLOGIC || featureFlags.enableServerLogicChanges) { + if(entity.entityName != schemaEntityName.SERVERLOGICS || featureFlags.enableServerLogicChanges) { await fetchFromDataverseAndCreateFiles(entity.entityName, entity.requestUrl, dataverseOrgUrl, portalFs, defaultFileInfo, featureFlags); if (defaultFileInfo === undefined) { // This will be undefined for bulk entity load @@ -470,8 +470,8 @@ async function processDataAndCreateFile( else { let fileCreationValid = true; let fileNameWithExtension = GetFileNameWithExtension(entityName, fileName, languageCode, fileExtension); - if (entityName === schemaEntityName.SERVERLOGIC) { - // Modify filename for serverlogic: test.js -> test.serverlogic.customjs.js + if (entityName === schemaEntityName.SERVERLOGICS) { + // Modify filename for serverlogics: test.js -> test.serverlogics.customjs.js if (fileNameWithExtension.endsWith('.js')) { const baseName = fileNameWithExtension.slice(0, -3); // Remove .js fileNameWithExtension = `${baseName}${Constants.SERVERLOGIC_FILE_EXTENSION}`; @@ -667,7 +667,7 @@ async function fetchMappingEntityContent( // Gracefully handle 404 for optional entities (deleted/moved files or missing server logic) const notFoundTelemetryMap = new Map([ [schemaEntityName.WEBFILES, webExtensionTelemetryEventNames.WEB_EXTENSION_WEBFILE_NOT_FOUND], - [schemaEntityName.SERVERLOGIC, webExtensionTelemetryEventNames.WEB_EXTENSION_SERVERLOGIC_NOT_FOUND], + [schemaEntityName.SERVERLOGICS, webExtensionTelemetryEventNames.WEB_EXTENSION_SERVERLOGIC_NOT_FOUND], ]); if (!response.ok && response.status === 404 && notFoundTelemetryMap.has(entity)) { @@ -704,7 +704,7 @@ async function fetchMappingEntityContent( const result = await response.json(); const data = result.value ?? result; - if(entity === schemaEntityName.SERVERLOGIC) { + if(entity === schemaEntityName.SERVERLOGICS) { return data || Constants.NO_CONTENT; } if (isPortalVersionV1() && result[Constants.ODATA_COUNT] > 0 && data.length > 0) { diff --git a/src/web/client/dal/remoteSaveProvider.ts b/src/web/client/dal/remoteSaveProvider.ts index 93c2aba99..98aef2788 100644 --- a/src/web/client/dal/remoteSaveProvider.ts +++ b/src/web/client/dal/remoteSaveProvider.ts @@ -92,7 +92,7 @@ async function getSaveParameters( ); if (webFileV2) { let fileName = fileDataMap.get(fileUri.fsPath)?.fileName as string; - if (entityName === MultiFileSupportedEntityName.SERVERLOGIC && fileName && !fileName.endsWith('.sl')) { + if (entityName === MultiFileSupportedEntityName.SERVERLOGICS && fileName && !fileName.endsWith('.sl')) { // Handle filenames like test.serverlogic.customjs.js -> extract base name (test) and append .sl let baseName = fileName; // Remove .serverlogic.customjs.js if present @@ -168,7 +168,7 @@ async function saveDataToDataverse( let fileExtensionType = fileDataMap.get( fileUri.fsPath )?.entityFileExtensionType; - if(entityName == MultiFileSupportedEntityName.SERVERLOGIC ) { + if(entityName == MultiFileSupportedEntityName.SERVERLOGICS ) { fileExtensionType = 'sl'; } diff --git a/src/web/client/schema/constants.ts b/src/web/client/schema/constants.ts index bac32c169..a14204e33 100644 --- a/src/web/client/schema/constants.ts +++ b/src/web/client/schema/constants.ts @@ -46,7 +46,7 @@ export enum schemaEntityName { WEBFILES = "webfiles", WEBPAGES = "webpages", WEBTEMPLATES = "webtemplates", - SERVERLOGIC = "serverlogic", + SERVERLOGICS = "serverlogics", CONTENTSNIPPETS = "contentsnippet", LISTS = "lists", BASICFORMS = "basicforms", @@ -63,7 +63,7 @@ export enum schemaEntityName { export enum MultiFileSupportedEntityName { WEBFILES = "webfiles", WEBPAGES = "webpages", - SERVERLOGIC = "serverlogic", + SERVERLOGICS = "serverlogics", WEBTEMPLATES = "webtemplates", CONTENTSNIPPETS = "contentsnippet", LISTS = "lists", @@ -122,5 +122,5 @@ export const conditionalFolderEntities = [ schemaEntityName.IDEAFORUMS, schemaEntityName.FORUMANNOUNCEMENTS, schemaEntityName.FORUMPOSTS, - schemaEntityName.SERVERLOGIC, + schemaEntityName.SERVERLOGICS, ]; diff --git a/src/web/client/schema/portalSchema.ts b/src/web/client/schema/portalSchema.ts index af5e94e0c..9879e68e3 100644 --- a/src/web/client/schema/portalSchema.ts +++ b/src/web/client/schema/portalSchema.ts @@ -109,14 +109,14 @@ export const portal_schema_V1 = { }, { relationships: "", - _vscodeentityname: "serverlogic", + _vscodeentityname: "serverlogics", _dataverseenityname: "adx_serverlogics", _displayname: "Server Logic", _etc: "11398", _primaryidfield: "adx_serverlogicid", _primarynamefield: "adx_name", _disableplugins: "true", - _foldername: "server-logic", + _foldername: "server-logics", _exporttype: "SingleFolder", _fetchQueryParameters: "?$filter=adx_serverlogicid eq {entityId} &$select=adx_name", @@ -450,7 +450,7 @@ export const portal_schema_V2 = { }, { relationships: "", - _vscodeentityname: "serverlogic", + _vscodeentityname: "serverlogics", _dataverseenityname: "powerpagecomponents", _displayname: "Server Logic", _etc: "10271", @@ -458,7 +458,7 @@ export const portal_schema_V2 = { _primarynamefield: "name", _disableplugins: "false", _exporttype: "SingleFolder", - _foldername: "server-logic", + _foldername: "server-logics", _fetchQueryParameters: "?$filter=powerpagecomponentid eq {entityId}&$select=name", _multiFileFetchQueryParameters: diff --git a/src/web/client/utilities/commonUtil.ts b/src/web/client/utilities/commonUtil.ts index 231ec6aed..0e77cb776 100644 --- a/src/web/client/utilities/commonUtil.ts +++ b/src/web/client/utilities/commonUtil.ts @@ -63,7 +63,7 @@ export function isExtensionNeededInFileName(entity: string) { || entity === schemaEntityName.BASICFORMS || entity === schemaEntityName.WEBPAGES || entity === schemaEntityName.CONTENTSNIPPETS - || entity === schemaEntityName.SERVERLOGIC + || entity === schemaEntityName.SERVERLOGICS || entity === schemaEntityName.BLOGS || entity === schemaEntityName.BLOGPOSTS || entity === schemaEntityName.IDEAS diff --git a/src/web/client/utilities/schemaHelperUtil.ts b/src/web/client/utilities/schemaHelperUtil.ts index 65d4c9f56..cc0a11d91 100644 --- a/src/web/client/utilities/schemaHelperUtil.ts +++ b/src/web/client/utilities/schemaHelperUtil.ts @@ -65,7 +65,7 @@ export function isBase64Encoded( attributeType: string ): boolean { return ( - (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGIC) && + (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGICS) && (attributeType === entityAttributesWithBase64Encoding.documentbody || attributeType === entityAttributesWithBase64Encoding.filecontent || attributeType === entityAttributesWithBase64Encoding.adx_filecontent) @@ -74,7 +74,7 @@ export function isBase64Encoded( export function encodeAsBase64(entity: string, attributeType: string): boolean { return ( - (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGIC) && + (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGICS) && attributeType === entityAttributesWithBase64Encoding.documentbody ); } @@ -84,7 +84,7 @@ export function useOctetStreamContentType( attributeType: string ) { return ( - (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGIC) && + (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGICS) && (attributeType === entityAttributesWithBase64Encoding.filecontent || attributeType === entityAttributesWithBase64Encoding.adx_filecontent) ); @@ -92,7 +92,7 @@ export function useOctetStreamContentType( export function isWebFileV2(entity: string, attributeType: string) { return ( - (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGIC) && + (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGICS) && (attributeType === entityAttributesWithBase64Encoding.filecontent || attributeType === entityAttributesWithBase64Encoding.adx_filecontent) ); diff --git a/src/web/client/utilities/urlBuilderUtil.ts b/src/web/client/utilities/urlBuilderUtil.ts index 9cb93e41a..aaee60785 100644 --- a/src/web/client/utilities/urlBuilderUtil.ts +++ b/src/web/client/utilities/urlBuilderUtil.ts @@ -146,7 +146,7 @@ export function getPatchRequestUrl( attributeType: string, requestUrl: string ) { - return (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGIC) && + return (entity === schemaEntityName.WEBFILES || entity === schemaEntityName.SERVERLOGICS) && (attributeType === entityAttributesWithBase64Encoding.filecontent || attributeType === entityAttributesWithBase64Encoding.adx_filecontent) ? requestUrl + "/" + attributeType From 3283e338053525218c8794d92e2400485a0a2745 Mon Sep 17 00:00:00 2001 From: Amit Joshi Date: Mon, 30 Mar 2026 14:39:21 +0530 Subject: [PATCH 3/3] Rename server-logics folder to server-logic in web extension Only change the folder display name (_foldername) and the corresponding constant value. Entity names and enum values are unchanged to preserve the fetch pipeline. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/web/client/common/constants.ts | 2 +- src/web/client/schema/portalSchema.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/web/client/common/constants.ts b/src/web/client/common/constants.ts index 63a79aaf0..8649a1612 100644 --- a/src/web/client/common/constants.ts +++ b/src/web/client/common/constants.ts @@ -143,5 +143,5 @@ export const WEB_EXTENSION_QUICK_PICK_PLACEHOLDER = "Search for people"; export const WEB_EXTENSION_COLLABORATION_OPTIONS_CONTACT = "Contact"; //Business logic constants -export const SERVERLOGICS = "server-logics"; +export const SERVERLOGICS = "server-logic"; export const SERVERLOGIC_FILE_EXTENSION = ".serverlogic.customjs.js"; diff --git a/src/web/client/schema/portalSchema.ts b/src/web/client/schema/portalSchema.ts index 9879e68e3..8c6bb654d 100644 --- a/src/web/client/schema/portalSchema.ts +++ b/src/web/client/schema/portalSchema.ts @@ -116,7 +116,7 @@ export const portal_schema_V1 = { _primaryidfield: "adx_serverlogicid", _primarynamefield: "adx_name", _disableplugins: "true", - _foldername: "server-logics", + _foldername: "server-logic", _exporttype: "SingleFolder", _fetchQueryParameters: "?$filter=adx_serverlogicid eq {entityId} &$select=adx_name", @@ -458,7 +458,7 @@ export const portal_schema_V2 = { _primarynamefield: "name", _disableplugins: "false", _exporttype: "SingleFolder", - _foldername: "server-logics", + _foldername: "server-logic", _fetchQueryParameters: "?$filter=powerpagecomponentid eq {entityId}&$select=name", _multiFileFetchQueryParameters: