@powerlines/plugin-graphql 0.1.124 → 0.1.125

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.
Files changed (44) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +29 -0
  2. package/dist/index.cjs +7 -111
  3. package/dist/index.d.cts +2 -2
  4. package/dist/index.d.mts +3 -2
  5. package/dist/index.mjs +2 -80
  6. package/dist/powerlines/src/plugin-utils/get-config-path.cjs +49 -0
  7. package/dist/powerlines/src/plugin-utils/get-config-path.mjs +48 -0
  8. package/dist/powerlines/src/plugin-utils/paths.cjs +36 -0
  9. package/dist/powerlines/src/plugin-utils/paths.mjs +35 -0
  10. package/dist/powerlines/src/types/babel.d.mts +2 -0
  11. package/dist/powerlines/src/types/build.d.cts +145 -0
  12. package/dist/powerlines/src/types/build.d.mts +145 -0
  13. package/dist/powerlines/src/types/commands.d.cts +8 -0
  14. package/dist/powerlines/src/types/commands.d.mts +9 -0
  15. package/dist/powerlines/src/types/config.d.cts +376 -0
  16. package/dist/powerlines/src/types/config.d.mts +376 -0
  17. package/dist/powerlines/src/types/context.d.cts +403 -0
  18. package/dist/powerlines/src/types/context.d.mts +405 -0
  19. package/dist/powerlines/src/types/fs.d.cts +486 -0
  20. package/dist/powerlines/src/types/fs.d.mts +486 -0
  21. package/dist/powerlines/src/types/hooks.d.mts +2 -0
  22. package/dist/powerlines/src/types/plugin.d.cts +231 -0
  23. package/dist/powerlines/src/types/plugin.d.mts +231 -0
  24. package/dist/powerlines/src/types/resolved.d.cts +81 -0
  25. package/dist/powerlines/src/types/resolved.d.mts +81 -0
  26. package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
  27. package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
  28. package/dist/types/index.cjs +0 -2
  29. package/dist/types/index.d.cts +1 -2
  30. package/dist/types/index.d.mts +1 -2
  31. package/dist/types/index.mjs +0 -3
  32. package/dist/types/plugin.cjs +0 -1
  33. package/dist/types/plugin.d.cts +40 -1
  34. package/dist/types/plugin.d.mts +40 -1
  35. package/dist/types/plugin.mjs +0 -2
  36. package/package.json +5 -5
  37. package/dist/index-BgAdqTbb.d.mts +0 -1
  38. package/dist/index-CEgs-Dz2.d.cts +0 -1
  39. package/dist/plugin-B-JWUDie.d.mts +0 -1792
  40. package/dist/plugin-BTRNOsqk.d.cts +0 -1792
  41. package/dist/plugin-C3MaN5jp.mjs +0 -1
  42. package/dist/plugin-DHXHjv16.cjs +0 -0
  43. package/dist/types-CTUnla4x.mjs +0 -1
  44. package/dist/types-DHkg7xmX.cjs +0 -0
@@ -0,0 +1,69 @@
1
+ import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
2
+ import ts from "typescript";
3
+
4
+ //#region ../powerlines/src/types/tsconfig.d.ts
5
+ type ReflectionMode = "default" | "explicit" | "never";
6
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
7
+ /**
8
+ * Defines the level of reflection to be used during the transpilation process.
9
+ *
10
+ * @remarks
11
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
12
+ * - `minimal` - Only the essential type information is captured.
13
+ * - `normal` - Additional type information is captured, including some contextual data.
14
+ * - `verbose` - All available type information is captured, including detailed contextual data.
15
+ */
16
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
17
+ interface DeepkitOptions {
18
+ /**
19
+ * Either true to activate reflection for all files compiled using this tsconfig,
20
+ * or a list of globs/file paths relative to this tsconfig.json.
21
+ * Globs/file paths can be prefixed with a ! to exclude them.
22
+ */
23
+ reflection?: RawReflectionMode;
24
+ /**
25
+ * Defines the level of reflection to be used during the transpilation process.
26
+ *
27
+ * @remarks
28
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
29
+ * - `minimal` - Only the essential type information is captured.
30
+ * - `normal` - Additional type information is captured, including some contextual data.
31
+ * - `verbose` - All available type information is captured, including detailed contextual data.
32
+ */
33
+ reflectionLevel?: ReflectionLevel;
34
+ }
35
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
36
+ /**
37
+ * The TypeScript compiler configuration.
38
+ *
39
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
40
+ */
41
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
42
+ /**
43
+ * Either true to activate reflection for all files compiled using this tsconfig,
44
+ * or a list of globs/file paths relative to this tsconfig.json.
45
+ * Globs/file paths can be prefixed with a ! to exclude them.
46
+ */
47
+ reflection?: RawReflectionMode;
48
+ /**
49
+ * Defines the level of reflection to be used during the transpilation process.
50
+ *
51
+ * @remarks
52
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
53
+ * - `minimal` - Only the essential type information is captured.
54
+ * - `normal` - Additional type information is captured, including some contextual data.
55
+ * - `verbose` - All available type information is captured, including detailed contextual data.
56
+ */
57
+ reflectionLevel?: ReflectionLevel;
58
+ /**
59
+ * Instructs the TypeScript compiler how to compile `.ts` files.
60
+ */
61
+ compilerOptions?: TSCompilerOptions;
62
+ }
63
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
64
+ originalTsconfigJson: TsConfigJson;
65
+ tsconfigJson: TSConfig;
66
+ tsconfigFilePath: string;
67
+ };
68
+ //#endregion
69
+ export { ParsedTypeScriptConfig, TSConfig };
@@ -0,0 +1,69 @@
1
+ import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
2
+ import ts from "typescript";
3
+
4
+ //#region ../powerlines/src/types/tsconfig.d.ts
5
+ type ReflectionMode = "default" | "explicit" | "never";
6
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
7
+ /**
8
+ * Defines the level of reflection to be used during the transpilation process.
9
+ *
10
+ * @remarks
11
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
12
+ * - `minimal` - Only the essential type information is captured.
13
+ * - `normal` - Additional type information is captured, including some contextual data.
14
+ * - `verbose` - All available type information is captured, including detailed contextual data.
15
+ */
16
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
17
+ interface DeepkitOptions {
18
+ /**
19
+ * Either true to activate reflection for all files compiled using this tsconfig,
20
+ * or a list of globs/file paths relative to this tsconfig.json.
21
+ * Globs/file paths can be prefixed with a ! to exclude them.
22
+ */
23
+ reflection?: RawReflectionMode;
24
+ /**
25
+ * Defines the level of reflection to be used during the transpilation process.
26
+ *
27
+ * @remarks
28
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
29
+ * - `minimal` - Only the essential type information is captured.
30
+ * - `normal` - Additional type information is captured, including some contextual data.
31
+ * - `verbose` - All available type information is captured, including detailed contextual data.
32
+ */
33
+ reflectionLevel?: ReflectionLevel;
34
+ }
35
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
36
+ /**
37
+ * The TypeScript compiler configuration.
38
+ *
39
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
40
+ */
41
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
42
+ /**
43
+ * Either true to activate reflection for all files compiled using this tsconfig,
44
+ * or a list of globs/file paths relative to this tsconfig.json.
45
+ * Globs/file paths can be prefixed with a ! to exclude them.
46
+ */
47
+ reflection?: RawReflectionMode;
48
+ /**
49
+ * Defines the level of reflection to be used during the transpilation process.
50
+ *
51
+ * @remarks
52
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
53
+ * - `minimal` - Only the essential type information is captured.
54
+ * - `normal` - Additional type information is captured, including some contextual data.
55
+ * - `verbose` - All available type information is captured, including detailed contextual data.
56
+ */
57
+ reflectionLevel?: ReflectionLevel;
58
+ /**
59
+ * Instructs the TypeScript compiler how to compile `.ts` files.
60
+ */
61
+ compilerOptions?: TSCompilerOptions;
62
+ }
63
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
64
+ originalTsconfigJson: TsConfigJson;
65
+ tsconfigJson: TSConfig;
66
+ tsconfigFilePath: string;
67
+ };
68
+ //#endregion
69
+ export { ParsedTypeScriptConfig, TSConfig };
@@ -1,2 +0,0 @@
1
- require('../plugin-DHXHjv16.cjs');
2
- require('../types-DHkg7xmX.cjs');
@@ -1,3 +1,2 @@
1
- import { a as __ΩGraphQLPluginContext, c as __ΩGraphQLPluginUserConfig, i as GraphQLPluginUserConfig, n as GraphQLPluginOptions, o as __ΩGraphQLPluginOptions, r as GraphQLPluginResolvedConfig, s as __ΩGraphQLPluginResolvedConfig, t as GraphQLPluginContext } from "../plugin-BTRNOsqk.cjs";
2
- import "../index-CEgs-Dz2.cjs";
1
+ import { GraphQLPluginContext, GraphQLPluginOptions, GraphQLPluginResolvedConfig, GraphQLPluginUserConfig, __ΩGraphQLPluginContext, __ΩGraphQLPluginOptions, __ΩGraphQLPluginResolvedConfig, __ΩGraphQLPluginUserConfig } from "./plugin.cjs";
3
2
  export { GraphQLPluginContext, GraphQLPluginOptions, GraphQLPluginResolvedConfig, GraphQLPluginUserConfig, __ΩGraphQLPluginContext, __ΩGraphQLPluginOptions, __ΩGraphQLPluginResolvedConfig, __ΩGraphQLPluginUserConfig };
@@ -1,3 +1,2 @@
1
- import { a as __ΩGraphQLPluginContext, c as __ΩGraphQLPluginUserConfig, i as GraphQLPluginUserConfig, n as GraphQLPluginOptions, o as __ΩGraphQLPluginOptions, r as GraphQLPluginResolvedConfig, s as __ΩGraphQLPluginResolvedConfig, t as GraphQLPluginContext } from "../plugin-B-JWUDie.mjs";
2
- import "../index-BgAdqTbb.mjs";
1
+ import { GraphQLPluginContext, GraphQLPluginOptions, GraphQLPluginResolvedConfig, GraphQLPluginUserConfig, __ΩGraphQLPluginContext, __ΩGraphQLPluginOptions, __ΩGraphQLPluginResolvedConfig, __ΩGraphQLPluginUserConfig } from "./plugin.mjs";
3
2
  export { GraphQLPluginContext, GraphQLPluginOptions, GraphQLPluginResolvedConfig, GraphQLPluginUserConfig, __ΩGraphQLPluginContext, __ΩGraphQLPluginOptions, __ΩGraphQLPluginResolvedConfig, __ΩGraphQLPluginUserConfig };
@@ -1,4 +1 @@
1
- import "../plugin-C3MaN5jp.mjs";
2
- import "../types-CTUnla4x.mjs";
3
-
4
1
  export { };
@@ -1 +0,0 @@
1
- require('../plugin-DHXHjv16.cjs');
@@ -1,2 +1,41 @@
1
- import { a as __ΩGraphQLPluginContext, c as __ΩGraphQLPluginUserConfig, i as GraphQLPluginUserConfig, n as GraphQLPluginOptions, o as __ΩGraphQLPluginOptions, r as GraphQLPluginResolvedConfig, s as __ΩGraphQLPluginResolvedConfig, t as GraphQLPluginContext } from "../plugin-BTRNOsqk.cjs";
1
+ import { UserConfig } from "../powerlines/src/types/config.cjs";
2
+ import { ResolvedConfig } from "../powerlines/src/types/resolved.cjs";
3
+ import { PluginContext } from "../powerlines/src/types/context.cjs";
4
+ import { CodegenContext, YamlCliFlags } from "@graphql-codegen/cli";
5
+
6
+ //#region src/types/plugin.d.ts
7
+ type GraphQLPluginOptions = Partial<Omit<YamlCliFlags, "config" | "watch">> & {
8
+ /**
9
+ * The path to a custom GraphQL Codegen configuration file.
10
+ *
11
+ * @remarks
12
+ * If not provided, the plugin will attempt to locate a configuration file by searching for one of the following filenames in the project root (in order): "codegen.yml", "codegen.yaml", "codegen.json", "codegen.js", "codegen.cjs".
13
+ */
14
+ configFile?: string;
15
+ /**
16
+ * The path to the output file generated by the plugin.
17
+ *
18
+ * @remarks
19
+ * If using the default value, the file can be imported from "powerlines:graphql/schema-name". This field allows the use of the "\{builtinPath\}" token to refer to the built-in Powerlines plugins directory - the value will be replaced with the correct file path by the plugin.
20
+ *
21
+ * @defaultValue "\{builtinPath\}/graphql"
22
+ */
23
+ outputPath?: string;
24
+ };
25
+ type GraphQLPluginUserConfig = UserConfig & {
26
+ graphql?: Omit<YamlCliFlags, "config" | "watch" | "project" | "overwrite" | "require"> & Omit<GraphQLPluginOptions, "outputPath" | "configFile"> & Required<Pick<GraphQLPluginOptions, "outputPath" | "configFile">>;
27
+ };
28
+ type GraphQLPluginResolvedConfig = ResolvedConfig & {
29
+ graphql: Omit<YamlCliFlags, "config" | "watch" | "project" | "overwrite" | "require"> & Omit<GraphQLPluginOptions, "outputPath" | "configFile"> & Required<Pick<GraphQLPluginOptions, "outputPath" | "configFile">>;
30
+ };
31
+ type GraphQLPluginContext<TResolvedConfig extends GraphQLPluginResolvedConfig = GraphQLPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
32
+ graphql: {
33
+ codegen: CodegenContext;
34
+ };
35
+ };
36
+ declare type __ΩGraphQLPluginOptions = any[];
37
+ declare type __ΩGraphQLPluginUserConfig = any[];
38
+ declare type __ΩGraphQLPluginResolvedConfig = any[];
39
+ declare type __ΩGraphQLPluginContext = any[];
40
+ //#endregion
2
41
  export { GraphQLPluginContext, GraphQLPluginOptions, GraphQLPluginResolvedConfig, GraphQLPluginUserConfig, __ΩGraphQLPluginContext, __ΩGraphQLPluginOptions, __ΩGraphQLPluginResolvedConfig, __ΩGraphQLPluginUserConfig };
@@ -1,2 +1,41 @@
1
- import { a as __ΩGraphQLPluginContext, c as __ΩGraphQLPluginUserConfig, i as GraphQLPluginUserConfig, n as GraphQLPluginOptions, o as __ΩGraphQLPluginOptions, r as GraphQLPluginResolvedConfig, s as __ΩGraphQLPluginResolvedConfig, t as GraphQLPluginContext } from "../plugin-B-JWUDie.mjs";
1
+ import { UserConfig } from "../powerlines/src/types/config.mjs";
2
+ import { ResolvedConfig } from "../powerlines/src/types/resolved.mjs";
3
+ import { PluginContext } from "../powerlines/src/types/context.mjs";
4
+ import { CodegenContext, YamlCliFlags } from "@graphql-codegen/cli";
5
+
6
+ //#region src/types/plugin.d.ts
7
+ type GraphQLPluginOptions = Partial<Omit<YamlCliFlags, "config" | "watch">> & {
8
+ /**
9
+ * The path to a custom GraphQL Codegen configuration file.
10
+ *
11
+ * @remarks
12
+ * If not provided, the plugin will attempt to locate a configuration file by searching for one of the following filenames in the project root (in order): "codegen.yml", "codegen.yaml", "codegen.json", "codegen.js", "codegen.cjs".
13
+ */
14
+ configFile?: string;
15
+ /**
16
+ * The path to the output file generated by the plugin.
17
+ *
18
+ * @remarks
19
+ * If using the default value, the file can be imported from "powerlines:graphql/schema-name". This field allows the use of the "\{builtinPath\}" token to refer to the built-in Powerlines plugins directory - the value will be replaced with the correct file path by the plugin.
20
+ *
21
+ * @defaultValue "\{builtinPath\}/graphql"
22
+ */
23
+ outputPath?: string;
24
+ };
25
+ type GraphQLPluginUserConfig = UserConfig & {
26
+ graphql?: Omit<YamlCliFlags, "config" | "watch" | "project" | "overwrite" | "require"> & Omit<GraphQLPluginOptions, "outputPath" | "configFile"> & Required<Pick<GraphQLPluginOptions, "outputPath" | "configFile">>;
27
+ };
28
+ type GraphQLPluginResolvedConfig = ResolvedConfig & {
29
+ graphql: Omit<YamlCliFlags, "config" | "watch" | "project" | "overwrite" | "require"> & Omit<GraphQLPluginOptions, "outputPath" | "configFile"> & Required<Pick<GraphQLPluginOptions, "outputPath" | "configFile">>;
30
+ };
31
+ type GraphQLPluginContext<TResolvedConfig extends GraphQLPluginResolvedConfig = GraphQLPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
32
+ graphql: {
33
+ codegen: CodegenContext;
34
+ };
35
+ };
36
+ declare type __ΩGraphQLPluginOptions = any[];
37
+ declare type __ΩGraphQLPluginUserConfig = any[];
38
+ declare type __ΩGraphQLPluginResolvedConfig = any[];
39
+ declare type __ΩGraphQLPluginContext = any[];
40
+ //#endregion
2
41
  export { GraphQLPluginContext, GraphQLPluginOptions, GraphQLPluginResolvedConfig, GraphQLPluginUserConfig, __ΩGraphQLPluginContext, __ΩGraphQLPluginOptions, __ΩGraphQLPluginResolvedConfig, __ΩGraphQLPluginUserConfig };
@@ -1,3 +1 @@
1
- import "../plugin-C3MaN5jp.mjs";
2
-
3
1
  export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-graphql",
3
- "version": "0.1.124",
3
+ "version": "0.1.125",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to generate project code from GraphQL schemas.",
6
6
  "repository": {
@@ -123,14 +123,14 @@
123
123
  "@stryke/types": "^0.10.29",
124
124
  "defu": "^6.1.4",
125
125
  "jiti": "^2.6.1",
126
- "powerlines": "^0.36.27"
126
+ "powerlines": "^0.36.28"
127
127
  },
128
128
  "devDependencies": {
129
129
  "@graphql-codegen/plugin-helpers": "^6.1.0",
130
- "@powerlines/nx": "^0.11.53",
131
- "@powerlines/plugin-plugin": "^0.12.75",
130
+ "@powerlines/nx": "^0.11.54",
131
+ "@powerlines/plugin-plugin": "^0.12.76",
132
132
  "@types/node": "^24.10.4"
133
133
  },
134
134
  "publishConfig": { "access": "public" },
135
- "gitHead": "fbc59ce584fd0f78d90d2dbaa18f9c9267bd3b61"
135
+ "gitHead": "6891ff1330798e807c4caef6134df09d9f57686d"
136
136
  }
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };