Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions types/cfn-response/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,43 @@
import { CloudFormationCustomResourceEvent, Context } from "aws-lambda";

/**
* Response status indicating the custom resource operation succeeded.
*/
export const SUCCESS: "SUCCESS";

/**
* Response status indicating the custom resource operation failed.
* CloudFormation will roll back the stack if FAILED is returned during create or update.
*/
export const FAILED: "FAILED";

/**
* Union type of the two possible response statuses for a CloudFormation custom resource.
*/
export type ResponseStatus = typeof SUCCESS | typeof FAILED;

/**
* Sends a response to the CloudFormation pre-signed S3 URL to signal the result
* of a custom resource operation. Must be called in every code path of a Lambda-backed
* custom resource — if not called, the CloudFormation stack will hang until it times out.
*
* Note: this function does not return a Promise. Lambda completion is signaled via
* `context.done()` internally. Do not use `await` with this function.
*
* @param event - The CloudFormation custom resource event containing the ResponseURL,
* StackId, RequestId, and LogicalResourceId.
* @param context - The Lambda context object, used for the log stream name and signaling completion.
* @param responseStatus - Whether the operation succeeded or failed. Use `SUCCESS` or `FAILED`.
* @param responseData - Optional key-value data to return to CloudFormation,
* accessible via `Fn::GetAtt` in the template.
* @param physicalResourceId - The unique identifier of the custom resource.
* Defaults to the Lambda log stream name if not provided.
* WARNING: changing this value on an update will cause CloudFormation to delete the old resource.
*/
export function send(
event: CloudFormationCustomResourceEvent,
context: Context,
responseStatus: ResponseStatus,
responseData?: object,
responseData?: Record<string, unknown>,
physicalResourceId?: string,
noEcho?: boolean,
): void;
2 changes: 1 addition & 1 deletion types/cfn-response/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"owners": [
{
"name": "Artur Androsovych",
"name": "arturovt",
"githubUsername": "arturovt"
}
]
Expand Down
2 changes: 1 addition & 1 deletion types/headroom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"name": "@types/headroom",
"version": "0.12.9999",
"nonNpm": true,
"nonNpm": "conflict",
"nonNpmDescription": "headroom",
"projects": [
"http://wicky.nillia.ms/headroom.js/"
Expand Down
4 changes: 2 additions & 2 deletions types/node/assert.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,10 @@ declare module "node:assert" {
* import assert from 'node:assert/strict';
*
* // Using `assert()` works the same:
* assert(0);
* assert(2 + 2 > 5);;
* // AssertionError: The expression evaluated to a falsy value:
* //
* // assert(0)
* // assert(2 + 2 > 5)
* ```
* @since v0.1.21
*/
Expand Down
5 changes: 5 additions & 0 deletions types/node/child_process.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ declare module "node:child_process" {
/**
* The `subprocess.exitCode` property indicates the exit code of the child process.
* If the child process is still running, the field will be `null`.
*
* When the child process is terminated by a signal, `subprocess.exitCode` will be
* `null` and `subprocess.signalCode` will be set. To get the corresponding
* POSIX exit code, use
* `util.convertProcessSignalToExitCode(subprocess.signalCode)`.
*/
readonly exitCode: number | null;
/**
Expand Down
19 changes: 6 additions & 13 deletions types/node/events.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -638,24 +638,17 @@ declare module "node:events" {
*/
function getMaxListeners(emitter: EventEmitter | EventTarget): number;
/**
* A class method that returns the number of listeners for the given `eventName`
* registered on the given `emitter`.
* Returns the number of registered listeners for the event named `eventName`.
*
* ```js
* import { EventEmitter, listenerCount } from 'node:events';
* For `EventEmitter`s this behaves exactly the same as calling `.listenerCount`
* on the emitter.
*
* const myEmitter = new EventEmitter();
* myEmitter.on('event', () => {});
* myEmitter.on('event', () => {});
* console.log(listenerCount(myEmitter, 'event'));
* // Prints: 2
* ```
* For `EventTarget`s this is the only way to obtain the listener count. This can
* be useful for debugging and diagnostic purposes.
* @since v0.9.12
* @deprecated Use `emitter.listenerCount()` instead.
* @param emitter The emitter to query
* @param eventName The event name
*/
function listenerCount(emitter: EventEmitter, eventName: string | symbol): number;
function listenerCount(emitter: EventTarget, eventName: string): number;
interface OnOptions extends Abortable {
/**
* Names of events that will end the iteration.
Expand Down
21 changes: 21 additions & 0 deletions types/node/http.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2136,6 +2136,27 @@ declare module "node:http" {
* @param [max=1000]
*/
function setMaxIdleHTTPParsers(max: number): void;
/**
* Dynamically resets the global configurations to enable built-in proxy support for
* `fetch()` and `http.request()`/`https.request()` at runtime, as an alternative
* to using the `--use-env-proxy` flag or `NODE_USE_ENV_PROXY` environment variable.
* It can also be used to override settings configured from the environment variables.
*
* As this function resets the global configurations, any previously configured
* `http.globalAgent`, `https.globalAgent` or undici global dispatcher would be
* overridden after this function is invoked. It's recommended to invoke it before any
* requests are made and avoid invoking it in the middle of any requests.
*
* See [Built-in Proxy Support](https://nodejs.org/docs/latest-v25.x/api/http.html#built-in-proxy-support) for details on proxy URL formats and `NO_PROXY`
* syntax.
* @since v25.4.0
* @param proxyEnv An object containing proxy configuration. This accepts the
* same options as the `proxyEnv` option accepted by {@link Agent}. **Default:**
* `process.env`.
* @returns A function that restores the original agent and dispatcher
* settings to the state before this `http.setGlobalProxyFromEnv()` is invoked.
*/
function setGlobalProxyFromEnv(proxyEnv?: ProxyEnv): () => void;
/**
* Global instance of `Agent` which is used as the default for all HTTP client
* requests. Diverges from a default `Agent` configuration by having `keepAlive`
Expand Down
Loading