@awsless/awsless 0.0.482 → 0.0.485

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
@@ -4721,7 +4721,7 @@ var siteFeature = defineFeature({
4721
4721
  cachePolicyId: cache.id,
4722
4722
  responseHeadersPolicyId: responseHeaders.id,
4723
4723
  viewerProtocolPolicy: "redirect-to-https",
4724
- allowedMethods: ["GET", "HEAD", "OPTIONS"],
4724
+ allowedMethods: ["GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"],
4725
4725
  cachedMethods: ["GET", "HEAD"]
4726
4726
  }
4727
4727
  });
@@ -6560,14 +6560,14 @@ var CustomReporter = class {
6560
6560
  };
6561
6561
 
6562
6562
  // src/test/start.ts
6563
- import { swc as swc2 } from "rollup-plugin-swc3";
6564
- import { configDefaults } from "vitest/config";
6565
- import { startVitest } from "vitest/node";
6566
6563
  import commonjs2 from "@rollup/plugin-commonjs";
6567
- import nodeResolve2 from "@rollup/plugin-node-resolve";
6568
6564
  import json2 from "@rollup/plugin-json";
6565
+ import nodeResolve2 from "@rollup/plugin-node-resolve";
6569
6566
  import { dirname as dirname9, join as join13 } from "path";
6567
+ import { swc as swc2 } from "rollup-plugin-swc3";
6570
6568
  import { fileURLToPath as fileURLToPath2 } from "url";
6569
+ import { configDefaults } from "vitest/config";
6570
+ import { startVitest } from "vitest/node";
6571
6571
  var startTest = async (props) => {
6572
6572
  const __dirname2 = dirname9(fileURLToPath2(import.meta.url));
6573
6573
  const result = await startVitest(
@@ -6583,7 +6583,14 @@ var startTest = async (props) => {
6583
6583
  exclude: ["**/_*", "**/_*/**", ...configDefaults.exclude],
6584
6584
  globals: true,
6585
6585
  reporters: props.reporter,
6586
- globalSetup: join13(__dirname2, "test-global-setup.js")
6586
+ setupFiles: [
6587
+ //
6588
+ join13(__dirname2, "test-global-setup.js")
6589
+ ]
6590
+ // globalSetup: [
6591
+ // //
6592
+ // join(__dirname, 'test-global-setup.js'),
6593
+ // ],
6587
6594
  // env: {
6588
6595
  // TZ: 'UTC',
6589
6596
  // },
Binary file
package/dist/server.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AwsCredentialIdentityProvider } from '@aws-sdk/types';
2
- import { Mock } from 'vitest';
2
+ import * as vitest from 'vitest';
3
3
  import { Duration, DurationFormat } from '@awsless/duration';
4
4
  import { QoS } from '@awsless/iot';
5
5
  export { QoS } from '@awsless/iot';
@@ -41,7 +41,7 @@ interface FunctionMockResponse {
41
41
  }
42
42
  declare const mockFunction: (cb: (mock: FunctionMock) => void) => FunctionMockResponse;
43
43
 
44
- declare const mockPubSub: () => Mock;
44
+ declare const mockPubSub: () => vitest.Mock<any, any>;
45
45
 
46
46
  interface QueueMock {
47
47
  }
@@ -1,7 +1,20 @@
1
1
  // src/test/test-global-setup.ts
2
- var setup = () => {
2
+ import { BigFloat, eq } from "@awsless/big-float";
3
+ beforeAll(() => {
3
4
  process.env.TZ = "UTC";
5
+ expect.addEqualityTesters([areBigFloatsEqual]);
6
+ });
7
+ var areBigFloatsEqual = (a, b) => {
8
+ const isA = a instanceof BigFloat;
9
+ const isB = b instanceof BigFloat;
10
+ if (isA && isB) {
11
+ return eq(a, b);
12
+ } else if (isA === isB) {
13
+ return void 0;
14
+ } else {
15
+ return false;
16
+ }
4
17
  };
5
18
  export {
6
- setup
19
+ areBigFloatsEqual
7
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.482",
3
+ "version": "0.0.485",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -27,20 +27,25 @@
27
27
  "types": "./dist/client.d.ts"
28
28
  }
29
29
  },
30
+ "vitest": {
31
+ "include": [
32
+ "./test/**"
33
+ ]
34
+ },
30
35
  "peerDependencies": {
31
36
  "@awsless/dynamodb": "^0.1.5",
32
- "@awsless/lambda": "^0.0.32",
33
- "@awsless/json": "^0.0.8",
34
37
  "@awsless/iot": "^0.0.3",
38
+ "@awsless/json": "^0.0.8",
35
39
  "@awsless/mqtt": "^0.0.2",
36
- "@awsless/sns": "^0.0.10",
37
40
  "@awsless/open-search": "^0.0.17",
38
- "@awsless/sqs": "^0.0.8",
39
41
  "@awsless/redis": "^0.0.14",
40
- "@awsless/validate": "^0.0.19",
41
42
  "@awsless/s3": "^0.0.20",
43
+ "@awsless/lambda": "^0.0.32",
44
+ "@awsless/sns": "^0.0.10",
42
45
  "@awsless/ssm": "^0.0.7",
43
- "@awsless/weak-cache": "^0.0.1"
46
+ "@awsless/validate": "^0.0.19",
47
+ "@awsless/weak-cache": "^0.0.1",
48
+ "@awsless/sqs": "^0.0.8"
44
49
  },
45
50
  "dependencies": {
46
51
  "@arcanyx/cidr-slicer": "^0.3.0",
@@ -57,6 +62,7 @@
57
62
  "@aws-sdk/client-sts": "^3.369.0",
58
63
  "@aws-sdk/credential-providers": "^3.654.0",
59
64
  "@aws-sdk/lib-storage": "^3.423.0",
65
+ "@awsless/big-float": "^0.0.6",
60
66
  "@clack/prompts": "^0.7.0",
61
67
  "@graphql-tools/merge": "^9.0.0",
62
68
  "@rollup/plugin-commonjs": "^25.0.5",
@@ -75,7 +81,7 @@
75
81
  "@types/rollup-plugin-natives": "^0.7.5",
76
82
  "@types/uuid": "^9.0.0",
77
83
  "@types/wildstring": "^1.0.3",
78
- "@vitest/runner": "^1.6.0",
84
+ "@vitest/runner": "^3.1.4",
79
85
  "aws-cron-expression-validator": "^1.0.5",
80
86
  "aws-lambda": "^1.0.7",
81
87
  "chalk": "^5.3.0",
@@ -113,26 +119,26 @@
113
119
  "type-fest": "^4.20.1",
114
120
  "uuid": "^9.0.0",
115
121
  "vite": "^5.0.0",
116
- "vitest": "^1.6.0",
122
+ "vitest": "^3.1.4",
117
123
  "wildstring": "^1.0.9",
118
124
  "wrap-ansi": "^8.1.0",
119
125
  "zip-a-folder": "^3.1.6",
120
126
  "zod": "^3.24.2",
121
127
  "zod-to-json-schema": "^3.24.3",
128
+ "@awsless/code": "^0.0.10",
122
129
  "@awsless/duration": "^0.0.3",
123
- "@awsless/formation": "^0.0.74",
124
130
  "@awsless/graphql": "^0.0.9",
125
131
  "@awsless/json": "^0.0.8",
126
- "@awsless/code": "^0.0.10",
127
- "@awsless/validate": "^0.0.19",
128
132
  "@awsless/size": "^0.0.2",
129
- "@awsless/ts-file-cache": "^0.0.12"
133
+ "@awsless/ts-file-cache": "^0.0.12",
134
+ "@awsless/validate": "^0.0.19",
135
+ "@awsless/formation": "^0.0.74"
130
136
  },
131
137
  "devDependencies": {
132
138
  "@node-rs/bcrypt": "^1.10.5"
133
139
  },
134
140
  "scripts": {
135
- "test": "pnpm code test",
141
+ "test": "pnpm vitest",
136
142
  "term": "zsh -c 'node dist/bin.js ${*} --config-file=./test/_data/app.jsonc' --",
137
143
  "berm": "zsh -c 'pnpm build; pnpm build-features; pnpm build-json-schema; node dist/bin.js ${*} --config-file=./test/_data/app.jsonc' --",
138
144
  "build": "pnpm tsup src/server.ts src/client.ts src/bin.ts --format esm --dts --clean",