@fluidgrids/cli 2026.1108.1 → 2026.1109.1

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 (238) hide show
  1. package/README.md +1 -1
  2. package/dist/cli.js +9705 -33
  3. package/package.json +36 -32
  4. package/dist/auth/device-login.d.ts +0 -31
  5. package/dist/auth/device-login.d.ts.map +0 -1
  6. package/dist/auth/device-login.js +0 -75
  7. package/dist/auth/device-login.js.map +0 -1
  8. package/dist/auth/token-auth.d.ts +0 -49
  9. package/dist/auth/token-auth.d.ts.map +0 -1
  10. package/dist/auth/token-auth.js +0 -279
  11. package/dist/auth/token-auth.js.map +0 -1
  12. package/dist/cli.d.ts +0 -10
  13. package/dist/cli.d.ts.map +0 -1
  14. package/dist/cli.js.map +0 -1
  15. package/dist/code-first/api.d.ts +0 -607
  16. package/dist/code-first/api.d.ts.map +0 -1
  17. package/dist/code-first/api.js +0 -438
  18. package/dist/code-first/api.js.map +0 -1
  19. package/dist/code-first/code-upload.d.ts +0 -68
  20. package/dist/code-first/code-upload.d.ts.map +0 -1
  21. package/dist/code-first/code-upload.js +0 -223
  22. package/dist/code-first/code-upload.js.map +0 -1
  23. package/dist/code-first/commands/codegen.d.ts +0 -20
  24. package/dist/code-first/commands/codegen.d.ts.map +0 -1
  25. package/dist/code-first/commands/codegen.js +0 -50
  26. package/dist/code-first/commands/codegen.js.map +0 -1
  27. package/dist/code-first/commands/diff.d.ts +0 -28
  28. package/dist/code-first/commands/diff.d.ts.map +0 -1
  29. package/dist/code-first/commands/diff.js +0 -73
  30. package/dist/code-first/commands/diff.js.map +0 -1
  31. package/dist/code-first/commands/hotfix.d.ts +0 -55
  32. package/dist/code-first/commands/hotfix.d.ts.map +0 -1
  33. package/dist/code-first/commands/hotfix.js +0 -231
  34. package/dist/code-first/commands/hotfix.js.map +0 -1
  35. package/dist/code-first/commands/import.d.ts +0 -40
  36. package/dist/code-first/commands/import.d.ts.map +0 -1
  37. package/dist/code-first/commands/import.js +0 -235
  38. package/dist/code-first/commands/import.js.map +0 -1
  39. package/dist/code-first/commands/init.d.ts +0 -33
  40. package/dist/code-first/commands/init.d.ts.map +0 -1
  41. package/dist/code-first/commands/init.js +0 -177
  42. package/dist/code-first/commands/init.js.map +0 -1
  43. package/dist/code-first/commands/interface.d.ts +0 -12
  44. package/dist/code-first/commands/interface.d.ts.map +0 -1
  45. package/dist/code-first/commands/interface.js +0 -21
  46. package/dist/code-first/commands/interface.js.map +0 -1
  47. package/dist/code-first/commands/pull.d.ts +0 -63
  48. package/dist/code-first/commands/pull.d.ts.map +0 -1
  49. package/dist/code-first/commands/pull.js +0 -266
  50. package/dist/code-first/commands/pull.js.map +0 -1
  51. package/dist/code-first/commands/push.d.ts +0 -104
  52. package/dist/code-first/commands/push.d.ts.map +0 -1
  53. package/dist/code-first/commands/push.js +0 -320
  54. package/dist/code-first/commands/push.js.map +0 -1
  55. package/dist/code-first/commands/replay.d.ts +0 -44
  56. package/dist/code-first/commands/replay.d.ts.map +0 -1
  57. package/dist/code-first/commands/replay.js +0 -271
  58. package/dist/code-first/commands/replay.js.map +0 -1
  59. package/dist/code-first/commands/runs.d.ts +0 -168
  60. package/dist/code-first/commands/runs.d.ts.map +0 -1
  61. package/dist/code-first/commands/runs.js +0 -598
  62. package/dist/code-first/commands/runs.js.map +0 -1
  63. package/dist/code-first/commands/suite.d.ts +0 -57
  64. package/dist/code-first/commands/suite.d.ts.map +0 -1
  65. package/dist/code-first/commands/suite.js +0 -197
  66. package/dist/code-first/commands/suite.js.map +0 -1
  67. package/dist/code-first/commands/validate.d.ts +0 -38
  68. package/dist/code-first/commands/validate.d.ts.map +0 -1
  69. package/dist/code-first/commands/validate.js +0 -140
  70. package/dist/code-first/commands/validate.js.map +0 -1
  71. package/dist/code-first/commands/versions.d.ts +0 -63
  72. package/dist/code-first/commands/versions.d.ts.map +0 -1
  73. package/dist/code-first/commands/versions.js +0 -204
  74. package/dist/code-first/commands/versions.js.map +0 -1
  75. package/dist/code-first/connections.d.ts +0 -55
  76. package/dist/code-first/connections.d.ts.map +0 -1
  77. package/dist/code-first/connections.js +0 -180
  78. package/dist/code-first/connections.js.map +0 -1
  79. package/dist/code-first/durable-operations.d.ts +0 -41
  80. package/dist/code-first/durable-operations.d.ts.map +0 -1
  81. package/dist/code-first/durable-operations.js +0 -135
  82. package/dist/code-first/durable-operations.js.map +0 -1
  83. package/dist/code-first/history.d.ts +0 -30
  84. package/dist/code-first/history.d.ts.map +0 -1
  85. package/dist/code-first/history.js +0 -139
  86. package/dist/code-first/history.js.map +0 -1
  87. package/dist/code-first/imports.d.ts +0 -22
  88. package/dist/code-first/imports.d.ts.map +0 -1
  89. package/dist/code-first/imports.js +0 -67
  90. package/dist/code-first/imports.js.map +0 -1
  91. package/dist/code-first/index.d.ts +0 -18
  92. package/dist/code-first/index.d.ts.map +0 -1
  93. package/dist/code-first/index.js +0 -36
  94. package/dist/code-first/index.js.map +0 -1
  95. package/dist/code-first/junit.d.ts +0 -24
  96. package/dist/code-first/junit.d.ts.map +0 -1
  97. package/dist/code-first/junit.js +0 -163
  98. package/dist/code-first/junit.js.map +0 -1
  99. package/dist/code-first/lowering.d.ts +0 -104
  100. package/dist/code-first/lowering.d.ts.map +0 -1
  101. package/dist/code-first/lowering.js +0 -254
  102. package/dist/code-first/lowering.js.map +0 -1
  103. package/dist/code-first/operations.d.ts +0 -55
  104. package/dist/code-first/operations.d.ts.map +0 -1
  105. package/dist/code-first/operations.js +0 -165
  106. package/dist/code-first/operations.js.map +0 -1
  107. package/dist/code-first/parity-operations.d.ts +0 -44
  108. package/dist/code-first/parity-operations.d.ts.map +0 -1
  109. package/dist/code-first/parity-operations.js +0 -211
  110. package/dist/code-first/parity-operations.js.map +0 -1
  111. package/dist/code-first/parity.d.ts +0 -83
  112. package/dist/code-first/parity.d.ts.map +0 -1
  113. package/dist/code-first/parity.js +0 -301
  114. package/dist/code-first/parity.js.map +0 -1
  115. package/dist/code-first/presigned.d.ts +0 -21
  116. package/dist/code-first/presigned.d.ts.map +0 -1
  117. package/dist/code-first/presigned.js +0 -85
  118. package/dist/code-first/presigned.js.map +0 -1
  119. package/dist/code-first/project.d.ts +0 -130
  120. package/dist/code-first/project.d.ts.map +0 -1
  121. package/dist/code-first/project.js +0 -308
  122. package/dist/code-first/project.js.map +0 -1
  123. package/dist/code-first/python-build.d.ts +0 -78
  124. package/dist/code-first/python-build.d.ts.map +0 -1
  125. package/dist/code-first/python-build.js +0 -268
  126. package/dist/code-first/python-build.js.map +0 -1
  127. package/dist/code-first/python.d.ts +0 -103
  128. package/dist/code-first/python.d.ts.map +0 -1
  129. package/dist/code-first/python.js +0 -260
  130. package/dist/code-first/python.js.map +0 -1
  131. package/dist/code-first/redact.d.ts +0 -31
  132. package/dist/code-first/redact.d.ts.map +0 -1
  133. package/dist/code-first/redact.js +0 -159
  134. package/dist/code-first/redact.js.map +0 -1
  135. package/dist/code-first/register.d.ts +0 -35
  136. package/dist/code-first/register.d.ts.map +0 -1
  137. package/dist/code-first/register.js +0 -420
  138. package/dist/code-first/register.js.map +0 -1
  139. package/dist/code-first/remote.d.ts +0 -58
  140. package/dist/code-first/remote.d.ts.map +0 -1
  141. package/dist/code-first/remote.js +0 -126
  142. package/dist/code-first/remote.js.map +0 -1
  143. package/dist/code-first/replay.d.ts +0 -36
  144. package/dist/code-first/replay.d.ts.map +0 -1
  145. package/dist/code-first/replay.js +0 -52
  146. package/dist/code-first/replay.js.map +0 -1
  147. package/dist/code-first/shared.d.ts +0 -53
  148. package/dist/code-first/shared.d.ts.map +0 -1
  149. package/dist/code-first/shared.js +0 -94
  150. package/dist/code-first/shared.js.map +0 -1
  151. package/dist/code-first/test-suite-operations.d.ts +0 -16
  152. package/dist/code-first/test-suite-operations.d.ts.map +0 -1
  153. package/dist/code-first/test-suite-operations.js +0 -44
  154. package/dist/code-first/test-suite-operations.js.map +0 -1
  155. package/dist/config/apply.d.ts +0 -51
  156. package/dist/config/apply.d.ts.map +0 -1
  157. package/dist/config/apply.js +0 -121
  158. package/dist/config/apply.js.map +0 -1
  159. package/dist/config/commands.d.ts +0 -58
  160. package/dist/config/commands.d.ts.map +0 -1
  161. package/dist/config/commands.js +0 -252
  162. package/dist/config/commands.js.map +0 -1
  163. package/dist/config/profiles.d.ts +0 -108
  164. package/dist/config/profiles.d.ts.map +0 -1
  165. package/dist/config/profiles.js +0 -339
  166. package/dist/config/profiles.js.map +0 -1
  167. package/dist/flag-hint.d.ts +0 -46
  168. package/dist/flag-hint.d.ts.map +0 -1
  169. package/dist/flag-hint.js +0 -114
  170. package/dist/flag-hint.js.map +0 -1
  171. package/dist/modules.d.ts +0 -17
  172. package/dist/modules.d.ts.map +0 -1
  173. package/dist/modules.js +0 -65
  174. package/dist/modules.js.map +0 -1
  175. package/dist/phase-c/api.d.ts +0 -433
  176. package/dist/phase-c/api.d.ts.map +0 -1
  177. package/dist/phase-c/api.js +0 -334
  178. package/dist/phase-c/api.js.map +0 -1
  179. package/dist/phase-c/commands/activities.d.ts +0 -119
  180. package/dist/phase-c/commands/activities.d.ts.map +0 -1
  181. package/dist/phase-c/commands/activities.js +0 -287
  182. package/dist/phase-c/commands/activities.js.map +0 -1
  183. package/dist/phase-c/commands/batch.d.ts +0 -90
  184. package/dist/phase-c/commands/batch.d.ts.map +0 -1
  185. package/dist/phase-c/commands/batch.js +0 -296
  186. package/dist/phase-c/commands/batch.js.map +0 -1
  187. package/dist/phase-c/commands/queues.d.ts +0 -67
  188. package/dist/phase-c/commands/queues.d.ts.map +0 -1
  189. package/dist/phase-c/commands/queues.js +0 -183
  190. package/dist/phase-c/commands/queues.js.map +0 -1
  191. package/dist/phase-c/commands/run-control.d.ts +0 -76
  192. package/dist/phase-c/commands/run-control.d.ts.map +0 -1
  193. package/dist/phase-c/commands/run-control.js +0 -245
  194. package/dist/phase-c/commands/run-control.js.map +0 -1
  195. package/dist/phase-c/commands/schedules.d.ts +0 -63
  196. package/dist/phase-c/commands/schedules.d.ts.map +0 -1
  197. package/dist/phase-c/commands/schedules.js +0 -198
  198. package/dist/phase-c/commands/schedules.js.map +0 -1
  199. package/dist/phase-c/commands/search-attributes.d.ts +0 -30
  200. package/dist/phase-c/commands/search-attributes.d.ts.map +0 -1
  201. package/dist/phase-c/commands/search-attributes.js +0 -70
  202. package/dist/phase-c/commands/search-attributes.js.map +0 -1
  203. package/dist/phase-c/commands/signal-tokens.d.ts +0 -27
  204. package/dist/phase-c/commands/signal-tokens.d.ts.map +0 -1
  205. package/dist/phase-c/commands/signal-tokens.js +0 -68
  206. package/dist/phase-c/commands/signal-tokens.js.map +0 -1
  207. package/dist/phase-c/commands/worker-run.d.ts +0 -109
  208. package/dist/phase-c/commands/worker-run.d.ts.map +0 -1
  209. package/dist/phase-c/commands/worker-run.js +0 -484
  210. package/dist/phase-c/commands/worker-run.js.map +0 -1
  211. package/dist/phase-c/commands/workers.d.ts +0 -46
  212. package/dist/phase-c/commands/workers.d.ts.map +0 -1
  213. package/dist/phase-c/commands/workers.js +0 -140
  214. package/dist/phase-c/commands/workers.js.map +0 -1
  215. package/dist/phase-c/index.d.ts +0 -16
  216. package/dist/phase-c/index.d.ts.map +0 -1
  217. package/dist/phase-c/index.js +0 -25
  218. package/dist/phase-c/index.js.map +0 -1
  219. package/dist/phase-c/operations.d.ts +0 -67
  220. package/dist/phase-c/operations.d.ts.map +0 -1
  221. package/dist/phase-c/operations.js +0 -559
  222. package/dist/phase-c/operations.js.map +0 -1
  223. package/dist/phase-c/register.d.ts +0 -39
  224. package/dist/phase-c/register.d.ts.map +0 -1
  225. package/dist/phase-c/register.js +0 -678
  226. package/dist/phase-c/register.js.map +0 -1
  227. package/dist/phase-c/shared.d.ts +0 -44
  228. package/dist/phase-c/shared.d.ts.map +0 -1
  229. package/dist/phase-c/shared.js +0 -146
  230. package/dist/phase-c/shared.js.map +0 -1
  231. package/dist/product-defaults.d.ts +0 -11
  232. package/dist/product-defaults.d.ts.map +0 -1
  233. package/dist/product-defaults.js +0 -25
  234. package/dist/product-defaults.js.map +0 -1
  235. package/dist/program.d.ts +0 -25
  236. package/dist/program.d.ts.map +0 -1
  237. package/dist/program.js +0 -60
  238. package/dist/program.js.map +0 -1
@@ -1,339 +0,0 @@
1
- /**
2
- * Client profiles (spec code-first 11 §2.36, DCP10): `~/.fluidgrids/config.toml`.
3
- *
4
- * The CLI and both workflow SDKs read the same file, in the format the Python
5
- * SDK's `fluidgrids_workflows.profiles` defines:
6
- *
7
- * defaultProfile = "prod"
8
- *
9
- * [profiles.prod]
10
- * apiUrl = "https://graphqlworkspaces.burdenoff.com/workspaces/graphql"
11
- * workspace = "ws-123"
12
- * tokenRef = "keychain:fluidgrids/prod"
13
- *
14
- * - A profile sets only the keys in {@link PROFILE_KEYS}.
15
- * - `FLUIDGRIDS_PROFILE` (or `--profile`) selects a profile; otherwise
16
- * `defaultProfile`, otherwise `default`.
17
- * - `FLUIDGRIDS_<KEY>` environment variables (`FLUIDGRIDS_API_URL`,
18
- * `FLUIDGRIDS_WORKSPACE`, …) override single keys.
19
- * - Tokens never live in the file. `tokenRef` says where the token is:
20
- * `env:<VAR>` or `keychain:<service>/<account>` (the OS keychain, through
21
- * `@napi-rs/keyring`). Any other form, `file:` included, is refused, and so
22
- * is a key in the file that looks like a secret.
23
- *
24
- * `FLUIDGRIDS_CONFIG` points at another file (tests, CI).
25
- */
26
- import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from 'fs';
27
- import { createRequire } from 'module';
28
- import { homedir } from 'os';
29
- import { dirname, join } from 'path';
30
- import { CliUserError } from '@burdenoff/cli-sdk/core';
31
- import { parse, stringify, TomlError } from 'smol-toml';
32
- export const CONFIG_ENV = 'FLUIDGRIDS_CONFIG';
33
- export const PROFILE_ENV = 'FLUIDGRIDS_PROFILE';
34
- export const TOKEN_ENV = 'FLUIDGRIDS_TOKEN';
35
- export const DEFAULT_PROFILE = 'default';
36
- export const PROFILE_FLAG = '--profile';
37
- /** The keychain service the CLI stores tokens under (`config set token`). */
38
- export const KEYCHAIN_SERVICE = 'fluidgrids';
39
- /** The keys a profile may set (spec 11 §2.36), in the order they are listed. */
40
- export const PROFILE_KEYS = [
41
- 'apiUrl',
42
- 'workspace',
43
- 'product',
44
- 'environment',
45
- 'tokenRef',
46
- 'codecServerUrl',
47
- 'payloadConverter',
48
- ];
49
- const SECRET_KEY = /token$|secret|password|apikey|api_key/i;
50
- const PROFILE_NAME = /^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/;
51
- const ENV_VARIABLE = /^[A-Za-z_][A-Za-z0-9_]*$/;
52
- const KEYCHAIN_PART = /^[^/\s]{1,128}$/;
53
- export function isProfileKey(key) {
54
- return PROFILE_KEYS.includes(key);
55
- }
56
- /** `apiUrl` → `FLUIDGRIDS_API_URL` (the Python SDK's mapping). */
57
- export function envNameOf(key) {
58
- return `FLUIDGRIDS_${key.replace(/(?<!^)(?=[A-Z])/g, '_').toUpperCase()}`;
59
- }
60
- /** The config file: `FLUIDGRIDS_CONFIG`, else `~/.fluidgrids/config.toml`. */
61
- export function configPath(env = process.env, home = homedir()) {
62
- const override = env[CONFIG_ENV]?.trim();
63
- return override ? override : join(home, '.fluidgrids', 'config.toml');
64
- }
65
- export function checkProfileName(name) {
66
- if (!PROFILE_NAME.test(name)) {
67
- throw new CliUserError(`Invalid profile name '${name}': letters, digits, dots, dashes and underscores (at most 64), starting with a letter or digit.`);
68
- }
69
- return name;
70
- }
71
- function isRecord(value) {
72
- return typeof value === 'object' && value !== null && !Array.isArray(value);
73
- }
74
- /** Parse a `tokenRef`; anything but `env:` and `keychain:` (a `file:` path included) is refused. */
75
- export function parseTokenRef(ref, profile) {
76
- if (ref.startsWith('env:')) {
77
- const variable = ref.slice('env:'.length);
78
- if (!ENV_VARIABLE.test(variable)) {
79
- throw new CliUserError(`tokenRef ${ref}: env: needs an environment variable name.`);
80
- }
81
- return { kind: 'env', variable };
82
- }
83
- if (ref.startsWith('keychain:')) {
84
- const rest = ref.slice('keychain:'.length);
85
- const slash = rest.indexOf('/');
86
- const service = slash >= 0 ? rest.slice(0, slash) : rest;
87
- const account = slash >= 0 ? rest.slice(slash + 1) : profile;
88
- if (!KEYCHAIN_PART.test(service) || !KEYCHAIN_PART.test(account)) {
89
- throw new CliUserError(`tokenRef ${ref}: use keychain:<service>/<account>.`);
90
- }
91
- return { kind: 'keychain', service, account };
92
- }
93
- throw new CliUserError(`tokenRef ${ref} must start with env: or keychain:.`, {
94
- hint: 'Tokens never live in files: keep the token in the OS keychain (`fluidgrids config set token`) or in an environment variable.',
95
- });
96
- }
97
- function checkValue(file, profile, key, value) {
98
- if (!isProfileKey(key)) {
99
- if (SECRET_KEY.test(key)) {
100
- throw new CliUserError(`${file}: profile ${profile} stores ${key}; tokens belong in the keychain or the environment (set tokenRef instead).`);
101
- }
102
- // A key of another SDK version: kept in the file, not used here.
103
- return;
104
- }
105
- if (typeof value !== 'string') {
106
- throw new CliUserError(`${file}: profile ${profile}: ${key} must be a string.`);
107
- }
108
- if (key === 'tokenRef')
109
- parseTokenRef(value, profile);
110
- }
111
- /**
112
- * The error for a config file that does not parse. The `config` commands cannot
113
- * rewrite such a file without losing what it holds, so the hint names the file
114
- * to fix by hand (or to move away, which starts from an empty config).
115
- */
116
- function invalidToml(file, error) {
117
- const detail = error instanceof TomlError ? error.message.split('\n')[0] : String(error);
118
- return new CliUserError(`${file} is not valid TOML: ${detail}`, {
119
- hint: `Fix ${file} in an editor, or move it away to start again (tokens stored in the OS keychain stay there).`,
120
- });
121
- }
122
- /** Parse the text of a config file (an empty file is an empty config). */
123
- export function parseConfig(text, file) {
124
- let data;
125
- try {
126
- data = parse(text);
127
- }
128
- catch (error) {
129
- throw invalidToml(file, error);
130
- }
131
- const config = { profiles: {} };
132
- for (const [key, value] of Object.entries(data)) {
133
- if (key === 'defaultProfile') {
134
- if (typeof value !== 'string') {
135
- throw new CliUserError(`${file}: defaultProfile must be a string.`);
136
- }
137
- config.defaultProfile = value;
138
- }
139
- else if (key === 'profiles') {
140
- if (!isRecord(value))
141
- throw new CliUserError(`${file}: profiles must be a table.`);
142
- for (const [name, values] of Object.entries(value)) {
143
- if (!isRecord(values)) {
144
- throw new CliUserError(`${file}: profile ${name} must be a table.`);
145
- }
146
- const profile = {};
147
- for (const [field, raw] of Object.entries(values)) {
148
- checkValue(file, name, field, raw);
149
- if (isProfileKey(field) && typeof raw === 'string')
150
- profile[field] = raw;
151
- }
152
- config.profiles[name] = profile;
153
- }
154
- }
155
- else if (SECRET_KEY.test(key)) {
156
- throw new CliUserError(`${file} stores ${key}; tokens belong in the keychain or the environment.`);
157
- }
158
- // Other top-level keys belong to the SDKs or to later versions; they are kept on write.
159
- }
160
- return config;
161
- }
162
- /** The config file's contents; an absent file is an empty config. */
163
- export function readConfig(file) {
164
- if (!existsSync(file))
165
- return { profiles: {} };
166
- return parseConfig(readFileSync(file, 'utf8'), file);
167
- }
168
- /** The parsed TOML document of the file (keys the CLI does not manage included). */
169
- export function readRawConfig(file) {
170
- if (!existsSync(file))
171
- return {};
172
- try {
173
- return parse(readFileSync(file, 'utf8'));
174
- }
175
- catch (error) {
176
- throw invalidToml(file, error);
177
- }
178
- }
179
- /**
180
- * Change the file: `change` edits the parsed document (keys the CLI does not
181
- * manage stay as they are), the result is checked like a read, then written
182
- * atomically (a temporary file renamed over it), readable by the owner only.
183
- */
184
- export function updateConfig(file, change) {
185
- const document = readRawConfig(file);
186
- change(document);
187
- const text = `${stringify(document)}\n`;
188
- const config = parseConfig(text, file);
189
- for (const name of Object.keys(config.profiles))
190
- checkProfileName(name);
191
- mkdirSync(dirname(file), { recursive: true, mode: 0o700 });
192
- const temporary = `${file}.${process.pid}.tmp`;
193
- writeFileSync(temporary, text, { encoding: 'utf8', mode: 0o600 });
194
- renameSync(temporary, file);
195
- chmodSync(file, 0o600);
196
- return config;
197
- }
198
- /** The `profiles` table of a parsed document, created when absent. */
199
- export function profilesTable(document) {
200
- const existing = document['profiles'];
201
- if (isRecord(existing))
202
- return existing;
203
- const created = {};
204
- document['profiles'] = created;
205
- return created;
206
- }
207
- /** One profile's table of a parsed document, created when `create` is set. */
208
- export function profileTable(document, name, create) {
209
- const profiles = profilesTable(document);
210
- const existing = profiles[name];
211
- if (isRecord(existing))
212
- return existing;
213
- if (!create)
214
- return undefined;
215
- const created = {};
216
- profiles[name] = created;
217
- return created;
218
- }
219
- /** The profile name in argv (`--profile <name>` or `--profile=<name>`), if given. */
220
- export function profileFromArgv(argv) {
221
- for (let index = 0; index < argv.length; index++) {
222
- const arg = argv[index];
223
- if (arg === '--')
224
- return undefined;
225
- if (arg === PROFILE_FLAG) {
226
- const value = argv[index + 1];
227
- if (value === undefined || value.startsWith('-') || value.trim() === '') {
228
- throw new CliUserError(`${PROFILE_FLAG} needs a profile name.`);
229
- }
230
- return value.trim();
231
- }
232
- if (arg?.startsWith(`${PROFILE_FLAG}=`)) {
233
- const value = arg.slice(PROFILE_FLAG.length + 1).trim();
234
- if (value === '')
235
- throw new CliUserError(`${PROFILE_FLAG} needs a profile name.`);
236
- return value;
237
- }
238
- }
239
- return undefined;
240
- }
241
- /**
242
- * The profile in effect: `name`, else `FLUIDGRIDS_PROFILE`, else the file's
243
- * `defaultProfile`, else `default`. A profile named explicitly must exist; the
244
- * fallback `default` may be absent (then only the environment sets keys).
245
- */
246
- export function resolveProfile(config, env, name, file = 'the config file') {
247
- const fromEnvName = env[PROFILE_ENV]?.trim() || undefined;
248
- const chosen = name ?? fromEnvName ?? config.defaultProfile ?? DEFAULT_PROFILE;
249
- const stored = config.profiles[chosen];
250
- if (stored === undefined && (name !== undefined || fromEnvName !== undefined)) {
251
- throw new CliUserError(`There is no profile ${chosen} in ${file}.`, {
252
- hint: `Create it with \`fluidgrids config set <key> <value> --profile ${chosen}\`.`,
253
- });
254
- }
255
- const values = { ...(stored ?? {}) };
256
- const fromEnv = [];
257
- for (const key of PROFILE_KEYS) {
258
- const override = env[envNameOf(key)]?.trim();
259
- if (override) {
260
- values[key] = override;
261
- fromEnv.push(key);
262
- }
263
- }
264
- if (values.tokenRef !== undefined)
265
- parseTokenRef(values.tokenRef, chosen);
266
- return { name: chosen, defined: stored !== undefined, values, fromEnv };
267
- }
268
- function isKeyringModule(value) {
269
- return isRecord(value) && typeof value['Entry'] === 'function';
270
- }
271
- /**
272
- * The OS keychain through `@napi-rs/keyring`, loaded on first use so a
273
- * platform without its native binary only fails when a profile names the
274
- * keychain.
275
- */
276
- export function osKeychain() {
277
- let loaded;
278
- const entry = (service, account) => {
279
- if (!loaded) {
280
- let module;
281
- try {
282
- module = createRequire(import.meta.url)('@napi-rs/keyring');
283
- }
284
- catch (error) {
285
- throw new CliUserError(`The OS keychain is not available on this machine: ${error instanceof Error ? error.message : String(error)}`, { hint: 'Use tokenRef env:<VAR> and keep the token in an environment variable.' });
286
- }
287
- if (!isKeyringModule(module)) {
288
- throw new CliUserError('The @napi-rs/keyring package has no Entry class.');
289
- }
290
- loaded = module;
291
- }
292
- return new loaded.Entry(service, account);
293
- };
294
- const guarded = (what, fn) => {
295
- try {
296
- return fn();
297
- }
298
- catch (error) {
299
- if (error instanceof CliUserError)
300
- throw error;
301
- throw new CliUserError(`The OS keychain refused to ${what}: ${error instanceof Error ? error.message : String(error)}`);
302
- }
303
- };
304
- return {
305
- get: (service, account) => guarded('read the token', () => entry(service, account).getPassword()),
306
- set: (service, account, secret) => guarded('store the token', () => entry(service, account).setPassword(secret)),
307
- delete: (service, account) => guarded('delete the token', () => entry(service, account).deletePassword()),
308
- };
309
- }
310
- /**
311
- * The token a profile names, or undefined when it names none; `FLUIDGRIDS_TOKEN`
312
- * always wins. A tokenRef whose variable or keychain entry holds no token is an error.
313
- */
314
- export function resolveProfileToken(profile, env, keychain) {
315
- const direct = env[TOKEN_ENV]?.trim();
316
- if (direct)
317
- return direct;
318
- const raw = profile.values.tokenRef;
319
- if (raw === undefined)
320
- return undefined;
321
- const ref = parseTokenRef(raw, profile.name);
322
- if (ref.kind === 'env') {
323
- // Like a keychain entry that is missing: the profile names a token, so going
324
- // on without one (the stored login, against the profile's gateway) would be wrong.
325
- const value = env[ref.variable]?.trim();
326
- if (!value) {
327
- throw new CliUserError(`Profile ${profile.name}: tokenRef ${raw} names ${ref.variable}, which is empty or unset.`, {
328
- hint: `Export ${ref.variable}, or remove the reference with \`fluidgrids config delete tokenRef --profile ${profile.name}\`.`,
329
- });
330
- }
331
- return value;
332
- }
333
- const secret = keychain.get(ref.service, ref.account);
334
- if (secret === null || secret.trim() === '') {
335
- throw new CliUserError(`Profile ${profile.name}: the keychain has no token for ${ref.service}/${ref.account}.`, { hint: `Store one with \`fluidgrids config set token --profile ${profile.name}\`.` });
336
- }
337
- return secret.trim();
338
- }
339
- //# sourceMappingURL=profiles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/config/profiles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAExD,MAAM,CAAC,MAAM,UAAU,GAAG,mBAAmB,CAAC;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,oBAAoB,CAAC;AAChD,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC;AAC5C,MAAM,CAAC,MAAM,eAAe,GAAG,SAAS,CAAC;AACzC,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAAC;AACxC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,gBAA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,KAAK,IAAI,IAAI,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAC5C,MAAM,IAAI,YAAY,CACpB,WAAW,OAAO,CAAC,IAAI,mCAAmC,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,OAAO,GAAG,EACvF,EAAE,IAAI,EAAE,0DAA0D,OAAO,CAAC,IAAI,KAAK,EAAE,CACtF,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;AACvB,CAAC"}
@@ -1,46 +0,0 @@
1
- /**
2
- * FEATURE_DISABLED hints (PLAN-C D-CLI-6): the CLI never pre-checks workspace
3
- * flags; when a service refuses because a Phase C flag is off, the error gets a
4
- * hint naming that flag. The flag comes from the error's `extensions.feature`
5
- * (the workflow and sandbox services set it) when present, else from the flags
6
- * the caller says the operation needs.
7
- *
8
- * Kept outside `phase-c/` so the code-first push (a Python upload) can use it
9
- * without loading the lazily mounted Phase C module.
10
- */
11
- /** The Phase C flag each command group needs (PLAN-C §2.1), named in FEATURE_DISABLED hints. */
12
- export declare const FLAGS: {
13
- readonly runControl: "fluidgrids.run-control";
14
- readonly selfHosted: "fluidgrids.self-hosted-workers";
15
- readonly searchAttributes: "fluidgrids.search-attributes";
16
- readonly runArchival: "fluidgrids.run-archival";
17
- readonly schedulePolicies: "fluidgrids.schedule-policies";
18
- readonly pythonDurable: "fluidgrids.python-durable-functions";
19
- };
20
- export type PhaseCFlag = (typeof FLAGS)[keyof typeof FLAGS];
21
- /** What a FEATURE_DISABLED refusal says about itself: whether it is one, and the flag it names. */
22
- export declare function featureRefusal(error: Error): {
23
- disabled: boolean;
24
- feature?: string;
25
- };
26
- /**
27
- * The gateway error, with a hint naming the flag when the service refused for a
28
- * disabled feature: the flag the error names, else `flags` (the flags the
29
- * operation needs, in order). Without either, or for another error, it is
30
- * returned unchanged.
31
- */
32
- export declare function withFlagHint(error: unknown, flags: PhaseCFlag | readonly PhaseCFlag[] | undefined): unknown;
33
- /**
34
- * For the Phase B code-first requests: a hint only when the refusal names a
35
- * Phase C flag, so every Phase B error stays exactly as it was.
36
- */
37
- export declare function withPhaseCFlagHint(error: unknown): unknown;
38
- /**
39
- * A refused Python bundle upload. A gateway whose supergraph does not have the
40
- * Python release of wspace-workflow-svc yet (C-S6) rejects the `language`
41
- * field of `prepareWorkflowCodeUpload` in validation, before any flag check:
42
- * that becomes a user error that says so, without quoting the request. Any
43
- * other refusal gets the Python durable flag hint.
44
- */
45
- export declare function withPythonUploadHint(error: unknown): unknown;
46
- //# sourceMappingURL=flag-hint.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flag-hint.d.ts","sourceRoot":"","sources":["../src/flag-hint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,gGAAgG;AAChG,eAAO,MAAM,KAAK;;;;;;;CAOR,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,OAAO,KAAK,CAAC,CAAC;AAyB5D,mGAAmG;AACnG,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAOpF;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,UAAU,GAAG,SAAS,UAAU,EAAE,GAAG,SAAS,GACpD,OAAO,CAiBT;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAM1D;AAeD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQ5D"}
package/dist/flag-hint.js DELETED
@@ -1,114 +0,0 @@
1
- /**
2
- * FEATURE_DISABLED hints (PLAN-C D-CLI-6): the CLI never pre-checks workspace
3
- * flags; when a service refuses because a Phase C flag is off, the error gets a
4
- * hint naming that flag. The flag comes from the error's `extensions.feature`
5
- * (the workflow and sandbox services set it) when present, else from the flags
6
- * the caller says the operation needs.
7
- *
8
- * Kept outside `phase-c/` so the code-first push (a Python upload) can use it
9
- * without loading the lazily mounted Phase C module.
10
- */
11
- import { CliUserError } from '@burdenoff/cli-sdk/core';
12
- /** The Phase C flag each command group needs (PLAN-C §2.1), named in FEATURE_DISABLED hints. */
13
- export const FLAGS = {
14
- runControl: 'fluidgrids.run-control',
15
- selfHosted: 'fluidgrids.self-hosted-workers',
16
- searchAttributes: 'fluidgrids.search-attributes',
17
- runArchival: 'fluidgrids.run-archival',
18
- schedulePolicies: 'fluidgrids.schedule-policies',
19
- pythonDurable: 'fluidgrids.python-durable-functions',
20
- };
21
- const PHASE_C_FLAGS = new Set(Object.values(FLAGS));
22
- const FEATURE_DISABLED = /FEATURE_DISABLED|feature (is )?(disabled|not enabled)|needs fluidgrids\./i;
23
- const FLAG_KEY = /^[a-z0-9][a-z0-9.-]{0,99}$/;
24
- function isRecord(value) {
25
- return typeof value === 'object' && value !== null && !Array.isArray(value);
26
- }
27
- /** The first GraphQL error's `extensions` of a gateway error, if it carries any. */
28
- function firstExtensions(error) {
29
- const response = Reflect.get(error, 'response');
30
- if (!isRecord(response))
31
- return undefined;
32
- const errors = response['errors'];
33
- if (!Array.isArray(errors))
34
- return undefined;
35
- const first = errors[0];
36
- if (!isRecord(first))
37
- return undefined;
38
- const extensions = first['extensions'];
39
- return isRecord(extensions) ? extensions : undefined;
40
- }
41
- /** What a FEATURE_DISABLED refusal says about itself: whether it is one, and the flag it names. */
42
- export function featureRefusal(error) {
43
- const extensions = firstExtensions(error);
44
- const code = extensions?.['code'];
45
- const raw = extensions?.['feature'];
46
- const feature = typeof raw === 'string' && FLAG_KEY.test(raw) ? raw : undefined;
47
- const disabled = code === 'FEATURE_DISABLED' || FEATURE_DISABLED.test(error.message);
48
- return feature !== undefined ? { disabled, feature } : { disabled };
49
- }
50
- /**
51
- * The gateway error, with a hint naming the flag when the service refused for a
52
- * disabled feature: the flag the error names, else `flags` (the flags the
53
- * operation needs, in order). Without either, or for another error, it is
54
- * returned unchanged.
55
- */
56
- export function withFlagHint(error, flags) {
57
- if (!(error instanceof Error) || error instanceof CliUserError)
58
- return error;
59
- const refusal = featureRefusal(error);
60
- if (!refusal.disabled)
61
- return error;
62
- const named = refusal.feature !== undefined
63
- ? [refusal.feature]
64
- : flags === undefined
65
- ? []
66
- : typeof flags === 'string'
67
- ? [flags]
68
- : [...flags];
69
- if (named.length === 0)
70
- return error;
71
- const list = named.length === 1 ? `the ${named[0]} flag` : `the ${named.join(' and ')} flags`;
72
- return new CliUserError(error.message, {
73
- hint: `This needs ${list} on the workspace (with fluidgrids.code-first); ask a workspace admin to turn ${named.length === 1 ? 'it' : 'them'} on.`,
74
- });
75
- }
76
- /**
77
- * For the Phase B code-first requests: a hint only when the refusal names a
78
- * Phase C flag, so every Phase B error stays exactly as it was.
79
- */
80
- export function withPhaseCFlagHint(error) {
81
- if (!(error instanceof Error) || error instanceof CliUserError)
82
- return error;
83
- const { feature } = featureRefusal(error);
84
- return feature !== undefined && PHASE_C_FLAGS.has(feature)
85
- ? withFlagHint(error, undefined)
86
- : error;
87
- }
88
- /** A GraphQL validation error that says an input field is not part of the schema. */
89
- const UNKNOWN_LANGUAGE_FIELD = /Field "language" is not defined by type|"language" is not defined|unknown field "?language"?/i;
90
- /** The messages of every GraphQL error of a gateway error, if it carries any. */
91
- function errorMessages(error) {
92
- const response = Reflect.get(error, 'response');
93
- if (!isRecord(response) || !Array.isArray(response['errors']))
94
- return [];
95
- return response['errors'].flatMap((entry) => isRecord(entry) && typeof entry['message'] === 'string' ? [entry['message']] : []);
96
- }
97
- /**
98
- * A refused Python bundle upload. A gateway whose supergraph does not have the
99
- * Python release of wspace-workflow-svc yet (C-S6) rejects the `language`
100
- * field of `prepareWorkflowCodeUpload` in validation, before any flag check:
101
- * that becomes a user error that says so, without quoting the request. Any
102
- * other refusal gets the Python durable flag hint.
103
- */
104
- export function withPythonUploadHint(error) {
105
- if (!(error instanceof Error) || error instanceof CliUserError)
106
- return error;
107
- if (errorMessages(error).some((message) => UNKNOWN_LANGUAGE_FIELD.test(message))) {
108
- return new CliUserError('This gateway does not accept Python durable-function bundles yet.', {
109
- hint: `The Python release of the workflow service has not reached this environment. TypeScript pushes are not affected; once it has, Python pushes need the ${FLAGS.pythonDurable} flag on the workspace.`,
110
- });
111
- }
112
- return withFlagHint(error, FLAGS.pythonDurable);
113
- }
114
- //# sourceMappingURL=flag-hint.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flag-hint.js","sourceRoot":"","sources":["../src/flag-hint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,gGAAgG;AAChG,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,UAAU,EAAE,wBAAwB;IACpC,UAAU,EAAE,gCAAgC;IAC5C,gBAAgB,EAAE,8BAA8B;IAChD,WAAW,EAAE,yBAAyB;IACtC,gBAAgB,EAAE,8BAA8B;IAChD,aAAa,EAAE,qCAAqC;CAC5C,CAAC;AAIX,MAAM,aAAa,GAAwB,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAEzE,MAAM,gBAAgB,GACpB,2EAA2E,CAAC;AAE9E,MAAM,QAAQ,GAAG,4BAA4B,CAAC;AAE9C,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,oFAAoF;AACpF,SAAS,eAAe,CAAC,KAAY;IACnC,MAAM,QAAQ,GAAY,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IACzD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,SAAS,CAAC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M,sBAAsB,GAC1B,+FAA+F,CAAC;AAElG,iFAAiF;AACjF,SAAS,aAAa,CAAC,KAAY;IACjC,MAAM,QAAQ,GAAY,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IACzD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAAE,OAAO,EAAE,CAAC;IACzE,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,KAAc,EAAE,EAAE,CACnD,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,SAAS,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAClF,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAc;IACjD,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,IAAI,KAAK,YAAY,YAAY;QAAE,OAAO,KAAK,CAAC;IAC7E,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;QACjF,OAAO,IAAI,YAAY,CAAC,mEAAmE,EAAE;YAC3F,IAAI,EAAE,wJAAwJ,KAAK,CAAC,aAAa,yBAAyB;SAC3M,CAAC,CAAC;IACL,CAAC;IACD,OAAO,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;AAClD,CAAC"}
package/dist/modules.d.ts DELETED
@@ -1,17 +0,0 @@
1
- /**
2
- * The cli-sdk modules this shell mounts: the FluidGrids domain module plus the
3
- * shared platform modules. Kept in one list so the shell and its tests mount
4
- * exactly the same surface.
5
- *
6
- * `codeFirstModule` is product-local (src/code-first/): the code-first workflow
7
- * commands depend on @fluidgrids/workflows, which other product CLIs must not
8
- * pull in through cli-sdk. `phaseCModule` (src/phase-c/) is product-local for
9
- * the same reason: the Phase C groups (profiles, queues, workers, run
10
- * control, batch, schedules) and `worker run`.
11
- *
12
- * Not mounted: `vibecontrols` (another product; it also owns a top-level
13
- * `webhooks` group) and `sandbox` (VibeControls dev environments).
14
- */
15
- import type { CliModule } from '@burdenoff/cli-sdk/core';
16
- export declare const modules: readonly CliModule[];
17
- //# sourceMappingURL=modules.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA2BzD,eAAO,MAAM,OAAO,EAAE,SAAS,SAAS,EAyBvC,CAAC"}
package/dist/modules.js DELETED
@@ -1,65 +0,0 @@
1
- /**
2
- * The cli-sdk modules this shell mounts: the FluidGrids domain module plus the
3
- * shared platform modules. Kept in one list so the shell and its tests mount
4
- * exactly the same surface.
5
- *
6
- * `codeFirstModule` is product-local (src/code-first/): the code-first workflow
7
- * commands depend on @fluidgrids/workflows, which other product CLIs must not
8
- * pull in through cli-sdk. `phaseCModule` (src/phase-c/) is product-local for
9
- * the same reason: the Phase C groups (profiles, queues, workers, run
10
- * control, batch, schedules) and `worker run`.
11
- *
12
- * Not mounted: `vibecontrols` (another product; it also owns a top-level
13
- * `webhooks` group) and `sandbox` (VibeControls dev environments).
14
- */
15
- import authModule from '@burdenoff/cli-sdk/modules/auth';
16
- import workspacesModule from '@burdenoff/cli-sdk/modules/workspaces';
17
- import organizationsModule from '@burdenoff/cli-sdk/modules/organizations';
18
- import toursModule from '@burdenoff/cli-sdk/modules/tours';
19
- import rbacModule from '@burdenoff/cli-sdk/modules/rbac';
20
- import fluidgridsModule from '@burdenoff/cli-sdk/modules/fluidgrids';
21
- import tagsModule from '@burdenoff/cli-sdk/modules/tags';
22
- import filesModule from '@burdenoff/cli-sdk/modules/files';
23
- import groupsModule from '@burdenoff/cli-sdk/modules/groups';
24
- import conversationsModule from '@burdenoff/cli-sdk/modules/conversations';
25
- import securityModule from '@burdenoff/cli-sdk/modules/security';
26
- import integrationsModule from '@burdenoff/cli-sdk/modules/integrations';
27
- import channelsModule from '@burdenoff/cli-sdk/modules/channels';
28
- import schedulerModule from '@burdenoff/cli-sdk/modules/scheduler';
29
- import exportModule from '@burdenoff/cli-sdk/modules/export';
30
- import notificationsModule from '@burdenoff/cli-sdk/modules/notifications';
31
- import supportModule from '@burdenoff/cli-sdk/modules/support';
32
- import productsModule from '@burdenoff/cli-sdk/modules/products';
33
- import billingModule from '@burdenoff/cli-sdk/modules/billing';
34
- import storeModule from '@burdenoff/cli-sdk/modules/store';
35
- import devportalModule from '@burdenoff/cli-sdk/modules/devportal';
36
- import healthModule from '@burdenoff/cli-sdk/modules/health';
37
- import codeFirstModule from './code-first/index.js';
38
- import phaseCModule from './phase-c/index.js';
39
- export const modules = [
40
- authModule,
41
- workspacesModule,
42
- organizationsModule,
43
- toursModule,
44
- rbacModule,
45
- fluidgridsModule,
46
- tagsModule,
47
- filesModule,
48
- groupsModule,
49
- conversationsModule,
50
- securityModule,
51
- integrationsModule,
52
- channelsModule,
53
- schedulerModule,
54
- exportModule,
55
- notificationsModule,
56
- supportModule,
57
- productsModule,
58
- billingModule,
59
- storeModule,
60
- devportalModule,
61
- healthModule,
62
- codeFirstModule,
63
- phaseCModule,
64
- ];
65
- //# sourceMappingURL=modules.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modules.js","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,UAAU,MAAM,iCAAiC,CAAC;AACzD,OAAO,gBAAgB,MAAM,uCAAuC,CAAC;AACrE,OAAO,mBAAmB,MAAM,0CAA0C,CAAC;AAC3E,OAAO,WAAW,MAAM,kCAAkC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