How to use amplify-category-function - 2 common examples

To help you get started, we’ve selected a few amplify-category-function examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws-amplify / amplify-cli / packages / amplify-util-mock / src / storage / storage.ts View on Github external
}
        if (triggerName !== undefined) {
          break;
        }
      }

      const srcDir = path.normalize(path.join(backendPath, category, String(triggerName), 'src'));
      const event = eventObj;

      const invokeOptions = {
        packageFolder: srcDir,
        fileName: `${srcDir}/index.js`,
        handler: 'handler',
        event,
      };
      invoke(invokeOptions);
    });
  }
github aws-amplify / amplify-cli / packages / amplify-util-mock / commands / mock / function.js View on Github external
run: async function(context) {
    if (context.parameters.options.help) {
      const header = `amplify mock ${this.name} \nDescriptions:
      Mock Functions locally`;
      context.amplify.showHelp(header, []);
      return;
    }
    try {
      await invokeWalkthroughRun(context);
    } catch (e) {
      context.print.error(e.message);
    }
  },
};

amplify-category-function

amplify-cli function plugin

Apache-2.0
Latest version published 2 years ago

Package Health Score

72 / 100
Full package analysis