@awsless/cli 0.0.46-local.10 → 0.0.46-local.11
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 +22 -6
- package/package.json +15 -15
package/dist/bin.js
CHANGED
|
@@ -167917,10 +167917,14 @@ var linkSdkPackages = async (buildDir, onWarn) => {
|
|
|
167917
167917
|
};
|
|
167918
167918
|
|
|
167919
167919
|
// src/dev/index.ts
|
|
167920
|
+
var breakdown = (timings) => {
|
|
167921
|
+
const slow = timings.filter(([, ms]) => ms >= 100).sort((a4, b6) => b6[1] - a4[1]);
|
|
167922
|
+
return slow.map(([name, ms]) => `${name} ${ms < 1000 ? `${Math.round(ms)}ms` : `${(ms / 1000).toFixed(1)}s`}`).join(", ");
|
|
167923
|
+
};
|
|
167920
167924
|
var LOCAL_ACCOUNT_ID = "000000000000";
|
|
167921
167925
|
var startDev = async (props) => {
|
|
167922
167926
|
const log = props.onLog ?? (() => {});
|
|
167923
|
-
const phase = props.phase ?? (async ({ start }, fn) => (log(start), fn()));
|
|
167927
|
+
const phase = props.phase ?? (async ({ start }, fn) => (log(start), fn(() => {})));
|
|
167924
167928
|
const { appConfig, stackConfigs } = props;
|
|
167925
167929
|
const { builders, appId } = createApp({
|
|
167926
167930
|
appConfig,
|
|
@@ -167939,10 +167943,17 @@ var startDev = async (props) => {
|
|
|
167939
167943
|
const dev = createDevContext({ appConfig, stackConfigs, appId, routerPorts, log, pool: props.pool });
|
|
167940
167944
|
const bundleName = getBundleFunctionName(appConfig.name);
|
|
167941
167945
|
const buildDir = getBuildPath("bundle", bundleName, ".");
|
|
167942
|
-
const { env: env4, lambda } = await phase({ start: "Preparing the local resources...", done: "Prepared the local resources" }, async () => {
|
|
167946
|
+
const { env: env4, lambda } = await phase({ start: "Preparing the local resources...", done: "Prepared the local resources" }, async (detail) => {
|
|
167947
|
+
const timings = [];
|
|
167943
167948
|
for (const feature of features) {
|
|
167944
|
-
|
|
167949
|
+
if (!feature.onDev) {
|
|
167950
|
+
continue;
|
|
167951
|
+
}
|
|
167952
|
+
const started = Date.now();
|
|
167953
|
+
await feature.onDev(dev.context);
|
|
167954
|
+
timings.push([feature.name, Date.now() - started]);
|
|
167945
167955
|
}
|
|
167956
|
+
detail(breakdown(timings));
|
|
167946
167957
|
props.pool.retain("blocked");
|
|
167947
167958
|
props.pool.retain("lambda");
|
|
167948
167959
|
await props.pool.sweep();
|
|
@@ -168041,10 +168052,14 @@ var startDev = async (props) => {
|
|
|
168041
168052
|
log
|
|
168042
168053
|
});
|
|
168043
168054
|
lambda.connect(dispatch, reportFailure);
|
|
168044
|
-
await phase({ start: "Starting the local servers...", done: "Started the local servers" }, async () => {
|
|
168055
|
+
await phase({ start: "Starting the local servers...", done: "Started the local servers" }, async (detail) => {
|
|
168056
|
+
const timings = [];
|
|
168045
168057
|
for (const server of dev.servers) {
|
|
168058
|
+
const started = Date.now();
|
|
168046
168059
|
await server.start({ dispatch, log, reportFailure, env: env4 });
|
|
168060
|
+
timings.push([server.name, Date.now() - started]);
|
|
168047
168061
|
}
|
|
168062
|
+
detail(breakdown(timings));
|
|
168048
168063
|
});
|
|
168049
168064
|
await phase({ start: "Starting the bundle worker...", done: "Started the bundle worker" }, async () => {
|
|
168050
168065
|
try {
|
|
@@ -168238,13 +168253,14 @@ var dev = (program3) => {
|
|
|
168238
168253
|
let logger = (message4) => logs_exports.step(message4);
|
|
168239
168254
|
const phase = async (titles, fn) => {
|
|
168240
168255
|
const time2 = createTimer();
|
|
168256
|
+
let detail = "";
|
|
168241
168257
|
return logs_exports.task({
|
|
168242
168258
|
initialMessage: titles.start,
|
|
168243
168259
|
errorMessage: `${titles.start.replace(/\.\.\.$/, "")} failed.`,
|
|
168244
168260
|
task: ({ updateMessage, updateSuccessMessage }) => {
|
|
168245
168261
|
logger = updateMessage;
|
|
168246
|
-
return fn().then((result) => {
|
|
168247
|
-
updateSuccessMessage(`${titles.done} in ${time2()}`);
|
|
168262
|
+
return fn((text2) => detail = text2).then((result) => {
|
|
168263
|
+
updateSuccessMessage(`${titles.done} in ${time2()}${detail ? color2.dim(` (${detail})`) : ""}`);
|
|
168248
168264
|
return result;
|
|
168249
168265
|
}).finally(() => {
|
|
168250
168266
|
logger = (message4) => logs_exports.step(message4);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/cli",
|
|
3
|
-
"version": "0.0.46-local.
|
|
3
|
+
"version": "0.0.46-local.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"@awsless/ts-file-cache": "^0.0.16"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@awsless/dynamodb": "^0.3.22",
|
|
46
|
-
"@awsless/duration": "^0.0.4",
|
|
47
45
|
"@awsless/big-float": "^0.1.7",
|
|
46
|
+
"@awsless/duration": "^0.0.4",
|
|
47
|
+
"@awsless/dynamodb": "^0.3.22",
|
|
48
48
|
"@awsless/json": "^0.0.11",
|
|
49
|
-
"@awsless/s3": "^0.0.22",
|
|
50
49
|
"@awsless/lambda": "^0.0.47",
|
|
50
|
+
"@awsless/s3": "^0.0.22",
|
|
51
51
|
"@awsless/validate": "^0.1.7",
|
|
52
52
|
"awsless": "^0.0.15-local.3",
|
|
53
53
|
"@awsless/weak-cache": "^0.0.1"
|
|
@@ -120,25 +120,25 @@
|
|
|
120
120
|
"zip-a-folder": "^3.1.6",
|
|
121
121
|
"zod": "^3.24.2",
|
|
122
122
|
"zod-to-json-schema": "^3.24.3",
|
|
123
|
-
"@awsless/big-float": "^0.1.7",
|
|
124
|
-
"@awsless/cloudwatch": "^0.0.1",
|
|
125
|
-
"@awsless/duration": "^0.0.4",
|
|
126
123
|
"@awsless/clui": "^0.0.9",
|
|
124
|
+
"@awsless/cloudwatch": "^0.0.1",
|
|
125
|
+
"@awsless/dynamodb": "^0.3.22",
|
|
127
126
|
"@awsless/iot": "^0.0.5",
|
|
128
|
-
"@awsless/
|
|
127
|
+
"@awsless/json": "^0.0.11",
|
|
128
|
+
"@awsless/duration": "^0.0.4",
|
|
129
129
|
"@awsless/open-search": "^0.0.24",
|
|
130
|
-
"@awsless/
|
|
130
|
+
"@awsless/lambda": "^0.0.47",
|
|
131
131
|
"@awsless/redis": "^0.1.13",
|
|
132
|
-
"@awsless/scheduler": "^0.0.5",
|
|
133
132
|
"@awsless/s3": "^0.0.22",
|
|
134
|
-
"@awsless/
|
|
135
|
-
"@awsless/sqs": "^0.0.24",
|
|
133
|
+
"@awsless/big-float": "^0.1.7",
|
|
136
134
|
"@awsless/size": "^0.0.2",
|
|
137
|
-
"@awsless/weak-cache": "^0.0.1",
|
|
138
135
|
"@awsless/sns": "^0.0.11",
|
|
139
|
-
"awsless": "^0.0.
|
|
136
|
+
"@awsless/scheduler": "^0.0.5",
|
|
140
137
|
"@awsless/validate": "^0.1.7",
|
|
141
|
-
"@awsless/
|
|
138
|
+
"@awsless/weak-cache": "^0.0.1",
|
|
139
|
+
"@awsless/ssm": "^0.0.8",
|
|
140
|
+
"awsless": "^0.0.15-local.3",
|
|
141
|
+
"@awsless/sqs": "^0.0.24"
|
|
142
142
|
},
|
|
143
143
|
"scripts": {
|
|
144
144
|
"test": "bun cli/build-handlers.ts && pnpm vitest",
|