aws-lambda/python-s3-thumbnail/node_modules/serverless-python-requirements/index.js
/**
   * link all the files in .requirements to the service directory root
   * @return {undefined}
   */
link all the files in .requirements to the service directory root
@return {undefined}
link all the files in . requirements to the service directory root @return { undefined }
linkRequirements() {
    if (!this.custom().zip) {
      this.serverless.cli.log('Linking required Python packages...');
      fse.readdirSync('.requirements').map((file) => {
          this.serverless.service.package.include.push(file);
          this.serverless.service.package.include.push(`${file}/**`);
        try {
          fse.symlinkSync(`.requirements/${file}`, `./${file}`);
        } catch (exception) {
          let linkDest = null;
          try {
            linkDest = fse.readlinkSync(`./${file}`);
          } catch (e) {}
          if (linkDest !== `.requirements/${file}`)
            throw new Error(`Unable to link dependency "${file}" because a file
                             by the same name exists in this service`);
        }
      }
        );
    }
  }
linkRequirements ( ) { if ( ! this . custom ( ) . zip ) { this . serverless . cli . log ( 'Linking required Python packages...' ) ; fse . readdirSync ( '.requirements' ) . map ( ( file ) => { this . serverless . service . package . include . push ( file ) ; this . serverless . service . package . include . push ( ` ${ file } ` ) ; try { fse . symlinkSync ( ` ${ file } ` , ` ${ file } ` ) ; } catch ( exception ) { let linkDest = null ; try { linkDest = fse . readlinkSync ( ` ${ file } ` ) ; } catch ( e ) { } if ( linkDest !== ` ${ file } ` ) throw new Error ( ` ${ file } ` ) ; } } ) ; } }
link all the files in .requirements to the service directory root
 @return {undefined}
link all the files in . requirements to the service directory root @return { undefined }