pull/4791/head
filip mertens 6 months ago
parent 1b25d56827
commit aec183366f
  1. 1
      libs/remix-api/src/index.ts
  2. 9
      libs/remix-api/src/lib/remix-api.ts
  3. 3
      libs/remix-ui/git/src/lib/gitactions.ts
  4. 3
      libs/remix-ui/git/src/lib/listeners.ts
  5. 8
      libs/remix-ui/git/src/types/index.ts
  6. 3
      libs/remix-ui/workspace/src/lib/actions/workspace.ts
  7. 3
      tsconfig.paths.json

@ -0,0 +1 @@
export * from './lib/remix-api'

@ -0,0 +1,9 @@
import { customDGitSystem } from "@remix-ui/git"
import { IRemixApi } from "@remixproject/plugin-api"
import { StatusEvents } from "@remixproject/plugin-utils"
export interface ICustomRemixApi extends IRemixApi {
dgitApi: customDGitSystem
}
export declare type CustomRemixApi = Readonly<ICustomRemixApi>

@ -2,7 +2,7 @@ import { ViewPlugin } from "@remixproject/engine-web";
import { ReadBlobResult, ReadCommitResult } from "isomorphic-git"; import { ReadBlobResult, ReadCommitResult } from "isomorphic-git";
import React from "react"; import React from "react";
import { fileStatus, fileStatusMerge, setRemoteBranchCommits, resetRemoteBranchCommits, setBranches, setCanCommit, setCommitChanges, setCommits, setCurrentBranch, setGitHubUser, setLoading, setRateLimit, setRemoteBranches, setRemotes, setRepos, setUpstream, setLocalBranchCommits, setBranchDifferences, setRemoteAsDefault, setScopes, setLog, clearLog } from "../state/gitpayload"; import { fileStatus, fileStatusMerge, setRemoteBranchCommits, resetRemoteBranchCommits, setBranches, setCanCommit, setCommitChanges, setCommits, setCurrentBranch, setGitHubUser, setLoading, setRateLimit, setRemoteBranches, setRemotes, setRepos, setUpstream, setLocalBranchCommits, setBranchDifferences, setRemoteAsDefault, setScopes, setLog, clearLog } from "../state/gitpayload";
import { GitHubUser, RateLimit, branch, commitChange, gitActionDispatch, statusMatrixType, gitState, branchDifference, remote, gitLog, fileStatusResult, customGitApi, customDGitSystem, cloneInputType, fetchInputType, pullInputType, pushInputType, CustomRemixApi, checkoutInput, rmInput, addInput, repository } from '../types'; import { GitHubUser, RateLimit, branch, commitChange, gitActionDispatch, statusMatrixType, gitState, branchDifference, remote, gitLog, fileStatusResult, customGitApi, customDGitSystem, cloneInputType, fetchInputType, pullInputType, pushInputType, checkoutInput, rmInput, addInput, repository } from '../types';
import { removeSlash } from "../utils"; import { removeSlash } from "../utils";
import { disableCallBacks, enableCallBacks } from "./listeners"; import { disableCallBacks, enableCallBacks } from "./listeners";
import { AlertModal, ModalTypes } from "@remix-ui/app"; import { AlertModal, ModalTypes } from "@remix-ui/app";
@ -13,6 +13,7 @@ import { IDgitSystem, IRemixApi, RemixApi } from "@remixproject/plugin-api";
import { Plugin } from "@remixproject/engine"; import { Plugin } from "@remixproject/engine";
import { AnyMxRecord } from "dns"; import { AnyMxRecord } from "dns";
import { StatusEvents } from "@remixproject/plugin-utils"; import { StatusEvents } from "@remixproject/plugin-utils";
import { CustomRemixApi } from "@remix-api";
export const fileStatuses = [ export const fileStatuses = [
["new,untracked", 0, 2, 0], // new, untracked ["new,untracked", 0, 2, 0], // new, untracked

@ -2,10 +2,11 @@
import { ViewPlugin } from "@remixproject/engine-web"; import { ViewPlugin } from "@remixproject/engine-web";
import React from "react"; import React from "react";
import { setCanUseApp, setLoading, setRepoName, setGItHubToken, setLog } from "../state/gitpayload"; import { setCanUseApp, setLoading, setRepoName, setGItHubToken, setLog } from "../state/gitpayload";
import { CustomRemixApi, customDGitSystem, gitActionDispatch } from "../types"; import { customDGitSystem, gitActionDispatch } from "../types";
import { Plugin } from "@remixproject/engine"; import { Plugin } from "@remixproject/engine";
import { diffFiles, getBranches, getFileStatusMatrix, getGitHubUser, getRemotes, gitlog, setPlugin } from "./gitactions"; import { diffFiles, getBranches, getFileStatusMatrix, getGitHubUser, getRemotes, gitlog, setPlugin } from "./gitactions";
import { Profile } from "@remixproject/plugin-utils"; import { Profile } from "@remixproject/plugin-utils";
import { CustomRemixApi } from "@remix-api";
let plugin: Plugin<any, CustomRemixApi>, gitDispatch: React.Dispatch<gitActionDispatch>, loaderDispatch: React.Dispatch<any>, loadFileQueue: AsyncDebouncedQueue let plugin: Plugin<any, CustomRemixApi>, gitDispatch: React.Dispatch<gitActionDispatch>, loaderDispatch: React.Dispatch<any>, loadFileQueue: AsyncDebouncedQueue
let callBackEnabled: boolean = false let callBackEnabled: boolean = false

@ -5,8 +5,6 @@ import { CommitObject, ReadBlobResult, ReadCommitResult, StatusRow } from "isomo
export type GitHubUser = Endpoints["GET /user"]["response"]['data'] export type GitHubUser = Endpoints["GET /user"]["response"]['data']
export type RateLimit = Endpoints["GET /rate_limit"]["response"]["data"] export type RateLimit = Endpoints["GET /rate_limit"]["response"]["data"]
export interface customDGitSystem { export interface customDGitSystem {
events: { events: {
"checkout": () => void "checkout": () => void
@ -45,12 +43,6 @@ export interface customDGitSystem {
} }
} }
export interface ICustomRemixApi extends IRemixApi {
dgitApi: customDGitSystem
}
export declare type CustomRemixApi = Readonly<ICustomRemixApi>;
export type initInput = { export type initInput = {
defaultBranch: string defaultBranch: string
} }

@ -42,9 +42,10 @@ import { ROOT_PATH, slitherYml, solTestYml, tsSolTestYml } from '../utils/consta
import { IndexedDBStorage } from '../../../../../../apps/remix-ide/src/app/files/filesystems/indexedDB' import { IndexedDBStorage } from '../../../../../../apps/remix-ide/src/app/files/filesystems/indexedDB'
import { getUncommittedFiles } from '../utils/gitStatusFilter' import { getUncommittedFiles } from '../utils/gitStatusFilter'
import { AppModal, ModalTypes } from '@remix-ui/app' import { AppModal, ModalTypes } from '@remix-ui/app'
import { CustomRemixApi, branch, cloneInputType, customDGitSystem } from '@remix-ui/git' import { branch, cloneInputType, customDGitSystem } from '@remix-ui/git'
import * as templates from '@remix-project/remix-ws-templates' import * as templates from '@remix-project/remix-ws-templates'
import { Plugin } from "@remixproject/engine"; import { Plugin } from "@remixproject/engine";
import { CustomRemixApi } from '@remix-api'
declare global { declare global {
interface Window { interface Window {

@ -174,6 +174,9 @@
], ],
"@remix-ui/git": [ "@remix-ui/git": [
"libs/remix-ui/git/src/index.ts" "libs/remix-ui/git/src/index.ts"
],
"@remix-api": [
"libs/remix-api/src/index.ts"
] ]
} }
} }

Loading…
Cancel
Save