@hasna/skills 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +525 -585
- package/bin/mcp.js +376 -323
- package/bin/migrate.js +1 -164
- package/bin/server.js +58 -220
- package/bin/worker.js +97 -258
- package/dist/admin-contract.js +168 -166
- package/dist/index.d.ts +1 -1
- package/dist/index.js +448 -365
- package/dist/lib/remote-client.d.ts +7 -0
- package/dist/lib/remote-quote-errors.d.ts +12 -0
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/index.js +401 -301
- package/dist/storage.js +35 -33
- package/package.json +1 -1
package/bin/worker.js
CHANGED
|
@@ -20,12 +20,14 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
20
20
|
}
|
|
21
21
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
22
22
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
24
|
+
for (let key of __getOwnPropNames(mod))
|
|
25
|
+
if (!__hasOwnProp.call(to, key))
|
|
26
|
+
__defProp(to, key, {
|
|
27
|
+
get: __accessProp.bind(mod, key),
|
|
28
|
+
enumerable: true
|
|
29
|
+
});
|
|
30
|
+
}
|
|
29
31
|
if (canCache)
|
|
30
32
|
cache.set(mod, to);
|
|
31
33
|
return to;
|
|
@@ -48,7 +50,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
48
50
|
var __require = import.meta.require;
|
|
49
51
|
|
|
50
52
|
// ../../node_modules/.bun/@smithy+types@4.18.0/node_modules/@smithy/types/dist-cjs/index.js
|
|
51
|
-
var require_dist_cjs = __commonJS((exports)
|
|
53
|
+
var require_dist_cjs = __commonJS(function(exports) {
|
|
52
54
|
var HttpAuthLocation;
|
|
53
55
|
(function(HttpAuthLocation2) {
|
|
54
56
|
HttpAuthLocation2["HEADER"] = "header";
|
|
@@ -139,7 +141,7 @@ var require_dist_cjs = __commonJS((exports) => {
|
|
|
139
141
|
});
|
|
140
142
|
|
|
141
143
|
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js
|
|
142
|
-
var require_transport = __commonJS((exports)
|
|
144
|
+
var require_transport = __commonJS(function(exports) {
|
|
143
145
|
var { SMITHY_CONTEXT_KEY } = require_dist_cjs();
|
|
144
146
|
var getSmithyContext = (context) => context[SMITHY_CONTEXT_KEY] || (context[SMITHY_CONTEXT_KEY] = {});
|
|
145
147
|
function hasOwn(o, k) {
|
|
@@ -312,7 +314,7 @@ var require_transport = __commonJS((exports) => {
|
|
|
312
314
|
});
|
|
313
315
|
|
|
314
316
|
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js
|
|
315
|
-
var require_schema = __commonJS((exports)
|
|
317
|
+
var require_schema = __commonJS(function(exports) {
|
|
316
318
|
var { getSmithyContext, HttpResponse, toEndpointV1 } = require_transport();
|
|
317
319
|
var deref = (schemaRef) => {
|
|
318
320
|
if (typeof schemaRef === "function") {
|
|
@@ -981,7 +983,7 @@ var require_schema = __commonJS((exports) => {
|
|
|
981
983
|
});
|
|
982
984
|
|
|
983
985
|
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/client/index.js
|
|
984
|
-
var require_client = __commonJS((exports)
|
|
986
|
+
var require_client = __commonJS(function(exports) {
|
|
985
987
|
var { hasOwn } = require_transport();
|
|
986
988
|
var { getSmithyContext, normalizeProvider } = require_transport();
|
|
987
989
|
exports.getSmithyContext = getSmithyContext;
|
|
@@ -2061,7 +2063,7 @@ var require_client = __commonJS((exports) => {
|
|
|
2061
2063
|
});
|
|
2062
2064
|
|
|
2063
2065
|
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/config/index.js
|
|
2064
|
-
var require_config = __commonJS((exports)
|
|
2066
|
+
var require_config = __commonJS(function(exports) {
|
|
2065
2067
|
var { homedir } = __require("os");
|
|
2066
2068
|
var { sep, join } = __require("path");
|
|
2067
2069
|
var { createHash } = __require("crypto");
|
|
@@ -2756,7 +2758,7 @@ var require_config = __commonJS((exports) => {
|
|
|
2756
2758
|
});
|
|
2757
2759
|
|
|
2758
2760
|
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js
|
|
2759
|
-
var require_endpoints = __commonJS((exports)
|
|
2761
|
+
var require_endpoints = __commonJS(function(exports) {
|
|
2760
2762
|
var { CONFIG_PREFIX_SEPARATOR, booleanSelector, SelectorType, loadConfig } = require_config();
|
|
2761
2763
|
var { toEndpointV1, getSmithyContext, normalizeProvider, isValidHostLabel, hasOwn } = require_transport();
|
|
2762
2764
|
exports.isValidHostLabel = isValidHostLabel;
|
|
@@ -3570,7 +3572,7 @@ var require_endpoints = __commonJS((exports) => {
|
|
|
3570
3572
|
});
|
|
3571
3573
|
|
|
3572
3574
|
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js
|
|
3573
|
-
var require_serde = __commonJS((exports)
|
|
3575
|
+
var require_serde = __commonJS(function(exports) {
|
|
3574
3576
|
var { createHmac, createHash, getRandomValues } = __require("crypto");
|
|
3575
3577
|
var { hasOwn, HttpResponse } = require_transport();
|
|
3576
3578
|
exports.hasOwn = hasOwn;
|
|
@@ -5211,7 +5213,7 @@ ${value}\r
|
|
|
5211
5213
|
});
|
|
5212
5214
|
|
|
5213
5215
|
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js
|
|
5214
|
-
var require_checksum = __commonJS((exports)
|
|
5216
|
+
var require_checksum = __commonJS(function(exports) {
|
|
5215
5217
|
var { createReadStream } = __require("fs");
|
|
5216
5218
|
var { Writable } = __require("stream");
|
|
5217
5219
|
var { toUint8Array, concatBytes } = require_serde();
|
|
@@ -5456,7 +5458,7 @@ var require_checksum = __commonJS((exports) => {
|
|
|
5456
5458
|
}
|
|
5457
5459
|
};
|
|
5458
5460
|
}
|
|
5459
|
-
var
|
|
5461
|
+
var BLOCK = 64;
|
|
5460
5462
|
var DIGEST_LENGTH = 32;
|
|
5461
5463
|
var MAX_HASHABLE_LENGTH = 2 ** 53 - 1;
|
|
5462
5464
|
|
|
@@ -5476,13 +5478,13 @@ var require_checksum = __commonJS((exports) => {
|
|
|
5476
5478
|
this.inner = new Sha256Js;
|
|
5477
5479
|
this.outer = new Sha256Js;
|
|
5478
5480
|
const { inner, outer } = this;
|
|
5479
|
-
const pad = new Uint8Array(
|
|
5480
|
-
for (let i = 0;i <
|
|
5481
|
+
const pad = new Uint8Array(BLOCK * 2);
|
|
5482
|
+
for (let i = 0;i < BLOCK; ++i) {
|
|
5481
5483
|
pad[i] = 54 ^ key[i];
|
|
5482
|
-
pad[i +
|
|
5484
|
+
pad[i + BLOCK] = 92 ^ key[i];
|
|
5483
5485
|
}
|
|
5484
|
-
inner.update(pad.subarray(0,
|
|
5485
|
-
outer.update(pad.subarray(
|
|
5486
|
+
inner.update(pad.subarray(0, BLOCK));
|
|
5487
|
+
outer.update(pad.subarray(BLOCK));
|
|
5486
5488
|
}
|
|
5487
5489
|
}
|
|
5488
5490
|
update(data) {
|
|
@@ -5503,7 +5505,7 @@ var require_checksum = __commonJS((exports) => {
|
|
|
5503
5505
|
while (byteLength > 0) {
|
|
5504
5506
|
this.buffer[this.bufferLength++] = chunk[position++];
|
|
5505
5507
|
byteLength--;
|
|
5506
|
-
if (this.bufferLength ===
|
|
5508
|
+
if (this.bufferLength === BLOCK) {
|
|
5507
5509
|
this.hashBuffer();
|
|
5508
5510
|
this.bufferLength = 0;
|
|
5509
5511
|
}
|
|
@@ -5535,18 +5537,18 @@ var require_checksum = __commonJS((exports) => {
|
|
|
5535
5537
|
const bitsHashed = this.bytesHashed * 8;
|
|
5536
5538
|
const bufferView = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
5537
5539
|
bufferView.setUint8(bufferLength++, 128);
|
|
5538
|
-
if ((bufferLength - 1) %
|
|
5539
|
-
for (let i = bufferLength;i <
|
|
5540
|
+
if ((bufferLength - 1) % BLOCK >= BLOCK - 8) {
|
|
5541
|
+
for (let i = bufferLength;i < BLOCK; ++i) {
|
|
5540
5542
|
bufferView.setUint8(i, 0);
|
|
5541
5543
|
}
|
|
5542
5544
|
this.hashBufferWith(state, buffer);
|
|
5543
5545
|
bufferLength = 0;
|
|
5544
5546
|
}
|
|
5545
|
-
for (let i = bufferLength;i <
|
|
5547
|
+
for (let i = bufferLength;i < BLOCK - 8; ++i) {
|
|
5546
5548
|
bufferView.setUint8(i, 0);
|
|
5547
5549
|
}
|
|
5548
|
-
bufferView.setUint32(
|
|
5549
|
-
bufferView.setUint32(
|
|
5550
|
+
bufferView.setUint32(BLOCK - 8, Math.floor(bitsHashed / 4294967296), false);
|
|
5551
|
+
bufferView.setUint32(BLOCK - 4, bitsHashed, false);
|
|
5550
5552
|
this.hashBufferWith(state, buffer);
|
|
5551
5553
|
const out = new Uint8Array(DIGEST_LENGTH);
|
|
5552
5554
|
for (let i = 0;i < 8; ++i) {
|
|
@@ -5559,16 +5561,16 @@ var require_checksum = __commonJS((exports) => {
|
|
|
5559
5561
|
}
|
|
5560
5562
|
static normalizeKey(secret) {
|
|
5561
5563
|
const key = toUint8Array(secret);
|
|
5562
|
-
if (key.byteLength >
|
|
5564
|
+
if (key.byteLength > BLOCK) {
|
|
5563
5565
|
const h = new Sha256Js;
|
|
5564
5566
|
h.update(key);
|
|
5565
5567
|
const out = h.digestSync();
|
|
5566
|
-
const padded = new Uint8Array(
|
|
5568
|
+
const padded = new Uint8Array(BLOCK);
|
|
5567
5569
|
padded.set(out);
|
|
5568
5570
|
return padded;
|
|
5569
5571
|
}
|
|
5570
|
-
if (key.byteLength <
|
|
5571
|
-
const padded = new Uint8Array(
|
|
5572
|
+
if (key.byteLength < BLOCK) {
|
|
5573
|
+
const padded = new Uint8Array(BLOCK);
|
|
5572
5574
|
padded.set(key);
|
|
5573
5575
|
return padded;
|
|
5574
5576
|
}
|
|
@@ -5580,7 +5582,7 @@ var require_checksum = __commonJS((exports) => {
|
|
|
5580
5582
|
hashBufferWith(state, buffer) {
|
|
5581
5583
|
const w = this.w ??= new Int32Array(64);
|
|
5582
5584
|
let s0 = state[0], s1 = state[1], s2 = state[2], s3 = state[3], s4 = state[4], s5 = state[5], s6 = state[6], s7 = state[7];
|
|
5583
|
-
for (let i = 0;i <
|
|
5585
|
+
for (let i = 0;i < BLOCK; ++i) {
|
|
5584
5586
|
if (i < 16) {
|
|
5585
5587
|
w[i] = (buffer[i * 4] & 255) << 24 | (buffer[i * 4 + 1] & 255) << 16 | (buffer[i * 4 + 2] & 255) << 8 | buffer[i * 4 + 3] & 255;
|
|
5586
5588
|
} else {
|
|
@@ -5827,7 +5829,7 @@ var require_checksum = __commonJS((exports) => {
|
|
|
5827
5829
|
});
|
|
5828
5830
|
|
|
5829
5831
|
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js
|
|
5830
|
-
var require_event_streams = __commonJS((exports)
|
|
5832
|
+
var require_event_streams = __commonJS(function(exports) {
|
|
5831
5833
|
var { Crc32 } = require_checksum();
|
|
5832
5834
|
var { hasOwn } = require_transport();
|
|
5833
5835
|
var { toHex, fromHex, toUtf8, fromUtf8 } = require_serde();
|
|
@@ -6719,7 +6721,7 @@ var require_event_streams = __commonJS((exports) => {
|
|
|
6719
6721
|
});
|
|
6720
6722
|
|
|
6721
6723
|
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js
|
|
6722
|
-
var require_protocols = __commonJS((exports)
|
|
6724
|
+
var require_protocols = __commonJS(function(exports) {
|
|
6723
6725
|
var { Uint8ArrayBlobAdapter, sdkStreamMixin, splitEvery, splitHeader, fromBase64, _parseEpochTimestamp, _parseRfc7231DateTime, _parseRfc3339DateTimeWithOffset, LazyJsonString, NumericValue, toUtf8, fromUtf8, generateIdempotencyToken, toBase64, dateToUtcString, quoteHeader } = require_serde();
|
|
6724
6726
|
var { HttpRequest, HttpResponse, hasOwn, isValidHostname } = require_transport();
|
|
6725
6727
|
var { parseQueryString, parseUrl } = require_transport();
|
|
@@ -7723,7 +7725,7 @@ var require_protocols = __commonJS((exports) => {
|
|
|
7723
7725
|
});
|
|
7724
7726
|
|
|
7725
7727
|
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js
|
|
7726
|
-
var require_retry = __commonJS((exports)
|
|
7728
|
+
var require_retry = __commonJS(function(exports) {
|
|
7727
7729
|
var { Readable } = __require("stream");
|
|
7728
7730
|
var { NoOpLogger, normalizeProvider } = require_client();
|
|
7729
7731
|
var { HttpResponse, HttpRequest } = require_protocols();
|
|
@@ -8523,7 +8525,7 @@ var require_retry = __commonJS((exports) => {
|
|
|
8523
8525
|
});
|
|
8524
8526
|
|
|
8525
8527
|
// ../../node_modules/.bun/@aws+lambda-invoke-store@0.3.0/node_modules/@aws/lambda-invoke-store/dist-cjs/invoke-store.js
|
|
8526
|
-
var require_invoke_store = __commonJS((exports)
|
|
8528
|
+
var require_invoke_store = __commonJS(function(exports) {
|
|
8527
8529
|
var PROTECTED_KEYS = {
|
|
8528
8530
|
REQUEST_ID: Symbol.for("_AWS_LAMBDA_REQUEST_ID"),
|
|
8529
8531
|
X_RAY_TRACE_ID: Symbol.for("_AWS_LAMBDA_X_RAY_TRACE_ID"),
|
|
@@ -8652,7 +8654,7 @@ var require_invoke_store = __commonJS((exports) => {
|
|
|
8652
8654
|
});
|
|
8653
8655
|
|
|
8654
8656
|
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/index.js
|
|
8655
|
-
var require_dist_cjs2 = __commonJS((exports)
|
|
8657
|
+
var require_dist_cjs2 = __commonJS(function(exports) {
|
|
8656
8658
|
var { getSmithyContext, hasOwn } = require_transport();
|
|
8657
8659
|
exports.getSmithyContext = getSmithyContext;
|
|
8658
8660
|
var { HttpRequest } = require_protocols();
|
|
@@ -8980,7 +8982,7 @@ var require_dist_cjs2 = __commonJS((exports) => {
|
|
|
8980
8982
|
});
|
|
8981
8983
|
|
|
8982
8984
|
// ../../node_modules/.bun/bowser@2.14.1/node_modules/bowser/es5.js
|
|
8983
|
-
var require_es5 = __commonJS((exports, module)
|
|
8985
|
+
var require_es5 = __commonJS(function(exports, module) {
|
|
8984
8986
|
(function(e, t) {
|
|
8985
8987
|
typeof exports == "object" && typeof module == "object" ? module.exports = t() : typeof define == "function" && define.amd ? define([], t) : typeof exports == "object" ? exports.bowser = t() : e.bowser = t();
|
|
8986
8988
|
})(exports, function() {
|
|
@@ -9820,7 +9822,7 @@ var require_es5 = __commonJS((exports, module) => {
|
|
|
9820
9822
|
});
|
|
9821
9823
|
|
|
9822
9824
|
// ../../node_modules/.bun/@aws-sdk+core@3.977.9/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js
|
|
9823
|
-
var require_client2 = __commonJS((exports)
|
|
9825
|
+
var require_client2 = __commonJS(function(exports) {
|
|
9824
9826
|
var { Retry, RETRY_MODES } = require_retry();
|
|
9825
9827
|
var { HttpRequest, parseUrl } = require_protocols();
|
|
9826
9828
|
var { InvokeStore } = require_invoke_store();
|
|
@@ -10758,7 +10760,7 @@ More information can be found at: https://a.co/c895JFp`);
|
|
|
10758
10760
|
});
|
|
10759
10761
|
|
|
10760
10762
|
// ../../node_modules/.bun/@aws-sdk+checksums@3.1000.29/node_modules/@aws-sdk/checksums/dist-cjs/submodules/crc/index.js
|
|
10761
|
-
var require_crc = __commonJS((exports)
|
|
10763
|
+
var require_crc = __commonJS(function(exports) {
|
|
10762
10764
|
var { Crc32, Crc32Js, Crc32Node } = require_checksum();
|
|
10763
10765
|
exports.Crc32 = Crc32;
|
|
10764
10766
|
exports.Crc32Js = Crc32Js;
|
|
@@ -10915,7 +10917,7 @@ var require_crc = __commonJS((exports) => {
|
|
|
10915
10917
|
});
|
|
10916
10918
|
|
|
10917
10919
|
// ../../node_modules/.bun/@smithy+signature-v4@5.7.3/node_modules/@smithy/signature-v4/dist-cjs/index.js
|
|
10918
|
-
var require_dist_cjs3 = __commonJS((exports)
|
|
10920
|
+
var require_dist_cjs3 = __commonJS(function(exports) {
|
|
10919
10921
|
var { hasOwn, fromUtf8, fromHex, toHex, toUint8Array: toUint8Array2, isArrayBuffer: isArrayBuffer2 } = require_serde();
|
|
10920
10922
|
var { normalizeProvider: normalizeProvider2 } = require_client();
|
|
10921
10923
|
var { escapeUri, HttpRequest: HttpRequest2 } = require_protocols();
|
|
@@ -11467,7 +11469,7 @@ ${toHex(hashedRequest)}`;
|
|
|
11467
11469
|
});
|
|
11468
11470
|
|
|
11469
11471
|
// ../../node_modules/.bun/@aws-sdk+signature-v4-multi-region@3.996.46/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js
|
|
11470
|
-
var require_dist_cjs4 = __commonJS((exports)
|
|
11472
|
+
var require_dist_cjs4 = __commonJS(function(exports) {
|
|
11471
11473
|
var { SignatureV4, signatureV4aContainer } = require_dist_cjs3();
|
|
11472
11474
|
var signatureV4CrtContainer = {
|
|
11473
11475
|
CrtSignerV4: null
|
|
@@ -11599,7 +11601,7 @@ var require_dist_cjs4 = __commonJS((exports) => {
|
|
|
11599
11601
|
});
|
|
11600
11602
|
|
|
11601
11603
|
// ../../node_modules/.bun/@aws-sdk+core@3.977.9/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js
|
|
11602
|
-
var require_util = __commonJS((exports)
|
|
11604
|
+
var require_util = __commonJS(function(exports) {
|
|
11603
11605
|
var { buildQueryString } = require_protocols();
|
|
11604
11606
|
var validate = (str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6;
|
|
11605
11607
|
var parse = (arn) => {
|
|
@@ -11657,7 +11659,7 @@ var require_util = __commonJS((exports) => {
|
|
|
11657
11659
|
});
|
|
11658
11660
|
|
|
11659
11661
|
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js
|
|
11660
|
-
var require_cbor = __commonJS((exports)
|
|
11662
|
+
var require_cbor = __commonJS(function(exports) {
|
|
11661
11663
|
var { nv, NumericValue, calculateBodyLength, generateIdempotencyToken, fromBase64, _parseEpochTimestamp } = require_serde();
|
|
11662
11664
|
var { hasOwn, getSmithyContext } = require_transport();
|
|
11663
11665
|
var { HttpRequest: HttpRequest2, collectBody, SerdeContext, RpcProtocol } = require_protocols();
|
|
@@ -14107,7 +14109,7 @@ var require_cbor = __commonJS((exports) => {
|
|
|
14107
14109
|
});
|
|
14108
14110
|
|
|
14109
14111
|
// ../../node_modules/.bun/@aws-sdk+xml-builder@3.972.40/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js
|
|
14110
|
-
var require_dist_cjs5 = __commonJS((exports)
|
|
14112
|
+
var require_dist_cjs5 = __commonJS(function(exports) {
|
|
14111
14113
|
var ATTR_ESCAPE_RE = /[&<>"]/g;
|
|
14112
14114
|
var ATTR_ESCAPE_MAP = {
|
|
14113
14115
|
"&": "&",
|
|
@@ -14475,7 +14477,7 @@ var require_dist_cjs5 = __commonJS((exports) => {
|
|
|
14475
14477
|
});
|
|
14476
14478
|
|
|
14477
14479
|
// ../../node_modules/.bun/@aws-sdk+core@3.977.9/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js
|
|
14478
|
-
var require_protocols2 = __commonJS((exports)
|
|
14480
|
+
var require_protocols2 = __commonJS(function(exports) {
|
|
14479
14481
|
var { SmithyRpcV2CborProtocol, loadSmithyRpcV2CborErrorCode } = require_cbor();
|
|
14480
14482
|
var { TypeRegistry, NormalizedSchema, deref } = require_schema();
|
|
14481
14483
|
var { decorateServiceException, getValueFromTextNode } = require_client();
|
|
@@ -17316,7 +17318,7 @@ var require_protocols2 = __commonJS((exports) => {
|
|
|
17316
17318
|
});
|
|
17317
17319
|
|
|
17318
17320
|
// ../../node_modules/.bun/@aws-sdk+core@3.977.9/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js
|
|
17319
|
-
var require_httpAuthSchemes = __commonJS((exports)
|
|
17321
|
+
var require_httpAuthSchemes = __commonJS(function(exports) {
|
|
17320
17322
|
var { ProviderError, booleanSelector: booleanSelector2, SelectorType: SelectorType3, loadConfig } = require_config();
|
|
17321
17323
|
var { setCredentialFeature } = require_client2();
|
|
17322
17324
|
var { normalizeProvider: normalizeProvider2, memoizeIdentityProvider, isIdentityExpired, doesIdentityRequireRefresh } = require_dist_cjs2();
|
|
@@ -17676,13 +17678,13 @@ var init_fromEnv = __esm(() => {
|
|
|
17676
17678
|
// ../../node_modules/.bun/@aws-sdk+credential-provider-env@3.972.70/node_modules/@aws-sdk/credential-provider-env/dist-es/index.js
|
|
17677
17679
|
var exports_dist_es = {};
|
|
17678
17680
|
__export(exports_dist_es, {
|
|
17679
|
-
|
|
17680
|
-
ENV_SESSION: () => ENV_SESSION,
|
|
17681
|
-
ENV_SECRET: () => ENV_SECRET,
|
|
17682
|
-
ENV_KEY: () => ENV_KEY,
|
|
17683
|
-
ENV_EXPIRATION: () => ENV_EXPIRATION,
|
|
17681
|
+
ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID,
|
|
17684
17682
|
ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE,
|
|
17685
|
-
|
|
17683
|
+
ENV_EXPIRATION: () => ENV_EXPIRATION,
|
|
17684
|
+
ENV_KEY: () => ENV_KEY,
|
|
17685
|
+
ENV_SECRET: () => ENV_SECRET,
|
|
17686
|
+
ENV_SESSION: () => ENV_SESSION,
|
|
17687
|
+
fromEnv: () => fromEnv
|
|
17686
17688
|
});
|
|
17687
17689
|
var init_dist_es = __esm(() => {
|
|
17688
17690
|
init_fromEnv();
|
|
@@ -18066,17 +18068,17 @@ var init_fromInstanceMetadata = __esm(() => {
|
|
|
18066
18068
|
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/index.js
|
|
18067
18069
|
var exports_dist_es2 = {};
|
|
18068
18070
|
__export(exports_dist_es2, {
|
|
18069
|
-
|
|
18070
|
-
httpRequest: () => httpRequest,
|
|
18071
|
-
getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint,
|
|
18072
|
-
fromInstanceMetadata: () => fromInstanceMetadata,
|
|
18073
|
-
fromContainerMetadata: () => fromContainerMetadata,
|
|
18074
|
-
Endpoint: () => Endpoint,
|
|
18075
|
-
ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI,
|
|
18076
|
-
ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI,
|
|
18077
|
-
ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN,
|
|
18071
|
+
DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES,
|
|
18078
18072
|
DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT,
|
|
18079
|
-
|
|
18073
|
+
ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN,
|
|
18074
|
+
ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI,
|
|
18075
|
+
ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI,
|
|
18076
|
+
Endpoint: () => Endpoint,
|
|
18077
|
+
fromContainerMetadata: () => fromContainerMetadata,
|
|
18078
|
+
fromInstanceMetadata: () => fromInstanceMetadata,
|
|
18079
|
+
getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint,
|
|
18080
|
+
httpRequest: () => httpRequest,
|
|
18081
|
+
providerConfigFromInit: () => providerConfigFromInit
|
|
18080
18082
|
});
|
|
18081
18083
|
var init_dist_es2 = __esm(() => {
|
|
18082
18084
|
init_fromContainerMetadata();
|
|
@@ -18087,7 +18089,7 @@ var init_dist_es2 = __esm(() => {
|
|
|
18087
18089
|
});
|
|
18088
18090
|
|
|
18089
18091
|
// ../../node_modules/.bun/@smithy+node-http-handler@4.12.1/node_modules/@smithy/node-http-handler/dist-cjs/index.js
|
|
18090
|
-
var require_dist_cjs6 = __commonJS((exports)
|
|
18092
|
+
var require_dist_cjs6 = __commonJS(function(exports) {
|
|
18091
18093
|
var { hasOwn } = require_serde();
|
|
18092
18094
|
var { streamCollector } = require_serde();
|
|
18093
18095
|
exports.streamCollector = streamCollector;
|
|
@@ -19094,7 +19096,7 @@ var init_constants = __esm(() => {
|
|
|
19094
19096
|
});
|
|
19095
19097
|
|
|
19096
19098
|
// ../../node_modules/.bun/@aws-sdk+nested-clients@3.997.44/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js
|
|
19097
|
-
var require_sso_oidc = __commonJS((exports)
|
|
19099
|
+
var require_sso_oidc = __commonJS(function(exports) {
|
|
19098
19100
|
var { awsEndpointFunctions: awsEndpointFunctions2, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client2();
|
|
19099
19101
|
var { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require_dist_cjs2();
|
|
19100
19102
|
var { normalizeProvider: normalizeProvider3, getSmithyContext: getSmithyContext3, ServiceException, NoOpLogger: NoOpLogger2, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, makeBuilder: makeBuilder2, createAggregatedClient } = require_client();
|
|
@@ -20446,8 +20448,8 @@ var init_sso = __esm(() => {
|
|
|
20446
20448
|
// ../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.973.14/node_modules/@aws-sdk/credential-provider-sso/dist-es/loadSso.js
|
|
20447
20449
|
var exports_loadSso = {};
|
|
20448
20450
|
__export(exports_loadSso, {
|
|
20449
|
-
|
|
20450
|
-
|
|
20451
|
+
GetRoleCredentialsCommand: () => $GetRoleCredentialsCommand,
|
|
20452
|
+
SSOClient: () => $SSOClient
|
|
20451
20453
|
});
|
|
20452
20454
|
var init_loadSso = __esm(() => {
|
|
20453
20455
|
init_sso();
|
|
@@ -20640,9 +20642,9 @@ var init_fromSSO = __esm(() => {
|
|
|
20640
20642
|
// ../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.973.14/node_modules/@aws-sdk/credential-provider-sso/dist-es/index.js
|
|
20641
20643
|
var exports_dist_es4 = {};
|
|
20642
20644
|
__export(exports_dist_es4, {
|
|
20643
|
-
|
|
20645
|
+
fromSSO: () => fromSSO,
|
|
20644
20646
|
isSsoProfile: () => isSsoProfile,
|
|
20645
|
-
|
|
20647
|
+
validateSsoProfile: () => validateSsoProfile
|
|
20646
20648
|
});
|
|
20647
20649
|
var init_dist_es5 = __esm(() => {
|
|
20648
20650
|
init_fromSSO();
|
|
@@ -20681,7 +20683,7 @@ var init_resolveCredentialSource = __esm(() => {
|
|
|
20681
20683
|
});
|
|
20682
20684
|
|
|
20683
20685
|
// ../../node_modules/.bun/@aws-sdk+nested-clients@3.997.44/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js
|
|
20684
|
-
var require_sts = __commonJS((exports)
|
|
20686
|
+
var require_sts = __commonJS(function(exports) {
|
|
20685
20687
|
var { awsEndpointFunctions: awsEndpointFunctions3, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$12, createDefaultUserAgentProvider: createDefaultUserAgentProvider2, NODE_APP_ID_CONFIG_OPTIONS: NODE_APP_ID_CONFIG_OPTIONS2, getAwsRegionExtensionConfiguration: getAwsRegionExtensionConfiguration2, resolveAwsRegionExtensionConfiguration: resolveAwsRegionExtensionConfiguration2, resolveUserAgentConfig: resolveUserAgentConfig2, resolveHostHeaderConfig: resolveHostHeaderConfig2, getUserAgentPlugin: getUserAgentPlugin2, getHostHeaderPlugin: getHostHeaderPlugin2, getLoggerPlugin: getLoggerPlugin2, getRecursionDetectionPlugin: getRecursionDetectionPlugin2, setCredentialFeature: setCredentialFeature5, stsRegionDefaultResolver } = require_client2();
|
|
20686
20688
|
var { NoAuthSigner: NoAuthSigner2, getHttpAuthSchemeEndpointRuleSetPlugin: getHttpAuthSchemeEndpointRuleSetPlugin2, DefaultIdentityProviderConfig: DefaultIdentityProviderConfig2, getHttpSigningPlugin: getHttpSigningPlugin2 } = require_dist_cjs2();
|
|
20687
20689
|
var { normalizeProvider: normalizeProvider4, getSmithyContext: getSmithyContext4, ServiceException: ServiceException2, NoOpLogger: NoOpLogger3, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion2, loadConfigsForDefaultMode: loadConfigsForDefaultMode2, getDefaultExtensionConfiguration: getDefaultExtensionConfiguration2, resolveDefaultRuntimeConfig: resolveDefaultRuntimeConfig2, Client: Client2, makeBuilder: makeBuilder3, createAggregatedClient: createAggregatedClient2 } = require_client();
|
|
@@ -21771,7 +21773,7 @@ var init_resolveAssumeRoleCredentials = __esm(() => {
|
|
|
21771
21773
|
});
|
|
21772
21774
|
|
|
21773
21775
|
// ../../node_modules/.bun/@aws-sdk+nested-clients@3.997.44/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js
|
|
21774
|
-
var require_signin = __commonJS((exports)
|
|
21776
|
+
var require_signin = __commonJS(function(exports) {
|
|
21775
21777
|
var { awsEndpointFunctions: awsEndpointFunctions3, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$12, createDefaultUserAgentProvider: createDefaultUserAgentProvider2, NODE_APP_ID_CONFIG_OPTIONS: NODE_APP_ID_CONFIG_OPTIONS2, getAwsRegionExtensionConfiguration: getAwsRegionExtensionConfiguration2, resolveAwsRegionExtensionConfiguration: resolveAwsRegionExtensionConfiguration2, resolveUserAgentConfig: resolveUserAgentConfig2, resolveHostHeaderConfig: resolveHostHeaderConfig2, getUserAgentPlugin: getUserAgentPlugin2, getHostHeaderPlugin: getHostHeaderPlugin2, getLoggerPlugin: getLoggerPlugin2, getRecursionDetectionPlugin: getRecursionDetectionPlugin2 } = require_client2();
|
|
21776
21778
|
var { NoAuthSigner: NoAuthSigner2, getHttpAuthSchemeEndpointRuleSetPlugin: getHttpAuthSchemeEndpointRuleSetPlugin2, DefaultIdentityProviderConfig: DefaultIdentityProviderConfig2, getHttpSigningPlugin: getHttpSigningPlugin2 } = require_dist_cjs2();
|
|
21777
21779
|
var { normalizeProvider: normalizeProvider4, getSmithyContext: getSmithyContext4, ServiceException: ServiceException2, NoOpLogger: NoOpLogger3, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion2, loadConfigsForDefaultMode: loadConfigsForDefaultMode2, getDefaultExtensionConfiguration: getDefaultExtensionConfiguration2, resolveDefaultRuntimeConfig: resolveDefaultRuntimeConfig2, Client: Client2, makeBuilder: makeBuilder3, createAggregatedClient: createAggregatedClient2 } = require_client();
|
|
@@ -23014,8 +23016,8 @@ var init_fromTokenFile = __esm(() => {
|
|
|
23014
23016
|
// ../../node_modules/.bun/@aws-sdk+credential-provider-web-identity@3.972.76/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/index.js
|
|
23015
23017
|
var exports_dist_es7 = {};
|
|
23016
23018
|
__export(exports_dist_es7, {
|
|
23017
|
-
|
|
23018
|
-
|
|
23019
|
+
fromTokenFile: () => fromTokenFile,
|
|
23020
|
+
fromWebToken: () => fromWebToken
|
|
23019
23021
|
});
|
|
23020
23022
|
var init_dist_es8 = __esm(() => {
|
|
23021
23023
|
init_fromTokenFile();
|
|
@@ -23103,7 +23105,7 @@ import { randomUUID as randomUUID4 } from "crypto";
|
|
|
23103
23105
|
// package.json
|
|
23104
23106
|
var package_default = {
|
|
23105
23107
|
name: "@hasna/skills",
|
|
23106
|
-
version: "0.5.
|
|
23108
|
+
version: "0.5.4",
|
|
23107
23109
|
description: "Skills library for AI coding agents",
|
|
23108
23110
|
type: "module",
|
|
23109
23111
|
bin: {
|
|
@@ -23225,40 +23227,7 @@ var package_default = {
|
|
|
23225
23227
|
}
|
|
23226
23228
|
};
|
|
23227
23229
|
|
|
23228
|
-
// src/lib/skill-entry-path.ts
|
|
23229
|
-
class SkillEntryPaths {
|
|
23230
|
-
files = new Set;
|
|
23231
|
-
directories = new Set;
|
|
23232
|
-
add(path, maxBytes, invalid, limit) {
|
|
23233
|
-
if (path.length > maxBytes)
|
|
23234
|
-
limit();
|
|
23235
|
-
const encoded = new TextEncoder().encode(path);
|
|
23236
|
-
if (encoded.byteLength > maxBytes)
|
|
23237
|
-
limit();
|
|
23238
|
-
if (new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(encoded) !== path)
|
|
23239
|
-
invalid("Invalid UTF-8 entry path");
|
|
23240
|
-
if (!path || /[\\:\x00-\x1f\x7f]/u.test(path))
|
|
23241
|
-
invalid("Unsafe entry path");
|
|
23242
|
-
if (path.split("/").some((segment) => !segment || segment === "." || segment === ".."))
|
|
23243
|
-
invalid("Unsafe entry path segment");
|
|
23244
|
-
const key = path.normalize("NFC").toLowerCase().normalize("NFC");
|
|
23245
|
-
if (this.files.has(key) || this.directories.has(key))
|
|
23246
|
-
invalid("Duplicate or conflicting entry path");
|
|
23247
|
-
const parents = key.split("/");
|
|
23248
|
-
parents.pop();
|
|
23249
|
-
while (parents.length) {
|
|
23250
|
-
const parent = parents.join("/");
|
|
23251
|
-
if (this.files.has(parent))
|
|
23252
|
-
invalid("Conflicting entry file ancestor");
|
|
23253
|
-
this.directories.add(parent);
|
|
23254
|
-
parents.pop();
|
|
23255
|
-
}
|
|
23256
|
-
this.files.add(key);
|
|
23257
|
-
}
|
|
23258
|
-
}
|
|
23259
|
-
|
|
23260
23230
|
// src/lib/skill-bundle.ts
|
|
23261
|
-
var BLOCK = 512;
|
|
23262
23231
|
var ANY_SEGMENT_EXCLUDES = new Set([
|
|
23263
23232
|
".git",
|
|
23264
23233
|
".ds_store",
|
|
@@ -23395,136 +23364,6 @@ var SKILL_BUNDLE_INSPECTION_LIMITS = Object.freeze({
|
|
|
23395
23364
|
timeoutMs: 5000
|
|
23396
23365
|
});
|
|
23397
23366
|
|
|
23398
|
-
class SkillBundleInspectionError extends Error {
|
|
23399
|
-
code;
|
|
23400
|
-
constructor(code, message) {
|
|
23401
|
-
super(message);
|
|
23402
|
-
this.code = code;
|
|
23403
|
-
this.name = "SkillBundleInspectionError";
|
|
23404
|
-
}
|
|
23405
|
-
}
|
|
23406
|
-
function invalidBundle(message) {
|
|
23407
|
-
throw new SkillBundleInspectionError("BUNDLE_INVALID", message);
|
|
23408
|
-
}
|
|
23409
|
-
class BoundedTarReader {
|
|
23410
|
-
limits;
|
|
23411
|
-
check;
|
|
23412
|
-
header = new Uint8Array(BLOCK);
|
|
23413
|
-
headerOffset = 0;
|
|
23414
|
-
pending;
|
|
23415
|
-
bodyOffset = 0;
|
|
23416
|
-
padding = 0;
|
|
23417
|
-
zeroBlocks = 0;
|
|
23418
|
-
entries = [];
|
|
23419
|
-
paths = new SkillEntryPaths;
|
|
23420
|
-
fileBytes = 0;
|
|
23421
|
-
constructor(limits, check) {
|
|
23422
|
-
this.limits = limits;
|
|
23423
|
-
this.check = check;
|
|
23424
|
-
}
|
|
23425
|
-
push(chunk) {
|
|
23426
|
-
let offset = 0;
|
|
23427
|
-
while (offset < chunk.byteLength) {
|
|
23428
|
-
this.check();
|
|
23429
|
-
if (this.pending) {
|
|
23430
|
-
const count = Math.min(this.pending.bytes.byteLength - this.bodyOffset, chunk.byteLength - offset);
|
|
23431
|
-
this.pending.bytes.set(chunk.subarray(offset, offset + count), this.bodyOffset);
|
|
23432
|
-
offset += count;
|
|
23433
|
-
this.bodyOffset += count;
|
|
23434
|
-
if (this.bodyOffset === this.pending.bytes.byteLength) {
|
|
23435
|
-
this.entries.push(this.pending);
|
|
23436
|
-
this.pending = undefined;
|
|
23437
|
-
}
|
|
23438
|
-
} else if (this.padding) {
|
|
23439
|
-
const count = Math.min(this.padding, chunk.byteLength - offset);
|
|
23440
|
-
if (chunk.subarray(offset, offset + count).some((byte) => byte !== 0))
|
|
23441
|
-
invalidBundle("Nonzero tar body padding");
|
|
23442
|
-
offset += count;
|
|
23443
|
-
this.padding -= count;
|
|
23444
|
-
} else {
|
|
23445
|
-
const count = Math.min(BLOCK - this.headerOffset, chunk.byteLength - offset);
|
|
23446
|
-
this.header.set(chunk.subarray(offset, offset + count), this.headerOffset);
|
|
23447
|
-
offset += count;
|
|
23448
|
-
this.headerOffset += count;
|
|
23449
|
-
if (this.headerOffset === BLOCK) {
|
|
23450
|
-
this.readHeader();
|
|
23451
|
-
this.headerOffset = 0;
|
|
23452
|
-
}
|
|
23453
|
-
}
|
|
23454
|
-
}
|
|
23455
|
-
}
|
|
23456
|
-
finish() {
|
|
23457
|
-
this.check();
|
|
23458
|
-
if (this.pending || this.padding || this.headerOffset || this.zeroBlocks < 2)
|
|
23459
|
-
invalidBundle("Truncated tar bundle");
|
|
23460
|
-
return this.entries;
|
|
23461
|
-
}
|
|
23462
|
-
readHeader() {
|
|
23463
|
-
this.check();
|
|
23464
|
-
const h = this.header;
|
|
23465
|
-
if (h.every((byte) => byte === 0)) {
|
|
23466
|
-
this.zeroBlocks++;
|
|
23467
|
-
return;
|
|
23468
|
-
}
|
|
23469
|
-
if (this.zeroBlocks)
|
|
23470
|
-
invalidBundle("Nonzero tar data after terminator");
|
|
23471
|
-
if (this.entries.length >= this.limits.entries)
|
|
23472
|
-
throw new SkillBundleInspectionError("BUNDLE_LIMIT", "Bundle entry limit exceeded");
|
|
23473
|
-
let checksum = 0;
|
|
23474
|
-
for (let i = 0;i < BLOCK; i++)
|
|
23475
|
-
checksum += i >= 148 && i < 156 ? 32 : h[i];
|
|
23476
|
-
if (tarOctal(h.subarray(148, 156)) !== checksum)
|
|
23477
|
-
invalidBundle("Invalid tar header checksum");
|
|
23478
|
-
if (new TextDecoder().decode(h.subarray(257, 265)) !== "ustar\x00" + "00")
|
|
23479
|
-
invalidBundle("Unsupported tar format");
|
|
23480
|
-
if (h[156] !== 48 && h[156] !== 0 || h.subarray(157, 257).some((b) => b !== 0) || h.subarray(345).some((b) => b !== 0))
|
|
23481
|
-
invalidBundle("Unsupported tar entry or path prefix");
|
|
23482
|
-
const mode = tarOctal(h.subarray(100, 108));
|
|
23483
|
-
if (mode > 511)
|
|
23484
|
-
invalidBundle("Unsupported tar permission bits");
|
|
23485
|
-
tarOctal(h.subarray(108, 116));
|
|
23486
|
-
tarOctal(h.subarray(116, 124));
|
|
23487
|
-
tarOctal(h.subarray(136, 148));
|
|
23488
|
-
const size = tarOctal(h.subarray(124, 136));
|
|
23489
|
-
if (size > this.limits.fileBytes || this.fileBytes + size > this.limits.decompressedBytes) {
|
|
23490
|
-
throw new SkillBundleInspectionError("BUNDLE_LIMIT", "Bundle file byte limit exceeded");
|
|
23491
|
-
}
|
|
23492
|
-
const name = h.subarray(0, 100);
|
|
23493
|
-
const end = name.indexOf(0);
|
|
23494
|
-
if (end !== -1 && name.subarray(end).some((b) => b !== 0))
|
|
23495
|
-
invalidBundle("Invalid tar path padding");
|
|
23496
|
-
const raw = end === -1 ? name : name.subarray(0, end);
|
|
23497
|
-
if (raw.byteLength > this.limits.pathBytes)
|
|
23498
|
-
throw new SkillBundleInspectionError("BUNDLE_LIMIT", "Bundle path byte limit exceeded");
|
|
23499
|
-
let path;
|
|
23500
|
-
try {
|
|
23501
|
-
path = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(raw);
|
|
23502
|
-
} catch {
|
|
23503
|
-
return invalidBundle("Invalid UTF-8 bundle path");
|
|
23504
|
-
}
|
|
23505
|
-
this.paths.add(path, this.limits.pathBytes, invalidBundle, () => {
|
|
23506
|
-
throw new SkillBundleInspectionError("BUNDLE_LIMIT", "Bundle path byte limit exceeded");
|
|
23507
|
-
});
|
|
23508
|
-
this.fileBytes += size;
|
|
23509
|
-
this.pending = { path, mode, bytes: new Uint8Array(new ArrayBuffer(size)) };
|
|
23510
|
-
this.bodyOffset = 0;
|
|
23511
|
-
this.padding = (BLOCK - size % BLOCK) % BLOCK;
|
|
23512
|
-
if (!size) {
|
|
23513
|
-
this.entries.push(this.pending);
|
|
23514
|
-
this.pending = undefined;
|
|
23515
|
-
}
|
|
23516
|
-
}
|
|
23517
|
-
}
|
|
23518
|
-
function tarOctal(field) {
|
|
23519
|
-
const text = new TextDecoder().decode(field);
|
|
23520
|
-
if (!/^[0-7]+[\0 ]*$/.test(text))
|
|
23521
|
-
invalidBundle("Invalid tar octal field");
|
|
23522
|
-
const value = Number.parseInt(text, 8);
|
|
23523
|
-
if (!Number.isSafeInteger(value))
|
|
23524
|
-
invalidBundle("Tar integer is out of range");
|
|
23525
|
-
return value;
|
|
23526
|
-
}
|
|
23527
|
-
|
|
23528
23367
|
// ../../node_modules/.bun/@aws-sdk+checksums@3.1000.29/node_modules/@aws-sdk/checksums/dist-cjs/submodules/flexible-checksums/index.js
|
|
23529
23368
|
var { setFeature } = require_client2();
|
|
23530
23369
|
var { HttpRequest } = require_protocols();
|
|
@@ -32696,7 +32535,7 @@ var import_node_http_handler2 = __toESM(require_dist_cjs6(), 1);
|
|
|
32696
32535
|
var { toUint8Array: toUint8Array2, concatBytes } = require_serde();
|
|
32697
32536
|
var { createHmac, createHash: createHash2 } = __require("crypto");
|
|
32698
32537
|
var { Sha256: Sha2562, Sha256Js, Sha256Node } = require_checksum();
|
|
32699
|
-
var
|
|
32538
|
+
var BLOCK = 64;
|
|
32700
32539
|
var DIGEST_LENGTH = 20;
|
|
32701
32540
|
var INIT = new Int32Array([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
32702
32541
|
var K2 = new Int32Array([1518500249, 1859775393, 2400959708, 3395469782]);
|
|
@@ -32705,7 +32544,7 @@ class Sha1Js {
|
|
|
32705
32544
|
digestLength = DIGEST_LENGTH;
|
|
32706
32545
|
state = Int32Array.from(INIT);
|
|
32707
32546
|
w;
|
|
32708
|
-
buffer = new Uint8Array(
|
|
32547
|
+
buffer = new Uint8Array(BLOCK);
|
|
32709
32548
|
bufferLength = 0;
|
|
32710
32549
|
bytesHashed = 0;
|
|
32711
32550
|
finished = false;
|
|
@@ -32716,13 +32555,13 @@ class Sha1Js {
|
|
|
32716
32555
|
const key = Sha1Js.normalizeKey(secret);
|
|
32717
32556
|
this.inner = new Sha1Js;
|
|
32718
32557
|
this.outer = new Sha1Js;
|
|
32719
|
-
const pad = new Uint8Array(
|
|
32720
|
-
for (let i3 = 0;i3 <
|
|
32558
|
+
const pad = new Uint8Array(BLOCK * 2);
|
|
32559
|
+
for (let i3 = 0;i3 < BLOCK; ++i3) {
|
|
32721
32560
|
pad[i3] = 54 ^ key[i3];
|
|
32722
|
-
pad[i3 +
|
|
32561
|
+
pad[i3 + BLOCK] = 92 ^ key[i3];
|
|
32723
32562
|
}
|
|
32724
|
-
this.inner.update(pad.subarray(0,
|
|
32725
|
-
this.outer.update(pad.subarray(
|
|
32563
|
+
this.inner.update(pad.subarray(0, BLOCK));
|
|
32564
|
+
this.outer.update(pad.subarray(BLOCK));
|
|
32726
32565
|
}
|
|
32727
32566
|
}
|
|
32728
32567
|
update(data) {
|
|
@@ -32737,19 +32576,19 @@ class Sha1Js {
|
|
|
32737
32576
|
let { length } = data;
|
|
32738
32577
|
this.bytesHashed += length;
|
|
32739
32578
|
if (this.bufferLength > 0) {
|
|
32740
|
-
while (length > 0 && this.bufferLength <
|
|
32579
|
+
while (length > 0 && this.bufferLength < BLOCK) {
|
|
32741
32580
|
this.buffer[this.bufferLength++] = data[pos++];
|
|
32742
32581
|
--length;
|
|
32743
32582
|
}
|
|
32744
|
-
if (this.bufferLength ===
|
|
32583
|
+
if (this.bufferLength === BLOCK) {
|
|
32745
32584
|
this.hashBuffer(this.buffer, 0);
|
|
32746
32585
|
this.bufferLength = 0;
|
|
32747
32586
|
}
|
|
32748
32587
|
}
|
|
32749
|
-
while (length >=
|
|
32588
|
+
while (length >= BLOCK) {
|
|
32750
32589
|
this.hashBuffer(data, pos);
|
|
32751
|
-
pos +=
|
|
32752
|
-
length -=
|
|
32590
|
+
pos += BLOCK;
|
|
32591
|
+
length -= BLOCK;
|
|
32753
32592
|
}
|
|
32754
32593
|
while (length > 0) {
|
|
32755
32594
|
this.buffer[this.bufferLength++] = data[pos++];
|
|
@@ -32770,7 +32609,7 @@ class Sha1Js {
|
|
|
32770
32609
|
}
|
|
32771
32610
|
reset() {
|
|
32772
32611
|
this.state = Int32Array.from(INIT);
|
|
32773
|
-
this.buffer = new Uint8Array(
|
|
32612
|
+
this.buffer = new Uint8Array(BLOCK);
|
|
32774
32613
|
this.bufferLength = 0;
|
|
32775
32614
|
this.bytesHashed = 0;
|
|
32776
32615
|
}
|
|
@@ -32781,19 +32620,19 @@ class Sha1Js {
|
|
|
32781
32620
|
const bitsHi = this.bytesHashed / 536870912 | 0;
|
|
32782
32621
|
const bitsLo = this.bytesHashed << 3;
|
|
32783
32622
|
buffer[bufferLength++] = 128;
|
|
32784
|
-
if (bufferLength >
|
|
32785
|
-
for (let i3 = bufferLength;i3 <
|
|
32623
|
+
if (bufferLength > BLOCK - 8) {
|
|
32624
|
+
for (let i3 = bufferLength;i3 < BLOCK; ++i3) {
|
|
32786
32625
|
buffer[i3] = 0;
|
|
32787
32626
|
}
|
|
32788
32627
|
this.hashBufferWith(state, buffer, 0);
|
|
32789
32628
|
bufferLength = 0;
|
|
32790
32629
|
}
|
|
32791
|
-
for (let i3 = bufferLength;i3 <
|
|
32630
|
+
for (let i3 = bufferLength;i3 < BLOCK - 8; ++i3) {
|
|
32792
32631
|
buffer[i3] = 0;
|
|
32793
32632
|
}
|
|
32794
|
-
const v2 = new DataView(buffer.buffer, buffer.byteOffset,
|
|
32795
|
-
v2.setUint32(
|
|
32796
|
-
v2.setUint32(
|
|
32633
|
+
const v2 = new DataView(buffer.buffer, buffer.byteOffset, BLOCK);
|
|
32634
|
+
v2.setUint32(BLOCK - 8, bitsHi, false);
|
|
32635
|
+
v2.setUint32(BLOCK - 4, bitsLo, false);
|
|
32797
32636
|
this.hashBufferWith(state, buffer, 0);
|
|
32798
32637
|
const out = new Uint8Array(DIGEST_LENGTH);
|
|
32799
32638
|
out[0] = state[0] >>> 24 & 255;
|
|
@@ -32820,15 +32659,15 @@ class Sha1Js {
|
|
|
32820
32659
|
}
|
|
32821
32660
|
static normalizeKey(secret) {
|
|
32822
32661
|
const key = toUint8Array2(secret);
|
|
32823
|
-
if (key.byteLength >
|
|
32662
|
+
if (key.byteLength > BLOCK) {
|
|
32824
32663
|
const h3 = new Sha1Js;
|
|
32825
32664
|
h3.update(key);
|
|
32826
32665
|
const digest = h3.digestSync();
|
|
32827
|
-
const padded2 = new Uint8Array(
|
|
32666
|
+
const padded2 = new Uint8Array(BLOCK);
|
|
32828
32667
|
padded2.set(digest);
|
|
32829
32668
|
return padded2;
|
|
32830
32669
|
}
|
|
32831
|
-
const padded = new Uint8Array(
|
|
32670
|
+
const padded = new Uint8Array(BLOCK);
|
|
32832
32671
|
padded.set(key);
|
|
32833
32672
|
return padded;
|
|
32834
32673
|
}
|