INNER CODE UNIT · JavaScript

patchV3

localstack/serverless-localstack · src/index.js:1032

    function patchV3() {
      this.debug(
        'serverless-localstack: Patching V3',
      );
      const customResourcesBucketFile = customResources.getEntry('s3/lib/bucket.js');
      if (customResourcesBucketFile == null) {
        // TODO debugging, remove
        this.log(
          'serverless-localstack: Could not find file s3/lib/bucket.js to patch.',
        );
        return;
      }
      const data = customResourcesBucketFile.getData().toString();
      const oldClientCreation = 'S3Client({ maxAttempts: MAX_AWS_REQUEST_TRY });';
      const newClientCreation = 'S3Client({ maxAttempts: MAX_AWS_REQUEST_TRY, forcePathStyle: true });';
      if (data.includes(newClientCreation)) {
        // patch already done
        createPatchMarker();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…