mirror of
https://github.com/pesde-pkg/pesde.git
synced 2025-04-10 22:00:55 +01:00
feat: switch lib & cli to v1 api
Some checks failed
Debug / Get build version (push) Has been cancelled
Test & Lint / lint (push) Has been cancelled
Debug / Build for linux-x86_64 (push) Has been cancelled
Debug / Build for macos-aarch64 (push) Has been cancelled
Debug / Build for macos-x86_64 (push) Has been cancelled
Debug / Build for windows-x86_64 (push) Has been cancelled
Some checks failed
Debug / Get build version (push) Has been cancelled
Test & Lint / lint (push) Has been cancelled
Debug / Build for linux-x86_64 (push) Has been cancelled
Debug / Build for macos-aarch64 (push) Has been cancelled
Debug / Build for macos-x86_64 (push) Has been cancelled
Debug / Build for windows-x86_64 (push) Has been cancelled
This commit is contained in:
parent
1eef6078bf
commit
d4979bbdb2
7 changed files with 8 additions and 8 deletions
|
@ -1,2 +1,2 @@
|
||||||
PUBLIC_REGISTRY_URL= # url of the registry API, this must have a trailing slash and include the version
|
PUBLIC_REGISTRY_URL= # url of the registry API, this must have a trailing slash and include the version
|
||||||
# example: https://registry.pesde.daimond113.com/v0/
|
# example: https://registry.pesde.daimond113.com/v1/
|
|
@ -23,7 +23,7 @@ the following content:
|
||||||
api = "https://registry.acme.local/"
|
api = "https://registry.acme.local/"
|
||||||
|
|
||||||
# package download URL (optional)
|
# package download URL (optional)
|
||||||
download = "{API_URL}/v0/packages/{PACKAGE}/{PACKAGE_VERSION}/{PACKAGE_TARGET}/archive"
|
download = "{API_URL}/v1/packages/{PACKAGE}/{PACKAGE_VERSION}/{PACKAGE_TARGET}/archive"
|
||||||
|
|
||||||
# the client ID of the GitHub OAuth app (optional)
|
# the client ID of the GitHub OAuth app (optional)
|
||||||
github_oauth_client_id = "a1d648966fdfbdcd9295"
|
github_oauth_client_id = "a1d648966fdfbdcd9295"
|
||||||
|
@ -58,7 +58,7 @@ scripts_packages = ["pesde/scripts_rojo"]
|
||||||
- `{PACKAGE_VERSION}`: The package version.
|
- `{PACKAGE_VERSION}`: The package version.
|
||||||
- `{PACKAGE_TARGET}`: The package target.
|
- `{PACKAGE_TARGET}`: The package target.
|
||||||
|
|
||||||
Defaults to `{API_URL}/v0/packages/{PACKAGE}/{PACKAGE_VERSION}/{PACKAGE_TARGET}/archive`.
|
Defaults to `{API_URL}/v1/packages/{PACKAGE}/{PACKAGE_VERSION}/{PACKAGE_TARGET}/archive`.
|
||||||
|
|
||||||
- **github_oauth_client_id**: This is required if you use GitHub OAuth for
|
- **github_oauth_client_id**: This is required if you use GitHub OAuth for
|
||||||
authentication. See below for more information.
|
authentication. See below for more information.
|
||||||
|
|
|
@ -53,7 +53,7 @@ impl DeprecateCommand {
|
||||||
Method::PUT
|
Method::PUT
|
||||||
},
|
},
|
||||||
format!(
|
format!(
|
||||||
"{}/v0/packages/{}/deprecate",
|
"{}/v1/packages/{}/deprecate",
|
||||||
config.api(),
|
config.api(),
|
||||||
urlencoding::encode(&self.package.to_string()),
|
urlencoding::encode(&self.package.to_string()),
|
||||||
),
|
),
|
||||||
|
|
|
@ -677,7 +677,7 @@ info: otherwise, the file was deemed unnecessary, if you don't understand why, p
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut request = reqwest
|
let mut request = reqwest
|
||||||
.post(format!("{}/v0/packages", config.api()))
|
.post(format!("{}/v1/packages", config.api()))
|
||||||
.body(archive);
|
.body(archive);
|
||||||
|
|
||||||
if let Some(token) = project.auth_config().tokens().get(index_url) {
|
if let Some(token) = project.auth_config().tokens().get(index_url) {
|
||||||
|
|
|
@ -108,7 +108,7 @@ impl YankCommand {
|
||||||
Method::PUT
|
Method::PUT
|
||||||
},
|
},
|
||||||
format!(
|
format!(
|
||||||
"{}/v0/packages/{}/{}/{}/yank",
|
"{}/v1/packages/{}/{}/{}/yank",
|
||||||
config.api(),
|
config.api(),
|
||||||
urlencoding::encode(&package.to_string()),
|
urlencoding::encode(&package.to_string()),
|
||||||
urlencoding::encode(&version.to_string()),
|
urlencoding::encode(&version.to_string()),
|
||||||
|
|
|
@ -412,7 +412,7 @@ impl IndexConfig {
|
||||||
pub fn download(&self) -> String {
|
pub fn download(&self) -> String {
|
||||||
self.download
|
self.download
|
||||||
.as_deref()
|
.as_deref()
|
||||||
.unwrap_or("{API_URL}/v0/packages/{PACKAGE}/{PACKAGE_VERSION}/{PACKAGE_TARGET}/archive")
|
.unwrap_or("{API_URL}/v1/packages/{PACKAGE}/{PACKAGE_VERSION}/{PACKAGE_TARGET}/archive")
|
||||||
.replace("{API_URL}", self.api())
|
.replace("{API_URL}", self.api())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ compatibility_date = "2024-11-30"
|
||||||
pages_build_output_dir = ".svelte-kit/cloudflare"
|
pages_build_output_dir = ".svelte-kit/cloudflare"
|
||||||
|
|
||||||
[vars]
|
[vars]
|
||||||
PUBLIC_REGISTRY_URL = "https://registry.pesde.daimond113.com/v0/"
|
PUBLIC_REGISTRY_URL = "https://registry.pesde.daimond113.com/v1/"
|
||||||
|
|
||||||
[observability]
|
[observability]
|
||||||
enabled = true
|
enabled = true
|
||||||
|
|
Loading…
Add table
Reference in a new issue