@awsless/cli 0.0.46-next.21 → 0.0.46-next.23
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 +90 -43
- package/dist/stack.json +1 -1
- package/dist/stack.stage.json +1 -1
- package/package.json +11 -11
package/dist/bin.js
CHANGED
|
@@ -56328,7 +56328,7 @@ var require_client2 = __commonJS((exports) => {
|
|
|
56328
56328
|
var require_config = __commonJS((exports) => {
|
|
56329
56329
|
var { homedir: homedir2 } = __require("os");
|
|
56330
56330
|
var { sep: sep2, join: join30 } = __require("path");
|
|
56331
|
-
var { createHash:
|
|
56331
|
+
var { createHash: createHash18 } = __require("crypto");
|
|
56332
56332
|
var { readFile: readFile$1 } = __require("fs/promises");
|
|
56333
56333
|
var { IniSectionType: IniSectionType2 } = require_dist_cjs();
|
|
56334
56334
|
var { normalizeProvider } = require_client2();
|
|
@@ -56483,7 +56483,7 @@ var require_config = __commonJS((exports) => {
|
|
|
56483
56483
|
var DEFAULT_PROFILE = "default";
|
|
56484
56484
|
var getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE;
|
|
56485
56485
|
var getSSOTokenFilepath = (id) => {
|
|
56486
|
-
const hasher =
|
|
56486
|
+
const hasher = createHash18("sha1");
|
|
56487
56487
|
const cacheName = hasher.update(id).digest("hex");
|
|
56488
56488
|
return join30(getHomeDir(), ".aws", "sso", "cache", `${cacheName}.json`);
|
|
56489
56489
|
};
|
|
@@ -56564,7 +56564,7 @@ var require_config = __commonJS((exports) => {
|
|
|
56564
56564
|
};
|
|
56565
56565
|
var filePromises = {};
|
|
56566
56566
|
var fileIntercept = {};
|
|
56567
|
-
var
|
|
56567
|
+
var readFile14 = (path2, options) => {
|
|
56568
56568
|
if (fileIntercept[path2] !== undefined) {
|
|
56569
56569
|
return fileIntercept[path2];
|
|
56570
56570
|
}
|
|
@@ -56587,10 +56587,10 @@ var require_config = __commonJS((exports) => {
|
|
|
56587
56587
|
resolvedConfigFilepath = join30(homeDir, configFilepath.slice(2));
|
|
56588
56588
|
}
|
|
56589
56589
|
const parsedFiles = await Promise.all([
|
|
56590
|
-
|
|
56590
|
+
readFile14(resolvedConfigFilepath, {
|
|
56591
56591
|
ignoreCache: init.ignoreCache
|
|
56592
56592
|
}).then(parseIni).then(getConfigData).catch(swallowError$1),
|
|
56593
|
-
|
|
56593
|
+
readFile14(resolvedFilepath, {
|
|
56594
56594
|
ignoreCache: init.ignoreCache
|
|
56595
56595
|
}).then(parseIni).catch(swallowError$1)
|
|
56596
56596
|
]);
|
|
@@ -56601,7 +56601,7 @@ var require_config = __commonJS((exports) => {
|
|
|
56601
56601
|
};
|
|
56602
56602
|
var getSsoSessionData = (data) => Object.entries(data).filter(([key]) => key.startsWith(IniSectionType2.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {});
|
|
56603
56603
|
var swallowError = () => ({});
|
|
56604
|
-
var loadSsoSessionData = async (init = {}) =>
|
|
56604
|
+
var loadSsoSessionData = async (init = {}) => readFile14(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError);
|
|
56605
56605
|
var mergeConfigFiles = (...files) => {
|
|
56606
56606
|
const merged = {};
|
|
56607
56607
|
for (const file2 of files) {
|
|
@@ -57012,7 +57012,7 @@ var require_config = __commonJS((exports) => {
|
|
|
57012
57012
|
exports.nodeFipsConfigSelectors = nodeFipsConfigSelectors;
|
|
57013
57013
|
exports.numberSelector = numberSelector;
|
|
57014
57014
|
exports.parseKnownFiles = parseKnownFiles;
|
|
57015
|
-
exports.readFile =
|
|
57015
|
+
exports.readFile = readFile14;
|
|
57016
57016
|
exports.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig;
|
|
57017
57017
|
exports.resolveDefaultsModeConfig = resolveDefaultsModeConfig;
|
|
57018
57018
|
exports.resolveEndpointsConfig = resolveEndpointsConfig;
|
|
@@ -57833,7 +57833,7 @@ var require_endpoints = __commonJS((exports) => {
|
|
|
57833
57833
|
|
|
57834
57834
|
// ../../node_modules/.pnpm/@smithy+core@3.29.7/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js
|
|
57835
57835
|
var require_serde = __commonJS((exports) => {
|
|
57836
|
-
var { createHmac: createHmac3, createHash:
|
|
57836
|
+
var { createHmac: createHmac3, createHash: createHash18, getRandomValues } = __require("crypto");
|
|
57837
57837
|
var { ReadStream, lstatSync: lstatSync2, fstatSync } = __require("fs");
|
|
57838
57838
|
var { HttpResponse: HttpResponse2 } = require_transport2();
|
|
57839
57839
|
var { toEndpointV1 } = require_endpoints();
|
|
@@ -58735,7 +58735,7 @@ var require_serde = __commonJS((exports) => {
|
|
|
58735
58735
|
return Promise.resolve(this.hash.digest());
|
|
58736
58736
|
}
|
|
58737
58737
|
reset() {
|
|
58738
|
-
this.hash = this.secret ? createHmac3(this.algorithmIdentifier, castSourceData(this.secret)) :
|
|
58738
|
+
this.hash = this.secret ? createHmac3(this.algorithmIdentifier, castSourceData(this.secret)) : createHash18(this.algorithmIdentifier);
|
|
58739
58739
|
}
|
|
58740
58740
|
}
|
|
58741
58741
|
function castSourceData(toCast, encoding) {
|
|
@@ -59474,7 +59474,7 @@ var require_checksum = __commonJS((exports) => {
|
|
|
59474
59474
|
var { createReadStream: createReadStream2 } = __require("fs");
|
|
59475
59475
|
var { Writable } = __require("stream");
|
|
59476
59476
|
var { toUint8Array, concatBytes } = require_serde();
|
|
59477
|
-
var { createHash:
|
|
59477
|
+
var { createHash: createHash18, createHmac: createHmac3 } = __require("crypto");
|
|
59478
59478
|
var zlib = __require("zlib");
|
|
59479
59479
|
async function blobReader(blob, onChunk, chunkSize = 1024 * 1024) {
|
|
59480
59480
|
const size = blob.size;
|
|
@@ -59639,7 +59639,7 @@ var require_checksum = __commonJS((exports) => {
|
|
|
59639
59639
|
}
|
|
59640
59640
|
var hasNativeCrypto$1 = (() => {
|
|
59641
59641
|
try {
|
|
59642
|
-
|
|
59642
|
+
createHash18("md5");
|
|
59643
59643
|
return true;
|
|
59644
59644
|
} catch {
|
|
59645
59645
|
return false;
|
|
@@ -59649,7 +59649,7 @@ var require_checksum = __commonJS((exports) => {
|
|
|
59649
59649
|
function buildNativeClass$2() {
|
|
59650
59650
|
return class Md5Node2 {
|
|
59651
59651
|
digestLength = 16;
|
|
59652
|
-
hash =
|
|
59652
|
+
hash = createHash18("md5");
|
|
59653
59653
|
update(data) {
|
|
59654
59654
|
this.hash.update(toUint8Array(data));
|
|
59655
59655
|
}
|
|
@@ -59658,7 +59658,7 @@ var require_checksum = __commonJS((exports) => {
|
|
|
59658
59658
|
return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);
|
|
59659
59659
|
}
|
|
59660
59660
|
reset() {
|
|
59661
|
-
this.hash =
|
|
59661
|
+
this.hash = createHash18("md5");
|
|
59662
59662
|
}
|
|
59663
59663
|
};
|
|
59664
59664
|
}
|
|
@@ -59948,7 +59948,7 @@ var require_checksum = __commonJS((exports) => {
|
|
|
59948
59948
|
]);
|
|
59949
59949
|
var hasNativeCrypto = (() => {
|
|
59950
59950
|
try {
|
|
59951
|
-
|
|
59951
|
+
createHash18("sha256");
|
|
59952
59952
|
return true;
|
|
59953
59953
|
} catch {
|
|
59954
59954
|
return false;
|
|
@@ -59988,7 +59988,7 @@ var require_checksum = __commonJS((exports) => {
|
|
|
59988
59988
|
this.finished = false;
|
|
59989
59989
|
}
|
|
59990
59990
|
createHash() {
|
|
59991
|
-
return this.secret ? createHmac3("sha256", toBuffer(this.secret)) :
|
|
59991
|
+
return this.secret ? createHmac3("sha256", toBuffer(this.secret)) : createHash18("sha256");
|
|
59992
59992
|
}
|
|
59993
59993
|
};
|
|
59994
59994
|
}
|
|
@@ -74174,7 +74174,7 @@ var require_signin = __commonJS((exports) => {
|
|
|
74174
74174
|
});
|
|
74175
74175
|
|
|
74176
74176
|
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-login@3.972.66/node_modules/@aws-sdk/credential-provider-login/dist-es/LoginCredentialsFetcher.js
|
|
74177
|
-
import { createHash as
|
|
74177
|
+
import { createHash as createHash18, createPrivateKey, createPublicKey, sign } from "crypto";
|
|
74178
74178
|
import { promises as fs3 } from "fs";
|
|
74179
74179
|
import { homedir as homedir3 } from "os";
|
|
74180
74180
|
import { dirname as dirname19, join as join33 } from "path";
|
|
@@ -74338,7 +74338,7 @@ var init_LoginCredentialsFetcher = __esm(() => {
|
|
|
74338
74338
|
getTokenFilePath() {
|
|
74339
74339
|
const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join33(homedir3(), ".aws", "login", "cache");
|
|
74340
74340
|
const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
|
|
74341
|
-
const loginSessionSha256 =
|
|
74341
|
+
const loginSessionSha256 = createHash18("sha256").update(loginSessionBytes).digest("hex");
|
|
74342
74342
|
return join33(directory, `${loginSessionSha256}.json`);
|
|
74343
74343
|
}
|
|
74344
74344
|
derToRawSignature(derSignature) {
|
|
@@ -101700,7 +101700,7 @@ var SitesSchema = exports_external.record(ResourceIdSchema, exports_external.obj
|
|
|
101700
101700
|
configs: exports_external.string().array().optional().describe("Define the config values for your build command.")
|
|
101701
101701
|
}).optional().describe(`Specifies the build process for sites that need a build step.`),
|
|
101702
101702
|
static: exports_external.union([LocalDirectorySchema, exports_external.boolean()]).optional().describe("Specifies the path to the static files directory. Additionally you can also pass `true` when you don't have local static files, but still want to make an S3 bucket."),
|
|
101703
|
-
ssr:
|
|
101703
|
+
ssr: StackFunctionSchema.optional().describe("Specifies the file that will render the site on the server.")
|
|
101704
101704
|
})).optional().describe("Define the sites in your stack.");
|
|
101705
101705
|
|
|
101706
101706
|
// src/feature/store/schema.ts
|
|
@@ -106637,7 +106637,37 @@ ${(errors3.trim() || output.trim()).slice(-2000)}`);
|
|
|
106637
106637
|
});
|
|
106638
106638
|
});
|
|
106639
106639
|
}
|
|
106640
|
-
if (props.ssr) {
|
|
106640
|
+
if (props.ssr && isStandaloneFunction(props.ssr)) {
|
|
106641
|
+
const fn = createLambdaFunction(ctx, `${id}-ssr`, props.ssr);
|
|
106642
|
+
const url = new aws.lambda.FunctionUrl(group, "ssr-url", {
|
|
106643
|
+
functionName: fn.lambda.functionName,
|
|
106644
|
+
authorizationType: "AWS_IAM"
|
|
106645
|
+
});
|
|
106646
|
+
new aws.lambda.Permission(group, "ssr-url-permission", {
|
|
106647
|
+
functionName: fn.lambda.functionName,
|
|
106648
|
+
statementId: "cloudfront-url",
|
|
106649
|
+
principal: "cloudfront.amazonaws.com",
|
|
106650
|
+
sourceAccount: ctx.accountId,
|
|
106651
|
+
action: "lambda:InvokeFunctionUrl",
|
|
106652
|
+
functionUrlAuthType: "AWS_IAM"
|
|
106653
|
+
});
|
|
106654
|
+
new aws.lambda.Permission(group, "ssr-invoke-permission", {
|
|
106655
|
+
functionName: fn.lambda.functionName,
|
|
106656
|
+
statementId: "cloudfront-invoke",
|
|
106657
|
+
principal: "cloudfront.amazonaws.com",
|
|
106658
|
+
sourceAccount: ctx.accountId,
|
|
106659
|
+
action: "lambda:InvokeFunction",
|
|
106660
|
+
invokedViaFunctionUrl: true
|
|
106661
|
+
});
|
|
106662
|
+
addRoutes({
|
|
106663
|
+
[routeKey]: {
|
|
106664
|
+
type: "lambda",
|
|
106665
|
+
forwardHost: true,
|
|
106666
|
+
urlEncodedQueryString: true,
|
|
106667
|
+
domainName: url.functionUrl.pipe((url2) => url2.split("/")[2])
|
|
106668
|
+
}
|
|
106669
|
+
});
|
|
106670
|
+
} else if (props.ssr) {
|
|
106641
106671
|
const ssr = props.ssr;
|
|
106642
106672
|
const bundleRouteKey = formatRouteKey(ctx.stack.name, "site", id);
|
|
106643
106673
|
registerBundleFunction(ctx, bundleRouteKey, ssr);
|
|
@@ -107483,6 +107513,8 @@ var layerFeature = defineFeature({
|
|
|
107483
107513
|
// src/feature/image/index.ts
|
|
107484
107514
|
import { toDays as toDays9 } from "@awsless/duration";
|
|
107485
107515
|
import { formatRouteEnvName as formatRouteEnvName5 } from "awsless";
|
|
107516
|
+
import { createHash as createHash14 } from "crypto";
|
|
107517
|
+
import { readFile as readFile11 } from "fs/promises";
|
|
107486
107518
|
import { dirname as dirname15, join as join23 } from "path";
|
|
107487
107519
|
import { fileURLToPath as fileURLToPath10 } from "url";
|
|
107488
107520
|
var imageFeature = defineFeature({
|
|
@@ -107504,12 +107536,27 @@ var imageFeature = defineFeature({
|
|
|
107504
107536
|
resourceType: "layer",
|
|
107505
107537
|
resourceName: "sharp"
|
|
107506
107538
|
});
|
|
107539
|
+
ctx.registerBuild("image", layerId, async (build2) => {
|
|
107540
|
+
const file2 = await readFile11(path2);
|
|
107541
|
+
const fingerprint = createHash14("sha1").update(file2).digest("hex");
|
|
107542
|
+
return build2(fingerprint, async (write) => {
|
|
107543
|
+
await Promise.all([
|
|
107544
|
+
write("HASH", fingerprint),
|
|
107545
|
+
write("layer.zip", file2)
|
|
107546
|
+
]);
|
|
107547
|
+
return {
|
|
107548
|
+
size: formatByteSize(file2.byteLength)
|
|
107549
|
+
};
|
|
107550
|
+
});
|
|
107551
|
+
});
|
|
107552
|
+
const source = relativePath(getBuildPath("image", layerId, "layer.zip"));
|
|
107553
|
+
const sourceHash = $file(getBuildPath("image", layerId, "HASH"));
|
|
107507
107554
|
const zipFile = new aws.s3.BucketObject(group, "layer", {
|
|
107508
107555
|
bucket: ctx.shared.get("asset", "bucket").name,
|
|
107509
107556
|
key: `layer/${layerId}.zip`,
|
|
107510
107557
|
contentType: "application/zip",
|
|
107511
|
-
source
|
|
107512
|
-
sourceHash
|
|
107558
|
+
source,
|
|
107559
|
+
sourceHash
|
|
107513
107560
|
}, {
|
|
107514
107561
|
replaceOnChanges: ["bucket", "key"]
|
|
107515
107562
|
});
|
|
@@ -107525,7 +107572,7 @@ var imageFeature = defineFeature({
|
|
|
107525
107572
|
}
|
|
107526
107573
|
return name;
|
|
107527
107574
|
}),
|
|
107528
|
-
sourceCodeHash:
|
|
107575
|
+
sourceCodeHash: sourceHash,
|
|
107529
107576
|
skipDestroy: true
|
|
107530
107577
|
}, {
|
|
107531
107578
|
dependsOn: [zipFile],
|
|
@@ -107709,15 +107756,15 @@ var import_deepmerge5 = __toESM(require_cjs2(), 1);
|
|
|
107709
107756
|
import { relative as relative7 } from "path";
|
|
107710
107757
|
|
|
107711
107758
|
// src/feature/job/util.ts
|
|
107712
|
-
import { createHash as
|
|
107759
|
+
import { createHash as createHash16 } from "crypto";
|
|
107713
107760
|
import { toDays as toDays11, toSeconds as toSeconds9 } from "@awsless/duration";
|
|
107714
107761
|
import { stringify as stringify2 } from "@awsless/json";
|
|
107715
107762
|
import { generateFileHash as generateFileHash3 } from "@awsless/ts-file-cache";
|
|
107716
107763
|
var import_deepmerge4 = __toESM(require_cjs2(), 1);
|
|
107717
107764
|
|
|
107718
107765
|
// src/feature/job/build/executable.ts
|
|
107719
|
-
import { createHash as
|
|
107720
|
-
import { readFile as
|
|
107766
|
+
import { createHash as createHash15 } from "crypto";
|
|
107767
|
+
import { readFile as readFile12, writeFile as writeFile7 } from "fs/promises";
|
|
107721
107768
|
import { join as join25, resolve as resolve3 } from "path";
|
|
107722
107769
|
var buildJobExecutable = async (input, outputPath, architecture) => {
|
|
107723
107770
|
const filePath = join25(outputPath, "program");
|
|
@@ -107772,9 +107819,9 @@ await handler(payload)
|
|
|
107772
107819
|
${result.logs?.map((log) => log.message).join(`
|
|
107773
107820
|
`)}`);
|
|
107774
107821
|
}
|
|
107775
|
-
const file2 = await
|
|
107822
|
+
const file2 = await readFile12(filePath);
|
|
107776
107823
|
return {
|
|
107777
|
-
hash:
|
|
107824
|
+
hash: createHash15("sha1").update(file2).update(target2).digest("hex"),
|
|
107778
107825
|
file: file2
|
|
107779
107826
|
};
|
|
107780
107827
|
};
|
|
@@ -108037,7 +108084,7 @@ var createFargateJob = (parentGroup, ctx, ns, id, local) => {
|
|
|
108037
108084
|
variables.AWS_ACCOUNT_ID = ctx.accountId;
|
|
108038
108085
|
variables.STACK = ctx.stackConfig.name;
|
|
108039
108086
|
variables.CODE_HASH = code.sourceHash;
|
|
108040
|
-
variables.JOB_CONFIG_HASH =
|
|
108087
|
+
variables.JOB_CONFIG_HASH = createHash16("sha1").update(stringify2(props)).digest("hex");
|
|
108041
108088
|
if (props.environment) {
|
|
108042
108089
|
for (const [key, value] of Object.entries(props.environment)) {
|
|
108043
108090
|
variables[key] = value;
|
|
@@ -108232,7 +108279,7 @@ import { toDays as toDays12, toSeconds as toSeconds10 } from "@awsless/duration"
|
|
|
108232
108279
|
import { stringify as stringify3 } from "@awsless/json";
|
|
108233
108280
|
import { generateFileHash as generateFileHash4 } from "@awsless/ts-file-cache";
|
|
108234
108281
|
var import_deepmerge6 = __toESM(require_cjs2(), 1);
|
|
108235
|
-
import { createHash as
|
|
108282
|
+
import { createHash as createHash17 } from "crypto";
|
|
108236
108283
|
import { join as join26 } from "path";
|
|
108237
108284
|
var createFargateTask = (parentGroup, ctx, ns, id, local) => {
|
|
108238
108285
|
const group = new Group(parentGroup, "instance", ns);
|
|
@@ -108525,7 +108572,7 @@ var createFargateTask = (parentGroup, ctx, ns, id, local) => {
|
|
|
108525
108572
|
variables.AWS_ACCOUNT_ID = ctx.accountId;
|
|
108526
108573
|
variables.STACK = ctx.stackConfig.name;
|
|
108527
108574
|
variables.CODE_HASH = code.sourceHash;
|
|
108528
|
-
variables.INSTANCE_CONFIG_HASH =
|
|
108575
|
+
variables.INSTANCE_CONFIG_HASH = createHash17("sha1").update(stringify3(props)).digest("hex");
|
|
108529
108576
|
if (props.environment) {
|
|
108530
108577
|
for (const [key, value] of Object.entries(props.environment)) {
|
|
108531
108578
|
variables[key] = value;
|
|
@@ -109241,7 +109288,7 @@ var MAX_VALUE_SIZE = 1000;
|
|
|
109241
109288
|
var ORIGIN_PLACEHOLDER = "x".repeat(64);
|
|
109242
109289
|
var assertRouteValueSize = (key, route) => {
|
|
109243
109290
|
const withOrigin = (entry) => {
|
|
109244
|
-
return entry.type === "lambda" ? { ...entry, domainName: ORIGIN_PLACEHOLDER } : entry;
|
|
109291
|
+
return entry.type === "lambda" && !entry.domainName ? { ...entry, domainName: ORIGIN_PLACEHOLDER } : entry;
|
|
109245
109292
|
};
|
|
109246
109293
|
for (const entry of Array.isArray(route) ? route : [route]) {
|
|
109247
109294
|
if (Buffer.byteLength(JSON.stringify(withOrigin(entry)), "utf8") > MAX_VALUE_SIZE) {
|
|
@@ -109313,7 +109360,7 @@ var routerFeature = defineFeature({
|
|
|
109313
109360
|
for (const dependency of options?.dependsOn ?? []) {
|
|
109314
109361
|
routeDependencies.add(dependency);
|
|
109315
109362
|
}
|
|
109316
|
-
if (Object.values(newRoutes).flat().some((route) => route.type === "lambda")) {
|
|
109363
|
+
if (Object.values(newRoutes).flat().some((route) => route.type === "lambda" && !route.domainName)) {
|
|
109317
109364
|
hasLambdaRoutes = true;
|
|
109318
109365
|
}
|
|
109319
109366
|
});
|
|
@@ -109692,7 +109739,7 @@ var routerFeature = defineFeature({
|
|
|
109692
109739
|
functionVersion: bundle.lambda.version,
|
|
109693
109740
|
routes: $resolve([routes, lambdaUrlHost], (routes2, lambdaUrlHost2) => {
|
|
109694
109741
|
const withOrigin = (route) => {
|
|
109695
|
-
return route.type === "lambda" ? { ...route, domainName: lambdaUrlHost2 } : route;
|
|
109742
|
+
return route.type === "lambda" && !route.domainName ? { ...route, domainName: lambdaUrlHost2 } : route;
|
|
109696
109743
|
};
|
|
109697
109744
|
return Object.entries(routes2).flatMap(([key, route]) => createRouteStoreEntries(key, Array.isArray(route) ? route.map(withOrigin) : withOrigin(route)));
|
|
109698
109745
|
})
|
|
@@ -111137,7 +111184,7 @@ import { DynamoDBClient as DynamoDBClient3 } from "@awsless/dynamodb";
|
|
|
111137
111184
|
|
|
111138
111185
|
// src/cli/ui/complex/run-tests.ts
|
|
111139
111186
|
var import_wildstring3 = __toESM(require_wildstring(), 1);
|
|
111140
|
-
import { mkdir as mkdir6, readFile as
|
|
111187
|
+
import { mkdir as mkdir6, readFile as readFile13, writeFile as writeFile8 } from "fs/promises";
|
|
111141
111188
|
import { join as join28 } from "path";
|
|
111142
111189
|
import { parse as parse5, stringify as stringify4 } from "@awsless/json";
|
|
111143
111190
|
import { generateFolderHash, loadWorkspace as loadWorkspace2 } from "@awsless/ts-file-cache";
|
|
@@ -111324,7 +111371,7 @@ var runTest = async (stack, dir, filters, workspace, opts) => {
|
|
|
111324
111371
|
if (!process.env.NO_CACHE) {
|
|
111325
111372
|
const exists2 = await fileExist(file2);
|
|
111326
111373
|
if (exists2) {
|
|
111327
|
-
const raw = await
|
|
111374
|
+
const raw = await readFile13(file2, { encoding: "utf8" });
|
|
111328
111375
|
const data = parse5(raw);
|
|
111329
111376
|
if (data.fingerprint === fingerprint) {
|
|
111330
111377
|
logs_exports.step(formatResult({
|
|
@@ -114889,7 +114936,7 @@ var parseIni = (iniData) => {
|
|
|
114889
114936
|
import { readFile as fsReadFile } from "fs/promises";
|
|
114890
114937
|
var filePromises = {};
|
|
114891
114938
|
var fileIntercept = {};
|
|
114892
|
-
var
|
|
114939
|
+
var readFile14 = (path2, options) => {
|
|
114893
114940
|
if (fileIntercept[path2] !== undefined) {
|
|
114894
114941
|
return fileIntercept[path2];
|
|
114895
114942
|
}
|
|
@@ -114914,10 +114961,10 @@ var loadSharedConfigFiles = async (init = {}) => {
|
|
|
114914
114961
|
resolvedConfigFilepath = join32(homeDir, configFilepath.slice(2));
|
|
114915
114962
|
}
|
|
114916
114963
|
const parsedFiles = await Promise.all([
|
|
114917
|
-
|
|
114964
|
+
readFile14(resolvedConfigFilepath, {
|
|
114918
114965
|
ignoreCache: init.ignoreCache
|
|
114919
114966
|
}).then(parseIni).then(getConfigData).catch(swallowError),
|
|
114920
|
-
|
|
114967
|
+
readFile14(resolvedFilepath, {
|
|
114921
114968
|
ignoreCache: init.ignoreCache
|
|
114922
114969
|
}).then(parseIni).catch(swallowError)
|
|
114923
114970
|
]);
|
|
@@ -116003,7 +116050,7 @@ var getRuntimeUserAgentPair = () => {
|
|
|
116003
116050
|
};
|
|
116004
116051
|
|
|
116005
116052
|
// ../../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
|
|
116006
|
-
import { readFile as
|
|
116053
|
+
import { readFile as readFile16 } from "fs/promises";
|
|
116007
116054
|
import { join as join34 } from "path";
|
|
116008
116055
|
|
|
116009
116056
|
// ../../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/getNodeModulesParentDirs.js
|
|
@@ -116073,7 +116120,7 @@ var getTypeScriptUserAgentPair = async () => {
|
|
|
116073
116120
|
for (const nodeModulesParentDir of nodeModulesParentDirs) {
|
|
116074
116121
|
try {
|
|
116075
116122
|
const appPackageJsonPath = join34(nodeModulesParentDir, "package.json");
|
|
116076
|
-
const packageJson = await
|
|
116123
|
+
const packageJson = await readFile16(appPackageJsonPath, "utf-8");
|
|
116077
116124
|
const { dependencies, devDependencies } = JSON.parse(packageJson);
|
|
116078
116125
|
const version2 = devDependencies?.typescript ?? dependencies?.typescript;
|
|
116079
116126
|
if (typeof version2 !== "string") {
|
|
@@ -116091,7 +116138,7 @@ var getTypeScriptUserAgentPair = async () => {
|
|
|
116091
116138
|
for (const nodeModulesParentDir of nodeModulesParentDirs) {
|
|
116092
116139
|
try {
|
|
116093
116140
|
const tsPackageJsonPath = join34(nodeModulesParentDir, TS_PACKAGE_JSON);
|
|
116094
|
-
const packageJson = await
|
|
116141
|
+
const packageJson = await readFile16(tsPackageJsonPath, "utf-8");
|
|
116095
116142
|
const { version: version2 } = JSON.parse(packageJson);
|
|
116096
116143
|
const sanitizedVersion2 = getSanitizedTypeScriptVersion(version2);
|
|
116097
116144
|
if (typeof sanitizedVersion2 !== "string") {
|
|
@@ -116216,7 +116263,7 @@ var toUtf82 = (input) => {
|
|
|
116216
116263
|
|
|
116217
116264
|
// ../../node_modules/.pnpm/@smithy+hash-node@4.2.12/node_modules/@smithy/hash-node/dist-es/index.js
|
|
116218
116265
|
import { Buffer as Buffer3 } from "buffer";
|
|
116219
|
-
import { createHash as
|
|
116266
|
+
import { createHash as createHash19, createHmac as createHmac3 } from "crypto";
|
|
116220
116267
|
|
|
116221
116268
|
class Hash {
|
|
116222
116269
|
algorithmIdentifier;
|
|
@@ -116234,7 +116281,7 @@ class Hash {
|
|
|
116234
116281
|
return Promise.resolve(this.hash.digest());
|
|
116235
116282
|
}
|
|
116236
116283
|
reset() {
|
|
116237
|
-
this.hash = this.secret ? createHmac3(this.algorithmIdentifier, castSourceData(this.secret)) :
|
|
116284
|
+
this.hash = this.secret ? createHmac3(this.algorithmIdentifier, castSourceData(this.secret)) : createHash19(this.algorithmIdentifier);
|
|
116238
116285
|
}
|
|
116239
116286
|
}
|
|
116240
116287
|
function castSourceData(toCast, encoding) {
|