Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

prepublish-check.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. "use strict";
  2. /* -----------------------------------------------------------------------------
  3. | Copyright (c) Jupyter Development Team.
  4. | Distributed under the terms of the Modified BSD License.
  5. |----------------------------------------------------------------------------*/
  6. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
  7. if (k2 === undefined) k2 = k;
  8. Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
  9. }) : (function(o, m, k, k2) {
  10. if (k2 === undefined) k2 = k;
  11. o[k2] = m[k];
  12. }));
  13. var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
  14. Object.defineProperty(o, "default", { enumerable: true, value: v });
  15. }) : function(o, v) {
  16. o["default"] = v;
  17. });
  18. var __importStar = (this && this.__importStar) || function (mod) {
  19. if (mod && mod.__esModule) return mod;
  20. var result = {};
  21. if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
  22. __setModuleDefault(result, mod);
  23. return result;
  24. };
  25. Object.defineProperty(exports, "__esModule", { value: true });
  26. const fs = __importStar(require("fs-extra"));
  27. const glob = __importStar(require("glob"));
  28. const path = __importStar(require("path"));
  29. const utils = __importStar(require("./utils"));
  30. utils.exitOnUuncaughtException();
  31. utils.run('npm run build:packages');
  32. utils.getLernaPaths().forEach(pkgPath => {
  33. const pkgData = utils.readJSONFile(path.join(pkgPath, 'package.json'));
  34. const name = pkgData.name;
  35. // Skip private packages.
  36. if (!pkgData.public) {
  37. return;
  38. }
  39. console.debug(`Checking ${name}...`);
  40. // Make sure each glob resolves to at least one file.
  41. pkgData.files.forEach((fGlob) => {
  42. const result = glob.sync(fGlob);
  43. if (result.length === 0) {
  44. throw new Error(`${name} has missing file(s) "${fGlob}"`);
  45. }
  46. });
  47. // Make sure there is a main and that it exists.
  48. const main = pkgData.main;
  49. if (!main) {
  50. throw new Error(`No "main" entry for ${name}`);
  51. }
  52. const mainPath = path.join(pkgPath, main);
  53. if (!fs.existsSync(mainPath)) {
  54. throw new Error(`"main" entry "${main}" not found for ${name}`);
  55. }
  56. });
  57. //# sourceMappingURL=prepublish-check.js.map