init
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { App } from "@kevisual/router";
|
||||
import { useContextKey } from "@kevisual/context";
|
||||
import { useContextKey, useKey } from "@kevisual/context";
|
||||
import { CNB } from "@kevisual/cnb";
|
||||
import { Gitea } from '@kevisual/gitea';
|
||||
import path from "node:path";
|
||||
@@ -11,13 +11,13 @@ export const app = useContextKey("app", () => {
|
||||
});
|
||||
|
||||
export const cnb = useContextKey("cnb", () => {
|
||||
const token = useContextKey("CNB_API_KEY") || useContextKey('CNB_TOKEN')
|
||||
const token = useKey("CNB_API_KEY") || useKey('CNB_TOKEN')
|
||||
return new CNB({ token });
|
||||
});
|
||||
|
||||
export const gitea = useContextKey('gitea', () => {
|
||||
const GITEA_TOKEN = useContextKey("GITEA_TOKEN")
|
||||
const GITEA_URL = useContextKey("GITEA_URL")
|
||||
const GITEA_TOKEN = useKey("GITEA_TOKEN")
|
||||
const GITEA_URL = useKey("GITEA_URL")
|
||||
return new Gitea({
|
||||
token: GITEA_TOKEN,
|
||||
baseURL: GITEA_URL,
|
||||
|
||||
Reference in New Issue
Block a user