Skip to content

Commit f8e7855

Browse files
authored
Adding Debug Line to npm auth (#19622)
* Adding Debug Line to npm auth * localized debugging strings
1 parent b82bad0 commit f8e7855

File tree

13 files changed

+49
-25
lines changed

13 files changed

+49
-25
lines changed

Tasks/NpmAuthenticateV0/Strings/resources.resjson/en-US/resources.resjson

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@
2424
"loc.messages.CheckedInCredentialsOverriden": "Found and overrode credentials for the %s registry in the selected .npmrc file. Remove credentials from the file and store them in an npm service connection instead (recommended), or remove the npm Authenticate task from your build to use credentials checked into an .npmrc.",
2525
"loc.messages.NoIndexJsonFile": "No index.json file was found and no files were restored",
2626
"loc.messages.RevertedChangesToNpmrc": "Reverted changes made to %s.",
27-
"loc.messages.NpmrcDoesNotExist": "The .npmrc file you selected at %s does not currently exist."
27+
"loc.messages.NpmrcDoesNotExist": "The .npmrc file you selected at %s does not currently exist.",
28+
"loc.messages.SuccessfulPush": "Successfully pushed .npmrc",
29+
"loc.messages.SuccessfulAppend": "Successfully appended .npmrc"
2830
}

Tasks/NpmAuthenticateV0/npmauth.ts

+2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ async function main(): Promise<void> {
110110
if (registry) {
111111
tl.debug(tl.loc('AddingAuthRegistry', registry.url));
112112
npmutil.appendToNpmrc(npmrc, os.EOL + registry.auth + os.EOL);
113+
tl.debug(tl.loc('SuccessfulAppend'));
113114
npmrcFile.push(os.EOL + registry.auth + os.EOL);
115+
tl.debug(tl.loc('SuccessfulPush'));
114116
}
115117
else {
116118
console.log(tl.loc("IgnoringRegistry", registryURL.host));

Tasks/NpmAuthenticateV0/task.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"author": "Microsoft Corporation",
1010
"version": {
1111
"Major": 0,
12-
"Minor": 231,
12+
"Minor": 236,
1313
"Patch": 0
1414
},
1515
"runsOn": [
@@ -72,6 +72,8 @@
7272
"CheckedInCredentialsOverriden": "Found and overrode credentials for the %s registry in the selected .npmrc file. Remove credentials from the file and store them in an npm service connection instead (recommended), or remove the npm Authenticate task from your build to use credentials checked into an .npmrc.",
7373
"NoIndexJsonFile": "No index.json file was found and no files were restored",
7474
"RevertedChangesToNpmrc": "Reverted changes made to %s.",
75-
"NpmrcDoesNotExist": "The .npmrc file you selected at %s does not currently exist."
75+
"NpmrcDoesNotExist": "The .npmrc file you selected at %s does not currently exist.",
76+
"SuccessfulPush": "Successfully pushed .npmrc",
77+
"SuccessfulAppend": "Successfully appended .npmrc"
7678
}
7779
}

Tasks/NpmAuthenticateV0/task.loc.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"author": "Microsoft Corporation",
1010
"version": {
1111
"Major": 0,
12-
"Minor": 231,
12+
"Minor": 236,
1313
"Patch": 0
1414
},
1515
"runsOn": [
@@ -72,6 +72,8 @@
7272
"CheckedInCredentialsOverriden": "ms-resource:loc.messages.CheckedInCredentialsOverriden",
7373
"NoIndexJsonFile": "ms-resource:loc.messages.NoIndexJsonFile",
7474
"RevertedChangesToNpmrc": "ms-resource:loc.messages.RevertedChangesToNpmrc",
75-
"NpmrcDoesNotExist": "ms-resource:loc.messages.NpmrcDoesNotExist"
75+
"NpmrcDoesNotExist": "ms-resource:loc.messages.NpmrcDoesNotExist",
76+
"SuccessfulPush": "ms-resource:loc.messages.SuccessfulPush",
77+
"SuccessfulAppend": "ms-resource:loc.messages.SuccessfulAppend"
7678
}
7779
}
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Default|0.231.0
2-
Node20_229_1|0.231.1
1+
Default|0.236.0
2+
Node20_229_1|0.236.1

_generated/NpmAuthenticateV0/Strings/resources.resjson/en-US/resources.resjson

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@
2424
"loc.messages.CheckedInCredentialsOverriden": "Found and overrode credentials for the %s registry in the selected .npmrc file. Remove credentials from the file and store them in an npm service connection instead (recommended), or remove the npm Authenticate task from your build to use credentials checked into an .npmrc.",
2525
"loc.messages.NoIndexJsonFile": "No index.json file was found and no files were restored",
2626
"loc.messages.RevertedChangesToNpmrc": "Reverted changes made to %s.",
27-
"loc.messages.NpmrcDoesNotExist": "The .npmrc file you selected at %s does not currently exist."
27+
"loc.messages.NpmrcDoesNotExist": "The .npmrc file you selected at %s does not currently exist.",
28+
"loc.messages.SuccessfulPush": "Successfully pushed .npmrc",
29+
"loc.messages.SuccessfulAppend": "Successfully appended .npmrc"
2830
}

_generated/NpmAuthenticateV0/npmauth.ts

+2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ async function main(): Promise<void> {
110110
if (registry) {
111111
tl.debug(tl.loc('AddingAuthRegistry', registry.url));
112112
npmutil.appendToNpmrc(npmrc, os.EOL + registry.auth + os.EOL);
113+
tl.debug(tl.loc('SuccessfulAppend'));
113114
npmrcFile.push(os.EOL + registry.auth + os.EOL);
115+
tl.debug(tl.loc('SuccessfulPush'));
114116
}
115117
else {
116118
console.log(tl.loc("IgnoringRegistry", registryURL.host));

_generated/NpmAuthenticateV0/task.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"author": "Microsoft Corporation",
1010
"version": {
1111
"Major": 0,
12-
"Minor": 231,
12+
"Minor": 236,
1313
"Patch": 0
1414
},
1515
"runsOn": [
@@ -72,10 +72,12 @@
7272
"CheckedInCredentialsOverriden": "Found and overrode credentials for the %s registry in the selected .npmrc file. Remove credentials from the file and store them in an npm service connection instead (recommended), or remove the npm Authenticate task from your build to use credentials checked into an .npmrc.",
7373
"NoIndexJsonFile": "No index.json file was found and no files were restored",
7474
"RevertedChangesToNpmrc": "Reverted changes made to %s.",
75-
"NpmrcDoesNotExist": "The .npmrc file you selected at %s does not currently exist."
75+
"NpmrcDoesNotExist": "The .npmrc file you selected at %s does not currently exist.",
76+
"SuccessfulPush": "Successfully pushed .npmrc",
77+
"SuccessfulAppend": "Successfully appended .npmrc"
7678
},
7779
"_buildConfigMapping": {
78-
"Default": "0.231.0",
79-
"Node20_229_1": "0.231.1"
80+
"Default": "0.236.0",
81+
"Node20_229_1": "0.236.1"
8082
}
8183
}

_generated/NpmAuthenticateV0/task.loc.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"author": "Microsoft Corporation",
1010
"version": {
1111
"Major": 0,
12-
"Minor": 231,
12+
"Minor": 236,
1313
"Patch": 0
1414
},
1515
"runsOn": [
@@ -72,10 +72,12 @@
7272
"CheckedInCredentialsOverriden": "ms-resource:loc.messages.CheckedInCredentialsOverriden",
7373
"NoIndexJsonFile": "ms-resource:loc.messages.NoIndexJsonFile",
7474
"RevertedChangesToNpmrc": "ms-resource:loc.messages.RevertedChangesToNpmrc",
75-
"NpmrcDoesNotExist": "ms-resource:loc.messages.NpmrcDoesNotExist"
75+
"NpmrcDoesNotExist": "ms-resource:loc.messages.NpmrcDoesNotExist",
76+
"SuccessfulPush": "ms-resource:loc.messages.SuccessfulPush",
77+
"SuccessfulAppend": "ms-resource:loc.messages.SuccessfulAppend"
7678
},
7779
"_buildConfigMapping": {
78-
"Default": "0.231.0",
79-
"Node20_229_1": "0.231.1"
80+
"Default": "0.236.0",
81+
"Node20_229_1": "0.236.1"
8082
}
8183
}

_generated/NpmAuthenticateV0_Node20/Strings/resources.resjson/en-US/resources.resjson

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@
2424
"loc.messages.CheckedInCredentialsOverriden": "Found and overrode credentials for the %s registry in the selected .npmrc file. Remove credentials from the file and store them in an npm service connection instead (recommended), or remove the npm Authenticate task from your build to use credentials checked into an .npmrc.",
2525
"loc.messages.NoIndexJsonFile": "No index.json file was found and no files were restored",
2626
"loc.messages.RevertedChangesToNpmrc": "Reverted changes made to %s.",
27-
"loc.messages.NpmrcDoesNotExist": "The .npmrc file you selected at %s does not currently exist."
27+
"loc.messages.NpmrcDoesNotExist": "The .npmrc file you selected at %s does not currently exist.",
28+
"loc.messages.SuccessfulPush": "Successfully pushed .npmrc",
29+
"loc.messages.SuccessfulAppend": "Successfully appended .npmrc"
2830
}

_generated/NpmAuthenticateV0_Node20/npmauth.ts

+2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ async function main(): Promise<void> {
110110
if (registry) {
111111
tl.debug(tl.loc('AddingAuthRegistry', registry.url));
112112
npmutil.appendToNpmrc(npmrc, os.EOL + registry.auth + os.EOL);
113+
tl.debug(tl.loc('SuccessfulAppend'));
113114
npmrcFile.push(os.EOL + registry.auth + os.EOL);
115+
tl.debug(tl.loc('SuccessfulPush'));
114116
}
115117
else {
116118
console.log(tl.loc("IgnoringRegistry", registryURL.host));

_generated/NpmAuthenticateV0_Node20/task.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"author": "Microsoft Corporation",
1010
"version": {
1111
"Major": 0,
12-
"Minor": 231,
12+
"Minor": 236,
1313
"Patch": 1
1414
},
1515
"runsOn": [
@@ -80,10 +80,12 @@
8080
"CheckedInCredentialsOverriden": "Found and overrode credentials for the %s registry in the selected .npmrc file. Remove credentials from the file and store them in an npm service connection instead (recommended), or remove the npm Authenticate task from your build to use credentials checked into an .npmrc.",
8181
"NoIndexJsonFile": "No index.json file was found and no files were restored",
8282
"RevertedChangesToNpmrc": "Reverted changes made to %s.",
83-
"NpmrcDoesNotExist": "The .npmrc file you selected at %s does not currently exist."
83+
"NpmrcDoesNotExist": "The .npmrc file you selected at %s does not currently exist.",
84+
"SuccessfulPush": "Successfully pushed .npmrc",
85+
"SuccessfulAppend": "Successfully appended .npmrc"
8486
},
8587
"_buildConfigMapping": {
86-
"Default": "0.231.0",
87-
"Node20_229_1": "0.231.1"
88+
"Default": "0.236.0",
89+
"Node20_229_1": "0.236.1"
8890
}
8991
}

_generated/NpmAuthenticateV0_Node20/task.loc.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"author": "Microsoft Corporation",
1010
"version": {
1111
"Major": 0,
12-
"Minor": 231,
12+
"Minor": 236,
1313
"Patch": 1
1414
},
1515
"runsOn": [
@@ -80,10 +80,12 @@
8080
"CheckedInCredentialsOverriden": "ms-resource:loc.messages.CheckedInCredentialsOverriden",
8181
"NoIndexJsonFile": "ms-resource:loc.messages.NoIndexJsonFile",
8282
"RevertedChangesToNpmrc": "ms-resource:loc.messages.RevertedChangesToNpmrc",
83-
"NpmrcDoesNotExist": "ms-resource:loc.messages.NpmrcDoesNotExist"
83+
"NpmrcDoesNotExist": "ms-resource:loc.messages.NpmrcDoesNotExist",
84+
"SuccessfulPush": "ms-resource:loc.messages.SuccessfulPush",
85+
"SuccessfulAppend": "ms-resource:loc.messages.SuccessfulAppend"
8486
},
8587
"_buildConfigMapping": {
86-
"Default": "0.231.0",
87-
"Node20_229_1": "0.231.1"
88+
"Default": "0.236.0",
89+
"Node20_229_1": "0.236.1"
8890
}
8991
}

0 commit comments

Comments
 (0)