settingspec 0.5.1__tar.gz → 0.6.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.5.1 → settingspec-0.6.0}/Cargo.lock +1 -1
- {settingspec-0.5.1 → settingspec-0.6.0}/Cargo.toml +1 -1
- {settingspec-0.5.1 → settingspec-0.6.0}/PKG-INFO +4 -3
- {settingspec-0.5.1 → settingspec-0.6.0}/README.md +3 -2
- {settingspec-0.5.1 → settingspec-0.6.0}/src/cli.rs +15 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/LICENSE-APACHE +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/LICENSE-MIT +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/pyproject.toml +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/envfile.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/error.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/filter.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/generator/common.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/generator/env.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/generator/javascript.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/generator/json.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/generator/lua.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/generator/mod.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/generator/python.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/generator/toml.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/generator/tree.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/generator/typescript.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/generator/yaml.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/lib.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/main.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/model.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/parser.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/profile.rs +0 -0
- {settingspec-0.5.1 → settingspec-0.6.0}/src/resolver.rs +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: settingspec
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
@@ -196,10 +196,11 @@ Too simple? Use [Cottage](https://cottage-cli.pages.dev) or [agebox](https://git
|
|
|
196
196
|
```toml
|
|
197
197
|
[spec]
|
|
198
198
|
envfile.default = ".env.cott.age"
|
|
199
|
+
# envfile.default = ".env.agebox"
|
|
199
200
|
|
|
200
|
-
# decryption.key.env = "AGEBOX_PRIVATE_KEYS"
|
|
201
|
-
# decryption.key.env = "COTTAGE_IDENTITY"
|
|
202
201
|
decryption.key.path = "~/.config/cottage/identity:~/.ssh"
|
|
202
|
+
decryption.key.env = "COTTAGE_IDENTITY"
|
|
203
|
+
# decryption.key.env = "AGEBOX_PRIVATE_KEYS"
|
|
203
204
|
|
|
204
205
|
[settings]
|
|
205
206
|
secret.default.env = "SECRET"
|
|
@@ -179,10 +179,11 @@ Too simple? Use [Cottage](https://cottage-cli.pages.dev) or [agebox](https://git
|
|
|
179
179
|
```toml
|
|
180
180
|
[spec]
|
|
181
181
|
envfile.default = ".env.cott.age"
|
|
182
|
+
# envfile.default = ".env.agebox"
|
|
182
183
|
|
|
183
|
-
# decryption.key.env = "AGEBOX_PRIVATE_KEYS"
|
|
184
|
-
# decryption.key.env = "COTTAGE_IDENTITY"
|
|
185
184
|
decryption.key.path = "~/.config/cottage/identity:~/.ssh"
|
|
185
|
+
decryption.key.env = "COTTAGE_IDENTITY"
|
|
186
|
+
# decryption.key.env = "AGEBOX_PRIVATE_KEYS"
|
|
186
187
|
|
|
187
188
|
[settings]
|
|
188
189
|
secret.default.env = "SECRET"
|
|
@@ -57,6 +57,9 @@ pub enum Commands {
|
|
|
57
57
|
},
|
|
58
58
|
/// Watches settingspec.toml and regenerates exports whenever it changes
|
|
59
59
|
Watch,
|
|
60
|
+
|
|
61
|
+
/// Deletes all generated export files
|
|
62
|
+
Clean,
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
pub const INIT_CONFIG: &str = r#"[spec]
|
|
@@ -169,6 +172,7 @@ pub fn run_cli() -> Result<()> {
|
|
|
169
172
|
execute_run(&ctx, &command)
|
|
170
173
|
}
|
|
171
174
|
Commands::Watch => run_watch(),
|
|
175
|
+
Commands::Clean => clean_exported_files(),
|
|
172
176
|
}
|
|
173
177
|
}
|
|
174
178
|
|
|
@@ -278,6 +282,17 @@ fn perform_export(ctx: &ExecutionContext) -> Result<Vec<PathBuf>> {
|
|
|
278
282
|
Ok(generated_files)
|
|
279
283
|
}
|
|
280
284
|
|
|
285
|
+
fn clean_exported_files() -> Result<()> {
|
|
286
|
+
let ctx = load_and_resolve()?;
|
|
287
|
+
|
|
288
|
+
let _guard = CleanupGuard {
|
|
289
|
+
keep: false,
|
|
290
|
+
paths: ctx.doc.spec.export.file.keys().map(PathBuf::from).collect(),
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
Ok(())
|
|
294
|
+
}
|
|
295
|
+
|
|
281
296
|
fn execute_run(ctx: &ExecutionContext, command_args: &[String]) -> Result<()> {
|
|
282
297
|
if command_args.is_empty() {
|
|
283
298
|
return Err(SettingSpecError::InvalidToml(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|