farseer-cli 1.9.1 → 1.10.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 (77) hide show
  1. package/README.md +37 -33
  2. package/dist/commands/app.js +11 -37
  3. package/dist/commands/app.js.map +2 -2
  4. package/dist/commands/apps.js +3 -9
  5. package/dist/commands/apps.js.map +2 -2
  6. package/dist/commands/cells.js +3 -11
  7. package/dist/commands/cells.js.map +2 -2
  8. package/dist/commands/config.js +4 -4
  9. package/dist/commands/config.js.map +2 -2
  10. package/dist/commands/dashboards.js +3 -11
  11. package/dist/commands/dashboards.js.map +2 -2
  12. package/dist/commands/diff.js +3 -7
  13. package/dist/commands/diff.js.map +2 -2
  14. package/dist/commands/dimensions.js +9 -31
  15. package/dist/commands/dimensions.js.map +2 -2
  16. package/dist/commands/files.js +4 -9
  17. package/dist/commands/files.js.map +2 -2
  18. package/dist/commands/formula.js +2 -6
  19. package/dist/commands/formula.js.map +2 -2
  20. package/dist/commands/list.js +4 -9
  21. package/dist/commands/list.js.map +2 -2
  22. package/dist/commands/model.js +2 -8
  23. package/dist/commands/model.js.map +2 -2
  24. package/dist/commands/pull.js +16 -9
  25. package/dist/commands/pull.js.map +2 -2
  26. package/dist/commands/push.js +5 -9
  27. package/dist/commands/push.js.map +2 -2
  28. package/dist/commands/refresh.js +3 -8
  29. package/dist/commands/refresh.js.map +2 -2
  30. package/dist/commands/run.js +3 -6
  31. package/dist/commands/run.js.map +2 -2
  32. package/dist/commands/sheets.js +5 -21
  33. package/dist/commands/sheets.js.map +2 -2
  34. package/dist/commands/status.js +4 -9
  35. package/dist/commands/status.js.map +2 -2
  36. package/dist/commands/variables.js +8 -30
  37. package/dist/commands/variables.js.map +2 -2
  38. package/dist/commands/whoami.js +11 -0
  39. package/dist/commands/whoami.js.map +2 -2
  40. package/dist/index.js +22 -23
  41. package/dist/index.js.map +2 -2
  42. package/dist/mcp/resources/documentation.js +1 -1
  43. package/dist/mcp/resources/documentation.js.map +1 -1
  44. package/dist/mcp/server.js +1 -1
  45. package/dist/mcp/server.js.map +1 -1
  46. package/dist/mcp/tools/appTools.js +6 -4
  47. package/dist/mcp/tools/appTools.js.map +2 -2
  48. package/dist/mcp/tools/dataTools.js +1 -1
  49. package/dist/mcp/tools/dataTools.js.map +2 -2
  50. package/dist/mcp/utils/helpers.js.map +2 -2
  51. package/dist/mcp/utils/launchPin.js.map +2 -2
  52. package/dist/services/configService.js +0 -45
  53. package/dist/services/configService.js.map +2 -2
  54. package/dist/services/farseerApi.js +49 -7
  55. package/dist/services/farseerApi.js.map +3 -3
  56. package/dist/services/farseerFactory.js +79 -0
  57. package/dist/services/farseerFactory.js.map +3 -3
  58. package/dist/services/farseerService.js +24 -8
  59. package/dist/services/farseerService.js.map +2 -2
  60. package/dist/services/preflight.js +115 -0
  61. package/dist/services/preflight.js.map +7 -0
  62. package/dist/utils/fileValidation.js +2 -0
  63. package/dist/utils/fileValidation.js.map +2 -2
  64. package/dist/utils/helpers.js +42 -48
  65. package/dist/utils/helpers.js.map +2 -2
  66. package/dist/utils/workspace.js +1 -1
  67. package/dist/utils/workspace.js.map +2 -2
  68. package/docs/api-reference.md +3 -3
  69. package/docs/arquero-patterns.md +1 -1
  70. package/docs/cli-guide.md +14 -9
  71. package/docs/how-farseer-works.md +1 -1
  72. package/docs/import-workflows.md +3 -3
  73. package/docs/new-app-template.md +1 -1
  74. package/docs/query-formulas.md +1 -1
  75. package/package.json +1 -1
  76. package/dist/commands/checkout.js +0 -189
  77. package/dist/commands/checkout.js.map +0 -7
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/workspace.ts"],
4
- "sourcesContent": ["import * as fs from 'fs';\nimport { logger } from './logger';\n\n// Entries that MUST appear in the tenant .gitignore for sync to work\n// correctly across machines. Order matters only for readability of a\n// freshly-created file; for the merge case (existing .gitignore missing\n// entries) we append missing entries in this order.\nconst REQUIRED_GITIGNORE_ENTRIES: { pattern: string; comment?: string }[] = [\n {\n pattern: '.farseer-sync.json',\n comment:\n '# Per-machine sync baseline \u2014 diff state, not user work.\\n' +\n '# Committing this causes spurious \"remote drifted\" reports on other machines.',\n },\n { pattern: '.farseer-audit.log', comment: '# Local audit / crash logs.' },\n { pattern: 'node_modules/', comment: '# Node tooling.' },\n];\n\n/**\n * Ensure the tenant .gitignore contains every per-machine entry. If the\n * file doesn't exist, write a fresh one with comments. If it exists but\n * is missing entries (common: pre-1.6.2 checkouts, or `npm init` created\n * a partial .gitignore listing only `node_modules/`), append the missing\n * patterns idempotently \u2014 match on exact-line so a re-run is a no-op.\n *\n * Called from every workspace-initializing path (checkout, direct pull)\n * so a workspace can never reach a state where `.farseer-sync.json` is\n * unignored. Living in `utils/` rather than `commands/` is what makes\n * that contract hold \u2014 if it lived next to `checkout` it had only one\n * caller and direct `pull` re-introduced the baseline-leak root cause.\n */\nexport function ensureGitignoreEntries(gitignorePath: string): void {\n if (!fs.existsSync(gitignorePath)) {\n const blocks = REQUIRED_GITIGNORE_ENTRIES.map((e) =>\n e.comment ? `${e.comment}\\n${e.pattern}\\n` : `${e.pattern}\\n`,\n );\n fs.writeFileSync(gitignorePath, blocks.join('\\n'), 'utf-8');\n logger.dim(`Created .gitignore`);\n return;\n }\n\n const existing = fs.readFileSync(gitignorePath, 'utf-8');\n const existingLines = new Set(\n existing\n .split('\\n')\n .map((l) => l.trim())\n .filter((l) => l.length > 0 && !l.startsWith('#')),\n );\n\n const missing = REQUIRED_GITIGNORE_ENTRIES.filter((e) => !existingLines.has(e.pattern));\n if (missing.length === 0) return;\n\n // Preserve the file's native line ending so we don't mix CRLF/LF on Windows checkouts.\n const eol = existing.includes('\\r\\n') ? '\\r\\n' : '\\n';\n const normalize = (s: string): string => (eol === '\\n' ? s : s.replace(/\\n/g, eol));\n const needsLeadingNewline = !existing.endsWith('\\n');\n const appended =\n (needsLeadingNewline ? eol : '') +\n eol +\n '# farseer-cli \u2014 sync state (added by `farseer checkout`).' +\n eol +\n missing.map((e) => (e.comment ? `${normalize(e.comment)}${eol}${e.pattern}` : e.pattern)).join(eol) +\n eol;\n fs.appendFileSync(gitignorePath, appended, 'utf-8');\n logger.dim(`Appended ${missing.length} entr${missing.length === 1 ? 'y' : 'ies'} to .gitignore`);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AACpB,oBAAuB;AAMvB,MAAM,6BAAsE;AAAA,EACxE;AAAA,IACI,SAAS;AAAA,IACT,SACI;AAAA,EAER;AAAA,EACA,EAAE,SAAS,sBAAsB,SAAS,8BAA8B;AAAA,EACxE,EAAE,SAAS,iBAAiB,SAAS,kBAAkB;AAC3D;AAeO,SAAS,uBAAuB,eAA6B;AAChE,MAAI,CAAC,GAAG,WAAW,aAAa,GAAG;AAC/B,UAAM,SAAS,2BAA2B;AAAA,MAAI,CAAC,MAC3C,EAAE,UAAU,GAAG,EAAE,OAAO;AAAA,EAAK,EAAE,OAAO;AAAA,IAAO,GAAG,EAAE,OAAO;AAAA;AAAA,IAC7D;AACA,OAAG,cAAc,eAAe,OAAO,KAAK,IAAI,GAAG,OAAO;AAC1D,yBAAO,IAAI,oBAAoB;AAC/B;AAAA,EACJ;AAEA,QAAM,WAAW,GAAG,aAAa,eAAe,OAAO;AACvD,QAAM,gBAAgB,IAAI;AAAA,IACtB,SACK,MAAM,IAAI,EACV,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EACnB,OAAO,CAAC,MAAM,EAAE,SAAS,KAAK,CAAC,EAAE,WAAW,GAAG,CAAC;AAAA,EACzD;AAEA,QAAM,UAAU,2BAA2B,OAAO,CAAC,MAAM,CAAC,cAAc,IAAI,EAAE,OAAO,CAAC;AACtF,MAAI,QAAQ,WAAW,EAAG;AAG1B,QAAM,MAAM,SAAS,SAAS,MAAM,IAAI,SAAS;AACjD,QAAM,YAAY,CAAC,MAAuB,QAAQ,OAAO,IAAI,EAAE,QAAQ,OAAO,GAAG;AACjF,QAAM,sBAAsB,CAAC,SAAS,SAAS,IAAI;AACnD,QAAM,YACD,sBAAsB,MAAM,MAC7B,MACA,mEACA,MACA,QAAQ,IAAI,CAAC,MAAO,EAAE,UAAU,GAAG,UAAU,EAAE,OAAO,CAAC,GAAG,GAAG,GAAG,EAAE,OAAO,KAAK,EAAE,OAAQ,EAAE,KAAK,GAAG,IAClG;AACJ,KAAG,eAAe,eAAe,UAAU,OAAO;AAClD,uBAAO,IAAI,YAAY,QAAQ,MAAM,QAAQ,QAAQ,WAAW,IAAI,MAAM,KAAK,gBAAgB;AACnG;",
4
+ "sourcesContent": ["import * as fs from 'fs';\nimport { logger } from './logger';\n\n// Entries that MUST appear in the tenant .gitignore for sync to work\n// correctly across machines. Order matters only for readability of a\n// freshly-created file; for the merge case (existing .gitignore missing\n// entries) we append missing entries in this order.\nconst REQUIRED_GITIGNORE_ENTRIES: { pattern: string; comment?: string }[] = [\n {\n pattern: '.farseer-sync.json',\n comment:\n '# Per-machine sync baseline \u2014 diff state, not user work.\\n' +\n '# Committing this causes spurious \"remote drifted\" reports on other machines.',\n },\n { pattern: '.farseer-audit.log', comment: '# Local audit / crash logs.' },\n { pattern: 'node_modules/', comment: '# Node tooling.' },\n];\n\n/**\n * Ensure the tenant .gitignore contains every per-machine entry. If the\n * file doesn't exist, write a fresh one with comments. If it exists but\n * is missing entries (common: pre-1.6.2 workspaces, or `npm init` created\n * a partial .gitignore listing only `node_modules/`), append the missing\n * patterns idempotently \u2014 match on exact-line so a re-run is a no-op.\n *\n * Called from the workspace-initializing path (`farseer pull`) so a\n * workspace can never reach a state where `.farseer-sync.json` is\n * unignored. Living in `utils/` rather than `commands/` keeps it\n * reusable, so any future init path picks it up too.\n */\nexport function ensureGitignoreEntries(gitignorePath: string): void {\n if (!fs.existsSync(gitignorePath)) {\n const blocks = REQUIRED_GITIGNORE_ENTRIES.map((e) =>\n e.comment ? `${e.comment}\\n${e.pattern}\\n` : `${e.pattern}\\n`,\n );\n fs.writeFileSync(gitignorePath, blocks.join('\\n'), 'utf-8');\n logger.dim(`Created .gitignore`);\n return;\n }\n\n const existing = fs.readFileSync(gitignorePath, 'utf-8');\n const existingLines = new Set(\n existing\n .split('\\n')\n .map((l) => l.trim())\n .filter((l) => l.length > 0 && !l.startsWith('#')),\n );\n\n const missing = REQUIRED_GITIGNORE_ENTRIES.filter((e) => !existingLines.has(e.pattern));\n if (missing.length === 0) return;\n\n // Preserve the file's native line ending so we don't mix CRLF/LF on Windows workspaces.\n const eol = existing.includes('\\r\\n') ? '\\r\\n' : '\\n';\n const normalize = (s: string): string => (eol === '\\n' ? s : s.replace(/\\n/g, eol));\n const needsLeadingNewline = !existing.endsWith('\\n');\n const appended =\n (needsLeadingNewline ? eol : '') +\n eol +\n '# farseer-cli \u2014 sync state (added by `farseer pull`).' +\n eol +\n missing.map((e) => (e.comment ? `${normalize(e.comment)}${eol}${e.pattern}` : e.pattern)).join(eol) +\n eol;\n fs.appendFileSync(gitignorePath, appended, 'utf-8');\n logger.dim(`Appended ${missing.length} entr${missing.length === 1 ? 'y' : 'ies'} to .gitignore`);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAoB;AACpB,oBAAuB;AAMvB,MAAM,6BAAsE;AAAA,EACxE;AAAA,IACI,SAAS;AAAA,IACT,SACI;AAAA,EAER;AAAA,EACA,EAAE,SAAS,sBAAsB,SAAS,8BAA8B;AAAA,EACxE,EAAE,SAAS,iBAAiB,SAAS,kBAAkB;AAC3D;AAcO,SAAS,uBAAuB,eAA6B;AAChE,MAAI,CAAC,GAAG,WAAW,aAAa,GAAG;AAC/B,UAAM,SAAS,2BAA2B;AAAA,MAAI,CAAC,MAC3C,EAAE,UAAU,GAAG,EAAE,OAAO;AAAA,EAAK,EAAE,OAAO;AAAA,IAAO,GAAG,EAAE,OAAO;AAAA;AAAA,IAC7D;AACA,OAAG,cAAc,eAAe,OAAO,KAAK,IAAI,GAAG,OAAO;AAC1D,yBAAO,IAAI,oBAAoB;AAC/B;AAAA,EACJ;AAEA,QAAM,WAAW,GAAG,aAAa,eAAe,OAAO;AACvD,QAAM,gBAAgB,IAAI;AAAA,IACtB,SACK,MAAM,IAAI,EACV,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EACnB,OAAO,CAAC,MAAM,EAAE,SAAS,KAAK,CAAC,EAAE,WAAW,GAAG,CAAC;AAAA,EACzD;AAEA,QAAM,UAAU,2BAA2B,OAAO,CAAC,MAAM,CAAC,cAAc,IAAI,EAAE,OAAO,CAAC;AACtF,MAAI,QAAQ,WAAW,EAAG;AAG1B,QAAM,MAAM,SAAS,SAAS,MAAM,IAAI,SAAS;AACjD,QAAM,YAAY,CAAC,MAAuB,QAAQ,OAAO,IAAI,EAAE,QAAQ,OAAO,GAAG;AACjF,QAAM,sBAAsB,CAAC,SAAS,SAAS,IAAI;AACnD,QAAM,YACD,sBAAsB,MAAM,MAC7B,MACA,+DACA,MACA,QAAQ,IAAI,CAAC,MAAO,EAAE,UAAU,GAAG,UAAU,EAAE,OAAO,CAAC,GAAG,GAAG,GAAG,EAAE,OAAO,KAAK,EAAE,OAAQ,EAAE,KAAK,GAAG,IAClG;AACJ,KAAG,eAAe,eAAe,UAAU,OAAO;AAClD,uBAAO,IAAI,YAAY,QAAQ,MAAM,QAAQ,QAAQ,WAAW,IAAI,MAAM,KAAK,gBAAgB;AACnG;",
6
6
  "names": []
7
7
  }
@@ -9,12 +9,12 @@
9
9
  **This is the primary method for retrieving variable data from Farseer.** Exports variable values using formula expressions.
10
10
 
11
11
  ```typescript
12
- import { ExportRequestFormatEnum } from 'farseer-client';
12
+ import { ExportFormat } from 'farseer-client';
13
13
  import * as aq from 'arquero';
14
14
 
15
15
  // Export variable data as CSV
16
16
  const blob = await client.export.exportFormula({
17
- format: ExportRequestFormatEnum.Csv,
17
+ format: ExportFormat.Csv,
18
18
  formula: 'sum("Revenue", "Y2024", "Plan")'
19
19
  });
20
20
 
@@ -345,7 +345,7 @@ await client.initTagMap();
345
345
 
346
346
  // Get variable DATA (not metadata!)
347
347
  const blob = await client.export.exportFormula({
348
- format: ExportRequestFormatEnum.Csv,
348
+ format: ExportFormat.Csv,
349
349
  formula: 'sum("Revenue", "Y2024", "Plan")'
350
350
  });
351
351
  const data = aq.fromCSV(await blob.text());
@@ -9,7 +9,7 @@ This document covers best practices for working with Arquero in farseer-client a
9
9
  ```typescript
10
10
  // Good - Using export.exportFormula
11
11
  const blob = await client.export.exportFormula({
12
- format: ExportRequestFormatEnum.Csv,
12
+ format: ExportFormat.Csv,
13
13
  formula: 'sum("Revenue", "Y2024")'
14
14
  });
15
15
  const data = aq.fromCSV(await blob.text());
package/docs/cli-guide.md CHANGED
@@ -16,19 +16,19 @@ farseer login
16
16
  farseer login --api-key
17
17
  ```
18
18
 
19
- ### 2. Checkout a Tenant
19
+ ### 2. Set Up a Tenant
20
20
 
21
21
  ```bash
22
22
  # First time: specify organisation and tenant
23
- farseer checkout myorg mytenant
23
+ farseer pull myorg mytenant
24
24
 
25
- # The CLI remembers the org-tenant mapping, so next time:
26
- farseer checkout mytenant
25
+ # The CLI remembers the org-tenant mapping, so next time just the tenant:
26
+ farseer pull mytenant
27
27
  ```
28
28
 
29
- Checkout sets a default tenant so you don't need to specify it in every command. It also verifies auth and pulls the latest files/apps.
29
+ The first pull verifies auth, confirms the org owns the tenant, scaffolds the workspace, and downloads the latest files/apps. Once the org confirms the tenant, it records the tenant→org mapping (so the tenant alone resolves the org afterwards). There is no global default — select the tenant for a shell with `export FARSEER_TENANT=mytenant` (or pass it per command).
30
30
 
31
- ### 3. Pull Files and Apps
31
+ ### 3. Pull Again Anytime
32
32
 
33
33
  ```bash
34
34
  # Pull workspace files (developer files: .ts, .js, .py, .yml, .yaml, .md, .json non-hidden, non-blocklisted) and app configs
@@ -168,11 +168,16 @@ farseer dimension details "Product" --members 20
168
168
 
169
169
  ## Tenant Resolution
170
170
 
171
- Most commands accept optional `[org] [tenant]` arguments. The CLI resolves tenant in this order:
171
+ Most commands accept optional `[org] [tenant]` arguments. The CLI resolves the tenant in this order — with no machine-global default, so it errors rather than guessing:
172
172
 
173
173
  1. **Explicit args**: `farseer pull myorg mytenant`
174
- 2. **Tenant with saved org mapping**: `farseer pull mytenant` (org remembered from checkout)
175
- 3. **Checked-out tenant**: `farseer pull` (uses current checkout)
174
+ 2. **Explicit tenant with saved org mapping**: `farseer pull mytenant` (org resolved from the mapping or `FARSEER_ORG`)
175
+ 3. **`FARSEER_TENANT` env**: `export FARSEER_TENANT=mytenant` then `farseer pull` (per-shell; add `FARSEER_ORG` if the org differs)
176
+ 4. **None set** → the command errors and tells you to pass a tenant or set `FARSEER_TENANT`
177
+
178
+ The tenant→org mapping in step 2 is recorded only once the organisation has been confirmed to own the tenant, so a mistyped org is never remembered as a tenant's home. Until then, pass both arguments or set `FARSEER_ORG`.
179
+
180
+ Because the target is per-shell (env), different terminals can work on different tenants simultaneously.
176
181
 
177
182
  ## Configuration
178
183
 
@@ -86,7 +86,7 @@ await client.initTagMap(); // Load metadata
86
86
 
87
87
  // Read data
88
88
  const blob = await client.export.exportFormula({
89
- format: farseer.ExportRequestFormatEnum.Csv,
89
+ format: farseer.ExportFormat.Csv,
90
90
  formula: 'sum("Revenue", "Y2025", "Plan")',
91
91
  });
92
92
 
@@ -119,7 +119,7 @@ Commits the import job and processes the data. Returns a report with success/fai
119
119
  ```typescript
120
120
  import * as aq from 'arquero';
121
121
  import { op } from 'arquero';
122
- import { ExportRequestFormatEnum } from 'farseer-client';
122
+ import { ExportFormat } from 'farseer-client';
123
123
 
124
124
  async function exportTransformImport(client: FarseerClient, year: string) {
125
125
  // 1. Calculate on-demand cells first
@@ -130,7 +130,7 @@ async function exportTransformImport(client: FarseerClient, year: string) {
130
130
 
131
131
  // 2. Export variable data
132
132
  const blob = await client.export.exportFormula({
133
- format: ExportRequestFormatEnum.Csv,
133
+ format: ExportFormat.Csv,
134
134
  formula: `sum("Revenue", "Y${year}", "Actual")`
135
135
  });
136
136
 
@@ -267,7 +267,7 @@ import { op } from 'arquero';
267
267
 
268
268
  // 1. Export variable data
269
269
  const blob = await client.export.exportFormula({
270
- format: ExportRequestFormatEnum.Csv,
270
+ format: ExportFormat.Csv,
271
271
  formula: 'sum("Revenue", "Y2024", "Actual")'
272
272
  });
273
273
 
@@ -128,7 +128,7 @@ async function main() {
128
128
 
129
129
  // Export variable data filtered by year and version
130
130
  const blob = await client.export.exportFormula({
131
- format: farseer.ExportRequestFormatEnum.Csv,
131
+ format: farseer.ExportFormat.Csv,
132
132
  formula: `sum("Revenue", "${year}", "${version}")`,
133
133
  });
134
134
 
@@ -6,7 +6,7 @@ The primary way to query data from Farseer is through `export.exportFormula()`:
6
6
 
7
7
  ```typescript
8
8
  const blob = await client.export.exportFormula({
9
- format: ExportRequestFormatEnum.Csv, // or Json, Xlsx
9
+ format: ExportFormat.Csv, // or Json, Xlsx
10
10
  formula: 'sum("Revenue", "Y2025", "Plan")',
11
11
  });
12
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "farseer-cli",
3
- "version": "1.9.1",
3
+ "version": "1.10.1",
4
4
  "description": "CLI tool for syncing Farseer App scripts between local folder and Farseer instances",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -1,189 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var checkout_exports = {};
30
- __export(checkout_exports, {
31
- ensureGitignoreEntries: () => import_workspace.ensureGitignoreEntries,
32
- registerCheckoutCommand: () => registerCheckoutCommand
33
- });
34
- module.exports = __toCommonJS(checkout_exports);
35
- var import_chalk = __toESM(require("chalk"));
36
- var import_logger = require("../utils/logger");
37
- var import_configService = require("../services/configService");
38
- var import_farseerFactory = require("../services/farseerFactory");
39
- var import_syncService = require("../services/syncService");
40
- var import_appSyncService = require("../services/appSyncService");
41
- var import_helpers = require("../utils/helpers");
42
- var import_cliOptions = require("../utils/cliOptions");
43
- var import_constants = require("../utils/constants");
44
- var import_workspace = require("../utils/workspace");
45
- var fs = __toESM(require("fs"));
46
- var path = __toESM(require("path"));
47
- function registerCheckoutCommand(program) {
48
- program.command("checkout [org] [tenant]").description("Set default tenant for commands (runs auth check and pull)").option("--no-pull", "Skip automatic pull").option("--clear", "Clear current checkout").option("--include-ext <ext>", "Include extra file extension for pull (repeatable)", import_cliOptions.collectValues, []).option("--include-folder <folder>", "Include all files in folder for pull (repeatable)", import_cliOptions.collectValues, []).action(async (first, second, options) => {
49
- if (options.clear) {
50
- (0, import_configService.clearCurrentTenant)();
51
- import_logger.logger.success("Checkout cleared. You now need to specify tenant for each command.");
52
- return;
53
- }
54
- if (!first) {
55
- const current = (0, import_configService.getCurrentCheckout)();
56
- if (current) {
57
- if (current.organisation === current.tenant) {
58
- import_logger.logger.info(`Currently checked out: ${import_chalk.default.bold(current.tenant)}`);
59
- } else {
60
- import_logger.logger.info(
61
- `Currently checked out: ${import_chalk.default.bold(current.tenant)} (org: ${import_chalk.default.bold(current.organisation)})`
62
- );
63
- }
64
- import_logger.logger.dim('Run "farseer checkout <tenant>" to switch tenants.');
65
- import_logger.logger.dim('Run "farseer checkout --clear" to clear checkout.');
66
- } else {
67
- import_logger.logger.info("No tenant currently checked out.");
68
- import_logger.logger.dim('Run "farseer checkout <tenant>" to set a default tenant.');
69
- import_logger.logger.dim('Run "farseer checkout <org> <tenant>" if organisation and tenant differ.');
70
- }
71
- return;
72
- }
73
- const organisation = second ? first : first;
74
- const tenant = second || first;
75
- import_logger.logger.info(`Checking out tenant: ${import_chalk.default.bold(tenant)} (org: ${import_chalk.default.bold(organisation)})...`);
76
- console.log();
77
- import_logger.logger.info("Verifying authentication...");
78
- const clientResult = await (0, import_farseerFactory.getFarseerClientWithFallback)(organisation, tenant);
79
- if (!clientResult) {
80
- (0, import_farseerFactory.showLoginPrompt)(tenant);
81
- process.exit(1);
82
- }
83
- const authLabel = clientResult.authType === "apiKey" ? "API key" : "browser login";
84
- if (clientResult.authType === "jwt") {
85
- import_logger.logger.info("Verifying tenant belongs to organisation...");
86
- let orgInfo;
87
- try {
88
- orgInfo = await clientResult.client.getOrganizationInfo();
89
- } catch (error) {
90
- import_logger.logger.error(
91
- `Could not verify that tenant ${import_chalk.default.bold(tenant)} belongs to organisation ${import_chalk.default.bold(organisation)}.`
92
- );
93
- import_logger.logger.dim("Checkout aborted \u2014 refusing to set a tenant whose organisation cannot be confirmed.");
94
- if (error instanceof Error) {
95
- import_logger.logger.dim(error.message);
96
- }
97
- process.exit(1);
98
- }
99
- const orgTenantNames = orgInfo.tenants.map((t) => t.name);
100
- if (!orgTenantNames.includes(tenant)) {
101
- import_logger.logger.error(
102
- `Tenant ${import_chalk.default.bold(tenant)} is not registered under organisation ${import_chalk.default.bold(organisation)}.`
103
- );
104
- if (orgTenantNames.length > 0) {
105
- import_logger.logger.dim(`Tenants under ${import_chalk.default.bold(organisation)}: ${orgTenantNames.join(", ")}`);
106
- }
107
- import_logger.logger.dim("You likely specified the wrong organisation for this tenant. Checkout aborted.");
108
- process.exit(1);
109
- }
110
- }
111
- import_logger.logger.success(`Authenticated (using ${authLabel})`);
112
- (0, import_configService.setCurrentCheckout)(organisation, tenant);
113
- (0, import_configService.saveTenantOrgMapping)(tenant, organisation);
114
- if (options.pull) {
115
- console.log();
116
- import_logger.logger.info("Pulling latest files and apps...");
117
- const syncService = new import_syncService.SyncService(tenant, clientResult.client);
118
- const tenantDir = (0, import_helpers.getTenantDir)(tenant);
119
- (0, import_helpers.ensureDirectoryExists)(tenantDir);
120
- try {
121
- const packageJsonPath = path.join(tenantDir, "package.json");
122
- if (!fs.existsSync(packageJsonPath)) {
123
- createDefaultPackageJson(tenant, packageJsonPath);
124
- }
125
- const gitignorePath = path.join(tenantDir, ".gitignore");
126
- (0, import_workspace.ensureGitignoreEntries)(gitignorePath);
127
- const includeExtensions = (0, import_cliOptions.normalizeExtensions)(options.includeExt);
128
- const includeFolders = options.includeFolder;
129
- const result = await syncService.pull({
130
- all: false,
131
- includeExtensions: includeExtensions.length > 0 ? includeExtensions : void 0,
132
- includeFolders: includeFolders.length > 0 ? includeFolders : void 0
133
- });
134
- import_logger.logger.dim(
135
- `Files: +${result.downloaded.length} -${result.deleted.length} (${result.unchanged.length} unchanged)`
136
- );
137
- const appSyncService = new import_appSyncService.AppSyncService(tenant, clientResult.client);
138
- const appResult = await appSyncService.pull();
139
- import_logger.logger.dim(
140
- `Apps: +${appResult.created.length} ~${appResult.updated.length} -${appResult.deleted.length} (${appResult.unchanged.length} unchanged)`
141
- );
142
- import_logger.logger.success("Pull complete!");
143
- } catch (error) {
144
- import_logger.logger.warning("Pull failed, but checkout is complete.");
145
- if (error instanceof Error) {
146
- import_logger.logger.dim(error.message);
147
- }
148
- }
149
- }
150
- console.log();
151
- import_logger.logger.success(`Tenant ${import_chalk.default.bold(tenant)} is now checked out.`);
152
- import_logger.logger.dim("You can now run commands without specifying the tenant:");
153
- import_logger.logger.dim(" farseer status");
154
- import_logger.logger.dim(" farseer model --variables");
155
- import_logger.logger.dim(" farseer apps");
156
- import_logger.logger.dim(" farseer push");
157
- });
158
- }
159
- function createDefaultPackageJson(tenant, packageJsonPath) {
160
- const packageJson = {
161
- name: `farseer-${tenant}`,
162
- version: "1.0.0",
163
- description: `Farseer scripts for ${tenant}`,
164
- type: "module",
165
- scripts: {
166
- build: "tsc"
167
- },
168
- dependencies: {
169
- "farseer-client": import_constants.FARSEER_CLIENT_URL,
170
- arquero: "^7.0.1",
171
- xlsx: "^0.18.5",
172
- xmldom: "^0.6.0"
173
- },
174
- devDependencies: {
175
- "@types/node": "^22.5.0",
176
- "@types/xmldom": "^0.1.34",
177
- "ts-node": "^10.9.2",
178
- typescript: "^5.5.4"
179
- }
180
- };
181
- fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), "utf-8");
182
- import_logger.logger.dim(`Created package.json for ${tenant}`);
183
- }
184
- // Annotate the CommonJS export names for ESM import in node:
185
- 0 && (module.exports = {
186
- ensureGitignoreEntries,
187
- registerCheckoutCommand
188
- });
189
- //# sourceMappingURL=checkout.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/commands/checkout.ts"],
4
- "sourcesContent": ["import { Command } from 'commander';\nimport chalk from 'chalk';\nimport { logger } from '../utils/logger';\nimport {\n getCurrentCheckout,\n setCurrentCheckout,\n clearCurrentTenant,\n saveTenantOrgMapping,\n} from '../services/configService';\nimport { getFarseerClientWithFallback, showLoginPrompt } from '../services/farseerFactory';\nimport type { OrganizationInfo } from '../services/farseerFactory';\nimport { SyncService } from '../services/syncService';\nimport { AppSyncService } from '../services/appSyncService';\nimport { getTenantDir, ensureDirectoryExists } from '../utils/helpers';\nimport { collectValues, normalizeExtensions } from '../utils/cliOptions';\nimport { FARSEER_CLIENT_URL } from '../utils/constants';\nimport { ensureGitignoreEntries } from '../utils/workspace';\nimport * as fs from 'fs';\nimport * as path from 'path';\n\n// Re-export for tests that import from the original location and for\n// any downstream consumers that already pinned to this path.\nexport { ensureGitignoreEntries };\n\nexport function registerCheckoutCommand(program: Command): void {\n program\n .command('checkout [org] [tenant]')\n .description('Set default tenant for commands (runs auth check and pull)')\n .option('--no-pull', 'Skip automatic pull')\n .option('--clear', 'Clear current checkout')\n .option('--include-ext <ext>', 'Include extra file extension for pull (repeatable)', collectValues, [])\n .option('--include-folder <folder>', 'Include all files in folder for pull (repeatable)', collectValues, [])\n .action(async (first, second, options) => {\n // Handle --clear flag\n if (options.clear) {\n clearCurrentTenant();\n logger.success('Checkout cleared. You now need to specify tenant for each command.');\n return;\n }\n\n // If no arguments specified, show current checkout status\n if (!first) {\n const current = getCurrentCheckout();\n if (current) {\n if (current.organisation === current.tenant) {\n logger.info(`Currently checked out: ${chalk.bold(current.tenant)}`);\n } else {\n logger.info(\n `Currently checked out: ${chalk.bold(current.tenant)} (org: ${chalk.bold(current.organisation)})`,\n );\n }\n logger.dim('Run \"farseer checkout <tenant>\" to switch tenants.');\n logger.dim('Run \"farseer checkout --clear\" to clear checkout.');\n } else {\n logger.info('No tenant currently checked out.');\n logger.dim('Run \"farseer checkout <tenant>\" to set a default tenant.');\n logger.dim('Run \"farseer checkout <org> <tenant>\" if organisation and tenant differ.');\n }\n return;\n }\n\n // Determine organisation and tenant\n // If two arguments: first=organisation, second=tenant\n // If one argument: organisation=tenant=first\n const organisation = second ? first : first;\n const tenant = second || first;\n\n logger.info(`Checking out tenant: ${chalk.bold(tenant)} (org: ${chalk.bold(organisation)})...`);\n console.log();\n\n // Step 1: Verify authentication\n logger.info('Verifying authentication...');\n const clientResult = await getFarseerClientWithFallback(organisation, tenant);\n\n if (!clientResult) {\n showLoginPrompt(tenant);\n process.exit(1);\n }\n\n const authLabel = clientResult.authType === 'apiKey' ? 'API key' : 'browser login';\n\n // Step 2: Confirm the org+tenant pair via /organization \u2014 JWT (browser\n // login) path only. That's the only path where the typed <org> routes\n // the request; the API-key path ignores <org> and resolves host+tenant\n // from the stored credential, and /organization is login-token-shaped\n // (filters by the JWT's roles), so the check is both unnecessary and\n // unanswerable there.\n if (clientResult.authType === 'jwt') {\n logger.info('Verifying tenant belongs to organisation...');\n let orgInfo: OrganizationInfo;\n try {\n orgInfo = await clientResult.client.getOrganizationInfo();\n } catch (error) {\n logger.error(\n `Could not verify that tenant ${chalk.bold(tenant)} belongs to organisation ${chalk.bold(organisation)}.`,\n );\n logger.dim('Checkout aborted \u2014 refusing to set a tenant whose organisation cannot be confirmed.');\n if (error instanceof Error) {\n logger.dim(error.message);\n }\n process.exit(1);\n }\n\n const orgTenantNames = orgInfo.tenants.map((t) => t.name);\n if (!orgTenantNames.includes(tenant)) {\n logger.error(\n `Tenant ${chalk.bold(tenant)} is not registered under organisation ${chalk.bold(organisation)}.`,\n );\n if (orgTenantNames.length > 0) {\n logger.dim(`Tenants under ${chalk.bold(organisation)}: ${orgTenantNames.join(', ')}`);\n }\n logger.dim('You likely specified the wrong organisation for this tenant. Checkout aborted.');\n process.exit(1);\n }\n }\n\n // Auth and \u2014 on the JWT path \u2014 the org+tenant pairing are now both\n // confirmed. Emit the success only here so a mismatch aborts above\n // without first flashing a misleading \"Authenticated\" check.\n logger.success(`Authenticated (using ${authLabel})`);\n\n // Step 3: Set as current checkout and save org-tenant mapping\n setCurrentCheckout(organisation, tenant);\n saveTenantOrgMapping(tenant, organisation);\n\n // Step 4: Auto-pull (unless --no-pull)\n if (options.pull) {\n console.log();\n logger.info('Pulling latest files and apps...');\n\n const syncService = new SyncService(tenant, clientResult.client);\n const tenantDir = getTenantDir(tenant);\n ensureDirectoryExists(tenantDir);\n\n try {\n // Ensure package.json exists\n const packageJsonPath = path.join(tenantDir, 'package.json');\n if (!fs.existsSync(packageJsonPath)) {\n createDefaultPackageJson(tenant, packageJsonPath);\n }\n\n // Ensure .gitignore exists AND contains the per-machine\n // sync entries. Idempotent on the lines, not on the file\n // \u2014 pre-1.6.2 checkouts and `npm init`-seeded workspaces\n // already have a partial .gitignore (node_modules/) but\n // are missing `.farseer-sync.json`; just checking for\n // file existence leaves those workspaces leaking\n // baseline state into git.\n const gitignorePath = path.join(tenantDir, '.gitignore');\n ensureGitignoreEntries(gitignorePath);\n\n // Pull files (scripts + includes by default)\n const includeExtensions = normalizeExtensions(options.includeExt);\n const includeFolders = options.includeFolder as string[];\n const result = await syncService.pull({\n all: false,\n includeExtensions: includeExtensions.length > 0 ? includeExtensions : undefined,\n includeFolders: includeFolders.length > 0 ? includeFolders : undefined,\n });\n logger.dim(\n `Files: +${result.downloaded.length} -${result.deleted.length} (${result.unchanged.length} unchanged)`,\n );\n\n // Pull apps\n const appSyncService = new AppSyncService(tenant, clientResult.client);\n const appResult = await appSyncService.pull();\n logger.dim(\n `Apps: +${appResult.created.length} ~${appResult.updated.length} -${appResult.deleted.length} (${appResult.unchanged.length} unchanged)`,\n );\n\n logger.success('Pull complete!');\n } catch (error) {\n logger.warning('Pull failed, but checkout is complete.');\n if (error instanceof Error) {\n logger.dim(error.message);\n }\n }\n }\n\n // Final message\n console.log();\n logger.success(`Tenant ${chalk.bold(tenant)} is now checked out.`);\n logger.dim('You can now run commands without specifying the tenant:');\n logger.dim(' farseer status');\n logger.dim(' farseer model --variables');\n logger.dim(' farseer apps');\n logger.dim(' farseer push');\n });\n}\n\nfunction createDefaultPackageJson(tenant: string, packageJsonPath: string): void {\n const packageJson = {\n name: `farseer-${tenant}`,\n version: '1.0.0',\n description: `Farseer scripts for ${tenant}`,\n type: 'module',\n scripts: {\n build: 'tsc',\n },\n dependencies: {\n 'farseer-client': FARSEER_CLIENT_URL,\n arquero: '^7.0.1',\n xlsx: '^0.18.5',\n xmldom: '^0.6.0',\n },\n devDependencies: {\n '@types/node': '^22.5.0',\n '@types/xmldom': '^0.1.34',\n 'ts-node': '^10.9.2',\n typescript: '^5.5.4',\n },\n };\n\n fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf-8');\n logger.dim(`Created package.json for ${tenant}`);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAkB;AAClB,oBAAuB;AACvB,2BAKO;AACP,4BAA8D;AAE9D,yBAA4B;AAC5B,4BAA+B;AAC/B,qBAAoD;AACpD,wBAAmD;AACnD,uBAAmC;AACnC,uBAAuC;AACvC,SAAoB;AACpB,WAAsB;AAMf,SAAS,wBAAwB,SAAwB;AAC5D,UACK,QAAQ,yBAAyB,EACjC,YAAY,4DAA4D,EACxE,OAAO,aAAa,qBAAqB,EACzC,OAAO,WAAW,wBAAwB,EAC1C,OAAO,uBAAuB,sDAAsD,iCAAe,CAAC,CAAC,EACrG,OAAO,6BAA6B,qDAAqD,iCAAe,CAAC,CAAC,EAC1G,OAAO,OAAO,OAAO,QAAQ,YAAY;AAEtC,QAAI,QAAQ,OAAO;AACf,mDAAmB;AACnB,2BAAO,QAAQ,oEAAoE;AACnF;AAAA,IACJ;AAGA,QAAI,CAAC,OAAO;AACR,YAAM,cAAU,yCAAmB;AACnC,UAAI,SAAS;AACT,YAAI,QAAQ,iBAAiB,QAAQ,QAAQ;AACzC,+BAAO,KAAK,0BAA0B,aAAAA,QAAM,KAAK,QAAQ,MAAM,CAAC,EAAE;AAAA,QACtE,OAAO;AACH,+BAAO;AAAA,YACH,0BAA0B,aAAAA,QAAM,KAAK,QAAQ,MAAM,CAAC,UAAU,aAAAA,QAAM,KAAK,QAAQ,YAAY,CAAC;AAAA,UAClG;AAAA,QACJ;AACA,6BAAO,IAAI,oDAAoD;AAC/D,6BAAO,IAAI,mDAAmD;AAAA,MAClE,OAAO;AACH,6BAAO,KAAK,kCAAkC;AAC9C,6BAAO,IAAI,0DAA0D;AACrE,6BAAO,IAAI,0EAA0E;AAAA,MACzF;AACA;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