@niche-works/dev 0.1.0 → 0.3.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.
Files changed (177) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +3 -0
  3. package/package.json +31 -18
  4. package/src/addExports/addExports.ts +98 -0
  5. package/src/addExports/index.ts +2 -0
  6. package/src/addExports/types.ts +33 -0
  7. package/src/addJsExtensions/addJsExtensions.ts +31 -0
  8. package/src/addJsExtensions/index.ts +1 -0
  9. package/src/checkExistence/checkExistence.ts +16 -0
  10. package/src/checkExistence/index.ts +1 -0
  11. package/src/editJsonFile/editJsonFile.ts +30 -0
  12. package/src/editJsonFile/index.ts +1 -0
  13. package/src/generatePublishPackageJson/generatePublishPackageJson.ts +55 -0
  14. package/src/generatePublishPackageJson/index.ts +2 -0
  15. package/src/generatePublishPackageJson/types.ts +61 -0
  16. package/src/index.ts +10 -0
  17. package/src/indexes/constants.ts +135 -0
  18. package/src/indexes/index.ts +2 -0
  19. package/src/indexes/indexes.ts +194 -0
  20. package/src/indexes/types.ts +87 -0
  21. package/src/installFromLocal/index.ts +2 -0
  22. package/{installFromLocal/installFromLocal.js → src/installFromLocal/installFromLocal.ts} +63 -48
  23. package/src/installFromLocal/types.ts +19 -0
  24. package/src/isMatchingPath/_types.ts +65 -0
  25. package/src/isMatchingPath/index.ts +2 -0
  26. package/src/isMatchingPath/isMatchingPath.ts +88 -0
  27. package/src/isMatchingPath/types.ts +21 -0
  28. package/src/moveFilesToSubdir/index.ts +1 -0
  29. package/src/moveFilesToSubdir/moveFilesToSubdir.ts +23 -0
  30. package/src/ver/index.ts +2 -0
  31. package/src/ver/types.ts +13 -0
  32. package/src/ver/ver.ts +38 -0
  33. package/tsconfig.json +46 -0
  34. package/tsup.config.ts +36 -0
  35. package/addExports/addExports.cjs +0 -71
  36. package/addExports/addExports.cjs.map +0 -1
  37. package/addExports/addExports.d.cts +0 -13
  38. package/addExports/addExports.d.ts +0 -13
  39. package/addExports/addExports.js +0 -71
  40. package/addExports/addExports.js.map +0 -1
  41. package/addExports/index.cjs +0 -5
  42. package/addExports/index.cjs.map +0 -1
  43. package/addExports/index.d.cts +0 -5
  44. package/addExports/index.d.ts +0 -5
  45. package/addExports/index.js +0 -5
  46. package/addExports/index.js.map +0 -1
  47. package/addExports/types.cjs +0 -1
  48. package/addExports/types.cjs.map +0 -1
  49. package/addExports/types.d.cts +0 -33
  50. package/addExports/types.d.ts +0 -33
  51. package/addExports/types.js +0 -1
  52. package/addExports/types.js.map +0 -1
  53. package/checkExistence/checkExistence.cjs +0 -15
  54. package/checkExistence/checkExistence.cjs.map +0 -1
  55. package/checkExistence/checkExistence.d.cts +0 -8
  56. package/checkExistence/checkExistence.d.ts +0 -8
  57. package/checkExistence/checkExistence.js +0 -15
  58. package/checkExistence/checkExistence.js.map +0 -1
  59. package/checkExistence/index.cjs +0 -5
  60. package/checkExistence/index.cjs.map +0 -1
  61. package/checkExistence/index.d.cts +0 -1
  62. package/checkExistence/index.d.ts +0 -1
  63. package/checkExistence/index.js +0 -5
  64. package/checkExistence/index.js.map +0 -1
  65. package/editJsonFile/editJsonFile.cjs +0 -22
  66. package/editJsonFile/editJsonFile.cjs.map +0 -1
  67. package/editJsonFile/editJsonFile.d.cts +0 -8
  68. package/editJsonFile/editJsonFile.d.ts +0 -8
  69. package/editJsonFile/editJsonFile.js +0 -22
  70. package/editJsonFile/editJsonFile.js.map +0 -1
  71. package/editJsonFile/index.cjs +0 -5
  72. package/editJsonFile/index.cjs.map +0 -1
  73. package/editJsonFile/index.d.cts +0 -1
  74. package/editJsonFile/index.d.ts +0 -1
  75. package/editJsonFile/index.js +0 -5
  76. package/editJsonFile/index.js.map +0 -1
  77. package/index.cjs +0 -19
  78. package/index.cjs.map +0 -1
  79. package/index.d.cts +0 -15
  80. package/index.d.ts +0 -15
  81. package/index.js +0 -19
  82. package/index.js.map +0 -1
  83. package/indexes/constants.cjs +0 -91
  84. package/indexes/constants.cjs.map +0 -1
  85. package/indexes/constants.d.cts +0 -66
  86. package/indexes/constants.d.ts +0 -66
  87. package/indexes/constants.js +0 -91
  88. package/indexes/constants.js.map +0 -1
  89. package/indexes/index.cjs +0 -5
  90. package/indexes/index.cjs.map +0 -1
  91. package/indexes/index.d.cts +0 -5
  92. package/indexes/index.d.ts +0 -5
  93. package/indexes/index.js +0 -5
  94. package/indexes/index.js.map +0 -1
  95. package/indexes/indexes.cjs +0 -161
  96. package/indexes/indexes.cjs.map +0 -1
  97. package/indexes/indexes.d.cts +0 -13
  98. package/indexes/indexes.d.ts +0 -13
  99. package/indexes/indexes.js +0 -161
  100. package/indexes/indexes.js.map +0 -1
  101. package/indexes/types.cjs +0 -1
  102. package/indexes/types.cjs.map +0 -1
  103. package/indexes/types.d.cts +0 -81
  104. package/indexes/types.d.ts +0 -81
  105. package/indexes/types.js +0 -1
  106. package/indexes/types.js.map +0 -1
  107. package/installFromLocal/index.cjs +0 -5
  108. package/installFromLocal/index.cjs.map +0 -1
  109. package/installFromLocal/index.d.cts +0 -2
  110. package/installFromLocal/index.d.ts +0 -2
  111. package/installFromLocal/index.js +0 -5
  112. package/installFromLocal/index.js.map +0 -1
  113. package/installFromLocal/installFromLocal.cjs +0 -48
  114. package/installFromLocal/installFromLocal.cjs.map +0 -1
  115. package/installFromLocal/installFromLocal.d.cts +0 -10
  116. package/installFromLocal/installFromLocal.d.ts +0 -10
  117. package/installFromLocal/installFromLocal.js.map +0 -1
  118. package/installFromLocal/types.cjs +0 -1
  119. package/installFromLocal/types.cjs.map +0 -1
  120. package/installFromLocal/types.d.cts +0 -19
  121. package/installFromLocal/types.d.ts +0 -19
  122. package/installFromLocal/types.js +0 -1
  123. package/installFromLocal/types.js.map +0 -1
  124. package/isMatchingPath/_types.cjs +0 -1
  125. package/isMatchingPath/_types.cjs.map +0 -1
  126. package/isMatchingPath/_types.d.cts +0 -52
  127. package/isMatchingPath/_types.d.ts +0 -52
  128. package/isMatchingPath/_types.js +0 -1
  129. package/isMatchingPath/_types.js.map +0 -1
  130. package/isMatchingPath/index.cjs +0 -5
  131. package/isMatchingPath/index.cjs.map +0 -1
  132. package/isMatchingPath/index.d.cts +0 -4
  133. package/isMatchingPath/index.d.ts +0 -4
  134. package/isMatchingPath/index.js +0 -5
  135. package/isMatchingPath/index.js.map +0 -1
  136. package/isMatchingPath/isMatchingPath.cjs +0 -57
  137. package/isMatchingPath/isMatchingPath.cjs.map +0 -1
  138. package/isMatchingPath/isMatchingPath.d.cts +0 -14
  139. package/isMatchingPath/isMatchingPath.d.ts +0 -14
  140. package/isMatchingPath/isMatchingPath.js +0 -57
  141. package/isMatchingPath/isMatchingPath.js.map +0 -1
  142. package/isMatchingPath/types.cjs +0 -1
  143. package/isMatchingPath/types.cjs.map +0 -1
  144. package/isMatchingPath/types.d.cts +0 -19
  145. package/isMatchingPath/types.d.ts +0 -19
  146. package/isMatchingPath/types.js +0 -1
  147. package/isMatchingPath/types.js.map +0 -1
  148. package/moveFilesToSubdir/index.cjs +0 -5
  149. package/moveFilesToSubdir/index.cjs.map +0 -1
  150. package/moveFilesToSubdir/index.d.cts +0 -1
  151. package/moveFilesToSubdir/index.d.ts +0 -1
  152. package/moveFilesToSubdir/index.js +0 -5
  153. package/moveFilesToSubdir/index.js.map +0 -1
  154. package/moveFilesToSubdir/moveFilesToSubdir.cjs +0 -19
  155. package/moveFilesToSubdir/moveFilesToSubdir.cjs.map +0 -1
  156. package/moveFilesToSubdir/moveFilesToSubdir.d.cts +0 -7
  157. package/moveFilesToSubdir/moveFilesToSubdir.d.ts +0 -7
  158. package/moveFilesToSubdir/moveFilesToSubdir.js +0 -19
  159. package/moveFilesToSubdir/moveFilesToSubdir.js.map +0 -1
  160. package/ver/index.cjs +0 -5
  161. package/ver/index.cjs.map +0 -1
  162. package/ver/index.d.cts +0 -2
  163. package/ver/index.d.ts +0 -2
  164. package/ver/index.js +0 -5
  165. package/ver/index.js.map +0 -1
  166. package/ver/types.cjs +0 -1
  167. package/ver/types.cjs.map +0 -1
  168. package/ver/types.d.cts +0 -14
  169. package/ver/types.d.ts +0 -14
  170. package/ver/types.js +0 -1
  171. package/ver/types.js.map +0 -1
  172. package/ver/ver.cjs +0 -31
  173. package/ver/ver.cjs.map +0 -1
  174. package/ver/ver.d.cts +0 -10
  175. package/ver/ver.d.ts +0 -10
  176. package/ver/ver.js +0 -31
  177. package/ver/ver.js.map +0 -1
@@ -1,4 +0,0 @@
1
- export { default } from './isMatchingPath.cjs';
2
- export { IsMatchingPathCondition, IsMatchingPathOptions } from './types.cjs';
3
- import './_types.cjs';
4
- import 'path';
@@ -1,4 +0,0 @@
1
- export { default } from './isMatchingPath.js';
2
- export { IsMatchingPathCondition, IsMatchingPathOptions } from './types.js';
3
- import './_types.js';
4
- import 'path';
@@ -1,5 +0,0 @@
1
- import { default as default2 } from "./isMatchingPath";
2
- export {
3
- default2 as default
4
- };
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/isMatchingPath/index.ts"],"sourcesContent":["export { default } from './isMatchingPath';\r\nexport type * from './types';\r\n"],"mappings":"AAAA,SAAS,WAAAA,gBAAe;","names":["default"]}
@@ -1,57 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
2
- var _path = require('path');
3
- var _remeda = require('remeda');
4
- function isMatchingPath(targetPath, conditions, options = {}) {
5
- if (!conditions) {
6
- return false;
7
- }
8
- const conditionList = Array.isArray(conditions) ? conditions : [conditions];
9
- const posixPath = _path.posix.normalize(targetPath);
10
- const parsedPath = _path.posix.parse(posixPath);
11
- const parsedDir = _path.posix.parse(parsedPath.dir);
12
- const values = {
13
- path: posixPath,
14
- ...parsedPath,
15
- dirpath: parsedPath.dir,
16
- dirbase: parsedDir.base,
17
- dirname: parsedDir.name,
18
- dirext: parsedDir.ext
19
- };
20
- values.path = posixPath;
21
- for (const condition of conditionList) {
22
- if (_isMatching(values.path, values, condition, options)) {
23
- return true;
24
- }
25
- }
26
- return false;
27
- }
28
- function _isMatching(value, values, condition, options) {
29
- if (_remeda.isString.call(void 0, condition)) {
30
- if (value.includes(condition)) {
31
- return true;
32
- }
33
- } else if (condition instanceof RegExp) {
34
- if (condition.test(value)) {
35
- return true;
36
- }
37
- } else if (_remeda.isFunction.call(void 0, condition)) {
38
- return condition(values, _nullishCoalesce(options.conditionOptions, () => ( {})));
39
- } else {
40
- const { valueType = "path", entryType = "both", conditions } = condition;
41
- if (entryType !== "both") {
42
- const stat = _fsextra2.default.statSync(values.path);
43
- if (stat.isDirectory() && entryType !== "dir" || stat.isFile() && entryType !== "file") {
44
- return false;
45
- }
46
- }
47
- const conditionList = Array.isArray(conditions) ? conditions : [conditions];
48
- return conditionList.every(
49
- (cond) => _isMatching(values[valueType], values, cond, options)
50
- );
51
- }
52
- return false;
53
- }
54
-
55
-
56
- exports.default = isMatchingPath;
57
- //# sourceMappingURL=isMatchingPath.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["c:\\Users\\mitsu\\Documents\\git\\@niche-works\\packages\\dev\\dist\\isMatchingPath\\isMatchingPath.cjs"],"names":[],"mappings":"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","file":"C:\\Users\\mitsu\\Documents\\git\\@niche-works\\packages\\dev\\dist\\isMatchingPath\\isMatchingPath.cjs","sourcesContent":[null]}
@@ -1,14 +0,0 @@
1
- import { IsMatchingPathCondition, IsMatchingPathOptions } from './types.cjs';
2
- import './_types.cjs';
3
- import 'path';
4
-
5
- /**
6
- * 処理対象のパスか判定する
7
- * @param targetPath 検査対象のパス
8
- * @param conditions 一致条件
9
- * @param options オプション
10
- * @returns 一致するか
11
- */
12
- declare function isMatchingPath(targetPath: string, conditions: IsMatchingPathCondition | IsMatchingPathCondition[], options?: IsMatchingPathOptions): boolean;
13
-
14
- export { isMatchingPath as default };
@@ -1,14 +0,0 @@
1
- import { IsMatchingPathCondition, IsMatchingPathOptions } from './types.js';
2
- import './_types.js';
3
- import 'path';
4
-
5
- /**
6
- * 処理対象のパスか判定する
7
- * @param targetPath 検査対象のパス
8
- * @param conditions 一致条件
9
- * @param options オプション
10
- * @returns 一致するか
11
- */
12
- declare function isMatchingPath(targetPath: string, conditions: IsMatchingPathCondition | IsMatchingPathCondition[], options?: IsMatchingPathOptions): boolean;
13
-
14
- export { isMatchingPath as default };
@@ -1,57 +0,0 @@
1
- import fs from "fs-extra";
2
- import { posix as path } from "path";
3
- import { isFunction, isString } from "remeda";
4
- function isMatchingPath(targetPath, conditions, options = {}) {
5
- if (!conditions) {
6
- return false;
7
- }
8
- const conditionList = Array.isArray(conditions) ? conditions : [conditions];
9
- const posixPath = path.normalize(targetPath);
10
- const parsedPath = path.parse(posixPath);
11
- const parsedDir = path.parse(parsedPath.dir);
12
- const values = {
13
- path: posixPath,
14
- ...parsedPath,
15
- dirpath: parsedPath.dir,
16
- dirbase: parsedDir.base,
17
- dirname: parsedDir.name,
18
- dirext: parsedDir.ext
19
- };
20
- values.path = posixPath;
21
- for (const condition of conditionList) {
22
- if (_isMatching(values.path, values, condition, options)) {
23
- return true;
24
- }
25
- }
26
- return false;
27
- }
28
- function _isMatching(value, values, condition, options) {
29
- if (isString(condition)) {
30
- if (value.includes(condition)) {
31
- return true;
32
- }
33
- } else if (condition instanceof RegExp) {
34
- if (condition.test(value)) {
35
- return true;
36
- }
37
- } else if (isFunction(condition)) {
38
- return condition(values, options.conditionOptions ?? {});
39
- } else {
40
- const { valueType = "path", entryType = "both", conditions } = condition;
41
- if (entryType !== "both") {
42
- const stat = fs.statSync(values.path);
43
- if (stat.isDirectory() && entryType !== "dir" || stat.isFile() && entryType !== "file") {
44
- return false;
45
- }
46
- }
47
- const conditionList = Array.isArray(conditions) ? conditions : [conditions];
48
- return conditionList.every(
49
- (cond) => _isMatching(values[valueType], values, cond, options)
50
- );
51
- }
52
- return false;
53
- }
54
- export {
55
- isMatchingPath as default
56
- };
57
- //# sourceMappingURL=isMatchingPath.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/isMatchingPath/isMatchingPath.ts"],"sourcesContent":["import fs from 'fs-extra';\r\nimport { posix as path } from 'path';\r\nimport { isFunction, isString } from 'remeda';\r\nimport type { ConditionValues } from './_types';\r\nimport type { IsMatchingPathCondition, IsMatchingPathOptions } from './types';\r\n\r\n/**\r\n * 処理対象のパスか判定する\r\n * @param targetPath 検査対象のパス\r\n * @param conditions 一致条件\r\n * @param options オプション\r\n * @returns 一致するか\r\n */\r\nexport default function isMatchingPath(\r\n targetPath: string,\r\n conditions: IsMatchingPathCondition | IsMatchingPathCondition[],\r\n options: IsMatchingPathOptions = {},\r\n) {\r\n if (!conditions) {\r\n return false;\r\n }\r\n const conditionList = Array.isArray(conditions) ? conditions : [conditions];\r\n // パスは'/'区切り\r\n const posixPath = path.normalize(targetPath);\r\n const parsedPath = path.parse(posixPath);\r\n const parsedDir = path.parse(parsedPath.dir);\r\n const values = {\r\n path: posixPath,\r\n ...parsedPath,\r\n dirpath: parsedPath.dir,\r\n dirbase: parsedDir.base,\r\n dirname: parsedDir.name,\r\n dirext: parsedDir.ext,\r\n };\r\n values.path = posixPath;\r\n\r\n for (const condition of conditionList) {\r\n if (_isMatching(values.path, values, condition, options)) {\r\n // conditionの内の何れかがtrueならば一致\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\n\r\nfunction _isMatching(\r\n value: string,\r\n values: ConditionValues,\r\n condition: IsMatchingPathCondition,\r\n options: IsMatchingPathOptions,\r\n): boolean {\r\n if (isString(condition)) {\r\n // 条件が文字列\r\n if (value.includes(condition)) {\r\n return true;\r\n }\r\n } else if (condition instanceof RegExp) {\r\n // 条件が正規表現\r\n if (condition.test(value)) {\r\n return true;\r\n }\r\n } else if (isFunction(condition)) {\r\n // 条件が関数\r\n return condition(values, options.conditionOptions ?? {});\r\n } else {\r\n // 条件が設定\r\n const { valueType = 'path', entryType = 'both', conditions } = condition;\r\n if (entryType !== 'both') {\r\n const stat = fs.statSync(values.path);\r\n if (\r\n (stat.isDirectory() && entryType !== 'dir') ||\r\n (stat.isFile() && entryType !== 'file')\r\n ) {\r\n return false;\r\n }\r\n }\r\n const conditionList = Array.isArray(conditions) ? conditions : [conditions];\r\n // 設定配下のconditionsはand条件\r\n return conditionList.every((cond) =>\r\n _isMatching(values[valueType], values, cond, options),\r\n );\r\n }\r\n return false;\r\n}\r\n"],"mappings":"AAAA,OAAO,QAAQ;AACf,SAAS,SAAS,YAAY;AAC9B,SAAS,YAAY,gBAAgB;AAWtB,SAAR,eACL,YACA,YACA,UAAiC,CAAC,GAClC;AACA,MAAI,CAAC,YAAY;AACf,WAAO;AAAA,EACT;AACA,QAAM,gBAAgB,MAAM,QAAQ,UAAU,IAAI,aAAa,CAAC,UAAU;AAE1E,QAAM,YAAY,KAAK,UAAU,UAAU;AAC3C,QAAM,aAAa,KAAK,MAAM,SAAS;AACvC,QAAM,YAAY,KAAK,MAAM,WAAW,GAAG;AAC3C,QAAM,SAAS;AAAA,IACb,MAAM;AAAA,IACN,GAAG;AAAA,IACH,SAAS,WAAW;AAAA,IACpB,SAAS,UAAU;AAAA,IACnB,SAAS,UAAU;AAAA,IACnB,QAAQ,UAAU;AAAA,EACpB;AACA,SAAO,OAAO;AAEd,aAAW,aAAa,eAAe;AACrC,QAAI,YAAY,OAAO,MAAM,QAAQ,WAAW,OAAO,GAAG;AAExD,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,YACP,OACA,QACA,WACA,SACS;AACT,MAAI,SAAS,SAAS,GAAG;AAEvB,QAAI,MAAM,SAAS,SAAS,GAAG;AAC7B,aAAO;AAAA,IACT;AAAA,EACF,WAAW,qBAAqB,QAAQ;AAEtC,QAAI,UAAU,KAAK,KAAK,GAAG;AACzB,aAAO;AAAA,IACT;AAAA,EACF,WAAW,WAAW,SAAS,GAAG;AAEhC,WAAO,UAAU,QAAQ,QAAQ,oBAAoB,CAAC,CAAC;AAAA,EACzD,OAAO;AAEL,UAAM,EAAE,YAAY,QAAQ,YAAY,QAAQ,WAAW,IAAI;AAC/D,QAAI,cAAc,QAAQ;AACxB,YAAM,OAAO,GAAG,SAAS,OAAO,IAAI;AACpC,UACG,KAAK,YAAY,KAAK,cAAc,SACpC,KAAK,OAAO,KAAK,cAAc,QAChC;AACA,eAAO;AAAA,MACT;AAAA,IACF;AACA,UAAM,gBAAgB,MAAM,QAAQ,UAAU,IAAI,aAAa,CAAC,UAAU;AAE1E,WAAO,cAAc;AAAA,MAAM,CAAC,SAC1B,YAAY,OAAO,SAAS,GAAG,QAAQ,MAAM,OAAO;AAAA,IACtD;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
@@ -1 +0,0 @@
1
- "use strict";//# sourceMappingURL=types.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["c:\\Users\\mitsu\\Documents\\git\\@niche-works\\packages\\dev\\dist\\isMatchingPath\\types.cjs"],"names":[],"mappings":"AAAA","file":"C:\\Users\\mitsu\\Documents\\git\\@niche-works\\packages\\dev\\dist\\isMatchingPath\\types.cjs"}
@@ -1,19 +0,0 @@
1
- import { ConditionConfig, ConditionFn } from './_types.cjs';
2
- import 'path';
3
-
4
- /**
5
- * 一致条件
6
- *
7
- * - string: 指定された文字列がパスに含まれているものに一致する際にtrue
8
- * - RegExp: 指定された正規表現にパスが一致する際にtrue
9
- * - ConditionConfig: 条件設定に従って検査し一致したときにtrue
10
- */
11
- type IsMatchingPathCondition = string | RegExp | ConditionConfig | ConditionFn;
12
- type IsMatchingPathOptions = {
13
- /**
14
- * ConditionFnに渡すオプション
15
- */
16
- conditionOptions?: Record<string, any>;
17
- };
18
-
19
- export type { IsMatchingPathCondition, IsMatchingPathOptions };
@@ -1,19 +0,0 @@
1
- import { ConditionConfig, ConditionFn } from './_types.js';
2
- import 'path';
3
-
4
- /**
5
- * 一致条件
6
- *
7
- * - string: 指定された文字列がパスに含まれているものに一致する際にtrue
8
- * - RegExp: 指定された正規表現にパスが一致する際にtrue
9
- * - ConditionConfig: 条件設定に従って検査し一致したときにtrue
10
- */
11
- type IsMatchingPathCondition = string | RegExp | ConditionConfig | ConditionFn;
12
- type IsMatchingPathOptions = {
13
- /**
14
- * ConditionFnに渡すオプション
15
- */
16
- conditionOptions?: Record<string, any>;
17
- };
18
-
19
- export type { IsMatchingPathCondition, IsMatchingPathOptions };
@@ -1 +0,0 @@
1
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,5 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _moveFilesToSubdir = require('./moveFilesToSubdir'); var _moveFilesToSubdir2 = _interopRequireDefault(_moveFilesToSubdir);
2
-
3
-
4
- exports.default = _moveFilesToSubdir2.default;
5
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["c:\\Users\\mitsu\\Documents\\git\\@niche-works\\packages\\dev\\dist\\moveFilesToSubdir\\index.cjs"],"names":[],"mappings":"AAAA,uSAAyD;AACzD;AACE;AACF,8CAAC","file":"C:\\Users\\mitsu\\Documents\\git\\@niche-works\\packages\\dev\\dist\\moveFilesToSubdir\\index.cjs","sourcesContent":[null]}
@@ -1 +0,0 @@
1
- export { default } from './moveFilesToSubdir.cjs';
@@ -1 +0,0 @@
1
- export { default } from './moveFilesToSubdir.js';
@@ -1,5 +0,0 @@
1
- import { default as default2 } from "./moveFilesToSubdir";
2
- export {
3
- default2 as default
4
- };
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/moveFilesToSubdir/index.ts"],"sourcesContent":["export { default } from './moveFilesToSubdir';\r\n"],"mappings":"AAAA,SAAS,WAAAA,gBAAe;","names":["default"]}
@@ -1,19 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
2
- var _path = require('path'); var _path2 = _interopRequireDefault(_path);
3
- async function moveFilesToSubdir(dirPath) {
4
- const items = await _fsextra2.default.readdir(dirPath);
5
- for (const item of items) {
6
- const itemPath = _path2.default.join(dirPath, item);
7
- const stat = _fsextra2.default.statSync(itemPath);
8
- if (stat.isFile()) {
9
- const fileName = _path2.default.parse(item).name;
10
- const subdirPath = _path2.default.join(dirPath, fileName);
11
- _fsextra2.default.ensureDirSync(subdirPath);
12
- _fsextra2.default.moveSync(itemPath, _path2.default.join(subdirPath, item));
13
- }
14
- }
15
- }
16
-
17
-
18
- exports.default = moveFilesToSubdir;
19
- //# sourceMappingURL=moveFilesToSubdir.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["c:\\Users\\mitsu\\Documents\\git\\@niche-works\\packages\\dev\\dist\\moveFilesToSubdir\\moveFilesToSubdir.cjs"],"names":[],"mappings":"AAAA,8PAAyB;AACzB,wEAAuB;AACvB,MAAM,SAAS,iBAAiB,CAAC,OAAO,EAAE;AAC1C,EAAE,MAAM,MAAM,EAAE,MAAM,iBAAE,CAAC,OAAO,CAAC,OAAO,CAAC;AACzC,EAAE,IAAI,CAAC,MAAM,KAAK,GAAG,KAAK,EAAE;AAC5B,IAAI,MAAM,SAAS,EAAE,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC;AAC7C,IAAI,MAAM,KAAK,EAAE,iBAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;AACtC,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE;AACvB,MAAM,MAAM,SAAS,EAAE,cAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI;AAC5C,MAAM,MAAM,WAAW,EAAE,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC;AACrD,MAAM,iBAAE,CAAC,aAAa,CAAC,UAAU,CAAC;AAClC,MAAM,iBAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,cAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AACxD,IAAI;AACJ,EAAE;AACF;AACA;AACE;AACF,oCAAC","file":"C:\\Users\\mitsu\\Documents\\git\\@niche-works\\packages\\dev\\dist\\moveFilesToSubdir\\moveFilesToSubdir.cjs","sourcesContent":[null]}
@@ -1,7 +0,0 @@
1
- /**
2
- * 対象のディレクトリ直下のファイルを、拡張子を除いた同名のサブディレクトリ直下に移動する
3
- * @param dirPath 対象のディレクトリのパス
4
- */
5
- declare function moveFilesToSubdir(dirPath: string): Promise<void>;
6
-
7
- export { moveFilesToSubdir as default };
@@ -1,7 +0,0 @@
1
- /**
2
- * 対象のディレクトリ直下のファイルを、拡張子を除いた同名のサブディレクトリ直下に移動する
3
- * @param dirPath 対象のディレクトリのパス
4
- */
5
- declare function moveFilesToSubdir(dirPath: string): Promise<void>;
6
-
7
- export { moveFilesToSubdir as default };
@@ -1,19 +0,0 @@
1
- import fs from "fs-extra";
2
- import path from "path";
3
- async function moveFilesToSubdir(dirPath) {
4
- const items = await fs.readdir(dirPath);
5
- for (const item of items) {
6
- const itemPath = path.join(dirPath, item);
7
- const stat = fs.statSync(itemPath);
8
- if (stat.isFile()) {
9
- const fileName = path.parse(item).name;
10
- const subdirPath = path.join(dirPath, fileName);
11
- fs.ensureDirSync(subdirPath);
12
- fs.moveSync(itemPath, path.join(subdirPath, item));
13
- }
14
- }
15
- }
16
- export {
17
- moveFilesToSubdir as default
18
- };
19
- //# sourceMappingURL=moveFilesToSubdir.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/moveFilesToSubdir/moveFilesToSubdir.ts"],"sourcesContent":["import fs from 'fs-extra';\r\nimport path from 'path';\r\n\r\n/**\r\n * 対象のディレクトリ直下のファイルを、拡張子を除いた同名のサブディレクトリ直下に移動する\r\n * @param dirPath 対象のディレクトリのパス\r\n */\r\nexport default async function moveFilesToSubdir(dirPath: string) {\r\n const items = await fs.readdir(dirPath);\r\n for (const item of items) {\r\n const itemPath = path.join(dirPath, item);\r\n const stat = fs.statSync(itemPath);\r\n if (stat.isFile()) {\r\n const fileName = path.parse(item).name;\r\n // 移動先のディレクトリパスを生成\r\n const subdirPath = path.join(dirPath, fileName);\r\n // 移動先のディレクトリが存在しなければ作成\r\n fs.ensureDirSync(subdirPath);\r\n // 移動先のファイルパスを生成\r\n fs.moveSync(itemPath, path.join(subdirPath, item));\r\n }\r\n }\r\n}\r\n"],"mappings":"AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AAMjB,eAAO,kBAAyC,SAAiB;AAC/D,QAAM,QAAQ,MAAM,GAAG,QAAQ,OAAO;AACtC,aAAW,QAAQ,OAAO;AACxB,UAAM,WAAW,KAAK,KAAK,SAAS,IAAI;AACxC,UAAM,OAAO,GAAG,SAAS,QAAQ;AACjC,QAAI,KAAK,OAAO,GAAG;AACjB,YAAM,WAAW,KAAK,MAAM,IAAI,EAAE;AAElC,YAAM,aAAa,KAAK,KAAK,SAAS,QAAQ;AAE9C,SAAG,cAAc,UAAU;AAE3B,SAAG,SAAS,UAAU,KAAK,KAAK,YAAY,IAAI,CAAC;AAAA,IACnD;AAAA,EACF;AACF;","names":[]}
package/ver/index.cjs DELETED
@@ -1,5 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _ver = require('./ver'); var _ver2 = _interopRequireDefault(_ver);
2
-
3
-
4
- exports.default = _ver2.default;
5
- //# sourceMappingURL=index.cjs.map
package/ver/index.cjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["c:\\Users\\mitsu\\Documents\\git\\@niche-works\\packages\\dev\\dist\\ver\\index.cjs"],"names":[],"mappings":"AAAA,+OAA2C;AAC3C;AACE;AACF,gCAAC","file":"C:\\Users\\mitsu\\Documents\\git\\@niche-works\\packages\\dev\\dist\\ver\\index.cjs","sourcesContent":[null]}
package/ver/index.d.cts DELETED
@@ -1,2 +0,0 @@
1
- export { VerOptions } from './types.cjs';
2
- export { default } from './ver.cjs';
package/ver/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export { VerOptions } from './types.js';
2
- export { default } from './ver.js';
package/ver/index.js DELETED
@@ -1,5 +0,0 @@
1
- import { default as default2 } from "./ver";
2
- export {
3
- default2 as default
4
- };
5
- //# sourceMappingURL=index.js.map
package/ver/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ver/index.ts"],"sourcesContent":["export type * from './types';\r\nexport { default } from './ver';\r\n"],"mappings":"AACA,SAAS,WAAAA,gBAAe;","names":["default"]}
package/ver/types.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";//# sourceMappingURL=types.cjs.map
package/ver/types.cjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["c:\\Users\\mitsu\\Documents\\git\\@niche-works\\packages\\dev\\dist\\ver\\types.cjs"],"names":[],"mappings":"AAAA","file":"C:\\Users\\mitsu\\Documents\\git\\@niche-works\\packages\\dev\\dist\\ver\\types.cjs"}
package/ver/types.d.cts DELETED
@@ -1,14 +0,0 @@
1
- type VerOptions = {
2
- /**
3
- * ワークスペースのパッケージjsonのパス
4
- * デフォルトは`./package.json`
5
- */
6
- workspacePackageJsonPath?: string;
7
- /**
8
- * パッケージが置かれたディレクトリのパス
9
- * デフォルトは`./packages`
10
- */
11
- packagesPath?: string;
12
- };
13
-
14
- export type { VerOptions };
package/ver/types.d.ts DELETED
@@ -1,14 +0,0 @@
1
- type VerOptions = {
2
- /**
3
- * ワークスペースのパッケージjsonのパス
4
- * デフォルトは`./package.json`
5
- */
6
- workspacePackageJsonPath?: string;
7
- /**
8
- * パッケージが置かれたディレクトリのパス
9
- * デフォルトは`./packages`
10
- */
11
- packagesPath?: string;
12
- };
13
-
14
- export type { VerOptions };
package/ver/types.js DELETED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=types.js.map
package/ver/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/ver/ver.cjs DELETED
@@ -1,31 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
2
- var _path = require('path'); var _path2 = _interopRequireDefault(_path);
3
- async function ver(version, options = {}) {
4
- const {
5
- workspacePackageJsonPath = "package.json",
6
- packagesPath = "packages"
7
- } = options;
8
- if (_fsextra2.default.existsSync(workspacePackageJsonPath)) {
9
- _updatePkgJson(version, workspacePackageJsonPath);
10
- }
11
- const pkgs = _fsextra2.default.readdirSync(packagesPath);
12
- for (const pkg of pkgs) {
13
- const packagePath = _path2.default.join(packagesPath, pkg);
14
- const packageJsonPath = _path2.default.join(packagePath, "package.json");
15
- if (_fsextra2.default.existsSync(packageJsonPath)) {
16
- _updatePkgJson(version, packageJsonPath);
17
- }
18
- }
19
- }
20
- function _updatePkgJson(version, packageJsonPath) {
21
- const packageJson = _fsextra2.default.readJsonSync(packageJsonPath, { encoding: "utf8" });
22
- packageJson.version = version;
23
- _fsextra2.default.writeJsonSync(packageJsonPath, packageJson, {
24
- encoding: "utf8",
25
- spaces: 2
26
- });
27
- }
28
-
29
-
30
- exports.default = ver;
31
- //# sourceMappingURL=ver.cjs.map
package/ver/ver.cjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["c:\\Users\\mitsu\\Documents\\git\\@niche-works\\packages\\dev\\dist\\ver\\ver.cjs"],"names":[],"mappings":"AAAA,8PAAyB;AACzB,wEAAuB;AACvB,MAAM,SAAS,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE;AAC1C,EAAE,MAAM;AACR,IAAI,yBAAyB,EAAE,cAAc;AAC7C,IAAI,aAAa,EAAE;AACnB,EAAE,EAAE,EAAE,OAAO;AACb,EAAE,GAAG,CAAC,iBAAE,CAAC,UAAU,CAAC,wBAAwB,CAAC,EAAE;AAC/C,IAAI,cAAc,CAAC,OAAO,EAAE,wBAAwB,CAAC;AACrD,EAAE;AACF,EAAE,MAAM,KAAK,EAAE,iBAAE,CAAC,WAAW,CAAC,YAAY,CAAC;AAC3C,EAAE,IAAI,CAAC,MAAM,IAAI,GAAG,IAAI,EAAE;AAC1B,IAAI,MAAM,YAAY,EAAE,cAAI,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC;AACpD,IAAI,MAAM,gBAAgB,EAAE,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC;AAClE,IAAI,GAAG,CAAC,iBAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE;AACxC,MAAM,cAAc,CAAC,OAAO,EAAE,eAAe,CAAC;AAC9C,IAAI;AACJ,EAAE;AACF;AACA,SAAS,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE;AAClD,EAAE,MAAM,YAAY,EAAE,iBAAE,CAAC,YAAY,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC5E,EAAE,WAAW,CAAC,QAAQ,EAAE,OAAO;AAC/B,EAAE,iBAAE,CAAC,aAAa,CAAC,eAAe,EAAE,WAAW,EAAE;AACjD,IAAI,QAAQ,EAAE,MAAM;AACpB,IAAI,MAAM,EAAE;AACZ,EAAE,CAAC,CAAC;AACJ;AACA;AACE;AACF,sBAAC","file":"C:\\Users\\mitsu\\Documents\\git\\@niche-works\\packages\\dev\\dist\\ver\\ver.cjs","sourcesContent":[null]}
package/ver/ver.d.cts DELETED
@@ -1,10 +0,0 @@
1
- import { VerOptions } from './types.cjs';
2
-
3
- /**
4
- * ワークスペースのパッケージにバージョンを反映する
5
- * @param version バージョン
6
- * @param options オプション
7
- */
8
- declare function ver(version: string, options?: VerOptions): Promise<void>;
9
-
10
- export { ver as default };
package/ver/ver.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import { VerOptions } from './types.js';
2
-
3
- /**
4
- * ワークスペースのパッケージにバージョンを反映する
5
- * @param version バージョン
6
- * @param options オプション
7
- */
8
- declare function ver(version: string, options?: VerOptions): Promise<void>;
9
-
10
- export { ver as default };
package/ver/ver.js DELETED
@@ -1,31 +0,0 @@
1
- import fs from "fs-extra";
2
- import path from "path";
3
- async function ver(version, options = {}) {
4
- const {
5
- workspacePackageJsonPath = "package.json",
6
- packagesPath = "packages"
7
- } = options;
8
- if (fs.existsSync(workspacePackageJsonPath)) {
9
- _updatePkgJson(version, workspacePackageJsonPath);
10
- }
11
- const pkgs = fs.readdirSync(packagesPath);
12
- for (const pkg of pkgs) {
13
- const packagePath = path.join(packagesPath, pkg);
14
- const packageJsonPath = path.join(packagePath, "package.json");
15
- if (fs.existsSync(packageJsonPath)) {
16
- _updatePkgJson(version, packageJsonPath);
17
- }
18
- }
19
- }
20
- function _updatePkgJson(version, packageJsonPath) {
21
- const packageJson = fs.readJsonSync(packageJsonPath, { encoding: "utf8" });
22
- packageJson.version = version;
23
- fs.writeJsonSync(packageJsonPath, packageJson, {
24
- encoding: "utf8",
25
- spaces: 2
26
- });
27
- }
28
- export {
29
- ver as default
30
- };
31
- //# sourceMappingURL=ver.js.map
package/ver/ver.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ver/ver.ts"],"sourcesContent":["import fs from 'fs-extra';\r\nimport path from 'path';\r\nimport type { VerOptions } from './types';\r\n\r\n/**\r\n * ワークスペースのパッケージにバージョンを反映する\r\n * @param version バージョン\r\n * @param options オプション\r\n */\r\nexport default async function ver(version: string, options: VerOptions = {}) {\r\n const {\r\n workspacePackageJsonPath = 'package.json',\r\n packagesPath = 'packages',\r\n } = options;\r\n\r\n if (fs.existsSync(workspacePackageJsonPath)) {\r\n // ワークスペースのpackage.jsonを更新\r\n _updatePkgJson(version, workspacePackageJsonPath);\r\n }\r\n const pkgs = fs.readdirSync(packagesPath);\r\n for (const pkg of pkgs) {\r\n const packagePath = path.join(packagesPath, pkg);\r\n const packageJsonPath = path.join(packagePath, 'package.json');\r\n if (fs.existsSync(packageJsonPath)) {\r\n // 各パッケージのpackage.jsonを更新\r\n _updatePkgJson(version, packageJsonPath);\r\n }\r\n }\r\n}\r\n\r\nfunction _updatePkgJson(version: string, packageJsonPath: string) {\r\n const packageJson = fs.readJsonSync(packageJsonPath, { encoding: 'utf8' });\r\n packageJson.version = version;\r\n fs.writeJsonSync(packageJsonPath, packageJson, {\r\n encoding: 'utf8',\r\n spaces: 2,\r\n });\r\n}\r\n"],"mappings":"AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AAQjB,eAAO,IAA2B,SAAiB,UAAsB,CAAC,GAAG;AAC3E,QAAM;AAAA,IACJ,2BAA2B;AAAA,IAC3B,eAAe;AAAA,EACjB,IAAI;AAEJ,MAAI,GAAG,WAAW,wBAAwB,GAAG;AAE3C,mBAAe,SAAS,wBAAwB;AAAA,EAClD;AACA,QAAM,OAAO,GAAG,YAAY,YAAY;AACxC,aAAW,OAAO,MAAM;AACtB,UAAM,cAAc,KAAK,KAAK,cAAc,GAAG;AAC/C,UAAM,kBAAkB,KAAK,KAAK,aAAa,cAAc;AAC7D,QAAI,GAAG,WAAW,eAAe,GAAG;AAElC,qBAAe,SAAS,eAAe;AAAA,IACzC;AAAA,EACF;AACF;AAEA,SAAS,eAAe,SAAiB,iBAAyB;AAChE,QAAM,cAAc,GAAG,aAAa,iBAAiB,EAAE,UAAU,OAAO,CAAC;AACzE,cAAY,UAAU;AACtB,KAAG,cAAc,iBAAiB,aAAa;AAAA,IAC7C,UAAU;AAAA,IACV,QAAQ;AAAA,EACV,CAAC;AACH;","names":[]}