@unocss/cli 66.3.1 → 66.3.3

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/dist/cli.mjs CHANGED
@@ -2,7 +2,7 @@ import process from 'node:process';
2
2
  import { loadConfig } from '@unocss/config';
3
3
  import { toArray } from '@unocss/core';
4
4
  import { cac } from 'cac';
5
- import { b as build, v as version, h as handleError } from './shared/cli.BrGS82V_.mjs';
5
+ import { b as build, v as version, h as handleError } from './shared/cli.D-QCzK3k.mjs';
6
6
  import 'node:fs';
7
7
  import 'unplugin-utils';
8
8
  import '@ampproject/remapping';
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import 'node:fs';
2
2
  import 'node:process';
3
- export { b as build, r as resolveOptions } from './shared/cli.BrGS82V_.mjs';
3
+ export { b as build, r as resolveOptions } from './shared/cli.D-QCzK3k.mjs';
4
4
  import '@unocss/core';
5
5
  import 'colorette';
6
6
  import 'consola';
@@ -1,5 +1,5 @@
1
1
  import { promises, existsSync } from 'node:fs';
2
- import process$1 from 'node:process';
2
+ import process from 'node:process';
3
3
  import { createRecoveryConfigLoader } from '@unocss/config';
4
4
  import { cssIdRE, createGenerator, BetterMap, toArray } from '@unocss/core';
5
5
  import { createFilter } from 'unplugin-utils';
@@ -23,26 +23,11 @@ const defaultPipelineExclude = [cssIdRE];
23
23
  const defaultPipelineInclude = [/\.(vue|svelte|[jt]sx|vine.ts|mdx?|astro|elm|php|phtml|html)($|\?)/];
24
24
 
25
25
  function deprecationCheck(config) {
26
- let warned = false;
27
- function warn(msg) {
28
- warned = true;
29
- console.warn(`[unocss] ${msg}`);
30
- }
31
- if (config.include)
32
- warn("`include` option is deprecated, use `content.pipeline.include` instead.");
33
- if (config.exclude)
34
- warn("`exclude` option is deprecated, use `content.pipeline.exclude` instead.");
35
- if (config.extraContent)
36
- warn("`extraContent` option is deprecated, use `content` instead.");
37
- if (config.content?.plain)
38
- warn("`content.plain` option is renamed to `content.inline`.");
39
- if (warned && typeof process !== "undefined" && process.env.CI)
40
- throw new Error("deprecation warning");
41
26
  }
42
27
 
43
28
  function createContext(configOrPath, defaults = {}, extraConfigSources = [], resolveConfigResult = () => {
44
29
  }) {
45
- let root = process$1.cwd();
30
+ let root = process.cwd();
46
31
  let rawConfig = {};
47
32
  let configFileList = [];
48
33
  let uno;
@@ -73,8 +58,8 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
73
58
  await uno.setConfig(rawConfig);
74
59
  uno.config.envMode = "dev";
75
60
  rollupFilter = rawConfig.content?.pipeline === false ? () => false : createFilter(
76
- rawConfig.content?.pipeline?.include || rawConfig.include || defaultPipelineInclude,
77
- rawConfig.content?.pipeline?.exclude || rawConfig.exclude || defaultPipelineExclude,
61
+ rawConfig.content?.pipeline?.include || defaultPipelineInclude,
62
+ rawConfig.content?.pipeline?.exclude || defaultPipelineExclude,
78
63
  { resolve: typeof configOrPath === "string" ? configOrPath : root }
79
64
  );
80
65
  tokens.clear();
@@ -215,7 +200,7 @@ async function applyTransformers(ctx, original, id, enforce = "default") {
215
200
  }
216
201
  }
217
202
 
218
- const version = "66.3.1";
203
+ const version = "66.3.3";
219
204
 
220
205
  const defaultConfig = {
221
206
  envMode: "build",
@@ -238,7 +223,7 @@ class PrettyError extends Error {
238
223
  function handleError(error) {
239
224
  if (error instanceof PrettyError)
240
225
  consola.error(error.message);
241
- process$1.exitCode = 1;
226
+ process.exitCode = 1;
242
227
  }
243
228
 
244
229
  let watcher;
@@ -251,7 +236,7 @@ async function getWatcher(options) {
251
236
  ignoreInitial: true,
252
237
  ignorePermissionErrors: true,
253
238
  ignored,
254
- cwd: options?.cwd || process$1.cwd()
239
+ cwd: options?.cwd || process.cwd()
255
240
  });
256
241
  watcher = newWatcher;
257
242
  return newWatcher;
@@ -268,7 +253,7 @@ async function resolveOptions(options) {
268
253
  }
269
254
  async function build(_options) {
270
255
  const fileCache = /* @__PURE__ */ new Map();
271
- const cwd = _options.cwd || process$1.cwd();
256
+ const cwd = _options.cwd || process.cwd();
272
257
  const options = await resolveOptions(_options);
273
258
  async function loadConfig() {
274
259
  const ctx2 = createContext(options.config, defaultConfig);
@@ -368,10 +353,10 @@ async function build(_options) {
368
353
  }
369
354
  );
370
355
  if (options2.stdout) {
371
- process$1.stdout.write(css);
356
+ process.stdout.write(css);
372
357
  return;
373
358
  }
374
- const outFile = resolve(options2.cwd || process$1.cwd(), options2.outFile ?? "uno.css");
359
+ const outFile = resolve(options2.cwd || process.cwd(), options2.outFile ?? "uno.css");
375
360
  const dir = dirname(outFile);
376
361
  if (!existsSync(dir))
377
362
  await promises.mkdir(dir, { recursive: true });
@@ -379,7 +364,7 @@ async function build(_options) {
379
364
  if (!options2.watch) {
380
365
  consola.success(
381
366
  `${[...matched].length} utilities generated to ${cyan(
382
- relative(process$1.cwd(), outFile)
367
+ relative(process.cwd(), outFile)
383
368
  )}
384
369
  `
385
370
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/cli",
3
3
  "type": "module",
4
- "version": "66.3.1",
4
+ "version": "66.3.3",
5
5
  "description": "CLI for UnoCSS",
6
6
  "author": {
7
7
  "name": "Johann Schopplich",
@@ -13,7 +13,7 @@
13
13
  "homepage": "https://unocss.dev",
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "git+https://github.com/unocss/unocss",
16
+ "url": "git+https://github.com/unocss/unocss.git",
17
17
  "directory": "packages-engine/cli"
18
18
  },
19
19
  "bugs": {
@@ -50,9 +50,9 @@
50
50
  "perfect-debounce": "^1.0.0",
51
51
  "tinyglobby": "^0.2.14",
52
52
  "unplugin-utils": "^0.2.4",
53
- "@unocss/config": "66.3.1",
54
- "@unocss/preset-uno": "66.3.1",
55
- "@unocss/core": "66.3.1"
53
+ "@unocss/core": "66.3.3",
54
+ "@unocss/preset-uno": "66.3.3",
55
+ "@unocss/config": "66.3.3"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "unbuild",