@planet-matrix/mobius-mono 0.3.1 → 0.4.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/CHANGELOG.md +6 -0
- package/LICENSE +21 -0
- package/README.md +143 -16
- package/dist/index.js +195 -3
- package/dist/index.js.map +20 -5
- package/dist/internals/build/index.d.ts +2 -0
- package/dist/internals/build/index.d.ts.map +1 -0
- package/dist/internals/file/index.d.ts +2 -0
- package/dist/internals/file/index.d.ts.map +1 -0
- package/dist/internals/index.d.ts +7 -2
- package/dist/internals/index.d.ts.map +1 -1
- package/dist/internals/lint/index.d.ts +2 -0
- package/dist/internals/lint/index.d.ts.map +1 -0
- package/dist/internals/monorepo/index.d.ts +2 -0
- package/dist/internals/monorepo/index.d.ts.map +1 -0
- package/dist/internals/package/index.d.ts +1 -1
- package/dist/internals/package/index.d.ts.map +1 -1
- package/dist/internals/typescript/index.d.ts +2 -0
- package/dist/internals/typescript/index.d.ts.map +1 -0
- package/package.json +56 -18
- package/scripts/build.ts +2 -2
- package/src/app/index.ts +4 -4
- package/src/internals/build/index.ts +3 -0
- package/src/internals/file/index.ts +3 -0
- package/src/internals/index.ts +7 -2
- package/src/internals/lint/index.ts +3 -0
- package/src/internals/lint/oxlintrc.json +3 -22
- package/src/internals/monorepo/index.ts +3 -0
- package/src/internals/package/index.ts +1 -1
- package/src/internals/typescript/index.ts +3 -0
- package/src/internals/typescript/tsconfig.base.json +6 -15
- package/tsconfig.json +0 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internals/build/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,YAEjB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internals/file/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,YAEzB,CAAA"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
1
|
+
export * as Monorepo from "./monorepo/index.ts";
|
|
2
|
+
export * as File from "./file/index.ts";
|
|
3
|
+
export * as Package from "./package/index.ts";
|
|
4
|
+
export * as TypeScript from "./typescript/index.ts";
|
|
5
|
+
export * as Lint from "./lint/index.ts";
|
|
6
|
+
export * as Build from "./build/index.ts";
|
|
7
|
+
export * as Change from "./change/index.ts";
|
|
3
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAA;AACvC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAC7C,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internals/lint/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,YAEjB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internals/monorepo/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,YAEjB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./check-package-json";
|
|
1
|
+
export * from "./check-package-json.ts";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internals/package/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internals/package/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internals/typescript/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,YAEjB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planet-matrix/mobius-mono",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Mobius Mono 是一个用于规范项目的项目,由规范文本(Specification)、配套工具(Tool)组成。",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mobius",
|
|
7
|
+
"monorepo"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://github.com/planet-matrix/mobius",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/planet-matrix/mobius/issues",
|
|
12
|
+
"email": "kongxiangyan@planet-matrix.tech"
|
|
13
|
+
},
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Kong Xiangyan",
|
|
17
|
+
"email": "kongxiangyan@planet-matrix.tech",
|
|
18
|
+
"url": "https://github.com/kongxiangyan"
|
|
19
|
+
},
|
|
20
|
+
"contributors": [],
|
|
21
|
+
"files": [
|
|
22
|
+
"*"
|
|
23
|
+
],
|
|
24
|
+
"bin": {
|
|
25
|
+
"mono": "./src/app/index.ts"
|
|
26
|
+
},
|
|
27
|
+
"man": [],
|
|
5
28
|
"type": "module",
|
|
6
29
|
"exports": {
|
|
7
30
|
".": {
|
|
8
31
|
"import": {
|
|
9
|
-
"@planet-matrix/mobius-
|
|
32
|
+
"@planet-matrix/mobius-mono": "./src/index.ts",
|
|
10
33
|
"types": "./dist/index.d.ts",
|
|
11
34
|
"bun": "./src/index.ts",
|
|
12
35
|
"default": "./dist/index.js"
|
|
@@ -16,14 +39,36 @@
|
|
|
16
39
|
"./oxlintrc.json": "./src/internals/lint/oxlintrc.json",
|
|
17
40
|
"./oxfmtrc.json": "./src/internals/lint/oxfmtrc.json"
|
|
18
41
|
},
|
|
19
|
-
"
|
|
20
|
-
"
|
|
42
|
+
"imports": {
|
|
43
|
+
"#Project/*": {
|
|
44
|
+
"import": {
|
|
45
|
+
"@planet-matrix/mobius-mono": "./*",
|
|
46
|
+
"bun": "./*",
|
|
47
|
+
"default": "./*"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"#Source/*": {
|
|
51
|
+
"import": {
|
|
52
|
+
"@planet-matrix/mobius-mono": "./src/*",
|
|
53
|
+
"bun": "./src/*",
|
|
54
|
+
"default": "./src/*"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"repository": {
|
|
59
|
+
"type": "git",
|
|
60
|
+
"url": "git+https://github.com/planet-matrix/mobius.git",
|
|
61
|
+
"directory": "packages/mono"
|
|
21
62
|
},
|
|
22
63
|
"scripts": {
|
|
23
64
|
"lint": "bun oxlint",
|
|
24
65
|
"build": "bun ./scripts/build.ts",
|
|
25
66
|
"prepublishOnly": "bun run build"
|
|
26
67
|
},
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"zx": "^8.8.5",
|
|
70
|
+
"@opentui/core": "^0.1.67"
|
|
71
|
+
},
|
|
27
72
|
"devDependencies": {
|
|
28
73
|
"@types/bun": "^1.3.5",
|
|
29
74
|
"@types/node": "^25.0.3",
|
|
@@ -33,23 +78,16 @@
|
|
|
33
78
|
"typescript": "^5.9.0",
|
|
34
79
|
"@typescript/native-preview": "^7.0.0-dev.20260101.1"
|
|
35
80
|
},
|
|
36
|
-
"dependencies": {
|
|
37
|
-
"zx": "^8.8.5",
|
|
38
|
-
"@opentui/core": "^0.1.67"
|
|
39
|
-
},
|
|
40
81
|
"peerDependencies": {
|
|
41
82
|
"@changesets/cli": "^2.29.8"
|
|
42
83
|
},
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
84
|
+
"peerDependenciesMeta": {},
|
|
85
|
+
"bundleDependencies": [],
|
|
86
|
+
"optionalDependencies": {},
|
|
87
|
+
"overrides": {},
|
|
88
|
+
"private": false,
|
|
48
89
|
"publishConfig": {
|
|
49
90
|
"registry": "https://registry.npmjs.org",
|
|
50
91
|
"access": "public"
|
|
51
|
-
}
|
|
52
|
-
"files": [
|
|
53
|
-
"*"
|
|
54
|
-
]
|
|
92
|
+
}
|
|
55
93
|
}
|
package/scripts/build.ts
CHANGED
|
@@ -5,7 +5,7 @@ console.log("Cleaning and preparing ./dist directory...")
|
|
|
5
5
|
await $`rm -rf dist`
|
|
6
6
|
|
|
7
7
|
console.log("Building the typescript ...")
|
|
8
|
-
await $`bun run tsgo --
|
|
8
|
+
await $`bun run tsgo --noEmit false`
|
|
9
9
|
|
|
10
10
|
console.log("Building the library...")
|
|
11
11
|
const builtLibraryOutput = await build({
|
|
@@ -34,7 +34,7 @@ const builtLibraryOutput = await build({
|
|
|
34
34
|
asset: '[name]-[hash].[ext]',
|
|
35
35
|
},
|
|
36
36
|
outdir: "./dist",
|
|
37
|
-
packages: "
|
|
37
|
+
packages: "bundle",
|
|
38
38
|
plugins: [],
|
|
39
39
|
publicPath: undefined,
|
|
40
40
|
root: undefined,
|
package/src/app/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import process from "node:process"
|
|
2
|
-
import {
|
|
2
|
+
import { Change } from "#Source/internals/index.ts"
|
|
3
3
|
|
|
4
4
|
// 获取调用此文件时的命令
|
|
5
5
|
const command = process.argv;
|
|
@@ -15,11 +15,11 @@ const isChangePublish = (command: string[]): boolean => {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
if (isChangeAdd(command)) {
|
|
18
|
-
await add()
|
|
18
|
+
await Change.add()
|
|
19
19
|
} else if (isChangeVersion(command)) {
|
|
20
|
-
await version()
|
|
20
|
+
await Change.version()
|
|
21
21
|
} else if (isChangePublish(command)) {
|
|
22
|
-
await publish()
|
|
22
|
+
await Change.publish()
|
|
23
23
|
} else {
|
|
24
24
|
console.log("未知的命令")
|
|
25
25
|
process.exit(1)
|
package/src/internals/index.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
1
|
+
export * as Monorepo from "./monorepo/index.ts"
|
|
2
|
+
export * as File from "./file/index.ts"
|
|
3
|
+
export * as Package from "./package/index.ts"
|
|
4
|
+
export * as TypeScript from "./typescript/index.ts"
|
|
5
|
+
export * as Lint from "./lint/index.ts"
|
|
6
|
+
export * as Build from "./build/index.ts"
|
|
7
|
+
export * as Change from "./change/index.ts"
|
|
@@ -504,15 +504,11 @@
|
|
|
504
504
|
],
|
|
505
505
|
"import/extensions": [
|
|
506
506
|
"error",
|
|
507
|
+
"always",
|
|
507
508
|
{
|
|
508
509
|
"checkTypeImports": true,
|
|
509
510
|
"ignorePackages": true,
|
|
510
|
-
"
|
|
511
|
-
"json": "always",
|
|
512
|
-
"jsx": "always",
|
|
513
|
-
"requireExtension": null,
|
|
514
|
-
"ts": "never",
|
|
515
|
-
"tsx": "always"
|
|
511
|
+
"pathGroupOverrides": []
|
|
516
512
|
}
|
|
517
513
|
],
|
|
518
514
|
"import/no-amd": [
|
|
@@ -1203,22 +1199,7 @@
|
|
|
1203
1199
|
"off",
|
|
1204
1200
|
],
|
|
1205
1201
|
"eslint/capitalized-comments": [
|
|
1206
|
-
"
|
|
1207
|
-
{
|
|
1208
|
-
"ignoreConsecutiveComments": false,
|
|
1209
|
-
"ignoreInlineComments": false,
|
|
1210
|
-
"ignorePattern": "",
|
|
1211
|
-
"block": {
|
|
1212
|
-
"ignoreConsecutiveComments": false,
|
|
1213
|
-
"ignoreInlineComments": false,
|
|
1214
|
-
"ignorePattern": "",
|
|
1215
|
-
},
|
|
1216
|
-
"line": {
|
|
1217
|
-
"ignoreConsecutiveComments": false,
|
|
1218
|
-
"ignoreInlineComments": false,
|
|
1219
|
-
"ignorePattern": "",
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1202
|
+
"off",
|
|
1222
1203
|
],
|
|
1223
1204
|
"eslint/curly": [
|
|
1224
1205
|
"error",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./check-package-json"
|
|
1
|
+
export * from "./check-package-json.ts"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
3
|
"include": [
|
|
4
|
-
"${configDir}/src/**/*"
|
|
4
|
+
"${configDir}/src/**/*",
|
|
5
5
|
],
|
|
6
6
|
"exclude": [
|
|
7
7
|
"${configDir}/node_modules/**/*",
|
|
@@ -34,9 +34,8 @@
|
|
|
34
34
|
"allowImportingTsExtensions": true,
|
|
35
35
|
"allowUmdGlobalAccess": false,
|
|
36
36
|
"customConditions": [
|
|
37
|
-
"@planet-matrix/mobius-
|
|
37
|
+
"@planet-matrix/mobius-mono"
|
|
38
38
|
],
|
|
39
|
-
// align with Bun's recommended config, see https://bun.com/docs/typescript
|
|
40
39
|
"module": "preserve",
|
|
41
40
|
"moduleResolution": "bundler",
|
|
42
41
|
"moduleSuffixes": [
|
|
@@ -44,18 +43,11 @@
|
|
|
44
43
|
],
|
|
45
44
|
"noResolve": false,
|
|
46
45
|
"noUncheckedSideEffectImports": true,
|
|
47
|
-
"paths": {
|
|
48
|
-
"Project/*": [
|
|
49
|
-
"${configDir}/*"
|
|
50
|
-
],
|
|
51
|
-
"Source/*": [
|
|
52
|
-
"${configDir}/src/*"
|
|
53
|
-
],
|
|
54
|
-
},
|
|
46
|
+
// "paths": {},
|
|
55
47
|
"resolveJsonModule": true,
|
|
56
48
|
"resolvePackageJsonExports": true,
|
|
57
49
|
"resolvePackageJsonImports": true,
|
|
58
|
-
"rewriteRelativeImportExtensions":
|
|
50
|
+
"rewriteRelativeImportExtensions": false,
|
|
59
51
|
"rootDir": "${configDir}/src",
|
|
60
52
|
"rootDirs": [],
|
|
61
53
|
"typeRoots": [
|
|
@@ -68,13 +60,13 @@
|
|
|
68
60
|
"declarationMap": true,
|
|
69
61
|
"downlevelIteration": true,
|
|
70
62
|
"emitBOM": false,
|
|
71
|
-
"emitDeclarationOnly":
|
|
63
|
+
"emitDeclarationOnly": true,
|
|
72
64
|
"importHelpers": false,
|
|
73
65
|
"inlineSourceMap": false,
|
|
74
66
|
"inlineSources": false,
|
|
75
67
|
"mapRoot": "",
|
|
76
68
|
"newLine": "lf",
|
|
77
|
-
"noEmit":
|
|
69
|
+
"noEmit": true,
|
|
78
70
|
"noEmitHelpers": false,
|
|
79
71
|
"noEmitOnError": false,
|
|
80
72
|
"outDir": "${configDir}/dist",
|
|
@@ -115,7 +107,6 @@
|
|
|
115
107
|
"ScriptHost"
|
|
116
108
|
],
|
|
117
109
|
"libReplacement": true,
|
|
118
|
-
// align with Bun's recommended config, see https://bun.com/docs/typescript
|
|
119
110
|
"moduleDetection": "force",
|
|
120
111
|
"noLib": false,
|
|
121
112
|
"target": "esnext",
|