awesome-emulator-cli 0.1.2 → 0.2.0
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/README.md +4 -0
- package/dist/cli.js +2 -1
- package/dist/emulator-options.d.ts +1 -0
- package/dist/emulator-options.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Awesome Emulator CLI
|
|
2
2
|
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="./assets/social-preview.png" alt="Awesome Emulator CLI — Local emulator testing for Node.js" width="100%">
|
|
5
|
+
</p>
|
|
6
|
+
|
|
3
7
|
Awesome Emulator CLI for use with AWS Emulator in local tests from npm scripts or Node.js. It runs the upstream Linux package in Docker.
|
|
4
8
|
|
|
5
9
|
This is an independent project and is not affiliated with or endorsed by Amazon Web Services.
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { runWithEmulator, startEmulator } from "./index.js";
|
|
3
|
+
import { DEFAULT_VERSION } from "./emulator-options.js";
|
|
3
4
|
import { FORWARDED_SIGNALS, getSignalExitCode } from "./signals.js";
|
|
4
5
|
function usage() {
|
|
5
6
|
console.log(`Usage:
|
|
@@ -7,7 +8,7 @@ function usage() {
|
|
|
7
8
|
awesome-emulator run [options] [--shell] -- <command> [args...]
|
|
8
9
|
|
|
9
10
|
Options:
|
|
10
|
-
-v, --version <version> AWS Emulator version (default:
|
|
11
|
+
-v, --version <version> AWS Emulator version (default: ${DEFAULT_VERSION})
|
|
11
12
|
-p, --port <port> Host port; 0 chooses an available port (default: 9297)
|
|
12
13
|
-t, --telemetry <on|off> Telemetry setting (default: on)
|
|
13
14
|
--memory <limit> Container memory limit (default: 2g)
|
|
@@ -21,4 +21,5 @@ export type ResolvedEmulatorOptions = {
|
|
|
21
21
|
memory: string;
|
|
22
22
|
startupTimeoutMs: number;
|
|
23
23
|
};
|
|
24
|
+
export declare const DEFAULT_VERSION = "1.0.531";
|
|
24
25
|
export declare function resolveEmulatorOptions(options: StartEmulatorOptions, environment?: NodeJS.ProcessEnv): ResolvedEmulatorOptions;
|
package/dist/emulator-options.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const DEFAULT_VERSION = "1.0.
|
|
1
|
+
export const DEFAULT_VERSION = "1.0.531";
|
|
2
2
|
const DEFAULT_PORT = 9297;
|
|
3
3
|
const DEFAULT_MEMORY = "2g";
|
|
4
4
|
function normalizeVersion(value, environment) {
|
|
5
5
|
const version = value ?? environment.AWS_EMULATOR_VERSION ?? DEFAULT_VERSION;
|
|
6
6
|
if (!/^\d+\.\d+\.\d+$/.test(String(version))) {
|
|
7
|
-
throw new Error(`Invalid AWS Emulator version: ${version}. Use a version such as
|
|
7
|
+
throw new Error(`Invalid AWS Emulator version: ${version}. Use a version such as ${DEFAULT_VERSION}.`);
|
|
8
8
|
}
|
|
9
9
|
return String(version);
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "awesome-emulator-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Awesome Emulator CLI for use with AWS Emulator in local tests from npm scripts or Node.js. It runs the upstream Linux package in Docker.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|