@yarn-tool/static-file 1.0.78 → 1.0.82

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/CHANGELOG.md CHANGED
@@ -3,6 +3,56 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.82](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/static-file@1.0.81...@yarn-tool/static-file@1.0.82) (2021-12-27)
7
+
8
+
9
+ ### 🐛 Bug Fixes
10
+
11
+ * Error: file not exists. `file\ws-root\__root_ws.ts` ([b472cef](https://github.com/bluelovers/ws-yarn-workspaces/commit/b472cefbce11fa67ade3f4c2922e1ec3e2c27dc6))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.0.81](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/static-file@1.0.80...@yarn-tool/static-file@1.0.81) (2021-12-26)
18
+
19
+
20
+ ### 🔖 Miscellaneous
21
+
22
+ * . ([705de2c](https://github.com/bluelovers/ws-yarn-workspaces/commit/705de2ca08334ded6dcab3497ad3a1812c354546))
23
+
24
+
25
+
26
+
27
+
28
+ ## [1.0.80](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/static-file@1.0.79...@yarn-tool/static-file@1.0.80) (2021-12-16)
29
+
30
+
31
+ ### ✨ Features
32
+
33
+ * add `defaultCopyStaticFilesWsRootOnly` ([80c9b8f](https://github.com/bluelovers/ws-yarn-workspaces/commit/80c9b8fc3c47b830b22b9a10cec3b0181d751650))
34
+ * update test/tsconfig.json.tpl ([c967e1e](https://github.com/bluelovers/ws-yarn-workspaces/commit/c967e1e3cad3465db71a860b9413ec577c09e2cc))
35
+
36
+
37
+ ### 🔖 Miscellaneous
38
+
39
+ * . ([104475f](https://github.com/bluelovers/ws-yarn-workspaces/commit/104475f2baa62e53dcc4cd6f3fb3a425cba1c88d))
40
+
41
+
42
+
43
+
44
+
45
+ ## [1.0.79](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/static-file@1.0.78...@yarn-tool/static-file@1.0.79) (2021-12-07)
46
+
47
+
48
+ ### 🔖 Miscellaneous
49
+
50
+ * . ([6383bf8](https://github.com/bluelovers/ws-yarn-workspaces/commit/6383bf803e111d57606ac74e994372df1e11d23f))
51
+
52
+
53
+
54
+
55
+
6
56
  ## [1.0.78](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/static-file@1.0.77...@yarn-tool/static-file@1.0.78) (2021-12-06)
7
57
 
8
58
 
package/file/gitignore CHANGED
@@ -121,6 +121,12 @@ bin/**/*.d.cts
121
121
  /packages/*/tests/*.d.cts
122
122
  /packages/*/tests/temp*
123
123
 
124
+ /src/**/*.d.ts
125
+ /src/**/*.js
126
+ /src/**/*.d.cts
127
+ /src/**/*.d.mts
128
+ /src/**/*.cjs
129
+ /src/**/*.mjs
124
130
 
125
131
  **/node_modules
126
132
  *.tgz
@@ -206,3 +212,4 @@ jest.config.js.map
206
212
  /_*/
207
213
  _snowpack
208
214
  web_modules
215
+ tsc-multi.json.tpl
@@ -35,8 +35,12 @@ function _requireResolve(name)
35
35
  const testExt = [
36
36
  'ts',
37
37
  'tsx',
38
+ 'mts',
39
+ 'cts',
38
40
  //'js',
39
41
  //'jsx',
42
+ // 'mjs',
43
+ // 'cjs',
40
44
  ].join('|');
41
45
 
42
46
  /**
@@ -47,8 +51,12 @@ module.exports = {
47
51
  moduleFileExtensions: [
48
52
  'ts',
49
53
  'tsx',
54
+ 'mts',
55
+ 'cts',
50
56
  'js',
51
57
  'jsx',
58
+ 'mjs',
59
+ 'cjs',
52
60
  'json',
53
61
  'node',
54
62
  ],
@@ -75,7 +83,7 @@ module.exports = {
75
83
  //"jest-num-close-with",
76
84
  ],
77
85
  transform: {
78
- '.(ts|tsx)$': _requireResolve('ts-jest'),
86
+ '.(ts|tsx|mts|cts)$': _requireResolve('ts-jest'),
79
87
  },
80
88
  verbose: true,
81
89
  /**
@@ -29,14 +29,17 @@
29
29
  "conventionalGraduate": false
30
30
  },
31
31
  "version": {
32
+ "concurrency": 1,
32
33
  "noPrivate": true,
33
34
  "conventionalCommits": true,
34
35
  "changelogPreset": "@bluelovers/conventional-changelog-bluelovers"
35
36
  },
36
37
  "run": {
38
+ "concurrency": 1,
37
39
  "stream": true
38
40
  },
39
41
  "exec": {
42
+ "concurrency": 1,
40
43
  "stream": true
41
44
  },
42
45
  "add": {
package/file/npmignore CHANGED
@@ -35,6 +35,13 @@ node_modules
35
35
  /bin/**/*.d.cts
36
36
  /bin/*.d.cts
37
37
 
38
+ /src/**/*.d.ts
39
+ /src/**/*.js
40
+ /src/**/*.d.cts
41
+ /src/**/*.d.mts
42
+ /src/**/*.cjs
43
+ /src/**/*.mjs
44
+
38
45
  *.tgz
39
46
  /tsconfig.json.tpl
40
47
  yarn-error.log
@@ -110,3 +117,6 @@ _snowpack
110
117
  /snowpack.config.js
111
118
  web_modules
112
119
  cz-adapter
120
+
121
+ tsc-multi.json.tpl
122
+ tsc-multi.json
@@ -0,0 +1 @@
1
+ export declare const __root: string;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.__root = void 0;
4
+ const path_1 = require("path");
5
+ exports.__root = (0, path_1.join)(__dirname, '..');
6
+ //# sourceMappingURL=__root.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__root.js","sourceRoot":"","sources":["__root.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAEf,QAAA,MAAM,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC","sourcesContent":["import { join } from \"path\";\n\nexport const __root = join(__dirname, '..');\n"]}
@@ -0,0 +1,3 @@
1
+ import { join } from "path";
2
+
3
+ export const __root = join(__dirname, '..');
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "extends": "../tsconfig.json",
3
3
  "compilerOptions": {
4
- "module": "CommonJS",
4
+ "module": "node12",
5
5
  "noEmit": true,
6
- "declaration": false
6
+ "declaration": false,
7
+ "noUnusedParameters": false,
8
+ "allowUnusedLabels": true,
9
+ "noUnusedLocals": false,
10
+ "noPropertyAccessFromIndexSignature": false
7
11
  }
8
12
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "targets": [
3
+ { "extname": ".cjs", "module": "commonjs" },
4
+ { "extname": ".mjs", "module": "nodenext" }
5
+ ]
6
+ }
@@ -0,0 +1 @@
1
+ export declare const __root_ws: string;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.__root_ws = void 0;
4
+ const path_1 = require("path");
5
+ exports.__root_ws = (0, path_1.join)(__dirname);
6
+ //# sourceMappingURL=__root_ws.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__root_ws.js","sourceRoot":"","sources":["__root_ws.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAEf,QAAA,SAAS,GAAG,IAAA,WAAI,EAAC,SAAS,CAAC,CAAC","sourcesContent":["import { join } from \"path\";\n\nexport const __root_ws = join(__dirname);\n"]}
@@ -0,0 +1,3 @@
1
+ import { join } from "path";
2
+
3
+ export const __root_ws = join(__dirname);
package/lib/const.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  import { IStaticFilesMapArray } from './types';
2
- export declare const defaultCopyStaticFiles: IStaticFilesMapArray<"tsconfig.json.tpl" | "test/tsconfig.json.tpl" | "tsconfig.esm.json.tpl" | "tsconfig.tsdx.json.tpl" | ".eslintrc.json.tpl" | "now.json.tpl" | ".npmrc.tpl" | "tsdx.config.js.tpl">;
2
+ export declare const defaultCopyStaticFiles: IStaticFilesMapArray<"tsconfig.json.tpl" | "test/tsconfig.json.tpl" | "tsconfig.esm.json.tpl" | "tsconfig.tsdx.json.tpl" | ".eslintrc.json.tpl" | "now.json.tpl" | ".npmrc.tpl" | "tsdx.config.js.tpl" | "tsc-multi.json.tpl">;
3
3
  export declare const defaultCopyStaticFilesRootOnly: IStaticFilesMapArray<"tsconfig.json" | "lerna.json.tpl" | "pnpm-workspace.yaml.tpl">;
4
+ export declare const defaultCopyStaticFilesWsRootOnly: IStaticFilesMapArray<"tsc-multi.json.tpl">;
package/lib/const.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultCopyStaticFilesRootOnly = exports.defaultCopyStaticFiles = void 0;
3
+ exports.defaultCopyStaticFilesWsRootOnly = exports.defaultCopyStaticFilesRootOnly = exports.defaultCopyStaticFiles = void 0;
4
4
  const _defaultCopyStaticFiles = [
5
5
  ['.npmignore', 'file/npmignore'],
6
6
  ['.gitignore', 'file/gitignore'],
@@ -20,6 +20,8 @@ const _defaultCopyStaticFiles = [
20
20
  ['now.json.tpl', 'file/now.json.tpl', 'now.json'],
21
21
  ['.npmrc.tpl', 'file/npmrc', '.npmrc'],
22
22
  ['tsdx.config.js.tpl', 'file/tsdx.config.js', 'tsdx.config.js'],
23
+ ['tsc-multi.json.tpl', 'file/tsc-multi.json.tpl', 'tsc-multi.json'],
24
+ ['test/__root.ts', 'file/test/__root.ts'],
23
25
  ];
24
26
  const _defaultCopyStaticFilesRootOnly = [
25
27
  ['lerna.json.tpl', 'file/lerna.json.tpl', 'lerna.json'],
@@ -28,6 +30,14 @@ const _defaultCopyStaticFilesRootOnly = [
28
30
  ['.github/workflows/action-yarnlock-dedupe.yml', 'file/github/workflows/action-yarnlock-dedupe.yml'],
29
31
  ['tsconfig.json', 'file/tsconfig.json.tpl', 'tsconfig.json'],
30
32
  ];
33
+ const _defaultCopyStaticFilesWsRootOnly = [
34
+ ['lerna.json.tpl', 'file/lerna.json.tpl'],
35
+ ['pnpm-workspace.yaml', 'file/pnpm-workspace.yaml'],
36
+ ['tsconfig.json', 'file/tsconfig.json.tpl'],
37
+ ['tsc-multi.json.tpl', 'file/tsc-multi.json.tpl', 'tsc-multi.json'],
38
+ ['__root_ws.ts', 'file/ws-root/__root_ws.ts'],
39
+ ];
31
40
  exports.defaultCopyStaticFiles = Object.freeze(_defaultCopyStaticFiles);
32
41
  exports.defaultCopyStaticFilesRootOnly = Object.freeze(_defaultCopyStaticFilesRootOnly);
42
+ exports.defaultCopyStaticFilesWsRootOnly = Object.freeze(_defaultCopyStaticFilesWsRootOnly);
33
43
  //# sourceMappingURL=const.js.map
package/lib/const.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"const.js","sourceRoot":"","sources":["const.ts"],"names":[],"mappings":";;;AAEA,MAAM,uBAAuB,GAAG;IAE/B,CAAC,YAAY,EAAE,gBAAgB,CAAC;IAChC,CAAC,YAAY,EAAE,gBAAgB,CAAC;IAEhC,CAAC,eAAe,EAAE,mBAAmB,CAAC;IAEtC,CAAC,QAAQ,EAAE,YAAY,CAAC;IACxB,CAAC,iBAAiB,EAAE,qBAAqB,CAAC;IAE1C,CAAC,mBAAmB,EAAE,wBAAwB,EAAE,eAAe,CAAC;IAEhE,CAAC,wBAAwB,EAAE,6BAA6B,EAAE,oBAAoB,CAAC;IAE/E,CAAC,uBAAuB,EAAE,4BAA4B,EAAE,mBAAmB,CAAC;IAE5E,CAAC,wBAAwB,EAAE,6BAA6B,EAAE,oBAAoB,CAAC;IAE/E,CAAC,oBAAoB,EAAE,wBAAwB,EAAE,gBAAgB,CAAC;IAElE,CAAC,WAAW,EAAE,gBAAgB,CAAC;IAE/B,CAAC,QAAQ,EAAE,YAAY,CAAC;IAExB,CAAC,cAAc,EAAE,kBAAkB,CAAC;IACpC,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;IAEzC,CAAC,YAAY,EAAE,gBAAgB,CAAC;IAEhC,CAAC,cAAc,EAAE,mBAAmB,EAAE,UAAU,CAAC;IAEjD,CAAC,YAAY,EAAE,YAAY,EAAE,QAAQ,CAAC;IAEtC,CAAC,oBAAoB,EAAE,qBAAqB,EAAE,gBAAgB,CAAC;CAEtD,CAAC;AAEX,MAAM,+BAA+B,GAAG;IAEvC,CAAC,gBAAgB,EAAE,qBAAqB,EAAE,YAAY,CAAC;IAEvD,CAAC,yBAAyB,EAAE,0BAA0B,EAAE,qBAAqB,CAAC;IAE9E,CAAC,gCAAgC,EAAE,oCAAoC,CAAC;IAExE,CAAC,8CAA8C,EAAE,kDAAkD,CAAC;IAEpG,CAAC,eAAe,EAAE,wBAAwB,EAAE,eAAe,CAAC;CAEnD,CAAC;AAEE,QAAA,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAsE,CAAC;AAErI,QAAA,8BAA8B,GAAG,MAAM,CAAC,MAAM,CAAC,+BAA+B,CAA8E,CAAC","sourcesContent":["import { _Key, IStaticFilesKey, IStaticFilesMapArray } from './types';\n\nconst _defaultCopyStaticFiles = [\n\n\t['.npmignore', 'file/npmignore'],\n\t['.gitignore', 'file/gitignore'],\n\n\t['.eslintignore', 'file/eslintignore'],\n\n\t['.nvmrc', 'file/nvmrc'],\n\t['.browserslistrc', 'file/browserslistrc'],\n\n\t['tsconfig.json.tpl', 'file/tsconfig.json.tpl', 'tsconfig.json'],\n\n\t['test/tsconfig.json.tpl', 'file/test/tsconfig.json.tpl', 'test/tsconfig.json'],\n\n\t['tsconfig.esm.json.tpl', 'file/tsconfig.esm.json.tpl', 'tsconfig.esm.json'],\n\n\t['tsconfig.tsdx.json.tpl', 'file/tsconfig.tsdx.json.tpl', 'tsconfig.tsdx.json'],\n\n\t['.eslintrc.json.tpl', 'file/eslintrc.json.tpl', '.eslintrc.json'],\n\n\t['README.md', 'file/README.md'],\n\n\t['.nycrc', 'file/nycrc'],\n\n\t['.mocharc.yml', 'file/mocharc.yml'],\n\t['jest.config.js', 'file/jest.config.js'],\n\n\t['.nowignore', 'file/nowignore'],\n\n\t['now.json.tpl', 'file/now.json.tpl', 'now.json'],\n\n\t['.npmrc.tpl', 'file/npmrc', '.npmrc'],\n\n\t['tsdx.config.js.tpl', 'file/tsdx.config.js', 'tsdx.config.js'],\n\n] as const;\n\nconst _defaultCopyStaticFilesRootOnly = [\n\n\t['lerna.json.tpl', 'file/lerna.json.tpl', 'lerna.json'],\n\n\t['pnpm-workspace.yaml.tpl', 'file/pnpm-workspace.yaml', 'pnpm-workspace.yaml'],\n\n\t['.github/workflows/coverage.yml', 'file/github/workflows/coverage.yml'],\n\n\t['.github/workflows/action-yarnlock-dedupe.yml', 'file/github/workflows/action-yarnlock-dedupe.yml'],\n\n\t['tsconfig.json', 'file/tsconfig.json.tpl', 'tsconfig.json'],\n\n] as const;\n\nexport const defaultCopyStaticFiles = Object.freeze(_defaultCopyStaticFiles) as any as IStaticFilesMapArray<_Key<typeof _defaultCopyStaticFiles>>;\n\nexport const defaultCopyStaticFilesRootOnly = Object.freeze(_defaultCopyStaticFilesRootOnly) as any as IStaticFilesMapArray<_Key<typeof _defaultCopyStaticFilesRootOnly>>;\n"]}
1
+ {"version":3,"file":"const.js","sourceRoot":"","sources":["const.ts"],"names":[],"mappings":";;;AAEA,MAAM,uBAAuB,GAAG;IAE/B,CAAC,YAAY,EAAE,gBAAgB,CAAC;IAChC,CAAC,YAAY,EAAE,gBAAgB,CAAC;IAEhC,CAAC,eAAe,EAAE,mBAAmB,CAAC;IAEtC,CAAC,QAAQ,EAAE,YAAY,CAAC;IACxB,CAAC,iBAAiB,EAAE,qBAAqB,CAAC;IAE1C,CAAC,mBAAmB,EAAE,wBAAwB,EAAE,eAAe,CAAC;IAEhE,CAAC,wBAAwB,EAAE,6BAA6B,EAAE,oBAAoB,CAAC;IAE/E,CAAC,uBAAuB,EAAE,4BAA4B,EAAE,mBAAmB,CAAC;IAE5E,CAAC,wBAAwB,EAAE,6BAA6B,EAAE,oBAAoB,CAAC;IAE/E,CAAC,oBAAoB,EAAE,wBAAwB,EAAE,gBAAgB,CAAC;IAElE,CAAC,WAAW,EAAE,gBAAgB,CAAC;IAE/B,CAAC,QAAQ,EAAE,YAAY,CAAC;IAExB,CAAC,cAAc,EAAE,kBAAkB,CAAC;IACpC,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;IAEzC,CAAC,YAAY,EAAE,gBAAgB,CAAC;IAEhC,CAAC,cAAc,EAAE,mBAAmB,EAAE,UAAU,CAAC;IAEjD,CAAC,YAAY,EAAE,YAAY,EAAE,QAAQ,CAAC;IAEtC,CAAC,oBAAoB,EAAE,qBAAqB,EAAE,gBAAgB,CAAC;IAE/D,CAAC,oBAAoB,EAAE,yBAAyB,EAAE,gBAAgB,CAAC;IAEnE,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;CAEhC,CAAC;AAEX,MAAM,+BAA+B,GAAG;IAEvC,CAAC,gBAAgB,EAAE,qBAAqB,EAAE,YAAY,CAAC;IAEvD,CAAC,yBAAyB,EAAE,0BAA0B,EAAE,qBAAqB,CAAC;IAE9E,CAAC,gCAAgC,EAAE,oCAAoC,CAAC;IAExE,CAAC,8CAA8C,EAAE,kDAAkD,CAAC;IAEpG,CAAC,eAAe,EAAE,wBAAwB,EAAE,eAAe,CAAC;CAEnD,CAAC;AAEX,MAAM,iCAAiC,GAAG;IAEzC,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;IAEzC,CAAC,qBAAqB,EAAE,0BAA0B,CAAC;IAEnD,CAAC,eAAe,EAAE,wBAAwB,CAAC;IAE3C,CAAC,oBAAoB,EAAE,yBAAyB,EAAE,gBAAgB,CAAC;IAEnE,CAAC,cAAc,EAAE,2BAA2B,CAAC;CAEpC,CAAC;AAEE,QAAA,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAsE,CAAC;AAErI,QAAA,8BAA8B,GAAG,MAAM,CAAC,MAAM,CAAC,+BAA+B,CAA8E,CAAC;AAE7J,QAAA,gCAAgC,GAAG,MAAM,CAAC,MAAM,CAAC,iCAAiC,CAAgF,CAAC","sourcesContent":["import { _Key, IStaticFilesKey, IStaticFilesMapArray } from './types';\n\nconst _defaultCopyStaticFiles = [\n\n\t['.npmignore', 'file/npmignore'],\n\t['.gitignore', 'file/gitignore'],\n\n\t['.eslintignore', 'file/eslintignore'],\n\n\t['.nvmrc', 'file/nvmrc'],\n\t['.browserslistrc', 'file/browserslistrc'],\n\n\t['tsconfig.json.tpl', 'file/tsconfig.json.tpl', 'tsconfig.json'],\n\n\t['test/tsconfig.json.tpl', 'file/test/tsconfig.json.tpl', 'test/tsconfig.json'],\n\n\t['tsconfig.esm.json.tpl', 'file/tsconfig.esm.json.tpl', 'tsconfig.esm.json'],\n\n\t['tsconfig.tsdx.json.tpl', 'file/tsconfig.tsdx.json.tpl', 'tsconfig.tsdx.json'],\n\n\t['.eslintrc.json.tpl', 'file/eslintrc.json.tpl', '.eslintrc.json'],\n\n\t['README.md', 'file/README.md'],\n\n\t['.nycrc', 'file/nycrc'],\n\n\t['.mocharc.yml', 'file/mocharc.yml'],\n\t['jest.config.js', 'file/jest.config.js'],\n\n\t['.nowignore', 'file/nowignore'],\n\n\t['now.json.tpl', 'file/now.json.tpl', 'now.json'],\n\n\t['.npmrc.tpl', 'file/npmrc', '.npmrc'],\n\n\t['tsdx.config.js.tpl', 'file/tsdx.config.js', 'tsdx.config.js'],\n\n\t['tsc-multi.json.tpl', 'file/tsc-multi.json.tpl', 'tsc-multi.json'],\n\n\t['test/__root.ts', 'file/test/__root.ts'],\n\n] as const;\n\nconst _defaultCopyStaticFilesRootOnly = [\n\n\t['lerna.json.tpl', 'file/lerna.json.tpl', 'lerna.json'],\n\n\t['pnpm-workspace.yaml.tpl', 'file/pnpm-workspace.yaml', 'pnpm-workspace.yaml'],\n\n\t['.github/workflows/coverage.yml', 'file/github/workflows/coverage.yml'],\n\n\t['.github/workflows/action-yarnlock-dedupe.yml', 'file/github/workflows/action-yarnlock-dedupe.yml'],\n\n\t['tsconfig.json', 'file/tsconfig.json.tpl', 'tsconfig.json'],\n\n] as const;\n\nconst _defaultCopyStaticFilesWsRootOnly = [\n\n\t['lerna.json.tpl', 'file/lerna.json.tpl'],\n\n\t['pnpm-workspace.yaml', 'file/pnpm-workspace.yaml'],\n\n\t['tsconfig.json', 'file/tsconfig.json.tpl'],\n\n\t['tsc-multi.json.tpl', 'file/tsc-multi.json.tpl', 'tsc-multi.json'],\n\n\t['__root_ws.ts', 'file/ws-root/__root_ws.ts'],\n\n] as const;\n\nexport const defaultCopyStaticFiles = Object.freeze(_defaultCopyStaticFiles) as any as IStaticFilesMapArray<_Key<typeof _defaultCopyStaticFiles>>;\n\nexport const defaultCopyStaticFilesRootOnly = Object.freeze(_defaultCopyStaticFilesRootOnly) as any as IStaticFilesMapArray<_Key<typeof _defaultCopyStaticFilesRootOnly>>;\n\nexport const defaultCopyStaticFilesWsRootOnly = Object.freeze(_defaultCopyStaticFilesWsRootOnly) as any as IStaticFilesMapArray<_Key<typeof _defaultCopyStaticFilesWsRootOnly>>;\n"]}
@@ -6,7 +6,7 @@ const fs_extra_1 = require("fs-extra");
6
6
  const const_1 = require("./const");
7
7
  const parseStaticMap_1 = require("./parseStaticMap");
8
8
  const copyStaticFilesEntry_1 = require("./copyStaticFilesEntry");
9
- const __root_1 = (0, tslib_1.__importDefault)(require("../__root"));
9
+ const __root_1 = tslib_1.__importDefault(require("../__root"));
10
10
  function copyStaticFiles(options) {
11
11
  var _a, _b;
12
12
  if (typeof options.cwd !== 'string' || !((_a = options.cwd) === null || _a === void 0 ? void 0 : _a.length) || !options.cwd) {
@@ -1 +1 @@
1
- {"version":3,"file":"copyStaticFiles.js","sourceRoot":"","sources":["copyStaticFiles.ts"],"names":[],"mappings":";;;;AACA,uCAAgG;AAEhG,mCAAiD;AACjD,qDAAkD;AAClD,iEAA8D;AAC9D,oEAA+B;AAE/B,SAAgB,eAAe,CAAmB,OAAmC;;IAEpF,IAAI,OAAO,OAAO,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,CAAA,MAAA,OAAO,CAAC,GAAG,0CAAE,MAAM,CAAA,IAAI,CAAC,OAAO,CAAC,GAAG,EAC3E;QACC,MAAM,IAAI,SAAS,CAAC,4BAA4B,CAAC,CAAA;KACjD;IAED,IAAI,CAAC,IAAA,yBAAc,EAAC,OAAO,CAAC,GAAG,CAAC,EAChC;QACC,MAAM,IAAI,SAAS,CAAC,wBAAwB,CAAC,CAAA;KAC7C;IAED,IAAI,EAAE,GAAG,IAAA,+BAAc,EAAI,MAAA,OAAO,CAAC,QAAQ,mCAAI,8BAAiD,CAAC,CAAC;IAElG,IAAI,CAAC,EAAE,CAAC,MAAM,EACd;QACC,MAAM,IAAI,SAAS,CAAC,qBAAqB,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;KAC5D;IAED,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,gBAAM,CAAC;IAChD,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAEnC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;QAEzB,OAAO,IAAA,2CAAoB,EAAC,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,CAAC,CAAA;IAC/D,CAAC,CAAC,CACD;AACH,CAAC;AA3BD,0CA2BC","sourcesContent":["import { ICopyStaticFilesOptions, IStaticFilesMapArray, IStaticFilesMapArrayEntry } from './types';\nimport { CopyOptionsSync, copySync, ensureDirSync, existsSync, pathExistsSync } from 'fs-extra';\nimport { dirname, resolve } from 'path';\nimport { defaultCopyStaticFiles } from './const';\nimport { parseStaticMap } from './parseStaticMap';\nimport { copyStaticFilesEntry } from './copyStaticFilesEntry';\nimport __root from '../__root';\n\nexport function copyStaticFiles<K extends string>(options: ICopyStaticFilesOptions<K>)\n{\n\tif (typeof options.cwd !== 'string' || !options.cwd?.length || !options.cwd)\n\t{\n\t\tthrow new TypeError(`options.cwd must is string`)\n\t}\n\n\tif (!pathExistsSync(options.cwd))\n\t{\n\t\tthrow new TypeError(`options.cwd not exists`)\n\t}\n\n\tlet ls = parseStaticMap<K>(options.file_map ?? defaultCopyStaticFiles as IStaticFilesMapArray<K>);\n\n\tif (!ls.length)\n\t{\n\t\tthrow new TypeError(`Invalid file map: ${options.file_map}`)\n\t}\n\n\tconst staticRoot = options.staticRoot || __root;\n\tconst { cwd, overwrite } = options;\n\n\treturn ls.filter((entry) =>\n\t\t{\n\t\t\treturn copyStaticFilesEntry(entry, cwd, staticRoot, overwrite)\n\t\t})\n\t\t;\n}\n\n"]}
1
+ {"version":3,"file":"copyStaticFiles.js","sourceRoot":"","sources":["copyStaticFiles.ts"],"names":[],"mappings":";;;;AACA,uCAAgG;AAEhG,mCAAiD;AACjD,qDAAkD;AAClD,iEAA8D;AAC9D,+DAA+B;AAE/B,SAAgB,eAAe,CAAmB,OAAmC;;IAEpF,IAAI,OAAO,OAAO,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,CAAA,MAAA,OAAO,CAAC,GAAG,0CAAE,MAAM,CAAA,IAAI,CAAC,OAAO,CAAC,GAAG,EAC3E;QACC,MAAM,IAAI,SAAS,CAAC,4BAA4B,CAAC,CAAA;KACjD;IAED,IAAI,CAAC,IAAA,yBAAc,EAAC,OAAO,CAAC,GAAG,CAAC,EAChC;QACC,MAAM,IAAI,SAAS,CAAC,wBAAwB,CAAC,CAAA;KAC7C;IAED,IAAI,EAAE,GAAG,IAAA,+BAAc,EAAI,MAAA,OAAO,CAAC,QAAQ,mCAAI,8BAAiD,CAAC,CAAC;IAElG,IAAI,CAAC,EAAE,CAAC,MAAM,EACd;QACC,MAAM,IAAI,SAAS,CAAC,qBAAqB,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;KAC5D;IAED,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,gBAAM,CAAC;IAChD,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAEnC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;QAEzB,OAAO,IAAA,2CAAoB,EAAC,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,CAAC,CAAA;IAC/D,CAAC,CAAC,CACD;AACH,CAAC;AA3BD,0CA2BC","sourcesContent":["import { ICopyStaticFilesOptions, IStaticFilesMapArray, IStaticFilesMapArrayEntry } from './types';\nimport { CopyOptionsSync, copySync, ensureDirSync, existsSync, pathExistsSync } from 'fs-extra';\nimport { dirname, resolve } from 'path';\nimport { defaultCopyStaticFiles } from './const';\nimport { parseStaticMap } from './parseStaticMap';\nimport { copyStaticFilesEntry } from './copyStaticFilesEntry';\nimport __root from '../__root';\n\nexport function copyStaticFiles<K extends string>(options: ICopyStaticFilesOptions<K>)\n{\n\tif (typeof options.cwd !== 'string' || !options.cwd?.length || !options.cwd)\n\t{\n\t\tthrow new TypeError(`options.cwd must is string`)\n\t}\n\n\tif (!pathExistsSync(options.cwd))\n\t{\n\t\tthrow new TypeError(`options.cwd not exists`)\n\t}\n\n\tlet ls = parseStaticMap<K>(options.file_map ?? defaultCopyStaticFiles as IStaticFilesMapArray<K>);\n\n\tif (!ls.length)\n\t{\n\t\tthrow new TypeError(`Invalid file map: ${options.file_map}`)\n\t}\n\n\tconst staticRoot = options.staticRoot || __root;\n\tconst { cwd, overwrite } = options;\n\n\treturn ls.filter((entry) =>\n\t\t{\n\t\t\treturn copyStaticFilesEntry(entry, cwd, staticRoot, overwrite)\n\t\t})\n\t\t;\n}\n\n"]}
@@ -4,7 +4,7 @@ exports.copyStaticFilesEntry = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const path_1 = require("path");
6
6
  const fs_extra_1 = require("fs-extra");
7
- const __root_1 = (0, tslib_1.__importDefault)(require("../__root"));
7
+ const __root_1 = tslib_1.__importDefault(require("../__root"));
8
8
  function copyStaticFilesEntry(entry, cwd, staticRoot = __root_1.default, overwrite) {
9
9
  const [targetFile, staticFile, detectFile] = entry;
10
10
  if (detectFile === null || detectFile === void 0 ? void 0 : detectFile.length) {
@@ -1 +1 @@
1
- {"version":3,"file":"copyStaticFilesEntry.js","sourceRoot":"","sources":["copyStaticFilesEntry.ts"],"names":[],"mappings":";;;;AACA,+BAAwC;AACxC,uCAA+D;AAC/D,oEAA+B;AAE/B,SAAgB,oBAAoB,CAAC,KAAwC,EAC5E,GAAW,EACX,aAAqB,gBAAM,EAC3B,SAAmB;IAGnB,MAAM,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC;IAEnD,IAAI,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,EACtB;QACC,MAAM,EAAE,GAAG,IAAA,cAAO,EAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QAEpC,IAAI,IAAA,qBAAU,EAAC,EAAE,CAAC,EAClB;YACC,OAAO;SACP;KACD;IAED,MAAM,EAAE,GAAG,IAAA,cAAO,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAE3C,IAAI,CAAC,IAAA,qBAAU,EAAC,EAAE,CAAC,EACnB;QACC,MAAM,IAAI,KAAK,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAA;KACzC;IAED,MAAM,EAAE,GAAG,IAAA,cAAO,EAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IAEpC,IAAA,wBAAa,EAAC,IAAA,cAAO,EAAC,EAAE,CAAC,CAAC,CAAA;IAC1B,IAAA,mBAAQ,EAAC,EAAE,EAAE,EAAE,EAAE;QAChB,SAAS,EAAE,SAAS,IAAI,KAAK;QAC7B,kBAAkB,EAAE,IAAI;QACxB,YAAY,EAAE,KAAK;KACnB,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACb,CAAC;AAnCD,oDAmCC","sourcesContent":["import { IStaticFilesMapArrayEntry } from './types';\nimport { dirname, resolve } from 'path';\nimport { copySync, ensureDirSync, existsSync } from 'fs-extra';\nimport __root from '../__root';\n\nexport function copyStaticFilesEntry(entry: IStaticFilesMapArrayEntry<string>,\n\tcwd: string,\n\tstaticRoot: string = __root,\n\toverwrite?: boolean,\n)\n{\n\tconst [targetFile, staticFile, detectFile] = entry;\n\n\tif (detectFile?.length)\n\t{\n\t\tconst fc = resolve(cwd, detectFile);\n\n\t\tif (existsSync(fc))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}\n\n\tconst fb = resolve(staticRoot, staticFile);\n\n\tif (!existsSync(fb))\n\t{\n\t\tthrow new Error(`file not exists. ${fb}`)\n\t}\n\n\tconst fa = resolve(cwd, targetFile);\n\n\tensureDirSync(dirname(fa))\n\tcopySync(fb, fa, {\n\t\toverwrite: overwrite || false,\n\t\tpreserveTimestamps: true,\n\t\terrorOnExist: false,\n\t});\n\n\treturn true;\n}\n"]}
1
+ {"version":3,"file":"copyStaticFilesEntry.js","sourceRoot":"","sources":["copyStaticFilesEntry.ts"],"names":[],"mappings":";;;;AACA,+BAAwC;AACxC,uCAA+D;AAC/D,+DAA+B;AAE/B,SAAgB,oBAAoB,CAAC,KAAwC,EAC5E,GAAW,EACX,aAAqB,gBAAM,EAC3B,SAAmB;IAGnB,MAAM,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC;IAEnD,IAAI,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,EACtB;QACC,MAAM,EAAE,GAAG,IAAA,cAAO,EAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QAEpC,IAAI,IAAA,qBAAU,EAAC,EAAE,CAAC,EAClB;YACC,OAAO;SACP;KACD;IAED,MAAM,EAAE,GAAG,IAAA,cAAO,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAE3C,IAAI,CAAC,IAAA,qBAAU,EAAC,EAAE,CAAC,EACnB;QACC,MAAM,IAAI,KAAK,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAA;KACzC;IAED,MAAM,EAAE,GAAG,IAAA,cAAO,EAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IAEpC,IAAA,wBAAa,EAAC,IAAA,cAAO,EAAC,EAAE,CAAC,CAAC,CAAA;IAC1B,IAAA,mBAAQ,EAAC,EAAE,EAAE,EAAE,EAAE;QAChB,SAAS,EAAE,SAAS,IAAI,KAAK;QAC7B,kBAAkB,EAAE,IAAI;QACxB,YAAY,EAAE,KAAK;KACnB,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACb,CAAC;AAnCD,oDAmCC","sourcesContent":["import { IStaticFilesMapArrayEntry } from './types';\nimport { dirname, resolve } from 'path';\nimport { copySync, ensureDirSync, existsSync } from 'fs-extra';\nimport __root from '../__root';\n\nexport function copyStaticFilesEntry(entry: IStaticFilesMapArrayEntry<string>,\n\tcwd: string,\n\tstaticRoot: string = __root,\n\toverwrite?: boolean,\n)\n{\n\tconst [targetFile, staticFile, detectFile] = entry;\n\n\tif (detectFile?.length)\n\t{\n\t\tconst fc = resolve(cwd, detectFile);\n\n\t\tif (existsSync(fc))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}\n\n\tconst fb = resolve(staticRoot, staticFile);\n\n\tif (!existsSync(fb))\n\t{\n\t\tthrow new Error(`file not exists. ${fb}`)\n\t}\n\n\tconst fa = resolve(cwd, targetFile);\n\n\tensureDirSync(dirname(fa))\n\tcopySync(fb, fa, {\n\t\toverwrite: overwrite || false,\n\t\tpreserveTimestamps: true,\n\t\terrorOnExist: false,\n\t});\n\n\treturn true;\n}\n"]}
@@ -4,6 +4,7 @@ exports.reMapStaticFilesMapArray = void 0;
4
4
  const parseStaticMap_1 = require("./parseStaticMap");
5
5
  const getRowOfStaticFilesMapArray_1 = require("./getRowOfStaticFilesMapArray");
6
6
  const replaceTargetOfStaticFilesMapArrayEntry_1 = require("./replaceTargetOfStaticFilesMapArrayEntry");
7
+ const array_hyper_unique_1 = require("array-hyper-unique");
7
8
  function reMapStaticFilesMapArray(file_map, replaceMap) {
8
9
  const ls = (0, parseStaticMap_1.parseStaticMap)(file_map);
9
10
  const arr = Object.entries(replaceMap)
@@ -14,7 +15,7 @@ function reMapStaticFilesMapArray(file_map, replaceMap) {
14
15
  }
15
16
  return arr;
16
17
  }, []);
17
- return arr.concat(ls);
18
+ return (0, array_hyper_unique_1.array_unique_overwrite)(arr.concat(ls));
18
19
  }
19
20
  exports.reMapStaticFilesMapArray = reMapStaticFilesMapArray;
20
21
  //# sourceMappingURL=reMapStaticFilesMapArray.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reMapStaticFilesMapArray.js","sourceRoot":"","sources":["reMapStaticFilesMapArray.ts"],"names":[],"mappings":";;;AACA,qDAAkD;AAClD,+EAA4E;AAC5E,uGAAoG;AAEpG,SAAgB,wBAAwB,CAAmD,QAAW,EACrG,UAAyC;IAGzC,MAAM,EAAE,GAAG,IAAA,+BAAc,EAAC,QAAQ,CAAC,CAAC;IACpC,MAAM,GAAG,GAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAA+B;SACnE,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,EAAE;QAGvC,IAAI,GAAG,GAAG,IAAA,yDAA2B,EAAC,EAAE,EAAE,SAAS,CAAC,CAAA;QAEpD,IAAI,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,EACf;YACC,GAAG,CAAC,IAAI,CAAC,IAAA,iFAAuC,EAAC,GAAG,EAAE,SAAS,CAAC,CAAC,CAAA;SACjE;QAED,OAAO,GAAG,CAAA;IACX,CAAC,EAAE,EAA6B,CAAC,CACjC;IAED,OAAO,GAAG,CAAC,MAAM,CAAC,EAAS,CAAiD,CAAA;AAC7E,CAAC;AArBD,4DAqBC","sourcesContent":["import { IStaticFiles, IStaticFilesKey, IStaticFilesMapArray, IStaticFilesMapArrayEntry } from './types';\nimport { parseStaticMap } from './parseStaticMap';\nimport { getRowOfStaticFilesMapArray } from './getRowOfStaticFilesMapArray';\nimport { replaceTargetOfStaticFilesMapArrayEntry } from './replaceTargetOfStaticFilesMapArrayEntry';\n\nexport function reMapStaticFilesMapArray<T extends IStaticFiles<string>, N extends string>(file_map: T,\n\treplaceMap: Record<N, IStaticFilesKey<T>>,\n)\n{\n\tconst ls = parseStaticMap(file_map);\n\tconst arr = (Object.entries(replaceMap) as [N, IStaticFilesKey<T>][])\n\t\t.reduce((arr, [targetNew, targetOld]) =>\n\t\t{\n\n\t\t\tlet old = getRowOfStaticFilesMapArray(ls, targetOld)\n\n\t\t\tif (old?.length)\n\t\t\t{\n\t\t\t\tarr.push(replaceTargetOfStaticFilesMapArrayEntry(old, targetNew))\n\t\t\t}\n\n\t\t\treturn arr\n\t\t}, [] as IStaticFilesMapArray<N>)\n\t;\n\n\treturn arr.concat(ls as any) as IStaticFilesMapArray<IStaticFilesKey<T> | N>\n}\n"]}
1
+ {"version":3,"file":"reMapStaticFilesMapArray.js","sourceRoot":"","sources":["reMapStaticFilesMapArray.ts"],"names":[],"mappings":";;;AACA,qDAAkD;AAClD,+EAA4E;AAC5E,uGAAoG;AACpG,2DAA4D;AAE5D,SAAgB,wBAAwB,CAAmD,QAAW,EACrG,UAAyC;IAGzC,MAAM,EAAE,GAAG,IAAA,+BAAc,EAAC,QAAQ,CAAC,CAAC;IACpC,MAAM,GAAG,GAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAA+B;SACnE,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,EAAE;QAGvC,IAAI,GAAG,GAAG,IAAA,yDAA2B,EAAC,EAAE,EAAE,SAAS,CAAC,CAAA;QAEpD,IAAI,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,EACf;YACC,GAAG,CAAC,IAAI,CAAC,IAAA,iFAAuC,EAAC,GAAG,EAAE,SAAS,CAAC,CAAC,CAAA;SACjE;QAED,OAAO,GAAG,CAAA;IACX,CAAC,EAAE,EAA6B,CAAC,CACjC;IAED,OAAO,IAAA,2CAAsB,EAAC,GAAG,CAAC,MAAM,CAAC,EAAS,CAAC,CAAiD,CAAA;AACrG,CAAC;AArBD,4DAqBC","sourcesContent":["import { IStaticFiles, IStaticFilesKey, IStaticFilesMapArray, IStaticFilesMapArrayEntry } from './types';\nimport { parseStaticMap } from './parseStaticMap';\nimport { getRowOfStaticFilesMapArray } from './getRowOfStaticFilesMapArray';\nimport { replaceTargetOfStaticFilesMapArrayEntry } from './replaceTargetOfStaticFilesMapArrayEntry';\nimport { array_unique_overwrite } from 'array-hyper-unique';\n\nexport function reMapStaticFilesMapArray<T extends IStaticFiles<string>, N extends string>(file_map: T,\n\treplaceMap: Record<N, IStaticFilesKey<T>>,\n)\n{\n\tconst ls = parseStaticMap(file_map);\n\tconst arr = (Object.entries(replaceMap) as [N, IStaticFilesKey<T>][])\n\t\t.reduce((arr, [targetNew, targetOld]) =>\n\t\t{\n\n\t\t\tlet old = getRowOfStaticFilesMapArray(ls, targetOld)\n\n\t\t\tif (old?.length)\n\t\t\t{\n\t\t\t\tarr.push(replaceTargetOfStaticFilesMapArrayEntry(old, targetNew))\n\t\t\t}\n\n\t\t\treturn arr\n\t\t}, [] as IStaticFilesMapArray<N>)\n\t;\n\n\treturn array_unique_overwrite(arr.concat(ls as any)) as IStaticFilesMapArray<IStaticFilesKey<T> | N>\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yarn-tool/static-file",
3
- "version": "1.0.78",
3
+ "version": "1.0.82",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/bluelovers/ws-yarn-workspaces#readme",
6
6
  "bugs": {
@@ -31,5 +31,5 @@
31
31
  "publishConfig": {
32
32
  "access": "public"
33
33
  },
34
- "gitHead": "335ba673db3c1c8782d7dc231b043427d750c88d"
34
+ "gitHead": "3869f3c0a38d89ef1792f6047ce8382a51966cd2"
35
35
  }