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
92 changes: 38 additions & 54 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8814,10 +8814,10 @@ function requireFormdataParser () {
const { webidl } = requireWebidl();
const assert = require$$0$1;
const { isomorphicDecode } = requireInfra();
const { utf8DecodeBytes } = requireEncoding();

const dd = Buffer.from('--');
const decoder = new TextDecoder();
const decoderIgnoreBOM = new TextDecoder('utf-8', { ignoreBOM: true });

/**
* @param {string} chars
Expand Down Expand Up @@ -8996,7 +8996,7 @@ function requireFormdataParser () {
// 5.11. Otherwise:

// 5.11.1. Let value be the UTF-8 decoding without BOM of body.
value = utf8DecodeBytes(Buffer.from(body));
value = decoderIgnoreBOM.decode(Buffer.from(body));
}

// 5.12. Assert: name is a scalar value string and value is either a scalar value string or a File object.
Expand Down Expand Up @@ -12262,16 +12262,16 @@ function requireClientH2 () {
if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), '') === false) {
stream.pause();
}
});

stream.on('data', (chunk) => {
if (request.aborted || request.completed) {
return
}
stream.on('data', (chunk) => {
if (request.aborted || request.completed) {
return
}

if (request.onData(chunk) === false) {
stream.pause();
}
if (request.onData(chunk) === false) {
stream.pause();
}
});
});

stream.once('end', () => {
Expand Down Expand Up @@ -13730,7 +13730,7 @@ function requireBalancedPool () {
} = requirePoolBase();
const Pool = requirePool();
const { kUrl } = requireSymbols();
const { parseOrigin } = requireUtil$5();
const util = requireUtil$5();
const kFactory = Symbol('factory');

const kOptions = Symbol('options');
Expand Down Expand Up @@ -13772,7 +13772,10 @@ function requireBalancedPool () {

super();

this[kOptions] = opts;
this[kOptions] = { ...util.deepClone(opts) };
this[kOptions].interceptors = opts.interceptors
? { ...opts.interceptors }
: undefined;
this[kIndex] = -1;
this[kCurrentWeight] = 0;

Expand All @@ -13792,7 +13795,7 @@ function requireBalancedPool () {
}

addUpstream (upstream) {
const upstreamOrigin = parseOrigin(upstream).origin;
const upstreamOrigin = util.parseOrigin(upstream).origin;

if (this[kClients].find((pool) => (
pool[kUrl].origin === upstreamOrigin &&
Expand All @@ -13801,7 +13804,7 @@ function requireBalancedPool () {
))) {
return this
}
const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions]));
const pool = this[kFactory](upstreamOrigin, this[kOptions]);

this[kAddClient](pool);
pool.on('connect', () => {
Expand Down Expand Up @@ -13841,7 +13844,7 @@ function requireBalancedPool () {
}

removeUpstream (upstream) {
const upstreamOrigin = parseOrigin(upstream).origin;
const upstreamOrigin = util.parseOrigin(upstream).origin;

const pool = this[kClients].find((pool) => (
pool[kUrl].origin === upstreamOrigin &&
Expand All @@ -13857,7 +13860,7 @@ function requireBalancedPool () {
}

getUpstream (upstream) {
const upstreamOrigin = parseOrigin(upstream).origin;
const upstreamOrigin = util.parseOrigin(upstream).origin;

return this[kClients].find((pool) => (
pool[kUrl].origin === upstreamOrigin &&
Expand Down Expand Up @@ -23119,10 +23122,18 @@ function requireCacheHandler () {
staleIfError = staleAt + (cacheControlDirectives['stale-if-error'] * 1000);
}

if (staleWhileRevalidate === -Infinity && staleIfError === -Infinity) {
if (cacheControlDirectives.immutable && staleWhileRevalidate === -Infinity && staleIfError === -Infinity) {
immutable = now + 31536000000;
}

// When no stale directives or immutable flag, add a revalidation buffer
// equal to the freshness lifetime so the entry survives past staleAt long
// enough to be revalidated instead of silently disappearing.
if (staleWhileRevalidate === -Infinity && staleIfError === -Infinity && immutable === -Infinity) {
const freshnessLifetime = staleAt - now;
return staleAt + freshnessLifetime
}

return Math.max(staleAt, staleWhileRevalidate, staleIfError, immutable)
}

Expand Down Expand Up @@ -30287,9 +30298,12 @@ function requireFetch () {
/** @type {import('../../..').Agent} */
const agent = fetchParams.controller.dispatcher;

const path = url.pathname + url.search;
const hasTrailingQuestionMark = url.search.length === 0 && url.href[url.href.length - url.hash.length - 1] === '?';

return new Promise((resolve, reject) => agent.dispatch(
{
path: url.href.slice(url.origin.length, url.hash.length ? -url.hash.length : undefined),
path: hasTrailingQuestionMark ? `${path}?` : path,
origin: url.origin,
method: request.method,
body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body,
Expand Down Expand Up @@ -33794,9 +33808,6 @@ function requirePermessageDeflate () {

#options = {}

/** @type {number} */
#maxDecompressedSize

/** @type {boolean} */
#aborted = false

Expand All @@ -33805,12 +33816,10 @@ function requirePermessageDeflate () {

/**
* @param {Map<string, string>} extensions
* @param {{ maxDecompressedMessageSize?: number }} [options]
*/
constructor (extensions, options = {}) {
constructor (extensions) {
this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover');
this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits');
this.#maxDecompressedSize = options.maxDecompressedMessageSize ?? kDefaultMaxDecompressedSize;
}

decompress (chunk, fin, callback) {
Expand Down Expand Up @@ -33852,7 +33861,7 @@ function requirePermessageDeflate () {

this.#inflate[kLength] += data.length;

if (this.#inflate[kLength] > this.#maxDecompressedSize) {
if (this.#inflate[kLength] > kDefaultMaxDecompressedSize) {
this.#aborted = true;
this.#inflate.removeAllListeners();
this.#inflate.destroy();
Expand Down Expand Up @@ -33947,23 +33956,18 @@ function requireReceiver () {
/** @type {import('./websocket').Handler} */
#handler

/** @type {{ maxDecompressedMessageSize?: number }} */
#options

/**
* @param {import('./websocket').Handler} handler
* @param {Map<string, string>|null} extensions
* @param {{ maxDecompressedMessageSize?: number }} [options]
*/
constructor (handler, extensions, options = {}) {
constructor (handler, extensions) {
super();

this.#handler = handler;
this.#extensions = extensions == null ? new Map() : extensions;
this.#options = options;

if (this.#extensions.has('permessage-deflate')) {
this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions, options));
this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions));
}
}

Expand Down Expand Up @@ -34597,8 +34601,6 @@ function requireWebsocket () {
#binaryType
/** @type {import('./receiver').ByteParser} */
#parser
/** @type {{ maxDecompressedMessageSize?: number }} */
#options

/**
* @param {string} url
Expand Down Expand Up @@ -34644,11 +34646,6 @@ function requireWebsocket () {
// 5. Set this's url to urlRecord.
this.#url = new URL(urlRecord.href);

// Store options for later use (e.g., maxDecompressedMessageSize)
this.#options = {
maxDecompressedMessageSize: options.maxDecompressedMessageSize
};

// 6. Let client be this's relevant settings object.
const client = environmentSettingsObject.settingsObject;

Expand Down Expand Up @@ -34951,7 +34948,7 @@ function requireWebsocket () {
// once this happens, the connection is open
this.#handler.socket = response.socket;

const parser = new ByteParser(this.#handler, parsedExtensions, this.#options);
const parser = new ByteParser(this.#handler, parsedExtensions);
parser.on('drain', () => this.#handler.onParserDrain());
parser.on('error', (err) => this.#handler.onParserError(err));

Expand Down Expand Up @@ -35203,19 +35200,6 @@ function requireWebsocket () {
{
key: 'headers',
converter: webidl.nullableConverter(webidl.converters.HeadersInit)
},
{
key: 'maxDecompressedMessageSize',
converter: webidl.nullableConverter((V) => {
V = webidl.converters['unsigned long long'](V);
if (V <= 0) {
throw webidl.errors.exception({
header: 'WebSocket constructor',
message: 'maxDecompressedMessageSize must be greater than 0'
})
}
return V
})
}
]);

Expand Down Expand Up @@ -42138,7 +42122,7 @@ function _getGlobal(key, defaultValue) {
const toolName = 'stackit';
const githubRepository = 'stackitcloud/stackit-cli';
// renovate: github=stackitcloud/stackit-cli
const defaultVersion = 'v0.55.0';
const defaultVersion = 'v0.56.0';
function binaryName(version, os, arch) {
version = semverExports.clean(version) || version;
return `stackit-cli_${version}_${os}_${arch}.${os === 'windows' ? 'zip' : 'tar.gz'}`;
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@
"@rollup/rollup-linux-x64-gnu": "4.59.0"
},
"overrides": {
"undici": "7.24.0"
"undici": "7.24.5"
}
}
2 changes: 1 addition & 1 deletion src/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const toolName = 'stackit'
export const githubRepository = 'stackitcloud/stackit-cli'

// renovate: github=stackitcloud/stackit-cli
export const defaultVersion = 'v0.55.0'
export const defaultVersion = 'v0.56.0'

export function binaryName(version: string, os: string, arch: string): string {
version = clean(version) || version
Expand Down