@theholocron/holocron-plugin-netlify 5.0.0-alpha.246 → 5.0.0-alpha.247
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 +10 -18
- package/dist/index.mjs +4 -8
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { AuthError, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, DnsRecordRequest, ResolveTokenInput, VerifyTokenFailure, VerifyTokenResult, VerifyTokenResult as VerifyTokenResult$1, VerifyTokenSuccess } from "@theholocron/cli";
|
|
2
2
|
import { NetlifyClient } from "@theholocron/netlify-client";
|
|
3
|
-
|
|
4
|
-
declare const resolveToken: (input?: ResolveTokenInput) => string;
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/capabilities/deployment.d.ts
|
|
3
|
+
export declare const resolveToken: (input?: ResolveTokenInput) => string;
|
|
7
4
|
interface NetlifyDeploymentOptions {
|
|
8
5
|
/**
|
|
9
6
|
* Required for `ensureProject` / `listProjects` (create/list use
|
|
@@ -18,7 +15,7 @@ interface NetlifyDeploymentOptions {
|
|
|
18
15
|
/** Custom domain `holocron repo setup` should attach to the site. */
|
|
19
16
|
domain?: string;
|
|
20
17
|
}
|
|
21
|
-
declare class NetlifyDeployment implements Deployment {
|
|
18
|
+
export declare class NetlifyDeployment implements Deployment {
|
|
22
19
|
private readonly client;
|
|
23
20
|
private readonly opts;
|
|
24
21
|
readonly key: "deployment";
|
|
@@ -65,29 +62,25 @@ declare class NetlifyDeployment implements Deployment {
|
|
|
65
62
|
private findSiteByName;
|
|
66
63
|
private requireAccountId;
|
|
67
64
|
}
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region src/verify-token.d.ts
|
|
70
65
|
interface VerifyTokenOptions {
|
|
71
66
|
baseUrl?: string;
|
|
72
67
|
fetch?: typeof fetch;
|
|
73
68
|
}
|
|
74
|
-
declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
|
|
75
|
-
|
|
76
|
-
//#region src/index.d.ts
|
|
77
|
-
interface NetlifyPluginOptions extends ResolveTokenInput, NetlifyDeploymentOptions {
|
|
69
|
+
export declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
|
|
70
|
+
export interface NetlifyPluginOptions extends ResolveTokenInput, NetlifyDeploymentOptions {
|
|
78
71
|
/** Override base URL for tests. */
|
|
79
72
|
baseUrl?: string;
|
|
80
73
|
/** Override `fetch` for tests. */
|
|
81
74
|
fetch?: typeof fetch;
|
|
82
75
|
}
|
|
83
|
-
interface PluginContext {
|
|
76
|
+
export interface PluginContext {
|
|
84
77
|
options: NetlifyPluginOptions;
|
|
85
78
|
/** Memoized client — the token is resolved on first use, not at plugin load. */
|
|
86
79
|
client: () => NetlifyClient;
|
|
87
80
|
}
|
|
88
|
-
declare function createContext(options: NetlifyPluginOptions): PluginContext;
|
|
89
|
-
declare function deployment(ctx: PluginContext): Deployment;
|
|
90
|
-
declare function createPlugin(options: NetlifyPluginOptions): {
|
|
81
|
+
export declare function createContext(options: NetlifyPluginOptions): PluginContext;
|
|
82
|
+
export declare function deployment(ctx: PluginContext): Deployment;
|
|
83
|
+
export declare function createPlugin(options: NetlifyPluginOptions): {
|
|
91
84
|
name: string;
|
|
92
85
|
probes: {
|
|
93
86
|
connection: import("@theholocron/cli").Probe;
|
|
@@ -100,6 +93,5 @@ declare function createPlugin(options: NetlifyPluginOptions): {
|
|
|
100
93
|
* One-line hint printed by `holocron auth set netlify` when no token is
|
|
101
94
|
* supplied or the supplied token is rejected.
|
|
102
95
|
*/
|
|
103
|
-
declare const AUTH_HINT: string;
|
|
104
|
-
|
|
105
|
-
export { AUTH_HINT, AuthError, NetlifyDeployment, type NetlifyDeploymentOptions, NetlifyPluginOptions, PluginContext, type ResolveTokenInput, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, createContext, createPlugin, deployment, resolveToken, verifyToken };
|
|
96
|
+
export declare const AUTH_HINT: string;
|
|
97
|
+
export { AuthError, type NetlifyDeploymentOptions, type ResolveTokenInput, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess };
|
package/dist/index.mjs
CHANGED
|
@@ -2,15 +2,14 @@ import { AuthError, connectionProbe, createResolveToken } from "@theholocron/cli
|
|
|
2
2
|
import { createNetlifyClient } from "@theholocron/netlify-client";
|
|
3
3
|
import { ProviderApiError } from "@theholocron/http-client";
|
|
4
4
|
import { errorMessage } from "@theholocron/misc-utils";
|
|
5
|
-
|
|
5
|
+
// src/auth.ts
|
|
6
6
|
const resolveToken = createResolveToken({
|
|
7
7
|
envName: "HOLOCRON_NETLIFY_TOKEN",
|
|
8
8
|
vendorEnvName: "NETLIFY_AUTH_TOKEN",
|
|
9
9
|
keyringService: "netlify",
|
|
10
10
|
errorMessage: "no Netlify token found. Pass --token <TOKEN>, set HOLOCRON_NETLIFY_TOKEN / NETLIFY_AUTH_TOKEN, or run: holocron auth set netlify <TOKEN>"
|
|
11
11
|
});
|
|
12
|
-
|
|
13
|
-
//#region src/capabilities/deployment.ts
|
|
12
|
+
// src/capabilities/deployment.ts
|
|
14
13
|
const TERMINAL_READY = /* @__PURE__ */ new Set(["ready", "current"]);
|
|
15
14
|
const TERMINAL_ERROR = /* @__PURE__ */ new Set(["error"]);
|
|
16
15
|
function toDeploymentProject(site) {
|
|
@@ -126,8 +125,7 @@ var NetlifyDeployment = class {
|
|
|
126
125
|
return this.opts.accountId;
|
|
127
126
|
}
|
|
128
127
|
};
|
|
129
|
-
|
|
130
|
-
//#region src/verify-token.ts
|
|
128
|
+
// src/verify-token.ts
|
|
131
129
|
async function verifyToken(token, opts = {}) {
|
|
132
130
|
const client = createNetlifyClient({
|
|
133
131
|
token,
|
|
@@ -147,8 +145,7 @@ async function verifyToken(token, opts = {}) {
|
|
|
147
145
|
};
|
|
148
146
|
}
|
|
149
147
|
}
|
|
150
|
-
|
|
151
|
-
//#region src/index.ts
|
|
148
|
+
// src/index.ts
|
|
152
149
|
function createContext(options) {
|
|
153
150
|
let client;
|
|
154
151
|
return {
|
|
@@ -189,5 +186,4 @@ function createPlugin(options) {
|
|
|
189
186
|
* supplied or the supplied token is rejected.
|
|
190
187
|
*/
|
|
191
188
|
const AUTH_HINT = "generate a Netlify Personal Access Token at https://app.netlify.com/user/applications#personal-access-tokens, then run: holocron auth set netlify <TOKEN>";
|
|
192
|
-
//#endregion
|
|
193
189
|
export { AUTH_HINT, AuthError, NetlifyDeployment, createContext, createPlugin, deployment, resolveToken, verifyToken };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/holocron-plugin-netlify",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.247",
|
|
4
4
|
"description": "Holocron plugin for Netlify. Implements the deployment capability against Netlify's REST API, plus exports verifyToken + AUTH_HINT for `holocron auth`.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deployment",
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
"@theholocron/netlify-client": "^1.43.0",
|
|
36
36
|
"@theholocron/tsconfig": "^8.8.2",
|
|
37
37
|
"@types/node": "^26",
|
|
38
|
-
"@vitest/coverage-v8": "^
|
|
38
|
+
"@vitest/coverage-v8": "^5.0.5",
|
|
39
39
|
"eslint": "^10.8.1",
|
|
40
40
|
"globals": "^17.11.0",
|
|
41
|
-
"tsdown": "^0.
|
|
41
|
+
"tsdown": "^0.23.3",
|
|
42
42
|
"tsx": "4.23.15",
|
|
43
43
|
"typescript": "^5.9.3",
|
|
44
|
-
"vitest": "^
|
|
45
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
44
|
+
"vitest": "^5.0.5",
|
|
45
|
+
"@theholocron/cli": "5.0.0-alpha.247"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@theholocron/misc-utils": "^1.16.0",
|
|
49
49
|
"@theholocron/netlify-client": "^1.43.0",
|
|
50
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
50
|
+
"@theholocron/cli": "5.0.0-alpha.247"
|
|
51
51
|
},
|
|
52
52
|
"peerDependenciesMeta": {
|
|
53
53
|
"@theholocron/netlify-client": {}
|