mac-helper 0.6.0 → 0.7.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/lib/finder.d.ts CHANGED
@@ -23,6 +23,6 @@ export type QSpaceFileItem = {
23
23
  export declare function isRepresentPF(file: string): boolean;
24
24
  export declare function isRepresentQS(file: string): boolean;
25
25
  /**
26
- * 处理 $PF $QS, ignore case
26
+ * 处理 `@pf` `@qs`, ignore case
27
27
  */
28
28
  export declare function normalizeInputFileList(fileList: string[]): Promise<string[]>;
package/lib/finder.js CHANGED
@@ -7,11 +7,11 @@ exports.QSpace = exports.Finder = exports.PathFinder = void 0;
7
7
  exports.isRepresentPF = isRepresentPF;
8
8
  exports.isRepresentQS = isRepresentQS;
9
9
  exports.normalizeInputFileList = normalizeInputFileList;
10
+ const run_1 = require("@jxa/run");
11
+ const es_toolkit_1 = require("es-toolkit");
10
12
  const node_os_1 = require("node:os");
11
13
  const node_path_1 = __importDefault(require("node:path"));
12
14
  const node_url_1 = require("node:url");
13
- const run_1 = require("@jxa/run");
14
- const es_toolkit_1 = require("es-toolkit");
15
15
  const promise_map_1 = __importDefault(require("promise.map"));
16
16
  const app_1 = require("./app");
17
17
  /**
@@ -109,13 +109,13 @@ async function QSpace_allSelected() {
109
109
  /* #endregion */
110
110
  /* #region Top Level Helper */
111
111
  function isRepresentPF(file) {
112
- return /^\$?pf$/i.test(file);
112
+ return /^[@$]?pf$/i.test(file);
113
113
  }
114
114
  function isRepresentQS(file) {
115
- return /^\$?qs$/i.test(file);
115
+ return /^[@$]?qs$/i.test(file);
116
116
  }
117
117
  /**
118
- * 处理 $PF $QS, ignore case
118
+ * 处理 `@pf` `@qs`, ignore case
119
119
  */
120
120
  async function normalizeInputFileList(fileList) {
121
121
  return (0, es_toolkit_1.uniq)((await (0, promise_map_1.default)(fileList, async (f) => {
@@ -130,5 +130,5 @@ async function normalizeInputFileList(fileList) {
130
130
  }
131
131
  /* #endregion */
132
132
  // ;(async () => {
133
- // console.log(await getQSpaceSelected())
133
+ // console.log(await normalizeInputFileList(['@pf']))
134
134
  // })()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mac-helper",
3
- "version": "0.6.0",
4
- "packageManager": "pnpm@10.28.2+sha512.41872f037ad22f7348e3b1debbaf7e867cfd448f2726d9cf74c08f19507c31d2c8e7a11525b983febc2df640b5438dee6023ebb1f84ed43cc2d654d2bc326264",
3
+ "version": "0.7.0",
4
+ "packageManager": "pnpm@10.32.1+sha512.a706938f0e89ac1456b6563eab4edf1d1faf3368d1191fc5c59790e96dc918e4456ab2e67d613de1043d2e8c81f87303e6b40d4ffeca9df15ef1ad567348f2be",
5
5
  "description": "useful helper for macOS",
6
6
  "keywords": [
7
7
  "mac",
@@ -39,29 +39,29 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@jxa/run": "^1.4.0",
42
- "es-toolkit": "^1.44.0",
42
+ "es-toolkit": "^1.45.1",
43
43
  "promise.map": "^1.1.3"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@jxa/global-type": "^1.4.0",
47
47
  "@jxa/sdef-to-dts": "^1.4.0",
48
48
  "@jxa/types": "^1.4.0",
49
- "@magicdawn/eslint-config": "^1.6.1",
49
+ "@magicdawn/eslint-config": "^1.6.2",
50
50
  "@magicdawn/prettier-config": "^0.1.0",
51
51
  "@types/fs-extra": "^11.0.4",
52
- "@types/node": "^25.2.0",
53
- "@vitest/coverage-v8": "^4.0.18",
52
+ "@types/node": "^25.5.0",
53
+ "@vitest/coverage-v8": "^4.1.0",
54
54
  "delay": "^7.0.0",
55
- "eslint": "^9.39.2",
55
+ "eslint": "^9.39.4",
56
56
  "eslint-config-prettier": "^10.1.8",
57
- "fs-extra": "^11.3.3",
57
+ "fs-extra": "^11.3.4",
58
58
  "husky": "^9.1.7",
59
59
  "jxa-common-used": "^0.0.3",
60
- "lint-staged": "^16.2.7",
60
+ "lint-staged": "^16.4.0",
61
61
  "prettier": "^3.8.1",
62
62
  "should": "^13.2.3",
63
63
  "typescript": "^5.9.3",
64
- "vitest": "^4.0.18"
64
+ "vitest": "^4.1.0"
65
65
  },
66
66
  "pnpm": {
67
67
  "onlyBuiltDependencies": [
package/src/finder.ts CHANGED
@@ -1,11 +1,11 @@
1
+ import { run as jxaRun } from '@jxa/run'
2
+ import { uniq } from 'es-toolkit'
3
+ import type { PathFinder as PathFinderType } from 'jxa-common-used'
1
4
  import { availableParallelism } from 'node:os'
2
5
  import path from 'node:path'
3
6
  import { fileURLToPath } from 'node:url'
4
- import { run as jxaRun } from '@jxa/run'
5
- import { uniq } from 'es-toolkit'
6
7
  import pmap from 'promise.map'
7
8
  import { isAppRunning } from './app'
8
- import type { PathFinder as PathFinderType } from 'jxa-common-used'
9
9
 
10
10
  /**
11
11
  * `App` named epxorts
@@ -124,15 +124,15 @@ async function QSpace_allSelected() {
124
124
 
125
125
  /* #region Top Level Helper */
126
126
  export function isRepresentPF(file: string) {
127
- return /^\$?pf$/i.test(file)
127
+ return /^[@$]?pf$/i.test(file)
128
128
  }
129
129
 
130
130
  export function isRepresentQS(file: string) {
131
- return /^\$?qs$/i.test(file)
131
+ return /^[@$]?qs$/i.test(file)
132
132
  }
133
133
 
134
134
  /**
135
- * 处理 $PF $QS, ignore case
135
+ * 处理 `@pf` `@qs`, ignore case
136
136
  */
137
137
  export async function normalizeInputFileList(fileList: string[]) {
138
138
  return uniq(
@@ -154,5 +154,5 @@ export async function normalizeInputFileList(fileList: string[]) {
154
154
  /* #endregion */
155
155
 
156
156
  // ;(async () => {
157
- // console.log(await getQSpaceSelected())
157
+ // console.log(await normalizeInputFileList(['@pf']))
158
158
  // })()