M3 Integration fixes pass 20
This commit is contained in:
@@ -16,6 +16,7 @@ use Throwable;
|
||||
final class CloseShipmentProcessor
|
||||
{
|
||||
private const ZERO_PAD = '000000';
|
||||
private const JSON_CONTENT_TYPE = 'application/json';
|
||||
private const NULL_M3_RESPONSE = 'M3 API responded with null value';
|
||||
private const SOURCE = 'CloseShipmentCoChargeAPI';
|
||||
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { execSync } from 'node:child_process';
|
||||
import { execFileSync } from 'node:child_process';
|
||||
|
||||
const modulesDir = path.resolve('Modules');
|
||||
const npmCli = process.env.npm_execpath;
|
||||
|
||||
if (!npmCli || !path.isAbsolute(npmCli) || !fs.existsSync(npmCli)) {
|
||||
throw new Error('npm_execpath must reference an existing absolute npm CLI path.');
|
||||
}
|
||||
|
||||
for (const moduleName of fs.readdirSync(modulesDir)) {
|
||||
|
||||
@@ -23,11 +28,13 @@ for (const moduleName of fs.readdirSync(modulesDir)) {
|
||||
console.log(`Building ${moduleName}`);
|
||||
|
||||
try {
|
||||
execSync(
|
||||
'npm run build',
|
||||
execFileSync(
|
||||
process.execPath,
|
||||
[npmCli, 'run', 'build'],
|
||||
{
|
||||
cwd: modulePath,
|
||||
stdio: 'inherit',
|
||||
env: { ...process.env, PATH: '/usr/bin:/bin' },
|
||||
}
|
||||
);
|
||||
} catch (error) {
|
||||
|
||||
@@ -244,13 +244,13 @@ abstract class DuskTestCase extends BaseTestCase
|
||||
$expected = $binDirectory . '/chromedriver-mac-arm';
|
||||
|
||||
if (is_file($expected)) {
|
||||
@chmod($expected, 0755);
|
||||
@chmod($expected, 0750);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (! is_dir($binDirectory)) {
|
||||
@mkdir($binDirectory, 0755, true);
|
||||
@mkdir($binDirectory, 0750, true);
|
||||
}
|
||||
|
||||
$candidates = array_values(array_filter(
|
||||
@@ -268,6 +268,6 @@ abstract class DuskTestCase extends BaseTestCase
|
||||
}
|
||||
|
||||
copy($candidates[0], $expected);
|
||||
@chmod($expected, 0755);
|
||||
@chmod($expected, 0750);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user