@chrisluyi/daas-cli 1.5.2 → 1.5.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.
Files changed (2) hide show
  1. package/dist/index.js +10 -6
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -2444,6 +2444,13 @@ function normalizeManifest(raw, cwd) {
2444
2444
  function stripScope(name) {
2445
2445
  return name.replace(/^@[^/]+\//, "").replace(/-/g, "_");
2446
2446
  }
2447
+ // package.json
2448
+ var version = "1.5.4";
2449
+
2450
+ // src/version.ts
2451
+ function getCliVersion() {
2452
+ return process.env.DAAS_CLI_VERSION ?? version;
2453
+ }
2447
2454
 
2448
2455
  // src/output.ts
2449
2456
  function formatSuccess(command, data) {
@@ -2468,9 +2475,6 @@ function writeJsonError(command, exitCode, error, suggestion) {
2468
2475
  `);
2469
2476
  process.exit(exitCode);
2470
2477
  }
2471
- function getCliVersion() {
2472
- return process.env.DAAS_CLI_VERSION ?? "0.0.0";
2473
- }
2474
2478
 
2475
2479
  // src/remote-config.ts
2476
2480
  import { SUPPORTED_CONFIG_VERSION } from "@chrisluyi/daas-rsbuild-config";
@@ -2532,7 +2536,7 @@ async function fetchRemoteConfig(configUrl, fresh = false) {
2532
2536
  }
2533
2537
  }
2534
2538
  function checkCliVersion(remoteMeta) {
2535
- const current = process.env.DAAS_CLI_VERSION ?? "0.0.0";
2539
+ const current = getCliVersion();
2536
2540
  if (!meetsMinVersion(current, remoteMeta.minCliVersion)) {
2537
2541
  throw new CliVersionError(`daas-cli ${current} is below required ${remoteMeta.minCliVersion}. See: ${remoteMeta.releaseNotesUrl}`);
2538
2542
  }
@@ -3675,7 +3679,7 @@ function writeRegionTsconfig(cwd, cfg, region, applyTo) {
3675
3679
  }
3676
3680
  function resetTsconfig(cwd, path) {
3677
3681
  const rel = relative2(cwd, resolve9(cwd, path));
3678
- const show = spawnSync("git", ["show", `HEAD:${rel}`], {
3682
+ const show = spawnSync("git", ["show", `HEAD:./${rel}`], {
3679
3683
  cwd,
3680
3684
  encoding: "utf8"
3681
3685
  });
@@ -3841,7 +3845,7 @@ setLogger5(createLogger5([consolaTransport()]));
3841
3845
  var main = defineCommand({
3842
3846
  meta: {
3843
3847
  name: "daas",
3844
- version: process.env.DAAS_CLI_VERSION ?? "0.0.0",
3848
+ version: getCliVersion(),
3845
3849
  description: "Zero-config MFE build tool powered by rsbuild + Module Federation 2"
3846
3850
  },
3847
3851
  subCommands: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrisluyi/daas-cli",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "daas": "./dist/index.js"
@@ -22,8 +22,8 @@
22
22
  "dependencies": {
23
23
  "@clack/prompts": "^0.7.0",
24
24
  "@chrisluyi/daas-logger": "1.1.1",
25
- "@chrisluyi/daas-rsbuild-config": "1.5.2",
26
- "@chrisluyi/daas-template": "1.5.2",
25
+ "@chrisluyi/daas-rsbuild-config": "1.5.4",
26
+ "@chrisluyi/daas-template": "1.5.4",
27
27
  "@rsbuild/core": "*",
28
28
  "citty": "^0.1.6",
29
29
  "consola": "^3.2.3",