@saws/cli 1.0.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.
Files changed (40) hide show
  1. package/README.md +62 -0
  2. package/bin/saws.ts +39 -0
  3. package/dist/bin/saws.d.ts +2 -0
  4. package/dist/bin/saws.js +35 -0
  5. package/dist/src/commands/deploy/command.d.ts +3 -0
  6. package/dist/src/commands/deploy/command.js +16 -0
  7. package/dist/src/commands/deploy/index.d.ts +2 -0
  8. package/dist/src/commands/deploy/index.js +11 -0
  9. package/dist/src/commands/dev/command.d.ts +1 -0
  10. package/dist/src/commands/dev/command.js +22 -0
  11. package/dist/src/commands/dev/index.d.ts +2 -0
  12. package/dist/src/commands/dev/index.js +10 -0
  13. package/dist/src/commands/execute/command.d.ts +3 -0
  14. package/dist/src/commands/execute/command.js +41 -0
  15. package/dist/src/commands/execute/index.d.ts +2 -0
  16. package/dist/src/commands/execute/index.js +12 -0
  17. package/dist/src/commands/init/command.d.ts +1 -0
  18. package/dist/src/commands/init/command.js +23 -0
  19. package/dist/src/commands/init/index.d.ts +2 -0
  20. package/dist/src/commands/init/index.js +9 -0
  21. package/dist/src/commands/init/templates/gitignore.template.d.ts +1 -0
  22. package/dist/src/commands/init/templates/gitignore.template.js +13 -0
  23. package/dist/src/commands/init/templates/saws-js.template.d.ts +3 -0
  24. package/dist/src/commands/init/templates/saws-js.template.js +12 -0
  25. package/dist/src/commands/init/templates/tsconfig-json.template.d.ts +1 -0
  26. package/dist/src/commands/init/templates/tsconfig-json.template.js +25 -0
  27. package/dist/tsconfig.tsbuildinfo +1 -0
  28. package/package.json +25 -0
  29. package/src/commands/deploy/command.ts +15 -0
  30. package/src/commands/deploy/index.ts +8 -0
  31. package/src/commands/dev/command.ts +23 -0
  32. package/src/commands/dev/index.ts +7 -0
  33. package/src/commands/execute/command.ts +43 -0
  34. package/src/commands/execute/index.ts +9 -0
  35. package/src/commands/init/command.ts +18 -0
  36. package/src/commands/init/index.ts +6 -0
  37. package/src/commands/init/templates/gitignore.template.ts +8 -0
  38. package/src/commands/init/templates/saws-js.template.ts +7 -0
  39. package/src/commands/init/templates/tsconfig-json.template.ts +20 -0
  40. package/tsconfig.json +14 -0
package/README.md ADDED
@@ -0,0 +1,62 @@
1
+ <div align='center'>
2
+
3
+ # SAWS CLI
4
+
5
+ CLI for interacting with your SAWS application.
6
+
7
+ </div>
8
+
9
+ ## Table of Contents
10
+ - [Installation](#installation)
11
+ - [Commands](#commands)
12
+
13
+ ## Installation <a id='installation'>
14
+
15
+ From the command line run:
16
+ ```bash
17
+ npm install @saws/cli
18
+ ```
19
+
20
+ Then run `npx saws init` to initialize your SAWS application in your current directory.
21
+
22
+ ## Commands <a id='commands'>
23
+
24
+ These commands are the base commands that come with the `saws` cli. But other services in your `saws.js` can add additional commands to the `saws` cli. For example: [`secrets` command](../secrets/README.md#commands).
25
+
26
+ ### `init`
27
+
28
+ ```bash
29
+ npx saws init
30
+ ```
31
+
32
+ This command will initialize a SAWS application in your current working directory.
33
+
34
+ It will
35
+ - Install any needed dependencies
36
+ - Create a `.gitignore`
37
+ - Create a `tsconfig.json`
38
+ - Create your `saws.js` config file
39
+
40
+ ### `dev`
41
+
42
+ ```bash
43
+ npx saws dev
44
+ ```
45
+
46
+ This command will intitialize any new services in your `saws.js` file and stand up a local development environment for your application.
47
+
48
+ ### `deploy`
49
+
50
+ ```bash
51
+ npx saws deploy --stage <stage>
52
+ ```
53
+
54
+ This command will deploy all the services in your `saws.js` file to AWS. You will need to have your AWS session configured in your terminal for this command to succeed.
55
+
56
+ ### `execute`
57
+
58
+ ```bash
59
+ npx saws execute ./path/to/script.ts --stage <stage>
60
+
61
+ ```
62
+ This command will execute a script against your application. `stage` by default will be local. If your script depends on services being running locally, you will need to run them using `npx saws dev` in another terminal tab/window.
package/bin/saws.ts ADDED
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+
3
+ process.on("uncaughtException", (e) => {
4
+ console.log(e);
5
+ });
6
+
7
+ import { default as finder } from "find-package-json";
8
+ import { program } from "commander";
9
+ import { getSawsConfig } from "@saws/core";
10
+
11
+ import { createCommand as createDevCommand } from "../src/commands/dev";
12
+ import { createCommand as createDeployCommand } from "../src/commands/deploy";
13
+ import { createCommand as createExecuteCommand } from "../src/commands/execute";
14
+ import { createCommand as createInitCommand } from '../src/commands/init';
15
+
16
+ const pkg = finder(__dirname).next().value;
17
+
18
+ program
19
+ .name("saws")
20
+ .description("A tool for building apps quickly")
21
+ .version(pkg?.version!);
22
+
23
+ program.addCommand(createDevCommand());
24
+ program.addCommand(createDeployCommand());
25
+ program.addCommand(createExecuteCommand());
26
+ program.addCommand(createInitCommand());
27
+
28
+ (async () => {
29
+ const service = await getSawsConfig()
30
+
31
+ const allServices = [...new Set(service.getAllDependencies().map(service => service.constructor))]
32
+
33
+ for (const serviceClass of allServices) {
34
+ // @ts-expect-error Not all classes will define a getCommands static method
35
+ serviceClass.getCommands?.()?.forEach(command => program.addCommand(command))
36
+ }
37
+
38
+ program.parse(process.argv);
39
+ })()
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ process.on("uncaughtException", (e) => {
8
+ console.log(e);
9
+ });
10
+ const find_package_json_1 = __importDefault(require("find-package-json"));
11
+ const commander_1 = require("commander");
12
+ const core_1 = require("@saws/core");
13
+ const dev_1 = require("../src/commands/dev");
14
+ const deploy_1 = require("../src/commands/deploy");
15
+ const execute_1 = require("../src/commands/execute");
16
+ const init_1 = require("../src/commands/init");
17
+ const pkg = (0, find_package_json_1.default)(__dirname).next().value;
18
+ commander_1.program
19
+ .name("saws")
20
+ .description("A tool for building apps quickly")
21
+ .version(pkg?.version);
22
+ commander_1.program.addCommand((0, dev_1.createCommand)());
23
+ commander_1.program.addCommand((0, deploy_1.createCommand)());
24
+ commander_1.program.addCommand((0, execute_1.createCommand)());
25
+ commander_1.program.addCommand((0, init_1.createCommand)());
26
+ (async () => {
27
+ const service = await (0, core_1.getSawsConfig)();
28
+ const allServices = [...new Set(service.getAllDependencies().map(service => service.constructor))];
29
+ for (const serviceClass of allServices) {
30
+ // @ts-expect-error Not all classes will define a getCommands static method
31
+ serviceClass.getCommands?.()?.forEach(command => commander_1.program.addCommand(command));
32
+ }
33
+ commander_1.program.parse(process.argv);
34
+ })();
35
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2F3cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2Jpbi9zYXdzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUVBLE9BQU8sQ0FBQyxFQUFFLENBQUMsbUJBQW1CLEVBQUUsQ0FBQyxDQUFDLEVBQUUsRUFBRTtJQUNwQyxPQUFPLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ2pCLENBQUMsQ0FBQyxDQUFDO0FBRUgsMEVBQXNEO0FBQ3RELHlDQUFvQztBQUNwQyxxQ0FBMkM7QUFFM0MsNkNBQXdFO0FBQ3hFLG1EQUE4RTtBQUM5RSxxREFBZ0Y7QUFDaEYsK0NBQTBFO0FBRTFFLE1BQU0sR0FBRyxHQUFHLElBQUEsMkJBQU0sRUFBQyxTQUFTLENBQUMsQ0FBQyxJQUFJLEVBQUUsQ0FBQyxLQUFLLENBQUM7QUFFM0MsbUJBQU87S0FDSixJQUFJLENBQUMsTUFBTSxDQUFDO0tBQ1osV0FBVyxDQUFDLGtDQUFrQyxDQUFDO0tBQy9DLE9BQU8sQ0FBQyxHQUFHLEVBQUUsT0FBUSxDQUFDLENBQUM7QUFFMUIsbUJBQU8sQ0FBQyxVQUFVLENBQUMsSUFBQSxtQkFBZ0IsR0FBRSxDQUFDLENBQUM7QUFDdkMsbUJBQU8sQ0FBQyxVQUFVLENBQUMsSUFBQSxzQkFBbUIsR0FBRSxDQUFDLENBQUM7QUFDMUMsbUJBQU8sQ0FBQyxVQUFVLENBQUMsSUFBQSx1QkFBb0IsR0FBRSxDQUFDLENBQUM7QUFDM0MsbUJBQU8sQ0FBQyxVQUFVLENBQUMsSUFBQSxvQkFBaUIsR0FBRSxDQUFDLENBQUM7QUFFeEMsQ0FBQyxLQUFLLElBQUksRUFBRTtJQUNWLE1BQU0sT0FBTyxHQUFHLE1BQU0sSUFBQSxvQkFBYSxHQUFFLENBQUE7SUFFckMsTUFBTSxXQUFXLEdBQUcsQ0FBQyxHQUFHLElBQUksR0FBRyxDQUFDLE9BQU8sQ0FBQyxrQkFBa0IsRUFBRSxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLE9BQU8sQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDLENBQUE7SUFFbEcsS0FBSyxNQUFNLFlBQVksSUFBSSxXQUFXLEVBQUUsQ0FBQztRQUN2QywyRUFBMkU7UUFDM0UsWUFBWSxDQUFDLFdBQVcsRUFBRSxFQUFFLEVBQUUsT0FBTyxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQUMsbUJBQU8sQ0FBQyxVQUFVLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQTtJQUMvRSxDQUFDO0lBRUQsbUJBQU8sQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQzlCLENBQUMsQ0FBQyxFQUFFLENBQUEifQ==
@@ -0,0 +1,3 @@
1
+ export declare const deployCommand: (path: string, { stage }: {
2
+ stage: string;
3
+ }) => Promise<void>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deployCommand = void 0;
4
+ const create_directories_1 = require("@saws/utils/create-directories");
5
+ const core_1 = require("@saws/core");
6
+ const deployCommand = async (path, { stage }) => {
7
+ if (stage === "local") {
8
+ console.warn("Can not deploy to local stage");
9
+ process.exit();
10
+ }
11
+ await (0, create_directories_1.createCacheDir)();
12
+ const serviceDefinition = await (0, core_1.getSawsConfig)(path);
13
+ await serviceDefinition.deploy(stage);
14
+ };
15
+ exports.deployCommand = deployCommand;
16
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21tYW5kcy9kZXBsb3kvY29tbWFuZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx1RUFBZ0U7QUFDaEUscUNBQTJDO0FBRXBDLE1BQU0sYUFBYSxHQUFHLEtBQUssRUFBRSxJQUFZLEVBQUUsRUFBRSxLQUFLLEVBQXFCLEVBQUUsRUFBRTtJQUNoRixJQUFJLEtBQUssS0FBSyxPQUFPLEVBQUUsQ0FBQztRQUN0QixPQUFPLENBQUMsSUFBSSxDQUFDLCtCQUErQixDQUFDLENBQUM7UUFDOUMsT0FBTyxDQUFDLElBQUksRUFBRSxDQUFDO0lBQ2pCLENBQUM7SUFFRCxNQUFNLElBQUEsbUNBQWMsR0FBRSxDQUFDO0lBRXZCLE1BQU0saUJBQWlCLEdBQUcsTUFBTSxJQUFBLG9CQUFhLEVBQUMsSUFBSSxDQUFDLENBQUM7SUFFcEQsTUFBTSxpQkFBaUIsQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLENBQUM7QUFDeEMsQ0FBQyxDQUFDO0FBWFcsUUFBQSxhQUFhLGlCQVd4QiJ9
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare const createCommand: () => Command;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCommand = void 0;
4
+ const commander_1 = require("commander");
5
+ const command_1 = require("./command");
6
+ const createCommand = () => new commander_1.Command("deploy")
7
+ .option("--stage <string>", "stage to deploy")
8
+ .argument("[string]", "path to service definition")
9
+ .action(command_1.deployCommand);
10
+ exports.createCommand = createCommand;
11
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29tbWFuZHMvZGVwbG95L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHlDQUFvQztBQUNwQyx1Q0FBMEM7QUFFbkMsTUFBTSxhQUFhLEdBQUcsR0FBRyxFQUFFLENBQ2hDLElBQUksbUJBQU8sQ0FBQyxRQUFRLENBQUM7S0FDbEIsTUFBTSxDQUFDLGtCQUFrQixFQUFFLGlCQUFpQixDQUFDO0tBQzdDLFFBQVEsQ0FBQyxVQUFVLEVBQUUsNEJBQTRCLENBQUM7S0FDbEQsTUFBTSxDQUFDLHVCQUFhLENBQUMsQ0FBQztBQUpkLFFBQUEsYUFBYSxpQkFJQyJ9
@@ -0,0 +1 @@
1
+ export declare const devCommand: (path: string) => Promise<void>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.devCommand = void 0;
4
+ const create_directories_1 = require("@saws/utils/create-directories");
5
+ const on_exit_1 = require("@saws/utils/on-exit");
6
+ const core_1 = require("@saws/core");
7
+ const devCommand = async (path) => {
8
+ process.env.NODE_ENV = "development";
9
+ process.env.STAGE = "local";
10
+ process.env.AWS_REGION = 'us-west-2';
11
+ await (0, create_directories_1.createCacheDir)();
12
+ const serviceDefinition = await (0, core_1.getSawsConfig)(path);
13
+ (0, on_exit_1.onProcessExit)(() => {
14
+ serviceDefinition.exit();
15
+ });
16
+ await serviceDefinition.dev();
17
+ serviceDefinition.forEachDependency(async (dependency) => {
18
+ dependency.getStdOut()?.pipe(process.stdout);
19
+ });
20
+ };
21
+ exports.devCommand = devCommand;
22
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21tYW5kcy9kZXYvY29tbWFuZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx1RUFBZ0U7QUFDaEUsaURBQW9EO0FBQ3BELHFDQUEyQztBQUVwQyxNQUFNLFVBQVUsR0FBRyxLQUFLLEVBQUUsSUFBWSxFQUFFLEVBQUU7SUFDL0MsT0FBTyxDQUFDLEdBQUcsQ0FBQyxRQUFRLEdBQUcsYUFBYSxDQUFDO0lBQ3JDLE9BQU8sQ0FBQyxHQUFHLENBQUMsS0FBSyxHQUFHLE9BQU8sQ0FBQztJQUM1QixPQUFPLENBQUMsR0FBRyxDQUFDLFVBQVUsR0FBRyxXQUFXLENBQUM7SUFFckMsTUFBTSxJQUFBLG1DQUFjLEdBQUUsQ0FBQztJQUV2QixNQUFNLGlCQUFpQixHQUFHLE1BQU0sSUFBQSxvQkFBYSxFQUFDLElBQUksQ0FBQyxDQUFDO0lBRXBELElBQUEsdUJBQWEsRUFBQyxHQUFHLEVBQUU7UUFDakIsaUJBQWlCLENBQUMsSUFBSSxFQUFFLENBQUM7SUFDM0IsQ0FBQyxDQUFDLENBQUM7SUFFSCxNQUFNLGlCQUFpQixDQUFDLEdBQUcsRUFBRSxDQUFDO0lBRTlCLGlCQUFpQixDQUFDLGlCQUFpQixDQUFDLEtBQUssRUFBRSxVQUFVLEVBQUUsRUFBRTtRQUN2RCxVQUFVLENBQUMsU0FBUyxFQUFFLEVBQUUsSUFBSSxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQTtJQUM5QyxDQUFDLENBQUMsQ0FBQTtBQUNKLENBQUMsQ0FBQztBQWxCVyxRQUFBLFVBQVUsY0FrQnJCIn0=
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare const createCommand: () => Command;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCommand = void 0;
4
+ const commander_1 = require("commander");
5
+ const command_1 = require("./command");
6
+ const createCommand = () => new commander_1.Command("dev")
7
+ .argument("[string]", "path to service definition")
8
+ .action(command_1.devCommand);
9
+ exports.createCommand = createCommand;
10
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29tbWFuZHMvZGV2L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHlDQUFvQztBQUNwQyx1Q0FBdUM7QUFFaEMsTUFBTSxhQUFhLEdBQUcsR0FBRyxFQUFFLENBQ2hDLElBQUksbUJBQU8sQ0FBQyxLQUFLLENBQUM7S0FDZixRQUFRLENBQUMsVUFBVSxFQUFFLDRCQUE0QixDQUFDO0tBQ2xELE1BQU0sQ0FBQyxvQkFBVSxDQUFDLENBQUM7QUFIWCxRQUFBLGFBQWEsaUJBR0YifQ==
@@ -0,0 +1,3 @@
1
+ export declare const executeCommand: (scriptPath: string, sawsPath: string, { stage }: {
2
+ stage: string;
3
+ }) => Promise<void>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.executeCommand = void 0;
7
+ const core_1 = require("@saws/core");
8
+ const constants_1 = require("@saws/utils/constants");
9
+ const stage_outputs_1 = require("@saws/utils/stage-outputs");
10
+ const child_process_1 = require("child_process");
11
+ const esbuild_1 = __importDefault(require("esbuild"));
12
+ const path_1 = __importDefault(require("path"));
13
+ const executeCommand = async (scriptPath, sawsPath, { stage = "local" }) => {
14
+ process.env.STAGE = stage;
15
+ const serviceDefinition = await (0, core_1.getSawsConfig)(sawsPath);
16
+ const stageOutputs = await (0, stage_outputs_1.getStageOutputs)(stage);
17
+ const services = serviceDefinition.getAllDependencies();
18
+ let environment = {
19
+ NODE_ENV: stage === "local" ? "development" : "production",
20
+ STAGE: stage,
21
+ };
22
+ for (const service of services) {
23
+ await service.setOutputs(stageOutputs[service.name], stage);
24
+ environment = {
25
+ ...environment,
26
+ ...await (service.getEnvironmentVariables(stage))
27
+ };
28
+ }
29
+ const outFile = path_1.default.join(constants_1.BUILD_DIR, "script.js");
30
+ await esbuild_1.default.build({
31
+ entryPoints: [scriptPath],
32
+ bundle: true,
33
+ outfile: outFile,
34
+ platform: "node",
35
+ });
36
+ (0, child_process_1.fork)(outFile, {
37
+ env: environment,
38
+ });
39
+ };
40
+ exports.executeCommand = executeCommand;
41
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21tYW5kcy9leGVjdXRlL2NvbW1hbmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEscUNBQTJDO0FBQzNDLHFEQUFrRDtBQUNsRCw2REFBNEQ7QUFDNUQsaURBQXFDO0FBQ3JDLHNEQUE4QjtBQUM5QixnREFBd0I7QUFFakIsTUFBTSxjQUFjLEdBQUcsS0FBSyxFQUNqQyxVQUFrQixFQUNsQixRQUFnQixFQUNoQixFQUFFLEtBQUssR0FBRyxPQUFPLEVBQXFCLEVBQ3RDLEVBQUU7SUFDRixPQUFPLENBQUMsR0FBRyxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUM7SUFFMUIsTUFBTSxpQkFBaUIsR0FBRyxNQUFNLElBQUEsb0JBQWEsRUFBQyxRQUFRLENBQUMsQ0FBQztJQUV4RCxNQUFNLFlBQVksR0FBRyxNQUFNLElBQUEsK0JBQWUsRUFBQyxLQUFLLENBQUMsQ0FBQztJQUNsRCxNQUFNLFFBQVEsR0FBRyxpQkFBaUIsQ0FBQyxrQkFBa0IsRUFBRSxDQUFBO0lBQ3ZELElBQUksV0FBVyxHQUEyQjtRQUN4QyxRQUFRLEVBQUUsS0FBSyxLQUFLLE9BQU8sQ0FBQyxDQUFDLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQyxZQUFZO1FBQzFELEtBQUssRUFBRSxLQUFLO0tBQ2IsQ0FBQTtJQUNELEtBQUssTUFBTSxPQUFPLElBQUksUUFBUSxFQUFFLENBQUM7UUFDL0IsTUFBTSxPQUFPLENBQUMsVUFBVSxDQUFDLFlBQVksQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLEVBQUUsS0FBSyxDQUFDLENBQUE7UUFDM0QsV0FBVyxHQUFHO1lBQ1osR0FBRyxXQUFXO1lBQ2QsR0FBRyxNQUFLLENBQUMsT0FBTyxDQUFDLHVCQUF1QixDQUFDLEtBQUssQ0FBQyxDQUFDO1NBQ2pELENBQUE7SUFDSCxDQUFDO0lBRUQsTUFBTSxPQUFPLEdBQUcsY0FBSSxDQUFDLElBQUksQ0FBQyxxQkFBUyxFQUFFLFdBQVcsQ0FBQyxDQUFDO0lBRWxELE1BQU0saUJBQU8sQ0FBQyxLQUFLLENBQUM7UUFDbEIsV0FBVyxFQUFFLENBQUMsVUFBVSxDQUFDO1FBQ3pCLE1BQU0sRUFBRSxJQUFJO1FBQ1osT0FBTyxFQUFFLE9BQU87UUFDaEIsUUFBUSxFQUFFLE1BQU07S0FDakIsQ0FBQyxDQUFDO0lBRUgsSUFBQSxvQkFBSSxFQUFDLE9BQU8sRUFBRTtRQUNaLEdBQUcsRUFBRSxXQUFXO0tBQ2pCLENBQUMsQ0FBQTtBQUNKLENBQUMsQ0FBQztBQW5DVyxRQUFBLGNBQWMsa0JBbUN6QiJ9
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare const createCommand: () => Command;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCommand = void 0;
4
+ const commander_1 = require("commander");
5
+ const command_1 = require("./command");
6
+ const createCommand = () => new commander_1.Command("execute")
7
+ .option("--stage <string>", "Stage")
8
+ .argument("<string>", "The path to the script to execute")
9
+ .argument("[string]", "The path to the saws file")
10
+ .action(command_1.executeCommand);
11
+ exports.createCommand = createCommand;
12
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29tbWFuZHMvZXhlY3V0ZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5Q0FBb0M7QUFDcEMsdUNBQTJDO0FBRXBDLE1BQU0sYUFBYSxHQUFHLEdBQUcsRUFBRSxDQUNoQyxJQUFJLG1CQUFPLENBQUMsU0FBUyxDQUFDO0tBQ25CLE1BQU0sQ0FBQyxrQkFBa0IsRUFBRSxPQUFPLENBQUM7S0FDbkMsUUFBUSxDQUFDLFVBQVUsRUFBRSxtQ0FBbUMsQ0FBQztLQUN6RCxRQUFRLENBQUMsVUFBVSxFQUFFLDJCQUEyQixDQUFDO0tBQ2pELE1BQU0sQ0FBQyx3QkFBYyxDQUFDLENBQUM7QUFMZixRQUFBLGFBQWEsaUJBS0UifQ==
@@ -0,0 +1 @@
1
+ export declare const initCommand: () => Promise<void>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.initCommand = void 0;
7
+ const node_path_1 = __importDefault(require("node:path"));
8
+ const dependency_management_1 = require("@saws/utils/dependency-management");
9
+ const tsconfig_json_template_1 = require("./templates/tsconfig-json.template");
10
+ const saws_js_template_1 = require("./templates/saws-js.template");
11
+ const create_file_if_not_exists_1 = require("@saws/utils/create-file-if-not-exists");
12
+ const gitignore_template_1 = require("./templates/gitignore.template");
13
+ const initCommand = async () => {
14
+ const name = node_path_1.default.parse(node_path_1.default.resolve('.')).name;
15
+ // not used for now
16
+ await (0, dependency_management_1.installMissingDependencies)([]);
17
+ await (0, dependency_management_1.installMissingDependencies)(['@saws/core', 'typescript'], { development: true });
18
+ (0, create_file_if_not_exists_1.createFileIfNotExists)('./tsconfig.json', (0, tsconfig_json_template_1.tsconfigJsonTemplate)());
19
+ (0, create_file_if_not_exists_1.createFileIfNotExists)('./saws.js', (0, saws_js_template_1.sawsJsTemplate)({ name }));
20
+ (0, create_file_if_not_exists_1.createFileIfNotExists)('./.gitignore', (0, gitignore_template_1.gitignoreTemplate)());
21
+ };
22
+ exports.initCommand = initCommand;
23
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21tYW5kcy9pbml0L2NvbW1hbmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsMERBQTRCO0FBQzVCLDZFQUE4RTtBQUM5RSwrRUFBeUU7QUFDekUsbUVBQTZEO0FBQzdELHFGQUE2RTtBQUM3RSx1RUFBa0U7QUFFM0QsTUFBTSxXQUFXLEdBQUcsS0FBSyxJQUFJLEVBQUU7SUFDcEMsTUFBTSxJQUFJLEdBQUcsbUJBQUksQ0FBQyxLQUFLLENBQUMsbUJBQUksQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUE7SUFFL0MsbUJBQW1CO0lBQ25CLE1BQU0sSUFBQSxrREFBMEIsRUFBQyxFQUFFLENBQUMsQ0FBQTtJQUNwQyxNQUFNLElBQUEsa0RBQTBCLEVBQUMsQ0FBQyxZQUFZLEVBQUUsWUFBWSxDQUFDLEVBQUUsRUFBRSxXQUFXLEVBQUUsSUFBSSxFQUFFLENBQUMsQ0FBQTtJQUVyRixJQUFBLGlEQUFxQixFQUFDLGlCQUFpQixFQUFFLElBQUEsNkNBQW9CLEdBQUUsQ0FBQyxDQUFBO0lBQ2hFLElBQUEsaURBQXFCLEVBQUMsV0FBVyxFQUFFLElBQUEsaUNBQWMsRUFBQyxFQUFFLElBQUksRUFBRSxDQUFDLENBQUMsQ0FBQTtJQUM1RCxJQUFBLGlEQUFxQixFQUFDLGNBQWMsRUFBRSxJQUFBLHNDQUFpQixHQUFFLENBQUMsQ0FBQTtBQUM1RCxDQUFDLENBQUE7QUFWWSxRQUFBLFdBQVcsZUFVdkIifQ==
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare const createCommand: () => Command;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCommand = void 0;
4
+ const commander_1 = require("commander");
5
+ const command_1 = require("./command");
6
+ const createCommand = () => new commander_1.Command("init")
7
+ .action(command_1.initCommand);
8
+ exports.createCommand = createCommand;
9
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29tbWFuZHMvaW5pdC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5Q0FBb0M7QUFDcEMsdUNBQXdDO0FBRWpDLE1BQU0sYUFBYSxHQUFHLEdBQUcsRUFBRSxDQUNoQyxJQUFJLG1CQUFPLENBQUMsTUFBTSxDQUFDO0tBQ2hCLE1BQU0sQ0FBQyxxQkFBVyxDQUFDLENBQUM7QUFGWixRQUFBLGFBQWEsaUJBRUQifQ==
@@ -0,0 +1 @@
1
+ export declare const gitignoreTemplate: () => string;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.gitignoreTemplate = void 0;
4
+ const gitignoreTemplate = () => `node_modules
5
+ .saws/postgres
6
+ .saws/cognito
7
+ .saws/saws-*-local-output.json
8
+ .saws/cache
9
+ .saws/build
10
+ .saws/.secrets
11
+ .DS_Store`;
12
+ exports.gitignoreTemplate = gitignoreTemplate;
13
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2l0aWdub3JlLnRlbXBsYXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2NvbW1hbmRzL2luaXQvdGVtcGxhdGVzL2dpdGlnbm9yZS50ZW1wbGF0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBTyxNQUFNLGlCQUFpQixHQUFHLEdBQUcsRUFBRSxDQUFDOzs7Ozs7O1VBTzdCLENBQUE7QUFQRyxRQUFBLGlCQUFpQixxQkFPcEIifQ==
@@ -0,0 +1,3 @@
1
+ export declare const sawsJsTemplate: ({ name }: {
2
+ name: string;
3
+ }) => string;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sawsJsTemplate = void 0;
4
+ const sawsJsTemplate = ({ name }) => `const { ServiceDefinition } = require('@saws/core')
5
+
6
+ module.exports = new ServiceDefinition({
7
+ name: '${name}',
8
+ dependencies: []
9
+ })
10
+ `;
11
+ exports.sawsJsTemplate = sawsJsTemplate;
12
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2F3cy1qcy50ZW1wbGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9jb21tYW5kcy9pbml0L3RlbXBsYXRlcy9zYXdzLWpzLnRlbXBsYXRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFPLE1BQU0sY0FBYyxHQUFHLENBQUMsRUFBRSxJQUFJLEVBQW1CLEVBQUUsRUFBRSxDQUFDOzs7V0FHbEQsSUFBSTs7O0NBR2QsQ0FBQTtBQU5ZLFFBQUEsY0FBYyxrQkFNMUIifQ==
@@ -0,0 +1 @@
1
+ export declare const tsconfigJsonTemplate: () => string;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tsconfigJsonTemplate = void 0;
4
+ const tsconfigJsonTemplate = () => `{
5
+ "include": ["**/*.ts", "*.ts", "**/*.tsx", "global.d.ts"],
6
+ "exclude": [".saws", "node_modules"],
7
+ "compilerOptions": {
8
+ "lib": ["DOM", "DOM.Iterable", "ES2022"],
9
+ "isolatedModules": true,
10
+ "esModuleInterop": true,
11
+ "jsx": "react-jsx",
12
+ "target": "ES2022",
13
+ "module": "Node16",
14
+ "resolveJsonModule": true,
15
+ "strict": true,
16
+ "allowJs": true,
17
+ "forceConsistentCasingInFileNames": true,
18
+ "noEmit": true,
19
+ "skipLibCheck": true
20
+ }
21
+ }
22
+
23
+ `;
24
+ exports.tsconfigJsonTemplate = tsconfigJsonTemplate;
25
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHNjb25maWctanNvbi50ZW1wbGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9jb21tYW5kcy9pbml0L3RlbXBsYXRlcy90c2NvbmZpZy1qc29uLnRlbXBsYXRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFPLE1BQU0sb0JBQW9CLEdBQUcsR0FBRyxFQUFFLENBQUM7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Q0FtQnpDLENBQUE7QUFuQlksUUFBQSxvQkFBb0Isd0JBbUJoQyJ9
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/file.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/filereader.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/dom-events.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/globals.global.d.ts","../../../node_modules/.pnpm/@types+node@20.11.19/node_modules/@types/node/index.d.ts","../../../node_modules/.pnpm/@types+find-package-json@1.2.6/node_modules/@types/find-package-json/package-json.d.ts","../../../node_modules/.pnpm/@types+find-package-json@1.2.6/node_modules/@types/find-package-json/index.d.ts","../../../node_modules/.pnpm/commander@12.0.0/node_modules/commander/typings/index.d.ts","../../utils/dist/src/stage-outputs.d.ts","../../utils/dist/src/aws-permission.d.ts","../../core/dist/src/servicedefinition.d.ts","../../core/dist/src/get-saws-config.d.ts","../../core/dist/src/index.d.ts","../../utils/dist/src/create-directories.d.ts","../../utils/dist/src/on-exit.d.ts","../src/commands/dev/command.ts","../src/commands/dev/index.ts","../src/commands/deploy/command.ts","../src/commands/deploy/index.ts","../../utils/dist/src/constants.d.ts","../../../node_modules/.pnpm/esbuild@0.20.1/node_modules/esbuild/lib/main.d.ts","../src/commands/execute/command.ts","../src/commands/execute/index.ts","../../utils/dist/src/dependency-management.d.ts","../src/commands/init/templates/tsconfig-json.template.ts","../src/commands/init/templates/saws-js.template.ts","../../utils/dist/src/create-file-if-not-exists.d.ts","../src/commands/init/templates/gitignore.template.ts","../src/commands/init/command.ts","../src/commands/init/index.ts","../bin/saws.ts"],"fileInfos":[{"version":"f33e5332b24c3773e930e212cbb8b6867c8ba3ec4492064ea78e55a524d57450","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"26f2f787e82c4222710f3b676b4d83eb5ad0a72fa7b746f03449e7a026ce5073","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"21e41a76098aa7a191028256e52a726baafd45a925ea5cf0222eb430c96c1d83","affectsGlobalScope":true,"impliedFormat":1},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true,"impliedFormat":1},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true,"impliedFormat":1},{"version":"e0275cd0e42990dc3a16f0b7c8bca3efe87f1c8ad404f80c6db1c7c0b828c59f","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true,"impliedFormat":1},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true,"impliedFormat":1},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true,"impliedFormat":1},{"version":"acae90d417bee324b1372813b5a00829d31c7eb670d299cd7f8f9a648ac05688","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true,"impliedFormat":1},{"version":"62a4966981264d1f04c44eb0f4b5bdc3d81c1a54725608861e44755aa24ad6a5","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"86a34c7a13de9cabc43161348f663624b56871ed80986e41d214932ddd8d6719","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"efc7d584a33fe3422847783d228f315c4cd1afe74bd7cf8e3f0e4c1125129fef","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","impliedFormat":1},{"version":"3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","impliedFormat":1},{"version":"e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","impliedFormat":1},{"version":"471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","impliedFormat":1},{"version":"c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","impliedFormat":1},{"version":"40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","impliedFormat":1},{"version":"8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","impliedFormat":1},{"version":"4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1","impliedFormat":1},{"version":"a14ed46fa3f5ffc7a8336b497cd07b45c2084213aaca933a22443fcb2eef0d07","affectsGlobalScope":true,"impliedFormat":1},{"version":"cce1f5f86974c1e916ec4a8cab6eec9aa8e31e8148845bf07fbaa8e1d97b1a2c","impliedFormat":1},{"version":"e2eb1ce13a9c0fa7ab62c63909d81973ef4b707292667c64f1e25e6e53fa7afa","affectsGlobalScope":true,"impliedFormat":1},{"version":"16d74fe4d8e183344d3beb15d48b123c5980ff32ff0cc8c3b96614ddcdf9b239","impliedFormat":1},{"version":"7b43160a49cf2c6082da0465876c4a0b164e160b81187caeb0a6ca7a281e85ba","impliedFormat":1},{"version":"41fb2a1c108fbf46609ce5a451b7ec78eb9b5ada95fd5b94643e4b26397de0b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"a1d2988ad9d2aef7b9915a22b5e52c165c83a878f2851c35621409046bbe3c05","affectsGlobalScope":true,"impliedFormat":1},{"version":"bd3f5d05b6b5e4bfcea7739a45f3ffb4a7f4a3442ba7baf93e0200799285b8f1","impliedFormat":1},{"version":"4c775c2fccabf49483c03cd5e3673f87c1ffb6079d98e7b81089c3def79e29c6","impliedFormat":1},{"version":"8806ae97308ef26363bd7ec8071bca4d07fb575f905ee3d8a91aff226df6d618","impliedFormat":1},{"version":"af5bf1db6f1804fb0069039ae77a05d60133c77a2158d9635ea27b6bb2828a8f","impliedFormat":1},{"version":"b7fe70be794e13d1b7940e318b8770cd1fb3eced7707805318a2e3aaac2c3e9e","impliedFormat":1},{"version":"2c71199d1fc83bf17636ad5bf63a945633406b7b94887612bba4ef027c662b3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ae9dc7dbb58cd843065639707815df85c044babaa0947116f97bdb824d07204","affectsGlobalScope":true,"impliedFormat":1},{"version":"fe1fd6afdfe77976d4c702f3746c05fb05a7e566845c890e0e970fe9376d6a90","impliedFormat":1},{"version":"313a0b063f5188037db113509de1b934a0e286f14e9479af24fada241435e707","impliedFormat":1},{"version":"f1ace2d2f98429e007d017c7a445efad2aaebf8233135abdb2c88b8c0fef91ab","impliedFormat":1},{"version":"87ef1a23caa071b07157c72077fa42b86d30568f9dc9e31eed24d5d14fc30ba8","impliedFormat":1},{"version":"396a8939b5e177542bdf9b5262b4eee85d29851b2d57681fa9d7eae30e225830","impliedFormat":1},{"version":"21773f5ac69ddf5a05636ba1f50b5239f4f2d27e4420db147fc2f76a5ae598ac","impliedFormat":1},{"version":"ea455cc68871b049bcecd9f56d4cf27b852d6dafd5e3b54468ca87cc11604e4d","affectsGlobalScope":true,"impliedFormat":1},{"version":"c07146dbbbd8b347241b5df250a51e48f2d7bef19b1e187b1a3f20c849988ff1","impliedFormat":1},{"version":"45b1053e691c5af9bfe85060a3e1542835f8d84a7e6e2e77ca305251eda0cb3c","impliedFormat":1},{"version":"0f05c06ff6196958d76b865ae17245b52d8fe01773626ac3c43214a2458ea7b7","impliedFormat":1},{"version":"ae5507fc333d637dec9f37c6b3f4d423105421ea2820a64818de55db85214d66","affectsGlobalScope":true,"impliedFormat":1},{"version":"0666f4c99b8688c7be5956df8fecf5d1779d3b22f8f2a88258ae7072c7b6026f","affectsGlobalScope":true,"impliedFormat":1},{"version":"8abd0566d2854c4bd1c5e48e05df5c74927187f1541e6770001d9637ac41542e","impliedFormat":1},{"version":"54e854615c4eafbdd3fd7688bd02a3aafd0ccf0e87c98f79d3e9109f047ce6b8","impliedFormat":1},{"version":"d8dba11dc34d50cb4202de5effa9a1b296d7a2f4a029eec871f894bddfb6430d","impliedFormat":1},{"version":"8b71dd18e7e63b6f991b511a201fad7c3bf8d1e0dd98acb5e3d844f335a73634","impliedFormat":1},{"version":"01d8e1419c84affad359cc240b2b551fb9812b450b4d3d456b64cda8102d4f60","impliedFormat":1},{"version":"8221b00f271cf7f535a8eeec03b0f80f0929c7a16116e2d2df089b41066de69b","impliedFormat":1},{"version":"269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"7424817d5eb498771e6d1808d726ec38f75d2eaf3fa359edd5c0c540c52725c1","impliedFormat":1},{"version":"9a9634296cca836c3308923ba7aa094fa6ed76bb1e366d8ddcf5c65888ab1024","impliedFormat":1},{"version":"bddce945d552a963c9733db106b17a25474eefcab7fc990157a2134ef55d4954","affectsGlobalScope":true,"impliedFormat":1},{"version":"7052b7b0c3829df3b4985bab2fd74531074b4835d5a7b263b75c82f0916ad62f","affectsGlobalScope":true,"impliedFormat":1},{"version":"aa34c3aa493d1c699601027c441b9664547c3024f9dbab1639df7701d63d18fa","impliedFormat":1},{"version":"4b55240c2a03b2c71e98a7fc528b16136faa762211c92e781a01c37821915ea6","impliedFormat":1},{"version":"7c651f8dce91a927ab62925e73f190763574c46098f2b11fb8ddc1b147a6709a","impliedFormat":1},{"version":"7440ab60f4cb031812940cc38166b8bb6fbf2540cfe599f87c41c08011f0c1df","impliedFormat":1},{"version":"94c086dff8dbc5998749326bc69b520e8e4273fb5b7b58b50e0210e0885dfcde","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5b5dc128973498b75f52b1b8c2d5f8629869104899733ae485100c2309b4c12","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebe5facd12fd7745cda5f4bc3319f91fb29dc1f96e57e9c6f8b260a7cc5b67ee","impliedFormat":1},{"version":"79bad8541d5779c85e82a9fb119c1fe06af77a71cc40f869d62ad379473d4b75","impliedFormat":1},{"version":"37dc027f781c75f0f546e329cfac7cf92a6b289f42458f47a9adc25e516b6839","impliedFormat":1},{"version":"629d20681ca284d9e38c0a019f647108f5fe02f9c59ac164d56f5694fc3faf4d","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7dbf5716d76846c7522e910896c5747b6df1abd538fee8f5291bdc843461795","impliedFormat":1},{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},{"version":"b510d0a18e3db42ac9765d26711083ec1e8b4e21caaca6dc4d25ae6e8623f447","impliedFormat":1},{"version":"990db7c9743d636fd3b2820ec8c40b512879da4c82e00488e7a352e2d005fc39","impliedFormat":1},{"version":"a6cd1a415bda8ee0a11b07aaebf5bab838614ba92c089f5fa7569a8c4927b85a","impliedFormat":1},{"version":"d191d65f6febcf37bf82a8505ac95cab3a8531ddd363c9ebdf81d19173369df5","impliedFormat":1},{"version":"b507173a7718609bb52011f33e6fc61b0f3de62ec38c935b38dcfbb68223dea9","impliedFormat":1},{"version":"02a81c65d86a2ad4528096fa5bfdb06b702b52fb58513e09a4e0fb9cd0de3747","impliedFormat":1},{"version":"f8dbeef8328485fe66b33633cc13a95febf2f9d8b7ddf074295ab4a037b84812","impliedFormat":1},{"version":"243828236d4436f8faf41005da557f6ace5521c90282c0f78f23493edea327b9","impliedFormat":1},{"version":"c85b423b254ef24cee6f24b136a4635d6a693b0d397827d8e4080c9fe491edd9","impliedFormat":1},{"version":"192f6fe16a3d6007464fef483a7a54256e97362c500dab7a42b2e665b53f3a58","impliedFormat":1},{"version":"19426460ff98d38db8946aaae2086ba739c2f29c53136d27c434c0668e8f2c29","impliedFormat":1},{"version":"44f91cdbca1ab9a48a0bca8361ab3ec5af73281df5151719f146e7eacad40e1d","signature":"1c2ebda88906d5478d9aa470ffc5397eef607a3849ee11fca25203049b0b8263","impliedFormat":1},{"version":"b9b96ad46215796bb1db6362e2fb7b5fa2c172b8a1181f5f684f54e770acdb0b","signature":"8368b9bf33e02585e5c5daa7fe3ca112f8a8162110b5a2a5babc435fac043cf2","impliedFormat":1},{"version":"25f047fb6662fdcf4d70e94d8ad93ea700720ebe93c738211c7e1dd326f85653","signature":"9b1a03e8fd8c42a64c8c455a455a0f00d4b7f19cd5a3b4a7415ea7585eef994f","impliedFormat":1},{"version":"f8f3816127a1b0a5f6e1382e59f96ad831e1b9e42329414cd23898cd96545873","signature":"8368b9bf33e02585e5c5daa7fe3ca112f8a8162110b5a2a5babc435fac043cf2","impliedFormat":1},{"version":"d693828e1cf19776aa136f59fe66496ffc17137001a0e7a97dba3468d8eb1c11","impliedFormat":1},{"version":"077bdf7e67c30015ec0d80b853c835f4ec7a572e4a1842b2115497adca45ecff","impliedFormat":1},{"version":"746ee57afc230f1d009f1f6d5f08b9e0abc848a09cbe0a18fca692b04999c7b4","signature":"71283becd18255a020b3cc6ac083f386f19779d8ba0e34a2771890f578e03a79","impliedFormat":1},{"version":"633caa5115e642c02838217d903948f5cd2bc7991efe2922a0c57160f2427627","signature":"8368b9bf33e02585e5c5daa7fe3ca112f8a8162110b5a2a5babc435fac043cf2","impliedFormat":1},{"version":"cd98f1f625ba738a194d1fe10e8065c847967c716a08f14e780a98a56d592e82","impliedFormat":1},{"version":"821c0775705e496af23e058ea2d51b3dc23aed83883ed607877b59f5f36b5a7c","signature":"cfa7ea3bb4a570720f8cc0604d804fd815fbcf1ca4bf41d70cdc212d8d25c261","impliedFormat":1},{"version":"43db3e8ffbb635c80946f712fa3cd8b32758e59b37ff8d805de31313c9c0d603","signature":"53fd2813abd049309fa079c9db1a41e4fd627792337496df532938df07c78013","impliedFormat":1},{"version":"604be7edff390f8819ac99b5810d6f3f8239002cd07b9acb471723117898b1a7","impliedFormat":1},{"version":"b1fbdf38c60fa960e5ad0a74e7f7f4a83d2c4046b3982501f4e96f9211298703","signature":"b9c57e42575b20a8518436afb069e2e09e9ce1bb4c912c1d62252e1ced4a666e","impliedFormat":1},{"version":"b44447c545ce6e5cea752755fc3f32f66276a74b6f6ca74525c208936c28acb0","signature":"1c4688eb35e50010c6065198c155a917049d452300b31b5f53f1875b863494bc","impliedFormat":1},{"version":"88e4ddbcbceebabc5b833847928fdc2943bae12d6e1ec3b473f67233d9dcb772","signature":"8368b9bf33e02585e5c5daa7fe3ca112f8a8162110b5a2a5babc435fac043cf2","impliedFormat":1},{"version":"a6dccd3ba6aecc0a86969c9d373993231c20b0909a4d326794ff816fbef9e345","signature":"43e818adf60173644896298637f47b01d5819b17eda46eaa32d0c7d64724d012","impliedFormat":1}],"root":[[155,158],161,162,164,165,[167,170]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"esModuleInterop":true,"inlineSourceMap":true,"jsx":2,"module":100,"outDir":"./","rootDir":"..","skipLibCheck":true,"strict":true,"target":9},"fileIdsList":[[144,145],[59],[94],[95,100,128],[96,107,108,115,125,136],[96,97,107,115],[98,137],[99,100,108,116],[100,125,133],[101,103,107,115],[94,102],[103,104],[107],[105,107],[94,107],[107,108,109,125,136],[107,108,109,122,125,128],[92,95,141],[103,107,110,115,125,136],[107,108,110,111,115,125,133,136],[110,112,125,133,136],[59,60,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143],[107,113],[114,136,141],[103,107,115,125],[116],[117],[94,118],[119,135,141],[120],[121],[107,122,123],[122,124,137,139],[95,107,125,126,127,128],[95,125,127],[125,126],[128],[129],[94,125],[107,131,132],[131,132],[100,115,125,133],[134],[115,135],[95,110,121,136],[100,137],[125,138],[114,139],[140],[95,100,107,109,118,125,136,139,141],[125,142],[69,73,136],[69,125,136],[64],[66,69,133,136],[115,133],[144],[64,144],[66,69,115,136],[61,62,65,68,95,107,125,136],[61,67],[65,69,95,128,136,144],[95,144],[85,95,144],[63,64,144],[69],[63,64,65,66,67,68,69,70,71,73,74,75,76,77,78,79,80,81,82,83,84,86,87,88,89,90,91],[69,76,77],[67,69,77,78],[68],[61,64,69],[69,73,77,78],[73],[67,69,72,136],[61,66,67,69,73,76],[95,125],[64,69,85,95,141,144],[146,147,152,156,158,162,169],[152,153],[147,157],[152,153,154],[147,155],[96,117,148,152,159,160],[147,161],[117,163,164,165,166,167],[147,168],[150],[150,151],[125,144,148,149],[147]],"referencedMap":[[146,1],[59,2],[60,2],[94,3],[95,4],[96,5],[97,6],[98,7],[99,8],[100,9],[101,10],[102,11],[103,12],[104,12],[106,13],[105,14],[107,15],[108,16],[109,17],[93,18],[110,19],[111,20],[112,21],[144,22],[113,23],[114,24],[115,25],[116,26],[117,27],[118,28],[119,29],[120,30],[121,31],[122,32],[123,32],[124,33],[125,34],[127,35],[126,36],[128,37],[129,38],[130,39],[131,40],[132,41],[133,42],[134,43],[135,44],[136,45],[137,46],[138,47],[139,48],[140,49],[141,50],[142,51],[76,52],[83,53],[75,52],[90,54],[67,55],[66,56],[89,57],[84,58],[87,59],[69,60],[68,61],[64,62],[63,63],[86,64],[65,65],[70,66],[74,66],[92,67],[91,66],[78,68],[79,69],[81,70],[77,71],[80,72],[85,57],[72,73],[73,74],[82,75],[62,76],[88,77],[170,78],[157,79],[158,80],[155,81],[156,82],[161,83],[162,84],[168,85],[169,86],[151,87],[152,88],[150,89]],"exportedModulesMap":[[146,1],[59,2],[60,2],[94,3],[95,4],[96,5],[97,6],[98,7],[99,8],[100,9],[101,10],[102,11],[103,12],[104,12],[106,13],[105,14],[107,15],[108,16],[109,17],[93,18],[110,19],[111,20],[112,21],[144,22],[113,23],[114,24],[115,25],[116,26],[117,27],[118,28],[119,29],[120,30],[121,31],[122,32],[123,32],[124,33],[125,34],[127,35],[126,36],[128,37],[129,38],[130,39],[131,40],[132,41],[133,42],[134,43],[135,44],[136,45],[137,46],[138,47],[139,48],[140,49],[141,50],[142,51],[76,52],[83,53],[75,52],[90,54],[67,55],[66,56],[89,57],[84,58],[87,59],[69,60],[68,61],[64,62],[63,63],[86,64],[65,65],[70,66],[74,66],[92,67],[91,66],[78,68],[79,69],[81,70],[77,71],[80,72],[85,57],[72,73],[73,74],[82,75],[62,76],[88,77],[158,90],[156,90],[162,90],[169,90],[151,87],[152,88],[150,89]],"semanticDiagnosticsPerFile":[146,145,59,60,94,95,96,97,98,99,100,101,102,103,104,106,105,107,108,109,93,143,110,111,112,144,113,114,115,116,117,118,119,120,121,122,123,124,125,127,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,147,160,57,58,10,12,11,2,13,14,15,16,17,18,19,20,3,4,21,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,55,53,54,1,56,76,83,75,90,67,66,89,84,87,69,68,64,63,86,65,70,71,74,61,92,91,78,79,81,77,80,85,72,73,82,62,88,170,157,158,155,156,161,162,168,169,167,165,164,151,152,150,149,159,153,166,163,154,148],"latestChangedDtsFile":"./bin/saws.d.ts"},"version":"5.3.3"}
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@saws/cli",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "bin": {
6
+ "saws": "./dist/bin/saws.js"
7
+ },
8
+ "keywords": [],
9
+ "author": "",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "commander": "^12.0.0",
13
+ "esbuild": "^0.20.1",
14
+ "find-package-json": "^1.2.0",
15
+ "@saws/secrets": "^1.0.0",
16
+ "@saws/utils": "^1.0.0"
17
+ },
18
+ "devDependencies": {
19
+ "@types/find-package-json": "^1.2.6",
20
+ "@saws/core": "^1.0.0"
21
+ },
22
+ "peerDependencies": {
23
+ "@saws/core": ">=1.0.0"
24
+ }
25
+ }
@@ -0,0 +1,15 @@
1
+ import { createCacheDir } from "@saws/utils/create-directories";
2
+ import { getSawsConfig } from "@saws/core";
3
+
4
+ export const deployCommand = async (path: string, { stage }: { stage: string }) => {
5
+ if (stage === "local") {
6
+ console.warn("Can not deploy to local stage");
7
+ process.exit();
8
+ }
9
+
10
+ await createCacheDir();
11
+
12
+ const serviceDefinition = await getSawsConfig(path);
13
+
14
+ await serviceDefinition.deploy(stage);
15
+ };
@@ -0,0 +1,8 @@
1
+ import { Command } from "commander";
2
+ import { deployCommand } from "./command";
3
+
4
+ export const createCommand = () =>
5
+ new Command("deploy")
6
+ .option("--stage <string>", "stage to deploy")
7
+ .argument("[string]", "path to service definition")
8
+ .action(deployCommand);
@@ -0,0 +1,23 @@
1
+ import { createCacheDir } from "@saws/utils/create-directories";
2
+ import { onProcessExit } from "@saws/utils/on-exit";
3
+ import { getSawsConfig } from "@saws/core";
4
+
5
+ export const devCommand = async (path: string) => {
6
+ process.env.NODE_ENV = "development";
7
+ process.env.STAGE = "local";
8
+ process.env.AWS_REGION = 'us-west-2';
9
+
10
+ await createCacheDir();
11
+
12
+ const serviceDefinition = await getSawsConfig(path);
13
+
14
+ onProcessExit(() => {
15
+ serviceDefinition.exit();
16
+ });
17
+
18
+ await serviceDefinition.dev();
19
+
20
+ serviceDefinition.forEachDependency(async (dependency) => {
21
+ dependency.getStdOut()?.pipe(process.stdout)
22
+ })
23
+ };
@@ -0,0 +1,7 @@
1
+ import { Command } from "commander";
2
+ import { devCommand } from "./command";
3
+
4
+ export const createCommand = () =>
5
+ new Command("dev")
6
+ .argument("[string]", "path to service definition")
7
+ .action(devCommand);
@@ -0,0 +1,43 @@
1
+ import { getSawsConfig } from "@saws/core";
2
+ import { BUILD_DIR } from "@saws/utils/constants";
3
+ import { getStageOutputs } from "@saws/utils/stage-outputs";
4
+ import { fork } from "child_process";
5
+ import esbuild from "esbuild";
6
+ import path from "path";
7
+
8
+ export const executeCommand = async (
9
+ scriptPath: string,
10
+ sawsPath: string,
11
+ { stage = "local" }: { stage: string }
12
+ ) => {
13
+ process.env.STAGE = stage;
14
+
15
+ const serviceDefinition = await getSawsConfig(sawsPath);
16
+
17
+ const stageOutputs = await getStageOutputs(stage);
18
+ const services = serviceDefinition.getAllDependencies()
19
+ let environment: Record<string, string> = {
20
+ NODE_ENV: stage === "local" ? "development" : "production",
21
+ STAGE: stage,
22
+ }
23
+ for (const service of services) {
24
+ await service.setOutputs(stageOutputs[service.name], stage)
25
+ environment = {
26
+ ...environment,
27
+ ...await(service.getEnvironmentVariables(stage))
28
+ }
29
+ }
30
+
31
+ const outFile = path.join(BUILD_DIR, "script.js");
32
+
33
+ await esbuild.build({
34
+ entryPoints: [scriptPath],
35
+ bundle: true,
36
+ outfile: outFile,
37
+ platform: "node",
38
+ });
39
+
40
+ fork(outFile, {
41
+ env: environment,
42
+ })
43
+ };
@@ -0,0 +1,9 @@
1
+ import { Command } from "commander";
2
+ import { executeCommand } from "./command";
3
+
4
+ export const createCommand = () =>
5
+ new Command("execute")
6
+ .option("--stage <string>", "Stage")
7
+ .argument("<string>", "The path to the script to execute")
8
+ .argument("[string]", "The path to the saws file")
9
+ .action(executeCommand);
@@ -0,0 +1,18 @@
1
+ import path from 'node:path'
2
+ import { installMissingDependencies } from '@saws/utils/dependency-management'
3
+ import { tsconfigJsonTemplate } from './templates/tsconfig-json.template'
4
+ import { sawsJsTemplate } from './templates/saws-js.template'
5
+ import { createFileIfNotExists } from '@saws/utils/create-file-if-not-exists'
6
+ import { gitignoreTemplate } from './templates/gitignore.template'
7
+
8
+ export const initCommand = async () => {
9
+ const name = path.parse(path.resolve('.')).name
10
+
11
+ // not used for now
12
+ await installMissingDependencies([])
13
+ await installMissingDependencies(['@saws/core', 'typescript'], { development: true })
14
+
15
+ createFileIfNotExists('./tsconfig.json', tsconfigJsonTemplate())
16
+ createFileIfNotExists('./saws.js', sawsJsTemplate({ name }))
17
+ createFileIfNotExists('./.gitignore', gitignoreTemplate())
18
+ }
@@ -0,0 +1,6 @@
1
+ import { Command } from "commander";
2
+ import { initCommand } from "./command";
3
+
4
+ export const createCommand = () =>
5
+ new Command("init")
6
+ .action(initCommand);
@@ -0,0 +1,8 @@
1
+ export const gitignoreTemplate = () => `node_modules
2
+ .saws/postgres
3
+ .saws/cognito
4
+ .saws/saws-*-local-output.json
5
+ .saws/cache
6
+ .saws/build
7
+ .saws/.secrets
8
+ .DS_Store`
@@ -0,0 +1,7 @@
1
+ export const sawsJsTemplate = ({ name }: { name: string}) => `const { ServiceDefinition } = require('@saws/core')
2
+
3
+ module.exports = new ServiceDefinition({
4
+ name: '${name}',
5
+ dependencies: []
6
+ })
7
+ `
@@ -0,0 +1,20 @@
1
+ export const tsconfigJsonTemplate = () => `{
2
+ "include": ["**/*.ts", "*.ts", "**/*.tsx", "global.d.ts"],
3
+ "exclude": [".saws", "node_modules"],
4
+ "compilerOptions": {
5
+ "lib": ["DOM", "DOM.Iterable", "ES2022"],
6
+ "isolatedModules": true,
7
+ "esModuleInterop": true,
8
+ "jsx": "react-jsx",
9
+ "target": "ES2022",
10
+ "module": "Node16",
11
+ "resolveJsonModule": true,
12
+ "strict": true,
13
+ "allowJs": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "noEmit": true,
16
+ "skipLibCheck": true
17
+ }
18
+ }
19
+
20
+ `
package/tsconfig.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "include": ["bin/**/*", "src/**/*"],
4
+ "exclude": ["dist", "node_modules"],
5
+ "compilerOptions": {
6
+ "rootDir": ".",
7
+ "outDir": "./dist"
8
+ },
9
+ "references": [
10
+ { "path": "../secrets" },
11
+ { "path": "../utils" },
12
+ { "path": "../core" }
13
+ ]
14
+ }