altair-fastify-plugin 7.3.5 → 8.0.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.
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RenderOptions } from 'altair-static';
|
|
2
|
-
import type {
|
|
2
|
+
import type { FastifyInstance } from 'fastify';
|
|
3
3
|
export interface AltairFastifyPluginOptions extends RenderOptions {
|
|
4
4
|
/**
|
|
5
5
|
* URL to set as the server endpoint.
|
|
@@ -20,6 +20,5 @@ export interface AltairFastifyPluginOptions extends RenderOptions {
|
|
|
20
20
|
*/
|
|
21
21
|
path?: string;
|
|
22
22
|
}
|
|
23
|
-
declare const
|
|
24
|
-
export default _default;
|
|
23
|
+
export declare const AltairFastify: (fastify: FastifyInstance, { path, baseURL, endpointURL, ...renderOptions }?: AltairFastifyPluginOptions) => Promise<void>;
|
|
25
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,EAEd,MAAM,eAAe,CAAC;AAIvB,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,EAEd,MAAM,eAAe,CAAC;AAIvB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,WAAW,0BAA2B,SAAQ,aAAa;IAC/D;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAgCD,eAAO,MAAM,aAAa,YA7Bf,eAAe,qDAMrB,0BAA0B,kBA0B7B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,10 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AltairFastify = void 0;
|
|
6
7
|
const altair_static_1 = require("altair-static");
|
|
7
8
|
const fastify_plugin_1 = __importDefault(require("fastify-plugin"));
|
|
8
9
|
const static_1 = __importDefault(require("@fastify/static"));
|
|
9
|
-
const
|
|
10
|
+
const fastifyAltairPluginFn = async (fastify, { path = '/altair', baseURL = '/altair/', endpointURL = '/graphql', ...renderOptions } = {}) => {
|
|
10
11
|
fastify.register(static_1.default, {
|
|
11
12
|
root: (0, altair_static_1.getDistDirectory)(),
|
|
12
13
|
prefix: baseURL,
|
|
@@ -22,9 +23,8 @@ const fastifyAltairPlugin = (fastify, { path = '/altair', baseURL = '/altair/',
|
|
|
22
23
|
res.type('application/javascript').send(initialOptions);
|
|
23
24
|
});
|
|
24
25
|
}
|
|
25
|
-
done();
|
|
26
26
|
};
|
|
27
|
-
exports.
|
|
27
|
+
exports.AltairFastify = (0, fastify_plugin_1.default)(fastifyAltairPluginFn, {
|
|
28
28
|
fastify: '>= 3.x',
|
|
29
29
|
name: 'altair-fastify-plugin',
|
|
30
30
|
});
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,iDAKuB;AACvB,oEAAgC;AAChC,6DAA4C;AAyB5C,MAAM,qBAAqB,GAAG,KAAK,EACjC,OAAwB,EACxB,EACE,IAAI,GAAG,SAAS,EAChB,OAAO,GAAG,UAAU,EACpB,WAAW,GAAG,UAAU,EACxB,GAAG,aAAa,KACc,EAAE,EAClC,EAAE;IACF,OAAO,CAAC,QAAQ,CAAC,gBAAa,EAAE;QAC9B,IAAI,EAAE,IAAA,gCAAgB,GAAE;QACxB,MAAM,EAAE,OAAO;KAChB,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,IAAA,4BAAY,EAAC,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,aAAa,EAAE,CAAC,CAAC;IAE5E,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;QAC9B,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,IAAI,aAAa,CAAC,oCAAoC,EAAE,CAAC;QACvD,MAAM,cAAc,GAAG,IAAA,oCAAoB,EAAC,aAAa,CAAC,CAAC;QAC3D,MAAM,WAAW,GAAG,IAAI,GAAG,qBAAqB,CAAC;QAEjD,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;YACrC,GAAG,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC;AAEW,QAAA,aAAa,GAAG,IAAA,wBAAE,EAAC,qBAAqB,EAAE;IACrD,OAAO,EAAE,QAAQ;IACjB,IAAI,EAAE,uBAAuB;CAC9B,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "altair-fastify-plugin",
|
|
3
3
|
"description": "Fastify Plugin of Altair GraphQL Client",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "8.0.0",
|
|
5
5
|
"author": "PabloSz <pablosaez1995@gmail.com>",
|
|
6
6
|
"bugs": "https://github.com/altair-graphql/altair/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@fastify/static": "^
|
|
9
|
-
"altair-static": "^
|
|
10
|
-
"fastify-plugin": "^
|
|
8
|
+
"@fastify/static": "^8.0.1",
|
|
9
|
+
"altair-static": "^8.0.0",
|
|
10
|
+
"fastify-plugin": "^5.0.1"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"fastify": "^
|
|
13
|
+
"fastify": "^5.0.0",
|
|
14
14
|
"mercurius": "^11.5.0",
|
|
15
15
|
"ts-node": "^9.0.0",
|
|
16
|
-
"typescript": "5.
|
|
16
|
+
"typescript": "5.6.2"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"main": "dist/index.js",
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"fastify": "^
|
|
33
|
+
"fastify": "^5.0.0"
|
|
34
34
|
},
|
|
35
35
|
"repository": "altair-graphql/altair.git",
|
|
36
36
|
"scripts": {
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"test": "echo \"Error: no test specified\" && exit 0"
|
|
40
40
|
},
|
|
41
41
|
"types": "dist/index.d.ts",
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "3280e9e43dc4971a7c3d78655fb113278b0540a5"
|
|
43
43
|
}
|