#203 fix libs rename

This commit is contained in:
neil 2023-02-14 20:34:51 +08:00
parent 6a52bafd03
commit 6c08a4ece2
11 changed files with 12 additions and 12 deletions

View file

@ -3,7 +3,7 @@ import { app, BrowserWindow, ipcMain } from "electron";
import contextMenu from "electron-context-menu";
import serve from "electron-serve";
import { getInstalledPackages } from "./libs/teaDir";
import { getInstalledPackages } from "./libs/tea-dir";
import { readSessionData, writeSessionData } from "./libs/auth";
import type { Session } from "../src/libs/types";
import { installPackage, openTerminal } from "./libs/cli";

View file

@ -1,8 +1,8 @@
import { mkdirp } from "mkdirp";
import path from "path";
import fs from "fs";
import { getTeaPath } from "./teaDir";
import * as v1Client from "./v1Client";
import { getTeaPath } from "./tea-dir";
import * as v1Client from "./v1-client";
const sessionFilePath = path.join(getTeaPath(), "tea.xyz/gui/tmp.dat");
const sessionFolder = path.join(getTeaPath(), "tea.xyz/gui");

View file

@ -1,6 +1,6 @@
import { spawn } from "child_process";
import { clean } from "semver";
import { getGuiPath } from "./teaDir";
import { getGuiPath } from "./tea-dir";
import fs from "fs";
import path from "path";

View file

@ -1,7 +1,7 @@
<script lang="ts">
import { authStore } from '$libs/stores';
import type { Developer } from '@tea/ui/types';
import { baseUrl } from '$libs/v1Client';
import { baseUrl } from '$libs/v1-client';
const { shell } = window.require('electron');

View file

@ -1,6 +1,6 @@
import { getPkgBottles } from "../tea-dir";
describe("teaDir module", () => {
describe("tea-dir module", () => {
it("should getPkgBottles from nested Dir object/s", () => {
const results = getPkgBottles({
name: "kkos",

View file

@ -10,7 +10,7 @@ import type { GUIPackage, Course, Category } from "../types";
import { PackageStates } from "../types";
import { loremIpsum } from "lorem-ipsum";
import _ from "lodash";
// import { getInstalledPackages } from '$libs/teaDir';
// import { getInstalledPackages } from '$libs/tea-dir';
// import { getSession } from '$libs/stores/auth';
import * as v1Client from "$libs/v1-client";

View file

@ -2,7 +2,7 @@
import { open } from '@tauri-apps/api/shell';
import { authStore } from '$libs/stores';
import type { Developer } from '@tea/ui/types';
import { baseUrl } from '$libs/v1Client';
import { baseUrl } from '$libs/v1-client';
let user: Developer | null = null;
const deviceId = authStore.deviceIdStore;

View file

@ -1,6 +1,6 @@
import { getPkgBottles } from '../teaDir';
import { getPkgBottles } from '../tea-dir';
describe('teaDir module', () => {
describe('tea-dir module', () => {
it('should getPkgBottles from nested Dir object/s', () => {
const results = getPkgBottles({
name: 'kkos',

View file

@ -19,10 +19,10 @@ import type { GUIPackage, Course, Category, AuthStatus, DeviceAuth } from '../ty
import * as mock from './mock';
import { PackageStates } from '../types';
import { getInstalledPackages } from '$libs/teaDir';
import { getInstalledPackages } from '$libs/tea-dir';
import { installPackageCommand } from '$libs/cli';
import { get as apiGet } from '$libs/v1Client';
import { get as apiGet } from '$libs/v1-client';
export async function getPackages(): Promise<GUIPackage[]> {
const [packages, installedPackages] = await Promise.all([