@fragment-dev/cli 2026.9.9 → 2026.9.10-10

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/commands.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  COMMANDS
3
- } from "./chunk-EJNEAWYE.js";
3
+ } from "./chunk-B2LX5DMN.js";
4
4
  import "./chunk-EXE547EZ.js";
5
5
  import "./chunk-C6XIABYY.js";
6
6
  import "./chunk-QC7XM3CQ.js";
@@ -10,17 +10,17 @@ import "./chunk-K7KCVZP2.js";
10
10
  import "./chunk-MNVCFR3U.js";
11
11
  import "./chunk-DF3NICEM.js";
12
12
  import "./chunk-PISSWWTD.js";
13
- import "./chunk-KNFHXSE5.js";
14
- import "./chunk-WL5BF26E.js";
13
+ import "./chunk-BTKJKLCB.js";
14
+ import "./chunk-2LCTKBU3.js";
15
15
  import "./chunk-A4BSWX5D.js";
16
- import "./chunk-ZPKRHWC3.js";
17
- import "./chunk-JZ773SXY.js";
18
- import "./chunk-4VYFUMLV.js";
16
+ import "./chunk-KJFWVDCE.js";
17
+ import "./chunk-QUNR5ZC3.js";
18
+ import "./chunk-7GWSUHUD.js";
19
19
  import "./chunk-ZMFGVGZP.js";
20
- import "./chunk-2UUZOEA7.js";
21
- import "./chunk-VYSP73KB.js";
22
- import "./chunk-PUON7HP5.js";
23
- import "./chunk-3AACKVGA.js";
20
+ import "./chunk-RILSVR74.js";
21
+ import "./chunk-J6HLIC77.js";
22
+ import "./chunk-FUUGVGYY.js";
23
+ import "./chunk-65EVYD2Y.js";
24
24
  import "./chunk-T2BBIXGB.js";
25
25
  import "./chunk-BYZNYEGH.js";
26
26
  import "./chunk-52KK5CBJ.js";
package/dist/graphql.js CHANGED
@@ -2,17 +2,20 @@ import {
2
2
  camelCase,
3
3
  entryDefinitionToMutation,
4
4
  generateGraphQlEntryType,
5
+ generateGraphQlPaymentType,
5
6
  generateQueriesFileContent,
6
7
  generateQueryFiles,
7
8
  getPredefinedParameters,
8
9
  isValidGraphQlName,
10
+ paymentDefinitionToMutation,
9
11
  schemaToEntryDefinitions,
12
+ schemaToPaymentDefinitions,
10
13
  validateOutputName
11
- } from "./chunk-JZ773SXY.js";
12
- import "./chunk-4VYFUMLV.js";
14
+ } from "./chunk-QUNR5ZC3.js";
15
+ import "./chunk-7GWSUHUD.js";
13
16
  import "./chunk-ZMFGVGZP.js";
14
- import "./chunk-PUON7HP5.js";
15
- import "./chunk-3AACKVGA.js";
17
+ import "./chunk-FUUGVGYY.js";
18
+ import "./chunk-65EVYD2Y.js";
16
19
  import "./chunk-XK2D2Z44.js";
17
20
  import "./chunk-7K4RMTU4.js";
18
21
  import "./chunk-7GH3YGSC.js";
@@ -20,10 +23,13 @@ export {
20
23
  camelCase,
21
24
  entryDefinitionToMutation,
22
25
  generateGraphQlEntryType,
26
+ generateGraphQlPaymentType,
23
27
  generateQueriesFileContent,
24
28
  generateQueryFiles,
25
29
  getPredefinedParameters,
26
30
  isValidGraphQlName,
31
+ paymentDefinitionToMutation,
27
32
  schemaToEntryDefinitions,
33
+ schemaToPaymentDefinitions,
28
34
  validateOutputName
29
35
  };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  COMMANDS
3
- } from "./chunk-EJNEAWYE.js";
3
+ } from "./chunk-B2LX5DMN.js";
4
4
  import "./chunk-EXE547EZ.js";
5
5
  import "./chunk-C6XIABYY.js";
6
6
  import "./chunk-QC7XM3CQ.js";
@@ -10,17 +10,17 @@ import "./chunk-K7KCVZP2.js";
10
10
  import "./chunk-MNVCFR3U.js";
11
11
  import "./chunk-DF3NICEM.js";
12
12
  import "./chunk-PISSWWTD.js";
13
- import "./chunk-KNFHXSE5.js";
14
- import "./chunk-WL5BF26E.js";
13
+ import "./chunk-BTKJKLCB.js";
14
+ import "./chunk-2LCTKBU3.js";
15
15
  import "./chunk-A4BSWX5D.js";
16
- import "./chunk-ZPKRHWC3.js";
17
- import "./chunk-JZ773SXY.js";
18
- import "./chunk-4VYFUMLV.js";
16
+ import "./chunk-KJFWVDCE.js";
17
+ import "./chunk-QUNR5ZC3.js";
18
+ import "./chunk-7GWSUHUD.js";
19
19
  import "./chunk-ZMFGVGZP.js";
20
- import "./chunk-2UUZOEA7.js";
21
- import "./chunk-VYSP73KB.js";
22
- import "./chunk-PUON7HP5.js";
23
- import "./chunk-3AACKVGA.js";
20
+ import "./chunk-RILSVR74.js";
21
+ import "./chunk-J6HLIC77.js";
22
+ import "./chunk-FUUGVGYY.js";
23
+ import "./chunk-65EVYD2Y.js";
24
24
  import "./chunk-T2BBIXGB.js";
25
25
  import "./chunk-BYZNYEGH.js";
26
26
  import "./chunk-52KK5CBJ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  standardQueries
3
- } from "../chunk-4VYFUMLV.js";
3
+ } from "../chunk-7GWSUHUD.js";
4
4
  import "../chunk-7GH3YGSC.js";
5
5
  export {
6
6
  standardQueries
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  formatValidationErrors,
3
3
  logValidationErrors
4
- } from "../chunk-VYSP73KB.js";
5
- import "../chunk-3AACKVGA.js";
4
+ } from "../chunk-J6HLIC77.js";
5
+ import "../chunk-65EVYD2Y.js";
6
6
  import "../chunk-XK2D2Z44.js";
7
7
  import "../chunk-L7ZGDLYU.js";
8
8
  import "../chunk-7GH3YGSC.js";
@@ -3,11 +3,11 @@ import {
3
3
  extractSchemaMetadata,
4
4
  isJsonParseError,
5
5
  validateSchemaStructure
6
- } from "../chunk-WL5BF26E.js";
7
- import "../chunk-2UUZOEA7.js";
8
- import "../chunk-VYSP73KB.js";
9
- import "../chunk-PUON7HP5.js";
10
- import "../chunk-3AACKVGA.js";
6
+ } from "../chunk-2LCTKBU3.js";
7
+ import "../chunk-RILSVR74.js";
8
+ import "../chunk-J6HLIC77.js";
9
+ import "../chunk-FUUGVGYY.js";
10
+ import "../chunk-65EVYD2Y.js";
11
11
  import "../chunk-XK2D2Z44.js";
12
12
  import "../chunk-L7ZGDLYU.js";
13
13
  import "../chunk-7GH3YGSC.js";
@@ -1025,7 +1025,7 @@
1025
1025
  "gen-graphql": {
1026
1026
  "aliases": [],
1027
1027
  "args": {},
1028
- "description": "This command generates a GraphQL query for each entry type in your ledger Schema.\n Use this command with Fragment SDKs to create type-safe code to update your ledger.",
1028
+ "description": "This command generates a GraphQL query for each Ledger Entry type and each Payment type in your ledger Schema.\n Use this command with Fragment SDKs to create type-safe code to update your ledger.",
1029
1029
  "examples": [
1030
1030
  {
1031
1031
  "description": "Output the GraphQL queries from the schema file at <path>.",
@@ -1096,5 +1096,5 @@
1096
1096
  "help": "Generate GraphQL queries from your Schema for your SDK."
1097
1097
  }
1098
1098
  },
1099
- "version": "2026.9.9"
1099
+ "version": "2026.9.10-10"
1100
1100
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fragment-dev/cli",
3
- "version": "2026.9.9",
3
+ "version": "2026.9.10-10",
4
4
  "description": "FRAGMENT CLI",
5
5
  "author": "hello@fragment.dev",
6
6
  "bin": {
@@ -104,8 +104,8 @@
104
104
  "test:utils:getParsedSchema": "mocha --forbid-only \"tests/utils/getParsedSchema.test.ts\"",
105
105
  "test:update": "mocha --forbid-only \"tests/cli/update.test.ts\"",
106
106
  "test:query": "mocha --forbid-only \"tests/cli/query.test.ts\"",
107
- "test": "vitest run --coverage",
108
- "test.fast": "vitest run",
107
+ "test": "vitest run",
108
+ "test.coverage": "vitest run --coverage",
109
109
  "version": "oclif readme && git add README.md",
110
110
  "typecheck": "tsc --skipLibCheck --noEmit",
111
111
  "typecheck-special": "tsc --skipLibCheck --noEmit",
@@ -1,113 +0,0 @@
1
- import {
2
- BadRequestError,
3
- assert_default,
4
- codes,
5
- getStringParametersInternal
6
- } from "./chunk-3AACKVGA.js";
7
- import {
8
- init_cjs_shims
9
- } from "./chunk-7GH3YGSC.js";
10
-
11
- // ../../libs/schema-validation/parameterization.ts
12
- init_cjs_shims();
13
- var fillParams = (obj, params = {}, options = {
14
- allowMissing: false,
15
- allowMissingInChildren: true
16
- }) => {
17
- if (typeof obj === "string") {
18
- const tokens = obj.split(/(\{\{[^{}]+?\}\})/g);
19
- const missingParams = /* @__PURE__ */ new Set();
20
- const result = tokens.map((token) => {
21
- const match = token.match(/\{\{([^{}]+?)\}\}/);
22
- if (match) {
23
- const param = match[1];
24
- const paramValue = params[param];
25
- if (paramValue === void 0 || paramValue === null) {
26
- missingParams.add(param);
27
- return token;
28
- }
29
- return paramValue;
30
- }
31
- return token;
32
- }).join("");
33
- if (!options.allowMissing) {
34
- assert_default(!missingParams.size, BadRequestError, {
35
- message: `Failed to fill all parameters: ${obj} -> ${result}`,
36
- code: codes.parameterization_failed
37
- });
38
- }
39
- return result;
40
- }
41
- if (typeof obj === "object" && obj !== null) {
42
- if (Array.isArray(obj)) {
43
- return obj.map((value) => fillParams(value, params, options));
44
- }
45
- return Object.fromEntries(
46
- Object.entries(obj).map(([key, value]) => [
47
- key,
48
- fillParams(value, params, {
49
- ...options,
50
- allowMissing: key === "children" ? options.allowMissingInChildren : options.allowMissing
51
- })
52
- ])
53
- );
54
- }
55
- return obj;
56
- };
57
- function getSchemaObjectParametersInternal(obj, parameters, includeChildren) {
58
- if (typeof obj === "string") {
59
- getStringParametersInternal(obj, parameters);
60
- } else if (typeof obj === "object") {
61
- for (const key in obj) {
62
- if (key !== "templatePath" && (key !== "children" || includeChildren)) {
63
- getSchemaObjectParametersInternal(
64
- obj[key],
65
- parameters,
66
- includeChildren
67
- );
68
- }
69
- }
70
- }
71
- }
72
- function getSchemaObjectParameters(obj, includeChildren = false) {
73
- const params = /* @__PURE__ */ new Set();
74
- getSchemaObjectParametersInternal(obj, params, includeChildren);
75
- return Array.from(params);
76
- }
77
-
78
- // ../../libs/path-utils/path.ts
79
- init_cjs_shims();
80
- var getStructuralPath = (path) => {
81
- return path.split("/").map((part) => part.split(":")[0]).join("/");
82
- };
83
- var getInstanceValueByAccountPath = (path) => {
84
- const parts = path.split("/");
85
- const result = /* @__PURE__ */ new Map();
86
- let workingSet = "";
87
- for (let i = 0; i < parts.length; i++) {
88
- const part = parts[i];
89
- const [templateKey, templateValue] = part.split(":");
90
- workingSet = workingSet ? `${workingSet}/${templateKey}` : templateKey;
91
- result.set(workingSet, templateValue);
92
- if (templateValue) {
93
- workingSet = `${workingSet}:${templateValue}`;
94
- }
95
- }
96
- return result;
97
- };
98
- var getSubpaths = (path) => path.split("/").reduce((acc, part) => {
99
- const prev = acc[acc.length - 1];
100
- const subPath = prev ? `${prev}/${part}` : part;
101
- acc.push(subPath);
102
- return acc;
103
- }, []);
104
- var getStructuralSubpaths = (path) => getSubpaths(getStructuralPath(path));
105
-
106
- export {
107
- fillParams,
108
- getSchemaObjectParameters,
109
- getStructuralPath,
110
- getInstanceValueByAccountPath,
111
- getSubpaths,
112
- getStructuralSubpaths
113
- };