@adobedjangir/commerce-admin-management 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/setup.js +25 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobedjangir/commerce-admin-management",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "Schema-driven system configuration for Adobe Commerce App Builder sync apps. Magento-style scoped config in Adobe App Builder Database (ABDB) with encryption, Commerce REST helpers, and React Admin UI.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Adobe Inc.",
|
package/scripts/setup.js
CHANGED
|
@@ -451,15 +451,33 @@ function setupWebSrc (projectRoot) {
|
|
|
451
451
|
*/
|
|
452
452
|
function stripExcshellSourceDir (projectRoot) {
|
|
453
453
|
const dir = path.join(projectRoot, 'src', 'dx-excshell-1')
|
|
454
|
-
|
|
455
|
-
|
|
454
|
+
const parent = path.join(projectRoot, 'src')
|
|
455
|
+
let changed = false
|
|
456
|
+
|
|
457
|
+
if (fs.existsSync(dir)) {
|
|
458
|
+
try {
|
|
459
|
+
fs.rmSync(dir, { recursive: true, force: true })
|
|
460
|
+
changed = true
|
|
461
|
+
} catch (err) {
|
|
462
|
+
return { changed: false, reason: `rm-failed: ${err.message}` }
|
|
463
|
+
}
|
|
456
464
|
}
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
465
|
+
|
|
466
|
+
// If src/ is now empty (or was never anything but dx-excshell-1) drop it
|
|
467
|
+
// too — leaving an empty src/ in the project root is just clutter. We
|
|
468
|
+
// never remove it when it still contains other files (the host's own
|
|
469
|
+
// code), so this is safe.
|
|
470
|
+
if (fs.existsSync(parent)) {
|
|
471
|
+
try {
|
|
472
|
+
const remaining = fs.readdirSync(parent).filter((n) => n !== '.DS_Store')
|
|
473
|
+
if (remaining.length === 0) {
|
|
474
|
+
fs.rmSync(parent, { recursive: true, force: true })
|
|
475
|
+
changed = true
|
|
476
|
+
}
|
|
477
|
+
} catch (_) { /* best effort */ }
|
|
462
478
|
}
|
|
479
|
+
|
|
480
|
+
return { changed, reason: changed ? 'removed' : 'absent' }
|
|
463
481
|
}
|
|
464
482
|
|
|
465
483
|
function setupAppConfig (projectRoot) {
|