@webbdays/tailcall 0.0.1-security → 0.0.11

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/README.md CHANGED
@@ -1,5 +1,134 @@
1
- # Security holding package
1
+ [![Tailcall Logo](https://raw.githubusercontent.com/tailcallhq/tailcall/main/assets/logo_main.svg)](https://tailcall.run)
2
2
 
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
3
+ Tailcall is an open-source solution for building [high-performance] GraphQL backends.
4
4
 
5
- Please refer to www.npmjs.com/advisories?search=%40webbdays%2Ftailcall for more information.
5
+ Please support us by giving the repository a star
6
+ ![image](https://raw.githubusercontent.com/tailcallhq/tailcall/main/assets/star-our-repo.gif)
7
+
8
+ [high-performance]: https://github.com/tailcallhq/graphql-benchmarks
9
+
10
+ [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=for-the-badge&logo=x&color=black&labelColor=black)](https://twitter.com/intent/tweet?text=%40tailcallhq%20is%20building%20a%20high-performance%20API%20Orchestration%20solution%20over%20%23GraphQL.%0A%0ACheck%20it%20out%20at%3A%0A%F0%9F%94%97%20https%3A%2F%2Ftailcall.run%20%0A%F0%9F%94%97%20https%3A%2F%2Fgithub.com%2Ftailcallhq%2Ftailcall%20%0A%0A&hashtags=api,http,rest,grpc,graphql,nocode,microservice,opensource)
11
+ [![Discord](https://img.shields.io/discord/1044859667798568962?style=for-the-badge&cacheSeconds=120&logo=discord)](https://discord.gg/kRZBPpkgwq)
12
+
13
+ [![Open Bounties](https://img.shields.io/endpoint?url=https%3A%2F%2Fconsole.algora.io%2Fapi%2Fshields%2Ftailcallhq%2Fbounties%3Fstatus%3Dopen&style=for-the-badge)](https://console.algora.io/org/tailcallhq/bounties?status=open)
14
+ [![Rewarded Bounties](https://img.shields.io/endpoint?url=https%3A%2F%2Fconsole.algora.io%2Fapi%2Fshields%2Ftailcallhq%2Fbounties%3Fstatus%3Dcompleted&style=for-the-badge)](https://console.algora.io/org/tailcallhq/bounties?status=completed)
15
+ [![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/tailcallhq/tailcall/ci.yml?style=for-the-badge)](https://github.com/tailcallhq/tailcall/actions)
16
+ ![GitHub release (by tag)](https://img.shields.io/github/downloads/tailcallhq/tailcall/total?style=for-the-badge)
17
+ [![Discord](https://img.shields.io/discord/1044859667798568962?style=for-the-badge&cacheSeconds=60)](https://discord.gg/kRZBPpkgwq)
18
+ [![Codecov](https://img.shields.io/codecov/c/github/tailcallhq/tailcall?style=for-the-badge)](https://app.codecov.io/gh/tailcallhq/tailcall)
19
+
20
+ ## Installation
21
+
22
+ ### NPM
23
+
24
+ ```bash
25
+ npm i -g @tailcallhq/tailcall
26
+ ```
27
+
28
+ ### Yarn
29
+
30
+ ```bash
31
+ yarn global add @tailcallhq/tailcall
32
+ ```
33
+
34
+ ### Home Brew
35
+
36
+ ```bash
37
+ brew tap tailcallhq/tailcall
38
+ brew install tailcall
39
+ ```
40
+
41
+ ### Curl
42
+
43
+ ```bash
44
+ curl -sSL https://raw.githubusercontent.com/tailcallhq/tailcall/master/install.sh | bash
45
+ ```
46
+
47
+ ### Docker
48
+
49
+ ```bash
50
+ docker pull ghcr.io/tailcallhq/tailcall/tc-server
51
+ docker run -p 8080:8080 -p 8081:8081 ghcr.io/tailcallhq/tailcall/tc-server
52
+ ```
53
+
54
+ ## Get Started
55
+
56
+ The below file is a standard `.graphQL` file, with a few additions such as `@server` and `@http` directives. So, basically, we specify the GraphQL schema and how to resolve that GraphQL schema in the same file, without having to write any code!
57
+
58
+ ```graphql
59
+ schema
60
+ @server(port: 8000, hostname: "0.0.0.0")
61
+ @upstream(baseURL: "http://jsonplaceholder.typicode.com", httpCache: 42) {
62
+ query: Query
63
+ }
64
+
65
+ type Query {
66
+ posts: [Post] @http(path: "/posts")
67
+ user(id: Int!): User @http(path: "/users/{{.args.id}}")
68
+ }
69
+
70
+ type User {
71
+ id: Int!
72
+ name: String!
73
+ username: String!
74
+ email: String!
75
+ phone: String
76
+ website: String
77
+ }
78
+
79
+ type Post {
80
+ id: Int!
81
+ userId: Int!
82
+ title: String!
83
+ body: String!
84
+ user: User @http(path: "/users/{{.value.userId}}")
85
+ }
86
+ ```
87
+
88
+ Now, run the following command to start the server with the full path to the jsonplaceholder.graphql file that you created above.
89
+
90
+ ```bash
91
+ tailcall start ./jsonplaceholder.graphql
92
+ ```
93
+
94
+ Head out to [docs] to learn about other powerful tailcall features.
95
+
96
+ [docs]: https://tailcall.run/docs
97
+
98
+ ### Benchmarks
99
+
100
+ Throughput comparison of various GraphQL solutions for a N + 1 query:
101
+
102
+ ```graphql
103
+ query {
104
+ posts {
105
+ title
106
+ body
107
+ user {
108
+ name
109
+ }
110
+ }
111
+ }
112
+ ```
113
+
114
+ ![Throughput Histogram](https://raw.githubusercontent.com/tailcallhq/graphql-benchmarks/main/assets/req_sec_histogram1.png)
115
+
116
+ Check out detailed benchmarks on our benchmarking [repository](https://github.com/tailcallhq/graphql-benchmarks).
117
+
118
+ ### Contributing
119
+
120
+ Your contributions are invaluable! Kindly go through our [contribution guidelines] if you are a first time contributor.
121
+
122
+ [contribution guidelines]: https://tailcall.run/docs/contribution-guidelines
123
+
124
+ ### Support Us
125
+
126
+ ⭐️ Give us a star.
127
+
128
+ 👀 Watch us for updates.
129
+
130
+ ### License
131
+
132
+ This initiative is protected under the Apache 2.0 License.
133
+
134
+ <img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=82cc2ee2-ff41-4844-9ae6-c9face103e81" />
package/package.json CHANGED
@@ -1,6 +1,49 @@
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.11",
25
+ "optionalDependencies": {
26
+ "@tailcallhq/core-linux-x64-gnu": "latest",
27
+ "@tailcallhq/core-linux-x64-musl": "latest",
28
+ "@tailcallhq/core-linux-arm64-gnu": "latest",
29
+ "@tailcallhq/core-linux-arm64-musl": "latest",
30
+ "@tailcallhq/core-linux-ia32-gnu": "latest",
31
+ "@tailcallhq/core-darwin-arm64": "latest",
32
+ "@tailcallhq/core-darwin-x64": "latest",
33
+ "@tailcallhq/core-win32-x64-msvc": "latest",
34
+ "@tailcallhq/core-win32-arm64-msvc": "latest",
35
+ "@tailcallhq/core-win32-ia32-msvc": "latest"
36
+ },
37
+ "scarfSettings": {
38
+ "defaultOptIn": true,
39
+ "allowTopLevel": true
40
+ },
41
+ "dependencies": {
42
+ "detect-libc": "^2.0.2",
43
+ "@scarf/scarf": "^1.3.0"
44
+ },
45
+ "scripts": {
46
+ "postinstall": "node ./scripts/post-install.js",
47
+ "preinstall": "node ./scripts/pre-install.js"
48
+ }
49
+ }
@@ -0,0 +1,27 @@
1
+ const version = "0.0.11";
2
+ // @ts-check
3
+ import {familySync, GLIBC, MUSL} from "detect-libc"
4
+ import {exec} from "child_process"
5
+ import util from "util"
6
+
7
+ const execa = util.promisify(exec)
8
+ const platform = process.platform
9
+ const arch = process.arch
10
+
11
+ const libcFamily = familySync()
12
+ let libc
13
+ if (platform === "win32") {
14
+ libc = "-msvc"
15
+ } else {
16
+ libc = libcFamily === GLIBC ? "-gnu" : libcFamily === MUSL ? "-musl" : ""
17
+ }
18
+
19
+ const pkg = `@tailcallhq/core-${platform}-${arch}${libc}`
20
+
21
+ try {
22
+ // @ts-ignore
23
+ const {stdout, stderr} = await execa(`npm install ${pkg}@latest --no-save && echo ${pwd}`)
24
+ stderr ? console.log(stderr) : console.log(`Successfully installed optional dependency: ${pkg}`, stdout)
25
+ } catch (error) {
26
+ console.error(`Failed to install optional dependency: ${pkg}`, error.stderr)
27
+ }
@@ -0,0 +1,11 @@
1
+ const optionalDependencies = {"@tailcallhq/core-linux-x64-gnu":"latest","@tailcallhq/core-linux-x64-musl":"latest","@tailcallhq/core-linux-arm64-gnu":"latest","@tailcallhq/core-linux-arm64-musl":"latest","@tailcallhq/core-linux-ia32-gnu":"latest","@tailcallhq/core-darwin-arm64":"latest","@tailcallhq/core-darwin-x64":"latest","@tailcallhq/core-win32-x64-msvc":"latest","@tailcallhq/core-win32-arm64-msvc":"latest","@tailcallhq/core-win32-ia32-msvc":"latest"};
2
+ const os = process.platform
3
+ const arch = process.arch
4
+
5
+ const dependency = Object.keys(optionalDependencies).find((name) => name.includes(`${os}-${arch}`))
6
+ if (!dependency) {
7
+ const redColor = "\x1b[31m"
8
+ const resetColor = "\x1b[0m"
9
+ console.error(`${redColor} Tailcall does not support platform ${os} arch ${arch} ${resetColor}`)
10
+ process.exit(1)
11
+ }