gregale 0.1.18-rc.224

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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2026 Hüseyin Poyraz Küçükarslan. All rights reserved.
2
+
3
+ PROPRIETARY SOFTWARE — NOT OPEN SOURCE.
4
+
5
+ This software and its source code are made available for viewing only.
6
+ Unauthorized copying, modification, distribution, public display,
7
+ public performance, or use of this software, in whole or in part, via
8
+ any medium, is strictly prohibited without prior written permission
9
+ from the copyright holder.
10
+
11
+ To request a license to use this software, contact the copyright
12
+ holder:
13
+ - Email: hpk.poyraz@gmail.com
14
+ - GitHub: https://github.com/poyrazK
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
20
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # gregale
2
+
3
+ The CLI for [Gregale](https://github.com/poyrazK/faas) — scale-to-zero
4
+ Functions-as-a-Service on Firecracker microVMs.
5
+
6
+ ```sh
7
+ npm install -g gregale
8
+ gregale login
9
+ gregale deploy
10
+ ```
11
+
12
+ Or without installing:
13
+
14
+ ```sh
15
+ npx gregale deploy
16
+ ```
17
+
18
+ ## What this package contains
19
+
20
+ No binary. This package is a small launcher; the compiled binary arrives
21
+ through one of four `optionalDependencies`, gated on `os` and `cpu` so npm
22
+ downloads only the one matching your machine:
23
+
24
+ | Platform | Package |
25
+ |---|---|
26
+ | macOS Apple Silicon | `@gregale/cli-darwin-arm64` |
27
+ | macOS Intel | `@gregale/cli-darwin-amd64` |
28
+ | Linux x86_64 | `@gregale/cli-linux-amd64` |
29
+ | Linux arm64 | `@gregale/cli-linux-arm64` |
30
+
31
+ If the launcher reports a missing platform package, optional dependencies
32
+ were skipped during install:
33
+
34
+ ```sh
35
+ npm install --include=optional gregale
36
+ ```
37
+
38
+ **Windows is not supported yet.** The `os` field makes npm refuse the
39
+ install rather than leave you with a launcher that cannot find a binary.
40
+
41
+ ## Release channels
42
+
43
+ `latest` tracks stable releases. Pre-1.0 release candidates publish under
44
+ the `rc` tag:
45
+
46
+ ```sh
47
+ npm install -g gregale@rc
48
+ ```
49
+
50
+ ## Other install methods
51
+
52
+ ```sh
53
+ curl -fsSL https://get.gregale.dev | sh
54
+ ```
55
+
56
+ Both channels install the same binary from the same signed GitHub Release.
57
+ Shell completion and man pages come from the binary itself —
58
+ `gregale completion --help` and `gregale man`.
59
+
60
+ ## License
61
+
62
+ Proprietary. See `LICENSE`.
package/bin/gregale.js ADDED
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env node
2
+ // packaging/npm/cli/bin/gregale.js — launcher for the npm channel (ADR-172).
3
+ //
4
+ // The `gregale` npm package carries no binary. It declares the four
5
+ // @gregale/cli-<os>-<arch> packages as optionalDependencies with `os` and
6
+ // `cpu` constraints, so npm downloads exactly the one that matches the
7
+ // host and skips the rest. This shim finds that package and execs it.
8
+ //
9
+ // Why a JS shim and not a postinstall that symlinks the binary into place:
10
+ // a postinstall is skipped entirely under `npm ci --ignore-scripts`, which
11
+ // is what security-conscious CI uses. The shim costs one node startup
12
+ // (~30 ms) and always works.
13
+
14
+ "use strict";
15
+
16
+ const { spawnSync } = require("node:child_process");
17
+
18
+ // process.arch uses node's names (x64); release artifacts use Go's
19
+ // (amd64). This table is the only place the two vocabularies meet.
20
+ const TARGETS = {
21
+ "darwin-arm64": "@gregale/cli-darwin-arm64",
22
+ "darwin-x64": "@gregale/cli-darwin-amd64",
23
+ "linux-arm64": "@gregale/cli-linux-arm64",
24
+ "linux-x64": "@gregale/cli-linux-amd64",
25
+ };
26
+
27
+ function fail(message) {
28
+ process.stderr.write(`gregale: ${message}\n`);
29
+ process.exit(1);
30
+ }
31
+
32
+ function resolveBinary() {
33
+ const key = `${process.platform}-${process.arch}`;
34
+ const pkg = TARGETS[key];
35
+ if (!pkg) {
36
+ // Windows lands here only if npm's `os` gate was bypassed
37
+ // (--force). See ADR-172: cmd/gregale imports pkg/fcvm, which
38
+ // is unix-only.
39
+ fail(
40
+ `unsupported platform ${key}. gregale ships darwin and linux on ` +
41
+ `amd64/arm64. Install from https://get.gregale.dev if you believe ` +
42
+ `this is wrong.`,
43
+ );
44
+ }
45
+ try {
46
+ return require.resolve(`${pkg}/bin/gregale`);
47
+ } catch {
48
+ fail(
49
+ `the platform package ${pkg} is missing.\n` +
50
+ `This usually means npm skipped optional dependencies. Reinstall with:\n` +
51
+ ` npm install --include=optional gregale\n` +
52
+ `or install directly: curl -fsSL https://get.gregale.dev | sh`,
53
+ );
54
+ }
55
+ }
56
+
57
+ const result = spawnSync(resolveBinary(), process.argv.slice(2), {
58
+ stdio: "inherit",
59
+ });
60
+
61
+ if (result.error) {
62
+ fail(`could not run the gregale binary: ${result.error.message}`);
63
+ }
64
+
65
+ // Re-raise the child's signal so callers see a real signal death rather
66
+ // than a synthesised exit code; `gregale logs -f` interrupted with Ctrl-C
67
+ // should look interrupted to the shell.
68
+ if (result.signal) {
69
+ process.kill(process.pid, result.signal);
70
+ } else {
71
+ process.exit(result.status === null ? 1 : result.status);
72
+ }
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "gregale",
3
+ "version": "0.1.18-rc.224",
4
+ "description": "Gregale CLI — deploy and operate scale-to-zero apps on Firecracker microVMs",
5
+ "license": "SEE LICENSE IN LICENSE",
6
+ "homepage": "https://github.com/poyrazK/faas",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/poyrazK/faas.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/poyrazK/faas/issues"
13
+ },
14
+ "keywords": [
15
+ "gregale",
16
+ "faas",
17
+ "serverless",
18
+ "firecracker",
19
+ "deploy",
20
+ "cli"
21
+ ],
22
+ "bin": {
23
+ "gregale": "bin/gregale.js"
24
+ },
25
+ "files": [
26
+ "bin/gregale.js",
27
+ "LICENSE",
28
+ "README.md"
29
+ ],
30
+ "engines": {
31
+ "node": ">=18"
32
+ },
33
+ "os": [
34
+ "darwin",
35
+ "linux"
36
+ ],
37
+ "cpu": [
38
+ "x64",
39
+ "arm64"
40
+ ],
41
+ "optionalDependencies": {
42
+ "@gregale/cli-darwin-amd64": "0.1.18-rc.224",
43
+ "@gregale/cli-darwin-arm64": "0.1.18-rc.224",
44
+ "@gregale/cli-linux-amd64": "0.1.18-rc.224",
45
+ "@gregale/cli-linux-arm64": "0.1.18-rc.224"
46
+ }
47
+ }