Skip to content

Commit a1625a9

Browse files
authored
fix: bring back decorator flag in bundle command (#538)
1 parent 0acdf1b commit a1625a9

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

cli/src/flags.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,14 @@ fn get_bundle_command() -> Command {
304304
.arg(
305305
arg!(--"import-map" <Path>).help("(DEPRECATED) Path to import map file"),
306306
)
307+
.arg(
308+
arg!(--"decorator" <TYPE>)
309+
.help(concat!(
310+
"(DEPRECATED) Type of decorator to use on the main worker and event worker. ",
311+
"If not specified, the decorator feature is disabled."
312+
))
313+
.value_parser(["tc39", "typescript", "typescript_with_metadata"]),
314+
)
307315
.arg(
308316
arg!(--"checksum" <KIND>)
309317
.env("EDGE_RUNTIME_BUNDLE_CHECKSUM")

cli/src/main.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,13 +272,27 @@ fn main() -> Result<ExitCode, anyhow::Error> {
272272
sub_matches.get_one::<String>("output").cloned().unwrap();
273273
let import_map_path =
274274
sub_matches.get_one::<String>("import-map").cloned();
275+
let decorator = sub_matches.get_one::<String>("decorator").cloned();
275276
let static_patterns =
276277
if let Some(val_ref) = sub_matches.get_many::<String>("static") {
277278
val_ref.map(|s| s.as_str()).collect::<Vec<&str>>()
278279
} else {
279280
vec![]
280281
};
281282

283+
if import_map_path.is_some() {
284+
warn!(concat!(
285+
"Specifying import_map through flags is no longer supported. ",
286+
"Please use deno.json instead."
287+
))
288+
}
289+
if decorator.is_some() {
290+
warn!(concat!(
291+
"Specifying decorator through flags is no longer supported. ",
292+
"Please use deno.json instead."
293+
))
294+
}
295+
282296
let entrypoint_script_path = sub_matches
283297
.get_one::<String>("entrypoint")
284298
.cloned()

0 commit comments

Comments
 (0)