first commit
SAP-ERP Portal CI/CD / build (push) Failing after 5m20s

This commit is contained in:
John
2026-09-23 17:31:02 +05:30
commit 69b4e68baf
51657 changed files with 3864077 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
'use strict';
// Single source of truth for the default SAP B1 company/schema — read from
// .env (SAP_B1_COMPANY). Every service/route/page must resolve it through
// this module rather than hardcoding the company code.
const DEFAULT_COMPANY = process.env.SAP_B1_COMPANY;
if (!DEFAULT_COMPANY) {
console.error('[companyConfig] FATAL: SAP_B1_COMPANY is not set in .env — cannot start.');
process.exit(1);
}
const COMPANIES = {
[DEFAULT_COMPANY]: { display: 'MIPL', short: 'MIPL' },
};
function isValid(c) { return !!COMPANIES[c]; }
function resolve(c) { return isValid(c) ? c : DEFAULT_COMPANY; }
module.exports = { COMPANIES, DEFAULT_COMPANY, isValid, resolve };