Skip to content

Commit

Permalink
First cut
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-chambers committed Dec 13, 2023
0 parents commit a1e288d
Show file tree
Hide file tree
Showing 8 changed files with 457 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
11 changes: 11 additions & 0 deletions bin/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env node

// This JS file is a shim that uses ts-node to run index.ts

const spawn = require("cross-spawn");

const args = process.argv.slice(2);

const pathToSource = require.resolve("../src/index.ts");
const result = spawn.sync("ts-node", ["--transpileOnly", pathToSource, ...args], { stdio: "inherit" })
process.exit(result.status);
299 changes: 299 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "@hasura/ndc-functions-sdk-node",
"version": "0.1.0",
"description": "SDK that can automatically expose TypeScript functions as Hasura NDC functions/procedures",
"author": "Hasura",
"license": "Apache-2.0",
"homepage": "https://github.com/hasura/ndc-functions-sdk-node#readme",
"bugs": {
"url": "https://github.com/hasura/ndc-functions-sdk-node/issues"
},
"bin": {
"ndc-functions-sdk-node": "bin/index.js"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/hasura/ndc-functions-sdk-node.git"
},
"dependencies": {
"@hasura/ndc-sdk-typescript": "file:../ndc-sdk-typescript",
"@tsconfig/node18": "^18.2.2",
"@json-schema-tools/meta-schema": "^1.7.0",
"commander": "^11.1.0",
"cross-spawn": "^7.0.3",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
}
}
Loading

0 comments on commit a1e288d

Please sign in to comment.