carrick 0.3.116 → 0.3.118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contract.d.ts +2 -0
- package/dist/contract.js.map +1 -1
- package/dist/render.js +2 -1
- package/dist/render.js.map +1 -1
- package/package.json +6 -6
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/sidecar/dist/src/capture/anchors.d.ts +1 -0
- package/sidecar/dist/src/capture/anchors.js +1 -1
- package/sidecar/dist/src/capture/api.d.ts +6 -0
- package/sidecar/dist/src/capture/check-classify.js +25 -0
- package/sidecar/dist/src/capture/check-probe.d.ts +1 -1
- package/sidecar/dist/src/capture/check-probe.js +20 -0
- package/sidecar/dist/src/capture/checkout.d.ts +3 -0
- package/sidecar/dist/src/capture/checkout.js +1 -1
- package/sidecar/dist/src/capture/deep-walk.d.ts +10 -0
- package/sidecar/dist/src/capture/deep-walk.js +15 -0
- package/sidecar/dist/src/capture/guarded-fs.d.ts +6 -0
- package/sidecar/dist/src/capture/guarded-fs.js +10 -0
- package/sidecar/dist/src/capture/index.d.ts +5 -0
- package/sidecar/dist/src/capture/index.js +62 -7
- package/sidecar/dist/src/capture/project-references.d.ts +24 -13
- package/sidecar/dist/src/capture/project-references.js +53 -16
- package/sidecar/dist/src/capture/reference-redirect.d.ts +84 -0
- package/sidecar/dist/src/capture/reference-redirect.js +209 -0
- package/sidecar/dist/src/capture/unresolved.d.ts +8 -0
- package/sidecar/dist/src/capture/unresolved.js +18 -2
- package/sidecar/dist/src/declaration-attribution.d.ts +40 -0
- package/sidecar/dist/src/declaration-attribution.js +66 -0
- package/sidecar/dist/src/index.js +37 -0
- package/sidecar/dist/src/library-claims.js +234 -23
- package/sidecar/dist/src/module-format.d.ts +19 -1
- package/sidecar/dist/src/module-format.js +9 -2
- package/sidecar/dist/src/position-rows.d.ts +95 -0
- package/sidecar/dist/src/position-rows.js +844 -0
- package/sidecar/dist/src/project-loader.d.ts +36 -7
- package/sidecar/dist/src/project-loader.js +70 -28
- package/sidecar/dist/src/retype.js +13 -0
- package/sidecar/dist/src/type-inferrer.d.ts +25 -29
- package/sidecar/dist/src/type-inferrer.js +119 -70
- package/sidecar/dist/src/types.d.ts +78 -2
- package/sidecar/dist/src/validators.d.ts +431 -30
- package/sidecar/dist/src/validators.js +45 -1
|
@@ -255,6 +255,22 @@ export interface AddProgramFilesRequest extends BaseRequest {
|
|
|
255
255
|
/** Absolute paths, or relative to the init'd root. */
|
|
256
256
|
files: string[];
|
|
257
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* Write one row for each call, member access, comparison and identifier in
|
|
260
|
+
* each of a service's source files to a gzip JSON-lines file (carrick#2405).
|
|
261
|
+
* Record-only: nothing in a scan reads the file yet.
|
|
262
|
+
*/
|
|
263
|
+
export interface PositionRowsRequest extends BaseRequest {
|
|
264
|
+
action: 'position_rows';
|
|
265
|
+
/** Absolute paths of the service's source files, in the order written. */
|
|
266
|
+
files: string[];
|
|
267
|
+
/** The scanned repo's root: every path in the file is relative to it. */
|
|
268
|
+
scan_root: string;
|
|
269
|
+
/** Where the rows file goes. Written beside it under a temporary name, then renamed. */
|
|
270
|
+
out_path: string;
|
|
271
|
+
/** The service the rows are for, written in the header. */
|
|
272
|
+
service: string;
|
|
273
|
+
}
|
|
258
274
|
/**
|
|
259
275
|
* Request to resolve type definitions from a v2 capture stub package.
|
|
260
276
|
* Returns both the original declaration and the compiler-expanded form for
|
|
@@ -375,6 +391,26 @@ export interface ClaimSlot {
|
|
|
375
391
|
export interface BoundName {
|
|
376
392
|
bound: 'maker' | 'scope';
|
|
377
393
|
}
|
|
394
|
+
/**
|
|
395
|
+
* The function or client a call runs (label structure v2, carrick#2434): a
|
|
396
|
+
* slot of the call itself, or, with `bound: 'maker'`, a slot of the call that
|
|
397
|
+
* made the receiver (a mutation object whose `mutate` runs the function its
|
|
398
|
+
* maker was given).
|
|
399
|
+
*/
|
|
400
|
+
export interface RunsSlot extends ClaimSlot {
|
|
401
|
+
bound?: 'maker';
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* What a receive op's handler is handed (label structure v2, carrick#2434):
|
|
405
|
+
* its parameter `param` is an instance of the package's export `export`, on
|
|
406
|
+
* `side` of the connection (a server's connection handler is given the
|
|
407
|
+
* server end of a socket).
|
|
408
|
+
*/
|
|
409
|
+
export interface Yields {
|
|
410
|
+
param: number;
|
|
411
|
+
export: string;
|
|
412
|
+
side: string;
|
|
413
|
+
}
|
|
378
414
|
/** The closed role list; the role alone picks the checks a claim needs. */
|
|
379
415
|
export type LibraryRole = 'http_client' | 'graphql_client' | 'broker' | 'in_process_bus' | 'socket' | 'server_framework' | 'none';
|
|
380
416
|
/** What an `op` claim does on the wire. */
|
|
@@ -415,6 +451,8 @@ export type LibraryClaim = {
|
|
|
415
451
|
/** A definition's id or a queue's name: bound to every op that names `{ bound: 'maker' }`. */
|
|
416
452
|
name?: ClaimSlot;
|
|
417
453
|
handler?: ClaimSlot;
|
|
454
|
+
/** The function or client the maker runs (label v2). */
|
|
455
|
+
runs?: ClaimSlot;
|
|
418
456
|
key_labels?: Record<string, KeyLabel>;
|
|
419
457
|
name_scope?: NameScope;
|
|
420
458
|
picker?: string;
|
|
@@ -452,6 +490,18 @@ export type LibraryClaim = {
|
|
|
452
490
|
method?: string;
|
|
453
491
|
/** HTTP: where the method sits. */
|
|
454
492
|
method_key?: ClaimSlot;
|
|
493
|
+
/**
|
|
494
|
+
* HTTP (label v2): the method sent when the call names none. Beside
|
|
495
|
+
* `method_key`, the default when that option is absent; alone, the one
|
|
496
|
+
* method the call sends whatever its member is called.
|
|
497
|
+
*/
|
|
498
|
+
method_default?: string;
|
|
499
|
+
/** HTTP (label v2): where the base URL the path joins sits. */
|
|
500
|
+
base?: ClaimSlot;
|
|
501
|
+
/** Label v2: the function or client the op runs. */
|
|
502
|
+
runs?: RunsSlot;
|
|
503
|
+
/** Label v2, `receive` only: what the handler is handed. */
|
|
504
|
+
yields?: Yields;
|
|
455
505
|
} | {
|
|
456
506
|
/** A name the library emits itself, spelled in one of `member`'s parameters. */
|
|
457
507
|
kind: 'reserved';
|
|
@@ -510,7 +560,7 @@ export interface ListLibrarySurfaceRequest extends BaseRequest {
|
|
|
510
560
|
/**
|
|
511
561
|
* Union type for all possible sidecar requests
|
|
512
562
|
*/
|
|
513
|
-
export type SidecarRequest = RetypeCheckRequest | VerifyClientSemanticsRequest | VerifyLibraryClaimsRequest | ListLibrarySurfaceRequest | InitRequest | BundleRequest | CaptureV2Request | CheckV2Request | InferRequest | ResolveDefinitionsRequest | HealthRequest | ShutdownRequest | ListProgramFilesRequest | AddProgramFilesRequest;
|
|
563
|
+
export type SidecarRequest = RetypeCheckRequest | VerifyClientSemanticsRequest | VerifyLibraryClaimsRequest | ListLibrarySurfaceRequest | InitRequest | BundleRequest | CaptureV2Request | CheckV2Request | InferRequest | ResolveDefinitionsRequest | HealthRequest | ShutdownRequest | ListProgramFilesRequest | AddProgramFilesRequest | PositionRowsRequest;
|
|
514
564
|
/**
|
|
515
565
|
* Request for a specific symbol to be bundled
|
|
516
566
|
*/
|
|
@@ -700,6 +750,32 @@ export interface HealthResponse extends BaseResponse {
|
|
|
700
750
|
export interface ShutdownResponse extends BaseResponse {
|
|
701
751
|
status: 'success';
|
|
702
752
|
}
|
|
753
|
+
/** Response for position_rows: what was written, counted. */
|
|
754
|
+
export interface PositionRowsResponse extends BaseResponse {
|
|
755
|
+
result?: PositionRowsCounts;
|
|
756
|
+
errors?: string[];
|
|
757
|
+
}
|
|
758
|
+
export interface PositionRowsCounts {
|
|
759
|
+
/** Source files in the request, each one line of the file. */
|
|
760
|
+
files: number;
|
|
761
|
+
rows: number;
|
|
762
|
+
/** Rows whose position resolved to a symbol. */
|
|
763
|
+
resolved: number;
|
|
764
|
+
/** Rows whose type is `any` (flag 1). */
|
|
765
|
+
any: number;
|
|
766
|
+
/** Rows whose type is the compiler's error type (flag 2). */
|
|
767
|
+
error_type: number;
|
|
768
|
+
/** `impl` rows: implementations of a bodyless declaration, or one past the cap (carrick#2430). */
|
|
769
|
+
impl: number;
|
|
770
|
+
/** `jsx` rows: one per JSX opening or self-closing element. */
|
|
771
|
+
jsx: number;
|
|
772
|
+
/** The rows file's size on disk, compressed. */
|
|
773
|
+
bytes: number;
|
|
774
|
+
/** Time spent building programs and reading files into them. */
|
|
775
|
+
load_ms: number;
|
|
776
|
+
/** Time spent walking the files and writing the rows. */
|
|
777
|
+
walk_ms: number;
|
|
778
|
+
}
|
|
703
779
|
/**
|
|
704
780
|
* Response for list_program_files action
|
|
705
781
|
*/
|
|
@@ -856,7 +932,7 @@ export interface ListLibrarySurfaceResponse extends BaseResponse {
|
|
|
856
932
|
/**
|
|
857
933
|
* Union type for all possible sidecar responses
|
|
858
934
|
*/
|
|
859
|
-
export type SidecarResponse = RetypeCheckResponse | VerifyClientSemanticsResponse | VerifyLibraryClaimsResponse | ListLibrarySurfaceResponse | InitResponse | BundleResponse | CaptureV2Response | CheckV2Response | InferResponse | ResolveDefinitionsResponse | HealthResponse | ShutdownResponse | ListProgramFilesResponse | AddProgramFilesResponse | ErrorResponse;
|
|
935
|
+
export type SidecarResponse = RetypeCheckResponse | VerifyClientSemanticsResponse | VerifyLibraryClaimsResponse | ListLibrarySurfaceResponse | InitResponse | BundleResponse | CaptureV2Response | CheckV2Response | InferResponse | ResolveDefinitionsResponse | HealthResponse | ShutdownResponse | ListProgramFilesResponse | AddProgramFilesResponse | PositionRowsResponse | ErrorResponse;
|
|
860
936
|
/**
|
|
861
937
|
* An entry in the type manifest
|
|
862
938
|
*/
|