create-yarn-workspaces 3.0.34 → 3.0.36
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/CHANGELOG.md +48 -0
- package/README.md +34 -11
- package/bin/yarn-ws-init.js +18 -16
- package/bin/yarn-ws-init.js.map +1 -1
- package/index.d.ts +22 -82
- package/index.js +43 -303
- package/index.js.map +1 -1
- package/lib/check-env.d.ts +42 -0
- package/lib/check-env.js +87 -0
- package/lib/check-env.js.map +1 -0
- package/lib/core.d.ts +85 -0
- package/lib/core.js +273 -0
- package/lib/core.js.map +1 -0
- package/lib/index.d.ts +4 -5
- package/lib/index.js +15 -18
- package/lib/index.js.map +1 -1
- package/lib/package.demo.json +1 -1
- package/lib/util.d.ts +4 -5
- package/lib/util.js +10 -9
- package/lib/util.js.map +1 -1
- package/package.json +13 -8
- package/yargs-setting.d.ts +3 -10
- package/yargs-setting.js +11 -14
- package/yargs-setting.js.map +1 -1
package/yargs-setting.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* Yargs 命令列參數設定模組
|
|
4
|
-
* Yargs Command Line Arguments Configuration Module
|
|
5
4
|
*
|
|
6
5
|
* 提供 Workspaces 初始化相關的命令列參數設定與驗證
|
|
7
|
-
* Provides command line argument configuration and validation for
|
|
8
|
-
* workspace initialization
|
|
9
6
|
*
|
|
10
7
|
* @author user
|
|
11
8
|
* @since 2019/5/16
|
|
@@ -15,19 +12,13 @@ exports.setupWorkspacesInitToYargs = setupWorkspacesInitToYargs;
|
|
|
15
12
|
const yargs_setting_1 = require("@yarn-tool/fix-all/lib/util/yargs-setting");
|
|
16
13
|
/**
|
|
17
14
|
* 設定 Workspaces 初始化相關的 Yargs 選項
|
|
18
|
-
* Setup Yargs options for workspaces initialization
|
|
19
15
|
*
|
|
20
16
|
* 配置命令列參數,包含:
|
|
21
17
|
* - name: Package 名稱
|
|
22
18
|
* - ignoreExistsPackage: 忽略已存在的 Package
|
|
23
19
|
* - ignoreParentWorkspaces: 忽略父層 Workspaces
|
|
24
20
|
* - debug: 啟用除錯模式
|
|
25
|
-
*
|
|
26
|
-
* Configures command line arguments including:
|
|
27
|
-
* - name: Package name
|
|
28
|
-
* - ignoreExistsPackage: Ignore existing package
|
|
29
|
-
* - ignoreParentWorkspaces: Ignore parent workspaces
|
|
30
|
-
* - debug: Enable debug mode
|
|
21
|
+
* - interactive: 啟用互動介面
|
|
31
22
|
*
|
|
32
23
|
* @template T - Yargs 參數類型 / Yargs argument type
|
|
33
24
|
* @param yargs - Yargs 實例 / Yargs instance
|
|
@@ -40,7 +31,6 @@ function setupWorkspacesInitToYargs(yargs) {
|
|
|
40
31
|
})
|
|
41
32
|
/**
|
|
42
33
|
* Package 名稱選項
|
|
43
|
-
* Package name option
|
|
44
34
|
*/
|
|
45
35
|
.option('name', {
|
|
46
36
|
alias: ['n'],
|
|
@@ -50,7 +40,6 @@ function setupWorkspacesInitToYargs(yargs) {
|
|
|
50
40
|
})
|
|
51
41
|
/**
|
|
52
42
|
* 忽略已存在 Package 選項
|
|
53
|
-
* Ignore existing package option
|
|
54
43
|
*/
|
|
55
44
|
.option('ignoreExistsPackage', {
|
|
56
45
|
boolean: true,
|
|
@@ -58,17 +47,25 @@ function setupWorkspacesInitToYargs(yargs) {
|
|
|
58
47
|
})
|
|
59
48
|
/**
|
|
60
49
|
* 忽略父層 Workspaces 選項
|
|
61
|
-
* Ignore parent workspaces option
|
|
62
50
|
*/
|
|
63
51
|
.option('ignoreParentWorkspaces', {
|
|
64
52
|
boolean: true,
|
|
65
53
|
})
|
|
66
54
|
/**
|
|
67
55
|
* 除錯模式選項
|
|
68
|
-
* Debug mode option
|
|
69
56
|
*/
|
|
70
57
|
.option('debug', {
|
|
71
58
|
boolean: true,
|
|
59
|
+
})
|
|
60
|
+
/**
|
|
61
|
+
* 互動介面選項
|
|
62
|
+
*
|
|
63
|
+
* 預設啟用,可用 --no-interactive 關閉;
|
|
64
|
+
* 環境不具備 TTY 時自動退回警告並繼續執行。
|
|
65
|
+
*/
|
|
66
|
+
.option('interactive', {
|
|
67
|
+
boolean: true,
|
|
68
|
+
default: true,
|
|
72
69
|
});
|
|
73
70
|
return _return;
|
|
74
71
|
}
|
package/yargs-setting.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yargs-setting.js","sourceRoot":"","sources":["yargs-setting.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"yargs-setting.js","sourceRoot":"","sources":["yargs-setting.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAoBH,gEA+CC;AA/DD,6EAA+F;AAE/F;;;;;;;;;;;;;GAaG;AACH,SAAgB,0BAA0B,CAAgB,KAAc;IAEvE,MAAM,OAAO,GAAG,IAAA,4BAAkB,EAAC,KAAK,CAAC;SACvC,OAAO,CAAC;IACR,uBAAuB;KACvB,CAAC;QACF;;WAEG;SACF,MAAM,CAAC,MAAM,EAAE;QACf,KAAK,EAAE,CAAC,GAAG,CAAC;QACZ,WAAW,EAAE,IAAI;QACjB,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,QAAQ;KACd,CAAC;QACF;;WAEG;SACF,MAAM,CAAC,qBAAqB,EAAE;QAC9B,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,CAAC,GAAG,CAAC;KACZ,CAAC;QACF;;WAEG;SACF,MAAM,CAAC,wBAAwB,EAAE;QACjC,OAAO,EAAE,IAAI;KACb,CAAC;QACF;;WAEG;SACF,MAAM,CAAC,OAAO,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;QACF;;;;;WAKG;SACF,MAAM,CAAC,aAAa,EAAE;QACtB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;KACb,CAAC,CACF;IAED,OAAO,OAAO,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,kBAAe,0BAA0B,CAAA","sourcesContent":["/**\n * Yargs 命令列參數設定模組\n *\n * 提供 Workspaces 初始化相關的命令列參數設定與驗證\n *\n * @author user\n * @since 2019/5/16\n */\n\nimport yargs from 'yargs';\nimport { Argv, Omit } from 'yargs';\nimport { setupToYargs as setupFixAllToYargs } from '@yarn-tool/fix-all/lib/util/yargs-setting';\n\n/**\n * 設定 Workspaces 初始化相關的 Yargs 選項\n *\n * 配置命令列參數,包含:\n * - name: Package 名稱\n * - ignoreExistsPackage: 忽略已存在的 Package\n * - ignoreParentWorkspaces: 忽略父層 Workspaces\n * - debug: 啟用除錯模式\n * - interactive: 啟用互動介面\n *\n * @template T - Yargs 參數類型 / Yargs argument type\n * @param yargs - Yargs 實例 / Yargs instance\n * @returns 配置後的 Yargs 實例 / Configured Yargs instance\n */\nexport function setupWorkspacesInitToYargs<T extends any>(yargs: Argv<T>)\n{\n\tconst _return = setupFixAllToYargs(yargs)\n\t\t.default({\n\t\t\t//input: process.cwd(),\n\t\t})\n\t\t/**\n\t\t * Package 名稱選項\n\t\t */\n\t\t.option('name', {\n\t\t\talias: ['n'],\n\t\t\trequiresArg: true,\n\t\t\tnormalize: true,\n\t\t\ttype: 'string',\n\t\t})\n\t\t/**\n\t\t * 忽略已存在 Package 選項\n\t\t */\n\t\t.option('ignoreExistsPackage', {\n\t\t\tboolean: true,\n\t\t\talias: ['i'],\n\t\t})\n\t\t/**\n\t\t * 忽略父層 Workspaces 選項\n\t\t */\n\t\t.option('ignoreParentWorkspaces', {\n\t\t\tboolean: true,\n\t\t})\n\t\t/**\n\t\t * 除錯模式選項\n\t\t */\n\t\t.option('debug', {\n\t\t\tboolean: true,\n\t\t})\n\t\t/**\n\t\t * 互動介面選項\n\t\t *\n\t\t * 預設啟用,可用 --no-interactive 關閉;\n\t\t * 環境不具備 TTY 時自動退回警告並繼續執行。\n\t\t */\n\t\t.option('interactive', {\n\t\t\tboolean: true,\n\t\t\tdefault: true,\n\t\t})\n\t;\n\n\treturn _return;\n}\n\n/**\n * 預設導出設定函式\n * Default export of setup function\n */\nexport default setupWorkspacesInitToYargs\n"]}
|