New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@collaborne/custom-cloudformation-resources

Package Overview
Dependencies
Maintainers
4
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@collaborne/custom-cloudformation-resources - npm Package Compare versions

Comparing version 0.5.4 to 0.5.5

12

dist/custom-resource.js

@@ -149,8 +149,12 @@ "use strict";

const now = new Date();
const when = new Date(now.getTime() + continuationAfter * 1000);
const whenTs = Math.ceil((now.getTime() / 1000 + continuationAfter) / 60) * 60 * 1000;
// Bump up to the next full minute, as we won't be getting scheduling if the time isn't "far enough"
// in the future.
const when = new Date(whenTs);
if (when.getMinutes() === now.getMinutes()) {
when.setMinutes(when.getMinutes() + 1);
}
// Build a cron expression for CWE
// - We must use GMT
// - We must round up to the next full minute, as we won't be getting scheduling if the time isn't in the future.
// See also https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html
const cronExpression = `${Math.max(now.getUTCMinutes() + 1, when.getUTCMinutes())} ${when.getUTCHours()} ${when.getUTCDate()} ${when.getUTCMonth() + 1} ? ${when.getUTCFullYear()}`;
const cronExpression = `${when.getUTCMinutes()} ${when.getUTCHours()} ${when.getUTCDate()} ${when.getUTCMonth() + 1} ? ${when.getUTCFullYear()}`;
this.logger.log(`Scheduling continuation using CWE rule ${continuationRuleName} after ${continuationAfter}s (at ${cronExpression})`);

@@ -157,0 +161,0 @@ const schedulePutRuleParams = {

{
"name": "@collaborne/custom-cloudformation-resources",
"version": "0.5.4",
"version": "0.5.5",
"description": "Custom CloudFormation resources",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -273,12 +273,14 @@ import { CloudWatchEvents } from 'aws-sdk';

const now = new Date();
const when = new Date(now.getTime() + continuationAfter * 1000);
const whenTs =
Math.ceil((now.getTime() / 1000 + continuationAfter) / 60) * 60 * 1000;
// Bump up to the next full minute, as we won't be getting scheduling if the time isn't "far enough"
// in the future.
const when = new Date(whenTs);
if (when.getMinutes() === now.getMinutes()) {
when.setMinutes(when.getMinutes() + 1);
}
// Build a cron expression for CWE
// - We must use GMT
// - We must round up to the next full minute, as we won't be getting scheduling if the time isn't in the future.
// See also https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html
const cronExpression = `${Math.max(
now.getUTCMinutes() + 1,
when.getUTCMinutes(),
)} ${when.getUTCHours()} ${when.getUTCDate()} ${
const cronExpression = `${when.getUTCMinutes()} ${when.getUTCHours()} ${when.getUTCDate()} ${
when.getUTCMonth() + 1

@@ -285,0 +287,0 @@ } ? ${when.getUTCFullYear()}`;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc