Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yaschema-api-google-cloud-task-creator

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yaschema-api-google-cloud-task-creator - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

8

lib/cjs/create-google-cloud-task/create-google-cloud-task/index.js

@@ -33,2 +33,3 @@ "use strict";

const createGoogleCloudTask = (api_1, req_1, ...args_1) => __awaiter(void 0, [api_1, req_1, ...args_1], void 0, function* (api, req, { requestValidationMode = (0, validation_mode_1.getDefaultRequestValidationMode)(), creationOptions, limitMode = DEFAULT_TASK_LIMIT_MODE, limitMSec = DEFAULT_TASK_LIMIT_MSEC, limitType = DEFAULT_TASK_LIMIT_TYPE, limitNameExtension = '' } = {}) {
var _a;
if (api.method === 'LINK' || api.method === 'UNLINK') {

@@ -71,3 +72,8 @@ throw new Error("LINK and UNLINK aren't supported by yaschema-api-google-cloud-task-creator");

catch (e) {
return { ok: false, error: e instanceof Error ? e.message : undefined };
const error = e instanceof Error ? e.message : undefined;
// If the task is already enqueued, treat as success
if ((_a = error === null || error === void 0 ? void 0 : error.includes('ALREADY_EXISTS')) !== null && _a !== void 0 ? _a : false) {
return { ok: true };
}
return { ok: false, error };
}

@@ -74,0 +80,0 @@ }

@@ -30,2 +30,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

export const createGoogleCloudTask = (api_1, req_1, ...args_1) => __awaiter(void 0, [api_1, req_1, ...args_1], void 0, function* (api, req, { requestValidationMode = getDefaultRequestValidationMode(), creationOptions, limitMode = DEFAULT_TASK_LIMIT_MODE, limitMSec = DEFAULT_TASK_LIMIT_MSEC, limitType = DEFAULT_TASK_LIMIT_TYPE, limitNameExtension = '' } = {}) {
var _a;
if (api.method === 'LINK' || api.method === 'UNLINK') {

@@ -68,3 +69,8 @@ throw new Error("LINK and UNLINK aren't supported by yaschema-api-google-cloud-task-creator");

catch (e) {
return { ok: false, error: e instanceof Error ? e.message : undefined };
const error = e instanceof Error ? e.message : undefined;
// If the task is already enqueued, treat as success
if ((_a = error === null || error === void 0 ? void 0 : error.includes('ALREADY_EXISTS')) !== null && _a !== void 0 ? _a : false) {
return { ok: true };
}
return { ok: false, error };
}

@@ -71,0 +77,0 @@ }

2

package.json
{
"name": "yaschema-api-google-cloud-task-creator",
"version": "1.1.2",
"version": "1.2.0",
"description": "Google Cloud createTask support for yaschema-api",

@@ -5,0 +5,0 @@ "keywords": [

@@ -137,3 +137,10 @@ import type { CallOptions } from 'google-gax';

} catch (e) {
return { ok: false, error: e instanceof Error ? e.message : undefined };
const error = e instanceof Error ? e.message : undefined;
// If the task is already enqueued, treat as success
if (error?.includes('ALREADY_EXISTS') ?? false) {
return { ok: true };
}
return { ok: false, error };
}

@@ -140,0 +147,0 @@ } catch (e) {

Sorry, the diff of this file is not supported yet

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