Skip to content

Commit

Permalink
0.1.49
Browse files Browse the repository at this point in the history
  • Loading branch information
mimiMonads committed Oct 31, 2024
1 parent b5a48fa commit da27786
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 8 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vixeny/core",
"version": "0.1.48",
"version": "0.1.49",
"exports": "./main.ts",
"imports": {
"@cross/test": "jsr:@cross/test@^0.0.9",
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vixeny",
"version": "0.1.48",
"version": "0.1.49",
"description": "A functional router for Bun and Deno",
"main": "main.ts",
"type": "module",
Expand All @@ -23,7 +23,6 @@
"keywords": [
"deno",
"bun",
"node",
"functional"
],
"author": "Mimi",
Expand Down
5 changes: 5 additions & 0 deletions src/components/cookieToToken/mainCookieToToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import cookieToTokenGets from "./cookieToTokenGets.ts";
import plugins from "../../exportable/plugin.ts";
import composerTools from "../../composer/composerTools.ts";

/**
* Native cookie verifier
* @param o
* @returns
*/
export const f =
(o?: FunRouterOptions<any>) =>
(p: Petition): (s: string) => Record<string, string | undefined> =>
Expand Down
14 changes: 13 additions & 1 deletion src/components/cookies/mainCookies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,19 @@ import cookieDefaultCase from "./cookieDefaultCase.ts";

type Cookie = (string: string | null) => Record<string, string | undefined>;

const f = (o?: FunRouterOptions<any>) => (p: Petition): Cookie =>
/**
* Native vixeny implementation
* @param o
* @returns
*/
const f = (o?: FunRouterOptions<any>) =>
/**
* // TODO: add useful info here
*
* @param p
* @returns
*/
(p: Petition): Cookie =>
(
(cookies) =>
cookies && cookies.length > 0
Expand Down
17 changes: 15 additions & 2 deletions src/components/parameters/mainParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,21 @@ type Parameters = (
options?: FunRouterOptions<any>,
) => (p: Petition) => (url: string) => string | Record<string, string> | null;

//TODO
const f = ((options?: FunRouterOptions<any>) => (p: Petition) =>
/**
* Native param implementation
*
* @param o
*/
const f = ((options?: FunRouterOptions<any>) =>
/**
* Remember to change `path` and `param` for extra functionality
*
* *** It will always return null if there's not a `path` ***
*
* @param p
* @returns
*/
(p: Petition) =>
(
(map) =>
p?.param?.unique === true
Expand Down
11 changes: 11 additions & 0 deletions src/components/queries/mainQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ import elements from "./queryElements.ts";
import unique from "./unique.ts";
import plugin from "../../exportable/plugin.ts";

/**
* Native query application in vixeny
* @param o
* @returns
*/
export const f = (o?: FunRouterOptions<any>) =>
/**
* Here the petition, please remember to modify `query` to have extra functionalities
*
* @param p
* @returns
*/
(
p: Petition,
): (url: string) => string | Record<string, string | null> | null =>
Expand Down
6 changes: 4 additions & 2 deletions src/exportable/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ export default {
isUsing: composerTools.isUsing,
/**
* @deprecated
*
* Not needed anymore
*/
fileServer: <MI extends true | false>(
s: fileServerPetition<MI>,
Expand All @@ -120,7 +122,7 @@ export default {
O extends StaticFilePlugin,
>(config: O) => config,
/**
* @deprecated
* Used only for internal plugins
*
* @param p
* @returns
Expand All @@ -129,7 +131,7 @@ export default {
};

/**
* Plguin helper
* Plugin helper
*
* @param o
* @returns
Expand Down

0 comments on commit da27786

Please sign in to comment.