@planet-matrix/mobius-mono 0.3.0 → 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.
@@ -0,0 +1,2 @@
1
+ export declare const build: () => void;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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,2 @@
1
+ export declare const checkFilename: () => void;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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 "./change/index";
2
- export * from "./package/index";
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,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA"}
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,2 @@
1
+ export declare const check: () => void;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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,2 @@
1
+ export declare const check: () => void;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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,sBAAsB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internals/package/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const check: () => void;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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.3.0",
4
- "private": false,
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-monorepo": "./src/index.ts",
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,40 +39,55 @@
16
39
  "./oxlintrc.json": "./src/internals/lint/oxlintrc.json",
17
40
  "./oxfmtrc.json": "./src/internals/lint/oxfmtrc.json"
18
41
  },
19
- "bin": {
20
- "mono": "./src/app/index.ts"
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
  },
27
- "devDependencies": {
28
- "@types/bun": "catalog:",
29
- "@types/node": "catalog:",
30
- "oxlint": "catalog:",
31
- "oxlint-tsgolint": "catalog:",
32
- "oxfmt": "catalog:",
33
- "typescript": "catalog:",
34
- "@typescript/native-preview": "catalog:"
35
- },
36
68
  "dependencies": {
37
- "zx": "catalog:",
38
- "@opentui/core": "catalog:"
69
+ "zx": "^8.8.5",
70
+ "@opentui/core": "^0.1.67"
39
71
  },
40
- "peerDependencies": {
41
- "@changesets/cli": "catalog:"
72
+ "devDependencies": {
73
+ "@types/bun": "^1.3.5",
74
+ "@types/node": "^25.0.3",
75
+ "oxlint": "^1.36.0",
76
+ "oxlint-tsgolint": "^0.10.1",
77
+ "oxfmt": "^0.21.0",
78
+ "typescript": "^5.9.0",
79
+ "@typescript/native-preview": "^7.0.0-dev.20260101.1"
42
80
  },
43
- "repository": {
44
- "type": "git",
45
- "url": "git+https://github.com/planet-matrix/mobius.git",
46
- "directory": "packages/mono"
81
+ "peerDependencies": {
82
+ "@changesets/cli": "^2.29.8"
47
83
  },
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 --emitDeclarationOnly`
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: "external",
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 { add, publish, version } from "Source/internals/index"
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)
@@ -0,0 +1,3 @@
1
+ export const build = (): void => {
2
+ //
3
+ }
@@ -0,0 +1,3 @@
1
+ export const checkFilename = (): void => {
2
+ //
3
+ }
@@ -1,2 +1,7 @@
1
- export * from "./change/index"
2
- export * from "./package/index"
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"
@@ -0,0 +1,3 @@
1
+ export const check = (): void => {
2
+ //
3
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "../../node_modules/oxfmt/configuration_schema.json",
2
+ "$schema": "../../../node_modules/oxfmt/configuration_schema.json",
3
3
  "ignorePatterns": [],
4
4
  "arrowParens": "always",
5
5
  "bracketSameLine": false,
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "../../node_modules/oxlint/configuration_schema.json",
2
+ "$schema": "../../../node_modules/oxlint/configuration_schema.json",
3
3
  // Paths of configuration files that this configuration file extends (inherits from).
4
4
  "extends": [],
5
5
  "plugins": [],
@@ -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
- "js": "never",
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
- "error",
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",
@@ -0,0 +1,3 @@
1
+ export const check = (): void => {
2
+ //
3
+ }
@@ -1 +1 @@
1
- export * from "./check-package-json"
1
+ export * from "./check-package-json.ts"
@@ -0,0 +1,3 @@
1
+ export const check = (): void => {
2
+ //
3
+ }
@@ -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-monorepo"
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": true,
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": false,
63
+ "emitDeclarationOnly": true,
72
64
  "importHelpers": false,
73
65
  "inlineSourceMap": false,
74
66
  "inlineSources": false,
75
67
  "mapRoot": "",
76
68
  "newLine": "lf",
77
- "noEmit": false,
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",
package/tsconfig.json CHANGED
@@ -1,13 +1,3 @@
1
1
  {
2
2
  "extends": "./src/internals/typescript/tsconfig.base.json",
3
- "compilerOptions": {
4
- "paths": {
5
- "Project/*": [
6
- "${configDir}/*"
7
- ],
8
- "Source/*": [
9
- "${configDir}/src/*"
10
- ],
11
- },
12
- }
13
3
  }