@webiny/cli-core 0.0.0-unstable.7be00a75a9 → 0.0.0-unstable.9f53ea597d

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 type IBuildCommandParams = IBaseAppParams;
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: createBaseAppOptions(projectSdk),
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 type IBuildCommandParams = IBaseAppParams;\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: createBaseAppOptions(projectSdk),\n handler: async (params: IBuildCommandParams) => {\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","stdio","packagesBuilder","buildRunner","BuildRunner","buildCommand","createImplementation","CliCommandFactory","GetProjectSdkService","StdioService","UiService"],"mappings":";;;;AAaO,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,SAASC,qBAAqBD;YAC9B,SAAS,OAAOE;gBACZ,MAAMC,QAAQ,IAAI,CAAC,YAAY;gBAC/B,MAAMJ,KAAK,IAAI,CAAC,EAAE;gBAElB,MAAMK,kBAAkB,MAAMJ,WAAW,QAAQ,CAACE;gBAElD,MAAMG,cAAc,IAAIC,YAAY;oBAChCH;oBACAJ;oBACAK;gBACJ;gBAEA,OAAOC,YAAY,GAAG;YAC1B;QACJ;IACJ;AACJ;AAEO,MAAME,eAAeC,qBAAqB;IAC7C,aAAaC;IACb,gBAAgBb;IAChB,cAAc;QAACc;QAAsBC;QAAcC;KAAU;AACjE"}
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"}
@@ -8,7 +8,7 @@ class UpgradeCommandHandlerImpl {
8
8
  this.ui = ui;
9
9
  }
10
10
  async handle(params) {
11
- const { version, skipChecks, debug, logLevel, showLogs, showStackTrace, installVersion, force } = params;
11
+ const { version, skipChecks, debug, logLevel, showLogs, showStackTrace, installVersion, force, registry, packageManager, skipDependencyGuard } = params;
12
12
  if (!skipChecks) {
13
13
  let gitStatus = "";
14
14
  try {
@@ -36,6 +36,9 @@ class UpgradeCommandHandlerImpl {
36
36
  logLevel ? `--logLevel=${logLevel}` : "--logLevel=debug",
37
37
  installVersion ? `--installVersion=${installVersion}` : "",
38
38
  force ? "--force" : "",
39
+ registry ? `--registry=${registry}` : "",
40
+ packageManager ? `--packageManager=${packageManager}` : "",
41
+ skipDependencyGuard ? "--skipDependencyGuard" : "",
39
42
  "--json"
40
43
  ].filter(Boolean);
41
44
  const npx = execa("npx", command, {
@@ -1 +1 @@
1
- {"version":3,"file":"features/UpgradeCommand/UpgradeCommandHandler.js","sources":["../../../src/features/UpgradeCommand/UpgradeCommandHandler.ts"],"sourcesContent":["import { UpgradeCommandHandler as UpgradeCommandHandlerAbstraction } from \"./abstraction.js\";\nimport chalk from \"chalk\";\nimport execa from \"execa\";\nimport { UiService } from \"~/abstractions/index.js\";\n\nconst GITHUB_REPOSITORY_URL = \"https://github.com/webiny/webiny-upgrades-v6\";\n\ntype LogType = \"debug\" | \"success\" | \"warning\" | \"warn\" | \"error\" | \"fatal\" | \"done\" | \"info\";\n\ninterface IUpgradeLine {\n type: LogType;\n message: string;\n data?: {\n stack?: string;\n [key: string]: any;\n };\n}\n\nexport class UpgradeCommandHandlerImpl implements UpgradeCommandHandlerAbstraction.Interface {\n public constructor(private ui: UiService.Interface) {}\n\n public async handle(params: UpgradeCommandHandlerAbstraction.Params): Promise<void> {\n const {\n version,\n skipChecks,\n debug,\n logLevel,\n showLogs,\n showStackTrace,\n installVersion,\n force\n } = params;\n\n if (!skipChecks) {\n /**\n * Before doing any upgrading, there must not be any active changes in the current branch.\n */\n let gitStatus = \"\";\n try {\n const { stdout } = execa.sync(\"git\", [\"status\", \"--porcelain\"]);\n gitStatus = stdout.trim();\n } catch {}\n\n if (gitStatus) {\n this.ui.error(\n chalk.red(\"This git repository has untracked files or uncommitted changes:\") +\n \"\\n\\n\" +\n gitStatus\n .split(\"\\n\")\n .map(line => {\n const matched = line.match(/ .*/g);\n if (!matched || !matched[0]) {\n return \"\";\n }\n return matched[0].trim();\n })\n .join(\"\\n\") +\n \"\\n\\n\" +\n chalk.red(\n \"Remove untracked files, stash or commit any changes, and try again.\"\n )\n );\n process.exit(1);\n }\n }\n\n const command = [\n GITHUB_REPOSITORY_URL,\n version || undefined,\n debug ? \"--debug\" : \"\",\n showLogs ? `--showLogs=${showLogs}` : \"\",\n showStackTrace ? `--showStackTrace=${showStackTrace}` : \"\",\n logLevel ? `--logLevel=${logLevel}` : \"--logLevel=debug\",\n installVersion ? `--installVersion=${installVersion}` : \"\",\n force ? \"--force\" : \"\",\n \"--json\"\n ].filter(Boolean);\n\n const npx = execa(\"npx\", command, {\n env: {\n // TODO determine if this actually works\n // @ts-expect-error\n FORCE_COLOR: true\n },\n stdin: process.stdin\n });\n\n npx.stdout!.on(\"data\", data => {\n const lines = data.toString().replace(/\\n$/, \"\").split(\"\\n\") as string[];\n for (const line of lines) {\n if (!line || !line.trim()) {\n continue;\n }\n this.output(line);\n }\n });\n\n npx.stderr!.on(\"data\", data => {\n this.ui.error(data.toString());\n });\n\n try {\n await npx;\n } catch (ex) {\n this.ui.error(`Upgrade process failed: ${ex.message}`);\n }\n }\n\n private output(line: string): void {\n try {\n const json = JSON.parse(line) as IUpgradeLine;\n switch (json.type) {\n case \"debug\":\n this.ui.debug(json.message);\n if (!json.data?.stack) {\n return;\n }\n this.ui.debug(json.data?.stack);\n return;\n case \"info\":\n this.ui.info(json.message);\n return;\n case \"success\":\n case \"done\":\n this.ui.success(json.message);\n return;\n case \"warning\":\n case \"warn\":\n this.ui.warning(json.message);\n return;\n case \"error\":\n case \"fatal\":\n this.ui.error(json.message);\n if (!json.data?.stack) {\n return;\n }\n this.ui.debug(json.data?.stack);\n return;\n default:\n console.log(json);\n }\n } catch {\n console.log(line);\n }\n }\n}\n\nexport const UpgradeCommandHandler = UpgradeCommandHandlerAbstraction.createImplementation({\n implementation: UpgradeCommandHandlerImpl,\n dependencies: [UiService]\n});\n"],"names":["GITHUB_REPOSITORY_URL","UpgradeCommandHandlerImpl","ui","params","version","skipChecks","debug","logLevel","showLogs","showStackTrace","installVersion","force","gitStatus","stdout","execa","chalk","line","matched","process","command","undefined","Boolean","npx","data","lines","ex","json","JSON","console","UpgradeCommandHandler","UpgradeCommandHandlerAbstraction","UiService"],"mappings":";;;;AAKA,MAAMA,wBAAwB;AAavB,MAAMC;IACT,YAA2BC,EAAuB,CAAE;aAAzBA,EAAE,GAAFA;IAA0B;IAErD,MAAa,OAAOC,MAA+C,EAAiB;QAChF,MAAM,EACFC,OAAO,EACPC,UAAU,EACVC,KAAK,EACLC,QAAQ,EACRC,QAAQ,EACRC,cAAc,EACdC,cAAc,EACdC,KAAK,EACR,GAAGR;QAEJ,IAAI,CAACE,YAAY;YAIb,IAAIO,YAAY;YAChB,IAAI;gBACA,MAAM,EAAEC,MAAM,EAAE,GAAGC,MAAM,IAAI,CAAC,OAAO;oBAAC;oBAAU;iBAAc;gBAC9DF,YAAYC,OAAO,IAAI;YAC3B,EAAE,OAAM,CAAC;YAET,IAAID,WAAW;gBACX,IAAI,CAAC,EAAE,CAAC,KAAK,CACTG,MAAM,GAAG,CAAC,qEACN,SACAH,UACK,KAAK,CAAC,MACN,GAAG,CAACI,CAAAA;oBACD,MAAMC,UAAUD,KAAK,KAAK,CAAC;oBAC3B,IAAI,CAACC,WAAW,CAACA,OAAO,CAAC,EAAE,EACvB,OAAO;oBAEX,OAAOA,OAAO,CAAC,EAAE,CAAC,IAAI;gBAC1B,GACC,IAAI,CAAC,QACV,SACAF,MAAM,GAAG,CACL;gBAGZG,QAAQ,IAAI,CAAC;YACjB;QACJ;QAEA,MAAMC,UAAU;YACZnB;YACAI,WAAWgB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oBACD,IAAI,CAAC,EAAE,CAAC,OAAO,CAACA,KAAK,OAAO;oBAC5B;gBACJ,KAAK;gBACL,KAAK;oBACD,IAAI,CAAC,EAAE,CAAC,OAAO,CAACA,KAAK,OAAO;oBAC5B;gBACJ,KAAK;gBACL,KAAK;oBACD,IAAI,CAAC,EAAE,CAAC,KAAK,CAACA,KAAK,OAAO;oBAC1B,IAAI,CAACA,KAAK,IAAI,EAAE,OACZ;oBAEJ,IAAI,CAAC,EAAE,CAAC,KAAK,CAACA,KAAK,IAAI,EAAE;oBACzB;gBACJ;oBACIE,QAAQ,GAAG,CAACF;YACpB;QACJ,EAAE,OAAM;YACJE,QAAQ,GAAG,CAACZ;QAChB;IACJ;AACJ;AAEO,MAAMa,8CAAwBC,sBAAAA,oBAAqD,CAAC;IACvF,gBAAgB7B;IAChB,cAAc;QAAC8B;KAAU;AAC7B"}
1
+ {"version":3,"file":"features/UpgradeCommand/UpgradeCommandHandler.js","sources":["../../../src/features/UpgradeCommand/UpgradeCommandHandler.ts"],"sourcesContent":["import { UpgradeCommandHandler as UpgradeCommandHandlerAbstraction } from \"./abstraction.js\";\nimport chalk from \"chalk\";\nimport execa from \"execa\";\nimport { UiService } from \"~/abstractions/index.js\";\n\nconst GITHUB_REPOSITORY_URL = \"https://github.com/webiny/webiny-upgrades-v6\";\n\ntype LogType = \"debug\" | \"success\" | \"warning\" | \"warn\" | \"error\" | \"fatal\" | \"done\" | \"info\";\n\ninterface IUpgradeLine {\n type: LogType;\n message: string;\n data?: {\n stack?: string;\n [key: string]: any;\n };\n}\n\nexport class UpgradeCommandHandlerImpl implements UpgradeCommandHandlerAbstraction.Interface {\n public constructor(private ui: UiService.Interface) {}\n\n public async handle(params: UpgradeCommandHandlerAbstraction.Params): Promise<void> {\n const {\n version,\n skipChecks,\n debug,\n logLevel,\n showLogs,\n showStackTrace,\n installVersion,\n force,\n registry,\n packageManager,\n skipDependencyGuard\n } = params;\n\n if (!skipChecks) {\n /**\n * Before doing any upgrading, there must not be any active changes in the current branch.\n */\n let gitStatus = \"\";\n try {\n const { stdout } = execa.sync(\"git\", [\"status\", \"--porcelain\"]);\n gitStatus = stdout.trim();\n } catch {}\n\n if (gitStatus) {\n this.ui.error(\n chalk.red(\"This git repository has untracked files or uncommitted changes:\") +\n \"\\n\\n\" +\n gitStatus\n .split(\"\\n\")\n .map(line => {\n const matched = line.match(/ .*/g);\n if (!matched || !matched[0]) {\n return \"\";\n }\n return matched[0].trim();\n })\n .join(\"\\n\") +\n \"\\n\\n\" +\n chalk.red(\n \"Remove untracked files, stash or commit any changes, and try again.\"\n )\n );\n process.exit(1);\n }\n }\n\n const command = [\n GITHUB_REPOSITORY_URL,\n version || undefined,\n debug ? \"--debug\" : \"\",\n showLogs ? `--showLogs=${showLogs}` : \"\",\n showStackTrace ? `--showStackTrace=${showStackTrace}` : \"\",\n logLevel ? `--logLevel=${logLevel}` : \"--logLevel=debug\",\n installVersion ? `--installVersion=${installVersion}` : \"\",\n force ? \"--force\" : \"\",\n registry ? `--registry=${registry}` : \"\",\n packageManager ? `--packageManager=${packageManager}` : \"\",\n skipDependencyGuard ? \"--skipDependencyGuard\" : \"\",\n \"--json\"\n ].filter(Boolean);\n\n const npx = execa(\"npx\", command, {\n env: {\n // TODO determine if this actually works\n // @ts-expect-error\n FORCE_COLOR: true\n },\n stdin: process.stdin\n });\n\n npx.stdout!.on(\"data\", data => {\n const lines = data.toString().replace(/\\n$/, \"\").split(\"\\n\") as string[];\n for (const line of lines) {\n if (!line || !line.trim()) {\n continue;\n }\n this.output(line);\n }\n });\n\n npx.stderr!.on(\"data\", data => {\n this.ui.error(data.toString());\n });\n\n try {\n await npx;\n } catch (ex) {\n this.ui.error(`Upgrade process failed: ${ex.message}`);\n }\n }\n\n private output(line: string): void {\n try {\n const json = JSON.parse(line) as IUpgradeLine;\n switch (json.type) {\n case \"debug\":\n this.ui.debug(json.message);\n if (!json.data?.stack) {\n return;\n }\n this.ui.debug(json.data?.stack);\n return;\n case \"info\":\n this.ui.info(json.message);\n return;\n case \"success\":\n case \"done\":\n this.ui.success(json.message);\n return;\n case \"warning\":\n case \"warn\":\n this.ui.warning(json.message);\n return;\n case \"error\":\n case \"fatal\":\n this.ui.error(json.message);\n if (!json.data?.stack) {\n return;\n }\n this.ui.debug(json.data?.stack);\n return;\n default:\n console.log(json);\n }\n } catch {\n console.log(line);\n }\n }\n}\n\nexport const UpgradeCommandHandler = UpgradeCommandHandlerAbstraction.createImplementation({\n implementation: UpgradeCommandHandlerImpl,\n dependencies: [UiService]\n});\n"],"names":["GITHUB_REPOSITORY_URL","UpgradeCommandHandlerImpl","ui","params","version","skipChecks","debug","logLevel","showLogs","showStackTrace","installVersion","force","registry","packageManager","skipDependencyGuard","gitStatus","stdout","execa","chalk","line","matched","process","command","undefined","Boolean","npx","data","lines","ex","json","JSON","console","UpgradeCommandHandler","UpgradeCommandHandlerAbstraction","UiService"],"mappings":";;;;AAKA,MAAMA,wBAAwB;AAavB,MAAMC;IACT,YAA2BC,EAAuB,CAAE;aAAzBA,EAAE,GAAFA;IAA0B;IAErD,MAAa,OAAOC,MAA+C,EAAiB;QAChF,MAAM,EACFC,OAAO,EACPC,UAAU,EACVC,KAAK,EACLC,QAAQ,EACRC,QAAQ,EACRC,cAAc,EACdC,cAAc,EACdC,KAAK,EACLC,QAAQ,EACRC,cAAc,EACdC,mBAAmB,EACtB,GAAGX;QAEJ,IAAI,CAACE,YAAY;YAIb,IAAIU,YAAY;YAChB,IAAI;gBACA,MAAM,EAAEC,MAAM,EAAE,GAAGC,MAAM,IAAI,CAAC,OAAO;oBAAC;oBAAU;iBAAc;gBAC9DF,YAAYC,OAAO,IAAI;YAC3B,EAAE,OAAM,CAAC;YAET,IAAID,WAAW;gBACX,IAAI,CAAC,EAAE,CAAC,KAAK,CACTG,MAAM,GAAG,CAAC,qEACN,SACAH,UACK,KAAK,CAAC,MACN,GAAG,CAACI,CAAAA;oBACD,MAAMC,UAAUD,KAAK,KAAK,CAAC;oBAC3B,IA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,IAAI;YACA,MAAMU,OAAOC,KAAK,KAAK,CAACX;YACxB,OAAQU,KAAK,IAAI;gBACb,KAAK;oBACD,IAAI,CAAC,EAAE,CAAC,KAAK,CAACA,KAAK,OAAO;oBAC1B,IAAI,CAACA,KAAK,IAAI,EAAE,OACZ;oBAEJ,IAAI,CAAC,EAAE,CAAC,KAAK,CAACA,KAAK,IAAI,EAAE;oBACzB;gBACJ,KAAK;oBACD,IAAI,CAAC,EAAE,CAAC,IAAI,CAACA,KAAK,OAAO;oBACzB;gBACJ,KAAK;gBACL,KAAK;oBACD,IAAI,CAAC,EAAE,CAAC,OAAO,CAACA,KAAK,OAAO;oBAC5B;gBACJ,KAAK;gBACL,KAAK;oBACD,IAAI,CAAC,EAAE,CAAC,OAAO,CAACA,KAAK,OAAO;oBAC5B;gBACJ,KAAK;gBACL,KAAK;oBACD,IAAI,CAAC,EAAE,CAAC,KAAK,CAACA,KAAK,OAAO;oBAC1B,IAAI,CAACA,KAAK,IAAI,EAAE,OACZ;oBAEJ,IAAI,CAAC,EAAE,CAAC,KAAK,CAACA,KAAK,IAAI,EAAE;oBACzB;gBACJ;oBACIE,QAAQ,GAAG,CAACF;YACpB;QACJ,EAAE,OAAM;YACJE,QAAQ,GAAG,CAACZ;QAChB;IACJ;AACJ;AAEO,MAAMa,8CAAwBC,sBAAAA,oBAAqD,CAAC;IACvF,gBAAgBhC;IAChB,cAAc;QAACiC;KAAU;AAC7B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/cli-core",
3
- "version": "0.0.0-unstable.7be00a75a9",
3
+ "version": "0.0.0-unstable.9f53ea597d",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -13,35 +13,35 @@
13
13
  "description": "A command line interface (CLI) for managing Webiny projects.",
14
14
  "license": "MIT",
15
15
  "dependencies": {
16
- "@webiny/di": "0.0.0-unstable.7be00a75a9",
17
- "@webiny/feature": "0.0.0-unstable.7be00a75a9",
18
- "@webiny/project": "0.0.0-unstable.7be00a75a9",
19
- "@webiny/pulumi-sdk": "0.0.0-unstable.7be00a75a9",
20
- "@webiny/telemetry": "0.0.0-unstable.7be00a75a9",
16
+ "@webiny/di": "1.0.2",
17
+ "@webiny/feature": "0.0.0-unstable.9f53ea597d",
18
+ "@webiny/project": "0.0.0-unstable.9f53ea597d",
19
+ "@webiny/pulumi-sdk": "0.0.0-unstable.9f53ea597d",
20
+ "@webiny/telemetry": "0.0.0-unstable.9f53ea597d",
21
21
  "chalk": "5.6.2",
22
22
  "ci-info": "4.4.0",
23
23
  "execa": "5.1.1",
24
24
  "fast-glob": "3.3.3",
25
25
  "find-up": "8.0.0",
26
26
  "get-yarn-workspaces": "1.0.2",
27
- "humanize-duration": "3.33.2",
28
- "inquirer": "13.4.3",
27
+ "humanize-duration": "3.34.0",
28
+ "inquirer": "14.0.2",
29
29
  "load-json-file": "7.0.1",
30
30
  "open": "11.0.0",
31
- "ora": "9.4.0",
31
+ "ora": "9.4.1",
32
32
  "pino": "10.3.1",
33
33
  "pino-pretty": "13.1.3",
34
- "semver": "7.8.0",
35
- "type-fest": "5.6.0",
34
+ "semver": "7.8.5",
35
+ "type-fest": "5.8.0",
36
36
  "write-json-file": "7.0.0",
37
37
  "yargs": "18.0.0",
38
38
  "zod": "4.4.3"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/lodash": "4.17.24",
42
- "@webiny/build-tools": "0.0.0-unstable.7be00a75a9",
42
+ "@webiny/build-tools": "0.0.0-unstable.9f53ea597d",
43
43
  "rimraf": "6.1.3",
44
- "typescript": "6.0.3"
44
+ "typescript": "7.0.2"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"
@@ -4,7 +4,7 @@ import node_path from "node:path";
4
4
  import { findUpSync } from "find-up";
5
5
  import { pino } from "pino";
6
6
  import pino_pretty from "pino-pretty";
7
- import * as __rspack_external_node_fs_5ea92f0c from "node:fs";
7
+ import * as __rspack_external_node_fs_1b05aee1 from "node:fs";
8
8
  const DEFAULT_LOG_LEVEL = "info";
9
9
  class DefaultLoggerService {
10
10
  constructor(getArgvService){
@@ -58,11 +58,11 @@ class DefaultLoggerService {
58
58
  const projectRootPath = node_path.dirname(webinyConfigPath);
59
59
  const logsFolderPath = node_path.join(projectRootPath, ".webiny", "logs");
60
60
  const logsFileName = this.getLogFileName();
61
- if (!__rspack_external_node_fs_5ea92f0c.existsSync(logsFolderPath)) __rspack_external_node_fs_5ea92f0c.mkdirSync(logsFolderPath, {
61
+ if (!__rspack_external_node_fs_1b05aee1.existsSync(logsFolderPath)) __rspack_external_node_fs_1b05aee1.mkdirSync(logsFolderPath, {
62
62
  recursive: true
63
63
  });
64
64
  const logFilePath = node_path.join(logsFolderPath, logsFileName);
65
- return __rspack_external_node_fs_5ea92f0c.createWriteStream(logFilePath, {
65
+ return __rspack_external_node_fs_1b05aee1.createWriteStream(logFilePath, {
66
66
  flags: "a"
67
67
  });
68
68
  }
@@ -4,8 +4,8 @@ export declare class DefaultRunCliRunnerService implements RunCliRunnerService.I
4
4
  constructor(getCliRunnerService: GetCliRunnerService.Interface);
5
5
  execute(): Promise<{
6
6
  [x: string]: unknown;
7
- _: (string | number)[];
8
7
  $0: string;
8
+ _: (string | number)[];
9
9
  }>;
10
10
  }
11
11
  export declare const runCliRunnerService: import("@webiny/di").Implementation<typeof DefaultRunCliRunnerService>;