verdaccio-okta-oauth 32.6.0 → 32.7.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/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/package.json +2 -2
- package/src/cli.ts +1 -1
package/dist/cli.js
CHANGED
|
@@ -29,7 +29,7 @@ http.createServer((req, res)=>{
|
|
|
29
29
|
throw new Error('"redirect_uri" should be a string value!');
|
|
30
30
|
}
|
|
31
31
|
const { host, pathname } = new URL(registry);
|
|
32
|
-
execSync(`npm config set //${host}${pathname}:_authToken "${npm_token}"`);
|
|
32
|
+
execSync(`npm config set --no-workspaces //${host}${pathname}:_authToken "${npm_token}"`);
|
|
33
33
|
res.writeHead(302, {
|
|
34
34
|
Location: `${redirect_uri}?${new URLSearchParams({
|
|
35
35
|
username,
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport url from 'url';\nimport http from 'http';\nimport open from 'open';\nimport yargs, { Arguments } from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nimport { execSync } from 'child_process';\n\nconst argv = yargs(hideBin(process.argv)).argv as Arguments<{ registry?: string }>;\n\nconst registry = (argv.registry ?? execSync('npm config get registry').toString())\n .trim()\n .replace(/\\/?$/, '/');\n\nif (registry.includes('registry.npmjs.org')) {\n throw new Error('This is incompatible with the default npm repository.');\n}\n\nopen(registry + 'oauth/authorize');\n\nhttp.createServer((req, res) => {\n if (!req.url) {\n throw new Error('Request URL is not defined!');\n }\n\n const {\n query: { username, jwt_token, npm_token, redirect_uri },\n } = url.parse(req.url, true);\n\n if (typeof username !== 'string') {\n throw new Error('\"username\" should be a string value!');\n }\n\n if (typeof jwt_token !== 'string') {\n throw new Error('\"jwt_token\" should be a string value!');\n }\n\n if (typeof npm_token !== 'string') {\n throw new Error('\"npm_token\" should be a string value!');\n }\n\n if (typeof redirect_uri !== 'string') {\n throw new Error('\"redirect_uri\" should be a string value!');\n }\n\n const { host, pathname } = new URL(registry);\n\n execSync(`npm config set //${host}${pathname}:_authToken \"${npm_token}\"`);\n\n res.writeHead(302, {\n Location: `${redirect_uri}?${new URLSearchParams({\n username,\n token: jwt_token,\n }).toString()}`,\n });\n res.end(() => {\n process.exit(0);\n });\n}).listen(8239);\n"],"names":["url","http","open","yargs","hideBin","execSync","argv","process","registry","toString","trim","replace","includes","Error","createServer","req","res","query","username","jwt_token","npm_token","redirect_uri","parse","host","pathname","URL","writeHead","Location","URLSearchParams","token","end","exit","listen"],"mappings":"AAAA,uDAAuD,GACvD,OAAOA,SAAS,MAAM;AACtB,OAAOC,UAAU,OAAO;AACxB,OAAOC,UAAU,OAAO;AACxB,OAAOC,WAA0B,QAAQ;AACzC,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,QAAQ,QAAQ,gBAAgB;AAEzC,MAAMC,OAAOH,MAAMC,QAAQG,QAAQD,IAAI,GAAGA,IAAI;IAE5BA;AAAlB,MAAME,WAAW,AAACF,CAAAA,CAAAA,iBAAAA,KAAKE,QAAQ,cAAbF,4BAAAA,iBAAiBD,SAAS,2BAA2BI,QAAQ,EAAC,EAC3EC,IAAI,GACJC,OAAO,CAAC,QAAQ;AAErB,IAAIH,SAASI,QAAQ,CAAC,uBAAuB;IACzC,MAAM,IAAIC,MAAM;AACpB;AAEAX,KAAKM,WAAW;AAEhBP,KAAKa,YAAY,CAAC,CAACC,KAAKC;IACpB,IAAI,CAACD,IAAIf,GAAG,EAAE;QACV,MAAM,IAAIa,MAAM;IACpB;IAEA,MAAM,EACFI,OAAO,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,SAAS,EAAEC,YAAY,EAAE,EAC1D,GAAGrB,IAAIsB,KAAK,CAACP,IAAIf,GAAG,EAAE;IAEvB,IAAI,OAAOkB,aAAa,UAAU;QAC9B,MAAM,IAAIL,MAAM;IACpB;IAEA,IAAI,OAAOM,cAAc,UAAU;QAC/B,MAAM,IAAIN,MAAM;IACpB;IAEA,IAAI,OAAOO,cAAc,UAAU;QAC/B,MAAM,IAAIP,MAAM;IACpB;IAEA,IAAI,OAAOQ,iBAAiB,UAAU;QAClC,MAAM,IAAIR,MAAM;IACpB;IAEA,MAAM,EAAEU,IAAI,EAAEC,QAAQ,EAAE,GAAG,IAAIC,IAAIjB;IAEnCH,SAAS,CAAC,
|
|
1
|
+
{"version":3,"sources":["../src/cli.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport url from 'url';\nimport http from 'http';\nimport open from 'open';\nimport yargs, { Arguments } from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nimport { execSync } from 'child_process';\n\nconst argv = yargs(hideBin(process.argv)).argv as Arguments<{ registry?: string }>;\n\nconst registry = (argv.registry ?? execSync('npm config get registry').toString())\n .trim()\n .replace(/\\/?$/, '/');\n\nif (registry.includes('registry.npmjs.org')) {\n throw new Error('This is incompatible with the default npm repository.');\n}\n\nopen(registry + 'oauth/authorize');\n\nhttp.createServer((req, res) => {\n if (!req.url) {\n throw new Error('Request URL is not defined!');\n }\n\n const {\n query: { username, jwt_token, npm_token, redirect_uri },\n } = url.parse(req.url, true);\n\n if (typeof username !== 'string') {\n throw new Error('\"username\" should be a string value!');\n }\n\n if (typeof jwt_token !== 'string') {\n throw new Error('\"jwt_token\" should be a string value!');\n }\n\n if (typeof npm_token !== 'string') {\n throw new Error('\"npm_token\" should be a string value!');\n }\n\n if (typeof redirect_uri !== 'string') {\n throw new Error('\"redirect_uri\" should be a string value!');\n }\n\n const { host, pathname } = new URL(registry);\n\n execSync(`npm config set --no-workspaces //${host}${pathname}:_authToken \"${npm_token}\"`);\n\n res.writeHead(302, {\n Location: `${redirect_uri}?${new URLSearchParams({\n username,\n token: jwt_token,\n }).toString()}`,\n });\n res.end(() => {\n process.exit(0);\n });\n}).listen(8239);\n"],"names":["url","http","open","yargs","hideBin","execSync","argv","process","registry","toString","trim","replace","includes","Error","createServer","req","res","query","username","jwt_token","npm_token","redirect_uri","parse","host","pathname","URL","writeHead","Location","URLSearchParams","token","end","exit","listen"],"mappings":"AAAA,uDAAuD,GACvD,OAAOA,SAAS,MAAM;AACtB,OAAOC,UAAU,OAAO;AACxB,OAAOC,UAAU,OAAO;AACxB,OAAOC,WAA0B,QAAQ;AACzC,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,QAAQ,QAAQ,gBAAgB;AAEzC,MAAMC,OAAOH,MAAMC,QAAQG,QAAQD,IAAI,GAAGA,IAAI;IAE5BA;AAAlB,MAAME,WAAW,AAACF,CAAAA,CAAAA,iBAAAA,KAAKE,QAAQ,cAAbF,4BAAAA,iBAAiBD,SAAS,2BAA2BI,QAAQ,EAAC,EAC3EC,IAAI,GACJC,OAAO,CAAC,QAAQ;AAErB,IAAIH,SAASI,QAAQ,CAAC,uBAAuB;IACzC,MAAM,IAAIC,MAAM;AACpB;AAEAX,KAAKM,WAAW;AAEhBP,KAAKa,YAAY,CAAC,CAACC,KAAKC;IACpB,IAAI,CAACD,IAAIf,GAAG,EAAE;QACV,MAAM,IAAIa,MAAM;IACpB;IAEA,MAAM,EACFI,OAAO,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,SAAS,EAAEC,YAAY,EAAE,EAC1D,GAAGrB,IAAIsB,KAAK,CAACP,IAAIf,GAAG,EAAE;IAEvB,IAAI,OAAOkB,aAAa,UAAU;QAC9B,MAAM,IAAIL,MAAM;IACpB;IAEA,IAAI,OAAOM,cAAc,UAAU;QAC/B,MAAM,IAAIN,MAAM;IACpB;IAEA,IAAI,OAAOO,cAAc,UAAU;QAC/B,MAAM,IAAIP,MAAM;IACpB;IAEA,IAAI,OAAOQ,iBAAiB,UAAU;QAClC,MAAM,IAAIR,MAAM;IACpB;IAEA,MAAM,EAAEU,IAAI,EAAEC,QAAQ,EAAE,GAAG,IAAIC,IAAIjB;IAEnCH,SAAS,CAAC,iCAAiC,EAAEkB,OAAOC,SAAS,aAAa,EAAEJ,UAAU,CAAC,CAAC;IAExFJ,IAAIU,SAAS,CAAC,KAAK;QACfC,UAAU,GAAGN,aAAa,CAAC,EAAE,IAAIO,gBAAgB;YAC7CV;YACAW,OAAOV;QACX,GAAGV,QAAQ,IAAI;IACnB;IACAO,IAAIc,GAAG,CAAC;QACJvB,QAAQwB,IAAI,CAAC;IACjB;AACJ,GAAGC,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "verdaccio-okta-oauth",
|
|
3
|
-
"version": "32.
|
|
3
|
+
"version": "32.7.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"cli": {
|
|
36
36
|
"webpack": false
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "673fb6b56865da309c09f91b4ebf30aaf815a562"
|
|
39
39
|
}
|
package/src/cli.ts
CHANGED
|
@@ -45,7 +45,7 @@ http.createServer((req, res) => {
|
|
|
45
45
|
|
|
46
46
|
const { host, pathname } = new URL(registry);
|
|
47
47
|
|
|
48
|
-
execSync(`npm config set //${host}${pathname}:_authToken "${npm_token}"`);
|
|
48
|
+
execSync(`npm config set --no-workspaces //${host}${pathname}:_authToken "${npm_token}"`);
|
|
49
49
|
|
|
50
50
|
res.writeHead(302, {
|
|
51
51
|
Location: `${redirect_uri}?${new URLSearchParams({
|