Skip to content
Merged
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
2 changes: 1 addition & 1 deletion _tasks/environments.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": {
"major": 0,
"minor": 1,
"patch": 10,
"patch": 12,
"build": 0
},
"dev": {
Expand Down
5 changes: 4 additions & 1 deletion bc-tools-extension/Build-ALPackage/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"version": {
"Major": 0,
"Minor": 1,
"Patch": 5
"Patch": 6
},
"instanceNameFormat": "Build AL Package from $(ProjectPath)",
"inputs": [
Expand Down Expand Up @@ -60,6 +60,9 @@
},
"Node20_1": {
"target": "function_Build-ALPackage.js"
},
"Node24": {
"target": "function_Build-ALPackage.js"
}
}
}
5 changes: 4 additions & 1 deletion bc-tools-extension/Enumerate-Environment/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"version": {
"Major": 0,
"Minor": 1,
"Patch": 5
"Patch": 6
},
"instanceNameFormat": "Enumerate compiling environment",
"inputs": [
Expand All @@ -36,6 +36,9 @@
},
"Node20_1": {
"target": "function_Enumerate-Environment.js"
},
"Node24": {
"target": "function_Enumerate-Environment.js"
}
}
}
5 changes: 4 additions & 1 deletion bc-tools-extension/Get-BCDependencies/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"version": {
"Major": 0,
"Minor": 1,
"Patch": 5
"Patch": 6
},
"instanceNameFormat": "Collect dependencies for AL project",
"inputs": [
Expand Down Expand Up @@ -84,6 +84,9 @@
},
"Node20_1": {
"target": "function_Get-BCDependencies.js"
},
"Node24": {
"target": "function_Get-BCDependencies.js"
}
}
}
5 changes: 4 additions & 1 deletion bc-tools-extension/Get-ListOfCompanies/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"version": {
"Major": 0,
"Minor": 1,
"Patch": 5
"Patch": 6
},
"instanceNameFormat": "Collect list of companies",
"inputs": [
Expand Down Expand Up @@ -60,6 +60,9 @@
},
"Node20_1": {
"target": "function_Get-ListOfCompanies.js"
},
"Node24": {
"target": "function_Get-ListOfCompanies.js"
}
}
}
5 changes: 4 additions & 1 deletion bc-tools-extension/Get-ListOfModules/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"version": {
"Major": 0,
"Minor": 1,
"Patch": 5
"Patch": 6
},
"instanceNameFormat": "Collect list of modules",
"inputs": [
Expand Down Expand Up @@ -76,6 +76,9 @@
},
"Node20_1": {
"target": "function_Get-ListOfModules.js"
},
"Node24": {
"target": "function_Get-ListOfModules.js"
}
}
}
5 changes: 4 additions & 1 deletion bc-tools-extension/Get-VSIXCompiler/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"version": {
"Major": 0,
"Minor": 1,
"Patch": 5
"Patch": 6
},
"instanceNameFormat": "Acquire compiler for AL project",
"inputs": [
Expand All @@ -36,6 +36,9 @@
},
"Node20_1": {
"target": "function_Get-VSIXCompiler.js"
},
"Node24": {
"target": "function_Get-VSIXCompiler.js"
}
}
}
5 changes: 4 additions & 1 deletion bc-tools-extension/Publish-BCModuleToTenant/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"version": {
"Major": 0,
"Minor": 1,
"Patch": 5
"Patch": 6
},
"instanceNameFormat": "Deploy module to tenant",
"inputs": [
Expand Down Expand Up @@ -91,6 +91,9 @@
},
"Node20_1": {
"target": "function_Publish-BCModuleToTenant.js"
},
"Node24": {
"target": "function_Publish-BCModuleToTenant.js"
}
}
}
4 changes: 4 additions & 0 deletions bc-tools-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@

## Overview

**2026-06-24 Version 0.1.12: Node24 support now added**

We've updated to allow for Node 24 support!

**2025-06-10 Version 0.1.8: NO LONGER WINDOWS ONLY!**

*Proud to announce that this extension is NO LONGER Windows agent dependent!!!*
Expand Down
10 changes: 10 additions & 0 deletions bc-tools-extension/RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Release Notes - BCBuildTasks Extension

- [Release Notes - BCBuildTasks Extension](#release-notes---bcbuildtasks-extension)
- [Version: 0.1.12](#version-0112)
- [Version: 0.1.11](#version-0111)
- [Version: 0.1.10](#version-0110)
- [Version: 0.1.9](#version-019)
- [Version: 0.1.9](#version-019-1)
- [Version: 0.1.8](#version-018)
- [Version: 0.1.7](#version-017)
- [Fixes](#fixes)
Expand Down Expand Up @@ -33,6 +36,13 @@
- [Support](#support)
- [License](#license)

# Version: 0.1.12
- Added Node24 support
- Fixed ```undici``` error regarding "```TypeError: webidl.util.markAsUncloneable is not a function```"

# Version: 0.1.11
- Unused

# Version: 0.1.10
- Adds [#36](https://github.com/crazycga/bcdevopsextension/issues/36): incorporate failure condition regarding missing pipeline user entry onto Microsoft Entra Application screen in Business Central.
- Adds new function ```EGEnumerateEnvironment``` for fast troubleshooting of pipeline environments.
Expand Down
54 changes: 25 additions & 29 deletions bc-tools-extension/_common/CommonTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,20 @@ let fetch = null;

function usesUndici() {
if (!fetch) {
logger.warn("'undici' not found. Attempting to install deterministic version...");
const projectRoot = path.resolve(__dirname, '..');

const { execSync } = require('child_process');
try {
execSync('npm install undici@6.22.0 --no-progress --loglevel=warn', {
cwd: projectRoot,
stdio: 'inherit'
});
fetch = require('undici').fetch;
} catch (_) {
logger.warn("'undici' not found. Attempting to install...");
const projectRoot = path.resolve(__dirname, '..');

const { execSync } = require('child_process');
try {
execSync('npm install undici --no-progress --loglevel=warn', {
cwd: projectRoot,
stdio: 'inherit'
});
fetch = require('undici').fetch;
} catch (installErr) {
console.error("Auto-install of 'undici' failed. Aborting.");
console.error(installErr);
process.exit(1);
}
} catch (installErr) {
console.error("Auto-install of 'undici' failed. Aborting.");
console.error(installErr);
process.exit(1);
}
}
return fetch;
Expand Down Expand Up @@ -217,7 +213,7 @@ async function getModules(token, tenantId, environmentName, companyId, moduleId,
'Accept': 'application/json'
}
});

if (!response.ok) {
logger.error(`Failed to get modules: ${response.status}`);
const error = await response.text();
Expand All @@ -238,8 +234,8 @@ async function confirmModule(token, tenantId, environmentName, companyId, module
let checkValue = await getModules(token, tenantId, environmentName, companyId, moduleId);

checkValue.forEach((module, idx) => {
logger.debug(`**** ${idx + 1}. ${module.displayName} (ID: ${module.id})`);
});
logger.debug(`**** ${idx + 1}. ${module.displayName} (ID: ${module.id})`);
});

return checkValue.some(m => m.id === moduleId);
}
Expand Down Expand Up @@ -282,9 +278,9 @@ async function getInstallationStatus(token, tenantId, environmentName, companyId

//console.debug('API response (getInstallationStatus)');
const data = await response.json();

//console.debug(data);
return data.value;
return data.value;
}

/**
Expand Down Expand Up @@ -337,7 +333,7 @@ async function createInstallationBookmark(token, tenantId, environmentName, comp
}

if (!['Current version', 'Next minor version', 'Next major version'].includes(schedule) && schedule?.trim() !== "") {
throw new Error ('\'schedule\' must be one of: \'Current version\', \'Next minor version\', or \'Next major version\', or left blank');
throw new Error('\'schedule\' must be one of: \'Current version\', \'Next minor version\', or \'Next major version\', or left blank');
}

// per: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/resources/dynamics_extensionupload
Expand All @@ -346,14 +342,14 @@ async function createInstallationBookmark(token, tenantId, environmentName, comp
}

if (!['Add', 'Force Sync'].includes(syncMode) && syncMode?.trim() !== "") {
throw new Error ('\'syncMode\' must be one of: \'Add\', or \'Force Sync\', or left blank');
throw new Error('\'syncMode\' must be one of: \'Add\', or \'Force Sync\', or left blank');
}

const body = {
schedule: schedule,
schemaSyncMode: syncMode
};

const _debugBody = await JSON.stringify(body);
logger.debug('Request body:');
logger.debug(_debugBody);
Expand All @@ -367,7 +363,7 @@ async function createInstallationBookmark(token, tenantId, environmentName, comp
},
body: JSON.stringify(body)
});

if (!response.ok) {
const status = response.status;

Expand Down Expand Up @@ -410,7 +406,7 @@ async function createInstallationBookmark(token, tenantId, environmentName, comp
const data = await response.json();
logger.debug('(createInstallationBookmark) returning: ');
logger.debug(data);
return data;
return data;
}

/**
Expand Down Expand Up @@ -492,7 +488,7 @@ async function callNavUploadCommand(token, tenantId, environmentName, companyId,
let response = await fetch(apiUrl, {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Authorization': `Bearer ${token}`,
'Accept': 'application/json',
'Accept-Encoding': 'gzip, deflate, br'
}
Expand All @@ -507,14 +503,14 @@ async function callNavUploadCommand(token, tenantId, environmentName, companyId,
logger.info(`Original odata.etag: ${odata_etag}`);
if (Array.isArray(refreshCheck)) {
odata_etag = refreshCheck[0]['@odata.etag'];
} else {
} else {
odata_etag = refreshCheck['@odata.etag'];
}
logger.info(`Refreshed odata.etag: ${odata_etag}`);
response = await fetch(apiUrl, {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Authorization': `Bearer ${token}`,
'Accept': 'application/json',
'Accept-Encoding': 'gzip, deflate, br'
}
Expand Down
2 changes: 1 addition & 1 deletion bc-tools-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dependencies": {
"node-fetch": "^2.7.0",
"undici": "^7.10.0",
"undici": "6.22.0",
"unzipper": "^0.12.3"
}
}
2 changes: 1 addition & 1 deletion bc-tools-extension/vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "eg-bc-build-tasks",
"name": "Business Central Build Tasks",
"version": "0.1.10",
"version": "0.1.11",
"publisher": "Evergrowth",
"targets": [
{
Expand Down
Loading