@openctx/provider
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -1,2 +0,2 @@ | ||
import { Position } from '@openctx/schema'; | ||
import type { Position } from '@openctx/schema'; | ||
export type PositionCalculator = (offset: number) => Position; | ||
@@ -3,0 +3,0 @@ /** |
@@ -5,3 +5,4 @@ import matchGlob from 'picomatch/lib/picomatch.js'; | ||
export type { Provider } from './provider'; | ||
export { createFilePositionCalculator, type PositionCalculator } from './helpers/position'; | ||
export { matchGlob }; | ||
//# sourceMappingURL=index.d.ts.map |
// Import from a subpackage because the main module calls `os.platform()`, which doesn't work on | ||
// non-Node engines. | ||
import matchGlob from 'picomatch/lib/picomatch.js'; | ||
export { createFilePositionCalculator } from './helpers/position'; | ||
// For convenience, since many providers need globs. | ||
export { matchGlob }; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import type { CapabilitiesParams, CapabilitiesResult, ItemsParams, ItemsResult, ProviderSettings } from '@openctx/protocol'; | ||
import type { AnnotationsParams, AnnotationsResult, CapabilitiesParams, CapabilitiesResult, ItemsParams, ItemsResult, ProviderSettings } from '@openctx/protocol'; | ||
/** | ||
@@ -10,13 +10,13 @@ * An OpenCtx provider implemented in TypeScript/JavaScript. | ||
* Reports the capabilities of the provider. | ||
* | ||
* TODO(sqs): fix this...right now capabilities needs to be sent each time right before | ||
* items anyway, so it probably should be like "items" and "resolveItems" or | ||
* some optimization so the client doesnt need to always send over the full text. | ||
*/ | ||
capabilities(params: CapabilitiesParams, settings: S): CapabilitiesResult | Promise<CapabilitiesResult>; | ||
/** | ||
* Returns OpenCtx items for the given file. | ||
* Returns OpenCtx items. | ||
*/ | ||
items(params: ItemsParams, settings: S): ItemsResult | Promise<ItemsResult>; | ||
items?(params: ItemsParams, settings: S): ItemsResult | Promise<ItemsResult>; | ||
/** | ||
* Returns OpenCtx annotations for the given file. | ||
*/ | ||
annotations?(params: AnnotationsParams, settings: S): AnnotationsResult | Promise<AnnotationsResult>; | ||
/** | ||
* Called when the provider will no longer be used. The provider should release its resources, | ||
@@ -23,0 +23,0 @@ * such as event listeners or background routines. |
{ | ||
"name": "@openctx/provider", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "OpenCtx provider library", | ||
@@ -22,4 +22,4 @@ "license": "Apache-2.0", | ||
"picomatch": "^3.0.1", | ||
"@openctx/protocol": "0.0.4", | ||
"@openctx/schema": "0.0.3" | ||
"@openctx/protocol": "0.0.5", | ||
"@openctx/schema": "0.0.4" | ||
}, | ||
@@ -26,0 +26,0 @@ "devDependencies": { |
@@ -9,3 +9,5 @@ // Import from a subpackage because the main module calls `os.platform()`, which doesn't work on | ||
export { createFilePositionCalculator, type PositionCalculator } from './helpers/position' | ||
// For convenience, since many providers need globs. | ||
export { matchGlob } |
import type { | ||
AnnotationsParams, | ||
AnnotationsResult, | ||
CapabilitiesParams, | ||
@@ -17,6 +19,2 @@ CapabilitiesResult, | ||
* Reports the capabilities of the provider. | ||
* | ||
* TODO(sqs): fix this...right now capabilities needs to be sent each time right before | ||
* items anyway, so it probably should be like "items" and "resolveItems" or | ||
* some optimization so the client doesnt need to always send over the full text. | ||
*/ | ||
@@ -29,7 +27,12 @@ capabilities( | ||
/** | ||
* Returns OpenCtx items for the given file. | ||
* Returns OpenCtx items. | ||
*/ | ||
items(params: ItemsParams, settings: S): ItemsResult | Promise<ItemsResult> | ||
items?(params: ItemsParams, settings: S): ItemsResult | Promise<ItemsResult> | ||
/** | ||
* Returns OpenCtx annotations for the given file. | ||
*/ | ||
annotations?(params: AnnotationsParams, settings: S): AnnotationsResult | Promise<AnnotationsResult> | ||
/** | ||
* Called when the provider will no longer be used. The provider should release its resources, | ||
@@ -36,0 +39,0 @@ * such as event listeners or background routines. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19667
18
134
+ Added@openctx/protocol@0.0.5(transitive)
+ Added@openctx/schema@0.0.4(transitive)
- Removed@openctx/protocol@0.0.4(transitive)
- Removed@openctx/schema@0.0.3(transitive)
Updated@openctx/protocol@0.0.5
Updated@openctx/schema@0.0.4