@awsless/awsless 0.0.374 → 0.0.376
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 +82 -64
- package/dist/prebuild/rpc/HASH +1 -1
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/dist/prebuild.js +33 -15
- package/package.json +12 -12
package/dist/bin.js
CHANGED
|
@@ -1124,27 +1124,27 @@ var require_stringifyString = __commonJS({
|
|
|
1124
1124
|
return true;
|
|
1125
1125
|
}
|
|
1126
1126
|
function doubleQuotedString(value, ctx) {
|
|
1127
|
-
const
|
|
1127
|
+
const json4 = JSON.stringify(value);
|
|
1128
1128
|
if (ctx.options.doubleQuotedAsJSON)
|
|
1129
|
-
return
|
|
1129
|
+
return json4;
|
|
1130
1130
|
const { implicitKey } = ctx;
|
|
1131
1131
|
const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;
|
|
1132
1132
|
const indent = ctx.indent || (containsDocumentMarker(value) ? " " : "");
|
|
1133
1133
|
let str = "";
|
|
1134
1134
|
let start = 0;
|
|
1135
|
-
for (let i = 0, ch =
|
|
1136
|
-
if (ch === " " &&
|
|
1137
|
-
str +=
|
|
1135
|
+
for (let i = 0, ch = json4[i]; ch; ch = json4[++i]) {
|
|
1136
|
+
if (ch === " " && json4[i + 1] === "\\" && json4[i + 2] === "n") {
|
|
1137
|
+
str += json4.slice(start, i) + "\\ ";
|
|
1138
1138
|
i += 1;
|
|
1139
1139
|
start = i;
|
|
1140
1140
|
ch = "\\";
|
|
1141
1141
|
}
|
|
1142
1142
|
if (ch === "\\")
|
|
1143
|
-
switch (
|
|
1143
|
+
switch (json4[i + 1]) {
|
|
1144
1144
|
case "u":
|
|
1145
1145
|
{
|
|
1146
|
-
str +=
|
|
1147
|
-
const code =
|
|
1146
|
+
str += json4.slice(start, i);
|
|
1147
|
+
const code = json4.substr(i + 2, 4);
|
|
1148
1148
|
switch (code) {
|
|
1149
1149
|
case "0000":
|
|
1150
1150
|
str += "\\0";
|
|
@@ -1174,23 +1174,23 @@ var require_stringifyString = __commonJS({
|
|
|
1174
1174
|
if (code.substr(0, 2) === "00")
|
|
1175
1175
|
str += "\\x" + code.substr(2);
|
|
1176
1176
|
else
|
|
1177
|
-
str +=
|
|
1177
|
+
str += json4.substr(i, 6);
|
|
1178
1178
|
}
|
|
1179
1179
|
i += 5;
|
|
1180
1180
|
start = i + 1;
|
|
1181
1181
|
}
|
|
1182
1182
|
break;
|
|
1183
1183
|
case "n":
|
|
1184
|
-
if (implicitKey ||
|
|
1184
|
+
if (implicitKey || json4[i + 2] === '"' || json4.length < minMultiLineLength) {
|
|
1185
1185
|
i += 1;
|
|
1186
1186
|
} else {
|
|
1187
|
-
str +=
|
|
1188
|
-
while (
|
|
1187
|
+
str += json4.slice(start, i) + "\n\n";
|
|
1188
|
+
while (json4[i + 2] === "\\" && json4[i + 3] === "n" && json4[i + 4] !== '"') {
|
|
1189
1189
|
str += "\n";
|
|
1190
1190
|
i += 2;
|
|
1191
1191
|
}
|
|
1192
1192
|
str += indent;
|
|
1193
|
-
if (
|
|
1193
|
+
if (json4[i + 2] === " ")
|
|
1194
1194
|
str += "\\";
|
|
1195
1195
|
i += 1;
|
|
1196
1196
|
start = i + 1;
|
|
@@ -1200,7 +1200,7 @@ var require_stringifyString = __commonJS({
|
|
|
1200
1200
|
i += 1;
|
|
1201
1201
|
}
|
|
1202
1202
|
}
|
|
1203
|
-
str = start ? str +
|
|
1203
|
+
str = start ? str + json4.slice(start) : json4;
|
|
1204
1204
|
return implicitKey ? str : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false));
|
|
1205
1205
|
}
|
|
1206
1206
|
function singleQuotedString(value, ctx) {
|
|
@@ -3556,11 +3556,11 @@ var require_Document = __commonJS({
|
|
|
3556
3556
|
throw new Error(`With a null YAML version, the { schema: Schema } option is required`);
|
|
3557
3557
|
}
|
|
3558
3558
|
// json & jsonArg are only used from toJSON()
|
|
3559
|
-
toJS({ json:
|
|
3559
|
+
toJS({ json: json4, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
|
|
3560
3560
|
const ctx = {
|
|
3561
3561
|
anchors: /* @__PURE__ */ new Map(),
|
|
3562
3562
|
doc: this,
|
|
3563
|
-
keep: !
|
|
3563
|
+
keep: !json4,
|
|
3564
3564
|
mapAsMap: mapAsMap === true,
|
|
3565
3565
|
mapKeyWarned: false,
|
|
3566
3566
|
maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100
|
|
@@ -8731,8 +8731,8 @@ import JSON5 from "json5";
|
|
|
8731
8731
|
import { basename, dirname as dirname2, extname, join as join4 } from "path";
|
|
8732
8732
|
var readConfig = async (file) => {
|
|
8733
8733
|
try {
|
|
8734
|
-
const
|
|
8735
|
-
const data = JSON5.parse(
|
|
8734
|
+
const json4 = await readFile2(file, "utf8");
|
|
8735
|
+
const data = JSON5.parse(json4);
|
|
8736
8736
|
return data;
|
|
8737
8737
|
} catch (error) {
|
|
8738
8738
|
if (error instanceof Error) {
|
|
@@ -8961,7 +8961,7 @@ var generateGlobalAppId = (opt) => {
|
|
|
8961
8961
|
// src/feature/function/util.ts
|
|
8962
8962
|
import { Asset, aws as aws2 } from "@awsless/formation";
|
|
8963
8963
|
import deepmerge from "deepmerge";
|
|
8964
|
-
import { dirname as
|
|
8964
|
+
import { dirname as dirname7 } from "path";
|
|
8965
8965
|
|
|
8966
8966
|
// ../ts-file-cache/dist/index.js
|
|
8967
8967
|
import { createHash } from "crypto";
|
|
@@ -10432,10 +10432,15 @@ var hasOnFailure = (stacks) => {
|
|
|
10432
10432
|
};
|
|
10433
10433
|
|
|
10434
10434
|
// src/feature/function/build/typescript/bundle.ts
|
|
10435
|
+
import commonjs from "@rollup/plugin-commonjs";
|
|
10436
|
+
import json from "@rollup/plugin-json";
|
|
10437
|
+
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
10435
10438
|
import { createHash as createHash2 } from "crypto";
|
|
10436
|
-
import {
|
|
10439
|
+
import { dirname as dirname6 } from "path";
|
|
10440
|
+
import { rollup } from "rollup";
|
|
10441
|
+
import { swc, minify as swcMinify } from "rollup-plugin-swc3";
|
|
10437
10442
|
var bundleTypeScript = async ({ format: format2 = "esm", minify = true, file, external }) => {
|
|
10438
|
-
const bundle = await
|
|
10443
|
+
const bundle = await rollup({
|
|
10439
10444
|
input: file,
|
|
10440
10445
|
external: (importee) => {
|
|
10441
10446
|
return importee.startsWith("@aws-sdk") || importee.startsWith("aws-sdk") || external?.includes(importee);
|
|
@@ -10443,17 +10448,31 @@ var bundleTypeScript = async ({ format: format2 = "esm", minify = true, file, ex
|
|
|
10443
10448
|
onwarn: (error) => {
|
|
10444
10449
|
debugError(error.message);
|
|
10445
10450
|
},
|
|
10446
|
-
// treeshake: {
|
|
10447
|
-
// // preset: 'smallest',
|
|
10448
|
-
// // moduleSideEffects: id => file === id,
|
|
10449
|
-
// },
|
|
10450
10451
|
treeshake: {
|
|
10451
|
-
|
|
10452
|
+
preset: "smallest",
|
|
10453
|
+
moduleSideEffects: (id) => file === id
|
|
10452
10454
|
},
|
|
10453
10455
|
plugins: [
|
|
10454
|
-
//
|
|
10455
|
-
|
|
10456
|
-
//
|
|
10456
|
+
// @ts-ignore
|
|
10457
|
+
commonjs({ sourceMap: true }),
|
|
10458
|
+
// @ts-ignore
|
|
10459
|
+
nodeResolve({ preferBuiltins: true }),
|
|
10460
|
+
swc({
|
|
10461
|
+
// minify,
|
|
10462
|
+
// module: true,
|
|
10463
|
+
jsc: {
|
|
10464
|
+
baseUrl: dirname6(file),
|
|
10465
|
+
minify: { sourceMap: true }
|
|
10466
|
+
},
|
|
10467
|
+
sourceMaps: true
|
|
10468
|
+
}),
|
|
10469
|
+
minify ? swcMinify({
|
|
10470
|
+
module: format2 === "esm",
|
|
10471
|
+
sourceMap: true,
|
|
10472
|
+
compress: true
|
|
10473
|
+
}) : void 0,
|
|
10474
|
+
// @ts-ignore
|
|
10475
|
+
json()
|
|
10457
10476
|
]
|
|
10458
10477
|
});
|
|
10459
10478
|
const ext = format2 === "esm" ? "mjs" : "js";
|
|
@@ -10461,10 +10480,9 @@ var bundleTypeScript = async ({ format: format2 = "esm", minify = true, file, ex
|
|
|
10461
10480
|
format: format2,
|
|
10462
10481
|
sourcemap: "hidden",
|
|
10463
10482
|
exports: "auto",
|
|
10464
|
-
|
|
10483
|
+
manualChunks: {},
|
|
10465
10484
|
entryFileNames: `index.${ext}`,
|
|
10466
|
-
chunkFileNames: `[name].${ext}
|
|
10467
|
-
minify: true
|
|
10485
|
+
chunkFileNames: `[name].${ext}`
|
|
10468
10486
|
});
|
|
10469
10487
|
const hash = createHash2("sha1");
|
|
10470
10488
|
const files = [];
|
|
@@ -10550,7 +10568,7 @@ var createLambdaFunction = (group, ctx, ns, id, local2) => {
|
|
|
10550
10568
|
let code;
|
|
10551
10569
|
if (props.runtime === "container") {
|
|
10552
10570
|
ctx.registerBuild("function", name, async (build3) => {
|
|
10553
|
-
const cwd =
|
|
10571
|
+
const cwd = dirname7(local2.file);
|
|
10554
10572
|
const version = await hashElement(cwd, {
|
|
10555
10573
|
files: {
|
|
10556
10574
|
exclude: ["stack.json"]
|
|
@@ -11393,14 +11411,14 @@ var formatFullDomainName = (config2, id, subDomain) => {
|
|
|
11393
11411
|
};
|
|
11394
11412
|
|
|
11395
11413
|
// src/feature/graphql/build/typescript/resolver.ts
|
|
11396
|
-
import
|
|
11397
|
-
import
|
|
11398
|
-
import
|
|
11399
|
-
import { dirname as
|
|
11400
|
-
import { rollup } from "rollup";
|
|
11401
|
-
import { minify as
|
|
11414
|
+
import commonjs2 from "@rollup/plugin-commonjs";
|
|
11415
|
+
import json2 from "@rollup/plugin-json";
|
|
11416
|
+
import nodeResolve2 from "@rollup/plugin-node-resolve";
|
|
11417
|
+
import { dirname as dirname8 } from "path";
|
|
11418
|
+
import { rollup as rollup2 } from "rollup";
|
|
11419
|
+
import { minify as swcMinify2, swc as swc2 } from "rollup-plugin-swc3";
|
|
11402
11420
|
var buildTypeScriptResolver = async (input, { minify = false } = {}) => {
|
|
11403
|
-
const bundle = await
|
|
11421
|
+
const bundle = await rollup2({
|
|
11404
11422
|
input,
|
|
11405
11423
|
external: (importee) => {
|
|
11406
11424
|
return importee.startsWith("@aws-sdk") || importee.startsWith("aws-sdk") || importee.startsWith("@aws-appsync/utils");
|
|
@@ -11413,25 +11431,25 @@ var buildTypeScriptResolver = async (input, { minify = false } = {}) => {
|
|
|
11413
11431
|
},
|
|
11414
11432
|
plugins: [
|
|
11415
11433
|
// @ts-ignore
|
|
11416
|
-
|
|
11434
|
+
commonjs2({ sourceMap: true }),
|
|
11417
11435
|
// @ts-ignore
|
|
11418
|
-
|
|
11419
|
-
|
|
11436
|
+
nodeResolve2({ preferBuiltins: true }),
|
|
11437
|
+
swc2({
|
|
11420
11438
|
// minify,
|
|
11421
11439
|
// module: true,
|
|
11422
11440
|
jsc: {
|
|
11423
|
-
baseUrl:
|
|
11441
|
+
baseUrl: dirname8(input),
|
|
11424
11442
|
minify: { sourceMap: true }
|
|
11425
11443
|
},
|
|
11426
11444
|
sourceMaps: true
|
|
11427
11445
|
}),
|
|
11428
|
-
minify ?
|
|
11446
|
+
minify ? swcMinify2({
|
|
11429
11447
|
module: true,
|
|
11430
11448
|
sourceMap: true,
|
|
11431
11449
|
compress: true
|
|
11432
11450
|
}) : void 0,
|
|
11433
11451
|
// @ts-ignore
|
|
11434
|
-
|
|
11452
|
+
json2()
|
|
11435
11453
|
]
|
|
11436
11454
|
});
|
|
11437
11455
|
const result = await bundle.generate({
|
|
@@ -11902,7 +11920,7 @@ import { days as days4 } from "@awsless/duration";
|
|
|
11902
11920
|
import { Asset as Asset3, aws as aws10, combine, Node as Node9, Output as Output2, unwrap } from "@awsless/formation";
|
|
11903
11921
|
import { hashElement as hashElement2 } from "folder-hash";
|
|
11904
11922
|
import { mkdir as mkdir3 } from "fs/promises";
|
|
11905
|
-
import { dirname as
|
|
11923
|
+
import { dirname as dirname9 } from "path";
|
|
11906
11924
|
import { zip } from "zip-a-folder";
|
|
11907
11925
|
var instanceFeature = defineFeature({
|
|
11908
11926
|
name: "instance",
|
|
@@ -11985,7 +12003,7 @@ var instanceFeature = defineFeature({
|
|
|
11985
12003
|
}
|
|
11986
12004
|
});
|
|
11987
12005
|
await build3(version.hash, async () => {
|
|
11988
|
-
await mkdir3(
|
|
12006
|
+
await mkdir3(dirname9(bundleFile), { recursive: true });
|
|
11989
12007
|
await zip(props.code, bundleFile);
|
|
11990
12008
|
});
|
|
11991
12009
|
});
|
|
@@ -12441,7 +12459,7 @@ var restFeature = defineFeature({
|
|
|
12441
12459
|
import { camelCase as camelCase6, constantCase as constantCase9, paramCase as paramCase6 } from "change-case";
|
|
12442
12460
|
import { aws as aws17, Node as Node16, Output as Output3 } from "@awsless/formation";
|
|
12443
12461
|
import { mebibytes as mebibytes2 } from "@awsless/size";
|
|
12444
|
-
import { dirname as
|
|
12462
|
+
import { dirname as dirname10, join as join8, relative as relative5 } from "path";
|
|
12445
12463
|
import { fileURLToPath } from "node:url";
|
|
12446
12464
|
|
|
12447
12465
|
// src/feature/function/prebuild.ts
|
|
@@ -12585,7 +12603,7 @@ var createPrebuildLambdaFunction = (group, ctx, ns, id, local2) => {
|
|
|
12585
12603
|
|
|
12586
12604
|
// src/feature/rpc/index.ts
|
|
12587
12605
|
import { days as days5, seconds as seconds3 } from "@awsless/duration";
|
|
12588
|
-
var __dirname =
|
|
12606
|
+
var __dirname = dirname10(fileURLToPath(import.meta.url));
|
|
12589
12607
|
var rpcFeature = defineFeature({
|
|
12590
12608
|
name: "rpc",
|
|
12591
12609
|
async onTypeGen(ctx) {
|
|
@@ -14296,7 +14314,7 @@ import { join as join12 } from "path";
|
|
|
14296
14314
|
// src/build/__fingerprint.ts
|
|
14297
14315
|
import { createHash as createHash5 } from "crypto";
|
|
14298
14316
|
import { readdir, readFile as readFile6, stat as stat4 } from "fs/promises";
|
|
14299
|
-
import { basename as basename4, dirname as
|
|
14317
|
+
import { basename as basename4, dirname as dirname11, extname as extname3, join as join10 } from "path";
|
|
14300
14318
|
import parseStaticImports from "parse-static-imports";
|
|
14301
14319
|
var extensions = ["js", "mjs", "jsx", "ts", "mts", "tsx"];
|
|
14302
14320
|
var generateFileHashes = async (file, hashes) => {
|
|
@@ -14352,7 +14370,7 @@ var readFiles = async (files) => {
|
|
|
14352
14370
|
};
|
|
14353
14371
|
var findDependencies = async (file, code) => {
|
|
14354
14372
|
const imports = await parseStaticImports(code);
|
|
14355
|
-
return imports.map((entry) => entry.moduleName).filter(Boolean).map((value) => value?.startsWith(".") ? join10(
|
|
14373
|
+
return imports.map((entry) => entry.moduleName).filter(Boolean).map((value) => value?.startsWith(".") ? join10(dirname11(file), value) : value);
|
|
14356
14374
|
};
|
|
14357
14375
|
|
|
14358
14376
|
// src/test/reporter.ts
|
|
@@ -14429,16 +14447,16 @@ var CustomReporter = class {
|
|
|
14429
14447
|
};
|
|
14430
14448
|
|
|
14431
14449
|
// src/test/start.ts
|
|
14432
|
-
import { swc as
|
|
14450
|
+
import { swc as swc3 } from "rollup-plugin-swc3";
|
|
14433
14451
|
import { configDefaults } from "vitest/config";
|
|
14434
14452
|
import { startVitest } from "vitest/node";
|
|
14435
|
-
import
|
|
14436
|
-
import
|
|
14437
|
-
import
|
|
14438
|
-
import { dirname as
|
|
14453
|
+
import commonjs3 from "@rollup/plugin-commonjs";
|
|
14454
|
+
import nodeResolve3 from "@rollup/plugin-node-resolve";
|
|
14455
|
+
import json3 from "@rollup/plugin-json";
|
|
14456
|
+
import { dirname as dirname12, join as join11 } from "path";
|
|
14439
14457
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
14440
14458
|
var startTest = async (props) => {
|
|
14441
|
-
const __dirname2 =
|
|
14459
|
+
const __dirname2 = dirname12(fileURLToPath2(import.meta.url));
|
|
14442
14460
|
const result = await startVitest(
|
|
14443
14461
|
"test",
|
|
14444
14462
|
props.filters,
|
|
@@ -14471,10 +14489,10 @@ var startTest = async (props) => {
|
|
|
14471
14489
|
{
|
|
14472
14490
|
plugins: [
|
|
14473
14491
|
// @ts-ignore
|
|
14474
|
-
|
|
14492
|
+
commonjs3({ sourceMap: true }),
|
|
14475
14493
|
// @ts-ignore
|
|
14476
|
-
|
|
14477
|
-
|
|
14494
|
+
nodeResolve3({ preferBuiltins: true }),
|
|
14495
|
+
swc3({
|
|
14478
14496
|
jsc: {
|
|
14479
14497
|
// baseUrl: dirname(input),
|
|
14480
14498
|
minify: { sourceMap: true }
|
|
@@ -14482,7 +14500,7 @@ var startTest = async (props) => {
|
|
|
14482
14500
|
sourceMaps: true
|
|
14483
14501
|
}),
|
|
14484
14502
|
// @ts-ignore
|
|
14485
|
-
|
|
14503
|
+
json3()
|
|
14486
14504
|
]
|
|
14487
14505
|
}
|
|
14488
14506
|
);
|
|
@@ -14854,7 +14872,7 @@ import { log as log10 } from "@clack/prompts";
|
|
|
14854
14872
|
|
|
14855
14873
|
// src/type-gen/generate.ts
|
|
14856
14874
|
import { mkdir as mkdir5, writeFile as writeFile4 } from "fs/promises";
|
|
14857
|
-
import { dirname as
|
|
14875
|
+
import { dirname as dirname13, join as join13, relative as relative7 } from "path";
|
|
14858
14876
|
var generateTypes = async (props) => {
|
|
14859
14877
|
const files = [];
|
|
14860
14878
|
await Promise.all(
|
|
@@ -14868,7 +14886,7 @@ var generateTypes = async (props) => {
|
|
|
14868
14886
|
if (include) {
|
|
14869
14887
|
files.push(relative7(directories.root, path));
|
|
14870
14888
|
}
|
|
14871
|
-
await mkdir5(
|
|
14889
|
+
await mkdir5(dirname13(path), { recursive: true });
|
|
14872
14890
|
await writeFile4(path, code);
|
|
14873
14891
|
}
|
|
14874
14892
|
}
|
package/dist/prebuild/rpc/HASH
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
34eafe8e5556b34a6841941b5c52a41a598492dc
|
|
Binary file
|
package/dist/prebuild.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/prebuild.ts
|
|
2
2
|
import { mkdir } from "fs/promises";
|
|
3
|
-
import { dirname, join as join2 } from "path";
|
|
3
|
+
import { dirname as dirname2, join as join2 } from "path";
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
5
|
|
|
6
6
|
// src/feature/function/prebuild.ts
|
|
@@ -9,8 +9,13 @@ import { writeFile } from "fs/promises";
|
|
|
9
9
|
import { join } from "path";
|
|
10
10
|
|
|
11
11
|
// src/feature/function/build/typescript/bundle.ts
|
|
12
|
+
import commonjs from "@rollup/plugin-commonjs";
|
|
13
|
+
import json from "@rollup/plugin-json";
|
|
14
|
+
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
12
15
|
import { createHash } from "crypto";
|
|
13
|
-
import {
|
|
16
|
+
import { dirname } from "path";
|
|
17
|
+
import { rollup } from "rollup";
|
|
18
|
+
import { swc, minify as swcMinify } from "rollup-plugin-swc3";
|
|
14
19
|
|
|
15
20
|
// src/cli/ui/style.ts
|
|
16
21
|
import chalk from "chalk";
|
|
@@ -43,7 +48,7 @@ var debugError = (error) => {
|
|
|
43
48
|
|
|
44
49
|
// src/feature/function/build/typescript/bundle.ts
|
|
45
50
|
var bundleTypeScript = async ({ format = "esm", minify = true, file, external }) => {
|
|
46
|
-
const bundle = await
|
|
51
|
+
const bundle = await rollup({
|
|
47
52
|
input: file,
|
|
48
53
|
external: (importee) => {
|
|
49
54
|
return importee.startsWith("@aws-sdk") || importee.startsWith("aws-sdk") || external?.includes(importee);
|
|
@@ -51,17 +56,31 @@ var bundleTypeScript = async ({ format = "esm", minify = true, file, external })
|
|
|
51
56
|
onwarn: (error) => {
|
|
52
57
|
debugError(error.message);
|
|
53
58
|
},
|
|
54
|
-
// treeshake: {
|
|
55
|
-
// // preset: 'smallest',
|
|
56
|
-
// // moduleSideEffects: id => file === id,
|
|
57
|
-
// },
|
|
58
59
|
treeshake: {
|
|
59
|
-
|
|
60
|
+
preset: "smallest",
|
|
61
|
+
moduleSideEffects: (id) => file === id
|
|
60
62
|
},
|
|
61
63
|
plugins: [
|
|
62
|
-
//
|
|
63
|
-
|
|
64
|
-
//
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
commonjs({ sourceMap: true }),
|
|
66
|
+
// @ts-ignore
|
|
67
|
+
nodeResolve({ preferBuiltins: true }),
|
|
68
|
+
swc({
|
|
69
|
+
// minify,
|
|
70
|
+
// module: true,
|
|
71
|
+
jsc: {
|
|
72
|
+
baseUrl: dirname(file),
|
|
73
|
+
minify: { sourceMap: true }
|
|
74
|
+
},
|
|
75
|
+
sourceMaps: true
|
|
76
|
+
}),
|
|
77
|
+
minify ? swcMinify({
|
|
78
|
+
module: format === "esm",
|
|
79
|
+
sourceMap: true,
|
|
80
|
+
compress: true
|
|
81
|
+
}) : void 0,
|
|
82
|
+
// @ts-ignore
|
|
83
|
+
json()
|
|
65
84
|
]
|
|
66
85
|
});
|
|
67
86
|
const ext = format === "esm" ? "mjs" : "js";
|
|
@@ -69,10 +88,9 @@ var bundleTypeScript = async ({ format = "esm", minify = true, file, external })
|
|
|
69
88
|
format,
|
|
70
89
|
sourcemap: "hidden",
|
|
71
90
|
exports: "auto",
|
|
72
|
-
|
|
91
|
+
manualChunks: {},
|
|
73
92
|
entryFileNames: `index.${ext}`,
|
|
74
|
-
chunkFileNames: `[name].${ext}
|
|
75
|
-
minify: true
|
|
93
|
+
chunkFileNames: `[name].${ext}`
|
|
76
94
|
});
|
|
77
95
|
const hash = createHash("sha1");
|
|
78
96
|
const files = [];
|
|
@@ -124,7 +142,7 @@ var prebuild = async (file, output) => {
|
|
|
124
142
|
};
|
|
125
143
|
|
|
126
144
|
// src/prebuild.ts
|
|
127
|
-
var __dirname =
|
|
145
|
+
var __dirname = dirname2(fileURLToPath(import.meta.url));
|
|
128
146
|
var builds = {
|
|
129
147
|
rpc: "../src/feature/rpc/server/handle.ts"
|
|
130
148
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/awsless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.376",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@awsless/iot": "^0.0.2",
|
|
32
31
|
"@awsless/lambda": "^0.0.26",
|
|
33
|
-
"@awsless/
|
|
34
|
-
"@awsless/redis": "^0.0.13",
|
|
32
|
+
"@awsless/iot": "^0.0.2",
|
|
35
33
|
"@awsless/s3": "^0.0.18",
|
|
36
|
-
"@awsless/
|
|
37
|
-
"@awsless/sns": "^0.0.7",
|
|
34
|
+
"@awsless/redis": "^0.0.13",
|
|
38
35
|
"@awsless/validate": "^0.0.15",
|
|
39
|
-
"@awsless/
|
|
36
|
+
"@awsless/open-search": "^0.0.15",
|
|
40
37
|
"@awsless/weak-cache": "^0.0.1",
|
|
38
|
+
"@awsless/sns": "^0.0.7",
|
|
39
|
+
"@awsless/ssm": "^0.0.7",
|
|
40
|
+
"@awsless/sqs": "^0.0.7",
|
|
41
41
|
"@awsless/mqtt": "^0.0.2"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
@@ -110,13 +110,13 @@
|
|
|
110
110
|
"zip-a-folder": "^3.1.6",
|
|
111
111
|
"zod": "^3.21.4",
|
|
112
112
|
"zod-to-json-schema": "^3.22.3",
|
|
113
|
-
"@awsless/graphql": "^0.0.9",
|
|
114
|
-
"@awsless/size": "^0.0.1",
|
|
115
|
-
"@awsless/validate": "^0.0.15",
|
|
116
|
-
"@awsless/ts-file-cache": "^0.0.10",
|
|
117
113
|
"@awsless/duration": "^0.0.1",
|
|
118
114
|
"@awsless/code": "^0.0.10",
|
|
119
|
-
"@awsless/formation": "^0.0.56"
|
|
115
|
+
"@awsless/formation": "^0.0.56",
|
|
116
|
+
"@awsless/size": "^0.0.1",
|
|
117
|
+
"@awsless/graphql": "^0.0.9",
|
|
118
|
+
"@awsless/ts-file-cache": "^0.0.10",
|
|
119
|
+
"@awsless/validate": "^0.0.15"
|
|
120
120
|
},
|
|
121
121
|
"scripts": {
|
|
122
122
|
"test": "pnpm code test",
|