@node-cli/npmrc 1.1.1 → 1.2.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/npmrc.js +2 -0
- package/dist/npmrc.js.map +1 -1
- package/dist/utilities/createProfile.d.ts +2 -3
- package/dist/utilities/createProfile.js +4 -3
- package/dist/utilities/createProfile.js.map +1 -1
- package/dist/utilities/deleteProfile.d.ts +0 -2
- package/dist/utilities/deleteProfile.js +3 -2
- package/dist/utilities/deleteProfile.js.map +1 -1
- package/dist/utilities/listProfiles.d.ts +0 -2
- package/dist/utilities/listProfiles.js +3 -2
- package/dist/utilities/listProfiles.js.map +1 -1
- package/dist/utilities/switchProfile.d.ts +0 -2
- package/dist/utilities/switchProfile.js +16 -3
- package/dist/utilities/switchProfile.js.map +1 -1
- package/dist/utilities/updateProfile.d.ts +2 -3
- package/dist/utilities/updateProfile.js +4 -3
- package/dist/utilities/updateProfile.js.map +1 -1
- package/package.json +2 -2
package/dist/npmrc.js
CHANGED
|
@@ -12,6 +12,7 @@ const NPMRC_STORE_CONFIG = path.join(HOME, "/.envtools/npmrcs.json");
|
|
|
12
12
|
const { parameters, flags, showHelp } = config;
|
|
13
13
|
if (flags.create && parameters !== undefined) {
|
|
14
14
|
const exitFlag = await createProfile({
|
|
15
|
+
flags,
|
|
15
16
|
storeConfig: NPMRC_STORE_CONFIG,
|
|
16
17
|
storeLocation: NPMRC_STORE,
|
|
17
18
|
profileName: parameters["0"],
|
|
@@ -21,6 +22,7 @@ if (flags.create && parameters !== undefined) {
|
|
|
21
22
|
}
|
|
22
23
|
if (flags.update && parameters !== undefined) {
|
|
23
24
|
const exitFlag = await updateProfile({
|
|
25
|
+
flags,
|
|
24
26
|
storeConfig: NPMRC_STORE_CONFIG,
|
|
25
27
|
storeLocation: NPMRC_STORE,
|
|
26
28
|
homeLocation: HOME
|
package/dist/npmrc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/npmrc.ts"],"sourcesContent":["#!/usr/bin/env node\n/* istanbul ignore file */\n\nimport { config } from \"./parse.js\";\nimport { createProfile } from \"./utilities/createProfile.js\";\nimport { deleteProfile } from \"./utilities/deleteProfile.js\";\nimport { listProfiles } from \"./utilities/listProfiles.js\";\nimport path from \"node:path\";\nimport { switchProfile } from \"./utilities/switchProfile.js\";\nimport { updateProfile } from \"./utilities/updateProfile.js\";\n\nconst HOME = process.env.HOME;\nconst NPMRC_STORE = path.join(HOME, \".envtools/npmrcs\");\nconst NPMRC_STORE_CONFIG = path.join(HOME, \"/.envtools/npmrcs.json\");\n\nconst { parameters, flags, showHelp } = config;\n\nif (flags.create && parameters !== undefined) {\n\tconst exitFlag = await createProfile({\n\t\tstoreConfig: NPMRC_STORE_CONFIG,\n\t\tstoreLocation: NPMRC_STORE,\n\t\tprofileName: parameters[\"0\"],\n\t\thomeLocation: HOME,\n\t});\n\tprocess.exit(exitFlag);\n}\n\nif (flags.update && parameters !== undefined) {\n\tconst exitFlag = await updateProfile({\n\t\tstoreConfig: NPMRC_STORE_CONFIG,\n\t\tstoreLocation: NPMRC_STORE,\n\t\thomeLocation: HOME,\n\t});\n\tprocess.exit(exitFlag);\n}\n\nif (flags.delete && parameters !== undefined) {\n\tconst exitFlag = await deleteProfile({\n\t\tflags,\n\t\tstoreConfig: NPMRC_STORE_CONFIG,\n\t\tstoreLocation: NPMRC_STORE,\n\t\tprofileName: parameters[\"0\"],\n\t});\n\tprocess.exit(exitFlag);\n}\n\nif (parameters !== undefined && parameters[\"0\"] !== undefined) {\n\tconst exitFlag = await switchProfile({\n\t\tflags,\n\t\tstoreConfig: NPMRC_STORE_CONFIG,\n\t\tstoreLocation: NPMRC_STORE,\n\t\tprofileName: parameters[\"0\"],\n\t\thomeLocation: HOME,\n\t});\n\tprocess.exit(exitFlag);\n}\n\nif (flags.list || (!flags.version && !flags.help)) {\n\tconst exitFlag = await listProfiles({\n\t\tflags,\n\t\tstoreConfig: NPMRC_STORE_CONFIG,\n\t});\n\tprocess.exit(exitFlag);\n}\n\nshowHelp();\n"],"names":["config","createProfile","deleteProfile","listProfiles","path","switchProfile","updateProfile","HOME","process","env","NPMRC_STORE","join","NPMRC_STORE_CONFIG","parameters","flags","showHelp","create","undefined","exitFlag","storeConfig","storeLocation","profileName","homeLocation","exit","update","delete","list","version","help"],"mappings":";AACA,wBAAwB,GAExB,SAASA,MAAM,QAAQ,aAAa;AACpC,SAASC,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,YAAY,QAAQ,8BAA8B;AAC3D,OAAOC,UAAU,YAAY;AAC7B,SAASC,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,aAAa,QAAQ,+BAA+B;AAE7D,MAAMC,OAAOC,QAAQC,GAAG,CAACF,IAAI;AAC7B,MAAMG,cAAcN,KAAKO,IAAI,CAACJ,MAAM;AACpC,MAAMK,qBAAqBR,KAAKO,IAAI,CAACJ,MAAM;AAE3C,MAAM,EAAEM,UAAU,EAAEC,KAAK,EAAEC,QAAQ,EAAE,GAAGf;AAExC,IAAIc,MAAME,MAAM,IAAIH,eAAeI,WAAW;IAC7C,MAAMC,WAAW,MAAMjB,cAAc;
|
|
1
|
+
{"version":3,"sources":["../src/npmrc.ts"],"sourcesContent":["#!/usr/bin/env node\n/* istanbul ignore file */\n\nimport { config } from \"./parse.js\";\nimport { createProfile } from \"./utilities/createProfile.js\";\nimport { deleteProfile } from \"./utilities/deleteProfile.js\";\nimport { listProfiles } from \"./utilities/listProfiles.js\";\nimport path from \"node:path\";\nimport { switchProfile } from \"./utilities/switchProfile.js\";\nimport { updateProfile } from \"./utilities/updateProfile.js\";\n\nconst HOME = process.env.HOME;\nconst NPMRC_STORE = path.join(HOME, \".envtools/npmrcs\");\nconst NPMRC_STORE_CONFIG = path.join(HOME, \"/.envtools/npmrcs.json\");\n\nconst { parameters, flags, showHelp } = config;\n\nif (flags.create && parameters !== undefined) {\n\tconst exitFlag = await createProfile({\n\t\tflags,\n\t\tstoreConfig: NPMRC_STORE_CONFIG,\n\t\tstoreLocation: NPMRC_STORE,\n\t\tprofileName: parameters[\"0\"],\n\t\thomeLocation: HOME,\n\t});\n\tprocess.exit(exitFlag);\n}\n\nif (flags.update && parameters !== undefined) {\n\tconst exitFlag = await updateProfile({\n\t\tflags,\n\t\tstoreConfig: NPMRC_STORE_CONFIG,\n\t\tstoreLocation: NPMRC_STORE,\n\t\thomeLocation: HOME,\n\t});\n\tprocess.exit(exitFlag);\n}\n\nif (flags.delete && parameters !== undefined) {\n\tconst exitFlag = await deleteProfile({\n\t\tflags,\n\t\tstoreConfig: NPMRC_STORE_CONFIG,\n\t\tstoreLocation: NPMRC_STORE,\n\t\tprofileName: parameters[\"0\"],\n\t});\n\tprocess.exit(exitFlag);\n}\n\nif (parameters !== undefined && parameters[\"0\"] !== undefined) {\n\tconst exitFlag = await switchProfile({\n\t\tflags,\n\t\tstoreConfig: NPMRC_STORE_CONFIG,\n\t\tstoreLocation: NPMRC_STORE,\n\t\tprofileName: parameters[\"0\"],\n\t\thomeLocation: HOME,\n\t});\n\tprocess.exit(exitFlag);\n}\n\nif (flags.list || (!flags.version && !flags.help)) {\n\tconst exitFlag = await listProfiles({\n\t\tflags,\n\t\tstoreConfig: NPMRC_STORE_CONFIG,\n\t});\n\tprocess.exit(exitFlag);\n}\n\nshowHelp();\n"],"names":["config","createProfile","deleteProfile","listProfiles","path","switchProfile","updateProfile","HOME","process","env","NPMRC_STORE","join","NPMRC_STORE_CONFIG","parameters","flags","showHelp","create","undefined","exitFlag","storeConfig","storeLocation","profileName","homeLocation","exit","update","delete","list","version","help"],"mappings":";AACA,wBAAwB,GAExB,SAASA,MAAM,QAAQ,aAAa;AACpC,SAASC,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,YAAY,QAAQ,8BAA8B;AAC3D,OAAOC,UAAU,YAAY;AAC7B,SAASC,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,aAAa,QAAQ,+BAA+B;AAE7D,MAAMC,OAAOC,QAAQC,GAAG,CAACF,IAAI;AAC7B,MAAMG,cAAcN,KAAKO,IAAI,CAACJ,MAAM;AACpC,MAAMK,qBAAqBR,KAAKO,IAAI,CAACJ,MAAM;AAE3C,MAAM,EAAEM,UAAU,EAAEC,KAAK,EAAEC,QAAQ,EAAE,GAAGf;AAExC,IAAIc,MAAME,MAAM,IAAIH,eAAeI,WAAW;IAC7C,MAAMC,WAAW,MAAMjB,cAAc;QACpCa;QACAK,aAAaP;QACbQ,eAAeV;QACfW,aAAaR,UAAU,CAAC,IAAI;QAC5BS,cAAcf;IACf;IACAC,QAAQe,IAAI,CAACL;AACd;AAEA,IAAIJ,MAAMU,MAAM,IAAIX,eAAeI,WAAW;IAC7C,MAAMC,WAAW,MAAMZ,cAAc;QACpCQ;QACAK,aAAaP;QACbQ,eAAeV;QACfY,cAAcf;IACf;IACAC,QAAQe,IAAI,CAACL;AACd;AAEA,IAAIJ,MAAMW,MAAM,IAAIZ,eAAeI,WAAW;IAC7C,MAAMC,WAAW,MAAMhB,cAAc;QACpCY;QACAK,aAAaP;QACbQ,eAAeV;QACfW,aAAaR,UAAU,CAAC,IAAI;IAC7B;IACAL,QAAQe,IAAI,CAACL;AACd;AAEA,IAAIL,eAAeI,aAAaJ,UAAU,CAAC,IAAI,KAAKI,WAAW;IAC9D,MAAMC,WAAW,MAAMb,cAAc;QACpCS;QACAK,aAAaP;QACbQ,eAAeV;QACfW,aAAaR,UAAU,CAAC,IAAI;QAC5BS,cAAcf;IACf;IACAC,QAAQe,IAAI,CAACL;AACd;AAEA,IAAIJ,MAAMY,IAAI,IAAK,CAACZ,MAAMa,OAAO,IAAI,CAACb,MAAMc,IAAI,EAAG;IAClD,MAAMV,WAAW,MAAMf,aAAa;QACnCW;QACAK,aAAaP;IACd;IACAJ,QAAQe,IAAI,CAACL;AACd;AAEAH"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare const createProfile: ({ storeConfig, storeLocation, profileName, homeLocation, }: {
|
|
1
|
+
export declare const createProfile: ({ flags, storeConfig, storeLocation, profileName, homeLocation, }: {
|
|
2
|
+
flags: any;
|
|
4
3
|
storeConfig: any;
|
|
5
4
|
storeLocation: any;
|
|
6
5
|
profileName: any;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Logger } from "@node-cli/logger";
|
|
2
2
|
import fs from "fs-extra";
|
|
3
|
-
export const
|
|
4
|
-
logger
|
|
5
|
-
|
|
3
|
+
export const createProfile = async ({ flags, storeConfig, storeLocation, profileName, homeLocation })=>{
|
|
4
|
+
const logger = new Logger({
|
|
5
|
+
boring: process.env.NODE_ENV === "test" || flags.boring
|
|
6
|
+
});
|
|
6
7
|
let profiles = {
|
|
7
8
|
available: [],
|
|
8
9
|
enabled: undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/createProfile.ts"],"sourcesContent":["import { Logger } from \"@node-cli/logger\";\nimport fs from \"fs-extra\";\n\nexport const
|
|
1
|
+
{"version":3,"sources":["../../src/utilities/createProfile.ts"],"sourcesContent":["import { Logger } from \"@node-cli/logger\";\nimport fs from \"fs-extra\";\n\nexport const createProfile = async ({\n\tflags,\n\tstoreConfig,\n\tstoreLocation,\n\tprofileName,\n\thomeLocation,\n}) => {\n\tconst logger = new Logger({\n\t\tboring: process.env.NODE_ENV === \"test\" || flags.boring,\n\t});\n\n\tlet profiles = { available: [], enabled: undefined };\n\tawait fs.ensureFile(storeConfig);\n\ttry {\n\t\t// if the profile already exists, do nothing\n\t\tprofiles = await fs.readJson(storeConfig);\n\t\tif (profiles.available.includes(profileName)) {\n\t\t\tlogger.warn(`Profile '${profileName}' already exists...`);\n\t\t\treturn 0;\n\t\t}\n\t} catch {\n\t\t// ignoring error since we are going to create the file\n\t}\n\n\t/**\n\t * If the profile does not exist, create a folder named as\n\t * the profile under the storeLocation folder, with the\n\t * existing npmrc / yarnrc files.\n\t */\n\tawait fs.ensureDir(`${storeLocation}/${profileName}`);\n\t// copy the existing npmrc / yarnrc files to the new folder\n\tconst NPMRC = `${homeLocation}/.npmrc`;\n\tconst YARNRC = `${homeLocation}/.yarnrc`;\n\tif (await fs.pathExists(YARNRC)) {\n\t\tawait fs.copy(YARNRC, `${storeLocation}/${profileName}/yarnrc`);\n\t}\n\tif (await fs.pathExists(NPMRC)) {\n\t\tawait fs.copy(NPMRC, `${storeLocation}/${profileName}/npmrc`);\n\t}\n\t// then add the profile to the configuration file\n\tconst newProfiles = {\n\t\tavailable: [...profiles.available, profileName],\n\t\tenabled: profiles.enabled ?? profileName,\n\t};\n\tawait fs.writeJson(storeConfig, newProfiles, { spaces: 2 });\n\tlogger.printBox(`Profile '${profileName}' created`, {\n\t\ttextAlignment: \"left\",\n\t\ttitle: \"Profiles\",\n\t\tborderColor: \"blue\",\n\t});\n\treturn 0;\n};\n"],"names":["Logger","fs","createProfile","flags","storeConfig","storeLocation","profileName","homeLocation","logger","boring","process","env","NODE_ENV","profiles","available","enabled","undefined","ensureFile","readJson","includes","warn","ensureDir","NPMRC","YARNRC","pathExists","copy","newProfiles","writeJson","spaces","printBox","textAlignment","title","borderColor"],"mappings":"AAAA,SAASA,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,QAAQ,WAAW;AAE1B,OAAO,MAAMC,gBAAgB,OAAO,EACnCC,KAAK,EACLC,WAAW,EACXC,aAAa,EACbC,WAAW,EACXC,YAAY,EACZ;IACA,MAAMC,SAAS,IAAIR,OAAO;QACzBS,QAAQC,QAAQC,GAAG,CAACC,QAAQ,KAAK,UAAUT,MAAMM,MAAM;IACxD;IAEA,IAAII,WAAW;QAAEC,WAAW,EAAE;QAAEC,SAASC;IAAU;IACnD,MAAMf,GAAGgB,UAAU,CAACb;IACpB,IAAI;QACH,4CAA4C;QAC5CS,WAAW,MAAMZ,GAAGiB,QAAQ,CAACd;QAC7B,IAAIS,SAASC,SAAS,CAACK,QAAQ,CAACb,cAAc;YAC7CE,OAAOY,IAAI,CAAC,CAAC,SAAS,EAAEd,YAAY,mBAAmB,CAAC;YACxD,OAAO;QACR;IACD,EAAE,OAAM;IACP,uDAAuD;IACxD;IAEA;;;;EAIC,GACD,MAAML,GAAGoB,SAAS,CAAC,CAAC,EAAEhB,cAAc,CAAC,EAAEC,YAAY,CAAC;IACpD,2DAA2D;IAC3D,MAAMgB,QAAQ,CAAC,EAAEf,aAAa,OAAO,CAAC;IACtC,MAAMgB,SAAS,CAAC,EAAEhB,aAAa,QAAQ,CAAC;IACxC,IAAI,MAAMN,GAAGuB,UAAU,CAACD,SAAS;QAChC,MAAMtB,GAAGwB,IAAI,CAACF,QAAQ,CAAC,EAAElB,cAAc,CAAC,EAAEC,YAAY,OAAO,CAAC;IAC/D;IACA,IAAI,MAAML,GAAGuB,UAAU,CAACF,QAAQ;QAC/B,MAAMrB,GAAGwB,IAAI,CAACH,OAAO,CAAC,EAAEjB,cAAc,CAAC,EAAEC,YAAY,MAAM,CAAC;IAC7D;IACA,iDAAiD;IACjD,MAAMoB,cAAc;QACnBZ,WAAW;eAAID,SAASC,SAAS;YAAER;SAAY;QAC/CS,SAASF,SAASE,OAAO,IAAIT;IAC9B;IACA,MAAML,GAAG0B,SAAS,CAACvB,aAAasB,aAAa;QAAEE,QAAQ;IAAE;IACzDpB,OAAOqB,QAAQ,CAAC,CAAC,SAAS,EAAEvB,YAAY,SAAS,CAAC,EAAE;QACnDwB,eAAe;QACfC,OAAO;QACPC,aAAa;IACd;IACA,OAAO;AACR,EAAE"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Logger } from "@node-cli/logger";
|
|
2
2
|
import fs from "fs-extra";
|
|
3
|
-
export const logger = new Logger();
|
|
4
|
-
logger.boring = process.env.NODE_ENV === "test";
|
|
5
3
|
export const deleteProfile = async ({ flags, profileName, storeConfig, storeLocation })=>{
|
|
4
|
+
const logger = new Logger({
|
|
5
|
+
boring: process.env.NODE_ENV === "test" || flags.boring
|
|
6
|
+
});
|
|
6
7
|
try {
|
|
7
8
|
const profiles = await fs.readJson(storeConfig);
|
|
8
9
|
if (!profiles.available.includes(profileName)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/deleteProfile.ts"],"sourcesContent":["import { Logger } from \"@node-cli/logger\";\nimport fs from \"fs-extra\";\n\nexport const
|
|
1
|
+
{"version":3,"sources":["../../src/utilities/deleteProfile.ts"],"sourcesContent":["import { Logger } from \"@node-cli/logger\";\nimport fs from \"fs-extra\";\n\nexport const deleteProfile = async ({\n\tflags,\n\tprofileName,\n\tstoreConfig,\n\tstoreLocation,\n}) => {\n\tconst logger = new Logger({\n\t\tboring: process.env.NODE_ENV === \"test\" || flags.boring,\n\t});\n\n\ttry {\n\t\tconst profiles = await fs.readJson(storeConfig);\n\t\tif (!profiles.available.includes(profileName)) {\n\t\t\tlogger.error(`Profile '${profileName}' does not exist`);\n\t\t\treturn 1;\n\t\t}\n\t\t// if the profile is enabled, do nothing\n\t\tif (profiles.enabled === profileName) {\n\t\t\tlogger.error(`Profile '${profileName}' is currently active`);\n\t\t\treturn 1;\n\t\t}\n\t\t// if profile exists, delete it by removing the profile folder\n\t\tawait fs.remove(`${storeLocation}/${profileName}`);\n\t\t// then remove the profile from the configuration file\n\t\tconst newProfiles = {\n\t\t\tavailable: profiles.available.filter(\n\t\t\t\t(profile: any) => profile !== profileName,\n\t\t\t),\n\t\t\tenabled: profiles.enabled,\n\t\t};\n\t\tawait fs.writeJson(storeConfig, newProfiles, { spaces: 2 });\n\t\tlogger.printBox(`Profile '${profileName}' deleted`, {\n\t\t\ttextAlignment: \"left\",\n\t\t\ttitle: \"Profiles\",\n\t\t\tborderColor: \"blue\",\n\t\t});\n\t\treturn 0;\n\t} catch (error) {\n\t\tif (flags.verbose) {\n\t\t\tlogger.log(error);\n\t\t}\n\t\tlogger.error(\"Could not delete profile\");\n\t\treturn 1;\n\t}\n};\n"],"names":["Logger","fs","deleteProfile","flags","profileName","storeConfig","storeLocation","logger","boring","process","env","NODE_ENV","profiles","readJson","available","includes","error","enabled","remove","newProfiles","filter","profile","writeJson","spaces","printBox","textAlignment","title","borderColor","verbose","log"],"mappings":"AAAA,SAASA,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,QAAQ,WAAW;AAE1B,OAAO,MAAMC,gBAAgB,OAAO,EACnCC,KAAK,EACLC,WAAW,EACXC,WAAW,EACXC,aAAa,EACb;IACA,MAAMC,SAAS,IAAIP,OAAO;QACzBQ,QAAQC,QAAQC,GAAG,CAACC,QAAQ,KAAK,UAAUR,MAAMK,MAAM;IACxD;IAEA,IAAI;QACH,MAAMI,WAAW,MAAMX,GAAGY,QAAQ,CAACR;QACnC,IAAI,CAACO,SAASE,SAAS,CAACC,QAAQ,CAACX,cAAc;YAC9CG,OAAOS,KAAK,CAAC,CAAC,SAAS,EAAEZ,YAAY,gBAAgB,CAAC;YACtD,OAAO;QACR;QACA,wCAAwC;QACxC,IAAIQ,SAASK,OAAO,KAAKb,aAAa;YACrCG,OAAOS,KAAK,CAAC,CAAC,SAAS,EAAEZ,YAAY,qBAAqB,CAAC;YAC3D,OAAO;QACR;QACA,8DAA8D;QAC9D,MAAMH,GAAGiB,MAAM,CAAC,CAAC,EAAEZ,cAAc,CAAC,EAAEF,YAAY,CAAC;QACjD,sDAAsD;QACtD,MAAMe,cAAc;YACnBL,WAAWF,SAASE,SAAS,CAACM,MAAM,CACnC,CAACC,UAAiBA,YAAYjB;YAE/Ba,SAASL,SAASK,OAAO;QAC1B;QACA,MAAMhB,GAAGqB,SAAS,CAACjB,aAAac,aAAa;YAAEI,QAAQ;QAAE;QACzDhB,OAAOiB,QAAQ,CAAC,CAAC,SAAS,EAAEpB,YAAY,SAAS,CAAC,EAAE;YACnDqB,eAAe;YACfC,OAAO;YACPC,aAAa;QACd;QACA,OAAO;IACR,EAAE,OAAOX,OAAO;QACf,IAAIb,MAAMyB,OAAO,EAAE;YAClBrB,OAAOsB,GAAG,CAACb;QACZ;QACAT,OAAOS,KAAK,CAAC;QACb,OAAO;IACR;AACD,EAAE"}
|
|
@@ -3,9 +3,10 @@ import { Logger } from "@node-cli/logger";
|
|
|
3
3
|
import fs from "fs-extra";
|
|
4
4
|
import kleur from "kleur";
|
|
5
5
|
import { run } from "@node-cli/run";
|
|
6
|
-
export const logger = new Logger();
|
|
7
|
-
logger.boring = process.env.NODE_ENV === "test";
|
|
8
6
|
export const listProfiles = async ({ flags, storeConfig })=>{
|
|
7
|
+
const logger = new Logger({
|
|
8
|
+
boring: process.env.NODE_ENV === "test" || flags.boring
|
|
9
|
+
});
|
|
9
10
|
try {
|
|
10
11
|
const profiles = await fs.readJson(storeConfig);
|
|
11
12
|
if (profiles?.available?.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/listProfiles.ts"],"sourcesContent":["import { GET_REGISTRY_CMD, formatRegistries } from \"./common.js\";\n\nimport { Logger } from \"@node-cli/logger\";\nimport fs from \"fs-extra\";\nimport kleur from \"kleur\";\nimport { run } from \"@node-cli/run\";\n\nexport const logger = new Logger(
|
|
1
|
+
{"version":3,"sources":["../../src/utilities/listProfiles.ts"],"sourcesContent":["import { GET_REGISTRY_CMD, formatRegistries } from \"./common.js\";\n\nimport { Logger } from \"@node-cli/logger\";\nimport fs from \"fs-extra\";\nimport kleur from \"kleur\";\nimport { run } from \"@node-cli/run\";\n\nexport const listProfiles = async ({ flags, storeConfig }) => {\n\tconst logger = new Logger({\n\t\tboring: process.env.NODE_ENV === \"test\" || flags.boring,\n\t});\n\n\ttry {\n\t\tconst profiles = await fs.readJson(storeConfig);\n\n\t\tif (profiles?.available?.length > 0) {\n\t\t\tconst activeProfile = profiles.enabled;\n\t\t\tconst messages =\n\t\t\t\tactiveProfile === undefined\n\t\t\t\t\t? []\n\t\t\t\t\t: [kleur.green(`★ ${activeProfile} (active)`)];\n\n\t\t\t/**\n\t\t\t * Since there is an active profile, we can check the\n\t\t\t * global registries and list them, alongside the active profile.\n\t\t\t */\n\t\t\tif (activeProfile) {\n\t\t\t\tconst { stdout, stderr } = await run(GET_REGISTRY_CMD, {\n\t\t\t\t\tignoreError: true,\n\t\t\t\t});\n\n\t\t\t\tif (!stderr) {\n\t\t\t\t\tmessages.push(...formatRegistries(stdout as string));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const profile of profiles.available) {\n\t\t\t\tif (profile !== activeProfile) {\n\t\t\t\t\tmessages.push(`${profile}`);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlogger.printBox(messages.join(\"\\n\"), {\n\t\t\t\ttextAlignment: \"left\",\n\t\t\t\ttitle: \"Profiles\",\n\t\t\t\tborderColor: \"blue\",\n\t\t\t});\n\t\t} else {\n\t\t\tlogger.warn(\"No profiles found\");\n\t\t}\n\t\treturn 0;\n\t} catch (error) {\n\t\tif (flags.verbose) {\n\t\t\tlogger.log(error);\n\t\t}\n\t\tlogger.error(\"Unable to read the profile configuration file\");\n\t\treturn 1;\n\t}\n};\n"],"names":["GET_REGISTRY_CMD","formatRegistries","Logger","fs","kleur","run","listProfiles","flags","storeConfig","logger","boring","process","env","NODE_ENV","profiles","readJson","available","length","activeProfile","enabled","messages","undefined","green","stdout","stderr","ignoreError","push","profile","printBox","join","textAlignment","title","borderColor","warn","error","verbose","log"],"mappings":"AAAA,SAASA,gBAAgB,EAAEC,gBAAgB,QAAQ,cAAc;AAEjE,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,QAAQ,WAAW;AAC1B,OAAOC,WAAW,QAAQ;AAC1B,SAASC,GAAG,QAAQ,gBAAgB;AAEpC,OAAO,MAAMC,eAAe,OAAO,EAAEC,KAAK,EAAEC,WAAW,EAAE;IACxD,MAAMC,SAAS,IAAIP,OAAO;QACzBQ,QAAQC,QAAQC,GAAG,CAACC,QAAQ,KAAK,UAAUN,MAAMG,MAAM;IACxD;IAEA,IAAI;QACH,MAAMI,WAAW,MAAMX,GAAGY,QAAQ,CAACP;QAEnC,IAAIM,UAAUE,WAAWC,SAAS,GAAG;YACpC,MAAMC,gBAAgBJ,SAASK,OAAO;YACtC,MAAMC,WACLF,kBAAkBG,YACf,EAAE,GACF;gBAACjB,MAAMkB,KAAK,CAAC,CAAC,EAAE,EAAEJ,cAAc,SAAS,CAAC;aAAE;YAEhD;;;IAGC,GACD,IAAIA,eAAe;gBAClB,MAAM,EAAEK,MAAM,EAAEC,MAAM,EAAE,GAAG,MAAMnB,IAAIL,kBAAkB;oBACtDyB,aAAa;gBACd;gBAEA,IAAI,CAACD,QAAQ;oBACZJ,SAASM,IAAI,IAAIzB,iBAAiBsB;gBACnC;YACD;YAEA,KAAK,MAAMI,WAAWb,SAASE,SAAS,CAAE;gBACzC,IAAIW,YAAYT,eAAe;oBAC9BE,SAASM,IAAI,CAAC,CAAC,EAAEC,QAAQ,CAAC;gBAC3B;YACD;YAEAlB,OAAOmB,QAAQ,CAACR,SAASS,IAAI,CAAC,OAAO;gBACpCC,eAAe;gBACfC,OAAO;gBACPC,aAAa;YACd;QACD,OAAO;YACNvB,OAAOwB,IAAI,CAAC;QACb;QACA,OAAO;IACR,EAAE,OAAOC,OAAO;QACf,IAAI3B,MAAM4B,OAAO,EAAE;YAClB1B,OAAO2B,GAAG,CAACF;QACZ;QACAzB,OAAOyB,KAAK,CAAC;QACb,OAAO;IACR;AACD,EAAE"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { GET_REGISTRY_CMD, formatRegistries } from "./common.js";
|
|
1
2
|
import { Logger } from "@node-cli/logger";
|
|
2
3
|
import fs from "fs-extra";
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
import kleur from "kleur";
|
|
5
|
+
import { run } from "@node-cli/run";
|
|
5
6
|
export const switchProfile = async ({ flags, storeConfig, storeLocation, profileName, homeLocation })=>{
|
|
7
|
+
const logger = new Logger({
|
|
8
|
+
boring: process.env.NODE_ENV === "test" || flags.boring
|
|
9
|
+
});
|
|
6
10
|
try {
|
|
7
11
|
const profiles = await fs.readJson(storeConfig);
|
|
8
12
|
if (!profiles.available.includes(profileName)) {
|
|
@@ -41,7 +45,16 @@ export const switchProfile = async ({ flags, storeConfig, storeLocation, profile
|
|
|
41
45
|
await fs.writeJson(storeConfig, newProfiles, {
|
|
42
46
|
spaces: 2
|
|
43
47
|
});
|
|
44
|
-
|
|
48
|
+
const messages = [
|
|
49
|
+
kleur.green(`Profile switched to '${profileName}'`)
|
|
50
|
+
];
|
|
51
|
+
const { stdout, stderr } = await run(GET_REGISTRY_CMD, {
|
|
52
|
+
ignoreError: true
|
|
53
|
+
});
|
|
54
|
+
if (!stderr) {
|
|
55
|
+
messages.push(...formatRegistries(stdout));
|
|
56
|
+
}
|
|
57
|
+
logger.printBox(messages.join("\n"), {
|
|
45
58
|
textAlignment: "left",
|
|
46
59
|
title: "Profiles",
|
|
47
60
|
borderColor: "blue"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/switchProfile.ts"],"sourcesContent":["import { Logger } from \"@node-cli/logger\";\nimport fs from \"fs-extra\";\
|
|
1
|
+
{"version":3,"sources":["../../src/utilities/switchProfile.ts"],"sourcesContent":["import { GET_REGISTRY_CMD, formatRegistries } from \"./common.js\";\n\nimport { Logger } from \"@node-cli/logger\";\nimport fs from \"fs-extra\";\nimport kleur from \"kleur\";\nimport { run } from \"@node-cli/run\";\n\nexport const switchProfile = async ({\n\tflags,\n\tstoreConfig,\n\tstoreLocation,\n\tprofileName,\n\thomeLocation,\n}) => {\n\tconst logger = new Logger({\n\t\tboring: process.env.NODE_ENV === \"test\" || flags.boring,\n\t});\n\n\ttry {\n\t\tconst profiles = await fs.readJson(storeConfig);\n\t\tif (!profiles.available.includes(profileName)) {\n\t\t\tlogger.error(`Profile '${profileName}' does not exist`);\n\t\t\treturn 1;\n\t\t}\n\t\t// if profile is already enabled, do nothing\n\t\tif (profiles.enabled === profileName) {\n\t\t\tlogger.warn(`Profile '${profileName}' is already active`);\n\t\t\treturn 0;\n\t\t}\n\t\t// if profile exists and is not enabled, switch to it by copying\n\t\t// the npmrc and yarnrc files from the profile folder to the home folder\n\t\tconst NPMRC = `${homeLocation}/.npmrc`;\n\t\tconst PROFILE_NPMRC = `${storeLocation}/${profileName}/npmrc`;\n\t\tconst YARNRC = `${homeLocation}/.yarnrc`;\n\t\tconst PROFILE_YARNRC = `${storeLocation}/${profileName}/yarnrc`;\n\n\t\tif (await fs.pathExists(PROFILE_NPMRC)) {\n\t\t\tawait fs.copy(PROFILE_NPMRC, NPMRC, {\n\t\t\t\toverwrite: true,\n\t\t\t});\n\t\t} else {\n\t\t\tlogger.warn(`No npmrc file found for profile '${profileName}'`);\n\t\t}\n\t\tif (await fs.pathExists(PROFILE_YARNRC)) {\n\t\t\tawait fs.copy(PROFILE_YARNRC, YARNRC, {\n\t\t\t\toverwrite: true,\n\t\t\t});\n\t\t} else {\n\t\t\tlogger.warn(`No yarnrc file found for profile '${profileName}'`);\n\t\t}\n\n\t\tconst newProfiles = {\n\t\t\tavailable: profiles.available,\n\t\t\tenabled: profileName,\n\t\t};\n\t\tawait fs.writeJson(storeConfig, newProfiles, { spaces: 2 });\n\t\tconst messages = [kleur.green(`Profile switched to '${profileName}'`)];\n\t\tconst { stdout, stderr } = await run(GET_REGISTRY_CMD, {\n\t\t\tignoreError: true,\n\t\t});\n\t\tif (!stderr) {\n\t\t\tmessages.push(...formatRegistries(stdout as string));\n\t\t}\n\t\tlogger.printBox(messages.join(\"\\n\"), {\n\t\t\ttextAlignment: \"left\",\n\t\t\ttitle: \"Profiles\",\n\t\t\tborderColor: \"blue\",\n\t\t});\n\t\treturn 0;\n\t} catch (error) {\n\t\tif (flags.verbose) {\n\t\t\tlogger.log(error);\n\t\t}\n\t\tlogger.error(\"Could not switch profile\");\n\t\treturn 1;\n\t}\n};\n"],"names":["GET_REGISTRY_CMD","formatRegistries","Logger","fs","kleur","run","switchProfile","flags","storeConfig","storeLocation","profileName","homeLocation","logger","boring","process","env","NODE_ENV","profiles","readJson","available","includes","error","enabled","warn","NPMRC","PROFILE_NPMRC","YARNRC","PROFILE_YARNRC","pathExists","copy","overwrite","newProfiles","writeJson","spaces","messages","green","stdout","stderr","ignoreError","push","printBox","join","textAlignment","title","borderColor","verbose","log"],"mappings":"AAAA,SAASA,gBAAgB,EAAEC,gBAAgB,QAAQ,cAAc;AAEjE,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,QAAQ,WAAW;AAC1B,OAAOC,WAAW,QAAQ;AAC1B,SAASC,GAAG,QAAQ,gBAAgB;AAEpC,OAAO,MAAMC,gBAAgB,OAAO,EACnCC,KAAK,EACLC,WAAW,EACXC,aAAa,EACbC,WAAW,EACXC,YAAY,EACZ;IACA,MAAMC,SAAS,IAAIV,OAAO;QACzBW,QAAQC,QAAQC,GAAG,CAACC,QAAQ,KAAK,UAAUT,MAAMM,MAAM;IACxD;IAEA,IAAI;QACH,MAAMI,WAAW,MAAMd,GAAGe,QAAQ,CAACV;QACnC,IAAI,CAACS,SAASE,SAAS,CAACC,QAAQ,CAACV,cAAc;YAC9CE,OAAOS,KAAK,CAAC,CAAC,SAAS,EAAEX,YAAY,gBAAgB,CAAC;YACtD,OAAO;QACR;QACA,4CAA4C;QAC5C,IAAIO,SAASK,OAAO,KAAKZ,aAAa;YACrCE,OAAOW,IAAI,CAAC,CAAC,SAAS,EAAEb,YAAY,mBAAmB,CAAC;YACxD,OAAO;QACR;QACA,gEAAgE;QAChE,wEAAwE;QACxE,MAAMc,QAAQ,CAAC,EAAEb,aAAa,OAAO,CAAC;QACtC,MAAMc,gBAAgB,CAAC,EAAEhB,cAAc,CAAC,EAAEC,YAAY,MAAM,CAAC;QAC7D,MAAMgB,SAAS,CAAC,EAAEf,aAAa,QAAQ,CAAC;QACxC,MAAMgB,iBAAiB,CAAC,EAAElB,cAAc,CAAC,EAAEC,YAAY,OAAO,CAAC;QAE/D,IAAI,MAAMP,GAAGyB,UAAU,CAACH,gBAAgB;YACvC,MAAMtB,GAAG0B,IAAI,CAACJ,eAAeD,OAAO;gBACnCM,WAAW;YACZ;QACD,OAAO;YACNlB,OAAOW,IAAI,CAAC,CAAC,iCAAiC,EAAEb,YAAY,CAAC,CAAC;QAC/D;QACA,IAAI,MAAMP,GAAGyB,UAAU,CAACD,iBAAiB;YACxC,MAAMxB,GAAG0B,IAAI,CAACF,gBAAgBD,QAAQ;gBACrCI,WAAW;YACZ;QACD,OAAO;YACNlB,OAAOW,IAAI,CAAC,CAAC,kCAAkC,EAAEb,YAAY,CAAC,CAAC;QAChE;QAEA,MAAMqB,cAAc;YACnBZ,WAAWF,SAASE,SAAS;YAC7BG,SAASZ;QACV;QACA,MAAMP,GAAG6B,SAAS,CAACxB,aAAauB,aAAa;YAAEE,QAAQ;QAAE;QACzD,MAAMC,WAAW;YAAC9B,MAAM+B,KAAK,CAAC,CAAC,qBAAqB,EAAEzB,YAAY,CAAC,CAAC;SAAE;QACtE,MAAM,EAAE0B,MAAM,EAAEC,MAAM,EAAE,GAAG,MAAMhC,IAAIL,kBAAkB;YACtDsC,aAAa;QACd;QACA,IAAI,CAACD,QAAQ;YACZH,SAASK,IAAI,IAAItC,iBAAiBmC;QACnC;QACAxB,OAAO4B,QAAQ,CAACN,SAASO,IAAI,CAAC,OAAO;YACpCC,eAAe;YACfC,OAAO;YACPC,aAAa;QACd;QACA,OAAO;IACR,EAAE,OAAOvB,OAAO;QACf,IAAId,MAAMsC,OAAO,EAAE;YAClBjC,OAAOkC,GAAG,CAACzB;QACZ;QACAT,OAAOS,KAAK,CAAC;QACb,OAAO;IACR;AACD,EAAE"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare const updateProfile: ({ storeConfig, storeLocation, homeLocation, }: {
|
|
1
|
+
export declare const updateProfile: ({ flags, storeConfig, storeLocation, homeLocation, }: {
|
|
2
|
+
flags: any;
|
|
4
3
|
storeConfig: any;
|
|
5
4
|
storeLocation: any;
|
|
6
5
|
homeLocation: any;
|
|
@@ -3,9 +3,10 @@ import { Logger } from "@node-cli/logger";
|
|
|
3
3
|
import fs from "fs-extra";
|
|
4
4
|
import kleur from "kleur";
|
|
5
5
|
import { run } from "@node-cli/run";
|
|
6
|
-
export const
|
|
7
|
-
logger
|
|
8
|
-
|
|
6
|
+
export const updateProfile = async ({ flags, storeConfig, storeLocation, homeLocation })=>{
|
|
7
|
+
const logger = new Logger({
|
|
8
|
+
boring: process.env.NODE_ENV === "test" || flags.boring
|
|
9
|
+
});
|
|
9
10
|
let profiles;
|
|
10
11
|
// Step 1: check if there is an active profile
|
|
11
12
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/updateProfile.ts"],"sourcesContent":["import { GET_REGISTRY_CMD, formatRegistries } from \"./common.js\";\n\nimport { Logger } from \"@node-cli/logger\";\nimport fs from \"fs-extra\";\nimport kleur from \"kleur\";\nimport { run } from \"@node-cli/run\";\n\nexport const logger = new Logger(
|
|
1
|
+
{"version":3,"sources":["../../src/utilities/updateProfile.ts"],"sourcesContent":["import { GET_REGISTRY_CMD, formatRegistries } from \"./common.js\";\n\nimport { Logger } from \"@node-cli/logger\";\nimport fs from \"fs-extra\";\nimport kleur from \"kleur\";\nimport { run } from \"@node-cli/run\";\n\nexport const updateProfile = async ({\n\tflags,\n\tstoreConfig,\n\tstoreLocation,\n\thomeLocation,\n}) => {\n\tconst logger = new Logger({\n\t\tboring: process.env.NODE_ENV === \"test\" || flags.boring,\n\t});\n\n\tlet profiles: { available: string | any[]; enabled: any };\n\n\t// Step 1: check if there is an active profile\n\ttry {\n\t\tprofiles = await fs.readJson(storeConfig);\n\t} catch {\n\t\t// ignoring error since we are going to create the file\n\t}\n\n\tif (profiles?.available?.length > 0) {\n\t\tconst profileName = profiles.enabled;\n\t\tif (profileName) {\n\t\t\tconst messages = [kleur.green(`Profile '${profileName}' updated`)];\n\t\t\t/**\n\t\t\t * Step2: since there is an active profile, we can check the\n\t\t\t * global registries and list them, alongside the updated profile.\n\t\t\t */\n\t\t\tconst { stdout, stderr } = await run(GET_REGISTRY_CMD, {\n\t\t\t\tignoreError: true,\n\t\t\t});\n\t\t\tif (!stderr) {\n\t\t\t\tmessages.push(...formatRegistries(stdout as string));\n\t\t\t}\n\n\t\t\t// Step 3: update the active profile\n\t\t\tawait fs.ensureDir(`${storeLocation}/${profileName}`);\n\t\t\t// copy the existing npmrc / yarnrc files to the storage folder\n\t\t\tconst NPMRC = `${homeLocation}/.npmrc`;\n\t\t\tconst YARNRC = `${homeLocation}/.yarnrc`;\n\t\t\tif (await fs.pathExists(YARNRC)) {\n\t\t\t\tawait fs.copy(YARNRC, `${storeLocation}/${profileName}/yarnrc`);\n\t\t\t}\n\t\t\tif (await fs.pathExists(NPMRC)) {\n\t\t\t\tawait fs.copy(NPMRC, `${storeLocation}/${profileName}/npmrc`);\n\t\t\t}\n\t\t\tlogger.printBox(messages.join(\"\\n\"), {\n\t\t\t\ttextAlignment: \"left\",\n\t\t\t\ttitle: \"Profiles\",\n\t\t\t\tborderColor: \"blue\",\n\t\t\t});\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\tlogger.warn(\n\t\t\"Only active profiles can be updated. Please switch to the profile you want to update.\",\n\t);\n\treturn 0;\n};\n"],"names":["GET_REGISTRY_CMD","formatRegistries","Logger","fs","kleur","run","updateProfile","flags","storeConfig","storeLocation","homeLocation","logger","boring","process","env","NODE_ENV","profiles","readJson","available","length","profileName","enabled","messages","green","stdout","stderr","ignoreError","push","ensureDir","NPMRC","YARNRC","pathExists","copy","printBox","join","textAlignment","title","borderColor","warn"],"mappings":"AAAA,SAASA,gBAAgB,EAAEC,gBAAgB,QAAQ,cAAc;AAEjE,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,QAAQ,WAAW;AAC1B,OAAOC,WAAW,QAAQ;AAC1B,SAASC,GAAG,QAAQ,gBAAgB;AAEpC,OAAO,MAAMC,gBAAgB,OAAO,EACnCC,KAAK,EACLC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZ;IACA,MAAMC,SAAS,IAAIT,OAAO;QACzBU,QAAQC,QAAQC,GAAG,CAACC,QAAQ,KAAK,UAAUR,MAAMK,MAAM;IACxD;IAEA,IAAII;IAEJ,8CAA8C;IAC9C,IAAI;QACHA,WAAW,MAAMb,GAAGc,QAAQ,CAACT;IAC9B,EAAE,OAAM;IACP,uDAAuD;IACxD;IAEA,IAAIQ,UAAUE,WAAWC,SAAS,GAAG;QACpC,MAAMC,cAAcJ,SAASK,OAAO;QACpC,IAAID,aAAa;YAChB,MAAME,WAAW;gBAAClB,MAAMmB,KAAK,CAAC,CAAC,SAAS,EAAEH,YAAY,SAAS,CAAC;aAAE;YAClE;;;IAGC,GACD,MAAM,EAAEI,MAAM,EAAEC,MAAM,EAAE,GAAG,MAAMpB,IAAIL,kBAAkB;gBACtD0B,aAAa;YACd;YACA,IAAI,CAACD,QAAQ;gBACZH,SAASK,IAAI,IAAI1B,iBAAiBuB;YACnC;YAEA,oCAAoC;YACpC,MAAMrB,GAAGyB,SAAS,CAAC,CAAC,EAAEnB,cAAc,CAAC,EAAEW,YAAY,CAAC;YACpD,+DAA+D;YAC/D,MAAMS,QAAQ,CAAC,EAAEnB,aAAa,OAAO,CAAC;YACtC,MAAMoB,SAAS,CAAC,EAAEpB,aAAa,QAAQ,CAAC;YACxC,IAAI,MAAMP,GAAG4B,UAAU,CAACD,SAAS;gBAChC,MAAM3B,GAAG6B,IAAI,CAACF,QAAQ,CAAC,EAAErB,cAAc,CAAC,EAAEW,YAAY,OAAO,CAAC;YAC/D;YACA,IAAI,MAAMjB,GAAG4B,UAAU,CAACF,QAAQ;gBAC/B,MAAM1B,GAAG6B,IAAI,CAACH,OAAO,CAAC,EAAEpB,cAAc,CAAC,EAAEW,YAAY,MAAM,CAAC;YAC7D;YACAT,OAAOsB,QAAQ,CAACX,SAASY,IAAI,CAAC,OAAO;gBACpCC,eAAe;gBACfC,OAAO;gBACPC,aAAa;YACd;YACA,OAAO;QACR;IACD;IAEA1B,OAAO2B,IAAI,CACV;IAED,OAAO;AACR,EAAE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-cli/npmrc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"description": "Toggle different npmrc configuration files on the fly",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "fc524a6f6f4de9e52ab5a86cf696ccb961164176"
|
|
38
38
|
}
|