···1111 "github.com/urfave/cli/v3"
1212)
13131414-var cmdCheckDNS = &cli.Command{
1414+var cmdLexCheckDNS = &cli.Command{
1515 Name: "check-dns",
1616 Usage: "checks for any schemas missing DNS NSID resolution",
1717 Description: "Checks DNS resolution status for all local lexicons. If un-resolvable NSID groups are discovered, prints instructions on how to configure DNS resolution.\nOperates on entire ./lexicons/ directory unless specific files or directories are provided.",
···2929 Value: "did:web:lex.example.com",
3030 },
3131 },
3232- Action: runCheckDNS,
3232+ Action: runLexCheckDNS,
3333}
34343535/*
···3737- resolve and record any missing
3838- print DNS configuration instructions
3939*/
4040-func runCheckDNS(ctx context.Context, cmd *cli.Command) error {
4040+func runLexCheckDNS(ctx context.Context, cmd *cli.Command) error {
41414242 // collect all NSID/path mappings
4343 localSchemas, err := collectSchemaJSON(cmd)
+3-3
cmd/glot/lex_codegen.go
···1616 "golang.org/x/tools/imports"
1717)
18181919-var cmdCodegen = &cli.Command{
1919+var cmdLexCodegen = &cli.Command{
2020 Name: "codegen",
2121 Usage: "output Go code (types) for indicated lexicon schemas",
2222 Description: "Enumerates all local lexicons (JSON files), and outputs Go source file for each.\nOperates on entire ./lexicons/ directory unless specific files or directories are provided.",
···3939 Usage: "skip cleanup of go imports in writen output",
4040 },
4141 },
4242- Action: runCodegen,
4242+ Action: runLexCodegen,
4343}
44444545-func runCodegen(ctx context.Context, cmd *cli.Command) error {
4545+func runLexCodegen(ctx context.Context, cmd *cli.Command) error {
46464747 // enumerate lexicon JSON file paths
4848 filePaths, err := collectPaths(cmd)
···1616 "github.com/urfave/cli/v3"
1717)
18181919-var cmdPublish = &cli.Command{
1919+var cmdLexPublish = &cli.Command{
2020 Name: "publish",
2121 Usage: "upload any new or updated lexicons",
2222 Description: "Publishes any new or updated local lexicons to the network, by creating schema records under the authenticated account.\nPublication requires a working AT network account, and appropriate DNS configuration. By default will only publish lexicons with DNS configured for the current account. See 'check-dns' command for configuration help, and '--skip-dns-check' to override (note that this can clobber any existing records).\nChecks schema status against live network and will not re-publish identical schemas, or update schemas by default (use '--update' to skip this check).\nOperates on entire ./lexicons/ directory unless specific files or directories are provided.",
···4949 Usage: "update existing schema records",
5050 },
5151 },
5252- Action: runPublish,
5252+ Action: runLexPublish,
5353}
54545555/*
···6060- optionally filter schemas where group DNS is not current account (control w/ arg)
6161- publish remaining schemas
6262*/
6363-func runPublish(ctx context.Context, cmd *cli.Command) error {
6363+func runLexPublish(ctx context.Context, cmd *cli.Command) error {
64646565 user := cmd.String("username")
6666 pass := cmd.String("password")
+4-3
cmd/glot/lex_pull.go
···1919 "github.com/urfave/cli/v3"
2020)
21212222-var cmdPull = &cli.Command{
2222+var cmdLexPull = &cli.Command{
2323 Name: "pull",
2424 Usage: "fetch (or update) lexicon schemas to local directory",
2525 Description: "Resolves and downloads lexicons, and saves as JSON files in local directory.\nPatterns can be full NSIDs, or \"groups\" ending in '.' or '.*'. Does not recursively fetch sub-groups.\nUse 'status' command to check for missing or out-of-date lexicons which need fetching.",
···4343 Sources: cli.EnvVars("LEXICONS_DIR"),
4444 },
4545 },
4646- Action: runPull,
4646+ Action: runLexPull,
4747}
48484949-func runPull(ctx context.Context, cmd *cli.Command) error {
4949+func runLexPull(ctx context.Context, cmd *cli.Command) error {
5050 if !cmd.Args().Present() {
5151 cli.ShowSubcommandHelpAndExit(cmd, 1)
5252 }
···112112 if err == nil {
113113 err = sf.FinishParse()
114114 }
115115+ // NOTE: not calling CheckSchema()
115116 if err != nil {
116117 return fmt.Errorf("schema record syntax invalid (%s): %w", nsid, err)
117118 }
+3-3
cmd/glot/lex_status.go
···1212 "github.com/urfave/cli/v3"
1313)
14141515-var cmdStatus = &cli.Command{
1515+var cmdLexStatus = &cli.Command{
1616 Name: "status",
1717 Usage: "check if local lexicons are in-sync with live network",
1818 Description: "Enumerates all local lexicons (JSON files), and checks for changes against the live network\nWill detect new published lexicons under a known lexicon group, but will not discover new groups under the same domain prefix.\nOperates on entire ./lexicons/ directory unless specific files or directories are provided.",
···2525 Sources: cli.EnvVars("LEXICONS_DIR"),
2626 },
2727 },
2828- Action: runStatus,
2828+ Action: runLexStatus,
2929}
30303131-func runStatus(ctx context.Context, cmd *cli.Command) error {
3131+func runLexStatus(ctx context.Context, cmd *cli.Command) error {
3232 return runComparisons(ctx, cmd, compareStatus)
3333}
3434
+3-3
cmd/glot/lex_unpublish.go
···1313 "github.com/urfave/cli/v3"
1414)
15151616-var cmdUnpublish = &cli.Command{
1616+var cmdLexUnpublish = &cli.Command{
1717 Name: "unpublish",
1818 Usage: "delete lexicon schema records from current account",
1919 Description: "Deletes published schema records from current AT account repository.\nDoes not delete local schema JSON files.",
···3232 Sources: cli.EnvVars("GLOT_PASSWORD", "ATP_PASSWORD", "PASSWORD"),
3333 },
3434 },
3535- Action: runUnpublish,
3535+ Action: runLexUnpublish,
3636}
37373838-func runUnpublish(ctx context.Context, cmd *cli.Command) error {
3838+func runLexUnpublish(ctx context.Context, cmd *cli.Command) error {
39394040 if cmd.Args().Len() == 0 {
4141 cli.ShowSubcommandHelpAndExit(cmd, 1)