use alias for backend api imports

This commit is contained in:
Mads Rasmussen
2022-10-17 13:29:16 +02:00
parent eebc44e3c8
commit 01f6226728
13 changed files with 18 additions and 22 deletions

View File

@@ -12,8 +12,8 @@ import { css, html, LitElement } from 'lit';
import { customElement, state } from 'lit/decorators.js';
import type { Guard, IRoute } from 'router-slot/model';
import { getManifests, getServerStatus } from './core/api/fetcher';
import { internalManifests } from './temp-internal-manifests';
import { getManifests, getServerStatus } from '@umbraco-cms/backend-api';
import { UmbExtensionRegistry } from '@umbraco-cms/extensions-api';
import { UmbContextProviderMixin } from '@umbraco-cms/context-api';

View File

@@ -6,7 +6,7 @@ import { customElement, state } from 'lit/decorators.js';
import { ifDefined } from 'lit/directives/if-defined.js';
import { query } from 'router-slot';
import { postUserLogin } from '../../core/api/fetcher';
import { postUserLogin } from '@umbraco-cms/backend-api';
@customElement('umb-login')
export default class UmbLogin extends LitElement {

View File

@@ -3,15 +3,15 @@ import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
import { css, html, LitElement } from 'lit';
import { customElement, state } from 'lit/decorators.js';
import { UmbModalService } from '../../../core/services/modal';
import { UmbNotificationService } from '../../../core/services/notification';
import { UmbNotificationDefaultData } from '../../../core/services/notification/layouts/default';
import {
getPublishedCacheStatus,
postPublishedCacheReload,
postPublishedCacheRebuild,
getPublishedCacheCollect,
} from '../../../core/api/fetcher';
import { UmbModalService } from '../../../core/services/modal';
import { UmbNotificationService } from '../../../core/services/notification';
import { UmbNotificationDefaultData } from '../../../core/services/notification/layouts/default';
} from '@umbraco-cms/backend-api';
import { UmbContextConsumerMixin } from '@umbraco-cms/context-api';
@customElement('umb-dashboard-published-status')

View File

@@ -2,10 +2,9 @@ import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
import { css, html, LitElement } from 'lit';
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
import { customElement, state } from 'lit/decorators.js';
import { getConsentLevel, getConsentLevels, postConsentLevel } from '../../../core/api/fetcher';
import { getConsentLevel, getConsentLevels, postConsentLevel } from '@umbraco-cms/backend-api';
import type { TelemetryModel } from '@umbraco-cms/models';
export type SettingOption = 'Minimal' | 'Basic' | 'Detailed';
@customElement('umb-dashboard-telemetry')

View File

@@ -4,7 +4,7 @@ import { html, LitElement, nothing } from 'lit';
import { customElement, state } from 'lit/decorators.js';
import { repeat } from 'lit/directives/repeat.js';
import { getPackagesInstalled } from '../../../core/api/fetcher';
import { getPackagesInstalled } from '@umbraco-cms/backend-api';
import type { PackageInstalled } from '@umbraco-cms/models';

View File

@@ -25,7 +25,6 @@ export const getConsentLevels = fetcher.path('/telemetry/ConsentLevels').method(
export const getConsentLevel = fetcher.path('/telemetry/ConsentLevel').method('get').create();
export const postConsentLevel = fetcher.path('/telemetry/ConsentLevel').method('post').create();
// Property Editors
export const getPropertyEditorsList = fetcher.path('/property-editors/list').method('get').create();
export const getPropertyEditor = fetcher
@@ -40,4 +39,3 @@ export const getPublishedCacheStatus = fetcher.path('/published-cache/status').m
export const postPublishedCacheReload = fetcher.path('/published-cache/reload').method('post').create();
export const postPublishedCacheRebuild = fetcher.path('/published-cache/rebuild').method('post').create();
export const getPublishedCacheCollect = fetcher.path('/published-cache/collect').method('get').create();

View File

@@ -0,0 +1 @@
export * from './fetcher';

View File

@@ -1,5 +1,5 @@
import { map, Observable } from 'rxjs';
import { getPropertyEditorConfig } from '../../api/fetcher';
import { getPropertyEditorConfig } from '../../backend-api/fetcher';
import type { PropertyEditorConfig } from '../../models';
import { UmbDataStoreBase } from '../store';

View File

@@ -1,6 +1,6 @@
import { map, Observable } from 'rxjs';
import type { PropertyEditor } from '../../models';
import { getPropertyEditorsList, getPropertyEditor } from '../../api/fetcher';
import { getPropertyEditorsList, getPropertyEditor } from '../../backend-api/fetcher';
import { UmbDataStoreBase } from '../store';
/**

View File

@@ -3,8 +3,8 @@ import { css, CSSResultGroup, html, LitElement, nothing } from 'lit';
import { customElement, property, query, state } from 'lit/decorators.js';
import { Subscription } from 'rxjs';
import { postInstallSetup, postInstallValidateDatabase } from '../../core/api/fetcher';
import { UmbInstallerContext } from '../installer.context';
import { postInstallSetup, postInstallValidateDatabase } from '@umbraco-cms/backend-api';
import { UmbContextConsumerMixin } from '@umbraco-cms/context-api';
import type { UmbracoInstallerDatabaseModel, UmbracoPerformInstallDatabaseConfiguration } from '@umbraco-cms/models';

View File

@@ -1,6 +1,6 @@
import { BehaviorSubject, Observable, ReplaySubject } from 'rxjs';
import { getInstallSettings, postInstallSetup } from '../core/api/fetcher';
import { getInstallSettings, postInstallSetup } from '@umbraco-cms/backend-api';
import type { PostInstallRequest, ProblemDetails, UmbracoInstaller } from '@umbraco-cms/models';
/**

View File

@@ -1,13 +1,11 @@
import '../installer/shared/layout/installer-layout.element';
import './upgrader-view.element';
import { html, LitElement } from 'lit';
import { customElement, state } from 'lit/decorators.js';
import { getUpgradeSettings, PostUpgradeAuthorize } from '../core/api/fetcher';
import { getUpgradeSettings, PostUpgradeAuthorize } from '@umbraco-cms/backend-api';
import type { UmbracoUpgrader } from '@umbraco-cms/models';
import '../installer/shared/layout/installer-layout.element';
import './upgrader-view.element';
/**
* @element umb-upgrader
*/

View File

@@ -25,7 +25,7 @@
"baseUrl": ".",
"paths": {
"@umbraco-cms/models": ["./src/core/models"],
"@umbraco-cms/api": ["./src/core/api"],
"@umbraco-cms/backend-api": ["./src/core/backend-api"],
"@umbraco-cms/context-api": ["./src/core/context"],
"@umbraco-cms/extensions-api": ["./src/core/extension"],
"@umbraco-cms/utils": ["./src/core/helpers"],