qrlkit 0.12.1 → 0.13.0
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.
- package/README.md +36 -22
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -392,42 +392,56 @@ NAME = "{shared.name}"
|
|
|
392
392
|
|
|
393
393
|
### Composition
|
|
394
394
|
|
|
395
|
-
|
|
395
|
+
`qrlkit` offers a few ways to compose one QRL from multiple others. First principle is that everything is callable and referenceable if its not `hidden = true`.
|
|
396
396
|
|
|
397
|
-
|
|
398
|
-
# Reference another QRL's value or URL
|
|
399
|
-
url = "{project.home}/issues"
|
|
397
|
+
** One QRL calls another**
|
|
400
398
|
```
|
|
399
|
+
[qrl-1]
|
|
400
|
+
url = "https:/..."
|
|
401
401
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
[branch]
|
|
405
|
-
run = "git branch --show-current"
|
|
402
|
+
[qrl-1.qrl-2]
|
|
403
|
+
run = 'echo "sub/path"'
|
|
406
404
|
|
|
407
|
-
[
|
|
408
|
-
url = "{
|
|
405
|
+
[qrl-3]
|
|
406
|
+
url = "{qrl-1}/{qrl-1.qrl-2}"
|
|
409
407
|
```
|
|
408
|
+
Not here its possible to chain keys with a dot like `objs.fruits.apples`.
|
|
409
|
+
|
|
410
|
+
** Group static fields and ref them**
|
|
410
411
|
|
|
411
412
|
```toml
|
|
412
|
-
|
|
413
|
-
[
|
|
414
|
-
|
|
413
|
+
[args]
|
|
414
|
+
floors = ["1", "2", "3"]
|
|
415
|
+
apartment = ["a", "b", "c"]
|
|
415
416
|
|
|
416
|
-
[
|
|
417
|
-
url = "https://{
|
|
417
|
+
[ding]
|
|
418
|
+
url = "https://ding-a.door/{floor}/{apartment}"
|
|
419
|
+
args = [
|
|
420
|
+
{ name = "floor", enum = { ref = "args.floors" } },
|
|
421
|
+
{ name = "apartment", enum = { ref = "args.apartment" } },
|
|
422
|
+
]
|
|
418
423
|
```
|
|
419
424
|
|
|
425
|
+
**Dynamically look up keys**
|
|
426
|
+
|
|
420
427
|
```toml
|
|
421
|
-
|
|
422
|
-
[
|
|
423
|
-
|
|
424
|
-
|
|
428
|
+
[args]
|
|
429
|
+
project = ["docs", "status"]
|
|
430
|
+
environment = ["staging", "prod"]
|
|
431
|
+
|
|
432
|
+
[domains.docs]
|
|
433
|
+
staging = "docs-staging.example.com"
|
|
434
|
+
prod = "docs.example.com"
|
|
435
|
+
|
|
436
|
+
[domains.status]
|
|
437
|
+
staging = "status-staging.example.com"
|
|
438
|
+
prod = "status.example.com"
|
|
425
439
|
|
|
426
|
-
[
|
|
427
|
-
url = "https://{
|
|
440
|
+
[site]
|
|
441
|
+
url = "https://{domains[args.project, args.environment]}"
|
|
428
442
|
```
|
|
429
443
|
|
|
430
|
-
|
|
444
|
+
Here `domains[args.project, args.environment]` resolves by first prompting for project (`docs` or `status`) and then use that to select either `[domains.docs]` or `[domains.status]` and prompt for a environment (`staging` or `prod`).
|
|
431
445
|
|
|
432
446
|
### Hints and hidden groups
|
|
433
447
|
|
package/package.json
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"README.md"
|
|
10
10
|
],
|
|
11
11
|
"optionalDependencies": {
|
|
12
|
-
"qrlkit-darwin-arm64": "0.
|
|
13
|
-
"qrlkit-darwin-x64": "0.
|
|
14
|
-
"qrlkit-linux-arm64": "0.
|
|
15
|
-
"qrlkit-linux-x64": "0.
|
|
12
|
+
"qrlkit-darwin-arm64": "0.13.0",
|
|
13
|
+
"qrlkit-darwin-x64": "0.13.0",
|
|
14
|
+
"qrlkit-linux-arm64": "0.13.0",
|
|
15
|
+
"qrlkit-linux-x64": "0.13.0"
|
|
16
16
|
},
|
|
17
17
|
"os": [
|
|
18
18
|
"linux",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://github.com/qrlkit/qrlkit-rs/issues"
|
|
36
36
|
},
|
|
37
|
-
"version": "0.
|
|
37
|
+
"version": "0.13.0"
|
|
38
38
|
}
|