attio 0.0.1-experimental.20240708.1 → 0.0.1-experimental.20240717
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/complete-bundle-upload.d.ts +8 -0
- package/lib/api/complete-bundle-upload.d.ts.map +1 -0
- package/lib/api/complete-bundle-upload.js +22 -0
- package/lib/api/complete-bundle-upload.js.map +1 -0
- package/lib/api/create-dev-version.d.ts +28 -0
- package/lib/api/create-dev-version.d.ts.map +1 -0
- package/lib/api/create-dev-version.js +22 -0
- package/lib/api/create-dev-version.js.map +1 -0
- package/lib/api/create-developer-account.d.ts +12 -0
- package/lib/api/create-developer-account.d.ts.map +1 -0
- package/lib/api/create-developer-account.js +37 -0
- package/lib/api/create-developer-account.js.map +1 -0
- package/lib/api/create-integration.d.ts +14 -0
- package/lib/api/create-integration.d.ts.map +1 -0
- package/lib/api/create-integration.js +41 -0
- package/lib/api/create-integration.js.map +1 -0
- package/lib/api/handle-error.d.ts +3 -0
- package/lib/api/handle-error.d.ts.map +1 -0
- package/lib/api/handle-error.js +12 -0
- package/lib/api/handle-error.js.map +1 -0
- package/lib/api/is-integration-slug-valid.d.ts +6 -0
- package/lib/api/is-integration-slug-valid.d.ts.map +1 -0
- package/lib/api/is-integration-slug-valid.js +18 -0
- package/lib/api/is-integration-slug-valid.js.map +1 -0
- package/lib/api/make-headers.d.ts +6 -0
- package/lib/api/make-headers.d.ts.map +1 -0
- package/lib/api/make-headers.js +8 -0
- package/lib/api/make-headers.js.map +1 -0
- package/lib/api/ping.d.ts +7 -0
- package/lib/api/ping.d.ts.map +1 -0
- package/lib/api/ping.js +16 -0
- package/lib/api/ping.js.map +1 -0
- package/lib/api/start-upload.d.ts +12 -0
- package/lib/api/start-upload.d.ts.map +1 -0
- package/lib/api/start-upload.js +19 -0
- package/lib/api/start-upload.js.map +1 -0
- package/lib/build/client/generate-client-entry.js +2 -2
- package/lib/build/client/generate-client-entry.js.map +1 -1
- package/lib/build/proxy-server-modules-plugin.d.ts.map +1 -1
- package/lib/build/proxy-server-modules-plugin.js +13 -6
- package/lib/build/proxy-server-modules-plugin.js.map +1 -1
- package/lib/build/server/generate-server-entry.d.ts.map +1 -1
- package/lib/build/server/generate-server-entry.js +22 -15
- package/lib/build/server/generate-server-entry.js.map +1 -1
- package/lib/build.d.ts +0 -1
- package/lib/build.d.ts.map +1 -1
- package/lib/build.js +0 -13
- package/lib/build.js.map +1 -1
- package/lib/commands/build.js +2 -3
- package/lib/commands/build.js.map +1 -1
- package/lib/commands/create.d.ts.map +1 -1
- package/lib/commands/create.js +3 -3
- package/lib/commands/create.js.map +1 -1
- package/lib/commands/dev.js +13 -14
- package/lib/commands/dev.js.map +1 -1
- package/lib/components/InitialInstructions.js +1 -1
- package/lib/components/InitialInstructions.js.map +1 -1
- package/lib/machines/create-machine.d.ts +15 -15
- package/lib/machines/create-machine.d.ts.map +1 -1
- package/lib/machines/create-machine.js +22 -15
- package/lib/machines/create-machine.js.map +1 -1
- package/lib/machines/dev-machine.d.ts +2 -1
- package/lib/machines/dev-machine.d.ts.map +1 -1
- package/lib/machines/dev-machine.js +38 -13
- package/lib/machines/dev-machine.js.map +1 -1
- package/lib/machines/js-machine.d.ts.map +1 -1
- package/lib/machines/js-machine.js +2 -2
- package/lib/machines/js-machine.js.map +1 -1
- package/lib/machines/ts-machine.js +2 -3
- package/lib/machines/ts-machine.js.map +1 -1
- package/lib/schema.d.ts +39 -0
- package/lib/schema.d.ts.map +1 -0
- package/lib/schema.js +24 -0
- package/lib/schema.js.map +1 -0
- package/lib/schema.json +53 -0
- package/lib/templates/common/README.md +6 -4
- package/lib/templates/common/attio.json +4 -0
- package/lib/templates/javascript/.env +12 -0
- package/lib/templates/javascript/package.json +1 -8
- package/lib/templates/typescript/.env +12 -0
- package/lib/templates/typescript/package.json +1 -8
- package/lib/util/load-config.d.ts +41 -0
- package/lib/util/load-config.d.ts.map +1 -0
- package/lib/util/load-config.js +62 -0
- package/lib/util/load-config.js.map +1 -0
- package/lib/util/load-env.d.ts +3 -0
- package/lib/util/load-env.d.ts.map +1 -0
- package/lib/util/load-env.js +24 -0
- package/lib/util/load-env.js.map +1 -0
- package/lib/util/load-extension-config.d.ts +3 -0
- package/lib/util/load-extension-config.d.ts.map +1 -0
- package/lib/util/load-extension-config.js +21 -0
- package/lib/util/load-extension-config.js.map +1 -0
- package/package.json +11 -8
- package/lib/util/upload-bundle.d.ts +0 -162
- package/lib/util/upload-bundle.d.ts.map +0 -1
- package/lib/util/upload-bundle.js +0 -235
- package/lib/util/upload-bundle.js.map +0 -1
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const createIntegration: (token: string, devSlug: string, slug: string, title: string) => Promise<{
|
|
3
|
-
title: string;
|
|
4
|
-
description: string;
|
|
5
|
-
developer_account_id: string;
|
|
6
|
-
integration_id: string;
|
|
7
|
-
slug: string;
|
|
8
|
-
avatar_url: string | null;
|
|
9
|
-
}>;
|
|
10
|
-
declare const createDevVersionSchema: z.ZodObject<{
|
|
11
|
-
integration_id: z.ZodString;
|
|
12
|
-
integration_dev_version_id: z.ZodString;
|
|
13
|
-
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
integration_id: string;
|
|
15
|
-
integration_dev_version_id: string;
|
|
16
|
-
}, {
|
|
17
|
-
integration_id: string;
|
|
18
|
-
integration_dev_version_id: string;
|
|
19
|
-
}>;
|
|
20
|
-
export type DevVersion = z.infer<typeof createDevVersionSchema>;
|
|
21
|
-
export declare const createDevVersion: ({ token, devSlug, integrationId, targetWorkspaceId, connections, }: {
|
|
22
|
-
token: string;
|
|
23
|
-
devSlug: string;
|
|
24
|
-
integrationId: string;
|
|
25
|
-
targetWorkspaceId: string;
|
|
26
|
-
connections: Record<string, {
|
|
27
|
-
connection_type: "secret";
|
|
28
|
-
audience: "workspace" | "workspace-member";
|
|
29
|
-
}>;
|
|
30
|
-
}) => Promise<{
|
|
31
|
-
integration_id: string;
|
|
32
|
-
integration_dev_version_id: string;
|
|
33
|
-
}>;
|
|
34
|
-
export declare const startUpload: (token: string, devSlug: string, integrationId: string, devVersionId: string) => Promise<{
|
|
35
|
-
integration_dev_version_id: string;
|
|
36
|
-
integration_dev_version_bundle_id: string;
|
|
37
|
-
client_bundle_upload_url: string;
|
|
38
|
-
server_bundle_upload_url: string;
|
|
39
|
-
}>;
|
|
40
|
-
declare const packageJsonSchema: z.ZodObject<{
|
|
41
|
-
attio: z.ZodObject<{
|
|
42
|
-
app: z.ZodString;
|
|
43
|
-
integration: z.ZodObject<{
|
|
44
|
-
id: z.ZodString;
|
|
45
|
-
slug: z.ZodString;
|
|
46
|
-
connections: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
47
|
-
connection_type: z.ZodEnum<["secret"]>;
|
|
48
|
-
audience: z.ZodEnum<["workspace", "workspace-member"]>;
|
|
49
|
-
}, "strip", z.ZodTypeAny, {
|
|
50
|
-
connection_type: "secret";
|
|
51
|
-
audience: "workspace" | "workspace-member";
|
|
52
|
-
}, {
|
|
53
|
-
connection_type: "secret";
|
|
54
|
-
audience: "workspace" | "workspace-member";
|
|
55
|
-
}>>>;
|
|
56
|
-
}, "strip", z.ZodTypeAny, {
|
|
57
|
-
id: string;
|
|
58
|
-
slug: string;
|
|
59
|
-
connections: Record<string, {
|
|
60
|
-
connection_type: "secret";
|
|
61
|
-
audience: "workspace" | "workspace-member";
|
|
62
|
-
}>;
|
|
63
|
-
}, {
|
|
64
|
-
id: string;
|
|
65
|
-
slug: string;
|
|
66
|
-
connections?: Record<string, {
|
|
67
|
-
connection_type: "secret";
|
|
68
|
-
audience: "workspace" | "workspace-member";
|
|
69
|
-
}> | undefined;
|
|
70
|
-
}>;
|
|
71
|
-
}, "strip", z.ZodTypeAny, {
|
|
72
|
-
app: string;
|
|
73
|
-
integration: {
|
|
74
|
-
id: string;
|
|
75
|
-
slug: string;
|
|
76
|
-
connections: Record<string, {
|
|
77
|
-
connection_type: "secret";
|
|
78
|
-
audience: "workspace" | "workspace-member";
|
|
79
|
-
}>;
|
|
80
|
-
};
|
|
81
|
-
}, {
|
|
82
|
-
app: string;
|
|
83
|
-
integration: {
|
|
84
|
-
id: string;
|
|
85
|
-
slug: string;
|
|
86
|
-
connections?: Record<string, {
|
|
87
|
-
connection_type: "secret";
|
|
88
|
-
audience: "workspace" | "workspace-member";
|
|
89
|
-
}> | undefined;
|
|
90
|
-
};
|
|
91
|
-
}>;
|
|
92
|
-
}, "strip", z.ZodTypeAny, {
|
|
93
|
-
attio: {
|
|
94
|
-
app: string;
|
|
95
|
-
integration: {
|
|
96
|
-
id: string;
|
|
97
|
-
slug: string;
|
|
98
|
-
connections: Record<string, {
|
|
99
|
-
connection_type: "secret";
|
|
100
|
-
audience: "workspace" | "workspace-member";
|
|
101
|
-
}>;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
}, {
|
|
105
|
-
attio: {
|
|
106
|
-
app: string;
|
|
107
|
-
integration: {
|
|
108
|
-
id: string;
|
|
109
|
-
slug: string;
|
|
110
|
-
connections?: Record<string, {
|
|
111
|
-
connection_type: "secret";
|
|
112
|
-
audience: "workspace" | "workspace-member";
|
|
113
|
-
}> | undefined;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
}>;
|
|
117
|
-
type IntegrationConfig = z.infer<typeof packageJsonSchema>["attio"]["integration"];
|
|
118
|
-
type IntegrationConfigError = "No package.json" | "Invalid package.json";
|
|
119
|
-
export declare const loadIntegrationConfig: () => IntegrationConfig | IntegrationConfigError;
|
|
120
|
-
export declare const initialConfigSchema: z.ZodObject<{
|
|
121
|
-
token: z.ZodString;
|
|
122
|
-
developer_slug: z.ZodString;
|
|
123
|
-
target_workspace_id: z.ZodString;
|
|
124
|
-
}, "strip", z.ZodTypeAny, {
|
|
125
|
-
token: string;
|
|
126
|
-
developer_slug: string;
|
|
127
|
-
target_workspace_id: string;
|
|
128
|
-
}, {
|
|
129
|
-
token: string;
|
|
130
|
-
developer_slug: string;
|
|
131
|
-
target_workspace_id: string;
|
|
132
|
-
}>;
|
|
133
|
-
export type InitialConfig = z.infer<typeof initialConfigSchema>;
|
|
134
|
-
declare const configSchema: z.ZodObject<{
|
|
135
|
-
token: z.ZodString;
|
|
136
|
-
developer_slug: z.ZodString;
|
|
137
|
-
target_workspace_id: z.ZodString;
|
|
138
|
-
developer_account_id: z.ZodString;
|
|
139
|
-
developer_account_member_id: z.ZodString;
|
|
140
|
-
}, "strip", z.ZodTypeAny, {
|
|
141
|
-
developer_account_id: string;
|
|
142
|
-
developer_account_member_id: string;
|
|
143
|
-
token: string;
|
|
144
|
-
developer_slug: string;
|
|
145
|
-
target_workspace_id: string;
|
|
146
|
-
}, {
|
|
147
|
-
developer_account_id: string;
|
|
148
|
-
developer_account_member_id: string;
|
|
149
|
-
token: string;
|
|
150
|
-
developer_slug: string;
|
|
151
|
-
target_workspace_id: string;
|
|
152
|
-
}>;
|
|
153
|
-
type Config = z.infer<typeof configSchema>;
|
|
154
|
-
export declare const configFileName = ".attio.json";
|
|
155
|
-
export type InitialConfigError = "No config file" | "Invalid config file" | "Invalid developer_slug: must be lower kebab case and contain only letters and hyphens. e.g. my-slug";
|
|
156
|
-
export declare const loadInitialConfig: () => InitialConfig | InitialConfigError;
|
|
157
|
-
export declare const loadConfig: () => Promise<Config | InitialConfigError>;
|
|
158
|
-
export declare const completeBundleUpload: (token: string, devSlug: string, integrationId: string, devVersionId: string, bundleId: string) => Promise<true>;
|
|
159
|
-
export declare const isIntegrationSlugValid: (token: string, devSlug: string, integrationSlug: string) => Promise<boolean>;
|
|
160
|
-
export declare const ping: (token: string, devSlug: string, integrationId: string, devVersionId: string) => Promise<boolean>;
|
|
161
|
-
export {};
|
|
162
|
-
//# sourceMappingURL=upload-bundle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload-bundle.d.ts","sourceRoot":"","sources":["../../src/util/upload-bundle.ts"],"names":[],"mappings":"AAGA,OAAO,E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AAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAE1C,eAAO,MAAM,cAAc,gBAAgB,CAAA;AAG3C,MAAM,MAAM,kBAAkB,GACxB,gBAAgB,GAChB,qBAAqB,GACrB,qGAAqG,CAAA;AAE3G,eAAO,MAAM,iBAAiB,QAAO,aAAa,GAAG,kBAOpD,CAAA;AAED,eAAO,MAAM,UAAU,QAAa,QAAQ,MAAM,GAAG,kBAAkB,CAuCtE,CAAA;AAMD,eAAO,MAAM,oBAAoB,UACtB,MAAM,WACJ,MAAM,iBACA,MAAM,gBACP,MAAM,YACV,MAAM,kBAiBnB,CAAA;AAMD,eAAO,MAAM,sBAAsB,UACxB,MAAM,WACJ,MAAM,mBACE,MAAM,qBAa1B,CAAA;AAMD,eAAO,MAAM,IAAI,UACN,MAAM,WACJ,MAAM,iBACA,MAAM,gBACP,MAAM,qBAYvB,CAAA"}
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
2
|
-
import { homedir } from "os";
|
|
3
|
-
import { v4 as uuid } from "uuid";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
import { API } from "../env.js";
|
|
6
|
-
import { isValidSlug } from "./validate-slug.js";
|
|
7
|
-
const isTest = process.env.NODE_ENV === "test";
|
|
8
|
-
const getHeaders = (token) => ({
|
|
9
|
-
"x-attio-platform": "web-app",
|
|
10
|
-
"Authorization": `Bearer ${token}`,
|
|
11
|
-
"Content-Type": "application/json",
|
|
12
|
-
});
|
|
13
|
-
const serverErrorSchema = z.object({
|
|
14
|
-
message: z.string(),
|
|
15
|
-
});
|
|
16
|
-
const handleError = async (response) => {
|
|
17
|
-
if (response.ok)
|
|
18
|
-
return;
|
|
19
|
-
const json = await response.json();
|
|
20
|
-
const error = serverErrorSchema.parse(json);
|
|
21
|
-
throw new Error(error.message);
|
|
22
|
-
};
|
|
23
|
-
const createDeveloperAccountSchema = z.object({
|
|
24
|
-
developer_account: z.object({
|
|
25
|
-
developer_account_id: z.string(),
|
|
26
|
-
}),
|
|
27
|
-
developer_account_member: z.object({
|
|
28
|
-
developer_account_member_id: z.string(),
|
|
29
|
-
}),
|
|
30
|
-
});
|
|
31
|
-
const createDeveloperAccount = async (token, slug) => {
|
|
32
|
-
const accountId = uuid();
|
|
33
|
-
if (isTest) {
|
|
34
|
-
return createDeveloperAccountSchema.parse({
|
|
35
|
-
developer_account: { developer_account_id: accountId },
|
|
36
|
-
developer_account_member: { developer_account_member_id: accountId },
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
const response = await fetch(`${API}/developer-portal/accounts/${accountId}`, {
|
|
40
|
-
method: "PUT",
|
|
41
|
-
headers: getHeaders(token),
|
|
42
|
-
body: JSON.stringify({ slug, title: slug }),
|
|
43
|
-
});
|
|
44
|
-
await handleError(response);
|
|
45
|
-
const json = await response.json();
|
|
46
|
-
try {
|
|
47
|
-
return createDeveloperAccountSchema.parse(json);
|
|
48
|
-
}
|
|
49
|
-
catch {
|
|
50
|
-
throw new Error(JSON.stringify(json));
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
const createIntegrationSchema = z.object({
|
|
54
|
-
integration_id: z.string(),
|
|
55
|
-
developer_account_id: z.string(),
|
|
56
|
-
slug: z.string(),
|
|
57
|
-
title: z.string(),
|
|
58
|
-
description: z.string(),
|
|
59
|
-
avatar_url: z.string().nullable(),
|
|
60
|
-
});
|
|
61
|
-
export const createIntegration = async (token, devSlug, slug, title) => {
|
|
62
|
-
const integrationId = uuid();
|
|
63
|
-
if (isTest) {
|
|
64
|
-
return createIntegrationSchema.parse({
|
|
65
|
-
integration_id: integrationId,
|
|
66
|
-
developer_account_id: devSlug,
|
|
67
|
-
slug,
|
|
68
|
-
title,
|
|
69
|
-
description: "Integration created in CI",
|
|
70
|
-
avatar_url: null,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
const response = await fetch(`${API}/developer-portal/accounts/${devSlug}/integrations/${integrationId}`, {
|
|
74
|
-
method: "PUT",
|
|
75
|
-
headers: getHeaders(token),
|
|
76
|
-
body: JSON.stringify({ slug, title }),
|
|
77
|
-
});
|
|
78
|
-
await handleError(response);
|
|
79
|
-
const json = await response.json();
|
|
80
|
-
try {
|
|
81
|
-
return createIntegrationSchema.parse(json);
|
|
82
|
-
}
|
|
83
|
-
catch {
|
|
84
|
-
throw new Error(JSON.stringify(json));
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
const createDevVersionSchema = z.object({
|
|
88
|
-
integration_id: z.string(),
|
|
89
|
-
integration_dev_version_id: z.string(),
|
|
90
|
-
});
|
|
91
|
-
export const createDevVersion = async ({ token, devSlug, integrationId, targetWorkspaceId, connections, }) => {
|
|
92
|
-
const response = await fetch(`${API}/developer-portal/accounts/${devSlug}/integrations/${integrationId}/dev-versions`, {
|
|
93
|
-
method: "POST",
|
|
94
|
-
headers: getHeaders(token),
|
|
95
|
-
body: JSON.stringify({ connections, target_workspace_id: targetWorkspaceId }),
|
|
96
|
-
});
|
|
97
|
-
await handleError(response);
|
|
98
|
-
return createDevVersionSchema.parse(await response.json());
|
|
99
|
-
};
|
|
100
|
-
const startUploadSchema = z.object({
|
|
101
|
-
integration_dev_version_id: z.string(),
|
|
102
|
-
integration_dev_version_bundle_id: z.string(),
|
|
103
|
-
client_bundle_upload_url: z.string(),
|
|
104
|
-
server_bundle_upload_url: z.string(),
|
|
105
|
-
});
|
|
106
|
-
export const startUpload = async (token, devSlug, integrationId, devVersionId) => {
|
|
107
|
-
const response = await fetch(`${API}/developer-portal/accounts/${devSlug}/integrations/${integrationId}/dev-versions/${devVersionId}/bundles`, {
|
|
108
|
-
method: "POST",
|
|
109
|
-
headers: getHeaders(token),
|
|
110
|
-
});
|
|
111
|
-
await handleError(response);
|
|
112
|
-
return startUploadSchema.parse(await response.json());
|
|
113
|
-
};
|
|
114
|
-
const packageJsonSchema = z.object({
|
|
115
|
-
attio: z.object({
|
|
116
|
-
app: z.string(),
|
|
117
|
-
integration: z.object({
|
|
118
|
-
id: z.string(),
|
|
119
|
-
slug: z.string(),
|
|
120
|
-
connections: z
|
|
121
|
-
.record(z.string().regex(/^[a-z]+(_[a-z]+)*$/), z.object({
|
|
122
|
-
connection_type: z.enum(["secret"]),
|
|
123
|
-
audience: z.enum(["workspace", "workspace-member"]),
|
|
124
|
-
}))
|
|
125
|
-
.default({}),
|
|
126
|
-
}),
|
|
127
|
-
}),
|
|
128
|
-
});
|
|
129
|
-
const packageJsonPath = "./package.json";
|
|
130
|
-
export const loadIntegrationConfig = () => {
|
|
131
|
-
if (!existsSync(packageJsonPath))
|
|
132
|
-
return "No package.json";
|
|
133
|
-
const packageJson = JSON.parse(readFileSync(packageJsonPath, { encoding: "utf8" }));
|
|
134
|
-
const parsed = packageJsonSchema.safeParse(packageJson);
|
|
135
|
-
if (!parsed.success)
|
|
136
|
-
return "Invalid package.json";
|
|
137
|
-
return parsed.data.attio.integration;
|
|
138
|
-
};
|
|
139
|
-
export const initialConfigSchema = z.object({
|
|
140
|
-
token: z.string(),
|
|
141
|
-
developer_slug: z.string(),
|
|
142
|
-
target_workspace_id: z.string().uuid(),
|
|
143
|
-
});
|
|
144
|
-
const configSchema = initialConfigSchema.extend({
|
|
145
|
-
developer_account_id: z.string(),
|
|
146
|
-
developer_account_member_id: z.string(),
|
|
147
|
-
});
|
|
148
|
-
export const configFileName = ".attio.json";
|
|
149
|
-
const configPath = `${homedir()}/${configFileName}`;
|
|
150
|
-
export const loadInitialConfig = () => {
|
|
151
|
-
if (!existsSync(configPath))
|
|
152
|
-
return "No config file";
|
|
153
|
-
const configFile = JSON.parse(readFileSync(configPath, { encoding: "utf8" }));
|
|
154
|
-
const parsed = initialConfigSchema.safeParse(configFile);
|
|
155
|
-
if (!parsed.success)
|
|
156
|
-
return "Invalid config file";
|
|
157
|
-
return parsed.data;
|
|
158
|
-
};
|
|
159
|
-
export const loadConfig = async () => {
|
|
160
|
-
if (!existsSync(configPath))
|
|
161
|
-
return "No config file";
|
|
162
|
-
const configFileContents = readFileSync(configPath, { encoding: "utf8" });
|
|
163
|
-
let configFile;
|
|
164
|
-
try {
|
|
165
|
-
configFile = JSON.parse(configFileContents);
|
|
166
|
-
}
|
|
167
|
-
catch {
|
|
168
|
-
return "Invalid config file";
|
|
169
|
-
}
|
|
170
|
-
const parsed = configSchema.safeParse(configFile);
|
|
171
|
-
if (parsed.success) {
|
|
172
|
-
if (!isValidSlug(parsed.data.developer_slug)) {
|
|
173
|
-
return "Invalid developer_slug: must be lower kebab case and contain only letters and hyphens. e.g. my-slug";
|
|
174
|
-
}
|
|
175
|
-
return parsed.data;
|
|
176
|
-
}
|
|
177
|
-
const initialConfig = loadInitialConfig();
|
|
178
|
-
if (typeof initialConfig === "string")
|
|
179
|
-
return initialConfig;
|
|
180
|
-
const { token, developer_slug } = initialConfig;
|
|
181
|
-
if (!isValidSlug(developer_slug)) {
|
|
182
|
-
return "Invalid developer_slug: must be lower kebab case and contain only letters and hyphens. e.g. my-slug";
|
|
183
|
-
}
|
|
184
|
-
const devAccount = await createDeveloperAccount(token, developer_slug);
|
|
185
|
-
const config = configSchema.parse({
|
|
186
|
-
token,
|
|
187
|
-
developer_slug,
|
|
188
|
-
developer_account_id: devAccount.developer_account.developer_account_id,
|
|
189
|
-
developer_account_member_id: devAccount.developer_account_member.developer_account_member_id,
|
|
190
|
-
target_workspace_id: initialConfig.target_workspace_id,
|
|
191
|
-
});
|
|
192
|
-
writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
193
|
-
return config;
|
|
194
|
-
};
|
|
195
|
-
const completeBundleUploadSchema = z.object({
|
|
196
|
-
success: z.literal(true),
|
|
197
|
-
});
|
|
198
|
-
export const completeBundleUpload = async (token, devSlug, integrationId, devVersionId, bundleId) => {
|
|
199
|
-
const response = await fetch(`${API}/developer-portal/accounts/${devSlug}/integrations/${integrationId}/dev-versions/${devVersionId}/bundles/${bundleId}/complete`, {
|
|
200
|
-
method: "POST",
|
|
201
|
-
headers: getHeaders(token),
|
|
202
|
-
});
|
|
203
|
-
await handleError(response);
|
|
204
|
-
const json = await response.json();
|
|
205
|
-
try {
|
|
206
|
-
return completeBundleUploadSchema.parse(json).success;
|
|
207
|
-
}
|
|
208
|
-
catch {
|
|
209
|
-
throw new Error(JSON.stringify(json));
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
const isIntegrationSlugValidSchema = z.object({
|
|
213
|
-
exists: z.boolean(),
|
|
214
|
-
});
|
|
215
|
-
export const isIntegrationSlugValid = async (token, devSlug, integrationSlug) => {
|
|
216
|
-
if (isTest)
|
|
217
|
-
return true;
|
|
218
|
-
const response = await fetch(`${API}/developer-portal/accounts/${devSlug}/integrations/${integrationSlug}/exists`, {
|
|
219
|
-
headers: getHeaders(token),
|
|
220
|
-
});
|
|
221
|
-
await handleError(response);
|
|
222
|
-
return !isIntegrationSlugValidSchema.parse(await response.json()).exists;
|
|
223
|
-
};
|
|
224
|
-
const pingSchema = z.object({
|
|
225
|
-
success: z.boolean(),
|
|
226
|
-
});
|
|
227
|
-
export const ping = async (token, devSlug, integrationId, devVersionId) => {
|
|
228
|
-
const response = await fetch(`${API}/developer-portal/accounts/${devSlug}/integrations/${integrationId}/dev-versions/${devVersionId}/ping`, {
|
|
229
|
-
method: "POST",
|
|
230
|
-
headers: getHeaders(token),
|
|
231
|
-
});
|
|
232
|
-
await handleError(response);
|
|
233
|
-
return pingSchema.parse(await response.json()).success;
|
|
234
|
-
};
|
|
235
|
-
//# sourceMappingURL=upload-bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload-bundle.js","sourceRoot":"","sources":["../../src/util/upload-bundle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,YAAY,EAAE,aAAa,EAAC,MAAM,IAAI,CAAA;AAC1D,OAAO,EAAC,OAAO,EAAC,MAAM,IAAI,CAAA;AAC1B,OAAO,EAAC,EAAE,IAAI,IAAI,EAAC,MAAM,MAAM,CAAA;AAC/B,OAAO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