Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Jan 6, 2025
1 parent 0024fae commit 2865610
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 80 deletions.
20 changes: 0 additions & 20 deletions Target/Function/Delete.d.ts
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;
}>;
1 change: 0 additions & 1 deletion Target/Function/Delete.js
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};
24 changes: 0 additions & 24 deletions Target/Function/Deployment.d.ts
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;
1 change: 0 additions & 1 deletion Target/Function/Deployment.js
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};
23 changes: 0 additions & 23 deletions Target/Function/Project.d.ts
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;
1 change: 0 additions & 1 deletion Target/Function/Project.js
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};
2 changes: 1 addition & 1 deletion Target/Function/Worker.d.ts
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;
12 changes: 3 additions & 9 deletions Target/Variable/Environment.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
export declare const string: (params?: ({
errorMap?: import("zod").ZodErrorMap | undefined;
invalid_type_error?: string | undefined;
required_error?: string | undefined;
message?: string | undefined;
description?: string | undefined;
} & {
coerce?: true | undefined;
}) | undefined) => import("zod").ZodString;
export declare const string: (params?: import("zod").RawCreateParams & {
coerce?: true;
}) => import("zod").ZodString;
declare const _default: import("zod").ZodObject<{
Email: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
ID: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
Expand Down

0 comments on commit 2865610

Please sign in to comment.