@pmate/cli 0.49.1 → 0.49.3

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/index.d.ts CHANGED
@@ -544,7 +544,6 @@ type OrgCommandArgs = {
544
544
  action: "create";
545
545
  orgId: string;
546
546
  displayName: string;
547
- members: string[];
548
547
  baseUrl?: string;
549
548
  json: boolean;
550
549
  } | {
@@ -560,21 +559,6 @@ type OrgCommandArgs = {
560
559
  orgId: string;
561
560
  baseUrl?: string;
562
561
  json: boolean;
563
- } | {
564
- type: Command.Org;
565
- action: "member-add" | "member-remove";
566
- orgId: string;
567
- account: string;
568
- baseUrl?: string;
569
- json: boolean;
570
- } | {
571
- type: Command.Org;
572
- action: "member-set";
573
- orgId: string;
574
- accounts?: string[];
575
- filePath?: string;
576
- baseUrl?: string;
577
- json: boolean;
578
562
  } | {
579
563
  type: Command.Org;
580
564
  action: "visible-app-list";
package/dist/index.js CHANGED
@@ -8884,6 +8884,27 @@ __export(index_exports, {
8884
8884
  });
8885
8885
  module.exports = __toCommonJS(index_exports);
8886
8886
 
8887
+ // src/serviceHelp.ts
8888
+ function serviceHelp(argv) {
8889
+ const end = argv.indexOf("--");
8890
+ const options = end < 0 ? argv : argv.slice(0, end);
8891
+ if (options[0] !== "service" || !options.some((value) => value === "--help" || value === "-h")) return;
8892
+ return `PMate service commands
8893
+ pmate service list [--namespace NS] [--repo OWNER/REPO] [--server NAME] [--json]
8894
+ pmate service get NS:SERVICE [--json]
8895
+ pmate service view NS:SERVICE
8896
+ pmate service create --file FILE [--json]
8897
+ pmate service update NS:SERVICE --file FILE [--json]
8898
+ pmate service deploy NS:SERVICE [--env prod] [--dry-run] [--json]
8899
+ pmate service log NS:SERVICE [--env prod] [--since-ms MS] [--page N] [--follow] [--json]
8900
+ pmate service stop NS:SERVICE [--json]
8901
+ Registry commands support --base-url URL. IDs identify Services, not Apps.
8902
+ Deploy uses the registered release configuration; read the current Service before mutations.
8903
+ Native deploy options: --platform mac|win --arch arm64|x64 --config FILE --scheme NAME --team ID --variant release|debug --bump patch|minor|major.
8904
+ Other service actions: rename, move, delete, init, ssl, env, env-vars, apk. Run pmate --help for their command catalogue.
8905
+ Help performs no login, registry request or deployment.`;
8906
+ }
8907
+
8887
8908
  // src/sessionCommand.ts
8888
8909
  init_sessionStore();
8889
8910
  function sessionCommand(args) {
@@ -24030,10 +24051,9 @@ var OrgCommandHandler = class {
24030
24051
  case "create": {
24031
24052
  const record = await this.request(baseUrl2, token, "POST", "/orgs", {
24032
24053
  id: args.orgId,
24033
- displayName: args.displayName,
24034
- members: args.members
24054
+ displayName: args.displayName
24035
24055
  });
24036
- ui.success(`Created org ${record.id}`);
24056
+ ui.success(`Created registry metadata ${record.id}; Merry Team membership is not initialized`);
24037
24057
  this.renderJson(record, args.json);
24038
24058
  return;
24039
24059
  }
@@ -24069,42 +24089,8 @@ var OrgCommandHandler = class {
24069
24089
  "GET",
24070
24090
  `/orgs/${encodeURIComponent(args.orgId)}/members`
24071
24091
  );
24072
- this.renderStringList(result.items, args.json, "No members found.");
24073
- return;
24074
- }
24075
- case "member-add": {
24076
- const record = await this.request(
24077
- baseUrl2,
24078
- token,
24079
- "PUT",
24080
- `/orgs/${encodeURIComponent(args.orgId)}/members/${encodeURIComponent(args.account)}`
24081
- );
24082
- ui.success(`Added ${args.account} to ${record.id}`);
24083
- this.renderJson(record, args.json);
24084
- return;
24085
- }
24086
- case "member-remove": {
24087
- const record = await this.request(
24088
- baseUrl2,
24089
- token,
24090
- "DELETE",
24091
- `/orgs/${encodeURIComponent(args.orgId)}/members/${encodeURIComponent(args.account)}`
24092
- );
24093
- ui.success(`Removed ${args.account} from ${record.id}`);
24094
- this.renderJson(record, args.json);
24095
- return;
24096
- }
24097
- case "member-set": {
24098
- const accounts = this.resolveStringArrayInput(args.accounts, args.filePath, "account");
24099
- const record = await this.request(
24100
- baseUrl2,
24101
- token,
24102
- "PUT",
24103
- `/orgs/${encodeURIComponent(args.orgId)}/members`,
24104
- accounts
24105
- );
24106
- ui.success(`Updated members for ${record.id}`);
24107
- this.renderJson(record, args.json);
24092
+ if (!args.json) ui.warn("Legacy Factory roster only; this is not Merry Social V2 membership.");
24093
+ this.renderStringList(result.items, args.json, "No legacy Factory members found.");
24108
24094
  return;
24109
24095
  }
24110
24096
  case "visible-app-list": {
@@ -24154,6 +24140,8 @@ var OrgCommandHandler = class {
24154
24140
  this.renderJson(result.items, args.json);
24155
24141
  return;
24156
24142
  }
24143
+ default:
24144
+ throw new Error("Unsupported org action. Legacy member writes were removed; use Hub Social V2.");
24157
24145
  }
24158
24146
  }
24159
24147
  resolveBaseUrl(baseUrl2) {
@@ -26757,7 +26745,6 @@ function parseOrgArgs(tokens) {
26757
26745
  if (action === "create") {
26758
26746
  const orgId = parseRequiredOrgRef(rest.shift(), action);
26759
26747
  let displayName;
26760
- const members = [];
26761
26748
  while (rest.length > 0) {
26762
26749
  const token = rest.shift();
26763
26750
  switch (token) {
@@ -26765,8 +26752,7 @@ function parseOrgArgs(tokens) {
26765
26752
  displayName = requireValue6(rest, token);
26766
26753
  break;
26767
26754
  case "--member":
26768
- members.push(requireValue6(rest, token));
26769
- break;
26755
+ throw new Error("org create --member was removed. Merry membership is managed through Hub Social V2; org create only creates registry metadata.");
26770
26756
  case "--base-url":
26771
26757
  baseUrl2 = requireValue6(rest, token);
26772
26758
  break;
@@ -26779,7 +26765,7 @@ function parseOrgArgs(tokens) {
26779
26765
  }
26780
26766
  if (!displayName) {
26781
26767
  throw new Error(
26782
- "Usage: org create <ns:org> --display-name <name> [--member <id> ...] [--base-url <url>] [--json]"
26768
+ "Usage: org create <ns:org> --display-name <name> [--base-url <url>] [--json]"
26783
26769
  );
26784
26770
  }
26785
26771
  return {
@@ -26787,7 +26773,6 @@ function parseOrgArgs(tokens) {
26787
26773
  action,
26788
26774
  orgId,
26789
26775
  displayName,
26790
- members,
26791
26776
  baseUrl: baseUrl2,
26792
26777
  json
26793
26778
  };
@@ -26835,69 +26820,19 @@ function parseOrgArgs(tokens) {
26835
26820
  function parseOrgMemberArgs(memberTokens) {
26836
26821
  const subAction = memberTokens.shift();
26837
26822
  if (!subAction) {
26838
- throw new Error("Missing org member action. Use: org member list|add|remove|set");
26823
+ throw new Error("Missing org member action. Use: org member list (legacy Factory roster only)");
26839
26824
  }
26840
- const orgId = parseRequiredOrgRef(memberTokens.shift(), `member ${subAction}`);
26841
- let account;
26842
- const accounts = [];
26843
- let filePath;
26825
+ if (subAction !== "list") {
26826
+ throw new Error("org member writes were removed. Use Hub /api/social/member-roles with a Team Admin session; verify /api/social/teams and /api/social/members. New Teams require controlled Social V2 initialization.");
26827
+ }
26828
+ const orgId = parseRequiredOrgRef(memberTokens.shift(), "member list");
26844
26829
  while (memberTokens.length > 0) {
26845
26830
  const token = memberTokens.shift();
26846
- switch (token) {
26847
- case "--account": {
26848
- const value = requireValue6(memberTokens, token);
26849
- account = value;
26850
- accounts.push(value);
26851
- break;
26852
- }
26853
- case "--file":
26854
- filePath = requireValue6(memberTokens, token);
26855
- break;
26856
- case "--base-url":
26857
- baseUrl2 = requireValue6(memberTokens, token);
26858
- break;
26859
- case "--json":
26860
- json = true;
26861
- break;
26862
- default:
26863
- throw new Error(`Unknown org member option: ${token}`);
26864
- }
26865
- }
26866
- if (subAction === "list") {
26867
- return { type: "org" /* Org */, action: "member-list", orgId, baseUrl: baseUrl2, json };
26868
- }
26869
- if (subAction === "add" || subAction === "remove") {
26870
- if (!account) {
26871
- throw new Error(
26872
- `Usage: org member ${subAction} <ns:org> --account <id> [--base-url <url>] [--json]`
26873
- );
26874
- }
26875
- return {
26876
- type: "org" /* Org */,
26877
- action: subAction === "add" ? "member-add" : "member-remove",
26878
- orgId,
26879
- account,
26880
- baseUrl: baseUrl2,
26881
- json
26882
- };
26831
+ if (token === "--base-url") baseUrl2 = requireValue6(memberTokens, token);
26832
+ else if (token === "--json") json = true;
26833
+ else throw new Error(`Unknown org member list option: ${token}`);
26883
26834
  }
26884
- if (subAction === "set") {
26885
- if (accounts.length === 0 && !filePath || accounts.length > 0 && filePath) {
26886
- throw new Error(
26887
- "Usage: org member set <ns:org> (--account <id> ... | --file <path>) [--base-url <url>] [--json]"
26888
- );
26889
- }
26890
- return {
26891
- type: "org" /* Org */,
26892
- action: "member-set",
26893
- orgId,
26894
- accounts: accounts.length > 0 ? accounts : void 0,
26895
- filePath,
26896
- baseUrl: baseUrl2,
26897
- json
26898
- };
26899
- }
26900
- throw new Error(`Unknown org member action: ${subAction}`);
26835
+ return { type: "org" /* Org */, action: "member-list", orgId, baseUrl: baseUrl2, json };
26901
26836
  }
26902
26837
  function parseOrgVisibleAppArgs(visibleTokens) {
26903
26838
  const subAction = visibleTokens.shift();
@@ -27607,16 +27542,13 @@ var HELP_TEXT = [
27607
27542
  ` ${import_chalk4.default.gray(" access-key disable <id> [--base-url <url>] [--json]")}`,
27608
27543
  ` ${import_chalk4.default.gray(" access-key login --app <ns:app> (--key <secret> | --key-file <path>) [--base-url <url>] [--json]")}`,
27609
27544
  ` ${import_chalk4.default.gray(" default base URL: https://auth-api-v2.pmate.chat")}`,
27610
- ` ${import_chalk4.default.cyan("org")} Manage orgs, org members, and org visible apps via apps-api`,
27545
+ ` ${import_chalk4.default.cyan("org")} Manage registry metadata and Factory app distribution (not Merry membership)`,
27611
27546
  ` ${import_chalk4.default.gray(" list [--base-url <url>] [--json]")}`,
27612
27547
  ` ${import_chalk4.default.gray(" get <ns:org> [--base-url <url>] [--json]")}`,
27613
- ` ${import_chalk4.default.gray(" create <ns:org> --display-name <name> [--member <id> ...] [--base-url <url>] [--json]")}`,
27548
+ ` ${import_chalk4.default.gray(" create <ns:org> --display-name <name> [--base-url <url>] [--json]")}`,
27614
27549
  ` ${import_chalk4.default.gray(" update <ns:org> --display-name <name> [--base-url <url>] [--json]")}`,
27615
27550
  ` ${import_chalk4.default.gray(" disable <ns:org> [--base-url <url>] [--json]")}`,
27616
- ` ${import_chalk4.default.gray(" member list <ns:org> [--base-url <url>] [--json]")}`,
27617
- ` ${import_chalk4.default.gray(" member add <ns:org> --account <id> [--base-url <url>] [--json]")}`,
27618
- ` ${import_chalk4.default.gray(" member remove <ns:org> --account <id> [--base-url <url>] [--json]")}`,
27619
- ` ${import_chalk4.default.gray(" member set <ns:org> (--account <id> ... | --file <path>) [--base-url <url>] [--json]")}`,
27551
+ ` ${import_chalk4.default.gray(" member list <ns:org> [--base-url <url>] [--json] (legacy Factory roster only)")}`,
27620
27552
  ` ${import_chalk4.default.gray(" visible-app list <ns:org> [--base-url <url>] [--json]")}`,
27621
27553
  ` ${import_chalk4.default.gray(" visible-app add <ns:org> --app <ns:app> [--base-url <url>] [--json]")}`,
27622
27554
  ` ${import_chalk4.default.gray(" visible-app remove <ns:org> --app <ns:app> [--base-url <url>] [--json]")}`,
@@ -29405,6 +29337,11 @@ async function main() {
29405
29337
  process.stdout.write(JSON.stringify(sessionCommand(process.argv.slice(3))) + "\n");
29406
29338
  return;
29407
29339
  }
29340
+ const help = serviceHelp(process.argv.slice(2));
29341
+ if (help) {
29342
+ ui.plain(help);
29343
+ return;
29344
+ }
29408
29345
  await ensureManagedSession();
29409
29346
  const args = parseArgs(process.argv.slice(2));
29410
29347
  if (args.help) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pmate/cli",
3
- "version": "0.49.1",
3
+ "version": "0.49.3",
4
4
  "description": "CLI utilities for the pMate project",
5
5
  "license": "MIT",
6
6
  "bin": {