source: trip-planner-front/node_modules/esbuild/bin/esbuild@ 571e0df

Last change on this file since 571e0df was e29cc2e, checked in by Ema <ema_spirova@…>, 4 years ago

primeNG components

  • Property mode set to 100644
File size: 4.0 KB
Line 
1#!/usr/bin/env node
2var __create = Object.create;
3var __defProp = Object.defineProperty;
4var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5var __getOwnPropNames = Object.getOwnPropertyNames;
6var __getProtoOf = Object.getPrototypeOf;
7var __hasOwnProp = Object.prototype.hasOwnProperty;
8var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
9var __reExport = (target, module2, desc) => {
10 if (module2 && typeof module2 === "object" || typeof module2 === "function") {
11 for (let key of __getOwnPropNames(module2))
12 if (!__hasOwnProp.call(target, key) && key !== "default")
13 __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
14 }
15 return target;
16};
17var __toModule = (module2) => {
18 return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
19};
20
21// lib/npm/node-platform.ts
22var fs = require("fs");
23var os = require("os");
24var path = require("path");
25var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
26var knownWindowsPackages = {
27 "win32 arm64 LE": "esbuild-windows-arm64",
28 "win32 ia32 LE": "esbuild-windows-32",
29 "win32 x64 LE": "esbuild-windows-64"
30};
31var knownUnixlikePackages = {
32 "android arm64 LE": "esbuild-android-arm64",
33 "darwin arm64 LE": "esbuild-darwin-arm64",
34 "darwin x64 LE": "esbuild-darwin-64",
35 "freebsd arm64 LE": "esbuild-freebsd-arm64",
36 "freebsd x64 LE": "esbuild-freebsd-64",
37 "linux arm LE": "esbuild-linux-arm",
38 "linux arm64 LE": "esbuild-linux-arm64",
39 "linux ia32 LE": "esbuild-linux-32",
40 "linux mips64el LE": "esbuild-linux-mips64le",
41 "linux ppc64 LE": "esbuild-linux-ppc64le",
42 "linux x64 LE": "esbuild-linux-64",
43 "netbsd x64 LE": "esbuild-netbsd-64",
44 "openbsd x64 LE": "esbuild-openbsd-64",
45 "sunos x64 LE": "esbuild-sunos-64"
46};
47function pkgAndSubpathForCurrentPlatform() {
48 let pkg;
49 let subpath;
50 let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`;
51 if (platformKey in knownWindowsPackages) {
52 pkg = knownWindowsPackages[platformKey];
53 subpath = "esbuild.exe";
54 } else if (platformKey in knownUnixlikePackages) {
55 pkg = knownUnixlikePackages[platformKey];
56 subpath = "bin/esbuild";
57 } else {
58 throw new Error(`Unsupported platform: ${platformKey}`);
59 }
60 return { pkg, subpath };
61}
62function downloadedBinPath(pkg, subpath) {
63 const esbuildLibDir = path.dirname(require.resolve("esbuild"));
64 return path.join(esbuildLibDir, `downloaded-${pkg}-${path.basename(subpath)}`);
65}
66function generateBinPath() {
67 if (ESBUILD_BINARY_PATH) {
68 return ESBUILD_BINARY_PATH;
69 }
70 const { pkg, subpath } = pkgAndSubpathForCurrentPlatform();
71 let binPath;
72 try {
73 binPath = require.resolve(`${pkg}/${subpath}`);
74 } catch (e) {
75 binPath = downloadedBinPath(pkg, subpath);
76 if (!fs.existsSync(binPath)) {
77 try {
78 require.resolve(pkg);
79 } catch (e2) {
80 throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild.
81
82If you are installing esbuild with npm, make sure that you don't specify the
83"--no-optional" flag. The "optionalDependencies" package.json feature is used
84by esbuild to install the correct binary executable for your current platform.`);
85 }
86 throw e;
87 }
88 }
89 let isYarnPnP = false;
90 try {
91 require("pnpapi");
92 isYarnPnP = true;
93 } catch (e) {
94 }
95 if (isYarnPnP) {
96 const esbuildLibDir = path.dirname(require.resolve("esbuild"));
97 const binTargetPath = path.join(esbuildLibDir, `pnpapi-${pkg}-${path.basename(subpath)}`);
98 if (!fs.existsSync(binTargetPath)) {
99 fs.copyFileSync(binPath, binTargetPath);
100 fs.chmodSync(binTargetPath, 493);
101 }
102 return binTargetPath;
103 }
104 return binPath;
105}
106
107// lib/npm/node-shim.ts
108require("child_process").execFileSync(generateBinPath(), process.argv.slice(2), { stdio: "inherit" });
Note: See TracBrowser for help on using the repository browser.