playit-reversed 0.1.0-beta.2
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/README.md +15 -0
- package/dist/cli.d.ts +8 -0
- package/dist/cli.js +14570 -0
- package/dist/client.d.ts +25 -0
- package/dist/codegen.d.ts +9 -0
- package/dist/guard.d.ts +15 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +14724 -0
- package/dist/parsers/agents.d.ts +5 -0
- package/dist/parsers/index.d.ts +1 -0
- package/dist/schemas.d.ts +29 -0
- package/dist/types.d.ts +18 -0
- package/package.json +55 -0
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Agent, PlayItOptions } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* PlayIt.gg API client
|
|
4
|
+
*
|
|
5
|
+
* This is an internal client used by the CLI for fetching data.
|
|
6
|
+
* Users should use the generated `playit` object instead.
|
|
7
|
+
*/
|
|
8
|
+
export declare class PlayIt<TAgentId extends string = string, TAgentName extends string = string> {
|
|
9
|
+
private baseUrl;
|
|
10
|
+
private authorizationToken;
|
|
11
|
+
private $fetch;
|
|
12
|
+
private constructor();
|
|
13
|
+
/**
|
|
14
|
+
* Create a new PlayIt client instance
|
|
15
|
+
*
|
|
16
|
+
* @internal This is used by the CLI. Users should use the generated `playit` object.
|
|
17
|
+
*/
|
|
18
|
+
static create<TAgentId extends string = string, TAgentName extends string = string>(options?: PlayItOptions & {
|
|
19
|
+
_skipCodegenCheck?: boolean;
|
|
20
|
+
}): PlayIt<TAgentId, TAgentName>;
|
|
21
|
+
/**
|
|
22
|
+
* Fetch all agents from the API
|
|
23
|
+
*/
|
|
24
|
+
fetchAgents(): Promise<Agent[]>;
|
|
25
|
+
}
|
package/dist/guard.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class CodegenRequiredError extends Error {
|
|
2
|
+
constructor();
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Check if codegen has been run
|
|
6
|
+
*/
|
|
7
|
+
export declare function isCodegenComplete(): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Throw an error if codegen hasn't been run
|
|
10
|
+
*/
|
|
11
|
+
export declare function requireCodegen(): void;
|
|
12
|
+
/**
|
|
13
|
+
* Assert codegen is complete (call this at module load time)
|
|
14
|
+
*/
|
|
15
|
+
export declare function assertCodegen(): void;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import "dotenv/config";
|
|
2
|
+
export { PlayIt } from "./client";
|
|
3
|
+
export { PlayIt as default } from "./client";
|
|
4
|
+
export type { Agent, Tunnel, PlayItOptions } from "./types";
|
|
5
|
+
export { parseAgentsHtml } from "./parsers";
|
|
6
|
+
export { requireCodegen, isCodegenComplete, CodegenRequiredError } from "./guard";
|