@osdk/integration-testing 0.0.0 → 0.1.0
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/CHANGELOG.md +16 -0
- package/bin/postinstall.mjs +15 -0
- package/build/browser/cli-service/CliServiceLauncher.js +220 -0
- package/build/browser/cli-service/CliServiceLauncher.js.map +1 -0
- package/build/browser/cli-service/FoundryCliService.js +168 -0
- package/build/browser/cli-service/FoundryCliService.js.map +1 -0
- package/build/browser/cli-service/OntologyServer.js +32 -0
- package/build/browser/cli-service/OntologyServer.js.map +1 -0
- package/build/browser/cli-service/ServiceDiscoverer.js +100 -0
- package/build/browser/cli-service/ServiceDiscoverer.js.map +1 -0
- package/build/browser/cli-service/StatusServer.js +91 -0
- package/build/browser/cli-service/StatusServer.js.map +1 -0
- package/build/browser/createIntegrationClient.js +67 -0
- package/build/browser/createIntegrationClient.js.map +1 -0
- package/build/browser/createIntegrationServer.js +115 -0
- package/build/browser/createIntegrationServer.js.map +1 -0
- package/build/browser/createSeedClient.js +77 -0
- package/build/browser/createSeedClient.js.map +1 -0
- package/build/browser/generated/cli/OntologySeedingService/setSeed.js +28 -0
- package/build/browser/generated/cli/OntologySeedingService/setSeed.js.map +1 -0
- package/build/browser/generated/cli/OntologySeedingService.js +19 -0
- package/build/browser/generated/cli/OntologySeedingService.js.map +1 -0
- package/build/browser/generated/cli/StatusService/getStatus.js +25 -0
- package/build/browser/generated/cli/StatusService/getStatus.js.map +1 -0
- package/build/browser/generated/cli/StatusService/publishStatus.js +26 -0
- package/build/browser/generated/cli/StatusService/publishStatus.js.map +1 -0
- package/build/browser/generated/cli/StatusService.js +20 -0
- package/build/browser/generated/cli/StatusService.js.map +1 -0
- package/build/browser/generated/cli/__components.js +2 -0
- package/build/browser/generated/cli/__components.js.map +1 -0
- package/build/browser/generated/cli/index.js +20 -0
- package/build/browser/generated/cli/index.js.map +1 -0
- package/build/browser/index.js +27 -0
- package/build/browser/index.js.map +1 -0
- package/build/browser/scripts/download.js +92 -0
- package/build/browser/scripts/download.js.map +1 -0
- package/build/browser/scripts/foundry-host.js +59 -0
- package/build/browser/scripts/foundry-host.js.map +1 -0
- package/build/browser/scripts/foundry-token.js +50 -0
- package/build/browser/scripts/foundry-token.js.map +1 -0
- package/build/browser/scripts/gitRemote.js +39 -0
- package/build/browser/scripts/gitRemote.js.map +1 -0
- package/build/browser/scripts/postinstall.js +38 -0
- package/build/browser/scripts/postinstall.js.map +1 -0
- package/build/browser/test/NoSpawnStatusServer.js +33 -0
- package/build/browser/test/NoSpawnStatusServer.js.map +1 -0
- package/build/browser/test/StubService.js +61 -0
- package/build/browser/test/StubService.js.map +1 -0
- package/build/browser/test/emptyOntologyMetadata.js +32 -0
- package/build/browser/test/emptyOntologyMetadata.js.map +1 -0
- package/build/browser/test/stubStatusServer.js +74 -0
- package/build/browser/test/stubStatusServer.js.map +1 -0
- package/build/browser/test/writeDiscoveryFile.js +39 -0
- package/build/browser/test/writeDiscoveryFile.js.map +1 -0
- package/build/browser/types.js +2 -0
- package/build/browser/types.js.map +1 -0
- package/build/browser/utils/empty-ontology-block.js +61 -0
- package/build/browser/utils/empty-ontology-block.js.map +1 -0
- package/build/browser/utils/foundry-cli.js +46 -0
- package/build/browser/utils/foundry-cli.js.map +1 -0
- package/build/browser/utils/process.js +26 -0
- package/build/browser/utils/process.js.map +1 -0
- package/build/browser/utils/service.js +33 -0
- package/build/browser/utils/service.js.map +1 -0
- package/build/cjs/index.cjs +841 -0
- package/build/cjs/index.cjs.map +1 -0
- package/build/cjs/index.d.cts +118 -0
- package/build/esm/cli-service/CliServiceLauncher.js +220 -0
- package/build/esm/cli-service/CliServiceLauncher.js.map +1 -0
- package/build/esm/cli-service/FoundryCliService.js +168 -0
- package/build/esm/cli-service/FoundryCliService.js.map +1 -0
- package/build/esm/cli-service/OntologyServer.js +32 -0
- package/build/esm/cli-service/OntologyServer.js.map +1 -0
- package/build/esm/cli-service/ServiceDiscoverer.js +100 -0
- package/build/esm/cli-service/ServiceDiscoverer.js.map +1 -0
- package/build/esm/cli-service/StatusServer.js +91 -0
- package/build/esm/cli-service/StatusServer.js.map +1 -0
- package/build/esm/createIntegrationClient.js +67 -0
- package/build/esm/createIntegrationClient.js.map +1 -0
- package/build/esm/createIntegrationServer.js +115 -0
- package/build/esm/createIntegrationServer.js.map +1 -0
- package/build/esm/createSeedClient.js +77 -0
- package/build/esm/createSeedClient.js.map +1 -0
- package/build/esm/generated/cli/OntologySeedingService/setSeed.js +28 -0
- package/build/esm/generated/cli/OntologySeedingService/setSeed.js.map +1 -0
- package/build/esm/generated/cli/OntologySeedingService.js +19 -0
- package/build/esm/generated/cli/OntologySeedingService.js.map +1 -0
- package/build/esm/generated/cli/StatusService/getStatus.js +25 -0
- package/build/esm/generated/cli/StatusService/getStatus.js.map +1 -0
- package/build/esm/generated/cli/StatusService/publishStatus.js +26 -0
- package/build/esm/generated/cli/StatusService/publishStatus.js.map +1 -0
- package/build/esm/generated/cli/StatusService.js +20 -0
- package/build/esm/generated/cli/StatusService.js.map +1 -0
- package/build/esm/generated/cli/__components.js +2 -0
- package/build/esm/generated/cli/__components.js.map +1 -0
- package/build/esm/generated/cli/index.js +20 -0
- package/build/esm/generated/cli/index.js.map +1 -0
- package/build/esm/index.js +27 -0
- package/build/esm/index.js.map +1 -0
- package/build/esm/scripts/download.js +92 -0
- package/build/esm/scripts/download.js.map +1 -0
- package/build/esm/scripts/foundry-host.js +59 -0
- package/build/esm/scripts/foundry-host.js.map +1 -0
- package/build/esm/scripts/foundry-token.js +50 -0
- package/build/esm/scripts/foundry-token.js.map +1 -0
- package/build/esm/scripts/gitRemote.js +39 -0
- package/build/esm/scripts/gitRemote.js.map +1 -0
- package/build/esm/scripts/postinstall.js +38 -0
- package/build/esm/scripts/postinstall.js.map +1 -0
- package/build/esm/test/NoSpawnStatusServer.js +33 -0
- package/build/esm/test/NoSpawnStatusServer.js.map +1 -0
- package/build/esm/test/StubService.js +61 -0
- package/build/esm/test/StubService.js.map +1 -0
- package/build/esm/test/emptyOntologyMetadata.js +32 -0
- package/build/esm/test/emptyOntologyMetadata.js.map +1 -0
- package/build/esm/test/stubStatusServer.js +74 -0
- package/build/esm/test/stubStatusServer.js.map +1 -0
- package/build/esm/test/writeDiscoveryFile.js +39 -0
- package/build/esm/test/writeDiscoveryFile.js.map +1 -0
- package/build/esm/types.js +2 -0
- package/build/esm/types.js.map +1 -0
- package/build/esm/utils/empty-ontology-block.js +61 -0
- package/build/esm/utils/empty-ontology-block.js.map +1 -0
- package/build/esm/utils/foundry-cli.js +46 -0
- package/build/esm/utils/foundry-cli.js.map +1 -0
- package/build/esm/utils/process.js +26 -0
- package/build/esm/utils/process.js.map +1 -0
- package/build/esm/utils/service.js +33 -0
- package/build/esm/utils/service.js.map +1 -0
- package/build/types/cli-service/CliServiceLauncher.d.ts +36 -0
- package/build/types/cli-service/CliServiceLauncher.d.ts.map +1 -0
- package/build/types/cli-service/FoundryCliService.d.ts +60 -0
- package/build/types/cli-service/FoundryCliService.d.ts.map +1 -0
- package/build/types/cli-service/OntologyServer.d.ts +10 -0
- package/build/types/cli-service/OntologyServer.d.ts.map +1 -0
- package/build/types/cli-service/ServiceDiscoverer.d.ts +22 -0
- package/build/types/cli-service/ServiceDiscoverer.d.ts.map +1 -0
- package/build/types/cli-service/StatusServer.d.ts +17 -0
- package/build/types/cli-service/StatusServer.d.ts.map +1 -0
- package/build/types/createIntegrationClient.d.ts +2 -0
- package/build/types/createIntegrationClient.d.ts.map +1 -0
- package/build/types/createIntegrationServer.d.ts +2 -0
- package/build/types/createIntegrationServer.d.ts.map +1 -0
- package/build/types/createSeedClient.d.ts +9 -0
- package/build/types/createSeedClient.d.ts.map +1 -0
- package/build/types/generated/cli/OntologySeedingService/setSeed.d.ts +9 -0
- package/build/types/generated/cli/OntologySeedingService/setSeed.d.ts.map +1 -0
- package/build/types/generated/cli/OntologySeedingService.d.ts +1 -0
- package/build/types/generated/cli/OntologySeedingService.d.ts.map +1 -0
- package/build/types/generated/cli/StatusService/getStatus.d.ts +6 -0
- package/build/types/generated/cli/StatusService/getStatus.d.ts.map +1 -0
- package/build/types/generated/cli/StatusService/publishStatus.d.ts +7 -0
- package/build/types/generated/cli/StatusService/publishStatus.d.ts.map +1 -0
- package/build/types/generated/cli/StatusService.d.ts +2 -0
- package/build/types/generated/cli/StatusService.d.ts.map +1 -0
- package/build/types/generated/cli/__components.d.ts +189 -0
- package/build/types/generated/cli/__components.d.ts.map +1 -0
- package/build/types/generated/cli/index.d.ts +3 -0
- package/build/types/generated/cli/index.d.ts.map +1 -0
- package/build/types/index.d.ts +10 -0
- package/build/types/index.d.ts.map +1 -0
- package/build/types/scripts/download.d.ts +6 -0
- package/build/types/scripts/download.d.ts.map +1 -0
- package/build/types/scripts/foundry-host.d.ts +7 -0
- package/build/types/scripts/foundry-host.d.ts.map +1 -0
- package/build/types/scripts/foundry-token.d.ts +5 -0
- package/build/types/scripts/foundry-token.d.ts.map +1 -0
- package/build/types/scripts/gitRemote.d.ts +9 -0
- package/build/types/scripts/gitRemote.d.ts.map +1 -0
- package/build/types/scripts/postinstall.d.ts +1 -0
- package/build/types/scripts/postinstall.d.ts.map +1 -0
- package/build/types/test/NoSpawnStatusServer.d.ts +11 -0
- package/build/types/test/NoSpawnStatusServer.d.ts.map +1 -0
- package/build/types/test/StubService.d.ts +23 -0
- package/build/types/test/StubService.d.ts.map +1 -0
- package/build/types/test/emptyOntologyMetadata.d.ts +3 -0
- package/build/types/test/emptyOntologyMetadata.d.ts.map +1 -0
- package/build/types/test/stubStatusServer.d.ts +14 -0
- package/build/types/test/stubStatusServer.d.ts.map +1 -0
- package/build/types/test/writeDiscoveryFile.d.ts +8 -0
- package/build/types/test/writeDiscoveryFile.d.ts.map +1 -0
- package/build/types/types.d.ts +104 -0
- package/build/types/types.d.ts.map +1 -0
- package/build/types/utils/empty-ontology-block.d.ts +4 -0
- package/build/types/utils/empty-ontology-block.d.ts.map +1 -0
- package/build/types/utils/foundry-cli.d.ts +13 -0
- package/build/types/utils/foundry-cli.d.ts.map +1 -0
- package/build/types/utils/process.d.ts +1 -0
- package/build/types/utils/process.d.ts.map +1 -0
- package/build/types/utils/service.d.ts +4 -0
- package/build/types/utils/service.d.ts.map +1 -0
- package/package.json +93 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ServiceName } from "../generated/cli/index.js";
|
|
2
|
+
import { type FoundryCliService, type ServiceHealth } from "./FoundryCliService.js";
|
|
3
|
+
import { StatusServer } from "./StatusServer.js";
|
|
4
|
+
export interface CliServiceLauncherConfig {
|
|
5
|
+
/** Directory the services run in; `.palantir/` hangs off it. */
|
|
6
|
+
projectDir?: string;
|
|
7
|
+
/** Path to the `foundry` binary. */
|
|
8
|
+
foundryCliPath?: string;
|
|
9
|
+
/** Status server to use. One is created if not supplied. */
|
|
10
|
+
statusServer?: StatusServer;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Brings a set of Foundry services. Includes a status server by default.
|
|
14
|
+
*/
|
|
15
|
+
export declare class CliServiceLauncher {
|
|
16
|
+
#private;
|
|
17
|
+
constructor(config?: CliServiceLauncherConfig);
|
|
18
|
+
get services(): readonly FoundryCliService[];
|
|
19
|
+
get(name: ServiceName): FoundryCliService | undefined;
|
|
20
|
+
register<T extends FoundryCliService>(service: T): T;
|
|
21
|
+
start(): Promise<void>;
|
|
22
|
+
startService(service: FoundryCliService): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Poll a service's health until it is ready, reaches a terminal state, or
|
|
25
|
+
* exceeds its timeout.
|
|
26
|
+
*/
|
|
27
|
+
waitUntilReady(service: FoundryCliService): Promise<ServiceHealth>;
|
|
28
|
+
checkHealth(): Promise<ServiceHealth[]>;
|
|
29
|
+
checkDependencies(service: FoundryCliService): Promise<ServiceHealth[]>;
|
|
30
|
+
dependenciesReady(service: FoundryCliService): Promise<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* Stop every service, dependents before their dependencies, waiting for each
|
|
33
|
+
* process to be gone before the next is signalled.
|
|
34
|
+
*/
|
|
35
|
+
stop(): Promise<void>;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAqBA,cAAc,mBAAmB,2BAA4B;AAC7D,cAEO,wBACA,qBACA,wBAAyB;AAEhC,SAAS,oBAAoB,mBAAoB;AAIjD,iBAAiB,yBAAyB;;CAExC;;CAEA;;CAEA,eAAe;AAChB;;;;AAKD,OAAO,cAAM,mBAAmB;;CAS9B,YAAYA,SAAQ;CAcpB,IAAI,qBAAqB;CAIzB,IAAIC,MAAM,cAAc;CAIxB,SAAS,UAAU,mBAAmBC,SAAS,IAAI;CAoBnD,AAAM,SAAS;CAaf,AAAM,aAAaC,SAAS,oBAAoB;;;;;CAmDhD,AAAM,eAAeA,SAAS,oBAAoB,QAAQ;CAsB1D,AAAM,eAAe,QAAQ;CAO7B,AAAM,kBACJA,SAAS,oBACR,QAAQ;CAOX,AAAM,kBAAkBA,SAAS,oBAAoB;;;;;CASrD,AAAM,QAAQ;AA2Df","names":["config: CliServiceLauncherConfig","name: ServiceName","service: T","service: FoundryCliService"],"sources":["../../../src/cli-service/CliServiceLauncher.ts"],"version":3,"file":"CliServiceLauncher.d.ts"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ServiceLifecycle, ServiceName } from "../generated/cli/index.js";
|
|
2
|
+
import type { ServiceDiscoverer } from "./ServiceDiscoverer.js";
|
|
3
|
+
import type { StatusServer } from "./StatusServer.js";
|
|
4
|
+
export declare const DEFAULT_READY_TIMEOUT_MS = 3e4;
|
|
5
|
+
export declare const DEFAULT_STOP_GRACE_MS = 5e3;
|
|
6
|
+
export type ServiceState = ServiceLifecycle | "UNDISCOVERED" | "DISCOVERED";
|
|
7
|
+
export interface ServiceHealth {
|
|
8
|
+
service: ServiceName;
|
|
9
|
+
state: ServiceState;
|
|
10
|
+
ready: boolean;
|
|
11
|
+
terminal: boolean;
|
|
12
|
+
url?: string;
|
|
13
|
+
message?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The shared collaborators a service needs to answer questions about itself.
|
|
17
|
+
* Injected by the launcher via {@link FoundryCliService.attach} so services do
|
|
18
|
+
* not have to construct — or know how to reach — either one.
|
|
19
|
+
*/
|
|
20
|
+
export interface ServiceContext {
|
|
21
|
+
discoverer: ServiceDiscoverer;
|
|
22
|
+
statusServer: StatusServer;
|
|
23
|
+
}
|
|
24
|
+
export interface FoundryServiceConfig {
|
|
25
|
+
/** Path to the `foundry` binary. */
|
|
26
|
+
foundryCliPath?: string;
|
|
27
|
+
/** Working directory the CLI runs in; the `.palantir/` dir hangs off it. */
|
|
28
|
+
projectPath: string;
|
|
29
|
+
/** Services that must be ready before this one may be started. */
|
|
30
|
+
dependencies?: readonly FoundryCliService[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* One Foundry CLI service subprocess.
|
|
34
|
+
*
|
|
35
|
+
* Subclasses supply the `foundry` subcommand to run and, where the default is
|
|
36
|
+
* wrong, how to tell that the service is up.
|
|
37
|
+
*
|
|
38
|
+
* Dependencies are declared but not enforced here: a service names what it needs
|
|
39
|
+
* and {@link CliServiceLauncher} is what orders and awaits them.
|
|
40
|
+
*/
|
|
41
|
+
export declare abstract class FoundryCliService {
|
|
42
|
+
#private;
|
|
43
|
+
readonly name: ServiceName;
|
|
44
|
+
readonly dependencies: readonly FoundryCliService[];
|
|
45
|
+
protected constructor(name: ServiceName, config: FoundryServiceConfig);
|
|
46
|
+
protected abstract getArgs(): readonly string[];
|
|
47
|
+
getProjectPath(): string;
|
|
48
|
+
getCaCertPath(): string | undefined;
|
|
49
|
+
getUrl(): string | undefined;
|
|
50
|
+
getExitInfo(): string | undefined;
|
|
51
|
+
getCapturedStderr(): string;
|
|
52
|
+
protected getContext(): ServiceContext;
|
|
53
|
+
attach(context: ServiceContext): void;
|
|
54
|
+
start(): Promise<void>;
|
|
55
|
+
checkHealth(): Promise<ServiceHealth>;
|
|
56
|
+
/**
|
|
57
|
+
* Signal the service and wait for the process to actually be gone.
|
|
58
|
+
*/
|
|
59
|
+
stop(): Promise<void>;
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAqBA,cAAc,kBAAkB,mBAAmB,2BAA4B;AAC/E,cAAc,yBAAyB,wBAAyB;AAChE,cAAc,oBAAoB,mBAAoB;AAItD,OAAO,cAAM,2BAA2B;AAExC,OAAO,cAAM,wBAAwB;AAErC,YAAY,eAAe,mBAAmB,iBAAiB;AAE/D,iBAAiB,cAAc;CAC7B,SAAS;CACT,OAAO;CACP;CACA;CACA;CACA;AACD;;;;;;AAOD,iBAAiB,eAAe;CAC9B,YAAY;CACZ,cAAc;AACf;AAED,iBAAiB,qBAAqB;;CAEpC;;CAEA;;CAEA,wBAAwB;AACzB;;;;;;;;;;AAgBD,OAAO,uBAAe,kBAAkB;;CACtC,SAAS,MAAM;CACf,SAAS,uBAAuB;CAShC,UAAU,YAAYA,MAAM,aAAaC,QAAQ;CAOjD,mBAAmB;CAEnB;CAIA;CAIA;CAIA;CAQA;CAIA,UAAU,cAAc;CAUxB,OAAOC,SAAS;CAIhB,AAAM,SAAS;CA4Cf,AAAM,eAAe,QAAQ;;;;CA0B7B,AAAM,QAAQ;AAqBf","names":["name: ServiceName","config: FoundryServiceConfig","context: ServiceContext"],"sources":["../../../src/cli-service/FoundryCliService.ts"],"version":3,"file":"FoundryCliService.d.ts"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FoundryCliService, type FoundryServiceConfig } from "./FoundryCliService.js";
|
|
2
|
+
export interface OntologyServerConfig extends FoundryServiceConfig {
|
|
3
|
+
metadataPath: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class OntologyServer extends FoundryCliService {
|
|
6
|
+
#private;
|
|
7
|
+
constructor(config: OntologyServerConfig);
|
|
8
|
+
getMetadataPath(): string;
|
|
9
|
+
protected getArgs(): readonly string[];
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAkBA,SACE,wBACK,4BACA,wBAAyB;AAEhC,iBAAiB,6BAA6B,qBAAqB;CACjE;AACD;AAED,OAAO,cAAM,uBAAuB,kBAAkB;;CAGpD,YAAYA,QAAQ;CAOpB;CAIA,UAAmB;AAWpB","names":["config: OntologyServerConfig"],"sources":["../../../src/cli-service/OntologyServer.ts"],"version":3,"file":"OntologyServer.d.ts"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ComponentDiscovery, ServiceName } from "../generated/cli/index.js";
|
|
2
|
+
export type ServiceDiscovererConfig = {
|
|
3
|
+
basePath: string
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Reads the discovery files that running Foundry services publish into
|
|
7
|
+
* `basePath`.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ServiceDiscoverer {
|
|
10
|
+
#private;
|
|
11
|
+
constructor(args: ServiceDiscovererConfig);
|
|
12
|
+
get discoveryDir(): string;
|
|
13
|
+
start(): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Re-read every discovery file in the directory.
|
|
16
|
+
*/
|
|
17
|
+
refresh(): Promise<ComponentDiscovery[]>;
|
|
18
|
+
get(name: ServiceName): ComponentDiscovery | undefined;
|
|
19
|
+
isDiscovered(name: ServiceName): boolean;
|
|
20
|
+
all(): Map<ServiceName, ComponentDiscovery>;
|
|
21
|
+
stop(): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAqBA,cACE,oBACA,mBACK,2BAA4B;AAInC,YAAY,0BAA0B;CACpC;AACD;;;;;AAMD,OAAO,cAAM,kBAAkB;;CAI7B,YAAYA,MAAM;CAIlB,IAAI;CAIJ,AAAM,SAAS;;;;CAQf,AAAM,WAAW,QAAQ;CAUzB,IAAIC,MAAM,cAAc;CAYxB,aAAaA,MAAM;CAInB,OAAO,IAAI,aAAa;CAWxB;AA0BD","names":["args: ServiceDiscovererConfig","name: ServiceName"],"sources":["../../../src/cli-service/ServiceDiscoverer.ts"],"version":3,"file":"ServiceDiscoverer.d.ts"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ServiceName, type ServiceStatus } from "../generated/cli/index.js";
|
|
2
|
+
import { FoundryCliService, type FoundryServiceConfig, type ServiceHealth } from "./FoundryCliService.js";
|
|
3
|
+
export type StatusServerConfig = FoundryServiceConfig;
|
|
4
|
+
/**
|
|
5
|
+
* The local status server, and the health authority for every other service.
|
|
6
|
+
*/
|
|
7
|
+
export declare class StatusServer extends FoundryCliService {
|
|
8
|
+
#private;
|
|
9
|
+
constructor(config: StatusServerConfig);
|
|
10
|
+
protected getArgs(): readonly string[];
|
|
11
|
+
checkHealth(): Promise<ServiceHealth>;
|
|
12
|
+
/**
|
|
13
|
+
* The lifecycle snapshot for every service.
|
|
14
|
+
*/
|
|
15
|
+
getServiceStatuses(): Promise<ServiceStatus[]>;
|
|
16
|
+
getServiceStatus(name: ServiceName): Promise<ServiceStatus | undefined>;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAoBA,cACO,kBACA,qBAEA,2BAA4B;AACnC,SACE,wBACK,2BACA,qBACA,wBAAyB;AAIhC,YAAY,qBAAqB;;;;AAKjC,OAAO,cAAM,qBAAqB,kBAAkB;;CAIlD,YAAYA,QAAQ;CAIpB,UAAmB;CAUnB,AAAe,eAAe,QAAQ;;;;CAsCtC,AAAM,sBAAsB,QAAQ;CAepC,AAAM,iBACJC,MAAM,cACL,QAAQ;AAIZ","names":["config: StatusServerConfig","name: ServiceName"],"sources":["../../../src/cli-service/StatusServer.ts"],"version":3,"file":"StatusServer.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AA6BA,cAAc,mBAAmB,+BAA+B,YAAa;AAW7E,OAAO,iBAAe,wBACpBA,QAAQ,0BACP,QAAQ","names":["config: IntegrationClientConfig"],"sources":["../../src/createIntegrationClient.ts"],"version":3,"file":"createIntegrationClient.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AA6BA,cAEE,mBACA,+BAEK,YAAa;AAyBpB,OAAO,iBAAe,wBACpBA,QAAQ,0BACP,QAAQ","names":["config: IntegrationServerConfig"],"sources":["../../src/createIntegrationServer.ts"],"version":3,"file":"createIntegrationServer.d.ts"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as Ontology from "@osdk/foundry.ontologies";
|
|
2
|
+
import type { SeedClient } from "./types.js";
|
|
3
|
+
type SeedClientConfig = {
|
|
4
|
+
baseUrl: string
|
|
5
|
+
metadata: Ontology.OntologyFullMetadata
|
|
6
|
+
fetchFn?: typeof fetch
|
|
7
|
+
};
|
|
8
|
+
export declare function createSeedClient(config: SeedClientConfig): SeedClient;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,iBAAiB,cAAc,0BAA2B;AAQ1D,cAAc,kBAAkB,YAAa;KAExC,mBAAmB;CACtB;CACA,UAAU,SAAS;CACnB,iBAAiB;AAClB;AAKD,OAAO,iBAAS,iBAAiBA,QAAQ,mBAAmB","names":["config: SeedClientConfig"],"sources":["../../src/createSeedClient.ts"],"version":3,"file":"createSeedClient.d.ts"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ConjureContext } from "conjure-lite";
|
|
2
|
+
import type { OntologySeed as _OntologySeed, SetSeedResponse as _SetSeedResponse } from "../__components.js";
|
|
3
|
+
/**
|
|
4
|
+
* Sets the seed state of the local ontology server. Succeeds with an
|
|
5
|
+
* empty `200` response; failures surface as errors: 400 for a malformed
|
|
6
|
+
* request body, 503 while the server is still starting, and 500 (with
|
|
7
|
+
* the underlying detail) for seeding failures.
|
|
8
|
+
*/
|
|
9
|
+
export declare function setSeed(ctx: ConjureContext, seed: _OntologySeed): Promise<_SetSeedResponse>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAiBA,cAA4B,sBAAsB,cAAe;AAEjE,cACE,gBAAgB,eAChB,mBAAmB,wBACd,oBAAqB;;;;;;;AAQ5B,OAAO,iBAAe,QACpBA,KAAK,gBACLC,MAAM,gBACL,QAAQ","names":["ctx: ConjureContext","seed: _OntologySeed"],"sources":["../../../../../src/generated/cli/OntologySeedingService/setSeed.ts"],"version":3,"file":"setSeed.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { setSeed } from "./OntologySeedingService/setSeed.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAiBA,SAAS,eAAe","names":[],"sources":["../../../../src/generated/cli/OntologySeedingService.ts"],"version":3,"file":"OntologySeedingService.d.ts"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ConjureContext } from "conjure-lite";
|
|
2
|
+
import type { ServiceStatus as _ServiceStatus } from "../__components.js";
|
|
3
|
+
/**
|
|
4
|
+
* Return the current status of all services.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getStatus(ctx: ConjureContext): Promise<Array<_ServiceStatus>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAiBA,cAA4B,sBAAsB,cAAe;AAEjE,cAAc,iBAAiB,sBAAsB,oBAAqB;;;;AAK1E,OAAO,iBAAe,UACpBA,KAAK,iBACJ,QAAQ,MAAM","names":["ctx: ConjureContext"],"sources":["../../../../../src/generated/cli/StatusService/getStatus.ts"],"version":3,"file":"getStatus.d.ts"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ConjureContext } from "conjure-lite";
|
|
2
|
+
import type { ServiceStatus as _ServiceStatus } from "../__components.js";
|
|
3
|
+
/**
|
|
4
|
+
* Publish a lifecycle event. Called by services whenever a status
|
|
5
|
+
* transition occurs.
|
|
6
|
+
*/
|
|
7
|
+
export declare function publishStatus(ctx: ConjureContext, status: _ServiceStatus): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAiBA,cAA4B,sBAAsB,cAAe;AAEjE,cAAc,iBAAiB,sBAAsB,oBAAqB;;;;;AAM1E,OAAO,iBAAe,cACpBA,KAAK,gBACLC,QAAQ,iBACP","names":["ctx: ConjureContext","status: _ServiceStatus"],"sources":["../../../../../src/generated/cli/StatusService/publishStatus.ts"],"version":3,"file":"publishStatus.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAiBA,SAAS,qBAAqB;AAC9B,SAAS,iBAAiB","names":[],"sources":["../../../../src/generated/cli/StatusService.ts"],"version":3,"file":"StatusService.d.ts"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marketplace bundling settings; CLI flags override these values when provided
|
|
3
|
+
*/
|
|
4
|
+
export interface BundleConfig {
|
|
5
|
+
associatedRid?: string | null | undefined;
|
|
6
|
+
description: string;
|
|
7
|
+
installMode: InstallMode;
|
|
8
|
+
mavenCoordinate?: string | null | undefined;
|
|
9
|
+
name: string;
|
|
10
|
+
salt?: string | null | undefined;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A single component declared in a superrepo's `foundry.yml`.
|
|
14
|
+
*/
|
|
15
|
+
export interface Component {
|
|
16
|
+
path: string;
|
|
17
|
+
type: ServiceName;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Runtime metadata published by a started preview service so
|
|
21
|
+
* other services in the superrepo can locate it. Each running
|
|
22
|
+
* service writes a file at
|
|
23
|
+
* `<foundry.yml dir>/.palantir/.<service-name>-discovery.json`
|
|
24
|
+
* (kebab-cased `ServiceName`). Readers treat the file as stale
|
|
25
|
+
* if the recorded process is no longer alive.
|
|
26
|
+
*/
|
|
27
|
+
export interface ComponentDiscovery {
|
|
28
|
+
caCertPath?: string | null | undefined;
|
|
29
|
+
pid: number;
|
|
30
|
+
processStartTimeSecs: number;
|
|
31
|
+
url: string;
|
|
32
|
+
}
|
|
33
|
+
export interface FoundryBackendError {
|
|
34
|
+
backtrace?: string | null | undefined;
|
|
35
|
+
errorInstanceId?: string | null | undefined;
|
|
36
|
+
errorName: string;
|
|
37
|
+
message: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Project-level configuration loaded from `foundry.yml`.
|
|
41
|
+
* Contains repo-wide settings and a list of products. Single-product
|
|
42
|
+
* foundry.yml files (with top-level `components`) are normalized into
|
|
43
|
+
* this shape at load time with one product.
|
|
44
|
+
*/
|
|
45
|
+
export interface FoundryConfig {
|
|
46
|
+
functionsTypescriptRuntimeVersion?: string | null | undefined;
|
|
47
|
+
minCliVersion: string;
|
|
48
|
+
platformApiProxy?: PlatformApiProxyConfig | null | undefined;
|
|
49
|
+
products: Array<ProductConfig>;
|
|
50
|
+
}
|
|
51
|
+
export interface GenericFoundryCliError {
|
|
52
|
+
errorName: string;
|
|
53
|
+
message: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* A single import entry. All fields are optional so the schema can
|
|
57
|
+
* be extended with new import kinds without breaking existing
|
|
58
|
+
* manifests.
|
|
59
|
+
*/
|
|
60
|
+
export interface ImportConfig {
|
|
61
|
+
ontology?: string | null | undefined;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Install strategy for a marketplace block set.
|
|
65
|
+
*/
|
|
66
|
+
export type InstallMode = "PRODUCTION" | "BOOTSTRAP" | "SINGLETON";
|
|
67
|
+
/**
|
|
68
|
+
* A single seed object's property bag: keys are property API names,
|
|
69
|
+
* values are the corresponding property values. Serializes to
|
|
70
|
+
* `Record<string, unknown>` in the OSDK `SeedOutput`.
|
|
71
|
+
*/
|
|
72
|
+
export type ObjectSeed = Record<string, SeedPropertyValue>;
|
|
73
|
+
/**
|
|
74
|
+
* The seed state of a local ontology. Mirrors the `SeedOutput`
|
|
75
|
+
* shape produced by the OSDK seed helpers (palantir/osdk-ts,
|
|
76
|
+
* `packages/seed-helpers/src/types.ts`): the seed objects keyed by
|
|
77
|
+
* object-type API name, plus the links between them.
|
|
78
|
+
*/
|
|
79
|
+
export interface OntologySeed {
|
|
80
|
+
links: Array<SeedLinkEntry>;
|
|
81
|
+
objects: Record<string, Array<ObjectSeed>>;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Routing rules consumed by `foundry start platform-api-proxy`.
|
|
85
|
+
* Both lists default to empty when omitted.
|
|
86
|
+
*/
|
|
87
|
+
export interface PlatformApiProxyConfig {
|
|
88
|
+
ontologyFoundryFallback: Array<PlatformApiProxyRoute>;
|
|
89
|
+
passthrough: Array<PlatformApiProxyRoute>;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* A path glob plus the HTTP methods that may match.
|
|
93
|
+
*/
|
|
94
|
+
export interface PlatformApiProxyRoute {
|
|
95
|
+
methods: Array<string>;
|
|
96
|
+
path: string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* A single product within a superrepo.
|
|
100
|
+
*/
|
|
101
|
+
export interface ProductConfig {
|
|
102
|
+
apiNamespace: string;
|
|
103
|
+
bundle?: BundleConfig | null | undefined;
|
|
104
|
+
components: Array<Component>;
|
|
105
|
+
contentSecurityPolicyAdditions?: Record<string, Array<string>> | null | undefined;
|
|
106
|
+
imports?: Array<ImportConfig> | null | undefined;
|
|
107
|
+
includeInBundle?: boolean | null | undefined;
|
|
108
|
+
osdkOutput: string;
|
|
109
|
+
}
|
|
110
|
+
export interface PythonArtifactsChannel {
|
|
111
|
+
channel: string;
|
|
112
|
+
name: string;
|
|
113
|
+
}
|
|
114
|
+
export interface PythonDependencyChannels {
|
|
115
|
+
conda: Array<PythonArtifactsChannel>;
|
|
116
|
+
pip: Array<PythonArtifactsChannel>;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* A single link instance between two seeded objects.
|
|
120
|
+
*/
|
|
121
|
+
export interface SeedLinkEntry {
|
|
122
|
+
linkType: string;
|
|
123
|
+
name: string;
|
|
124
|
+
sourceKey: string;
|
|
125
|
+
sourceObjectType: string;
|
|
126
|
+
targetKey: string;
|
|
127
|
+
targetObjectType: string;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* A single property value within a seed object. Opaque JSON whose
|
|
131
|
+
* concrete shape depends on the object type's property definitions.
|
|
132
|
+
*/
|
|
133
|
+
export type SeedPropertyValue = any;
|
|
134
|
+
export interface SerializableFoundryCliError_foundryBackendError {
|
|
135
|
+
type: "foundryBackendError";
|
|
136
|
+
foundryBackendError: FoundryBackendError;
|
|
137
|
+
}
|
|
138
|
+
export interface SerializableFoundryCliError_genericFoundryCliError {
|
|
139
|
+
type: "genericFoundryCliError";
|
|
140
|
+
genericFoundryCliError: GenericFoundryCliError;
|
|
141
|
+
}
|
|
142
|
+
export interface SerializableFoundryCliError_unsupportedFeaturesError {
|
|
143
|
+
type: "unsupportedFeaturesError";
|
|
144
|
+
unsupportedFeaturesError: UnsupportedFeaturesError;
|
|
145
|
+
}
|
|
146
|
+
export interface SerializableFoundryCliError_unsupportedTemplateTypeError {
|
|
147
|
+
type: "unsupportedTemplateTypeError";
|
|
148
|
+
unsupportedTemplateTypeError: UnsupportedTemplateTypeError;
|
|
149
|
+
}
|
|
150
|
+
export type SerializableFoundryCliError = SerializableFoundryCliError_foundryBackendError | SerializableFoundryCliError_genericFoundryCliError | SerializableFoundryCliError_unsupportedFeaturesError | SerializableFoundryCliError_unsupportedTemplateTypeError;
|
|
151
|
+
/**
|
|
152
|
+
* Unified lifecycle stages shared by all services. Each service uses
|
|
153
|
+
* the stages that apply to it.
|
|
154
|
+
*/
|
|
155
|
+
export type ServiceLifecycle = "PREPARING" | "READY" | "FAILED" | "STARTING" | "STOPPED";
|
|
156
|
+
/**
|
|
157
|
+
* The kinds of services managed by Foundry. ONTOLOGY,
|
|
158
|
+
* TYPESCRIPT_FUNCTIONS, PYTHON_FUNCTIONS, and APP are user-owned
|
|
159
|
+
* component types declared in `foundry.yml`. STATUS_SERVER and
|
|
160
|
+
* PLATFORM_API_PROXY are internal Foundry-managed services started
|
|
161
|
+
* implicitly by the CLI and must not be declared in `foundry.yml`.
|
|
162
|
+
*/
|
|
163
|
+
export type ServiceName = "ONTOLOGY" | "TYPESCRIPT_FUNCTIONS" | "PYTHON_FUNCTIONS" | "APP" | "STATUS_SERVER" | "PLATFORM_API_PROXY";
|
|
164
|
+
/**
|
|
165
|
+
* The status of a service. Published by services on lifecycle
|
|
166
|
+
* transitions (POST /status), and returned by the server as the
|
|
167
|
+
* current snapshot (GET /status).
|
|
168
|
+
*/
|
|
169
|
+
export interface ServiceStatus {
|
|
170
|
+
level: StatusLevel;
|
|
171
|
+
message?: string | null | undefined;
|
|
172
|
+
service: ServiceName;
|
|
173
|
+
status: ServiceLifecycle;
|
|
174
|
+
timestamp: string;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Result of a successful `setSeed` call.
|
|
178
|
+
*/
|
|
179
|
+
export interface SetSeedResponse {}
|
|
180
|
+
/**
|
|
181
|
+
* Severity of a status.
|
|
182
|
+
*/
|
|
183
|
+
export type StatusLevel = "INFO" | "WARN" | "ERROR";
|
|
184
|
+
export interface UnsupportedFeaturesError {
|
|
185
|
+
messages: Array<string>;
|
|
186
|
+
}
|
|
187
|
+
export interface UnsupportedTemplateTypeError {
|
|
188
|
+
message: string;
|
|
189
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;AAqBA,iBAAiB,aAAa;CAC5B;CACA;CACA,aAAa;CACb;CACA;CACA;AACD;;;;AAID,iBAAiB,UAAU;CACzB;CACA,MAAM;AACP;;;;;;;;;AASD,iBAAiB,mBAAmB;CAClC;CACA;CACA;CACA;AACD;AACD,iBAAiB,oBAAoB;CACnC;CACA;CACA;CACA;AACD;;;;;;;AAOD,iBAAiB,cAAc;CAC7B;CACA;CACA,mBAAmB;CACnB,UAAU,MAAM;AACjB;AACD,iBAAiB,uBAAuB;CACtC;CACA;AACD;;;;;;AAMD,iBAAiB,aAAa;CAC5B;AACD;;;;AAID,YAAY,cAAc,eAAe,cAAc;;;;;;AAOvD,YAAY,aAAa,eAAe;;;;;;;AAQxC,iBAAiB,aAAa;CAC5B,OAAO,MAAM;CACb,SAAS,eAAe,MAAM;AAC/B;;;;;AAKD,iBAAiB,uBAAuB;CACtC,yBAAyB,MAAM;CAC/B,aAAa,MAAM;AACpB;;;;AAID,iBAAiB,sBAAsB;CACrC,SAAS;CACT;AACD;;;;AAID,iBAAiB,cAAc;CAC7B;CACA,SAAS;CACT,YAAY,MAAM;CAClB,iCACI,eAAe;CAGnB,UAAU,MAAM;CAChB;CACA;AACD;AACD,iBAAiB,uBAAuB;CACtC;CACA;AACD;AACD,iBAAiB,yBAAyB;CACxC,OAAO,MAAM;CACb,KAAK,MAAM;AACZ;;;;AAID,iBAAiB,cAAc;CAC7B;CACA;CACA;CACA;CACA;CACA;AACD;;;;;AAKD,YAAY;AACZ,iBAAiB,gDAAgD;CAC/D,MAAM;CACN,qBAAqB;AACtB;AAED,iBAAiB,mDAAmD;CAClE,MAAM;CACN,wBAAwB;AACzB;AAED,iBAAiB,qDAAqD;CACpE,MAAM;CACN,0BAA0B;AAC3B;AAED,iBAAiB,yDAAyD;CACxE,MAAM;CACN,8BAA8B;AAC/B;AACD,YAAY,8BACR,kDACA,qDACA,uDACA;;;;;AAMJ,YAAY,mBACR,cACA,UACA,WACA,aACA;;;;;;;;AASJ,YAAY,cACR,aACA,yBACA,qBACA,QACA,kBACA;;;;;;AAOJ,iBAAiB,cAAc;CAC7B,OAAO;CACP;CACA,SAAS;CACT,QAAQ;CACR;AACD;;;;AAID,iBAAiB,gBAAgB,CAAE;;;;AAInC,YAAY,cAAc,SAAS,SAAS;AAC5C,iBAAiB,yBAAyB;CACxC,UAAU;AACX;AACD,iBAAiB,6BAA6B;CAC5C;AACD","names":[],"sources":["../../../../src/generated/cli/__components.ts"],"version":3,"file":"__components.d.ts"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * as OntologySeedingService from "./OntologySeedingService.js";
|
|
2
|
+
export * as StatusService from "./StatusService.js";
|
|
3
|
+
export type { BundleConfig, Component, ComponentDiscovery, FoundryBackendError, FoundryConfig, GenericFoundryCliError, ImportConfig, InstallMode, ObjectSeed, OntologySeed, PlatformApiProxyConfig, PlatformApiProxyRoute, ProductConfig, PythonArtifactsChannel, PythonDependencyChannels, SeedLinkEntry, SeedPropertyValue, SerializableFoundryCliError, ServiceLifecycle, ServiceName, ServiceStatus, SetSeedResponse, StatusLevel, UnsupportedFeaturesError, UnsupportedTemplateTypeError } from "./__components.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAiBA,YAAY,4BAA4B;AACxC,YAAY,mBAAmB;AAE/B,cACE,cACA,WACA,oBACA,qBACA,eACA,wBACA,cACA,aACA,YACA,cACA,wBACA,uBACA,eACA,wBACA,0BACA,eACA,mBACA,6BACA,kBACA,aACA,eACA,iBACA,aACA,0BACA,oCACK","names":[],"sources":["../../../../src/generated/cli/index.ts"],"version":3,"file":"index.d.ts"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The published name of this package.
|
|
3
|
+
*
|
|
4
|
+
* Placeholder entry point for `@osdk/integration-testing`. Integration-testing
|
|
5
|
+
* helpers will be exported from here as they are implemented.
|
|
6
|
+
*/
|
|
7
|
+
export type { SeedClient, IntegrationClient, IntegrationClientConfig, IntegrationServer, IntegrationServerConfig } from "./types.js";
|
|
8
|
+
export { createIntegrationClient } from "./createIntegrationClient.js";
|
|
9
|
+
export { createIntegrationServer } from "./createIntegrationServer.js";
|
|
10
|
+
export { checkFoundryCliVersion } from "./utils/foundry-cli.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;AAuBA,cACE,YACA,mBACA,yBACA,mBACA,+BACK;AAEP,SAAS,+BAA+B;AACxC,SAAS,+BAA+B;AAExC,SAAS,8BAA8B","names":[],"sources":["../../src/index.ts"],"version":3,"file":"index.d.ts"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ResolveBearerTokenOptions } from "./foundry-token.js";
|
|
2
|
+
/**
|
|
3
|
+
* Installs the Foundry CLI by running the installer the stack serves, with the
|
|
4
|
+
* resolved stack url and token injected as `FOUNDRY_URL` and `TOKEN`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const installFoundryCli: (options?: ResolveBearerTokenOptions) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAyBA,cAEO,iCACA,oBAAqB;;;;;AA4E5B,OAAO,cAAM,oBACXA,UAAS,8BACR","names":["options: ResolveBearerTokenOptions"],"sources":["../../../src/scripts/download.ts"],"version":3,"file":"download.d.ts"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ResolveBearerTokenOptions } from "./foundry-token.js";
|
|
2
|
+
export type ArtifactPlatform = "linux-amd64" | "linux-arm64" | "macos-amd64" | "macos-arm64" | "windows-amd64";
|
|
3
|
+
export interface FoundryCliInstallPathsOptions {
|
|
4
|
+
env?: NodeJS.ProcessEnv;
|
|
5
|
+
platform?: NodeJS.Platform;
|
|
6
|
+
}
|
|
7
|
+
export declare const resolveFoundryHost: (options?: ResolveBearerTokenOptions) => Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAkBA,cAAc,iCAAiC,oBAAqB;AAGpE,YAAY,mBACR,gBACA,gBACA,gBACA,gBACA;AAEJ,iBAAiB,8BAA8B;CAC7C,MAAM,OAAO;CACb,WAAW,OAAO;AACnB;AA+BD,OAAO,cAAM,qBACXA,UAAS,8BACR","names":["options: ResolveBearerTokenOptions"],"sources":["../../../src/scripts/foundry-host.ts"],"version":3,"file":"foundry-host.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAsBA,iBAAiB,0BAA0B;CACzC,MAAM,OAAO;CACb;AACD;AAoCD,OAAO,cAAM,kBACXA,UAAS,8BACR","names":["options: ResolveBearerTokenOptions"],"sources":["../../../src/scripts/foundry-token.ts"],"version":3,"file":"foundry-token.d.ts"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface GitRemoteOptions {
|
|
2
|
+
env?: NodeJS.ProcessEnv;
|
|
3
|
+
cwd?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Reads `remote.origin.url` from the git config of `cwd`, returning `undefined`
|
|
7
|
+
* when git fails or no remote is configured.
|
|
8
|
+
*/
|
|
9
|
+
export declare const readGitRemoteUrl: (options?: GitRemoteOptions) => Promise<string | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAqBA,iBAAiB,iBAAiB;CAChC,MAAM,OAAO;CACb;AACD;;;;;AAMD,OAAO,cAAM,mBACXA,UAAS,qBACR","names":["options: GitRemoteOptions"],"sources":["../../../src/scripts/gitRemote.ts"],"version":3,"file":"gitRemote.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const postinstall: () => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAyBA,OAAO,cAAM,mBAAwB","names":[],"sources":["../../../src/scripts/postinstall.ts"],"version":3,"file":"postinstall.d.ts"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { StatusServer } from "../cli-service/StatusServer.js";
|
|
2
|
+
/**
|
|
3
|
+
* A {@link StatusServer} that never spawns the Foundry CLI, for tests that put
|
|
4
|
+
* a stub server behind it: health and status reads still go over HTTP to
|
|
5
|
+
* whatever the discoverer found, but starting is a no-op rather than a spawn —
|
|
6
|
+
* or, since a discoverable stub is already answering, a refusal to start.
|
|
7
|
+
*/
|
|
8
|
+
export declare class NoSpawnStatusServer extends StatusServer {
|
|
9
|
+
start(): Promise<void>;
|
|
10
|
+
stop(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,SAAS,oBAAoB,gCAAiC;;;;;;;AAQ9D,OAAO,cAAM,4BAA4B,aAAa;CACpD,AAAS,SAAS;CAIlB,AAAS,QAAQ;AAGlB","names":[],"sources":["../../../src/test/NoSpawnStatusServer.ts"],"version":3,"file":"NoSpawnStatusServer.d.ts"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FoundryCliService, type FoundryServiceConfig, type ServiceHealth, type ServiceState } from "../cli-service/FoundryCliService.js";
|
|
2
|
+
import type { ServiceName } from "../generated/cli/index.js";
|
|
3
|
+
export interface StubServiceConfig extends FoundryServiceConfig {
|
|
4
|
+
/** Recorded in order as services start, for asserting dependency order. */
|
|
5
|
+
startLog?: ServiceName[];
|
|
6
|
+
/** State reported once started. Defaults to `READY`. */
|
|
7
|
+
stateWhenStarted?: ServiceState;
|
|
8
|
+
/** Explanation reported alongside the state, as a real service publishes. */
|
|
9
|
+
message?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A {@link FoundryCliService} that reports its own health and never spawns
|
|
13
|
+
* anything, so orchestration can be tested without the Foundry CLI.
|
|
14
|
+
*/
|
|
15
|
+
export declare class StubService extends FoundryCliService {
|
|
16
|
+
#private;
|
|
17
|
+
constructor(name: ServiceName, config: StubServiceConfig);
|
|
18
|
+
protected getArgs(): readonly string[];
|
|
19
|
+
isStarted(): boolean;
|
|
20
|
+
start(): Promise<void>;
|
|
21
|
+
checkHealth(): Promise<ServiceHealth>;
|
|
22
|
+
stop(): Promise<void>;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,SACE,wBACK,2BACA,oBACA,oBACA,qCAAsC;AAC7C,cAAc,mBAAmB,2BAA4B;AAE7D,iBAAiB,0BAA0B,qBAAqB;;CAE9D,WAAW;;CAEX,mBAAmB;;CAEnB;AACD;;;;;AAMD,OAAO,cAAM,oBAAoB,kBAAkB;;CAMjD,YAAYA,MAAM,aAAaC,QAAQ;CAOvC,UAAmB;CAInB;CAIA,AAAS,SAAS;CAMlB,AAAS,eAAe,QAAQ;CAahC,AAAS,QAAQ;AAIlB","names":["name: ServiceName","config: StubServiceConfig"],"sources":["../../../src/test/StubService.ts"],"version":3,"file":"StubService.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cAAc,4BAA4B,0BAA2B;;AAGrE,OAAO,cAAMA,yBAAyB","names":["EMPTY_ONTOLOGY_METADATA: OntologyFullMetadata"],"sources":["../../../src/test/emptyOntologyMetadata.ts"],"version":3,"file":"emptyOntologyMetadata.d.ts"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ServiceStatus } from "../generated/cli/index.js";
|
|
2
|
+
export interface StubStatusServer {
|
|
3
|
+
url: string;
|
|
4
|
+
/** Toggle what `/api/health` answers. */
|
|
5
|
+
setHealthy: (healthy: boolean) => void;
|
|
6
|
+
close: () => Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Stand-in for the real status server, mirroring the two behaviors the client
|
|
10
|
+
* code has to get right: `/api/health` is what reports the server's own health
|
|
11
|
+
* (it publishes no lifecycle for itself), and `GET /status` answers `204` — not
|
|
12
|
+
* an empty array — when nothing has reported yet.
|
|
13
|
+
*/
|
|
14
|
+
export declare const startStubStatusServer: (initialStatuses?: ServiceStatus[]) => Promise<StubStatusServer>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAmBA,cAA2B,qBAAqB,2BAA4B;AAE5E,iBAAiB,iBAAiB;CAChC;;CAEA,aAAaA;CACb,aAAa;AACd;;;;;;;AAQD,OAAO,cAAM,wBACXC,kBAAiB,oBAChB,QAAQ","names":["healthy: boolean","initialStatuses: ServiceStatus[]"],"sources":["../../../src/test/stubStatusServer.ts"],"version":3,"file":"stubStatusServer.d.ts"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentDiscovery, ServiceName } from "../generated/cli/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Write a discovery file the way a running service would.
|
|
4
|
+
*
|
|
5
|
+
* Defaults `pid` to this process so the record reads as live; pass a dead pid
|
|
6
|
+
* to exercise staleness.
|
|
7
|
+
*/
|
|
8
|
+
export declare const writeDiscoveryFile: (projectDir: string, name: ServiceName, discovery: Partial<ComponentDiscovery> & Pick<ComponentDiscovery, "url">) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAmBA,cACE,oBACA,mBACK,2BAA4B;;;;;;;AASnC,OAAO,cAAM,qBACXA,oBACAC,MAAM,aACNC,WAAW,QAAQ,sBAAsB,KAAK,oBAAoB,WACjE","names":["projectDir: string","name: ServiceName","discovery: Partial<ComponentDiscovery> & Pick<ComponentDiscovery, \"url\">"],"sources":["../../../src/test/writeDiscoveryFile.ts"],"version":3,"file":"writeDiscoveryFile.d.ts"}
|