@webiny/cli-core 6.6.0-alpha.6 → 6.6.0-alpha.8

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.
@@ -12,7 +12,11 @@ class InfoCommand {
12
12
  return {
13
13
  name: "info",
14
14
  description: "Lists relevant URLs for your Webiny project",
15
- options: createBaseAppOptions(projectSdk),
15
+ options: createBaseAppOptions(projectSdk, {
16
+ env: {
17
+ default: void 0
18
+ }
19
+ }),
16
20
  handler: async (params)=>{
17
21
  const ui = this.uiService;
18
22
  const printInfoForEnv = new PrintInfoForEnv({
@@ -1 +1 @@
1
- {"version":3,"file":"features/InfoCommand/InfoCommand.js","sources":["../../../src/features/InfoCommand/InfoCommand.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { CliCommandFactory, GetProjectSdkService, UiService } from \"~/abstractions/index.js\";\nimport { IBaseAppParams } from \"~/abstractions/features/types.js\";\nimport { PrintInfoForEnv } from \"./PrintInfoForEnv.js\";\nimport { createBaseAppOptions } from \"~/features/common/index.js\";\n\nexport type IInfoCommandParams = Omit<IBaseAppParams, \"app\">;\n\nexport class InfoCommand implements CliCommandFactory.Interface<IInfoCommandParams> {\n constructor(\n private getProjectSdkService: GetProjectSdkService.Interface,\n private uiService: UiService.Interface\n ) {}\n\n async execute(): Promise<CliCommandFactory.CommandDefinition<IInfoCommandParams>> {\n const projectSdk = await this.getProjectSdkService.execute();\n\n return {\n name: \"info\",\n description: \"Lists relevant URLs for your Webiny project\",\n options: createBaseAppOptions(projectSdk),\n handler: async params => {\n const ui = this.uiService;\n\n const printInfoForEnv = new PrintInfoForEnv({\n getProjectSdkService: this.getProjectSdkService,\n uiService: this.uiService\n });\n\n if (params.env) {\n await printInfoForEnv.execute({ env: params.env, variant: params.variant });\n ui.emptyLine();\n } else {\n const existingEnvs = await projectSdk.listDeployedEnvironments();\n\n if (existingEnvs.length === 0) {\n ui.info(\n \"It seems that no environments have been deployed yet. Please deploy the project first.\"\n );\n return;\n }\n\n if (existingEnvs.length === 1) {\n ui.info(\"There is one deployed environment.\");\n ui.info(\"Here is the information for the environment.\");\n } else {\n ui.info(\n \"There's a total of %d deployed environments.\",\n existingEnvs.length\n );\n ui.info(\"Here is the information for each environment.\");\n console.log();\n }\n\n for (const { env, variant } of existingEnvs) {\n await printInfoForEnv.execute({ env, variant });\n ui.emptyLine();\n }\n }\n\n ui.info(\n \"If some of the information is missing for a particular environment, make sure that the project has been fully deployed into that environment. You can do that by running the %s command.\",\n \"yarn webiny deploy --env {ENVIRONMENT_NAME}\"\n );\n }\n };\n }\n}\n\nexport const infoCommand = createImplementation({\n abstraction: CliCommandFactory,\n implementation: InfoCommand,\n dependencies: [GetProjectSdkService, UiService]\n});\n"],"names":["InfoCommand","getProjectSdkService","uiService","projectSdk","createBaseAppOptions","params","ui","printInfoForEnv","PrintInfoForEnv","existingEnvs","console","env","variant","infoCommand","createImplementation","CliCommandFactory","GetProjectSdkService","UiService"],"mappings":";;;;AAQO,MAAMA;IACT,YACYC,oBAAoD,EACpDC,SAA8B,CACxC;aAFUD,oBAAoB,GAApBA;aACAC,SAAS,GAATA;IACT;IAEH,MAAM,UAA4E;QAC9E,MAAMC,aAAa,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO;QAE1D,OAAO;YACH,MAAM;YACN,aAAa;YACb,SAASC,qBAAqBD;YAC9B,SAAS,OAAME;gBACX,MAAMC,KAAK,IAAI,CAAC,SAAS;gBAEzB,MAAMC,kBAAkB,IAAIC,gBAAgB;oBACxC,sBAAsB,IAAI,CAAC,oBAAoB;oBAC/C,WAAW,IAAI,CAAC,SAAS;gBAC7B;gBAEA,IAAIH,OAAO,GAAG,EAAE;oBACZ,MAAME,gBAAgB,OAAO,CAAC;wBAAE,KAAKF,OAAO,GAAG;wBAAE,SAASA,OAAO,OAAO;oBAAC;oBACzEC,GAAG,SAAS;gBAChB,OAAO;oBACH,MAAMG,eAAe,MAAMN,WAAW,wBAAwB;oBAE9D,IAAIM,AAAwB,MAAxBA,aAAa,MAAM,EAAQ,YAC3BH,GAAG,IAAI,CACH;oBAKR,IAAIG,AAAwB,MAAxBA,aAAa,MAAM,EAAQ;wBAC3BH,GAAG,IAAI,CAAC;wBACRA,GAAG,IAAI,CAAC;oBACZ,OAAO;wBACHA,GAAG,IAAI,CACH,gDACAG,aAAa,MAAM;wBAEvBH,GAAG,IAAI,CAAC;wBACRI,QAAQ,GAAG;oBACf;oBAEA,KAAK,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAE,IAAIH,aAAc;wBACzC,MAAMF,gBAAgB,OAAO,CAAC;4BAAEI;4BAAKC;wBAAQ;wBAC7CN,GAAG,SAAS;oBAChB;gBACJ;gBAEAA,GAAG,IAAI,CACH,4LACA;YAER;QACJ;IACJ;AACJ;AAEO,MAAMO,cAAcC,qBAAqB;IAC5C,aAAaC;IACb,gBAAgBf;IAChB,cAAc;QAACgB;QAAsBC;KAAU;AACnD"}
1
+ {"version":3,"file":"features/InfoCommand/InfoCommand.js","sources":["../../../src/features/InfoCommand/InfoCommand.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { CliCommandFactory, GetProjectSdkService, UiService } from \"~/abstractions/index.js\";\nimport { IBaseAppParams } from \"~/abstractions/features/types.js\";\nimport { PrintInfoForEnv } from \"./PrintInfoForEnv.js\";\nimport { createBaseAppOptions } from \"~/features/common/index.js\";\n\nexport type IInfoCommandParams = Omit<IBaseAppParams, \"app\">;\n\nexport class InfoCommand implements CliCommandFactory.Interface<IInfoCommandParams> {\n constructor(\n private getProjectSdkService: GetProjectSdkService.Interface,\n private uiService: UiService.Interface\n ) {}\n\n async execute(): Promise<CliCommandFactory.CommandDefinition<IInfoCommandParams>> {\n const projectSdk = await this.getProjectSdkService.execute();\n\n return {\n name: \"info\",\n description: \"Lists relevant URLs for your Webiny project\",\n // No default env here: without `--env`, we list info for all deployed environments.\n options: createBaseAppOptions(projectSdk, { env: { default: undefined } }),\n handler: async params => {\n const ui = this.uiService;\n\n const printInfoForEnv = new PrintInfoForEnv({\n getProjectSdkService: this.getProjectSdkService,\n uiService: this.uiService\n });\n\n if (params.env) {\n await printInfoForEnv.execute({ env: params.env, variant: params.variant });\n ui.emptyLine();\n } else {\n const existingEnvs = await projectSdk.listDeployedEnvironments();\n\n if (existingEnvs.length === 0) {\n ui.info(\n \"It seems that no environments have been deployed yet. Please deploy the project first.\"\n );\n return;\n }\n\n if (existingEnvs.length === 1) {\n ui.info(\"There is one deployed environment.\");\n ui.info(\"Here is the information for the environment.\");\n } else {\n ui.info(\n \"There's a total of %d deployed environments.\",\n existingEnvs.length\n );\n ui.info(\"Here is the information for each environment.\");\n console.log();\n }\n\n for (const { env, variant } of existingEnvs) {\n await printInfoForEnv.execute({ env, variant });\n ui.emptyLine();\n }\n }\n\n ui.info(\n \"If some of the information is missing for a particular environment, make sure that the project has been fully deployed into that environment. You can do that by running the %s command.\",\n \"yarn webiny deploy --env {ENVIRONMENT_NAME}\"\n );\n }\n };\n }\n}\n\nexport const infoCommand = createImplementation({\n abstraction: CliCommandFactory,\n implementation: InfoCommand,\n dependencies: [GetProjectSdkService, UiService]\n});\n"],"names":["InfoCommand","getProjectSdkService","uiService","projectSdk","createBaseAppOptions","undefined","params","ui","printInfoForEnv","PrintInfoForEnv","existingEnvs","console","env","variant","infoCommand","createImplementation","CliCommandFactory","GetProjectSdkService","UiService"],"mappings":";;;;AAQO,MAAMA;IACT,YACYC,oBAAoD,EACpDC,SAA8B,CACxC;aAFUD,oBAAoB,GAApBA;aACAC,SAAS,GAATA;IACT;IAEH,MAAM,UAA4E;QAC9E,MAAMC,aAAa,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO;QAE1D,OAAO;YACH,MAAM;YACN,aAAa;YAEb,SAASC,qBAAqBD,YAAY;gBAAE,KAAK;oBAAE,SAASE;gBAAU;YAAE;YACxE,SAAS,OAAMC;gBACX,MAAMC,KAAK,IAAI,CAAC,SAAS;gBAEzB,MAAMC,kBAAkB,IAAIC,gBAAgB;oBACxC,sBAAsB,IAAI,CAAC,oBAAoB;oBAC/C,WAAW,IAAI,CAAC,SAAS;gBAC7B;gBAEA,IAAIH,OAAO,GAAG,EAAE;oBACZ,MAAME,gBAAgB,OAAO,CAAC;wBAAE,KAAKF,OAAO,GAAG;wBAAE,SAASA,OAAO,OAAO;oBAAC;oBACzEC,GAAG,SAAS;gBAChB,OAAO;oBACH,MAAMG,eAAe,MAAMP,WAAW,wBAAwB;oBAE9D,IAAIO,AAAwB,MAAxBA,aAAa,MAAM,EAAQ,YAC3BH,GAAG,IAAI,CACH;oBAKR,IAAIG,AAAwB,MAAxBA,aAAa,MAAM,EAAQ;wBAC3BH,GAAG,IAAI,CAAC;wBACRA,GAAG,IAAI,CAAC;oBACZ,OAAO;wBACHA,GAAG,IAAI,CACH,gDACAG,aAAa,MAAM;wBAEvBH,GAAG,IAAI,CAAC;wBACRI,QAAQ,GAAG;oBACf;oBAEA,KAAK,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAE,IAAIH,aAAc;wBACzC,MAAMF,gBAAgB,OAAO,CAAC;4BAAEI;4BAAKC;wBAAQ;wBAC7CN,GAAG,SAAS;oBAChB;gBACJ;gBAEAA,GAAG,IAAI,CACH,4LACA;YAER;QACJ;IACJ;AACJ;AAEO,MAAMO,cAAcC,qBAAqB;IAC5C,aAAaC;IACb,gBAAgBhB;IAChB,cAAc;QAACiB;QAAsBC;KAAU;AACnD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/cli-core",
3
- "version": "6.6.0-alpha.6",
3
+ "version": "6.6.0-alpha.8",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -14,10 +14,10 @@
14
14
  "license": "MIT",
15
15
  "dependencies": {
16
16
  "@webiny/di": "1.1.0",
17
- "@webiny/feature": "6.6.0-alpha.6",
18
- "@webiny/project": "6.6.0-alpha.6",
17
+ "@webiny/feature": "6.6.0-alpha.8",
18
+ "@webiny/project": "6.6.0-alpha.8",
19
19
  "@webiny/stdlib": "0.0.17",
20
- "@webiny/telemetry": "6.6.0-alpha.6",
20
+ "@webiny/telemetry": "6.6.0-alpha.8",
21
21
  "chalk": "6.0.0",
22
22
  "ci-info": "4.4.0",
23
23
  "execa": "10.0.1",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/lodash": "4.17.25",
42
- "@webiny/build-tools": "6.6.0-alpha.6",
42
+ "@webiny/build-tools": "6.6.0-alpha.8",
43
43
  "rimraf": "6.1.3",
44
44
  "strip-ansi": "7.2.0",
45
45
  "typescript": "7.0.2",