@sebastienrousseau/crypto-api 0.0.7 → 0.0.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 +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/utils/index.js +8 -7
- package/package.json +29 -32
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqBA,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,aAAa,EACb,YAAY,GACb,MAAM,gBAAgB,CAAC;AAexB,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAqE1C"}
|
package/dist/index.js
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -117,19 +117,20 @@ const readResponse = (responses) => {
|
|
|
117
117
|
};
|
|
118
118
|
exports.readResponse = readResponse;
|
|
119
119
|
const readMethods = (method) => {
|
|
120
|
+
const req = method.request ?? {};
|
|
120
121
|
const parts = ["\n"];
|
|
121
|
-
if (
|
|
122
|
-
parts.push(`#${
|
|
122
|
+
if (req.description !== undefined) {
|
|
123
|
+
parts.push(`#${req.description || ""}\n\n`);
|
|
123
124
|
}
|
|
124
|
-
parts.push(`### ${
|
|
125
|
+
parts.push(`### ${req.method ?? ""} ${method.name}\n\n`);
|
|
125
126
|
parts.push(">```\n");
|
|
126
|
-
const urlString = typeof
|
|
127
|
+
const urlString = typeof req.url === "string" ? req.url : "";
|
|
127
128
|
parts.push(`>${urlString}\n`);
|
|
128
129
|
parts.push(">```\n\n");
|
|
129
130
|
parts.push((0, exports.readRequest)(method.request));
|
|
130
|
-
parts.push((0, exports.readFormDataBody)(
|
|
131
|
-
parts.push((0, exports.readQueryParams)(
|
|
132
|
-
parts.push((0, exports.readAuthorization)(
|
|
131
|
+
parts.push((0, exports.readFormDataBody)(req.body));
|
|
132
|
+
parts.push((0, exports.readQueryParams)(req.url));
|
|
133
|
+
parts.push((0, exports.readAuthorization)(req.auth));
|
|
133
134
|
parts.push((0, exports.readResponse)(method.response));
|
|
134
135
|
parts.push("![divider][divider]\n");
|
|
135
136
|
return parts.join("");
|
package/package.json
CHANGED
|
@@ -20,28 +20,23 @@
|
|
|
20
20
|
"minimist": "^1.2.8"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@sebastienrousseau/c8-config": "^0.0.
|
|
24
|
-
"@sebastienrousseau/eslint-config": "^0.0.
|
|
25
|
-
"@sebastienrousseau/jsdoc-config": "^0.0.
|
|
23
|
+
"@sebastienrousseau/c8-config": "^0.0.7",
|
|
24
|
+
"@sebastienrousseau/eslint-config": "^0.0.7",
|
|
25
|
+
"@sebastienrousseau/jsdoc-config": "^0.0.7",
|
|
26
26
|
"@sebastienrousseau/markdownlint-config": "^0.0.1",
|
|
27
27
|
"@sebastienrousseau/mocha-config": "^0.0.5",
|
|
28
|
-
"@sebastienrousseau/prettier-config": "^0.0.
|
|
29
|
-
"@sebastienrousseau/remark-config": "^0.0.
|
|
30
|
-
"@types/chai": "^
|
|
28
|
+
"@sebastienrousseau/prettier-config": "^0.0.7",
|
|
29
|
+
"@sebastienrousseau/remark-config": "^0.0.7",
|
|
30
|
+
"@types/chai": "^5.2.3",
|
|
31
31
|
"@types/chai-as-promised": "^8.0.2",
|
|
32
|
-
"@types/mocha": "^10.0.
|
|
33
|
-
"@types/node": "^26.
|
|
34
|
-
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
35
|
-
"@typescript-eslint/parser": "^6.21.0",
|
|
32
|
+
"@types/mocha": "^10.0.10",
|
|
33
|
+
"@types/node": "^26.6.3",
|
|
36
34
|
"c8": "^12.0.0",
|
|
37
|
-
"chai": "^
|
|
38
|
-
"chai-as-promised": "^
|
|
39
|
-
"eslint": "^8.57.1",
|
|
40
|
-
"eslint-import-resolver-typescript": "^3.10.1",
|
|
41
|
-
"eslint-plugin-import": "^2.28.1",
|
|
35
|
+
"chai": "^6.3.0",
|
|
36
|
+
"chai-as-promised": "^8.0.2",
|
|
42
37
|
"filesizes": "^0.1.2",
|
|
43
|
-
"mocha": "^
|
|
44
|
-
"prettier": "^3.9.
|
|
38
|
+
"mocha": "^12.0.3",
|
|
39
|
+
"prettier": "^3.9.9",
|
|
45
40
|
"remark-cli": "^12.0.0",
|
|
46
41
|
"remark-footnotes": "^5.0.0",
|
|
47
42
|
"remark-preset-lint-consistent": "^6.0.1",
|
|
@@ -76,39 +71,41 @@
|
|
|
76
71
|
}
|
|
77
72
|
],
|
|
78
73
|
"homepage": "https://crypto-api.io",
|
|
74
|
+
"repository": {
|
|
75
|
+
"type": "git",
|
|
76
|
+
"url": "git+https://github.com/sebastienrousseau/crypto-service.git",
|
|
77
|
+
"directory": "packages/crypto-api"
|
|
78
|
+
},
|
|
79
79
|
"keywords": [
|
|
80
80
|
"crypto-api"
|
|
81
81
|
],
|
|
82
82
|
"license": "MIT OR Apache-2.0",
|
|
83
83
|
"license_URI": "http://www.opensource.org/licenses/mit-license.php",
|
|
84
|
+
"type": "commonjs",
|
|
84
85
|
"main": "./dist/index.js",
|
|
85
|
-
"exports": {
|
|
86
|
-
".": {
|
|
87
|
-
"types": "./dist/index.d.ts",
|
|
88
|
-
"require": "./dist/index.js",
|
|
89
|
-
"import": "./dist/index.js"
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
86
|
"name": "@sebastienrousseau/crypto-api",
|
|
93
87
|
"private": false,
|
|
94
88
|
"publishConfig": {
|
|
95
89
|
"access": "public"
|
|
96
90
|
},
|
|
97
|
-
"repository": {
|
|
98
|
-
"directory": "packages/crypto-api",
|
|
99
|
-
"type": "git",
|
|
100
|
-
"url": "git@github.com:sebastienrousseau/crypto-service.git"
|
|
101
|
-
},
|
|
102
91
|
"types": "./dist/index.d.ts",
|
|
92
|
+
"exports": {
|
|
93
|
+
".": {
|
|
94
|
+
"types": "./dist/index.d.ts",
|
|
95
|
+
"require": "./dist/index.js",
|
|
96
|
+
"default": "./dist/index.js"
|
|
97
|
+
},
|
|
98
|
+
"./package.json": "./package.json"
|
|
99
|
+
},
|
|
103
100
|
"sideEffects": false,
|
|
104
|
-
"version": "0.0.
|
|
101
|
+
"version": "0.0.9",
|
|
105
102
|
"scripts": {
|
|
106
103
|
"build": "tsc --build tsconfig.json",
|
|
107
104
|
"clean": "rimraf ./coverage ./dist ./docs",
|
|
108
105
|
"format": "prettier --write src/**/*.ts",
|
|
109
106
|
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
110
|
-
"lint": "eslint
|
|
111
|
-
"lint:fix": "eslint --cache --fix
|
|
107
|
+
"lint": "eslint src __tests__",
|
|
108
|
+
"lint:fix": "eslint --cache --fix src __tests__",
|
|
112
109
|
"start": "node dist/index.js",
|
|
113
110
|
"test": "c8 --check-coverage --lines 100 --branches 100 --functions 100 --reporter=lcov --reporter=text mocha --config=.mocharc.cjs",
|
|
114
111
|
"docs": "typedoc"
|