@graphql-markdown/helpers 1.0.11 → 1.0.13
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/directives/descriptor.d.ts +2 -1
- package/dist/directives/descriptor.d.ts.map +1 -0
- package/dist/directives/tag.d.ts +1 -0
- package/dist/directives/tag.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/utils/interpolate.d.ts +3 -2
- package/dist/utils/interpolate.d.ts.map +1 -0
- package/dist/utils/interpolate.js +2 -2
- package/package.json +22 -13
|
@@ -74,4 +74,5 @@ import type { GraphQLDirective } from "@graphql-markdown/types";
|
|
|
74
74
|
* ```
|
|
75
75
|
*
|
|
76
76
|
*/
|
|
77
|
-
export declare const directiveDescriptor: (directive: GraphQLDirective, type?: unknown, descriptionTemplate?: string) => string;
|
|
77
|
+
export declare const directiveDescriptor: (directive: GraphQLDirective, type?: unknown, descriptionTemplate?: string | undefined) => string;
|
|
78
|
+
//# sourceMappingURL=descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor.d.ts","sourceRoot":"","sources":["../../src/directives/descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAMhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,eAAO,MAAM,mBAAmB,mGAY/B,CAAC"}
|
package/dist/directives/tag.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../src/directives/tag.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,YAAY,4EASxB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC"}
|
|
@@ -45,5 +45,6 @@ export declare const getObjPath: (path: Maybe<string>, obj: unknown, fallback?:
|
|
|
45
45
|
*
|
|
46
46
|
*/
|
|
47
47
|
export declare const interpolate: (template: string, variables: Maybe<Record<string, unknown> & {
|
|
48
|
-
description?: string;
|
|
49
|
-
}>, fallback?: string) => string;
|
|
48
|
+
description?: string | undefined;
|
|
49
|
+
}>, fallback?: string | undefined) => string;
|
|
50
|
+
//# sourceMappingURL=interpolate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interpolate.d.ts","sourceRoot":"","sources":["../../src/utils/interpolate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGrD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,UAAU,oEAYtB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AAEH,eAAO,MAAM,WAAW;;4CAUvB,CAAC"}
|
|
@@ -56,8 +56,8 @@ exports.getObjPath = getObjPath;
|
|
|
56
56
|
*
|
|
57
57
|
*/
|
|
58
58
|
const interpolate = (template, variables, fallback) => {
|
|
59
|
-
const regex =
|
|
60
|
-
return template.
|
|
59
|
+
const regex = /\$\{[^{]+\}/g;
|
|
60
|
+
return template.replaceAll(regex, (match) => {
|
|
61
61
|
const objPath = match.slice(2, -1).trim();
|
|
62
62
|
return (0, exports.getObjPath)(objPath, variables, fallback);
|
|
63
63
|
});
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/graphql-markdown/graphql-markdown/issues"
|
|
7
7
|
},
|
|
8
|
-
"version": "1.0.
|
|
8
|
+
"version": "1.0.13",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -49,30 +49,39 @@
|
|
|
49
49
|
"./package.json": "./package.json"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
|
-
"prepack": "pinst --disable",
|
|
53
|
-
"postpack": "pinst --enable",
|
|
54
52
|
"stryker": "stryker run",
|
|
55
|
-
"clean": "rm -rf ./dist",
|
|
56
|
-
"docs": "typedoc"
|
|
53
|
+
"clean": "tsgo --build --clean && rm -rf ./dist",
|
|
54
|
+
"docs": "typedoc --options typedoc.config.mjs",
|
|
55
|
+
"build": "tsgo --build",
|
|
56
|
+
"lint": "eslint --config ../../packages/tooling-config/eslint/config.ts \"{src,tests}/**/*.{ts,js,json,gql}\"",
|
|
57
|
+
"lint:fix": "eslint --config ../../packages/tooling-config/eslint/config.ts \"{src,tests}/**/*.{ts,js,json,gql}\" --fix",
|
|
58
|
+
"prettier": "prettier \"{src,tests,assets}/**/*.{ts,js,json,md,gql}\" --check",
|
|
59
|
+
"prettier:fix": "prettier \"{src,tests,assets}/**/*.{ts,js,json,md,gql}\" --write",
|
|
60
|
+
"ts:check": "tsgo --noEmit",
|
|
61
|
+
"test": "jest",
|
|
62
|
+
"test:unit": "jest --passWithNoTests --testPathPatterns=tests/unit",
|
|
63
|
+
"test:integration": "jest --passWithNoTests --testPathPatterns=tests/integration",
|
|
64
|
+
"test:ci": "jest --passWithNoTests --ci --silent --randomize --runInBand",
|
|
65
|
+
"test:watch": "jest --watch"
|
|
57
66
|
},
|
|
58
67
|
"dependencies": {
|
|
59
|
-
"@graphql-markdown/graphql": "^1.1
|
|
60
|
-
"@graphql-markdown/
|
|
61
|
-
|
|
62
|
-
"peerDependencies": {
|
|
63
|
-
"graphql": "^16.0"
|
|
68
|
+
"@graphql-markdown/graphql": "^1.2.1",
|
|
69
|
+
"@graphql-markdown/types": "^1.12.0",
|
|
70
|
+
"@graphql-markdown/utils": "^1.11.0"
|
|
64
71
|
},
|
|
65
72
|
"devDependencies": {
|
|
66
|
-
"@graphql-markdown/
|
|
73
|
+
"@graphql-markdown/tooling-config": "^1.0.0"
|
|
74
|
+
},
|
|
75
|
+
"peerDependencies": {
|
|
76
|
+
"graphql": "16.13.2"
|
|
67
77
|
},
|
|
68
78
|
"directories": {
|
|
69
79
|
"test": "tests"
|
|
70
80
|
},
|
|
71
81
|
"engines": {
|
|
72
|
-
"node": ">=
|
|
82
|
+
"node": ">=20"
|
|
73
83
|
},
|
|
74
84
|
"publishConfig": {
|
|
75
|
-
"directory": "dist",
|
|
76
85
|
"access": "public"
|
|
77
86
|
},
|
|
78
87
|
"typescript": {
|