Skip to content

Commit

Permalink
update types imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreezag committed Dec 3, 2023
1 parent f1f846e commit db14780
Show file tree
Hide file tree
Showing 148 changed files with 235 additions and 223 deletions.
2 changes: 1 addition & 1 deletion layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<script lang="ts">
import { storeToRefs } from "pinia";
import { defineComponent } from "vue";
import { useSettingsStore } from "~/stores/settings";
import { useNuxtApp } from "#app";
import { LayoutSidebar } from "~/src/widgets/ui";
import { useSettingsStore } from "~/stores/settings";
export default defineComponent({
components: {
Expand Down
6 changes: 3 additions & 3 deletions pages/http-dumps/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

<script lang="ts">
import { defineComponent } from "vue";
import { HttpDumpPage } from "~/src/screens/http-dump";
import { useFetch, useNuxtApp, useRoute, useRouter } from "#app"; // eslint-disable-line @conarti/feature-sliced/layers-slices
import { PageHeader } from "~/src/widgets/ui";
import { useHttpDump } from "~/src/entities/http-dump";
import { HttpDump } from "~/src/entities/http-dump/types";
import { EventId, ServerEvent } from "~/src/shared/types";
import type { HttpDump } from "~/src/entities/http-dump/types";
import type { EventId, ServerEvent } from "~/src/shared/types";
import { HttpDumpPage } from "~/src/screens/http-dump";
const { normalizeHttpDumpEvent } = useHttpDump();
Expand Down
4 changes: 2 additions & 2 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
<script lang="ts">
import pluralize from "pluralize"; // eslint-disable-line @conarti/feature-sliced/public-api
import { defineComponent } from "vue";
import { PauseButton } from "~/src/screens/events/ui/pause-button";
import { useNuxtApp } from "#app"; // eslint-disable-line @conarti/feature-sliced/layers-slices
import { PageHeader, EventCard, PagePlaceholder } from "~/src/widgets/ui";
import { PAGE_TYPES } from "~/src/shared/constants";
import { EventType } from "~/src/shared/types";
import type { EventType } from "~/src/shared/types";
import { PauseButton } from "~/src/screens/events/ui/pause-button";
export default defineComponent({
components: {
Expand Down
4 changes: 2 additions & 2 deletions pages/inspector/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@

<script lang="ts">
import { defineComponent } from "vue";
import { InspectorPage } from "~/src/screens/inspector";
import { useFetch, useNuxtApp, useRoute, useRouter } from "#app"; // eslint-disable-line @conarti/feature-sliced/layers-slices
import { PageHeader } from "~/src/widgets/ui";
import { useInspector } from "~/src/entities/inspector";
import { EventId } from "~/src/shared/types";
import type { EventId } from "~/src/shared/types";
import { InspectorPage } from "~/src/screens/inspector";
const { normalizeInspectorEvent } = useInspector();
Expand Down
4 changes: 2 additions & 2 deletions pages/profiler/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@

<script lang="ts">
import { defineComponent } from "vue";
import { ProfilerPage } from "~/src/screens/profiler";
import { useFetch, useNuxtApp, useRoute, useRouter } from "#app"; // eslint-disable-line @conarti/feature-sliced/layers-slices
import { PageHeader } from "~/src/widgets/ui";
import { useProfiler } from "~/src/entities/profiler/lib";
import { EventId } from "~/src/shared/types";
import type { EventId } from "~/src/shared/types";
import { ProfilerPage } from "~/src/screens/profiler";
const { normalizeProfilerEvent } = useProfiler();
Expand Down
4 changes: 2 additions & 2 deletions pages/sentry/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@

<script lang="ts">
import { defineComponent } from "vue";
import { SentryPage } from "~/src/screens/sentry";
import { useNuxtApp, useRoute, useRouter, useFetch } from "#app"; // eslint-disable-line @conarti/feature-sliced/layers-slices
import { PageHeader } from "~/src/widgets/ui";
import { useSentry } from "~/src/entities/sentry";
import { EventId } from "~/src/shared/types";
import type { EventId } from "~/src/shared/types";
import { SentryPage } from "~/src/screens/sentry";
const { normalizeSentryEvent } = useSentry();
Expand Down
2 changes: 1 addition & 1 deletion pages/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@
<script lang="ts">
import { storeToRefs } from "pinia";
import { defineComponent } from "vue";
import { useSettingsStore, THEME_MODES } from "~/stores/settings";
import { PageHeader } from "~/src/widgets/ui";
import { IconSvg } from "~/src/shared/ui";
import { useSettingsStore, THEME_MODES } from "~/stores/settings";
export default defineComponent({
components: {
Expand Down
4 changes: 2 additions & 2 deletions pages/smtp/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

<script lang="ts">
import { defineComponent } from "vue";
import { SmtpPage } from "~/src/screens/smtp";
import { useFetch, useNuxtApp, useRoute, useRouter } from "#app"; // eslint-disable-line @conarti/feature-sliced/layers-slices
import { PageHeader } from "~/src/widgets/ui";
import { useSmtp } from "~/src/entities/smtp";
import { REST_API_URL } from "~/src/shared/lib/io";
import { EventId } from "~/src/shared/types";
import type { EventId } from "~/src/shared/types";
import { SmtpPage } from "~/src/screens/smtp";
const { normalizeSmtpEvent } = useSmtp();
Expand Down
4 changes: 2 additions & 2 deletions plugins/events.client.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { storeToRefs } from "pinia";
import { useApiTransport } from '~/src/shared/lib/use-api-transport'
import type { EventId, EventType, ServerEvent } from '~/src/shared/types';
import { useCachedIdsStore } from "~/stores/cached-ids";
import { useEventStore } from "~/stores/events";
import { useApiTransport } from '~/src/shared/lib/use-api-transport'
import { EventId, EventType, ServerEvent } from '~/src/shared/types';

export default defineNuxtPlugin(() => {
const eventsStore = useEventStore();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { EVENT_TYPES, ServerEvent, NormalizedEvent } from "~/src/shared/types";
import { HttpDump } from "../../types";
import type { ServerEvent, NormalizedEvent } from "~/src/shared/types";
import { EVENT_TYPES } from "~/src/shared/types";
import type { HttpDump } from "../../types";

export const normalizeHttpDumpEvent = (event: ServerEvent<HttpDump>): NormalizedEvent<HttpDump> => ({
id: event.uuid,
Expand Down
4 changes: 2 additions & 2 deletions src/entities/http-dump/lib/use-http-dump/use-http-dump.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ServerEvent, NormalizedEvent } from '~/src/shared/types';
import { HttpDump } from "../../types";
import type { ServerEvent, NormalizedEvent } from '~/src/shared/types';
import type { HttpDump } from "../../types";
import { normalizeHttpDumpEvent } from "./normalize-http-dump-event";

type TUseInspector = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/entities/http-dump/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Attachment } from "~/src/shared/types";
import type { Attachment } from "~/src/shared/types";

export interface HttpDump {
received_at: string,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, Story } from "@storybook/vue3";
import type { Meta, Story } from "@storybook/vue3";
import { useHttpDump } from "../../lib";
import { httpDumpMock } from '../../mocks';
import PreviewCard from './preview-card.vue';
Expand Down
4 changes: 2 additions & 2 deletions src/entities/http-dump/ui/preview-card/preview-card.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { NormalizedEvent } from "~/src/shared/types";
import type { NormalizedEvent } from "~/src/shared/types";
import { PreviewCard } from "~/src/shared/ui";
import { HttpDump } from "../../types";
import type { HttpDump } from "../../types";
type Props = {
event: NormalizedEvent<HttpDump>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { EVENT_TYPES, ServerEvent, NormalizedEvent } from "~/src/shared/types";
import { Inspector, InspectorTransaction } from "../../types";
import type { ServerEvent, NormalizedEvent } from "~/src/shared/types";
import { EVENT_TYPES } from "~/src/shared/types";
import type { Inspector, InspectorTransaction } from "../../types";

export const normalizeInspectorEvent = (event: ServerEvent<Inspector>): NormalizedEvent<Inspector> => {
const transaction = event.payload[0] as InspectorTransaction;
Expand Down
4 changes: 2 additions & 2 deletions src/entities/inspector/lib/use-inspector/use-inspector.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ServerEvent, NormalizedEvent } from '~/src/shared/types';
import { Inspector } from "../../types";
import type { ServerEvent, NormalizedEvent } from '~/src/shared/types';
import type { Inspector } from "../../types";
import { normalizeInspectorEvent } from "./normalize-inspector-event";

type TUseInspector = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Meta, Story} from "@storybook/vue3";
import type { Meta, Story } from "@storybook/vue3";
import { useInspector } from "../../lib";
import { inspectorMock } from '../../mocks'
import InspectorStatBoard from './inspector-stat-board.vue';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import moment from "moment";
import { defineProps, computed } from "vue";
import { InspectorTransaction } from "~/config/types";
import type { InspectorTransaction } from "../../types";
type Props = {
transaction: InspectorTransaction;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, Story } from "@storybook/vue3";
import type { Meta, Story } from "@storybook/vue3";
import { useInspector } from "../../lib";
import { inspectorMock } from '../../mocks';
import PreviewCard from './preview-card.vue';
Expand Down
4 changes: 2 additions & 2 deletions src/entities/inspector/ui/preview-card/preview-card.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts" setup>
import { computed, defineProps } from "vue";
import { NormalizedEvent } from "~/src/shared/types";
import type { NormalizedEvent } from "~/src/shared/types";
import { PreviewCard } from "~/src/shared/ui";
import { Inspector } from "../../types";
import type { Inspector } from "../../types";
import InspectorStatBoard from "../inspector-stat-board/inspector-stat-board.vue";
type Props = {
Expand Down
5 changes: 3 additions & 2 deletions src/entities/monolog/lib/use-monolog/normalize-monolog.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { EVENT_TYPES, ServerEvent, NormalizedEvent } from "~/src/shared/types";
import { Monolog } from "../../types";
import type { ServerEvent, NormalizedEvent } from "~/src/shared/types";
import { EVENT_TYPES } from "~/src/shared/types";
import type { Monolog } from "../../types";

export const normalizeMonolog = (event: ServerEvent<Monolog>): NormalizedEvent<Monolog> => {
const origin = event.payload?.context?.source || null;
Expand Down
4 changes: 2 additions & 2 deletions src/entities/monolog/lib/use-monolog/use-monolog.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ServerEvent, NormalizedEvent } from '~/src/shared/types';
import { Monolog } from "../../types";
import type { ServerEvent, NormalizedEvent } from '~/src/shared/types';
import type { Monolog } from "../../types";
import { normalizeMonolog } from "./normalize-monolog";

type TUseMonolog = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/entities/monolog/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Source } from "~/src/shared/types";
import type { Source } from "~/src/shared/types";

export type StatusCode = number; // TODO: update type

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, Story } from "@storybook/vue3";
import type { Meta, Story } from "@storybook/vue3";
import { useMonolog } from "../../lib";
import { monologMock } from '../../mocks'
import PreviewCard from './preview-card.vue';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { EVENT_TYPES, ServerEvent, NormalizedEvent } from "~/src/shared/types";
import { Profiler } from "../../types";
import type { ServerEvent, NormalizedEvent } from "~/src/shared/types";
import { EVENT_TYPES } from "~/src/shared/types";
import type { Profiler } from "../../types";

export const normalizeProfilerEvent = (event: ServerEvent<Profiler>): NormalizedEvent<Profiler> => ({
id: event.uuid,
Expand Down
4 changes: 2 additions & 2 deletions src/entities/profiler/lib/use-profiler/use-profiler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ServerEvent, NormalizedEvent } from '~/src/shared/types';
import { Profiler } from "../../types";
import type { ServerEvent, NormalizedEvent } from '~/src/shared/types';
import type { Profiler } from "../../types";
import { normalizeProfilerEvent } from "./normalize-profile-event";

type TUseProfiler = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, Story } from "@storybook/vue3";
import type { Meta, Story } from "@storybook/vue3";
import { useProfiler } from "../../lib";
import { profilerMock } from "../../mocks";
import PreviewCard from './preview-card.vue';
Expand Down
4 changes: 2 additions & 2 deletions src/entities/profiler/ui/preview-card/preview-card.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts" setup>
import { computed } from "vue";
import { NormalizedEvent } from "~/src/shared/types";
import type { NormalizedEvent } from "~/src/shared/types";
import { PreviewCard, StatBoard } from "~/src/shared/ui";
import { Profiler } from "../../types";
import type { Profiler } from "../../types";
type Props = {
event: NormalizedEvent<Profiler>;
Expand Down
6 changes: 4 additions & 2 deletions src/entities/ray/lib/use-ray/normalize-ray-event.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import pick from "lodash/pick";
import { EVENT_TYPES, ServerEvent } from "~/src/shared/types";
import { EnhancedRayEvent, RayContentColor, RayContentLabel, RayContentSize, RayDump, RAY_EVENT_TYPES } from "../../types";
import type { ServerEvent } from "~/src/shared/types";
import { EVENT_TYPES } from "~/src/shared/types";
import type { EnhancedRayEvent, RayContentColor, RayContentLabel, RayContentSize, RayDump } from "../../types";
import { RAY_EVENT_TYPES } from "../../types";

export const normalizeRayEvent = (event: ServerEvent<RayDump>): EnhancedRayEvent => {
let origin = {
Expand Down
4 changes: 2 additions & 2 deletions src/entities/ray/lib/use-ray/use-ray.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ServerEvent } from '~/src/shared/types';
import { EnhancedRayEvent, RayDump } from "../../types";
import type { ServerEvent } from '~/src/shared/types';
import type { EnhancedRayEvent, RayDump } from "../../types";
import { normalizeRayEvent } from "./normalize-ray-event";

type TUseRay = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/entities/ray/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NormalizedEvent } from "~/src/shared/types";
import type { NormalizedEvent } from "~/src/shared/types";

export interface RayFrame {
file_name: string,
Expand Down
2 changes: 1 addition & 1 deletion src/entities/ray/ui/preview-card/preview-card.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, Story } from "@storybook/vue3";
import type { Meta, Story } from "@storybook/vue3";
import { useRay } from "../../lib";
import {
rayCallerMock,
Expand Down
8 changes: 4 additions & 4 deletions src/entities/ray/ui/preview-card/preview-card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { computed } from "vue";
import type { NormalizedEvent } from "~/src/shared/types";
import { PreviewCard } from "~/src/shared/ui";
import {
import type {
EnhancedRayEvent,
RayContentCarbone,
RayContentCustom,
Expand All @@ -22,12 +22,12 @@ import {
RayContentView,
RayDump,
RayPayload,
RAY_EVENT_TYPES,
} from "../../types";
import { RAY_EVENT_TYPES } from "../../types";
import { RayApplicationLog } from "../ray-application-log";
import { RayCarbone } from "../ray-carbone";
import { RayCustom } from "../ray-custom";
import { RayEloquent } from "../ray-eloquent"
import { RayApplicationLog } from "../ray-application-log";
import { RayEloquent } from "../ray-eloquent";
import { RayEvent } from "../ray-event";
import { RayException } from "../ray-exception";
import { RayFrame } from "../ray-frame";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, Story } from "@storybook/vue3";
import type { Meta, Story } from "@storybook/vue3";
import { useRay } from "../../lib";
import { rayLaravelApplicationLogMock } from '../../mocks-laravel';
import { RayContentApplicationLog } from '../../types';
import type { RayContentApplicationLog } from '../../types';
import RayApplicationLog from './ray-application-log.vue';

const { normalizeRayEvent } = useRay();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { RayContentApplicationLog } from "../../types";
import type { RayContentApplicationLog } from "../../types";
type Props = {
content: RayContentApplicationLog;
Expand Down
4 changes: 2 additions & 2 deletions src/entities/ray/ui/ray-carbone/ray-carbone.stories.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, Story } from "@storybook/vue3";
import type { Meta, Story } from "@storybook/vue3";
import { useRay } from "../../lib";
import { rayCarbonMock } from '../../mocks'
import { RayContentCarbone } from "../../types";
import type { RayContentCarbone } from "../../types";
import RayCarbon from './ray-carbone.vue';

const { normalizeRayEvent } = useRay();
Expand Down
2 changes: 1 addition & 1 deletion src/entities/ray/ui/ray-carbone/ray-carbone.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { TableBase, TableBaseRow } from "~/src/shared/ui";
import { RayContentCarbone } from "../../types";
import type { RayContentCarbone } from "../../types";
type Props = {
carbone: RayContentCarbone;
Expand Down
4 changes: 2 additions & 2 deletions src/entities/ray/ui/ray-custom/ray-custom.stories.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, Story } from "@storybook/vue3";
import type { Meta, Story } from "@storybook/vue3";
import { useRay } from "../../lib";
import { rayTextMock } from '../../mocks';
import { RayContentCustom } from '../../types';
import type { RayContentCustom } from '../../types';
import RayCustom from './ray-custom.vue';

const { normalizeRayEvent } = useRay();
Expand Down
2 changes: 1 addition & 1 deletion src/entities/ray/ui/ray-custom/ray-custom.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { ValueDump } from "~/src/shared/ui";
import { RayContentCustom } from "../../types";
import type { RayContentCustom } from "../../types";
type Props = {
content: RayContentCustom;
Expand Down
4 changes: 2 additions & 2 deletions src/entities/ray/ui/ray-eloquent/ray-eloquent.stories.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, Story } from "@storybook/vue3";
import type { Meta, Story } from "@storybook/vue3";
import { useRay } from "../../lib";
import { rayLaravelEloquentMock } from '../../mocks-laravel';
import { RayContentEloquent } from '../../types';
import type { RayContentEloquent } from '../../types';
import RayEloquent from './ray-eloquent.vue';

const { normalizeRayEvent } = useRay();
Expand Down
2 changes: 1 addition & 1 deletion src/entities/ray/ui/ray-eloquent/ray-eloquent.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { ValueDump } from "~/src/shared/ui";
import { RayContentEloquent } from "../../types";
import type { RayContentEloquent } from "../../types";
type Props = {
content: RayContentEloquent;
Expand Down
Loading

0 comments on commit db14780

Please sign in to comment.