@fragment-dev/cli
Version:
50 lines (47 loc) • 1.06 kB
JavaScript
import {
AuthenticatedCommand
} from "./chunk-W7HG2VEH.js";
import {
require_lib
} from "./chunk-UD22EIAP.js";
import {
__toESM,
init_cjs_shims
} from "./chunk-7GH3YGSC.js";
// src/commands/query/schema.ts
init_cjs_shims();
var import_core = __toESM(require_lib(), 1);
var GetSchema = class extends AuthenticatedCommand {
static {
this.description = "Get schema from your workspace by key";
}
static {
this.examples = ["<%= config.bin %> <%= command.id %>"];
}
static {
this.flags = {
key: import_core.Flags.string({
char: "k",
description: "Key of schema (e.g. template-schema)",
required: true
}),
version: import_core.Flags.integer({
description: "Schema version to retrieve (e.g. 2). Defaults to latest available version.",
required: false
})
};
}
async run() {
try {
await this.sdk.GetSchema({
key: this.flags.key,
version: this.flags.version
});
} catch (e) {
this.exit(1);
}
}
};
export {
GetSchema
};