@siming-org/cli 0.3.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Wuchao
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/bin/siming.js ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ // Node ≥22 运行时守卫:engines 在非 engine-strict 安装下仅警告不拦截,此处硬拒
3
+ // 守卫段用 ES5 语法 + import().then()(无静态 import / top-level await——两者会把
4
+ // 语法错误提前到模块解析期,让守卫来不及输出三要素提示):
5
+ // Node ≥12.17 均可得到明确的版本拒绝提示;更老版本(已 EOL 多年)以语法错误终止为接受边界
6
+ var nodeMajor = Number(process.versions.node.split('.')[0]);
7
+ if (nodeMajor < 22) {
8
+ console.error(
9
+ '[siming] Node.js 版本过低:当前 v' + process.versions.node + ',要求 ≥ v22。' +
10
+ ' 请升级 Node.js(https://nodejs.org/)后重试。'
11
+ );
12
+ process.exit(1);
13
+ }
14
+
15
+ import('../dist/index.js').then(function (m) {
16
+ m.program.parseAsync(process.argv);
17
+ });
@@ -0,0 +1,5 @@
1
+ import { Command } from 'commander';
2
+
3
+ declare const program: Command;
4
+
5
+ export { program };