@longzai-intelligence-css/config 0.0.0-stage → 0.0.1

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/README.md CHANGED
@@ -1,3 +1,23 @@
1
- # Temporary Holding Version
1
+ # @longzai-intelligence-css/config
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ LziCss CLI 配置契约包:`lzi-css.config.ts` 配置文件的类型定义与 `defineConfig` 工厂。
4
+
5
+ ## 用法
6
+
7
+ ```ts
8
+ // lzi-css.config.ts
9
+ import { defineConfig } from '@longzai-intelligence-css/config';
10
+
11
+ export default defineConfig({
12
+ css: {
13
+ // 额外排除的路径前缀(内置排除 node_modules、dist、.turbo、.git)
14
+ exclude: ['fixtures'],
15
+ },
16
+ });
17
+ ```
18
+
19
+ ## 配置字段
20
+
21
+ | 字段 | 类型 | 说明 |
22
+ | ------------- | ---------- | ---------------------------------------------------- |
23
+ | `css.exclude` | `string[]` | 额外排除的相对扫描根路径前缀,内置排除面之外只增不减 |
@@ -0,0 +1,54 @@
1
+ /**
2
+ * CSS 边界门禁扫描配置
3
+ *
4
+ * 判据为硬禁令零豁免,配置面只承载扫描范围的收放,
5
+ * 不提供违例白名单与基线豁免通道
6
+ */
7
+ type CssConfig = {
8
+ /**
9
+ * 额外排除的目录或文件匹配串
10
+ *
11
+ * @remarks
12
+ * 相对扫描根的路径前缀串,命中前缀的路径不参与扫描;
13
+ * 内置排除面为 `node_modules`、`dist`、`.turbo`、`.git`,
14
+ * 本字段只做追加,不移除内置面
15
+ * @default [ ]
16
+ */
17
+ exclude?: string[];
18
+ };
19
+ /**
20
+ * LziCss CLI 配置
21
+ *
22
+ * 定义 lzi-css.config.ts 配置文件的结构,
23
+ * 顶层字段名与统一配置 `lzi.config.ts#css` 对齐
24
+ */
25
+ type LziCssConfig = {
26
+ /**
27
+ * CSS 边界门禁扫描配置
28
+ */
29
+ css?: CssConfig;
30
+ };
31
+ /**
32
+ * 定义 LziCss CLI 配置
33
+ *
34
+ * 提供类型推导,用户无需手动 satisfies
35
+ *
36
+ * @remarks
37
+ * 无配置仓可无参调用,家族声明仓的既有形态即 `defineConfig()`,参数可选以保持该形态合法
38
+ * @example
39
+ * ```typescript
40
+ * import { defineConfig } from '@longzai-intelligence-css/config';
41
+ *
42
+ * export default defineConfig({
43
+ * css: {
44
+ * exclude: ['fixtures'],
45
+ * },
46
+ * });
47
+ * ```;
48
+ *
49
+ * @default {}
50
+ * @param config - LziCss CLI 配置对象,无配置仓可省略
51
+ * @returns 原样返回传入的配置对象
52
+ */
53
+ declare const defineConfig: (config?: LziCssConfig) => LziCssConfig;
54
+ export { type CssConfig, type LziCssConfig, defineConfig };
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ const e=(e={})=>e;export{e as defineConfig};
package/package.json CHANGED
@@ -1,6 +1,37 @@
1
1
  {
2
2
  "name": "@longzai-intelligence-css/config",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.1",
4
+ "description": "Longzai Intelligence CSS 边界门禁配置契约",
5
+ "keywords": [
6
+ "config",
7
+ "css",
8
+ "gate",
9
+ "longzai-intelligence",
10
+ "schema"
11
+ ],
12
+ "license": "UNLICENSED",
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "type": "module",
17
+ "main": "./dist/index.js",
18
+ "types": "./dist/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js"
23
+ }
24
+ },
25
+ "scripts": {
26
+ "build": "lzi-builder",
27
+ "build:prod": "NODE_ENV=production bun run build",
28
+ "prepublishOnly": "bun run build:prod",
29
+ "typecheck": "lzi-typecheck",
30
+ "lint": "lzi-lint lint",
31
+ "lint:fix": "lzi-lint fix",
32
+ "test": "lzi-bun test",
33
+ "test:watch": "lzi-bun test --watch",
34
+ "test:coverage": "lzi-bun test --coverage",
35
+ "clean": "lzi-clean"
36
+ }
37
+ }