watchGuard.js (2313B)
1 /*! ***************************************************************************** 2 Copyright (c) Microsoft Corporation. All rights reserved. 3 Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 this file except in compliance with the License. You may obtain a copy of the 5 License at http://www.apache.org/licenses/LICENSE-2.0 6 7 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 8 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 9 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 10 MERCHANTABLITY OR NON-INFRINGEMENT. 11 12 See the Apache Version 2.0 License for specific language governing permissions 13 and limitations under the License. 14 ***************************************************************************** */ 15 16 17 "use strict"; 18 var __create = Object.create; 19 var __defProp = Object.defineProperty; 20 var __getOwnPropDesc = Object.getOwnPropertyDescriptor; 21 var __getOwnPropNames = Object.getOwnPropertyNames; 22 var __getProtoOf = Object.getPrototypeOf; 23 var __hasOwnProp = Object.prototype.hasOwnProperty; 24 var __copyProps = (to, from, except, desc) => { 25 if (from && typeof from === "object" || typeof from === "function") { 26 for (let key of __getOwnPropNames(from)) 27 if (!__hasOwnProp.call(to, key) && key !== except) 28 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); 29 } 30 return to; 31 }; 32 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( 33 // If the importer is in node compatibility mode or this is not an ESM 34 // file that has been converted to a CommonJS file using a Babel- 35 // compatible transform (i.e. "__esModule" has not been set), then set 36 // "default" to the CommonJS "module.exports" for node compatibility. 37 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, 38 mod 39 )); 40 41 // src/watchGuard/watchGuard.ts 42 var fs = __toESM(require("fs")); 43 if (process.argv.length < 3) { 44 process.exit(1); 45 } 46 var directoryName = process.argv[2]; 47 try { 48 const watcher = fs.watch(directoryName, { recursive: true }, () => ({})); 49 watcher.close(); 50 } catch { 51 } 52 process.exit(0); 53 //# sourceMappingURL=watchGuard.js.map