@revenexx/cli 0.0.7 → 0.0.9

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.
Files changed (78) hide show
  1. package/README.md +93 -84
  2. package/dist/bundle-win-arm64.mjs +66514 -58078
  3. package/dist/cli.cjs +66518 -58082
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/index.cjs +1243 -61
  6. package/dist/index.js +1243 -61
  7. package/dist/lib/client.d.ts +57 -1
  8. package/dist/lib/client.d.ts.map +1 -1
  9. package/dist/lib/command-picker.d.ts +17 -0
  10. package/dist/lib/command-picker.d.ts.map +1 -0
  11. package/dist/lib/commands/create/appsdk-core.d.ts +143 -0
  12. package/dist/lib/commands/create/appsdk-core.d.ts.map +1 -0
  13. package/dist/lib/commands/create/scaffold-app.d.ts +24 -0
  14. package/dist/lib/commands/create/scaffold-app.d.ts.map +1 -0
  15. package/dist/lib/commands/create/scaffold-theme.d.ts +22 -0
  16. package/dist/lib/commands/create/scaffold-theme.d.ts.map +1 -0
  17. package/dist/lib/commands/create.d.ts +3 -0
  18. package/dist/lib/commands/create.d.ts.map +1 -0
  19. package/dist/lib/commands/deploy.d.ts +3 -0
  20. package/dist/lib/commands/deploy.d.ts.map +1 -0
  21. package/dist/lib/commands/generic.d.ts +32 -1
  22. package/dist/lib/commands/generic.d.ts.map +1 -1
  23. package/dist/lib/commands/services/apps.d.ts.map +1 -1
  24. package/dist/lib/commands/services/avatars.d.ts.map +1 -1
  25. package/dist/lib/commands/services/carts.d.ts.map +1 -1
  26. package/dist/lib/commands/services/channels.d.ts.map +1 -1
  27. package/dist/lib/commands/services/customers.d.ts.map +1 -1
  28. package/dist/lib/commands/services/forms.d.ts.map +1 -1
  29. package/dist/lib/commands/services/greetings.d.ts.map +1 -1
  30. package/dist/lib/commands/services/inventories.d.ts.map +1 -1
  31. package/dist/lib/commands/services/locale.d.ts.map +1 -1
  32. package/dist/lib/commands/services/markets.d.ts.map +1 -1
  33. package/dist/lib/commands/services/messaging.d.ts.map +1 -1
  34. package/dist/lib/commands/services/orderlists.d.ts.map +1 -1
  35. package/dist/lib/commands/services/orders.d.ts.map +1 -1
  36. package/dist/lib/commands/services/pages.d.ts.map +1 -1
  37. package/dist/lib/commands/services/payments.d.ts.map +1 -1
  38. package/dist/lib/commands/services/prices.d.ts.map +1 -1
  39. package/dist/lib/commands/services/products.d.ts.map +1 -1
  40. package/dist/lib/commands/services/search.d.ts.map +1 -1
  41. package/dist/lib/commands/services/settings.d.ts.map +1 -1
  42. package/dist/lib/commands/services/shipping.d.ts.map +1 -1
  43. package/dist/lib/commands/services/sites.d.ts.map +1 -1
  44. package/dist/lib/commands/services/storage.d.ts.map +1 -1
  45. package/dist/lib/commands/services/tokens.d.ts.map +1 -1
  46. package/dist/lib/commands/skills.d.ts +3 -0
  47. package/dist/lib/commands/skills.d.ts.map +1 -0
  48. package/dist/lib/commands/tenants.d.ts.map +1 -1
  49. package/dist/lib/commands/update.d.ts.map +1 -1
  50. package/dist/lib/config.d.ts +21 -0
  51. package/dist/lib/config.d.ts.map +1 -1
  52. package/dist/lib/constants.d.ts +7 -3
  53. package/dist/lib/constants.d.ts.map +1 -1
  54. package/dist/lib/interactive.d.ts +68 -0
  55. package/dist/lib/interactive.d.ts.map +1 -0
  56. package/dist/lib/oauth.d.ts +97 -0
  57. package/dist/lib/oauth.d.ts.map +1 -0
  58. package/dist/lib/parser.d.ts +13 -6
  59. package/dist/lib/parser.d.ts.map +1 -1
  60. package/dist/lib/redact.d.ts +12 -0
  61. package/dist/lib/redact.d.ts.map +1 -0
  62. package/dist/lib/sdks.d.ts +7 -0
  63. package/dist/lib/sdks.d.ts.map +1 -1
  64. package/dist/lib/spinner.d.ts +9 -1
  65. package/dist/lib/spinner.d.ts.map +1 -1
  66. package/dist/lib/types.d.ts +10 -2
  67. package/dist/lib/types.d.ts.map +1 -1
  68. package/dist/tests/client-transport.test.d.ts +2 -0
  69. package/dist/tests/client-transport.test.d.ts.map +1 -0
  70. package/dist/tests/command-picker.test.d.ts +2 -0
  71. package/dist/tests/command-picker.test.d.ts.map +1 -0
  72. package/dist/tests/endpoint.test.d.ts +2 -0
  73. package/dist/tests/endpoint.test.d.ts.map +1 -0
  74. package/dist/tests/interactive.test.d.ts +2 -0
  75. package/dist/tests/interactive.test.d.ts.map +1 -0
  76. package/dist/tests/oauth.test.d.ts +2 -0
  77. package/dist/tests/oauth.test.d.ts.map +1 -0
  78. package/package.json +2 -1
@@ -6,12 +6,17 @@ export declare class RevenexxException extends Error {
6
6
  code?: number | string;
7
7
  type: string;
8
8
  response: string;
9
- constructor(message: string, code?: number | string, type?: string, response?: string);
9
+ /** Gateway correlation id (`x-request-id`), when the response carried one. */
10
+ requestId?: string;
11
+ constructor(message: string, code?: number | string, type?: string, response?: string, requestId?: string);
10
12
  }
11
13
  declare class Client {
12
14
  private endpoint;
13
15
  headers: Headers;
14
16
  private selfSigned;
17
+ private timeout;
18
+ private retry;
19
+ private debug;
15
20
  constructor();
16
21
  /**
17
22
  * Set Cookie
@@ -75,6 +80,19 @@ declare class Client {
75
80
  * @return self
76
81
  */
77
82
  setJWT(jwt: string): this;
83
+ /**
84
+ * Set Bearer token
85
+ *
86
+ * An OAuth2 / OIDC access token (e.g. from SSO sign-in), sent in the standard
87
+ * `Authorization: Bearer` header — the header the gateway validates for JWT
88
+ * auth (see sdk-generator PR #9). Adds the `Bearer ` prefix unless the caller
89
+ * already supplied one.
90
+ *
91
+ * @param {string} token
92
+ *
93
+ * @return self
94
+ */
95
+ setBearer(token: string): this;
78
96
  /**
79
97
  * Set Locale
80
98
  *
@@ -99,6 +117,11 @@ declare class Client {
99
117
  * @return this
100
118
  */
101
119
  setSelfSigned(status: boolean): this;
120
+ /**
121
+ * True for hosts where cleartext `http://` is acceptable during local
122
+ * development (loopback interfaces never leave the machine).
123
+ */
124
+ static isLoopbackHost(hostname: string): boolean;
102
125
  /**
103
126
  * Set endpoint.
104
127
  *
@@ -107,12 +130,45 @@ declare class Client {
107
130
  * @return this
108
131
  */
109
132
  setEndpoint(endpoint: string): this;
133
+ /**
134
+ * Set the per-request timeout in milliseconds. A request that exceeds this is
135
+ * aborted with a clear "timed out" error rather than hanging indefinitely.
136
+ *
137
+ * @param {number} ms
138
+ *
139
+ * @return this
140
+ */
141
+ setTimeout(ms: number): this;
142
+ /**
143
+ * Enable or disable automatic retries (bounded exponential backoff with
144
+ * jitter for idempotent requests, honoring `Retry-After`). On by default.
145
+ *
146
+ * @param {boolean} enabled
147
+ *
148
+ * @return this
149
+ */
150
+ setRetry(enabled: boolean): this;
151
+ /**
152
+ * Enable redacted HTTP debug logging (request line, status, duration,
153
+ * request id) to stderr. Off by default.
154
+ *
155
+ * @param {boolean} enabled
156
+ *
157
+ * @return this
158
+ */
159
+ setDebug(enabled: boolean): this;
110
160
  /**
111
161
  * @param {string} key
112
162
  * @param {string} value
113
163
  */
114
164
  addHeader(key: string, value: string): this;
115
165
  call<T = unknown>(method: string, path?: string, headers?: Headers, params?: RequestParams, responseType?: ResponseType): Promise<T>;
166
+ /**
167
+ * Redacted, opt-in HTTP debug line on stderr (request line, status/outcome,
168
+ * duration, and gateway request id). Everything is passed through
169
+ * redactSecrets so auth material in the path can never leak.
170
+ */
171
+ private logDebug;
116
172
  static flatten(data: RequestParams, prefix?: string): Record<string, unknown>;
117
173
  }
118
174
  export default Client;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../lib/client.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,OAAO,EACP,aAAa,EACb,YAAY,EAEb,MAAM,YAAY,CAAC;AAWpB;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;gBAGf,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EACtB,IAAI,G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G;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK/B;;;;;;OAMG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAK3B;;;;;;OAMG;IACH,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAKpC;;;OAGG;IACH,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAShD;;;;;;OAMG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAiCnC;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAO5B;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAKhC;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAKhC;;;OAGG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAKrC,IAAI,CAAC,CAAC,GAAG,OAAO,EACpB,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,MAAW,EACjB,OAAO,GAAE,OAAY,EACrB,MAAM,GAAE,aAAkB,EAC1B,YAAY,GAAE,YAAqB,GAClC,OAAO,CAAC,CAAC,CAAC;IAgMb;;;;OAIG;IACH,OAAO,CAAC,QAAQ;IAahB,MAAM,CAAC,OAAO,CACZ,IAAI,EAAE,aAAa,EACnB,MAAM,GAAE,MAAW,GAClB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAmB3B;AAED,eAAe,MAAM,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { Command } from "commander";
2
+ /**
3
+ * Resolve the command line interactively before commander parses it (guided
4
+ * mode, DX-98 stretch goal):
5
+ *
6
+ * - `revenexx` on a TTY picks a command, then a subcommand — the picked
7
+ * command's own prompting (lib/interactive.ts) walks through its options.
8
+ * - `revenexx p` with an unknown/partial name opens the picker filtered to
9
+ * matching commands; remaining argv passes through to the resolved command.
10
+ *
11
+ * Everywhere else (non-TTY, `--json`, help/version requests, flags first,
12
+ * fully valid command lines) the original argv is returned untouched so
13
+ * commander's behavior — including its errors — stays byte-identical. Any
14
+ * picker failure also falls back to the original argv.
15
+ */
16
+ export declare const resolveCommandArgv: (program: Command, argv: string[]) => Promise<string[]>;
17
+ //# sourceMappingURL=command-picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-picker.d.ts","sourceRoot":"","sources":["../../lib/command-picker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmFzC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS,OAAO,EAChB,MAAM,MAAM,EAAE,KACb,OAAO,CAAC,MAAM,EAAE,CAsDlB,CAAC"}
@@ -0,0 +1,143 @@
1
+ export type Op = "list" | "get" | "create" | "update" | "delete";
2
+ export interface ColumnDef {
3
+ type: string;
4
+ pk?: boolean;
5
+ notNull?: boolean;
6
+ default?: string | null;
7
+ check?: string;
8
+ }
9
+ /** Map a manifest access list (e.g. ['read','create']) to a Set of ops. */
10
+ export declare function opsFromAccess(access?: string[]): Set<Op>;
11
+ export interface BuiltEntity {
12
+ table: string;
13
+ pk: string;
14
+ columns: Record<string, ColumnDef>;
15
+ ops: Op[];
16
+ }
17
+ export interface Manifest {
18
+ name?: string;
19
+ vendor?: string;
20
+ permissions?: Array<Record<string, unknown>>;
21
+ }
22
+ export interface Schema {
23
+ entities?: Record<string, {
24
+ columns?: Record<string, ColumnDef>;
25
+ }>;
26
+ }
27
+ /** Lowercase snake_case, mirroring Baseline's NamespaceResolver::normalizeSlug. */
28
+ export declare function slug(raw: string): string;
29
+ /** Fully-namespaced Postgres table an App's entity maps to. */
30
+ export declare function tableName(vendor: string, app: string, entity: string): string;
31
+ /** Build entity descriptors from schema + manifest permissions + vendor/app. */
32
+ export declare function buildEntities(args: {
33
+ schema: Schema;
34
+ permissions?: Array<Record<string, unknown>>;
35
+ vendor: string;
36
+ app: string;
37
+ }): Record<string, BuiltEntity>;
38
+ /** Postgres column type → TypeScript type. */
39
+ export declare function tsType(type?: string): string;
40
+ /** Postgres column type → PHP type hint (nullable handled by the caller). */
41
+ export declare function phpType(type?: string): string;
42
+ export declare function pascal(s: string): string;
43
+ export declare function idTsType(entity: BuiltEntity): "string" | "number";
44
+ export interface Capability {
45
+ type: "define";
46
+ capability: string;
47
+ version: string;
48
+ summary: string;
49
+ route: {
50
+ method: string;
51
+ path: string;
52
+ };
53
+ parameters?: Array<Record<string, unknown>>;
54
+ request?: Record<string, unknown>;
55
+ response: Record<string, unknown>;
56
+ cache?: Record<string, unknown>;
57
+ }
58
+ /** Postgres column type → JSON Schema fragment. */
59
+ export declare function jsonSchemaType(type?: string): Record<string, unknown>;
60
+ /** A titled JSON Schema object for an entity (its row shape). */
61
+ export declare function entitySchema(entity: string, columns: Record<string, ColumnDef>): Record<string, unknown>;
62
+ /** The pagination envelope every list response carries (platform convention). */
63
+ export declare const PAGE_SCHEMA: Record<string, unknown>;
64
+ /**
65
+ * mountCrud honors exact-column filters, single-column `order` and
66
+ * limit/offset pagination. Declaring these surfaces them as TYPED SDK
67
+ * arguments and lets the gateway validate them; without them callers are
68
+ * stuck on page 1.
69
+ */
70
+ export declare const PAGINATION_PARAMS: Array<Record<string, unknown>>;
71
+ export interface CapabilityGenOptions {
72
+ schema: Schema;
73
+ /** Manifest permissions register — entity grants drive which entities/ops are exposed. */
74
+ permissions?: Array<Record<string, unknown>>;
75
+ /** Restrict to these entity names (default: all permitted). */
76
+ only?: string[];
77
+ /** Capability contract version (default 1.0.0). */
78
+ version?: string;
79
+ /**
80
+ * App slug. When set, capabilities and routes follow the platform app
81
+ * contract: capability `{app}.{entity}.{op}`, route `/{app}/{entity}`,
82
+ * and list ops carry the pagination parameters.
83
+ */
84
+ appPrefix?: string;
85
+ }
86
+ /**
87
+ * Build CRUD capability stubs for every entity the manifest grants access to,
88
+ * with the ops derived from that entity's access and a titled object schema
89
+ * from schema.json.
90
+ */
91
+ export declare function buildCapabilities(opts: CapabilityGenOptions): Capability[];
92
+ /**
93
+ * Merge generated capabilities into an existing list: generated entries replace
94
+ * any with the same `capability` key (idempotent re-generation), hand-written
95
+ * capabilities with other keys are preserved.
96
+ */
97
+ export declare function mergeCapabilities(existing?: Array<Record<string, unknown>>, generated?: Capability[]): Array<Record<string, unknown>>;
98
+ export interface EmitInput {
99
+ vendor: string;
100
+ app: string;
101
+ entities: Record<string, BuiltEntity>;
102
+ options: {
103
+ runtimeModule?: string;
104
+ phpNamespace?: string;
105
+ };
106
+ }
107
+ export interface EmittedFile {
108
+ /** Path relative to the output directory. */
109
+ path: string;
110
+ content: string;
111
+ }
112
+ /**
113
+ * A code emitter for one target language. Register a new one to add a language
114
+ * target — the shared entity model above is language-agnostic.
115
+ */
116
+ export interface Emitter {
117
+ readonly target: string;
118
+ emit(input: EmitInput): EmittedFile[];
119
+ }
120
+ export declare function registerEmitter(emitter: Emitter): void;
121
+ export declare function emitterTargets(): string[];
122
+ export declare function getEmitter(target: string): Emitter;
123
+ export declare const jsEmitter: Emitter;
124
+ export declare const phpEmitter: Emitter;
125
+ export interface GenerateOptions {
126
+ schemaPath: string;
127
+ manifestPath: string;
128
+ outDir: string;
129
+ target?: string;
130
+ runtimeModule?: string;
131
+ phpNamespace?: string;
132
+ vendor?: string;
133
+ app?: string;
134
+ }
135
+ export interface GenerateResult {
136
+ target: string;
137
+ outDir: string;
138
+ files: string[];
139
+ entities: string[];
140
+ }
141
+ /** Read schema.json + manifest.json and emit a client for the chosen target. */
142
+ export declare function generateClient(opts: GenerateOptions): GenerateResult;
143
+ //# sourceMappingURL=appsdk-core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appsdk-core.d.ts","sourceRoot":"","sources":["../../../../lib/commands/create/appsdk-core.ts"],"names":[],"mappings":"AAeA,MAAM,MAAM,EAAE,GAAG,MAAM,GAAG,KAAK,GA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;IACxB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,WAAW,EAAE,CAAC;CACvC;AAID,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAEtD;AAED,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAMlD;AA8FD,eAAO,MAAM,SAAS,EAAE,OASvB,CAAC;AAwHF,eAAO,MAAM,UAAU,EAAE,OA4DxB,CAAC;AASF,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,gFAAgF;AAChF,wBAAgB,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,CAkCpE"}
@@ -0,0 +1,24 @@
1
+ export interface AppScaffoldOptions {
2
+ name: string;
3
+ title: string;
4
+ description: string;
5
+ vendor: string;
6
+ entities: string[];
7
+ dir: string;
8
+ appSdkVersion: string;
9
+ schemasBase: string;
10
+ }
11
+ export interface ScaffoldedFile {
12
+ path: string;
13
+ bytes: number;
14
+ }
15
+ export interface ScaffoldResult {
16
+ root: string;
17
+ files: ScaffoldedFile[];
18
+ warnings: string[];
19
+ nextSteps: string[];
20
+ }
21
+ export declare function validateAppName(name: string): string | null;
22
+ export declare function validateEntityName(entity: string): string | null;
23
+ export declare function scaffoldApp(opts: AppScaffoldOptions): ScaffoldResult;
24
+ //# sourceMappingURL=scaffold-app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scaffold-app.d.ts","sourceRoot":"","sources":["../../../../lib/commands/create/scaffold-app.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAoBD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI3D;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIhE;AA+hBD,wBAAgB,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,cAAc,CA8EpE"}
@@ -0,0 +1,22 @@
1
+ export interface ThemeScaffoldOptions {
2
+ name: string;
3
+ title: string;
4
+ description: string;
5
+ vendor: string;
6
+ billingType: "free" | "included";
7
+ dir: string;
8
+ schemasBase: string;
9
+ }
10
+ export interface ScaffoldedFile {
11
+ path: string;
12
+ bytes: number;
13
+ }
14
+ export interface ThemeScaffoldResult {
15
+ root: string;
16
+ files: ScaffoldedFile[];
17
+ warnings: string[];
18
+ nextSteps: string[];
19
+ }
20
+ export declare function validateThemeName(name: string): string | null;
21
+ export declare function scaffoldTheme(opts: ThemeScaffoldOptions): ThemeScaffoldResult;
22
+ //# sourceMappingURL=scaffold-theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scaffold-theme.d.ts","sourceRoot":"","sources":["../../../../lib/commands/create/scaffold-theme.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,GAAG,UAAU,CAAC;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAID,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG7D;AAwRD,wBAAgB,aAAa,CAAC,IAAI,EAAE,oBAAoB,GAAG,mBAAmB,CA+B7E"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const create: Command;
3
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../lib/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAmM5C,eAAO,MAAM,MAAM,SA2DhB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const deploy: Command;
3
+ //# sourceMappingURL=deploy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../lib/commands/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqUpC,eAAO,MAAM,MAAM,SAgChB,CAAC"}
@@ -27,11 +27,42 @@ export type ApiKeyValidationResult = {
27
27
  */
28
28
  export declare const classifyApiKeyProbe: (err: unknown | null, tenant: string) => ApiKeyValidationResult;
29
29
  export declare const validateApiKey: (apiKey: string, endpoint: string, tenant: string) => Promise<ApiKeyValidationResult>;
30
- export declare const loginCommand: ({ endpoint, key, token, tenant, }: {
30
+ /**
31
+ * Minimal session-store surface the SSO flow writes to. Declared structurally
32
+ * so the persistence step can be unit-tested with an in-memory fake instead of
33
+ * the on-disk `globalConfig` singleton.
34
+ */
35
+ export interface SsoSessionStore {
36
+ addSession(id: string, data: {
37
+ endpoint: string;
38
+ }): void;
39
+ setCurrentSession(id: string): void;
40
+ setEndpoint(endpoint: string): void;
41
+ setJWT(jwt: string): void;
42
+ setRefreshToken(refreshToken: string): void;
43
+ setJwtExpires(expiresAt: number): void;
44
+ setEmail(email: string): void;
45
+ setAuthMethod(authMethod: string): void;
46
+ }
47
+ export interface SsoSessionInput {
48
+ endpoint: string;
49
+ jwt: string;
50
+ refreshToken?: string;
51
+ expiresAt?: number;
52
+ email?: string;
53
+ }
54
+ /**
55
+ * Persist a freshly-minted SSO session into the global store and make it the
56
+ * current session. Returns the new session id.
57
+ */
58
+ export declare const storeSsoSession: (store: SsoSessionStore, input: SsoSessionInput) => string;
59
+ export declare const loginCommand: ({ endpoint, key, token, tenant, browser, sso, }: {
31
60
  endpoint?: string;
32
61
  key?: string;
33
62
  token?: string;
34
63
  tenant?: string;
64
+ browser?: boolean;
65
+ sso?: boolean;
35
66
  }) => Promise<void>;
36
67
  export declare const whoami: Command;
37
68
  export declare const register: Command;
@@ -1 +1 @@
1
- {"version":3,"file":"generic.d.ts","sourceRoot":"","sources":["../../../lib/commands/generic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiEpC;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAC9B,aAAa,GACb,gBAAgB,GAChB,gBAAgB,GAChB,OAAO,CAAC;AAEZ,MAAM,MAAM,sBAAsB,GAC9B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAAE,GAClD;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,sBAAsB,CAAA;CAAE,CAAC;AAEhE;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,GAC9B,KAAK,OAAO,GAAG,IAAI,EACnB,QAAQ,MAAM,KACb,sBAgDF,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,QAAQ,MAAM,EACd,UAAU,MAAM,EAChB,QAAQ,MAAM,KACb,OAAO,CAAC,sBAAsB,CAWhC,CAAC;AAEF,eAAO,MAAM,YAAY,GAAU,mCAKhC;IACD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,KAAG,OAAO,CAAC,IAAI,CA8Df,CAAC;AAEF,eAAO,MAAM,MAAM,SAwChB,CAAC;AAEJ,eAAO,MAAM,QAAQ,SAMlB,CAAC;AAEJ,eAAO,MAAM,KAAK,SAkBmB,CAAC;AAEtC,eAAO,MAAM,MAAM,SA6DhB,CAAC;AAWJ,eAAO,MAAM,MAAM,SAwIhB,CAAC;AAEJ,eAAO,MAAM,OAAO,QAAa,OAAO,CAAC,IAAI,CAmB5C,CAAC"}
1
+ {"version":3,"file":"generic.d.ts","sourceRoot":"","sources":["../../../lib/commands/generic.ts"],"names":[],"m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AAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,eAAe,EACtB,OAAO,eAAe,KACrB,MAeF,CAAC;AAyGF,eAAO,MAAM,YAAY,GAAU,iDAOhC;IACD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,KAAG,OAAO,CAAC,IAAI,CAgEf,CAAC;AAEF,eAAO,MAAM,MAAM,SAkEhB,CAAC;AAEJ,eAAO,MAAM,QAAQ,SAMlB,CAAC;AAEJ,eAAO,MAAM,KAAK,SAuBmB,CAAC;AA6BtC,eAAO,MAAM,MAAM,SAiEhB,CAAC;AAWJ,eAAO,MAAM,MAAM,SAwIhB,CAAC;AAEJ,eAAO,MAAM,OAAO,QAAa,OAAO,CAAC,IAAI,CAmB5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/apps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,eAAO,MAAM,IAAI,SAIb,CAAC"}
1
+ {"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/apps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBpC,eAAO,MAAM,IAAI,SAOb,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"avatars.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/avatars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,OAAO,SAIhB,CAAC"}
1
+ {"version":3,"file":"avatars.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/avatars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,eAAO,MAAM,OAAO,SAOhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"carts.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/carts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,KAAK,SAId,CAAC"}
1
+ {"version":3,"file":"carts.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/carts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC,eAAO,MAAM,KAAK,SAOd,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/channels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,QAAQ,SAIjB,CAAC"}
1
+ {"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/channels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC,eAAO,MAAM,QAAQ,SAOjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/customers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,SAAS,SAIlB,CAAC"}
1
+ {"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/customers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC,eAAO,MAAM,SAAS,SAOlB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/forms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,eAAO,MAAM,KAAK,SAId,CAAC"}
1
+ {"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/forms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,eAAO,MAAM,KAAK,SAOd,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"greetings.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/greetings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,eAAO,MAAM,SAAS,SAIlB,CAAC"}
1
+ {"version":3,"file":"greetings.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/greetings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAapC,eAAO,MAAM,SAAS,SAOlB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"inventories.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/inventories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,WAAW,SAIpB,CAAC"}
1
+ {"version":3,"file":"inventories.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/inventories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC,eAAO,MAAM,WAAW,SAOpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/locale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,eAAO,MAAM,MAAM,SAIf,CAAC"}
1
+ {"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/locale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,eAAO,MAAM,MAAM,SAOf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"markets.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/markets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,OAAO,SAIhB,CAAC"}
1
+ {"version":3,"file":"markets.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/markets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC,eAAO,MAAM,OAAO,SAOhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"messaging.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/messaging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,SAAS,SAIlB,CAAC"}
1
+ {"version":3,"file":"messaging.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/messaging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC,eAAO,MAAM,SAAS,SAOlB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"orderlists.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/orderlists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,UAAU,SAInB,CAAC"}
1
+ {"version":3,"file":"orderlists.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/orderlists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC,eAAO,MAAM,UAAU,SAOnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"orders.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/orders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,eAAO,MAAM,MAAM,SAIf,CAAC"}
1
+ {"version":3,"file":"orders.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/orders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,eAAO,MAAM,MAAM,SAOf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/pages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,KAAK,SAId,CAAC"}
1
+ {"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/pages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC,eAAO,MAAM,KAAK,SAOd,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/payments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,QAAQ,SAIjB,CAAC"}
1
+ {"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/payments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC,eAAO,MAAM,QAAQ,SAOjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"prices.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/prices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,MAAM,SAIf,CAAC"}
1
+ {"version":3,"file":"prices.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/prices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC,eAAO,MAAM,MAAM,SAOf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/products.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,QAAQ,SAIjB,CAAC"}
1
+ {"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/products.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC,eAAO,MAAM,QAAQ,SAOjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,eAAO,MAAM,MAAM,SAIf,CAAC"}
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAapC,eAAO,MAAM,MAAM,SAOf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,eAAO,MAAM,QAAQ,SAIjB,CAAC"}
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,eAAO,MAAM,QAAQ,SAOjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"shipping.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/shipping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,QAAQ,SAIjB,CAAC"}
1
+ {"version":3,"file":"shipping.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/shipping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC,eAAO,MAAM,QAAQ,SAOjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/sites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,eAAO,MAAM,KAAK,SAId,CAAC"}
1
+ {"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/sites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBpC,eAAO,MAAM,KAAK,SAOd,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,eAAO,MAAM,OAAO,SAIhB,CAAC"}
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBpC,eAAO,MAAM,OAAO,SAOhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,eAAO,MAAM,MAAM,SAIf,CAAC"}
1
+ {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,eAAO,MAAM,MAAM,SAOf,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const skills: Command;
3
+ //# sourceMappingURL=skills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../../lib/commands/skills.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4QpC,eAAO,MAAM,MAAM,SAOf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tenants.d.ts","sourceRoot":"","sources":["../../../lib/commands/tenants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBpC,eAAO,MAAM,iBAAiB,QAAO,MACW,CAAC;AAEjD,eAAO,MAAM,gBAAgB,GAAI,OAAM,MAA4B,KAAG,MAUrE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,MAAM,MAAM,EACZ,OAAM,MAA4B,KACjC,IAGF,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,SAAS,aAAa,KAAG,WAAW,EA0BvE,CAAC;AA2BF,eAAO,MAAM,OAAO,SAIhB,CAAC"}
1
+ {"version":3,"file":"tenants.d.ts","sourceRoot":"","sources":["../../../lib/commands/tenants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBpC,eAAO,MAAM,iBAAiB,QAAO,MACW,CAAC;AAEjD,eAAO,MAAM,gBAAgB,GAAI,OAAM,MAA4B,KAAG,MAUrE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,MAAM,MAAM,EACZ,OAAM,MAA4B,KACjC,IAgBF,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,SAAS,aAAa,KAAG,WAAW,EA0BvE,CAAC;AA2BF,eAAO,MAAM,OAAO,SAIhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../lib/commands/update.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuPpC,eAAO,MAAM,MAAM,SAMe,CAAC"}
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../lib/commands/update.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsOpC,eAAO,MAAM,MAAM,SAMe,CAAC"}
@@ -15,6 +15,14 @@ declare class Config<T extends ConfigData = ConfigData> {
15
15
  constructor(path: string);
16
16
  read(): void;
17
17
  write(): void;
18
+ /**
19
+ * Persist `serialized` to `this.path` with owner-only permissions. The
20
+ * containing directory is created `0o700` and the file `0o600`; because
21
+ * `writeFileSync`'s `mode` only applies when the file is *created*, the
22
+ * mode is reasserted with `chmodSync` on every write to repair drift on
23
+ * files that predate this hardening or were written under a loose umask.
24
+ */
25
+ protected writeSecure(serialized: string): void;
18
26
  get<K extends keyof T>(key: K): T[K];
19
27
  set<K extends keyof T>(key: K, value: T[K]): void;
20
28
  delete(key: string): void;
@@ -82,11 +90,16 @@ declare class Global extends Config<GlobalConfigData> {
82
90
  static PREFERENCE_KEY: "key";
83
91
  static PREFERENCE_LOCALE: "locale";
84
92
  static PREFERENCE_MODE: "mode";
93
+ static PREFERENCE_JWT: "jwt";
94
+ static PREFERENCE_REFRESH_TOKEN: "refreshToken";
95
+ static PREFERENCE_JWT_EXPIRES: "jwtExpiresAt";
96
+ static PREFERENCE_AUTH_METHOD: "authMethod";
85
97
  static IGNORE_ATTRIBUTES: readonly string[];
86
98
  static MODE_ADMIN: string;
87
99
  static MODE_DEFAULT: string;
88
100
  static PROJECT_CONSOLE: string;
89
101
  constructor(path?: string);
102
+ write(): void;
90
103
  getCurrentSession(): string;
91
104
  setCurrentSession(session: string): void;
92
105
  getSessionIds(): string[];
@@ -109,6 +122,14 @@ declare class Global extends Config<GlobalConfigData> {
109
122
  setProject(project: string): void;
110
123
  getKey(): string;
111
124
  setKey(key: string): void;
125
+ getJWT(): string;
126
+ setJWT(jwt: string): void;
127
+ getRefreshToken(): string;
128
+ setRefreshToken(refreshToken: string): void;
129
+ getJwtExpires(): number;
130
+ setJwtExpires(expiresAt: number): void;
131
+ getAuthMethod(): string;
132
+ setAuthMethod(authMethod: string): void;
112
133
  hasFrom(key: string): boolean;
113
134
  getFrom(key: string): any;
114
135
  setTo(key: string, value: any): void;