@fragment-dev/cli 2026.8.7-9 → 2026.8.10-1
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/{chunk-DDMROIMS.js → chunk-CNYYRZ6Y.js} +19 -7
- package/dist/{chunk-WXFIJ6IY.js → chunk-JWGNUUQM.js} +1 -1
- package/dist/{chunk-LJLE43VC.js → chunk-WYDUSTEX.js} +3 -1
- package/dist/commands/verify-schema.js +2 -2
- package/dist/commands.js +3 -3
- package/dist/index.js +3 -3
- package/dist/lib/sample-schema.jsonc +1 -1
- package/dist/utils/schemaValidation.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
extractSchemaMetadata,
|
|
3
3
|
isJsonParseError,
|
|
4
4
|
validateSchemaStructure
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WYDUSTEX.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_SCHEMA_PATH
|
|
8
8
|
} from "./chunk-A4BSWX5D.js";
|
|
@@ -76,7 +76,9 @@ var VerifySchema = class _VerifySchema extends FragmentCommand {
|
|
|
76
76
|
});
|
|
77
77
|
const [parsedSchema, parseError] = parseJSON(schemaString);
|
|
78
78
|
if (parseError) {
|
|
79
|
-
const error = new Error(
|
|
79
|
+
const error = new Error(
|
|
80
|
+
`Failed to parse ${flags.path}: ${parseError.message}`
|
|
81
|
+
);
|
|
80
82
|
error.isParseError = true;
|
|
81
83
|
throw error;
|
|
82
84
|
}
|
|
@@ -120,15 +122,23 @@ var VerifySchema = class _VerifySchema extends FragmentCommand {
|
|
|
120
122
|
this.log(` Schema key: ${emphasize(metadata.key)}`);
|
|
121
123
|
this.log(` Schema name: ${emphasize(metadata.name)}`);
|
|
122
124
|
this.log(` Accounts: ${emphasize(metadata.accountCount.toString())}`);
|
|
123
|
-
this.log(
|
|
125
|
+
this.log(
|
|
126
|
+
` Ledger entry types: ${emphasize(metadata.entryTypeCount.toString())}`
|
|
127
|
+
);
|
|
124
128
|
}
|
|
125
129
|
displaySuccessMessage(schema, verbose) {
|
|
126
130
|
this.log(`
|
|
127
131
|
${import_chalk.default.green("\u2705 Schema validation successful!")}`);
|
|
128
|
-
this.log(
|
|
132
|
+
this.log(
|
|
133
|
+
`Schema "${schema.key}" is valid and follows the Fragment JSON schema format.`
|
|
134
|
+
);
|
|
129
135
|
if (!verbose) {
|
|
130
|
-
this.log(
|
|
131
|
-
|
|
136
|
+
this.log(
|
|
137
|
+
`
|
|
138
|
+
Run with ${emphasize(
|
|
139
|
+
"--verbose"
|
|
140
|
+
)} flag to see detailed validation output.`
|
|
141
|
+
);
|
|
132
142
|
}
|
|
133
143
|
}
|
|
134
144
|
outputJsonResult(schema, schemaPath, success, error) {
|
|
@@ -167,7 +177,9 @@ ${import_chalk.default.red("\u274C Schema validation failed!")}`);
|
|
|
167
177
|
if (error.validationErrors) {
|
|
168
178
|
logValidationErrors(this, error.validationErrors);
|
|
169
179
|
} else {
|
|
170
|
-
this.logToStderr(
|
|
180
|
+
this.logToStderr(
|
|
181
|
+
import_chalk.default.red("Error:") + " " + (error.message || "Unknown validation error")
|
|
182
|
+
);
|
|
171
183
|
}
|
|
172
184
|
this.logToStderr(`
|
|
173
185
|
${import_chalk.default.gray("Schema file:")} ${schemaPath}`);
|
|
@@ -41,7 +41,9 @@ var countAccountsRecursively = (accounts) => {
|
|
|
41
41
|
return count;
|
|
42
42
|
};
|
|
43
43
|
var extractSchemaMetadata = (schema) => {
|
|
44
|
-
const accountCount = countAccountsRecursively(
|
|
44
|
+
const accountCount = countAccountsRecursively(
|
|
45
|
+
schema.chartOfAccounts?.accounts || []
|
|
46
|
+
);
|
|
45
47
|
const entryTypeCount = (schema.ledgerEntries?.types || []).length;
|
|
46
48
|
return {
|
|
47
49
|
key: schema.key,
|
package/dist/commands.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
COMMANDS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JWGNUUQM.js";
|
|
4
4
|
import "./chunk-JFF37Z5K.js";
|
|
5
5
|
import "./chunk-ILQG7D3T.js";
|
|
6
6
|
import "./chunk-4QAIVY4H.js";
|
|
@@ -10,8 +10,8 @@ import "./chunk-VPMGSMMO.js";
|
|
|
10
10
|
import "./chunk-REHGTHTG.js";
|
|
11
11
|
import "./chunk-7LZ2UEOL.js";
|
|
12
12
|
import "./chunk-IXX2EVIM.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-CNYYRZ6Y.js";
|
|
14
|
+
import "./chunk-WYDUSTEX.js";
|
|
15
15
|
import "./chunk-A4BSWX5D.js";
|
|
16
16
|
import "./chunk-HMZ4534F.js";
|
|
17
17
|
import "./chunk-JVSUOAA6.js";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
COMMANDS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JWGNUUQM.js";
|
|
4
4
|
import "./chunk-JFF37Z5K.js";
|
|
5
5
|
import "./chunk-ILQG7D3T.js";
|
|
6
6
|
import "./chunk-4QAIVY4H.js";
|
|
@@ -10,8 +10,8 @@ import "./chunk-VPMGSMMO.js";
|
|
|
10
10
|
import "./chunk-REHGTHTG.js";
|
|
11
11
|
import "./chunk-7LZ2UEOL.js";
|
|
12
12
|
import "./chunk-IXX2EVIM.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-CNYYRZ6Y.js";
|
|
14
|
+
import "./chunk-WYDUSTEX.js";
|
|
15
15
|
import "./chunk-A4BSWX5D.js";
|
|
16
16
|
import "./chunk-HMZ4534F.js";
|
|
17
17
|
import "./chunk-JVSUOAA6.js";
|
package/oclif.manifest.json
CHANGED