Skip to content

Commit

Permalink
0.0.20
Browse files Browse the repository at this point in the history
  • Loading branch information
ivansglazunov committed Jul 8, 2024
1 parent 6363e70 commit 4684205
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const makeFunction = (code: string) => {
return fn;
}

const makeDeepClient = (token: string, secret?: string) => {
const makeDeepClient = (token: string, path?: string, ssl?: boolean, secret?: string) => {
if (!token) throw new Error('No token provided');
const decoded = parseJwt(token);
const linkId = decoded?.userId;
Expand All @@ -52,9 +52,9 @@ const makeDeepClient = (token: string, secret?: string) => {
const unsafe: any = {};
if (secret) {
unsafe.hasura = new HasuraApi({
path: DEEPLINKS_HASURA_PATH,
ssl: DEEPLINKS_HASURA_SSL,
secret: secret,
path,
ssl,
secret,
});
}

Expand All @@ -63,9 +63,9 @@ const makeDeepClient = (token: string, secret?: string) => {
}

const execute = async (args, options) => {
const { jwt, secret, code, data } = options;
const { jwt, secret, code, data, path, ssl } = options;
const fn = makeFunction(code);
const deep = makeDeepClient(jwt, secret);
const deep = makeDeepClient(jwt, path, ssl, secret);
// await supports both sync and async functions the same way
const result = await fn(...args, { data, deep, gql, require: requireWrapper });
return result;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deep-foundation/js-docker-isolation-provider",
"version": "0.0.19",
"version": "0.0.20",
"type": "module",
"scripts": {
"dev": "nodemon index.ts",
Expand Down

0 comments on commit 4684205

Please sign in to comment.