@webbdays/tailcall 0.0.1-security → 0.0.21

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.

Potentially problematic release.


This version of @webbdays/tailcall might be problematic. Click here for more details.

package/package.json CHANGED
@@ -1,6 +1,41 @@
1
1
  {
2
+ "description": "A high-performance GraphQL proxy, optimized for cloud-native environments, covering edge, middle, and service layers.",
3
+ "license": "Apache-2.0",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/tailcallhq/tailcall"
7
+ },
8
+ "homepage": "https://tailcall.run/",
9
+ "keywords": [
10
+ "graphql",
11
+ "proxy",
12
+ "api-gateway",
13
+ "rust",
14
+ "http",
15
+ "grpc",
16
+ "bff",
17
+ "backend-for-frontend",
18
+ "microservices",
19
+ "high-performance",
20
+ "edge"
21
+ ],
2
22
  "name": "@webbdays/tailcall",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
6
- }
23
+ "type": "module",
24
+ "version": "0.0.21",
25
+ "scarfSettings": {
26
+ "defaultOptIn": true,
27
+ "allowTopLevel": true
28
+ },
29
+ "dependencies": {
30
+ "detect-libc": "^2.0.2",
31
+ "@scarf/scarf": "^1.3.0",
32
+ "yaml": "^2.3.3"
33
+ },
34
+ "scripts": {
35
+ "postinstall": "node ./scripts/post-install.js",
36
+ "preinstall": "node ./scripts/pre-install.js"
37
+ },
38
+ "bin": {
39
+ "tailcall": "./bin/tailcall"
40
+ }
41
+ }
package/platforms.yaml ADDED
@@ -0,0 +1,80 @@
1
+ build:
2
+ [
3
+ linux-x64-gnu,
4
+ linux-x64-musl,
5
+ linux-arm64-gnu,
6
+ linux-arm64-musl,
7
+ linux-ia32-gnu,
8
+ darwin-arm64,
9
+ darwin-x64,
10
+ win32-x64-msvc,
11
+ win32-arm64-msvc,
12
+ win32-ia32-msvc,
13
+ ]
14
+ include:
15
+ - build: linux-x64-gnu
16
+ os: ubuntu-latest
17
+ rust: stable
18
+ target: x86_64-unknown-linux-gnu
19
+ libc: glibc
20
+
21
+ - build: linux-x64-musl
22
+ os: ubuntu-latest
23
+ rust: stable
24
+ target: x86_64-unknown-linux-musl
25
+ libc: musl
26
+ cross: true
27
+
28
+ - build: linux-arm64-gnu
29
+ os: ubuntu-latest
30
+ rust: stable
31
+ target: aarch64-unknown-linux-gnu
32
+ libc: glibc
33
+ cross: true
34
+
35
+ - build: linux-arm64-musl
36
+ os: ubuntu-latest
37
+ rust: stable
38
+ target: aarch64-unknown-linux-musl
39
+ libc: musl
40
+ cross: true
41
+
42
+ - build: linux-ia32-gnu
43
+ os: ubuntu-latest
44
+ rust: stable
45
+ target: i686-unknown-linux-gnu
46
+ libc: glibc
47
+ cross: true
48
+
49
+ - build: darwin-arm64
50
+ os: macos-latest
51
+ rust: stable
52
+ target: aarch64-apple-darwin
53
+
54
+ - build: darwin-x64
55
+ os: macos-latest
56
+ rust: stable
57
+ target: x86_64-apple-darwin
58
+
59
+ - build: win32-x64-msvc
60
+ os: windows-latest
61
+ rust: stable
62
+ target: x86_64-pc-windows-msvc
63
+ libc: msvc
64
+ ext: ".exe"
65
+
66
+ - build: win32-arm64-msvc
67
+ os: windows-latest
68
+ rust: stable
69
+ target: aarch64-pc-windows-msvc
70
+ features: --no-default-features --features cli
71
+ libc: msvc
72
+ ext: ".exe"
73
+ test: false # TODO: tests are broken without default features
74
+
75
+ - build: win32-ia32-msvc
76
+ os: windows-latest
77
+ rust: stable
78
+ target: i686-pc-windows-msvc
79
+ libc: msvc
80
+ ext: ".exe"
@@ -0,0 +1,80 @@
1
+ build:
2
+ [
3
+ linux-x64-gnu,
4
+ linux-x64-musl,
5
+ linux-arm64-gnu,
6
+ linux-arm64-musl,
7
+ linux-ia32-gnu,
8
+ darwin-arm64,
9
+ darwin-x64,
10
+ win32-x64-msvc,
11
+ win32-arm64-msvc,
12
+ win32-ia32-msvc,
13
+ ]
14
+ include:
15
+ - build: linux-x64-gnu
16
+ os: ubuntu-latest
17
+ rust: stable
18
+ target: x86_64-unknown-linux-gnu
19
+ libc: glibc
20
+
21
+ - build: linux-x64-musl
22
+ os: ubuntu-latest
23
+ rust: stable
24
+ target: x86_64-unknown-linux-musl
25
+ libc: musl
26
+ cross: true
27
+
28
+ - build: linux-arm64-gnu
29
+ os: ubuntu-latest
30
+ rust: stable
31
+ target: aarch64-unknown-linux-gnu
32
+ libc: glibc
33
+ cross: true
34
+
35
+ - build: linux-arm64-musl
36
+ os: ubuntu-latest
37
+ rust: stable
38
+ target: aarch64-unknown-linux-musl
39
+ libc: musl
40
+ cross: true
41
+
42
+ - build: linux-ia32-gnu
43
+ os: ubuntu-latest
44
+ rust: stable
45
+ target: i686-unknown-linux-gnu
46
+ libc: glibc
47
+ cross: true
48
+
49
+ - build: darwin-arm64
50
+ os: macos-latest
51
+ rust: stable
52
+ target: aarch64-apple-darwin
53
+
54
+ - build: darwin-x64
55
+ os: macos-latest
56
+ rust: stable
57
+ target: x86_64-apple-darwin
58
+
59
+ - build: win32-x64-msvc
60
+ os: windows-latest
61
+ rust: stable
62
+ target: x86_64-pc-windows-msvc
63
+ libc: msvc
64
+ ext: ".exe"
65
+
66
+ - build: win32-arm64-msvc
67
+ os: windows-latest
68
+ rust: stable
69
+ target: aarch64-pc-windows-msvc
70
+ features: --no-default-features --features cli
71
+ libc: msvc
72
+ ext: ".exe"
73
+ test: false # TODO: tests are broken without default features
74
+
75
+ - build: win32-ia32-msvc
76
+ os: windows-latest
77
+ rust: stable
78
+ target: i686-pc-windows-msvc
79
+ libc: msvc
80
+ ext: ".exe"
@@ -0,0 +1,44 @@
1
+ const version = "0.0.21";
2
+ // @ts-check
3
+ import {familySync, GLIBC, MUSL} from "detect-libc"
4
+ import {exec} from "child_process"
5
+ import util from "util"
6
+ import get_matched_platform from "./utils.js";
7
+ import fs from "fs";
8
+ import https from "https"
9
+
10
+ const execa = util.promisify(exec)
11
+ const os = process.platform
12
+ const arch = process.arch
13
+ const libcFamily =familySync();
14
+
15
+ let libc = "";
16
+ if (os === "win32") {
17
+ libc = "msvc"
18
+ } else {
19
+ libc = libcFamily === GLIBC ? "gnu" : libcFamily === MUSL ? "musl" : ""
20
+ }
21
+
22
+ const matched_platform = get_matched_platform(os, arch, libc);
23
+ if (matched_platform!=null){
24
+ const targetPlatform = matched_platform;
25
+
26
+ let targetPlatformExt = "";
27
+ if (Object.keys(targetPlatform).includes("ext")){
28
+ targetPlatformExt = "." + targetPlatform.get("ext");
29
+ }
30
+
31
+ const pkg_download_base_url = "https://github.com/tailcallhq/tailcall/releases/download/"
32
+ const specific_url = `v${version}/tailcall-${targetPlatform.get("tagret")}${targetPlatformExt}`
33
+ const full_url = pkg_download_base_url + specific_url;
34
+
35
+ console.log(`Downloading Tailcall for ${targetPlatform.get("target")}${targetPlatformExt} ...`);
36
+
37
+ https.get(full_url, (resp)=> {
38
+ const file = fs.createWriteStream("bin/tailcall");
39
+ resp.pipe(file).on("finish", ()=> {
40
+ console.log("Download completed.");
41
+ });
42
+ }
43
+ );
44
+ }
@@ -0,0 +1,23 @@
1
+ // @ts-check
2
+ import {familySync, GLIBC, MUSL} from "detect-libc"
3
+ import get_matched_platform from "./utils.js"
4
+
5
+ const os = process.platform
6
+ const arch = process.arch
7
+ const libcFamily =familySync();
8
+
9
+ let libc = ""
10
+ if (os === "win32") {
11
+ libc = "msvc"
12
+ } else {
13
+ libc = libcFamily === GLIBC ? "gnu" : libcFamily === MUSL ? "musl" : ""
14
+ }
15
+
16
+ const matched_platform = get_matched_platform(os, arch, libc)
17
+
18
+ if (matched_platform==null) {
19
+ const redColor = "\x1b[31m"
20
+ const resetColor = "\x1b[0m"
21
+ console.error(`${redColor} Tailcall does not support platform - ${os}, arch - ${arch}, libc - ${libc} ${resetColor}`)
22
+ process.exit(1)
23
+ }
@@ -0,0 +1,19 @@
1
+ import fs from "fs"
2
+ import YML from "yaml"
3
+
4
+ export default function get_matched_platform(os, arch, libc) {
5
+ const file = fs.readFileSync("./platforms.yaml", "utf8")
6
+ const json_data = YML.parse(file,{mapAsMap:true});
7
+
8
+ let found = null;
9
+ json_data.get("include").forEach((platform) => {
10
+ const split = platform.get("build").split("-");
11
+ const platform_arch = split.at(1)
12
+ const platform_os = split.at(0)
13
+ const platform_libc = split.at(-1);
14
+ if (platform_arch == arch && platform_os == os && platform_libc == libc) {
15
+ found = platform;
16
+ }
17
+ })
18
+ return found;
19
+ }