@awsless/awsless 0.0.416 → 0.0.418

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
@@ -14332,6 +14332,7 @@ var createApp = (props) => {
14332
14332
  // src/cli/ui/complex/build-assets.ts
14333
14333
  import { loadWorkspace } from "@awsless/ts-file-cache";
14334
14334
  import chalk3 from "chalk";
14335
+ import wildstring from "wildstring";
14335
14336
  var buildAssets = async (builders, stackFilters, showResult = false) => {
14336
14337
  if (builders.length === 0) {
14337
14338
  return;
@@ -14341,7 +14342,8 @@ var buildAssets = async (builders, stackFilters, showResult = false) => {
14341
14342
  const workspace = await loadWorkspace(directories.root);
14342
14343
  for (const builder of builders) {
14343
14344
  if (stackFilters && stackFilters.length > 0) {
14344
- if (!stackFilters.includes(builder.stackName)) {
14345
+ const found = stackFilters.find((f) => wildstring.match(f, builder.stackName));
14346
+ if (!found) {
14345
14347
  continue;
14346
14348
  }
14347
14349
  }
@@ -14523,6 +14525,7 @@ var config = (program2) => {
14523
14525
 
14524
14526
  // src/cli/command/delete.ts
14525
14527
  import { confirm as confirm3, isCancel as isCancel4 } from "@clack/prompts";
14528
+ import wildstring2 from "wildstring";
14526
14529
  var del2 = (program2) => {
14527
14530
  program2.command("delete").argument("[stacks...]", "Optionally filter stacks to delete").description("Delete your app from AWS").action(async (filters) => {
14528
14531
  await layout("delete", async ({ appConfig, stackConfigs }) => {
@@ -14530,7 +14533,9 @@ var del2 = (program2) => {
14530
14533
  const credentials = getCredentials(appConfig.profile);
14531
14534
  const accountId = await getAccountId(credentials, region);
14532
14535
  const { app } = createApp({ appConfig, stackConfigs, accountId });
14533
- const stackNames = app.stacks.filter((stack) => filters.includes(stack.name)).map((s) => s.name);
14536
+ const stackNames = app.stacks.filter((stack) => {
14537
+ return !!filters.find((f) => wildstring2.match(f, stack.name));
14538
+ }).map((s) => s.name);
14534
14539
  const formattedFilter = stackNames.map((i) => color.info(i)).join(color.dim(", "));
14535
14540
  debug("Stacks to delete", formattedFilter);
14536
14541
  if (!process.env.SKIP_PROMPT) {
@@ -14564,12 +14569,14 @@ var del2 = (program2) => {
14564
14569
 
14565
14570
  // src/cli/command/deploy.ts
14566
14571
  import { confirm as confirm4, isCancel as isCancel5 } from "@clack/prompts";
14572
+ import wildstring4 from "wildstring";
14567
14573
 
14568
14574
  // src/cli/ui/complex/run-tests.ts
14569
14575
  import { log as log8 } from "@clack/prompts";
14570
14576
  import chalk6 from "chalk";
14571
14577
  import { mkdir as mkdir5, readFile as readFile7, writeFile as writeFile3 } from "fs/promises";
14572
14578
  import { join as join13 } from "path";
14579
+ import wildstring3 from "wildstring";
14573
14580
 
14574
14581
  // src/build/__fingerprint.ts
14575
14582
  import { createHash as createHash5 } from "crypto";
@@ -14881,7 +14888,8 @@ var runTest = async (stack, dir, filters) => {
14881
14888
  var runTests = async (tests, stackFilters = [], testFilters = []) => {
14882
14889
  for (const test2 of tests) {
14883
14890
  if (stackFilters && stackFilters.length > 0) {
14884
- if (!stackFilters.includes(test2.stackName)) {
14891
+ const found = stackFilters.find((f) => wildstring3.match(f, test2.stackName));
14892
+ if (!found) {
14885
14893
  continue;
14886
14894
  }
14887
14895
  }
@@ -14904,7 +14912,9 @@ var deploy = (program2) => {
14904
14912
  const accountId = await getAccountId(credentials, region);
14905
14913
  await bootstrapAwsless({ credentials, region, accountId });
14906
14914
  const { app, tests, builders } = createApp({ appConfig, stackConfigs, accountId });
14907
- const stackNames = app.stacks.filter((stack) => filters.includes(stack.name)).map((s) => s.name);
14915
+ const stackNames = app.stacks.filter((stack) => {
14916
+ return !!filters.find((f) => wildstring4.match(f, stack.name));
14917
+ }).map((s) => s.name);
14908
14918
  const formattedFilter = stackNames.map((i) => color.info(i)).join(color.dim(", "));
14909
14919
  debug("Stacks to deploy", formattedFilter);
14910
14920
  if (!process.env.SKIP_PROMPT) {
@@ -15199,6 +15209,7 @@ var dev = (program2) => {
15199
15209
  // src/cli/command/resource/list.ts
15200
15210
  import { log as log11 } from "@clack/prompts";
15201
15211
  import chalk7 from "chalk";
15212
+ import wildstring5 from "wildstring";
15202
15213
  var list3 = (program2) => {
15203
15214
  program2.command("list").argument("[stacks...]", "Optionally filter stack resources to list").description(`List all defined resources`).action(async (filters) => {
15204
15215
  await layout("resource list", async ({ appConfig, stackConfigs }) => {
@@ -15212,8 +15223,11 @@ var list3 = (program2) => {
15212
15223
  }).replaceAll(":", color.dim(":"));
15213
15224
  };
15214
15225
  for (const stack of app.stacks) {
15215
- if (filters.length > 0 && !filters.includes(stack.name)) {
15216
- continue;
15226
+ if (filters.length > 0) {
15227
+ const found = filters.find((f) => wildstring5.match(f, stack.name));
15228
+ if (!found) {
15229
+ continue;
15230
+ }
15217
15231
  }
15218
15232
  log11.step(chalk7.magenta(stack.name));
15219
15233
  line("");
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.416",
3
+ "version": "0.0.418",
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
+ "@awsless/json": "^0.0.6",
31
33
  "@awsless/lambda": "^0.0.30",
32
34
  "@awsless/open-search": "^0.0.15",
33
35
  "@awsless/redis": "^0.0.13",
34
- "@awsless/s3": "^0.0.18",
35
36
  "@awsless/sns": "^0.0.9",
36
- "@awsless/json": "^0.0.6",
37
+ "@awsless/s3": "^0.0.18",
37
38
  "@awsless/validate": "^0.0.16",
38
- "@awsless/sqs": "^0.0.7",
39
- "@awsless/iot": "^0.0.2",
40
39
  "@awsless/ssm": "^0.0.7",
40
+ "@awsless/sqs": "^0.0.7",
41
41
  "@awsless/weak-cache": "^0.0.1",
42
42
  "@awsless/mqtt": "^0.0.2"
43
43
  },
@@ -71,6 +71,7 @@
71
71
  "@types/promise-dag": "^1.0.4",
72
72
  "@types/rollup-plugin-natives": "^0.7.5",
73
73
  "@types/uuid": "^9.0.0",
74
+ "@types/wildstring": "^1.0.3",
74
75
  "@vitest/runner": "^1.6.0",
75
76
  "aws-cron-expression-validator": "^1.0.5",
76
77
  "aws-lambda": "^1.0.7",
@@ -109,18 +110,19 @@
109
110
  "uuid": "^9.0.0",
110
111
  "vite": "^5.0.0",
111
112
  "vitest": "^1.6.0",
113
+ "wildstring": "^1.0.9",
112
114
  "wrap-ansi": "^8.1.0",
113
115
  "zip-a-folder": "^3.1.6",
114
116
  "zod": "^3.21.4",
115
117
  "zod-to-json-schema": "^3.22.3",
116
118
  "@awsless/code": "^0.0.10",
117
119
  "@awsless/duration": "^0.0.1",
118
- "@awsless/formation": "^0.0.57",
119
120
  "@awsless/graphql": "^0.0.9",
120
121
  "@awsless/size": "^0.0.1",
121
- "@awsless/ts-file-cache": "^0.0.10",
122
+ "@awsless/formation": "^0.0.57",
122
123
  "@awsless/json": "^0.0.6",
123
- "@awsless/validate": "^0.0.16"
124
+ "@awsless/validate": "^0.0.16",
125
+ "@awsless/ts-file-cache": "^0.0.10"
124
126
  },
125
127
  "devDependencies": {
126
128
  "@node-rs/bcrypt": "^1.10.5"