Move primitives and runtime out of src/common/
Relocate src/common/primitives and src/common/runtime to src/primitives and src/runtime. Add src/tsconfig.json as the primitives+runtime solution. Update tsconfigs, esbuild, webpack aliases, publish path, and docs. Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
This commit is contained in:
co-authored by
Daniel Imms
parent
c569e5ab19
commit
f22ef02831
@@ -3,8 +3,8 @@
|
|||||||
## Architecture Overview
|
## Architecture Overview
|
||||||
|
|
||||||
**Core Structure**: xterm.js is a multi-target terminal emulator with these main source areas:
|
**Core Structure**: xterm.js is a multi-target terminal emulator with these main source areas:
|
||||||
- `src/common/primitives/`: Building blocks (buffer, parser, input, data, utilities); TypeScript project `src/common/primitives/tsconfig.json`
|
- `src/primitives/`: Building blocks (buffer, parser, input, data, utilities); TypeScript project `src/primitives/tsconfig.json`
|
||||||
- `src/common/runtime/`: Services, `CoreTerminal`, `InputHandler`, public API adapters; TypeScript project `src/common/runtime/tsconfig.json`
|
- `src/runtime/`: Services, `CoreTerminal`, `InputHandler`, public API adapters; TypeScript project `src/runtime/tsconfig.json`
|
||||||
- `src/target-browser/`: Browser terminal with DOM rendering
|
- `src/target-browser/`: Browser terminal with DOM rendering
|
||||||
- `src/target-headless/`: Node terminal without DOM
|
- `src/target-headless/`: Node terminal without DOM
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,8 @@
|
|||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": [
|
"target-browser/*": [
|
||||||
"../../../src/target-browser/*"
|
"../../../src/target-browser/*"
|
||||||
@@ -33,7 +32,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../../../src/target-browser"
|
"path": "../../../src/target-browser"
|
||||||
|
|||||||
@@ -11,9 +11,8 @@
|
|||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": [
|
"target-browser/*": [
|
||||||
"../../../src/target-browser/*"
|
"../../../src/target-browser/*"
|
||||||
@@ -33,7 +32,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../../../src/target-browser"
|
"path": "../../../src/target-browser"
|
||||||
|
|||||||
@@ -11,9 +11,8 @@
|
|||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": [
|
"target-browser/*": [
|
||||||
"../../../src/target-browser/*"
|
"../../../src/target-browser/*"
|
||||||
@@ -33,7 +32,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../../../src/target-browser"
|
"path": "../../../src/target-browser"
|
||||||
|
|||||||
@@ -14,9 +14,8 @@
|
|||||||
"paths": {
|
"paths": {
|
||||||
"target-browser/*": [ "../../../src/target-browser/*" ],
|
"target-browser/*": [ "../../../src/target-browser/*" ],
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"@xterm/addon-image": [ "../typings/addon-image.d.ts" ],
|
"@xterm/addon-image": [ "../typings/addon-image.d.ts" ],
|
||||||
"*": [ "./*" ]
|
"*": [ "./*" ]
|
||||||
@@ -28,6 +27,6 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "../../../src/target-browser" },
|
{ "path": "../../../src/target-browser" },
|
||||||
{ "path": "../../../src/common" }
|
{ "path": "../../../src" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,8 @@
|
|||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": [
|
"target-browser/*": [
|
||||||
"../../../src/target-browser/*"
|
"../../../src/target-browser/*"
|
||||||
@@ -33,7 +32,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../../../src/target-browser"
|
"path": "../../../src/target-browser"
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ const addon = {
|
|||||||
modules: ['./node_modules'],
|
modules: ['./node_modules'],
|
||||||
extensions: [ '.js' ],
|
extensions: [ '.js' ],
|
||||||
alias: {
|
alias: {
|
||||||
common: path.resolve('../../out/common'),
|
common: [
|
||||||
|
path.resolve('../../out/runtime'),
|
||||||
|
path.resolve('../../out/primitives'),
|
||||||
|
],
|
||||||
browser: path.resolve('../../out/target-browser'),
|
browser: path.resolve('../../out/target-browser'),
|
||||||
vs: path.resolve('../../out/vs')
|
vs: path.resolve('../../out/vs')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,9 +16,8 @@
|
|||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": [
|
"target-browser/*": [
|
||||||
"../../../src/target-browser/*"
|
"../../../src/target-browser/*"
|
||||||
@@ -37,7 +36,7 @@
|
|||||||
"path": "../../../src/target-browser"
|
"path": "../../../src/target-browser"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,8 @@
|
|||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": [
|
"target-browser/*": [
|
||||||
"../../../src/target-browser/*"
|
"../../../src/target-browser/*"
|
||||||
@@ -33,7 +32,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../../../src/target-browser"
|
"path": "../../../src/target-browser"
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ module.exports = {
|
|||||||
modules: ['./node_modules'],
|
modules: ['./node_modules'],
|
||||||
extensions: [ '.js' ],
|
extensions: [ '.js' ],
|
||||||
alias: {
|
alias: {
|
||||||
common: path.resolve('../../out/common'),
|
common: [
|
||||||
|
path.resolve('../../out/runtime'),
|
||||||
|
path.resolve('../../out/primitives'),
|
||||||
|
],
|
||||||
browser: path.resolve('../../out/target-browser'),
|
browser: path.resolve('../../out/target-browser'),
|
||||||
vs: path.resolve('../../out/vs')
|
vs: path.resolve('../../out/vs')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,9 +16,8 @@
|
|||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": [
|
"target-browser/*": [
|
||||||
"../../../src/target-browser/*"
|
"../../../src/target-browser/*"
|
||||||
@@ -34,7 +33,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../../../src/target-browser"
|
"path": "../../../src/target-browser"
|
||||||
|
|||||||
@@ -11,9 +11,8 @@
|
|||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": [
|
"target-browser/*": [
|
||||||
"../../../src/target-browser/*"
|
"../../../src/target-browser/*"
|
||||||
@@ -33,7 +32,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../../../src/target-browser"
|
"path": "../../../src/target-browser"
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ module.exports = {
|
|||||||
modules: ['./node_modules'],
|
modules: ['./node_modules'],
|
||||||
extensions: [ '.js' ],
|
extensions: [ '.js' ],
|
||||||
alias: {
|
alias: {
|
||||||
common: path.resolve('../../out/common'),
|
common: [
|
||||||
|
path.resolve('../../out/runtime'),
|
||||||
|
path.resolve('../../out/primitives'),
|
||||||
|
],
|
||||||
vs: path.resolve('../../out/vs')
|
vs: path.resolve('../../out/vs')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -13,9 +13,8 @@
|
|||||||
"module": "nodenext",
|
"module": "nodenext",
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": ["../../../src/target-browser/*"],
|
"target-browser/*": ["../../../src/target-browser/*"],
|
||||||
"SerializeAddon": ["../src/SerializeAddon"],
|
"SerializeAddon": ["../src/SerializeAddon"],
|
||||||
@@ -27,7 +26,7 @@
|
|||||||
"include": ["../**/*", "../../../typings/xterm.d.ts"],
|
"include": ["../**/*", "../../../typings/xterm.d.ts"],
|
||||||
"exclude": ["../../../**/*test.ts", "../../**/*api.ts"],
|
"exclude": ["../../../**/*test.ts", "../../**/*api.ts"],
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "../../../src/common" },
|
{ "path": "../../../src" },
|
||||||
{ "path": "../../../src/target-browser" }
|
{ "path": "../../../src/target-browser" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,9 +12,8 @@
|
|||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": [
|
"target-browser/*": [
|
||||||
"../../../src/target-browser/*"
|
"../../../src/target-browser/*"
|
||||||
@@ -35,7 +34,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../../../src/target-browser"
|
"path": "../../../src/target-browser"
|
||||||
|
|||||||
@@ -11,9 +11,8 @@
|
|||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": [
|
"target-browser/*": [
|
||||||
"../../../src/target-browser/*"
|
"../../../src/target-browser/*"
|
||||||
@@ -30,7 +29,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../../../src/target-browser"
|
"path": "../../../src/target-browser"
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ module.exports = {
|
|||||||
modules: ['./node_modules'],
|
modules: ['./node_modules'],
|
||||||
extensions: [ '.js' ],
|
extensions: [ '.js' ],
|
||||||
alias: {
|
alias: {
|
||||||
common: path.resolve('../../out/common'),
|
common: [
|
||||||
|
path.resolve('../../out/runtime'),
|
||||||
|
path.resolve('../../out/primitives'),
|
||||||
|
],
|
||||||
browser: path.resolve('../../out/target-browser')
|
browser: path.resolve('../../out/target-browser')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,9 +10,8 @@
|
|||||||
"module": "nodenext",
|
"module": "nodenext",
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": ["../../../src/target-browser/*"],
|
"target-browser/*": ["../../../src/target-browser/*"],
|
||||||
"UnicodeGraphemeProvider": ["../src/UnicodeGraphemeProvider"],
|
"UnicodeGraphemeProvider": ["../src/UnicodeGraphemeProvider"],
|
||||||
@@ -24,7 +23,7 @@
|
|||||||
"include": ["../**/*", "../../../typings/xterm.d.ts"],
|
"include": ["../**/*", "../../../typings/xterm.d.ts"],
|
||||||
"exclude": ["../../../**/*test.ts", "../../**/*api.ts"],
|
"exclude": ["../../../**/*test.ts", "../../**/*api.ts"],
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "../../../src/common" },
|
{ "path": "../../../src" },
|
||||||
{ "path": "../../../src/target-browser" }
|
{ "path": "../../../src/target-browser" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,8 @@
|
|||||||
"strict": true,
|
"strict": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"@xterm/addon-unicode-graphemes": [
|
"@xterm/addon-unicode-graphemes": [
|
||||||
"../typings/addon-unicode-graphemes.d.ts"
|
"../typings/addon-unicode-graphemes.d.ts"
|
||||||
@@ -31,7 +30,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,8 @@
|
|||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": [
|
"target-browser/*": [
|
||||||
"../../../src/target-browser/*"
|
"../../../src/target-browser/*"
|
||||||
@@ -30,7 +29,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../../../src/target-browser"
|
"path": "../../../src/target-browser"
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ module.exports = {
|
|||||||
modules: ['./node_modules'],
|
modules: ['./node_modules'],
|
||||||
extensions: [ '.js' ],
|
extensions: [ '.js' ],
|
||||||
alias: {
|
alias: {
|
||||||
common: path.resolve('../../out/common'),
|
common: [
|
||||||
|
path.resolve('../../out/runtime'),
|
||||||
|
path.resolve('../../out/primitives'),
|
||||||
|
],
|
||||||
vs: path.resolve('../../out/vs')
|
vs: path.resolve('../../out/vs')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -13,9 +13,8 @@
|
|||||||
"strict": true,
|
"strict": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"@xterm/addon-unicode11": [
|
"@xterm/addon-unicode11": [
|
||||||
"../typings/addon-unicode11.d.ts"
|
"../typings/addon-unicode11.d.ts"
|
||||||
@@ -34,7 +33,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,8 @@
|
|||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": [
|
"target-browser/*": [
|
||||||
"../../../src/target-browser/*"
|
"../../../src/target-browser/*"
|
||||||
@@ -33,7 +32,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../../../src/target-browser"
|
"path": "../../../src/target-browser"
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ module.exports = {
|
|||||||
modules: ['./node_modules'],
|
modules: ['./node_modules'],
|
||||||
extensions: [ '.js' ],
|
extensions: [ '.js' ],
|
||||||
alias: {
|
alias: {
|
||||||
common: path.resolve('../../out/common'),
|
common: [
|
||||||
|
path.resolve('../../out/runtime'),
|
||||||
|
path.resolve('../../out/primitives'),
|
||||||
|
],
|
||||||
vs: path.resolve('../../out/vs')
|
vs: path.resolve('../../out/vs')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,9 +11,8 @@
|
|||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": [
|
"target-browser/*": [
|
||||||
"../../../src/target-browser/*"
|
"../../../src/target-browser/*"
|
||||||
@@ -33,7 +32,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../../../src/target-browser"
|
"path": "../../../src/target-browser"
|
||||||
|
|||||||
@@ -11,9 +11,8 @@
|
|||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": [
|
"target-browser/*": [
|
||||||
"../../../src/target-browser/*"
|
"../../../src/target-browser/*"
|
||||||
@@ -33,7 +32,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../../../src/target-browser"
|
"path": "../../../src/target-browser"
|
||||||
|
|||||||
@@ -12,9 +12,8 @@
|
|||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": [
|
"target-browser/*": [
|
||||||
"../../../src/target-browser/*"
|
"../../../src/target-browser/*"
|
||||||
@@ -38,7 +37,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../../../src/target-browser"
|
"path": "../../../src/target-browser"
|
||||||
|
|||||||
@@ -11,9 +11,8 @@
|
|||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"common/*": [
|
"common/*": [
|
||||||
"../../../src/common/primitives/*",
|
"../../../src/primitives/*",
|
||||||
"../../../src/common/runtime/*",
|
"../../../src/runtime/*",
|
||||||
"../../../src/common/*"
|
|
||||||
],
|
],
|
||||||
"target-browser/*": [
|
"target-browser/*": [
|
||||||
"../../../src/target-browser/*"
|
"../../../src/target-browser/*"
|
||||||
@@ -34,7 +33,7 @@
|
|||||||
],
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../../../src/common"
|
"path": "../../../src"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "../../../src/target-browser"
|
"path": "../../../src/target-browser"
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ module.exports = {
|
|||||||
modules: ['./node_modules'],
|
modules: ['./node_modules'],
|
||||||
extensions: [ '.js' ],
|
extensions: [ '.js' ],
|
||||||
alias: {
|
alias: {
|
||||||
common: path.resolve('../../out/common'),
|
common: [
|
||||||
|
path.resolve('../../out/runtime'),
|
||||||
|
path.resolve('../../out/primitives'),
|
||||||
|
],
|
||||||
browser: path.resolve('../../out/target-browser'),
|
browser: path.resolve('../../out/target-browser'),
|
||||||
vs: path.resolve('../../out/vs')
|
vs: path.resolve('../../out/vs')
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -192,14 +192,14 @@ if (config.addon) {
|
|||||||
outBuilds = [
|
outBuilds = [
|
||||||
{
|
{
|
||||||
...outConfig,
|
...outConfig,
|
||||||
entryPoints: ['src/common/primitives/**/*.ts'],
|
entryPoints: ['src/primitives/**/*.ts'],
|
||||||
outbase: 'src/common/primitives',
|
outbase: 'src/primitives',
|
||||||
outdir: 'out-esbuild/common',
|
outdir: 'out-esbuild/common',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...outConfig,
|
...outConfig,
|
||||||
entryPoints: ['src/common/runtime/**/*.ts'],
|
entryPoints: ['src/runtime/**/*.ts'],
|
||||||
outbase: 'src/common/runtime',
|
outbase: 'src/runtime',
|
||||||
outdir: 'out-esbuild/common',
|
outdir: 'out-esbuild/common',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -81,7 +81,7 @@ function checkAndPublishPackage(packageDir, repoCommit, peerDependencies, update
|
|||||||
|
|
||||||
// Update Version.ts with the new version
|
// Update Version.ts with the new version
|
||||||
if (updateVersionTs) {
|
if (updateVersionTs) {
|
||||||
const versionTsPath = path.join(packageDir, 'src/common/primitives/Version.ts');
|
const versionTsPath = path.join(packageDir, 'src/primitives/Version.ts');
|
||||||
const versionTsContent = fs.readFileSync(versionTsPath, 'utf8');
|
const versionTsContent = fs.readFileSync(versionTsPath, 'utf8');
|
||||||
const updatedVersionTs = versionTsContent.replace(
|
const updatedVersionTs = versionTsContent.replace(
|
||||||
/export const XTERM_VERSION = '[^']+';/,
|
/export const XTERM_VERSION = '[^']+';/,
|
||||||
|
|||||||
+12
-12
@@ -6,8 +6,8 @@ This document describes how `src/` is organized. The layout follows [issue #5963
|
|||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
flowchart BT
|
flowchart BT
|
||||||
primitives["common/primitives<br/>building blocks"]
|
primitives["primitives<br/>building blocks"]
|
||||||
runtime["common/runtime<br/>services, integration"]
|
runtime["runtime<br/>services, integration"]
|
||||||
targetBrowser["target-browser<br/>DOM terminal"]
|
targetBrowser["target-browser<br/>DOM terminal"]
|
||||||
targetHeadless["target-headless<br/>Node terminal"]
|
targetHeadless["target-headless<br/>Node terminal"]
|
||||||
|
|
||||||
@@ -20,15 +20,15 @@ flowchart BT
|
|||||||
|
|
||||||
| Project | `tsconfig` | Output | Role |
|
| Project | `tsconfig` | Output | Role |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| Primitives | `src/common/primitives/tsconfig.json` | `out/common/primitives/` | Buffer, parser, input helpers, static data, shared utilities. Must not import from `runtime/`. |
|
| Primitives | `src/primitives/tsconfig.json` | `out/primitives/` | Buffer, parser, input helpers, static data, shared utilities. Must not import from `runtime/`. |
|
||||||
| Runtime | `src/common/runtime/tsconfig.json` | `out/common/runtime/` | Services (DI), `CoreTerminal`, `InputHandler`, public API adapters, `Types.ts`. References primitives. |
|
| Runtime | `src/runtime/tsconfig.json` | `out/runtime/` | Services (DI), `CoreTerminal`, `InputHandler`, public API adapters, `Types.ts`. References primitives. |
|
||||||
| Common (solution) | `src/common/tsconfig.json` | — | Solution root; references primitives + runtime only. |
|
| Source (solution) | `src/tsconfig.json` | — | Solution root; references primitives + runtime only. |
|
||||||
| Target browser | `src/target-browser/tsconfig.json` | `out/target-browser/` | Browser rendering, input, public `Terminal`. References common. |
|
| Target browser | `src/target-browser/tsconfig.json` | `out/target-browser/` | Browser rendering, input, public `Terminal`. References `src/`. |
|
||||||
| Target headless | `src/target-headless/tsconfig.json` | `out/target-headless/` | Headless terminal. References common. |
|
| Target headless | `src/target-headless/tsconfig.json` | `out/target-headless/` | Headless terminal. References `src/`. |
|
||||||
|
|
||||||
Unit test files (`**/*.test.ts`) are excluded from composite library builds; they are compiled via esbuild for `npm run test-unit`.
|
Unit test files (`**/*.test.ts`) are excluded from composite library builds; they are compiled via esbuild for `npm run test-unit`.
|
||||||
|
|
||||||
## `common/primitives/`
|
## `primitives/`
|
||||||
|
|
||||||
| Area | Contents |
|
| Area | Contents |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
@@ -40,7 +40,7 @@ Unit test files (`**/*.test.ts`) are excluded from composite library builds; the
|
|||||||
|
|
||||||
Primitives depend only on other primitives (and `@xterm/xterm` typings where needed). Buffer code uses `IBufferService` from `common/buffer/BufferService`, not `common/services/Services`.
|
Primitives depend only on other primitives (and `@xterm/xterm` typings where needed). Buffer code uses `IBufferService` from `common/buffer/BufferService`, not `common/services/Services`.
|
||||||
|
|
||||||
## `common/runtime/`
|
## `runtime/`
|
||||||
|
|
||||||
| Area | Contents |
|
| Area | Contents |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
@@ -52,12 +52,12 @@ Primitives depend only on other primitives (and `@xterm/xterm` typings where nee
|
|||||||
|
|
||||||
## Import paths
|
## Import paths
|
||||||
|
|
||||||
Source keeps the `common/...` prefix. Each project's `paths` in `tsconfig.json` map that prefix to the correct layer (primitives first, then runtime, for targets).
|
Source keeps the `common/...` prefix (logical module name, not a physical `common/` folder). Each project's `paths` in `tsconfig.json` map that prefix to `primitives/` and/or `runtime/`.
|
||||||
|
|
||||||
Platform code uses:
|
Platform code uses:
|
||||||
|
|
||||||
- `target-browser/...` — was `browser/...`
|
- `target-browser/...` — browser terminal
|
||||||
- `target-headless/...` — was `headless/...`
|
- `target-headless/...` — Node terminal
|
||||||
|
|
||||||
## Published packages vs source folders
|
## Published packages vs source folders
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user