@utoo/pack 0.0.1-alpha.33 → 0.0.1-alpha.35

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/cjs/types.d.ts CHANGED
@@ -80,8 +80,12 @@ export type TurbopackRuleConfigItemOptions = {
80
80
  loaders: TurbopackLoaderItem[];
81
81
  as?: string;
82
82
  };
83
+ export type TurbopackRuleCondition = {
84
+ path: string | RegExp;
85
+ };
83
86
  export interface ModuleOptions {
84
87
  rules?: Record<string, TurbopackRuleConfigItem>;
88
+ conditions?: Record<string, TurbopackRuleCondition>;
85
89
  }
86
90
  export interface ResolveOptions {
87
91
  alias?: Record<string, string | string[] | Record<string, string | string[]>>;
@@ -177,6 +177,66 @@
177
177
  }
178
178
  }
179
179
  },
180
+ "SchemaConfigConditionItem": {
181
+ "description": "Configuration condition item",
182
+ "type": "object",
183
+ "required": [
184
+ "path"
185
+ ],
186
+ "properties": {
187
+ "path": {
188
+ "description": "Condition path configuration",
189
+ "allOf": [
190
+ {
191
+ "$ref": "#/definitions/SchemaConfigConditionPath"
192
+ }
193
+ ]
194
+ }
195
+ }
196
+ },
197
+ "SchemaConfigConditionPath": {
198
+ "description": "Configuration condition path",
199
+ "oneOf": [
200
+ {
201
+ "description": "Glob pattern for path matching",
202
+ "type": "object",
203
+ "required": [
204
+ "type",
205
+ "value"
206
+ ],
207
+ "properties": {
208
+ "type": {
209
+ "type": "string",
210
+ "enum": [
211
+ "glob"
212
+ ]
213
+ },
214
+ "value": {
215
+ "type": "string"
216
+ }
217
+ }
218
+ },
219
+ {
220
+ "description": "Regular expression for path matching",
221
+ "type": "object",
222
+ "required": [
223
+ "type",
224
+ "value"
225
+ ],
226
+ "properties": {
227
+ "type": {
228
+ "type": "string",
229
+ "enum": [
230
+ "regex"
231
+ ]
232
+ },
233
+ "value": {
234
+ "$ref": "#/definitions/SchemaRegexComponents"
235
+ }
236
+ }
237
+ }
238
+ ]
239
+ },
180
240
  "SchemaCopyItem": {
181
241
  "description": "Copy item configuration",
182
242
  "type": "object",
@@ -497,6 +557,16 @@
497
557
  "description": "Module configuration",
498
558
  "type": "object",
499
559
  "properties": {
560
+ "conditions": {
561
+ "description": "Module conditions configuration",
562
+ "type": [
563
+ "object",
564
+ "null"
565
+ ],
566
+ "additionalProperties": {
567
+ "$ref": "#/definitions/SchemaConfigConditionItem"
568
+ }
569
+ },
500
570
  "rules": {
501
571
  "description": "Module rules configuration",
502
572
  "type": [
@@ -672,6 +742,24 @@
672
742
  "export"
673
743
  ]
674
744
  },
745
+ "SchemaRegexComponents": {
746
+ "description": "Regular expression components",
747
+ "type": "object",
748
+ "required": [
749
+ "flags",
750
+ "source"
751
+ ],
752
+ "properties": {
753
+ "flags": {
754
+ "description": "Regular expression flags",
755
+ "type": "string"
756
+ },
757
+ "source": {
758
+ "description": "Regular expression source",
759
+ "type": "string"
760
+ }
761
+ }
762
+ },
675
763
  "SchemaRemoveConsoleConfig": {
676
764
  "description": "Console removal configuration",
677
765
  "anyOf": [
package/esm/types.d.ts CHANGED
@@ -80,8 +80,12 @@ export type TurbopackRuleConfigItemOptions = {
80
80
  loaders: TurbopackLoaderItem[];
81
81
  as?: string;
82
82
  };
83
+ export type TurbopackRuleCondition = {
84
+ path: string | RegExp;
85
+ };
83
86
  export interface ModuleOptions {
84
87
  rules?: Record<string, TurbopackRuleConfigItem>;
88
+ conditions?: Record<string, TurbopackRuleCondition>;
85
89
  }
86
90
  export interface ResolveOptions {
87
91
  alias?: Record<string, string | string[] | Record<string, string | string[]>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utoo/pack",
3
- "version": "0.0.1-alpha.33",
3
+ "version": "0.0.1-alpha.35",
4
4
  "main": "cjs/index.js",
5
5
  "module": "esm/index.js",
6
6
  "exports": {
@@ -62,7 +62,8 @@
62
62
  "typescript": "^5.8.3",
63
63
  "@types/ws": "^8.18.1",
64
64
  "@types/send": "0.14.4",
65
- "@types/mime-types": "3.0.1"
65
+ "@types/mime-types": "3.0.1",
66
+ "@types/mime": "^3.0.4"
66
67
  },
67
68
  "peerDependencies": {
68
69
  "@types/webpack": "^5.28.5"
@@ -83,12 +84,12 @@
83
84
  },
84
85
  "repository": "git@github.com:umijs/mako.git",
85
86
  "optionalDependencies": {
86
- "@utoo/pack-darwin-arm64": "0.0.1-alpha.33",
87
- "@utoo/pack-darwin-x64": "0.0.1-alpha.33",
88
- "@utoo/pack-linux-arm64-gnu": "0.0.1-alpha.33",
89
- "@utoo/pack-linux-arm64-musl": "0.0.1-alpha.33",
90
- "@utoo/pack-linux-x64-gnu": "0.0.1-alpha.33",
91
- "@utoo/pack-linux-x64-musl": "0.0.1-alpha.33",
92
- "@utoo/pack-win32-x64-msvc": "0.0.1-alpha.33"
87
+ "@utoo/pack-darwin-arm64": "0.0.1-alpha.35",
88
+ "@utoo/pack-darwin-x64": "0.0.1-alpha.35",
89
+ "@utoo/pack-linux-arm64-gnu": "0.0.1-alpha.35",
90
+ "@utoo/pack-linux-arm64-musl": "0.0.1-alpha.35",
91
+ "@utoo/pack-linux-x64-gnu": "0.0.1-alpha.35",
92
+ "@utoo/pack-linux-x64-musl": "0.0.1-alpha.35",
93
+ "@utoo/pack-win32-x64-msvc": "0.0.1-alpha.35"
93
94
  }
94
95
  }