@awsless/awsless 0.0.437 → 0.0.439

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 CHANGED
@@ -10290,31 +10290,39 @@ var findImports = async (file, code) => {
10290
10290
  syntax: "typescript"
10291
10291
  });
10292
10292
  const importing = /* @__PURE__ */ new Set();
10293
- simple2(ast, {
10294
- ImportDeclaration(node) {
10295
- importing.add(node.source.value);
10296
- },
10297
- ExportAllDeclaration(node) {
10298
- importing.add(node.source.value);
10299
- },
10300
- ExportNamedDeclaration(node) {
10301
- if (node.source) {
10293
+ try {
10294
+ simple2(ast, {
10295
+ ImportDeclaration(node) {
10302
10296
  importing.add(node.source.value);
10303
- }
10304
- },
10305
- CallExpression(node) {
10306
- if (node.callee.type === "Import") {
10307
- const first = node.arguments.at(0);
10308
- if (first && first.expression.type === "StringLiteral") {
10309
- importing.add(first.expression.value);
10297
+ },
10298
+ ExportAllDeclaration(node) {
10299
+ importing.add(node.source.value);
10300
+ },
10301
+ ExportNamedDeclaration(node) {
10302
+ if (node.source) {
10303
+ importing.add(node.source.value);
10304
+ }
10305
+ },
10306
+ CallExpression(node) {
10307
+ if (node.callee.type === "Import") {
10308
+ const first = node.arguments.at(0);
10309
+ if (first && first.expression.type === "StringLiteral") {
10310
+ importing.add(first.expression.value);
10311
+ }
10310
10312
  }
10311
10313
  }
10312
- }
10313
- });
10314
+ });
10315
+ } catch (_) {
10316
+ return [];
10317
+ }
10314
10318
  return [...importing].map((importee) => {
10315
10319
  if (importee.startsWith(".")) {
10316
10320
  return resolve(dirname4(file), importee);
10317
10321
  }
10322
+ const parts = importee.split("/");
10323
+ if (parts.length > 2) {
10324
+ return parts.slice(0, 2).join("/");
10325
+ }
10318
10326
  return importee;
10319
10327
  });
10320
10328
  };
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.437",
3
+ "version": "0.0.439",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -28,18 +28,18 @@
28
28
  }
29
29
  },
30
30
  "peerDependencies": {
31
- "@awsless/iot": "^0.0.3",
32
31
  "@awsless/dynamodb": "^0.1.5",
32
+ "@awsless/json": "^0.0.7",
33
33
  "@awsless/lambda": "^0.0.30",
34
+ "@awsless/open-search": "^0.0.17",
34
35
  "@awsless/redis": "^0.0.13",
35
- "@awsless/json": "^0.0.7",
36
36
  "@awsless/s3": "^0.0.20",
37
- "@awsless/sqs": "^0.0.8",
38
- "@awsless/open-search": "^0.0.17",
39
- "@awsless/sns": "^0.0.10",
40
37
  "@awsless/ssm": "^0.0.7",
38
+ "@awsless/sqs": "^0.0.8",
41
39
  "@awsless/validate": "^0.0.17",
40
+ "@awsless/sns": "^0.0.10",
42
41
  "@awsless/weak-cache": "^0.0.1",
42
+ "@awsless/iot": "^0.0.3",
43
43
  "@awsless/mqtt": "^0.0.2"
44
44
  },
45
45
  "dependencies": {
@@ -117,12 +117,12 @@
117
117
  "zod": "^3.21.4",
118
118
  "zod-to-json-schema": "^3.22.3",
119
119
  "@awsless/code": "^0.0.10",
120
- "@awsless/duration": "^0.0.1",
121
120
  "@awsless/graphql": "^0.0.9",
122
121
  "@awsless/formation": "^0.0.59",
122
+ "@awsless/duration": "^0.0.1",
123
123
  "@awsless/json": "^0.0.7",
124
124
  "@awsless/validate": "^0.0.17",
125
- "@awsless/ts-file-cache": "^0.0.10",
125
+ "@awsless/ts-file-cache": "^0.0.12",
126
126
  "@awsless/size": "^0.0.1"
127
127
  },
128
128
  "devDependencies": {