@farris/cli 2.2.4 → 2.2.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/lib/commands/build-components.js +50 -50
- package/lib/commands/build-components.js.map +1 -1
- package/lib/commands/build-css.js +38 -38
- package/lib/commands/build-css.js.map +1 -1
- package/lib/commands/build-lib.js +25 -25
- package/lib/commands/build.js +14 -14
- package/lib/commands/build.js.map +1 -1
- package/lib/commands/create-app-options.js +74 -74
- package/lib/commands/create-app-options.js.map +1 -1
- package/lib/commands/create-app.js +126 -126
- package/lib/commands/create-app.js.map +1 -1
- package/lib/commands/create-options.js +29 -29
- package/lib/commands/create-options.js.map +1 -1
- package/lib/commands/create.js +224 -202
- package/lib/commands/create.js.map +1 -1
- package/lib/commands/dev-serve.js +18 -18
- package/lib/commands/extract-i18n.js +74 -74
- package/lib/commands/extract-i18n.js.map +1 -1
- package/lib/commands/generate/api.js +124 -124
- package/lib/commands/generate/api.js.map +1 -1
- package/lib/commands/generate/common.js +100 -100
- package/lib/commands/generate/common.js.map +1 -1
- package/lib/commands/generate/component.js +156 -156
- package/lib/commands/generate/component.js.map +1 -1
- package/lib/commands/generate/view.js +168 -168
- package/lib/commands/generate/view.js.map +1 -1
- package/lib/commands/preview-serve.js +16 -16
- package/lib/commands/workspace/add-app.js +180 -180
- package/lib/commands/workspace/add-app.js.map +1 -1
- package/lib/commands/workspace/create.js +379 -379
- package/lib/commands/workspace/create.js.map +1 -1
- package/lib/commands/workspace/inspect.js +30 -30
- package/lib/commands/workspace/inspect.js.map +1 -1
- package/lib/commands/workspace/verify.js +38 -38
- package/lib/commands/workspace/verify.js.map +1 -1
- package/lib/common/apply-catalog-deps.js +15 -15
- package/lib/common/apply-catalog-deps.js.map +1 -1
- package/lib/common/component-file-name.js +3 -3
- package/lib/common/constant.js +64 -64
- package/lib/common/constant.js.map +1 -1
- package/lib/common/create-app-target.js +46 -46
- package/lib/common/create-app-target.js.map +1 -1
- package/lib/common/generate-app.js +85 -85
- package/lib/common/generate-app.js.map +1 -1
- package/lib/common/get-dependencies.js +9 -9
- package/lib/common/get-farris-config.js +25 -25
- package/lib/common/get-farris-config.js.map +1 -1
- package/lib/common/get-version.js +6 -6
- package/lib/common/get-vite-config.js +106 -106
- package/lib/common/get-vite-config.js.map +1 -1
- package/lib/common/lib-package-exports.js +24 -24
- package/lib/common/lib-package-exports.js.map +1 -1
- package/lib/common/list-lib-components.js +23 -23
- package/lib/common/list-lib-components.js.map +1 -1
- package/lib/common/output.js +94 -94
- package/lib/common/output.js.map +1 -1
- package/lib/common/project-package-name.js +4 -4
- package/lib/common/safety.js +171 -171
- package/lib/common/safety.js.map +1 -1
- package/lib/common/template-manifest.js +16 -16
- package/lib/common/template-manifest.js.map +1 -1
- package/lib/common/template-renderer.js +114 -114
- package/lib/common/template-renderer.js.map +1 -1
- package/lib/common/transaction.js +83 -83
- package/lib/common/transaction.js.map +1 -1
- package/lib/common/verifier.js +150 -150
- package/lib/common/verifier.js.map +1 -1
- package/lib/config/vite-app.js +13 -13
- package/lib/config/vite-common.js +20 -20
- package/lib/config/vite-common.js.map +1 -1
- package/lib/config/vite-component.js +32 -32
- package/lib/config/vite-component.js.map +1 -1
- package/lib/config/vite-lib.js +26 -26
- package/lib/index.js +205 -205
- package/lib/index.js.map +1 -1
- package/lib/plugins/create-component-style.js +44 -44
- package/lib/plugins/create-package-json.js +48 -48
- package/lib/plugins/create-package-json.js.map +1 -1
- package/lib/plugins/dts.js +8 -8
- package/lib/plugins/html-system.js +9 -9
- package/lib/plugins/replace.js +17 -17
- package/lib/plugins/systemjs-bundle.js +15 -15
- package/lib/plugins/systemjs-bundle.js.map +1 -1
- package/package.json +1 -1
- package/templates/create/.npmrc.tpl +1 -0
- package/templates/lib/package.json +1 -1
- package/templates/mobile/package.json +1 -1
- package/templates/mobile/project.json +1 -1
- package/templates/web/package.json +1 -1
- package/templates/web/project.json +1 -1
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
-
import { resolve } from 'node:path';
|
|
3
|
-
import ora from 'ora';
|
|
4
|
-
import { buildCommon } from './build.js';
|
|
5
|
-
import { buildCss } from './build-css.js';
|
|
6
|
-
import { CWD } from '../common/constant.js';
|
|
7
|
-
import { getFarrisConfigAsync } from '../common/get-farris-config.js';
|
|
8
|
-
import { listLibComponents } from '../common/list-lib-components.js';
|
|
9
|
-
export async function buildComponents(options) {
|
|
10
|
-
const farris = await getFarrisConfigAsync(options.configFile);
|
|
11
|
-
const names = listLibComponents(process.cwd(), farris.excludeComponents);
|
|
12
|
-
if (names.length === 0) {
|
|
13
|
-
throw new Error('未找到可构建的组件(components/*/index.ts)');
|
|
14
|
-
}
|
|
15
|
-
const componentOutDir = farris.componentOutDir || './package/components';
|
|
16
|
-
const outDir = farris.outDir || 'lib';
|
|
17
|
-
// Relative to Vite root. Absolute Windows paths get realpath'd (f: → F:)
|
|
18
|
-
// and break plugin-vue SFC subrequests.
|
|
19
|
-
const entry = Object.fromEntries(names.map((name) => [name, `components/${name}/index.ts`]));
|
|
20
|
-
const spinner = ora('build components begin').start();
|
|
21
|
-
spinner.text = 'building components';
|
|
22
|
-
await buildCommon({
|
|
23
|
-
...options,
|
|
24
|
-
type: 'component',
|
|
25
|
-
config: {
|
|
26
|
-
publicDir: '',
|
|
27
|
-
build: {
|
|
28
|
-
emptyOutDir: false,
|
|
29
|
-
lib: { entry },
|
|
30
|
-
outDir: resolve(CWD, componentOutDir)
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
const cssFiles = [];
|
|
35
|
-
for (const name of names) {
|
|
36
|
-
const scss = resolve(CWD, 'components', name, 'src', `${name}.scss`);
|
|
37
|
-
if (!existsSync(scss)) {
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
const outfile = resolve(CWD, componentOutDir, name, 'index.css');
|
|
41
|
-
await buildCss({ ...options, entry: scss, outfile, showSpinner: false });
|
|
42
|
-
cssFiles.push(outfile);
|
|
43
|
-
}
|
|
44
|
-
if (cssFiles.length > 0) {
|
|
45
|
-
const aggregateDir = resolve(CWD, outDir);
|
|
46
|
-
mkdirSync(aggregateDir, { recursive: true });
|
|
47
|
-
writeFileSync(resolve(aggregateDir, 'index.css'), cssFiles.map((file) => readFileSync(file, 'utf-8')).join('\n'));
|
|
48
|
-
}
|
|
49
|
-
spinner.succeed('build components success');
|
|
50
|
-
}
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import ora from 'ora';
|
|
4
|
+
import { buildCommon } from './build.js';
|
|
5
|
+
import { buildCss } from './build-css.js';
|
|
6
|
+
import { CWD } from '../common/constant.js';
|
|
7
|
+
import { getFarrisConfigAsync } from '../common/get-farris-config.js';
|
|
8
|
+
import { listLibComponents } from '../common/list-lib-components.js';
|
|
9
|
+
export async function buildComponents(options) {
|
|
10
|
+
const farris = await getFarrisConfigAsync(options.configFile);
|
|
11
|
+
const names = listLibComponents(process.cwd(), farris.excludeComponents);
|
|
12
|
+
if (names.length === 0) {
|
|
13
|
+
throw new Error('未找到可构建的组件(components/*/index.ts)');
|
|
14
|
+
}
|
|
15
|
+
const componentOutDir = farris.componentOutDir || './package/components';
|
|
16
|
+
const outDir = farris.outDir || 'lib';
|
|
17
|
+
// Relative to Vite root. Absolute Windows paths get realpath'd (f: → F:)
|
|
18
|
+
// and break plugin-vue SFC subrequests.
|
|
19
|
+
const entry = Object.fromEntries(names.map((name) => [name, `components/${name}/index.ts`]));
|
|
20
|
+
const spinner = ora('build components begin').start();
|
|
21
|
+
spinner.text = 'building components';
|
|
22
|
+
await buildCommon({
|
|
23
|
+
...options,
|
|
24
|
+
type: 'component',
|
|
25
|
+
config: {
|
|
26
|
+
publicDir: '',
|
|
27
|
+
build: {
|
|
28
|
+
emptyOutDir: false,
|
|
29
|
+
lib: { entry },
|
|
30
|
+
outDir: resolve(CWD, componentOutDir)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const cssFiles = [];
|
|
35
|
+
for (const name of names) {
|
|
36
|
+
const scss = resolve(CWD, 'components', name, 'src', `${name}.scss`);
|
|
37
|
+
if (!existsSync(scss)) {
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
const outfile = resolve(CWD, componentOutDir, name, 'index.css');
|
|
41
|
+
await buildCss({ ...options, entry: scss, outfile, showSpinner: false });
|
|
42
|
+
cssFiles.push(outfile);
|
|
43
|
+
}
|
|
44
|
+
if (cssFiles.length > 0) {
|
|
45
|
+
const aggregateDir = resolve(CWD, outDir);
|
|
46
|
+
mkdirSync(aggregateDir, { recursive: true });
|
|
47
|
+
writeFileSync(resolve(aggregateDir, 'index.css'), cssFiles.map((file) => readFileSync(file, 'utf-8')).join('\n'));
|
|
48
|
+
}
|
|
49
|
+
spinner.succeed('build components success');
|
|
50
|
+
}
|
|
51
51
|
//# sourceMappingURL=build-components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-components.js","sourceRoot":"","sources":["../../src/commands/build-components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAsB,WAAW,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,OAA2B;IAC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,CAAC,CAAC;QAC7C,aAAa,CACX,OAAO,CAAC,YAAY,EAAE,WAAW,CAAC,EAClC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAC/D,CAAC;KACH;IAED,OAAO,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { build } from "esbuild";
|
|
2
|
-
import { sassPlugin } from 'esbuild-sass-plugin';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { CWD } from "../common/constant.js";
|
|
5
|
-
import ora from "ora";
|
|
6
|
-
const replaceUrl = (source, pathname, entry) => {
|
|
7
|
-
const basedir = path.dirname(pathname);
|
|
8
|
-
const entrydir = path.resolve(CWD, path.dirname(entry));
|
|
9
|
-
const relativedir = path.relative(entrydir, basedir);
|
|
10
|
-
const regExp = /(url\(['"]?)(\.\.?\/[^'")]+['"]?)(\))/g;
|
|
11
|
-
return source.replace(regExp, (substring, ...args) => `url(./${path.join(relativedir, args[1]).replaceAll('\\', '/')})`);
|
|
12
|
-
};
|
|
13
|
-
export async function buildCss(options) {
|
|
14
|
-
const { entry, outfile, minify = false, showSpinner = true } = options;
|
|
15
|
-
const spinner = ora(`build css begin`).start();
|
|
16
|
-
spinner.text = `building css`;
|
|
17
|
-
if (!showSpinner) {
|
|
18
|
-
spinner.stop();
|
|
19
|
-
}
|
|
20
|
-
await build({
|
|
21
|
-
entryPoints: [entry],
|
|
22
|
-
outfile,
|
|
23
|
-
minify,
|
|
24
|
-
bundle: true,
|
|
25
|
-
logLevel: 'error',
|
|
26
|
-
plugins: [sassPlugin({
|
|
27
|
-
precompile(source, pathname) {
|
|
28
|
-
return replaceUrl(source, pathname, entry);
|
|
29
|
-
}
|
|
30
|
-
})],
|
|
31
|
-
loader: {
|
|
32
|
-
'.ttf': 'dataurl'
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
if (showSpinner) {
|
|
36
|
-
spinner.succeed(`build css success`);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
import { build } from "esbuild";
|
|
2
|
+
import { sassPlugin } from 'esbuild-sass-plugin';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { CWD } from "../common/constant.js";
|
|
5
|
+
import ora from "ora";
|
|
6
|
+
const replaceUrl = (source, pathname, entry) => {
|
|
7
|
+
const basedir = path.dirname(pathname);
|
|
8
|
+
const entrydir = path.resolve(CWD, path.dirname(entry));
|
|
9
|
+
const relativedir = path.relative(entrydir, basedir);
|
|
10
|
+
const regExp = /(url\(['"]?)(\.\.?\/[^'")]+['"]?)(\))/g;
|
|
11
|
+
return source.replace(regExp, (substring, ...args) => `url(./${path.join(relativedir, args[1]).replaceAll('\\', '/')})`);
|
|
12
|
+
};
|
|
13
|
+
export async function buildCss(options) {
|
|
14
|
+
const { entry, outfile, minify = false, showSpinner = true } = options;
|
|
15
|
+
const spinner = ora(`build css begin`).start();
|
|
16
|
+
spinner.text = `building css`;
|
|
17
|
+
if (!showSpinner) {
|
|
18
|
+
spinner.stop();
|
|
19
|
+
}
|
|
20
|
+
await build({
|
|
21
|
+
entryPoints: [entry],
|
|
22
|
+
outfile,
|
|
23
|
+
minify,
|
|
24
|
+
bundle: true,
|
|
25
|
+
logLevel: 'error',
|
|
26
|
+
plugins: [sassPlugin({
|
|
27
|
+
precompile(source, pathname) {
|
|
28
|
+
return replaceUrl(source, pathname, entry);
|
|
29
|
+
}
|
|
30
|
+
})],
|
|
31
|
+
loader: {
|
|
32
|
+
'.ttf': 'dataurl'
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
if (showSpinner) {
|
|
36
|
+
spinner.succeed(`build css success`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
39
|
//# sourceMappingURL=build-css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3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AE,CAAC;KAChB;IAGD,MAAM,KAAK,CAAC;QACV,WAAW,EAAE,CAAC,KAAK,CAAC;QACpB,OAAO;QACP,MAAM;QACN,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,CAAC,UAAU,CAAC;gBACnB,UAAU,CAAC,MAAM,EAAE,QAAQ;oBACzB,OAAO,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;gBAC7C,CAAC;aACF,CAAC,CAAC;QACH,MAAM,EAAE;YACN,MAAM,EAAE,SAAS;SAClB;KACF,CAAC,CAAC;IAEH,IAAG,WAAW,EAAE;QACd,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;KACtC;AACH,CAAC"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import ora from 'ora';
|
|
2
|
-
import { resolve } from 'node:path';
|
|
3
|
-
import { buildCommon } from "./build.js";
|
|
4
|
-
import { generateTypes } from "../plugins/dts.js";
|
|
5
|
-
import { createPackageJson } from '../plugins/create-package-json.js';
|
|
6
|
-
import { getFarrisConfigAsync } from '../common/get-farris-config.js';
|
|
7
|
-
import { CWD } from '../common/constant.js';
|
|
8
|
-
export async function buildLib(options) {
|
|
9
|
-
const { dts = true, emitPackage } = options;
|
|
10
|
-
const farrisConfig = await getFarrisConfigAsync(options.configFile);
|
|
11
|
-
const outDir = farrisConfig.outDir || 'lib';
|
|
12
|
-
const typesDir = resolve(CWD, outDir, 'types');
|
|
13
|
-
const config = {
|
|
14
|
-
publicDir: '',
|
|
15
|
-
plugins: [
|
|
16
|
-
dts && generateTypes('./components', typesDir),
|
|
17
|
-
emitPackage && createPackageJson()
|
|
18
|
-
]
|
|
19
|
-
};
|
|
20
|
-
const spinner = ora(`build lib begin`).start();
|
|
21
|
-
spinner.text = `building lib`;
|
|
22
|
-
await buildCommon({ ...options, config, type: 'lib' });
|
|
23
|
-
spinner.succeed(`build lib success`);
|
|
24
|
-
}
|
|
25
|
-
;
|
|
1
|
+
import ora from 'ora';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import { buildCommon } from "./build.js";
|
|
4
|
+
import { generateTypes } from "../plugins/dts.js";
|
|
5
|
+
import { createPackageJson } from '../plugins/create-package-json.js';
|
|
6
|
+
import { getFarrisConfigAsync } from '../common/get-farris-config.js';
|
|
7
|
+
import { CWD } from '../common/constant.js';
|
|
8
|
+
export async function buildLib(options) {
|
|
9
|
+
const { dts = true, emitPackage } = options;
|
|
10
|
+
const farrisConfig = await getFarrisConfigAsync(options.configFile);
|
|
11
|
+
const outDir = farrisConfig.outDir || 'lib';
|
|
12
|
+
const typesDir = resolve(CWD, outDir, 'types');
|
|
13
|
+
const config = {
|
|
14
|
+
publicDir: '',
|
|
15
|
+
plugins: [
|
|
16
|
+
dts && generateTypes('./components', typesDir),
|
|
17
|
+
emitPackage && createPackageJson()
|
|
18
|
+
]
|
|
19
|
+
};
|
|
20
|
+
const spinner = ora(`build lib begin`).start();
|
|
21
|
+
spinner.text = `building lib`;
|
|
22
|
+
await buildCommon({ ...options, config, type: 'lib' });
|
|
23
|
+
spinner.succeed(`build lib success`);
|
|
24
|
+
}
|
|
25
|
+
;
|
|
26
26
|
//# sourceMappingURL=build-lib.js.map
|
package/lib/commands/build.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { build, mergeConfig, loadConfigFromFile } from 'vite';
|
|
2
|
-
import { getViteConfig } from '../common/get-vite-config.js';
|
|
3
|
-
export async function buildCommon(options, loadFile = true) {
|
|
4
|
-
const { configFile, viteConfigFile, config = {}, type, base, mode = 'production' } = options;
|
|
5
|
-
if (!loadFile) {
|
|
6
|
-
await build(config);
|
|
7
|
-
return config;
|
|
8
|
-
}
|
|
9
|
-
const viteConfig = await loadConfigFromFile({ command: 'build', mode }, viteConfigFile);
|
|
10
|
-
const defaultConfig = await getViteConfig(type, configFile, { base, mode });
|
|
11
|
-
const finalConfig = mergeConfig(mergeConfig(defaultConfig, viteConfigFile && viteConfig?.config ? viteConfig.config : {}), config);
|
|
12
|
-
await build(finalConfig);
|
|
13
|
-
return finalConfig;
|
|
14
|
-
}
|
|
1
|
+
import { build, mergeConfig, loadConfigFromFile } from 'vite';
|
|
2
|
+
import { getViteConfig } from '../common/get-vite-config.js';
|
|
3
|
+
export async function buildCommon(options, loadFile = true) {
|
|
4
|
+
const { configFile, viteConfigFile, config = {}, type, base, mode = 'production' } = options;
|
|
5
|
+
if (!loadFile) {
|
|
6
|
+
await build(config);
|
|
7
|
+
return config;
|
|
8
|
+
}
|
|
9
|
+
const viteConfig = await loadConfigFromFile({ command: 'build', mode }, viteConfigFile);
|
|
10
|
+
const defaultConfig = await getViteConfig(type, configFile, { base, mode });
|
|
11
|
+
const finalConfig = mergeConfig(mergeConfig(defaultConfig, viteConfigFile && viteConfig?.config ? viteConfig.config : {}), config);
|
|
12
|
+
await build(finalConfig);
|
|
13
|
+
return finalConfig;
|
|
14
|
+
}
|
|
15
15
|
//# sourceMappingURL=build.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAW7D,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,OAA2B,EAAE,QAAQ,GAAG,IAAI;IAC5E,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;IAE7F,IAAI,CAAC,QAAQ,EAAE
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAW7D,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,OAA2B,EAAE,QAAQ,GAAG,IAAI;IAC5E,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;IAE7F,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC;QACpB,OAAO,MAAM,CAAC;KACf;IAED,MAAM,UAAU,GAAG,MAAM,kBAAkB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,cAAc,CAAC,CAAC;IAExF,MAAM,aAAa,GAAG,MAAM,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAE5E,MAAM,WAAW,GAAG,WAAW,CAC7B,WAAW,CAAC,aAAa,EAAE,cAAc,IAAI,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EACzF,MAAM,CACP,CAAC;IAEF,MAAM,KAAK,CAAC,WAAW,CAAC,CAAC;IAEzB,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { existsSync } from 'node:fs';
|
|
2
|
-
import { resolve } from 'node:path';
|
|
3
|
-
import { ExitCode } from '../common/constant.js';
|
|
4
|
-
import { assertTargetInsideCwd, CreateAppError, resolvePackageName } from '../common/create-app-target.js';
|
|
5
|
-
import { toProjectPackageName } from '../common/project-package-name.js';
|
|
6
|
-
export { toProjectPackageName };
|
|
7
|
-
export { assertTargetInsideCwd, CreateAppError, resolvePackageName };
|
|
8
|
-
export const ALLOWED_TYPES = ['app', 'lib'];
|
|
9
|
-
export const ALLOWED_PLATFORMS = ['web', 'mobile'];
|
|
10
|
-
export const ALLOWED_FORMATS = ['es', 'cjs', 'umd', 'systemjs'];
|
|
11
|
-
export const DEFAULT_NAME = 'my-project';
|
|
12
|
-
export const DEFAULT_LIB_FORMATS = ['es', 'cjs', 'umd'];
|
|
13
|
-
export const DEFAULT_APP_FORMAT = 'es';
|
|
14
|
-
export const DEFAULT_PLATFORM = 'web';
|
|
15
|
-
function assertAllowed(kind, value, allowed) {
|
|
16
|
-
if (!allowed.includes(value)) {
|
|
17
|
-
throw new CreateAppError(`非法的 ${kind}: ${value},允许值为 ${allowed.join(', ')}`);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
export function parseFormatsFlag(raw) {
|
|
21
|
-
if (raw === undefined) {
|
|
22
|
-
return undefined;
|
|
23
|
-
}
|
|
24
|
-
const parts = raw.split(',').map((part) => part.trim());
|
|
25
|
-
if (parts.length === 0 || parts.some((part) => part === '')) {
|
|
26
|
-
throw new CreateAppError('非法的 --formats: 不能为空');
|
|
27
|
-
}
|
|
28
|
-
parts.forEach((part) => assertAllowed('--formats', part, ALLOWED_FORMATS));
|
|
29
|
-
return parts;
|
|
30
|
-
}
|
|
31
|
-
export function validateCliInput(input) {
|
|
32
|
-
if (input.type !== undefined) {
|
|
33
|
-
assertAllowed('--type', input.type, ALLOWED_TYPES);
|
|
34
|
-
}
|
|
35
|
-
if (input.platform !== undefined) {
|
|
36
|
-
assertAllowed('--platform', input.platform, ALLOWED_PLATFORMS);
|
|
37
|
-
}
|
|
38
|
-
if (input.format !== undefined) {
|
|
39
|
-
assertAllowed('--format', input.format, ALLOWED_FORMATS);
|
|
40
|
-
}
|
|
41
|
-
if (input.formats !== undefined) {
|
|
42
|
-
parseFormatsFlag(input.formats);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
export function resolveNonInteractiveOptions(input) {
|
|
46
|
-
validateCliInput(input);
|
|
47
|
-
if (!input.type) {
|
|
48
|
-
throw new CreateAppError('--type 在使用 -y / --yes 或 --json 时必填');
|
|
49
|
-
}
|
|
50
|
-
const name = input.name && input.name.trim() !== '' ? input.name : DEFAULT_NAME;
|
|
51
|
-
assertTargetInsideCwd(name);
|
|
52
|
-
const packageName = resolvePackageName(name);
|
|
53
|
-
if (input.type === 'lib') {
|
|
54
|
-
return {
|
|
55
|
-
name,
|
|
56
|
-
packageName,
|
|
57
|
-
type: 'lib',
|
|
58
|
-
formats: parseFormatsFlag(input.formats) ?? [...DEFAULT_LIB_FORMATS]
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
62
|
-
name,
|
|
63
|
-
packageName,
|
|
64
|
-
type: 'app',
|
|
65
|
-
platform: input.platform ?? DEFAULT_PLATFORM,
|
|
66
|
-
format: input.format ?? DEFAULT_APP_FORMAT
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
export function assertTargetDirectoryFree(name, cwd = process.cwd()) {
|
|
70
|
-
assertTargetInsideCwd(name, cwd);
|
|
71
|
-
if (existsSync(resolve(cwd, name))) {
|
|
72
|
-
throw new CreateAppError(`目标目录已存在: ${name}`, ExitCode.TARGET_CONFLICT);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import { ExitCode } from '../common/constant.js';
|
|
4
|
+
import { assertTargetInsideCwd, CreateAppError, resolvePackageName } from '../common/create-app-target.js';
|
|
5
|
+
import { toProjectPackageName } from '../common/project-package-name.js';
|
|
6
|
+
export { toProjectPackageName };
|
|
7
|
+
export { assertTargetInsideCwd, CreateAppError, resolvePackageName };
|
|
8
|
+
export const ALLOWED_TYPES = ['app', 'lib'];
|
|
9
|
+
export const ALLOWED_PLATFORMS = ['web', 'mobile'];
|
|
10
|
+
export const ALLOWED_FORMATS = ['es', 'cjs', 'umd', 'systemjs'];
|
|
11
|
+
export const DEFAULT_NAME = 'my-project';
|
|
12
|
+
export const DEFAULT_LIB_FORMATS = ['es', 'cjs', 'umd'];
|
|
13
|
+
export const DEFAULT_APP_FORMAT = 'es';
|
|
14
|
+
export const DEFAULT_PLATFORM = 'web';
|
|
15
|
+
function assertAllowed(kind, value, allowed) {
|
|
16
|
+
if (!allowed.includes(value)) {
|
|
17
|
+
throw new CreateAppError(`非法的 ${kind}: ${value},允许值为 ${allowed.join(', ')}`);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export function parseFormatsFlag(raw) {
|
|
21
|
+
if (raw === undefined) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
const parts = raw.split(',').map((part) => part.trim());
|
|
25
|
+
if (parts.length === 0 || parts.some((part) => part === '')) {
|
|
26
|
+
throw new CreateAppError('非法的 --formats: 不能为空');
|
|
27
|
+
}
|
|
28
|
+
parts.forEach((part) => assertAllowed('--formats', part, ALLOWED_FORMATS));
|
|
29
|
+
return parts;
|
|
30
|
+
}
|
|
31
|
+
export function validateCliInput(input) {
|
|
32
|
+
if (input.type !== undefined) {
|
|
33
|
+
assertAllowed('--type', input.type, ALLOWED_TYPES);
|
|
34
|
+
}
|
|
35
|
+
if (input.platform !== undefined) {
|
|
36
|
+
assertAllowed('--platform', input.platform, ALLOWED_PLATFORMS);
|
|
37
|
+
}
|
|
38
|
+
if (input.format !== undefined) {
|
|
39
|
+
assertAllowed('--format', input.format, ALLOWED_FORMATS);
|
|
40
|
+
}
|
|
41
|
+
if (input.formats !== undefined) {
|
|
42
|
+
parseFormatsFlag(input.formats);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export function resolveNonInteractiveOptions(input) {
|
|
46
|
+
validateCliInput(input);
|
|
47
|
+
if (!input.type) {
|
|
48
|
+
throw new CreateAppError('--type 在使用 -y / --yes 或 --json 时必填');
|
|
49
|
+
}
|
|
50
|
+
const name = input.name && input.name.trim() !== '' ? input.name : DEFAULT_NAME;
|
|
51
|
+
assertTargetInsideCwd(name);
|
|
52
|
+
const packageName = resolvePackageName(name);
|
|
53
|
+
if (input.type === 'lib') {
|
|
54
|
+
return {
|
|
55
|
+
name,
|
|
56
|
+
packageName,
|
|
57
|
+
type: 'lib',
|
|
58
|
+
formats: parseFormatsFlag(input.formats) ?? [...DEFAULT_LIB_FORMATS]
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
name,
|
|
63
|
+
packageName,
|
|
64
|
+
type: 'app',
|
|
65
|
+
platform: input.platform ?? DEFAULT_PLATFORM,
|
|
66
|
+
format: input.format ?? DEFAULT_APP_FORMAT
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export function assertTargetDirectoryFree(name, cwd = process.cwd()) {
|
|
70
|
+
assertTargetInsideCwd(name, cwd);
|
|
71
|
+
if (existsSync(resolve(cwd, name))) {
|
|
72
|
+
throw new CreateAppError(`目标目录已存在: ${name}`, ExitCode.TARGET_CONFLICT);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
75
|
//# sourceMappingURL=create-app-options.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-app-options.js","sourceRoot":"","sources":["../../src/commands/create-app-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAChC,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC;AAErE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,KAAK,CAAU,CAAC;AACrD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,QAAQ,CA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