@webiny/cli-core 6.4.0-beta.2 → 6.4.0-beta.4
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.
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { CliCommandFactory, GetProjectSdkService, StdioService, UiService } from "../../abstractions/index.js";
|
|
2
2
|
import { IBaseAppParams } from "../../abstractions/features/types.js";
|
|
3
|
-
export
|
|
3
|
+
export interface IBuildCommandParams extends IBaseAppParams {
|
|
4
|
+
analyze?: boolean;
|
|
5
|
+
}
|
|
4
6
|
export declare class BuildCommand implements CliCommandFactory.Interface<IBuildCommandParams> {
|
|
5
7
|
private getProjectSdkService;
|
|
6
8
|
private stdioService;
|
|
@@ -25,8 +25,16 @@ class BuildCommand {
|
|
|
25
25
|
required: true
|
|
26
26
|
}
|
|
27
27
|
],
|
|
28
|
-
options:
|
|
28
|
+
options: [
|
|
29
|
+
...createBaseAppOptions(projectSdk),
|
|
30
|
+
{
|
|
31
|
+
name: "analyze",
|
|
32
|
+
description: "Run bundle analysis during build",
|
|
33
|
+
type: "boolean"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
29
36
|
handler: async (params)=>{
|
|
37
|
+
if (params.analyze) process.env.RSDOCTOR = "true";
|
|
30
38
|
const stdio = this.stdioService;
|
|
31
39
|
const ui = this.ui;
|
|
32
40
|
const packagesBuilder = await projectSdk.buildApp(params);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/BuildCommand/BuildCommand.js","sources":["../../../src/features/BuildCommand/BuildCommand.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport {\n CliCommandFactory,\n GetProjectSdkService,\n StdioService,\n UiService\n} from \"~/abstractions/index.js\";\nimport { IBaseAppParams } from \"~/abstractions/features/types.js\";\nimport { BuildRunner } from \"~/features/BuildCommand/buildRunners/BuildRunner.js\";\nimport { createBaseAppOptions } from \"~/features/common/index.js\";\n\nexport
|
|
1
|
+
{"version":3,"file":"features/BuildCommand/BuildCommand.js","sources":["../../../src/features/BuildCommand/BuildCommand.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport {\n CliCommandFactory,\n GetProjectSdkService,\n StdioService,\n UiService\n} from \"~/abstractions/index.js\";\nimport { IBaseAppParams } from \"~/abstractions/features/types.js\";\nimport { BuildRunner } from \"~/features/BuildCommand/buildRunners/BuildRunner.js\";\nimport { createBaseAppOptions } from \"~/features/common/index.js\";\n\nexport interface IBuildCommandParams extends IBaseAppParams {\n analyze?: boolean;\n}\n\nexport class BuildCommand implements CliCommandFactory.Interface<IBuildCommandParams> {\n constructor(\n private getProjectSdkService: GetProjectSdkService.Interface,\n private stdioService: StdioService.Interface,\n private ui: UiService.Interface\n ) {}\n\n async execute(): Promise<CliCommandFactory.CommandDefinition<IBuildCommandParams>> {\n const projectSdk = await this.getProjectSdkService.execute();\n\n return {\n name: \"build\",\n description: \"Builds specified app\",\n examples: [\"$0 build api --env dev\", \"$0 build admin --env prod\"],\n params: [\n {\n name: \"app\",\n description: \"Name of the app (core, admin, or api)\",\n type: \"string\",\n required: true\n }\n ],\n options: [\n ...createBaseAppOptions(projectSdk),\n {\n name: \"analyze\",\n description: \"Run bundle analysis during build\",\n type: \"boolean\"\n }\n ],\n handler: async (params: IBuildCommandParams) => {\n if (params.analyze) {\n // Set directly on process.env so forked build processes\n // (RunnableBuildProcess) inherit it automatically via { ...process.env }.\n // rsbuild detects RSDOCTOR=true and enables bundle analysis natively.\n process.env.RSDOCTOR = \"true\";\n }\n\n const stdio = this.stdioService;\n const ui = this.ui;\n\n const packagesBuilder = await projectSdk.buildApp(params);\n\n const buildRunner = new BuildRunner({\n stdio,\n ui,\n packagesBuilder\n });\n\n return buildRunner.run();\n }\n };\n }\n}\n\nexport const buildCommand = createImplementation({\n abstraction: CliCommandFactory,\n implementation: BuildCommand,\n dependencies: [GetProjectSdkService, StdioService, UiService]\n});\n"],"names":["BuildCommand","getProjectSdkService","stdioService","ui","projectSdk","createBaseAppOptions","params","process","stdio","packagesBuilder","buildRunner","BuildRunner","buildCommand","createImplementation","CliCommandFactory","GetProjectSdkService","StdioService","UiService"],"mappings":";;;;AAeO,MAAMA;IACT,YACYC,oBAAoD,EACpDC,YAAoC,EACpCC,EAAuB,CACjC;aAHUF,oBAAoB,GAApBA;aACAC,YAAY,GAAZA;aACAC,EAAE,GAAFA;IACT;IAEH,MAAM,UAA6E;QAC/E,MAAMC,aAAa,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO;QAE1D,OAAO;YACH,MAAM;YACN,aAAa;YACb,UAAU;gBAAC;gBAA0B;aAA4B;YACjE,QAAQ;gBACJ;oBACI,MAAM;oBACN,aAAa;oBACb,MAAM;oBACN,UAAU;gBACd;aACH;YACD,SAAS;mBACFC,qBAAqBD;gBACxB;oBACI,MAAM;oBACN,aAAa;oBACb,MAAM;gBACV;aACH;YACD,SAAS,OAAOE;gBACZ,IAAIA,OAAO,OAAO,EAIdC,QAAQ,GAAG,CAAC,QAAQ,GAAG;gBAG3B,MAAMC,QAAQ,IAAI,CAAC,YAAY;gBAC/B,MAAML,KAAK,IAAI,CAAC,EAAE;gBAElB,MAAMM,kBAAkB,MAAML,WAAW,QAAQ,CAACE;gBAElD,MAAMI,cAAc,IAAIC,YAAY;oBAChCH;oBACAL;oBACAM;gBACJ;gBAEA,OAAOC,YAAY,GAAG;YAC1B;QACJ;IACJ;AACJ;AAEO,MAAME,eAAeC,qBAAqB;IAC7C,aAAaC;IACb,gBAAgBd;IAChB,cAAc;QAACe;QAAsBC;QAAcC;KAAU;AACjE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/cli-core",
|
|
3
|
-
"version": "6.4.0-beta.
|
|
3
|
+
"version": "6.4.0-beta.4",
|
|
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.0.1",
|
|
17
|
-
"@webiny/feature": "6.4.0-beta.
|
|
18
|
-
"@webiny/project": "6.4.0-beta.
|
|
19
|
-
"@webiny/pulumi-sdk": "6.4.0-beta.
|
|
20
|
-
"@webiny/telemetry": "6.4.0-beta.
|
|
17
|
+
"@webiny/feature": "6.4.0-beta.4",
|
|
18
|
+
"@webiny/project": "6.4.0-beta.4",
|
|
19
|
+
"@webiny/pulumi-sdk": "6.4.0-beta.4",
|
|
20
|
+
"@webiny/telemetry": "6.4.0-beta.4",
|
|
21
21
|
"chalk": "5.6.2",
|
|
22
22
|
"ci-info": "4.4.0",
|
|
23
23
|
"execa": "5.1.1",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"ora": "9.4.0",
|
|
32
32
|
"pino": "10.3.1",
|
|
33
33
|
"pino-pretty": "13.1.3",
|
|
34
|
-
"semver": "7.8.
|
|
34
|
+
"semver": "7.8.1",
|
|
35
35
|
"type-fest": "5.6.0",
|
|
36
36
|
"write-json-file": "7.0.0",
|
|
37
37
|
"yargs": "18.0.0",
|
|
@@ -39,13 +39,15 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/lodash": "4.17.24",
|
|
42
|
-
"@webiny/build-tools": "6.4.0-beta.
|
|
42
|
+
"@webiny/build-tools": "6.4.0-beta.4",
|
|
43
43
|
"rimraf": "6.1.3",
|
|
44
44
|
"typescript": "6.0.3"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
|
-
"access": "public"
|
|
48
|
-
"directory": "dist"
|
|
47
|
+
"access": "public"
|
|
49
48
|
},
|
|
50
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "8476da73b653c89cc1474d968baf55c1b0ae0e5f",
|
|
50
|
+
"webiny": {
|
|
51
|
+
"publishFrom": "dist"
|
|
52
|
+
}
|
|
51
53
|
}
|