@hot-updater/azure 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,99 @@
1
+ import { RunInitOptions } from "@hot-updater/cli-tools";
2
+ import "@azure/storage-blob";
3
+ //#region iac/azureResources.d.ts
4
+ /** The `package.json` of the zip package: it points the Functions host at the bundled `index.mjs`. */
5
+ declare const AZURE_FUNCTION_PACKAGE: {
6
+ readonly name: "hot-updater-azure-function";
7
+ readonly private: true;
8
+ readonly type: "module";
9
+ readonly main: "index.mjs";
10
+ };
11
+ //#endregion
12
+ //#region iac/init/index.d.ts
13
+ declare const initProvider: {
14
+ readonly label: "Azure Blob Storage + Functions + Cosmos DB";
15
+ readonly inputs: {
16
+ readonly subscriptionId: {
17
+ readonly envKey: "HOT_UPDATER_AZURE_SUBSCRIPTION_ID";
18
+ readonly help: "Azure subscription ID that holds the resources";
19
+ readonly prompt: {
20
+ readonly message: "Select an Azure subscription";
21
+ readonly type: "select";
22
+ };
23
+ };
24
+ readonly resourceGroup: {
25
+ readonly envKey: "HOT_UPDATER_AZURE_RESOURCE_GROUP";
26
+ readonly help: "Resource group that holds the Hot Updater resources";
27
+ readonly prompt: {
28
+ readonly defaultValue: "hot-updater";
29
+ readonly message: "Enter the resource group name";
30
+ readonly placeholder: "hot-updater";
31
+ readonly type: "text";
32
+ };
33
+ readonly validate: (value: string | undefined) => boolean;
34
+ };
35
+ readonly location: {
36
+ readonly envKey: "HOT_UPDATER_AZURE_LOCATION";
37
+ readonly help: "Azure region of a new resource group, such as eastus";
38
+ readonly optional: true;
39
+ readonly prompt: {
40
+ readonly message: "Select the region for the new resource group";
41
+ readonly type: "select";
42
+ };
43
+ };
44
+ readonly storageAccount: {
45
+ readonly envKey: "HOT_UPDATER_AZURE_STORAGE_ACCOUNT";
46
+ readonly help: "Storage account that keeps the bundles and runs the Function App";
47
+ readonly prompt: {
48
+ readonly message: "Enter the storage account name";
49
+ readonly type: "text";
50
+ };
51
+ readonly validate: (value: string | undefined) => boolean;
52
+ };
53
+ readonly cosmosAccount: {
54
+ readonly envKey: "HOT_UPDATER_AZURE_COSMOS_ACCOUNT";
55
+ readonly help: "Cosmos DB for NoSQL account of the Hot Updater database";
56
+ readonly prompt: {
57
+ readonly message: "Enter the Cosmos DB account name";
58
+ readonly type: "text";
59
+ };
60
+ readonly validate: (value: string | undefined) => boolean;
61
+ };
62
+ readonly functionApp: {
63
+ readonly envKey: "HOT_UPDATER_AZURE_FUNCTION_APP";
64
+ readonly help: "Function App that runs the Hot Updater server";
65
+ readonly prompt: {
66
+ readonly message: "Enter the Function App name";
67
+ readonly type: "text";
68
+ };
69
+ readonly validate: (value: string | undefined) => boolean;
70
+ };
71
+ readonly storageConnectionString: {
72
+ readonly envKey: "HOT_UPDATER_AZURE_STORAGE_CONNECTION_STRING";
73
+ readonly help: "The storage account's connection string, which init reads from Azure and saves for hot-updater.config.ts";
74
+ readonly optional: true;
75
+ readonly preflight: false;
76
+ };
77
+ readonly cosmosConnectionString: {
78
+ readonly envKey: "HOT_UPDATER_AZURE_COSMOS_CONNECTION_STRING";
79
+ readonly help: "The Cosmos DB account's connection string, which init reads from Azure and saves for hot-updater.config.ts";
80
+ readonly optional: true;
81
+ readonly preflight: false;
82
+ };
83
+ };
84
+ };
85
+ //#endregion
86
+ //#region iac/index.d.ts
87
+ /**
88
+ * Default resource names: a suffix from the subscription and resource
89
+ * group, so a rerun proposes the same names and two projects do not collide
90
+ * on the globally unique ones.
91
+ */
92
+ declare const defaultResourceNames: (subscriptionId: string, resourceGroup: string) => {
93
+ storageAccount: string;
94
+ cosmosAccount: string;
95
+ functionApp: string;
96
+ };
97
+ declare const runInit: ({ build, envFile }: RunInitOptions) => Promise<void>;
98
+ //#endregion
99
+ export { AZURE_FUNCTION_PACKAGE, defaultResourceNames, initProvider, runInit };
@@ -0,0 +1,99 @@
1
+ import { RunInitOptions } from "@hot-updater/cli-tools";
2
+ import "@azure/storage-blob";
3
+ //#region iac/azureResources.d.ts
4
+ /** The `package.json` of the zip package: it points the Functions host at the bundled `index.mjs`. */
5
+ declare const AZURE_FUNCTION_PACKAGE: {
6
+ readonly name: "hot-updater-azure-function";
7
+ readonly private: true;
8
+ readonly type: "module";
9
+ readonly main: "index.mjs";
10
+ };
11
+ //#endregion
12
+ //#region iac/init/index.d.ts
13
+ declare const initProvider: {
14
+ readonly label: "Azure Blob Storage + Functions + Cosmos DB";
15
+ readonly inputs: {
16
+ readonly subscriptionId: {
17
+ readonly envKey: "HOT_UPDATER_AZURE_SUBSCRIPTION_ID";
18
+ readonly help: "Azure subscription ID that holds the resources";
19
+ readonly prompt: {
20
+ readonly message: "Select an Azure subscription";
21
+ readonly type: "select";
22
+ };
23
+ };
24
+ readonly resourceGroup: {
25
+ readonly envKey: "HOT_UPDATER_AZURE_RESOURCE_GROUP";
26
+ readonly help: "Resource group that holds the Hot Updater resources";
27
+ readonly prompt: {
28
+ readonly defaultValue: "hot-updater";
29
+ readonly message: "Enter the resource group name";
30
+ readonly placeholder: "hot-updater";
31
+ readonly type: "text";
32
+ };
33
+ readonly validate: (value: string | undefined) => boolean;
34
+ };
35
+ readonly location: {
36
+ readonly envKey: "HOT_UPDATER_AZURE_LOCATION";
37
+ readonly help: "Azure region of a new resource group, such as eastus";
38
+ readonly optional: true;
39
+ readonly prompt: {
40
+ readonly message: "Select the region for the new resource group";
41
+ readonly type: "select";
42
+ };
43
+ };
44
+ readonly storageAccount: {
45
+ readonly envKey: "HOT_UPDATER_AZURE_STORAGE_ACCOUNT";
46
+ readonly help: "Storage account that keeps the bundles and runs the Function App";
47
+ readonly prompt: {
48
+ readonly message: "Enter the storage account name";
49
+ readonly type: "text";
50
+ };
51
+ readonly validate: (value: string | undefined) => boolean;
52
+ };
53
+ readonly cosmosAccount: {
54
+ readonly envKey: "HOT_UPDATER_AZURE_COSMOS_ACCOUNT";
55
+ readonly help: "Cosmos DB for NoSQL account of the Hot Updater database";
56
+ readonly prompt: {
57
+ readonly message: "Enter the Cosmos DB account name";
58
+ readonly type: "text";
59
+ };
60
+ readonly validate: (value: string | undefined) => boolean;
61
+ };
62
+ readonly functionApp: {
63
+ readonly envKey: "HOT_UPDATER_AZURE_FUNCTION_APP";
64
+ readonly help: "Function App that runs the Hot Updater server";
65
+ readonly prompt: {
66
+ readonly message: "Enter the Function App name";
67
+ readonly type: "text";
68
+ };
69
+ readonly validate: (value: string | undefined) => boolean;
70
+ };
71
+ readonly storageConnectionString: {
72
+ readonly envKey: "HOT_UPDATER_AZURE_STORAGE_CONNECTION_STRING";
73
+ readonly help: "The storage account's connection string, which init reads from Azure and saves for hot-updater.config.ts";
74
+ readonly optional: true;
75
+ readonly preflight: false;
76
+ };
77
+ readonly cosmosConnectionString: {
78
+ readonly envKey: "HOT_UPDATER_AZURE_COSMOS_CONNECTION_STRING";
79
+ readonly help: "The Cosmos DB account's connection string, which init reads from Azure and saves for hot-updater.config.ts";
80
+ readonly optional: true;
81
+ readonly preflight: false;
82
+ };
83
+ };
84
+ };
85
+ //#endregion
86
+ //#region iac/index.d.ts
87
+ /**
88
+ * Default resource names: a suffix from the subscription and resource
89
+ * group, so a rerun proposes the same names and two projects do not collide
90
+ * on the globally unique ones.
91
+ */
92
+ declare const defaultResourceNames: (subscriptionId: string, resourceGroup: string) => {
93
+ storageAccount: string;
94
+ cosmosAccount: string;
95
+ functionApp: string;
96
+ };
97
+ declare const runInit: ({ build, envFile }: RunInitOptions) => Promise<void>;
98
+ //#endregion
99
+ export { AZURE_FUNCTION_PACKAGE, defaultResourceNames, initProvider, runInit };