my-gadgetry 1.3.7 → 1.3.9

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/README.md CHANGED
@@ -1,3 +1,6 @@
1
+ <!-- MD_HOPPER: ID: my-gadgetry -->
2
+ <!-- MD_HOPPER: TITLE: my gadgetry -->
3
+ <!-- MD_HOPPER: OUTPUT: README.md -->
1
4
  <!-- MD_HOPPER: CONFIG:
2
5
  skip-hidden: true
3
6
  filenames: README.md
@@ -6,15 +9,25 @@ output: README.md
6
9
 
7
10
  # my gadgetry
8
11
 
9
- <!-- MD_HOPPER: LINK_NEXT_LINE:
10
- id: src-_internal-dev-ops-rmd
11
- inline: true
12
+ <!-- MD_HOPPER: BEGIN_LINKS:
13
+ all: true
14
+ linked: true
15
+ child: true
16
+ grandChild: false
17
+ parallel: false
12
18
  -->
13
19
 
14
- - [Dev Ops][md_hopper:src-_internal-dev-ops-rmd]
20
+ [Dev Ops][md_hopper:my-gadgetry-dev-ops]
15
21
 
16
- <!-- MD_HOPPER: BEGIN_DEFINE_LINKS: -->
22
+ <!-- MD_HOPPER: END_LINKS: --><!-- MD_HOPPER: BEGIN_DEFINE_LINKS: -->
17
23
 
18
- [md_hopper:src-_internal-dev-ops-rmd]: ./src/lib/_internal/dev-ops/README.md 'Dev Ops'
24
+ [md_hopper:main]: ../../README.md 'MyPackages'
25
+ [md_hopper:inquirer-plugins]: ../inquirer-plugins/README.md 'inquirer-plugins'
26
+ [md_hopper:inquirer-plugins-table]: ../inquirer-plugins/src/lib/_internal/plugins/table/README.md 'TABLE PLUGIN'
27
+ [md_hopper:md-hopper]: ../md-hopper/README.md 'MD HOPPER'
28
+ [md_hopper:md-hopper-link]: ../md-hopper/src/lib/cli/commands/link/README.md 'LINK COMMAND'
29
+ [md_hopper:my-gadgetry-dev-ops]: ./src/lib/_internal/dev-ops/README.md 'Dev Ops'
30
+ [md_hopper:test]: ../test/README.md 'test'
31
+ [md_hopper:plugins-builder]: ../../plugins/builder/README.md 'builder'
19
32
 
20
33
  <!-- MD_HOPPER: END_DEFINE_LINKS: -->
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/__fs-test__/foo/piyo/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=piyo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"piyo.d.ts","sourceRoot":"","sources":["../../../src/__fs-test__/foo/piyo.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=foo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"foo.d.ts","sourceRoot":"","sources":["../../src/__fs-test__/foo.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/__fs-test__/hoge/foo/piyo/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=piyo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"piyo.d.ts","sourceRoot":"","sources":["../../../../src/__fs-test__/hoge/foo/piyo.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=foo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"foo.d.ts","sourceRoot":"","sources":["../../../src/__fs-test__/hoge/foo.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=hoge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hoge.d.ts","sourceRoot":"","sources":["../../src/__fs-test__/hoge.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export {};
@@ -16,4 +16,5 @@ export interface Stacks {
16
16
  export declare const getDepth: (path: string) => number;
17
17
  export declare const isShallow: (from: string, to: string, depth: number) => boolean;
18
18
  export declare const getAllFiles: (startDir: string, _options?: Options) => string[];
19
+ export declare const readJsonFileSync: (path: string, encode?: BufferEncoding) => any;
19
20
  //# sourceMappingURL=fs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../../src/lib/_core/fs.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,OAAO;IACtB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,OAAO;;;;CAInB,CAAA;AAED,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd;AAMD,eAAO,MAAM,QAAQ,SAAU,MAAM,WAgBpC,CAAA;AAED,eAAO,MAAM,SAAS,SAAU,MAAM,MAAM,MAAM,SAAS,MAAM,YAEhE,CAAA;AAwBD,eAAO,MAAM,WAAW,aAAc,MAAM,aAAa,OAAO,aAK/D,CAAA"}
1
+ {"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../../src/lib/_core/fs.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,OAAO;IACtB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,OAAO;;;;CAInB,CAAA;AAED,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd;AAMD,eAAO,MAAM,QAAQ,SAAU,MAAM,WAgBpC,CAAA;AAED,eAAO,MAAM,SAAS,SAAU,MAAM,MAAM,MAAM,SAAS,MAAM,YAEhE,CAAA;AAwBD,eAAO,MAAM,WAAW,aAAc,MAAM,aAAa,OAAO,aAK/D,CAAA;AAED,eAAO,MAAM,gBAAgB,SAAU,MAAM,WAAU,cAAc,QAMpE,CAAA"}
@@ -1,6 +1,7 @@
1
- import { statSync, readdirSync } from 'fs';
1
+ import { statSync, readdirSync, readFileSync } from 'fs';
2
2
  import { relative } from 'path';
3
3
  import { minimatch } from 'minimatch';
4
+ import { isJson } from './type-check.js';
4
5
  export const OPTIONS = {
5
6
  include: [],
6
7
  exclude: [],
@@ -57,3 +58,10 @@ export const getAllFiles = (startDir, _options) => {
57
58
  }
58
59
  return _getAllFiles(startDir, { ...OPTIONS, ...(_options || {}), startDir });
59
60
  };
61
+ export const readJsonFileSync = (path, encode = 'utf-8') => {
62
+ const json = readFileSync(path, encode);
63
+ if (!isJson(json)) {
64
+ return {};
65
+ }
66
+ return JSON.parse(json);
67
+ };
@@ -0,0 +1,2 @@
1
+ export declare const getDirnameFromFileURL: (url: string) => string;
2
+ //# sourceMappingURL=path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src/lib/_internal/path.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB,QAAS,MAAM,WAAgC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { dirname } from 'path';
2
+ import { fileURLToPath } from 'url';
3
+ export const getDirnameFromFileURL = (url) => dirname(fileURLToPath(url));
@@ -0,0 +1,2 @@
1
+ export * from '../_internal/path.js';
2
+ //# sourceMappingURL=path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src/lib/modules/path.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1 @@
1
+ export * from '../_internal/path.js';
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "my-gadgetry",
3
- "version": "1.3.7",
3
+ "version": "1.3.9",
4
4
  "type": "module",
5
+ "license": "MIT",
5
6
  "repository": {
6
7
  "type": "git",
7
8
  "url": "git+https://github.com/cilly-yllic/my-packages.git"
@@ -27,6 +28,7 @@
27
28
  "./converters/string": "./dist/lib/modules/converters/string.js",
28
29
  "./dev-ops/package-generator/generate-alias": "./dist/lib/modules/dev-ops/package-generator/generate-alias.js",
29
30
  "./fs": "./dist/lib/modules/fs.js",
31
+ "./path": "./dist/lib/modules/path.js",
30
32
  "./type-check": "./dist/lib/modules/type-check.js",
31
33
  "./types/utilities": "./dist/lib/modules/types/utilities.js"
32
34
  },
@@ -36,6 +38,7 @@
36
38
  "converters",
37
39
  "dev-ops",
38
40
  "fs",
41
+ "path",
39
42
  "type-check",
40
43
  "!**/*.tsbuildinfo"
41
44
  ],
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "@cilly/my-gadgetry-modules-path",
3
+ "types": "../dist/lib/modules/path.d.ts",
4
+ "main": "../dist/lib/modules/path.js",
5
+ "sideEffects": false
6
+ }