@blocklet/component-studio-cli 0.5.5 → 0.5.6
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.
- package/dist/utils/helper.js +3 -4
- package/package.json +1 -1
- package/templates/init/0-basic/.npmrc_example +5 -0
- package/templates/init/0-basic/package.json +1 -2
- package/templates/init/1-professional/.npmrc_example +5 -0
- package/templates/init/1-professional/package.json +1 -2
- package/templates/init/2-blank/.npmrc_example +5 -0
- package/templates/init/2-blank/package.json +1 -2
- package/templates/workspace/vite.config.ts +1 -0
package/dist/utils/helper.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
import { execSync,
|
|
2
|
+
import { execSync, exec } from 'child_process';
|
|
3
3
|
import fs from 'fs-extra';
|
|
4
4
|
import { glob } from 'glob';
|
|
5
5
|
import inquirer from 'inquirer';
|
|
@@ -9,7 +9,7 @@ import { readdir, mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
|
9
9
|
import { join, resolve, dirname, basename, relative } from 'node:path';
|
|
10
10
|
import ora from 'ora';
|
|
11
11
|
import os from 'os';
|
|
12
|
-
const workspaceVersion = '0.1.
|
|
12
|
+
const workspaceVersion = '0.1.2';
|
|
13
13
|
const METADATA_FILE_NAME = '@metadata.json';
|
|
14
14
|
// 获取CLI内置的workspace模板路径
|
|
15
15
|
export function getWorkspaceTemplatePath() {
|
|
@@ -105,9 +105,8 @@ export async function installDependencies(dirs, operation = 'install') {
|
|
|
105
105
|
const installPromises = Object.entries(dirs).map(([dirType, dirPath]) => {
|
|
106
106
|
return new Promise((resolve, reject) => {
|
|
107
107
|
let errorOutput = '';
|
|
108
|
-
const depProcess =
|
|
108
|
+
const depProcess = exec("npx -y taze -f -r -w -n '/arcblock|ocap|abtnode|blocklet|did-connect|did-comment|nedb/' latest && pnpm install && pnpm dedupe", {
|
|
109
109
|
cwd: dirPath,
|
|
110
|
-
stdio: ['inherit', 'pipe', 'pipe'], // 将 stdout 和 stderr 设为 pipe
|
|
111
110
|
env: {
|
|
112
111
|
...process.env,
|
|
113
112
|
NODE_ENV: 'development',
|
package/package.json
CHANGED
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
"scripts": {
|
|
8
8
|
"start": "blocklet component dev",
|
|
9
9
|
"dev": "blocklet component dev",
|
|
10
|
-
"update:deps": "
|
|
11
|
-
"deduplicate": "pnpm dedupe"
|
|
10
|
+
"update:deps": "blocklet component update"
|
|
12
11
|
},
|
|
13
12
|
"lint-staged": {
|
|
14
13
|
"*.{js,jsx,ts,tsx}": [
|
|
@@ -18,8 +18,7 @@
|
|
|
18
18
|
"format": "biome format --write .",
|
|
19
19
|
"prepare": "npx -y simple-git-hooks",
|
|
20
20
|
"bump-version": "zx --quiet scripts/bump-version.mjs",
|
|
21
|
-
"update:deps": "
|
|
22
|
-
"deduplicate": "pnpm dedupe"
|
|
21
|
+
"update:deps": "blocklet component update"
|
|
23
22
|
},
|
|
24
23
|
"lint-staged": {
|
|
25
24
|
"*.{mjs,js,jsx,ts,tsx,css,less,scss,json,graphql}": [
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
"scripts": {
|
|
8
8
|
"start": "blocklet component dev",
|
|
9
9
|
"dev": "blocklet component dev",
|
|
10
|
-
"update:deps": "
|
|
11
|
-
"deduplicate": "pnpm dedupe"
|
|
10
|
+
"update:deps": "blocklet component update"
|
|
12
11
|
},
|
|
13
12
|
"lint-staged": {
|
|
14
13
|
"*.{js,jsx,ts,tsx}": [
|