@ivaniscoding/celq-linux-arm64 0.1.2-alpha.1 → 0.2.0-alpha.1
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 +52 -7
- package/bin/celq +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,13 +19,13 @@ celq -n --arg='fruit:string=apple' 'fruit.contains("a")'
|
|
|
19
19
|
# Outputs: true
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Popular configuration formats such as JSON5, YAML, and TOML are supported. The closely related format NDJSON is also supported.
|
|
23
23
|
|
|
24
24
|
For detailed usage examples and recipes, see the [manual](https://docs.rs/celq/latest/celq/).
|
|
25
25
|
|
|
26
26
|
## Why?
|
|
27
27
|
|
|
28
|
-
There are implementations of CEL for [Go](https://github.com/google/cel-go), [C++](https://github.com/google/cel-cpp), [Python](https://github.com/cloud-custodian/cel-python), [
|
|
28
|
+
There are implementations of CEL for [Go](https://github.com/google/cel-go), [Java](https://github.com/google/cel-java), [C++](https://github.com/google/cel-cpp), [JavaScript](https://github.com/marcbachmann/cel-js), [Python](https://github.com/cloud-custodian/cel-python), [C#](https://github.com/telus-oss/cel-net), [Rust](https://github.com/cel-rust/cel-rust), [Ruby](https://gitlab.com/os85/cel-ruby), and possibly more languages.
|
|
29
29
|
|
|
30
30
|
`celq` brings the same CEL syntax to the command-line. `celq` is not necessarily better than jq, but perhaps it makes it easier to reuse snippets of code accross multiple places.
|
|
31
31
|
|
|
@@ -48,7 +48,7 @@ curl --proto '=https' --tlsv1.2 -sSf https://get-celq.github.io/install.sh | \
|
|
|
48
48
|
bash -s -- --to DESTINATION
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
See the the [installation guide](https://docs.rs/celq/latest/celq/) for more details on the installer such as `--force` to replace existing binaries, `--target` to specify which binary to download, versioned URLs, GitHub tokens, and more.
|
|
51
|
+
See the the [installation guide](https://docs.rs/celq/latest/celq/installation_guide) for more details on the installer such as `--force` to replace existing binaries, `--target` to specify which binary to download, versioned URLs, GitHub tokens, and more.
|
|
52
52
|
|
|
53
53
|
### Homebrew (macOS)
|
|
54
54
|
|
|
@@ -57,12 +57,32 @@ If you are a [macOS Homebrew](https://brew.sh/) user, then you can install celq
|
|
|
57
57
|
```bash
|
|
58
58
|
brew install get-celq/tap/celq
|
|
59
59
|
```
|
|
60
|
+
|
|
61
|
+
### Chocolatey (Windows)
|
|
62
|
+
|
|
63
|
+
If you are a [Chocolatey](https://community.chocolatey.org/) user on Windows, you can install `celq` with:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
choco install celq
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Scoop (Windows)
|
|
70
|
+
|
|
71
|
+
If you are a [Scoop](https://scoop.sh/) user on Windows, you can install `celq` with:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
scoop bucket add get-celq https://github.com/get-celq/scoop-bucket
|
|
75
|
+
scoop install get-celq/celq
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Cargo
|
|
79
|
+
|
|
60
80
|
#### Installing From Source
|
|
61
81
|
|
|
62
82
|
If you want to install from source, celq publishes to [crates.io](https://crates.io/crates/celq).
|
|
63
83
|
|
|
64
84
|
```bash
|
|
65
|
-
cargo install celq
|
|
85
|
+
cargo install celq --locked
|
|
66
86
|
```
|
|
67
87
|
|
|
68
88
|
#### Installing With cargo-binstall
|
|
@@ -100,9 +120,34 @@ This adds celq to `package.json` and makes it available for scripts. It's also p
|
|
|
100
120
|
npx celq -n '"Hello World"'
|
|
101
121
|
```
|
|
102
122
|
|
|
123
|
+
### GitHub Actions
|
|
124
|
+
|
|
125
|
+
`celq` can be used in GitHub actions. For one-off commands, the [get-celq/celq-action](https://github.com/get-celq/celq-action) is the quickest way:
|
|
126
|
+
|
|
127
|
+
```yaml
|
|
128
|
+
- name: Example Celq Action
|
|
129
|
+
id: exampleID
|
|
130
|
+
uses: get-celq/celq-action@main
|
|
131
|
+
with:
|
|
132
|
+
cmd: celq 'this.exampleID' < example.json
|
|
133
|
+
|
|
134
|
+
- name: Reuse a variable obtained in another step
|
|
135
|
+
run: echo ${{ steps.exampleID.outputs.result }}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
See the [installation guide](https://docs.rs/celq/latest/celq/installation_guide) for more details on GitHub actions such as pinning the `celq` version and the Action itself.
|
|
139
|
+
|
|
140
|
+
If you are going to use `celq` in scripts or for multiple calls, we recommend using [taiki-e/install-action](https://github.com/taiki-e/install-action):
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
- uses: taiki-e/install-action@v2
|
|
144
|
+
with:
|
|
145
|
+
tool: celq
|
|
146
|
+
```
|
|
147
|
+
|
|
103
148
|
## Limitations
|
|
104
149
|
|
|
105
|
-
### JSON Parsing
|
|
150
|
+
### Eager JSON Parsing
|
|
106
151
|
|
|
107
152
|
`celq` eagerly parses all JSON input into memory before evaluation. This design was made to simplify the code implementation, at the cost of memory and performance.
|
|
108
153
|
|
|
@@ -112,7 +157,7 @@ Currently, there are no benchmarks for `celq`. I believe the tool is "good enoug
|
|
|
112
157
|
|
|
113
158
|
`celq` uses [cel-rust](https://github.com/cel-rust/cel-rust), a community-maintained Rust implementation of CEL, rather than the official Go implementation.
|
|
114
159
|
|
|
115
|
-
|
|
160
|
+
There may be edge cases or advanced features where behavior differs from the official implementation. If you find one, open an issue at the celq repository and we'll triage the issue before sending it to cel-rust.
|
|
116
161
|
|
|
117
162
|
### List and Map Arguments
|
|
118
163
|
|
|
@@ -126,7 +171,7 @@ While conceptually interesting, `celq` does not aim to be a CEL REPL. In the ori
|
|
|
126
171
|
|
|
127
172
|
### Full YAML Support
|
|
128
173
|
|
|
129
|
-
`celq` works with JSON. YAML
|
|
174
|
+
`celq` works with JSON. YAML is supported as a best-effort. If the ingested YAML can be translated to JSON, `celq` most likely works fine. Full YAML support is out-of-scope, as the specification has too many edge cases.
|
|
130
175
|
|
|
131
176
|
## Acknowledgments
|
|
132
177
|
|
package/bin/celq
CHANGED
|
Binary file
|
package/package.json
CHANGED