├── .editorconfig
├── .gitignore
├── .vsts-ci.yml
├── .vsys-release.yml
├── Directory.Build.props
├── Directory.Build.targets
├── LICENSE
├── README.md
├── XTerm.sln
├── src
├── Blazor.Extensions.XTerm.JS
│ ├── Blazor.Extensions.XTerm.JS.csproj
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── InitializeXTerm.ts
│ │ └── TerminalManager.ts
│ ├── tsconfig.json
│ ├── tsfmt.json
│ ├── tslint.json
│ └── webpack.config.js
├── Blazor.Extensions.XTerm
│ ├── Blazor.Extensions.XTerm.csproj
│ ├── TerminalManager.cs
│ ├── TerminalOptions.cs
│ ├── XTerm.razor
│ └── XTermComponent.cs
├── Directory.Build.props
└── Directory.Build.targets
└── test
├── Blazor.Extensions.XTerm.Tests
├── App.razor
├── Blazor.Extensions.XTerm.Tests.csproj
├── Pages
│ └── Index.razor
├── Program.cs
├── Shared
│ ├── MainLayout.razor
│ └── NavMenu.razor
├── Startup.cs
├── _Imports.razor
└── wwwroot
│ ├── css
│ ├── bootstrap
│ │ ├── bootstrap.min.css
│ │ └── bootstrap.min.css.map
│ ├── open-iconic
│ │ ├── FONT-LICENSE
│ │ ├── ICON-LICENSE
│ │ ├── README.md
│ │ └── font
│ │ │ ├── css
│ │ │ └── open-iconic-bootstrap.min.css
│ │ │ └── fonts
│ │ │ ├── open-iconic.eot
│ │ │ ├── open-iconic.otf
│ │ │ ├── open-iconic.svg
│ │ │ ├── open-iconic.ttf
│ │ │ └── open-iconic.woff
│ └── site.css
│ ├── index.html
│ └── sample-data
│ └── weather.json
└── Directory.Build.props
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://EditorConfig.org
2 |
3 | # This file is the top-most EditorConfig file
4 | root = true
5 |
6 | # All Files
7 | [*]
8 | charset = utf-8
9 | end_of_line = crlf
10 | indent_style = space
11 | indent_size = 4
12 | insert_final_newline = false
13 | trim_trailing_whitespace = true
14 |
15 | # Solution Files
16 | [*.sln]
17 | indent_style = tab
18 |
19 | # XML Project Files
20 | [*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
21 | indent_size = 2
22 |
23 | # Configuration Files
24 | [*.{json,xml,yml,config,props,targets,nuspec,resx,ruleset,vsixmanifest,vsct}]
25 | indent_size = 2
26 |
27 | # Markdown Files
28 | [*.md]
29 | trim_trailing_whitespace = false
30 |
31 | # Web Files
32 | [*.{htm,html,js,ts,css,scss,less}]
33 | indent_size = 2
34 | insert_final_newline = true
35 |
36 | # Bash Files
37 | [*.sh]
38 | end_of_line = lf
39 |
40 | # Dotnet Code Style Settings
41 | # See https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
42 | # See http://kent-boogaart.com/blog/editorconfig-reference-for-c-developers
43 | [*.{cs,csx,cake,vb}]
44 | dotnet_sort_system_directives_first = true:warning
45 | dotnet_style_coalesce_expression = true:warning
46 | dotnet_style_collection_initializer = true:warning
47 | dotnet_style_explicit_tuple_names = true:warning
48 | dotnet_style_null_propagation = true:warning
49 | dotnet_style_object_initializer = true:warning
50 | dotnet_style_predefined_type_for_locals_parameters_members = true:warning
51 | dotnet_style_predefined_type_for_member_access = true:warning
52 | dotnet_style_qualification_for_event = true:warning
53 | dotnet_style_qualification_for_field = true:warning
54 | dotnet_style_qualification_for_method = true:warning
55 | dotnet_style_qualification_for_property = true:warning
56 |
57 | # Naming Symbols
58 | # constant_fields - Define constant fields
59 | dotnet_naming_symbols.constant_fields.applicable_kinds = field
60 | dotnet_naming_symbols.constant_fields.required_modifiers = const
61 | # non_private_readonly_fields - Define public, internal and protected readonly fields
62 | dotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities = public, internal, protected
63 | dotnet_naming_symbols.non_private_readonly_fields.applicable_kinds = field
64 | dotnet_naming_symbols.non_private_readonly_fields.required_modifiers = readonly
65 | # static_readonly_fields - Define static and readonly fields
66 | dotnet_naming_symbols.static_readonly_fields.applicable_kinds = field
67 | dotnet_naming_symbols.static_readonly_fields.required_modifiers = static, readonly
68 | # private_readonly_fields - Define private readonly fields
69 | dotnet_naming_symbols.private_readonly_fields.applicable_accessibilities = private
70 | dotnet_naming_symbols.private_readonly_fields.applicable_kinds = field
71 | dotnet_naming_symbols.private_readonly_fields.required_modifiers = readonly
72 | # public_internal_fields - Define public and internal fields
73 | dotnet_naming_symbols.public_internal_fields.applicable_accessibilities = public, internal
74 | dotnet_naming_symbols.public_internal_fields.applicable_kinds = field
75 | # private_protected_fields - Define private and protected fields
76 | dotnet_naming_symbols.private_protected_fields.applicable_accessibilities = private, protected
77 | dotnet_naming_symbols.private_protected_fields.applicable_kinds = field
78 | # public_symbols - Define any public symbol
79 | dotnet_naming_symbols.public_symbols.applicable_accessibilities = public, internal, protected, protected_internal
80 | dotnet_naming_symbols.public_symbols.applicable_kinds = method, property, event, delegate
81 | # parameters - Defines any parameter
82 | dotnet_naming_symbols.parameters.applicable_kinds = parameter
83 | # non_interface_types - Defines class, struct, enum and delegate types
84 | dotnet_naming_symbols.non_interface_types.applicable_kinds = class, struct, enum, delegate
85 | # interface_types - Defines interfaces
86 | dotnet_naming_symbols.interface_types.applicable_kinds = interface
87 |
88 | # Naming Styles
89 | # camel_case - Define the camelCase style
90 | dotnet_naming_style.camel_case.capitalization = camel_case
91 | # pascal_case - Define the Pascal_case style
92 | dotnet_naming_style.pascal_case.capitalization = pascal_case
93 | # first_upper - The first character must start with an upper-case character
94 | dotnet_naming_style.first_upper.capitalization = first_word_upper
95 | # prefix_interface_interface_with_i - Interfaces must be PascalCase and the first character of an interface must be an 'I'
96 | dotnet_naming_style.prefix_interface_interface_with_i.capitalization = pascal_case
97 | dotnet_naming_style.prefix_interface_interface_with_i.required_prefix = I
98 |
99 | # Naming Rules
100 | # Constant fields must be PascalCase
101 | dotnet_naming_rule.constant_fields_must_be_pascal_case.severity = warning
102 | dotnet_naming_rule.constant_fields_must_be_pascal_case.symbols = constant_fields
103 | dotnet_naming_rule.constant_fields_must_be_pascal_case.style = pascal_case
104 | # Public, internal and protected readonly fields must be PascalCase
105 | dotnet_naming_rule.non_private_readonly_fields_must_be_pascal_case.severity = warning
106 | dotnet_naming_rule.non_private_readonly_fields_must_be_pascal_case.symbols = non_private_readonly_fields
107 | dotnet_naming_rule.non_private_readonly_fields_must_be_pascal_case.style = pascal_case
108 | # Static readonly fields must be PascalCase
109 | dotnet_naming_rule.static_readonly_fields_must_be_pascal_case.severity = warning
110 | dotnet_naming_rule.static_readonly_fields_must_be_pascal_case.symbols = static_readonly_fields
111 | dotnet_naming_rule.static_readonly_fields_must_be_pascal_case.style = pascal_case
112 | # Private readonly fields must be camelCase
113 | dotnet_naming_rule.private_readonly_fields_must_be_camel_case.severity = warning
114 | dotnet_naming_rule.private_readonly_fields_must_be_camel_case.symbols = private_readonly_fields
115 | dotnet_naming_rule.private_readonly_fields_must_be_camel_case.style = camel_case
116 | # Public and internal fields must be PascalCase
117 | dotnet_naming_rule.public_internal_fields_must_be_pascal_case.severity = warning
118 | dotnet_naming_rule.public_internal_fields_must_be_pascal_case.symbols = public_internal_fields
119 | dotnet_naming_rule.public_internal_fields_must_be_pascal_case.style = pascal_case
120 | # Private and protected fields must be camelCase
121 | dotnet_naming_rule.private_protected_fields_must_be_camel_case.severity = warning
122 | dotnet_naming_rule.private_protected_fields_must_be_camel_case.symbols = private_protected_fields
123 | dotnet_naming_rule.private_protected_fields_must_be_camel_case.style = camel_case
124 | # Public members must be capitalized
125 | dotnet_naming_rule.public_members_must_be_capitalized.severity = warning
126 | dotnet_naming_rule.public_members_must_be_capitalized.symbols = public_symbols
127 | dotnet_naming_rule.public_members_must_be_capitalized.style = first_upper
128 | # Parameters must be camelCase
129 | dotnet_naming_rule.parameters_must_be_camel_case.severity = warning
130 | dotnet_naming_rule.parameters_must_be_camel_case.symbols = parameters
131 | dotnet_naming_rule.parameters_must_be_camel_case.style = camel_case
132 | # Class, struct, enum and delegates must be PascalCase
133 | dotnet_naming_rule.non_interface_types_must_be_pascal_case.severity = warning
134 | dotnet_naming_rule.non_interface_types_must_be_pascal_case.symbols = non_interface_types
135 | dotnet_naming_rule.non_interface_types_must_be_pascal_case.style = pascal_case
136 | # Interfaces must be PascalCase and start with an 'I'
137 | dotnet_naming_rule.interface_types_must_be_prefixed_with_i.severity = warning
138 | dotnet_naming_rule.interface_types_must_be_prefixed_with_i.symbols = interface_types
139 | dotnet_naming_rule.interface_types_must_be_prefixed_with_i.style = prefix_interface_interface_with_i
140 |
141 | # C# Code Style Settings
142 | # See https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
143 | # See http://kent-boogaart.com/blog/editorconfig-reference-for-c-developers
144 | [*.cs,csx,cake]
145 | # Indentation Options
146 | csharp_indent_block_contents = true:warning
147 | csharp_indent_braces = false:warning
148 | csharp_indent_case_contents = true:warning
149 | csharp_indent_labels = no_change:warning
150 | csharp_indent_switch_labels = true:warning
151 | # Style Options
152 | csharp_style_conditional_delegate_call = true:warning
153 | csharp_style_expression_bodied_accessors = true:warning
154 | csharp_style_expression_bodied_constructors = true:warning
155 | csharp_style_expression_bodied_indexers = true:warning
156 | csharp_style_expression_bodied_methods = true:warning
157 | csharp_style_expression_bodied_operators = true:warning
158 | csharp_style_expression_bodied_properties = true:warning
159 | csharp_style_inlined_variable_declaration = true:warning
160 | csharp_style_pattern_matching_over_as_with_null_check = true:warning
161 | csharp_style_pattern_matching_over_is_with_cast_check = true:warning
162 | csharp_style_throw_expression = true:warning
163 | csharp_style_var_elsewhere = true:warning
164 | csharp_style_var_for_built_in_types = true:warning
165 | csharp_style_var_when_type_is_apparent = true:warning
166 | # New Line Options
167 | csharp_new_line_before_catch = true:warning
168 | csharp_new_line_before_else = true:warning
169 | csharp_new_line_before_finally = true:warning
170 | csharp_new_line_before_members_in_anonymous_types = true:warning
171 | csharp_new_line_before_members_in_object_initializers = true:warning
172 | # BUG: Warning level cannot be set https://github.com/dotnet/roslyn/issues/18010
173 | csharp_new_line_before_open_brace = all
174 | csharp_new_line_between_query_expression_clauses = true:warning
175 | # Spacing Options
176 | csharp_space_after_cast = false:warning
177 | csharp_space_after_colon_in_inheritance_clause = true:warning
178 | csharp_space_after_comma = true:warning
179 | csharp_space_after_dot = false:warning
180 | csharp_space_after_keywords_in_control_flow_statements = true:warning
181 | csharp_space_after_semicolon_in_for_statement = true:warning
182 | csharp_space_around_binary_operators = before_and_after:warning
183 | csharp_space_around_declaration_statements = do_not_ignore:warning
184 | csharp_space_before_colon_in_inheritance_clause = true:warning
185 | csharp_space_before_comma = false:warning
186 | csharp_space_before_dot = false:warning
187 | csharp_space_before_semicolon_in_for_statement = false:warning
188 | csharp_space_before_open_square_brackets = false:warning
189 | csharp_space_between_empty_square_brackets = false:warning
190 | csharp_space_between_method_declaration_name_and_open_parenthesis = false:warning
191 | csharp_space_between_method_declaration_parameter_list_parentheses = false:warning
192 | csharp_space_between_method_declaration_empty_parameter_list_parentheses = false:warning
193 | csharp_space_between_method_call_name_and_opening_parenthesis = false:warning
194 | csharp_space_between_method_call_parameter_list_parentheses = false:warning
195 | csharp_space_between_method_call_empty_parameter_list_parentheses = false:warning
196 | csharp_space_between_parentheses = expressions:warning
197 | csharp_space_between_square_brackets = false:warning
198 | # Wrapping Options
199 | csharp_preserve_single_line_blocks = true:warning
200 | csharp_preserve_single_line_statements = false:warning
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.suo
8 | *.user
9 | *.userosscache
10 | *.sln.docstates
11 |
12 | # User-specific files (MonoDevelop/Xamarin Studio)
13 | *.userprefs
14 |
15 | # Build results
16 | [Dd]ebug/
17 | [Dd]ebugPublic/
18 | [Rr]elease/
19 | [Rr]eleases/
20 | x64/
21 | x86/
22 | bld/
23 | [Bb]in/
24 | [Oo]bj/
25 | [Ll]og/
26 |
27 | # Visual Studio 2015/2017 cache/options directory
28 | .vs/
29 | # Uncomment if you have tasks that create the project's static files in wwwroot
30 | #wwwroot/
31 |
32 | # Visual Studio 2017 auto generated files
33 | Generated\ Files/
34 |
35 | # MSTest test Results
36 | [Tt]est[Rr]esult*/
37 | [Bb]uild[Ll]og.*
38 |
39 | # NUNIT
40 | *.VisualState.xml
41 | TestResult.xml
42 |
43 | # Build Results of an ATL Project
44 | [Dd]ebugPS/
45 | [Rr]eleasePS/
46 | dlldata.c
47 |
48 | # Benchmark Results
49 | BenchmarkDotNet.Artifacts/
50 |
51 | # .NET Core
52 | project.lock.json
53 | project.fragment.lock.json
54 | artifacts/
55 | **/Properties/launchSettings.json
56 |
57 | # StyleCop
58 | StyleCopReport.xml
59 |
60 | # Files built by Visual Studio
61 | *_i.c
62 | *_p.c
63 | *_i.h
64 | *.ilk
65 | *.meta
66 | *.obj
67 | *.iobj
68 | *.pch
69 | *.pdb
70 | *.ipdb
71 | *.pgc
72 | *.pgd
73 | *.rsp
74 | *.sbr
75 | *.tlb
76 | *.tli
77 | *.tlh
78 | *.tmp
79 | *.tmp_proj
80 | *.log
81 | *.vspscc
82 | *.vssscc
83 | .builds
84 | *.pidb
85 | *.svclog
86 | *.scc
87 |
88 | # Chutzpah Test files
89 | _Chutzpah*
90 |
91 | # Visual C++ cache files
92 | ipch/
93 | *.aps
94 | *.ncb
95 | *.opendb
96 | *.opensdf
97 | *.sdf
98 | *.cachefile
99 | *.VC.db
100 | *.VC.VC.opendb
101 |
102 | # Visual Studio profiler
103 | *.psess
104 | *.vsp
105 | *.vspx
106 | *.sap
107 |
108 | # Visual Studio Trace Files
109 | *.e2e
110 |
111 | # TFS 2012 Local Workspace
112 | $tf/
113 |
114 | # Guidance Automation Toolkit
115 | *.gpState
116 |
117 | # ReSharper is a .NET coding add-in
118 | _ReSharper*/
119 | *.[Rr]e[Ss]harper
120 | *.DotSettings.user
121 |
122 | # JustCode is a .NET coding add-in
123 | .JustCode
124 |
125 | # TeamCity is a build add-in
126 | _TeamCity*
127 |
128 | # DotCover is a Code Coverage Tool
129 | *.dotCover
130 |
131 | # AxoCover is a Code Coverage Tool
132 | .axoCover/*
133 | !.axoCover/settings.json
134 |
135 | # Visual Studio code coverage results
136 | *.coverage
137 | *.coveragexml
138 |
139 | # NCrunch
140 | _NCrunch_*
141 | .*crunch*.local.xml
142 | nCrunchTemp_*
143 |
144 | # MightyMoose
145 | *.mm.*
146 | AutoTest.Net/
147 |
148 | # Web workbench (sass)
149 | .sass-cache/
150 |
151 | # Installshield output folder
152 | [Ee]xpress/
153 |
154 | # DocProject is a documentation generator add-in
155 | DocProject/buildhelp/
156 | DocProject/Help/*.HxT
157 | DocProject/Help/*.HxC
158 | DocProject/Help/*.hhc
159 | DocProject/Help/*.hhk
160 | DocProject/Help/*.hhp
161 | DocProject/Help/Html2
162 | DocProject/Help/html
163 |
164 | # Click-Once directory
165 | publish/
166 |
167 | # Publish Web Output
168 | *.[Pp]ublish.xml
169 | *.azurePubxml
170 | # Note: Comment the next line if you want to checkin your web deploy settings,
171 | # but database connection strings (with potential passwords) will be unencrypted
172 | *.pubxml
173 | *.publishproj
174 |
175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
176 | # checkin your Azure Web App publish settings, but sensitive information contained
177 | # in these scripts will be unencrypted
178 | PublishScripts/
179 |
180 | # NuGet Packages
181 | *.nupkg
182 | # The packages folder can be ignored because of Package Restore
183 | **/[Pp]ackages/*
184 | # except build/, which is used as an MSBuild target.
185 | !**/[Pp]ackages/build/
186 | # Uncomment if necessary however generally it will be regenerated when needed
187 | #!**/[Pp]ackages/repositories.config
188 | # NuGet v3's project.json files produces more ignorable files
189 | *.nuget.props
190 | *.nuget.targets
191 |
192 | # Microsoft Azure Build Output
193 | csx/
194 | *.build.csdef
195 |
196 | # Microsoft Azure Emulator
197 | ecf/
198 | rcf/
199 |
200 | # Windows Store app package directories and files
201 | AppPackages/
202 | BundleArtifacts/
203 | Package.StoreAssociation.xml
204 | _pkginfo.txt
205 | *.appx
206 |
207 | # Visual Studio cache files
208 | # files ending in .cache can be ignored
209 | *.[Cc]ache
210 | # but keep track of directories ending in .cache
211 | !*.[Cc]ache/
212 |
213 | # Others
214 | ClientBin/
215 | ~$*
216 | *~
217 | *.dbmdl
218 | *.dbproj.schemaview
219 | *.jfm
220 | *.pfx
221 | *.publishsettings
222 | orleans.codegen.cs
223 |
224 | # Including strong name files can present a security risk
225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
226 | #*.snk
227 |
228 | # Since there are multiple workflows, uncomment next line to ignore bower_components
229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
230 | #bower_components/
231 |
232 | # RIA/Silverlight projects
233 | Generated_Code/
234 |
235 | # Backup & report files from converting an old project file
236 | # to a newer Visual Studio version. Backup files are not needed,
237 | # because we have git ;-)
238 | _UpgradeReport_Files/
239 | Backup*/
240 | UpgradeLog*.XML
241 | UpgradeLog*.htm
242 | ServiceFabricBackup/
243 | *.rptproj.bak
244 |
245 | # SQL Server files
246 | *.mdf
247 | *.ldf
248 | *.ndf
249 |
250 | # Business Intelligence projects
251 | *.rdl.data
252 | *.bim.layout
253 | *.bim_*.settings
254 | *.rptproj.rsuser
255 |
256 | # Microsoft Fakes
257 | FakesAssemblies/
258 |
259 | # GhostDoc plugin setting file
260 | *.GhostDoc.xml
261 |
262 | # Node.js Tools for Visual Studio
263 | .ntvs_analysis.dat
264 | node_modules/
265 |
266 | # Visual Studio 6 build log
267 | *.plg
268 |
269 | # Visual Studio 6 workspace options file
270 | *.opt
271 |
272 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
273 | *.vbw
274 |
275 | # Visual Studio LightSwitch build output
276 | **/*.HTMLClient/GeneratedArtifacts
277 | **/*.DesktopClient/GeneratedArtifacts
278 | **/*.DesktopClient/ModelManifest.xml
279 | **/*.Server/GeneratedArtifacts
280 | **/*.Server/ModelManifest.xml
281 | _Pvt_Extensions
282 |
283 | # Paket dependency manager
284 | .paket/paket.exe
285 | paket-files/
286 |
287 | # FAKE - F# Make
288 | .fake/
289 |
290 | # JetBrains Rider
291 | .idea/
292 | *.sln.iml
293 |
294 | # CodeRush
295 | .cr/
296 |
297 | # Python Tools for Visual Studio (PTVS)
298 | __pycache__/
299 | *.pyc
300 |
301 | # Cake - Uncomment if you are using it
302 | # tools/**
303 | # !tools/packages.config
304 |
305 | # Tabs Studio
306 | *.tss
307 |
308 | # Telerik's JustMock configuration file
309 | *.jmconfig
310 |
311 | # BizTalk build output
312 | *.btp.cs
313 | *.btm.cs
314 | *.odx.cs
315 | *.xsd.cs
316 |
317 | # OpenCover UI analysis results
318 | OpenCover/
319 |
320 | # Azure Stream Analytics local run output
321 | ASALocalRun/
322 |
323 | # MSBuild Binary and Structured Log
324 | *.binlog
325 |
326 | # NVidia Nsight GPU debugger configuration file
327 | *.nvuser
328 |
329 | # MFractors (Xamarin productivity tool) working folder
330 | .mfractor/
331 | node_modules/
332 | .DS_Store
333 | dist/
--------------------------------------------------------------------------------
/.vsts-ci.yml:
--------------------------------------------------------------------------------
1 | queue: 'Hosted VS2017'
2 |
3 | variables:
4 | buildConfiguration: 'Release'
5 |
6 | steps:
7 | - task: DotNetCoreInstaller@0
8 | inputs:
9 | packageType: 'sdk'
10 | version: 3.0.100-preview7-012821
11 |
12 | - task: Npm@1
13 | displayName: 'Install NPM dependencies'
14 | inputs:
15 | command: 'install'
16 | workingDir: src/Blazor.Extensions.XTerm.JS
17 |
18 | - task: DotNetCoreCLI@2
19 | displayName: 'Build'
20 | inputs:
21 | command: 'build'
22 | projects: '**/*.csproj'
23 | arguments: '--configuration $(buildConfiguration)'
24 |
25 | - task: DotNetCoreCLI@2
26 | displayName: 'Pack Nuget package'
27 | inputs:
28 | command: pack
29 | packagesToPack: 'src/Blazor.Extensions.XTerm/*.csproj'
30 | configuration: '$(buildConfiguration)'
31 | versioningScheme: byPrereleaseNumber
32 | majorVersion: '0'
33 | minorVersion: '1'
34 | patchVersion: '0'
--------------------------------------------------------------------------------
/.vsys-release.yml:
--------------------------------------------------------------------------------
1 | queue: 'Hosted VS2017'
2 |
3 | variables:
4 | buildConfiguration: 'Release'
5 |
6 | steps:
7 | - task: DotNetCoreInstaller@0
8 | inputs:
9 | packageType: 'sdk'
10 | version: 3.0.100-preview7-012821
11 |
12 | - task: Npm@1
13 | displayName: 'Install NPM dependencies'
14 | inputs:
15 | command: 'install'
16 | workingDir: src/Blazor.Extensions.XTerm.JS
17 |
18 | - task: DotNetCoreCLI@2
19 | displayName: 'Build'
20 | inputs:
21 | command: 'build'
22 | projects: '**/*.csproj'
23 | arguments: '--configuration $(buildConfiguration)'
24 |
25 | - task: DotNetCoreCLI@2
26 | displayName: 'Pack Nuget package'
27 | inputs:
28 | command: pack
29 | packagesToPack: 'src/Blazor.Extensions.XTerm/*.csproj'
30 | packDirectory: '$(build.artifactStagingDirectory)'
31 | configuration: '$(buildConfiguration)'
32 | versioningScheme: byEnvVar
33 | versionEnvVar: Version
34 |
35 | - task: NuGetCommand@2
36 | displayName: 'Publish Nuget package'
37 | inputs:
38 | command: push
39 | packagesToPush: '$(build.ArtifactStagingDirectory)/**/*.nupkg;!$(build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
40 | publishFeedCredentials: 'BlazorExtensions'
41 | nuGetFeedType: external
42 | versioningScheme: byEnvVar
43 | versionEnvVar: Version
--------------------------------------------------------------------------------
/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Blazor Extensions Contributors
5 | Blazor Extensions
6 | (c) Blazor Extensions Contributors. All rights reserved.
7 | https://github.com/BlazorExtensions/XTerm#license
8 | https://github.com/BlazorExtensions/XTerm
9 | https://avatars2.githubusercontent.com/u/38994076?s%3D128%26v%3D4
10 | Microsoft ASP.NET Core Blazor Extensions XTerm
11 |
12 | https://github.com/BlazorExtensions/XTerm
13 | git
14 | true
15 |
16 |
17 |
18 |
19 | latest
20 | true
21 | true
22 |
23 | full
24 |
25 |
26 |
27 | netstandard2.0
28 | netstandard2.0
29 |
30 |
31 |
32 |
33 | 0.2.0
34 | dev
35 |
36 |
37 |
38 |
39 |
43 |
44 | <developer build>
45 |
46 |
47 |
48 |
49 | $(BUILD_SOURCEVERSION)
50 |
51 |
52 |
53 |
54 | $(GIT_COMMIT)
55 |
56 |
57 |
58 |
59 | Not found
60 | $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory).git'))
61 | $([System.IO.File]::ReadAllText('$(DotGitDir)/HEAD').Trim())
62 | $(DotGitDir)/$(HeadFileContent.Substring(5))
63 | $([System.IO.File]::ReadAllText('$(RefPath)').Trim())
64 | $(HeadFileContent)
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/Directory.Build.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(Version). Commit Hash: $(GitHeadSha)
5 |
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Blazor Extensions
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://dotnet-ci.visualstudio.com/DotnetCI/_build/latest?definitionId=22&branchName=master)
2 | [](https://www.nuget.org/packages/Blazor.Extensions.XTerm)
3 | [](https://www.nuget.org/packages/Blazor.Extensions.XTerm)
4 | [](https://github.com/BlazorExtensions/XTerm/blob/master/LICENSE)
5 |
6 |
7 | # Blazor Extensions
8 |
9 | Blazor Extensions are a set of packages with the goal of adding useful things to [Blazor](https://blazor.net).
10 |
11 | # Blazor Extensions XTerm
12 |
13 | This package is a basic wrapper around [XTerm.JS](https://github.com/xtermjs/xterm.js) for blazor.
14 |
15 | # Contributions and feedback
16 |
17 | Please feel free to use the component, open issues, fix bugs or provide feedback.
18 |
19 | # Contributors
20 |
21 | The following people are the maintainers of the Blazor Extensions projects:
22 |
23 | - [Attila Hajdrik](https://github.com/attilah)
24 | - [Gutemberg Ribiero](https://github.com/galvesribeiro)
--------------------------------------------------------------------------------
/XTerm.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26124.0
5 | MinimumVisualStudioVersion = 15.0.26124.0
6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F9937330-C0B9-40C1-939B-66606EA1DE45}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazor.Extensions.XTerm.JS", "src\Blazor.Extensions.XTerm.JS\Blazor.Extensions.XTerm.JS.csproj", "{C0CD44FB-9C60-4DBD-A1E8-9D21013E38C0}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazor.Extensions.XTerm", "src\Blazor.Extensions.XTerm\Blazor.Extensions.XTerm.csproj", "{294D6B97-FA6D-4127-B02A-3839E011267B}"
11 | EndProject
12 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{E1FD199C-08C2-49D0-A0B9-1120F989215F}"
13 | EndProject
14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazor.Extensions.XTerm.Tests", "test\Blazor.Extensions.XTerm.Tests\Blazor.Extensions.XTerm.Tests.csproj", "{2283C305-7604-4DCD-BDFD-1C3CCF2D6C31}"
15 | EndProject
16 | Global
17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
18 | Debug|Any CPU = Debug|Any CPU
19 | Debug|x64 = Debug|x64
20 | Debug|x86 = Debug|x86
21 | Release|Any CPU = Release|Any CPU
22 | Release|x64 = Release|x64
23 | Release|x86 = Release|x86
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
29 | {C0CD44FB-9C60-4DBD-A1E8-9D21013E38C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30 | {C0CD44FB-9C60-4DBD-A1E8-9D21013E38C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
31 | {C0CD44FB-9C60-4DBD-A1E8-9D21013E38C0}.Debug|x64.ActiveCfg = Debug|Any CPU
32 | {C0CD44FB-9C60-4DBD-A1E8-9D21013E38C0}.Debug|x64.Build.0 = Debug|Any CPU
33 | {C0CD44FB-9C60-4DBD-A1E8-9D21013E38C0}.Debug|x86.ActiveCfg = Debug|Any CPU
34 | {C0CD44FB-9C60-4DBD-A1E8-9D21013E38C0}.Debug|x86.Build.0 = Debug|Any CPU
35 | {C0CD44FB-9C60-4DBD-A1E8-9D21013E38C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
36 | {C0CD44FB-9C60-4DBD-A1E8-9D21013E38C0}.Release|Any CPU.Build.0 = Release|Any CPU
37 | {C0CD44FB-9C60-4DBD-A1E8-9D21013E38C0}.Release|x64.ActiveCfg = Release|Any CPU
38 | {C0CD44FB-9C60-4DBD-A1E8-9D21013E38C0}.Release|x64.Build.0 = Release|Any CPU
39 | {C0CD44FB-9C60-4DBD-A1E8-9D21013E38C0}.Release|x86.ActiveCfg = Release|Any CPU
40 | {C0CD44FB-9C60-4DBD-A1E8-9D21013E38C0}.Release|x86.Build.0 = Release|Any CPU
41 | {294D6B97-FA6D-4127-B02A-3839E011267B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42 | {294D6B97-FA6D-4127-B02A-3839E011267B}.Debug|Any CPU.Build.0 = Debug|Any CPU
43 | {294D6B97-FA6D-4127-B02A-3839E011267B}.Debug|x64.ActiveCfg = Debug|Any CPU
44 | {294D6B97-FA6D-4127-B02A-3839E011267B}.Debug|x64.Build.0 = Debug|Any CPU
45 | {294D6B97-FA6D-4127-B02A-3839E011267B}.Debug|x86.ActiveCfg = Debug|Any CPU
46 | {294D6B97-FA6D-4127-B02A-3839E011267B}.Debug|x86.Build.0 = Debug|Any CPU
47 | {294D6B97-FA6D-4127-B02A-3839E011267B}.Release|Any CPU.ActiveCfg = Release|Any CPU
48 | {294D6B97-FA6D-4127-B02A-3839E011267B}.Release|Any CPU.Build.0 = Release|Any CPU
49 | {294D6B97-FA6D-4127-B02A-3839E011267B}.Release|x64.ActiveCfg = Release|Any CPU
50 | {294D6B97-FA6D-4127-B02A-3839E011267B}.Release|x64.Build.0 = Release|Any CPU
51 | {294D6B97-FA6D-4127-B02A-3839E011267B}.Release|x86.ActiveCfg = Release|Any CPU
52 | {294D6B97-FA6D-4127-B02A-3839E011267B}.Release|x86.Build.0 = Release|Any CPU
53 | {2283C305-7604-4DCD-BDFD-1C3CCF2D6C31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54 | {2283C305-7604-4DCD-BDFD-1C3CCF2D6C31}.Debug|Any CPU.Build.0 = Debug|Any CPU
55 | {2283C305-7604-4DCD-BDFD-1C3CCF2D6C31}.Debug|x64.ActiveCfg = Debug|Any CPU
56 | {2283C305-7604-4DCD-BDFD-1C3CCF2D6C31}.Debug|x64.Build.0 = Debug|Any CPU
57 | {2283C305-7604-4DCD-BDFD-1C3CCF2D6C31}.Debug|x86.ActiveCfg = Debug|Any CPU
58 | {2283C305-7604-4DCD-BDFD-1C3CCF2D6C31}.Debug|x86.Build.0 = Debug|Any CPU
59 | {2283C305-7604-4DCD-BDFD-1C3CCF2D6C31}.Release|Any CPU.ActiveCfg = Release|Any CPU
60 | {2283C305-7604-4DCD-BDFD-1C3CCF2D6C31}.Release|Any CPU.Build.0 = Release|Any CPU
61 | {2283C305-7604-4DCD-BDFD-1C3CCF2D6C31}.Release|x64.ActiveCfg = Release|Any CPU
62 | {2283C305-7604-4DCD-BDFD-1C3CCF2D6C31}.Release|x64.Build.0 = Release|Any CPU
63 | {2283C305-7604-4DCD-BDFD-1C3CCF2D6C31}.Release|x86.ActiveCfg = Release|Any CPU
64 | {2283C305-7604-4DCD-BDFD-1C3CCF2D6C31}.Release|x86.Build.0 = Release|Any CPU
65 | EndGlobalSection
66 | GlobalSection(NestedProjects) = preSolution
67 | {C0CD44FB-9C60-4DBD-A1E8-9D21013E38C0} = {F9937330-C0B9-40C1-939B-66606EA1DE45}
68 | {294D6B97-FA6D-4127-B02A-3839E011267B} = {F9937330-C0B9-40C1-939B-66606EA1DE45}
69 | {2283C305-7604-4DCD-BDFD-1C3CCF2D6C31} = {E1FD199C-08C2-49D0-A0B9-1120F989215F}
70 | EndGlobalSection
71 | EndGlobal
72 |
--------------------------------------------------------------------------------
/src/Blazor.Extensions.XTerm.JS/Blazor.Extensions.XTerm.JS.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | Library
6 | false
7 | false
8 | latest
9 | true
10 | Latest
11 | ${DefaultItemExcludes};dist\**;node_modules\**
12 | CS2008
13 |
14 |
15 | true
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/Blazor.Extensions.XTerm.JS/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "blazor.extensions.xterm",
3 | "version": "0.0.1",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "build": "webpack-cli",
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "dependencies": {
11 | "xterm": "^3.14.5",
12 | "xterm-addon-fit": "^0.1.0",
13 | "xterm-addon-search": "^0.1.0",
14 | "xterm-addon-web-links": "^0.1.0"
15 | },
16 | "devDependencies": {
17 | "copy-webpack-plugin": "^5.0.4",
18 | "ts-loader": "^6.0.4",
19 | "typescript": "^3.5.3",
20 | "webpack": "^4.39.1",
21 | "webpack-cli": "^3.3.6"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Blazor.Extensions.XTerm.JS/src/InitializeXTerm.ts:
--------------------------------------------------------------------------------
1 | import { TerminalManager } from './TerminalManager';
2 |
3 | namespace XTerm {
4 | const blazorExtensions: string = 'BlazorExtensions';
5 | // define what this extension adds to the window object inside BlazorExtensions
6 | const extensionObject = {
7 | XTerm: new TerminalManager()
8 | };
9 |
10 | export function initialize(): void {
11 | if (typeof window !== 'undefined' && !window[blazorExtensions]) {
12 | // when the library is loaded in a browser via a
15 |