@ivaniscoding/celq-linux-arm64 0.1.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.
Files changed (3) hide show
  1. package/README.md +73 -13
  2. package/bin/celq +0 -0
  3. package/package.json +2 -2
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
- Closely related formats such as NDJSON and JSON5 are also supported.
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), [JavaScript](https://github.com/marcbachmann/cel-js), [Rust](https://github.com/cel-rust/cel-rust), and possibly more languages.
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
 
@@ -35,21 +35,54 @@ Moreover, the CEL specification is simpler than the jqlang specification. If you
35
35
 
36
36
  ### Pre-built Binaries
37
37
 
38
- We publish pre-built binaries in celq's [GitHub Releases page](https://github.com/IvanIsCoding/celq/releases).
38
+ We publish pre-built binaries for Linux, macOS, and Windows in celq's [GitHub Releases page](https://github.com/IvanIsCoding/celq/releases). To install the current version for Linux or macOS, run:
39
+
40
+ ```bash
41
+ curl --proto '=https' --tlsv1.2 -sSf https://get-celq.github.io/install.sh | bash
42
+ ```
43
+
44
+ Notice that the installer tries not to be clever and doesn't modify `$PATH` or overwrite existing files. To specify a destination, use the `--to` flag:
45
+
46
+ ```bash
47
+ curl --proto '=https' --tlsv1.2 -sSf https://get-celq.github.io/install.sh | \
48
+ bash -s -- --to DESTINATION
49
+ ```
50
+
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.
39
52
 
40
53
  ### Homebrew (macOS)
41
54
 
42
55
  If you are a [macOS Homebrew](https://brew.sh/) user, then you can install celq with:
43
56
 
44
57
  ```bash
45
- brew install IvanIsCoding/tap/celq
58
+ brew install get-celq/tap/celq
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
46
76
  ```
77
+
78
+ ### Cargo
79
+
47
80
  #### Installing From Source
48
81
 
49
82
  If you want to install from source, celq publishes to [crates.io](https://crates.io/crates/celq).
50
83
 
51
84
  ```bash
52
- cargo install celq
85
+ cargo install celq --locked
53
86
  ```
54
87
 
55
88
  #### Installing With cargo-binstall
@@ -81,26 +114,51 @@ Node.js users can install celq in their project with:
81
114
  npm install celq
82
115
  ```
83
116
 
84
- This adds celq to `package.json` and makes it available for scripts. It's also possible to run single commands with:
117
+ This adds celq to `package.json` and makes it available for scripts. It's also possible to run single commands with [npx](https://docs.npmjs.com/cli/v8/commands/npx):
85
118
 
86
119
  ```bash
87
120
  npx celq -n '"Hello World"'
88
121
  ```
89
122
 
90
- ## Limitations
123
+ ### GitHub Actions
91
124
 
92
- ### CEL Implementation Differences
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:
93
126
 
94
- `celq` uses [cel-rust](https://github.com/cel-rust/cel-rust), a community-maintained Rust implementation of CEL, rather than the official Go implementation.
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):
95
141
 
96
- While `cel-rust` provides excellent compatibility with the CEL specification, there may be edge cases or advanced features where behavior differs from the official implementation. If you find one, feel free to report it at their repository.
142
+ ```yaml
143
+ - uses: taiki-e/install-action@v2
144
+ with:
145
+ tool: celq
146
+ ```
147
+
148
+ ## Limitations
97
149
 
98
- ### JSON Parsing
150
+ ### Eager JSON Parsing
99
151
 
100
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.
101
153
 
102
154
  Currently, there are no benchmarks for `celq`. I believe the tool is "good enough" for my personal use. That might be revisited in the future. In the meantime, expect `celq` to be slower than `jq`.
103
155
 
156
+ ### CEL Implementation Differences
157
+
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.
159
+
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.
161
+
104
162
  ### List and Map Arguments
105
163
 
106
164
  Currently, the `--arg` syntax only supports `int`, `bool`, `float`, and `string`. Support for other CEL types will be added in the future.
@@ -111,9 +169,9 @@ Currently, the `--arg` syntax only supports `int`, `bool`, `float`, and `string`
111
169
 
112
170
  While conceptually interesting, `celq` does not aim to be a CEL REPL. In the original author's view, that should live on a separate binary.
113
171
 
114
- ### YAML Support
172
+ ### Full YAML Support
115
173
 
116
- `celq` works with JSON. I originally considered supporting YAML as a supported input format. However, the amount of YAML edge cases pushed me back to JSON. Although that might change in the future, please do not open an issue asking for YAML support as of today.
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.
117
175
 
118
176
  ## Acknowledgments
119
177
 
@@ -132,6 +190,8 @@ All the documentation in the manual has been hand-crafted. That was done to keep
132
190
 
133
191
  This project is dual-licensed under the MIT License and Apache 2.0 licenses. See [LICENSE-MIT](LICENSE-MIT) and [LICENSE-APACHE](LICENSE-APACHE) file for details.
134
192
 
193
+ The `install.sh` published with each GitHub release and its template at the root of the repository (`template_install.sh`) are licensed independently. Those files are under the CC0-1.0 license. They are the original work of Casey Rodarmor from [just](https://github.com/casey/just) and have been adapted for celq.
194
+
135
195
  ## Contributing
136
196
 
137
197
  Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
package/bin/celq CHANGED
Binary file
package/package.json CHANGED
@@ -15,11 +15,11 @@
15
15
  ],
16
16
  "publishConfig": {
17
17
  "access": "public",
18
- "tag": "stable"
18
+ "tag": "prerelease"
19
19
  },
20
20
  "repository": {
21
21
  "type": "git",
22
22
  "url": "git+https://github.com/IvanIsCoding/celq.git"
23
23
  },
24
- "version": "0.1.1"
24
+ "version": "0.2.0-alpha.1"
25
25
  }