@blocklet/component-studio-cli 0.4.143 → 0.4.145

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.
@@ -15,6 +15,8 @@ async function createDevServer(projectPath, _options) {
15
15
  if (!existsSync(workspacePath)) {
16
16
  const workspaceTemplatePath = getWorkspaceTemplatePath();
17
17
  await fs.copy(workspaceTemplatePath, workspacePath);
18
+ // 修改 workspace 目录中的 .npmrc_example 文件 为 .npmrc,因为 npm 包默认会把 .npmrc 忽略
19
+ await fs.rename(join(workspacePath, '.npmrc_example'), join(workspacePath, '.npmrc'));
18
20
  workspaceSpinner.succeed(chalk.green(`Workspace created successfully! ${workspacePathText}`));
19
21
  }
20
22
  else {
@@ -1,7 +1,7 @@
1
1
  import chalk from 'chalk';
2
2
  import { Command } from 'commander';
3
3
  import fetch from 'node-fetch';
4
- import { createWriteStream, mkdirSync, readdirSync, readFileSync, rmSync } from 'node:fs';
4
+ import { createWriteStream, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
5
5
  import { join, relative } from 'node:path';
6
6
  import { pipeline } from 'node:stream/promises';
7
7
  import ora from 'ora';
@@ -125,7 +125,7 @@ export function createMigrateCommand() {
125
125
  catch (err) {
126
126
  // 是文件,直接复制
127
127
  const content = readFileSync(sourcePath);
128
- require('fs').writeFileSync(targetPath, content);
128
+ writeFileSync(targetPath, content);
129
129
  // 检查index.tsx文件是否引用了@blocklet/pages-kit
130
130
  if (file === 'index.tsx') {
131
131
  if (checkPackageReference(targetPath, '@blocklet/pages-kit')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/component-studio-cli",
3
- "version": "0.4.143",
3
+ "version": "0.4.145",
4
4
  "description": "CLI for Component Studio",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -0,0 +1,5 @@
1
+ ## force pnpm to hoist
2
+ shamefully-hoist=true
3
+ strict-peer-dependencies=false
4
+ node-linker=hoisted
5
+
@@ -1,6 +1,3 @@
1
1
  packages:
2
2
  - '.'
3
3
  - 'projects/*'
4
- shamefullyHoist: true
5
- strictPeerDependencies: false
6
- nodeLinker: hoisted