settingspec 0.7.0__tar.gz → 0.9.0__tar.gz
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.
- {settingspec-0.7.0 → settingspec-0.9.0}/Cargo.lock +63 -63
- {settingspec-0.7.0 → settingspec-0.9.0}/Cargo.toml +1 -1
- {settingspec-0.7.0 → settingspec-0.9.0}/PKG-INFO +29 -8
- {settingspec-0.7.0 → settingspec-0.9.0}/README.md +28 -7
- {settingspec-0.7.0 → settingspec-0.9.0}/src/cli.rs +63 -14
- {settingspec-0.7.0 → settingspec-0.9.0}/src/error.rs +24 -0
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/c.rs +70 -5
- settingspec-0.9.0/src/generator/common.rs +91 -0
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/cpp.rs +94 -5
- settingspec-0.9.0/src/generator/elm.rs +221 -0
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/env.rs +4 -0
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/go.rs +75 -7
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/haskell.rs +126 -12
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/java.rs +57 -5
- settingspec-0.9.0/src/generator/javascript.rs +51 -0
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/json.rs +22 -4
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/lua.rs +21 -2
- settingspec-0.9.0/src/generator/mod.rs +209 -0
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/python.rs +56 -6
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/ruby.rs +22 -2
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/rust.rs +152 -8
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/scala.rs +59 -5
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/terraform.rs +14 -2
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/toml.rs +2 -0
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/tree.rs +16 -6
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/typescript.rs +44 -5
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/yaml.rs +2 -0
- {settingspec-0.7.0 → settingspec-0.9.0}/src/generator/zig.rs +130 -8
- {settingspec-0.7.0 → settingspec-0.9.0}/src/model.rs +98 -9
- {settingspec-0.7.0 → settingspec-0.9.0}/src/parser.rs +19 -6
- {settingspec-0.7.0 → settingspec-0.9.0}/src/resolver.rs +54 -13
- settingspec-0.7.0/src/generator/common.rs +0 -31
- settingspec-0.7.0/src/generator/elm.rs +0 -125
- settingspec-0.7.0/src/generator/javascript.rs +0 -8
- settingspec-0.7.0/src/generator/mod.rs +0 -99
- {settingspec-0.7.0 → settingspec-0.9.0}/LICENSE-APACHE +0 -0
- {settingspec-0.7.0 → settingspec-0.9.0}/LICENSE-MIT +0 -0
- {settingspec-0.7.0 → settingspec-0.9.0}/pyproject.toml +0 -0
- {settingspec-0.7.0 → settingspec-0.9.0}/src/envfile.rs +0 -0
- {settingspec-0.7.0 → settingspec-0.9.0}/src/filter.rs +0 -0
- {settingspec-0.7.0 → settingspec-0.9.0}/src/lib.rs +0 -0
- {settingspec-0.7.0 → settingspec-0.9.0}/src/main.rs +0 -0
- {settingspec-0.7.0 → settingspec-0.9.0}/src/profile.rs +0 -0
|
@@ -163,9 +163,9 @@ checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
|
|
|
163
163
|
|
|
164
164
|
[[package]]
|
|
165
165
|
name = "arc-swap"
|
|
166
|
-
version = "1.9.
|
|
166
|
+
version = "1.9.3"
|
|
167
167
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
168
|
-
checksum = "
|
|
168
|
+
checksum = "380962b3d93b99642e50b9febf72c071e97e8b32d86eae9cf4ef582bb960ae6e"
|
|
169
169
|
dependencies = [
|
|
170
170
|
"rustversion",
|
|
171
171
|
]
|
|
@@ -414,7 +414,7 @@ dependencies = [
|
|
|
414
414
|
"heck",
|
|
415
415
|
"proc-macro2",
|
|
416
416
|
"quote",
|
|
417
|
-
"syn 3.0.
|
|
417
|
+
"syn 3.0.9",
|
|
418
418
|
]
|
|
419
419
|
|
|
420
420
|
[[package]]
|
|
@@ -630,7 +630,7 @@ checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8"
|
|
|
630
630
|
dependencies = [
|
|
631
631
|
"proc-macro2",
|
|
632
632
|
"quote",
|
|
633
|
-
"syn 3.0.
|
|
633
|
+
"syn 3.0.9",
|
|
634
634
|
]
|
|
635
635
|
|
|
636
636
|
[[package]]
|
|
@@ -660,9 +660,9 @@ dependencies = [
|
|
|
660
660
|
|
|
661
661
|
[[package]]
|
|
662
662
|
name = "equivalent"
|
|
663
|
-
version = "1.0.
|
|
663
|
+
version = "1.0.3"
|
|
664
664
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
665
|
-
checksum = "
|
|
665
|
+
checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826"
|
|
666
666
|
|
|
667
667
|
[[package]]
|
|
668
668
|
name = "errno"
|
|
@@ -815,7 +815,7 @@ checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44"
|
|
|
815
815
|
dependencies = [
|
|
816
816
|
"proc-macro2",
|
|
817
817
|
"quote",
|
|
818
|
-
"syn 3.0.
|
|
818
|
+
"syn 3.0.9",
|
|
819
819
|
]
|
|
820
820
|
|
|
821
821
|
[[package]]
|
|
@@ -881,9 +881,9 @@ dependencies = [
|
|
|
881
881
|
|
|
882
882
|
[[package]]
|
|
883
883
|
name = "globset"
|
|
884
|
-
version = "0.4.
|
|
884
|
+
version = "0.4.21"
|
|
885
885
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
886
|
-
checksum = "
|
|
886
|
+
checksum = "f98b0d85522dc0a824cfebbc9594ff4a9b289c568bea0370319dfbdf20ccdd2d"
|
|
887
887
|
dependencies = [
|
|
888
888
|
"aho-corasick",
|
|
889
889
|
"bstr",
|
|
@@ -1050,9 +1050,9 @@ dependencies = [
|
|
|
1050
1050
|
|
|
1051
1051
|
[[package]]
|
|
1052
1052
|
name = "ignore"
|
|
1053
|
-
version = "0.4.
|
|
1053
|
+
version = "0.4.34"
|
|
1054
1054
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1055
|
-
checksum = "
|
|
1055
|
+
checksum = "484be5657551d7868d67587df967fb4fcbe9d266a761cc855aaa148fda0b3cc7"
|
|
1056
1056
|
dependencies = [
|
|
1057
1057
|
"crossbeam-deque",
|
|
1058
1058
|
"globset",
|
|
@@ -1144,18 +1144,18 @@ dependencies = [
|
|
|
1144
1144
|
|
|
1145
1145
|
[[package]]
|
|
1146
1146
|
name = "lazy_static"
|
|
1147
|
-
version = "1.5.
|
|
1147
|
+
version = "1.5.1"
|
|
1148
1148
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1149
|
-
checksum = "
|
|
1149
|
+
checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb"
|
|
1150
1150
|
dependencies = [
|
|
1151
1151
|
"spin",
|
|
1152
1152
|
]
|
|
1153
1153
|
|
|
1154
1154
|
[[package]]
|
|
1155
1155
|
name = "libc"
|
|
1156
|
-
version = "0.2.
|
|
1156
|
+
version = "0.2.191"
|
|
1157
1157
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1158
|
-
checksum = "
|
|
1158
|
+
checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
|
|
1159
1159
|
|
|
1160
1160
|
[[package]]
|
|
1161
1161
|
name = "libm"
|
|
@@ -1292,9 +1292,9 @@ dependencies = [
|
|
|
1292
1292
|
|
|
1293
1293
|
[[package]]
|
|
1294
1294
|
name = "objc2"
|
|
1295
|
-
version = "0.6.
|
|
1295
|
+
version = "0.6.5"
|
|
1296
1296
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1297
|
-
checksum = "
|
|
1297
|
+
checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8"
|
|
1298
1298
|
dependencies = [
|
|
1299
1299
|
"objc2-encode",
|
|
1300
1300
|
]
|
|
@@ -1503,7 +1503,7 @@ dependencies = [
|
|
|
1503
1503
|
"proc-macro-error-attr3",
|
|
1504
1504
|
"proc-macro2",
|
|
1505
1505
|
"quote",
|
|
1506
|
-
"syn 3.0.
|
|
1506
|
+
"syn 3.0.9",
|
|
1507
1507
|
]
|
|
1508
1508
|
|
|
1509
1509
|
[[package]]
|
|
@@ -1614,9 +1614,9 @@ dependencies = [
|
|
|
1614
1614
|
|
|
1615
1615
|
[[package]]
|
|
1616
1616
|
name = "rust-embed"
|
|
1617
|
-
version = "8.
|
|
1617
|
+
version = "8.13.0"
|
|
1618
1618
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1619
|
-
checksum = "
|
|
1619
|
+
checksum = "19afa5b4b6a611de00bd1bdae6ae6f39084c9399f0679c3f52d8469cf335cc23"
|
|
1620
1620
|
dependencies = [
|
|
1621
1621
|
"rust-embed-impl",
|
|
1622
1622
|
"rust-embed-utils",
|
|
@@ -1625,9 +1625,9 @@ dependencies = [
|
|
|
1625
1625
|
|
|
1626
1626
|
[[package]]
|
|
1627
1627
|
name = "rust-embed-impl"
|
|
1628
|
-
version = "8.
|
|
1628
|
+
version = "8.13.0"
|
|
1629
1629
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1630
|
-
checksum = "
|
|
1630
|
+
checksum = "e0d8afda6374eac59e066abee06d265247ebbaf3006cf878e2879e8356e34053"
|
|
1631
1631
|
dependencies = [
|
|
1632
1632
|
"mime_guess",
|
|
1633
1633
|
"proc-macro2",
|
|
@@ -1639,11 +1639,11 @@ dependencies = [
|
|
|
1639
1639
|
|
|
1640
1640
|
[[package]]
|
|
1641
1641
|
name = "rust-embed-utils"
|
|
1642
|
-
version = "8.
|
|
1642
|
+
version = "8.13.0"
|
|
1643
1643
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1644
|
-
checksum = "
|
|
1644
|
+
checksum = "0d84e8ba78bd384263e5922f084cbe1b081c3b7e69add59c8fb097b879ba968a"
|
|
1645
1645
|
dependencies = [
|
|
1646
|
-
"sha2 0.11.
|
|
1646
|
+
"sha2 0.11.1",
|
|
1647
1647
|
"walkdir",
|
|
1648
1648
|
]
|
|
1649
1649
|
|
|
@@ -1664,9 +1664,9 @@ dependencies = [
|
|
|
1664
1664
|
|
|
1665
1665
|
[[package]]
|
|
1666
1666
|
name = "rustix"
|
|
1667
|
-
version = "1.1.
|
|
1667
|
+
version = "1.1.6"
|
|
1668
1668
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1669
|
-
checksum = "
|
|
1669
|
+
checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa"
|
|
1670
1670
|
dependencies = [
|
|
1671
1671
|
"bitflags",
|
|
1672
1672
|
"errno",
|
|
@@ -1783,14 +1783,14 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
|
1783
1783
|
dependencies = [
|
|
1784
1784
|
"proc-macro2",
|
|
1785
1785
|
"quote",
|
|
1786
|
-
"syn 3.0.
|
|
1786
|
+
"syn 3.0.9",
|
|
1787
1787
|
]
|
|
1788
1788
|
|
|
1789
1789
|
[[package]]
|
|
1790
1790
|
name = "serde_json"
|
|
1791
|
-
version = "1.0.
|
|
1791
|
+
version = "1.0.154"
|
|
1792
1792
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1793
|
-
checksum = "
|
|
1793
|
+
checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6"
|
|
1794
1794
|
dependencies = [
|
|
1795
1795
|
"itoa",
|
|
1796
1796
|
"memchr",
|
|
@@ -1801,9 +1801,9 @@ dependencies = [
|
|
|
1801
1801
|
|
|
1802
1802
|
[[package]]
|
|
1803
1803
|
name = "serde_spanned"
|
|
1804
|
-
version = "1.1.
|
|
1804
|
+
version = "1.1.2"
|
|
1805
1805
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1806
|
-
checksum = "
|
|
1806
|
+
checksum = "4e7523beb55eece201a2356bee0bbca0d1ab466c14c07703b2e0ee6d42cb0c2c"
|
|
1807
1807
|
dependencies = [
|
|
1808
1808
|
"serde_core",
|
|
1809
1809
|
]
|
|
@@ -1823,7 +1823,7 @@ dependencies = [
|
|
|
1823
1823
|
|
|
1824
1824
|
[[package]]
|
|
1825
1825
|
name = "settingspec"
|
|
1826
|
-
version = "0.
|
|
1826
|
+
version = "0.9.0"
|
|
1827
1827
|
dependencies = [
|
|
1828
1828
|
"age",
|
|
1829
1829
|
"anyhow",
|
|
@@ -1838,7 +1838,7 @@ dependencies = [
|
|
|
1838
1838
|
"serde",
|
|
1839
1839
|
"serde_json",
|
|
1840
1840
|
"serde_yaml",
|
|
1841
|
-
"toml 1.1.
|
|
1841
|
+
"toml 1.1.8+spec-1.1.0",
|
|
1842
1842
|
]
|
|
1843
1843
|
|
|
1844
1844
|
[[package]]
|
|
@@ -1854,9 +1854,9 @@ dependencies = [
|
|
|
1854
1854
|
|
|
1855
1855
|
[[package]]
|
|
1856
1856
|
name = "sha2"
|
|
1857
|
-
version = "0.11.
|
|
1857
|
+
version = "0.11.1"
|
|
1858
1858
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1859
|
-
checksum = "
|
|
1859
|
+
checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19"
|
|
1860
1860
|
dependencies = [
|
|
1861
1861
|
"cfg-if",
|
|
1862
1862
|
"cpufeatures 0.3.1",
|
|
@@ -1891,9 +1891,9 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
|
|
|
1891
1891
|
|
|
1892
1892
|
[[package]]
|
|
1893
1893
|
name = "smallvec"
|
|
1894
|
-
version = "1.16.
|
|
1894
|
+
version = "1.16.4"
|
|
1895
1895
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1896
|
-
checksum = "
|
|
1896
|
+
checksum = "d0d5d4b1981b8bbbb7aed204cae5726d683d5d6ac7e74ec54122ea28f315e7c8"
|
|
1897
1897
|
|
|
1898
1898
|
[[package]]
|
|
1899
1899
|
name = "spin"
|
|
@@ -1936,9 +1936,9 @@ dependencies = [
|
|
|
1936
1936
|
|
|
1937
1937
|
[[package]]
|
|
1938
1938
|
name = "syn"
|
|
1939
|
-
version = "3.0.
|
|
1939
|
+
version = "3.0.9"
|
|
1940
1940
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1941
|
-
checksum = "
|
|
1941
|
+
checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
|
|
1942
1942
|
dependencies = [
|
|
1943
1943
|
"proc-macro2",
|
|
1944
1944
|
"quote",
|
|
@@ -2000,14 +2000,14 @@ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
|
|
|
2000
2000
|
dependencies = [
|
|
2001
2001
|
"proc-macro2",
|
|
2002
2002
|
"quote",
|
|
2003
|
-
"syn 3.0.
|
|
2003
|
+
"syn 3.0.9",
|
|
2004
2004
|
]
|
|
2005
2005
|
|
|
2006
2006
|
[[package]]
|
|
2007
2007
|
name = "tinystr"
|
|
2008
|
-
version = "0.8.
|
|
2008
|
+
version = "0.8.5"
|
|
2009
2009
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2010
|
-
checksum = "
|
|
2010
|
+
checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a"
|
|
2011
2011
|
dependencies = [
|
|
2012
2012
|
"displaydoc",
|
|
2013
2013
|
"serde_core",
|
|
@@ -2025,9 +2025,9 @@ dependencies = [
|
|
|
2025
2025
|
|
|
2026
2026
|
[[package]]
|
|
2027
2027
|
name = "toml"
|
|
2028
|
-
version = "1.1.
|
|
2028
|
+
version = "1.1.8+spec-1.1.0"
|
|
2029
2029
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2030
|
-
checksum = "
|
|
2030
|
+
checksum = "20489e00e4d8741d6be680764cc12e270655e375a20d1011e844a9c3379e678d"
|
|
2031
2031
|
dependencies = [
|
|
2032
2032
|
"indexmap",
|
|
2033
2033
|
"serde_core",
|
|
@@ -2040,27 +2040,27 @@ dependencies = [
|
|
|
2040
2040
|
|
|
2041
2041
|
[[package]]
|
|
2042
2042
|
name = "toml_datetime"
|
|
2043
|
-
version = "1.1.
|
|
2043
|
+
version = "1.1.2+spec-1.1.0"
|
|
2044
2044
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2045
|
-
checksum = "
|
|
2045
|
+
checksum = "2b86d767906c6c42421dcba507eb9d203e779497710a47782a224bb871653053"
|
|
2046
2046
|
dependencies = [
|
|
2047
2047
|
"serde_core",
|
|
2048
2048
|
]
|
|
2049
2049
|
|
|
2050
2050
|
[[package]]
|
|
2051
2051
|
name = "toml_parser"
|
|
2052
|
-
version = "1.1.
|
|
2052
|
+
version = "1.1.5+spec-1.1.0"
|
|
2053
2053
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2054
|
-
checksum = "
|
|
2054
|
+
checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c"
|
|
2055
2055
|
dependencies = [
|
|
2056
2056
|
"winnow",
|
|
2057
2057
|
]
|
|
2058
2058
|
|
|
2059
2059
|
[[package]]
|
|
2060
2060
|
name = "toml_writer"
|
|
2061
|
-
version = "1.1.
|
|
2061
|
+
version = "1.1.3+spec-1.1.0"
|
|
2062
2062
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2063
|
-
checksum = "
|
|
2063
|
+
checksum = "06bdbd8cfc056b8d2e2e85f29b56a3bdbecb527cef81eb39e3e7b98af4652770"
|
|
2064
2064
|
|
|
2065
2065
|
[[package]]
|
|
2066
2066
|
name = "type-map"
|
|
@@ -2098,15 +2098,15 @@ dependencies = [
|
|
|
2098
2098
|
|
|
2099
2099
|
[[package]]
|
|
2100
2100
|
name = "unicase"
|
|
2101
|
-
version = "2.
|
|
2101
|
+
version = "2.10.0"
|
|
2102
2102
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2103
|
-
checksum = "
|
|
2103
|
+
checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f"
|
|
2104
2104
|
|
|
2105
2105
|
[[package]]
|
|
2106
2106
|
name = "unicode-ident"
|
|
2107
|
-
version = "1.0.
|
|
2107
|
+
version = "1.0.27"
|
|
2108
2108
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2109
|
-
checksum = "
|
|
2109
|
+
checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
|
|
2110
2110
|
|
|
2111
2111
|
[[package]]
|
|
2112
2112
|
name = "universal-hash"
|
|
@@ -2205,18 +2205,18 @@ dependencies = [
|
|
|
2205
2205
|
|
|
2206
2206
|
[[package]]
|
|
2207
2207
|
name = "zerocopy"
|
|
2208
|
-
version = "0.8.
|
|
2208
|
+
version = "0.8.63"
|
|
2209
2209
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2210
|
-
checksum = "
|
|
2210
|
+
checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8"
|
|
2211
2211
|
dependencies = [
|
|
2212
2212
|
"zerocopy-derive",
|
|
2213
2213
|
]
|
|
2214
2214
|
|
|
2215
2215
|
[[package]]
|
|
2216
2216
|
name = "zerocopy-derive"
|
|
2217
|
-
version = "0.8.
|
|
2217
|
+
version = "0.8.63"
|
|
2218
2218
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2219
|
-
checksum = "
|
|
2219
|
+
checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f"
|
|
2220
2220
|
dependencies = [
|
|
2221
2221
|
"proc-macro2",
|
|
2222
2222
|
"quote",
|
|
@@ -2231,9 +2231,9 @@ checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272"
|
|
|
2231
2231
|
|
|
2232
2232
|
[[package]]
|
|
2233
2233
|
name = "zeroize"
|
|
2234
|
-
version = "1.9.
|
|
2234
|
+
version = "1.9.1"
|
|
2235
2235
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2236
|
-
checksum = "
|
|
2236
|
+
checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879"
|
|
2237
2237
|
dependencies = [
|
|
2238
2238
|
"zeroize_derive",
|
|
2239
2239
|
]
|
|
@@ -2251,9 +2251,9 @@ dependencies = [
|
|
|
2251
2251
|
|
|
2252
2252
|
[[package]]
|
|
2253
2253
|
name = "zerovec"
|
|
2254
|
-
version = "0.11.
|
|
2254
|
+
version = "0.11.9"
|
|
2255
2255
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2256
|
-
checksum = "
|
|
2256
|
+
checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40"
|
|
2257
2257
|
dependencies = [
|
|
2258
2258
|
"serde",
|
|
2259
2259
|
"zerofrom",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: settingspec
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
@@ -17,8 +17,6 @@ Project-URL: Source Code, https://github.com/sayanarijit/settingspec
|
|
|
17
17
|
|
|
18
18
|
<p align="center">
|
|
19
19
|
<picture>
|
|
20
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://s15.gifyu.com/images/buXVO.png">
|
|
21
|
-
<source media="(prefers-color-scheme: light)" srcset="https://s15.gifyu.com/images/buXZJ.png">
|
|
22
20
|
<img alt="The settingspec cover" width="100%" src="https://s15.gifyu.com/images/buXZJ.png">
|
|
23
21
|
</picture>
|
|
24
22
|
</p>
|
|
@@ -30,7 +28,8 @@ Project-URL: Source Code, https://github.com/sayanarijit/settingspec
|
|
|
30
28
|
|
|
31
29
|
# SettingSpec
|
|
32
30
|
|
|
33
|
-
1. [
|
|
31
|
+
1. [Install](#install)
|
|
32
|
+
2. [Concepts](#concepts)
|
|
34
33
|
1. [Single file convenience](#single-file-convenience)
|
|
35
34
|
2. [Declarative profiles as environments](#declarative-profiles-as-environments)
|
|
36
35
|
3. [Language independent](#language-independent)
|
|
@@ -38,7 +37,29 @@ Project-URL: Source Code, https://github.com/sayanarijit/settingspec
|
|
|
38
37
|
1. [SecretSpec](#secretspec)
|
|
39
38
|
2. [Dotenv](#dotenv)
|
|
40
39
|
3. [Cottage or agebox](#cottage-or-agebox)
|
|
41
|
-
|
|
40
|
+
3. [Learn more](#learn-more)
|
|
41
|
+
|
|
42
|
+
## Install
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# rust: cargo-binstall/cargo
|
|
46
|
+
cargo binstall --locked settingspec
|
|
47
|
+
cargo install --locked settingspec
|
|
48
|
+
|
|
49
|
+
# python: pip/uv/uvx
|
|
50
|
+
pip install settingspec
|
|
51
|
+
uv pip install settingspec
|
|
52
|
+
uvx settingspec --version
|
|
53
|
+
|
|
54
|
+
# node: yarn/pnpm/npx
|
|
55
|
+
yarn global add @sayanarijit/settingspec
|
|
56
|
+
pnpm add -g @sayanarijit/settingspec
|
|
57
|
+
npx @sayanarijit/settingspec --version
|
|
58
|
+
|
|
59
|
+
# container: docker/podman
|
|
60
|
+
docker run --rm -v $PWD:/app ghcr.io/sayanarijit/settingspec --version
|
|
61
|
+
podman run --rm -v $PWD:/app ghcr.io/sayanarijit/settingspec --version
|
|
62
|
+
```
|
|
42
63
|
|
|
43
64
|
## Concepts
|
|
44
65
|
|
|
@@ -71,7 +92,7 @@ key2._ = { # Strictly define different values for different profiles
|
|
|
71
92
|
|
|
72
93
|
Overrides are intentional and kept in plain sight (see `key1`).
|
|
73
94
|
|
|
74
|
-
By not defining a default value, you can ensure that you never miss adding a value for a specific profile (e.g. this file will refuse to load if `key2.prod` declaration is missing).
|
|
95
|
+
By not defining a default value, you can ensure that you never miss adding a value for a specific profile (e.g. this file will refuse to load if `key2._.prod` declaration is missing).
|
|
75
96
|
|
|
76
97
|
### Language independent
|
|
77
98
|
|
|
@@ -196,8 +217,8 @@ Too simple? Use [Cottage](https://cottage-cli.pages.dev) or [agebox](https://git
|
|
|
196
217
|
|
|
197
218
|
```toml
|
|
198
219
|
[spec]
|
|
199
|
-
envfile
|
|
200
|
-
# envfile
|
|
220
|
+
envfile = ".env.cott.age"
|
|
221
|
+
# envfile = ".env.agebox"
|
|
201
222
|
|
|
202
223
|
decryption.key.path = "~/.config/cottage/identity:~/.ssh"
|
|
203
224
|
decryption.key.env = "COTTAGE_IDENTITY"
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<picture>
|
|
3
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://s15.gifyu.com/images/buXVO.png">
|
|
4
|
-
<source media="(prefers-color-scheme: light)" srcset="https://s15.gifyu.com/images/buXZJ.png">
|
|
5
3
|
<img alt="The settingspec cover" width="100%" src="https://s15.gifyu.com/images/buXZJ.png">
|
|
6
4
|
</picture>
|
|
7
5
|
</p>
|
|
@@ -13,7 +11,8 @@
|
|
|
13
11
|
|
|
14
12
|
# SettingSpec
|
|
15
13
|
|
|
16
|
-
1. [
|
|
14
|
+
1. [Install](#install)
|
|
15
|
+
2. [Concepts](#concepts)
|
|
17
16
|
1. [Single file convenience](#single-file-convenience)
|
|
18
17
|
2. [Declarative profiles as environments](#declarative-profiles-as-environments)
|
|
19
18
|
3. [Language independent](#language-independent)
|
|
@@ -21,7 +20,29 @@
|
|
|
21
20
|
1. [SecretSpec](#secretspec)
|
|
22
21
|
2. [Dotenv](#dotenv)
|
|
23
22
|
3. [Cottage or agebox](#cottage-or-agebox)
|
|
24
|
-
|
|
23
|
+
3. [Learn more](#learn-more)
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# rust: cargo-binstall/cargo
|
|
29
|
+
cargo binstall --locked settingspec
|
|
30
|
+
cargo install --locked settingspec
|
|
31
|
+
|
|
32
|
+
# python: pip/uv/uvx
|
|
33
|
+
pip install settingspec
|
|
34
|
+
uv pip install settingspec
|
|
35
|
+
uvx settingspec --version
|
|
36
|
+
|
|
37
|
+
# node: yarn/pnpm/npx
|
|
38
|
+
yarn global add @sayanarijit/settingspec
|
|
39
|
+
pnpm add -g @sayanarijit/settingspec
|
|
40
|
+
npx @sayanarijit/settingspec --version
|
|
41
|
+
|
|
42
|
+
# container: docker/podman
|
|
43
|
+
docker run --rm -v $PWD:/app ghcr.io/sayanarijit/settingspec --version
|
|
44
|
+
podman run --rm -v $PWD:/app ghcr.io/sayanarijit/settingspec --version
|
|
45
|
+
```
|
|
25
46
|
|
|
26
47
|
## Concepts
|
|
27
48
|
|
|
@@ -54,7 +75,7 @@ key2._ = { # Strictly define different values for different profiles
|
|
|
54
75
|
|
|
55
76
|
Overrides are intentional and kept in plain sight (see `key1`).
|
|
56
77
|
|
|
57
|
-
By not defining a default value, you can ensure that you never miss adding a value for a specific profile (e.g. this file will refuse to load if `key2.prod` declaration is missing).
|
|
78
|
+
By not defining a default value, you can ensure that you never miss adding a value for a specific profile (e.g. this file will refuse to load if `key2._.prod` declaration is missing).
|
|
58
79
|
|
|
59
80
|
### Language independent
|
|
60
81
|
|
|
@@ -179,8 +200,8 @@ Too simple? Use [Cottage](https://cottage-cli.pages.dev) or [agebox](https://git
|
|
|
179
200
|
|
|
180
201
|
```toml
|
|
181
202
|
[spec]
|
|
182
|
-
envfile
|
|
183
|
-
# envfile
|
|
203
|
+
envfile = ".env.cott.age"
|
|
204
|
+
# envfile = ".env.agebox"
|
|
184
205
|
|
|
185
206
|
decryption.key.path = "~/.config/cottage/identity:~/.ssh"
|
|
186
207
|
decryption.key.env = "COTTAGE_IDENTITY"
|
|
@@ -6,7 +6,8 @@ use crate::model::*;
|
|
|
6
6
|
use crate::parser::parse_config_str;
|
|
7
7
|
use crate::profile::resolve_active_profile;
|
|
8
8
|
use crate::resolver::resolve_settings;
|
|
9
|
-
use clap::
|
|
9
|
+
use clap::builder::styling::*;
|
|
10
|
+
use clap::{CommandFactory, Parser, Subcommand};
|
|
10
11
|
use std::collections::{HashMap, HashSet};
|
|
11
12
|
use std::io::Write;
|
|
12
13
|
use std::path::{Path, PathBuf};
|
|
@@ -31,12 +32,14 @@ impl Drop for CleanupGuard {
|
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
|
|
35
|
+
const STYLES: Styles = Styles::styled()
|
|
36
|
+
.header(AnsiColor::Green.on_default().bold())
|
|
37
|
+
.usage(AnsiColor::Green.on_default().bold())
|
|
38
|
+
.literal(AnsiColor::Cyan.on_default().bold())
|
|
39
|
+
.placeholder(AnsiColor::Cyan.on_default().dimmed());
|
|
40
|
+
|
|
34
41
|
#[derive(Parser, Debug)]
|
|
35
|
-
#[command(
|
|
36
|
-
name = "settingspec",
|
|
37
|
-
version,
|
|
38
|
-
about = "One file for all environments, all languages, all submodules."
|
|
39
|
-
)]
|
|
42
|
+
#[command(author, version, about, styles = STYLES, long_about = None, arg_required_else_help = true)]
|
|
40
43
|
pub struct Cli {
|
|
41
44
|
#[command(subcommand)]
|
|
42
45
|
pub command: Commands,
|
|
@@ -60,6 +63,16 @@ pub enum Commands {
|
|
|
60
63
|
|
|
61
64
|
/// Deletes all generated export files
|
|
62
65
|
Clean,
|
|
66
|
+
|
|
67
|
+
#[cfg(feature = "autocomplete")]
|
|
68
|
+
/// Generate shell completions.
|
|
69
|
+
/// Example: `eval "$(settingspec autocomplete bash)"` to load completions for bash.
|
|
70
|
+
#[command(name = "autocomplete")]
|
|
71
|
+
AutoComplete {
|
|
72
|
+
/// The shell to generate completions for.
|
|
73
|
+
#[arg(value_enum)]
|
|
74
|
+
shell: clap_complete::Shell,
|
|
75
|
+
},
|
|
63
76
|
}
|
|
64
77
|
|
|
65
78
|
pub const INIT_CONFIG: &str = r#"[spec]
|
|
@@ -67,8 +80,7 @@ profile.options = ["local", "prod"]
|
|
|
67
80
|
profile.default = "local" # Switch via $SETTINGSPEC_PROFILE
|
|
68
81
|
|
|
69
82
|
[settings]
|
|
70
|
-
key._.
|
|
71
|
-
key._.prod.env = "KEY" # Load from $KEY when active profile is "prod"
|
|
83
|
+
key._.default.val = "value"
|
|
72
84
|
"#;
|
|
73
85
|
|
|
74
86
|
pub fn init_config() -> Result<()> {
|
|
@@ -158,9 +170,8 @@ pub fn run_cli() -> Result<()> {
|
|
|
158
170
|
match cli.command {
|
|
159
171
|
Commands::Init => init_config(),
|
|
160
172
|
Commands::Check => {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
Ok(())
|
|
173
|
+
let ctx = load_and_resolve()?;
|
|
174
|
+
validate_exports(&ctx)
|
|
164
175
|
}
|
|
165
176
|
Commands::Export => {
|
|
166
177
|
let ctx = load_and_resolve()?;
|
|
@@ -173,9 +184,18 @@ pub fn run_cli() -> Result<()> {
|
|
|
173
184
|
}
|
|
174
185
|
Commands::Watch => run_watch(),
|
|
175
186
|
Commands::Clean => clean_exported_files(),
|
|
187
|
+
Commands::AutoComplete { shell } => generate_autocompletions(shell),
|
|
176
188
|
}
|
|
177
189
|
}
|
|
178
190
|
|
|
191
|
+
fn generate_autocompletions(shell: clap_complete::Shell) -> Result<()> {
|
|
192
|
+
let mut cmd = Cli::command();
|
|
193
|
+
let mut out = std::io::stdout();
|
|
194
|
+
let bin_name = cmd.get_name().to_string();
|
|
195
|
+
clap_complete::generate(shell, &mut cmd, bin_name, &mut out);
|
|
196
|
+
Ok(())
|
|
197
|
+
}
|
|
198
|
+
|
|
179
199
|
fn run_watch() -> Result<()> {
|
|
180
200
|
let ctx = load_and_resolve()?;
|
|
181
201
|
let config_path = ctx.project_root.join("settingspec.toml");
|
|
@@ -249,6 +269,31 @@ fn run_watch() -> Result<()> {
|
|
|
249
269
|
Ok(())
|
|
250
270
|
}
|
|
251
271
|
|
|
272
|
+
/// Generates every configured export in memory, without writing anything, so
|
|
273
|
+
/// that unsupported combinations are reported by `check`.
|
|
274
|
+
fn validate_exports(ctx: &ExecutionContext) -> Result<()> {
|
|
275
|
+
let resolve = ctx.doc.spec.export.resolve;
|
|
276
|
+
|
|
277
|
+
for (file_path_str, filter) in &ctx.doc.spec.export.file {
|
|
278
|
+
if *filter == ExportFilter::Disabled {
|
|
279
|
+
continue;
|
|
280
|
+
}
|
|
281
|
+
let filtered_settings: Vec<ResolvedSetting> = ctx
|
|
282
|
+
.resolved_settings
|
|
283
|
+
.iter()
|
|
284
|
+
.filter(|s| matches_filter(filter, s))
|
|
285
|
+
.cloned()
|
|
286
|
+
.collect();
|
|
287
|
+
generate_by_path(Path::new(file_path_str), &filtered_settings, resolve)?;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
if let Some(ref stdout_fmt) = ctx.doc.spec.export.stdout {
|
|
291
|
+
generate_by_format(stdout_fmt, &ctx.resolved_settings, resolve)?;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
Ok(())
|
|
295
|
+
}
|
|
296
|
+
|
|
252
297
|
fn perform_export(ctx: &ExecutionContext) -> Result<Vec<PathBuf>> {
|
|
253
298
|
auto_append_gitignore(ctx)?;
|
|
254
299
|
|
|
@@ -268,14 +313,18 @@ fn perform_export(ctx: &ExecutionContext) -> Result<Vec<PathBuf>> {
|
|
|
268
313
|
.collect();
|
|
269
314
|
|
|
270
315
|
let path = Path::new(file_path_str);
|
|
271
|
-
let output = generate_by_path(path, &filtered_settings)?;
|
|
316
|
+
let output = generate_by_path(path, &filtered_settings, ctx.doc.spec.export.resolve)?;
|
|
272
317
|
write_export_file(path, &output, ctx.doc.spec.export.mode)?;
|
|
273
318
|
generated_files.push(path.to_path_buf());
|
|
274
319
|
}
|
|
275
320
|
|
|
276
321
|
// 2. Stdout export if configured
|
|
277
322
|
if let Some(ref stdout_fmt) = ctx.doc.spec.export.stdout {
|
|
278
|
-
let output = generate_by_format(
|
|
323
|
+
let output = generate_by_format(
|
|
324
|
+
stdout_fmt,
|
|
325
|
+
&ctx.resolved_settings,
|
|
326
|
+
ctx.doc.spec.export.resolve,
|
|
327
|
+
)?;
|
|
279
328
|
print!("{}", output);
|
|
280
329
|
}
|
|
281
330
|
|
|
@@ -307,7 +356,7 @@ fn execute_run(ctx: &ExecutionContext, command_args: &[String]) -> Result<()> {
|
|
|
307
356
|
})?;
|
|
308
357
|
|
|
309
358
|
let stdin_payload = if let Some(ref stdin_fmt) = ctx.doc.spec.export.stdin {
|
|
310
|
-
Some(generate_by_format(stdin_fmt, &ctx.resolved_settings)?)
|
|
359
|
+
Some(generate_by_format(stdin_fmt, &ctx.resolved_settings, true)?)
|
|
311
360
|
} else {
|
|
312
361
|
None
|
|
313
362
|
};
|