mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
feat(unstable): define config in publish url (#22406)
This commit is contained in:
parent
e23fc6d88c
commit
981a19f067
1 changed files with 14 additions and 2 deletions
|
@ -68,6 +68,7 @@ struct PreparedPublishPackage {
|
|||
package: String,
|
||||
version: String,
|
||||
tarball: PublishableTarball,
|
||||
config: String,
|
||||
}
|
||||
|
||||
impl PreparedPublishPackage {
|
||||
|
@ -158,6 +159,13 @@ async fn prepare_publish(
|
|||
package: package_name.to_string(),
|
||||
version: version.to_string(),
|
||||
tarball,
|
||||
// the config file is always at the root of a publishing dir,
|
||||
// so getting the file name is always correct
|
||||
config: config_path
|
||||
.file_name()
|
||||
.unwrap()
|
||||
.to_string_lossy()
|
||||
.to_string(),
|
||||
}))
|
||||
}
|
||||
|
||||
|
@ -541,8 +549,12 @@ async fn publish_package(
|
|||
);
|
||||
|
||||
let url = format!(
|
||||
"{}scopes/{}/packages/{}/versions/{}",
|
||||
registry_api_url, package.scope, package.package, package.version
|
||||
"{}scopes/{}/packages/{}/versions/{}?config=/{}",
|
||||
registry_api_url,
|
||||
package.scope,
|
||||
package.package,
|
||||
package.version,
|
||||
package.config
|
||||
);
|
||||
|
||||
let response = client
|
||||
|
|
Loading…
Reference in a new issue