@depup/netlify-cli 24.6.2-depup.0 → 24.8.1-depup.0
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/README.md +3 -5
- package/changes.json +2 -10
- package/dist/commands/base-command.d.ts +4 -3
- package/dist/commands/base-command.d.ts.map +1 -1
- package/dist/commands/base-command.js +29 -9
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/claim/claim.d.ts +3 -0
- package/dist/commands/claim/claim.d.ts.map +1 -0
- package/dist/commands/claim/claim.js +19 -0
- package/dist/commands/claim/claim.js.map +1 -0
- package/dist/commands/claim/index.d.ts +3 -0
- package/dist/commands/claim/index.d.ts.map +1 -0
- package/dist/commands/claim/index.js +11 -0
- package/dist/commands/claim/index.js.map +1 -0
- package/dist/commands/deploy/deploy.d.ts.map +1 -1
- package/dist/commands/deploy/deploy.js +159 -1
- package/dist/commands/deploy/deploy.js.map +1 -1
- package/dist/commands/deploy/index.d.ts.map +1 -1
- package/dist/commands/deploy/index.js +3 -0
- package/dist/commands/deploy/index.js.map +1 -1
- package/dist/commands/deploy/option_values.d.ts +2 -0
- package/dist/commands/deploy/option_values.d.ts.map +1 -1
- package/dist/commands/main.d.ts.map +1 -1
- package/dist/commands/main.js +19 -0
- package/dist/commands/main.js.map +1 -1
- package/dist/lib/build.d.ts +1 -1
- package/dist/lib/build.d.ts.map +1 -1
- package/dist/lib/build.js +2 -1
- package/dist/lib/build.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/command-error-handler.d.ts +6 -0
- package/dist/utils/command-error-handler.d.ts.map +1 -0
- package/dist/utils/command-error-handler.js +16 -0
- package/dist/utils/command-error-handler.js.map +1 -0
- package/dist/utils/deploy/drop-api.d.ts +34 -0
- package/dist/utils/deploy/drop-api.d.ts.map +1 -0
- package/dist/utils/deploy/drop-api.js +155 -0
- package/dist/utils/deploy/drop-api.js.map +1 -0
- package/dist/utils/run-program.d.ts.map +1 -1
- package/dist/utils/run-program.js +11 -2
- package/dist/utils/run-program.js.map +1 -1
- package/npm-shrinkwrap.json +13 -6
- package/package.json +6 -14
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CommanderError, type HelpContext } from 'commander';
|
|
2
|
+
export declare const isOptionError: (error: CommanderError) => boolean;
|
|
3
|
+
export declare const handleOptionError: (command: {
|
|
4
|
+
outputHelp: (context?: HelpContext) => void;
|
|
5
|
+
}) => void;
|
|
6
|
+
//# sourceMappingURL=command-error-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-error-handler.d.ts","sourceRoot":"","sources":["../../src/utils/command-error-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AAW5D,eAAO,MAAM,aAAa,GAAI,OAAO,cAAc,KAAG,OAA6C,CAAA;AAEnG,eAAO,MAAM,iBAAiB,GAAI,SAAS;IAAE,UAAU,EAAE,CAAC,OAAO,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;CAAE,KAAG,IAM5F,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { log } from './command-helpers.js';
|
|
2
|
+
import { isInteractive } from './scripted-commands.js';
|
|
3
|
+
const OPTION_ERROR_CODES = new Set([
|
|
4
|
+
'commander.unknownOption',
|
|
5
|
+
'commander.missingArgument',
|
|
6
|
+
'commander.excessArguments',
|
|
7
|
+
]);
|
|
8
|
+
export const isOptionError = (error) => OPTION_ERROR_CODES.has(error.code);
|
|
9
|
+
export const handleOptionError = (command) => {
|
|
10
|
+
if (!isInteractive()) {
|
|
11
|
+
log();
|
|
12
|
+
command.outputHelp({ error: true });
|
|
13
|
+
log();
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=command-error-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-error-handler.js","sourceRoot":"","sources":["../../src/utils/command-error-handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAEtD,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACjC,yBAAyB;IACzB,2BAA2B;IAC3B,2BAA2B;CAC5B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAqB,EAAW,EAAE,CAAC,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAEnG,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAwD,EAAQ,EAAE;IAClG,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;QACrB,GAAG,EAAE,CAAA;QACL,OAAO,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;QACnC,GAAG,EAAE,CAAA;IACP,CAAC;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import type { StatusCallback } from './status-cb.js';
|
|
3
|
+
interface DropDeployInfo {
|
|
4
|
+
id: string;
|
|
5
|
+
deploy_id: string;
|
|
6
|
+
subdomain: string;
|
|
7
|
+
url: string;
|
|
8
|
+
state: string;
|
|
9
|
+
required: string[];
|
|
10
|
+
}
|
|
11
|
+
interface DropApiOptions {
|
|
12
|
+
apiBase: string;
|
|
13
|
+
userAgent: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DropApiError extends Error {
|
|
16
|
+
status?: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const getDropToken: ({ apiBase, userAgent }: DropApiOptions) => Promise<string>;
|
|
19
|
+
export declare const createDropDeploy: ({ apiBase, userAgent }: DropApiOptions, files: Record<string, string>, token: string, createdVia?: string) => Promise<DropDeployInfo>;
|
|
20
|
+
export declare const uploadDropFile: ({ apiBase, userAgent }: DropApiOptions, deployId: string, filePath: string, body: fs.ReadStream | Buffer, token: string) => Promise<void>;
|
|
21
|
+
export declare const waitForDropDeploy: ({ apiBase, userAgent }: DropApiOptions, siteId: string, deployId: string, timeout?: number) => Promise<Record<string, unknown>>;
|
|
22
|
+
export declare const claimDropSite: ({ apiBase, userAgent }: DropApiOptions, siteId: string, dropToken: string, authToken: string) => Promise<void>;
|
|
23
|
+
export interface UploadListItem {
|
|
24
|
+
normalizedPath: string;
|
|
25
|
+
filepath: string;
|
|
26
|
+
hash: string;
|
|
27
|
+
}
|
|
28
|
+
export declare const uploadDropFiles: (apiOptions: DropApiOptions, deployId: string, uploadList: UploadListItem[], token: string, { concurrentUpload, maxRetry, statusCb, }?: {
|
|
29
|
+
concurrentUpload?: number;
|
|
30
|
+
maxRetry?: number;
|
|
31
|
+
statusCb?: StatusCallback;
|
|
32
|
+
}) => Promise<void>;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=drop-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drop-api.d.ts","sourceRoot":"","sources":["../../../src/utils/deploy/drop-api.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,IAAI,CAAA;AAKnB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAIpD,UAAU,cAAc;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,YAAa,SAAQ,KAAK;IACzC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AASD,eAAO,MAAM,YAAY,GAAU,wBAAwB,cAAc,KAAG,OAAO,CAAC,MAAM,CAczF,CAAA;AAGD,eAAO,MAAM,gBAAgB,GAC3B,wBAAwB,cAAc,EACtC,OAAO,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,OAAO,MAAM,EACb,aAAa,MAAM,KAClB,OAAO,CAAC,cAAc,CAoBxB,CAAA;AAOD,eAAO,MAAM,cAAc,GACzB,wBAAwB,cAAc,EACtC,UAAU,MAAM,EAChB,UAAU,MAAM,EAChB,MAAM,EAAE,CAAC,UAAU,GAAG,MAAM,EAC5B,OAAO,MAAM,KACZ,OAAO,CAAC,IAAI,CAsBd,CAAA;AAGD,eAAO,MAAM,iBAAiB,GAC5B,wBAAwB,cAAc,EACtC,QAAQ,MAAM,EACd,UAAU,MAAM,EAChB,UAAS,MAA+B,KACvC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAkCjC,CAAA;AAGD,eAAO,MAAM,aAAa,GACxB,wBAAwB,cAAc,EACtC,QAAQ,MAAM,EACd,WAAW,MAAM,EACjB,WAAW,MAAM,KAChB,OAAO,CAAC,IAAI,CAgBd,CAAA;AAED,MAAM,WAAW,cAAc;IAC7B,cAAc,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,eAAO,MAAM,eAAe,GAC1B,YAAY,cAAc,EAC1B,UAAU,MAAM,EAChB,YAAY,cAAc,EAAE,EAC5B,OAAO,MAAM,EACb,4CAIG;IACD,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,cAAc,CAAA;CACrB,KACL,OAAO,CAAC,IAAI,CA4Cd,CAAA"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
// TODO: These Drop API helpers should be migrated to @netlify/api once the Drop
|
|
2
|
+
// endpoints are added to the OpenAPI spec. Until then, we use raw fetch calls.
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
import pWaitFor from 'p-wait-for';
|
|
5
|
+
import { DEPLOY_POLL, DEFAULT_DEPLOY_TIMEOUT, DEFAULT_CONCURRENT_UPLOAD, DEFAULT_MAX_RETRY } from './constants.js';
|
|
6
|
+
const APP_NETLIFY_REFERRER = 'https://app.netlify.com';
|
|
7
|
+
const makeHeaders = (userAgent, extra = {}) => ({
|
|
8
|
+
'User-Agent': userAgent,
|
|
9
|
+
Referer: APP_NETLIFY_REFERRER,
|
|
10
|
+
...extra,
|
|
11
|
+
});
|
|
12
|
+
// TODO: Migrate to @netlify/api when Drop endpoints are in the OpenAPI spec.
|
|
13
|
+
export const getDropToken = async ({ apiBase, userAgent }) => {
|
|
14
|
+
const response = await fetch(`${apiBase}/drop/token`, {
|
|
15
|
+
method: 'POST',
|
|
16
|
+
headers: makeHeaders(userAgent, { 'Content-Type': 'application/json' }),
|
|
17
|
+
});
|
|
18
|
+
if (!response.ok) {
|
|
19
|
+
const error = new Error(`Failed to get drop token: ${String(response.status)} ${response.statusText}`);
|
|
20
|
+
error.status = response.status;
|
|
21
|
+
throw error;
|
|
22
|
+
}
|
|
23
|
+
const data = (await response.json());
|
|
24
|
+
return data.token;
|
|
25
|
+
};
|
|
26
|
+
// TODO: Migrate to @netlify/api when Drop endpoints are in the OpenAPI spec.
|
|
27
|
+
export const createDropDeploy = async ({ apiBase, userAgent }, files, token, createdVia) => {
|
|
28
|
+
const body = { files, token };
|
|
29
|
+
if (createdVia) {
|
|
30
|
+
body.created_via = createdVia;
|
|
31
|
+
}
|
|
32
|
+
const response = await fetch(`${apiBase}/drop`, {
|
|
33
|
+
method: 'POST',
|
|
34
|
+
headers: makeHeaders(userAgent, { 'Content-Type': 'application/json' }),
|
|
35
|
+
body: JSON.stringify(body),
|
|
36
|
+
});
|
|
37
|
+
if (!response.ok) {
|
|
38
|
+
const errorText = await response.text();
|
|
39
|
+
const error = new Error(`Failed to create drop deploy: ${String(response.status)} ${errorText}`);
|
|
40
|
+
error.status = response.status;
|
|
41
|
+
throw error;
|
|
42
|
+
}
|
|
43
|
+
return (await response.json());
|
|
44
|
+
};
|
|
45
|
+
// TODO: Migrate to @netlify/api when Drop endpoints are in the OpenAPI spec.
|
|
46
|
+
export const uploadDropFile = async ({ apiBase, userAgent }, deployId, filePath, body, token) => {
|
|
47
|
+
// Node.js fetch needs `duplex: 'half'` for streaming bodies which isn't in standard RequestInit
|
|
48
|
+
/* eslint-disable @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any */
|
|
49
|
+
const normalizedFilePath = filePath.startsWith('/') ? filePath : `/${filePath}`;
|
|
50
|
+
const response = await fetch(`${apiBase}/deploys/${deployId}/files${encodeURI(normalizedFilePath)}`, {
|
|
51
|
+
method: 'PUT',
|
|
52
|
+
headers: makeHeaders(userAgent, {
|
|
53
|
+
'Content-Type': 'application/octet-stream',
|
|
54
|
+
Authorization: `Bearer ${token}`,
|
|
55
|
+
}),
|
|
56
|
+
body: body,
|
|
57
|
+
duplex: 'half',
|
|
58
|
+
});
|
|
59
|
+
/* eslint-enable @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any */
|
|
60
|
+
if (!response.ok) {
|
|
61
|
+
const error = new Error(`Failed to upload file ${filePath}: ${String(response.status)} ${response.statusText}`);
|
|
62
|
+
error.status = response.status;
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
// TODO: Migrate to @netlify/api when Drop endpoints are in the OpenAPI spec.
|
|
67
|
+
export const waitForDropDeploy = async ({ apiBase, userAgent }, siteId, deployId, timeout = DEFAULT_DEPLOY_TIMEOUT) => {
|
|
68
|
+
let deploy;
|
|
69
|
+
const checkDeploy = async () => {
|
|
70
|
+
const response = await fetch(`${apiBase}/sites/${siteId}/deploys/${deployId}`, {
|
|
71
|
+
headers: makeHeaders(userAgent),
|
|
72
|
+
});
|
|
73
|
+
if (!response.ok) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
const data = (await response.json());
|
|
77
|
+
if (data.state === 'ready') {
|
|
78
|
+
deploy = data;
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
if (data.state === 'error') {
|
|
82
|
+
throw new Error(data.error_message || `Deploy ${deployId} had an error`);
|
|
83
|
+
}
|
|
84
|
+
return false;
|
|
85
|
+
};
|
|
86
|
+
await pWaitFor(checkDeploy, {
|
|
87
|
+
interval: DEPLOY_POLL,
|
|
88
|
+
timeout: {
|
|
89
|
+
milliseconds: timeout,
|
|
90
|
+
message: 'Timeout while waiting for deploy',
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
// deploy is guaranteed to be set when pWaitFor resolves
|
|
94
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
95
|
+
return deploy;
|
|
96
|
+
};
|
|
97
|
+
// TODO: Migrate to @netlify/api when Drop endpoints are in the OpenAPI spec.
|
|
98
|
+
export const claimDropSite = async ({ apiBase, userAgent }, siteId, dropToken, authToken) => {
|
|
99
|
+
const response = await fetch(`${apiBase}/drop/claim`, {
|
|
100
|
+
method: 'POST',
|
|
101
|
+
headers: makeHeaders(userAgent, {
|
|
102
|
+
'Content-Type': 'application/json',
|
|
103
|
+
Authorization: `Bearer ${authToken}`,
|
|
104
|
+
}),
|
|
105
|
+
body: JSON.stringify({ site: siteId, token: dropToken }),
|
|
106
|
+
});
|
|
107
|
+
if (!response.ok) {
|
|
108
|
+
const errorText = await response.text();
|
|
109
|
+
const error = new Error(`Failed to claim site: ${String(response.status)} ${errorText}`);
|
|
110
|
+
error.status = response.status;
|
|
111
|
+
throw error;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
export const uploadDropFiles = async (apiOptions, deployId, uploadList, token, { concurrentUpload = DEFAULT_CONCURRENT_UPLOAD, maxRetry = DEFAULT_MAX_RETRY, statusCb = (() => { }), } = {}) => {
|
|
115
|
+
const { default: pMap } = await import('p-map');
|
|
116
|
+
statusCb({
|
|
117
|
+
type: 'upload',
|
|
118
|
+
msg: `Uploading ${String(uploadList.length)} files`,
|
|
119
|
+
phase: 'start',
|
|
120
|
+
});
|
|
121
|
+
const uploadFile = async (fileObj, index) => {
|
|
122
|
+
statusCb({
|
|
123
|
+
type: 'upload',
|
|
124
|
+
msg: `(${String(index + 1)}/${String(uploadList.length)}) Uploading ${fileObj.normalizedPath}...`,
|
|
125
|
+
phase: 'progress',
|
|
126
|
+
});
|
|
127
|
+
let lastError;
|
|
128
|
+
for (let attempt = 0; attempt <= maxRetry; attempt++) {
|
|
129
|
+
try {
|
|
130
|
+
const body = fs.createReadStream(fileObj.filepath);
|
|
131
|
+
await uploadDropFile(apiOptions, deployId, fileObj.normalizedPath, body, token);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
lastError = error;
|
|
136
|
+
if (lastError.status === 400 || lastError.status === 422) {
|
|
137
|
+
throw error;
|
|
138
|
+
}
|
|
139
|
+
if (attempt < maxRetry) {
|
|
140
|
+
await new Promise((resolve) => setTimeout(resolve, 1000 * (attempt + 1)));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (lastError) {
|
|
145
|
+
throw lastError;
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
await pMap(uploadList, uploadFile, { concurrency: concurrentUpload });
|
|
149
|
+
statusCb({
|
|
150
|
+
type: 'upload',
|
|
151
|
+
msg: `Finished uploading ${String(uploadList.length)} assets`,
|
|
152
|
+
phase: 'stop',
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
//# sourceMappingURL=drop-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drop-api.js","sourceRoot":"","sources":["../../../src/utils/deploy/drop-api.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+EAA+E;AAE/E,OAAO,EAAE,MAAM,IAAI,CAAA;AAEnB,OAAO,QAAQ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,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;gBAC3E,CAAC;YACH,CAAC;QACH,CAAC;QACD,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,SAAS,CAAA;QACjB,CAAC;IACH,CAAC,CAAA;IAED,MAAM,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC,CAAA;IAErE,QAAQ,CAAC;QACP,IAAI,EAAE,QAAQ;QACd,GAAG,EAAE,sBAAsB,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS;QAC7D,KAAK,EAAE,MAAM;KACd,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-program.d.ts","sourceRoot":"","sources":["../../src/utils/run-program.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run-program.d.ts","sourceRoot":"","sources":["../../src/utils/run-program.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAIlD,eAAO,MAAM,UAAU,GAAU,SAAS,WAAW,EAAE,MAAM,MAAM,EAAE,kBAiBpE,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { CommanderError } from 'commander';
|
|
1
2
|
import { injectForceFlagIfScripted } from './scripted-commands.js';
|
|
2
3
|
import { CI_FORCED_COMMANDS } from '../commands/main.js';
|
|
3
|
-
|
|
4
|
+
import { exit } from './command-helpers.js';
|
|
4
5
|
export const runProgram = async (program, argv) => {
|
|
5
6
|
const cmdName = argv[2];
|
|
6
7
|
// checks if the command has a force option
|
|
@@ -8,6 +9,14 @@ export const runProgram = async (program, argv) => {
|
|
|
8
9
|
if (isValidForceCommand) {
|
|
9
10
|
injectForceFlagIfScripted(argv);
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
+
try {
|
|
13
|
+
await program.parseAsync(argv);
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
if (error instanceof CommanderError) {
|
|
17
|
+
exit(error.exitCode);
|
|
18
|
+
}
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
12
21
|
};
|
|
13
22
|
//# sourceMappingURL=run-program.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-program.js","sourceRoot":"","sources":["../../src/utils/run-program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"run-program.js","sourceRoot":"","sources":["../../src/utils/run-program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAE3C,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAAE,OAAoB,EAAE,IAAc,EAAE,EAAE;IACvE,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;IACvB,2CAA2C;IAC3C,MAAM,mBAAmB,GAAG,OAAO,IAAI,kBAAkB,CAAA;IAEzD,IAAI,mBAAmB,EAAE,CAAC;QACxB,yBAAyB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,IAAI,CAAC;QACH,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,cAAc,EAAE,CAAC;YACpC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;QACtB,CAAC;QACD,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC,CAAA"}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/netlify-cli",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.8.1-depup.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@depup/netlify-cli",
|
|
9
|
-
"version": "24.
|
|
9
|
+
"version": "24.8.1-depup.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@fastify/static": "9.0.0",
|
|
13
13
|
"@netlify/ai": "0.4.1",
|
|
14
14
|
"@netlify/api": "14.0.18",
|
|
15
15
|
"@netlify/blobs": "^10.7.4",
|
|
16
|
-
"@netlify/build": "
|
|
16
|
+
"@netlify/build": "35.11.2",
|
|
17
17
|
"@netlify/build-info": "10.4.0",
|
|
18
18
|
"@netlify/config": "24.4.4",
|
|
19
19
|
"@netlify/dev": "4.16.4",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@netlify/images": "1.3.7",
|
|
26
26
|
"@netlify/local-functions-proxy": "2.0.3",
|
|
27
27
|
"@netlify/redirect-parser": "15.0.4",
|
|
28
|
-
"@netlify/zip-it-and-ship-it": "
|
|
28
|
+
"@netlify/zip-it-and-ship-it": "14.5.3",
|
|
29
29
|
"@octokit/rest": "^22.0.1",
|
|
30
30
|
"@opentelemetry/api": "^1.9.1",
|
|
31
31
|
"@pnpm/tabtab": "0.5.4",
|
|
@@ -9659,7 +9659,9 @@
|
|
|
9659
9659
|
"license": "MIT"
|
|
9660
9660
|
},
|
|
9661
9661
|
"node_modules/node-forge": {
|
|
9662
|
-
"version": "1.
|
|
9662
|
+
"version": "1.4.0",
|
|
9663
|
+
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.0.tgz",
|
|
9664
|
+
"integrity": "sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ==",
|
|
9663
9665
|
"license": "(BSD-3-Clause OR GPL-2.0)",
|
|
9664
9666
|
"engines": {
|
|
9665
9667
|
"node": ">= 6.13.0"
|
|
@@ -12538,13 +12540,18 @@
|
|
|
12538
12540
|
}
|
|
12539
12541
|
},
|
|
12540
12542
|
"node_modules/yaml": {
|
|
12541
|
-
"version": "2.8.
|
|
12543
|
+
"version": "2.8.3",
|
|
12544
|
+
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz",
|
|
12545
|
+
"integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==",
|
|
12542
12546
|
"license": "ISC",
|
|
12543
12547
|
"bin": {
|
|
12544
12548
|
"yaml": "bin.mjs"
|
|
12545
12549
|
},
|
|
12546
12550
|
"engines": {
|
|
12547
12551
|
"node": ">= 14.6"
|
|
12552
|
+
},
|
|
12553
|
+
"funding": {
|
|
12554
|
+
"url": "https://github.com/sponsors/eemeli"
|
|
12548
12555
|
}
|
|
12549
12556
|
},
|
|
12550
12557
|
"node_modules/yargs": {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/netlify-cli",
|
|
3
3
|
"description": "Netlify command line tool (with updated dependencies)",
|
|
4
|
-
"version": "24.
|
|
4
|
+
"version": "24.8.1-depup.0",
|
|
5
5
|
"author": "Netlify Inc.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@netlify/ai": "0.4.1",
|
|
68
68
|
"@netlify/api": "14.0.18",
|
|
69
69
|
"@netlify/blobs": "^10.7.4",
|
|
70
|
-
"@netlify/build": "
|
|
70
|
+
"@netlify/build": "35.11.2",
|
|
71
71
|
"@netlify/build-info": "10.4.0",
|
|
72
72
|
"@netlify/config": "24.4.4",
|
|
73
73
|
"@netlify/dev": "4.16.4",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@netlify/images": "1.3.7",
|
|
80
80
|
"@netlify/local-functions-proxy": "2.0.3",
|
|
81
81
|
"@netlify/redirect-parser": "15.0.4",
|
|
82
|
-
"@netlify/zip-it-and-ship-it": "
|
|
82
|
+
"@netlify/zip-it-and-ship-it": "14.5.3",
|
|
83
83
|
"@octokit/rest": "^22.0.1",
|
|
84
84
|
"@opentelemetry/api": "^1.9.1",
|
|
85
85
|
"@pnpm/tabtab": "0.5.4",
|
|
@@ -174,18 +174,10 @@
|
|
|
174
174
|
"from": "10.7.0",
|
|
175
175
|
"to": "^10.7.4"
|
|
176
176
|
},
|
|
177
|
-
"@netlify/build": {
|
|
178
|
-
"from": "35.11.1",
|
|
179
|
-
"to": "^35.11.2"
|
|
180
|
-
},
|
|
181
177
|
"@netlify/edge-functions-bootstrap": {
|
|
182
178
|
"from": "2.17.1",
|
|
183
179
|
"to": "^3.1.0"
|
|
184
180
|
},
|
|
185
|
-
"@netlify/zip-it-and-ship-it": {
|
|
186
|
-
"from": "14.5.2",
|
|
187
|
-
"to": "^14.5.3"
|
|
188
|
-
},
|
|
189
181
|
"@octokit/rest": {
|
|
190
182
|
"from": "22.0.0",
|
|
191
183
|
"to": "^22.0.1"
|
|
@@ -267,10 +259,10 @@
|
|
|
267
259
|
"to": "^8.20.0"
|
|
268
260
|
}
|
|
269
261
|
},
|
|
270
|
-
"depsUpdated":
|
|
262
|
+
"depsUpdated": 22,
|
|
271
263
|
"originalPackage": "netlify-cli",
|
|
272
|
-
"originalVersion": "24.
|
|
273
|
-
"processedAt": "2026-03-
|
|
264
|
+
"originalVersion": "24.8.1",
|
|
265
|
+
"processedAt": "2026-03-27T20:15:36.285Z",
|
|
274
266
|
"smokeTest": "failed"
|
|
275
267
|
}
|
|
276
268
|
}
|