-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0024fae
commit 2865610
Showing
8 changed files
with
4 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +0,0 @@ | ||
import type Interface from "../Interface/Delete.js"; | ||
/** | ||
* @module Delete | ||
* | ||
*/ | ||
declare const _default: Interface; | ||
export default _default; | ||
export declare const Environment: import("zod").ZodObject<{ | ||
Email: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>; | ||
ID: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>; | ||
Key: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
Email: string; | ||
ID: string; | ||
Key: string; | ||
}, { | ||
Email?: string | undefined; | ||
ID?: string | undefined; | ||
Key?: string | undefined; | ||
}>; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
var f=async(...[{Email:o,ID:e,Key:r}=p.parse(process.env)])=>{const t={"content-type":"application/json;charset=UTF-8","X-Auth-Email":o,"X-Auth-Key":r};t["X-Auth-Email"]=o??t["X-Auth-Email"],t["X-Auth-Key"]=r??t["X-Auth-Key"];const n=[];for(const{name:s}of await(await import("./Project.js")).default(e,t)??[])for(const{id:c,created_on:i}of(await(async a=>(await(await import("./Deployment.js")).default(e,a,t)).splice(0,500)??[])(s)).reverse())if((Date.now()-new Date(i))/864e5>7){try{await fetch(`${`https://api.cloudflare.com/client/v4/accounts/${e}/pages/projects/${s}/deployments`}/${c}`,{method:"DELETE",headers:t})}catch(a){console.log(a)}n.push(c)}return n};const{default:p}=await import("../Variable/Environment.js");export{p as Environment,f as default}; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +0,0 @@ | ||
import type { HeadersInit } from "@cloudflare/workers-types/experimental/index.js"; | ||
import type Environment from "../Type/Environment.js"; | ||
export type Type = { | ||
result: { | ||
created_on: Date; | ||
id: string; | ||
}[]; | ||
}; | ||
/** | ||
* The function `Deployment` makes an asynchronous request to the Cloudflare API to retrieve deployment | ||
* information for a specific project. | ||
* @param ID - The `ID` parameter is a string that represents the Cloudflare account ID. It is | ||
* used to identify the Cloudflare account for which the deployment is being made. | ||
* @param Project - The `Project` parameter is a string that represents the project ID or | ||
* name. It is used to specify the project for which you want to retrieve the deployments. | ||
* @param Header - The `Header` parameter is an object that represents the headers to be | ||
* included in the HTTP request. It should be of type `HeadersInit`, which is a type alias for `Headers | ||
* | string[][] | Record<string, string>`. | ||
*/ | ||
declare const _default: (ID: Environment["ID"], Project: string, Header: HeadersInit) => Promise<{ | ||
created_on: Date; | ||
id: string; | ||
}[]>; | ||
export default _default; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
var n=async(e,t,r)=>(await(await(await import("@cloudflare/workers-types/experimental/index.js")).fetch(`https://api.cloudflare.com/client/v4/accounts/${e}/pages/projects/${t}/deployments`,{headers:r})).json())?.result;export{n as default}; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +0,0 @@ | ||
import type { HeadersInit } from "@cloudflare/workers-types/experimental/index.js"; | ||
export type Type = { | ||
result: { | ||
id: string; | ||
name: string; | ||
}[]; | ||
}; | ||
/** | ||
* The function `Project` makes an asynchronous request to the Cloudflare API to fetch a | ||
* list of projects associated with a given account ID, using the provided headers. | ||
* @param ID - The ID parameter is a string that represents the account ID for | ||
* the Cloudflare API. It is used to specify which account's projects you want to | ||
* retrieve. | ||
* @param Header - The `Header` parameter is an object that represents the | ||
* headers to be included in the HTTP request. It should be of type `HeadersInit`, which | ||
* is a type alias for an object that can be used to initialize a `Headers` object. The | ||
* headers can include information such as authentication tokens, content | ||
*/ | ||
declare const _default: (ID: string, Header: HeadersInit) => Promise<{ | ||
id: string; | ||
name: string; | ||
}[]>; | ||
export default _default; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
var r=async(e,t)=>(await(await fetch(`https://api.cloudflare.com/client/v4/accounts/${e}/pages/projects`,{headers:t})).json())?.result;export{r as default}; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import type { ExportedHandler } from "@cloudflare/workers-types/experimental/index.js"; | ||
import type Environment from "../Type/Environment.js"; | ||
export declare const Delete: import("../Interface/Delete.js").default; | ||
export declare const Delete: any; | ||
declare const _default: ExportedHandler<Environment>; | ||
export default _default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters