@hot-updater/vercel 0.0.0-stage → 1.0.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.
@@ -0,0 +1,101 @@
1
+ import { RunInitOptions } from "@hot-updater/cli-tools";
2
+ //#region iac/init/index.d.ts
3
+ declare const initProvider: {
4
+ readonly label: "Vercel Blob + Functions + Postgres";
5
+ readonly inputs: {
6
+ readonly teamId: {
7
+ readonly envKey: "HOT_UPDATER_VERCEL_TEAM_ID";
8
+ readonly help: "Vercel team ID (team_...), or the user ID of a personal account";
9
+ readonly prompt: {
10
+ readonly message: "Select a Vercel team";
11
+ readonly type: "select";
12
+ };
13
+ };
14
+ readonly projectName: {
15
+ readonly envKey: "HOT_UPDATER_VERCEL_PROJECT_NAME";
16
+ readonly help: "Vercel project that runs the Hot Updater Function";
17
+ readonly prompt: {
18
+ readonly defaultValue: "hot-updater";
19
+ readonly message: "Enter a name for the Vercel project";
20
+ readonly placeholder: "hot-updater";
21
+ readonly type: "text";
22
+ };
23
+ readonly validate: (value: string | undefined) => boolean;
24
+ };
25
+ readonly projectId: {
26
+ readonly envKey: "HOT_UPDATER_VERCEL_PROJECT_ID";
27
+ readonly help: "Vercel project ID (prj_...), saved by init";
28
+ readonly optional: true;
29
+ };
30
+ readonly blobStoreName: {
31
+ readonly envKey: "HOT_UPDATER_VERCEL_BLOB_STORE_NAME";
32
+ readonly help: "Blob store that keeps the bundles";
33
+ readonly prompt: {
34
+ readonly defaultValue: "hot-updater-storage";
35
+ readonly message: "Enter a name for the new Blob store";
36
+ readonly placeholder: "hot-updater-storage";
37
+ readonly type: "text";
38
+ };
39
+ readonly validate: (value: string | undefined) => boolean;
40
+ };
41
+ readonly blobStoreId: {
42
+ readonly envKey: "HOT_UPDATER_VERCEL_BLOB_STORE_ID";
43
+ readonly help: "Blob store ID (store_...), saved by init";
44
+ readonly optional: true;
45
+ };
46
+ readonly blobAccess: {
47
+ readonly envKey: "HOT_UPDATER_VERCEL_BLOB_ACCESS";
48
+ readonly help: "The Blob store's access: private (the default) or public";
49
+ readonly optional: true;
50
+ readonly prompt: {
51
+ readonly message: "Make the new Blob store private?";
52
+ readonly type: "confirm";
53
+ };
54
+ readonly validate: (value: string | undefined) => value is "public" | "private";
55
+ };
56
+ readonly blobReadWriteToken: {
57
+ readonly envKey: "HOT_UPDATER_VERCEL_BLOB_READ_WRITE_TOKEN";
58
+ readonly help: "The Blob store's read-write token, which init reads from the project";
59
+ readonly optional: true;
60
+ readonly persistence: "with-consent";
61
+ readonly preflight: false;
62
+ };
63
+ readonly databaseUrl: {
64
+ readonly envKey: "HOT_UPDATER_VERCEL_DATABASE_URL";
65
+ readonly help: "PostgreSQL connection URL of the Hot Updater database";
66
+ readonly persistence: "with-consent";
67
+ readonly prompt: {
68
+ readonly message: "Enter the PostgreSQL connection URL";
69
+ readonly type: "password";
70
+ };
71
+ readonly validate: (value: string | undefined) => boolean;
72
+ };
73
+ readonly vercelToken: {
74
+ readonly envKey: "VERCEL_TOKEN";
75
+ readonly help: "Vercel access token; without it, init uses the Vercel CLI login";
76
+ readonly optional: true;
77
+ readonly persistence: "with-consent";
78
+ readonly preflight: false;
79
+ };
80
+ };
81
+ };
82
+ //#endregion
83
+ //#region iac/vercelFunction.d.ts
84
+ /** The project's `vercel.json`: every path goes to the one Function. */
85
+ declare const VERCEL_FUNCTION_CONFIG: {
86
+ readonly $schema: "https://openapi.vercel.sh/vercel.json";
87
+ readonly functions: {
88
+ readonly "api/index.mjs": {
89
+ readonly maxDuration: 60;
90
+ };
91
+ };
92
+ readonly rewrites: readonly [{
93
+ readonly source: "/(.*)";
94
+ readonly destination: "/api";
95
+ }];
96
+ };
97
+ //#endregion
98
+ //#region iac/index.d.ts
99
+ declare const runInit: ({ build, envFile }: RunInitOptions) => Promise<void>;
100
+ //#endregion
101
+ export { VERCEL_FUNCTION_CONFIG, initProvider, runInit };
@@ -0,0 +1,101 @@
1
+ import { RunInitOptions } from "@hot-updater/cli-tools";
2
+ //#region iac/init/index.d.ts
3
+ declare const initProvider: {
4
+ readonly label: "Vercel Blob + Functions + Postgres";
5
+ readonly inputs: {
6
+ readonly teamId: {
7
+ readonly envKey: "HOT_UPDATER_VERCEL_TEAM_ID";
8
+ readonly help: "Vercel team ID (team_...), or the user ID of a personal account";
9
+ readonly prompt: {
10
+ readonly message: "Select a Vercel team";
11
+ readonly type: "select";
12
+ };
13
+ };
14
+ readonly projectName: {
15
+ readonly envKey: "HOT_UPDATER_VERCEL_PROJECT_NAME";
16
+ readonly help: "Vercel project that runs the Hot Updater Function";
17
+ readonly prompt: {
18
+ readonly defaultValue: "hot-updater";
19
+ readonly message: "Enter a name for the Vercel project";
20
+ readonly placeholder: "hot-updater";
21
+ readonly type: "text";
22
+ };
23
+ readonly validate: (value: string | undefined) => boolean;
24
+ };
25
+ readonly projectId: {
26
+ readonly envKey: "HOT_UPDATER_VERCEL_PROJECT_ID";
27
+ readonly help: "Vercel project ID (prj_...), saved by init";
28
+ readonly optional: true;
29
+ };
30
+ readonly blobStoreName: {
31
+ readonly envKey: "HOT_UPDATER_VERCEL_BLOB_STORE_NAME";
32
+ readonly help: "Blob store that keeps the bundles";
33
+ readonly prompt: {
34
+ readonly defaultValue: "hot-updater-storage";
35
+ readonly message: "Enter a name for the new Blob store";
36
+ readonly placeholder: "hot-updater-storage";
37
+ readonly type: "text";
38
+ };
39
+ readonly validate: (value: string | undefined) => boolean;
40
+ };
41
+ readonly blobStoreId: {
42
+ readonly envKey: "HOT_UPDATER_VERCEL_BLOB_STORE_ID";
43
+ readonly help: "Blob store ID (store_...), saved by init";
44
+ readonly optional: true;
45
+ };
46
+ readonly blobAccess: {
47
+ readonly envKey: "HOT_UPDATER_VERCEL_BLOB_ACCESS";
48
+ readonly help: "The Blob store's access: private (the default) or public";
49
+ readonly optional: true;
50
+ readonly prompt: {
51
+ readonly message: "Make the new Blob store private?";
52
+ readonly type: "confirm";
53
+ };
54
+ readonly validate: (value: string | undefined) => value is "public" | "private";
55
+ };
56
+ readonly blobReadWriteToken: {
57
+ readonly envKey: "HOT_UPDATER_VERCEL_BLOB_READ_WRITE_TOKEN";
58
+ readonly help: "The Blob store's read-write token, which init reads from the project";
59
+ readonly optional: true;
60
+ readonly persistence: "with-consent";
61
+ readonly preflight: false;
62
+ };
63
+ readonly databaseUrl: {
64
+ readonly envKey: "HOT_UPDATER_VERCEL_DATABASE_URL";
65
+ readonly help: "PostgreSQL connection URL of the Hot Updater database";
66
+ readonly persistence: "with-consent";
67
+ readonly prompt: {
68
+ readonly message: "Enter the PostgreSQL connection URL";
69
+ readonly type: "password";
70
+ };
71
+ readonly validate: (value: string | undefined) => boolean;
72
+ };
73
+ readonly vercelToken: {
74
+ readonly envKey: "VERCEL_TOKEN";
75
+ readonly help: "Vercel access token; without it, init uses the Vercel CLI login";
76
+ readonly optional: true;
77
+ readonly persistence: "with-consent";
78
+ readonly preflight: false;
79
+ };
80
+ };
81
+ };
82
+ //#endregion
83
+ //#region iac/vercelFunction.d.ts
84
+ /** The project's `vercel.json`: every path goes to the one Function. */
85
+ declare const VERCEL_FUNCTION_CONFIG: {
86
+ readonly $schema: "https://openapi.vercel.sh/vercel.json";
87
+ readonly functions: {
88
+ readonly "api/index.mjs": {
89
+ readonly maxDuration: 60;
90
+ };
91
+ };
92
+ readonly rewrites: readonly [{
93
+ readonly source: "/(.*)";
94
+ readonly destination: "/api";
95
+ }];
96
+ };
97
+ //#endregion
98
+ //#region iac/index.d.ts
99
+ declare const runInit: ({ build, envFile }: RunInitOptions) => Promise<void>;
100
+ //#endregion
101
+ export { VERCEL_FUNCTION_CONFIG, initProvider, runInit };