create-webiny-project 6.3.0 → 6.4.0-beta.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 (50) hide show
  1. package/_templates/base/template.package.json +1 -1
  2. package/bin.js +74 -83
  3. package/bin.js.map +1 -1
  4. package/features/CreateWebinyProject/projects/aws/SetupAwsWebinyProject.js +28 -37
  5. package/features/CreateWebinyProject/projects/aws/SetupAwsWebinyProject.js.map +1 -1
  6. package/features/CreateWebinyProject/projects/aws/availableAwsRegions.js +75 -58
  7. package/features/CreateWebinyProject/projects/aws/availableAwsRegions.js.map +1 -1
  8. package/features/CreateWebinyProject/projects/aws/runInteractivePrompt.js +46 -39
  9. package/features/CreateWebinyProject/projects/aws/runInteractivePrompt.js.map +1 -1
  10. package/features/CreateWebinyProject/projects/aws/types.js +0 -3
  11. package/features/CreateWebinyProject/projects/base/SetupBaseWebinyProject.js +27 -24
  12. package/features/CreateWebinyProject/projects/base/SetupBaseWebinyProject.js.map +1 -1
  13. package/features/CreateWebinyProject.js +160 -187
  14. package/features/CreateWebinyProject.js.map +1 -1
  15. package/package.json +9 -9
  16. package/services/Analytics.js +12 -11
  17. package/services/Analytics.js.map +1 -1
  18. package/services/EnsureNoGlobalWebinyCli.js +24 -12
  19. package/services/EnsureNoGlobalWebinyCli.js.map +1 -1
  20. package/services/EnsureNoTargetFolder.js +15 -19
  21. package/services/EnsureNoTargetFolder.js.map +1 -1
  22. package/services/EnsureNoYarnLockPackageJson.js +19 -13
  23. package/services/EnsureNoYarnLockPackageJson.js.map +1 -1
  24. package/services/EnsureSystemWebinyConfig.js +13 -16
  25. package/services/EnsureSystemWebinyConfig.js.map +1 -1
  26. package/services/EnsureValidProjectName.js +17 -16
  27. package/services/EnsureValidProjectName.js.map +1 -1
  28. package/services/GetCwpVersion.js +10 -13
  29. package/services/GetCwpVersion.js.map +1 -1
  30. package/services/GetProjectRootPath.js +5 -4
  31. package/services/GetProjectRootPath.js.map +1 -1
  32. package/services/GetTemplatesFolderPath.js +9 -11
  33. package/services/GetTemplatesFolderPath.js.map +1 -1
  34. package/services/InitGit.js +16 -11
  35. package/services/InitGit.js.map +1 -1
  36. package/services/IsGitAvailable.js +11 -8
  37. package/services/IsGitAvailable.js.map +1 -1
  38. package/services/PrintErrorInfo.js +13 -11
  39. package/services/PrintErrorInfo.js.map +1 -1
  40. package/services/PrintSystemInfo.js +40 -30
  41. package/services/PrintSystemInfo.js.map +1 -1
  42. package/services/SetWebinyPackageVersions.js +14 -21
  43. package/services/SetWebinyPackageVersions.js.map +1 -1
  44. package/services/SetupYarn.js +35 -53
  45. package/services/SetupYarn.js.map +1 -1
  46. package/services/index.js +0 -2
  47. package/types.js +0 -3
  48. package/features/CreateWebinyProject/projects/aws/types.js.map +0 -1
  49. package/services/index.js.map +0 -1
  50. package/types.js.map +0 -1
@@ -9,7 +9,7 @@
9
9
  "webiny": "latest"
10
10
  },
11
11
  "devDependencies": {
12
- "@types/node": "^24.12.2",
12
+ "@types/node": "^24.12.4",
13
13
  "@types/react": "18.3.28",
14
14
  "@types/react-dom": "18.3.7",
15
15
  "typescript": "6.0.3"
package/bin.js CHANGED
@@ -1,95 +1,86 @@
1
1
  #!/usr/bin/env node
2
-
3
- // Ensure system requirements are met.
4
2
  import { ensureSystemRequirements } from "@webiny/system-requirements";
3
+ import { EnsureSystemWebinyConfig, GetCwpVersion } from "./services/index.js";
4
+ import yargs_0 from "yargs";
5
+ import { hideBin } from "yargs/helpers";
6
+ import { CreateWebinyProject } from "./features/CreateWebinyProject.js";
5
7
  ensureSystemRequirements();
6
-
7
- // Verify `.webiny` config file and continue.
8
- import { EnsureSystemWebinyConfig } from "./services/index.js";
9
8
  const ensureSystemWebinyConfig = new EnsureSystemWebinyConfig();
10
9
  ensureSystemWebinyConfig.execute();
11
- import yargs from "yargs";
12
- import { hideBin } from "yargs/helpers";
13
- import { GetCwpVersion } from "./services/index.js";
14
- import { CreateWebinyProject } from "./features/CreateWebinyProject.js";
15
- process.on("unhandledRejection", err => {
16
- throw err;
10
+ process.on("unhandledRejection", (err)=>{
11
+ throw err;
17
12
  });
18
13
  const getCwpVersion = new GetCwpVersion();
19
14
  const version = getCwpVersion.execute();
20
- const argv = yargs(hideBin(process.argv)).usage("Usage: create-webiny-project <project-name> [options]").version(version).demandCommand(1).help().alias("help", "h").scriptName("create-webiny-project").fail(function (msg, err) {
21
- if (msg) {
22
- console.log(msg);
23
- }
24
- if (err) {
25
- console.log(err);
26
- }
27
- process.exit(1);
15
+ const argv = yargs_0(hideBin(process.argv)).usage("Usage: create-webiny-project <project-name> [options]").version(version).demandCommand(1).help().alias("help", "h").scriptName("create-webiny-project").fail(function(msg, err) {
16
+ if (msg) console.log(msg);
17
+ if (err) console.log(err);
18
+ process.exit(1);
28
19
  });
29
- argv.command("$0 <project-name> [options]", "Name of application and template to use", yargs => {
30
- yargs.positional("project-name", {
31
- describe: "Project name"
32
- });
33
- yargs.option("force", {
34
- describe: "All project creation within an existing folder",
35
- default: false,
36
- type: "boolean",
37
- demandOption: false
38
- });
39
- yargs.option("template", {
40
- describe: `Name of template to use, if no template is provided it will default to "aws" template`,
41
- alias: "t",
42
- type: "string",
43
- default: "aws",
44
- demandOption: false
45
- });
46
- yargs.option("template-options", {
47
- describe: `A JSON containing template-specific options (usually used in non-interactive environments)`,
48
- default: null,
49
- type: "string",
50
- demandOption: false
51
- });
52
- yargs.option("assign-to-yarnrc", {
53
- describe: `A JSON containing additional options that will be assigned into the "yarnrc.yml" configuration file`,
54
- default: null,
55
- type: "string",
56
- demandOption: false
57
- });
58
- yargs.option("tag", {
59
- describe: "NPM tag to use for @webiny packages",
60
- type: "string",
61
- default: "latest",
62
- demandOption: false
63
- });
64
- yargs.option("interactive", {
65
- describe: "Enable interactive mode for all commands",
66
- default: true,
67
- type: "boolean",
68
- demandOption: false
69
- });
70
- yargs.option("log", {
71
- describe: "Creates a log file to see output of installation. Defaults to create-webiny-project-logs.txt in current directory",
72
- alias: "l",
73
- default: "create-webiny-project-logs.txt",
74
- type: "string",
75
- demandOption: false
76
- });
77
- yargs.option("debug", {
78
- describe: "Turn on debug logs",
79
- default: false,
80
- type: "boolean",
81
- demandOption: false
82
- });
83
- yargs.option("cleanup", {
84
- describe: "If an error occurs upon project creation, deletes all generated files",
85
- alias: "c",
86
- default: true,
87
- type: "boolean",
88
- demandOption: false
89
- });
90
- }, cliArgs => {
91
- const createWebinyProject = new CreateWebinyProject();
92
- return createWebinyProject.execute(cliArgs);
20
+ argv.command("$0 <project-name> [options]", "Name of application and template to use", (yargs)=>{
21
+ yargs.positional("project-name", {
22
+ describe: "Project name"
23
+ });
24
+ yargs.option("force", {
25
+ describe: "All project creation within an existing folder",
26
+ default: false,
27
+ type: "boolean",
28
+ demandOption: false
29
+ });
30
+ yargs.option("template", {
31
+ describe: 'Name of template to use, if no template is provided it will default to "aws" template',
32
+ alias: "t",
33
+ type: "string",
34
+ default: "aws",
35
+ demandOption: false
36
+ });
37
+ yargs.option("template-options", {
38
+ describe: "A JSON containing template-specific options (usually used in non-interactive environments)",
39
+ default: null,
40
+ type: "string",
41
+ demandOption: false
42
+ });
43
+ yargs.option("assign-to-yarnrc", {
44
+ describe: 'A JSON containing additional options that will be assigned into the "yarnrc.yml" configuration file',
45
+ default: null,
46
+ type: "string",
47
+ demandOption: false
48
+ });
49
+ yargs.option("tag", {
50
+ describe: "NPM tag to use for @webiny packages",
51
+ type: "string",
52
+ default: "latest",
53
+ demandOption: false
54
+ });
55
+ yargs.option("interactive", {
56
+ describe: "Enable interactive mode for all commands",
57
+ default: true,
58
+ type: "boolean",
59
+ demandOption: false
60
+ });
61
+ yargs.option("log", {
62
+ describe: "Creates a log file to see output of installation. Defaults to create-webiny-project-logs.txt in current directory",
63
+ alias: "l",
64
+ default: "create-webiny-project-logs.txt",
65
+ type: "string",
66
+ demandOption: false
67
+ });
68
+ yargs.option("debug", {
69
+ describe: "Turn on debug logs",
70
+ default: false,
71
+ type: "boolean",
72
+ demandOption: false
73
+ });
74
+ yargs.option("cleanup", {
75
+ describe: "If an error occurs upon project creation, deletes all generated files",
76
+ alias: "c",
77
+ default: true,
78
+ type: "boolean",
79
+ demandOption: false
80
+ });
81
+ }, (cliArgs)=>{
82
+ const createWebinyProject = new CreateWebinyProject();
83
+ return createWebinyProject.execute(cliArgs);
93
84
  }).argv;
94
85
 
95
86
  //# sourceMappingURL=bin.js.map
package/bin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["ensureSystemRequirements","EnsureSystemWebinyConfig","ensureSystemWebinyConfig","execute","yargs","hideBin","GetCwpVersion","CreateWebinyProject","process","on","err","getCwpVersion","version","argv","usage","demandCommand","help","alias","scriptName","fail","msg","console","log","exit","command","positional","describe","option","default","type","demandOption","cliArgs","createWebinyProject"],"sources":["bin.ts"],"sourcesContent":["#!/usr/bin/env node\n\n// Ensure system requirements are met.\nimport { ensureSystemRequirements } from \"@webiny/system-requirements\";\nensureSystemRequirements();\n\n// Verify `.webiny` config file and continue.\nimport { EnsureSystemWebinyConfig } from \"./services/index.js\";\n\nconst ensureSystemWebinyConfig = new EnsureSystemWebinyConfig();\nensureSystemWebinyConfig.execute();\n\nimport yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\n\nimport { GetCwpVersion } from \"./services/index.js\";\nimport { CreateWebinyProject } from \"./features/CreateWebinyProject.js\";\nimport { type CliParams } from \"./types.js\";\n\nprocess.on(\"unhandledRejection\", err => {\n throw err;\n});\n\nconst getCwpVersion = new GetCwpVersion();\nconst version = getCwpVersion.execute();\n\nconst argv = yargs(hideBin(process.argv))\n .usage(\"Usage: create-webiny-project <project-name> [options]\")\n .version(version)\n .demandCommand(1)\n .help()\n .alias(\"help\", \"h\")\n .scriptName(\"create-webiny-project\")\n .fail(function (msg, err) {\n if (msg) {\n console.log(msg);\n }\n if (err) {\n console.log(err);\n }\n process.exit(1);\n });\n\nargv.command<CliParams>(\n \"$0 <project-name> [options]\",\n \"Name of application and template to use\",\n yargs => {\n yargs.positional(\"project-name\", {\n describe: \"Project name\"\n });\n yargs.option(\"force\", {\n describe: \"All project creation within an existing folder\",\n default: false,\n type: \"boolean\",\n demandOption: false\n });\n yargs.option(\"template\", {\n describe: `Name of template to use, if no template is provided it will default to \"aws\" template`,\n alias: \"t\",\n type: \"string\",\n default: \"aws\",\n demandOption: false\n });\n yargs.option(\"template-options\", {\n describe: `A JSON containing template-specific options (usually used in non-interactive environments)`,\n default: null,\n type: \"string\",\n demandOption: false\n });\n yargs.option(\"assign-to-yarnrc\", {\n describe: `A JSON containing additional options that will be assigned into the \"yarnrc.yml\" configuration file`,\n default: null,\n type: \"string\",\n demandOption: false\n });\n yargs.option(\"tag\", {\n describe: \"NPM tag to use for @webiny packages\",\n type: \"string\",\n default: \"latest\",\n demandOption: false\n });\n yargs.option(\"interactive\", {\n describe: \"Enable interactive mode for all commands\",\n default: true,\n type: \"boolean\",\n demandOption: false\n });\n yargs.option(\"log\", {\n describe:\n \"Creates a log file to see output of installation. Defaults to create-webiny-project-logs.txt in current directory\",\n alias: \"l\",\n default: \"create-webiny-project-logs.txt\",\n type: \"string\",\n demandOption: false\n });\n yargs.option(\"debug\", {\n describe: \"Turn on debug logs\",\n default: false,\n type: \"boolean\",\n demandOption: false\n });\n yargs.option(\"cleanup\", {\n describe: \"If an error occurs upon project creation, deletes all generated files\",\n alias: \"c\",\n default: true,\n type: \"boolean\",\n demandOption: false\n });\n },\n cliArgs => {\n const createWebinyProject = new CreateWebinyProject();\n return createWebinyProject.execute(cliArgs);\n }\n).argv;\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"file":"bin.js","sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\n\n// Ensure system requirements are met.\nimport { ensureSystemRequirements } from \"@webiny/system-requirements\";\nensureSystemRequirements();\n\n// Verify `.webiny` config file and continue.\nimport { EnsureSystemWebinyConfig } from \"./services/index.js\";\n\nconst ensureSystemWebinyConfig = new EnsureSystemWebinyConfig();\nensureSystemWebinyConfig.execute();\n\nimport yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\n\nimport { GetCwpVersion } from \"./services/index.js\";\nimport { CreateWebinyProject } from \"./features/CreateWebinyProject.js\";\nimport { type CliParams } from \"./types.js\";\n\nprocess.on(\"unhandledRejection\", err => {\n throw err;\n});\n\nconst getCwpVersion = new GetCwpVersion();\nconst version = getCwpVersion.execute();\n\nconst argv = yargs(hideBin(process.argv))\n .usage(\"Usage: create-webiny-project <project-name> [options]\")\n .version(version)\n .demandCommand(1)\n .help()\n .alias(\"help\", \"h\")\n .scriptName(\"create-webiny-project\")\n .fail(function (msg, err) {\n if (msg) {\n console.log(msg);\n }\n if (err) {\n console.log(err);\n }\n process.exit(1);\n });\n\nargv.command<CliParams>(\n \"$0 <project-name> [options]\",\n \"Name of application and template to use\",\n yargs => {\n yargs.positional(\"project-name\", {\n describe: \"Project name\"\n });\n yargs.option(\"force\", {\n describe: \"All project creation within an existing folder\",\n default: false,\n type: \"boolean\",\n demandOption: false\n });\n yargs.option(\"template\", {\n describe: `Name of template to use, if no template is provided it will default to \"aws\" template`,\n alias: \"t\",\n type: \"string\",\n default: \"aws\",\n demandOption: false\n });\n yargs.option(\"template-options\", {\n describe: `A JSON containing template-specific options (usually used in non-interactive environments)`,\n default: null,\n type: \"string\",\n demandOption: false\n });\n yargs.option(\"assign-to-yarnrc\", {\n describe: `A JSON containing additional options that will be assigned into the \"yarnrc.yml\" configuration file`,\n default: null,\n type: \"string\",\n demandOption: false\n });\n yargs.option(\"tag\", {\n describe: \"NPM tag to use for @webiny packages\",\n type: \"string\",\n default: \"latest\",\n demandOption: false\n });\n yargs.option(\"interactive\", {\n describe: \"Enable interactive mode for all commands\",\n default: true,\n type: \"boolean\",\n demandOption: false\n });\n yargs.option(\"log\", {\n describe:\n \"Creates a log file to see output of installation. Defaults to create-webiny-project-logs.txt in current directory\",\n alias: \"l\",\n default: \"create-webiny-project-logs.txt\",\n type: \"string\",\n demandOption: false\n });\n yargs.option(\"debug\", {\n describe: \"Turn on debug logs\",\n default: false,\n type: \"boolean\",\n demandOption: false\n });\n yargs.option(\"cleanup\", {\n describe: \"If an error occurs upon project creation, deletes all generated files\",\n alias: \"c\",\n default: true,\n type: \"boolean\",\n demandOption: false\n });\n },\n cliArgs => {\n const createWebinyProject = new CreateWebinyProject();\n return createWebinyProject.execute(cliArgs);\n }\n).argv;\n"],"names":["ensureSystemRequirements","ensureSystemWebinyConfig","EnsureSystemWebinyConfig","process","err","getCwpVersion","GetCwpVersion","version","argv","yargs","hideBin","msg","console","cliArgs","createWebinyProject","CreateWebinyProject"],"mappings":";;;;;;AAIAA;AAKA,MAAMC,2BAA2B,IAAIC;AACrCD,yBAAyB,OAAO;AAShCE,QAAQ,EAAE,CAAC,sBAAsBC,CAAAA;IAC7B,MAAMA;AACV;AAEA,MAAMC,gBAAgB,IAAIC;AAC1B,MAAMC,UAAUF,cAAc,OAAO;AAErC,MAAMG,OAAOC,QAAMC,QAAQP,QAAQ,IAAI,GAClC,KAAK,CAAC,yDACN,OAAO,CAACI,SACR,aAAa,CAAC,GACd,IAAI,GACJ,KAAK,CAAC,QAAQ,KACd,UAAU,CAAC,yBACX,IAAI,CAAC,SAAUI,GAAG,EAAEP,GAAG;IACpB,IAAIO,KACAC,QAAQ,GAAG,CAACD;IAEhB,IAAIP,KACAQ,QAAQ,GAAG,CAACR;IAEhBD,QAAQ,IAAI,CAAC;AACjB;AAEJK,KAAK,OAAO,CACR,+BACA,2CACAC,CAAAA;IACIA,MAAM,UAAU,CAAC,gBAAgB;QAC7B,UAAU;IACd;IACAA,MAAM,MAAM,CAAC,SAAS;QAClB,UAAU;QACV,SAAS;QACT,MAAM;QACN,cAAc;IAClB;IACAA,MAAM,MAAM,CAAC,YAAY;QACrB,UAAU;QACV,OAAO;QACP,MAAM;QACN,SAAS;QACT,cAAc;IAClB;IACAA,MAAM,MAAM,CAAC,oBAAoB;QAC7B,UAAU;QACV,SAAS;QACT,MAAM;QACN,cAAc;IAClB;IACAA,MAAM,MAAM,CAAC,oBAAoB;QAC7B,UAAU;QACV,SAAS;QACT,MAAM;QACN,cAAc;IAClB;IACAA,MAAM,MAAM,CAAC,OAAO;QAChB,UAAU;QACV,MAAM;QACN,SAAS;QACT,cAAc;IAClB;IACAA,MAAM,MAAM,CAAC,eAAe;QACxB,UAAU;QACV,SAAS;QACT,MAAM;QACN,cAAc;IAClB;IACAA,MAAM,MAAM,CAAC,OAAO;QAChB,UACI;QACJ,OAAO;QACP,SAAS;QACT,MAAM;QACN,cAAc;IAClB;IACAA,MAAM,MAAM,CAAC,SAAS;QAClB,UAAU;QACV,SAAS;QACT,MAAM;QACN,cAAc;IAClB;IACAA,MAAM,MAAM,CAAC,WAAW;QACpB,UAAU;QACV,OAAO;QACP,SAAS;QACT,MAAM;QACN,cAAc;IAClB;AACJ,GACAI,CAAAA;IACI,MAAMC,sBAAsB,IAAIC;IAChC,OAAOD,oBAAoB,OAAO,CAACD;AACvC,GACF,IAAI"}
@@ -1,46 +1,37 @@
1
- import fs from "fs-extra";
1
+ import fs_extra from "fs-extra";
2
2
  import path from "path";
3
3
  import { runInteractivePrompt } from "./runInteractivePrompt.js";
4
4
  import { GetProjectRootPath } from "../../../../services/index.js";
5
5
  import { GetTemplatesFolderPath } from "../../../../services/GetTemplatesFolderPath.js";
6
- export class SetupAwsWebinyProject {
7
- async execute(cliArgs) {
8
- const awsArgs = await this.getAwsArgs(cliArgs);
9
- const getTemplatesFolderPath = new GetTemplatesFolderPath();
10
- const templatesFolderPath = getTemplatesFolderPath.execute();
11
- const storageTemplatePath = path.join(templatesFolderPath, "aws", awsArgs.storageOps);
12
- const getProjectRoot = new GetProjectRootPath();
13
- const projectRootFolderPath = getProjectRoot.execute(cliArgs);
14
- fs.copySync(storageTemplatePath, projectRootFolderPath);
15
-
16
- // Update .env file.
17
- const webinyConfigTsxEnvFilePath = path.join(projectRootFolderPath, "webiny.config.tsx");
18
- let content = fs.readFileSync(webinyConfigTsxEnvFilePath).toString();
19
- content = content.replace("{REGION}", awsArgs.region);
20
- fs.writeFileSync(webinyConfigTsxEnvFilePath, content);
21
- return awsArgs;
22
- }
23
- async getAwsArgs(cliArgs) {
24
- const awsArgs = {
25
- region: "us-east-1",
26
- storageOps: "ddb",
27
- aiAgent: "other"
28
- };
29
- const {
30
- templateOptions: templateOptionsString
31
- } = cliArgs;
32
- if (templateOptionsString) {
33
- try {
34
- Object.assign(awsArgs, JSON.parse(templateOptionsString));
35
- } catch {
36
- // Do nothing.
37
- }
6
+ class SetupAwsWebinyProject {
7
+ async execute(cliArgs) {
8
+ const awsArgs = await this.getAwsArgs(cliArgs);
9
+ const getTemplatesFolderPath = new GetTemplatesFolderPath();
10
+ const templatesFolderPath = getTemplatesFolderPath.execute();
11
+ const storageTemplatePath = path.join(templatesFolderPath, "aws", awsArgs.storageOps);
12
+ const getProjectRoot = new GetProjectRootPath();
13
+ const projectRootFolderPath = getProjectRoot.execute(cliArgs);
14
+ fs_extra.copySync(storageTemplatePath, projectRootFolderPath);
15
+ const webinyConfigTsxEnvFilePath = path.join(projectRootFolderPath, "webiny.config.tsx");
16
+ let content = fs_extra.readFileSync(webinyConfigTsxEnvFilePath).toString();
17
+ content = content.replace("{REGION}", awsArgs.region);
18
+ fs_extra.writeFileSync(webinyConfigTsxEnvFilePath, content);
19
+ return awsArgs;
38
20
  }
39
- if (cliArgs.interactive !== false) {
40
- Object.assign(awsArgs, await runInteractivePrompt());
21
+ async getAwsArgs(cliArgs) {
22
+ const awsArgs = {
23
+ region: "us-east-1",
24
+ storageOps: "ddb",
25
+ aiAgent: "other"
26
+ };
27
+ const { templateOptions: templateOptionsString } = cliArgs;
28
+ if (templateOptionsString) try {
29
+ Object.assign(awsArgs, JSON.parse(templateOptionsString));
30
+ } catch {}
31
+ if (false !== cliArgs.interactive) Object.assign(awsArgs, await runInteractivePrompt());
32
+ return awsArgs;
41
33
  }
42
- return awsArgs;
43
- }
44
34
  }
35
+ export { SetupAwsWebinyProject };
45
36
 
46
37
  //# sourceMappingURL=SetupAwsWebinyProject.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["fs","path","runInteractivePrompt","GetProjectRootPath","GetTemplatesFolderPath","SetupAwsWebinyProject","execute","cliArgs","awsArgs","getAwsArgs","getTemplatesFolderPath","templatesFolderPath","storageTemplatePath","join","storageOps","getProjectRoot","projectRootFolderPath","copySync","webinyConfigTsxEnvFilePath","content","readFileSync","toString","replace","region","writeFileSync","aiAgent","templateOptions","templateOptionsString","Object","assign","JSON","parse","interactive"],"sources":["SetupAwsWebinyProject.ts"],"sourcesContent":["import fs from \"fs-extra\";\nimport path from \"path\";\nimport { runInteractivePrompt } from \"./runInteractivePrompt.js\";\nimport { CliParams } from \"../../../../types.js\";\nimport { GetProjectRootPath } from \"../../../../services/index.js\";\nimport { AwsProjectParams } from \"./types.js\";\nimport { GetTemplatesFolderPath } from \"../../../../services/GetTemplatesFolderPath.js\";\n\nexport class SetupAwsWebinyProject {\n async execute(cliArgs: CliParams): Promise<AwsProjectParams> {\n const awsArgs = await this.getAwsArgs(cliArgs);\n\n const getTemplatesFolderPath = new GetTemplatesFolderPath();\n const templatesFolderPath = getTemplatesFolderPath.execute();\n\n const storageTemplatePath = path.join(templatesFolderPath, \"aws\", awsArgs.storageOps);\n\n const getProjectRoot = new GetProjectRootPath();\n const projectRootFolderPath = getProjectRoot.execute(cliArgs);\n\n fs.copySync(storageTemplatePath, projectRootFolderPath);\n\n // Update .env file.\n const webinyConfigTsxEnvFilePath = path.join(projectRootFolderPath, \"webiny.config.tsx\");\n let content = fs.readFileSync(webinyConfigTsxEnvFilePath).toString();\n content = content.replace(\"{REGION}\", awsArgs.region);\n fs.writeFileSync(webinyConfigTsxEnvFilePath, content);\n\n return awsArgs;\n }\n\n private async getAwsArgs(cliArgs: CliParams) {\n const awsArgs: AwsProjectParams = {\n region: \"us-east-1\",\n storageOps: \"ddb\",\n aiAgent: \"other\"\n };\n\n const { templateOptions: templateOptionsString } = cliArgs;\n if (templateOptionsString) {\n try {\n Object.assign(awsArgs, JSON.parse(templateOptionsString));\n } catch {\n // Do nothing.\n }\n }\n\n if (cliArgs.interactive !== false) {\n Object.assign(awsArgs, await runInteractivePrompt());\n }\n\n return awsArgs;\n }\n}\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,UAAU;AACzB,OAAOC,IAAI,MAAM,MAAM;AACvB,SAASC,oBAAoB;AAE7B,SAASC,kBAAkB;AAE3B,SAASC,sBAAsB;AAE/B,OAAO,MAAMC,qBAAqB,CAAC;EAC/B,MAAMC,OAAOA,CAACC,OAAkB,EAA6B;IACzD,MAAMC,OAAO,GAAG,MAAM,IAAI,CAACC,UAAU,CAACF,OAAO,CAAC;IAE9C,MAAMG,sBAAsB,GAAG,IAAIN,sBAAsB,CAAC,CAAC;IAC3D,MAAMO,mBAAmB,GAAGD,sBAAsB,CAACJ,OAAO,CAAC,CAAC;IAE5D,MAAMM,mBAAmB,GAAGX,IAAI,CAACY,IAAI,CAACF,mBAAmB,EAAE,KAAK,EAAEH,OAAO,CAACM,UAAU,CAAC;IAErF,MAAMC,cAAc,GAAG,IAAIZ,kBAAkB,CAAC,CAAC;IAC/C,MAAMa,qBAAqB,GAAGD,cAAc,CAACT,OAAO,CAACC,OAAO,CAAC;IAE7DP,EAAE,CAACiB,QAAQ,CAACL,mBAAmB,EAAEI,qBAAqB,CAAC;;IAEvD;IACA,MAAME,0BAA0B,GAAGjB,IAAI,CAACY,IAAI,CAACG,qBAAqB,EAAE,mBAAmB,CAAC;IACxF,IAAIG,OAAO,GAAGnB,EAAE,CAACoB,YAAY,CAACF,0BAA0B,CAAC,CAACG,QAAQ,CAAC,CAAC;IACpEF,OAAO,GAAGA,OAAO,CAACG,OAAO,CAAC,UAAU,EAAEd,OAAO,CAACe,MAAM,CAAC;IACrDvB,EAAE,CAACwB,aAAa,CAACN,0BAA0B,EAAEC,OAAO,CAAC;IAErD,OAAOX,OAAO;EAClB;EAEA,MAAcC,UAAUA,CAACF,OAAkB,EAAE;IACzC,MAAMC,OAAyB,GAAG;MAC9Be,MAAM,EAAE,WAAW;MACnBT,UAAU,EAAE,KAAK;MACjBW,OAAO,EAAE;IACb,CAAC;IAED,MAAM;MAAEC,eAAe,EAAEC;IAAsB,CAAC,GAAGpB,OAAO;IAC1D,IAAIoB,qBAAqB,EAAE;MACvB,IAAI;QACAC,MAAM,CAACC,MAAM,CAACrB,OAAO,EAAEsB,IAAI,CAACC,KAAK,CAACJ,qBAAqB,CAAC,CAAC;MAC7D,CAAC,CAAC,MAAM;QACJ;MAAA;IAER;IAEA,IAAIpB,OAAO,CAACyB,WAAW,KAAK,KAAK,EAAE;MAC/BJ,MAAM,CAACC,MAAM,CAACrB,OAAO,EAAE,MAAMN,oBAAoB,CAAC,CAAC,CAAC;IACxD;IAEA,OAAOM,OAAO;EAClB;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"features/CreateWebinyProject/projects/aws/SetupAwsWebinyProject.js","sources":["../../../../../src/features/CreateWebinyProject/projects/aws/SetupAwsWebinyProject.ts"],"sourcesContent":["import fs from \"fs-extra\";\nimport path from \"path\";\nimport { runInteractivePrompt } from \"./runInteractivePrompt.js\";\nimport { CliParams } from \"../../../../types.js\";\nimport { GetProjectRootPath } from \"../../../../services/index.js\";\nimport { AwsProjectParams } from \"./types.js\";\nimport { GetTemplatesFolderPath } from \"../../../../services/GetTemplatesFolderPath.js\";\n\nexport class SetupAwsWebinyProject {\n async execute(cliArgs: CliParams): Promise<AwsProjectParams> {\n const awsArgs = await this.getAwsArgs(cliArgs);\n\n const getTemplatesFolderPath = new GetTemplatesFolderPath();\n const templatesFolderPath = getTemplatesFolderPath.execute();\n\n const storageTemplatePath = path.join(templatesFolderPath, \"aws\", awsArgs.storageOps);\n\n const getProjectRoot = new GetProjectRootPath();\n const projectRootFolderPath = getProjectRoot.execute(cliArgs);\n\n fs.copySync(storageTemplatePath, projectRootFolderPath);\n\n // Update .env file.\n const webinyConfigTsxEnvFilePath = path.join(projectRootFolderPath, \"webiny.config.tsx\");\n let content = fs.readFileSync(webinyConfigTsxEnvFilePath).toString();\n content = content.replace(\"{REGION}\", awsArgs.region);\n fs.writeFileSync(webinyConfigTsxEnvFilePath, content);\n\n return awsArgs;\n }\n\n private async getAwsArgs(cliArgs: CliParams) {\n const awsArgs: AwsProjectParams = {\n region: \"us-east-1\",\n storageOps: \"ddb\",\n aiAgent: \"other\"\n };\n\n const { templateOptions: templateOptionsString } = cliArgs;\n if (templateOptionsString) {\n try {\n Object.assign(awsArgs, JSON.parse(templateOptionsString));\n } catch {\n // Do nothing.\n }\n }\n\n if (cliArgs.interactive !== false) {\n Object.assign(awsArgs, await runInteractivePrompt());\n }\n\n return awsArgs;\n }\n}\n"],"names":["SetupAwsWebinyProject","cliArgs","awsArgs","getTemplatesFolderPath","GetTemplatesFolderPath","templatesFolderPath","storageTemplatePath","path","getProjectRoot","GetProjectRootPath","projectRootFolderPath","fs","webinyConfigTsxEnvFilePath","content","templateOptionsString","Object","JSON","runInteractivePrompt"],"mappings":";;;;;AAQO,MAAMA;IACT,MAAM,QAAQC,OAAkB,EAA6B;QACzD,MAAMC,UAAU,MAAM,IAAI,CAAC,UAAU,CAACD;QAEtC,MAAME,yBAAyB,IAAIC;QACnC,MAAMC,sBAAsBF,uBAAuB,OAAO;QAE1D,MAAMG,sBAAsBC,KAAK,IAAI,CAACF,qBAAqB,OAAOH,QAAQ,UAAU;QAEpF,MAAMM,iBAAiB,IAAIC;QAC3B,MAAMC,wBAAwBF,eAAe,OAAO,CAACP;QAErDU,SAAAA,QAAW,CAACL,qBAAqBI;QAGjC,MAAME,6BAA6BL,KAAK,IAAI,CAACG,uBAAuB;QACpE,IAAIG,UAAUF,SAAAA,YAAe,CAACC,4BAA4B,QAAQ;QAClEC,UAAUA,QAAQ,OAAO,CAAC,YAAYX,QAAQ,MAAM;QACpDS,SAAAA,aAAgB,CAACC,4BAA4BC;QAE7C,OAAOX;IACX;IAEA,MAAc,WAAWD,OAAkB,EAAE;QACzC,MAAMC,UAA4B;YAC9B,QAAQ;YACR,YAAY;YACZ,SAAS;QACb;QAEA,MAAM,EAAE,iBAAiBY,qBAAqB,EAAE,GAAGb;QACnD,IAAIa,uBACA,IAAI;YACAC,OAAO,MAAM,CAACb,SAASc,KAAK,KAAK,CAACF;QACtC,EAAE,OAAM,CAER;QAGJ,IAAIb,AAAwB,UAAxBA,QAAQ,WAAW,EACnBc,OAAO,MAAM,CAACb,SAAS,MAAMe;QAGjC,OAAOf;IACX;AACJ"}
@@ -1,60 +1,77 @@
1
- export const availableAwsRegions = [{
2
- value: "us-east-1",
3
- name: "us-east-1 (US East, N. Virginia)"
4
- }, {
5
- value: "us-east-2",
6
- name: "us-east-2 (US East, Ohio)"
7
- }, {
8
- value: "us-west-1",
9
- name: "us-west-1 (US West, N. California)"
10
- }, {
11
- value: "us-west-2",
12
- name: "us-west-2 (US West, Oregon)"
13
- }, {
14
- value: "ca-central-1",
15
- name: "ca-central-1 (Canada, Central)"
16
- }, {
17
- value: "eu-central-1",
18
- name: "eu-central-1 (EU, Frankfurt)"
19
- }, {
20
- value: "eu-west-1",
21
- name: "eu-west-1 (EU, Ireland)"
22
- }, {
23
- value: "eu-west-2",
24
- name: "eu-west-2 (EU, London)"
25
- }, /*{ value: "eu-south-1", name: "eu-south-1 (EU, Milan)" },*/
26
- {
27
- value: "eu-west-3",
28
- name: "eu-west-3 (EU, Paris)"
29
- }, {
30
- value: "eu-north-1",
31
- name: "eu-north-1 (EU, Stockholm)"
32
- }, {
33
- value: "af-south-1",
34
- name: "af-south-1 (Africa, Cape Town)"
35
- }, {
36
- value: "ap-east-1",
37
- name: "ap-east-1 (Asia Pacific, Hong Kong)"
38
- }, {
39
- value: "ap-south-1",
40
- name: "ap-south-1 (Asia Pacific, Mumbai)"
41
- }, {
42
- value: "ap-northeast-2",
43
- name: "ap-northeast-2 (Asia Pacific, Seoul)"
44
- }, {
45
- value: "ap-southeast-1",
46
- name: "ap-southeast-1 (Asia Pacific, Singapore)"
47
- }, {
48
- value: "ap-southeast-2",
49
- name: "ap-southeast-2 (Asia Pacific, Sydney)"
50
- }, {
51
- value: "ap-northeast-1",
52
- name: "ap-northeast-1 (Asia Pacific, Tokyo)"
53
- },
54
- // { value: "me-south-1", name: "me-south-1 (Middle East, Bahrain)" },
55
- {
56
- value: "sa-east-1",
57
- name: "sa-east-1 (South America, São Paulo)"
58
- }];
1
+ const availableAwsRegions = [
2
+ {
3
+ value: "us-east-1",
4
+ name: "us-east-1 (US East, N. Virginia)"
5
+ },
6
+ {
7
+ value: "us-east-2",
8
+ name: "us-east-2 (US East, Ohio)"
9
+ },
10
+ {
11
+ value: "us-west-1",
12
+ name: "us-west-1 (US West, N. California)"
13
+ },
14
+ {
15
+ value: "us-west-2",
16
+ name: "us-west-2 (US West, Oregon)"
17
+ },
18
+ {
19
+ value: "ca-central-1",
20
+ name: "ca-central-1 (Canada, Central)"
21
+ },
22
+ {
23
+ value: "eu-central-1",
24
+ name: "eu-central-1 (EU, Frankfurt)"
25
+ },
26
+ {
27
+ value: "eu-west-1",
28
+ name: "eu-west-1 (EU, Ireland)"
29
+ },
30
+ {
31
+ value: "eu-west-2",
32
+ name: "eu-west-2 (EU, London)"
33
+ },
34
+ {
35
+ value: "eu-west-3",
36
+ name: "eu-west-3 (EU, Paris)"
37
+ },
38
+ {
39
+ value: "eu-north-1",
40
+ name: "eu-north-1 (EU, Stockholm)"
41
+ },
42
+ {
43
+ value: "af-south-1",
44
+ name: "af-south-1 (Africa, Cape Town)"
45
+ },
46
+ {
47
+ value: "ap-east-1",
48
+ name: "ap-east-1 (Asia Pacific, Hong Kong)"
49
+ },
50
+ {
51
+ value: "ap-south-1",
52
+ name: "ap-south-1 (Asia Pacific, Mumbai)"
53
+ },
54
+ {
55
+ value: "ap-northeast-2",
56
+ name: "ap-northeast-2 (Asia Pacific, Seoul)"
57
+ },
58
+ {
59
+ value: "ap-southeast-1",
60
+ name: "ap-southeast-1 (Asia Pacific, Singapore)"
61
+ },
62
+ {
63
+ value: "ap-southeast-2",
64
+ name: "ap-southeast-2 (Asia Pacific, Sydney)"
65
+ },
66
+ {
67
+ value: "ap-northeast-1",
68
+ name: "ap-northeast-1 (Asia Pacific, Tokyo)"
69
+ },
70
+ {
71
+ value: "sa-east-1",
72
+ name: "sa-east-1 (South America, São Paulo)"
73
+ }
74
+ ];
75
+ export { availableAwsRegions };
59
76
 
60
77
  //# sourceMappingURL=availableAwsRegions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["availableAwsRegions","value","name"],"sources":["availableAwsRegions.ts"],"sourcesContent":["export const availableAwsRegions = [\n { value: \"us-east-1\", name: \"us-east-1 (US East, N. Virginia)\" },\n { value: \"us-east-2\", name: \"us-east-2 (US East, Ohio)\" },\n { value: \"us-west-1\", name: \"us-west-1 (US West, N. California)\" },\n { value: \"us-west-2\", name: \"us-west-2 (US West, Oregon)\" },\n { value: \"ca-central-1\", name: \"ca-central-1 (Canada, Central)\" },\n { value: \"eu-central-1\", name: \"eu-central-1 (EU, Frankfurt)\" },\n { value: \"eu-west-1\", name: \"eu-west-1 (EU, Ireland)\" },\n { value: \"eu-west-2\", name: \"eu-west-2 (EU, London)\" },\n /*{ value: \"eu-south-1\", name: \"eu-south-1 (EU, Milan)\" },*/\n { value: \"eu-west-3\", name: \"eu-west-3 (EU, Paris)\" },\n { value: \"eu-north-1\", name: \"eu-north-1 (EU, Stockholm)\" },\n { value: \"af-south-1\", name: \"af-south-1 (Africa, Cape Town)\" },\n { value: \"ap-east-1\", name: \"ap-east-1 (Asia Pacific, Hong Kong)\" },\n { value: \"ap-south-1\", name: \"ap-south-1 (Asia Pacific, Mumbai)\" },\n { value: \"ap-northeast-2\", name: \"ap-northeast-2 (Asia Pacific, Seoul)\" },\n { value: \"ap-southeast-1\", name: \"ap-southeast-1 (Asia Pacific, Singapore)\" },\n { value: \"ap-southeast-2\", name: \"ap-southeast-2 (Asia Pacific, Sydney)\" },\n { value: \"ap-northeast-1\", name: \"ap-northeast-1 (Asia Pacific, Tokyo)\" },\n // { value: \"me-south-1\", name: \"me-south-1 (Middle East, Bahrain)\" },\n { value: \"sa-east-1\", name: \"sa-east-1 (South America, São Paulo)\" }\n];\n"],"mappings":"AAAA,OAAO,MAAMA,mBAAmB,GAAG,CAC/B;EAAEC,KAAK,EAAE,WAAW;EAAEC,IAAI,EAAE;AAAmC,CAAC,EAChE;EAAED,KAAK,EAAE,WAAW;EAAEC,IAAI,EAAE;AAA4B,CAAC,EACzD;EAAED,KAAK,EAAE,WAAW;EAAEC,IAAI,EAAE;AAAqC,CAAC,EAClE;EAAED,KAAK,EAAE,WAAW;EAAEC,IAAI,EAAE;AAA8B,CAAC,EAC3D;EAAED,KAAK,EAAE,cAAc;EAAEC,IAAI,EAAE;AAAiC,CAAC,EACjE;EAAED,KAAK,EAAE,cAAc;EAAEC,IAAI,EAAE;AAA+B,CAAC,EAC/D;EAAED,KAAK,EAAE,WAAW;EAAEC,IAAI,EAAE;AAA0B,CAAC,EACvD;EAAED,KAAK,EAAE,WAAW;EAAEC,IAAI,EAAE;AAAyB,CAAC,EACtD;AACA;EAAED,KAAK,EAAE,WAAW;EAAEC,IAAI,EAAE;AAAwB,CAAC,EACrD;EAAED,KAAK,EAAE,YAAY;EAAEC,IAAI,EAAE;AAA6B,CAAC,EAC3D;EAAED,KAAK,EAAE,YAAY;EAAEC,IAAI,EAAE;AAAiC,CAAC,EAC/D;EAAED,KAAK,EAAE,WAAW;EAAEC,IAAI,EAAE;AAAsC,CAAC,EACnE;EAAED,KAAK,EAAE,YAAY;EAAEC,IAAI,EAAE;AAAoC,CAAC,EAClE;EAAED,KAAK,EAAE,gBAAgB;EAAEC,IAAI,EAAE;AAAuC,CAAC,EACzE;EAAED,KAAK,EAAE,gBAAgB;EAAEC,IAAI,EAAE;AAA2C,CAAC,EAC7E;EAAED,KAAK,EAAE,gBAAgB;EAAEC,IAAI,EAAE;AAAwC,CAAC,EAC1E;EAAED,KAAK,EAAE,gBAAgB;EAAEC,IAAI,EAAE;AAAuC,CAAC;AACzE;AACA;EAAED,KAAK,EAAE,WAAW;EAAEC,IAAI,EAAE;AAAuC,CAAC,CACvE","ignoreList":[]}
1
+ {"version":3,"file":"features/CreateWebinyProject/projects/aws/availableAwsRegions.js","sources":["../../../../../src/features/CreateWebinyProject/projects/aws/availableAwsRegions.ts"],"sourcesContent":["export const availableAwsRegions = [\n { value: \"us-east-1\", name: \"us-east-1 (US East, N. Virginia)\" },\n { value: \"us-east-2\", name: \"us-east-2 (US East, Ohio)\" },\n { value: \"us-west-1\", name: \"us-west-1 (US West, N. California)\" },\n { value: \"us-west-2\", name: \"us-west-2 (US West, Oregon)\" },\n { value: \"ca-central-1\", name: \"ca-central-1 (Canada, Central)\" },\n { value: \"eu-central-1\", name: \"eu-central-1 (EU, Frankfurt)\" },\n { value: \"eu-west-1\", name: \"eu-west-1 (EU, Ireland)\" },\n { value: \"eu-west-2\", name: \"eu-west-2 (EU, London)\" },\n /*{ value: \"eu-south-1\", name: \"eu-south-1 (EU, Milan)\" },*/\n { value: \"eu-west-3\", name: \"eu-west-3 (EU, Paris)\" },\n { value: \"eu-north-1\", name: \"eu-north-1 (EU, Stockholm)\" },\n { value: \"af-south-1\", name: \"af-south-1 (Africa, Cape Town)\" },\n { value: \"ap-east-1\", name: \"ap-east-1 (Asia Pacific, Hong Kong)\" },\n { value: \"ap-south-1\", name: \"ap-south-1 (Asia Pacific, Mumbai)\" },\n { value: \"ap-northeast-2\", name: \"ap-northeast-2 (Asia Pacific, Seoul)\" },\n { value: \"ap-southeast-1\", name: \"ap-southeast-1 (Asia Pacific, Singapore)\" },\n { value: \"ap-southeast-2\", name: \"ap-southeast-2 (Asia Pacific, Sydney)\" },\n { value: \"ap-northeast-1\", name: \"ap-northeast-1 (Asia Pacific, Tokyo)\" },\n // { value: \"me-south-1\", name: \"me-south-1 (Middle East, Bahrain)\" },\n { value: \"sa-east-1\", name: \"sa-east-1 (South America, São Paulo)\" }\n];\n"],"names":["availableAwsRegions"],"mappings":"AAAO,MAAMA,sBAAsB;IAC/B;QAAE,OAAO;QAAa,MAAM;IAAmC;IAC/D;QAAE,OAAO;QAAa,MAAM;IAA4B;IACxD;QAAE,OAAO;QAAa,MAAM;IAAqC;IACjE;QAAE,OAAO;QAAa,MAAM;IAA8B;IAC1D;QAAE,OAAO;QAAgB,MAAM;IAAiC;IAChE;QAAE,OAAO;QAAgB,MAAM;IAA+B;IAC9D;QAAE,OAAO;QAAa,MAAM;IAA0B;IACtD;QAAE,OAAO;QAAa,MAAM;IAAyB;IAErD;QAAE,OAAO;QAAa,MAAM;IAAwB;IACpD;QAAE,OAAO;QAAc,MAAM;IAA6B;IAC1D;QAAE,OAAO;QAAc,MAAM;IAAiC;IAC9D;QAAE,OAAO;QAAa,MAAM;IAAsC;IAClE;QAAE,OAAO;QAAc,MAAM;IAAoC;IACjE;QAAE,OAAO;QAAkB,MAAM;IAAuC;IACxE;QAAE,OAAO;QAAkB,MAAM;IAA2C;IAC5E;QAAE,OAAO;QAAkB,MAAM;IAAwC;IACzE;QAAE,OAAO;QAAkB,MAAM;IAAuC;IAExE;QAAE,OAAO;QAAa,MAAM;IAAuC;CACtE"}
@@ -2,46 +2,53 @@ import inquirer from "inquirer";
2
2
  import { discoverAgents } from "@webiny/mcp";
3
3
  import { availableAwsRegions } from "./availableAwsRegions.js";
4
4
  const STORAGE_OPTIONS = {
5
- ddb: {
6
- value: "ddb",
7
- name: "DynamoDB (for small and medium sized projects)"
8
- },
9
- "ddb-os": {
10
- value: "ddb-os",
11
- name: "Amazon DynamoDB + Amazon OpenSearch (for larger projects)"
12
- }
5
+ ddb: {
6
+ value: "ddb",
7
+ name: "DynamoDB (for small and medium sized projects)"
8
+ },
9
+ "ddb-os": {
10
+ value: "ddb-os",
11
+ name: "Amazon DynamoDB + Amazon OpenSearch (for larger projects)"
12
+ }
13
13
  };
14
- export const runInteractivePrompt = async () => {
15
- console.log("In order to create your new Webiny project, please answer the following questions.");
16
- console.log();
17
- const agents = await discoverAgents();
18
- const agentChoices = [...Array.from(agents.values()).map(a => ({
19
- value: a.preset.slug,
20
- name: a.preset.displayName
21
- })), {
22
- value: "other",
23
- name: "Other / not listed"
24
- }];
25
- return inquirer.prompt([{
26
- type: "select",
27
- name: "region",
28
- default: "us-east-1",
29
- message: "Please choose the AWS region in which your project will be deployed:",
30
- // Some of the regions might be commented out (not all service supported).
31
- choices: availableAwsRegions
32
- }, {
33
- type: "select",
34
- name: "storageOps",
35
- default: "ddb",
36
- message: `Please choose the database setup you wish to use with your project:`,
37
- choices: Object.values(STORAGE_OPTIONS)
38
- }, {
39
- type: "select",
40
- name: "aiAgent",
41
- default: "claude",
42
- message: "Please choose the AI agent you will use with your project:",
43
- choices: agentChoices
44
- }]);
14
+ const runInteractivePrompt = async ()=>{
15
+ console.log("In order to create your new Webiny project, please answer the following questions.");
16
+ console.log();
17
+ const agents = await discoverAgents();
18
+ const agentChoices = [
19
+ ...Array.from(agents.values()).map((a)=>({
20
+ value: a.preset.slug,
21
+ name: a.preset.displayName
22
+ })),
23
+ {
24
+ value: "other",
25
+ name: "Other / not listed"
26
+ }
27
+ ];
28
+ return inquirer.prompt([
29
+ {
30
+ type: "select",
31
+ name: "region",
32
+ default: "us-east-1",
33
+ message: "Please choose the AWS region in which your project will be deployed:",
34
+ choices: availableAwsRegions
35
+ },
36
+ {
37
+ type: "select",
38
+ name: "storageOps",
39
+ default: "ddb",
40
+ message: "Please choose the database setup you wish to use with your project:",
41
+ choices: Object.values(STORAGE_OPTIONS)
42
+ },
43
+ {
44
+ type: "select",
45
+ name: "aiAgent",
46
+ default: "claude",
47
+ message: "Please choose the AI agent you will use with your project:",
48
+ choices: agentChoices
49
+ }
50
+ ]);
45
51
  };
52
+ export { runInteractivePrompt };
46
53
 
47
54
  //# sourceMappingURL=runInteractivePrompt.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["inquirer","discoverAgents","availableAwsRegions","STORAGE_OPTIONS","ddb","value","name","runInteractivePrompt","console","log","agents","agentChoices","Array","from","values","map","a","preset","slug","displayName","prompt","type","default","message","choices","Object"],"sources":["runInteractivePrompt.ts"],"sourcesContent":["import inquirer from \"inquirer\";\nimport { discoverAgents } from \"@webiny/mcp\";\nimport { StorageOps } from \"./types.js\";\nimport { availableAwsRegions } from \"./availableAwsRegions.js\";\n\nconst STORAGE_OPTIONS: Record<StorageOps, { value: StorageOps; name: string }> = {\n ddb: {\n value: \"ddb\",\n name: \"DynamoDB (for small and medium sized projects)\"\n },\n \"ddb-os\": {\n value: \"ddb-os\",\n name: \"Amazon DynamoDB + Amazon OpenSearch (for larger projects)\"\n }\n};\n\nexport const runInteractivePrompt = async () => {\n console.log(\n \"In order to create your new Webiny project, please answer the following questions.\"\n );\n console.log();\n\n const agents = await discoverAgents();\n const agentChoices = [\n ...Array.from(agents.values()).map(a => ({\n value: a.preset.slug,\n name: a.preset.displayName\n })),\n { value: \"other\", name: \"Other / not listed\" }\n ];\n\n return inquirer.prompt([\n {\n type: \"select\",\n name: \"region\",\n default: \"us-east-1\",\n message: \"Please choose the AWS region in which your project will be deployed:\",\n // Some of the regions might be commented out (not all service supported).\n choices: availableAwsRegions\n },\n {\n type: \"select\",\n name: \"storageOps\",\n default: \"ddb\",\n message: `Please choose the database setup you wish to use with your project:`,\n choices: Object.values(STORAGE_OPTIONS)\n },\n {\n type: \"select\",\n name: \"aiAgent\",\n default: \"claude\",\n message: \"Please choose the AI agent you will use with your project:\",\n choices: agentChoices\n }\n ]);\n};\n"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,UAAU;AAC/B,SAASC,cAAc,QAAQ,aAAa;AAE5C,SAASC,mBAAmB;AAE5B,MAAMC,eAAwE,GAAG;EAC7EC,GAAG,EAAE;IACDC,KAAK,EAAE,KAAK;IACZC,IAAI,EAAE;EACV,CAAC;EACD,QAAQ,EAAE;IACND,KAAK,EAAE,QAAQ;IACfC,IAAI,EAAE;EACV;AACJ,CAAC;AAED,OAAO,MAAMC,oBAAoB,GAAG,MAAAA,CAAA,KAAY;EAC5CC,OAAO,CAACC,GAAG,CACP,oFACJ,CAAC;EACDD,OAAO,CAACC,GAAG,CAAC,CAAC;EAEb,MAAMC,MAAM,GAAG,MAAMT,cAAc,CAAC,CAAC;EACrC,MAAMU,YAAY,GAAG,CACjB,GAAGC,KAAK,CAACC,IAAI,CAACH,MAAM,CAACI,MAAM,CAAC,CAAC,CAAC,CAACC,GAAG,CAACC,CAAC,KAAK;IACrCX,KAAK,EAAEW,CAAC,CAACC,MAAM,CAACC,IAAI;IACpBZ,IAAI,EAAEU,CAAC,CAACC,MAAM,CAACE;EACnB,CAAC,CAAC,CAAC,EACH;IAAEd,KAAK,EAAE,OAAO;IAAEC,IAAI,EAAE;EAAqB,CAAC,CACjD;EAED,OAAON,QAAQ,CAACoB,MAAM,CAAC,CACnB;IACIC,IAAI,EAAE,QAAQ;IACdf,IAAI,EAAE,QAAQ;IACdgB,OAAO,EAAE,WAAW;IACpBC,OAAO,EAAE,sEAAsE;IAC/E;IACAC,OAAO,EAAEtB;EACb,CAAC,EACD;IACImB,IAAI,EAAE,QAAQ;IACdf,IAAI,EAAE,YAAY;IAClBgB,OAAO,EAAE,KAAK;IACdC,OAAO,EAAE,qEAAqE;IAC9EC,OAAO,EAAEC,MAAM,CAACX,MAAM,CAACX,eAAe;EAC1C,CAAC,EACD;IACIkB,IAAI,EAAE,QAAQ;IACdf,IAAI,EAAE,SAAS;IACfgB,OAAO,EAAE,QAAQ;IACjBC,OAAO,EAAE,4DAA4D;IACrEC,OAAO,EAAEb;EACb,CAAC,CACJ,CAAC;AACN,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"features/CreateWebinyProject/projects/aws/runInteractivePrompt.js","sources":["../../../../../src/features/CreateWebinyProject/projects/aws/runInteractivePrompt.ts"],"sourcesContent":["import inquirer from \"inquirer\";\nimport { discoverAgents } from \"@webiny/mcp\";\nimport { StorageOps } from \"./types.js\";\nimport { availableAwsRegions } from \"./availableAwsRegions.js\";\n\nconst STORAGE_OPTIONS: Record<StorageOps, { value: StorageOps; name: string }> = {\n ddb: {\n value: \"ddb\",\n name: \"DynamoDB (for small and medium sized projects)\"\n },\n \"ddb-os\": {\n value: \"ddb-os\",\n name: \"Amazon DynamoDB + Amazon OpenSearch (for larger projects)\"\n }\n};\n\nexport const runInteractivePrompt = async () => {\n console.log(\n \"In order to create your new Webiny project, please answer the following questions.\"\n );\n console.log();\n\n const agents = await discoverAgents();\n const agentChoices = [\n ...Array.from(agents.values()).map(a => ({\n value: a.preset.slug,\n name: a.preset.displayName\n })),\n { value: \"other\", name: \"Other / not listed\" }\n ];\n\n return inquirer.prompt([\n {\n type: \"select\",\n name: \"region\",\n default: \"us-east-1\",\n message: \"Please choose the AWS region in which your project will be deployed:\",\n // Some of the regions might be commented out (not all service supported).\n choices: availableAwsRegions\n },\n {\n type: \"select\",\n name: \"storageOps\",\n default: \"ddb\",\n message: `Please choose the database setup you wish to use with your project:`,\n choices: Object.values(STORAGE_OPTIONS)\n },\n {\n type: \"select\",\n name: \"aiAgent\",\n default: \"claude\",\n message: \"Please choose the AI agent you will use with your project:\",\n choices: agentChoices\n }\n ]);\n};\n"],"names":["STORAGE_OPTIONS","runInteractivePrompt","console","agents","discoverAgents","agentChoices","Array","a","inquirer","availableAwsRegions","Object"],"mappings":";;;AAKA,MAAMA,kBAA2E;IAC7E,KAAK;QACD,OAAO;QACP,MAAM;IACV;IACA,UAAU;QACN,OAAO;QACP,MAAM;IACV;AACJ;AAEO,MAAMC,uBAAuB;IAChCC,QAAQ,GAAG,CACP;IAEJA,QAAQ,GAAG;IAEX,MAAMC,SAAS,MAAMC;IACrB,MAAMC,eAAe;WACdC,MAAM,IAAI,CAACH,OAAO,MAAM,IAAI,GAAG,CAACI,CAAAA,IAAM;gBACrC,OAAOA,EAAE,MAAM,CAAC,IAAI;gBACpB,MAAMA,EAAE,MAAM,CAAC,WAAW;YAC9B;QACA;YAAE,OAAO;YAAS,MAAM;QAAqB;KAChD;IAED,OAAOC,SAAS,MAAM,CAAC;QACnB;YACI,MAAM;YACN,MAAM;YACN,SAAS;YACT,SAAS;YAET,SAASC;QACb;QACA;YACI,MAAM;YACN,MAAM;YACN,SAAS;YACT,SAAS;YACT,SAASC,OAAO,MAAM,CAACV;QAC3B;QACA;YACI,MAAM;YACN,MAAM;YACN,SAAS;YACT,SAAS;YACT,SAASK;QACb;KACH;AACL"}
@@ -1,3 +0,0 @@
1
- export {};
2
-
3
- //# sourceMappingURL=types.js.map