initial update
This commit is contained in:
3
node_modules/@apollo/utils.printwithreducedwhitespace/dist/index.d.ts
generated
vendored
Normal file
3
node_modules/@apollo/utils.printwithreducedwhitespace/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { type DocumentNode } from "graphql";
|
||||
export declare function printWithReducedWhitespace(ast: DocumentNode): string;
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/@apollo/utils.printwithreducedwhitespace/dist/index.d.ts.map
generated
vendored
Normal file
1
node_modules/@apollo/utils.printwithreducedwhitespace/dist/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,YAAY,EAAwB,MAAM,SAAS,CAAC;AAKhF,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CA2BpE"}
|
||||
23
node_modules/@apollo/utils.printwithreducedwhitespace/dist/index.js
generated
vendored
Normal file
23
node_modules/@apollo/utils.printwithreducedwhitespace/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.printWithReducedWhitespace = void 0;
|
||||
const graphql_1 = require("graphql");
|
||||
function printWithReducedWhitespace(ast) {
|
||||
const sanitizedAST = (0, graphql_1.visit)(ast, {
|
||||
StringValue(node) {
|
||||
return {
|
||||
...node,
|
||||
value: Buffer.from(node.value, "utf8").toString("hex"),
|
||||
block: false,
|
||||
};
|
||||
},
|
||||
});
|
||||
const withWhitespace = (0, graphql_1.print)(sanitizedAST);
|
||||
const minimizedButStillHex = withWhitespace
|
||||
.replace(/\s+/g, " ")
|
||||
.replace(/([^_a-zA-Z0-9]) /g, (_, c) => c)
|
||||
.replace(/ ([^_a-zA-Z0-9])/g, (_, c) => c);
|
||||
return minimizedButStillHex.replace(/"([a-f0-9]+)"/g, (_, hex) => JSON.stringify(Buffer.from(hex, "hex").toString("utf8")));
|
||||
}
|
||||
exports.printWithReducedWhitespace = printWithReducedWhitespace;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/@apollo/utils.printwithreducedwhitespace/dist/index.js.map
generated
vendored
Normal file
1
node_modules/@apollo/utils.printwithreducedwhitespace/dist/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qCAAgF;AAKhF,SAAgB,0BAA0B,CAAC,GAAiB;IAU1D,MAAM,YAAY,GAAG,IAAA,eAAK,EAAC,GAAG,EAAE;QAC9B,WAAW,CAAC,IAAqB;YAC/B,OAAO;gBACL,GAAG,IAAI;gBACP,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC;gBACtD,KAAK,EAAE,KAAK;aACb,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;IACH,MAAM,cAAc,GAAG,IAAA,eAAK,EAAC,YAAY,CAAC,CAAC;IAC3C,MAAM,oBAAoB,GAAG,cAAc;SACxC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;SACzC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAC7C,OAAO,oBAAoB,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAC/D,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CACzD,CAAC;AACJ,CAAC;AA3BD,gEA2BC"}
|
||||
Reference in New Issue
Block a user