@awsless/cli 0.1.11 → 0.1.12
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/dist/bin.js +418 -114
- package/dist/handlers/icon.js +1 -15
- package/dist/handlers/pubsub-publisher.js +3 -17
- package/dist/handlers/pubsub-server.js +26 -48
- package/dist/test-global-setup.js +1 -5
- package/package.json +18 -18
package/dist/bin.js
CHANGED
|
@@ -6,60 +6,39 @@ var __defProp = Object.defineProperty;
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
function __accessProp(key) {
|
|
10
|
-
return this[key];
|
|
11
|
-
}
|
|
12
|
-
var __toESMCache_node;
|
|
13
|
-
var __toESMCache_esm;
|
|
14
9
|
var __toESM = (mod, isNodeMode, target) => {
|
|
15
|
-
var canCache = mod != null && typeof mod === "object";
|
|
16
|
-
if (canCache) {
|
|
17
|
-
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
18
|
-
var cached = cache.get(mod);
|
|
19
|
-
if (cached)
|
|
20
|
-
return cached;
|
|
21
|
-
}
|
|
22
10
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
23
11
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
24
12
|
for (let key of __getOwnPropNames(mod))
|
|
25
13
|
if (!__hasOwnProp.call(to, key))
|
|
26
14
|
__defProp(to, key, {
|
|
27
|
-
get:
|
|
15
|
+
get: () => mod[key],
|
|
28
16
|
enumerable: true
|
|
29
17
|
});
|
|
30
|
-
if (canCache)
|
|
31
|
-
cache.set(mod, to);
|
|
32
18
|
return to;
|
|
33
19
|
};
|
|
20
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
34
21
|
var __toCommonJS = (from) => {
|
|
35
|
-
var entry =
|
|
22
|
+
var entry = __moduleCache.get(from), desc;
|
|
36
23
|
if (entry)
|
|
37
24
|
return entry;
|
|
38
25
|
entry = __defProp({}, "__esModule", { value: true });
|
|
39
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
45
|
-
});
|
|
46
|
-
}
|
|
26
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
27
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
28
|
+
get: () => from[key],
|
|
29
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
30
|
+
}));
|
|
47
31
|
__moduleCache.set(from, entry);
|
|
48
32
|
return entry;
|
|
49
33
|
};
|
|
50
|
-
var __moduleCache;
|
|
51
34
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
52
|
-
var __returnValue = (v) => v;
|
|
53
|
-
function __exportSetter(name, newValue) {
|
|
54
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
55
|
-
}
|
|
56
35
|
var __export = (target, all) => {
|
|
57
36
|
for (var name in all)
|
|
58
37
|
__defProp(target, name, {
|
|
59
38
|
get: all[name],
|
|
60
39
|
enumerable: true,
|
|
61
40
|
configurable: true,
|
|
62
|
-
set:
|
|
41
|
+
set: (newValue) => all[name] = () => newValue
|
|
63
42
|
});
|
|
64
43
|
};
|
|
65
44
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -853,7 +832,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
853
832
|
this._exitCallback = (err) => {
|
|
854
833
|
if (err.code !== "commander.executeSubCommandAsync") {
|
|
855
834
|
throw err;
|
|
856
|
-
}
|
|
835
|
+
} else {}
|
|
857
836
|
};
|
|
858
837
|
}
|
|
859
838
|
return this;
|
|
@@ -3090,7 +3069,7 @@ var require_cell = __commonJS((exports, module) => {
|
|
|
3090
3069
|
let content = utils.truncate(this.content, 10, this.truncate);
|
|
3091
3070
|
if (!lineNum) {
|
|
3092
3071
|
info(`${this.y}-${this.x}: ${this.rowSpan - lineNum}x${this.colSpan} Cell ${content}`);
|
|
3093
|
-
}
|
|
3072
|
+
} else {}
|
|
3094
3073
|
let padLen = Math.max(this.height - this.lines.length, 0);
|
|
3095
3074
|
let padTop;
|
|
3096
3075
|
switch (this.vAlign) {
|
|
@@ -26859,7 +26838,7 @@ var require_node_gyp_build_optional_packages = __commonJS((exports, module) => {
|
|
|
26859
26838
|
|
|
26860
26839
|
// ../../node_modules/.pnpm/msgpackr-extract@3.0.4/node_modules/msgpackr-extract/index.js
|
|
26861
26840
|
var require_msgpackr_extract = __commonJS((exports, module) => {
|
|
26862
|
-
var __dirname = "/Users/
|
|
26841
|
+
var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/msgpackr-extract@3.0.4/node_modules/msgpackr-extract";
|
|
26863
26842
|
module.exports = require_node_gyp_build_optional_packages()(__dirname);
|
|
26864
26843
|
});
|
|
26865
26844
|
|
|
@@ -39727,7 +39706,7 @@ var require_src3 = __commonJS((exports) => {
|
|
|
39727
39706
|
|
|
39728
39707
|
// ../../node_modules/.pnpm/@grpc+grpc-js@1.12.6/node_modules/@grpc/grpc-js/build/src/channelz.js
|
|
39729
39708
|
var require_channelz = __commonJS((exports) => {
|
|
39730
|
-
var __dirname = "/Users/
|
|
39709
|
+
var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/@grpc+grpc-js@1.12.6/node_modules/@grpc/grpc-js/build/src";
|
|
39731
39710
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39732
39711
|
exports.registerChannelzSocket = exports.registerChannelzServer = exports.registerChannelzSubchannel = exports.registerChannelzChannel = exports.ChannelzCallTrackerStub = exports.ChannelzCallTracker = exports.ChannelzChildrenTrackerStub = exports.ChannelzChildrenTracker = exports.ChannelzTrace = exports.ChannelzTraceStub = undefined;
|
|
39733
39712
|
exports.unregisterChannelzRef = unregisterChannelzRef;
|
|
@@ -57231,7 +57210,7 @@ var require_zipEntries = __commonJS((exports, module) => {
|
|
|
57231
57210
|
if (this.centralDirRecords !== this.files.length) {
|
|
57232
57211
|
if (this.centralDirRecords !== 0 && this.files.length === 0) {
|
|
57233
57212
|
throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
|
|
57234
|
-
}
|
|
57213
|
+
} else {}
|
|
57235
57214
|
}
|
|
57236
57215
|
},
|
|
57237
57216
|
readEndOfCentral: function() {
|
|
@@ -74452,7 +74431,7 @@ WD9f
|
|
|
74452
74431
|
|
|
74453
74432
|
// ../../node_modules/.pnpm/ioredis@5.10.1_supports-color@8.1.1/node_modules/ioredis/built/utils/index.js
|
|
74454
74433
|
var require_utils5 = __commonJS((exports) => {
|
|
74455
|
-
var __dirname = "/Users/
|
|
74434
|
+
var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/ioredis@5.10.1_supports-color@8.1.1/node_modules/ioredis/built/utils";
|
|
74456
74435
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
74457
74436
|
exports.noop = exports.defaults = exports.Debug = exports.getPackageMeta = exports.zipMap = exports.CONNECTION_CLOSED_ERROR_MSG = exports.shuffle = exports.sample = exports.resolveTLSProfile = exports.parseURL = exports.optimizeErrorStack = exports.toArg = exports.convertMapToArray = exports.convertObjectToArray = exports.timeout = exports.packObject = exports.isInt = exports.wrapMultiResult = exports.convertBufferToString = undefined;
|
|
74458
74437
|
var fs_1 = __require("fs");
|
|
@@ -74738,7 +74717,7 @@ var require_argumentParsers = __commonJS((exports) => {
|
|
|
74738
74717
|
|
|
74739
74718
|
// ../../node_modules/.pnpm/ioredis@5.10.1_supports-color@8.1.1/node_modules/ioredis/built/Command.js
|
|
74740
74719
|
var require_Command = __commonJS((exports) => {
|
|
74741
|
-
var __dirname = "/Users/
|
|
74720
|
+
var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/ioredis@5.10.1_supports-color@8.1.1/node_modules/ioredis/built";
|
|
74742
74721
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
74743
74722
|
var commands_1 = require_built();
|
|
74744
74723
|
var calculateSlot = require_lib4();
|
|
@@ -95385,7 +95364,7 @@ var require_db_util = __commonJS((exports) => {
|
|
|
95385
95364
|
|
|
95386
95365
|
// ../../node_modules/.pnpm/redis-memory-server@0.16.1_supports-color@8.1.1/node_modules/redis-memory-server/lib/util/RedisInstance.js
|
|
95387
95366
|
var require_RedisInstance = __commonJS((exports) => {
|
|
95388
|
-
var __dirname = "/Users/
|
|
95367
|
+
var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/redis-memory-server@0.16.1_supports-color@8.1.1/node_modules/redis-memory-server/lib/util";
|
|
95389
95368
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P3, generator) {
|
|
95390
95369
|
function adopt(value) {
|
|
95391
95370
|
return value instanceof P3 ? value : new P3(function(resolve3) {
|
|
@@ -101299,7 +101278,7 @@ var require_unbzip2_stream = __commonJS((exports, module) => {
|
|
|
101299
101278
|
stream2.queue(d5);
|
|
101300
101279
|
if (d5 !== null) {
|
|
101301
101280
|
outlength += d5.length;
|
|
101302
|
-
}
|
|
101281
|
+
} else {}
|
|
101303
101282
|
});
|
|
101304
101283
|
} catch (e4) {
|
|
101305
101284
|
stream2.emit("error", e4);
|
|
@@ -114515,7 +114494,7 @@ var getSanitizedDevTypeScriptVersion = (version2 = "") => {
|
|
|
114515
114494
|
};
|
|
114516
114495
|
|
|
114517
114496
|
// ../../node_modules/.pnpm/@aws-sdk+util-user-agent-node@3.973.14_aws-crt@1.30.0_supports-color@8.1.1_/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptUserAgentPair.js
|
|
114518
|
-
var __dirname = "/Users/
|
|
114497
|
+
var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/@aws-sdk+util-user-agent-node@3.973.14_aws-crt@1.30.0_supports-color@8.1.1_/node_modules/@aws-sdk/util-user-agent-node/dist-es";
|
|
114519
114498
|
var tscVersion;
|
|
114520
114499
|
var TS_PACKAGE_JSON = join7("node_modules", "typescript", "package.json");
|
|
114521
114500
|
var getTypeScriptUserAgentPair = async () => {
|
|
@@ -131592,17 +131571,6 @@ var $forEachNodeInTopologicalOrder = sort.forEachNodeInTopologicalOrder;
|
|
|
131592
131571
|
var $topologicalSort = sort.topologicalSort;
|
|
131593
131572
|
var $topologicalGenerations = sort.topologicalGenerations;
|
|
131594
131573
|
var $forEachTopologicalGeneration = sort.forEachTopologicalGeneration;
|
|
131595
|
-
// ../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm/sha1.js
|
|
131596
|
-
import { createHash as createHash3 } from "crypto";
|
|
131597
|
-
function sha1(bytes) {
|
|
131598
|
-
if (Array.isArray(bytes)) {
|
|
131599
|
-
bytes = Buffer.from(bytes);
|
|
131600
|
-
} else if (typeof bytes === "string") {
|
|
131601
|
-
bytes = Buffer.from(bytes, "utf8");
|
|
131602
|
-
}
|
|
131603
|
-
return createHash3("sha1").update(bytes).digest();
|
|
131604
|
-
}
|
|
131605
|
-
var sha1_default = sha1;
|
|
131606
131574
|
|
|
131607
131575
|
// ../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm/regex.js
|
|
131608
131576
|
var regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
|
|
@@ -131668,6 +131636,18 @@ function v35(version2, hash, value, namespace, buf, offset) {
|
|
|
131668
131636
|
return unsafeStringify(bytes);
|
|
131669
131637
|
}
|
|
131670
131638
|
|
|
131639
|
+
// ../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm/sha1.js
|
|
131640
|
+
import { createHash as createHash3 } from "crypto";
|
|
131641
|
+
function sha1(bytes) {
|
|
131642
|
+
if (Array.isArray(bytes)) {
|
|
131643
|
+
bytes = Buffer.from(bytes);
|
|
131644
|
+
} else if (typeof bytes === "string") {
|
|
131645
|
+
bytes = Buffer.from(bytes, "utf8");
|
|
131646
|
+
}
|
|
131647
|
+
return createHash3("sha1").update(bytes).digest();
|
|
131648
|
+
}
|
|
131649
|
+
var sha1_default = sha1;
|
|
131650
|
+
|
|
131671
131651
|
// ../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm/v5.js
|
|
131672
131652
|
function v5(value, namespace, buf, offset) {
|
|
131673
131653
|
return v35(80, sha1_default, value, namespace, buf, offset);
|
|
@@ -141133,6 +141113,8 @@ if (!nativeAccelerationDisabled) {
|
|
|
141133
141113
|
try {
|
|
141134
141114
|
if (true)
|
|
141135
141115
|
extractor = require_msgpackr_extract();
|
|
141116
|
+
else
|
|
141117
|
+
;
|
|
141136
141118
|
if (extractor)
|
|
141137
141119
|
setExtractor(extractor.extractStrings);
|
|
141138
141120
|
} catch (error3) {}
|
|
@@ -155087,8 +155069,19 @@ import { readFile as readFile12 } from "fs/promises";
|
|
|
155087
155069
|
import { createServer as createServer2 } from "http";
|
|
155088
155070
|
|
|
155089
155071
|
// src/dev/util.ts
|
|
155072
|
+
import { randomBytes } from "crypto";
|
|
155090
155073
|
import { createServer } from "net";
|
|
155091
155074
|
var LOCAL_ACCOUNT_ID = "000000000000";
|
|
155075
|
+
var TRACE_HEADER = "x-awsless-trace";
|
|
155076
|
+
var traceId = () => randomBytes(4).toString("hex");
|
|
155077
|
+
var formatTraceHeader = (trace) => `${trace.traceId}:${trace.spanId}`;
|
|
155078
|
+
var parseTraceHeader = (value) => {
|
|
155079
|
+
if (typeof value !== "string") {
|
|
155080
|
+
return;
|
|
155081
|
+
}
|
|
155082
|
+
const [traceId2, spanId] = value.split(":");
|
|
155083
|
+
return traceId2 && spanId ? { traceId: traceId2, spanId } : undefined;
|
|
155084
|
+
};
|
|
155092
155085
|
var readBody = (req) => {
|
|
155093
155086
|
return new Promise((resolve3, reject) => {
|
|
155094
155087
|
const chunks = [];
|
|
@@ -157381,7 +157374,7 @@ var createSnsServer = (props) => {
|
|
|
157381
157374
|
let closeServer;
|
|
157382
157375
|
let dispatch;
|
|
157383
157376
|
let reportFailure;
|
|
157384
|
-
const publish2 = (input) => {
|
|
157377
|
+
const publish2 = (input, trace) => {
|
|
157385
157378
|
const messageId = randomUUID4();
|
|
157386
157379
|
for (const capture of props?.captures ?? []) {
|
|
157387
157380
|
if (capture(input)) {
|
|
@@ -157414,7 +157407,7 @@ var createSnsServer = (props) => {
|
|
|
157414
157407
|
]
|
|
157415
157408
|
};
|
|
157416
157409
|
setImmediate(() => {
|
|
157417
|
-
dispatch?.(event).catch((error3) => {
|
|
157410
|
+
dispatch?.(event, trace).catch((error3) => {
|
|
157418
157411
|
reportFailure?.({ kind: "async", event, error: error3 });
|
|
157419
157412
|
});
|
|
157420
157413
|
});
|
|
@@ -157445,7 +157438,7 @@ var createSnsServer = (props) => {
|
|
|
157445
157438
|
res.end(`The local dev sns emulator only supports Publish, got: ${action}`);
|
|
157446
157439
|
return;
|
|
157447
157440
|
}
|
|
157448
|
-
const messageId = publish2(input);
|
|
157441
|
+
const messageId = publish2(input, parseTraceHeader(req.headers[TRACE_HEADER]));
|
|
157449
157442
|
if (isJson) {
|
|
157450
157443
|
res.writeHead(200, { "content-type": "application/x-amz-json-1.0" });
|
|
157451
157444
|
res.end(JSON.stringify({ MessageId: messageId }));
|
|
@@ -158283,7 +158276,7 @@ var startDevRouter = async (props) => {
|
|
|
158283
158276
|
const sourceIp = server2.requestIP(request)?.address ?? "127.0.0.1";
|
|
158284
158277
|
let result;
|
|
158285
158278
|
try {
|
|
158286
|
-
result = await props.dispatch(formatWebEvent(request, route, body, url, sourceIp));
|
|
158279
|
+
result = await props.dispatch(formatWebEvent(request, route, body, url, sourceIp), parseTraceHeader(request.headers.get(TRACE_HEADER)));
|
|
158287
158280
|
} catch (error3) {
|
|
158288
158281
|
props.onError?.(error3, route.routeKey);
|
|
158289
158282
|
const detail = error3 instanceof Error ? error3.stack ?? error3.message : String(error3);
|
|
@@ -158445,7 +158438,7 @@ var createRestServer = (props) => {
|
|
|
158445
158438
|
},
|
|
158446
158439
|
body: body.length > 0 ? body.toString("base64") : undefined,
|
|
158447
158440
|
isBase64Encoded: body.length > 0
|
|
158448
|
-
});
|
|
158441
|
+
}, parseTraceHeader(req.headers[TRACE_HEADER]));
|
|
158449
158442
|
writeWebResponse(res, result);
|
|
158450
158443
|
};
|
|
158451
158444
|
return {
|
|
@@ -159802,12 +159795,12 @@ var tableOnDev = async (ctx) => {
|
|
|
159802
159795
|
if (props.stream) {
|
|
159803
159796
|
const routeKey = formatRouteKey(stackName, "table", id);
|
|
159804
159797
|
const eventSourceARN = `arn:aws:dynamodb:${ctx.appConfig.region}:000000000000:table/${name}/stream/local`;
|
|
159805
|
-
const unsubscribe = server.onStreamRecord(name, (record) => {
|
|
159798
|
+
const unsubscribe = server.onStreamRecord(name, (record, context) => {
|
|
159806
159799
|
if (isWiping()) {
|
|
159807
159800
|
return;
|
|
159808
159801
|
}
|
|
159809
159802
|
const event = { Records: [{ ...record, eventSourceARN }] };
|
|
159810
|
-
dispatch(event).catch((error3) => {
|
|
159803
|
+
dispatch(event, parseTraceHeader(context)).catch((error3) => {
|
|
159811
159804
|
reportFailure({
|
|
159812
159805
|
kind: "stream",
|
|
159813
159806
|
routeKey,
|
|
@@ -160026,8 +160019,9 @@ var createSchedulerServer = () => {
|
|
|
160026
160019
|
const name = decodeURIComponent(match3[1]);
|
|
160027
160020
|
const input = JSON.parse(body.toString() || "{}");
|
|
160028
160021
|
const payload = input.Target?.Input ? JSON.parse(input.Target.Input) : {};
|
|
160022
|
+
const trace = parseTraceHeader(req.headers[TRACE_HEADER]);
|
|
160029
160023
|
setImmediate(() => {
|
|
160030
|
-
dispatch?.(payload).catch((error3) => {
|
|
160024
|
+
dispatch?.(payload, trace).catch((error3) => {
|
|
160031
160025
|
const routeKey = payload?.["$awsless-route"];
|
|
160032
160026
|
reportFailure?.({
|
|
160033
160027
|
kind: "async",
|
|
@@ -166599,7 +166593,7 @@ var createS3Server = (props) => {
|
|
|
166599
166593
|
let closeServer;
|
|
166600
166594
|
let dispatch;
|
|
166601
166595
|
let reportFailure;
|
|
166602
|
-
const notify = (eventName, bucket, key, size2, eTag) => {
|
|
166596
|
+
const notify = (eventName, bucket, key, size2, eTag, trace) => {
|
|
166603
166597
|
for (const rule of props.rules) {
|
|
166604
166598
|
const matches = rule.events.some((event2) => {
|
|
166605
166599
|
const type2 = event2.replace(/^s3:/, "");
|
|
@@ -166634,7 +166628,7 @@ var createS3Server = (props) => {
|
|
|
166634
166628
|
}
|
|
166635
166629
|
]
|
|
166636
166630
|
};
|
|
166637
|
-
dispatch?.(event).catch((error3) => {
|
|
166631
|
+
dispatch?.(event, trace).catch((error3) => {
|
|
166638
166632
|
reportFailure?.({ kind: "async", routeKey: rule.id, event, error: error3 });
|
|
166639
166633
|
});
|
|
166640
166634
|
}
|
|
@@ -166701,7 +166695,7 @@ var createS3Server = (props) => {
|
|
|
166701
166695
|
const eTag = createHash22("md5").update(body).digest("hex");
|
|
166702
166696
|
res.writeHead(200, { etag: `"${eTag}"` });
|
|
166703
166697
|
res.end();
|
|
166704
|
-
notify("ObjectCreated:Put", bucket, key, body.length, eTag);
|
|
166698
|
+
notify("ObjectCreated:Put", bucket, key, body.length, eTag, parseTraceHeader(req.headers[TRACE_HEADER]));
|
|
166705
166699
|
return;
|
|
166706
166700
|
}
|
|
166707
166701
|
if (req.method === "GET" || req.method === "HEAD") {
|
|
@@ -166724,7 +166718,7 @@ var createS3Server = (props) => {
|
|
|
166724
166718
|
await rm10(file2, { force: true });
|
|
166725
166719
|
res.writeHead(204);
|
|
166726
166720
|
res.end();
|
|
166727
|
-
notify("ObjectRemoved:Delete", bucket, key, 0, "");
|
|
166721
|
+
notify("ObjectRemoved:Delete", bucket, key, 0, "", parseTraceHeader(req.headers[TRACE_HEADER]));
|
|
166728
166722
|
return;
|
|
166729
166723
|
}
|
|
166730
166724
|
res.writeHead(501, { "content-type": "application/xml" });
|
|
@@ -166814,7 +166808,7 @@ var createSqsServer = (props) => {
|
|
|
166814
166808
|
}
|
|
166815
166809
|
return stores.get(queue);
|
|
166816
166810
|
};
|
|
166817
|
-
const deliver = (queue, input, messageId) => {
|
|
166811
|
+
const deliver = (queue, input, messageId, trace) => {
|
|
166818
166812
|
const now = Date.now();
|
|
166819
166813
|
if (props.queues.get(queue) === undefined) {
|
|
166820
166814
|
storeOf(queue).push({
|
|
@@ -166848,7 +166842,7 @@ var createSqsServer = (props) => {
|
|
|
166848
166842
|
]
|
|
166849
166843
|
};
|
|
166850
166844
|
const send = () => {
|
|
166851
|
-
dispatch?.(event).catch((error3) => {
|
|
166845
|
+
dispatch?.(event, trace).catch((error3) => {
|
|
166852
166846
|
let body = input.MessageBody;
|
|
166853
166847
|
try {
|
|
166854
166848
|
body = JSON.parse(input.MessageBody ?? "");
|
|
@@ -166894,16 +166888,16 @@ var createSqsServer = (props) => {
|
|
|
166894
166888
|
QueueUrl: queueUrl(input.QueueName)
|
|
166895
166889
|
};
|
|
166896
166890
|
},
|
|
166897
|
-
SendMessage(input) {
|
|
166891
|
+
SendMessage(input, _signal, trace) {
|
|
166898
166892
|
const queue = queueFromUrl(input.QueueUrl);
|
|
166899
166893
|
if (!queue) {
|
|
166900
166894
|
throw new Error(`Unknown local queue: ${input.QueueUrl}`);
|
|
166901
166895
|
}
|
|
166902
166896
|
const messageId = randomUUID8();
|
|
166903
|
-
deliver(queue, input, messageId);
|
|
166897
|
+
deliver(queue, input, messageId, trace);
|
|
166904
166898
|
return sendResult(input, messageId);
|
|
166905
166899
|
},
|
|
166906
|
-
SendMessageBatch(input) {
|
|
166900
|
+
SendMessageBatch(input, _signal, trace) {
|
|
166907
166901
|
const queue = queueFromUrl(input.QueueUrl);
|
|
166908
166902
|
if (!queue) {
|
|
166909
166903
|
throw new Error(`Unknown local queue: ${input.QueueUrl}`);
|
|
@@ -166911,7 +166905,7 @@ var createSqsServer = (props) => {
|
|
|
166911
166905
|
return {
|
|
166912
166906
|
Successful: (input.Entries ?? []).map((entry) => {
|
|
166913
166907
|
const messageId = randomUUID8();
|
|
166914
|
-
deliver(queue, entry, messageId);
|
|
166908
|
+
deliver(queue, entry, messageId, trace);
|
|
166915
166909
|
return {
|
|
166916
166910
|
Id: entry.Id,
|
|
166917
166911
|
...sendResult(entry, messageId)
|
|
@@ -167043,7 +167037,7 @@ var createSqsServer = (props) => {
|
|
|
167043
167037
|
if (!action) {
|
|
167044
167038
|
throw new Error(`The local dev sqs emulator does not support: ${target2}`);
|
|
167045
167039
|
}
|
|
167046
|
-
const result = await action(JSON.parse(body.toString() || "{}"), abort.signal);
|
|
167040
|
+
const result = await action(JSON.parse(body.toString() || "{}"), abort.signal, parseTraceHeader(req.headers[TRACE_HEADER]));
|
|
167047
167041
|
if (res.writableEnded || res.destroyed) {
|
|
167048
167042
|
return;
|
|
167049
167043
|
}
|
|
@@ -167341,12 +167335,90 @@ class WorkerError extends Error {
|
|
|
167341
167335
|
}
|
|
167342
167336
|
}
|
|
167343
167337
|
}
|
|
167344
|
-
var WORKER_ENTRY = `import {
|
|
167338
|
+
var WORKER_ENTRY = `import { AsyncLocalStorage } from 'node:async_hooks'
|
|
167339
|
+
import http from 'node:http'
|
|
167340
|
+
import https from 'node:https'
|
|
167341
|
+
import { createServer } from 'node:http'
|
|
167342
|
+
import { syncBuiltinESMExports } from 'node:module'
|
|
167345
167343
|
import { format } from 'node:util'
|
|
167346
167344
|
|
|
167347
167345
|
let handler
|
|
167348
167346
|
let getCurrentRoute = () => undefined
|
|
167349
167347
|
|
|
167348
|
+
// The trace of the running invocation, set per dispatch by the dev
|
|
167349
|
+
// server. The async context keeps it accurate under concurrent
|
|
167350
|
+
// requests, exactly like the route context.
|
|
167351
|
+
const traceContext = new AsyncLocalStorage()
|
|
167352
|
+
|
|
167353
|
+
const isLoopback = host => host === '127.0.0.1' || host === 'localhost' || host === '::1'
|
|
167354
|
+
|
|
167355
|
+
// Outgoing requests to the local emulators carry the active trace as a
|
|
167356
|
+
// header, so a queue send or task invoke made by a handler links the
|
|
167357
|
+
// dispatch it causes back to this invocation. Only loopback targets:
|
|
167358
|
+
// a request to a real external api must never see the header.
|
|
167359
|
+
const injectTrace = module => {
|
|
167360
|
+
const original = module.request
|
|
167361
|
+
|
|
167362
|
+
module.request = function (...args) {
|
|
167363
|
+
const trace = traceContext.getStore()
|
|
167364
|
+
|
|
167365
|
+
if (trace) {
|
|
167366
|
+
// request(url[, options][, callback]) or request(options[, callback])
|
|
167367
|
+
const index = typeof args[0] === 'string' || args[0] instanceof URL ? 1 : 0
|
|
167368
|
+
let url
|
|
167369
|
+
|
|
167370
|
+
try {
|
|
167371
|
+
url = index === 1 ? new URL(String(args[0])) : undefined
|
|
167372
|
+
} catch (_) {}
|
|
167373
|
+
|
|
167374
|
+
let options = args[index]
|
|
167375
|
+
|
|
167376
|
+
if (typeof options === 'function' || options === undefined) {
|
|
167377
|
+
args.splice(index, 0, {})
|
|
167378
|
+
options = args[index]
|
|
167379
|
+
}
|
|
167380
|
+
|
|
167381
|
+
const host = String(url?.hostname ?? options.hostname ?? options.host ?? '').split(':')[0]
|
|
167382
|
+
|
|
167383
|
+
if (isLoopback(host)) {
|
|
167384
|
+
args[index] = { ...options, headers: { ...options.headers, 'x-awsless-trace': trace } }
|
|
167385
|
+
}
|
|
167386
|
+
}
|
|
167387
|
+
|
|
167388
|
+
return original.apply(this, args)
|
|
167389
|
+
}
|
|
167390
|
+
}
|
|
167391
|
+
|
|
167392
|
+
injectTrace(http)
|
|
167393
|
+
injectTrace(https)
|
|
167394
|
+
|
|
167395
|
+
// The aws sdk grabs request via ESM named imports (like
|
|
167396
|
+
// "const { request } = await import('node:http')"), and ESM named
|
|
167397
|
+
// exports of builtins are snapshots - the sync pushes the patched
|
|
167398
|
+
// functions into those bindings too.
|
|
167399
|
+
syncBuiltinESMExports()
|
|
167400
|
+
|
|
167401
|
+
const originalFetch = globalThis.fetch
|
|
167402
|
+
|
|
167403
|
+
globalThis.fetch = (input, init) => {
|
|
167404
|
+
const trace = traceContext.getStore()
|
|
167405
|
+
|
|
167406
|
+
if (trace) {
|
|
167407
|
+
try {
|
|
167408
|
+
const url = new URL(input instanceof Request ? input.url : String(input))
|
|
167409
|
+
|
|
167410
|
+
if (isLoopback(url.hostname)) {
|
|
167411
|
+
const headers = new Headers(init?.headers ?? (input instanceof Request ? input.headers : undefined))
|
|
167412
|
+
|
|
167413
|
+
headers.set('x-awsless-trace', trace)
|
|
167414
|
+
init = { ...init, headers }
|
|
167415
|
+
}
|
|
167416
|
+
} catch (_) {}
|
|
167417
|
+
}
|
|
167418
|
+
|
|
167419
|
+
return originalFetch(input, init)
|
|
167420
|
+
}
|
|
167421
|
+
|
|
167350
167422
|
// Every console call writes ONE framed record: an invisible \\x1f
|
|
167351
167423
|
// marker with the active bundle route & the json-encoded text, so
|
|
167352
167424
|
// multi-line output stays a single log entry downstream. The route
|
|
@@ -167392,12 +167464,12 @@ const server = createServer((req, res) => {
|
|
|
167392
167464
|
let response
|
|
167393
167465
|
|
|
167394
167466
|
try {
|
|
167395
|
-
const { event, context } = JSON.parse(Buffer.concat(chunks).toString())
|
|
167467
|
+
const { event, context, trace } = JSON.parse(Buffer.concat(chunks).toString())
|
|
167396
167468
|
|
|
167397
167469
|
// Fabricate the parts of the lambda context that only exist
|
|
167398
167470
|
// at runtime, like the remaining time counter.
|
|
167399
167471
|
const started = Date.now()
|
|
167400
|
-
const
|
|
167472
|
+
const run = () => handler(event, {
|
|
167401
167473
|
functionName: process.env.AWS_LAMBDA_FUNCTION_NAME,
|
|
167402
167474
|
functionVersion: process.env.AWS_LAMBDA_FUNCTION_VERSION,
|
|
167403
167475
|
memoryLimitInMB: '512',
|
|
@@ -167406,6 +167478,8 @@ const server = createServer((req, res) => {
|
|
|
167406
167478
|
...context,
|
|
167407
167479
|
})
|
|
167408
167480
|
|
|
167481
|
+
const result = await (trace ? traceContext.run(trace, run) : run())
|
|
167482
|
+
|
|
167409
167483
|
response = { result: typeof result === 'undefined' ? null : result }
|
|
167410
167484
|
} catch (error) {
|
|
167411
167485
|
response = {
|
|
@@ -167537,7 +167611,7 @@ var createBundleWorker = (props) => {
|
|
|
167537
167611
|
await doStop();
|
|
167538
167612
|
await doStart();
|
|
167539
167613
|
}),
|
|
167540
|
-
async dispatch(event) {
|
|
167614
|
+
async dispatch(event, trace) {
|
|
167541
167615
|
if (workers.length === 0) {
|
|
167542
167616
|
throw new Error("The bundle worker is not running.");
|
|
167543
167617
|
}
|
|
@@ -167546,7 +167620,7 @@ var createBundleWorker = (props) => {
|
|
|
167546
167620
|
try {
|
|
167547
167621
|
const res = await fetch(`http://127.0.0.1:${worker.port}`, {
|
|
167548
167622
|
method: "POST",
|
|
167549
|
-
body: JSON.stringify({ event, context })
|
|
167623
|
+
body: JSON.stringify({ event, context, trace })
|
|
167550
167624
|
});
|
|
167551
167625
|
const body = await res.json();
|
|
167552
167626
|
if (body.error) {
|
|
@@ -167614,8 +167688,16 @@ var dashboardHtml = `<!doctype html>
|
|
|
167614
167688
|
aside .event .body {
|
|
167615
167689
|
color: var(--muted);
|
|
167616
167690
|
margin-top: 4px;
|
|
167617
|
-
|
|
167691
|
+
white-space: nowrap;
|
|
167692
|
+
overflow: hidden;
|
|
167693
|
+
text-overflow: ellipsis;
|
|
167694
|
+
}
|
|
167695
|
+
/* Hovering an event unfolds its payload in place, fully wrapped -
|
|
167696
|
+
the same behavior as the activity feed. */
|
|
167697
|
+
aside .event:hover .body {
|
|
167618
167698
|
white-space: pre-wrap;
|
|
167699
|
+
overflow: visible;
|
|
167700
|
+
word-break: break-word;
|
|
167619
167701
|
}
|
|
167620
167702
|
aside .empty { padding: 8px; }
|
|
167621
167703
|
.logs {
|
|
@@ -167795,20 +167877,63 @@ var dashboardHtml = `<!doctype html>
|
|
|
167795
167877
|
gap: 0 20px;
|
|
167796
167878
|
align-items: start;
|
|
167797
167879
|
}
|
|
167798
|
-
|
|
167799
|
-
.
|
|
167800
|
-
|
|
167880
|
+
.logs .route.link { cursor: pointer; }
|
|
167881
|
+
.logs .route.link:hover { text-decoration: underline; }
|
|
167882
|
+
.logs .took { color: var(--muted); margin-left: auto; flex-shrink: 0; }
|
|
167883
|
+
.logs .payload {
|
|
167884
|
+
color: var(--muted);
|
|
167885
|
+
white-space: nowrap;
|
|
167886
|
+
overflow: hidden;
|
|
167887
|
+
text-overflow: ellipsis;
|
|
167888
|
+
}
|
|
167889
|
+
/* Hovering an entry unfolds its payload in place, fully wrapped. */
|
|
167890
|
+
.logs .entry:hover .payload {
|
|
167891
|
+
white-space: pre-wrap;
|
|
167892
|
+
overflow: visible;
|
|
167893
|
+
word-break: break-word;
|
|
167894
|
+
}
|
|
167895
|
+
/* The trace chip appears once a dispatch has trace siblings & opens
|
|
167896
|
+
the trace tree of the whole request chain. */
|
|
167897
|
+
.logs .trace-link {
|
|
167898
|
+
color: var(--accent);
|
|
167899
|
+
cursor: pointer;
|
|
167900
|
+
flex-shrink: 0;
|
|
167901
|
+
}
|
|
167902
|
+
.logs .trace-link:hover { text-decoration: underline; }
|
|
167903
|
+
.overlay {
|
|
167904
|
+
position: fixed;
|
|
167905
|
+
inset: 0;
|
|
167906
|
+
background: rgb(0 0 0 / 55%);
|
|
167907
|
+
display: flex;
|
|
167908
|
+
align-items: center;
|
|
167909
|
+
justify-content: center;
|
|
167910
|
+
z-index: 50;
|
|
167911
|
+
}
|
|
167912
|
+
.overlay .modal {
|
|
167913
|
+
background: var(--bg);
|
|
167801
167914
|
border: 1px solid var(--border);
|
|
167802
|
-
border-radius:
|
|
167803
|
-
|
|
167804
|
-
|
|
167805
|
-
max-height: 420px;
|
|
167915
|
+
border-radius: 8px;
|
|
167916
|
+
width: min(760px, 92vw);
|
|
167917
|
+
max-height: 82vh;
|
|
167806
167918
|
overflow-y: auto;
|
|
167807
|
-
|
|
167919
|
+
padding: 16px 20px;
|
|
167808
167920
|
}
|
|
167809
|
-
.
|
|
167810
|
-
.
|
|
167811
|
-
.
|
|
167921
|
+
.overlay .modal-head { display: flex; align-items: baseline; gap: 10px; }
|
|
167922
|
+
.overlay .modal-head h3 { margin: 0; }
|
|
167923
|
+
.overlay .modal-head .detail { color: var(--muted); font-size: 12px; }
|
|
167924
|
+
.overlay .modal-head button {
|
|
167925
|
+
margin-left: auto;
|
|
167926
|
+
background: none;
|
|
167927
|
+
border: none;
|
|
167928
|
+
color: var(--muted);
|
|
167929
|
+
font-size: 16px;
|
|
167930
|
+
cursor: pointer;
|
|
167931
|
+
}
|
|
167932
|
+
.overlay .modal-head button:hover { color: var(--text); }
|
|
167933
|
+
/* The tree rows reuse the log entry format, the guide marks the
|
|
167934
|
+
parent-child steps of the chain. */
|
|
167935
|
+
.trace-tree { max-height: none; }
|
|
167936
|
+
.trace-tree .entry .guide { color: var(--muted); flex-shrink: 0; }
|
|
167812
167937
|
.row.problem .id { color: var(--bad); }
|
|
167813
167938
|
.empty.good { color: var(--good); }
|
|
167814
167939
|
.row .stack {
|
|
@@ -168320,6 +168445,50 @@ const rpcPanel = (main, r) => {
|
|
|
168320
168445
|
// A terminal-style view streaming a resource's live event channel,
|
|
168321
168446
|
// like the dev server output of a site. The bus replays the recent
|
|
168322
168447
|
// lines, so the boot output shows even when the panel opens later.
|
|
168448
|
+
// Resolve a feed label back to its resource: route keys match
|
|
168449
|
+
// directly, while queue/stream/topic labels carry the physical name
|
|
168450
|
+
// their resource lists as its detail.
|
|
168451
|
+
const findRouteResource = route => {
|
|
168452
|
+
const direct = state.resources.find(r => r.routeKey === route)
|
|
168453
|
+
|
|
168454
|
+
if (direct) {
|
|
168455
|
+
return direct
|
|
168456
|
+
}
|
|
168457
|
+
|
|
168458
|
+
const [kind, name] = route.split(' ')
|
|
168459
|
+
|
|
168460
|
+
if (!name) {
|
|
168461
|
+
return undefined
|
|
168462
|
+
}
|
|
168463
|
+
|
|
168464
|
+
if (kind === 'queue') {
|
|
168465
|
+
return state.resources.find(r => r.kind === 'queue' && r.detail === name)
|
|
168466
|
+
}
|
|
168467
|
+
|
|
168468
|
+
if (kind === 'stream') {
|
|
168469
|
+
return state.resources.find(r => r.kind === 'table' && r.detail === name)
|
|
168470
|
+
}
|
|
168471
|
+
|
|
168472
|
+
if (kind === 'topic') {
|
|
168473
|
+
return state.resources.find(r => r.kind === 'topic' && r.detail === name)
|
|
168474
|
+
}
|
|
168475
|
+
|
|
168476
|
+
return undefined
|
|
168477
|
+
}
|
|
168478
|
+
|
|
168479
|
+
// A route tag that links through to its resource, shared by the log
|
|
168480
|
+
// feeds & the activity feed.
|
|
168481
|
+
const routeTag = route => {
|
|
168482
|
+
const resource = findRouteResource(route)
|
|
168483
|
+
const tag = $('span', { className: 'route' + (resource ? ' link' : ''), title: route }, route)
|
|
168484
|
+
|
|
168485
|
+
if (resource) {
|
|
168486
|
+
tag.onclick = () => selectResource(resource)
|
|
168487
|
+
}
|
|
168488
|
+
|
|
168489
|
+
return tag
|
|
168490
|
+
}
|
|
168491
|
+
|
|
168323
168492
|
const attachLogFeed = (main, channel, route, title = 'Logs') => {
|
|
168324
168493
|
if (title) {
|
|
168325
168494
|
main.append($('h3', {}, title))
|
|
@@ -168351,7 +168520,7 @@ const attachLogFeed = (main, channel, route, title = 'Logs') => {
|
|
|
168351
168520
|
feed.append($('div', { className: 'entry' + error }, [
|
|
168352
168521
|
$('div', { className: 'meta' }, [
|
|
168353
168522
|
$('span', { className: 'time' }, new Date(data.date).toLocaleTimeString()),
|
|
168354
|
-
showRoute ?
|
|
168523
|
+
showRoute ? routeTag(data.route) : '',
|
|
168355
168524
|
]),
|
|
168356
168525
|
$('div', { className: 'text' }, data.line),
|
|
168357
168526
|
]))
|
|
@@ -169357,35 +169526,139 @@ const renderHome = main => {
|
|
|
169357
169526
|
|
|
169358
169527
|
activityCol.append($('h3', {}, 'Activity'))
|
|
169359
169528
|
|
|
169360
|
-
const
|
|
169361
|
-
|
|
169362
|
-
|
|
169529
|
+
const activityFeed = $('div', { className: 'logs' }, $('p', { className: 'empty' }, 'Nothing ran yet.'))
|
|
169530
|
+
activityCol.append(activityFeed)
|
|
169531
|
+
|
|
169532
|
+
// The recent dispatches kept as data, not just DOM - the trace tree
|
|
169533
|
+
// renders straight from this buffer. It outlives the visible feed,
|
|
169534
|
+
// so a chain's early spans stay renderable after the feed pruned them.
|
|
169535
|
+
const activityData = []
|
|
169536
|
+
const traceCounts = new Map()
|
|
169537
|
+
|
|
169538
|
+
const closeTrace = () => {
|
|
169539
|
+
document.querySelector('.overlay')?.remove()
|
|
169540
|
+
}
|
|
169541
|
+
|
|
169542
|
+
// The trace tree: the whole request chain of one trace as nested
|
|
169543
|
+
// spans - what ran, what caused it, how long each step took & where
|
|
169544
|
+
// it failed. Children hang under their caller in dispatch order.
|
|
169545
|
+
const openTrace = traceId => {
|
|
169546
|
+
closeTrace()
|
|
169547
|
+
|
|
169548
|
+
const entries = activityData.filter(entry => entry.trace === traceId)
|
|
169549
|
+
|
|
169550
|
+
if (entries.length === 0) {
|
|
169551
|
+
return
|
|
169552
|
+
}
|
|
169553
|
+
|
|
169554
|
+
const started = Math.min(...entries.map(entry => entry.date))
|
|
169555
|
+
const ended = Math.max(...entries.map(entry => entry.date + entry.ms))
|
|
169556
|
+
const failed = entries.some(entry => !entry.ok)
|
|
169557
|
+
|
|
169558
|
+
const tree = $('div', { className: 'logs trace-tree' })
|
|
169559
|
+
const spans = new Set(entries.map(entry => entry.span))
|
|
169560
|
+
|
|
169561
|
+
// A span whose parent already fell out of the buffer renders as
|
|
169562
|
+
// its own root instead of vanishing.
|
|
169563
|
+
const roots = entries.filter(entry => !entry.parent || !spans.has(entry.parent))
|
|
169564
|
+
|
|
169565
|
+
const renderSpan = (entry, depth) => {
|
|
169566
|
+
const guide = $('span', { className: 'guide' }, '\\u2514')
|
|
169567
|
+
guide.style.paddingLeft = ((depth - 1) * 18) + 'px'
|
|
169568
|
+
|
|
169569
|
+
tree.append($('div', { className: 'entry' + (entry.ok ? '' : ' error') }, [
|
|
169570
|
+
$('div', { className: 'meta' }, [
|
|
169571
|
+
depth > 0 ? guide : '',
|
|
169572
|
+
$('span', { className: 'time' }, new Date(entry.date).toLocaleTimeString()),
|
|
169573
|
+
routeTag(entry.route),
|
|
169574
|
+
$('span', { className: 'took' }, (entry.ok ? '' : '\\u2717 ') + entry.ms + 'ms'),
|
|
169575
|
+
]),
|
|
169576
|
+
entry.ok ? '' : $('div', { className: 'text', title: entry.error ?? '' }, entry.error ?? 'failed'),
|
|
169577
|
+
entry.payload ? $('div', { className: 'payload' }, entry.payload) : '',
|
|
169578
|
+
]))
|
|
169579
|
+
|
|
169580
|
+
for (const child of entries.filter(other => other.parent === entry.span)) {
|
|
169581
|
+
renderSpan(child, depth + 1)
|
|
169582
|
+
}
|
|
169583
|
+
}
|
|
169584
|
+
|
|
169585
|
+
for (const root of roots) {
|
|
169586
|
+
renderSpan(root, 0)
|
|
169587
|
+
}
|
|
169363
169588
|
|
|
169364
|
-
|
|
169365
|
-
|
|
169589
|
+
const close = $('button', { title: 'Close' }, '\\u2715')
|
|
169590
|
+
const overlay = $('div', { className: 'overlay' }, $('div', { className: 'modal' }, [
|
|
169591
|
+
$('div', { className: 'modal-head' }, [
|
|
169592
|
+
$('h3', {}, 'Trace ' + traceId),
|
|
169593
|
+
$('span', { className: 'detail' },
|
|
169594
|
+
entries.length + ' spans \\u00b7 ' + (ended - started) + 'ms' + (failed ? ' \\u00b7 failed' : '')),
|
|
169595
|
+
close,
|
|
169596
|
+
]),
|
|
169597
|
+
tree,
|
|
169598
|
+
]))
|
|
169366
169599
|
|
|
169367
|
-
|
|
169600
|
+
close.onclick = closeTrace
|
|
169601
|
+
overlay.onclick = event => {
|
|
169602
|
+
if (event.target === overlay) closeTrace()
|
|
169603
|
+
}
|
|
169604
|
+
|
|
169605
|
+
document.body.append(overlay)
|
|
169606
|
+
}
|
|
169607
|
+
|
|
169608
|
+
const traceChip = traceId => {
|
|
169609
|
+
const chip = $('span', { className: 'trace-link', title: 'View the whole request chain' }, 'trace')
|
|
169610
|
+
chip.onclick = () => openTrace(traceId)
|
|
169611
|
+
return chip
|
|
169612
|
+
}
|
|
169613
|
+
|
|
169614
|
+
// A lone dispatch shows no chip - once a second span of its trace
|
|
169615
|
+
// arrives, every entry of the chain gets one, retroactively.
|
|
169616
|
+
const markTraced = traceId => {
|
|
169617
|
+
for (const entry of activityFeed.querySelectorAll('[data-trace="' + traceId + '"]')) {
|
|
169618
|
+
if (!entry.querySelector('.trace-link')) {
|
|
169619
|
+
entry.querySelector('.meta')?.append(traceChip(traceId))
|
|
169620
|
+
}
|
|
169621
|
+
}
|
|
169622
|
+
}
|
|
169368
169623
|
|
|
169369
169624
|
const activityRow = data => {
|
|
169370
|
-
|
|
169625
|
+
activityFeed.querySelector('.empty')?.remove()
|
|
169626
|
+
|
|
169627
|
+
activityData.push(data)
|
|
169628
|
+
|
|
169629
|
+
while (activityData.length > 200) {
|
|
169630
|
+
activityData.shift()
|
|
169631
|
+
}
|
|
169371
169632
|
|
|
169372
|
-
|
|
169373
|
-
|
|
169374
|
-
|
|
169375
|
-
|
|
169376
|
-
$('
|
|
169633
|
+
// The same entry format as the log feeds: meta header with the
|
|
169634
|
+
// linked route tag & the duration, the payload truncated on its
|
|
169635
|
+
// own line with the full value on hover.
|
|
169636
|
+
const row = $('div', { className: 'entry' + (data.ok ? '' : ' error') }, [
|
|
169637
|
+
$('div', { className: 'meta' }, [
|
|
169638
|
+
$('span', { className: 'time' }, new Date(data.date).toLocaleTimeString()),
|
|
169639
|
+
routeTag(data.route),
|
|
169640
|
+
$('span', { className: 'took' }, (data.ok ? '' : '\\u2717 ') + data.ms + 'ms'),
|
|
169641
|
+
]),
|
|
169642
|
+
data.ok ? '' : $('div', { className: 'text', title: data.error ?? '' }, data.error ?? 'failed'),
|
|
169643
|
+
data.payload ? $('div', { className: 'payload' }, data.payload) : '',
|
|
169377
169644
|
])
|
|
169378
169645
|
|
|
169379
|
-
if (
|
|
169380
|
-
row.
|
|
169646
|
+
if (data.trace) {
|
|
169647
|
+
row.setAttribute('data-trace', data.trace)
|
|
169648
|
+
traceCounts.set(data.trace, (traceCounts.get(data.trace) ?? 0) + 1)
|
|
169381
169649
|
}
|
|
169382
169650
|
|
|
169383
|
-
|
|
169384
|
-
activityRows.push(row)
|
|
169651
|
+
activityFeed.append(row)
|
|
169385
169652
|
|
|
169386
|
-
|
|
169387
|
-
|
|
169653
|
+
if (data.trace && traceCounts.get(data.trace) > 1) {
|
|
169654
|
+
markTraced(data.trace)
|
|
169388
169655
|
}
|
|
169656
|
+
|
|
169657
|
+
while (activityFeed.children.length > 50) {
|
|
169658
|
+
activityFeed.firstChild.remove()
|
|
169659
|
+
}
|
|
169660
|
+
|
|
169661
|
+
activityFeed.scrollTop = activityFeed.scrollHeight
|
|
169389
169662
|
}
|
|
169390
169663
|
|
|
169391
169664
|
const activitySource = new EventSource('/api/events?channel=activity')
|
|
@@ -169403,6 +169676,7 @@ const renderHome = main => {
|
|
|
169403
169676
|
|
|
169404
169677
|
cleanupPanel = () => {
|
|
169405
169678
|
clearInterval(uptimeTimer)
|
|
169679
|
+
closeTrace()
|
|
169406
169680
|
healthSource.close()
|
|
169407
169681
|
problemSource.close()
|
|
169408
169682
|
activitySource.close()
|
|
@@ -169435,6 +169709,7 @@ try {
|
|
|
169435
169709
|
id: route.pattern,
|
|
169436
169710
|
stack: route.routeKey ? route.routeKey.split(':')[0] : undefined,
|
|
169437
169711
|
router: route.routerId,
|
|
169712
|
+
routeKey: route.routeKey,
|
|
169438
169713
|
detail: route.routeKey ?? ('proxy \u2192 ' + route.proxy),
|
|
169439
169714
|
url: 'http://localhost:' + state.routerPorts[route.routerId] + route.pattern.split('{')[0].replace(/\\*$/, ''),
|
|
169440
169715
|
})),
|
|
@@ -169833,7 +170108,8 @@ var createFailureReporter = (props) => {
|
|
|
169833
170108
|
return;
|
|
169834
170109
|
}
|
|
169835
170110
|
const event = JSON.parse(stringify5(format4(report)));
|
|
169836
|
-
|
|
170111
|
+
const parent = report.error?.trace;
|
|
170112
|
+
props.dispatch(formatRoutePayload2(CONSUMER_ROUTE, event), parent).catch((error3) => {
|
|
169837
170113
|
props.log(`The on-failure consumer itself failed: ${error3 instanceof Error ? error3.message : String(error3)}`);
|
|
169838
170114
|
});
|
|
169839
170115
|
};
|
|
@@ -169906,10 +170182,11 @@ var createLambdaServer = (props) => {
|
|
|
169906
170182
|
}
|
|
169907
170183
|
const type2 = String(req.headers["x-amz-invocation-type"] ?? "RequestResponse");
|
|
169908
170184
|
const event = JSON.parse(body.toString() || "{}");
|
|
170185
|
+
const trace = parseTraceHeader(req.headers[TRACE_HEADER]);
|
|
169909
170186
|
if (type2 === "Event") {
|
|
169910
170187
|
res.writeHead(202, { "content-type": "application/json" });
|
|
169911
170188
|
res.end();
|
|
169912
|
-
dispatch?.(event).catch((error3) => {
|
|
170189
|
+
dispatch?.(event, trace).catch((error3) => {
|
|
169913
170190
|
const routeKey = event?.["$awsless-route"];
|
|
169914
170191
|
reportFailure?.({
|
|
169915
170192
|
kind: "async",
|
|
@@ -169921,7 +170198,7 @@ var createLambdaServer = (props) => {
|
|
|
169921
170198
|
return;
|
|
169922
170199
|
}
|
|
169923
170200
|
try {
|
|
169924
|
-
const result = await dispatch?.(event);
|
|
170201
|
+
const result = await dispatch?.(event, trace);
|
|
169925
170202
|
res.writeHead(200, { "content-type": "application/json" });
|
|
169926
170203
|
res.end(typeof result === "undefined" || result === null ? "" : JSON.stringify(result));
|
|
169927
170204
|
} catch (error3) {
|
|
@@ -170193,21 +170470,48 @@ var startDev = async (props) => {
|
|
|
170193
170470
|
}
|
|
170194
170471
|
return "invoke";
|
|
170195
170472
|
};
|
|
170196
|
-
const
|
|
170473
|
+
const describePayload = (event) => {
|
|
170474
|
+
let payload = "";
|
|
170475
|
+
try {
|
|
170476
|
+
const envelope = event;
|
|
170477
|
+
const inner = typeof envelope?.["$awsless-route"] === "string" ? envelope.event : event;
|
|
170478
|
+
payload = JSON.stringify(inner) ?? "";
|
|
170479
|
+
} catch (_4) {}
|
|
170480
|
+
return payload.length > 1000 ? payload.slice(0, 1000) + "\u2026" : payload;
|
|
170481
|
+
};
|
|
170482
|
+
const dispatch = async (event, parent) => {
|
|
170197
170483
|
await ensureFresh();
|
|
170198
170484
|
const started = Date.now();
|
|
170199
170485
|
const route = describeDispatch(event);
|
|
170486
|
+
const payload = describePayload(event);
|
|
170487
|
+
const trace = { traceId: parent?.traceId ?? traceId(), spanId: traceId() };
|
|
170200
170488
|
try {
|
|
170201
|
-
const result = await worker.dispatch(event);
|
|
170202
|
-
dev.events.emit("activity", {
|
|
170489
|
+
const result = await worker.dispatch(event, formatTraceHeader(trace));
|
|
170490
|
+
dev.events.emit("activity", {
|
|
170491
|
+
date: started,
|
|
170492
|
+
route,
|
|
170493
|
+
payload,
|
|
170494
|
+
ms: Date.now() - started,
|
|
170495
|
+
ok: true,
|
|
170496
|
+
trace: trace.traceId,
|
|
170497
|
+
span: trace.spanId,
|
|
170498
|
+
parent: parent?.spanId
|
|
170499
|
+
});
|
|
170203
170500
|
return result;
|
|
170204
170501
|
} catch (error3) {
|
|
170502
|
+
if (error3 instanceof Error) {
|
|
170503
|
+
error3.trace = trace;
|
|
170504
|
+
}
|
|
170205
170505
|
dev.events.emit("activity", {
|
|
170206
170506
|
date: started,
|
|
170207
170507
|
route,
|
|
170508
|
+
payload,
|
|
170208
170509
|
ms: Date.now() - started,
|
|
170209
170510
|
ok: false,
|
|
170210
|
-
error: error3 instanceof Error ? error3.message : String(error3)
|
|
170511
|
+
error: error3 instanceof Error ? error3.message : String(error3),
|
|
170512
|
+
trace: trace.traceId,
|
|
170513
|
+
span: trace.spanId,
|
|
170514
|
+
parent: parent?.spanId
|
|
170211
170515
|
});
|
|
170212
170516
|
throw error3;
|
|
170213
170517
|
}
|
|
@@ -177712,7 +178016,7 @@ ${job.error.stack.split(`
|
|
|
177712
178016
|
stream2.shift();
|
|
177713
178017
|
} else if (stream2.length > 0) {
|
|
177714
178018
|
this._BOMseen = true;
|
|
177715
|
-
}
|
|
178019
|
+
} else {}
|
|
177716
178020
|
}
|
|
177717
178021
|
return codePointsToString(stream2);
|
|
177718
178022
|
}
|
package/dist/handlers/icon.js
CHANGED
|
@@ -3,29 +3,15 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
function __accessProp(key) {
|
|
7
|
-
return this[key];
|
|
8
|
-
}
|
|
9
|
-
var __toESMCache_node;
|
|
10
|
-
var __toESMCache_esm;
|
|
11
6
|
var __toESM = (mod, isNodeMode, target) => {
|
|
12
|
-
var canCache = mod != null && typeof mod === "object";
|
|
13
|
-
if (canCache) {
|
|
14
|
-
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
15
|
-
var cached = cache.get(mod);
|
|
16
|
-
if (cached)
|
|
17
|
-
return cached;
|
|
18
|
-
}
|
|
19
7
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
20
8
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
9
|
for (let key of __getOwnPropNames(mod))
|
|
22
10
|
if (!__hasOwnProp.call(to, key))
|
|
23
11
|
__defProp(to, key, {
|
|
24
|
-
get:
|
|
12
|
+
get: () => mod[key],
|
|
25
13
|
enumerable: true
|
|
26
14
|
});
|
|
27
|
-
if (canCache)
|
|
28
|
-
cache.set(mod, to);
|
|
29
15
|
return to;
|
|
30
16
|
};
|
|
31
17
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
@@ -4,29 +4,15 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
function __accessProp(key) {
|
|
8
|
-
return this[key];
|
|
9
|
-
}
|
|
10
|
-
var __toESMCache_node;
|
|
11
|
-
var __toESMCache_esm;
|
|
12
7
|
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
-
var canCache = mod != null && typeof mod === "object";
|
|
14
|
-
if (canCache) {
|
|
15
|
-
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
-
var cached = cache.get(mod);
|
|
17
|
-
if (cached)
|
|
18
|
-
return cached;
|
|
19
|
-
}
|
|
20
8
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
9
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
10
|
for (let key of __getOwnPropNames(mod))
|
|
23
11
|
if (!__hasOwnProp.call(to, key))
|
|
24
12
|
__defProp(to, key, {
|
|
25
|
-
get:
|
|
13
|
+
get: () => mod[key],
|
|
26
14
|
enumerable: true
|
|
27
15
|
});
|
|
28
|
-
if (canCache)
|
|
29
|
-
cache.set(mod, to);
|
|
30
16
|
return to;
|
|
31
17
|
};
|
|
32
18
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
@@ -4541,7 +4527,7 @@ WD9f
|
|
|
4541
4527
|
|
|
4542
4528
|
// ../../node_modules/.pnpm/ioredis@5.10.1_supports-color@8.1.1/node_modules/ioredis/built/utils/index.js
|
|
4543
4529
|
var require_utils2 = __commonJS((exports) => {
|
|
4544
|
-
var __dirname = "/Users/
|
|
4530
|
+
var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/ioredis@5.10.1_supports-color@8.1.1/node_modules/ioredis/built/utils";
|
|
4545
4531
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4546
4532
|
exports.noop = exports.defaults = exports.Debug = exports.getPackageMeta = exports.zipMap = exports.CONNECTION_CLOSED_ERROR_MSG = exports.shuffle = exports.sample = exports.resolveTLSProfile = exports.parseURL = exports.optimizeErrorStack = exports.toArg = exports.convertMapToArray = exports.convertObjectToArray = exports.timeout = exports.packObject = exports.isInt = exports.wrapMultiResult = exports.convertBufferToString = undefined;
|
|
4547
4533
|
var fs_1 = __require("fs");
|
|
@@ -4827,7 +4813,7 @@ var require_argumentParsers = __commonJS((exports) => {
|
|
|
4827
4813
|
|
|
4828
4814
|
// ../../node_modules/.pnpm/ioredis@5.10.1_supports-color@8.1.1/node_modules/ioredis/built/Command.js
|
|
4829
4815
|
var require_Command = __commonJS((exports) => {
|
|
4830
|
-
var __dirname = "/Users/
|
|
4816
|
+
var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/ioredis@5.10.1_supports-color@8.1.1/node_modules/ioredis/built";
|
|
4831
4817
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4832
4818
|
var commands_1 = require_built();
|
|
4833
4819
|
var calculateSlot = require_lib();
|
|
@@ -5,78 +5,56 @@ var __defProp = Object.defineProperty;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
function __accessProp(key) {
|
|
9
|
-
return this[key];
|
|
10
|
-
}
|
|
11
8
|
var __reExport = (target, mod, secondTarget) => {
|
|
12
|
-
|
|
13
|
-
for (let key of keys)
|
|
9
|
+
for (let key of __getOwnPropNames(mod))
|
|
14
10
|
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
15
11
|
__defProp(target, key, {
|
|
16
|
-
get:
|
|
12
|
+
get: () => mod[key],
|
|
17
13
|
enumerable: true
|
|
18
14
|
});
|
|
19
15
|
if (secondTarget) {
|
|
20
|
-
for (let key of
|
|
16
|
+
for (let key of __getOwnPropNames(mod))
|
|
21
17
|
if (!__hasOwnProp.call(secondTarget, key) && key !== "default")
|
|
22
18
|
__defProp(secondTarget, key, {
|
|
23
|
-
get:
|
|
19
|
+
get: () => mod[key],
|
|
24
20
|
enumerable: true
|
|
25
21
|
});
|
|
26
22
|
return secondTarget;
|
|
27
23
|
}
|
|
28
24
|
};
|
|
29
|
-
var __toESMCache_node;
|
|
30
|
-
var __toESMCache_esm;
|
|
31
25
|
var __toESM = (mod, isNodeMode, target) => {
|
|
32
|
-
var canCache = mod != null && typeof mod === "object";
|
|
33
|
-
if (canCache) {
|
|
34
|
-
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
35
|
-
var cached = cache.get(mod);
|
|
36
|
-
if (cached)
|
|
37
|
-
return cached;
|
|
38
|
-
}
|
|
39
26
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
40
27
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
41
28
|
for (let key of __getOwnPropNames(mod))
|
|
42
29
|
if (!__hasOwnProp.call(to, key))
|
|
43
30
|
__defProp(to, key, {
|
|
44
|
-
get:
|
|
31
|
+
get: () => mod[key],
|
|
45
32
|
enumerable: true
|
|
46
33
|
});
|
|
47
|
-
if (canCache)
|
|
48
|
-
cache.set(mod, to);
|
|
49
34
|
return to;
|
|
50
35
|
};
|
|
36
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
51
37
|
var __toCommonJS = (from) => {
|
|
52
|
-
var entry =
|
|
38
|
+
var entry = __moduleCache.get(from), desc;
|
|
53
39
|
if (entry)
|
|
54
40
|
return entry;
|
|
55
41
|
entry = __defProp({}, "__esModule", { value: true });
|
|
56
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
62
|
-
});
|
|
63
|
-
}
|
|
42
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
43
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
44
|
+
get: () => from[key],
|
|
45
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
46
|
+
}));
|
|
64
47
|
__moduleCache.set(from, entry);
|
|
65
48
|
return entry;
|
|
66
49
|
};
|
|
67
|
-
var __moduleCache;
|
|
68
50
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
69
|
-
var __returnValue = (v) => v;
|
|
70
|
-
function __exportSetter(name, newValue) {
|
|
71
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
72
|
-
}
|
|
73
51
|
var __export = (target, all) => {
|
|
74
52
|
for (var name in all)
|
|
75
53
|
__defProp(target, name, {
|
|
76
54
|
get: all[name],
|
|
77
55
|
enumerable: true,
|
|
78
56
|
configurable: true,
|
|
79
|
-
set:
|
|
57
|
+
set: (newValue) => all[name] = () => newValue
|
|
80
58
|
});
|
|
81
59
|
};
|
|
82
60
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -26633,9 +26611,9 @@ var init_getSanitizedDevTypeScriptVersion = __esm(() => {
|
|
|
26633
26611
|
});
|
|
26634
26612
|
|
|
26635
26613
|
// ../../node_modules/.pnpm/@aws-sdk+util-user-agent-node@3.973.14_aws-crt@1.30.0_supports-color@8.1.1_/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptUserAgentPair.js
|
|
26636
|
-
import { readFile as
|
|
26614
|
+
import { readFile as readFile3 } from "fs/promises";
|
|
26637
26615
|
import { join as join5 } from "path";
|
|
26638
|
-
var __dirname = "/Users/
|
|
26616
|
+
var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/@aws-sdk+util-user-agent-node@3.973.14_aws-crt@1.30.0_supports-color@8.1.1_/node_modules/@aws-sdk/util-user-agent-node/dist-es", tscVersion, TS_PACKAGE_JSON, getTypeScriptUserAgentPair = async () => {
|
|
26639
26617
|
if (tscVersion === null) {
|
|
26640
26618
|
return;
|
|
26641
26619
|
} else if (typeof tscVersion === "string") {
|
|
@@ -26655,7 +26633,7 @@ var __dirname = "/Users/work/Code/awsless/node_modules/.pnpm/@aws-sdk+util-user-
|
|
|
26655
26633
|
for (const nodeModulesParentDir of nodeModulesParentDirs) {
|
|
26656
26634
|
try {
|
|
26657
26635
|
const appPackageJsonPath = join5(nodeModulesParentDir, "package.json");
|
|
26658
|
-
const packageJson = await
|
|
26636
|
+
const packageJson = await readFile3(appPackageJsonPath, "utf-8");
|
|
26659
26637
|
const { dependencies, devDependencies } = JSON.parse(packageJson);
|
|
26660
26638
|
const version2 = devDependencies?.typescript ?? dependencies?.typescript;
|
|
26661
26639
|
if (typeof version2 !== "string") {
|
|
@@ -26673,7 +26651,7 @@ var __dirname = "/Users/work/Code/awsless/node_modules/.pnpm/@aws-sdk+util-user-
|
|
|
26673
26651
|
for (const nodeModulesParentDir of nodeModulesParentDirs) {
|
|
26674
26652
|
try {
|
|
26675
26653
|
const tsPackageJsonPath = join5(nodeModulesParentDir, TS_PACKAGE_JSON);
|
|
26676
|
-
const packageJson = await
|
|
26654
|
+
const packageJson = await readFile3(tsPackageJsonPath, "utf-8");
|
|
26677
26655
|
const { version: version2 } = JSON.parse(packageJson);
|
|
26678
26656
|
const sanitizedVersion2 = getSanitizedTypeScriptVersion(version2);
|
|
26679
26657
|
if (typeof sanitizedVersion2 !== "string") {
|
|
@@ -37045,7 +37023,7 @@ ${job.error.stack.split(`
|
|
|
37045
37023
|
stream2.shift();
|
|
37046
37024
|
} else if (stream2.length > 0) {
|
|
37047
37025
|
this._BOMseen = true;
|
|
37048
|
-
}
|
|
37026
|
+
} else {}
|
|
37049
37027
|
}
|
|
37050
37028
|
return codePointsToString(stream2);
|
|
37051
37029
|
}
|
|
@@ -937737,8 +937715,8 @@ GFS4: `);
|
|
|
937737
937715
|
fs4.createReadStream = createReadStream;
|
|
937738
937716
|
fs4.createWriteStream = createWriteStream;
|
|
937739
937717
|
var fs$readFile = fs4.readFile;
|
|
937740
|
-
fs4.readFile =
|
|
937741
|
-
function
|
|
937718
|
+
fs4.readFile = readFile4;
|
|
937719
|
+
function readFile4(path, options, cb) {
|
|
937742
937720
|
if (typeof options === "function")
|
|
937743
937721
|
cb = options, options = null;
|
|
937744
937722
|
return go$readFile(path, options, cb);
|
|
@@ -945858,7 +945836,7 @@ var require_unbzip2_stream = __commonJS((exports, module) => {
|
|
|
945858
945836
|
stream2.queue(d4);
|
|
945859
945837
|
if (d4 !== null) {
|
|
945860
945838
|
outlength += d4.length;
|
|
945861
|
-
}
|
|
945839
|
+
} else {}
|
|
945862
945840
|
});
|
|
945863
945841
|
} catch (e5) {
|
|
945864
945842
|
stream2.emit("error", e5);
|
|
@@ -955626,7 +955604,7 @@ var require_spawn = __commonJS((exports) => {
|
|
|
955626
955604
|
|
|
955627
955605
|
// ../../node_modules/.pnpm/dynamo-db-local@10.3.0/node_modules/dynamo-db-local/build/node/module.js
|
|
955628
955606
|
var require_module = __commonJS((exports) => {
|
|
955629
|
-
var __dirname = "/Users/
|
|
955607
|
+
var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/dynamo-db-local@10.3.0/node_modules/dynamo-db-local/build/node";
|
|
955630
955608
|
Object.defineProperty(exports, "__esModule", {
|
|
955631
955609
|
value: true
|
|
955632
955610
|
});
|
|
@@ -981554,7 +981532,7 @@ WD9f
|
|
|
981554
981532
|
|
|
981555
981533
|
// ../../node_modules/.pnpm/ioredis@5.10.1_supports-color@8.1.1/node_modules/ioredis/built/utils/index.js
|
|
981556
981534
|
var require_utils4 = __commonJS((exports) => {
|
|
981557
|
-
var __dirname = "/Users/
|
|
981535
|
+
var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/ioredis@5.10.1_supports-color@8.1.1/node_modules/ioredis/built/utils";
|
|
981558
981536
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
981559
981537
|
exports.noop = exports.defaults = exports.Debug = exports.getPackageMeta = exports.zipMap = exports.CONNECTION_CLOSED_ERROR_MSG = exports.shuffle = exports.sample = exports.resolveTLSProfile = exports.parseURL = exports.optimizeErrorStack = exports.toArg = exports.convertMapToArray = exports.convertObjectToArray = exports.timeout = exports.packObject = exports.isInt = exports.wrapMultiResult = exports.convertBufferToString = undefined;
|
|
981560
981538
|
var fs_1 = __require("fs");
|
|
@@ -981840,7 +981818,7 @@ var require_argumentParsers = __commonJS((exports) => {
|
|
|
981840
981818
|
|
|
981841
981819
|
// ../../node_modules/.pnpm/ioredis@5.10.1_supports-color@8.1.1/node_modules/ioredis/built/Command.js
|
|
981842
981820
|
var require_Command = __commonJS((exports) => {
|
|
981843
|
-
var __dirname = "/Users/
|
|
981821
|
+
var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/ioredis@5.10.1_supports-color@8.1.1/node_modules/ioredis/built";
|
|
981844
981822
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
981845
981823
|
var commands_1 = require_built();
|
|
981846
981824
|
var calculateSlot = require_lib3();
|
|
@@ -1001205,7 +1001183,7 @@ var require_db_util = __commonJS((exports) => {
|
|
|
1001205
1001183
|
|
|
1001206
1001184
|
// ../../node_modules/.pnpm/redis-memory-server@0.16.1_supports-color@8.1.1/node_modules/redis-memory-server/lib/util/RedisInstance.js
|
|
1001207
1001185
|
var require_RedisInstance = __commonJS((exports) => {
|
|
1001208
|
-
var __dirname = "/Users/
|
|
1001186
|
+
var __dirname = "/Users/ivandasilveira/Sites/@awsless/node_modules/.pnpm/redis-memory-server@0.16.1_supports-color@8.1.1/node_modules/redis-memory-server/lib/util";
|
|
1001209
1001187
|
var __awaiter2 = exports && exports.__awaiter || function(thisArg, _arguments, P4, generator) {
|
|
1001210
1001188
|
function adopt(value) {
|
|
1001211
1001189
|
return value instanceof P4 ? value : new P4(function(resolve) {
|
|
@@ -1015636,7 +1015614,7 @@ ${job.error.stack.split(`
|
|
|
1015636
1015614
|
stream3.shift();
|
|
1015637
1015615
|
} else if (stream3.length > 0) {
|
|
1015638
1015616
|
this._BOMseen = true;
|
|
1015639
|
-
}
|
|
1015617
|
+
} else {}
|
|
1015640
1015618
|
}
|
|
1015641
1015619
|
return codePointsToString(stream3);
|
|
1015642
1015620
|
}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __returnValue = (v) => v;
|
|
4
|
-
function __exportSetter(name, newValue) {
|
|
5
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
6
|
-
}
|
|
7
3
|
var __export = (target, all) => {
|
|
8
4
|
for (var name in all)
|
|
9
5
|
__defProp(target, name, {
|
|
10
6
|
get: all[name],
|
|
11
7
|
enumerable: true,
|
|
12
8
|
configurable: true,
|
|
13
|
-
set:
|
|
9
|
+
set: (newValue) => all[name] = () => newValue
|
|
14
10
|
});
|
|
15
11
|
};
|
|
16
12
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -38,19 +38,19 @@
|
|
|
38
38
|
"@opensearch-project/opensearch": "^2.13.0",
|
|
39
39
|
"rolldown": "1.2.1",
|
|
40
40
|
"vitest": "4.1.10",
|
|
41
|
-
"@awsless/
|
|
42
|
-
"@awsless/
|
|
41
|
+
"@awsless/ts-file-cache": "^0.0.16",
|
|
42
|
+
"@awsless/dynamodb-server": "^0.1.10"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@awsless/big-float": "^0.1.7",
|
|
46
|
-
"@awsless/dynamodb": "^0.3.24",
|
|
47
|
-
"@awsless/lambda": "^0.0.48",
|
|
48
|
-
"@awsless/json": "^0.0.11",
|
|
49
46
|
"@awsless/duration": "^0.0.4",
|
|
50
|
-
"@awsless/
|
|
47
|
+
"@awsless/dynamodb": "^0.3.25",
|
|
48
|
+
"@awsless/json": "^0.0.11",
|
|
49
|
+
"@awsless/lambda": "^0.0.48",
|
|
51
50
|
"@awsless/s3": "^0.0.22",
|
|
52
|
-
"@awsless/
|
|
53
|
-
"awsless": "^0.1.4"
|
|
51
|
+
"@awsless/validate": "^0.2.0",
|
|
52
|
+
"awsless": "^0.1.4",
|
|
53
|
+
"@awsless/weak-cache": "^0.0.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@aws-sdk/client-cloudformation": "^3.369.0",
|
|
@@ -109,24 +109,24 @@
|
|
|
109
109
|
"zod": "^3.24.2",
|
|
110
110
|
"zod-to-json-schema": "^3.24.3",
|
|
111
111
|
"@awsless/big-float": "^0.1.7",
|
|
112
|
-
"@awsless/duration": "^0.0.4",
|
|
113
112
|
"@awsless/cloudwatch": "^0.0.1",
|
|
114
|
-
"@awsless/
|
|
113
|
+
"@awsless/duration": "^0.0.4",
|
|
115
114
|
"@awsless/json": "^0.0.11",
|
|
115
|
+
"@awsless/dynamodb": "^0.3.25",
|
|
116
116
|
"@awsless/iot": "^0.0.5",
|
|
117
|
-
"@awsless/lambda": "^0.0.48",
|
|
118
117
|
"@awsless/clui": "^0.0.9",
|
|
119
|
-
"@awsless/
|
|
118
|
+
"@awsless/open-search": "^0.0.28",
|
|
119
|
+
"@awsless/scheduler": "^0.0.5",
|
|
120
120
|
"@awsless/size": "^0.0.2",
|
|
121
|
+
"@awsless/sns": "^0.0.11",
|
|
122
|
+
"@awsless/validate": "^0.2.0",
|
|
121
123
|
"@awsless/redis": "^0.1.13",
|
|
122
124
|
"@awsless/sqs": "^0.0.24",
|
|
125
|
+
"@awsless/lambda": "^0.0.48",
|
|
123
126
|
"@awsless/ssm": "^0.0.8",
|
|
124
|
-
"@awsless/scheduler": "^0.0.5",
|
|
125
|
-
"@awsless/validate": "^0.2.0",
|
|
126
|
-
"@awsless/open-search": "^0.0.28",
|
|
127
127
|
"@awsless/weak-cache": "^0.0.1",
|
|
128
|
-
"
|
|
129
|
-
"awsless": "^0.
|
|
128
|
+
"awsless": "^0.1.4",
|
|
129
|
+
"@awsless/s3": "^0.0.22"
|
|
130
130
|
},
|
|
131
131
|
"scripts": {
|
|
132
132
|
"test": "bun cli/build-handlers.ts && pnpm vitest",
|