@hot-updater/firebase 1.2.0-rc.3 → 1.2.0-rc.5
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.
|
@@ -4683,7 +4683,7 @@ const createKvAdapter = ({ store, tablePrefix = "" }) => {
|
|
|
4683
4683
|
};
|
|
4684
4684
|
//#endregion
|
|
4685
4685
|
//#region ../../packages/server/dist/version.mjs
|
|
4686
|
-
const HOT_UPDATER_SERVER_VERSION = "1.2.0-rc.
|
|
4686
|
+
const HOT_UPDATER_SERVER_VERSION = "1.2.0-rc.5";
|
|
4687
4687
|
//#endregion
|
|
4688
4688
|
//#region ../../packages/server/dist/handlerVersionRoutes.mjs
|
|
4689
4689
|
/**
|
package/dist/init/index.cjs
CHANGED
|
@@ -7202,15 +7202,22 @@ const prepareFirebaseTemplate = async (firebaseRootDir) => {
|
|
|
7202
7202
|
};
|
|
7203
7203
|
//#endregion
|
|
7204
7204
|
//#region iac/configTemplate.ts
|
|
7205
|
-
|
|
7205
|
+
/**
|
|
7206
|
+
* The config init writes. With the `resources` init set up, it names them;
|
|
7207
|
+
* without them, as the agent scaffold writes it, it reads them from the
|
|
7208
|
+
* environment. Either way it signs in with each person's own Google
|
|
7209
|
+
* credentials (ADC), so it reads no secret.
|
|
7210
|
+
*/
|
|
7211
|
+
const getConfigScaffold = (build, resources) => {
|
|
7212
|
+
const projectId = resources === void 0 ? "process.env.HOT_UPDATER_FIREBASE_PROJECT_ID!" : JSON.stringify(resources.projectId);
|
|
7206
7213
|
const storageConfig = {
|
|
7207
7214
|
imports: [{
|
|
7208
7215
|
pkg: "@hot-updater/firebase",
|
|
7209
7216
|
named: ["firebaseStorage"]
|
|
7210
7217
|
}],
|
|
7211
7218
|
configString: `firebaseStorage({
|
|
7212
|
-
projectId:
|
|
7213
|
-
storageBucket: process.env.HOT_UPDATER_FIREBASE_STORAGE_BUCKET
|
|
7219
|
+
projectId: ${projectId},
|
|
7220
|
+
storageBucket: ${resources === void 0 ? "process.env.HOT_UPDATER_FIREBASE_STORAGE_BUCKET!" : JSON.stringify(resources.storageBucket)},
|
|
7214
7221
|
credential,
|
|
7215
7222
|
})`
|
|
7216
7223
|
};
|
|
@@ -7220,8 +7227,8 @@ const getConfigScaffold = (build) => {
|
|
|
7220
7227
|
named: ["firebaseDatabase"]
|
|
7221
7228
|
}],
|
|
7222
7229
|
configString: `firebaseDatabase({
|
|
7223
|
-
projectId:
|
|
7224
|
-
databaseId: process.env.HOT_UPDATER_FIREBASE_DATABASE_ID,
|
|
7230
|
+
projectId: ${projectId},
|
|
7231
|
+
databaseId: ${resources === void 0 ? "process.env.HOT_UPDATER_FIREBASE_DATABASE_ID" : JSON.stringify(resources.databaseId)},
|
|
7225
7232
|
credential,
|
|
7226
7233
|
})`
|
|
7227
7234
|
};
|
|
@@ -7315,7 +7322,11 @@ const setEnv = async ({ applicationCredentials, databaseId, projectId, storageBu
|
|
|
7315
7322
|
HOT_UPDATER_FIREBASE_STORAGE_BUCKET: storageBucket
|
|
7316
7323
|
}, ".env.hotupdater", { preserveKeys: applicationCredentials ? [] : [initProvider.inputs.applicationCredentials.envKey] });
|
|
7317
7324
|
_hot_updater_cli_tools.p.log.success("Firebase credentials have been successfully configured.");
|
|
7318
|
-
await (0, _hot_updater_cli_tools.writeHotUpdaterFiles)(getConfigScaffold(build
|
|
7325
|
+
await (0, _hot_updater_cli_tools.writeHotUpdaterFiles)(getConfigScaffold(build, {
|
|
7326
|
+
projectId,
|
|
7327
|
+
storageBucket,
|
|
7328
|
+
databaseId
|
|
7329
|
+
}), {
|
|
7319
7330
|
cwd: process.cwd(),
|
|
7320
7331
|
settings: "Firebase"
|
|
7321
7332
|
});
|
|
@@ -7744,9 +7755,9 @@ const checkIfGcloudCliInstalled = async () => {
|
|
|
7744
7755
|
return false;
|
|
7745
7756
|
}
|
|
7746
7757
|
};
|
|
7747
|
-
const runInit = async ({ build, envFile }) => {
|
|
7758
|
+
const runInit = async ({ build, envFile, secretsEnv }) => {
|
|
7748
7759
|
const nonInteractive = envFile !== void 0;
|
|
7749
|
-
const initEnvSources = await (0, _hot_updater_cli_tools.readHotUpdaterInitEnv)(process.cwd(), envFile);
|
|
7760
|
+
const initEnvSources = await (0, _hot_updater_cli_tools.readHotUpdaterInitEnv)(process.cwd(), envFile, secretsEnv);
|
|
7750
7761
|
const { managedEnv } = initEnvSources;
|
|
7751
7762
|
const initInputEnv = (0, _hot_updater_cli_tools.getHotUpdaterInitInputEnv)(initEnvSources, nonInteractive);
|
|
7752
7763
|
const savedInputs = resolveFirebaseInitInputs(initInputEnv);
|
package/dist/init/index.d.cts
CHANGED
|
@@ -86,6 +86,6 @@ declare const mergeIndexes: (originalIndexes: {
|
|
|
86
86
|
};
|
|
87
87
|
/** Points the template's `firebase.json` at the database init sets up. */
|
|
88
88
|
declare const setFirestoreDatabase: (cwd: string, databaseId: string) => Promise<void>;
|
|
89
|
-
declare const runInit: ({ build, envFile }: RunInitOptions) => Promise<void>;
|
|
89
|
+
declare const runInit: ({ build, envFile, secretsEnv }: RunInitOptions) => Promise<void>;
|
|
90
90
|
//#endregion
|
|
91
91
|
export { initProvider, mergeIndexes, runInit, setFirestoreDatabase };
|
package/dist/init/index.d.mts
CHANGED
|
@@ -86,6 +86,6 @@ declare const mergeIndexes: (originalIndexes: {
|
|
|
86
86
|
};
|
|
87
87
|
/** Points the template's `firebase.json` at the database init sets up. */
|
|
88
88
|
declare const setFirestoreDatabase: (cwd: string, databaseId: string) => Promise<void>;
|
|
89
|
-
declare const runInit: ({ build, envFile }: RunInitOptions) => Promise<void>;
|
|
89
|
+
declare const runInit: ({ build, envFile, secretsEnv }: RunInitOptions) => Promise<void>;
|
|
90
90
|
//#endregion
|
|
91
91
|
export { initProvider, mergeIndexes, runInit, setFirestoreDatabase };
|
package/dist/init/index.mjs
CHANGED
|
@@ -7195,15 +7195,22 @@ const prepareFirebaseTemplate = async (firebaseRootDir) => {
|
|
|
7195
7195
|
};
|
|
7196
7196
|
//#endregion
|
|
7197
7197
|
//#region iac/configTemplate.ts
|
|
7198
|
-
|
|
7198
|
+
/**
|
|
7199
|
+
* The config init writes. With the `resources` init set up, it names them;
|
|
7200
|
+
* without them, as the agent scaffold writes it, it reads them from the
|
|
7201
|
+
* environment. Either way it signs in with each person's own Google
|
|
7202
|
+
* credentials (ADC), so it reads no secret.
|
|
7203
|
+
*/
|
|
7204
|
+
const getConfigScaffold = (build, resources) => {
|
|
7205
|
+
const projectId = resources === void 0 ? "process.env.HOT_UPDATER_FIREBASE_PROJECT_ID!" : JSON.stringify(resources.projectId);
|
|
7199
7206
|
const storageConfig = {
|
|
7200
7207
|
imports: [{
|
|
7201
7208
|
pkg: "@hot-updater/firebase",
|
|
7202
7209
|
named: ["firebaseStorage"]
|
|
7203
7210
|
}],
|
|
7204
7211
|
configString: `firebaseStorage({
|
|
7205
|
-
projectId:
|
|
7206
|
-
storageBucket: process.env.HOT_UPDATER_FIREBASE_STORAGE_BUCKET
|
|
7212
|
+
projectId: ${projectId},
|
|
7213
|
+
storageBucket: ${resources === void 0 ? "process.env.HOT_UPDATER_FIREBASE_STORAGE_BUCKET!" : JSON.stringify(resources.storageBucket)},
|
|
7207
7214
|
credential,
|
|
7208
7215
|
})`
|
|
7209
7216
|
};
|
|
@@ -7213,8 +7220,8 @@ const getConfigScaffold = (build) => {
|
|
|
7213
7220
|
named: ["firebaseDatabase"]
|
|
7214
7221
|
}],
|
|
7215
7222
|
configString: `firebaseDatabase({
|
|
7216
|
-
projectId:
|
|
7217
|
-
databaseId: process.env.HOT_UPDATER_FIREBASE_DATABASE_ID,
|
|
7223
|
+
projectId: ${projectId},
|
|
7224
|
+
databaseId: ${resources === void 0 ? "process.env.HOT_UPDATER_FIREBASE_DATABASE_ID" : JSON.stringify(resources.databaseId)},
|
|
7218
7225
|
credential,
|
|
7219
7226
|
})`
|
|
7220
7227
|
};
|
|
@@ -7308,7 +7315,11 @@ const setEnv = async ({ applicationCredentials, databaseId, projectId, storageBu
|
|
|
7308
7315
|
HOT_UPDATER_FIREBASE_STORAGE_BUCKET: storageBucket
|
|
7309
7316
|
}, ".env.hotupdater", { preserveKeys: applicationCredentials ? [] : [initProvider.inputs.applicationCredentials.envKey] });
|
|
7310
7317
|
p.log.success("Firebase credentials have been successfully configured.");
|
|
7311
|
-
await writeHotUpdaterFiles(getConfigScaffold(build
|
|
7318
|
+
await writeHotUpdaterFiles(getConfigScaffold(build, {
|
|
7319
|
+
projectId,
|
|
7320
|
+
storageBucket,
|
|
7321
|
+
databaseId
|
|
7322
|
+
}), {
|
|
7312
7323
|
cwd: process.cwd(),
|
|
7313
7324
|
settings: "Firebase"
|
|
7314
7325
|
});
|
|
@@ -7737,9 +7748,9 @@ const checkIfGcloudCliInstalled = async () => {
|
|
|
7737
7748
|
return false;
|
|
7738
7749
|
}
|
|
7739
7750
|
};
|
|
7740
|
-
const runInit = async ({ build, envFile }) => {
|
|
7751
|
+
const runInit = async ({ build, envFile, secretsEnv }) => {
|
|
7741
7752
|
const nonInteractive = envFile !== void 0;
|
|
7742
|
-
const initEnvSources = await readHotUpdaterInitEnv(process.cwd(), envFile);
|
|
7753
|
+
const initEnvSources = await readHotUpdaterInitEnv(process.cwd(), envFile, secretsEnv);
|
|
7743
7754
|
const { managedEnv } = initEnvSources;
|
|
7744
7755
|
const initInputEnv = getHotUpdaterInitInputEnv(initEnvSources, nonInteractive);
|
|
7745
7756
|
const savedInputs = resolveFirebaseInitInputs(initInputEnv);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/firebase",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.0-rc.
|
|
4
|
+
"version": "1.2.0-rc.5",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"types": "dist/index.d.cts",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"hono": "4.12.34",
|
|
40
40
|
"google-auth-library": "10.7.0",
|
|
41
|
-
"@hot-updater/cli-tools": "1.2.0-rc.
|
|
42
|
-
"@hot-updater/
|
|
43
|
-
"@hot-updater/
|
|
44
|
-
"@hot-updater/
|
|
41
|
+
"@hot-updater/cli-tools": "1.2.0-rc.5",
|
|
42
|
+
"@hot-updater/plugin-core": "1.2.0-rc.5",
|
|
43
|
+
"@hot-updater/server": "1.2.0-rc.5",
|
|
44
|
+
"@hot-updater/protocol": "1.2.0-rc.5"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"firebase-tools": "15.29.0",
|
|
57
57
|
"fkill": "^9.0.0",
|
|
58
58
|
"mime": "^4.0.4",
|
|
59
|
-
"@hot-updater/mock": "1.2.0-rc.
|
|
60
|
-
"@hot-updater/test-utils": "1.2.0-rc.
|
|
59
|
+
"@hot-updater/mock": "1.2.0-rc.5",
|
|
60
|
+
"@hot-updater/test-utils": "1.2.0-rc.5"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"firebase-admin": ">=11.10.0",
|