Skip to content

Commit eeba089

Browse files
committed
docs(target): document bundle target flow
1 parent dc92ece commit eeba089

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/bundle.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ type NormalizedBundleOptions = {
6161
sentryDist?: string;
6262
};
6363

64+
/** Parse a positive cache-size option expressed in megabytes. */
6465
function parseCacheMaxMb(value: unknown): number | undefined {
6566
const parsed = typeof value === 'string' ? Number(value) : (value as number);
6667
return Number.isFinite(parsed) && parsed > 0 ? parsed : undefined;
@@ -82,6 +83,7 @@ export type PublishBundlePayload = {
8283
hermesBase?: HermesBaseMeta;
8384
};
8485

86+
/** Read either spelling of an aliased optional CLI string option. */
8587
function getAliasedOptionalStringOption(
8688
options: Record<string, unknown>,
8789
key: string,
@@ -93,6 +95,7 @@ function getAliasedOptionalStringOption(
9395
);
9496
}
9597

98+
/** Normalize translated CLI values into the bundle command's typed options. */
9699
export function normalizeBundleOptions(
97100
translatedOptions: Record<string, unknown>,
98101
platform: string,
@@ -166,6 +169,7 @@ export function normalizeBundleOptions(
166169
};
167170
}
168171

172+
/** Upload generated Sentry artifacts when the detected plugin requires them. */
169173
async function uploadSentryArtifactsIfNeeded(
170174
shouldUpload: boolean,
171175
bundleName: string,
@@ -188,6 +192,7 @@ async function uploadSentryArtifactsIfNeeded(
188192
);
189193
}
190194

195+
/** Build the version publish request while preserving its resolved app target. */
191196
export function createPublishBundleRequest(
192197
outputPath: string,
193198
platform: Platform,
@@ -205,6 +210,7 @@ export function createPublishBundleRequest(
205210
};
206211
}
207212

213+
/** Publish a packed bundle through the version command implementation. */
208214
async function publishBundleVersion(
209215
outputPath: string,
210216
platform: Platform,
@@ -216,6 +222,7 @@ async function publishBundleVersion(
216222
}
217223

218224
export const bundleCommands = {
225+
/** Build a bundle and optionally publish it to one operation-scoped app. */
219226
bundle: async ({
220227
options,
221228
}: {

0 commit comments

Comments
 (0)