web: eliminate client-api & shared circle (#45948)

This commit is contained in:
Valery Bugakov 2022-12-26 10:10:39 +08:00 committed by GitHub
parent 79917a7e98
commit 47459ea10c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 12 deletions

View File

@ -1,8 +1,15 @@
import { Primitive } from 'utility-types'
import { KeyPath } from '@sourcegraph/shared/src/api/client/services/settings'
import { Expression, TemplateExpression } from '@sourcegraph/template-parser'
/**
* A key path that refers to a location in a JSON document.
*
* Each successive array element specifies an index in an object or array to descend into. For example, in the
* object `{"a": ["x", "y"]}`, the key path `["a", 1]` refers to the value `"y"`.
*/
export type KeyPath = (string | number)[]
/**
* The given contribution type as it's specified in a package.json (expressions as strings)
*/

View File

@ -1,6 +1,5 @@
{
"extends": "../../tsconfig.json",
"references": [{ "path": "../common" }],
"compilerOptions": {
"jsx": "react-jsx",
"module": "commonjs",
@ -12,5 +11,6 @@
"*": ["../common/src/types/*"],
},
},
"references": [{ "path": "../template-parser" }],
"include": ["./src/**/*", "./*.ts"],
}

View File

@ -1,17 +1,11 @@
import { from } from 'rxjs'
import { first } from 'rxjs/operators'
import { KeyPath } from '@sourcegraph/client-api'
import { PlatformContext } from '../../../platform/context'
import { isSettingsValid } from '../../../settings/settings'
/**
* A key path that refers to a location in a JSON document.
*
* Each successive array element specifies an index in an object or array to descend into. For example, in the
* object `{"a": ["x", "y"]}`, the key path `["a", 1]` refers to the value `"y"`.
*/
export type KeyPath = (string | number)[]
/**
* An edit to apply to settings.
*/

View File

@ -3,13 +3,13 @@ import { concat, from, of, Subscription, Unsubscribable } from 'rxjs'
import { first } from 'rxjs/operators'
import * as sourcegraph from 'sourcegraph'
import { ActionContributionClientCommandUpdateConfiguration, Evaluated } from '@sourcegraph/client-api'
import { ActionContributionClientCommandUpdateConfiguration, Evaluated, KeyPath } from '@sourcegraph/client-api'
import { formatSearchParameters } from '@sourcegraph/common'
import { Position } from '@sourcegraph/extension-api-types'
import { wrapRemoteObservable } from '../api/client/api/common'
import { CommandEntry } from '../api/client/mainthread-api'
import { KeyPath, SettingsEdit, updateSettings } from '../api/client/services/settings'
import { SettingsEdit, updateSettings } from '../api/client/services/settings'
import { FlatExtensionHostAPI } from '../api/contract'
import { PlatformContext } from '../platform/context'