@mo36924/graphql-plugin 1.4.24 → 1.4.33

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ const init = ({
24
24
  const addScalarUnknownType = schemaCode => schemaCode.includes("scalar Unknown") ? schemaCode : `${schemaCode}\nscalar Unknown`;
25
25
 
26
26
  const changeModel = () => {
27
- schema = graphql.buildSchema(addScalarUnknownType(graphqlSchema.fixSchema(fs.readFileSync(modelPath, "utf8"))));
27
+ schema = graphql.buildSchema(addScalarUnknownType(graphqlSchema.printSchemaModel(fs.readFileSync(modelPath, "utf8"))));
28
28
  };
29
29
 
30
30
  const changeSchema = () => {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":null,"names":["init","typescript","ts","create","info","languageService","config","cwd","project","getCurrentDirectory","modelPath","model","resolve","schemaPath","schema","watchPath","buildSchema","addScalarUnknownType","schemaCode","includes","changeModel","fixSchema","readFileSync","changeSchema","update","listener","watch","watchFile","unwatchFile","getSourceFile","fileName","getProgram","isGraphqlTag","tag","getDiagnosticCategory","severity","DiagnosticSeverity","Error","DiagnosticCategory","Warning","Information","Message","Hint","Suggestion","hover","sourceFile","position","forEachChild","visitor","node","pos","end","isTaggedTemplateExpression","isIdentifier","getText","template","isNoSubstitutionTemplateLiteral","getStart","getEnd","head","literal","templateSpans","isTemplateMiddle","fix","query","variables","templateWidth","getWidth","text","padStart","forEach","span","i","spanWidth","getFullWidth","literalWidth","expressionWidth","variableName","variable","padEnd","isTemplateTail","offset","replace","length","documentNode","parse","errors","validate","error","match","message","proxy","Object","key","value","entries","bind","getQuickInfoAtPosition","undefined","result","cursor","Position","token","getTokenAtPosition","marked","getHoverInformation","kind","ScriptElementKind","string","textSpan","start","kindModifiers","displayParts","getCompletionsAtPosition","options","items","getAutocompleteSuggestions","isGlobalCompletion","isMemberCompletion","isNewIdentifierLocation","map","item","CompletionItemKind","Function","Constructor","functionElement","Field","Variable","memberVariableElement","unknown","name","label","sortText","getSemanticDiagnostics","diagnostics","_diagnostics","getDiagnostics","range","push","category","code","messageText","file","character","GraphQLError"],"mappings":";;;;;;;;;;MAcMA,IAAI,GAA+B,CAAC;AAAEC,EAAAA,UAAU,EAAEC;AAAd,CAAD;AACvC,SAAO;AACLC,IAAAA,MAAM,CAACC,IAAD;AACJ,YAAMC,eAAe,GAAGD,IAAI,CAACC,eAA7B;AACA,YAAMC,MAAM,GAAGF,IAAI,CAACE,MAApB;AACA,YAAMC,GAAG,GAAGH,IAAI,CAACI,OAAL,CAAaC,mBAAb,EAAZ;AACA,YAAMC,SAAS,GAAGJ,MAAM,CAACK,KAAP,IAAgBC,YAAO,CAACL,GAAD,EAAMD,MAAM,CAACK,KAAb,CAAzC;AACA,YAAME,UAAU,GAAGP,MAAM,CAACQ,MAAP,IAAiBF,YAAO,CAACL,GAAD,EAAMD,MAAM,CAACQ,MAAb,CAA3C;AACA,YAAMC,SAAS,GAAGL,SAAS,IAAIG,UAA/B;AACA,UAAIC,MAAM,GAAGE,mBAAW,CAAC,gBAAD,CAAxB;;AAEA,YAAMC,oBAAoB,GAAIC,UAAD,IAC3BA,UAAU,CAACC,QAAX,CAAoB,gBAApB,IAAwCD,UAAxC,MAAwDA,4BAD1D;;AAGA,YAAME,WAAW,GAAG;AAClBN,QAAAA,MAAM,GAAGE,mBAAW,CAACC,oBAAoB,CAACI,uBAAS,CAACC,eAAY,CAACZ,SAAD,EAAY,MAAZ,CAAb,CAAV,CAArB,CAApB;AACD,OAFD;;AAIA,YAAMa,YAAY,GAAG;AACnBT,QAAAA,MAAM,GAAGE,mBAAW,CAACC,oBAAoB,CAACK,eAAY,CAACT,UAAD,EAAa,MAAb,CAAb,CAArB,CAApB;AACD,OAFD;;AAIA,YAAMW,MAAM,GAAGd,SAAS,GAAGU,WAAH,GAAiBG,YAAzC;;AAEA,YAAME,QAAQ,GAAG;AACf,YAAI;AACFD,UAAAA,MAAM;AACP,SAFD,CAEE,MAAM;AACT,OA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jB;AAEfuG,kBAAAA,IAAI,EAAE,IAFS;AAGfC,kBAAAA,WAAW,EAAErD,KAAK,CAACE,OAHJ;AAIfoD,kBAAAA,IAAI,EAAEjG,UAJS;AAKfiE,kBAAAA,KAAK,EAAE7D,IAAI,CAACM,QAAL,CAAcE,QAAd,KAA2B,CALnB;AAMf0B,kBAAAA,MAAM,EAAElC,IAAI,CAACM,QAAL,CAAcY,QAAd,KAA2B;AANpB,iBAAjB;AAQD;AACF;AACF;;AAEDjE,UAAAA,EAAE,CAAC6C,YAAH,CAAgBE,IAAhB,EAAsBD,OAAtB;AACD,SAnCD;AAqCA,eAAOsF,WAAP;AACD,OA9CD;;AAgDA,aAAO3C,KAAP;AACD;;AAlVI,GAAP;AAoVD;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":null,"names":["init","typescript","ts","create","info","languageService","config","cwd","project","getCurrentDirectory","modelPath","model","resolve","schemaPath","schema","watchPath","buildSchema","addScalarUnknownType","schemaCode","includes","changeModel","printSchemaModel","readFileSync","changeSchema","update","listener","watch","watchFile","unwatchFile","getSourceFile","fileName","getProgram","isGraphqlTag","tag","getDiagnosticCategory","severity","DiagnosticSeverity","Error","DiagnosticCategory","Warning","Information","Message","Hint","Suggestion","hover","sourceFile","position","forEachChild","visitor","node","pos","end","isTaggedTemplateExpression","isIdentifier","getText","template","isNoSubstitutionTemplateLiteral","getStart","getEnd","head","literal","templateSpans","isTemplateMiddle","fix","query","variables","templateWidth","getWidth","text","padStart","forEach","span","i","spanWidth","getFullWidth","literalWidth","expressionWidth","variableName","variable","padEnd","isTemplateTail","offset","replace","length","documentNode","parse","errors","validate","error","match","message","proxy","Object","key","value","entries","bind","getQuickInfoAtPosition","undefined","result","cursor","Position","token","getTokenAtPosition","marked","getHoverInformation","kind","ScriptElementKind","string","textSpan","start","kindModifiers","displayParts","getCompletionsAtPosition","options","items","getAutocompleteSuggestions","isGlobalCompletion","isMemberCompletion","isNewIdentifierLocation","map","item","CompletionItemKind","Function","Constructor","functionElement","Field","Variable","memberVariableElement","unknown","name","label","sortText","getSemanticDiagnostics","diagnostics","_diagnostics","getDiagnostics","range","push","category","code","messageText","file","character","GraphQLError"],"mappings":";;;;;;;;;;MAcMA,IAAI,GAA+B,CAAC;AAAEC,EAAAA,UAAU,EAAEC;AAAd,CAAD;AACvC,SAAO;AACLC,IAAAA,MAAM,CAACC,IAAD;AACJ,YAAMC,eAAe,GAAGD,IAAI,CAACC,eAA7B;AACA,YAAMC,MAAM,GAAGF,IAAI,CAACE,MAApB;AACA,YAAMC,GAAG,GAAGH,IAAI,CAACI,OAAL,CAAaC,mBAAb,EAAZ;AACA,YAAMC,SAAS,GAAGJ,MAAM,CAACK,KAAP,IAAgBC,YAAO,CAACL,GAAD,EAAMD,MAAM,CAACK,KAAb,CAAzC;AACA,YAAME,UAAU,GAAGP,MAAM,CAACQ,MAAP,IAAiBF,YAAO,CAACL,GAAD,EAAMD,MAAM,CAACQ,MAAb,CAA3C;AACA,YAAMC,SAAS,GAAGL,SAAS,IAAIG,UAA/B;AACA,UAAIC,MAAM,GAAGE,mBAAW,CAAC,gBAAD,CAAxB;;AAEA,YAAMC,oBAAoB,GAAIC,UAAD,IAC3BA,UAAU,CAACC,QAAX,CAAoB,gBAApB,IAAwCD,UAAxC,MAAwDA,4BAD1D;;AAGA,YAAME,WAAW,GAAG;AAClBN,QAAAA,MAAM,GAAGE,mBAAW,CAACC,oBAAoB,CAACI,8BAAgB,CAACC,eAAY,CAACZ,SAAD,EAAY,MAAZ,CAAb,CAAjB,CAArB,CAApB;AACD,OAFD;;AAIA,YAAMa,YAAY,GAAG;AACnBT,QAAAA,MAAM,GAAGE,mBAAW,CAACC,oBAAoB,CAACK,eAAY,CAACT,UAAD,EAAa,MAAb,CAAb,CAArB,CAApB;AACD,OAFD;;AAIA,YAAMW,MAAM,GAAGd,SAAS,GAAGU,WAAH,GAAiBG,YAAzC;;AAEA,YAAME,QAAQ,GAAG;AACf,YAAI;AACFD,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Q,EAAEzI,EAAE,CAACoC,kBAAH,CAAsBD,KADjB;AAEfuG,kBAAAA,IAAI,EAAE,IAFS;AAGfC,kBAAAA,WAAW,EAAErD,KAAK,CAACE,OAHJ;AAIfoD,kBAAAA,IAAI,EAAEjG,UAJS;AAKfiE,kBAAAA,KAAK,EAAE7D,IAAI,CAACM,QAAL,CAAcE,QAAd,KAA2B,CALnB;AAMf0B,kBAAAA,MAAM,EAAElC,IAAI,CAACM,QAAL,CAAcY,QAAd,KAA2B;AANpB,iBAAjB;AAQD;AACF;AACF;;AAEDjE,UAAAA,EAAE,CAAC6C,YAAH,CAAgBE,IAAhB,EAAsBD,OAAtB;AACD,SAnCD;AAqCA,eAAOsF,WAAP;AACD,OA9CD;;AAgDA,aAAO3C,KAAP;AACD;;AAlVI,GAAP;AAoVD;;;;"}
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { watch, watchFile, unwatchFile, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { fixSchema } from '@mo36924/graphql-schema';
3
+ import { printSchemaModel } from '@mo36924/graphql-schema';
4
4
  import { buildSchema, GraphQLError, parse, validate } from 'graphql';
5
5
  import { getTokenAtPosition, getHoverInformation, getAutocompleteSuggestions, getDiagnostics } from 'graphql-language-service-interface';
6
6
  import { Position } from 'graphql-language-service-utils';
@@ -22,7 +22,7 @@ const init = ({
22
22
  const addScalarUnknownType = schemaCode => schemaCode.includes("scalar Unknown") ? schemaCode : `${schemaCode}\nscalar Unknown`;
23
23
 
24
24
  const changeModel = () => {
25
- schema = buildSchema(addScalarUnknownType(fixSchema(readFileSync(modelPath, "utf8"))));
25
+ schema = buildSchema(addScalarUnknownType(printSchemaModel(readFileSync(modelPath, "utf8"))));
26
26
  };
27
27
 
28
28
  const changeSchema = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":null,"names":["init","typescript","ts","create","info","languageService","config","cwd","project","getCurrentDirectory","modelPath","model","resolve","schemaPath","schema","watchPath","buildSchema","addScalarUnknownType","schemaCode","includes","changeModel","fixSchema","readFileSync","changeSchema","update","listener","watch","watchFile","unwatchFile","getSourceFile","fileName","getProgram","isGraphqlTag","tag","getDiagnosticCategory","severity","DiagnosticSeverity","Error","DiagnosticCategory","Warning","Information","Message","Hint","Suggestion","hover","sourceFile","position","forEachChild","visitor","node","pos","end","isTaggedTemplateExpression","isIdentifier","getText","template","isNoSubstitutionTemplateLiteral","getStart","getEnd","head","literal","templateSpans","isTemplateMiddle","fix","query","variables","templateWidth","getWidth","text","padStart","forEach","span","i","spanWidth","getFullWidth","literalWidth","expressionWidth","variableName","variable","padEnd","isTemplateTail","offset","replace","length","documentNode","parse","errors","validate","error","match","message","proxy","Object","key","value","entries","bind","getQuickInfoAtPosition","undefined","result","cursor","Position","token","getTokenAtPosition","marked","getHoverInformation","kind","ScriptElementKind","string","textSpan","start","kindModifiers","displayParts","getCompletionsAtPosition","options","items","getAutocompleteSuggestions","isGlobalCompletion","isMemberCompletion","isNewIdentifierLocation","map","item","CompletionItemKind","Function","Constructor","functionElement","Field","Variable","memberVariableElement","unknown","name","label","sortText","getSemanticDiagnostics","diagnostics","_diagnostics","getDiagnostics","range","push","category","code","messageText","file","character","GraphQLError"],"mappings":";;;;;;;;MAcMA,IAAI,GAA+B,CAAC;AAAEC,EAAAA,UAAU,EAAEC;AAAd,CAAD;AACvC,SAAO;AACLC,IAAAA,MAAM,CAACC,IAAD;AACJ,YAAMC,eAAe,GAAGD,IAAI,CAACC,eAA7B;AACA,YAAMC,MAAM,GAAGF,IAAI,CAACE,MAApB;AACA,YAAMC,GAAG,GAAGH,IAAI,CAACI,OAAL,CAAaC,mBAAb,EAAZ;AACA,YAAMC,SAAS,GAAGJ,MAAM,CAACK,KAAP,IAAgBC,OAAO,CAACL,GAAD,EAAMD,MAAM,CAACK,KAAb,CAAzC;AACA,YAAME,UAAU,GAAGP,MAAM,CAACQ,MAAP,IAAiBF,OAAO,CAACL,GAAD,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AAK,EAAE;AAAE3B,kBAAAA,KAAF;AAAS3D,kBAAAA;AAAT,iBADE;AAEThB,gBAAAA,QAFS;AAGTuD,gBAAAA;AAHS,eAAX,IAIK6C,YAJL,EAImB;AACjBD,gBAAAA,WAAW,CAACI,IAAZ,CAAiB;AACfC,kBAAAA,QAAQ,EAAEzG,qBAAqB,CAACC,QAAD,CADhB;AAEfyG,kBAAAA,IAAI,EAAE,IAFS;AAGfC,kBAAAA,WAAW,EAAEnD,OAHE;AAIfoD,kBAAAA,IAAI,EAAEjG,UAJS;AAKfiE,kBAAAA,KAAK,EAAEA,KAAK,CAACiC,SAAN,GAAkB9D,MALV;AAMfE,kBAAAA,MAAM,EAAEhC,GAAG,CAAC4F,SAAJ,GAAgBjC,KAAK,CAACiC;AANf,iBAAjB;AAQD;AACF,aAlBD,CAkBE,OAAOvD,KAAP,EAAc;AACd,kBAAIA,KAAK,YAAYwD,YAArB,EAAmC;AACjCV,gBAAAA,WAAW,CAACI,IAAZ,CAAiB;AACfC,kBAAAA,QAAQ,EAAEzI,EAAE,CAACoC,kBAAH,CAAsBD,KADjB;AAEfuG,kBAAAA,IAAI,EAAE,IAFS;AAGfC,kBAAAA,WAAW,EAAErD,KAAK,CAACE,OAHJ;AAIfoD,kBAAAA,IAAI,EAAEjG,UAJS;AAKfiE,kBAAAA,KAAK,EAAE7D,IAAI,CAACM,QAAL,CAAcE,QAAd,KAA2B,CALnB;AAMf0B,kBAAAA,MAAM,EAAElC,IAAI,CAACM,QAAL,CAAcY,QAAd,KAA2B;AANpB,iBAAjB;AAQD;AACF;AACF;;AAEDjE,UAAAA,EAAE,CAAC6C,YAAH,CAAgBE,IAAhB,EAAsBD,OAAtB;AACD,SAnCD;AAqCA,eAAOsF,WAAP;AACD,OA9CD;;AAgDA,aAAO3C,KAAP;AACD;;AAlVI,GAAP;AAoVD;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":null,"names":["init","typescript","ts","create","info","languageService","config","cwd","project","getCurrentDirectory","modelPath","model","resolve","schemaPath","schema","watchPath","buildSchema","addScalarUnknownType","schemaCode","includes","changeModel","printSchemaModel","readFileSync","changeSchema","update","listener","watch","watchFile","unwatchFile","getSourceFile","fileName","getProgram","isGraphqlTag","tag","getDiagnosticCategory","severity","DiagnosticSeverity","Error","DiagnosticCategory","Warning","Information","Message","Hint","Suggestion","hover","sourceFile","position","forEachChild","visitor","node","pos","end","isTaggedTemplateExpression","isIdentifier","getText","template","isNoSubstitutionTemplateLiteral","getStart","getEnd","head","literal","templateSpans","isTemplateMiddle","fix","query","variables","templateWidth","getWidth","text","padStart","forEach","span","i","spanWidth","getFullWidth","literalWidth","expressionWidth","variableName","variable","padEnd","isTemplateTail","offset","replace","length","documentNode","parse","errors","validate","error","match","message","proxy","Object","key","value","entries","bind","getQuickInfoAtPosition","undefined","result","cursor","Position","token","getTokenAtPosition","marked","getHoverInformation","kind","ScriptElementKind","string","textSpan","start","kindModifiers","displayParts","getCompletionsAtPosition","options","items","getAutocompleteSuggestions","isGlobalCompletion","isMemberCompletion","isNewIdentifierLocation","map","item","CompletionItemKind","Function","Constructor","functionElement","Field","Variable","memberVariableElement","unknown","name","label","sortText","getSemanticDiagnostics","diagnostics","_diagnostics","getDiagnostics","range","push","category","code","messageText","file","character","GraphQLError"],"mappings":";;;;;;;;MAcMA,IAAI,GAA+B,CAAC;AAAEC,EAAAA,UAAU,EAAEC;AAAd,CAAD;AACvC,SAAO;AACLC,IAAAA,MAAM,CAACC,IAAD;AACJ,YAAMC,eAAe,GAAGD,IAAI,CAACC,eAA7B;AACA,YAAMC,MAAM,GAAGF,IAAI,CAACE,MAApB;AACA,YAAMC,GAAG,GAAGH,IAAI,CAACI,OAAL,CAAaC,mBAAb,EAAZ;AACA,YAAMC,SAAS,GAAGJ,MAAM,CAACK,KAAP,IAAgBC,OAAO,CAACL,GAAD,EAAMD,MAAM,CAACK,KAAb,CAAzC;AACA,YAAME,UAAU,GAAGP,MAAM,CAACQ,MA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"name": "@mo36924/graphql-plugin",
3
- "version": "1.4.24",
3
+ "version": "1.4.33",
4
4
  "description": "graphql-plugin",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/mo36924/monorepo#readme",
@@ -23,7 +23,7 @@
23
23
  "main": "./dist/index.js",
24
24
  "module": "./dist/index.mjs",
25
25
  "dependencies": {
26
- "@mo36924/graphql-schema": "^1.4.20",
26
+ "@mo36924/graphql-schema": "^1.4.33",
27
27
  "graphql": "^15.5.0",
28
28
  "graphql-language-service-interface": "^2.8.4",
29
29
  "graphql-language-service-utils": "^2.5.3",
@@ -33,5 +33,5 @@
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "gitHead": "903e509fb3cc5c952ff408452f2bf582d0228c74"
36
+ "gitHead": "018101bbee5b7b0b70cf86cf29ef79779058b625"
37
37
  }
package/src/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { readFileSync, unwatchFile, watch, watchFile } from "fs";
2
2
  import { resolve } from "path";
3
- import { fixSchema } from "@mo36924/graphql-schema";
3
+ import { printSchemaModel } from "@mo36924/graphql-schema";
4
4
  import { buildSchema, GraphQLError, parse, validate } from "graphql";
5
5
  import {
6
6
  getAutocompleteSuggestions,
@@ -27,7 +27,7 @@ const init: server.PluginModuleFactory = ({ typescript: ts }) => {
27
27
  schemaCode.includes("scalar Unknown") ? schemaCode : `${schemaCode}\nscalar Unknown`;
28
28
 
29
29
  const changeModel = () => {
30
- schema = buildSchema(addScalarUnknownType(fixSchema(readFileSync(modelPath, "utf8"))));
30
+ schema = buildSchema(addScalarUnknownType(printSchemaModel(readFileSync(modelPath, "utf8"))));
31
31
  };
32
32
 
33
33
  const changeSchema = () => {