thedesk/app/node_modules/app-builder-lib/out/util/packageMetadata.js.map

2 lines
7.7 KiB
Plaintext
Raw Permalink Normal View History

2019-09-13 00:38:13 +10:00
{"version":3,"sources":["../../src/util/packageMetadata.ts"],"names":[],"mappings":";;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAGA,MAAM,aAAa,GAAG,OAAO,CAAC,wBAAD,CAA7B;AAEA;;;AACO,eAAe,eAAf,CAA+B,IAA/B,EAA2C;AAChD,QAAM,IAAI,GAAG,MAAM,yBAAS,IAAT,CAAnB;AACA,QAAM,OAAO,CAAC,IAAD,EAAO,IAAP,CAAb;AACA,EAAA,aAAa,CAAC,IAAD,CAAb,CAHgD,CAIhD;;AACA,SAAO,IAAI,CAAC,OAAZ;AACA,SAAO,IAAI,CAAC,MAAZ;AACA,SAAO,IAAP;AACD;;AAED,eAAe,OAAf,CAAuB,IAAvB,EAAqC,IAArC,EAA8C;AAC5C,MAAI,IAAI,CAAC,YAAL,IAAqB,IAAzB,EAA+B;AAC7B;AACD;;AAED,MAAI,UAAJ;;AACA,MAAI;AACF,IAAA,UAAU,GAAG,MAAM,yBAAS,IAAI,CAAC,OAAL,CAAa,IAAI,CAAC,OAAL,CAAa,IAAb,CAAb,EAAiC,SAAjC,CAAT,EAAsD,MAAtD,CAAnB;AACD,GAFD,CAGA,OAAO,OAAP,EAAgB;AACd;AACD;;AAED,EAAA,IAAI,CAAC,YAAL,GAAoB,UAAU,CAC3B,KADiB,CACX,QADW,EAEjB,GAFiB,CAEb,EAAE,IAAI,EAAE,CAAC,OAAH,CAAW,UAAX,EAAuB,EAAvB,EAA2B,IAA3B,EAFO,CAApB;AAGD;AAED;;;AACM,SAAU,aAAV,CAAwB,QAAxB,EAA4C,WAA5C,EAAqE,cAArE,EAA6F,iBAA7F,EAAsH;AAC1H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AAX,IAAmB,IAAnB,EAAyB;AACvB,QAAI,IAAI,IAAI,YAAZ,EAA0B;AACxB,MAAA,MAAM,CAAC,IAAP,CAAY,YAAY,IAAI,0CAAhB,GACR,wEADJ;AAED;AACF;AACF,C","sourcesContent":["import { isEmptyOrSpaces, log, InvalidConfigurationError } from \"builder-util\"\nimport { readFile, readJson } from \"fs-extra\"\nimport * as path from \"path\"\nimport * as semver from \"semver\"\nimport { Metadata } from \"..\"\n\nconst normalizeData = require(\"normalize-package-data\")\n\n/** @internal */\nexport async function readPackageJson(file: string): Promise<any> {\n const data = await readJson(file)\n await authors(file, data)\n normalizeData(data)\n // remove not required fields because can be used for remote build\n delete data.scripts\n delete data.readme\n return data\n}\n\nasync function authors(file: string, data: any) {\n if (data.contributors != null) {\n return\n }\n\n let authorData\n try {\n authorData = await readFile(path.resolve(path.dirname(file), \"AUTHORS\"), \"utf8\")\n }\n catch (ignor