Skip to content

Commit 74a7672

Browse files
committed
Published using @Stream44 Studio
Signed-off-by: Christoph <christoph@christoph.diy>
1 parent 00314ca commit 74a7672

4 files changed

Lines changed: 27 additions & 6 deletions

File tree

caps/WorkspaceConfig.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$schema: ../../../../../../../.~o/workspace.foundation/@t44.sh~t44~caps~JsonSchemas/@t44.sh~t44~structs~WorkspaceConfigFile.json
1+
$schema: ../../../../.~o/workspace.foundation/@t44.sh~t44~caps~JsonSchemas/@t44.sh~t44~structs~WorkspaceConfigFile.json
22
extends:
33
- ./WorkspaceShell.yaml
44
"#t44/structs/WorkspaceCliConfig":

caps/WorkspaceConfigFile.ts

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,16 @@ async function loadConfigWithExtends(configPath: string, workspaceRootDir: strin
375375
console.error(chalk.gray(' ' + yamlError.mark.snippet.split('\n').join('\n ')))
376376
}
377377
console.error('')
378+
console.error(chalk.red.bold(' === Raw file content (start) ==='))
379+
const rawLines = rawContent.split('\n')
380+
for (let i = 0; i < rawLines.length; i++) {
381+
console.error(chalk.gray(` ${String(i + 1).padStart(4)} | ${rawLines[i]}`))
382+
}
383+
console.error(chalk.red.bold(' === Raw file content (end) ==='))
384+
console.error('')
378385
process.exit(1)
379386
}
387+
const isInsideNodeModules = absolutePath.includes('/node_modules/')
380388
let isWrapped = !!(rawParsed && rawParsed.$schema)
381389
let needsRewrite = false
382390

@@ -417,7 +425,9 @@ async function loadConfigWithExtends(configPath: string, workspaceRootDir: strin
417425
quotingType: '"',
418426
forceQuotes: false
419427
})
420-
await writeFile(absolutePath, wrapped)
428+
if (!isInsideNodeModules) {
429+
await writeFile(absolutePath, wrapped)
430+
}
421431
rawContent = wrapped
422432
needsRewrite = false
423433
}
@@ -439,7 +449,9 @@ async function loadConfigWithExtends(configPath: string, workspaceRootDir: strin
439449
quotingType: '"',
440450
forceQuotes: false
441451
})
442-
await writeFile(absolutePath, wrapped)
452+
if (!isInsideNodeModules) {
453+
await writeFile(absolutePath, wrapped)
454+
}
443455
needsRewrite = false
444456
isWrapped = true
445457
}
@@ -454,7 +466,9 @@ async function loadConfigWithExtends(configPath: string, workspaceRootDir: strin
454466
quotingType: '"',
455467
forceQuotes: false
456468
})
457-
await writeFile(absolutePath, rewritten)
469+
if (!isInsideNodeModules) {
470+
await writeFile(absolutePath, rewritten)
471+
}
458472
rawContent = rewritten
459473
}
460474

@@ -493,6 +507,13 @@ async function loadConfigWithExtends(configPath: string, workspaceRootDir: strin
493507
console.error(chalk.gray(' ' + yamlError.mark.snippet.split('\n').join('\n ')))
494508
}
495509
console.error('')
510+
console.error(chalk.red.bold(' === Raw content being parsed (start) ==='))
511+
const contentLines = configContent.split('\n')
512+
for (let i = 0; i < contentLines.length; i++) {
513+
console.error(chalk.gray(` ${String(i + 1).padStart(4)} | ${contentLines[i]}`))
514+
}
515+
console.error(chalk.red.bold(' === Raw content being parsed (end) ==='))
516+
console.error('')
496517
process.exit(1)
497518
}
498519

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "t44",
3-
"version": "0.4.0-rc.19",
3+
"version": "0.4.0-rc.20",
44
"license": "LGPL",
55
"repository": {
66
"type": "git",

workspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
$schema: ../../../../../../.~o/workspace.foundation/@t44.sh~t44~caps~JsonSchemas/@t44.sh~t44~structs~WorkspaceConfigFile.json
1+
$schema: ../../../.~o/workspace.foundation/@t44.sh~t44~caps~JsonSchemas/@t44.sh~t44~structs~WorkspaceConfigFile.json
22
extends:
33
- ./caps/WorkspaceConfig.yaml

0 commit comments

Comments
 (0)