@vention/vention-cli 0.13.4 → 0.13.5
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/cli.esm.js +9919 -759
- package/package.json +1 -1
- package/src/cli-helpers.d.ts +0 -18
- package/src/cli.d.ts +0 -3
- package/src/cli.test.d.ts +0 -1
- package/src/config.d.ts +0 -14
- package/src/config.test.d.ts +0 -1
- package/src/digital-twin-client.d.ts +0 -14
- package/src/digital-twin-client.test.d.ts +0 -1
- package/src/error-handler.d.ts +0 -9
- package/src/error-handler.test.d.ts +0 -1
- package/src/fetch-helper.d.ts +0 -8
- package/src/fetch-helper.test.d.ts +0 -1
- package/src/file-system.d.ts +0 -11
- package/src/file-system.test.d.ts +0 -1
- package/src/machine-code-app-directory-info.d.ts +0 -14
- package/src/machine-code-app-directory-info.test.d.ts +0 -1
- package/src/rails-client.d.ts +0 -20
- package/src/rails-client.test.d.ts +0 -1
- package/src/sso-auth.d.ts +0 -30
- package/src/sso-constants.d.ts +0 -7
- package/src/verbose-logger.d.ts +0 -3
- package/src/verbose-logger.test.d.ts +0 -1
package/package.json
CHANGED
package/src/cli-helpers.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { SessionData } from "./config";
|
|
2
|
-
import { Application } from "./digital-twin-client";
|
|
3
|
-
import { MachineCodeAppDirectoryInfo } from "./machine-code-app-directory-info";
|
|
4
|
-
import { AllocationResponse } from "./rails-client";
|
|
5
|
-
export declare const checkIfDesignHasLiveAllocation: (session: SessionData, designId: number) => Promise<AllocationResponse | undefined>;
|
|
6
|
-
export declare const getAppFromDigitalTwin: (environment: SessionData["environment"], machineCodeAppDirectoryInfo: MachineCodeAppDirectoryInfo, sessionId: string) => Promise<Application>;
|
|
7
|
-
export declare const getAvailableAppsFromDigitalTwin: (environment: SessionData["environment"], designId: number, sessionId: string) => Promise<Application[]>;
|
|
8
|
-
export declare const createNewAppDirectory: (session: SessionData, currentDir: string) => Promise<void>;
|
|
9
|
-
export declare const updateExistingAppDirectory: (session: SessionData, machineCodeAppDirectoryInfo: MachineCodeAppDirectoryInfo, currentDir: string) => Promise<void>;
|
|
10
|
-
export interface DesignAndAppSelection {
|
|
11
|
-
selectedDesign: {
|
|
12
|
-
id: number;
|
|
13
|
-
name: string;
|
|
14
|
-
sessionId: string;
|
|
15
|
-
};
|
|
16
|
-
selectedApp: Application;
|
|
17
|
-
}
|
|
18
|
-
export declare const selectDesignAndApp: (session: SessionData) => Promise<DesignAndAppSelection>;
|
package/src/cli.d.ts
DELETED
package/src/cli.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/config.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface SessionData {
|
|
2
|
-
environment: "local" | "demo" | "prod";
|
|
3
|
-
ventionSession?: string;
|
|
4
|
-
stytchSessionJwt?: string;
|
|
5
|
-
ventionIdpSession?: string;
|
|
6
|
-
oauth?: {
|
|
7
|
-
accessToken: string;
|
|
8
|
-
refreshToken?: string;
|
|
9
|
-
expiresAt?: number;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export declare const getConfigPath: () => string;
|
|
13
|
-
export declare const saveSession: (data: SessionData) => Promise<void>;
|
|
14
|
-
export declare const loadSession: () => Promise<SessionData | null>;
|
package/src/config.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SessionData } from "./config";
|
|
2
|
-
export interface FileSystemNode {
|
|
3
|
-
[entryName: string]: FileSystemNode | string;
|
|
4
|
-
}
|
|
5
|
-
export interface Application {
|
|
6
|
-
name: string;
|
|
7
|
-
id: string;
|
|
8
|
-
uuid?: string;
|
|
9
|
-
type: string;
|
|
10
|
-
sourceCode: FileSystemNode;
|
|
11
|
-
}
|
|
12
|
-
export declare const getDigitalTwinUrl: (environment: SessionData["environment"], sessionId: string) => string;
|
|
13
|
-
export declare const getAllApplicationsWithSourceCode: (environment: SessionData["environment"], designId: number, sessionId: string) => Promise<Application[]>;
|
|
14
|
-
export declare const pushApplicationToDigitalTwin: <T = unknown>(environment: SessionData["environment"], designId: number, sessionId: string, application: Application) => Promise<T>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/error-handler.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare class ApiError extends Error {
|
|
2
|
-
readonly status: number;
|
|
3
|
-
readonly statusText: string;
|
|
4
|
-
readonly responseBody: unknown;
|
|
5
|
-
readonly url: string;
|
|
6
|
-
constructor(message: string, status: number, statusText: string, responseBody: unknown, url: string);
|
|
7
|
-
}
|
|
8
|
-
export declare function assertApiResponseOk(res: Response, url: string): Promise<void>;
|
|
9
|
-
export declare const handleCommandError: (error: unknown, context: string) => never;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/fetch-helper.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
2
|
-
interface FetchOptions {
|
|
3
|
-
method?: HttpMethod;
|
|
4
|
-
headers?: Record<string, string>;
|
|
5
|
-
body?: unknown;
|
|
6
|
-
}
|
|
7
|
-
export declare const fetchJson: <T>(url: string, options?: FetchOptions) => Promise<T>;
|
|
8
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/file-system.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface FileSystemNode {
|
|
2
|
-
[entryName: string]: FileSystemNode | string;
|
|
3
|
-
}
|
|
4
|
-
export declare const getDefaultIgnorePatterns: () => Set<string | RegExp>;
|
|
5
|
-
export declare const shouldIgnoreFileSystemNode: (nodeName: string, ignoredNodes: Set<string | RegExp>) => boolean;
|
|
6
|
-
export declare const getSafeAppName: (appName: string) => string;
|
|
7
|
-
export declare const serializeFileSystem: (sourceDirectory: string, ignoredFileSystemNodes: Set<string | RegExp>, shouldBase64Encoded: boolean) => FileSystemNode;
|
|
8
|
-
export declare const createFileSystemFromJson: (fileSystemNode: FileSystemNode, targetDirectory: string) => Promise<void>;
|
|
9
|
-
export declare const checkIfDirectoryExists: (directory: string) => Promise<boolean>;
|
|
10
|
-
export declare const checkIfAppDirectoryExists: (appName: string, targetDirectory: string) => Promise<boolean>;
|
|
11
|
-
export declare const writeApplicationToDisk: (appName: string, sourceCode: FileSystemNode, targetDirectory: string, overwriteExisting?: boolean) => Promise<string>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface MachineCodeAppDirectoryInfo {
|
|
2
|
-
appName: string;
|
|
3
|
-
designId: number;
|
|
4
|
-
applicationId: string;
|
|
5
|
-
uuid?: string;
|
|
6
|
-
lastPulledAt: string;
|
|
7
|
-
lastPushedAt?: string;
|
|
8
|
-
environment: "local" | "demo" | "prod";
|
|
9
|
-
}
|
|
10
|
-
export declare const writeMachineCodeAppDirectoryInfo: (projectPath: string, state: MachineCodeAppDirectoryInfo) => Promise<void>;
|
|
11
|
-
export declare const readMachineCodeAppDirectoryInfo: (projectPath: string) => Promise<MachineCodeAppDirectoryInfo | null>;
|
|
12
|
-
export declare const updateLastPulledAt: (projectPath: string) => Promise<void>;
|
|
13
|
-
export declare const updateLastPushedAt: (projectPath: string) => Promise<void>;
|
|
14
|
-
export declare const isMachineCodeAppDirectory: (projectPath: string) => Promise<boolean>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/rails-client.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { SessionData } from "./config";
|
|
2
|
-
export interface AllocationResponse {
|
|
3
|
-
cookie: {
|
|
4
|
-
originalMaxAge: number;
|
|
5
|
-
expires: string;
|
|
6
|
-
httpOnly: boolean;
|
|
7
|
-
path: string;
|
|
8
|
-
};
|
|
9
|
-
sessionId: string;
|
|
10
|
-
tabId: string;
|
|
11
|
-
userId: string;
|
|
12
|
-
allocatedResourceId: string;
|
|
13
|
-
allocationCreationTime: number;
|
|
14
|
-
allocatedResourceLastAccessTime: number;
|
|
15
|
-
allocationType: "regular" | "custom";
|
|
16
|
-
designName: string;
|
|
17
|
-
designId: number;
|
|
18
|
-
}
|
|
19
|
-
export declare const getBaseRailsUrl: (environment: SessionData["environment"]) => "http://localhost:3000" | "https://vention.foo" | "https://vention.io";
|
|
20
|
-
export declare const getUserAllocations: (session: SessionData) => Promise<AllocationResponse[]>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/sso-auth.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { SessionData } from "./config";
|
|
2
|
-
export interface OAuthTokens {
|
|
3
|
-
accessToken: string;
|
|
4
|
-
refreshToken?: string;
|
|
5
|
-
expiresInSeconds?: number;
|
|
6
|
-
}
|
|
7
|
-
interface SsoConfig {
|
|
8
|
-
clientId: string;
|
|
9
|
-
authorizeUrl: string;
|
|
10
|
-
tokenUrl: string;
|
|
11
|
-
revokeUrl?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare const exchangeAuthorizationCodeForTokens: (config: SsoConfig, code: string, codeVerifier: string, redirectUri: string) => Promise<{
|
|
14
|
-
accessToken: string;
|
|
15
|
-
refreshToken: string | undefined;
|
|
16
|
-
expiresInSeconds: number | undefined;
|
|
17
|
-
}>;
|
|
18
|
-
export declare const refreshAccessToken: (config: SsoConfig, refreshToken: string) => Promise<{
|
|
19
|
-
accessToken: string;
|
|
20
|
-
refreshToken: string;
|
|
21
|
-
expiresInSeconds: number | undefined;
|
|
22
|
-
}>;
|
|
23
|
-
export declare const revokeToken: (config: SsoConfig, token: string, tokenType?: "access_token" | "refresh_token") => Promise<void>;
|
|
24
|
-
export declare const loginWithSso: (environment: SessionData["environment"]) => Promise<{
|
|
25
|
-
accessToken: string;
|
|
26
|
-
refreshToken: string | undefined;
|
|
27
|
-
expiresInSeconds: number | undefined;
|
|
28
|
-
}>;
|
|
29
|
-
export declare const getSsoEnvironmentConfig: (environment: SessionData["environment"]) => SsoConfig;
|
|
30
|
-
export {};
|
package/src/sso-constants.d.ts
DELETED
package/src/verbose-logger.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|