makit 0.0.111 → 0.0.126

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.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/lib/makit/cli/repository_commands.rb +1 -1
  3. data/lib/makit/commands/middleware/cache.rb +3 -3
  4. data/lib/makit/commands/middleware/command_logger.rb +33 -45
  5. data/lib/makit/commands/request.rb +63 -1
  6. data/lib/makit/commands/runner.rb +56 -5
  7. data/lib/makit/commands/strategies/base.rb +13 -2
  8. data/lib/makit/commands/strategies/synchronous.rb +11 -6
  9. data/lib/makit/commands.rb +8 -0
  10. data/lib/makit/configuration/gitlab_helper.rb +0 -2
  11. data/lib/makit/configuration/project.rb +48 -8
  12. data/lib/makit/configuration/step.rb +3 -3
  13. data/lib/makit/content/default_gitignore.txt +226 -0
  14. data/lib/makit/directories.rb +3 -4
  15. data/lib/makit/docs/files.rb +1 -1
  16. data/lib/makit/docs/rake.rb +1 -1
  17. data/lib/makit/dotnet/cli.rb +69 -65
  18. data/lib/makit/dotnet/project.rb +71 -7
  19. data/lib/makit/examples/runner.rb +2 -2
  20. data/lib/makit/logging/configuration.rb +9 -6
  21. data/lib/makit/logging/format_registry.rb +84 -84
  22. data/lib/makit/logging/formatters/console_formatter.rb +22 -9
  23. data/lib/makit/logging/log_request.rb +6 -2
  24. data/lib/makit/logging/logger.rb +45 -5
  25. data/lib/makit/logging/sinks/base.rb +91 -91
  26. data/lib/makit/logging/sinks/structured.rb +123 -129
  27. data/lib/makit/logging/sinks/unified_file_sink.rb +39 -46
  28. data/lib/makit/logging.rb +45 -1
  29. data/lib/makit/mp/project_mp.rb +6 -6
  30. data/lib/makit/mp/string_mp.rb +108 -265
  31. data/lib/makit/serializer.rb +14 -1
  32. data/lib/makit/services/builder.rb +5 -5
  33. data/lib/makit/services/repository_manager.rb +8 -6
  34. data/lib/makit/setup/classlib.rb +44 -7
  35. data/lib/makit/setup/gem.rb +268 -250
  36. data/lib/makit/setup/razorclasslib.rb +91 -0
  37. data/lib/makit/setup/runner.rb +36 -22
  38. data/lib/makit/setup.rb +5 -0
  39. data/lib/makit/symbols.rb +10 -1
  40. data/lib/makit/tasks/at_exit.rb +3 -1
  41. data/lib/makit/tasks/build.rb +16 -12
  42. data/lib/makit/tasks/clean.rb +2 -0
  43. data/lib/makit/tasks/configure.rb +10 -0
  44. data/lib/makit/tasks/format.rb +10 -0
  45. data/lib/makit/tasks/hook_manager.rb +160 -8
  46. data/lib/makit/tasks/init.rb +2 -0
  47. data/lib/makit/tasks/integrate.rb +17 -3
  48. data/lib/makit/tasks/pull_incoming.rb +6 -5
  49. data/lib/makit/tasks/setup.rb +10 -3
  50. data/lib/makit/tasks/sync.rb +13 -7
  51. data/lib/makit/tasks/tag.rb +16 -0
  52. data/lib/makit/tasks/task_monkey_patch.rb +58 -56
  53. data/lib/makit/tasks/test.rb +22 -0
  54. data/lib/makit/tasks/update.rb +18 -0
  55. data/lib/makit/tasks.rb +20 -5
  56. data/lib/makit/v1/makit.v1_pb.rb +1 -0
  57. data/lib/makit/version.rb +1 -1
  58. data/lib/makit/version_util.rb +21 -0
  59. data/lib/makit copy.rb +44 -0
  60. data/lib/makit.rb +31 -0
  61. metadata +118 -13
  62. data/lib/makit/command_runner.rb +0 -463
  63. data/lib/makit/commands/compatibility.rb +0 -365
  64. data/lib/makit/commands/middleware/unified_logger.rb +0 -243
  65. data/lib/makit/task_hooks.rb +0 -125
@@ -1,250 +1,268 @@
1
- # frozen_string_literal: true
2
- require_relative "../configuration/project"
3
-
4
- module Makit
5
- module Setup
6
- class Gem
7
- def self.run
8
- project = Makit::Configuration::Project.default
9
- Makit::Logging.default_logger.info("Setting up Ruby gem project: #{project.name}")
10
-
11
- # Create basic gem structure
12
- create_gem_structure(project)
13
-
14
- # Update build and test steps
15
- update_build_step(project)
16
- update_test_step(project)
17
-
18
- project.save
19
- Makit::Logging.default_logger.info("Ruby gem project setup completed")
20
- end
21
-
22
- private
23
-
24
- def self.create_gem_structure(project)
25
- # Create directories
26
- FileUtils.mkdir_p("lib/#{project.name}")
27
- FileUtils.mkdir_p("test")
28
- FileUtils.mkdir_p("exe")
29
-
30
- # Create basic gem files
31
- create_gemspec(project)
32
- create_gemfile(project)
33
- create_main_lib(project)
34
- create_version_file(project)
35
- create_rakefile(project)
36
- create_test_helper(project)
37
- create_test_file(project)
38
- create_readme(project)
39
- end
40
-
41
- def self.create_gemspec(project)
42
- gemspec_content = <<~GEMSPEC
43
- # frozen_string_literal: true
44
-
45
- require_relative "lib/#{project.name}/version"
46
-
47
- Gem::Specification.new do |spec|
48
- spec.name = "#{project.name}"
49
- spec.version = #{project.name.capitalize}::VERSION
50
- spec.authors = ["Your Name"]
51
- spec.email = ["your.email@example.com"]
52
-
53
- spec.summary = "A Ruby gem"
54
- spec.description = "A Ruby gem description"
55
- spec.homepage = "https://github.com/yourusername/#{project.name}"
56
- spec.license = "MIT"
57
-
58
- spec.files = Dir["lib/**/*.rb", "exe/**/*", "README.md", "LICENSE.txt"]
59
- spec.bindir = "exe"
60
- spec.executables = []
61
- spec.require_paths = ["lib"]
62
-
63
- spec.add_development_dependency "bundler", "~> 2.0"
64
- spec.add_development_dependency "rake", "~> 13.0"
65
- spec.add_development_dependency "minitest", "~> 5.0"
66
- end
67
- GEMSPEC
68
-
69
- File.write("#{project.name}.gemspec", gemspec_content)
70
- end
71
-
72
- def self.create_gemfile(project)
73
- gemfile_content = <<~GEMFILE
74
- # frozen_string_literal: true
75
-
76
- source "https://rubygems.org"
77
-
78
- # Specify your gem's dependencies in #{project.name}.gemspec
79
- gemspec
80
- GEMFILE
81
-
82
- File.write("Gemfile", gemfile_content)
83
- end
84
-
85
- def self.create_main_lib(project)
86
- main_lib_content = <<~MAIN_LIB
87
- # frozen_string_literal: true
88
-
89
- require_relative "#{project.name}/version"
90
-
91
- module #{project.name.capitalize}
92
- class Error < StandardError; end
93
- # Your code goes here...
94
- end
95
- MAIN_LIB
96
-
97
- File.write("lib/#{project.name}.rb", main_lib_content)
98
- end
99
-
100
- def self.create_version_file(project)
101
- version_content = <<~VERSION
102
- # frozen_string_literal: true
103
-
104
- module #{project.name.capitalize}
105
- VERSION = "#{project.version}"
106
- end
107
- VERSION
108
-
109
- File.write("lib/#{project.name}/version.rb", version_content)
110
- end
111
-
112
- def self.create_rakefile(project)
113
- rakefile_content = <<~RAKEFILE
114
- # frozen_string_literal: true
115
-
116
- require "bundler/gem_tasks"
117
- require "minitest/test_task"
118
- require "makit"
119
-
120
- Minitest::TestTask.create
121
-
122
- task :default => [:build, :install] do
123
- end
124
- RAKEFILE
125
-
126
- File.write("Rakefile", rakefile_content)
127
- end
128
-
129
- def self.create_test_helper(project)
130
- test_helper_content = <<~TEST_HELPER
131
- # frozen_string_literal: true
132
-
133
- require "minitest/autorun"
134
- require_relative "../lib/#{project.name}"
135
- TEST_HELPER
136
-
137
- File.write("test/test_helper.rb", test_helper_content)
138
- end
139
-
140
- def self.create_test_file(project)
141
- test_content = <<~TEST
142
- # frozen_string_literal: true
143
-
144
- require "test_helper"
145
-
146
- class #{project.name.capitalize}Test < Minitest::Test
147
- def test_that_it_has_a_version_number
148
- refute_nil ::#{project.name.capitalize}::VERSION
149
- end
150
-
151
- def test_it_does_something_useful
152
- assert false
153
- end
154
- end
155
- TEST
156
-
157
- File.write("test/#{project.name}_test.rb", test_content)
158
- end
159
-
160
- def self.create_readme(project)
161
- readme_content = <<~README
162
- # #{project.name.capitalize}
163
-
164
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/#{project.name}`. To experiment with that code, run `bin/console` for an interactive prompt.
165
-
166
- TODO: Delete this and the text above, and describe your gem
167
-
168
- ## Installation
169
-
170
- Add this line to your application's Gemfile:
171
-
172
- ```ruby
173
- gem "#{project.name}"
174
- ```
175
-
176
- And then execute:
177
-
178
- $ bundle
179
-
180
- Or install it yourself as:
181
-
182
- $ gem install #{project.name}
183
-
184
- ## Usage
185
-
186
- ```ruby
187
- require "#{project.name}"
188
-
189
- # TODO: Write usage instructions here
190
- ```
191
-
192
- ## Development
193
-
194
- After checking out the repo, run `bundle install` to install dependencies. Then, run `rake test` to run the tests.
195
-
196
- ## Contributing
197
-
198
- Bug reports and pull requests are welcome on GitHub at https://github.com/yourusername/#{project.name}.
199
-
200
- ## License
201
-
202
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
203
- README
204
-
205
- File.write("README.md", readme_content)
206
- end
207
-
208
- def self.update_build_step(project)
209
- build_commands = [
210
- "bundle exec rake build"
211
- ]
212
-
213
- steps = project.steps
214
- if steps.any? { |step| step.name == "build" }
215
- build_step = steps.find { |step| step.name == "build" }
216
- build_step.commands = build_commands
217
- else
218
- build_step = Makit::Configuration::Step.new(
219
- name: "build",
220
- description: "Build the gem",
221
- commands: build_commands
222
- )
223
- project.add_step(build_step)
224
- end
225
- build_step.commands = build_commands
226
- project.save
227
- end
228
-
229
- def self.update_test_step(project)
230
- test_commands = [
231
- "bundle exec rake test"
232
- ]
233
-
234
- steps = project.steps
235
- if steps.any? { |step| step.name == "test" }
236
- test_step = steps.find { |step| step.name == "test" }
237
- test_step.commands = test_commands
238
- else
239
- test_step = Makit::Configuration::Step.new(
240
- name: "test",
241
- description: "Run the tests",
242
- commands: test_commands
243
- )
244
- project.add_step(test_step)
245
- end
246
- project.save
247
- end
248
- end
249
- end
250
- end
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../configuration/project"
4
+
5
+ module Makit
6
+ module Setup
7
+ class Gem
8
+ def self.run
9
+ project = Makit::Configuration::Project.default
10
+ Makit::Logging.default_logger.info("Setting up Ruby gem project: #{project.name}")
11
+
12
+ # Create basic gem structure
13
+ create_gem_structure(project)
14
+
15
+ # Update build and test steps
16
+ # update_build_step(project)
17
+ # update_test_step(project)
18
+
19
+ project.save
20
+ Makit::Logging.default_logger.info("Ruby gem project setup completed")
21
+ end
22
+
23
+ def self.create_gem_structure(project)
24
+ # Create directories
25
+ FileUtils.mkdir_p("lib/#{project.name}")
26
+ FileUtils.mkdir_p("test")
27
+ FileUtils.mkdir_p("exe")
28
+
29
+ # Create basic gem files
30
+ create_gemspec(project)
31
+ create_gemfile(project)
32
+ create_main_lib(project)
33
+ create_version_file(project)
34
+ create_rakefile(project)
35
+ create_test_helper(project)
36
+ create_test_file(project)
37
+ create_readme(project)
38
+ end
39
+
40
+ def self.create_gemspec(project)
41
+ gemspec_content = <<~GEMSPEC
42
+ # frozen_string_literal: true
43
+
44
+ require_relative "lib/#{project.name}/version"
45
+
46
+ Gem::Specification.new do |spec|
47
+ spec.name = "#{project.name}"
48
+ spec.version = #{project.name.capitalize}::VERSION
49
+ spec.authors = ["Your Name"]
50
+ spec.email = ["your.email@example.com"]
51
+
52
+ spec.summary = "A Ruby gem"
53
+ spec.description = "A Ruby gem description"
54
+ spec.homepage = "https://github.com/yourusername/#{project.name}"
55
+ spec.license = "MIT"
56
+
57
+ spec.files = Dir["lib/**/*.rb", "exe/**/*", "README.md", "LICENSE.txt"]
58
+ spec.bindir = "exe"
59
+ spec.executables = []
60
+ spec.require_paths = ["lib"]
61
+
62
+ spec.add_development_dependency "bundler", "~> 2.0"
63
+ spec.add_development_dependency "rake", "~> 13.0"
64
+ spec.add_development_dependency "minitest", "~> 5.0"
65
+ end
66
+ GEMSPEC
67
+
68
+ gemspec_path = "#{project.name}.gemspec"
69
+ return if File.exist?(gemspec_path)
70
+
71
+ File.write(gemspec_path, gemspec_content)
72
+ end
73
+
74
+ def self.create_gemfile(project)
75
+ gemfile_content = <<~GEMFILE
76
+ # frozen_string_literal: true
77
+
78
+ source "https://rubygems.org"
79
+
80
+ # Specify your gem's dependencies in #{project.name}.gemspec
81
+ gemspec
82
+ GEMFILE
83
+
84
+ return if File.exist?("Gemfile")
85
+
86
+ File.write("Gemfile", gemfile_content)
87
+ end
88
+
89
+ def self.create_main_lib(project)
90
+ main_lib_path = "lib/#{project.name}.rb"
91
+ return if File.exist?(main_lib_path)
92
+
93
+ main_lib_content = <<~MAIN_LIB
94
+ # frozen_string_literal: true
95
+
96
+ require_relative "#{project.name}/version"
97
+
98
+ module #{project.name.capitalize}
99
+ class Error < StandardError; end
100
+ # Your code goes here...
101
+ end
102
+ MAIN_LIB
103
+
104
+ File.write(main_lib_path, main_lib_content)
105
+ end
106
+
107
+ def self.create_version_file(project)
108
+ version_path = "lib/#{project.name}/version.rb"
109
+ return if File.exist?(version_path)
110
+
111
+ version_content = <<~VERSION
112
+ # frozen_string_literal: true
113
+
114
+ module #{project.name.capitalize}
115
+ VERSION = "#{project.version}"
116
+ end
117
+ VERSION
118
+
119
+ File.write(version_path, version_content)
120
+ end
121
+
122
+ def self.create_rakefile(_project)
123
+ return if File.exist?("Rakefile")
124
+
125
+ rakefile_content = <<~RAKEFILE
126
+ # frozen_string_literal: true
127
+
128
+ require "bundler/gem_tasks"
129
+ require "minitest/test_task"
130
+ require "makit"
131
+
132
+ Minitest::TestTask.create
133
+
134
+ task :default => [:build, :install] do
135
+ end
136
+ RAKEFILE
137
+
138
+ File.write("Rakefile", rakefile_content)
139
+ end
140
+
141
+ def self.create_test_helper(project)
142
+ return if File.exist?("test/test_helper.rb")
143
+
144
+ test_helper_content = <<~TEST_HELPER
145
+ # frozen_string_literal: true
146
+
147
+ require "minitest/autorun"
148
+ require_relative "../lib/#{project.name}"
149
+ TEST_HELPER
150
+
151
+ File.write("test/test_helper.rb", test_helper_content)
152
+ end
153
+
154
+ def self.create_test_file(project)
155
+ test_content = <<~TEST
156
+ # frozen_string_literal: true
157
+
158
+ require "test_helper"
159
+
160
+ class #{project.name.capitalize}Test < Minitest::Test
161
+ def test_that_it_has_a_version_number
162
+ refute_nil ::#{project.name.capitalize}::VERSION
163
+ end
164
+
165
+ def test_it_does_something_useful
166
+ assert false
167
+ end
168
+ end
169
+ TEST
170
+
171
+ File.write("test/#{project.name}_test.rb", test_content)
172
+ end
173
+
174
+ def self.create_readme(project)
175
+ readme_content = <<~README
176
+ # #{project.name.capitalize}
177
+
178
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/#{project.name}`. To experiment with that code, run `bin/console` for an interactive prompt.
179
+
180
+ TODO: Delete this and the text above, and describe your gem
181
+
182
+ ## Installation
183
+
184
+ Add this line to your application's Gemfile:
185
+
186
+ ```ruby
187
+ gem "#{project.name}"
188
+ ```
189
+
190
+ And then execute:
191
+
192
+ $ bundle
193
+
194
+ Or install it yourself as:
195
+
196
+ $ gem install #{project.name}
197
+
198
+ ## Usage
199
+
200
+ ```ruby
201
+ require "#{project.name}"
202
+
203
+ # TODO: Write usage instructions here
204
+ ```
205
+
206
+ ## Development
207
+
208
+ After checking out the repo, run `bundle install` to install dependencies. Then, run `rake test` to run the tests.
209
+
210
+ ## Contributing
211
+
212
+ Bug reports and pull requests are welcome on GitHub at https://github.com/yourusername/#{project.name}.
213
+
214
+ ## License
215
+
216
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
217
+ README
218
+
219
+ File.write("README.md", readme_content)
220
+ end
221
+
222
+ def self.update_build_step(project)
223
+ project = Makit::Configuration::Project.default
224
+ version = project.version
225
+ build_commands = [
226
+ "gem build makit.gemspec --output artifacts/makit-#{version}.gem",
227
+ ]
228
+
229
+ # "gem build makit.gemspec --output artifacts/makit-#{VERSION}.gem".cache_run
230
+
231
+ steps = project.steps
232
+ if steps.any? { |step| step.name == "build" }
233
+ build_step = steps.find { |step| step.name == "build" }
234
+ build_step.commands = build_commands
235
+ else
236
+ build_step = Makit::Configuration::Step.new(
237
+ name: "build",
238
+ description: "Build the gem",
239
+ commands: build_commands,
240
+ )
241
+ project.add_step(build_step)
242
+ end
243
+ build_step.commands = build_commands
244
+ project.save
245
+ end
246
+
247
+ def self.update_test_step(project)
248
+ test_commands = [
249
+ # "bundle exec rake test"
250
+ ]
251
+
252
+ steps = project.steps
253
+ if steps.any? { |step| step.name == "test" }
254
+ test_step = steps.find { |step| step.name == "test" }
255
+ test_step.commands = test_commands
256
+ else
257
+ test_step = Makit::Configuration::Step.new(
258
+ name: "test",
259
+ description: "Run the tests",
260
+ commands: test_commands,
261
+ )
262
+ project.add_step(test_step)
263
+ end
264
+ project.save
265
+ end
266
+ end
267
+ end
268
+ end
@@ -0,0 +1,91 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../configuration/project"
4
+
5
+ module Makit
6
+ module Setup
7
+ class RazorClassLib
8
+ def self.run
9
+ # puts "Setting up Nuget project..."
10
+ project = Makit::Configuration::Project.default
11
+ Makit::DotNet::Project.new_project("razorclasslib", project.name, "source/#{project.name}",
12
+ "--framework net8.0")
13
+ dotnet_project = Makit::DotNet::Project.new("source/#{project.name}/#{project.name}.csproj")
14
+ # set the version to project.version
15
+ dotnet_project.set_version(project.version)
16
+ # set the frameworks = ["net8.0","net8.0-browser"]
17
+ dotnet_project.set_target_frameworks(["net8.0", "net8.0-browser"])
18
+ # set the nuget metadata
19
+ dotnet_project.set_nuget_metadata(project.name, project.authors, project.description,
20
+ project.license_expression)
21
+ Makit::DotNet::Project.new_project("TUnit", "#{project.name}.Tests", "tests/#{project.name}")
22
+ dotnet_project = Makit::DotNet::Project.new("tests/#{project.name}/#{project.name}.Tests.csproj")
23
+ # set the version to project.version
24
+ dotnet_project.set_version(project.version)
25
+ # set the frameworks = ["net8.0","net8.0-browser"]
26
+ dotnet_project.set_target_frameworks(["net8.0", "net8.0-browser"])
27
+ # set the nuget metadata
28
+ dotnet_project.set_nuget_metadata("#{project.name}.Tests", project.authors, project.description,
29
+ project.license_expression)
30
+ Makit::DotNet::Project.add_reference("tests/#{project.name}/#{project.name}.Tests.csproj",
31
+ "source/#{project.name}/#{project.name}.csproj")
32
+ update_build_step(project)
33
+ update_test_step(project)
34
+
35
+ project.save
36
+
37
+ # Setup the sln, then slnx
38
+ Makit::DotNet.new_solution(project.name)
39
+ Makit::DotNet.sln_add_projects(project.name)
40
+ # migrate the sln to slnx
41
+ "dotnet sln migrate #{project.name}.sln".run
42
+ FileUtils.rm_f("#{project.name}.sln") if File.exist?("#{project.name}.slnx")
43
+ Makit::Logging.default_logger.debug("Project setup completed")
44
+ end
45
+
46
+ def self.update_build_step(project)
47
+ build_commands = []
48
+ build_commands << "dotnet restore #{project.name}.slnx" if File.exist?("#{project.name}.slnx")
49
+ build_commands << "dotnet build source/#{project.name}/#{project.name}.csproj --configuration Release"
50
+ build_commands << "dotnet build tests/#{project.name}/#{project.name}.Tests.csproj --configuration Release"
51
+ build_commands << "dotnet pack source/#{project.name}/#{project.name}.csproj --configuration Release --output artifacts/Packages"
52
+ build_commands << "dotnet pack tests/#{project.name}/#{project.name}.Tests.csproj --configuration Release --output artifacts/Packages"
53
+ if File.exist?("source/#{project.name}.Pages/#{project.name}.Pages.csproj")
54
+ build_commands << "dotnet build source/#{project.name}.Pages/#{project.name}.Pages.csproj --configuration Release"
55
+ end
56
+ if File.exist?("source/#{project.name}.Pages/#{project.name}.Pages.csproj")
57
+ build_commands << "dotnet publish source/#{project.name}.Pages/#{project.name}.Pages.csproj --configuration Release --output artifacts/Pages"
58
+ end
59
+ steps = project.steps
60
+ if steps.any? { |step| step.name == "build" }
61
+ build_step = steps.find { |step| step.name == "build" }
62
+ build_step.commands = build_commands
63
+ else
64
+ build_step = Makit::Configuration::Step.new(name: "build", description: "Build the project artifacts",
65
+ commands: build_commands)
66
+ build_step.commands = build_commands
67
+ project.add_step(build_step)
68
+ end
69
+ build_step.commands = build_commands
70
+
71
+ project.save
72
+ end
73
+
74
+ def self.update_test_step(project)
75
+ test_commands = []
76
+ test_commands << "dotnet test tests/#{project.name}/#{project.name}.Tests.csproj"
77
+ steps = project.steps
78
+ if steps.any? { |step| step.name == "test" }
79
+ test_step = steps.find { |step| step.name == "test" }
80
+ test_step.commands = test_commands
81
+ else
82
+ test_step = Makit::Configuration::Step.new(name: "test", description: "Run the project tests",
83
+ commands: test_commands)
84
+ test_step.commands = test_commands
85
+ project.add_step(test_step)
86
+ end
87
+ project.save
88
+ end
89
+ end
90
+ end
91
+ end