@hot-updater/vercel 1.2.0-rc.3 → 1.2.0-rc.30

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/index.cjs CHANGED
@@ -69,9 +69,17 @@ const access = "private";
69
69
  * that expire, so the store's objects never sit at a public address.
70
70
  */
71
71
  const vercelBlobStorage = (config) => {
72
- const { token } = config;
73
- let store;
74
- const storeId = () => store ??= storeIdOf(token);
72
+ let resolved;
73
+ const store = () => resolved ??= (async () => {
74
+ const token = typeof config.token === "function" ? await config.token() : config.token;
75
+ return {
76
+ token,
77
+ storeId: storeIdOf(token)
78
+ };
79
+ })().catch((error) => {
80
+ resolved = void 0;
81
+ throw error;
82
+ });
75
83
  const normalizedBasePath = config.basePath?.replace(/^\/+|\/+$/g, "") ?? "";
76
84
  const getStorageKey = (0, _hot_updater_plugin_core.createStorageKeyBuilder)(normalizedBasePath);
77
85
  const expiresIn = config.signedUrlExpiresIn ?? 3600;
@@ -82,6 +90,7 @@ const vercelBlobStorage = (config) => {
82
90
  const delegationUntil = async (validUntil) => {
83
91
  const current = await delegation?.catch(() => void 0);
84
92
  if (current !== void 0 && current.validUntil >= validUntil) return current;
93
+ const { token } = await store();
85
94
  const issued = (0, _vercel_blob.issueSignedToken)({
86
95
  token,
87
96
  operations: ["get"],
@@ -90,10 +99,14 @@ const vercelBlobStorage = (config) => {
90
99
  delegation = issued;
91
100
  return issued;
92
101
  };
93
- const parseAndValidate = (storageUri) => {
102
+ const parseAndValidate = async (storageUri) => {
94
103
  const parsed = (0, _hot_updater_plugin_core.parseStorageUri)(storageUri, PROTOCOL);
95
- if (parsed.bucket !== storeId()) throw new Error(`Blob store mismatch: expected "${storeId()}", but found "${parsed.bucket}".`);
96
- return parsed;
104
+ const { token, storeId } = await store();
105
+ if (parsed.bucket !== storeId) throw new Error(`Blob store mismatch: expected "${storeId}", but found "${parsed.bucket}".`);
106
+ return {
107
+ ...parsed,
108
+ token
109
+ };
97
110
  };
98
111
  const getListPrefix = (prefix = "") => {
99
112
  const value = [normalizedBasePath, prefix.replace(/^\/+|\/+$/g, "")].filter(Boolean).join("/");
@@ -109,9 +122,10 @@ const vercelBlobStorage = (config) => {
109
122
  protocol: PROTOCOL,
110
123
  async put({ key, body, contentLength, contentType }) {
111
124
  const storageKey = getStorageKey(key);
125
+ const { token, storeId } = await store();
112
126
  const storageUri = (0, _hot_updater_plugin_core.createStorageUri)({
113
127
  protocol: PROTOCOL,
114
- bucket: storeId(),
128
+ bucket: storeId,
115
129
  key: storageKey
116
130
  });
117
131
  await (0, _vercel_blob.put)(toPathname(storageKey), body, {
@@ -126,7 +140,7 @@ const vercelBlobStorage = (config) => {
126
140
  return { storageUri };
127
141
  },
128
142
  async get({ storageUri }) {
129
- const { key } = parseAndValidate(storageUri);
143
+ const { key, token } = await parseAndValidate(storageUri);
130
144
  const result = await (0, _vercel_blob.get)(toPathname(key), {
131
145
  access,
132
146
  token,
@@ -140,7 +154,7 @@ const vercelBlobStorage = (config) => {
140
154
  } }) };
141
155
  },
142
156
  async getDownloadUrl({ storageUri }) {
143
- const { key } = parseAndValidate(storageUri);
157
+ const { key } = await parseAndValidate(storageUri);
144
158
  const pathname = toPathname(key);
145
159
  const validUntil = Date.now() + expiresInMs;
146
160
  const { presignedUrl } = await (0, _vercel_blob.presignUrl)(await delegationUntil(validUntil), {
@@ -152,7 +166,7 @@ const vercelBlobStorage = (config) => {
152
166
  return { url: presignedUrl };
153
167
  },
154
168
  async exists({ storageUri }) {
155
- const { key } = parseAndValidate(storageUri);
169
+ const { key, token } = await parseAndValidate(storageUri);
156
170
  try {
157
171
  await (0, _vercel_blob.head)(toPathname(key), { token });
158
172
  return { exists: true };
@@ -162,11 +176,12 @@ const vercelBlobStorage = (config) => {
162
176
  }
163
177
  },
164
178
  async delete({ storageUri }) {
165
- const { key } = parseAndValidate(storageUri);
179
+ const { key, token } = await parseAndValidate(storageUri);
166
180
  await (0, _vercel_blob.del)(toPathname(key), { token });
167
181
  return { deleted: true };
168
182
  },
169
183
  async listObjects(prefix) {
184
+ const { token, storeId } = await store();
170
185
  const objects = [];
171
186
  let cursor;
172
187
  do {
@@ -183,7 +198,7 @@ const vercelBlobStorage = (config) => {
183
198
  try {
184
199
  storageUri = (0, _hot_updater_plugin_core.createStorageUri)({
185
200
  protocol: PROTOCOL,
186
- bucket: storeId(),
201
+ bucket: storeId,
187
202
  key
188
203
  });
189
204
  } catch {
@@ -201,6 +216,7 @@ const vercelBlobStorage = (config) => {
201
216
  return objects;
202
217
  },
203
218
  async deleteObjects(relativeKeys) {
219
+ const { token } = await store();
204
220
  const pathnames = relativeKeys.map((key) => toPathname(getStorageKey(key)));
205
221
  for (let offset = 0; offset < pathnames.length; offset += DELETE_BATCH_SIZE) await (0, _vercel_blob.del)(pathnames.slice(offset, offset + DELETE_BATCH_SIZE), { token });
206
222
  }
package/dist/index.d.cts CHANGED
@@ -1,12 +1,15 @@
1
- import { StorageAdapterWith } from "@hot-updater/plugin-core";
1
+ import { Lazy, StorageAdapterWith } from "@hot-updater/plugin-core";
2
2
  import { PostgresConfig, postgres } from "@hot-updater/postgres";
3
3
  //#region src/vercelBlobStorage.d.ts
4
4
  interface VercelBlobStorageConfig {
5
5
  /**
6
6
  * The Blob store's read-write token, `vercel_blob_rw_<storeId>_<secret>`:
7
- * the `BLOB_READ_WRITE_TOKEN` Vercel adds to a project the store connects to.
7
+ * the `BLOB_READ_WRITE_TOKEN` Vercel adds to a project the store connects
8
+ * to. Or a function that returns it, such as `secret("<name>")` in
9
+ * `hot-updater.config.ts`: called on first use, so a config loads without
10
+ * the token.
8
11
  */
9
- token: string;
12
+ token: Lazy<string>;
10
13
  /** Base path where bundles will be stored in the store. */
11
14
  basePath?: string;
12
15
  /**
package/dist/index.d.mts CHANGED
@@ -1,12 +1,15 @@
1
- import { StorageAdapterWith } from "@hot-updater/plugin-core";
1
+ import { Lazy, StorageAdapterWith } from "@hot-updater/plugin-core";
2
2
  import { PostgresConfig, postgres } from "@hot-updater/postgres";
3
3
  //#region src/vercelBlobStorage.d.ts
4
4
  interface VercelBlobStorageConfig {
5
5
  /**
6
6
  * The Blob store's read-write token, `vercel_blob_rw_<storeId>_<secret>`:
7
- * the `BLOB_READ_WRITE_TOKEN` Vercel adds to a project the store connects to.
7
+ * the `BLOB_READ_WRITE_TOKEN` Vercel adds to a project the store connects
8
+ * to. Or a function that returns it, such as `secret("<name>")` in
9
+ * `hot-updater.config.ts`: called on first use, so a config loads without
10
+ * the token.
8
11
  */
9
- token: string;
12
+ token: Lazy<string>;
10
13
  /** Base path where bundles will be stored in the store. */
11
14
  basePath?: string;
12
15
  /**
package/dist/index.mjs CHANGED
@@ -68,9 +68,17 @@ const access = "private";
68
68
  * that expire, so the store's objects never sit at a public address.
69
69
  */
70
70
  const vercelBlobStorage = (config) => {
71
- const { token } = config;
72
- let store;
73
- const storeId = () => store ??= storeIdOf(token);
71
+ let resolved;
72
+ const store = () => resolved ??= (async () => {
73
+ const token = typeof config.token === "function" ? await config.token() : config.token;
74
+ return {
75
+ token,
76
+ storeId: storeIdOf(token)
77
+ };
78
+ })().catch((error) => {
79
+ resolved = void 0;
80
+ throw error;
81
+ });
74
82
  const normalizedBasePath = config.basePath?.replace(/^\/+|\/+$/g, "") ?? "";
75
83
  const getStorageKey = createStorageKeyBuilder(normalizedBasePath);
76
84
  const expiresIn = config.signedUrlExpiresIn ?? 3600;
@@ -81,6 +89,7 @@ const vercelBlobStorage = (config) => {
81
89
  const delegationUntil = async (validUntil) => {
82
90
  const current = await delegation?.catch(() => void 0);
83
91
  if (current !== void 0 && current.validUntil >= validUntil) return current;
92
+ const { token } = await store();
84
93
  const issued = issueSignedToken({
85
94
  token,
86
95
  operations: ["get"],
@@ -89,10 +98,14 @@ const vercelBlobStorage = (config) => {
89
98
  delegation = issued;
90
99
  return issued;
91
100
  };
92
- const parseAndValidate = (storageUri) => {
101
+ const parseAndValidate = async (storageUri) => {
93
102
  const parsed = parseStorageUri(storageUri, PROTOCOL);
94
- if (parsed.bucket !== storeId()) throw new Error(`Blob store mismatch: expected "${storeId()}", but found "${parsed.bucket}".`);
95
- return parsed;
103
+ const { token, storeId } = await store();
104
+ if (parsed.bucket !== storeId) throw new Error(`Blob store mismatch: expected "${storeId}", but found "${parsed.bucket}".`);
105
+ return {
106
+ ...parsed,
107
+ token
108
+ };
96
109
  };
97
110
  const getListPrefix = (prefix = "") => {
98
111
  const value = [normalizedBasePath, prefix.replace(/^\/+|\/+$/g, "")].filter(Boolean).join("/");
@@ -108,9 +121,10 @@ const vercelBlobStorage = (config) => {
108
121
  protocol: PROTOCOL,
109
122
  async put({ key, body, contentLength, contentType }) {
110
123
  const storageKey = getStorageKey(key);
124
+ const { token, storeId } = await store();
111
125
  const storageUri = createStorageUri({
112
126
  protocol: PROTOCOL,
113
- bucket: storeId(),
127
+ bucket: storeId,
114
128
  key: storageKey
115
129
  });
116
130
  await put(toPathname(storageKey), body, {
@@ -125,7 +139,7 @@ const vercelBlobStorage = (config) => {
125
139
  return { storageUri };
126
140
  },
127
141
  async get({ storageUri }) {
128
- const { key } = parseAndValidate(storageUri);
142
+ const { key, token } = await parseAndValidate(storageUri);
129
143
  const result = await get(toPathname(key), {
130
144
  access,
131
145
  token,
@@ -139,7 +153,7 @@ const vercelBlobStorage = (config) => {
139
153
  } }) };
140
154
  },
141
155
  async getDownloadUrl({ storageUri }) {
142
- const { key } = parseAndValidate(storageUri);
156
+ const { key } = await parseAndValidate(storageUri);
143
157
  const pathname = toPathname(key);
144
158
  const validUntil = Date.now() + expiresInMs;
145
159
  const { presignedUrl } = await presignUrl(await delegationUntil(validUntil), {
@@ -151,7 +165,7 @@ const vercelBlobStorage = (config) => {
151
165
  return { url: presignedUrl };
152
166
  },
153
167
  async exists({ storageUri }) {
154
- const { key } = parseAndValidate(storageUri);
168
+ const { key, token } = await parseAndValidate(storageUri);
155
169
  try {
156
170
  await head(toPathname(key), { token });
157
171
  return { exists: true };
@@ -161,11 +175,12 @@ const vercelBlobStorage = (config) => {
161
175
  }
162
176
  },
163
177
  async delete({ storageUri }) {
164
- const { key } = parseAndValidate(storageUri);
178
+ const { key, token } = await parseAndValidate(storageUri);
165
179
  await del(toPathname(key), { token });
166
180
  return { deleted: true };
167
181
  },
168
182
  async listObjects(prefix) {
183
+ const { token, storeId } = await store();
169
184
  const objects = [];
170
185
  let cursor;
171
186
  do {
@@ -182,7 +197,7 @@ const vercelBlobStorage = (config) => {
182
197
  try {
183
198
  storageUri = createStorageUri({
184
199
  protocol: PROTOCOL,
185
- bucket: storeId(),
200
+ bucket: storeId,
186
201
  key
187
202
  });
188
203
  } catch {
@@ -200,6 +215,7 @@ const vercelBlobStorage = (config) => {
200
215
  return objects;
201
216
  },
202
217
  async deleteObjects(relativeKeys) {
218
+ const { token } = await store();
203
219
  const pathnames = relativeKeys.map((key) => toPathname(getStorageKey(key)));
204
220
  for (let offset = 0; offset < pathnames.length; offset += DELETE_BATCH_SIZE) await del(pathnames.slice(offset, offset + DELETE_BATCH_SIZE), { token });
205
221
  }
@@ -6268,14 +6268,19 @@ createExeca(mapScriptAsync, {}, deepScriptOptions, setScriptSync);
6268
6268
  const { sendMessage, getOneMessage, getEachMessage, getCancelSignal } = getIpcExport();
6269
6269
  //#endregion
6270
6270
  //#region iac/configTemplate.ts
6271
+ /**
6272
+ * The config init and the agent scaffold write: the Blob token and the
6273
+ * database URL are read with `secret()`, from the environment and
6274
+ * `.env.hotupdater`, then the config's `secrets` adapter.
6275
+ */
6271
6276
  const getConfigScaffold = (build) => {
6272
- return (0, _hot_updater_cli_tools.createHotUpdaterConfigScaffoldFromBuilder)(new _hot_updater_cli_tools.ConfigBuilder().setBuildType(build).setStorage({
6277
+ const builder = new _hot_updater_cli_tools.ConfigBuilder().setBuildType(build).setStorage({
6273
6278
  imports: [{
6274
6279
  pkg: "@hot-updater/vercel",
6275
6280
  named: ["vercelBlobStorage"]
6276
6281
  }],
6277
6282
  configString: `vercelBlobStorage({
6278
- token: process.env.HOT_UPDATER_VERCEL_BLOB_READ_WRITE_TOKEN!,
6283
+ token: secret("HOT_UPDATER_VERCEL_BLOB_READ_WRITE_TOKEN"),
6279
6284
  })`
6280
6285
  }).setDatabase({
6281
6286
  imports: [{
@@ -6283,7 +6288,7 @@ const getConfigScaffold = (build) => {
6283
6288
  named: ["postgres"]
6284
6289
  }],
6285
6290
  configString: `postgres({
6286
- connectionString: process.env.HOT_UPDATER_VERCEL_DATABASE_URL!,
6291
+ connectionString: secret("HOT_UPDATER_VERCEL_DATABASE_URL"),
6287
6292
  })`
6288
6293
  }).setPlugins({
6289
6294
  imports: [{
@@ -6295,7 +6300,11 @@ const getConfigScaffold = (build) => {
6295
6300
  ]
6296
6301
  }],
6297
6302
  configString: "[apiKeys(), insights(), remoteConfig()]"
6298
- }));
6303
+ }).addImport({
6304
+ pkg: "hot-updater",
6305
+ named: ["secret"]
6306
+ });
6307
+ return (0, _hot_updater_cli_tools.createHotUpdaterConfigScaffoldFromBuilder)(builder);
6299
6308
  };
6300
6309
  //#endregion
6301
6310
  //#region iac/init/index.ts
@@ -6382,7 +6391,8 @@ const initProvider = {
6382
6391
  persistence: "with-consent",
6383
6392
  preflight: false
6384
6393
  }
6385
- }
6394
+ },
6395
+ secrets: ["HOT_UPDATER_VERCEL_BLOB_READ_WRITE_TOKEN", "HOT_UPDATER_VERCEL_DATABASE_URL"]
6386
6396
  };
6387
6397
  //#endregion
6388
6398
  //#region iac/vercelApi.ts
@@ -7002,10 +7012,10 @@ const selectDatabaseUrl = async ({ api, cwd, project, savedUrl, scope, token })
7002
7012
  validate: (value) => isPostgresUrl(value) ? void 0 : "Enter a postgres:// or postgresql:// URL."
7003
7013
  }));
7004
7014
  };
7005
- const runInit = async ({ build, envFile }) => {
7015
+ const runInit = async ({ build, envFile, secretsEnv }) => {
7006
7016
  const cwd = (0, _hot_updater_cli_tools.getCwd)();
7007
7017
  const nonInteractive = envFile !== void 0;
7008
- const initEnvSources = await (0, _hot_updater_cli_tools.readHotUpdaterInitEnv)(cwd, envFile);
7018
+ const initEnvSources = await (0, _hot_updater_cli_tools.readHotUpdaterInitEnv)(cwd, envFile, secretsEnv);
7009
7019
  const { managedEnv } = initEnvSources;
7010
7020
  const initInputEnv = (0, _hot_updater_cli_tools.getHotUpdaterInitInputEnv)(initEnvSources, nonInteractive);
7011
7021
  const saved = Object.fromEntries(Object.entries(inputs).map(([name, input]) => [name, initInputEnv[input.envKey]?.trim() || void 0]));
@@ -7142,8 +7152,7 @@ const runInit = async ({ build, envFile }) => {
7142
7152
  ...credential === void 0 ? {} : { credential },
7143
7153
  clientPlugins: server.clientPlugins
7144
7154
  });
7145
- _hot_updater_cli_tools.p.log.message(`Next step: ${(0, _hot_updater_cli_tools.link)("https://hot-updater.dev/docs/managed/vercel#step-3-add-hotupdater-to-your-project")}`);
7146
- _hot_updater_cli_tools.p.log.success("Done! 🎉");
7155
+ return { nextSteps: [(0, _hot_updater_cli_tools.link)("https://hot-updater.dev/docs/managed/vercel#step-3-add-hotupdater-to-your-project")] };
7147
7156
  };
7148
7157
  //#endregion
7149
7158
  exports.VERCEL_FUNCTION_CONFIG = VERCEL_FUNCTION_CONFIG;
@@ -1,4 +1,4 @@
1
- import { RunInitOptions } from "@hot-updater/cli-tools";
1
+ import { RunInitOptions, RunInitResult } from "@hot-updater/cli-tools";
2
2
  //#region iac/init/index.d.ts
3
3
  declare const initProvider: {
4
4
  readonly label: "Vercel Blob + Functions + Postgres";
@@ -68,6 +68,7 @@ declare const initProvider: {
68
68
  readonly preflight: false;
69
69
  };
70
70
  };
71
+ readonly secrets: readonly ["HOT_UPDATER_VERCEL_BLOB_READ_WRITE_TOKEN", "HOT_UPDATER_VERCEL_DATABASE_URL"];
71
72
  };
72
73
  //#endregion
73
74
  //#region iac/vercelFunction.d.ts
@@ -86,6 +87,6 @@ declare const VERCEL_FUNCTION_CONFIG: {
86
87
  };
87
88
  //#endregion
88
89
  //#region iac/index.d.ts
89
- declare const runInit: ({ build, envFile }: RunInitOptions) => Promise<void>;
90
+ declare const runInit: ({ build, envFile, secretsEnv }: RunInitOptions) => Promise<RunInitResult>;
90
91
  //#endregion
91
92
  export { VERCEL_FUNCTION_CONFIG, initProvider, runInit };
@@ -1,4 +1,4 @@
1
- import { RunInitOptions } from "@hot-updater/cli-tools";
1
+ import { RunInitOptions, RunInitResult } from "@hot-updater/cli-tools";
2
2
  //#region iac/init/index.d.ts
3
3
  declare const initProvider: {
4
4
  readonly label: "Vercel Blob + Functions + Postgres";
@@ -68,6 +68,7 @@ declare const initProvider: {
68
68
  readonly preflight: false;
69
69
  };
70
70
  };
71
+ readonly secrets: readonly ["HOT_UPDATER_VERCEL_BLOB_READ_WRITE_TOKEN", "HOT_UPDATER_VERCEL_DATABASE_URL"];
71
72
  };
72
73
  //#endregion
73
74
  //#region iac/vercelFunction.d.ts
@@ -86,6 +87,6 @@ declare const VERCEL_FUNCTION_CONFIG: {
86
87
  };
87
88
  //#endregion
88
89
  //#region iac/index.d.ts
89
- declare const runInit: ({ build, envFile }: RunInitOptions) => Promise<void>;
90
+ declare const runInit: ({ build, envFile, secretsEnv }: RunInitOptions) => Promise<RunInitResult>;
90
91
  //#endregion
91
92
  export { VERCEL_FUNCTION_CONFIG, initProvider, runInit };
@@ -6262,14 +6262,19 @@ createExeca(mapScriptAsync, {}, deepScriptOptions, setScriptSync);
6262
6262
  const { sendMessage, getOneMessage, getEachMessage, getCancelSignal } = getIpcExport();
6263
6263
  //#endregion
6264
6264
  //#region iac/configTemplate.ts
6265
+ /**
6266
+ * The config init and the agent scaffold write: the Blob token and the
6267
+ * database URL are read with `secret()`, from the environment and
6268
+ * `.env.hotupdater`, then the config's `secrets` adapter.
6269
+ */
6265
6270
  const getConfigScaffold = (build) => {
6266
- return createHotUpdaterConfigScaffoldFromBuilder(new ConfigBuilder().setBuildType(build).setStorage({
6271
+ const builder = new ConfigBuilder().setBuildType(build).setStorage({
6267
6272
  imports: [{
6268
6273
  pkg: "@hot-updater/vercel",
6269
6274
  named: ["vercelBlobStorage"]
6270
6275
  }],
6271
6276
  configString: `vercelBlobStorage({
6272
- token: process.env.HOT_UPDATER_VERCEL_BLOB_READ_WRITE_TOKEN!,
6277
+ token: secret("HOT_UPDATER_VERCEL_BLOB_READ_WRITE_TOKEN"),
6273
6278
  })`
6274
6279
  }).setDatabase({
6275
6280
  imports: [{
@@ -6277,7 +6282,7 @@ const getConfigScaffold = (build) => {
6277
6282
  named: ["postgres"]
6278
6283
  }],
6279
6284
  configString: `postgres({
6280
- connectionString: process.env.HOT_UPDATER_VERCEL_DATABASE_URL!,
6285
+ connectionString: secret("HOT_UPDATER_VERCEL_DATABASE_URL"),
6281
6286
  })`
6282
6287
  }).setPlugins({
6283
6288
  imports: [{
@@ -6289,7 +6294,11 @@ const getConfigScaffold = (build) => {
6289
6294
  ]
6290
6295
  }],
6291
6296
  configString: "[apiKeys(), insights(), remoteConfig()]"
6292
- }));
6297
+ }).addImport({
6298
+ pkg: "hot-updater",
6299
+ named: ["secret"]
6300
+ });
6301
+ return createHotUpdaterConfigScaffoldFromBuilder(builder);
6293
6302
  };
6294
6303
  //#endregion
6295
6304
  //#region iac/init/index.ts
@@ -6376,7 +6385,8 @@ const initProvider = {
6376
6385
  persistence: "with-consent",
6377
6386
  preflight: false
6378
6387
  }
6379
- }
6388
+ },
6389
+ secrets: ["HOT_UPDATER_VERCEL_BLOB_READ_WRITE_TOKEN", "HOT_UPDATER_VERCEL_DATABASE_URL"]
6380
6390
  };
6381
6391
  //#endregion
6382
6392
  //#region iac/vercelApi.ts
@@ -6996,10 +7006,10 @@ const selectDatabaseUrl = async ({ api, cwd, project, savedUrl, scope, token })
6996
7006
  validate: (value) => isPostgresUrl(value) ? void 0 : "Enter a postgres:// or postgresql:// URL."
6997
7007
  }));
6998
7008
  };
6999
- const runInit = async ({ build, envFile }) => {
7009
+ const runInit = async ({ build, envFile, secretsEnv }) => {
7000
7010
  const cwd = getCwd();
7001
7011
  const nonInteractive = envFile !== void 0;
7002
- const initEnvSources = await readHotUpdaterInitEnv(cwd, envFile);
7012
+ const initEnvSources = await readHotUpdaterInitEnv(cwd, envFile, secretsEnv);
7003
7013
  const { managedEnv } = initEnvSources;
7004
7014
  const initInputEnv = getHotUpdaterInitInputEnv(initEnvSources, nonInteractive);
7005
7015
  const saved = Object.fromEntries(Object.entries(inputs).map(([name, input]) => [name, initInputEnv[input.envKey]?.trim() || void 0]));
@@ -7136,8 +7146,7 @@ const runInit = async ({ build, envFile }) => {
7136
7146
  ...credential === void 0 ? {} : { credential },
7137
7147
  clientPlugins: server.clientPlugins
7138
7148
  });
7139
- p.log.message(`Next step: ${link("https://hot-updater.dev/docs/managed/vercel#step-3-add-hotupdater-to-your-project")}`);
7140
- p.log.success("Done! 🎉");
7149
+ return { nextSteps: [link("https://hot-updater.dev/docs/managed/vercel#step-3-add-hotupdater-to-your-project")] };
7141
7150
  };
7142
7151
  //#endregion
7143
7152
  export { VERCEL_FUNCTION_CONFIG, initProvider, runInit };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hot-updater/vercel",
3
3
  "type": "module",
4
- "version": "1.2.0-rc.3",
4
+ "version": "1.2.0-rc.30",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.mjs",
@@ -41,11 +41,11 @@
41
41
  "@vercel/cli-auth": "0.3.10",
42
42
  "@vercel/cli-config": "0.3.1",
43
43
  "pg": "8.13.1",
44
- "@hot-updater/cli-tools": "1.2.0-rc.3",
45
- "@hot-updater/postgres": "1.2.0-rc.3",
46
- "@hot-updater/protocol": "1.2.0-rc.3",
47
- "@hot-updater/plugin-core": "1.2.0-rc.3",
48
- "@hot-updater/server": "1.2.0-rc.3"
44
+ "@hot-updater/plugin-core": "1.2.0-rc.30",
45
+ "@hot-updater/server": "1.2.0-rc.30",
46
+ "@hot-updater/postgres": "1.2.0-rc.30",
47
+ "@hot-updater/cli-tools": "1.2.0-rc.30",
48
+ "@hot-updater/protocol": "1.2.0-rc.30"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/node": "^20",
@@ -54,7 +54,7 @@
54
54
  "execa": "9.5.2",
55
55
  "kysely": "0.28.17",
56
56
  "vitest": "4.1.4",
57
- "@hot-updater/test-utils": "1.2.0-rc.3"
57
+ "@hot-updater/test-utils": "1.2.0-rc.30"
58
58
  },
59
59
  "scripts": {
60
60
  "build": "tsdown",