@hot-updater/firebase 0.35.8 → 0.35.9
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/dist/firebase/functions/index.cjs +1 -1
- package/dist/iac/index.cjs +392 -214
- package/dist/iac/index.d.cts +4 -5
- package/dist/iac/index.d.mts +4 -5
- package/dist/iac/index.mjs +385 -208
- package/dist/init/index.cjs +43 -0
- package/dist/init/index.d.cts +40 -0
- package/dist/init/index.d.mts +40 -0
- package/dist/init/index.mjs +40 -0
- package/package.json +13 -8
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region iac/init/index.ts
|
|
3
|
+
const isFirebaseRegion = (value) => value !== void 0 && /^[a-z]+(?:-[a-z]+)+[0-9]+$/.test(value);
|
|
4
|
+
const isFirebaseProjectId = (value) => value !== void 0 && /^[a-z][a-z0-9-]{4,28}[a-z0-9]$/.test(value);
|
|
5
|
+
const initProvider = {
|
|
6
|
+
label: "Firebase",
|
|
7
|
+
inputs: {
|
|
8
|
+
projectId: {
|
|
9
|
+
envKey: "HOT_UPDATER_FIREBASE_PROJECT_ID",
|
|
10
|
+
help: "Firebase project ID",
|
|
11
|
+
prompt: {
|
|
12
|
+
message: "Enter the Firebase project ID:",
|
|
13
|
+
placeholder: "hot-updater-app",
|
|
14
|
+
type: "text"
|
|
15
|
+
},
|
|
16
|
+
validate: isFirebaseProjectId
|
|
17
|
+
},
|
|
18
|
+
region: {
|
|
19
|
+
envKey: "HOT_UPDATER_FIREBASE_REGION",
|
|
20
|
+
help: "Firebase Functions region",
|
|
21
|
+
prompt: {
|
|
22
|
+
message: "Select Region",
|
|
23
|
+
type: "select"
|
|
24
|
+
},
|
|
25
|
+
validate: isFirebaseRegion
|
|
26
|
+
},
|
|
27
|
+
applicationCredentials: {
|
|
28
|
+
envKey: "GOOGLE_APPLICATION_CREDENTIALS",
|
|
29
|
+
help: "Service account JSON path",
|
|
30
|
+
optional: true,
|
|
31
|
+
persistence: "with-consent",
|
|
32
|
+
prompt: {
|
|
33
|
+
message: "Enter the service account JSON path (press Enter to configure later)",
|
|
34
|
+
placeholder: "~/Downloads/firebase-service-account.json",
|
|
35
|
+
type: "text"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
exports.initProvider = initProvider;
|
|
42
|
+
exports.isFirebaseProjectId = isFirebaseProjectId;
|
|
43
|
+
exports.isFirebaseRegion = isFirebaseRegion;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//#region iac/init/index.d.ts
|
|
2
|
+
declare const isFirebaseRegion: (value: string | undefined) => value is string;
|
|
3
|
+
declare const isFirebaseProjectId: (value: string | undefined) => value is string;
|
|
4
|
+
declare const initProvider: {
|
|
5
|
+
readonly label: "Firebase";
|
|
6
|
+
readonly inputs: {
|
|
7
|
+
readonly projectId: {
|
|
8
|
+
readonly envKey: "HOT_UPDATER_FIREBASE_PROJECT_ID";
|
|
9
|
+
readonly help: "Firebase project ID";
|
|
10
|
+
readonly prompt: {
|
|
11
|
+
readonly message: "Enter the Firebase project ID:";
|
|
12
|
+
readonly placeholder: "hot-updater-app";
|
|
13
|
+
readonly type: "text";
|
|
14
|
+
};
|
|
15
|
+
readonly validate: (value: string | undefined) => value is string;
|
|
16
|
+
};
|
|
17
|
+
readonly region: {
|
|
18
|
+
readonly envKey: "HOT_UPDATER_FIREBASE_REGION";
|
|
19
|
+
readonly help: "Firebase Functions region";
|
|
20
|
+
readonly prompt: {
|
|
21
|
+
readonly message: "Select Region";
|
|
22
|
+
readonly type: "select";
|
|
23
|
+
};
|
|
24
|
+
readonly validate: (value: string | undefined) => value is string;
|
|
25
|
+
};
|
|
26
|
+
readonly applicationCredentials: {
|
|
27
|
+
readonly envKey: "GOOGLE_APPLICATION_CREDENTIALS";
|
|
28
|
+
readonly help: "Service account JSON path";
|
|
29
|
+
readonly optional: true;
|
|
30
|
+
readonly persistence: "with-consent";
|
|
31
|
+
readonly prompt: {
|
|
32
|
+
readonly message: "Enter the service account JSON path (press Enter to configure later)";
|
|
33
|
+
readonly placeholder: "~/Downloads/firebase-service-account.json";
|
|
34
|
+
readonly type: "text";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { initProvider, isFirebaseProjectId, isFirebaseRegion };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//#region iac/init/index.d.ts
|
|
2
|
+
declare const isFirebaseRegion: (value: string | undefined) => value is string;
|
|
3
|
+
declare const isFirebaseProjectId: (value: string | undefined) => value is string;
|
|
4
|
+
declare const initProvider: {
|
|
5
|
+
readonly label: "Firebase";
|
|
6
|
+
readonly inputs: {
|
|
7
|
+
readonly projectId: {
|
|
8
|
+
readonly envKey: "HOT_UPDATER_FIREBASE_PROJECT_ID";
|
|
9
|
+
readonly help: "Firebase project ID";
|
|
10
|
+
readonly prompt: {
|
|
11
|
+
readonly message: "Enter the Firebase project ID:";
|
|
12
|
+
readonly placeholder: "hot-updater-app";
|
|
13
|
+
readonly type: "text";
|
|
14
|
+
};
|
|
15
|
+
readonly validate: (value: string | undefined) => value is string;
|
|
16
|
+
};
|
|
17
|
+
readonly region: {
|
|
18
|
+
readonly envKey: "HOT_UPDATER_FIREBASE_REGION";
|
|
19
|
+
readonly help: "Firebase Functions region";
|
|
20
|
+
readonly prompt: {
|
|
21
|
+
readonly message: "Select Region";
|
|
22
|
+
readonly type: "select";
|
|
23
|
+
};
|
|
24
|
+
readonly validate: (value: string | undefined) => value is string;
|
|
25
|
+
};
|
|
26
|
+
readonly applicationCredentials: {
|
|
27
|
+
readonly envKey: "GOOGLE_APPLICATION_CREDENTIALS";
|
|
28
|
+
readonly help: "Service account JSON path";
|
|
29
|
+
readonly optional: true;
|
|
30
|
+
readonly persistence: "with-consent";
|
|
31
|
+
readonly prompt: {
|
|
32
|
+
readonly message: "Enter the service account JSON path (press Enter to configure later)";
|
|
33
|
+
readonly placeholder: "~/Downloads/firebase-service-account.json";
|
|
34
|
+
readonly type: "text";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { initProvider, isFirebaseProjectId, isFirebaseRegion };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//#region iac/init/index.ts
|
|
2
|
+
const isFirebaseRegion = (value) => value !== void 0 && /^[a-z]+(?:-[a-z]+)+[0-9]+$/.test(value);
|
|
3
|
+
const isFirebaseProjectId = (value) => value !== void 0 && /^[a-z][a-z0-9-]{4,28}[a-z0-9]$/.test(value);
|
|
4
|
+
const initProvider = {
|
|
5
|
+
label: "Firebase",
|
|
6
|
+
inputs: {
|
|
7
|
+
projectId: {
|
|
8
|
+
envKey: "HOT_UPDATER_FIREBASE_PROJECT_ID",
|
|
9
|
+
help: "Firebase project ID",
|
|
10
|
+
prompt: {
|
|
11
|
+
message: "Enter the Firebase project ID:",
|
|
12
|
+
placeholder: "hot-updater-app",
|
|
13
|
+
type: "text"
|
|
14
|
+
},
|
|
15
|
+
validate: isFirebaseProjectId
|
|
16
|
+
},
|
|
17
|
+
region: {
|
|
18
|
+
envKey: "HOT_UPDATER_FIREBASE_REGION",
|
|
19
|
+
help: "Firebase Functions region",
|
|
20
|
+
prompt: {
|
|
21
|
+
message: "Select Region",
|
|
22
|
+
type: "select"
|
|
23
|
+
},
|
|
24
|
+
validate: isFirebaseRegion
|
|
25
|
+
},
|
|
26
|
+
applicationCredentials: {
|
|
27
|
+
envKey: "GOOGLE_APPLICATION_CREDENTIALS",
|
|
28
|
+
help: "Service account JSON path",
|
|
29
|
+
optional: true,
|
|
30
|
+
persistence: "with-consent",
|
|
31
|
+
prompt: {
|
|
32
|
+
message: "Enter the service account JSON path (press Enter to configure later)",
|
|
33
|
+
placeholder: "~/Downloads/firebase-service-account.json",
|
|
34
|
+
type: "text"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { initProvider, isFirebaseProjectId, isFirebaseRegion };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/firebase",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.35.
|
|
4
|
+
"version": "0.35.9",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"types": "dist/index.d.cts",
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
"import": "./dist/index.mjs",
|
|
13
13
|
"require": "./dist/index.cjs"
|
|
14
14
|
},
|
|
15
|
+
"./init": {
|
|
16
|
+
"types": "./dist/init/index.d.cts",
|
|
17
|
+
"import": "./dist/init/index.mjs",
|
|
18
|
+
"require": "./dist/init/index.cjs"
|
|
19
|
+
},
|
|
15
20
|
"./iac": {
|
|
16
21
|
"types": "./dist/iac/index.d.cts",
|
|
17
22
|
"import": "./dist/iac/index.mjs",
|
|
@@ -38,10 +43,10 @@
|
|
|
38
43
|
],
|
|
39
44
|
"dependencies": {
|
|
40
45
|
"hono": "4.12.9",
|
|
41
|
-
"@hot-updater/cli-tools": "0.35.
|
|
42
|
-
"@hot-updater/
|
|
43
|
-
"@hot-updater/core": "0.35.
|
|
44
|
-
"@hot-updater/server": "0.35.
|
|
46
|
+
"@hot-updater/cli-tools": "0.35.9",
|
|
47
|
+
"@hot-updater/core": "0.35.9",
|
|
48
|
+
"@hot-updater/plugin-core": "0.35.9",
|
|
49
|
+
"@hot-updater/server": "0.35.9"
|
|
45
50
|
},
|
|
46
51
|
"publishConfig": {
|
|
47
52
|
"access": "public"
|
|
@@ -56,9 +61,9 @@
|
|
|
56
61
|
"firebase-tools": "^13.32.0",
|
|
57
62
|
"fkill": "^9.0.0",
|
|
58
63
|
"mime": "^4.0.4",
|
|
59
|
-
"@hot-updater/js": "0.35.
|
|
60
|
-
"@hot-updater/mock": "0.35.
|
|
61
|
-
"@hot-updater/test-utils": "0.35.
|
|
64
|
+
"@hot-updater/js": "0.35.9",
|
|
65
|
+
"@hot-updater/mock": "0.35.9",
|
|
66
|
+
"@hot-updater/test-utils": "0.35.9"
|
|
62
67
|
},
|
|
63
68
|
"peerDependencies": {
|
|
64
69
|
"firebase-admin": "*",
|