ado-npm-auth 0.3.3 → 0.5.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/lib/args.d.ts CHANGED
@@ -3,6 +3,7 @@ export interface Args {
3
3
  skipAuth: boolean;
4
4
  configFile?: string;
5
5
  azureAuthLocation?: string;
6
+ exitCodeOnReAuthenticate?: number;
6
7
  }
7
8
  export declare function parseArgs(args: string[]): Args;
8
9
  //# sourceMappingURL=args.d.ts.map
@@ -2,5 +2,5 @@
2
2
  * Generates a valid ADO PAT, scoped for vso.packaging in the given ado organization, 30 minute timeout
3
3
  * @returns { string } a valid ADO PAT
4
4
  */
5
- export declare const generateNpmrcPat: (organization: string, encode?: boolean, azureAuthLocation?: string) => Promise<string>;
5
+ export declare const generateNpmrcPat: (organization: string, feed: string, encode?: boolean, azureAuthLocation?: string) => Promise<string>;
6
6
  //# sourceMappingURL=generate-npmrc-pat.d.ts.map
@@ -0,0 +1,7 @@
1
+ interface CredentialProviderResponse {
2
+ Username: string;
3
+ Password: string;
4
+ }
5
+ export declare function credentialProviderPat(registry: string): Promise<CredentialProviderResponse>;
6
+ export {};
7
+ //# sourceMappingURL=nugetCredentialProvider.d.ts.map
@@ -1,3 +1,20 @@
1
1
  import { exec as _exec } from "node:child_process";
2
2
  export declare const exec: typeof _exec.__promisify__;
3
+ /**
4
+ * Executes a command as a child process.
5
+ * @param tool The command to run.
6
+ * @param args The arguments to pass to the command.
7
+ * @param options Options for the child process.
8
+ * @returns A promise that resolves when the process exits.
9
+ */
10
+ export declare function execProcess(tool: string, args: string[], options?: {
11
+ cwd?: string;
12
+ env?: {
13
+ [key: string]: string;
14
+ };
15
+ stdio?: "pipe" | "inherit" | "ignore";
16
+ shell?: boolean | string;
17
+ processStdOut?: (data: string) => void;
18
+ processStdErr?: (data: string) => void;
19
+ }): Promise<void>;
3
20
  //# sourceMappingURL=exec.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare function writeFileLazy(path: string, content: string): Promise<void>;
2
+ //# sourceMappingURL=fileUtils.d.ts.map
@@ -5,4 +5,11 @@ import { RequestOptions } from "https";
5
5
  * @returns
6
6
  */
7
7
  export declare const makeRequest: (options: RequestOptions) => Promise<unknown>;
8
+ /**
9
+ * Downloads a file from a URL to a local path.
10
+ * @param url The URL of the file to download.
11
+ * @param downloadPath The local path to save the downloaded file.
12
+ * @returns A promise that resolves when the download is complete.
13
+ */
14
+ export declare function downloadFile(url: string, downloadPath: string): Promise<void>;
8
15
  //# sourceMappingURL=request.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ado-npm-auth",
3
- "version": "0.3.3",
3
+ "version": "0.5.0",
4
4
  "description": "The ado-npm-auth package can automatically use the azureauth CLI to fetch tokens and update a user's .npmrc file for authenticating to ADO package feeds.",
5
5
  "repository": "https://github.com/microsoft/ado-npm-auth",
6
6
  "license": "MIT",