@theholocron/holocron-plugin-cloudflare 5.0.0-alpha.115 → 5.0.0-alpha.116
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -11
- package/dist/index.mjs +2 -1
- package/package.json +5 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthError, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordRequest, ResolveTokenInput, WikiProxyConfig, Workers } from "@theholocron/cli";
|
|
1
|
+
import { AuthError, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordRequest, ResolveTokenInput, VerifyTokenFailure, VerifyTokenResult, VerifyTokenResult as VerifyTokenResult$1, VerifyTokenSuccess, WikiProxyConfig, Workers } from "@theholocron/cli";
|
|
2
2
|
import { CloudflareClient, CloudflareClient as CloudflareClient$1, CloudflareClientOptions, createCloudflareClient } from "@theholocron/cloudflare-client";
|
|
3
3
|
//#region src/auth.d.ts
|
|
4
4
|
declare const resolveToken: (input?: ResolveTokenInput) => string;
|
|
@@ -68,20 +68,11 @@ declare class CloudflareWorkers implements Workers {
|
|
|
68
68
|
}
|
|
69
69
|
//#endregion
|
|
70
70
|
//#region src/verify-token.d.ts
|
|
71
|
-
interface VerifyTokenSuccess {
|
|
72
|
-
ok: true;
|
|
73
|
-
subject: string;
|
|
74
|
-
}
|
|
75
|
-
interface VerifyTokenFailure {
|
|
76
|
-
ok: false;
|
|
77
|
-
message: string;
|
|
78
|
-
}
|
|
79
|
-
type VerifyTokenResult = VerifyTokenSuccess | VerifyTokenFailure;
|
|
80
71
|
interface VerifyTokenOptions {
|
|
81
72
|
baseUrl?: string;
|
|
82
73
|
fetch?: typeof fetch;
|
|
83
74
|
}
|
|
84
|
-
declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult>;
|
|
75
|
+
declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
|
|
85
76
|
//#endregion
|
|
86
77
|
//#region src/index.d.ts
|
|
87
78
|
interface CloudflarePluginOptions extends ResolveTokenInput {
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AuthError, ProviderApiError, createResolveToken } from "@theholocron/cli";
|
|
2
2
|
import { createCloudflareClient } from "@theholocron/cloudflare-client";
|
|
3
|
+
import { errorMessage } from "@theholocron/misc-utils";
|
|
3
4
|
//#region src/auth.ts
|
|
4
5
|
const resolveToken = createResolveToken({
|
|
5
6
|
envName: "HOLOCRON_CLOUDFLARE_TOKEN",
|
|
@@ -274,7 +275,7 @@ async function verifyToken(token, opts = {}) {
|
|
|
274
275
|
} catch (err) {
|
|
275
276
|
return {
|
|
276
277
|
ok: false,
|
|
277
|
-
message:
|
|
278
|
+
message: errorMessage(err)
|
|
278
279
|
};
|
|
279
280
|
}
|
|
280
281
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/holocron-plugin-cloudflare",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.116",
|
|
4
4
|
"description": "Holocron plugin for Cloudflare. Implements the dns capability against Cloudflare's REST API — zone resolution, DNS record management.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"@theholocron/cloudflare-client": "^1.37.1",
|
|
34
34
|
"@theholocron/eslint-config": "^8.7.0",
|
|
35
35
|
"@theholocron/http-client": "^1.37.1",
|
|
36
|
+
"@theholocron/misc-utils": "^1.9.2",
|
|
36
37
|
"@theholocron/tsconfig": "^8.7.0",
|
|
37
38
|
"@theholocron/tsdown-config": "^8.7.0",
|
|
38
39
|
"@theholocron/vitest-config": "^8.7.0",
|
|
@@ -47,11 +48,12 @@
|
|
|
47
48
|
"tsx": "4.23.12",
|
|
48
49
|
"typescript": "^5.9.3",
|
|
49
50
|
"vitest": "^4.1.11",
|
|
50
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
51
|
+
"@theholocron/cli": "5.0.0-alpha.116"
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
53
54
|
"@theholocron/cloudflare-client": "^1.37.1",
|
|
54
|
-
"@theholocron/
|
|
55
|
+
"@theholocron/misc-utils": "^1.9.2",
|
|
56
|
+
"@theholocron/cli": "5.0.0-alpha.116"
|
|
55
57
|
},
|
|
56
58
|
"peerDependenciesMeta": {
|
|
57
59
|
"@theholocron/cloudflare-client": {}
|