farseer-cli 1.10.3 → 1.11.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.
- package/README.md +5 -0
- package/dist/commands/app.js +41 -42
- package/dist/commands/app.js.map +2 -2
- package/dist/commands/apps.js +3 -3
- package/dist/commands/apps.js.map +2 -2
- package/dist/commands/cells.js +3 -3
- package/dist/commands/cells.js.map +2 -2
- package/dist/commands/config.js +23 -15
- package/dist/commands/config.js.map +2 -2
- package/dist/commands/dashboards.js +3 -3
- package/dist/commands/dashboards.js.map +2 -2
- package/dist/commands/dimensions.js +3 -3
- package/dist/commands/dimensions.js.map +2 -2
- package/dist/commands/files.js +5 -4
- package/dist/commands/files.js.map +2 -2
- package/dist/commands/formula.js +3 -3
- package/dist/commands/formula.js.map +2 -2
- package/dist/commands/list.js +5 -4
- package/dist/commands/list.js.map +2 -2
- package/dist/commands/login.js +6 -5
- package/dist/commands/login.js.map +2 -2
- package/dist/commands/model.js +5 -4
- package/dist/commands/model.js.map +2 -2
- package/dist/commands/push.js +5 -7
- package/dist/commands/push.js.map +2 -2
- package/dist/commands/run.js +13 -15
- package/dist/commands/run.js.map +2 -2
- package/dist/commands/sheets.js +3 -3
- package/dist/commands/sheets.js.map +2 -2
- package/dist/commands/variables.js +5 -4
- package/dist/commands/variables.js.map +2 -2
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/index.js.map +2 -2
- package/dist/mcp/tools/appTools.js +38 -23
- package/dist/mcp/tools/appTools.js.map +2 -2
- package/dist/mcp/tools/dataTools.js +5 -2
- package/dist/mcp/tools/dataTools.js.map +2 -2
- package/dist/mcp/tools/modelTools.js +45 -48
- package/dist/mcp/tools/modelTools.js.map +2 -2
- package/dist/mcp/tools/runTools.js +12 -7
- package/dist/mcp/tools/runTools.js.map +2 -2
- package/dist/mcp/utils/helpers.js +41 -0
- package/dist/mcp/utils/helpers.js.map +2 -2
- package/dist/mcp/utils/session.js +2 -2
- package/dist/mcp/utils/session.js.map +2 -2
- package/dist/services/appSyncService.js.map +1 -1
- package/dist/services/apps.js +149 -0
- package/dist/services/apps.js.map +7 -0
- package/dist/services/authErrors.js +77 -0
- package/dist/services/authErrors.js.map +7 -0
- package/dist/services/configService.js +7 -4
- package/dist/services/configService.js.map +2 -2
- package/dist/services/credentials.js +87 -0
- package/dist/services/credentials.js.map +7 -0
- package/dist/services/farseerService.js +247 -123
- package/dist/services/farseerService.js.map +2 -2
- package/dist/services/httpError.js +35 -0
- package/dist/services/httpError.js.map +7 -0
- package/dist/services/modelExport.js +63 -0
- package/dist/services/modelExport.js.map +7 -0
- package/dist/services/organisation.js +88 -0
- package/dist/services/organisation.js.map +7 -0
- package/dist/services/preflight.js +10 -13
- package/dist/services/preflight.js.map +2 -2
- package/dist/services/syncService.js +2 -2
- package/dist/services/syncService.js.map +2 -2
- package/dist/utils/appResolver.js +63 -0
- package/dist/utils/appResolver.js.map +7 -0
- package/dist/utils/constants.js +2 -5
- package/dist/utils/constants.js.map +2 -2
- package/dist/utils/fileLogger.js +24 -1
- package/dist/utils/fileLogger.js.map +2 -2
- package/dist/utils/folderMatch.js +49 -0
- package/dist/utils/folderMatch.js.map +7 -0
- package/dist/utils/helpers.js +98 -1
- package/dist/utils/helpers.js.map +3 -3
- package/dist/utils/syncScope.js +44 -0
- package/dist/utils/syncScope.js.map +7 -0
- package/docs/api-reference.md +13 -1
- package/package.json +1 -1
- package/dist/services/farseerApi.js +0 -716
- package/dist/services/farseerApi.js.map +0 -7
- package/dist/services/farseerFactory.js +0 -276
- package/dist/services/farseerFactory.js.map +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/services/preflight.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Shared tenant guard: confirm the organisation has the tenant, and hand back\n * clients built from the one credential that was checked.\n *\n * Two entry points because two surfaces need the same checks with different\n * endings. `preflightForPair` reports and exits, which is right for a CLI\n * command; `openTenantSession` returns the outcome, which is what lets the MCP\n * server run the same checks without killing the process an agent is talking to.\n *\n * Past a successful call the credentials work and the pair is real. It does not\n * prove the caller may perform an operation, and on the API-key path the\n * organisation is not checked at all \u2014 a key carries its own host.\n *\n * Nothing is cached: a remembered \"fine once\" would hide a tenant that moved\n * organisations, and the check is already paid for.\n */\n\nimport * as fs from 'fs';\nimport type * as farseer from 'farseer-client';\nimport type { IFarseerClient, ResolvedAuth } from './farseerFactory';\nimport {\n buildClient,\n buildNativeClient,\n checkTenantAtOrganisation,\n fetchOrganizationTenants,\n getFreshAccessToken,\n resolveAuth,\n resolveAuthByProbe,\n showLoginPrompt,\n} from './farseerFactory';\nimport { generateBasePath, getCredential, saveTenantOrgMapping } from './configService';\nimport { resolveTenantWithOrgMapping, getTenantFilesDir } from '../utils/helpers';\nimport { logger } from '../utils/logger';\n\nexport interface TenantSession {\n organisation: string;\n tenant: string;\n client: IFarseerClient;\n native: farseer.FarseerClient;\n authType: 'jwt' | 'apiKey';\n}\n\n// Data, not a rendered string: \"pass <org> <tenant>\" is useless advice to an\n// agent in a locked session, so each surface words it itself.\nexport type SessionFailure =\n | { reason: 'pair-refuted'; organisation: string; tenant: string; orgTenants: string[] }\n | { reason: 'org-unknown'; organisation: string; tenant: string }\n | { reason: 'no-credentials'; organisation: string; tenant: string };\n\n// True and worth saying, but not a reason to stop. Carried, not printed, for\n// the same reason a failure is.\nexport type SessionWarning = { reason: 'organisation-ignored'; organisation: string; tenant: string; host: string };\n\nexport type SessionOutcome =\n | { ok: true; organisation: string; tenant: string; auth: ResolvedAuth; warning?: SessionWarning }\n | { ok: false; failure: SessionFailure };\n\nexport interface PreflightOpts {\n /** Commands that read or write local files. `pull` creates the workspace itself. */\n requiresWorkspace?: boolean;\n}\n\n/** For commands whose positional args are `[org] [tenant]`; variadic ones call preflightForPair. */\nexport async function preflight(arg1?: string, arg2?: string, opts: PreflightOpts = {}): Promise<TenantSession> {\n const { organisation, tenant } = resolveTenantWithOrgMapping(arg1, arg2);\n return preflightForPair(organisation, tenant, opts);\n}\n\n/** Same checks for an already-resolved pair, and the only place that exits. */\nexport async function preflightForPair(\n organisation: string,\n tenant: string,\n opts: PreflightOpts = {},\n): Promise<TenantSession> {\n const outcome = await openTenantSession(organisation, tenant);\n if (!outcome.ok) {\n reportSessionFailure(outcome.failure);\n process.exit(1);\n }\n\n if (outcome.warning) {\n reportSessionWarning(outcome.warning);\n }\n\n if (opts.requiresWorkspace) {\n ensureWorkspaceOrExit(tenant);\n }\n\n return sessionFrom(outcome.organisation, outcome.tenant, outcome.auth);\n}\n\n/**\n * The checks, with no opinion about what to do when they fail. The credential is\n * part of the answer, not something the caller re-derives afterwards.\n */\nexport async function openTenantSession(organisation: string, tenant: string): Promise<SessionOutcome> {\n const validation = await validatePairing(organisation, tenant);\n const deadRoute = deadRouteFailure(validation, organisation, tenant);\n\n // An API key carries its own host, so it's the one thing that still works\n // once the org route is dead. Without one, refuse now rather than spend a\n // round trip confirming what the org already said.\n if (deadRoute && !getCredential(tenant)) {\n return { ok: false, failure: deadRoute };\n }\n\n // A 200 already proved the token, so that path needs no second probe.\n const auth =\n validation.status === 'jwt-validated'\n ? await resolveAuth(organisation, tenant)\n : await resolveAuthByProbe(organisation, tenant);\n\n if (!auth) {\n // Reaching here with a dead route means the API key we deferred to also\n // failed; naming the login would point at the one thing that isn't broken.\n return { ok: false, failure: deadRoute ?? { reason: 'no-credentials', organisation, tenant } };\n }\n\n // Only what the org confirmed. The other outcomes can still succeed on an\n // API key, which ignores the org \u2014 so success there proves nothing about the\n // org that was typed, and recording it would pin a bad host to this tenant.\n if (validation.status === 'jwt-validated') {\n saveTenantOrgMapping(tenant, organisation);\n }\n\n return { ok: true, organisation, tenant, auth, warning: organisationIgnored(organisation, auth) };\n}\n\n/**\n * An API key carries its own host and ignores the organisation, so a pair the\n * guard would have refused on a browser login goes through unremarked. The\n * tenant is still the one that was asked for \u2014 nothing operates on the wrong\n * data \u2014 but silence lets a typo sit in a script for months.\n *\n * Only when the two actually disagree.\n */\nfunction organisationIgnored(organisation: string, auth: ResolvedAuth): SessionWarning | undefined {\n if (auth.kind !== 'apiKey') {\n return undefined;\n }\n const basePath = auth.credential.basePath;\n if (basePath === generateBasePath(organisation)) {\n return undefined;\n }\n return { reason: 'organisation-ignored', organisation, tenant: auth.credential.tenantId, host: hostOf(basePath) };\n}\n\n/** Materialise both client shapes over one credential. Constructs only. */\nexport function sessionFrom(organisation: string, tenant: string, auth: ResolvedAuth): TenantSession {\n return {\n organisation,\n tenant,\n client: buildClient(auth),\n native: buildNativeClient(auth),\n authType: auth.kind,\n };\n}\n\n// `unvalidated` means we couldn't ask, not that the answer was no.\ntype ValidationOutcome =\n | { status: 'jwt-validated' }\n | { status: 'pair-refuted'; orgTenants: string[] }\n | { status: 'org-unknown' }\n | { status: 'unvalidated' };\n\n/**\n * Ask the organisation whether it has this tenant. Browser-login only \u2014 a key\n * ignores the organisation, so there is nothing to ask. Reports, never decides.\n */\nasync function validatePairing(organisation: string, tenant: string): Promise<ValidationOutcome> {\n const accessToken = await getFreshAccessToken();\n if (!accessToken) {\n return { status: 'unvalidated' };\n }\n\n const check = await checkTenantAtOrganisation(organisation, tenant, accessToken);\n\n switch (check.status) {\n case 'ok':\n return { status: 'jwt-validated' };\n\n case 'tenant-unknown':\n // Only now spend a second request, to name what the org does have.\n return { status: 'pair-refuted', orgTenants: await fetchOrganizationTenants(organisation, accessToken) };\n\n case 'no-such-org':\n return { status: 'org-unknown' };\n\n case 'unauthorized':\n // Say nothing \u2014 let the credential resolution try an API key, or prompt.\n return { status: 'unvalidated' };\n\n case 'unreachable':\n logger.dim(`Could not verify that \"${tenant}\" belongs to \"${organisation}\"; proceeding.`);\n return { status: 'unvalidated' };\n }\n}\n\n/** The org's answer, as a failure \u2014 or null when the org route is still open. */\nfunction deadRouteFailure(validation: ValidationOutcome, organisation: string, tenant: string): SessionFailure | null {\n switch (validation.status) {\n case 'pair-refuted':\n return { reason: 'pair-refuted', organisation, tenant, orgTenants: validation.orgTenants };\n case 'org-unknown':\n return { reason: 'org-unknown', organisation, tenant };\n default:\n return null;\n }\n}\n\nfunction reportSessionWarning(warning: SessionWarning): void {\n logger.warning(`Organisation \"${warning.organisation}\" was ignored.`);\n logger.dim(`The stored API key for \"${warning.tenant}\" carries its own host: ${warning.host}.`);\n logger.dim('The tenant is the one you asked for; the organisation had no effect on where this went.');\n}\n\n/** The full base path is noise in a message. */\nfunction hostOf(basePath: string): string {\n try {\n return new URL(basePath).host;\n } catch {\n return basePath;\n }\n}\n\n/** Says which way the route is dead, and what to do about it, for a CLI user. */\nfunction reportSessionFailure(failure: SessionFailure): void {\n if (failure.reason === 'no-credentials') {\n showLoginPrompt(failure.tenant);\n return;\n }\n\n if (failure.reason === 'org-unknown') {\n logger.error(`No Farseer organisation at \"${failure.organisation}\".`);\n logger.dim('Check the spelling, then pass the pair explicitly:');\n logger.dim(` farseer <command> <organisation> ${failure.tenant}`);\n return;\n }\n\n logger.error(`Tenant \"${failure.tenant}\" is not available under organisation \"${failure.organisation}\".`);\n if (failure.orgTenants.length > 0) {\n logger.dim(`Tenants you can access under ${failure.organisation}: ${failure.orgTenants.join(', ')}`);\n }\n logger.dim('Either the organisation is wrong for this tenant (set FARSEER_ORG or pass <org> <tenant>),');\n logger.dim(\"or you don't have access to it \u2014 check you're logged in with the right account.\");\n}\n\n/** For commands that read or write local files. */\nfunction ensureWorkspaceOrExit(tenant: string): void {\n const filesDir = getTenantFilesDir(tenant);\n if (!fs.existsSync(filesDir)) {\n logger.error(`No local workspace for tenant \"${tenant}\".`);\n logger.dim(`Run \"farseer pull ${tenant}\" to set it up first.`);\n process.exit(1);\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBA,SAAoB;AAGpB,
|
|
4
|
+
"sourcesContent": ["/**\n * Shared tenant guard: confirm the organisation has the tenant, and hand back\n * clients built from the one credential that was checked.\n *\n * Two entry points because two surfaces need the same checks with different\n * endings. `preflightForPair` reports and exits, which is right for a CLI\n * command; `openTenantSession` returns the outcome, which is what lets the MCP\n * server run the same checks without killing the process an agent is talking to.\n *\n * Past a successful call the credentials work and the pair is real. It does not\n * prove the caller may perform an operation, and on the API-key path the\n * organisation is not checked at all \u2014 a key carries its own host.\n *\n * Nothing is cached: a remembered \"fine once\" would hide a tenant that moved\n * organisations, and the check is already paid for.\n */\n\nimport * as fs from 'fs';\nimport type * as farseer from 'farseer-client';\nimport type { FarseerService, ResolvedAuth } from './farseerService';\nimport { buildClient, getFreshAccessToken, resolveAuth, resolveAuthByProbe } from './credentials';\nimport { showLoginPrompt } from './authErrors';\nimport { checkTenantAtOrganisation, fetchOrganisationTenants } from './organisation';\nimport { generateBasePath, getCredential, saveTenantOrgMapping } from './configService';\nimport { resolveTenantWithOrgMapping, getTenantFilesDir } from '../utils/helpers';\nimport { logger } from '../utils/logger';\n\nexport interface TenantSession {\n organisation: string;\n tenant: string;\n client: FarseerService;\n native: farseer.FarseerClient;\n authType: 'jwt' | 'apiKey';\n}\n\n// Data, not a rendered string: \"pass <org> <tenant>\" is useless advice to an\n// agent in a locked session, so each surface words it itself.\nexport type SessionFailure =\n | { reason: 'pair-refuted'; organisation: string; tenant: string; orgTenants: string[] }\n | { reason: 'org-unknown'; organisation: string; tenant: string }\n | { reason: 'no-credentials'; organisation: string; tenant: string };\n\n// True and worth saying, but not a reason to stop. Carried, not printed, for\n// the same reason a failure is.\nexport type SessionWarning = { reason: 'organisation-ignored'; organisation: string; tenant: string; host: string };\n\nexport type SessionOutcome =\n | { ok: true; organisation: string; tenant: string; auth: ResolvedAuth; warning?: SessionWarning }\n | { ok: false; failure: SessionFailure };\n\nexport interface PreflightOpts {\n /** Commands that read or write local files. `pull` creates the workspace itself. */\n requiresWorkspace?: boolean;\n}\n\n/** For commands whose positional args are `[org] [tenant]`; variadic ones call preflightForPair. */\nexport async function preflight(arg1?: string, arg2?: string, opts: PreflightOpts = {}): Promise<TenantSession> {\n const { organisation, tenant } = resolveTenantWithOrgMapping(arg1, arg2);\n return preflightForPair(organisation, tenant, opts);\n}\n\n/** Same checks for an already-resolved pair, and the only place that exits. */\nexport async function preflightForPair(\n organisation: string,\n tenant: string,\n opts: PreflightOpts = {},\n): Promise<TenantSession> {\n const outcome = await openTenantSession(organisation, tenant);\n if (!outcome.ok) {\n reportSessionFailure(outcome.failure);\n process.exit(1);\n }\n\n if (outcome.warning) {\n reportSessionWarning(outcome.warning);\n }\n\n if (opts.requiresWorkspace) {\n ensureWorkspaceOrExit(tenant);\n }\n\n return sessionFrom(outcome.organisation, outcome.tenant, outcome.auth);\n}\n\n/**\n * The checks, with no opinion about what to do when they fail. The credential is\n * part of the answer, not something the caller re-derives afterwards.\n */\nexport async function openTenantSession(organisation: string, tenant: string): Promise<SessionOutcome> {\n const validation = await validatePairing(organisation, tenant);\n const deadRoute = deadRouteFailure(validation, organisation, tenant);\n\n // An API key carries its own host, so it's the one thing that still works\n // once the org route is dead. Without one, refuse now rather than spend a\n // round trip confirming what the org already said.\n if (deadRoute && !getCredential(tenant)) {\n return { ok: false, failure: deadRoute };\n }\n\n // A 200 already proved the token, so that path needs no second probe.\n const auth =\n validation.status === 'jwt-validated'\n ? await resolveAuth(organisation, tenant)\n : await resolveAuthByProbe(organisation, tenant);\n\n if (!auth) {\n // Reaching here with a dead route means the API key we deferred to also\n // failed; naming the login would point at the one thing that isn't broken.\n return { ok: false, failure: deadRoute ?? { reason: 'no-credentials', organisation, tenant } };\n }\n\n // Only what the org confirmed. The other outcomes can still succeed on an\n // API key, which ignores the org \u2014 so success there proves nothing about the\n // org that was typed, and recording it would pin a bad host to this tenant.\n if (validation.status === 'jwt-validated') {\n saveTenantOrgMapping(tenant, organisation);\n }\n\n return { ok: true, organisation, tenant, auth, warning: organisationIgnored(organisation, auth) };\n}\n\n/**\n * An API key carries its own host and ignores the organisation, so a pair the\n * guard would have refused on a browser login goes through unremarked. The\n * tenant is still the one that was asked for \u2014 nothing operates on the wrong\n * data \u2014 but silence lets a typo sit in a script for months.\n *\n * Only when the two actually disagree.\n */\nfunction organisationIgnored(organisation: string, auth: ResolvedAuth): SessionWarning | undefined {\n if (auth.kind !== 'apiKey') {\n return undefined;\n }\n const basePath = auth.credential.basePath;\n if (basePath === generateBasePath(organisation)) {\n return undefined;\n }\n return { reason: 'organisation-ignored', organisation, tenant: auth.credential.tenantId, host: hostOf(basePath) };\n}\n\n/** Materialise both client shapes over one credential. Constructs only. */\nexport function sessionFrom(organisation: string, tenant: string, auth: ResolvedAuth): TenantSession {\n // One client per session. `native` is the SDK object the facade already\n // holds, not a second one built from the same credential.\n const client = buildClient(auth);\n return { organisation, tenant, client, native: client.native, authType: auth.kind };\n}\n\n// `unvalidated` means we couldn't ask, not that the answer was no.\n\ntype ValidationOutcome =\n | { status: 'jwt-validated' }\n | { status: 'pair-refuted'; orgTenants: string[] }\n | { status: 'org-unknown' }\n | { status: 'unvalidated' };\n\n/**\n * Ask the organisation whether it has this tenant. Browser-login only \u2014 a key\n * ignores the organisation, so there is nothing to ask. Reports, never decides.\n */\nasync function validatePairing(organisation: string, tenant: string): Promise<ValidationOutcome> {\n const accessToken = await getFreshAccessToken();\n if (!accessToken) {\n return { status: 'unvalidated' };\n }\n\n const check = await checkTenantAtOrganisation(organisation, tenant, accessToken);\n\n switch (check.status) {\n case 'ok':\n return { status: 'jwt-validated' };\n\n case 'tenant-unknown':\n // Only now spend a second request, to name what the org does have.\n return { status: 'pair-refuted', orgTenants: await fetchOrganisationTenants(organisation, accessToken) };\n\n case 'no-such-org':\n return { status: 'org-unknown' };\n\n case 'unauthorized':\n // Say nothing \u2014 let the credential resolution try an API key, or prompt.\n return { status: 'unvalidated' };\n\n case 'unreachable':\n logger.dim(`Could not verify that \"${tenant}\" belongs to \"${organisation}\"; proceeding.`);\n return { status: 'unvalidated' };\n }\n}\n\n/** The org's answer, as a failure \u2014 or null when the org route is still open. */\nfunction deadRouteFailure(validation: ValidationOutcome, organisation: string, tenant: string): SessionFailure | null {\n switch (validation.status) {\n case 'pair-refuted':\n return { reason: 'pair-refuted', organisation, tenant, orgTenants: validation.orgTenants };\n case 'org-unknown':\n return { reason: 'org-unknown', organisation, tenant };\n default:\n return null;\n }\n}\n\nfunction reportSessionWarning(warning: SessionWarning): void {\n logger.warning(`Organisation \"${warning.organisation}\" was ignored.`);\n logger.dim(`The stored API key for \"${warning.tenant}\" carries its own host: ${warning.host}.`);\n logger.dim('The tenant is the one you asked for; the organisation had no effect on where this went.');\n}\n\n/** The full base path is noise in a message. */\nfunction hostOf(basePath: string): string {\n try {\n return new URL(basePath).host;\n } catch {\n return basePath;\n }\n}\n\n/** Says which way the route is dead, and what to do about it, for a CLI user. */\nfunction reportSessionFailure(failure: SessionFailure): void {\n if (failure.reason === 'no-credentials') {\n showLoginPrompt(failure.tenant);\n return;\n }\n\n if (failure.reason === 'org-unknown') {\n logger.error(`No Farseer organisation at \"${failure.organisation}\".`);\n logger.dim('Check the spelling, then pass the pair explicitly:');\n logger.dim(` farseer <command> <organisation> ${failure.tenant}`);\n return;\n }\n\n logger.error(`Tenant \"${failure.tenant}\" is not available under organisation \"${failure.organisation}\".`);\n if (failure.orgTenants.length > 0) {\n logger.dim(`Tenants you can access under ${failure.organisation}: ${failure.orgTenants.join(', ')}`);\n }\n logger.dim('Either the organisation is wrong for this tenant (set FARSEER_ORG or pass <org> <tenant>),');\n logger.dim(\"or you don't have access to it \u2014 check you're logged in with the right account.\");\n}\n\n/** For commands that read or write local files. */\nfunction ensureWorkspaceOrExit(tenant: string): void {\n const filesDir = getTenantFilesDir(tenant);\n if (!fs.existsSync(filesDir)) {\n logger.error(`No local workspace for tenant \"${tenant}\".`);\n logger.dim(`Run \"farseer pull ${tenant}\" to set it up first.`);\n process.exit(1);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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ports);
|
|
42
42
|
var fs = __toESM(require("fs"));
|
|
43
43
|
var path = __toESM(require("path"));
|
|
44
|
-
var
|
|
44
|
+
var import_syncScope = require("../utils/syncScope");
|
|
45
45
|
var import_configService = require("./configService");
|
|
46
46
|
var import_helpers = require("../utils/helpers");
|
|
47
47
|
var import_logger = require("../utils/logger");
|
|
@@ -136,7 +136,7 @@ function shouldIncludeFile(filePath, tenant, options) {
|
|
|
136
136
|
const matchesIncludes = folderMatches || extensionMatches;
|
|
137
137
|
if (isBlocklistedPath(filePath)) return matchesIncludes;
|
|
138
138
|
if (options?.all) return true;
|
|
139
|
-
if (
|
|
139
|
+
if (import_syncScope.DEFAULT_SYNC_EXTENSIONS.includes(ext)) return true;
|
|
140
140
|
return matchesIncludes;
|
|
141
141
|
}
|
|
142
142
|
function emptyStatus(deepCompare) {
|