jiek 2.2.7-alpha.3 → 2.2.7-alpha.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.
- package/.jiek-production-tag +0 -0
- package/dist/.internal/.chunks/{getWD.ZF0avqDB.cjs → filterSupport.4rM7f6jB.cjs} +38 -29
- package/dist/.internal/.chunks/{getWD.D6wq8Qc2.js → filterSupport.BXWpLBpT.js} +37 -28
- package/dist/.internal/.chunks/loadConfig.CFfzkm_p.js +110 -0
- package/dist/.internal/.chunks/loadConfig.OOKddvHF.cjs +117 -0
- package/dist/.internal/bin/common.cjs +743 -0
- package/dist/.internal/bin/common.d.cts +18 -0
- package/dist/.internal/bin/common.d.ts +18 -0
- package/dist/.internal/bin/common.js +736 -0
- package/dist/.internal/utils/filterSupport.cjs +1 -3
- package/dist/.internal/utils/filterSupport.js +1 -3
- package/dist/.internal/utils/loadConfig.cjs +8 -94
- package/dist/.internal/utils/loadConfig.js +7 -92
- package/dist/bin/build.cjs +2 -507
- package/dist/bin/index.cjs +5 -1
- package/package.json +1 -1
- package/src/bin/build.cts +2 -8
- package/src/bin/common.ts +3 -0
- package/src/bin/index.cts +2 -1
- package/src/commands/publish.ts +5 -0
- package/dist/.internal/.chunks/jiek_create-require.CWFWNQHj.cjs +0 -5
- package/dist/.internal/.chunks/jiek_create-require.CxSGbkTB.js +0 -5
- package/dist/.internal/commands/build/analyzer.cjs +0 -201
- package/dist/.internal/commands/build/analyzer.d.cts +0 -30
- package/dist/.internal/commands/build/analyzer.d.ts +0 -30
- package/dist/.internal/commands/build/analyzer.js +0 -195
- package/dist/.internal/commands/descriptions.cjs +0 -21
- package/dist/.internal/commands/descriptions.d.cts +0 -5
- package/dist/.internal/commands/descriptions.d.ts +0 -5
- package/dist/.internal/commands/descriptions.js +0 -17
- package/dist/.internal/commands/meta.cjs +0 -16
- package/dist/.internal/commands/meta.d.cts +0 -3
- package/dist/.internal/commands/meta.d.ts +0 -3
- package/dist/.internal/commands/meta.js +0 -15
- package/dist/.internal/commands/utils/optionParser.cjs +0 -8
- package/dist/.internal/commands/utils/optionParser.d.cts +0 -3
- package/dist/.internal/commands/utils/optionParser.d.ts +0 -3
- package/dist/.internal/commands/utils/optionParser.js +0 -6
- package/dist/.internal/server.cjs +0 -33
- package/dist/.internal/server.d.cts +0 -8
- package/dist/.internal/server.d.ts +0 -8
- package/dist/.internal/server.js +0 -27
- package/dist/.internal/utils/checkDependency.cjs +0 -39
- package/dist/.internal/utils/checkDependency.d.cts +0 -3
- package/dist/.internal/utils/checkDependency.d.ts +0 -3
- package/dist/.internal/utils/checkDependency.js +0 -34
- package/dist/.internal/utils/getRoot.cjs +0 -17
- package/dist/.internal/utils/getRoot.d.cts +0 -3
- package/dist/.internal/utils/getRoot.d.ts +0 -3
- package/dist/.internal/utils/getRoot.js +0 -11
- package/dist/.internal/utils/getWD.cjs +0 -15
- package/dist/.internal/utils/getWD.d.cts +0 -6
- package/dist/.internal/utils/getWD.d.ts +0 -6
- package/dist/.internal/utils/getWD.js +0 -10
- package/dist/.internal/utils/tsRegister.cjs +0 -25
- package/dist/.internal/utils/tsRegister.d.cts +0 -3
- package/dist/.internal/utils/tsRegister.d.ts +0 -3
- package/dist/.internal/utils/tsRegister.js +0 -26
@@ -1,13 +1,11 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
require('../.chunks/
|
3
|
+
var filterSupport = require('../.chunks/filterSupport.4rM7f6jB.cjs');
|
4
4
|
require('node:fs');
|
5
5
|
require('node:path');
|
6
6
|
require('node:process');
|
7
7
|
require('commander');
|
8
8
|
require('js-yaml');
|
9
|
-
require('./getRoot.cjs');
|
10
|
-
var filterSupport = require('../.chunks/getWD.ZF0avqDB.cjs');
|
11
9
|
require('@jiek/utils/getWorkspaceDir');
|
12
10
|
|
13
11
|
|
@@ -1,10 +1,8 @@
|
|
1
|
-
|
1
|
+
export { f as filterPackagesGraph, a as getSelectedProjectsGraph, t as type } from '../.chunks/filterSupport.BXWpLBpT.js';
|
2
2
|
import 'node:fs';
|
3
3
|
import 'node:path';
|
4
4
|
import 'node:process';
|
5
5
|
import 'commander';
|
6
6
|
import 'js-yaml';
|
7
|
-
import './getRoot.js';
|
8
|
-
export { f as filterPackagesGraph, a as getSelectedProjectsGraph, t as type } from '../.chunks/getWD.D6wq8Qc2.js';
|
9
7
|
import 'node:module';
|
10
8
|
import '@jiek/utils/getWorkspaceDir';
|
@@ -1,100 +1,14 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
var
|
9
|
-
var tsRegister = require('./tsRegister.cjs');
|
10
|
-
require('@jiek/utils/getWorkspaceDir');
|
3
|
+
require('../.chunks/filterSupport.4rM7f6jB.cjs');
|
4
|
+
require('node:fs');
|
5
|
+
require('node:path');
|
6
|
+
require('commander');
|
7
|
+
require('js-yaml');
|
8
|
+
var loadConfig = require('../.chunks/loadConfig.OOKddvHF.cjs');
|
11
9
|
require('node:process');
|
12
|
-
require('
|
13
|
-
|
14
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
10
|
+
require('@jiek/utils/getWorkspaceDir');
|
15
11
|
|
16
|
-
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
17
|
-
var path__default = /*#__PURE__*/_interopDefault(path);
|
18
12
|
|
19
|
-
let configName = "jiek.config";
|
20
|
-
function getConfigPath(root, dir) {
|
21
|
-
const isSupportTsLoader = !!tsRegister.tsRegisterName;
|
22
|
-
function configWithExtIsExist(ext) {
|
23
|
-
const filenames = [
|
24
|
-
path__default.default.resolve(process.cwd(), `${configName}.${ext}`),
|
25
|
-
path__default.default.resolve(process.cwd(), `.${configName}.${ext}`),
|
26
|
-
path__default.default.resolve(root, `${configName}.${ext}`),
|
27
|
-
path__default.default.resolve(root, `.${configName}.${ext}`)
|
28
|
-
];
|
29
|
-
if (dir) {
|
30
|
-
filenames.unshift(...[
|
31
|
-
path__default.default.resolve(dir, `${configName}.${ext}`),
|
32
|
-
path__default.default.resolve(dir, `.${configName}.${ext}`)
|
33
|
-
]);
|
34
|
-
}
|
35
|
-
for (const filename of filenames) {
|
36
|
-
if (fs__default.default.existsSync(filename) && fs__default.default.lstatSync(filename).isFile()) {
|
37
|
-
return filename;
|
38
|
-
}
|
39
|
-
}
|
40
|
-
return;
|
41
|
-
}
|
42
|
-
configName = configWithExtIsExist("js") ?? configName;
|
43
|
-
configName = configWithExtIsExist("json") ?? configName;
|
44
|
-
configName = configWithExtIsExist("yaml") ?? configName;
|
45
|
-
if (isSupportTsLoader) {
|
46
|
-
configName = configWithExtIsExist("ts") ?? configName;
|
47
|
-
}
|
48
|
-
return path__default.default.resolve(root, configName);
|
49
|
-
}
|
50
|
-
function loadConfig(dirOrOptions) {
|
51
|
-
let dir;
|
52
|
-
let root;
|
53
|
-
if (typeof dirOrOptions === "object") {
|
54
|
-
dir = dirOrOptions.dir;
|
55
|
-
root = dirOrOptions.root ?? filterSupport.getWD().wd;
|
56
|
-
} else {
|
57
|
-
dir = dirOrOptions;
|
58
|
-
root = filterSupport.getWD().wd;
|
59
|
-
}
|
60
|
-
let configPath = commander.program.getOptionValue("configPath");
|
61
|
-
if (!configPath) {
|
62
|
-
configPath = getConfigPath(root, dir);
|
63
|
-
} else {
|
64
|
-
if (!fs__default.default.existsSync(configPath)) {
|
65
|
-
throw new Error(`config file not found: ${configPath}`);
|
66
|
-
}
|
67
|
-
if (!path__default.default.isAbsolute(configPath)) {
|
68
|
-
configPath = path__default.default.resolve(root, configPath);
|
69
|
-
}
|
70
|
-
}
|
71
|
-
const ext = path__default.default.extname(configPath);
|
72
|
-
let module;
|
73
|
-
switch (ext) {
|
74
|
-
case ".js":
|
75
|
-
module = jiek_createRequire.require(configPath);
|
76
|
-
break;
|
77
|
-
case ".json":
|
78
|
-
return jiek_createRequire.require(configPath);
|
79
|
-
case ".yaml":
|
80
|
-
return jsYaml.load(fs__default.default.readFileSync(configPath, "utf-8"));
|
81
|
-
case ".ts":
|
82
|
-
if (tsRegister.tsRegisterName) {
|
83
|
-
jiek_createRequire.require(tsRegister.tsRegisterName);
|
84
|
-
module = jiek_createRequire.require(configPath);
|
85
|
-
break;
|
86
|
-
}
|
87
|
-
throw new Error(
|
88
|
-
"ts config file is not supported without ts register, please install esbuild-register or set JIEK_TS_REGISTER env for custom ts register"
|
89
|
-
);
|
90
|
-
case ".config":
|
91
|
-
module = {};
|
92
|
-
break;
|
93
|
-
default:
|
94
|
-
throw new Error(`unsupported config file type: ${ext}`);
|
95
|
-
}
|
96
|
-
if (!module) throw new Error("config file is empty");
|
97
|
-
return module.default ?? module;
|
98
|
-
}
|
99
13
|
|
100
|
-
exports.loadConfig = loadConfig;
|
14
|
+
exports.loadConfig = loadConfig.loadConfig;
|
@@ -1,94 +1,9 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
|
7
|
-
import { tsRegisterName } from './tsRegister.js';
|
1
|
+
import '../.chunks/filterSupport.BXWpLBpT.js';
|
2
|
+
import 'node:fs';
|
3
|
+
import 'node:path';
|
4
|
+
import 'commander';
|
5
|
+
import 'js-yaml';
|
6
|
+
export { l as loadConfig } from '../.chunks/loadConfig.CFfzkm_p.js';
|
8
7
|
import 'node:module';
|
9
|
-
import '@jiek/utils/getWorkspaceDir';
|
10
8
|
import 'node:process';
|
11
|
-
import '
|
12
|
-
|
13
|
-
let configName = "jiek.config";
|
14
|
-
function getConfigPath(root, dir) {
|
15
|
-
const isSupportTsLoader = !!tsRegisterName;
|
16
|
-
function configWithExtIsExist(ext) {
|
17
|
-
const filenames = [
|
18
|
-
path.resolve(process.cwd(), `${configName}.${ext}`),
|
19
|
-
path.resolve(process.cwd(), `.${configName}.${ext}`),
|
20
|
-
path.resolve(root, `${configName}.${ext}`),
|
21
|
-
path.resolve(root, `.${configName}.${ext}`)
|
22
|
-
];
|
23
|
-
if (dir) {
|
24
|
-
filenames.unshift(...[
|
25
|
-
path.resolve(dir, `${configName}.${ext}`),
|
26
|
-
path.resolve(dir, `.${configName}.${ext}`)
|
27
|
-
]);
|
28
|
-
}
|
29
|
-
for (const filename of filenames) {
|
30
|
-
if (fs.existsSync(filename) && fs.lstatSync(filename).isFile()) {
|
31
|
-
return filename;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
return;
|
35
|
-
}
|
36
|
-
configName = configWithExtIsExist("js") ?? configName;
|
37
|
-
configName = configWithExtIsExist("json") ?? configName;
|
38
|
-
configName = configWithExtIsExist("yaml") ?? configName;
|
39
|
-
if (isSupportTsLoader) {
|
40
|
-
configName = configWithExtIsExist("ts") ?? configName;
|
41
|
-
}
|
42
|
-
return path.resolve(root, configName);
|
43
|
-
}
|
44
|
-
function loadConfig(dirOrOptions) {
|
45
|
-
let dir;
|
46
|
-
let root;
|
47
|
-
if (typeof dirOrOptions === "object") {
|
48
|
-
dir = dirOrOptions.dir;
|
49
|
-
root = dirOrOptions.root ?? getWD().wd;
|
50
|
-
} else {
|
51
|
-
dir = dirOrOptions;
|
52
|
-
root = getWD().wd;
|
53
|
-
}
|
54
|
-
let configPath = program.getOptionValue("configPath");
|
55
|
-
if (!configPath) {
|
56
|
-
configPath = getConfigPath(root, dir);
|
57
|
-
} else {
|
58
|
-
if (!fs.existsSync(configPath)) {
|
59
|
-
throw new Error(`config file not found: ${configPath}`);
|
60
|
-
}
|
61
|
-
if (!path.isAbsolute(configPath)) {
|
62
|
-
configPath = path.resolve(root, configPath);
|
63
|
-
}
|
64
|
-
}
|
65
|
-
const ext = path.extname(configPath);
|
66
|
-
let module;
|
67
|
-
switch (ext) {
|
68
|
-
case ".js":
|
69
|
-
module = require(configPath);
|
70
|
-
break;
|
71
|
-
case ".json":
|
72
|
-
return require(configPath);
|
73
|
-
case ".yaml":
|
74
|
-
return load(fs.readFileSync(configPath, "utf-8"));
|
75
|
-
case ".ts":
|
76
|
-
if (tsRegisterName) {
|
77
|
-
require(tsRegisterName);
|
78
|
-
module = require(configPath);
|
79
|
-
break;
|
80
|
-
}
|
81
|
-
throw new Error(
|
82
|
-
"ts config file is not supported without ts register, please install esbuild-register or set JIEK_TS_REGISTER env for custom ts register"
|
83
|
-
);
|
84
|
-
case ".config":
|
85
|
-
module = {};
|
86
|
-
break;
|
87
|
-
default:
|
88
|
-
throw new Error(`unsupported config file type: ${ext}`);
|
89
|
-
}
|
90
|
-
if (!module) throw new Error("config file is empty");
|
91
|
-
return module.default ?? module;
|
92
|
-
}
|
93
|
-
|
94
|
-
export { loadConfig };
|
9
|
+
import '@jiek/utils/getWorkspaceDir';
|