@burdenoff/cli-sdk 2026.1110.2 → 2026.1123.2
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-WTNQ5PEC.js → chunk-3ZVMC2AF.js} +1 -1
- package/dist/{chunk-6HSWVWQW.js → chunk-ASSY2L5R.js} +1 -1
- package/dist/chunk-ZT6KOG7N.js +34 -0
- package/dist/core/index.cjs +8 -8
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{module-CLaW1ycq.d.ts → module-BNVKV_pI.d.cts} +11 -1
- package/dist/{module-CLaW1ycq.d.cts → module-BNVKV_pI.d.ts} +11 -1
- package/dist/modules/adaptercloud/index.cjs +4 -4
- package/dist/modules/adaptercloud/index.d.cts +1 -1
- package/dist/modules/adaptercloud/index.d.ts +1 -1
- package/dist/modules/adaptercloud/index.js +1 -1
- package/dist/modules/artistrybase/index.cjs +3 -3
- package/dist/modules/artistrybase/index.d.cts +1 -1
- package/dist/modules/artistrybase/index.d.ts +1 -1
- package/dist/modules/artistrybase/index.js +1 -1
- package/dist/modules/assethandler/index.cjs +7 -7
- package/dist/modules/assethandler/index.d.cts +1 -1
- package/dist/modules/assethandler/index.d.ts +1 -1
- package/dist/modules/assethandler/index.js +1 -1
- package/dist/modules/atheletebridge/index.cjs +4 -4
- package/dist/modules/atheletebridge/index.d.cts +1 -1
- package/dist/modules/atheletebridge/index.d.ts +1 -1
- package/dist/modules/atheletebridge/index.js +1 -1
- package/dist/modules/auth/index.d.cts +1 -1
- package/dist/modules/auth/index.d.ts +1 -1
- package/dist/modules/auth/index.js +1 -1
- package/dist/modules/billing/index.cjs +8 -8
- package/dist/modules/billing/index.d.cts +1 -1
- package/dist/modules/billing/index.d.ts +1 -1
- package/dist/modules/billing/index.js +1 -1
- package/dist/modules/brainyrich/index.cjs +8 -8
- package/dist/modules/brainyrich/index.d.cts +1 -1
- package/dist/modules/brainyrich/index.d.ts +1 -1
- package/dist/modules/brainyrich/index.js +1 -1
- package/dist/modules/buildmyiq/index.d.cts +1 -1
- package/dist/modules/buildmyiq/index.d.ts +1 -1
- package/dist/modules/buildmyiq/index.js +1 -1
- package/dist/modules/channels/index.cjs +8 -8
- package/dist/modules/channels/index.d.cts +1 -1
- package/dist/modules/channels/index.d.ts +1 -1
- package/dist/modules/channels/index.js +1 -1
- package/dist/modules/collabkin/index.cjs +3 -3
- package/dist/modules/collabkin/index.d.cts +1 -1
- package/dist/modules/collabkin/index.d.ts +1 -1
- package/dist/modules/collabkin/index.js +1 -1
- package/dist/modules/comradecircle/index.cjs +10 -10
- package/dist/modules/comradecircle/index.d.cts +1 -1
- package/dist/modules/comradecircle/index.d.ts +1 -1
- package/dist/modules/comradecircle/index.js +1 -1
- package/dist/modules/conversations/index.cjs +4 -4
- package/dist/modules/conversations/index.d.cts +1 -1
- package/dist/modules/conversations/index.d.ts +1 -1
- package/dist/modules/conversations/index.js +1 -1
- package/dist/modules/coolandlovely/index.cjs +3 -3
- package/dist/modules/coolandlovely/index.d.cts +1 -1
- package/dist/modules/coolandlovely/index.d.ts +1 -1
- package/dist/modules/coolandlovely/index.js +1 -1
- package/dist/modules/cosmicintersection/index.cjs +4 -4
- package/dist/modules/cosmicintersection/index.d.cts +1 -1
- package/dist/modules/cosmicintersection/index.d.ts +1 -1
- package/dist/modules/cosmicintersection/index.js +1 -1
- package/dist/modules/crewfoundry/index.cjs +7 -7
- package/dist/modules/crewfoundry/index.d.cts +1 -1
- package/dist/modules/crewfoundry/index.d.ts +1 -1
- package/dist/modules/crewfoundry/index.js +1 -1
- package/dist/modules/devportal/index.cjs +6 -6
- package/dist/modules/devportal/index.d.cts +1 -1
- package/dist/modules/devportal/index.d.ts +1 -1
- package/dist/modules/devportal/index.js +1 -1
- package/dist/modules/ecoimpacthub/index.cjs +3 -3
- package/dist/modules/ecoimpacthub/index.d.cts +1 -1
- package/dist/modules/ecoimpacthub/index.d.ts +1 -1
- package/dist/modules/ecoimpacthub/index.js +1 -1
- package/dist/modules/eventfullymanaged/index.cjs +13 -13
- package/dist/modules/eventfullymanaged/index.d.cts +1 -1
- package/dist/modules/eventfullymanaged/index.d.ts +1 -1
- package/dist/modules/eventfullymanaged/index.js +1 -1
- package/dist/modules/export/index.cjs +5 -5
- package/dist/modules/export/index.d.cts +1 -1
- package/dist/modules/export/index.d.ts +1 -1
- package/dist/modules/export/index.js +1 -1
- package/dist/modules/files/index.cjs +7 -7
- package/dist/modules/files/index.d.cts +1 -1
- package/dist/modules/files/index.d.ts +1 -1
- package/dist/modules/files/index.js +1 -1
- package/dist/modules/fluidgrids/index.cjs +5 -5
- package/dist/modules/fluidgrids/index.d.cts +1 -1
- package/dist/modules/fluidgrids/index.d.ts +1 -1
- package/dist/modules/fluidgrids/index.js +1 -1
- package/dist/modules/ggnomad/index.cjs +6 -6
- package/dist/modules/ggnomad/index.d.cts +1 -1
- package/dist/modules/ggnomad/index.d.ts +1 -1
- package/dist/modules/ggnomad/index.js +1 -1
- package/dist/modules/govcitizenhub/index.cjs +6 -6
- package/dist/modules/govcitizenhub/index.d.cts +1 -1
- package/dist/modules/govcitizenhub/index.d.ts +1 -1
- package/dist/modules/govcitizenhub/index.js +1 -1
- package/dist/modules/groups/index.cjs +2 -2
- package/dist/modules/groups/index.d.cts +1 -1
- package/dist/modules/groups/index.d.ts +1 -1
- package/dist/modules/groups/index.js +1 -1
- package/dist/modules/headshotmarketing/index.d.cts +1 -1
- package/dist/modules/headshotmarketing/index.d.ts +1 -1
- package/dist/modules/headshotmarketing/index.js +1 -1
- package/dist/modules/health/index.d.cts +1 -1
- package/dist/modules/health/index.d.ts +1 -1
- package/dist/modules/hookmovies/index.cjs +4 -4
- package/dist/modules/hookmovies/index.d.cts +1 -1
- package/dist/modules/hookmovies/index.d.ts +1 -1
- package/dist/modules/hookmovies/index.js +1 -1
- package/dist/modules/housingvista/index.cjs +13 -13
- package/dist/modules/housingvista/index.d.cts +1 -1
- package/dist/modules/housingvista/index.d.ts +1 -1
- package/dist/modules/housingvista/index.js +1 -1
- package/dist/modules/integrations/index.cjs +7 -7
- package/dist/modules/integrations/index.d.cts +1 -1
- package/dist/modules/integrations/index.d.ts +1 -1
- package/dist/modules/integrations/index.js +1 -1
- package/dist/modules/intelwatchtower/index.cjs +6 -6
- package/dist/modules/intelwatchtower/index.d.cts +1 -1
- package/dist/modules/intelwatchtower/index.d.ts +1 -1
- package/dist/modules/intelwatchtower/index.js +1 -1
- package/dist/modules/kadaikodi/index.cjs +5 -5
- package/dist/modules/kadaikodi/index.d.cts +1 -1
- package/dist/modules/kadaikodi/index.d.ts +1 -1
- package/dist/modules/kadaikodi/index.js +1 -1
- package/dist/modules/labsofscience/index.cjs +6 -6
- package/dist/modules/labsofscience/index.d.cts +1 -1
- package/dist/modules/labsofscience/index.d.ts +1 -1
- package/dist/modules/labsofscience/index.js +1 -1
- package/dist/modules/manufacturedops/index.cjs +8 -8
- package/dist/modules/manufacturedops/index.d.cts +1 -1
- package/dist/modules/manufacturedops/index.d.ts +1 -1
- package/dist/modules/manufacturedops/index.js +1 -1
- package/dist/modules/movethewheels/index.cjs +18 -18
- package/dist/modules/movethewheels/index.d.cts +1 -1
- package/dist/modules/movethewheels/index.d.ts +1 -1
- package/dist/modules/movethewheels/index.js +1 -1
- package/dist/modules/mybodyshield/index.cjs +5 -5
- package/dist/modules/mybodyshield/index.d.cts +1 -1
- package/dist/modules/mybodyshield/index.d.ts +1 -1
- package/dist/modules/mybodyshield/index.js +1 -1
- package/dist/modules/notifications/index.cjs +4 -4
- package/dist/modules/notifications/index.d.cts +1 -1
- package/dist/modules/notifications/index.d.ts +1 -1
- package/dist/modules/notifications/index.js +1 -1
- package/dist/modules/organizations/index.cjs +2 -2
- package/dist/modules/organizations/index.d.cts +1 -1
- package/dist/modules/organizations/index.d.ts +1 -1
- package/dist/modules/organizations/index.js +1 -1
- package/dist/modules/planmagnet/index.cjs +17 -17
- package/dist/modules/planmagnet/index.d.cts +1 -1
- package/dist/modules/planmagnet/index.d.ts +1 -1
- package/dist/modules/planmagnet/index.js +1 -1
- package/dist/modules/products/index.cjs +8 -8
- package/dist/modules/products/index.d.cts +1 -1
- package/dist/modules/products/index.d.ts +1 -1
- package/dist/modules/products/index.js +1 -1
- package/dist/modules/proserviceworld/index.cjs +4 -4
- package/dist/modules/proserviceworld/index.d.cts +1 -1
- package/dist/modules/proserviceworld/index.d.ts +1 -1
- package/dist/modules/proserviceworld/index.js +1 -1
- package/dist/modules/rbac/index.cjs +5 -5
- package/dist/modules/rbac/index.d.cts +1 -1
- package/dist/modules/rbac/index.d.ts +1 -1
- package/dist/modules/rbac/index.js +1 -1
- package/dist/modules/sandbox/index.cjs +1 -1
- package/dist/modules/sandbox/index.d.cts +1 -1
- package/dist/modules/sandbox/index.d.ts +1 -1
- package/dist/modules/sandbox/index.js +1 -1
- package/dist/modules/scheduler/index.cjs +6 -6
- package/dist/modules/scheduler/index.d.cts +1 -1
- package/dist/modules/scheduler/index.d.ts +1 -1
- package/dist/modules/scheduler/index.js +1 -1
- package/dist/modules/security/index.cjs +7 -7
- package/dist/modules/security/index.d.cts +1 -1
- package/dist/modules/security/index.d.ts +1 -1
- package/dist/modules/security/index.js +1 -1
- package/dist/modules/semanticfed/index.cjs +7 -7
- package/dist/modules/semanticfed/index.d.cts +1 -1
- package/dist/modules/semanticfed/index.d.ts +1 -1
- package/dist/modules/semanticfed/index.js +1 -1
- package/dist/modules/semanticfed-sql/index.cjs +4 -4
- package/dist/modules/semanticfed-sql/index.d.cts +1 -1
- package/dist/modules/semanticfed-sql/index.d.ts +1 -1
- package/dist/modules/semanticfed-sql/index.js +1 -1
- package/dist/modules/store/index.cjs +7 -7
- package/dist/modules/store/index.d.cts +1 -1
- package/dist/modules/store/index.d.ts +1 -1
- package/dist/modules/store/index.js +1 -1
- package/dist/modules/subscriberbot/index.cjs +4 -4
- package/dist/modules/subscriberbot/index.d.cts +1 -1
- package/dist/modules/subscriberbot/index.d.ts +1 -1
- package/dist/modules/subscriberbot/index.js +1 -1
- package/dist/modules/support/index.cjs +2 -2
- package/dist/modules/support/index.d.cts +1 -1
- package/dist/modules/support/index.d.ts +1 -1
- package/dist/modules/support/index.js +1 -1
- package/dist/modules/tags/index.cjs +2 -2
- package/dist/modules/tags/index.d.cts +1 -1
- package/dist/modules/tags/index.d.ts +1 -1
- package/dist/modules/tags/index.js +1 -1
- package/dist/modules/technospam/index.cjs +10 -10
- package/dist/modules/technospam/index.d.cts +1 -1
- package/dist/modules/technospam/index.d.ts +1 -1
- package/dist/modules/technospam/index.js +1 -1
- package/dist/modules/theculturepost/index.cjs +8 -8
- package/dist/modules/theculturepost/index.d.cts +1 -1
- package/dist/modules/theculturepost/index.d.ts +1 -1
- package/dist/modules/theculturepost/index.js +1 -1
- package/dist/modules/theglobalfuel/index.cjs +4 -4
- package/dist/modules/theglobalfuel/index.d.cts +1 -1
- package/dist/modules/theglobalfuel/index.d.ts +1 -1
- package/dist/modules/theglobalfuel/index.js +1 -1
- package/dist/modules/timecampus/index.cjs +72 -61
- package/dist/modules/timecampus/index.d.cts +7 -3
- package/dist/modules/timecampus/index.d.ts +7 -3
- package/dist/modules/timecampus/index.js +72 -61
- package/dist/modules/tours/index.cjs +2 -2
- package/dist/modules/tours/index.d.cts +1 -1
- package/dist/modules/tours/index.d.ts +1 -1
- package/dist/modules/tours/index.js +1 -1
- package/dist/modules/vibecontrols/index.cjs +32 -32
- package/dist/modules/vibecontrols/index.d.cts +1 -1
- package/dist/modules/vibecontrols/index.d.ts +1 -1
- package/dist/modules/vibecontrols/index.js +1 -1
- package/dist/modules/workspaces/index.cjs +7 -7
- package/dist/modules/workspaces/index.d.cts +1 -1
- package/dist/modules/workspaces/index.d.ts +1 -1
- package/dist/modules/workspaces/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-MT2F54AC.js +0 -34
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var a=class extends Error{exitCode;hint;constructor(o,s){super(o),this.name="CliUserError",this.exitCode=s?.exitCode??1,this.hint=s?.hint;}},g=class extends a{constructor(o,s){super(o,{exitCode:2,hint:s?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var a=class extends Error{exitCode;hint;constructor(o,s){super(o),this.name="CliUserError",this.exitCode=s?.exitCode??1,this.hint=s?.hint;}},g=class extends a{constructor(o,s){super(o,{exitCode:2,hint:s?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},l=class extends Error{cause;constructor(o,s){super(o),this.name="CliInternalError",this.cause=s;}};var h=null;function T(r){h=r;}function f(){if(!h)throw new l("vibecontrols module helpers used before setHelpersContext was called");return h}function V(){let r=f();if(!r.auth.isAuthenticated())throw new g("Authentication required.",{hint:`Run \`${r.productName} auth login\` to authenticate.`})}async function c(r,o){return V(),f().gql.workspace.request(r,o)}function u(r){let o=r instanceof Error?r.message:String(r);throw new a(o)}function p(r,o,s){f().output.formatAndOutput(r,o,s);}function m(r){f().output.printSuccess(r);}function x(r,o){return f().output.truncate(r,o)}function C(){return f()}var b=`
|
|
2
2
|
query TagsList($filter: TagFilterInput, $pagination: TagsPaginationInput) {
|
|
3
3
|
getTags(filter: $filter, pagination: $pagination) {
|
|
4
4
|
items { id key label description scope displayOrder }
|
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
mutation DeleteTagRelation($id: ID!) {
|
|
52
52
|
deleteTagRelation(id: $id)
|
|
53
53
|
}
|
|
54
|
-
`;function w(){let r=C().auth.read();if(!r?.workspaceId)throw new a("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:r.workspaceId}}function D(r){let o=r.command("tags").description("Tag management");o.command("list").description("List tags in current workspace").option("--scope <s>","WORKSPACE|GLOBAL|VIBE").option("--search <q>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t={workspaceId:w().workspaceId};e.scope&&(t.scope=e.scope.toUpperCase()),e.search&&(t.search=e.search);let n=await c(b,{filter:t,pagination:{limit:e.limit,offset:0}});p(e,n.getTags.items,{headers:["ID","Key","Label","Scope","Order"],rows:n.getTags.items.map(
|
|
54
|
+
`;function w(){let r=C().auth.read();if(!r?.workspaceId)throw new a("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:r.workspaceId}}function D(r){let o=r.command("tags").description("Tag management");o.command("list").description("List tags in current workspace").option("--scope <s>","WORKSPACE|GLOBAL|VIBE").option("--search <q>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t={workspaceId:w().workspaceId};e.scope&&(t.scope=e.scope.toUpperCase()),e.search&&(t.search=e.search);let n=await c(b,{filter:t,pagination:{limit:e.limit,offset:0}});p(e,n.getTags.items,{headers:["ID","Key","Label","Scope","Order"],rows:n.getTags.items.map(d=>[x(d.id,12),d.key,d.label,d.scope??"-",String(d.displayOrder??"-")])});}catch(t){u(t);}}),o.command("get").description("Get a tag by id").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await c(E,{id:e});if(!n.getTag)throw new a(`Tag ${e} not found`);p(t,n.getTag);}catch(n){u(n);}}),o.command("create").description("Create a tag in the current workspace").requiredOption("--key <key>").requiredOption("--label <label>").requiredOption("--vocabulary <id>","Vocabulary id (required by schema)").option("--description <s>").option("--color <hex>").option("--icon <s>").option("--scope <s>","WORKSPACE|GLOBAL|VIBE","WORKSPACE").option("--parent <id>").option("-f, --format <format>").action(async e=>{try{let t={context:w(),key:e.key,label:e.label,vocabularyId:e.vocabulary,description:e.description,color:e.color,icon:e.icon,scope:(e.scope??"WORKSPACE").toUpperCase(),parentId:e.parent},n=await c(I,{input:t});m(`Tag created: ${n.createTag.label}`),p(e,n.createTag);}catch(t){u(t);}}),o.command("update").description("Update a tag").argument("<id>").option("--label <s>").option("--description <s>").option("--color <hex>").option("--icon <s>").option("--parent <id>").option("--display-order <n>","",e=>parseInt(e,10)).option("-f, --format <format>").action(async(e,t)=>{try{let n={context:w()};if(t.label&&(n.label=t.label),t.description!==void 0&&(n.description=t.description),t.color&&(n.color=t.color),t.icon&&(n.icon=t.icon),t.parent&&(n.parentId=t.parent),t.displayOrder!==void 0&&(n.displayOrder=t.displayOrder),Object.keys(n).length===1)throw new a("No updates specified");let d=await c(A,{id:e,input:n});m("Tag updated"),p(t,d.updateTag);}catch(n){u(n);}}),o.command("delete").description("Delete a tag").argument("<id>").action(async e=>{try{await c(v,{id:e}),m("Tag deleted");}catch(t){u(t);}}),o.command("analytics").description("Tag usage analytics").argument("<tagId>").requiredOption("--from <iso>","Start date").requiredOption("--to <iso>","End date").option("-f, --format <format>").action(async(e,t)=>{try{let n=await c(O,{tagId:e,startDate:t.from,endDate:t.to});p(t,n.getTagAnalytics);}catch(n){u(n);}});let s=o.command("permissions").description("Tag relations / permissions");s.command("list").description("List related tags").argument("<tagId>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await c(R,{tagId:e});p(t,n.getRelatedTags);}catch(n){u(n);}}),s.command("grant").description("Create a tag relation").requiredOption("--from <tagId>").requiredOption("--to <tagId>").requiredOption("--type <relation>","SYNONYM|ANTONYM|BROADER|NARROWER|RELATED|IMPLIES|EXCLUDES").option("--bidirectional","Mirror in both directions",false).option("-f, --format <format>").action(async e=>{try{let t={context:w(),fromTagId:e.from,toTagId:e.to,relationType:e.type.toUpperCase(),bidirectional:!!e.bidirectional},n=await c(S,{input:t});m("Tag relation created"),p(e,n.createTagRelation);}catch(t){u(t);}}),s.command("revoke").description("Delete a tag relation").argument("<relationId>").action(async e=>{try{await c(q,{id:e}),m("Tag relation deleted");}catch(t){u(t);}});}var z={id:"tags",version:"1.0.0",displayName:"Tags",dependsOn:["auth","workspaces"],register(r,o){T(o),D(r);}},ot=z;module.exports=ot;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b as b$1,i,r,h as h$1,k as k$1,u}from'../../chunk-
|
|
1
|
+
import {a,b as b$1,i,r,h as h$1,k as k$1,u}from'../../chunk-3ZVMC2AF.js';import {q}from'../../chunk-ZT6KOG7N.js';var I=`
|
|
2
2
|
query TagsList($filter: TagFilterInput, $pagination: TagsPaginationInput) {
|
|
3
3
|
getTags(filter: $filter, pagination: $pagination) {
|
|
4
4
|
items { id key label description scope displayOrder }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var l=class extends Error{exitCode;hint;constructor(r,t){super(r),this.name="CliUserError",this.exitCode=t?.exitCode??1,this.hint=t?.hint;}},
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var l=class extends Error{exitCode;hint;constructor(r,t){super(r),this.name="CliUserError",this.exitCode=t?.exitCode??1,this.hint=t?.hint;}},w=class extends l{constructor(r,t){super(r,{exitCode:2,hint:t?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},b=class extends Error{cause;constructor(r,t){super(r),this.name="CliInternalError",this.cause=t;}};var E=null;function A(o){E=o;}function C(){if(!E)throw new b("vibecontrols module helpers used before setHelpersContext was called");return E}function _t(){let o=C();if(!o.auth.isAuthenticated())throw new w("Authentication required.",{hint:`Run \`${o.productName} auth login\` to authenticate.`})}async function a(o,r){return _t(),C().gql.workspace.request(o,r)}async function T(o,r){return C().gql.workspaceAuthOnly.request(o,r)}function i(o){let r=o instanceof Error?o.message:String(o);throw new l(r)}function s(o,r,t){C().output.formatAndOutput(o,r,t);}function u(o){C().output.printSuccess(o);}function x(o){C().output.printWarning(o);}function y(o){return C().output.formatDate(o)}function d(o,r){return C().output.truncate(o,r)}var O=`
|
|
2
2
|
query TecCourse($id: ID!) {
|
|
3
3
|
tecCanonicalCourse(id: $id) {
|
|
4
4
|
id
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
id slug title status publishedAt updatedAt
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
`,
|
|
50
|
+
`,D=`
|
|
51
51
|
mutation TecArchiveCourse($id: ID!) {
|
|
52
52
|
tecArchiveCourse(id: $id)
|
|
53
53
|
}
|
|
54
|
-
`,
|
|
54
|
+
`,L=`
|
|
55
55
|
query TecListLessons($courseId: ID!, $pagination: PaginationInput) {
|
|
56
56
|
tecCanonicalLessons(courseId: $courseId, pagination: $pagination) {
|
|
57
57
|
items {
|
|
@@ -96,13 +96,13 @@
|
|
|
96
96
|
pageInfo { cursor hasMore }
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
`,
|
|
99
|
+
`,q=`
|
|
100
100
|
mutation TecEnroll($input: TecEnrollInput!) {
|
|
101
101
|
tecEnroll(input: $input) {
|
|
102
102
|
id courseId learnerId status progressPct lessonsCompleted startedAt createdAt
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
`,
|
|
105
|
+
`,_=`
|
|
106
106
|
mutation TecUpdateProgress($input: TecUpdateProgressInput!) {
|
|
107
107
|
tecUpdateProgress(input: $input) {
|
|
108
108
|
id courseId learnerId status progressPct lessonsCompleted
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
id userId headline status updatedAt
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
`,
|
|
149
|
+
`,W=`
|
|
150
150
|
query TecListSessions($mentorId: ID, $menteeId: ID, $status: TecSessionStatus) {
|
|
151
151
|
tecListSessions(mentorId: $mentorId, menteeId: $menteeId, status: $status) {
|
|
152
152
|
items {
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
pageInfo { cursor hasMore }
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
`,
|
|
159
|
+
`,z=`
|
|
160
160
|
mutation TecBookSession($input: TecBookSessionInput!) {
|
|
161
161
|
tecBookSession(input: $input) {
|
|
162
162
|
id mentorId menteeId topic agenda status scheduledAt durationMinutes createdAt
|
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
id slug title status publishedAt updatedAt
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
`,
|
|
296
|
+
`,pt=`
|
|
297
297
|
query TecListSubmissions(
|
|
298
298
|
$problemId: ID
|
|
299
299
|
$learnerId: ID
|
|
@@ -307,7 +307,7 @@
|
|
|
307
307
|
pageInfo { cursor hasMore }
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
-
`,
|
|
310
|
+
`,dt=`
|
|
311
311
|
mutation TecSubmitSolution($input: TecSubmitSolutionInput!) {
|
|
312
312
|
tecSubmitSolution(input: $input) {
|
|
313
313
|
id problemId learnerId language verdict pointsAwarded runtimeMs createdAt
|
|
@@ -349,4 +349,4 @@
|
|
|
349
349
|
query TecHealth {
|
|
350
350
|
tecHealth
|
|
351
351
|
}
|
|
352
|
-
`;function c(o){let r=Number.parseInt(o,10);if(Number.isNaN(r))throw new l(`Expected an integer but got "${o}"`);return r}function g(o){return o.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function h(o,r){let t=[];for(let e of o){let n=e[r];n&&t.push({...n,canonicalId:e.id});}return t}function I(o){o.hasMore&&o.cursor&&x(`More results available: rerun with --cursor ${o.cursor}`);}function Ct(o){let r=o.command("courses").description("Technospam courses");r.command("list").description("List courses").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|EXPERT").option("--status <s>","DRAFT|PUBLISHED|ARCHIVED").option("--limit <n>","Page size",c,50).option("--cursor <id>","Start after this course (pageInfo.cursor of the previous page)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(R,{level:t.level?t.level.toUpperCase():void 0,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,...t.cursor?{cursor:t.cursor}:{}}}),n=h(e.tecCanonicalCourses.items,"technospamCourse");s(t,n,{headers:["ID","Title","Level","Status","Minutes"],rows:n.map(d=>[p(d.id,12),d.title,d.level,d.status,String(d.estimatedMinutes??0)])}),I(e.tecCanonicalCourses.pageInfo);}catch(e){i(e);}}),r.command("get").description("Get a course by id").argument("<id>","Course ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(O,{id:t}),[d]=h(n.tecCanonicalCourse?[n.tecCanonicalCourse]:[],"technospamCourse");if(!d)throw new l(`Course ${t} not found`);s(e,d);}catch(n){i(n);}}),r.command("create").description("Create a course").requiredOption("--title <t>","Course title").requiredOption("--slug <slug>","URL slug").option("--topic <t>","Topic").option("--summary <s>","Summary").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|EXPERT","BEGINNER").option("--estimated-minutes <n>","Estimated minutes",c).option("--instructor-id <id>","Instructor user ID").option("--cover-file-id <id>","Cover image File ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title,slug:t.slug,level:(t.level??"BEGINNER").toUpperCase()};t.topic&&(e.topic=t.topic),t.summary&&(e.summary=t.summary),t.estimatedMinutes!==void 0&&(e.estimatedMinutes=t.estimatedMinutes),t.instructorId&&(e.instructorId=t.instructorId),t.coverFileId&&(e.coverFileId=t.coverFileId),t.tags&&(e.tags=g(t.tags));let n=await a(v,{input:e});u(`Course created: ${n.tecCreateCourse.title}`),s(t,n.tecCreateCourse);}catch(e){i(e);}}),r.command("update").description("Update a course").argument("<id>","Course ID").option("--title <t>","Course title").option("--topic <t>","Topic").option("--summary <s>","Summary").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|EXPERT").option("--estimated-minutes <n>","Estimated minutes",c).option("--instructor-id <id>","Instructor user ID").option("--cover-file-id <id>","Cover image File ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.title&&(n.title=e.title),e.topic!==void 0&&(n.topic=e.topic),e.summary!==void 0&&(n.summary=e.summary),e.level&&(n.level=e.level.toUpperCase()),e.estimatedMinutes!==void 0&&(n.estimatedMinutes=e.estimatedMinutes),e.instructorId&&(n.instructorId=e.instructorId),e.coverFileId&&(n.coverFileId=e.coverFileId),e.tags&&(n.tags=g(e.tags)),!Object.keys(n).length)throw new l("No updates specified");let d=await a(P,{id:t,input:n});u("Course updated"),s(e,d.tecUpdateCourse);}catch(n){i(n);}}),r.command("publish").description("Publish a course (DRAFT -> PUBLISHED)").argument("<id>","Course ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a($,{id:t});u(`Course published: ${n.tecPublishCourse.title}`),s(e,n.tecPublishCourse);}catch(n){i(n);}}),r.command("archive").description("Archive a course").argument("<id>","Course ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(L,{id:t});u(n.tecArchiveCourse?"Course archived":"Course not archived"),s(e,{archived:n.tecArchiveCourse});}catch(n){i(n);}});}function It(o){let r=o.command("lessons").description("Technospam course lessons");r.command("list").description("List lessons for a course").requiredOption("--course <id>","Course ID").option("--limit <n>","Page size",c,100).option("--cursor <id>","Start after this lesson (pageInfo.cursor of the previous page)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(D,{courseId:t.course,pagination:{limit:t.limit,...t.cursor?{cursor:t.cursor}:{}}}),n=h(e.tecCanonicalLessons.items,"technospamLesson");s(t,n,{headers:["ID","Title","Kind","Position","Minutes","Preview"],rows:n.map(d=>[p(d.id,12),d.title,d.kind,String(d.position),String(d.estimatedMinutes??0),d.isPreview?"yes":"no"])}),I(e.tecCanonicalLessons.pageInfo);}catch(e){i(e);}}),r.command("create").description("Create a lesson").requiredOption("--course <id>","Course ID").requiredOption("--title <t>","Lesson title").option("--kind <k>","ARTICLE|VIDEO|QUIZ|INTERACTIVE|PROJECT","ARTICLE").option("--content <s>","Lesson content").option("--position <n>","Order position",c).option("--estimated-minutes <n>","Estimated minutes",c).option("--file-id <id>","Attachment / video File ID").option("--preview","Mark as a free preview lesson").option("-f, --format <format>","Output format").action(async t=>{try{let e={courseId:t.course,title:t.title,kind:(t.kind??"ARTICLE").toUpperCase()};t.content&&(e.content=t.content),t.position!==void 0&&(e.position=t.position),t.estimatedMinutes!==void 0&&(e.estimatedMinutes=t.estimatedMinutes),t.fileId&&(e.fileId=t.fileId),t.preview&&(e.isPreview=!0);let n=await a(M,{input:e});u(`Lesson created: ${n.tecCreateLesson.title}`),s(t,n.tecCreateLesson);}catch(e){i(e);}}),r.command("update").description("Update a lesson").argument("<id>","Lesson ID").option("--title <t>","Lesson title").option("--kind <k>","ARTICLE|VIDEO|QUIZ|INTERACTIVE|PROJECT").option("--content <s>","Lesson content").option("--position <n>","Order position",c).option("--estimated-minutes <n>","Estimated minutes",c).option("--file-id <id>","Attachment / video File ID").option("--preview <bool>","true|false",t=>t==="true").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.title&&(n.title=e.title),e.kind&&(n.kind=e.kind.toUpperCase()),e.content!==void 0&&(n.content=e.content),e.position!==void 0&&(n.position=e.position),e.estimatedMinutes!==void 0&&(n.estimatedMinutes=e.estimatedMinutes),e.fileId&&(n.fileId=e.fileId),e.preview!==void 0&&(n.isPreview=e.preview),!Object.keys(n).length)throw new l("No updates specified");let d=await a(N,{id:t,input:n});u("Lesson updated"),s(e,d.tecUpdateLesson);}catch(n){i(n);}});}function bt(o){let r=o.command("enrollments").description("Technospam course enrollments");r.command("list").description("List enrollments").option("--course <id>","Filter by course ID").option("--learner <id>","Filter by learner ID").option("--limit <n>","Page size",c,50).option("--cursor <id>","Start after this enrollment (pageInfo.cursor of the previous page)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(U,{courseId:t.course,learnerId:t.learner,pagination:{limit:t.limit,...t.cursor?{cursor:t.cursor}:{}}}),n=h(e.tecCanonicalEnrollments.items,"technospamEnrollment");s(t,n,{headers:["ID","Course","Learner","Status","Progress %","Lessons"],rows:n.map(d=>[p(d.id,12),p(d.courseId,12),p(d.learnerId,12),d.status,String(d.progressPct),String(d.lessonsCompleted)])}),I(e.tecCanonicalEnrollments.pageInfo);}catch(e){i(e);}}),r.command("enroll").description("Enroll the calling user in a course").requiredOption("--course <id>","Course ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(_,{input:{courseId:t.course}});u(`Enrolled in course ${e.tecEnroll.courseId}`),s(t,e.tecEnroll);}catch(e){i(e);}}),r.command("update-progress").description("Update a learner's enrollment progress (auto-completes at 100%)").requiredOption("--enrollment <id>","Enrollment ID").requiredOption("--progress-pct <n>","Progress percent (0-100)",c).option("--lessons-completed <n>","Lessons completed count",c).option("-f, --format <format>","Output format").action(async t=>{try{let e={enrollmentId:t.enrollment,progressPct:t.progressPct};t.lessonsCompleted!==void 0&&(e.lessonsCompleted=t.lessonsCompleted);let n=await a(q,{input:e});u(`Progress updated to ${n.tecUpdateProgress.progressPct}%`),s(t,n.tecUpdateProgress);}catch(e){i(e);}});}function yt(o){let r=o.command("mentors").description("Technospam mentors");r.command("list").description("List mentors").option("--status <s>","PENDING|ACTIVE|PAUSED|INACTIVE").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(G,{status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});s(t,e.tecListMentors.items,{headers:["ID","Headline","Status","Rate","Rating","Accepting"],rows:e.tecListMentors.items.map(n=>[p(n.id,12),p(n.headline,30),n.status,String(n.hourlyRate??0),String(n.ratingAvg??0),n.isAcceptingMentees?"yes":"no"])});}catch(e){i(e);}}),r.command("get").description("Get a mentor by id").argument("<id>","Mentor ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(H,{id:t});if(!n.tecMentor)throw new l(`Mentor ${t} not found`);s(e,n.tecMentor);}catch(n){i(n);}}),r.command("become").description("Create the calling user's mentor profile").requiredOption("--headline <h>","Mentor headline").option("--bio <s>","Bio").option("--expertise <csv>","Comma-separated areas of expertise").option("--hourly-rate <n>","Hourly rate",c).option("--currency <c>","Currency code").option("-f, --format <format>","Output format").action(async t=>{try{let e={headline:t.headline};t.bio&&(e.bio=t.bio),t.expertise&&(e.expertise=g(t.expertise)),t.hourlyRate!==void 0&&(e.hourlyRate=t.hourlyRate),t.currency&&(e.currency=t.currency);let n=await a(F,{input:e});u(`Mentor profile created: ${n.tecBecomeMentor.headline}`),s(t,n.tecBecomeMentor);}catch(e){i(e);}}),r.command("update").description("Update a mentor profile").argument("<id>","Mentor ID").option("--headline <h>","Mentor headline").option("--bio <s>","Bio").option("--expertise <csv>","Comma-separated areas of expertise").option("--hourly-rate <n>","Hourly rate",c).option("--currency <c>","Currency code").option("--accepting <bool>","true|false (accepting mentees)",t=>t==="true").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.headline&&(n.headline=e.headline),e.bio!==void 0&&(n.bio=e.bio),e.expertise&&(n.expertise=g(e.expertise)),e.hourlyRate!==void 0&&(n.hourlyRate=e.hourlyRate),e.currency&&(n.currency=e.currency),e.accepting!==void 0&&(n.isAcceptingMentees=e.accepting),!Object.keys(n).length)throw new l("No updates specified");let d=await a(j,{id:t,input:n});u("Mentor updated"),s(e,d.tecUpdateMentor);}catch(n){i(n);}}),r.command("approve").description("Approve a pending mentor profile (PENDING -> ACTIVE)").argument("<id>","Mentor ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(B,{id:t});u(`Mentor approved: ${n.tecApproveMentor.status}`),s(e,n.tecApproveMentor);}catch(n){i(n);}});}function wt(o){let r=o.command("sessions").description("Technospam mentorship sessions");r.command("list").description("List mentorship sessions").option("--mentor <id>","Filter by mentor ID").option("--mentee <id>","Filter by mentee ID").option("--status <s>","REQUESTED|CONFIRMED|COMPLETED|CANCELLED|NO_SHOW").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(z,{mentorId:t.mentor,menteeId:t.mentee,status:t.status?t.status.toUpperCase():void 0});s(t,e.tecListSessions.items,{headers:["ID","Mentor","Mentee","Topic","Status","Scheduled"],rows:e.tecListSessions.items.map(n=>[p(n.id,12),p(n.mentorId,12),p(n.menteeId,12),p(n.topic,24),n.status,w(n.scheduledAt)])});}catch(e){i(e);}}),r.command("book").description("Book a 1:1 session with a mentor as the calling mentee").requiredOption("--mentor <id>","Mentor ID").requiredOption("--topic <t>","Session topic").requiredOption("--scheduled-at <iso>","Scheduled time (ISO date)").option("--agenda <s>","Agenda").option("--duration-minutes <n>","Duration (minutes)",c).option("-f, --format <format>","Output format").action(async t=>{try{let e={mentorId:t.mentor,topic:t.topic,scheduledAt:t.scheduledAt};t.agenda&&(e.agenda=t.agenda),t.durationMinutes!==void 0&&(e.durationMinutes=t.durationMinutes);let n=await a(W,{input:e});u(`Session booked: ${n.tecBookSession.topic}`),s(t,n.tecBookSession);}catch(e){i(e);}}),r.command("confirm").description("Confirm a requested session").argument("<id>","Session ID").option("--meeting-url <url>","Meeting URL").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(V,{id:t,meetingUrl:e.meetingUrl});u("Session confirmed"),s(e,n.tecConfirmSession);}catch(n){i(n);}}),r.command("cancel").description("Cancel a session").argument("<id>","Session ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(K,{id:t});u("Session cancelled"),s(e,n.tecCancelSession);}catch(n){i(n);}}),r.command("complete").description("Complete a session with optional rating and feedback").argument("<id>","Session ID").option("--rating <n>","Rating (1-5)",c).option("--feedback <s>","Feedback").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(J,{id:t,rating:e.rating,feedback:e.feedback});u("Session completed"),s(e,n.tecCompleteSession);}catch(n){i(n);}});}function Et(o){let r=o.command("hackathons").description("Technospam hackathons");r.command("list").description("List hackathons").option("--status <s>","DRAFT|REGISTRATION_OPEN|IN_PROGRESS|JUDGING|COMPLETED|CANCELLED").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(Q,{status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});s(t,e.tecListHackathons.items,{headers:["ID","Title","Status","Start","Prize"],rows:e.tecListHackathons.items.map(n=>[p(n.id,12),n.title,n.status,w(n.startAt),String(n.prizePool??0)])});}catch(e){i(e);}}),r.command("get").description("Get a hackathon by id").argument("<id>","Hackathon ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(Y,{id:t});if(!n.tecHackathon)throw new l(`Hackathon ${t} not found`);s(e,n.tecHackathon);}catch(n){i(n);}}),r.command("create").description("Create a hackathon").requiredOption("--title <t>","Hackathon title").requiredOption("--slug <slug>","URL slug").requiredOption("--start-at <iso>","Start time (ISO date)").requiredOption("--end-at <iso>","End time (ISO date)").option("--theme <t>","Theme").option("--description <s>","Description").option("--submission-deadline <iso>","Submission deadline (ISO date)").option("--max-team-size <n>","Max team size",c).option("--prize-pool <n>","Prize pool",c).option("--currency <c>","Currency code").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title,slug:t.slug,startAt:t.startAt,endAt:t.endAt};t.theme&&(e.theme=t.theme),t.description&&(e.description=t.description),t.submissionDeadline&&(e.submissionDeadline=t.submissionDeadline),t.maxTeamSize!==void 0&&(e.maxTeamSize=t.maxTeamSize),t.prizePool!==void 0&&(e.prizePool=t.prizePool),t.currency&&(e.currency=t.currency),t.tags&&(e.tags=g(t.tags));let n=await a(X,{input:e});u(`Hackathon created: ${n.tecCreateHackathon.title}`),s(t,n.tecCreateHackathon);}catch(e){i(e);}}),r.command("update").description("Update a hackathon").argument("<id>","Hackathon ID").option("--title <t>","Hackathon title").option("--theme <t>","Theme").option("--description <s>","Description").option("--start-at <iso>","Start time (ISO date)").option("--end-at <iso>","End time (ISO date)").option("--submission-deadline <iso>","Submission deadline (ISO date)").option("--max-team-size <n>","Max team size",c).option("--prize-pool <n>","Prize pool",c).option("--currency <c>","Currency code").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.title&&(n.title=e.title),e.theme!==void 0&&(n.theme=e.theme),e.description!==void 0&&(n.description=e.description),e.startAt&&(n.startAt=e.startAt),e.endAt&&(n.endAt=e.endAt),e.submissionDeadline&&(n.submissionDeadline=e.submissionDeadline),e.maxTeamSize!==void 0&&(n.maxTeamSize=e.maxTeamSize),e.prizePool!==void 0&&(n.prizePool=e.prizePool),e.currency&&(n.currency=e.currency),e.tags&&(n.tags=g(e.tags)),!Object.keys(n).length)throw new l("No updates specified");let d=await a(Z,{id:t,input:n});u("Hackathon updated"),s(e,d.tecUpdateHackathon);}catch(n){i(n);}}),r.command("open-registration").description("Open registration for a hackathon (DRAFT -> REGISTRATION_OPEN)").argument("<id>","Hackathon ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(tt,{id:t});u(`Registration open: ${n.tecOpenRegistration.status}`),s(e,n.tecOpenRegistration);}catch(n){i(n);}});}function Tt(o){let r=o.command("teams").description("Technospam hackathon teams");r.command("list").description("List teams for a hackathon").requiredOption("--hackathon <id>","Hackathon ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(et,{hackathonId:t.hackathon});s(t,e.tecListTeams.items,{headers:["ID","Name","Captain","Status","Score"],rows:e.tecListTeams.items.map(n=>[p(n.id,12),n.name,p(n.captainId,12),n.status,String(n.score??0)])});}catch(e){i(e);}}),r.command("register").description("Register a team for a hackathon with the calling user as captain").requiredOption("--hackathon <id>","Hackathon ID").requiredOption("--name <name>","Team name").option("--members <csv>","Comma-separated member user IDs").option("-f, --format <format>","Output format").action(async t=>{try{let e={hackathonId:t.hackathon,name:t.name};t.members&&(e.memberIds=g(t.members));let n=await a(nt,{input:e});u(`Team registered: ${n.tecRegisterTeam.name}`),s(t,n.tecRegisterTeam);}catch(e){i(e);}}),r.command("submit-project").description("Submit a team's project for judging").requiredOption("--team <id>","Team ID").requiredOption("--project-name <n>","Project name").option("--project-url <url>","Project URL").option("--repo-url <url>","Repository URL").option("--pitch <s>","Pitch").option("-f, --format <format>","Output format").action(async t=>{try{let e={teamId:t.team,projectName:t.projectName};t.projectUrl&&(e.projectUrl=t.projectUrl),t.repoUrl&&(e.repoUrl=t.repoUrl),t.pitch&&(e.pitch=t.pitch);let n=await a(rt,{input:e});u(`Project submitted: ${n.tecSubmitProject.status}`),s(t,n.tecSubmitProject);}catch(e){i(e);}}),r.command("score").description("Record a judge score for a team and optionally mark it WINNER").argument("<id>","Team ID").requiredOption("--score <n>","Score",c).option("--winner","Mark the team as winner").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(ot,{id:t,score:e.score,winner:e.winner??void 0});u(`Team scored: ${n.tecScoreTeam.score}`),s(e,n.tecScoreTeam);}catch(n){i(n);}});}function kt(o){let r=o.command("problems").description("Technospam practice problems");r.command("list").description("List problems").option("--difficulty <d>","EASY|MEDIUM|HARD").option("--status <s>","DRAFT|PUBLISHED|ARCHIVED").option("--topic <t>","Filter by topic").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(st,{difficulty:t.difficulty?t.difficulty.toUpperCase():void 0,status:t.status?t.status.toUpperCase():void 0,topic:t.topic,pagination:{limit:t.limit,offset:t.offset}});s(t,e.tecListProblems.items,{headers:["ID","Title","Difficulty","Status","Points"],rows:e.tecListProblems.items.map(n=>[p(n.id,12),n.title,n.difficulty,n.status,String(n.points??0)])});}catch(e){i(e);}}),r.command("get").description("Get a problem by id").argument("<id>","Problem ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(it,{id:t});if(!n.tecProblem)throw new l(`Problem ${t} not found`);s(e,n.tecProblem);}catch(n){i(n);}}),r.command("create").description("Create a problem").requiredOption("--title <t>","Problem title").requiredOption("--slug <slug>","URL slug").option("--topic <t>","Topic").option("--statement <s>","Problem statement").option("--difficulty <d>","EASY|MEDIUM|HARD","EASY").option("--points <n>","Points",c).option("--languages <csv>","Comma-separated allowed languages").option("--starter-code <s>","Starter code").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title,slug:t.slug,difficulty:(t.difficulty??"EASY").toUpperCase()};t.topic&&(e.topic=t.topic),t.statement&&(e.statement=t.statement),t.points!==void 0&&(e.points=t.points),t.languages&&(e.languages=g(t.languages)),t.starterCode&&(e.starterCode=t.starterCode),t.tags&&(e.tags=g(t.tags));let n=await a(at,{input:e});u(`Problem created: ${n.tecCreateProblem.title}`),s(t,n.tecCreateProblem);}catch(e){i(e);}}),r.command("update").description("Update a problem").argument("<id>","Problem ID").option("--title <t>","Problem title").option("--topic <t>","Topic").option("--statement <s>","Problem statement").option("--difficulty <d>","EASY|MEDIUM|HARD").option("--points <n>","Points",c).option("--languages <csv>","Comma-separated allowed languages").option("--starter-code <s>","Starter code").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.title&&(n.title=e.title),e.topic!==void 0&&(n.topic=e.topic),e.statement!==void 0&&(n.statement=e.statement),e.difficulty&&(n.difficulty=e.difficulty.toUpperCase()),e.points!==void 0&&(n.points=e.points),e.languages&&(n.languages=g(e.languages)),e.starterCode!==void 0&&(n.starterCode=e.starterCode),e.tags&&(n.tags=g(e.tags)),!Object.keys(n).length)throw new l("No updates specified");let d=await a(ct,{id:t,input:n});u("Problem updated"),s(e,d.tecUpdateProblem);}catch(n){i(n);}}),r.command("publish").description("Publish a problem (DRAFT -> PUBLISHED)").argument("<id>","Problem ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(ut,{id:t});u(`Problem published: ${n.tecPublishProblem.title}`),s(e,n.tecPublishProblem);}catch(n){i(n);}});}function St(o){let r=o.command("submissions").description("Technospam problem submissions");r.command("list").description("List submissions").option("--problem <id>","Filter by problem ID").option("--learner <id>","Filter by learner ID").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(dt,{problemId:t.problem,learnerId:t.learner,pagination:{limit:t.limit,offset:t.offset}});s(t,e.tecListSubmissions.items,{headers:["ID","Problem","Learner","Language","Verdict","Points"],rows:e.tecListSubmissions.items.map(n=>[p(n.id,12),p(n.problemId,12),p(n.learnerId,12),n.language,n.verdict,String(n.pointsAwarded??0)])});}catch(e){i(e);}}),r.command("submit").description("Submit a solution to a problem").requiredOption("--problem <id>","Problem ID").requiredOption("--language <l>","Language").requiredOption("--code <c>","Solution code").option("-f, --format <format>","Output format").action(async t=>{try{let e={problemId:t.problem,language:t.language,code:t.code},n=await a(pt,{input:e});u(`Solution submitted: ${n.tecSubmitSolution.verdict}`),s(t,n.tecSubmitSolution);}catch(e){i(e);}}),r.command("grade").description("Record the grader verdict for a submission").argument("<id>","Submission ID").requiredOption("--verdict <v>","PENDING|ACCEPTED|WRONG_ANSWER|TIME_LIMIT_EXCEEDED|RUNTIME_ERROR|COMPILE_ERROR").option("--runtime-ms <n>","Runtime in milliseconds",c).option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(mt,{id:t,verdict:e.verdict.toUpperCase(),runtimeMs:e.runtimeMs});u(`Submission graded: ${n.tecGradeSubmission.verdict}`),s(e,n.tecGradeSubmission);}catch(n){i(n);}});}function At(o){let r=o.command("certificates").description("Technospam completion certificates");r.command("list").description("List certificates").option("--course <id>","Filter by course ID").option("--learner <id>","Filter by learner ID").option("--limit <n>","Page size",c,50).option("--cursor <id>","Start after this certificate (pageInfo.cursor of the previous page)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(lt,{courseId:t.course,learnerId:t.learner,pagination:{limit:t.limit,...t.cursor?{cursor:t.cursor}:{}}}),n=h(e.tecCanonicalCertificates.items,"technospamCertificate");s(t,n,{headers:["ID","Serial","Course","Learner","Score","Status"],rows:n.map(d=>[p(d.id,12),d.serial,p(d.courseId,12),p(d.learnerId,12),String(d.score),d.status])}),I(e.tecCanonicalCertificates.pageInfo);}catch(e){i(e);}}),r.command("issue").description("Issue a verifiable completion certificate for a learner on a course").requiredOption("--course <id>","Course ID").requiredOption("--learner <id>","Learner ID").requiredOption("--score <n>","Score",c).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(gt,{courseId:t.course,learnerId:t.learner,score:t.score});u(`Certificate issued: ${e.tecIssueCertificate.serial}`),s(t,e.tecIssueCertificate);}catch(e){i(e);}}),r.command("revoke").description("Revoke a certificate").argument("<id>","Certificate ID").option("--reason <s>","Revocation reason").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(ft,{id:t,reason:e.reason});u(`Certificate revoked: ${n.tecRevokeCertificate.status}`),s(e,n.tecRevokeCertificate);}catch(n){i(n);}});}function xt(o){o.command("health").description("Technospam service health check (public)").option("-f, --format <format>","Output format").action(async r=>{try{let t=await T(ht);u(t.tecHealth),s(r,{health:t.tecHealth});}catch(t){i(t);}});}var Ht={id:"technospam",version:"1.0.0",displayName:"Technospam",dependsOn:["auth","workspaces"],register(o,r){A(r);let t=o.command("technospam").description("Technospam developer-education platform");Ct(t),It(t),bt(t),yt(t),wt(t),Et(t),Tt(t),kt(t),St(t),At(t),xt(t);}},jn=Ht;module.exports=jn;
|
|
352
|
+
`;function c(o){let r=Number.parseInt(o,10);if(Number.isNaN(r))throw new l(`Expected an integer but got "${o}"`);return r}function g(o){return o.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function h(o,r){let t=[];for(let e of o){let n=e[r];n&&t.push({...n,canonicalId:e.id});}return t}function I(o){o.hasMore&&o.cursor&&x(`More results available: rerun with --cursor ${o.cursor}`);}function Ct(o){let r=o.command("courses").description("Technospam courses");r.command("list").description("List courses").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|EXPERT").option("--status <s>","DRAFT|PUBLISHED|ARCHIVED").option("--limit <n>","Page size",c,50).option("--cursor <id>","Start after this course (pageInfo.cursor of the previous page)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(R,{level:t.level?t.level.toUpperCase():void 0,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,...t.cursor?{cursor:t.cursor}:{}}}),n=h(e.tecCanonicalCourses.items,"technospamCourse");s(t,n,{headers:["ID","Title","Level","Status","Minutes"],rows:n.map(p=>[d(p.id,12),p.title,p.level,p.status,String(p.estimatedMinutes??0)])}),I(e.tecCanonicalCourses.pageInfo);}catch(e){i(e);}}),r.command("get").description("Get a course by id").argument("<id>","Course ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(O,{id:t}),[p]=h(n.tecCanonicalCourse?[n.tecCanonicalCourse]:[],"technospamCourse");if(!p)throw new l(`Course ${t} not found`);s(e,p);}catch(n){i(n);}}),r.command("create").description("Create a course").requiredOption("--title <t>","Course title").requiredOption("--slug <slug>","URL slug").option("--topic <t>","Topic").option("--summary <s>","Summary").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|EXPERT","BEGINNER").option("--estimated-minutes <n>","Estimated minutes",c).option("--instructor-id <id>","Instructor user ID").option("--cover-file-id <id>","Cover image File ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title,slug:t.slug,level:(t.level??"BEGINNER").toUpperCase()};t.topic&&(e.topic=t.topic),t.summary&&(e.summary=t.summary),t.estimatedMinutes!==void 0&&(e.estimatedMinutes=t.estimatedMinutes),t.instructorId&&(e.instructorId=t.instructorId),t.coverFileId&&(e.coverFileId=t.coverFileId),t.tags&&(e.tags=g(t.tags));let n=await a(v,{input:e});u(`Course created: ${n.tecCreateCourse.title}`),s(t,n.tecCreateCourse);}catch(e){i(e);}}),r.command("update").description("Update a course").argument("<id>","Course ID").option("--title <t>","Course title").option("--topic <t>","Topic").option("--summary <s>","Summary").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|EXPERT").option("--estimated-minutes <n>","Estimated minutes",c).option("--instructor-id <id>","Instructor user ID").option("--cover-file-id <id>","Cover image File ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.title&&(n.title=e.title),e.topic!==void 0&&(n.topic=e.topic),e.summary!==void 0&&(n.summary=e.summary),e.level&&(n.level=e.level.toUpperCase()),e.estimatedMinutes!==void 0&&(n.estimatedMinutes=e.estimatedMinutes),e.instructorId&&(n.instructorId=e.instructorId),e.coverFileId&&(n.coverFileId=e.coverFileId),e.tags&&(n.tags=g(e.tags)),!Object.keys(n).length)throw new l("No updates specified");let p=await a(P,{id:t,input:n});u("Course updated"),s(e,p.tecUpdateCourse);}catch(n){i(n);}}),r.command("publish").description("Publish a course (DRAFT -> PUBLISHED)").argument("<id>","Course ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a($,{id:t});u(`Course published: ${n.tecPublishCourse.title}`),s(e,n.tecPublishCourse);}catch(n){i(n);}}),r.command("archive").description("Archive a course").argument("<id>","Course ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(D,{id:t});u(n.tecArchiveCourse?"Course archived":"Course not archived"),s(e,{archived:n.tecArchiveCourse});}catch(n){i(n);}});}function It(o){let r=o.command("lessons").description("Technospam course lessons");r.command("list").description("List lessons for a course").requiredOption("--course <id>","Course ID").option("--limit <n>","Page size",c,100).option("--cursor <id>","Start after this lesson (pageInfo.cursor of the previous page)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(L,{courseId:t.course,pagination:{limit:t.limit,...t.cursor?{cursor:t.cursor}:{}}}),n=h(e.tecCanonicalLessons.items,"technospamLesson");s(t,n,{headers:["ID","Title","Kind","Position","Minutes","Preview"],rows:n.map(p=>[d(p.id,12),p.title,p.kind,String(p.position),String(p.estimatedMinutes??0),p.isPreview?"yes":"no"])}),I(e.tecCanonicalLessons.pageInfo);}catch(e){i(e);}}),r.command("create").description("Create a lesson").requiredOption("--course <id>","Course ID").requiredOption("--title <t>","Lesson title").option("--kind <k>","ARTICLE|VIDEO|QUIZ|INTERACTIVE|PROJECT","ARTICLE").option("--content <s>","Lesson content").option("--position <n>","Order position",c).option("--estimated-minutes <n>","Estimated minutes",c).option("--file-id <id>","Attachment / video File ID").option("--preview","Mark as a free preview lesson").option("-f, --format <format>","Output format").action(async t=>{try{let e={courseId:t.course,title:t.title,kind:(t.kind??"ARTICLE").toUpperCase()};t.content&&(e.content=t.content),t.position!==void 0&&(e.position=t.position),t.estimatedMinutes!==void 0&&(e.estimatedMinutes=t.estimatedMinutes),t.fileId&&(e.fileId=t.fileId),t.preview&&(e.isPreview=!0);let n=await a(M,{input:e});u(`Lesson created: ${n.tecCreateLesson.title}`),s(t,n.tecCreateLesson);}catch(e){i(e);}}),r.command("update").description("Update a lesson").argument("<id>","Lesson ID").option("--title <t>","Lesson title").option("--kind <k>","ARTICLE|VIDEO|QUIZ|INTERACTIVE|PROJECT").option("--content <s>","Lesson content").option("--position <n>","Order position",c).option("--estimated-minutes <n>","Estimated minutes",c).option("--file-id <id>","Attachment / video File ID").option("--preview <bool>","true|false",t=>t==="true").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.title&&(n.title=e.title),e.kind&&(n.kind=e.kind.toUpperCase()),e.content!==void 0&&(n.content=e.content),e.position!==void 0&&(n.position=e.position),e.estimatedMinutes!==void 0&&(n.estimatedMinutes=e.estimatedMinutes),e.fileId&&(n.fileId=e.fileId),e.preview!==void 0&&(n.isPreview=e.preview),!Object.keys(n).length)throw new l("No updates specified");let p=await a(N,{id:t,input:n});u("Lesson updated"),s(e,p.tecUpdateLesson);}catch(n){i(n);}});}function bt(o){let r=o.command("enrollments").description("Technospam course enrollments");r.command("list").description("List enrollments").option("--course <id>","Filter by course ID").option("--learner <id>","Filter by learner ID").option("--limit <n>","Page size",c,50).option("--cursor <id>","Start after this enrollment (pageInfo.cursor of the previous page)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(U,{courseId:t.course,learnerId:t.learner,pagination:{limit:t.limit,...t.cursor?{cursor:t.cursor}:{}}}),n=h(e.tecCanonicalEnrollments.items,"technospamEnrollment");s(t,n,{headers:["ID","Course","Learner","Status","Progress %","Lessons"],rows:n.map(p=>[d(p.id,12),d(p.courseId,12),d(p.learnerId,12),p.status,String(p.progressPct),String(p.lessonsCompleted)])}),I(e.tecCanonicalEnrollments.pageInfo);}catch(e){i(e);}}),r.command("enroll").description("Enroll the calling user in a course").requiredOption("--course <id>","Course ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(q,{input:{courseId:t.course}});u(`Enrolled in course ${e.tecEnroll.courseId}`),s(t,e.tecEnroll);}catch(e){i(e);}}),r.command("update-progress").description("Update a learner's enrollment progress (auto-completes at 100%)").requiredOption("--enrollment <id>","Enrollment ID").requiredOption("--progress-pct <n>","Progress percent (0-100)",c).option("--lessons-completed <n>","Lessons completed count",c).option("-f, --format <format>","Output format").action(async t=>{try{let e={enrollmentId:t.enrollment,progressPct:t.progressPct};t.lessonsCompleted!==void 0&&(e.lessonsCompleted=t.lessonsCompleted);let n=await a(_,{input:e});u(`Progress updated to ${n.tecUpdateProgress.progressPct}%`),s(t,n.tecUpdateProgress);}catch(e){i(e);}});}function wt(o){let r=o.command("mentors").description("Technospam mentors");r.command("list").description("List mentors").option("--status <s>","PENDING|ACTIVE|PAUSED|INACTIVE").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(G,{status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});s(t,e.tecListMentors.items,{headers:["ID","Headline","Status","Rate","Rating","Accepting"],rows:e.tecListMentors.items.map(n=>[d(n.id,12),d(n.headline,30),n.status,String(n.hourlyRate??0),String(n.ratingAvg??0),n.isAcceptingMentees?"yes":"no"])});}catch(e){i(e);}}),r.command("get").description("Get a mentor by id").argument("<id>","Mentor ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(H,{id:t});if(!n.tecMentor)throw new l(`Mentor ${t} not found`);s(e,n.tecMentor);}catch(n){i(n);}}),r.command("become").description("Create the calling user's mentor profile").requiredOption("--headline <h>","Mentor headline").option("--bio <s>","Bio").option("--expertise <csv>","Comma-separated areas of expertise").option("--hourly-rate <n>","Hourly rate",c).option("--currency <c>","Currency code").option("-f, --format <format>","Output format").action(async t=>{try{let e={headline:t.headline};t.bio&&(e.bio=t.bio),t.expertise&&(e.expertise=g(t.expertise)),t.hourlyRate!==void 0&&(e.hourlyRate=t.hourlyRate),t.currency&&(e.currency=t.currency);let n=await a(F,{input:e});u(`Mentor profile created: ${n.tecBecomeMentor.headline}`),s(t,n.tecBecomeMentor);}catch(e){i(e);}}),r.command("update").description("Update a mentor profile").argument("<id>","Mentor ID").option("--headline <h>","Mentor headline").option("--bio <s>","Bio").option("--expertise <csv>","Comma-separated areas of expertise").option("--hourly-rate <n>","Hourly rate",c).option("--currency <c>","Currency code").option("--accepting <bool>","true|false (accepting mentees)",t=>t==="true").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.headline&&(n.headline=e.headline),e.bio!==void 0&&(n.bio=e.bio),e.expertise&&(n.expertise=g(e.expertise)),e.hourlyRate!==void 0&&(n.hourlyRate=e.hourlyRate),e.currency&&(n.currency=e.currency),e.accepting!==void 0&&(n.isAcceptingMentees=e.accepting),!Object.keys(n).length)throw new l("No updates specified");let p=await a(j,{id:t,input:n});u("Mentor updated"),s(e,p.tecUpdateMentor);}catch(n){i(n);}}),r.command("approve").description("Approve a pending mentor profile (PENDING -> ACTIVE)").argument("<id>","Mentor ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(B,{id:t});u(`Mentor approved: ${n.tecApproveMentor.status}`),s(e,n.tecApproveMentor);}catch(n){i(n);}});}function yt(o){let r=o.command("sessions").description("Technospam mentorship sessions");r.command("list").description("List mentorship sessions").option("--mentor <id>","Filter by mentor ID").option("--mentee <id>","Filter by mentee ID").option("--status <s>","REQUESTED|CONFIRMED|COMPLETED|CANCELLED|NO_SHOW").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(W,{mentorId:t.mentor,menteeId:t.mentee,status:t.status?t.status.toUpperCase():void 0});s(t,e.tecListSessions.items,{headers:["ID","Mentor","Mentee","Topic","Status","Scheduled"],rows:e.tecListSessions.items.map(n=>[d(n.id,12),d(n.mentorId,12),d(n.menteeId,12),d(n.topic,24),n.status,y(n.scheduledAt)])});}catch(e){i(e);}}),r.command("book").description("Book a 1:1 session with a mentor as the calling mentee").requiredOption("--mentor <id>","Mentor ID").requiredOption("--topic <t>","Session topic").requiredOption("--scheduled-at <iso>","Scheduled time (ISO date)").option("--agenda <s>","Agenda").option("--duration-minutes <n>","Duration (minutes)",c).option("-f, --format <format>","Output format").action(async t=>{try{let e={mentorId:t.mentor,topic:t.topic,scheduledAt:t.scheduledAt};t.agenda&&(e.agenda=t.agenda),t.durationMinutes!==void 0&&(e.durationMinutes=t.durationMinutes);let n=await a(z,{input:e});u(`Session booked: ${n.tecBookSession.topic}`),s(t,n.tecBookSession);}catch(e){i(e);}}),r.command("confirm").description("Confirm a requested session").argument("<id>","Session ID").option("--meeting-url <url>","Meeting URL").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(V,{id:t,meetingUrl:e.meetingUrl});u("Session confirmed"),s(e,n.tecConfirmSession);}catch(n){i(n);}}),r.command("cancel").description("Cancel a session").argument("<id>","Session ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(K,{id:t});u("Session cancelled"),s(e,n.tecCancelSession);}catch(n){i(n);}}),r.command("complete").description("Complete a session with optional rating and feedback").argument("<id>","Session ID").option("--rating <n>","Rating (1-5)",c).option("--feedback <s>","Feedback").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(J,{id:t,rating:e.rating,feedback:e.feedback});u("Session completed"),s(e,n.tecCompleteSession);}catch(n){i(n);}});}function Et(o){let r=o.command("hackathons").description("Technospam hackathons");r.command("list").description("List hackathons").option("--status <s>","DRAFT|REGISTRATION_OPEN|IN_PROGRESS|JUDGING|COMPLETED|CANCELLED").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(Q,{status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});s(t,e.tecListHackathons.items,{headers:["ID","Title","Status","Start","Prize"],rows:e.tecListHackathons.items.map(n=>[d(n.id,12),n.title,n.status,y(n.startAt),String(n.prizePool??0)])});}catch(e){i(e);}}),r.command("get").description("Get a hackathon by id").argument("<id>","Hackathon ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(Y,{id:t});if(!n.tecHackathon)throw new l(`Hackathon ${t} not found`);s(e,n.tecHackathon);}catch(n){i(n);}}),r.command("create").description("Create a hackathon").requiredOption("--title <t>","Hackathon title").requiredOption("--slug <slug>","URL slug").requiredOption("--start-at <iso>","Start time (ISO date)").requiredOption("--end-at <iso>","End time (ISO date)").option("--theme <t>","Theme").option("--description <s>","Description").option("--submission-deadline <iso>","Submission deadline (ISO date)").option("--max-team-size <n>","Max team size",c).option("--prize-pool <n>","Prize pool",c).option("--currency <c>","Currency code").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title,slug:t.slug,startAt:t.startAt,endAt:t.endAt};t.theme&&(e.theme=t.theme),t.description&&(e.description=t.description),t.submissionDeadline&&(e.submissionDeadline=t.submissionDeadline),t.maxTeamSize!==void 0&&(e.maxTeamSize=t.maxTeamSize),t.prizePool!==void 0&&(e.prizePool=t.prizePool),t.currency&&(e.currency=t.currency),t.tags&&(e.tags=g(t.tags));let n=await a(X,{input:e});u(`Hackathon created: ${n.tecCreateHackathon.title}`),s(t,n.tecCreateHackathon);}catch(e){i(e);}}),r.command("update").description("Update a hackathon").argument("<id>","Hackathon ID").option("--title <t>","Hackathon title").option("--theme <t>","Theme").option("--description <s>","Description").option("--start-at <iso>","Start time (ISO date)").option("--end-at <iso>","End time (ISO date)").option("--submission-deadline <iso>","Submission deadline (ISO date)").option("--max-team-size <n>","Max team size",c).option("--prize-pool <n>","Prize pool",c).option("--currency <c>","Currency code").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.title&&(n.title=e.title),e.theme!==void 0&&(n.theme=e.theme),e.description!==void 0&&(n.description=e.description),e.startAt&&(n.startAt=e.startAt),e.endAt&&(n.endAt=e.endAt),e.submissionDeadline&&(n.submissionDeadline=e.submissionDeadline),e.maxTeamSize!==void 0&&(n.maxTeamSize=e.maxTeamSize),e.prizePool!==void 0&&(n.prizePool=e.prizePool),e.currency&&(n.currency=e.currency),e.tags&&(n.tags=g(e.tags)),!Object.keys(n).length)throw new l("No updates specified");let p=await a(Z,{id:t,input:n});u("Hackathon updated"),s(e,p.tecUpdateHackathon);}catch(n){i(n);}}),r.command("open-registration").description("Open registration for a hackathon (DRAFT -> REGISTRATION_OPEN)").argument("<id>","Hackathon ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(tt,{id:t});u(`Registration open: ${n.tecOpenRegistration.status}`),s(e,n.tecOpenRegistration);}catch(n){i(n);}});}function Tt(o){let r=o.command("teams").description("Technospam hackathon teams");r.command("list").description("List teams for a hackathon").requiredOption("--hackathon <id>","Hackathon ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(et,{hackathonId:t.hackathon});s(t,e.tecListTeams.items,{headers:["ID","Name","Captain","Status","Score"],rows:e.tecListTeams.items.map(n=>[d(n.id,12),n.name,d(n.captainId,12),n.status,String(n.score??0)])});}catch(e){i(e);}}),r.command("register").description("Register a team for a hackathon with the calling user as captain").requiredOption("--hackathon <id>","Hackathon ID").requiredOption("--name <name>","Team name").option("--members <csv>","Comma-separated member user IDs").option("-f, --format <format>","Output format").action(async t=>{try{let e={hackathonId:t.hackathon,name:t.name};t.members&&(e.memberIds=g(t.members));let n=await a(nt,{input:e});u(`Team registered: ${n.tecRegisterTeam.name}`),s(t,n.tecRegisterTeam);}catch(e){i(e);}}),r.command("submit-project").description("Submit a team's project for judging").requiredOption("--team <id>","Team ID").requiredOption("--project-name <n>","Project name").option("--project-url <url>","Project URL").option("--repo-url <url>","Repository URL").option("--pitch <s>","Pitch").option("-f, --format <format>","Output format").action(async t=>{try{let e={teamId:t.team,projectName:t.projectName};t.projectUrl&&(e.projectUrl=t.projectUrl),t.repoUrl&&(e.repoUrl=t.repoUrl),t.pitch&&(e.pitch=t.pitch);let n=await a(rt,{input:e});u(`Project submitted: ${n.tecSubmitProject.status}`),s(t,n.tecSubmitProject);}catch(e){i(e);}}),r.command("score").description("Record a judge score for a team and optionally mark it WINNER").argument("<id>","Team ID").requiredOption("--score <n>","Score",c).option("--winner","Mark the team as winner").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(ot,{id:t,score:e.score,winner:e.winner??void 0});u(`Team scored: ${n.tecScoreTeam.score}`),s(e,n.tecScoreTeam);}catch(n){i(n);}});}function kt(o){let r=o.command("problems").description("Technospam practice problems");r.command("list").description("List problems").option("--difficulty <d>","EASY|MEDIUM|HARD").option("--status <s>","DRAFT|PUBLISHED|ARCHIVED").option("--topic <t>","Filter by topic").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(st,{difficulty:t.difficulty?t.difficulty.toUpperCase():void 0,status:t.status?t.status.toUpperCase():void 0,topic:t.topic,pagination:{limit:t.limit,offset:t.offset}});s(t,e.tecListProblems.items,{headers:["ID","Title","Difficulty","Status","Points"],rows:e.tecListProblems.items.map(n=>[d(n.id,12),n.title,n.difficulty,n.status,String(n.points??0)])});}catch(e){i(e);}}),r.command("get").description("Get a problem by id").argument("<id>","Problem ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(it,{id:t});if(!n.tecProblem)throw new l(`Problem ${t} not found`);s(e,n.tecProblem);}catch(n){i(n);}}),r.command("create").description("Create a problem").requiredOption("--title <t>","Problem title").requiredOption("--slug <slug>","URL slug").option("--topic <t>","Topic").option("--statement <s>","Problem statement").option("--difficulty <d>","EASY|MEDIUM|HARD","EASY").option("--points <n>","Points",c).option("--languages <csv>","Comma-separated allowed languages").option("--starter-code <s>","Starter code").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title,slug:t.slug,difficulty:(t.difficulty??"EASY").toUpperCase()};t.topic&&(e.topic=t.topic),t.statement&&(e.statement=t.statement),t.points!==void 0&&(e.points=t.points),t.languages&&(e.languages=g(t.languages)),t.starterCode&&(e.starterCode=t.starterCode),t.tags&&(e.tags=g(t.tags));let n=await a(at,{input:e});u(`Problem created: ${n.tecCreateProblem.title}`),s(t,n.tecCreateProblem);}catch(e){i(e);}}),r.command("update").description("Update a problem").argument("<id>","Problem ID").option("--title <t>","Problem title").option("--topic <t>","Topic").option("--statement <s>","Problem statement").option("--difficulty <d>","EASY|MEDIUM|HARD").option("--points <n>","Points",c).option("--languages <csv>","Comma-separated allowed languages").option("--starter-code <s>","Starter code").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.title&&(n.title=e.title),e.topic!==void 0&&(n.topic=e.topic),e.statement!==void 0&&(n.statement=e.statement),e.difficulty&&(n.difficulty=e.difficulty.toUpperCase()),e.points!==void 0&&(n.points=e.points),e.languages&&(n.languages=g(e.languages)),e.starterCode!==void 0&&(n.starterCode=e.starterCode),e.tags&&(n.tags=g(e.tags)),!Object.keys(n).length)throw new l("No updates specified");let p=await a(ct,{id:t,input:n});u("Problem updated"),s(e,p.tecUpdateProblem);}catch(n){i(n);}}),r.command("publish").description("Publish a problem (DRAFT -> PUBLISHED)").argument("<id>","Problem ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(ut,{id:t});u(`Problem published: ${n.tecPublishProblem.title}`),s(e,n.tecPublishProblem);}catch(n){i(n);}});}function St(o){let r=o.command("submissions").description("Technospam problem submissions");r.command("list").description("List submissions").option("--problem <id>","Filter by problem ID").option("--learner <id>","Filter by learner ID").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(pt,{problemId:t.problem,learnerId:t.learner,pagination:{limit:t.limit,offset:t.offset}});s(t,e.tecListSubmissions.items,{headers:["ID","Problem","Learner","Language","Verdict","Points"],rows:e.tecListSubmissions.items.map(n=>[d(n.id,12),d(n.problemId,12),d(n.learnerId,12),n.language,n.verdict,String(n.pointsAwarded??0)])});}catch(e){i(e);}}),r.command("submit").description("Submit a solution to a problem").requiredOption("--problem <id>","Problem ID").requiredOption("--language <l>","Language").requiredOption("--code <c>","Solution code").option("-f, --format <format>","Output format").action(async t=>{try{let e={problemId:t.problem,language:t.language,code:t.code},n=await a(dt,{input:e});u(`Solution submitted: ${n.tecSubmitSolution.verdict}`),s(t,n.tecSubmitSolution);}catch(e){i(e);}}),r.command("grade").description("Record the grader verdict for a submission").argument("<id>","Submission ID").requiredOption("--verdict <v>","PENDING|ACCEPTED|WRONG_ANSWER|TIME_LIMIT_EXCEEDED|RUNTIME_ERROR|COMPILE_ERROR").option("--runtime-ms <n>","Runtime in milliseconds",c).option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(mt,{id:t,verdict:e.verdict.toUpperCase(),runtimeMs:e.runtimeMs});u(`Submission graded: ${n.tecGradeSubmission.verdict}`),s(e,n.tecGradeSubmission);}catch(n){i(n);}});}function At(o){let r=o.command("certificates").description("Technospam completion certificates");r.command("list").description("List certificates").option("--course <id>","Filter by course ID").option("--learner <id>","Filter by learner ID").option("--limit <n>","Page size",c,50).option("--cursor <id>","Start after this certificate (pageInfo.cursor of the previous page)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(lt,{courseId:t.course,learnerId:t.learner,pagination:{limit:t.limit,...t.cursor?{cursor:t.cursor}:{}}}),n=h(e.tecCanonicalCertificates.items,"technospamCertificate");s(t,n,{headers:["ID","Serial","Course","Learner","Score","Status"],rows:n.map(p=>[d(p.id,12),p.serial,d(p.courseId,12),d(p.learnerId,12),String(p.score),p.status])}),I(e.tecCanonicalCertificates.pageInfo);}catch(e){i(e);}}),r.command("issue").description("Issue a verifiable completion certificate for a learner on a course").requiredOption("--course <id>","Course ID").requiredOption("--learner <id>","Learner ID").requiredOption("--score <n>","Score",c).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(gt,{courseId:t.course,learnerId:t.learner,score:t.score});u(`Certificate issued: ${e.tecIssueCertificate.serial}`),s(t,e.tecIssueCertificate);}catch(e){i(e);}}),r.command("revoke").description("Revoke a certificate").argument("<id>","Certificate ID").option("--reason <s>","Revocation reason").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(ft,{id:t,reason:e.reason});u(`Certificate revoked: ${n.tecRevokeCertificate.status}`),s(e,n.tecRevokeCertificate);}catch(n){i(n);}});}function xt(o){o.command("health").description("Technospam service health check (public)").option("-f, --format <format>","Output format").action(async r=>{try{let t=await T(ht);u(t.tecHealth),s(r,{health:t.tecHealth});}catch(t){i(t);}});}var Ht={id:"technospam",version:"1.0.0",displayName:"Technospam",dependsOn:["auth","workspaces"],register(o,r){A(r);let t=o.command("technospam").description("Technospam developer-education platform");Ct(t),It(t),bt(t),wt(t),yt(t),Et(t),Tt(t),kt(t),St(t),At(t),xt(t);}},jn=Ht;module.exports=jn;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$1,b,i,r,h as h$1,k as k$1,q as q$2,d,n}from'../../chunk-
|
|
1
|
+
import {a as a$1,b,i,r,h as h$1,k as k$1,q as q$2,d,n}from'../../chunk-3ZVMC2AF.js';import {q as q$1}from'../../chunk-ZT6KOG7N.js';var A=`
|
|
2
2
|
query TecCourse($id: ID!) {
|
|
3
3
|
tecCanonicalCourse(id: $id) {
|
|
4
4
|
id
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var p=class extends Error{exitCode;hint;constructor(r,t){super(r),this.name="CliUserError",this.exitCode=t?.exitCode??1,this.hint=t?.hint;}},y=class extends p{constructor(r,t){super(r,{exitCode:2,hint:t?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},f=class extends Error{cause;constructor(r,t){super(r),this.name="CliInternalError",this.cause=t;}};var h=null;function
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var p=class extends Error{exitCode;hint;constructor(r,t){super(r),this.name="CliUserError",this.exitCode=t?.exitCode??1,this.hint=t?.hint;}},y=class extends p{constructor(r,t){super(r,{exitCode:2,hint:t?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},f=class extends Error{cause;constructor(r,t){super(r),this.name="CliInternalError",this.cause=t;}};var h=null;function v(o){h=o;}function C(){if(!h)throw new f("vibecontrols module helpers used before setHelpersContext was called");return h}function At(){let o=C();if(!o.auth.isAuthenticated())throw new y("Authentication required.",{hint:`Run \`${o.productName} auth login\` to authenticate.`})}async function a(o,r){return At(),C().gql.workspace.request(o,r)}async function w(o,r){return C().gql.workspaceAuthOnly.request(o,r)}function i(o){let r=o instanceof Error?o.message:String(o);throw new p(r)}function s(o,r,t){C().output.formatAndOutput(o,r,t);}function c(o){C().output.printSuccess(o);}function T(o){return C().output.formatDate(o)}function d(o,r){return C().output.truncate(o,r)}var E=`
|
|
2
2
|
query TcpGetStory($id: ID!) {
|
|
3
3
|
tcpStory(id: $id) {
|
|
4
4
|
id authorId editorId title slug summary body format status topicId
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
readingMins updatedAt
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
`,
|
|
32
|
+
`,R=`
|
|
33
33
|
mutation TcpTransitionStory($id: ID!, $status: TcpStoryStatus!) {
|
|
34
34
|
tcpTransitionStory(id: $id, status: $status) {
|
|
35
35
|
id title slug status publishedAt updatedAt
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
`,
|
|
38
|
+
`,b=`
|
|
39
39
|
query TcpGetTopic($id: ID!) {
|
|
40
40
|
tcpTopic(id: $id) {
|
|
41
41
|
id name slug description category tradition isFeatured createdAt
|
|
@@ -78,14 +78,14 @@
|
|
|
78
78
|
pageInfo { cursor hasMore }
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
`,
|
|
81
|
+
`,q=`
|
|
82
82
|
mutation TcpAddCitation($input: TcpCreateCitationInput!) {
|
|
83
83
|
tcpAddCitation(input: $input) {
|
|
84
84
|
id storyId title author publisher publishedOn sourceType url excerpt
|
|
85
85
|
provenance verification createdAt
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
`,
|
|
88
|
+
`,N=`
|
|
89
89
|
mutation TcpVerifyCitation($id: ID!, $verification: TcpVerificationStatus!) {
|
|
90
90
|
tcpVerifyCitation(id: $id, verification: $verification) {
|
|
91
91
|
id storyId title verification updatedAt
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
mutation TcpArchiveArchiveItem($id: ID!) {
|
|
137
137
|
tcpArchiveArchiveItem(id: $id)
|
|
138
138
|
}
|
|
139
|
-
`,
|
|
139
|
+
`,W=`
|
|
140
140
|
query TcpGetCollection($id: ID!) {
|
|
141
141
|
tcpCollection(id: $id) {
|
|
142
142
|
id name slug description tradition itemCount createdAt updatedAt
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
cover { id }
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
`,
|
|
147
|
+
`,V=`
|
|
148
148
|
query TcpListCollections($pagination: PaginationInput) {
|
|
149
149
|
tcpListCollections(pagination: $pagination) {
|
|
150
150
|
items { id name slug description tradition itemCount createdAt updatedAt workspaceId }
|
|
@@ -230,4 +230,4 @@
|
|
|
230
230
|
query TcpHealth {
|
|
231
231
|
tcpHealth
|
|
232
232
|
}
|
|
233
|
-
`;function l(o){let r=Number.parseInt(o,10);if(Number.isNaN(r))throw new p(`Expected an integer but got "${o}"`);return r}function g(o){return o.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function nt(o){let r=o.command("stories").description("TheCulturePost editorial stories");r.command("list").description("List stories").option("--status <s>","Filter by story status (IDEA|DRAFT|IN_REVIEW|PUBLISHED|ARCHIVED)").option("--topic <id>","Filter by topic ID").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(O,{pagination:{limit:t.limit,offset:t.offset},status:t.status?t.status.toUpperCase():void 0,topicId:t.topic});s(t,e.tcpListStories.items,{headers:["ID","Title","Status","Format","Reading","Published"],rows:e.tcpListStories.items.map(n=>[d(n.id,12),n.title,n.status,n.format,n.readingMins!=null?`${n.readingMins}m`:"-",T(n.publishedAt)])});}catch(e){i(e);}}),r.command("get").description("Get a story by id").argument("<id>","Story ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(E,{id:t});if(!n.tcpStory)throw new p(`Story ${t} not found`);s(e,n.tcpStory);}catch(n){i(n);}}),r.command("create").description("Create a story").requiredOption("--title <t>","Title").requiredOption("--slug <slug>","URL slug").option("--summary <s>","Summary").option("--body <s>","Body").option("--topic <id>","Topic ID").option("--author <id>","Author user ID").option("--editor <id>","Editor user ID").option("--format-kind <k>","ARTICLE|ESSAY|EXPLAINER|ORAL_HISTORY|PHOTO_STORY|TIMELINE").option("--cover-file <id>","Cover file ID").option("--reading-mins <n>","Reading minutes",l).option("--languages <csv>","Comma-separated language codes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title,slug:t.slug};t.summary&&(e.summary=t.summary),t.body&&(e.body=t.body),t.topic&&(e.topicId=t.topic),t.author&&(e.authorId=t.author),t.editor&&(e.editorId=t.editor),t.formatKind&&(e.format=t.formatKind.toUpperCase()),t.coverFile&&(e.coverFileId=t.coverFile),t.readingMins!==void 0&&(e.readingMins=t.readingMins),t.languages&&(e.languages=g(t.languages)),t.tags&&(e.tags=g(t.tags));let n=await a(x,{input:e});c(`Story created: ${n.tcpCreateStory.title}`),s(t,n.tcpCreateStory);}catch(e){i(e);}}),r.command("update").description("Update a story").argument("<id>","Story ID").option("--title <t>","Title").option("--summary <s>","Summary").option("--body <s>","Body").option("--topic <id>","Topic ID").option("--author <id>","Author user ID").option("--editor <id>","Editor user ID").option("--format-kind <k>","ARTICLE|ESSAY|EXPLAINER|ORAL_HISTORY|PHOTO_STORY|TIMELINE").option("--cover-file <id>","Cover file ID").option("--reading-mins <n>","Reading minutes",l).option("--languages <csv>","Comma-separated language codes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.title&&(n.title=e.title),e.summary!==void 0&&(n.summary=e.summary),e.body!==void 0&&(n.body=e.body),e.topic&&(n.topicId=e.topic),e.author&&(n.authorId=e.author),e.editor&&(n.editorId=e.editor),e.formatKind&&(n.format=e.formatKind.toUpperCase()),e.coverFile&&(n.coverFileId=e.coverFile),e.readingMins!==void 0&&(n.readingMins=e.readingMins),e.languages&&(n.languages=g(e.languages)),e.tags&&(n.tags=g(e.tags)),!Object.keys(n).length)throw new p("No updates specified");let I=await a(S,{id:t,input:n});c("Story updated"),s(e,I.tcpUpdateStory);}catch(n){i(n);}}),r.command("transition").description("Advance a story through its editorial lifecycle").argument("<id>","Story ID").requiredOption("--status <s>","IDEA|DRAFT|IN_REVIEW|PUBLISHED|ARCHIVED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(b,{id:t,status:e.status.toUpperCase()});c(`Story transitioned to ${n.tcpTransitionStory.status}`),s(e,n.tcpTransitionStory);}catch(n){i(n);}});}function rt(o){let r=o.command("topics").description("TheCulturePost topics");r.command("list").description("List topics").option("--category <c>","Filter by topic category").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(D,{category:t.category?t.category.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});s(t,e.tcpListTopics.items,{headers:["ID","Name","Category","Tradition","Featured"],rows:e.tcpListTopics.items.map(n=>[d(n.id,12),n.name,n.category,n.tradition??"-",n.isFeatured?"yes":"no"])});}catch(e){i(e);}}),r.command("get").description("Get a topic by id").argument("<id>","Topic ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(R,{id:t});if(!n.tcpTopic)throw new p(`Topic ${t} not found`);s(e,n.tcpTopic);}catch(n){i(n);}}),r.command("create").description("Create a topic").requiredOption("--name <name>","Name").requiredOption("--slug <slug>","URL slug").option("--category <c>","Topic category").option("--description <s>","Description").option("--tradition <s>","Tradition").option("--featured","Mark as featured").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,slug:t.slug};t.category&&(e.category=t.category.toUpperCase()),t.description&&(e.description=t.description),t.tradition&&(e.tradition=t.tradition),t.featured&&(e.isFeatured=!0);let n=await a(P,{input:e});c(`Topic created: ${n.tcpCreateTopic.name}`),s(t,n.tcpCreateTopic);}catch(e){i(e);}}),r.command("update").description("Update a topic").argument("<id>","Topic ID").option("--name <name>","Name").option("--category <c>","Topic category").option("--description <s>","Description").option("--tradition <s>","Tradition").option("--featured <bool>","true|false",t=>t==="true").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.category&&(n.category=e.category.toUpperCase()),e.description!==void 0&&(n.description=e.description),e.tradition!==void 0&&(n.tradition=e.tradition),e.featured!==void 0&&(n.isFeatured=e.featured),!Object.keys(n).length)throw new p("No updates specified");let I=await a(L,{id:t,input:n});c("Topic updated"),s(e,I.tcpUpdateTopic);}catch(n){i(n);}}),r.command("archive").description("Archive (delete) a topic").argument("<id>","Topic ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(_,{id:t});c(`Topic ${t} archived`),s(e,{archived:n.tcpArchiveTopic});}catch(n){i(n);}});}function ot(o){let r=o.command("citations").description("TheCulturePost story citations");r.command("list").description("List citations for a story").requiredOption("--story <id>","Story ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a($,{storyId:t.story});s(t,e.tcpListCitations.items,{headers:["ID","Title","Author","Source","Verification"],rows:e.tcpListCitations.items.map(n=>[d(n.id,12),d(n.title,30),n.author??"-",n.sourceType,n.verification])});}catch(e){i(e);}}),r.command("add").description("Add a citation to a story").requiredOption("--story <id>","Story ID").requiredOption("--title <t>","Citation title").option("--author <s>","Author").option("--publisher <s>","Publisher").option("--published-on <iso>","Published-on date (ISO)").option("--source-type <t>","ACADEMIC|ARCHIVAL_RECORD|ARTIFACT|BOOK|INTERVIEW|PERIODICAL|PRIMARY_DOCUMENT|WEB").option("--url <url>","Source URL").option("--excerpt <s>","Excerpt").option("--provenance <s>","Provenance").option("--source-file <id>","Source file ID").option("-f, --format <format>","Output format").action(async t=>{try{let e={storyId:t.story,title:t.title};t.author&&(e.author=t.author),t.publisher&&(e.publisher=t.publisher),t.publishedOn&&(e.publishedOn=t.publishedOn),t.sourceType&&(e.sourceType=t.sourceType.toUpperCase()),t.url&&(e.url=t.url),t.excerpt&&(e.excerpt=t.excerpt),t.provenance&&(e.provenance=t.provenance),t.sourceFile&&(e.sourceFileId=t.sourceFile);let n=await a(N,{input:e});c(`Citation added: ${n.tcpAddCitation.title}`),s(t,n.tcpAddCitation);}catch(e){i(e);}}),r.command("verify").description("Set a citation verification status").argument("<id>","Citation ID").requiredOption("--verification <v>","UNVERIFIED|CORROBORATED|DISPUTED|RETRACTED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(q,{id:t,verification:e.verification.toUpperCase()});c(`Citation verification set to ${n.tcpVerifyCitation.verification}`),s(e,n.tcpVerifyCitation);}catch(n){i(n);}});}function it(o){let r=o.command("archive").description("TheCulturePost archive items");r.command("list").description("List archive items").option("--access-level <a>","PUBLIC|COMMUNITY|RESTRICTED|EMBARGOED").option("--collection <id>","Filter by collection ID").option("--kind <k>","AUDIO|DOCUMENT|MANUSCRIPT|MAP|OBJECT|PHOTOGRAPH|VIDEO").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(U,{accessLevel:t.accessLevel?t.accessLevel.toUpperCase():void 0,collectionId:t.collection,kind:t.kind?t.kind.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});s(t,e.tcpListArchiveItems.items,{headers:["ID","Title","Kind","Access","Origin","Dated"],rows:e.tcpListArchiveItems.items.map(n=>[d(n.id,12),n.title,n.kind,n.accessLevel,n.origin??"-",T(n.datedAt)])});}catch(e){i(e);}}),r.command("get").description("Get an archive item by id").argument("<id>","Archive item ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(M,{id:t});if(!n.tcpArchiveItem)throw new p(`Archive item ${t} not found`);s(e,n.tcpArchiveItem);}catch(n){i(n);}}),r.command("create").description("Create an archive item").requiredOption("--title <t>","Title").option("--description <s>","Description").option("--kind <k>","AUDIO|DOCUMENT|MANUSCRIPT|MAP|OBJECT|PHOTOGRAPH|VIDEO").option("--access-level <a>","PUBLIC|COMMUNITY|RESTRICTED|EMBARGOED").option("--collection <id>","Collection ID").option("--file <id>","File ID").option("--origin <s>","Origin").option("--provenance <s>","Provenance").option("--dated-at <iso>","Dated-at (ISO)").option("--languages <csv>","Comma-separated language codes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title};t.description&&(e.description=t.description),t.kind&&(e.kind=t.kind.toUpperCase()),t.accessLevel&&(e.accessLevel=t.accessLevel.toUpperCase()),t.collection&&(e.collectionId=t.collection),t.file&&(e.fileId=t.file),t.origin&&(e.origin=t.origin),t.provenance&&(e.provenance=t.provenance),t.datedAt&&(e.datedAt=t.datedAt),t.languages&&(e.languages=g(t.languages)),t.tags&&(e.tags=g(t.tags));let n=await a(F,{input:e});c(`Archive item created: ${n.tcpCreateArchiveItem.title}`),s(t,n.tcpCreateArchiveItem);}catch(e){i(e);}}),r.command("update").description("Update an archive item").argument("<id>","Archive item ID").option("--title <t>","Title").option("--description <s>","Description").option("--kind <k>","AUDIO|DOCUMENT|MANUSCRIPT|MAP|OBJECT|PHOTOGRAPH|VIDEO").option("--access-level <a>","PUBLIC|COMMUNITY|RESTRICTED|EMBARGOED").option("--collection <id>","Collection ID").option("--file <id>","File ID").option("--origin <s>","Origin").option("--provenance <s>","Provenance").option("--dated-at <iso>","Dated-at (ISO)").option("--languages <csv>","Comma-separated language codes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.title&&(n.title=e.title),e.description!==void 0&&(n.description=e.description),e.kind&&(n.kind=e.kind.toUpperCase()),e.accessLevel&&(n.accessLevel=e.accessLevel.toUpperCase()),e.collection&&(n.collectionId=e.collection),e.file&&(n.fileId=e.file),e.origin!==void 0&&(n.origin=e.origin),e.provenance!==void 0&&(n.provenance=e.provenance),e.datedAt&&(n.datedAt=e.datedAt),e.languages&&(n.languages=g(e.languages)),e.tags&&(n.tags=g(e.tags)),!Object.keys(n).length)throw new p("No updates specified");let I=await a(G,{id:t,input:n});c("Archive item updated"),s(e,I.tcpUpdateArchiveItem);}catch(n){i(n);}}),r.command("archive-item").description("Archive (delete) an archive item").argument("<id>","Archive item ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(H,{id:t});c(`Archive item ${t} archived`),s(e,{archived:n.tcpArchiveArchiveItem});}catch(n){i(n);}});}function st(o){let r=o.command("collections").description("TheCulturePost archive collections");r.command("list").description("List collections").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(W,{pagination:{limit:t.limit,offset:t.offset}});s(t,e.tcpListCollections.items,{headers:["ID","Name","Slug","Tradition","Items"],rows:e.tcpListCollections.items.map(n=>[d(n.id,12),n.name,n.slug,n.tradition??"-",String(n.itemCount)])});}catch(e){i(e);}}),r.command("get").description("Get a collection by id").argument("<id>","Collection ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(V,{id:t});if(!n.tcpCollection)throw new p(`Collection ${t} not found`);s(e,n.tcpCollection);}catch(n){i(n);}}),r.command("create").description("Create a collection").requiredOption("--name <name>","Name").requiredOption("--slug <slug>","URL slug").option("--description <s>","Description").option("--tradition <s>","Tradition").option("--cover-file <id>","Cover file ID").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,slug:t.slug};t.description&&(e.description=t.description),t.tradition&&(e.tradition=t.tradition),t.coverFile&&(e.coverFileId=t.coverFile);let n=await a(j,{input:e});c(`Collection created: ${n.tcpCreateCollection.name}`),s(t,n.tcpCreateCollection);}catch(e){i(e);}});}function at(o){let r=o.command("oral-histories").description("TheCulturePost oral histories");r.command("list").description("List oral histories").option("--collection <id>","Filter by collection ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(Y,{collectionId:t.collection});s(t,e.tcpListOralHistories.items,{headers:["ID","Title","Narrator","Language","Access","Duration"],rows:e.tcpListOralHistories.items.map(n=>[d(n.id,12),n.title,n.narratorName??"-",n.language??"-",n.accessLevel,`${n.durationSecs}s`])});}catch(e){i(e);}}),r.command("record").description("Record an oral history").requiredOption("--title <t>","Title").option("--narrator <s>","Narrator name").option("--language <s>","Language").option("--summary <s>","Summary").option("--transcript <s>","Transcript").option("--collection <id>","Collection ID").option("--access-level <a>","PUBLIC|COMMUNITY|RESTRICTED|EMBARGOED").option("--duration-secs <n>","Duration (seconds)",l).option("--recorded-at <iso>","Recorded-at (ISO)").option("--recording-file <id>","Recording file ID").option("--consent-given","Confirm the narrator consented to being recorded (required)").option("-f, --format <format>","Output format").action(async t=>{try{if(!t.consentGiven)throw new p("Pass --consent-given to confirm the narrator consented to being recorded.");let e={title:t.title,consentGiven:!0};t.narrator&&(e.narratorName=t.narrator),t.language&&(e.language=t.language),t.summary&&(e.summary=t.summary),t.transcript&&(e.transcript=t.transcript),t.collection&&(e.collectionId=t.collection),t.accessLevel&&(e.accessLevel=t.accessLevel.toUpperCase()),t.durationSecs!==void 0&&(e.durationSecs=t.durationSecs),t.recordedAt&&(e.recordedAt=t.recordedAt),t.recordingFile&&(e.recordingFileId=t.recordingFile);let n=await a(B,{input:e});c(`Oral history recorded: ${n.tcpRecordOralHistory.title}`),s(t,n.tcpRecordOralHistory);}catch(e){i(e);}});}function ct(o){let r=o.command("discussions").description("TheCulturePost respectful discussions");r.command("list").description("List discussions").option("--status <s>","PENDING|APPROVED|FLAGGED|REMOVED").option("--story <id>","Filter by story ID").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(K,{pagination:{limit:t.limit,offset:t.offset},status:t.status?t.status.toUpperCase():void 0,storyId:t.story});s(t,e.tcpListDiscussions.items,{headers:["ID","Title","Status","Locked","Interfaith","Replies"],rows:e.tcpListDiscussions.items.map(n=>[d(n.id,12),n.title,n.status,n.isLocked?"yes":"no",n.isInterfaith?"yes":"no",String(n.replyCount??0)])});}catch(e){i(e);}}),r.command("get").description("Get a discussion by id").argument("<id>","Discussion ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(z,{id:t});if(!n.tcpDiscussion)throw new p(`Discussion ${t} not found`);s(e,n.tcpDiscussion);}catch(n){i(n);}}),r.command("open").description("Open a discussion").requiredOption("--title <t>","Title").option("--prompt <s>","Discussion prompt").option("--story <id>","Related story ID").option("--interfaith","Mark as interfaith").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title};t.prompt&&(e.prompt=t.prompt),t.story&&(e.storyId=t.story),t.interfaith&&(e.isInterfaith=!0),t.tags&&(e.tags=g(t.tags));let n=await a(J,{input:e});c(`Discussion opened: ${n.tcpOpenDiscussion.title}`),s(t,n.tcpOpenDiscussion);}catch(e){i(e);}}),r.command("lock").description("Lock a discussion").argument("<id>","Discussion ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(Q,{id:t});c(`Discussion ${t} locked`),s(e,n.tcpLockDiscussion);}catch(n){i(n);}});}function pt(o){let r=o.command("replies").description("TheCulturePost discussion replies");r.command("list").description("List replies for a discussion").requiredOption("--discussion <id>","Discussion ID").option("--status <s>","PENDING|APPROVED|FLAGGED|REMOVED").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(X,{discussionId:t.discussion,status:t.status?t.status.toUpperCase():void 0});s(t,e.tcpListReplies.items,{headers:["ID","Author","Perspective","Status","Body"],rows:e.tcpListReplies.items.map(n=>[d(n.id,12),d(n.authorId??"-",12),n.tcpPerspective??"-",n.tcpModerationStatus??"-",d(n.content?.text??n.content?.markdown??"",40)])});}catch(e){i(e);}}),r.command("post").description("Post a reply to a discussion").requiredOption("--discussion <id>","Discussion ID").requiredOption("--body <s>","Reply body").option("--perspective <s>","Perspective").option("-f, --format <format>","Output format").action(async t=>{try{let e={discussionId:t.discussion,body:t.body};t.perspective&&(e.perspective=t.perspective);let n=await a(Z,{input:e});c("Reply posted"),s(t,n.tcpPostReply);}catch(e){i(e);}}),r.command("moderate").description("Moderate a reply (approve / flag / remove)").argument("<id>","Reply ID").requiredOption("--status <s>","PENDING|APPROVED|FLAGGED|REMOVED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(tt,{id:t,status:e.status.toUpperCase()});c(`Reply moderated to ${n.tcpModerateReply.tcpModerationStatus}`),s(e,n.tcpModerateReply);}catch(n){i(n);}});}function ut(o){o.command("health").description("TheCulturePost service health check (public)").option("-f, --format <format>","Output format").action(async r=>{try{let t=await w(et);c(t.tcpHealth),s(r,{health:t.tcpHealth});}catch(t){i(t);}});}var vt={id:"theculturepost",version:"1.0.0",displayName:"TheCulturePost",dependsOn:["auth","workspaces"],register(o,r){k(r);let t=o.command("theculturepost").description("TheCulturePost culture & heritage publishing");nt(t),rt(t),ot(t),it(t),st(t),at(t),ct(t),pt(t),ut(t);}},In=vt;module.exports=In;
|
|
233
|
+
`;function l(o){let r=Number.parseInt(o,10);if(Number.isNaN(r))throw new p(`Expected an integer but got "${o}"`);return r}function g(o){return o.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function nt(o){let r=o.command("stories").description("TheCulturePost editorial stories");r.command("list").description("List stories").option("--status <s>","Filter by story status (IDEA|DRAFT|IN_REVIEW|PUBLISHED|ARCHIVED)").option("--topic <id>","Filter by topic ID").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(O,{pagination:{limit:t.limit,offset:t.offset},status:t.status?t.status.toUpperCase():void 0,topicId:t.topic});s(t,e.tcpListStories.items,{headers:["ID","Title","Status","Format","Reading","Published"],rows:e.tcpListStories.items.map(n=>[d(n.id,12),n.title,n.status,n.format,n.readingMins!=null?`${n.readingMins}m`:"-",T(n.publishedAt)])});}catch(e){i(e);}}),r.command("get").description("Get a story by id").argument("<id>","Story ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(E,{id:t});if(!n.tcpStory)throw new p(`Story ${t} not found`);s(e,n.tcpStory);}catch(n){i(n);}}),r.command("create").description("Create a story").requiredOption("--title <t>","Title").requiredOption("--slug <slug>","URL slug").option("--summary <s>","Summary").option("--body <s>","Body").option("--topic <id>","Topic ID").option("--author <id>","Author user ID").option("--editor <id>","Editor user ID").option("--format-kind <k>","ARTICLE|ESSAY|EXPLAINER|ORAL_HISTORY|PHOTO_STORY|TIMELINE").option("--cover-file <id>","Cover file ID").option("--reading-mins <n>","Reading minutes",l).option("--languages <csv>","Comma-separated language codes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title,slug:t.slug};t.summary&&(e.summary=t.summary),t.body&&(e.body=t.body),t.topic&&(e.topicId=t.topic),t.author&&(e.authorId=t.author),t.editor&&(e.editorId=t.editor),t.formatKind&&(e.format=t.formatKind.toUpperCase()),t.coverFile&&(e.coverFileId=t.coverFile),t.readingMins!==void 0&&(e.readingMins=t.readingMins),t.languages&&(e.languages=g(t.languages)),t.tags&&(e.tags=g(t.tags));let n=await a(x,{input:e});c(`Story created: ${n.tcpCreateStory.title}`),s(t,n.tcpCreateStory);}catch(e){i(e);}}),r.command("update").description("Update a story").argument("<id>","Story ID").option("--title <t>","Title").option("--summary <s>","Summary").option("--body <s>","Body").option("--topic <id>","Topic ID").option("--author <id>","Author user ID").option("--editor <id>","Editor user ID").option("--format-kind <k>","ARTICLE|ESSAY|EXPLAINER|ORAL_HISTORY|PHOTO_STORY|TIMELINE").option("--cover-file <id>","Cover file ID").option("--reading-mins <n>","Reading minutes",l).option("--languages <csv>","Comma-separated language codes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.title&&(n.title=e.title),e.summary!==void 0&&(n.summary=e.summary),e.body!==void 0&&(n.body=e.body),e.topic&&(n.topicId=e.topic),e.author&&(n.authorId=e.author),e.editor&&(n.editorId=e.editor),e.formatKind&&(n.format=e.formatKind.toUpperCase()),e.coverFile&&(n.coverFileId=e.coverFile),e.readingMins!==void 0&&(n.readingMins=e.readingMins),e.languages&&(n.languages=g(e.languages)),e.tags&&(n.tags=g(e.tags)),!Object.keys(n).length)throw new p("No updates specified");let I=await a(S,{id:t,input:n});c("Story updated"),s(e,I.tcpUpdateStory);}catch(n){i(n);}}),r.command("transition").description("Advance a story through its editorial lifecycle").argument("<id>","Story ID").requiredOption("--status <s>","IDEA|DRAFT|IN_REVIEW|PUBLISHED|ARCHIVED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(R,{id:t,status:e.status.toUpperCase()});c(`Story transitioned to ${n.tcpTransitionStory.status}`),s(e,n.tcpTransitionStory);}catch(n){i(n);}});}function rt(o){let r=o.command("topics").description("TheCulturePost topics");r.command("list").description("List topics").option("--category <c>","Filter by topic category").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(D,{category:t.category?t.category.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});s(t,e.tcpListTopics.items,{headers:["ID","Name","Category","Tradition","Featured"],rows:e.tcpListTopics.items.map(n=>[d(n.id,12),n.name,n.category,n.tradition??"-",n.isFeatured?"yes":"no"])});}catch(e){i(e);}}),r.command("get").description("Get a topic by id").argument("<id>","Topic ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(b,{id:t});if(!n.tcpTopic)throw new p(`Topic ${t} not found`);s(e,n.tcpTopic);}catch(n){i(n);}}),r.command("create").description("Create a topic").requiredOption("--name <name>","Name").requiredOption("--slug <slug>","URL slug").option("--category <c>","Topic category").option("--description <s>","Description").option("--tradition <s>","Tradition").option("--featured","Mark as featured").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,slug:t.slug};t.category&&(e.category=t.category.toUpperCase()),t.description&&(e.description=t.description),t.tradition&&(e.tradition=t.tradition),t.featured&&(e.isFeatured=!0);let n=await a(P,{input:e});c(`Topic created: ${n.tcpCreateTopic.name}`),s(t,n.tcpCreateTopic);}catch(e){i(e);}}),r.command("update").description("Update a topic").argument("<id>","Topic ID").option("--name <name>","Name").option("--category <c>","Topic category").option("--description <s>","Description").option("--tradition <s>","Tradition").option("--featured <bool>","true|false",t=>t==="true").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.category&&(n.category=e.category.toUpperCase()),e.description!==void 0&&(n.description=e.description),e.tradition!==void 0&&(n.tradition=e.tradition),e.featured!==void 0&&(n.isFeatured=e.featured),!Object.keys(n).length)throw new p("No updates specified");let I=await a(L,{id:t,input:n});c("Topic updated"),s(e,I.tcpUpdateTopic);}catch(n){i(n);}}),r.command("archive").description("Archive (delete) a topic").argument("<id>","Topic ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(_,{id:t});c(`Topic ${t} archived`),s(e,{archived:n.tcpArchiveTopic});}catch(n){i(n);}});}function ot(o){let r=o.command("citations").description("TheCulturePost story citations");r.command("list").description("List citations for a story").requiredOption("--story <id>","Story ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a($,{storyId:t.story});s(t,e.tcpListCitations.items,{headers:["ID","Title","Author","Source","Verification"],rows:e.tcpListCitations.items.map(n=>[d(n.id,12),d(n.title,30),n.author??"-",n.sourceType,n.verification])});}catch(e){i(e);}}),r.command("add").description("Add a citation to a story").requiredOption("--story <id>","Story ID").requiredOption("--title <t>","Citation title").option("--author <s>","Author").option("--publisher <s>","Publisher").option("--published-on <iso>","Published-on date (ISO)").option("--source-type <t>","ACADEMIC|ARCHIVAL_RECORD|ARTIFACT|BOOK|INTERVIEW|PERIODICAL|PRIMARY_DOCUMENT|WEB").option("--url <url>","Source URL").option("--excerpt <s>","Excerpt").option("--provenance <s>","Provenance").option("--source-file <id>","Source file ID").option("-f, --format <format>","Output format").action(async t=>{try{let e={storyId:t.story,title:t.title};t.author&&(e.author=t.author),t.publisher&&(e.publisher=t.publisher),t.publishedOn&&(e.publishedOn=t.publishedOn),t.sourceType&&(e.sourceType=t.sourceType.toUpperCase()),t.url&&(e.url=t.url),t.excerpt&&(e.excerpt=t.excerpt),t.provenance&&(e.provenance=t.provenance),t.sourceFile&&(e.sourceFileId=t.sourceFile);let n=await a(q,{input:e});c(`Citation added: ${n.tcpAddCitation.title}`),s(t,n.tcpAddCitation);}catch(e){i(e);}}),r.command("verify").description("Set a citation verification status").argument("<id>","Citation ID").requiredOption("--verification <v>","UNVERIFIED|CORROBORATED|DISPUTED|RETRACTED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(N,{id:t,verification:e.verification.toUpperCase()});c(`Citation verification set to ${n.tcpVerifyCitation.verification}`),s(e,n.tcpVerifyCitation);}catch(n){i(n);}});}function it(o){let r=o.command("archive").description("TheCulturePost archive items");r.command("list").description("List archive items").option("--access-level <a>","PUBLIC|COMMUNITY|RESTRICTED|EMBARGOED").option("--collection <id>","Filter by collection ID").option("--kind <k>","AUDIO|DOCUMENT|MANUSCRIPT|MAP|OBJECT|PHOTOGRAPH|VIDEO").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(U,{accessLevel:t.accessLevel?t.accessLevel.toUpperCase():void 0,collectionId:t.collection,kind:t.kind?t.kind.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});s(t,e.tcpListArchiveItems.items,{headers:["ID","Title","Kind","Access","Origin","Dated"],rows:e.tcpListArchiveItems.items.map(n=>[d(n.id,12),n.title,n.kind,n.accessLevel,n.origin??"-",T(n.datedAt)])});}catch(e){i(e);}}),r.command("get").description("Get an archive item by id").argument("<id>","Archive item ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(M,{id:t});if(!n.tcpArchiveItem)throw new p(`Archive item ${t} not found`);s(e,n.tcpArchiveItem);}catch(n){i(n);}}),r.command("create").description("Create an archive item").requiredOption("--title <t>","Title").option("--description <s>","Description").option("--kind <k>","AUDIO|DOCUMENT|MANUSCRIPT|MAP|OBJECT|PHOTOGRAPH|VIDEO").option("--access-level <a>","PUBLIC|COMMUNITY|RESTRICTED|EMBARGOED").option("--collection <id>","Collection ID").option("--file <id>","File ID").option("--origin <s>","Origin").option("--provenance <s>","Provenance").option("--dated-at <iso>","Dated-at (ISO)").option("--languages <csv>","Comma-separated language codes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title};t.description&&(e.description=t.description),t.kind&&(e.kind=t.kind.toUpperCase()),t.accessLevel&&(e.accessLevel=t.accessLevel.toUpperCase()),t.collection&&(e.collectionId=t.collection),t.file&&(e.fileId=t.file),t.origin&&(e.origin=t.origin),t.provenance&&(e.provenance=t.provenance),t.datedAt&&(e.datedAt=t.datedAt),t.languages&&(e.languages=g(t.languages)),t.tags&&(e.tags=g(t.tags));let n=await a(F,{input:e});c(`Archive item created: ${n.tcpCreateArchiveItem.title}`),s(t,n.tcpCreateArchiveItem);}catch(e){i(e);}}),r.command("update").description("Update an archive item").argument("<id>","Archive item ID").option("--title <t>","Title").option("--description <s>","Description").option("--kind <k>","AUDIO|DOCUMENT|MANUSCRIPT|MAP|OBJECT|PHOTOGRAPH|VIDEO").option("--access-level <a>","PUBLIC|COMMUNITY|RESTRICTED|EMBARGOED").option("--collection <id>","Collection ID").option("--file <id>","File ID").option("--origin <s>","Origin").option("--provenance <s>","Provenance").option("--dated-at <iso>","Dated-at (ISO)").option("--languages <csv>","Comma-separated language codes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.title&&(n.title=e.title),e.description!==void 0&&(n.description=e.description),e.kind&&(n.kind=e.kind.toUpperCase()),e.accessLevel&&(n.accessLevel=e.accessLevel.toUpperCase()),e.collection&&(n.collectionId=e.collection),e.file&&(n.fileId=e.file),e.origin!==void 0&&(n.origin=e.origin),e.provenance!==void 0&&(n.provenance=e.provenance),e.datedAt&&(n.datedAt=e.datedAt),e.languages&&(n.languages=g(e.languages)),e.tags&&(n.tags=g(e.tags)),!Object.keys(n).length)throw new p("No updates specified");let I=await a(G,{id:t,input:n});c("Archive item updated"),s(e,I.tcpUpdateArchiveItem);}catch(n){i(n);}}),r.command("archive-item").description("Archive (delete) an archive item").argument("<id>","Archive item ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(H,{id:t});c(`Archive item ${t} archived`),s(e,{archived:n.tcpArchiveArchiveItem});}catch(n){i(n);}});}function st(o){let r=o.command("collections").description("TheCulturePost archive collections");r.command("list").description("List collections").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(V,{pagination:{limit:t.limit,offset:t.offset}});s(t,e.tcpListCollections.items,{headers:["ID","Name","Slug","Tradition","Items"],rows:e.tcpListCollections.items.map(n=>[d(n.id,12),n.name,n.slug,n.tradition??"-",String(n.itemCount)])});}catch(e){i(e);}}),r.command("get").description("Get a collection by id").argument("<id>","Collection ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(W,{id:t});if(!n.tcpCollection)throw new p(`Collection ${t} not found`);s(e,n.tcpCollection);}catch(n){i(n);}}),r.command("create").description("Create a collection").requiredOption("--name <name>","Name").requiredOption("--slug <slug>","URL slug").option("--description <s>","Description").option("--tradition <s>","Tradition").option("--cover-file <id>","Cover file ID").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,slug:t.slug};t.description&&(e.description=t.description),t.tradition&&(e.tradition=t.tradition),t.coverFile&&(e.coverFileId=t.coverFile);let n=await a(j,{input:e});c(`Collection created: ${n.tcpCreateCollection.name}`),s(t,n.tcpCreateCollection);}catch(e){i(e);}});}function at(o){let r=o.command("oral-histories").description("TheCulturePost oral histories");r.command("list").description("List oral histories").option("--collection <id>","Filter by collection ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(Y,{collectionId:t.collection});s(t,e.tcpListOralHistories.items,{headers:["ID","Title","Narrator","Language","Access","Duration"],rows:e.tcpListOralHistories.items.map(n=>[d(n.id,12),n.title,n.narratorName??"-",n.language??"-",n.accessLevel,`${n.durationSecs}s`])});}catch(e){i(e);}}),r.command("record").description("Record an oral history").requiredOption("--title <t>","Title").option("--narrator <s>","Narrator name").option("--language <s>","Language").option("--summary <s>","Summary").option("--transcript <s>","Transcript").option("--collection <id>","Collection ID").option("--access-level <a>","PUBLIC|COMMUNITY|RESTRICTED|EMBARGOED").option("--duration-secs <n>","Duration (seconds)",l).option("--recorded-at <iso>","Recorded-at (ISO)").option("--recording-file <id>","Recording file ID").option("--consent-given","Confirm the narrator consented to being recorded (required)").option("-f, --format <format>","Output format").action(async t=>{try{if(!t.consentGiven)throw new p("Pass --consent-given to confirm the narrator consented to being recorded.");let e={title:t.title,consentGiven:!0};t.narrator&&(e.narratorName=t.narrator),t.language&&(e.language=t.language),t.summary&&(e.summary=t.summary),t.transcript&&(e.transcript=t.transcript),t.collection&&(e.collectionId=t.collection),t.accessLevel&&(e.accessLevel=t.accessLevel.toUpperCase()),t.durationSecs!==void 0&&(e.durationSecs=t.durationSecs),t.recordedAt&&(e.recordedAt=t.recordedAt),t.recordingFile&&(e.recordingFileId=t.recordingFile);let n=await a(B,{input:e});c(`Oral history recorded: ${n.tcpRecordOralHistory.title}`),s(t,n.tcpRecordOralHistory);}catch(e){i(e);}});}function ct(o){let r=o.command("discussions").description("TheCulturePost respectful discussions");r.command("list").description("List discussions").option("--status <s>","PENDING|APPROVED|FLAGGED|REMOVED").option("--story <id>","Filter by story ID").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(K,{pagination:{limit:t.limit,offset:t.offset},status:t.status?t.status.toUpperCase():void 0,storyId:t.story});s(t,e.tcpListDiscussions.items,{headers:["ID","Title","Status","Locked","Interfaith","Replies"],rows:e.tcpListDiscussions.items.map(n=>[d(n.id,12),n.title,n.status,n.isLocked?"yes":"no",n.isInterfaith?"yes":"no",String(n.replyCount??0)])});}catch(e){i(e);}}),r.command("get").description("Get a discussion by id").argument("<id>","Discussion ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(z,{id:t});if(!n.tcpDiscussion)throw new p(`Discussion ${t} not found`);s(e,n.tcpDiscussion);}catch(n){i(n);}}),r.command("open").description("Open a discussion").requiredOption("--title <t>","Title").option("--prompt <s>","Discussion prompt").option("--story <id>","Related story ID").option("--interfaith","Mark as interfaith").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title};t.prompt&&(e.prompt=t.prompt),t.story&&(e.storyId=t.story),t.interfaith&&(e.isInterfaith=!0),t.tags&&(e.tags=g(t.tags));let n=await a(J,{input:e});c(`Discussion opened: ${n.tcpOpenDiscussion.title}`),s(t,n.tcpOpenDiscussion);}catch(e){i(e);}}),r.command("lock").description("Lock a discussion").argument("<id>","Discussion ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(Q,{id:t});c(`Discussion ${t} locked`),s(e,n.tcpLockDiscussion);}catch(n){i(n);}});}function pt(o){let r=o.command("replies").description("TheCulturePost discussion replies");r.command("list").description("List replies for a discussion").requiredOption("--discussion <id>","Discussion ID").option("--status <s>","PENDING|APPROVED|FLAGGED|REMOVED").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(X,{discussionId:t.discussion,status:t.status?t.status.toUpperCase():void 0});s(t,e.tcpListReplies.items,{headers:["ID","Author","Perspective","Status","Body"],rows:e.tcpListReplies.items.map(n=>[d(n.id,12),d(n.authorId??"-",12),n.tcpPerspective??"-",n.tcpModerationStatus??"-",d(n.content?.text??n.content?.markdown??"",40)])});}catch(e){i(e);}}),r.command("post").description("Post a reply to a discussion").requiredOption("--discussion <id>","Discussion ID").requiredOption("--body <s>","Reply body").option("--perspective <s>","Perspective").option("-f, --format <format>","Output format").action(async t=>{try{let e={discussionId:t.discussion,body:t.body};t.perspective&&(e.perspective=t.perspective);let n=await a(Z,{input:e});c("Reply posted"),s(t,n.tcpPostReply);}catch(e){i(e);}}),r.command("moderate").description("Moderate a reply (approve / flag / remove)").argument("<id>","Reply ID").requiredOption("--status <s>","PENDING|APPROVED|FLAGGED|REMOVED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(tt,{id:t,status:e.status.toUpperCase()});c(`Reply moderated to ${n.tcpModerateReply.tcpModerationStatus}`),s(e,n.tcpModerateReply);}catch(n){i(n);}});}function ut(o){o.command("health").description("TheCulturePost service health check (public)").option("-f, --format <format>","Output format").action(async r=>{try{let t=await w(et);c(t.tcpHealth),s(r,{health:t.tcpHealth});}catch(t){i(t);}});}var kt={id:"theculturepost",version:"1.0.0",displayName:"TheCulturePost",dependsOn:["auth","workspaces"],register(o,r){v(r);let t=o.command("theculturepost").description("TheCulturePost culture & heritage publishing");nt(t),rt(t),ot(t),it(t),st(t),at(t),ct(t),pt(t),ut(t);}},In=kt;module.exports=In;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b as b$1,i,r,q as q$1,h as h$1,k as k$1,d as d$1}from'../../chunk-
|
|
1
|
+
import {a,b as b$1,i,r,q as q$1,h as h$1,k as k$1,d as d$1}from'../../chunk-3ZVMC2AF.js';import {q as q$2}from'../../chunk-ZT6KOG7N.js';var h=`
|
|
2
2
|
query TcpGetStory($id: ID!) {
|
|
3
3
|
tcpStory(id: $id) {
|
|
4
4
|
id authorId editorId title slug summary body format status topicId
|