k_director 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a815561b5b1396f42cb9a229c9f596505dfc9aa7e4806e52c5e9561fe3b4ee8b
4
- data.tar.gz: 55e7a341a190c4e022d8041b520d79f7d30007a644a277b5a0b761a3054f9843
3
+ metadata.gz: 5784bc2f8f9ea89bac4e9d195ed607c1785d1f92281ff7ed553f9edf47d5c29f
4
+ data.tar.gz: cf9f19744ba09d4ef876a4114e4a4d52161d7355255c8393c726f78295ad44a5
5
5
  SHA512:
6
- metadata.gz: 51b5a5b3c460a6b2f5059f3e99348697184d10710ff128797db01a0684d06667432802fc986e363cdea19610c6e5b23ed71679bcac530b14b8baa347b83d4c1b
7
- data.tar.gz: 179bc109bb350c5be224c52b0c3b5f9115dc719a92a2f071a1df27307fa94a0c5e494b4c7388d658183de7ab5536af122a638e1fdae98591495b414f5ed0c15c
6
+ metadata.gz: b5ae842246267f476569e932922db59431a4e5af70c164968a51e12447ab34ef0300aca3f9b2cf0fbb1574ca98c14a8ad857978e7ca672a9bfe38c3d1a55c91c
7
+ data.tar.gz: 9b10d1b7ab087e22656a486439cf2c71cf7d9b8d93c3de87e6d3df49b71ad1156a90eb605f8dbe93246a83e3faea722572f64cb4e7bb6ceb30867736529485ab
data/docs/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [0.8.0](https://github.com/klueless-io/k_director/compare/v0.7.3...v0.8.0) (2022-02-04)
2
+
3
+
4
+ ### Features
5
+
6
+ * add rubygem DSL support ([f93a863](https://github.com/klueless-io/k_director/commit/f93a86338d703771ba43a8e9ed5e7c8e9d1a7778))
7
+
1
8
  ## [0.7.3](https://github.com/klueless-io/k_director/compare/v0.7.2...v0.7.3) (2022-02-03)
2
9
 
3
10
 
data/k_director.gemspec CHANGED
@@ -41,6 +41,7 @@ Gem::Specification.new do |spec|
41
41
  'rubygems_mfa_required' => 'true'
42
42
  }
43
43
 
44
+ spec.add_dependency 'k_config', '~> 0.0.0'
44
45
  spec.add_dependency 'k_log', '~> 0.0.0'
45
46
  # spec.add_dependency 'k_type', '~> 0.0.0'
46
47
  spec.add_dependency 'k_builder', '~> 0.0.0'
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Attach configuration to the KBuilder module
4
+ module KDirector
5
+ module Dsls
6
+ module Children
7
+ # PackageJson configuration extension for attachment to KConfig::Configuration
8
+ module PackageJsonConfigurationExtension
9
+ def package_json
10
+ return @package_json if defined? @package_json
11
+
12
+ @package_json = PackageJsonConfiguration.new
13
+ @package_json.set_default_package_groups
14
+ @package_json
15
+ end
16
+
17
+ def package_json_debug
18
+ package_json.debug
19
+ end
20
+ end
21
+
22
+ # PackageJson Configuration
23
+ class PackageJsonConfiguration
24
+ include KLog::Logging
25
+
26
+ PackageGroup = Struct.new(:key, :description, :package_names)
27
+
28
+ attr_accessor :package_groups
29
+
30
+ def initialize
31
+ @package_groups = {}
32
+ end
33
+
34
+ def set_package_group(key, description, package_names)
35
+ package_groups[key] = PackageGroup.new(key, description, package_names)
36
+ end
37
+
38
+ # Setup the default package groups
39
+ def set_default_package_groups
40
+ set_package_group('webpack' , 'Webpack V5', %w[webpack webpack-cli webpack-dev-server])
41
+ set_package_group('swc' , 'SWC Transpiler', %w[@swc/cli @swc/core swc-loader])
42
+ set_package_group('babel' , 'Babel Transpiler', %w[@babel/core @babel/cli @babel/preset-env babel-loader])
43
+ set_package_group('typescript' , 'Typescript', %w[typescript ts-loader])
44
+ set_package_group('semantic-release', 'Semantic Release', %w[semantic-release github:klueless-js/semantic-release-rubygem @semantic-release/changelog @semantic-release/git])
45
+ end
46
+
47
+ def debug
48
+ log.structure(package_groups, convert_data_to: :open_struct)
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+
55
+ KConfig::Configuration.register(:package_json, KDirector::Dsls::Children::PackageJsonConfigurationExtension)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KDirector
4
- VERSION = '0.8.0'
4
+ VERSION = '0.8.1'
5
5
  end
data/lib/k_director.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'k_config'
3
4
  require 'k_log'
4
5
  require 'k_util'
5
6
  require 'k_builder'
@@ -12,6 +13,7 @@ require_relative 'k_director/directors/child_director'
12
13
  require_relative 'k_director/directors/data'
13
14
  require_relative 'k_director/dsls/children/blueprint'
14
15
  require_relative 'k_director/dsls/children/github'
16
+ require_relative 'k_director/dsls/children/package_json_configuration'
15
17
  require_relative 'k_director/dsls/children/package_json'
16
18
  require_relative 'k_director/dsls/nuxt3_dsl'
17
19
  require_relative 'k_director/dsls/ruby_gem_dsl'
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "k_director",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "k_director",
9
- "version": "0.8.0",
9
+ "version": "0.8.1",
10
10
  "devDependencies": {
11
11
  "@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
12
12
  "@semantic-release/changelog": "^6.0.1",
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "k_director",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Command line and CI/CD tools for k_director",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: k_director
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-04 00:00:00.000000000 Z
11
+ date: 2022-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: k_config
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.0.0
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: k_log
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -104,6 +118,7 @@ files:
104
118
  - lib/k_director/dsls/children/blueprint.rb
105
119
  - lib/k_director/dsls/children/github.rb
106
120
  - lib/k_director/dsls/children/package_json.rb
121
+ - lib/k_director/dsls/children/package_json_configuration.rb
107
122
  - lib/k_director/dsls/nuxt3_dsl.rb
108
123
  - lib/k_director/dsls/ruby_gem_dsl.rb
109
124
  - lib/k_director/version.rb