UNPKG

1.95 kBSource Map (JSON)View Raw
1{"version":3,"file":"State.js","sourceRoot":"","sources":["../src/State.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAE3D,iCAAuC;AACvC,6BAA6B;AAGhB,QAAA,IAAI,GAAW,OAAO,CAAC,GAAG,EAAE,CAAC;AAC7B,QAAA,IAAI,GAAyC,YAAM,CAAC;AAUjE,8EAA8E;AAC9E,oFAAoF;AACpF,iDAAiD;AACjD,IAAI,WAAW,GAAiB;IAC9B,WAAW,EAAE;QACX,WAAW,EAAE,SAAS;KACvB;CACF,CAAC;AACF,IAAI;IACF,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,YAAI,mCAA4B,CAAC,CAAC;CACnE;AAAC,OAAO,CAAC,EAAE;IACV,qCAAqC;CACtC;AAEY,QAAA,YAAY,GAAiB,WAAW,CAAC;AACtD,8DAA8D;AACjD,QAAA,gBAAgB,GAAiB,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC5D,QAAA,WAAW,GAAW,OAAO,CAAC,OAAO,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { argv as clArgs } from 'yargs';\r\nimport * as path from 'path';\r\nimport { FileConstants } from '@microsoft/node-core-library';\r\n\r\nexport const root: string = process.cwd();\r\nexport const args: { [flat: string]: boolean | string } = clArgs;\r\n\r\nexport interface IPackageJSON {\r\n name?: string;\r\n version?: string;\r\n directories: {\r\n packagePath: string | undefined;\r\n } | undefined;\r\n}\r\n\r\n// There appears to be a TypeScript compiler bug that isn't allowing us to say\r\n// IPackageJSON | undefined here, so let's create a stub package.json here instead.\r\n// @todo: remove this when the compiler is fixed.\r\nlet packageJson: IPackageJSON = {\r\n directories: {\r\n packagePath: undefined\r\n }\r\n};\r\ntry {\r\n packageJson = require(path.join(root, FileConstants.PackageJson));\r\n} catch (e) {\r\n // Package.json probably doesn't exit\r\n}\r\n\r\nexport const builtPackage: IPackageJSON = packageJson;\r\n// eslint-disable-next-line @typescript-eslint/no-var-requires\r\nexport const coreBuildPackage: IPackageJSON = require('../package.json');\r\nexport const nodeVersion: string = process.version;\r\n"]}
\No newline at end of file