codeql-action/node_modules/twirp-ts/build/twirp/__mocks__/gateway.twirp.js
Angela P Wen a196a714b8
Bump artifact dependencies if CODEQL_ACTION_ARTIFACT_V2_UPGRADE enabled (#2482)
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
Co-authored-by: Henry Mercer <henrymercer@github.com>
2024-10-01 09:59:05 -07:00

47 lines
1.6 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createGateway = void 0;
const index_1 = require("../index");
const path_to_regexp_1 = require("path-to-regexp");
function createGateway() {
return new index_1.Gateway({
post: [
{
packageName: "twirp.example.haberdasher",
methodName: "MakeHat",
serviceName: "Haberdasher",
httpMethod: "post",
matchingPath: "/hat{:query_string(\\?.*)}?",
matcher: path_to_regexp_1.match("/hat{:query_string(\\?.*)}?"),
bodyKey: "*",
responseBodyKey: "",
},
],
get: [
{
packageName: "twirp.example.haberdasher",
methodName: "FindHat",
serviceName: "Haberdasher",
httpMethod: "get",
matchingPath: "/hat/{:hat_id}{:query_string(\\?.*)}?",
matcher: path_to_regexp_1.match("/hat/{:hat_id}{:query_string(\\?.*)}?"),
bodyKey: "",
responseBodyKey: "",
},
{
packageName: "twirp.example.haberdasher",
methodName: "ListHat",
serviceName: "Haberdasher",
httpMethod: "get",
matchingPath: "/hat{:query_string(\\?.*)}?",
matcher: path_to_regexp_1.match("/hat{:query_string(\\?.*)}?"),
bodyKey: "",
responseBodyKey: "",
},
],
put: [],
patch: [],
delete: [],
});
}
exports.createGateway = createGateway;