Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
add requestContext, fix cookie parser add middleware
cookie middleware working
slaesh
reviewed
Jul 13, 2023
| @@ -1,5 +1,6 @@ | |||
| import { ABBY_BASE_URL } from "./constants"; | |||
| import type { AbbyEventType, AbbyEvent, AbbyDataResponse } from "./index"; | |||
|
|
|||
| set: (key: string, value: string) => void; | ||
| } | ||
|
|
||
| type flagCacheConfig = { |
Collaborator
There was a problem hiding this comment.
this is done in another PR? maybe finish that one first? =)
packages/core/tests/base.test.ts
Outdated
| }); | ||
|
|
||
| it("refetches an expired flag", async () =>{ | ||
| const date = new Date() //current date |
Collaborator
There was a problem hiding this comment.
comment says nothing, why dont we use ; in here? Oo
Suggested change
| const date = new Date() //current date | |
| const date = new Date(); |
| clean: true, | ||
| sourcemap: true, | ||
| treeshake: true, | ||
|
|
| import { Request } from "express"; | ||
| import { FastifyRequest } from "fastify"; | ||
|
|
||
| // type RequestType<T> = T extends Request ? Request : FastifyRequest; |
| next(); | ||
| }; | ||
|
|
||
| // const allFlagMiddleWare = <F extends keyof Flags>( |
| done: HookHandlerDoneFunction | ||
| ) => { | ||
| const flagValue = abbyNodeInstance.getFeatureFlagValue(key as unknown as FlagName); //TODO fix type | ||
| if (flagValue) { |
| if (flagValue) { | ||
| reply.status(403); | ||
| reply.send(); | ||
| console.log("disbaled endpoint"); |
packages/nodejs/src/fastify/index.ts
Outdated
|
|
||
| const setCookie = fastifyCookie; | ||
|
|
||
| console.log(setCookie); |
packages/nodejs/src/fastify/index.ts
Outdated
|
|
||
| fastify.addHook("onRequest", (request, reply, done) => { | ||
| ABTestHook(request, reply, done); | ||
| // featureFlagHook("lol", request, reply, done); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds possibility to use abby on serverside within any NodeJS enviroment