@powerlines/plugin-graphql 0.1.1 → 0.1.3

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.
@@ -1318,13 +1318,13 @@ type GraphQLPluginOptions = Partial<Omit<YamlCliFlags, "config" | "watch">> & {
1318
1318
  *
1319
1319
  * @defaultValue "\{builtinPath\}/graphql"
1320
1320
  */
1321
- generatedPath?: string;
1321
+ outputPath?: string;
1322
1322
  };
1323
1323
  type GraphQLPluginUserConfig = UserConfig & {
1324
- graphql?: Omit<YamlCliFlags, "config" | "watch" | "project" | "overwrite" | "require"> & Omit<GraphQLPluginOptions, "generatedPath" | "configFile"> & Required<Pick<GraphQLPluginOptions, "generatedPath" | "configFile">>;
1324
+ graphql?: Omit<YamlCliFlags, "config" | "watch" | "project" | "overwrite" | "require"> & Omit<GraphQLPluginOptions, "outputPath" | "configFile"> & Required<Pick<GraphQLPluginOptions, "outputPath" | "configFile">>;
1325
1325
  };
1326
1326
  type GraphQLPluginResolvedConfig = ResolvedConfig & {
1327
- graphql: Omit<YamlCliFlags, "config" | "watch" | "project" | "overwrite" | "require"> & Omit<GraphQLPluginOptions, "generatedPath" | "configFile"> & Required<Pick<GraphQLPluginOptions, "generatedPath" | "configFile">>;
1327
+ graphql: Omit<YamlCliFlags, "config" | "watch" | "project" | "overwrite" | "require"> & Omit<GraphQLPluginOptions, "outputPath" | "configFile"> & Required<Pick<GraphQLPluginOptions, "outputPath" | "configFile">>;
1328
1328
  };
1329
1329
  type GraphQLPluginContext<TResolvedConfig extends GraphQLPluginResolvedConfig = GraphQLPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
1330
1330
  graphql: {
@@ -1318,13 +1318,13 @@ type GraphQLPluginOptions = Partial<Omit<YamlCliFlags, "config" | "watch">> & {
1318
1318
  *
1319
1319
  * @defaultValue "\{builtinPath\}/graphql"
1320
1320
  */
1321
- generatedPath?: string;
1321
+ outputPath?: string;
1322
1322
  };
1323
1323
  type GraphQLPluginUserConfig = UserConfig & {
1324
- graphql?: Omit<YamlCliFlags, "config" | "watch" | "project" | "overwrite" | "require"> & Omit<GraphQLPluginOptions, "generatedPath" | "configFile"> & Required<Pick<GraphQLPluginOptions, "generatedPath" | "configFile">>;
1324
+ graphql?: Omit<YamlCliFlags, "config" | "watch" | "project" | "overwrite" | "require"> & Omit<GraphQLPluginOptions, "outputPath" | "configFile"> & Required<Pick<GraphQLPluginOptions, "outputPath" | "configFile">>;
1325
1325
  };
1326
1326
  type GraphQLPluginResolvedConfig = ResolvedConfig & {
1327
- graphql: Omit<YamlCliFlags, "config" | "watch" | "project" | "overwrite" | "require"> & Omit<GraphQLPluginOptions, "generatedPath" | "configFile"> & Required<Pick<GraphQLPluginOptions, "generatedPath" | "configFile">>;
1327
+ graphql: Omit<YamlCliFlags, "config" | "watch" | "project" | "overwrite" | "require"> & Omit<GraphQLPluginOptions, "outputPath" | "configFile"> & Required<Pick<GraphQLPluginOptions, "outputPath" | "configFile">>;
1328
1328
  };
1329
1329
  type GraphQLPluginContext<TResolvedConfig extends GraphQLPluginResolvedConfig = GraphQLPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
1330
1330
  graphql: {
@@ -1,7 +1,7 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var cli=require('@graphql-codegen/cli'),types$1=require('@storm-software/config-tools/types'),filePathFns=require('@stryke/path/file-path-fns'),isParentPath=require('@stryke/path/is-parent-path'),joinPaths=require('@stryke/path/join-paths'),replace=require('@stryke/path/replace'),m=require('defu'),getConfigPath=require('powerlines/plugin-utils/get-config-path'),types=require('./types');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var m__default=/*#__PURE__*/_interopDefault(m);/*****************************************
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var cli=require('@graphql-codegen/cli'),types$1=require('@storm-software/config-tools/types'),filePathFns=require('@stryke/path/file-path-fns'),isParentPath=require('@stryke/path/is-parent-path'),joinPaths=require('@stryke/path/join-paths'),replace=require('@stryke/path/replace'),m=require('defu'),getConfigPath=require('powerlines/plugin-utils/get-config-path'),paths=require('powerlines/plugin-utils/paths'),types=require('./types');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var m__default=/*#__PURE__*/_interopDefault(m);/*****************************************
2
2
  *
3
3
  * ⚡ Built by Storm Software
4
4
  *
5
5
  *****************************************/
6
6
 
7
- var g=Object.defineProperty;var a=(n,e)=>g(n,"name",{value:e,configurable:true});const P=a((n={})=>({name:"graphql",config(){let e=n.configFile;if(!e&&(e=getConfigPath.getConfigPath(this,"codegen"),!e&&(e=getConfigPath.getConfigPath(this,"graphql-codegen"),!e)))throw new Error("No GraphQL Codegen configuration file found. Please specify a valid config file path in the Biome plugin's `configFile` options.");return {graphql:m__default.default(n,{configFile:e,silent:this.config.logLevel===null,verbose:this.config.logLevel===types$1.LogLevelLabel.DEBUG||this.config.logLevel===types$1.LogLevelLabel.TRACE,debug:this.config.mode==="development",generatedPath:joinPaths.joinPaths("{builtinPath}","graphql")})}},async configResolved(){this.dependencies.graphql="latest",this.config.graphql.generatedPath=this.config.graphql.generatedPath.replace("{builtinPath}",this.builtinsPath),this.graphql??={},this.graphql.codegen=await cli.loadContext(this.config.graphql.configFile),cli.updateContextWithCliFlags(this.graphql.codegen,{require:[],overwrite:true,project:this.config.projectRoot,...this.config.graphql,config:this.config.graphql.configFile,watch:false});},async prepare(){const e=await cli.generate({...this.graphql.codegen,cwd:joinPaths.joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot)},false);isParentPath.isParentPath(this.config.graphql.generatedPath,this.builtinsPath)?await Promise.all(e.map(async i=>this.writeBuiltin(i.content,filePathFns.findFileName(joinPaths.joinPaths(replace.replacePath(this.config.graphql.generatedPath,this.builtinsPath),i.filename),{withExtension:false}),joinPaths.joinPaths(this.config.graphql.generatedPath,i.filename)))):await Promise.all(e.map(async i=>this.fs.writeFile(joinPaths.joinPaths(this.config.graphql.generatedPath,i.filename),i.content)));}}),"plugin");var B=P;exports.default=B;exports.plugin=P;Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
7
+ var l=Object.defineProperty;var n=(o,t)=>l(o,"name",{value:t,configurable:true});const P=n((o={})=>({name:"graphql",config(){let t=o.configFile;if(!t&&(t=getConfigPath.getConfigPath(this,"codegen"),!t&&(t=getConfigPath.getConfigPath(this,"graphql-codegen"),!t)))throw new Error("No GraphQL Codegen configuration file found. Please specify a valid config file path in the Biome plugin's `configFile` options.");return {graphql:m__default.default(o,{configFile:t,silent:this.config.logLevel===null,verbose:this.config.logLevel===types$1.LogLevelLabel.DEBUG||this.config.logLevel===types$1.LogLevelLabel.TRACE,debug:this.config.mode==="development",outputPath:joinPaths.joinPaths("{builtinPath}","graphql")})}},async configResolved(){this.dependencies.graphql="latest",this.config.graphql.outputPath=paths.replacePathTokens(this,this.config.graphql.outputPath),this.graphql??={},this.graphql.codegen=await cli.loadContext(this.config.graphql.configFile),cli.updateContextWithCliFlags(this.graphql.codegen,{require:[],overwrite:true,project:this.config.projectRoot,...this.config.graphql,config:this.config.graphql.configFile,watch:false});},async prepare(){const t=await cli.generate({...this.graphql.codegen,cwd:joinPaths.joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot)},false);isParentPath.isParentPath(this.config.graphql.outputPath,this.builtinsPath)?await Promise.all(t.map(async i=>this.writeBuiltin(i.content,filePathFns.findFileName(joinPaths.joinPaths(replace.replacePath(this.config.graphql.outputPath,this.builtinsPath),i.filename),{withExtension:false}),joinPaths.joinPaths(this.config.graphql.outputPath,i.filename)))):await Promise.all(t.map(async i=>this.fs.writeFile(joinPaths.joinPaths(this.config.graphql.outputPath,i.filename),i.content)));}}),"plugin");var B=P;exports.default=B;exports.plugin=P;Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
@@ -1,5 +1,5 @@
1
- import { G as GraphQLPluginContext, a as GraphQLPluginOptions, P as Plugin } from '../index-BYSgwlaN.cjs';
2
- export { c as GraphQLPluginResolvedConfig, b as GraphQLPluginUserConfig } from '../index-BYSgwlaN.cjs';
1
+ import { G as GraphQLPluginContext, a as GraphQLPluginOptions, P as Plugin } from '../index-ByeAlmRP.cjs';
2
+ export { c as GraphQLPluginResolvedConfig, b as GraphQLPluginUserConfig } from '../index-ByeAlmRP.cjs';
3
3
  import '@graphql-codegen/cli';
4
4
  import '@storm-software/build-tools/types';
5
5
  import '@storm-software/config-tools/types';
@@ -1,5 +1,5 @@
1
- import { G as GraphQLPluginContext, a as GraphQLPluginOptions, P as Plugin } from '../index-BYSgwlaN.js';
2
- export { c as GraphQLPluginResolvedConfig, b as GraphQLPluginUserConfig } from '../index-BYSgwlaN.js';
1
+ import { G as GraphQLPluginContext, a as GraphQLPluginOptions, P as Plugin } from '../index-ByeAlmRP.js';
2
+ export { c as GraphQLPluginResolvedConfig, b as GraphQLPluginUserConfig } from '../index-ByeAlmRP.js';
3
3
  import '@graphql-codegen/cli';
4
4
  import '@storm-software/build-tools/types';
5
5
  import '@storm-software/config-tools/types';
package/dist/src/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import {generate,loadContext,updateContextWithCliFlags}from'@graphql-codegen/cli';import {LogLevelLabel}from'@storm-software/config-tools/types';import {findFileName}from'@stryke/path/file-path-fns';import {isParentPath}from'@stryke/path/is-parent-path';import {joinPaths}from'@stryke/path/join-paths';import {replacePath}from'@stryke/path/replace';import m from'defu';import {getConfigPath}from'powerlines/plugin-utils/get-config-path';export*from'./types';/*****************************************
1
+ import {generate,loadContext,updateContextWithCliFlags}from'@graphql-codegen/cli';import {LogLevelLabel}from'@storm-software/config-tools/types';import {findFileName}from'@stryke/path/file-path-fns';import {isParentPath}from'@stryke/path/is-parent-path';import {joinPaths}from'@stryke/path/join-paths';import {replacePath}from'@stryke/path/replace';import m from'defu';import {getConfigPath}from'powerlines/plugin-utils/get-config-path';import {replacePathTokens}from'powerlines/plugin-utils/paths';export*from'./types';/*****************************************
2
2
  *
3
3
  * ⚡ Built by Storm Software
4
4
  *
5
5
  *****************************************/
6
6
 
7
- var g=Object.defineProperty;var a=(n,e)=>g(n,"name",{value:e,configurable:true});const P=a((n={})=>({name:"graphql",config(){let e=n.configFile;if(!e&&(e=getConfigPath(this,"codegen"),!e&&(e=getConfigPath(this,"graphql-codegen"),!e)))throw new Error("No GraphQL Codegen configuration file found. Please specify a valid config file path in the Biome plugin's `configFile` options.");return {graphql:m(n,{configFile:e,silent:this.config.logLevel===null,verbose:this.config.logLevel===LogLevelLabel.DEBUG||this.config.logLevel===LogLevelLabel.TRACE,debug:this.config.mode==="development",generatedPath:joinPaths("{builtinPath}","graphql")})}},async configResolved(){this.dependencies.graphql="latest",this.config.graphql.generatedPath=this.config.graphql.generatedPath.replace("{builtinPath}",this.builtinsPath),this.graphql??={},this.graphql.codegen=await loadContext(this.config.graphql.configFile),updateContextWithCliFlags(this.graphql.codegen,{require:[],overwrite:true,project:this.config.projectRoot,...this.config.graphql,config:this.config.graphql.configFile,watch:false});},async prepare(){const e=await generate({...this.graphql.codegen,cwd:joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot)},false);isParentPath(this.config.graphql.generatedPath,this.builtinsPath)?await Promise.all(e.map(async i=>this.writeBuiltin(i.content,findFileName(joinPaths(replacePath(this.config.graphql.generatedPath,this.builtinsPath),i.filename),{withExtension:false}),joinPaths(this.config.graphql.generatedPath,i.filename)))):await Promise.all(e.map(async i=>this.fs.writeFile(joinPaths(this.config.graphql.generatedPath,i.filename),i.content)));}}),"plugin");var T=P;export{T as default,P as plugin};
7
+ var l=Object.defineProperty;var n=(o,t)=>l(o,"name",{value:t,configurable:true});const P=n((o={})=>({name:"graphql",config(){let t=o.configFile;if(!t&&(t=getConfigPath(this,"codegen"),!t&&(t=getConfigPath(this,"graphql-codegen"),!t)))throw new Error("No GraphQL Codegen configuration file found. Please specify a valid config file path in the Biome plugin's `configFile` options.");return {graphql:m(o,{configFile:t,silent:this.config.logLevel===null,verbose:this.config.logLevel===LogLevelLabel.DEBUG||this.config.logLevel===LogLevelLabel.TRACE,debug:this.config.mode==="development",outputPath:joinPaths("{builtinPath}","graphql")})}},async configResolved(){this.dependencies.graphql="latest",this.config.graphql.outputPath=replacePathTokens(this,this.config.graphql.outputPath),this.graphql??={},this.graphql.codegen=await loadContext(this.config.graphql.configFile),updateContextWithCliFlags(this.graphql.codegen,{require:[],overwrite:true,project:this.config.projectRoot,...this.config.graphql,config:this.config.graphql.configFile,watch:false});},async prepare(){const t=await generate({...this.graphql.codegen,cwd:joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot)},false);isParentPath(this.config.graphql.outputPath,this.builtinsPath)?await Promise.all(t.map(async i=>this.writeBuiltin(i.content,findFileName(joinPaths(replacePath(this.config.graphql.outputPath,this.builtinsPath),i.filename),{withExtension:false}),joinPaths(this.config.graphql.outputPath,i.filename)))):await Promise.all(t.map(async i=>this.fs.writeFile(joinPaths(this.config.graphql.outputPath,i.filename),i.content)));}}),"plugin");var U=P;export{U as default,P as plugin};
@@ -1,4 +1,4 @@
1
- export { G as GraphQLPluginContext, a as GraphQLPluginOptions, c as GraphQLPluginResolvedConfig, b as GraphQLPluginUserConfig } from '../index-BYSgwlaN.cjs';
1
+ export { G as GraphQLPluginContext, a as GraphQLPluginOptions, c as GraphQLPluginResolvedConfig, b as GraphQLPluginUserConfig } from '../index-ByeAlmRP.cjs';
2
2
  import '@graphql-codegen/cli';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
@@ -1,4 +1,4 @@
1
- export { G as GraphQLPluginContext, a as GraphQLPluginOptions, c as GraphQLPluginResolvedConfig, b as GraphQLPluginUserConfig } from '../index-BYSgwlaN.js';
1
+ export { G as GraphQLPluginContext, a as GraphQLPluginOptions, c as GraphQLPluginResolvedConfig, b as GraphQLPluginUserConfig } from '../index-ByeAlmRP.js';
2
2
  import '@graphql-codegen/cli';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
@@ -1,5 +1,5 @@
1
1
  import '@graphql-codegen/cli';
2
- export { G as GraphQLPluginContext, a as GraphQLPluginOptions, c as GraphQLPluginResolvedConfig, b as GraphQLPluginUserConfig } from '../index-BYSgwlaN.cjs';
2
+ export { G as GraphQLPluginContext, a as GraphQLPluginOptions, c as GraphQLPluginResolvedConfig, b as GraphQLPluginUserConfig } from '../index-ByeAlmRP.cjs';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
5
5
  import '@storm-software/config/types';
@@ -1,5 +1,5 @@
1
1
  import '@graphql-codegen/cli';
2
- export { G as GraphQLPluginContext, a as GraphQLPluginOptions, c as GraphQLPluginResolvedConfig, b as GraphQLPluginUserConfig } from '../index-BYSgwlaN.js';
2
+ export { G as GraphQLPluginContext, a as GraphQLPluginOptions, c as GraphQLPluginResolvedConfig, b as GraphQLPluginUserConfig } from '../index-ByeAlmRP.js';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
5
5
  import '@storm-software/config/types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-graphql",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to generate project code from GraphQL schemas.",
6
6
  "repository": {
@@ -105,14 +105,14 @@
105
105
  "@stryke/types": "^0.10.0",
106
106
  "defu": "^6.1.4",
107
107
  "jiti": "^2.6.1",
108
- "powerlines": "^0.15.0"
108
+ "powerlines": "^0.17.0"
109
109
  },
110
110
  "devDependencies": {
111
111
  "@graphql-codegen/plugin-helpers": "^6.0.0",
112
- "@powerlines/nx": "^0.10.0",
113
- "@powerlines/plugin-plugin": "^0.11.8",
112
+ "@powerlines/nx": "^0.10.2",
113
+ "@powerlines/plugin-plugin": "^0.11.10",
114
114
  "@types/node": "^22.19.0"
115
115
  },
116
116
  "publishConfig": { "access": "public" },
117
- "gitHead": "b64f9a9d53b6eb8054c361da347f6623a7ba9e45"
117
+ "gitHead": "27064ac269a2d34c5b9371105cdd58bf6ebe85b4"
118
118
  }