attio 0.0.1-experimental.20240724.2 → 0.0.1-experimental.20240809
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/lib/api/add-connection-definition.d.ts +21 -0
- package/lib/api/add-connection-definition.d.ts.map +1 -0
- package/lib/api/add-connection-definition.js +24 -0
- package/lib/api/add-connection-definition.js.map +1 -0
- package/lib/api/create-dev-version.d.ts +3 -3
- package/lib/api/create-dev-version.d.ts.map +1 -1
- package/lib/api/create-dev-version.js +2 -2
- package/lib/api/create-dev-version.js.map +1 -1
- package/lib/api/remove-connection-definition.d.ts +16 -0
- package/lib/api/remove-connection-definition.d.ts.map +1 -0
- package/lib/api/remove-connection-definition.js +8 -0
- package/lib/api/remove-connection-definition.js.map +1 -0
- package/lib/attio.d.ts +1 -1
- package/lib/attio.js +1 -1
- package/lib/commands/build.js +5 -5
- package/lib/commands/build.js.map +1 -1
- package/lib/commands/connection/add.d.ts +22 -0
- package/lib/commands/connection/add.d.ts.map +1 -0
- package/lib/commands/connection/add.js +66 -0
- package/lib/commands/connection/add.js.map +1 -0
- package/lib/commands/connection/index.d.ts +2 -0
- package/lib/commands/connection/index.d.ts.map +1 -0
- package/lib/commands/connection/index.js +2 -0
- package/lib/commands/connection/index.js.map +1 -0
- package/lib/commands/connection/remove.d.ts +16 -0
- package/lib/commands/connection/remove.d.ts.map +1 -0
- package/lib/commands/connection/remove.js +42 -0
- package/lib/commands/connection/remove.js.map +1 -0
- package/lib/commands/dev.d.ts.map +1 -1
- package/lib/commands/dev.js +65 -76
- package/lib/commands/dev.js.map +1 -1
- package/lib/components/BuildError.d.ts +1 -9
- package/lib/components/BuildError.d.ts.map +1 -1
- package/lib/components/BuildError.js +35 -50
- package/lib/components/BuildError.js.map +1 -1
- package/lib/components/ScrollBox.d.ts +4 -0
- package/lib/components/ScrollBox.d.ts.map +1 -0
- package/lib/components/ScrollBox.js +88 -0
- package/lib/components/ScrollBox.js.map +1 -0
- package/lib/components/ScrollBox.store.d.ts +15 -0
- package/lib/components/ScrollBox.store.d.ts.map +1 -0
- package/lib/components/ScrollBox.store.js +37 -0
- package/lib/components/ScrollBox.store.js.map +1 -0
- package/lib/components/ScrollBox.util.d.ts +4 -0
- package/lib/components/ScrollBox.util.d.ts.map +1 -0
- package/lib/components/ScrollBox.util.js +28 -0
- package/lib/components/ScrollBox.util.js.map +1 -0
- package/lib/components/TypeScriptErrors.d.ts +1 -8
- package/lib/components/TypeScriptErrors.d.ts.map +1 -1
- package/lib/components/TypeScriptErrors.js +7 -15
- package/lib/components/TypeScriptErrors.js.map +1 -1
- package/lib/hooks/useFullScreen.d.ts.map +1 -1
- package/lib/hooks/useFullScreen.js +13 -7
- package/lib/hooks/useFullScreen.js.map +1 -1
- package/lib/hooks/useTerminalTitle.d.ts +2 -0
- package/lib/hooks/useTerminalTitle.d.ts.map +1 -0
- package/lib/hooks/useTerminalTitle.js +12 -0
- package/lib/hooks/useTerminalTitle.js.map +1 -0
- package/lib/machines/add-connection-machine.d.ts +159 -0
- package/lib/machines/add-connection-machine.d.ts.map +1 -0
- package/lib/machines/add-connection-machine.js +224 -0
- package/lib/machines/add-connection-machine.js.map +1 -0
- package/lib/machines/dev-machine.d.ts.map +1 -1
- package/lib/machines/dev-machine.js +3 -3
- package/lib/machines/dev-machine.js.map +1 -1
- package/lib/machines/remove-connection-machine.d.ts +106 -0
- package/lib/machines/remove-connection-machine.d.ts.map +1 -0
- package/lib/machines/remove-connection-machine.js +161 -0
- package/lib/machines/remove-connection-machine.js.map +1 -0
- package/lib/schema.d.ts +5 -5
- package/lib/schema.d.ts.map +1 -1
- package/lib/schema.js +10 -7
- package/lib/schema.js.map +1 -1
- package/lib/schema.json +32 -31
- package/lib/util/app-config.d.ts +11 -0
- package/lib/util/app-config.d.ts.map +1 -0
- package/lib/util/app-config.js +52 -0
- package/lib/util/app-config.js.map +1 -0
- package/package.json +3 -1
- package/lib/util/load-extension-config.d.ts +0 -3
- package/lib/util/load-extension-config.d.ts.map +0 -1
- package/lib/util/load-extension-config.js +0 -32
- package/lib/util/load-extension-config.js.map +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { Config } from "../schema.js";
|
|
3
|
+
declare const addConnectionSchema: z.ZodObject<{
|
|
4
|
+
app_id: z.ZodString;
|
|
5
|
+
connection_definition_id: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
app_id: string;
|
|
8
|
+
connection_definition_id: string;
|
|
9
|
+
}, {
|
|
10
|
+
app_id: string;
|
|
11
|
+
connection_definition_id: string;
|
|
12
|
+
}>;
|
|
13
|
+
export type Connection = z.infer<typeof addConnectionSchema>;
|
|
14
|
+
export declare function addConnectionDefinition({ token, devSlug, appId, connection, }: {
|
|
15
|
+
token: string;
|
|
16
|
+
devSlug: string;
|
|
17
|
+
appId: string;
|
|
18
|
+
connection: NonNullable<Config["connection"]>;
|
|
19
|
+
}): Promise<Connection>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=add-connection-definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-connection-definition.d.ts","sourceRoot":"","sources":["../../src/api/add-connection-definition.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAGrB,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAA;AAInC,QAAA,MAAM,mBAAmB;;;;;;;;;EAGvB,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE5D,wBAAsB,uBAAuB,CAAC,EAC1C,KAAK,EACL,OAAO,EACP,KAAK,EACL,UAAU,GACb,EAAE;IACC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAA;CAChD,GAAG,OAAO,CAAC,UAAU,CAAC,CAiBtB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { v4 as uuid } from "uuid";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { API } from "../env.js";
|
|
4
|
+
import { handleError } from "./handle-error.js";
|
|
5
|
+
import { makeHeaders } from "./make-headers.js";
|
|
6
|
+
const addConnectionSchema = z.object({
|
|
7
|
+
app_id: z.string(),
|
|
8
|
+
connection_definition_id: z.string(),
|
|
9
|
+
});
|
|
10
|
+
export async function addConnectionDefinition({ token, devSlug, appId, connection, }) {
|
|
11
|
+
const connectionDefinitionId = uuid();
|
|
12
|
+
const response = await fetch(`${API}/developer-portal/accounts/${devSlug}/apps/${appId}/connection-definitions/${connectionDefinitionId}`, {
|
|
13
|
+
method: "PUT",
|
|
14
|
+
headers: makeHeaders(token),
|
|
15
|
+
body: JSON.stringify({
|
|
16
|
+
connection_type: connection?.connection_type,
|
|
17
|
+
audience: connection?.audience,
|
|
18
|
+
major: 1,
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
await handleError(response);
|
|
22
|
+
return addConnectionSchema.parse(await response.json());
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=add-connection-definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-connection-definition.js","sourceRoot":"","sources":["../../src/api/add-connection-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,IAAI,IAAI,EAAC,MAAM,MAAM,CAAA;AAC/B,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAErB,OAAO,EAAC,GAAG,EAAC,MAAM,WAAW,CAAA;AAE7B,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAA;AAE7C,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,wBAAwB,EAAE,CAAC,CAAC,MAAM,EAAE;CACvC,CAAC,CAAA;AAIF,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,EAC1C,KAAK,EACL,OAAO,EACP,KAAK,EACL,UAAU,GAMb;IACG,MAAM,sBAAsB,GAAG,IAAI,EAAE,CAAA;IACrC,MAAM,QAAQ,GAAG,MAAM,KAAK,CACxB,GAAG,GAAG,8BAA8B,OAAO,SAAS,KAAK,2BAA2B,sBAAsB,EAAE,EAC5G;QACI,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC;QAC3B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;YACjB,eAAe,EAAE,UAAU,EAAE,eAAe;YAC5C,QAAQ,EAAE,UAAU,EAAE,QAAQ;YAC9B,KAAK,EAAE,CAAC;SACX,CAAC;KACL,CACJ,CAAA;IACD,MAAM,WAAW,CAAC,QAAQ,CAAC,CAAA;IAE3B,OAAO,mBAAmB,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;AAC3D,CAAC"}
|
|
@@ -10,16 +10,16 @@ declare const createDevVersionSchema: z.ZodObject<{
|
|
|
10
10
|
app_dev_version_id: string;
|
|
11
11
|
}>;
|
|
12
12
|
export type DevVersion = z.infer<typeof createDevVersionSchema>;
|
|
13
|
-
export declare function createDevVersion({ token, devSlug, appId, targetWorkspaceId,
|
|
13
|
+
export declare function createDevVersion({ token, devSlug, appId, targetWorkspaceId, connection, environmentVariables, }: {
|
|
14
14
|
token: string;
|
|
15
15
|
devSlug: string;
|
|
16
16
|
appId: string;
|
|
17
17
|
targetWorkspaceId: string;
|
|
18
18
|
environmentVariables: Record<string, string>;
|
|
19
|
-
|
|
19
|
+
connection: {
|
|
20
20
|
connection_type: "secret";
|
|
21
21
|
audience: "workspace" | "workspace-member";
|
|
22
|
-
}
|
|
22
|
+
} | null;
|
|
23
23
|
}): Promise<{
|
|
24
24
|
app_id: string;
|
|
25
25
|
app_dev_version_id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-dev-version.d.ts","sourceRoot":"","sources":["../../src/api/create-dev-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAMrB,QAAA,MAAM,sBAAsB;;;;;;;;;EAG1B,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE/D,wBAAsB,gBAAgB,CAAC,EACnC,KAAK,EACL,OAAO,EACP,KAAK,EACL,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"create-dev-version.d.ts","sourceRoot":"","sources":["../../src/api/create-dev-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAMrB,QAAA,MAAM,sBAAsB;;;;;;;;;EAG1B,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE/D,wBAAsB,gBAAgB,CAAC,EACnC,KAAK,EACL,OAAO,EACP,KAAK,EACL,iBAAiB,EACjB,UAAU,EACV,oBAAoB,GACvB,EAAE;IACC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5C,UAAU,EAAE;QACR,eAAe,EAAE,QAAQ,CAAA;QACzB,QAAQ,EAAE,WAAW,GAAG,kBAAkB,CAAA;KAC7C,GAAG,IAAI,CAAA;CACX;;;GAiBA"}
|
|
@@ -6,12 +6,12 @@ const createDevVersionSchema = z.object({
|
|
|
6
6
|
app_id: z.string(),
|
|
7
7
|
app_dev_version_id: z.string(),
|
|
8
8
|
});
|
|
9
|
-
export async function createDevVersion({ token, devSlug, appId, targetWorkspaceId,
|
|
9
|
+
export async function createDevVersion({ token, devSlug, appId, targetWorkspaceId, connection, environmentVariables, }) {
|
|
10
10
|
const response = await fetch(`${API}/developer-portal/accounts/${devSlug}/apps/${appId}/dev-versions`, {
|
|
11
11
|
method: "POST",
|
|
12
12
|
headers: makeHeaders(token),
|
|
13
13
|
body: JSON.stringify({
|
|
14
|
-
|
|
14
|
+
connection,
|
|
15
15
|
major: 1,
|
|
16
16
|
target_workspace_id: targetWorkspaceId,
|
|
17
17
|
environment_variables: environmentVariables,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-dev-version.js","sourceRoot":"","sources":["../../src/api/create-dev-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAErB,OAAO,EAAC,GAAG,EAAC,MAAM,WAAW,CAAA;AAC7B,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAA;AAE7C,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;CACjC,CAAC,CAAA;AAIF,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,EACnC,KAAK,EACL,OAAO,EACP,KAAK,EACL,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"create-dev-version.js","sourceRoot":"","sources":["../../src/api/create-dev-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAErB,OAAO,EAAC,GAAG,EAAC,MAAM,WAAW,CAAA;AAC7B,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAA;AAE7C,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;CACjC,CAAC,CAAA;AAIF,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,EACnC,KAAK,EACL,OAAO,EACP,KAAK,EACL,iBAAiB,EACjB,UAAU,EACV,oBAAoB,GAWvB;IACG,MAAM,QAAQ,GAAG,MAAM,KAAK,CACxB,GAAG,GAAG,8BAA8B,OAAO,SAAS,KAAK,eAAe,EACxE;QACI,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC;QAC3B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;YACjB,UAAU;YACV,KAAK,EAAE,CAAC;YACR,mBAAmB,EAAE,iBAAiB;YACtC,qBAAqB,EAAE,oBAAoB;SAC9C,CAAC;KACL,CACJ,CAAA;IACD,MAAM,WAAW,CAAC,QAAQ,CAAC,CAAA;IAE3B,OAAO,sBAAsB,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;AAC9D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const removeConnectionSchema: z.ZodObject<{
|
|
3
|
+
app_id: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
app_id: string;
|
|
6
|
+
}, {
|
|
7
|
+
app_id: string;
|
|
8
|
+
}>;
|
|
9
|
+
export type Connection = z.infer<typeof removeConnectionSchema>;
|
|
10
|
+
export declare function removeConnectionDefinition({ appId, }: {
|
|
11
|
+
token: string;
|
|
12
|
+
devSlug: string;
|
|
13
|
+
appId: string;
|
|
14
|
+
}): Promise<Connection>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=remove-connection-definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-connection-definition.d.ts","sourceRoot":"","sources":["../../src/api/remove-connection-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAMrB,QAAA,MAAM,sBAAsB;;;;;;EAE1B,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE/D,wBAAsB,0BAA0B,CAAC,EAG7C,KAAK,GACR,EAAE;IACC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CAChB,GAAG,OAAO,CAAC,UAAU,CAAC,CActB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const removeConnectionSchema = z.object({
|
|
3
|
+
app_id: z.string(),
|
|
4
|
+
});
|
|
5
|
+
export async function removeConnectionDefinition({ appId, }) {
|
|
6
|
+
return removeConnectionSchema.parse({ app_id: appId });
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=remove-connection-definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-connection-definition.js","sourceRoot":"","sources":["../../src/api/remove-connection-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAMrB,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAA;AAIF,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,EAG7C,KAAK,GAKR;IAaG,OAAO,sBAAsB,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,KAAK,EAAC,CAAC,CAAA;AACxD,CAAC"}
|
package/lib/attio.d.ts
CHANGED
package/lib/attio.js
CHANGED
package/lib/commands/build.js
CHANGED
|
@@ -2,9 +2,9 @@ import { useMachine } from "@xstate/react";
|
|
|
2
2
|
import { Box, Text, useStdin } from "ink";
|
|
3
3
|
import Spinner from "ink-spinner";
|
|
4
4
|
import React from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { renderBuildErrors } from "../components/BuildError.js";
|
|
6
6
|
import { Logo } from "../components/Logo.js";
|
|
7
|
-
import {
|
|
7
|
+
import { renderTypeScriptErrors } from "../components/TypeScriptErrors.js";
|
|
8
8
|
import { buildMachine } from "../machines/build-machine.js";
|
|
9
9
|
export const description = "Build your Attio extension locally";
|
|
10
10
|
export default function Build() {
|
|
@@ -29,9 +29,9 @@ export default function Build() {
|
|
|
29
29
|
snapshot.matches("Success") && (React.createElement(Box, { flexDirection: "column" },
|
|
30
30
|
React.createElement(Box, null,
|
|
31
31
|
React.createElement(Text, null, "\u2705 Built!")))),
|
|
32
|
-
snapshot.matches("Errored") && (React.createElement(Box,
|
|
33
|
-
jsError &&
|
|
34
|
-
tsErrors &&
|
|
32
|
+
snapshot.matches("Errored") && (React.createElement(Box, { flexDirection: "column", gap: 1 },
|
|
33
|
+
jsError && renderBuildErrors(jsError),
|
|
34
|
+
tsErrors && renderTypeScriptErrors(tsErrors),
|
|
35
35
|
!jsError && !tsErrors && (React.createElement(Box, null,
|
|
36
36
|
React.createElement(Text, null, "Unknown error")))))));
|
|
37
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AACxC,OAAO,EAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAC,MAAM,KAAK,CAAA;AACvC,OAAO,OAAO,MAAM,aAAa,CAAA;AACjC,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,M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AI;;oBACc,GAAG;oBAClB,oBAAC,IAAI,IAAC,KAAK,EAAC,OAAO;wBACf,oBAAC,OAAO,IAAC,IAAI,EAAC,MAAM,GAAG,CACpB,CACJ,CACL,CACJ,CACT;QACA,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAC5B,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ;YACvB,oBAAC,GAAG;gBACA,oBAAC,IAAI,wBAAgB,CACnB,CACJ,CACT;QACA,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAC5B,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,GAAG,EAAE,CAAC;YAC7B,OAAO,IAAI,iBAAiB,CAAC,OAAO,CAAC;YACrC,QAAQ,IAAI,sBAAsB,CAAC,QAAQ,CAAC;YAC5C,CAAC,OAAO,IAAI,CAAC,QAAQ,IAAI,CACtB,oBAAC,GAAG;gBACA,oBAAC,IAAI,wBAAqB,CACxB,CACT,CACC,CACT,CACC,CACT,CAAA;AACL,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export declare const description = "Create a new connection for your Attio app";
|
|
4
|
+
export declare const options: z.ZodObject<{
|
|
5
|
+
type: z.ZodOptional<z.ZodEnum<["secret"]>>;
|
|
6
|
+
audience: z.ZodOptional<z.ZodEnum<["workspace", "workspace-member"]>>;
|
|
7
|
+
dev: z.ZodDefault<z.ZodBoolean>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
dev: boolean;
|
|
10
|
+
type?: "secret" | undefined;
|
|
11
|
+
audience?: "workspace" | "workspace-member" | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
type?: "secret" | undefined;
|
|
14
|
+
audience?: "workspace" | "workspace-member" | undefined;
|
|
15
|
+
dev?: boolean | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
interface Props {
|
|
18
|
+
options: z.infer<typeof options>;
|
|
19
|
+
}
|
|
20
|
+
export default function AddConnection({ options: { type: connectionType, audience, dev } }: Props): React.JSX.Element;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=add.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/commands/connection/add.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAWrB,eAAO,MAAM,WAAW,+CAA+C,CAAA;AACvE,eAAO,MAAM,OAAO;;;;;;;;;;;;EAalB,CAAA;AAEF,UAAU,KAAK;IACX,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAA;CACnC;AAID,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAC,OAAO,EAAE,EAAC,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,EAAC,EAAC,EAAE,KAAK,qBA0F5F"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { useMachine } from "@xstate/react";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import Spinner from "ink-spinner";
|
|
4
|
+
import { option } from "pastel";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { InitialInstructions } from "../../components/InitialInstructions.js";
|
|
8
|
+
import { Logo } from "../../components/Logo.js";
|
|
9
|
+
import { Select } from "../../components/Select.js";
|
|
10
|
+
import { addConnectionMachine, audiences, connectionTypes, } from "../../machines/add-connection-machine.js";
|
|
11
|
+
export const description = "Create a new connection for your Attio app";
|
|
12
|
+
export const options = z.object({
|
|
13
|
+
type: z
|
|
14
|
+
.enum(["secret"])
|
|
15
|
+
.optional()
|
|
16
|
+
.describe(option({ description: "The type of connection to create" })),
|
|
17
|
+
audience: z
|
|
18
|
+
.enum(["workspace", "workspace-member"])
|
|
19
|
+
.optional()
|
|
20
|
+
.describe(option({ description: "The audience for the connection" })),
|
|
21
|
+
dev: z
|
|
22
|
+
.boolean()
|
|
23
|
+
.default(false)
|
|
24
|
+
.describe(option({ description: "Run in development mode (additional debugging info)" })),
|
|
25
|
+
});
|
|
26
|
+
export default function AddConnection({ options: { type: connectionType, audience, dev } }) {
|
|
27
|
+
const [snapshot, send] = useMachine(addConnectionMachine, {
|
|
28
|
+
input: {
|
|
29
|
+
connectionType,
|
|
30
|
+
audience,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
return (React.createElement(Box, { flexDirection: "column" },
|
|
34
|
+
dev && (React.createElement(Box, null,
|
|
35
|
+
React.createElement(Text, null, JSON.stringify(snapshot.value, null, 2)))),
|
|
36
|
+
React.createElement(Logo, null),
|
|
37
|
+
snapshot.matches("Show config instructions") && (React.createElement(InitialInstructions, { reason: snapshot.context.configError })),
|
|
38
|
+
snapshot.matches("Already have a connection") && (React.createElement(Box, { flexDirection: "column" },
|
|
39
|
+
React.createElement(Box, null,
|
|
40
|
+
React.createElement(Text, { color: "redBright" }, "This app already has a connection."),
|
|
41
|
+
React.createElement(Text, null, " To change it, you first must remove it with:")),
|
|
42
|
+
React.createElement(Box, { flexDirection: "column", borderStyle: "round", width: 27, paddingX: 1, marginBottom: 1 },
|
|
43
|
+
React.createElement(Text, null, "attio connection remove")))),
|
|
44
|
+
snapshot.matches("Ask for connection type") && (React.createElement(Box, { flexDirection: "column" },
|
|
45
|
+
React.createElement(Box, null,
|
|
46
|
+
React.createElement(Text, null, "What type of connection will this be?")),
|
|
47
|
+
React.createElement(Box, null,
|
|
48
|
+
React.createElement(Select, { items: connectionTypes, onSelect: (connectionType) => send({ type: "Choose Connection Type", connectionType }) })))),
|
|
49
|
+
snapshot.matches("Ask for audience") && (React.createElement(Box, { flexDirection: "column" },
|
|
50
|
+
React.createElement(Box, null,
|
|
51
|
+
React.createElement(Text, null, "What is the audience of this connection?")),
|
|
52
|
+
React.createElement(Box, null,
|
|
53
|
+
React.createElement(Select, { items: audiences, onSelect: (audience) => send({ type: "Choose Audience", audience }) })))),
|
|
54
|
+
snapshot.matches("Creating connection definition") && (React.createElement(Box, { flexDirection: "column" },
|
|
55
|
+
React.createElement(Box, null,
|
|
56
|
+
React.createElement(Text, null, "Creating connection definition..."),
|
|
57
|
+
React.createElement(Text, { color: "green" },
|
|
58
|
+
React.createElement(Spinner, { type: "dots" }))))),
|
|
59
|
+
snapshot.matches("Success") && (React.createElement(Box, { flexDirection: "column" },
|
|
60
|
+
React.createElement(Box, null,
|
|
61
|
+
React.createElement(Text, { color: "green" }, "SUCCESS!! \uD83C\uDF89 Your connection has been created.")))),
|
|
62
|
+
snapshot.matches("Error") && (React.createElement(Box, { flexDirection: "column" },
|
|
63
|
+
React.createElement(Box, null,
|
|
64
|
+
React.createElement(Text, { color: "red" }, snapshot.context.error))))));
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=add.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../src/commands/connection/add.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AACxC,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAA;AAC7B,OAAO,OAAO,MAAM,aAAa,CAAA;AACjC,OAAO,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAA;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAErB,OAAO,EAAC,mBAAmB,EAAC,MAAM,yCAAyC,CAAA;AAC3E,OAAO,EAAC,IAAI,EAAC,MAAM,0BAA0B,CAAA;AAC7C,OAAO,EAAC,MAAM,EAAC,MAAM,4BAA4B,CAAA;AACjD,OAAO,EACH,oBAAoB,EACpB,SAAS,EACT,eAAe,GAClB,MAAM,0CAA0C,CAAA;AAEjD,MAAM,CAAC,MAAM,WAAW,GAAG,4CA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ACf,oBAAC,OAAO,IAAC,IAAI,EAAC,MAAM,GAAG,CACpB,CACL,CACJ,CACT;QACA,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAC5B,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ;YACvB,oBAAC,GAAG;gBACA,oBAAC,IAAI,IAAC,KAAK,EAAC,OAAO,+DAAsD,CACvE,CACJ,CACT;QACA,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAC1B,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ;YACvB,oBAAC,GAAG;gBACA,oBAAC,IAAI,IAAC,KAAK,EAAC,KAAK,IAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAQ,CAC/C,CACJ,CACT,CACC,CACT,CAAA;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/connection/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,2BAA2B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/connection/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export declare const description = "Remove a connection from your Attio app";
|
|
4
|
+
export declare const options: z.ZodObject<{
|
|
5
|
+
dev: z.ZodDefault<z.ZodBoolean>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
dev: boolean;
|
|
8
|
+
}, {
|
|
9
|
+
dev?: boolean | undefined;
|
|
10
|
+
}>;
|
|
11
|
+
interface Props {
|
|
12
|
+
options: z.infer<typeof options>;
|
|
13
|
+
}
|
|
14
|
+
export default function RemoveConnection({ options: { dev } }: Props): React.JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=remove.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/commands/connection/remove.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAMrB,eAAO,MAAM,WAAW,4CAA4C,CAAA;AACpE,eAAO,MAAM,OAAO;;;;;;EAKlB,CAAA;AAEF,UAAU,KAAK;IACX,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAA;CACnC;AAID,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EAAC,OAAO,EAAE,EAAC,GAAG,EAAC,EAAC,EAAE,KAAK,qBAyD/D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { useMachine } from "@xstate/react";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import Spinner from "ink-spinner";
|
|
4
|
+
import { option } from "pastel";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { InitialInstructions } from "../../components/InitialInstructions.js";
|
|
8
|
+
import { Logo } from "../../components/Logo.js";
|
|
9
|
+
import { removeConnectionMachine } from "../../machines/remove-connection-machine.js";
|
|
10
|
+
export const description = "Remove a connection from your Attio app";
|
|
11
|
+
export const options = z.object({
|
|
12
|
+
dev: z
|
|
13
|
+
.boolean()
|
|
14
|
+
.default(false)
|
|
15
|
+
.describe(option({ description: "Run in development mode (additional debugging info)" })),
|
|
16
|
+
});
|
|
17
|
+
export default function RemoveConnection({ options: { dev } }) {
|
|
18
|
+
const [snapshot] = useMachine(removeConnectionMachine);
|
|
19
|
+
return (React.createElement(Box, { flexDirection: "column" },
|
|
20
|
+
dev && (React.createElement(Box, null,
|
|
21
|
+
React.createElement(Text, null, JSON.stringify(snapshot.value, null, 2)))),
|
|
22
|
+
React.createElement(Logo, null),
|
|
23
|
+
snapshot.matches("Show config instructions") && (React.createElement(InitialInstructions, { reason: snapshot.context.configError })),
|
|
24
|
+
snapshot.matches("No connection to remove") && (React.createElement(Box, { flexDirection: "column" },
|
|
25
|
+
React.createElement(Box, null,
|
|
26
|
+
React.createElement(Text, { color: "redBright" }, "This app has no connections to remove."),
|
|
27
|
+
React.createElement(Text, null, " To add one, use:")),
|
|
28
|
+
React.createElement(Box, { flexDirection: "column", borderStyle: "round", width: 27, paddingX: 1, marginBottom: 1 },
|
|
29
|
+
React.createElement(Text, null, "attio connection add")))),
|
|
30
|
+
snapshot.matches("Removing connection definition") && (React.createElement(Box, { flexDirection: "column" },
|
|
31
|
+
React.createElement(Box, null,
|
|
32
|
+
React.createElement(Text, null, "Removing connection definition..."),
|
|
33
|
+
React.createElement(Text, { color: "green" },
|
|
34
|
+
React.createElement(Spinner, { type: "dots" }))))),
|
|
35
|
+
snapshot.matches("Success") && (React.createElement(Box, { flexDirection: "column" },
|
|
36
|
+
React.createElement(Box, null,
|
|
37
|
+
React.createElement(Text, { color: "green" }, "SUCCESS!! \uD83C\uDF89 Your connection has been removed.")))),
|
|
38
|
+
snapshot.matches("Error") && (React.createElement(Box, { flexDirection: "column" },
|
|
39
|
+
React.createElement(Box, null,
|
|
40
|
+
React.createElement(Text, { color: "red" }, snapshot.context.error))))));
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=remove.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../src/commands/connection/remove.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AACxC,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAA;AAC7B,OAAO,OAAO,MAAM,aAAa,CAAA;AACjC,OAAO,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAA;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAC,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AAQ,EACtB,WAAW,EAAC,OAAO,EACnB,KAAK,EAAE,EAAE,EACT,QAAQ,EAAE,CAAC,EACX,YAAY,EAAE,CAAC;gBAEf,oBAAC,IAAI,+BAA4B,CAC/B,CACJ,CACT;QACA,QAAQ,CAAC,OAAO,CAAC,gCAAgC,CAAC,IAAI,CACnD,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ;YACvB,oBAAC,GAAG;gBACA,oBAAC,IAAI,4CAAyC;gBAC9C,oBAAC,IAAI,IAAC,KAAK,EAAC,OAAO;oBACf,oBAAC,OAAO,IAAC,IAAI,EAAC,MAAM,GAAG,CACpB,CACL,CACJ,CACT;QACA,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAC5B,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ;YACvB,oBAAC,GAAG;gBACA,oBAAC,IAAI,IAAC,KAAK,EAAC,OAAO,+DAAsD,CACvE,CACJ,CACT;QACA,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAC1B,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ;YACvB,oBAAC,GAAG;gBACA,oBAAC,IAAI,IAAC,KAAK,EAAC,KAAK,IAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAQ,CAC/C,CACJ,CACT,CACC,CACT,CAAA;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAUrB,eAAO,MAAM,WAAW,iCAAiC,CAAA;AAIzD,eAAO,MAAM,OAAO;;;;;;EAIlB,CAAA;AAEF,UAAU,KAAK;IACX,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAA;CACnC;AAID,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAAC,OAAO,EAAE,EAAC,KAAK,EAAC,EAAC,EAAE,KAAK,qBA6GpD"}
|
package/lib/commands/dev.js
CHANGED
|
@@ -1,24 +1,18 @@
|
|
|
1
1
|
import { useMachine } from "@xstate/react";
|
|
2
|
-
import {
|
|
3
|
-
import { Box, Text } from "ink";
|
|
4
|
-
import Spinner from "ink-spinner";
|
|
2
|
+
import { format } from "date-fns";
|
|
3
|
+
import { Box, Text, useApp, useInput } from "ink";
|
|
5
4
|
import { option } from "pastel";
|
|
6
5
|
import React from "react";
|
|
7
6
|
import { z } from "zod";
|
|
8
|
-
import {
|
|
7
|
+
import { renderBuildErrors } from "../components/BuildError.js";
|
|
9
8
|
import { InitialInstructions } from "../components/InitialInstructions.js";
|
|
10
|
-
import {
|
|
9
|
+
import { ScrollBox } from "../components/ScrollBox.js";
|
|
10
|
+
import { renderTypeScriptErrors } from "../components/TypeScriptErrors.js";
|
|
11
11
|
import { useFullScreen } from "../hooks/useFullScreen.js";
|
|
12
|
+
import { useTerminalTitle } from "../hooks/useTerminalTitle.js";
|
|
12
13
|
import { devMachine } from "../machines/dev-machine.js";
|
|
13
14
|
export const description = "Develop your Attio extension";
|
|
14
|
-
const
|
|
15
|
-
const [now, setNow] = React.useState(new Date());
|
|
16
|
-
React.useEffect(() => {
|
|
17
|
-
const interval = setInterval(() => setNow(new Date()), ms);
|
|
18
|
-
return () => clearInterval(interval);
|
|
19
|
-
}, [ms]);
|
|
20
|
-
return now;
|
|
21
|
-
};
|
|
15
|
+
const PrettyDate = ({ date }) => React.createElement(Text, null, format(date, "yyyy-MM-dd HH:mm:ss"));
|
|
22
16
|
export const options = z.object({
|
|
23
17
|
debug: z
|
|
24
18
|
.boolean()
|
|
@@ -26,83 +20,78 @@ export const options = z.object({
|
|
|
26
20
|
});
|
|
27
21
|
export default function Dev({ options: { debug } }) {
|
|
28
22
|
const [snapshot] = useMachine(devMachine);
|
|
29
|
-
const
|
|
23
|
+
const { exit } = useApp();
|
|
30
24
|
const fullScreen = useFullScreen();
|
|
25
|
+
const appId = snapshot.context.devVersion?.app_id;
|
|
26
|
+
useTerminalTitle(appId ? `attio dev – ${appId}` : `attio dev`);
|
|
31
27
|
const jsError = snapshot.children.javascript?.getSnapshot().context.error;
|
|
32
28
|
const jsTime = snapshot.children.javascript?.getSnapshot().context.time;
|
|
33
29
|
const tsErrors = snapshot.children.typescript?.getSnapshot().context.errors;
|
|
34
30
|
const tsTime = snapshot.children.typescript?.getSnapshot().context.time;
|
|
31
|
+
const hasErrors = Boolean(jsError || tsErrors);
|
|
35
32
|
const isNoConfig = snapshot.matches("No Config");
|
|
36
33
|
React.useEffect(() => {
|
|
37
34
|
if (isNoConfig) {
|
|
38
35
|
setTimeout(() => {
|
|
39
|
-
|
|
36
|
+
exit(new Error("No config found"));
|
|
40
37
|
});
|
|
41
38
|
}
|
|
42
|
-
}, [isNoConfig]);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
React.createElement(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
React.createElement(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
formatDistanceStrict(snapshot.context.lastSuccessfulJavaScriptBuild, now, {
|
|
71
|
-
addSuffix: true,
|
|
72
|
-
}),
|
|
73
|
-
"."))),
|
|
74
|
-
jsError && jsTime && (React.createElement(Box, { flexDirection: "column" },
|
|
75
|
-
React.createElement(Box, null,
|
|
39
|
+
}, [exit, isNoConfig]);
|
|
40
|
+
useInput((input) => {
|
|
41
|
+
if (input === "q") {
|
|
42
|
+
exit();
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return (React.createElement(Box, { flexDirection: "column", ...fullScreen },
|
|
46
|
+
React.createElement(Box, { flexDirection: "column" },
|
|
47
|
+
debug && (React.createElement(Box, { flexDirection: "column", paddingX: 1, borderStyle: "round" },
|
|
48
|
+
React.createElement(Box, null,
|
|
49
|
+
React.createElement(Text, null,
|
|
50
|
+
"State: ",
|
|
51
|
+
JSON.stringify(snapshot.value))),
|
|
52
|
+
snapshot.context.devVersion?.app_id && (React.createElement(Box, null,
|
|
53
|
+
React.createElement(Text, null,
|
|
54
|
+
"App ID: ",
|
|
55
|
+
snapshot.context.devVersion?.app_id))),
|
|
56
|
+
snapshot.context.devVersion?.app_dev_version_id && (React.createElement(Box, null,
|
|
57
|
+
React.createElement(Text, null,
|
|
58
|
+
"App Dev Version ID:",
|
|
59
|
+
" ",
|
|
60
|
+
snapshot.context.devVersion?.app_dev_version_id))),
|
|
61
|
+
snapshot.context.lastPing && (React.createElement(Box, null,
|
|
62
|
+
React.createElement(Text, null,
|
|
63
|
+
"Last ping at ",
|
|
64
|
+
React.createElement(PrettyDate, { date: snapshot.context.lastPing }),
|
|
65
|
+
"."))))),
|
|
66
|
+
snapshot.context.lastSuccessfulJavaScriptBuild && (React.createElement(Box, null,
|
|
76
67
|
React.createElement(Text, null,
|
|
77
|
-
"\
|
|
68
|
+
"\u2705 Last successful build was at",
|
|
78
69
|
" ",
|
|
79
|
-
|
|
80
|
-
".")),
|
|
81
|
-
React.createElement(Box, null,
|
|
82
|
-
React.createElement(BuildError, { error: jsError })))),
|
|
83
|
-
tsErrors && tsTime && (React.createElement(Box, { flexDirection: "column" },
|
|
84
|
-
React.createElement(Box, null,
|
|
70
|
+
React.createElement(PrettyDate, { date: snapshot.context.lastSuccessfulJavaScriptBuild }),
|
|
71
|
+
"."))),
|
|
72
|
+
jsError && jsTime && (React.createElement(Box, null,
|
|
85
73
|
React.createElement(Text, null,
|
|
86
|
-
"\u274C Last failed
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
React.createElement(Box, null,
|
|
91
|
-
React.createElement(TypeScriptErrors, { errors: tsErrors })))),
|
|
92
|
-
snapshot.matches("No Config") && (React.createElement(InitialInstructions, { reason: snapshot.context.configError })),
|
|
93
|
-
snapshot.matches("Watching") && (React.createElement(Box, null,
|
|
94
|
-
React.createElement(Text, null, "\uD83D\uDC40 Watching for changes... "),
|
|
95
|
-
React.createElement(Text, { color: "green" },
|
|
96
|
-
React.createElement(Spinner, { type: "dots" })))),
|
|
97
|
-
snapshot.matches({ Watching: { JavaScript: "Uploading" } }) && (React.createElement(Box, null,
|
|
98
|
-
React.createElement(Text, null, "\u267B\uFE0F Uploading bundles... "),
|
|
99
|
-
React.createElement(Text, { color: "green" },
|
|
100
|
-
React.createElement(Spinner, { type: "dots" })))),
|
|
101
|
-
snapshot.matches({ Watching: { JavaScript: "Upload Error" } }) && (React.createElement(Box, { flexDirection: "column" },
|
|
102
|
-
React.createElement(Box, null,
|
|
103
|
-
React.createElement(Text, { color: "redBright" }, "\u274C Upload Error"),
|
|
74
|
+
"\u274C Last failed build was at ",
|
|
75
|
+
React.createElement(PrettyDate, { date: jsTime }),
|
|
76
|
+
"."))),
|
|
77
|
+
tsErrors && tsTime && (React.createElement(Box, null,
|
|
104
78
|
React.createElement(Text, null,
|
|
105
|
-
"\
|
|
106
|
-
|
|
79
|
+
"\u274C Last failed TypeScript check was at ",
|
|
80
|
+
React.createElement(PrettyDate, { date: tsTime }),
|
|
81
|
+
"."))),
|
|
82
|
+
snapshot.matches("No Config") && (React.createElement(InitialInstructions, { reason: snapshot.context.configError })),
|
|
83
|
+
snapshot.matches("Watching") && (React.createElement(Box, null,
|
|
84
|
+
React.createElement(Text, null, "\uD83D\uDC40 Watching for changes... "))),
|
|
85
|
+
snapshot.matches({ Watching: { JavaScript: "Uploading" } }) && (React.createElement(Box, null,
|
|
86
|
+
React.createElement(Text, null, "\u267B\uFE0F Uploading bundles... "))),
|
|
87
|
+
snapshot.matches({ Watching: { JavaScript: "Upload Error" } }) && (React.createElement(Box, { flexDirection: "column" },
|
|
88
|
+
React.createElement(Box, null,
|
|
89
|
+
React.createElement(Text, { color: "redBright" }, "\u274C Upload Error"),
|
|
90
|
+
React.createElement(Text, null,
|
|
91
|
+
"\u2013 ",
|
|
92
|
+
snapshot.context.uploadError?.message))))),
|
|
93
|
+
hasErrors && (React.createElement(ScrollBox, { borderStyle: "round", padding: 1 },
|
|
94
|
+
jsError && renderBuildErrors(jsError),
|
|
95
|
+
tsErrors && renderTypeScriptErrors(tsErrors)))));
|
|
107
96
|
}
|
|
108
97
|
//# sourceMappingURL=dev.js.map
|
package/lib/commands/dev.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/commands/dev.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AACxC,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/commands/dev.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AACxC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,KAAK,CAAA;AAC/C,OAAO,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAA;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAErB,OAAO,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAC,mBAAmB,EAAC,MAAM,sCAAsC,CAAA;AACxE,OAAO,EAAC,SAAS,EAAC,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAC,sBAAsB,EAAC,MAAM,mCAAmC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AAQ,EAAE,EAAC,UAAU,EAAE,cAAc,EAAC,EAAC,CAAC,IAAI,CAC3D,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ;gBACvB,oBAAC,GAAG;oBACA,oBAAC,IAAI,IAAC,KAAK,EAAC,WAAW,0BAAsB;oBAC7C,oBAAC,IAAI;;wBAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAQ,CACpD,CACJ,CACT,CACC;QACL,SAAS,IAAI,CACV,oBAAC,SAAS,IAAC,WAAW,EAAC,OAAO,EAAC,OAAO,EAAE,CAAC;YACpC,OAAO,IAAI,iBAAiB,CAAC,OAAO,CAAC;YACrC,QAAQ,IAAI,sBAAsB,CAAC,QAAQ,CAAC,CACrC,CACf,CACC,CACT,CAAA;AACL,CAAC"}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BuildError } from "../build.js";
|
|
3
|
-
export declare function
|
|
4
|
-
message: BuildError["errors"][number];
|
|
5
|
-
level: "error" | "warning";
|
|
6
|
-
}): React.JSX.Element;
|
|
7
|
-
interface BuildErrorProps {
|
|
8
|
-
error: BuildError;
|
|
9
|
-
}
|
|
10
|
-
export declare function BuildError({ error: { errors, warnings } }: BuildErrorProps): React.JSX.Element;
|
|
11
|
-
export {};
|
|
3
|
+
export declare function renderBuildErrors({ errors, warnings }: BuildError): React.JSX.Element[];
|
|
12
4
|
//# sourceMappingURL=BuildError.d.ts.map
|