working rss feed to nostr publish
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
export * from "./waitForFunctionActive";
|
||||
export * from "./waitForFunctionActiveV2";
|
||||
export * from "./waitForFunctionExists";
|
||||
export * from "./waitForFunctionUpdated";
|
||||
export * from "./waitForFunctionUpdatedV2";
|
||||
export * from "./waitForPublishedVersionActive";
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
|
||||
import { GetFunctionConfigurationCommand, } from "../commands/GetFunctionConfigurationCommand";
|
||||
const checkState = async (client, input) => {
|
||||
let reason;
|
||||
try {
|
||||
const result = await client.send(new GetFunctionConfigurationCommand(input));
|
||||
reason = result;
|
||||
try {
|
||||
const returnComparator = () => {
|
||||
return result.State;
|
||||
};
|
||||
if (returnComparator() === "Active") {
|
||||
return { state: WaiterState.SUCCESS, reason };
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
try {
|
||||
const returnComparator = () => {
|
||||
return result.State;
|
||||
};
|
||||
if (returnComparator() === "Failed") {
|
||||
return { state: WaiterState.FAILURE, reason };
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
try {
|
||||
const returnComparator = () => {
|
||||
return result.State;
|
||||
};
|
||||
if (returnComparator() === "Pending") {
|
||||
return { state: WaiterState.RETRY, reason };
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
}
|
||||
catch (exception) {
|
||||
reason = exception;
|
||||
}
|
||||
return { state: WaiterState.RETRY, reason };
|
||||
};
|
||||
export const waitForFunctionActive = async (params, input) => {
|
||||
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
||||
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
||||
};
|
||||
export const waitUntilFunctionActive = async (params, input) => {
|
||||
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
||||
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
||||
return checkExceptions(result);
|
||||
};
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
|
||||
import { GetFunctionCommand } from "../commands/GetFunctionCommand";
|
||||
const checkState = async (client, input) => {
|
||||
let reason;
|
||||
try {
|
||||
const result = await client.send(new GetFunctionCommand(input));
|
||||
reason = result;
|
||||
try {
|
||||
const returnComparator = () => {
|
||||
return result.Configuration.State;
|
||||
};
|
||||
if (returnComparator() === "Active") {
|
||||
return { state: WaiterState.SUCCESS, reason };
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
try {
|
||||
const returnComparator = () => {
|
||||
return result.Configuration.State;
|
||||
};
|
||||
if (returnComparator() === "Failed") {
|
||||
return { state: WaiterState.FAILURE, reason };
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
try {
|
||||
const returnComparator = () => {
|
||||
return result.Configuration.State;
|
||||
};
|
||||
if (returnComparator() === "Pending") {
|
||||
return { state: WaiterState.RETRY, reason };
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
}
|
||||
catch (exception) {
|
||||
reason = exception;
|
||||
}
|
||||
return { state: WaiterState.RETRY, reason };
|
||||
};
|
||||
export const waitForFunctionActiveV2 = async (params, input) => {
|
||||
const serviceDefaults = { minDelay: 1, maxDelay: 120 };
|
||||
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
||||
};
|
||||
export const waitUntilFunctionActiveV2 = async (params, input) => {
|
||||
const serviceDefaults = { minDelay: 1, maxDelay: 120 };
|
||||
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
||||
return checkExceptions(result);
|
||||
};
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
|
||||
import { GetFunctionCommand } from "../commands/GetFunctionCommand";
|
||||
const checkState = async (client, input) => {
|
||||
let reason;
|
||||
try {
|
||||
const result = await client.send(new GetFunctionCommand(input));
|
||||
reason = result;
|
||||
return { state: WaiterState.SUCCESS, reason };
|
||||
}
|
||||
catch (exception) {
|
||||
reason = exception;
|
||||
if (exception.name && exception.name == "ResourceNotFoundException") {
|
||||
return { state: WaiterState.RETRY, reason };
|
||||
}
|
||||
}
|
||||
return { state: WaiterState.RETRY, reason };
|
||||
};
|
||||
export const waitForFunctionExists = async (params, input) => {
|
||||
const serviceDefaults = { minDelay: 1, maxDelay: 120 };
|
||||
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
||||
};
|
||||
export const waitUntilFunctionExists = async (params, input) => {
|
||||
const serviceDefaults = { minDelay: 1, maxDelay: 120 };
|
||||
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
||||
return checkExceptions(result);
|
||||
};
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
|
||||
import { GetFunctionConfigurationCommand, } from "../commands/GetFunctionConfigurationCommand";
|
||||
const checkState = async (client, input) => {
|
||||
let reason;
|
||||
try {
|
||||
const result = await client.send(new GetFunctionConfigurationCommand(input));
|
||||
reason = result;
|
||||
try {
|
||||
const returnComparator = () => {
|
||||
return result.LastUpdateStatus;
|
||||
};
|
||||
if (returnComparator() === "Successful") {
|
||||
return { state: WaiterState.SUCCESS, reason };
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
try {
|
||||
const returnComparator = () => {
|
||||
return result.LastUpdateStatus;
|
||||
};
|
||||
if (returnComparator() === "Failed") {
|
||||
return { state: WaiterState.FAILURE, reason };
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
try {
|
||||
const returnComparator = () => {
|
||||
return result.LastUpdateStatus;
|
||||
};
|
||||
if (returnComparator() === "InProgress") {
|
||||
return { state: WaiterState.RETRY, reason };
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
}
|
||||
catch (exception) {
|
||||
reason = exception;
|
||||
}
|
||||
return { state: WaiterState.RETRY, reason };
|
||||
};
|
||||
export const waitForFunctionUpdated = async (params, input) => {
|
||||
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
||||
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
||||
};
|
||||
export const waitUntilFunctionUpdated = async (params, input) => {
|
||||
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
||||
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
||||
return checkExceptions(result);
|
||||
};
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
|
||||
import { GetFunctionCommand } from "../commands/GetFunctionCommand";
|
||||
const checkState = async (client, input) => {
|
||||
let reason;
|
||||
try {
|
||||
const result = await client.send(new GetFunctionCommand(input));
|
||||
reason = result;
|
||||
try {
|
||||
const returnComparator = () => {
|
||||
return result.Configuration.LastUpdateStatus;
|
||||
};
|
||||
if (returnComparator() === "Successful") {
|
||||
return { state: WaiterState.SUCCESS, reason };
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
try {
|
||||
const returnComparator = () => {
|
||||
return result.Configuration.LastUpdateStatus;
|
||||
};
|
||||
if (returnComparator() === "Failed") {
|
||||
return { state: WaiterState.FAILURE, reason };
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
try {
|
||||
const returnComparator = () => {
|
||||
return result.Configuration.LastUpdateStatus;
|
||||
};
|
||||
if (returnComparator() === "InProgress") {
|
||||
return { state: WaiterState.RETRY, reason };
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
}
|
||||
catch (exception) {
|
||||
reason = exception;
|
||||
}
|
||||
return { state: WaiterState.RETRY, reason };
|
||||
};
|
||||
export const waitForFunctionUpdatedV2 = async (params, input) => {
|
||||
const serviceDefaults = { minDelay: 1, maxDelay: 120 };
|
||||
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
||||
};
|
||||
export const waitUntilFunctionUpdatedV2 = async (params, input) => {
|
||||
const serviceDefaults = { minDelay: 1, maxDelay: 120 };
|
||||
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
||||
return checkExceptions(result);
|
||||
};
|
||||
Generated
Vendored
+49
@@ -0,0 +1,49 @@
|
||||
import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
|
||||
import { GetFunctionConfigurationCommand, } from "../commands/GetFunctionConfigurationCommand";
|
||||
const checkState = async (client, input) => {
|
||||
let reason;
|
||||
try {
|
||||
const result = await client.send(new GetFunctionConfigurationCommand(input));
|
||||
reason = result;
|
||||
try {
|
||||
const returnComparator = () => {
|
||||
return result.State;
|
||||
};
|
||||
if (returnComparator() === "Active") {
|
||||
return { state: WaiterState.SUCCESS, reason };
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
try {
|
||||
const returnComparator = () => {
|
||||
return result.State;
|
||||
};
|
||||
if (returnComparator() === "Failed") {
|
||||
return { state: WaiterState.FAILURE, reason };
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
try {
|
||||
const returnComparator = () => {
|
||||
return result.State;
|
||||
};
|
||||
if (returnComparator() === "Pending") {
|
||||
return { state: WaiterState.RETRY, reason };
|
||||
}
|
||||
}
|
||||
catch (e) { }
|
||||
}
|
||||
catch (exception) {
|
||||
reason = exception;
|
||||
}
|
||||
return { state: WaiterState.RETRY, reason };
|
||||
};
|
||||
export const waitForPublishedVersionActive = async (params, input) => {
|
||||
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
||||
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
||||
};
|
||||
export const waitUntilPublishedVersionActive = async (params, input) => {
|
||||
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
||||
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
||||
return checkExceptions(result);
|
||||
};
|
||||
Reference in New Issue
Block a user