@fjall/util 17.0.0 → 19.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.build-source-hash +9 -7
- package/dist/.minified +1 -1
- package/dist/failure/deploymentFailure.d.ts +3 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/infra/connectionsWire.d.ts +23 -0
- package/dist/infra/connectionsWire.js +1 -1
- package/dist/naming/targetExportNames.d.ts +2 -2
- package/dist/naming/targetExportNames.js +1 -1
- package/dist/onboarding/index.d.ts +78 -0
- package/dist/onboarding/index.js +1 -0
- package/dist/onboarding/versionCurrency.d.ts +25 -0
- package/dist/onboarding/versionCurrency.js +1 -0
- package/package.json +5 -1
package/dist/.build-source-hash
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"package.json",
|
|
10
10
|
"tsconfig.json"
|
|
11
11
|
],
|
|
12
|
-
"hash": "
|
|
12
|
+
"hash": "86830ce2cdf957901c18bfc46dd8a4bcd198962fd6974abf0dc363c3aada878f",
|
|
13
13
|
"files": {
|
|
14
14
|
"src/async/concurrency.ts": "3c7ebe0222a720f9",
|
|
15
15
|
"src/async/singleton.ts": "7bcc21b0fb920561",
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
"src/fsHelpers.ts": "0869d9739d523572",
|
|
69
69
|
"src/fsScan.ts": "feb187758481443f",
|
|
70
70
|
"src/httpKeepAlive.ts": "c8fe4b118ef4c79f",
|
|
71
|
-
"src/index.ts": "
|
|
71
|
+
"src/index.ts": "f64c6bca40daf22a",
|
|
72
72
|
"src/infra/backupVault.ts": "661678a6dfb0b648",
|
|
73
|
-
"src/infra/connectionsWire.ts": "
|
|
73
|
+
"src/infra/connectionsWire.ts": "8480df48d8a16897",
|
|
74
74
|
"src/infra/deployArtefacts.ts": "235ac21dd3ccf0b2",
|
|
75
75
|
"src/infra/deriveContentHashTag.ts": "115fbe6588794027",
|
|
76
76
|
"src/infra/domainExports.ts": "18de5b8668633aaf",
|
|
@@ -94,7 +94,9 @@
|
|
|
94
94
|
"src/naming/caseConversion.ts": "8b8984f2b58b8ab7",
|
|
95
95
|
"src/naming/connectedAccountName.ts": "3cd3bc7dba0a2f0b",
|
|
96
96
|
"src/naming/reservedAppNames.ts": "7f63dd0b84c1972e",
|
|
97
|
-
"src/naming/targetExportNames.ts": "
|
|
97
|
+
"src/naming/targetExportNames.ts": "bab26b7c0243fafa",
|
|
98
|
+
"src/onboarding/index.ts": "9922289e4c510385",
|
|
99
|
+
"src/onboarding/versionCurrency.ts": "19695f38b09cfc46",
|
|
98
100
|
"src/patterns/index.ts": "9f024b45c2e225b0",
|
|
99
101
|
"src/patterns/patternTypes.ts": "6e0aff0443bcb770",
|
|
100
102
|
"src/patterns/staticSiteForms.ts": "86ffcf142d9a8eac",
|
|
@@ -111,9 +113,9 @@
|
|
|
111
113
|
"src/securityHelpers.ts": "2632215f57e1528c",
|
|
112
114
|
"src/targets.ts": "126280f0a5762e21",
|
|
113
115
|
"../scripts/minify-dist.mjs": "6b2e4b0df8aec601",
|
|
114
|
-
"package.json": "
|
|
116
|
+
"package.json": "a96bccd98c0d1f3e",
|
|
115
117
|
"tsconfig.json": "db759831ad95f396"
|
|
116
118
|
},
|
|
117
|
-
"outputHash": "
|
|
118
|
-
"outputFileCount":
|
|
119
|
+
"outputHash": "93d8355b738e5e55474959722e09e9e7b120c05bbb17ef466ca5d01523e1b556",
|
|
120
|
+
"outputFileCount": 209
|
|
119
121
|
}
|
package/dist/.minified
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
104 files minified at 2026-08-24T11:06:48.081Z
|
|
@@ -48,11 +48,11 @@ export declare const DeploymentFailureProviderSourceSchema: z.ZodEnum<{
|
|
|
48
48
|
docker: "docker";
|
|
49
49
|
ecr: "ecr";
|
|
50
50
|
other: "other";
|
|
51
|
+
npm: "npm";
|
|
51
52
|
cloudformation: "cloudformation";
|
|
52
53
|
ecs: "ecs";
|
|
53
54
|
iam: "iam";
|
|
54
55
|
cdk: "cdk";
|
|
55
|
-
npm: "npm";
|
|
56
56
|
}>;
|
|
57
57
|
export type DeploymentFailureProviderSource = z.infer<typeof DeploymentFailureProviderSourceSchema>;
|
|
58
58
|
/**
|
|
@@ -164,11 +164,11 @@ export declare const DeploymentFailureProviderSchema: z.ZodObject<{
|
|
|
164
164
|
docker: "docker";
|
|
165
165
|
ecr: "ecr";
|
|
166
166
|
other: "other";
|
|
167
|
+
npm: "npm";
|
|
167
168
|
cloudformation: "cloudformation";
|
|
168
169
|
ecs: "ecs";
|
|
169
170
|
iam: "iam";
|
|
170
171
|
cdk: "cdk";
|
|
171
|
-
npm: "npm";
|
|
172
172
|
}>;
|
|
173
173
|
code: z.ZodOptional<z.ZodString>;
|
|
174
174
|
message: z.ZodString;
|
|
@@ -209,11 +209,11 @@ export declare const DeploymentFailureSchema: z.ZodObject<{
|
|
|
209
209
|
docker: "docker";
|
|
210
210
|
ecr: "ecr";
|
|
211
211
|
other: "other";
|
|
212
|
+
npm: "npm";
|
|
212
213
|
cloudformation: "cloudformation";
|
|
213
214
|
ecs: "ecs";
|
|
214
215
|
iam: "iam";
|
|
215
216
|
cdk: "cdk";
|
|
216
|
-
npm: "npm";
|
|
217
217
|
}>;
|
|
218
218
|
code: z.ZodOptional<z.ZodString>;
|
|
219
219
|
message: z.ZodString;
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,8 @@ export { parseGitRemoteUrl, type GitProvider, type ParsedGitRemote } from "./rep
|
|
|
18
18
|
export { abbreviateRegion, AWS_REGIONS_METADATA, DEFAULT_REGION, getRegionInfo, MAX_SECONDARY_REGIONS, OPT_IN_REGION_CODES, optInRegionWarning, regions, suggestRegionForTimezone, type RegionCode, type RegionInfo } from "./infra/regions.js";
|
|
19
19
|
export { SCOPE_VALUES, MACHINE_ONLY_SCOPES, USER_GRANTABLE_SCOPES, GOVERNANCE_SCOPE_REQUIRED_CODE, type TokenScope } from "./infra/tokenScopes.js";
|
|
20
20
|
export { SECRET_NAME_PATTERN, SECRET_NAME_ERROR, SSM_COMPONENT_PATTERN, SSM_COMPONENT_ERROR, SSM_STANDARD_MAX_VALUE_BYTES, SecretNamespaceSchema, type SecretNamespace, buildNamespaceParts, buildParameterPath, parseParameterPath, isManageablePath, parseDotEnv, escapeDotEnvValue } from "./secrets.js";
|
|
21
|
-
export { ConnectionWireSchema, type ConnectionWire, ConnectionsListResponseSchema, type ConnectionsListResponse } from "./infra/connectionsWire.js";
|
|
21
|
+
export { ConnectionWireSchema, type ConnectionWire, ConnectionsListResponseSchema, type ConnectionsListResponse, CONNECTION_PHASES, type ConnectionPhase, CONNECTION_FAILURE_REASONS, type ConnectionFailureReason, EXTERNAL_ID_PATTERN } from "./infra/connectionsWire.js";
|
|
22
|
+
export { PUBLIC_PACKAGE_NAME, INSTALL_SOURCES, type InstallSource, SETUP_COMMANDS, type SetupCommandId, upgradeCommand, SETUP_MODES, type SetupMode, SETUP_STEP_IDS, type SetupStepId, type SetupStep, type SetupStepSequence, SETUP_STEPS, AGENT_SETUP_PROMPTS, AGENT_INSTALL_COMMAND, SKILL_INSTALL_SEGMENTS, SKILL_INSTALL_FILENAME, SKILL_INSTALL_PATH } from "./onboarding/index.js";
|
|
22
23
|
export { deriveRegionsFromOrgConfig, deriveTargets, deriveAllTargets, environmentOrTier, findTarget, generateTargetName, type OrgConfigRegions, type TargetAccount, type DerivedTarget } from "./targets.js";
|
|
23
24
|
export { buildAppConfigPath } from "./repo/appPath.js";
|
|
24
25
|
export { type ScanPath } from "./repo/scanTypes.js";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DNS_APEX as r,getDomainExportNames as t,getDomainStackName as o,getDomainUsEast1CertificatesStackName as _,hostsExportPartName as a,serialiseHostsChunks as A,HOSTS_OUTPUT_MAX_BYTES as S,isManagedDomainBinding as T,DOMAIN_DEPLOY_DEFAULT_PHASE as n}from"./infra/domainExports.js";import{BACKUP_VAULT_NAME as R}from"./infra/backupVault.js";import{APPROVAL_TOKEN_OUTPUT_PREFIX as m,TOKEN_STDERR_PREFIX as O}from"./deploy/approvalTokenOutput.js";import{imageTagParameterName as P}from"./infra/imageTags.js";import{toPascalCase as p,toKebab as c,toValidDatabaseName as I,toScreamingSnake as D,capitalise as f,getSafeZoneName as M,accountConstructKey as L,hasAsciiStableConstructKey as l}from"./naming/caseConversion.js";import{albDnsExportName as g,albHostedZoneIdExportName as d,cdnDomainExportName as U,bucketWebsiteEndpointExportName as x,bucketWebsiteHostedZoneIdExportName as F}from"./naming/targetExportNames.js";import{CAPACITY_SLOT_PATTERN as V,CAPACITY_SLOT_MAX_LENGTH as Y,DEFAULT_CAPACITY_SLOT as y,CAPACITY_ANCHOR_PATTERN as G,CAPACITY_ANCHOR_MAX_LENGTH as H,CAPACITY_IDENTITY_CONTEXT_KEY as v,CapacityIdentityPinSchema as b,CapacityIdentityWireSchema as X,CapacityIdentityConfigSchema as B,projectCapacityIdentityToTarget as K}from"./capacityIdentity.js";import{findAccountNameCollision as k}from"./naming/accountNameCollision.js";import{defaultConnectedAccountName as j,suffixedAccountName as w,REGION_SHORT_CODES as z,findTrailingRegionShortCode as Q,regionSuffixRejectionMessage as q}from"./naming/connectedAccountName.js";import{normaliseError as $,getErrorMessage as ee,hasErrorCode as Ee,getErrorCode as re,getErrorStack as te,formatErrorString as oe}from"./errorUtils.js";import{singleton as ae}from"./async/singleton.js";import{DANGEROUS_ENV_VARS as Se,filterDangerousEnvVars as Te,MASKED_VALUE_MARKER as ne,maskSensitiveOutput as ie,parseShellArgs as Re,REDACTED_KEY_SENTINEL as Ne,SCOPED_TOKEN_REGEX as me}from"./securityHelpers.js";import{sleep as se}from"./async/sleep.js";import{mapSettledWithConcurrency as Ce}from"./async/concurrency.js";import{ACCOUNT_STAGES_WITH_ROOT as ce,STRUCTURAL_ENVIRONMENTS as Ie,ACCOUNT_STAGES as De,ACCOUNT_STAGE_LABELS as fe,isAccountStage as Me,ACCOUNT_TIERS as Le,AccountTierSchema as le,isAccountTier as ue,GOVERNANCE_ACCOUNT_TIERS as ge,isGovernanceTier as de,environmentToTier as Ue,stageFromWireEnvironment as xe,accountTier as Fe,resolveSynthEnvironment as he,getEnvironmentLabel as Ve,ACCOUNT_ROLES as Ye}from"./environments.js";import{RESOURCE_CATEGORIES as Ge,categoriseResource as He,getExpectedDuration as ve,getFriendlyResourceType as be}from"./resourceCategorisation.js";import{parseGitRemoteUrl as Be}from"./repo/gitRemoteParser.js";import{abbreviateRegion as We,AWS_REGIONS_METADATA as ke,DEFAULT_REGION as Ze,getRegionInfo as je,MAX_SECONDARY_REGIONS as we,OPT_IN_REGION_CODES as ze,optInRegionWarning as Qe,regions as qe,suggestRegionForTimezone as Je}from"./infra/regions.js";import{SCOPE_VALUES as eE,MACHINE_ONLY_SCOPES as EE,USER_GRANTABLE_SCOPES as rE,GOVERNANCE_SCOPE_REQUIRED_CODE as tE}from"./infra/tokenScopes.js";import{SECRET_NAME_PATTERN as _E,SECRET_NAME_ERROR as aE,SSM_COMPONENT_PATTERN as AE,SSM_COMPONENT_ERROR as SE,SSM_STANDARD_MAX_VALUE_BYTES as TE,SecretNamespaceSchema as nE,buildNamespaceParts as iE,buildParameterPath as RE,parseParameterPath as NE,isManageablePath as mE,parseDotEnv as OE,escapeDotEnvValue as sE}from"./secrets.js";import{ConnectionWireSchema as CE,ConnectionsListResponseSchema as pE}from"./infra/connectionsWire.js";import{deriveRegionsFromOrgConfig as IE,deriveTargets as DE,deriveAllTargets as fE,environmentOrTier as ME,findTarget as LE,generateTargetName as lE}from"./targets.js";import{buildAppConfigPath as gE}from"./repo/appPath.js";import{findInfrastructurePaths as UE,findBoundaryPath as xE,isInfrastructureFile as FE}from"./repo/findInfrastructurePaths.js";import{inferContainerFromCandidates as VE}from"./repo/inferContainerFromCandidates.js";import{RESERVED_APP_NAMES as yE,RESERVED_APP_NAME_MESSAGE as GE,isReservedAppName as HE,RESERVED_APP_NAME_SUFFIX as vE,RESERVED_APP_NAME_SUFFIX_MESSAGE as bE,hasReservedAppNameSuffix as XE}from"./naming/reservedAppNames.js";import{deriveContentHashTag as KE,CONTENT_HASH_TAG_PATTERN as WE}from"./infra/deriveContentHashTag.js";import{DEPLOY_MODES as ZE,DeployModeSchema as jE,IMAGE_TAG_PATTERN as wE,ImageTagSchema as zE,ServiceArtefactSchema as QE,ServiceArtefactsSchema as qE,ARTEFACT_OUTPUT_FIELDS as JE,artefactOutputKey as $E}from"./infra/deployArtefacts.js";import{MIGRATION_SNAPSHOT_NAME_PREFIX as Er,EXPECTED_SCHEMA_VERSION_ENV as rr,EXPECTED_SCHEMA_VERSION_TOOL_ENV as tr,EXPECTED_CH_SCHEMA_VERSION_ENV as or,SCHEMA_ADMIN_USER_ENV as _r,SCHEMA_ADMIN_PASSWORD_ENV as ar,PRISMA_MIGRATION_DIR_RE as Ar,CLICKHOUSE_MIGRATION_SKIP_RE as Sr}from"./migration/constants.js";import{PHYSICAL_NAME_FALLBACK_PROPERTIES as nr}from"./cfn/physicalNameProperties.js";import{PATTERN_TYPE_VALUES as Rr,PATTERN_TYPES as Nr,isPatternType as mr,PATTERN_REGISTRY as Or,patternConstructId as sr,DEPLOYABLE_PATTERN_TYPES as Pr,OPENNEXT_PATTERN_TYPES as Cr,isOpenNextPatternType as pr,STATIC_SITE_ROUTING_VALUES as cr}from"./patterns/patternTypes.js";import{DEFAULT_FORMS_FROM_LOCAL_PART as Dr,defaultFormsFromAddress as fr,defaultFormsCorsOrigin as Mr,isAddressAtDomain as Lr}from"./patterns/staticSiteForms.js";import{DEV_SUBSTRATE_PARAMS_SCHEMA_VERSION as ur,DEV_SUBSTRATE_PARAMS_FILENAME as gr,DevSubstrateSynthPropsSchema as dr,DevSubstrateParamsSchema as Ur}from"./devSubstrate/params.js";import{DEV_SUBSTRATE_ENTRYPOINT_SOURCE as Fr}from"./devSubstrate/entrypoint.js";import{DEPLOYMENT_FAILURE_PHASES as Vr,DeploymentFailurePhaseSchema as Yr,DEPLOYMENT_FAULT_ATTRIBUTIONS as yr,DeploymentFaultAttributionSchema as Gr,DEPLOYMENT_FAILURE_PROVIDER_SOURCES as Hr,DeploymentFailureProviderSourceSchema as vr,DEPLOYMENT_FAILURE_CODE_PATTERN as br,DEPLOYMENT_FAILURE_SCHEMA_VERSION as Xr,DEPLOYMENT_FAILURE_LIMITS as Br,DeploymentFailureAnalysisSchema as Kr,DeploymentFailureProviderSchema as Wr,DeploymentFailureResourceSchema as kr,DeploymentFailureSchema as Zr,parseDeploymentFailure as jr,DEPLOYMENT_FAILURE_DOCS_BASE_URL as wr,deploymentFailureDocsUrl as zr,DEPLOYMENT_FAULT_COPY as Qr,DEPLOYMENT_PROVIDER_LABELS as qr,deriveErrorMessageFromFailure as Jr,toDeploymentFailureAnalysis as $r}from"./failure/deploymentFailure.js";import{extractErrorWindow as Et,ERROR_WINDOW_CONTEXT_LINES as rt}from"./failure/extractErrorWindow.js";export{Ye as ACCOUNT_ROLES,De as ACCOUNT_STAGES,ce as ACCOUNT_STAGES_WITH_ROOT,fe as ACCOUNT_STAGE_LABELS,Le as ACCOUNT_TIERS,m as APPROVAL_TOKEN_OUTPUT_PREFIX,JE as ARTEFACT_OUTPUT_FIELDS,ke as AWS_REGIONS_METADATA,le as AccountTierSchema,R as BACKUP_VAULT_NAME,H as CAPACITY_ANCHOR_MAX_LENGTH,G as CAPACITY_ANCHOR_PATTERN,v as CAPACITY_IDENTITY_CONTEXT_KEY,Y as CAPACITY_SLOT_MAX_LENGTH,V as CAPACITY_SLOT_PATTERN,Sr as CLICKHOUSE_MIGRATION_SKIP_RE,WE as CONTENT_HASH_TAG_PATTERN,B as CapacityIdentityConfigSchema,b as CapacityIdentityPinSchema,X as CapacityIdentityWireSchema,CE as ConnectionWireSchema,pE as ConnectionsListResponseSchema,Se as DANGEROUS_ENV_VARS,y as DEFAULT_CAPACITY_SLOT,Dr as DEFAULT_FORMS_FROM_LOCAL_PART,Ze as DEFAULT_REGION,Pr as DEPLOYABLE_PATTERN_TYPES,br as DEPLOYMENT_FAILURE_CODE_PATTERN,wr as DEPLOYMENT_FAILURE_DOCS_BASE_URL,Br as DEPLOYMENT_FAILURE_LIMITS,Vr as DEPLOYMENT_FAILURE_PHASES,Hr as DEPLOYMENT_FAILURE_PROVIDER_SOURCES,Xr as DEPLOYMENT_FAILURE_SCHEMA_VERSION,yr as DEPLOYMENT_FAULT_ATTRIBUTIONS,Qr as DEPLOYMENT_FAULT_COPY,qr as DEPLOYMENT_PROVIDER_LABELS,ZE as DEPLOY_MODES,Fr as DEV_SUBSTRATE_ENTRYPOINT_SOURCE,gr as DEV_SUBSTRATE_PARAMS_FILENAME,ur as DEV_SUBSTRATE_PARAMS_SCHEMA_VERSION,r as DNS_APEX,n as DOMAIN_DEPLOY_DEFAULT_PHASE,jE as DeployModeSchema,Kr as DeploymentFailureAnalysisSchema,Yr as DeploymentFailurePhaseSchema,Wr as DeploymentFailureProviderSchema,vr as DeploymentFailureProviderSourceSchema,kr as DeploymentFailureResourceSchema,Zr as DeploymentFailureSchema,Gr as DeploymentFaultAttributionSchema,Ur as DevSubstrateParamsSchema,dr as DevSubstrateSynthPropsSchema,rt as ERROR_WINDOW_CONTEXT_LINES,or as EXPECTED_CH_SCHEMA_VERSION_ENV,rr as EXPECTED_SCHEMA_VERSION_ENV,tr as EXPECTED_SCHEMA_VERSION_TOOL_ENV,ge as GOVERNANCE_ACCOUNT_TIERS,tE as GOVERNANCE_SCOPE_REQUIRED_CODE,S as HOSTS_OUTPUT_MAX_BYTES,wE as IMAGE_TAG_PATTERN,zE as ImageTagSchema,EE as MACHINE_ONLY_SCOPES,ne as MASKED_VALUE_MARKER,we as MAX_SECONDARY_REGIONS,Er as MIGRATION_SNAPSHOT_NAME_PREFIX,Cr as OPENNEXT_PATTERN_TYPES,ze as OPT_IN_REGION_CODES,Or as PATTERN_REGISTRY,Nr as PATTERN_TYPES,Rr as PATTERN_TYPE_VALUES,nr as PHYSICAL_NAME_FALLBACK_PROPERTIES,Ar as PRISMA_MIGRATION_DIR_RE,Ne as REDACTED_KEY_SENTINEL,z as REGION_SHORT_CODES,yE as RESERVED_APP_NAMES,GE as RESERVED_APP_NAME_MESSAGE,vE as RESERVED_APP_NAME_SUFFIX,bE as RESERVED_APP_NAME_SUFFIX_MESSAGE,Ge as RESOURCE_CATEGORIES,ar as SCHEMA_ADMIN_PASSWORD_ENV,_r as SCHEMA_ADMIN_USER_ENV,me as SCOPED_TOKEN_REGEX,eE as SCOPE_VALUES,aE as SECRET_NAME_ERROR,_E as SECRET_NAME_PATTERN,SE as SSM_COMPONENT_ERROR,AE as SSM_COMPONENT_PATTERN,TE as SSM_STANDARD_MAX_VALUE_BYTES,cr as STATIC_SITE_ROUTING_VALUES,Ie as STRUCTURAL_ENVIRONMENTS,nE as SecretNamespaceSchema,QE as ServiceArtefactSchema,qE as ServiceArtefactsSchema,O as TOKEN_STDERR_PREFIX,rE as USER_GRANTABLE_SCOPES,We as abbreviateRegion,L as accountConstructKey,Fe as accountTier,g as albDnsExportName,d as albHostedZoneIdExportName,$E as artefactOutputKey,x as bucketWebsiteEndpointExportName,F as bucketWebsiteHostedZoneIdExportName,gE as buildAppConfigPath,iE as buildNamespaceParts,RE as buildParameterPath,f as capitalise,He as categoriseResource,U as cdnDomainExportName,j as defaultConnectedAccountName,Mr as defaultFormsCorsOrigin,fr as defaultFormsFromAddress,zr as deploymentFailureDocsUrl,fE as deriveAllTargets,KE as deriveContentHashTag,Jr as deriveErrorMessageFromFailure,IE as deriveRegionsFromOrgConfig,DE as deriveTargets,ME as environmentOrTier,Ue as environmentToTier,sE as escapeDotEnvValue,Et as extractErrorWindow,Te as filterDangerousEnvVars,k as findAccountNameCollision,xE as findBoundaryPath,UE as findInfrastructurePaths,LE as findTarget,Q as findTrailingRegionShortCode,oe as formatErrorString,lE as generateTargetName,t as getDomainExportNames,o as getDomainStackName,_ as getDomainUsEast1CertificatesStackName,Ve as getEnvironmentLabel,re as getErrorCode,ee as getErrorMessage,te as getErrorStack,ve as getExpectedDuration,be as getFriendlyResourceType,je as getRegionInfo,M as getSafeZoneName,l as hasAsciiStableConstructKey,Ee as hasErrorCode,XE as hasReservedAppNameSuffix,a as hostsExportPartName,P as imageTagParameterName,VE as inferContainerFromCandidates,Me as isAccountStage,ue as isAccountTier,Lr as isAddressAtDomain,de as isGovernanceTier,FE as isInfrastructureFile,mE as isManageablePath,T as isManagedDomainBinding,pr as isOpenNextPatternType,mr as isPatternType,HE as isReservedAppName,Ce as mapSettledWithConcurrency,ie as maskSensitiveOutput,$ as normaliseError,Qe as optInRegionWarning,jr as parseDeploymentFailure,OE as parseDotEnv,Be as parseGitRemoteUrl,NE as parseParameterPath,Re as parseShellArgs,sr as patternConstructId,K as projectCapacityIdentityToTarget,q as regionSuffixRejectionMessage,qe as regions,he as resolveSynthEnvironment,A as serialiseHostsChunks,ae as singleton,se as sleep,xe as stageFromWireEnvironment,w as suffixedAccountName,Je as suggestRegionForTimezone,$r as toDeploymentFailureAnalysis,c as toKebab,p as toPascalCase,D as toScreamingSnake,I as toValidDatabaseName};
|
|
1
|
+
import{DNS_APEX as r,getDomainExportNames as t,getDomainStackName as _,getDomainUsEast1CertificatesStackName as o,hostsExportPartName as S,serialiseHostsChunks as T,HOSTS_OUTPUT_MAX_BYTES as A,isManagedDomainBinding as a,DOMAIN_DEPLOY_DEFAULT_PHASE as N}from"./infra/domainExports.js";import{BACKUP_VAULT_NAME as n}from"./infra/backupVault.js";import{APPROVAL_TOKEN_OUTPUT_PREFIX as m,TOKEN_STDERR_PREFIX as O}from"./deploy/approvalTokenOutput.js";import{imageTagParameterName as C}from"./infra/imageTags.js";import{toPascalCase as I,toKebab as p,toValidDatabaseName as D,toScreamingSnake as c,capitalise as L,getSafeZoneName as M,accountConstructKey as f,hasAsciiStableConstructKey as U}from"./naming/caseConversion.js";import{albDnsExportName as u,albHostedZoneIdExportName as d,cdnDomainExportName as g,bucketWebsiteEndpointExportName as x,bucketWebsiteHostedZoneIdExportName as F}from"./naming/targetExportNames.js";import{CAPACITY_SLOT_PATTERN as V,CAPACITY_SLOT_MAX_LENGTH as Y,DEFAULT_CAPACITY_SLOT as y,CAPACITY_ANCHOR_PATTERN as G,CAPACITY_ANCHOR_MAX_LENGTH as H,CAPACITY_IDENTITY_CONTEXT_KEY as v,CapacityIdentityPinSchema as b,CapacityIdentityWireSchema as K,CapacityIdentityConfigSchema as X,projectCapacityIdentityToTarget as B}from"./capacityIdentity.js";import{findAccountNameCollision as k}from"./naming/accountNameCollision.js";import{defaultConnectedAccountName as j,suffixedAccountName as w,REGION_SHORT_CODES as z,findTrailingRegionShortCode as Q,regionSuffixRejectionMessage as q}from"./naming/connectedAccountName.js";import{normaliseError as $,getErrorMessage as ee,hasErrorCode as Ee,getErrorCode as re,getErrorStack as te,formatErrorString as _e}from"./errorUtils.js";import{singleton as Se}from"./async/singleton.js";import{DANGEROUS_ENV_VARS as Ae,filterDangerousEnvVars as ae,MASKED_VALUE_MARKER as Ne,maskSensitiveOutput as Re,parseShellArgs as ne,REDACTED_KEY_SENTINEL as ie,SCOPED_TOKEN_REGEX as me}from"./securityHelpers.js";import{sleep as Pe}from"./async/sleep.js";import{mapSettledWithConcurrency as se}from"./async/concurrency.js";import{ACCOUNT_STAGES_WITH_ROOT as pe,STRUCTURAL_ENVIRONMENTS as De,ACCOUNT_STAGES as ce,ACCOUNT_STAGE_LABELS as Le,isAccountStage as Me,ACCOUNT_TIERS as fe,AccountTierSchema as Ue,isAccountTier as le,GOVERNANCE_ACCOUNT_TIERS as ue,isGovernanceTier as de,environmentToTier as ge,stageFromWireEnvironment as xe,accountTier as Fe,resolveSynthEnvironment as he,getEnvironmentLabel as Ve,ACCOUNT_ROLES as Ye}from"./environments.js";import{RESOURCE_CATEGORIES as Ge,categoriseResource as He,getExpectedDuration as ve,getFriendlyResourceType as be}from"./resourceCategorisation.js";import{parseGitRemoteUrl as Xe}from"./repo/gitRemoteParser.js";import{abbreviateRegion as We,AWS_REGIONS_METADATA as ke,DEFAULT_REGION as Ze,getRegionInfo as je,MAX_SECONDARY_REGIONS as we,OPT_IN_REGION_CODES as ze,optInRegionWarning as Qe,regions as qe,suggestRegionForTimezone as Je}from"./infra/regions.js";import{SCOPE_VALUES as eE,MACHINE_ONLY_SCOPES as EE,USER_GRANTABLE_SCOPES as rE,GOVERNANCE_SCOPE_REQUIRED_CODE as tE}from"./infra/tokenScopes.js";import{SECRET_NAME_PATTERN as oE,SECRET_NAME_ERROR as SE,SSM_COMPONENT_PATTERN as TE,SSM_COMPONENT_ERROR as AE,SSM_STANDARD_MAX_VALUE_BYTES as aE,SecretNamespaceSchema as NE,buildNamespaceParts as RE,buildParameterPath as nE,parseParameterPath as iE,isManageablePath as mE,parseDotEnv as OE,escapeDotEnvValue as PE}from"./secrets.js";import{ConnectionWireSchema as sE,ConnectionsListResponseSchema as IE,CONNECTION_PHASES as pE,CONNECTION_FAILURE_REASONS as DE,EXTERNAL_ID_PATTERN as cE}from"./infra/connectionsWire.js";import{PUBLIC_PACKAGE_NAME as ME,INSTALL_SOURCES as fE,SETUP_COMMANDS as UE,upgradeCommand as lE,SETUP_MODES as uE,SETUP_STEP_IDS as dE,SETUP_STEPS as gE,AGENT_SETUP_PROMPTS as xE,AGENT_INSTALL_COMMAND as FE,SKILL_INSTALL_SEGMENTS as hE,SKILL_INSTALL_FILENAME as VE,SKILL_INSTALL_PATH as YE}from"./onboarding/index.js";import{deriveRegionsFromOrgConfig as GE,deriveTargets as HE,deriveAllTargets as vE,environmentOrTier as bE,findTarget as KE,generateTargetName as XE}from"./targets.js";import{buildAppConfigPath as WE}from"./repo/appPath.js";import{findInfrastructurePaths as ZE,findBoundaryPath as jE,isInfrastructureFile as wE}from"./repo/findInfrastructurePaths.js";import{inferContainerFromCandidates as QE}from"./repo/inferContainerFromCandidates.js";import{RESERVED_APP_NAMES as JE,RESERVED_APP_NAME_MESSAGE as $E,isReservedAppName as er,RESERVED_APP_NAME_SUFFIX as Er,RESERVED_APP_NAME_SUFFIX_MESSAGE as rr,hasReservedAppNameSuffix as tr}from"./naming/reservedAppNames.js";import{deriveContentHashTag as or,CONTENT_HASH_TAG_PATTERN as Sr}from"./infra/deriveContentHashTag.js";import{DEPLOY_MODES as Ar,DeployModeSchema as ar,IMAGE_TAG_PATTERN as Nr,ImageTagSchema as Rr,ServiceArtefactSchema as nr,ServiceArtefactsSchema as ir,ARTEFACT_OUTPUT_FIELDS as mr,artefactOutputKey as Or}from"./infra/deployArtefacts.js";import{MIGRATION_SNAPSHOT_NAME_PREFIX as Cr,EXPECTED_SCHEMA_VERSION_ENV as sr,EXPECTED_SCHEMA_VERSION_TOOL_ENV as Ir,EXPECTED_CH_SCHEMA_VERSION_ENV as pr,SCHEMA_ADMIN_USER_ENV as Dr,SCHEMA_ADMIN_PASSWORD_ENV as cr,PRISMA_MIGRATION_DIR_RE as Lr,CLICKHOUSE_MIGRATION_SKIP_RE as Mr}from"./migration/constants.js";import{PHYSICAL_NAME_FALLBACK_PROPERTIES as Ur}from"./cfn/physicalNameProperties.js";import{PATTERN_TYPE_VALUES as ur,PATTERN_TYPES as dr,isPatternType as gr,PATTERN_REGISTRY as xr,patternConstructId as Fr,DEPLOYABLE_PATTERN_TYPES as hr,OPENNEXT_PATTERN_TYPES as Vr,isOpenNextPatternType as Yr,STATIC_SITE_ROUTING_VALUES as yr}from"./patterns/patternTypes.js";import{DEFAULT_FORMS_FROM_LOCAL_PART as Hr,defaultFormsFromAddress as vr,defaultFormsCorsOrigin as br,isAddressAtDomain as Kr}from"./patterns/staticSiteForms.js";import{DEV_SUBSTRATE_PARAMS_SCHEMA_VERSION as Br,DEV_SUBSTRATE_PARAMS_FILENAME as Wr,DevSubstrateSynthPropsSchema as kr,DevSubstrateParamsSchema as Zr}from"./devSubstrate/params.js";import{DEV_SUBSTRATE_ENTRYPOINT_SOURCE as wr}from"./devSubstrate/entrypoint.js";import{DEPLOYMENT_FAILURE_PHASES as Qr,DeploymentFailurePhaseSchema as qr,DEPLOYMENT_FAULT_ATTRIBUTIONS as Jr,DeploymentFaultAttributionSchema as $r,DEPLOYMENT_FAILURE_PROVIDER_SOURCES as et,DeploymentFailureProviderSourceSchema as Et,DEPLOYMENT_FAILURE_CODE_PATTERN as rt,DEPLOYMENT_FAILURE_SCHEMA_VERSION as tt,DEPLOYMENT_FAILURE_LIMITS as _t,DeploymentFailureAnalysisSchema as ot,DeploymentFailureProviderSchema as St,DeploymentFailureResourceSchema as Tt,DeploymentFailureSchema as At,parseDeploymentFailure as at,DEPLOYMENT_FAILURE_DOCS_BASE_URL as Nt,deploymentFailureDocsUrl as Rt,DEPLOYMENT_FAULT_COPY as nt,DEPLOYMENT_PROVIDER_LABELS as it,deriveErrorMessageFromFailure as mt,toDeploymentFailureAnalysis as Ot}from"./failure/deploymentFailure.js";import{extractErrorWindow as Ct,ERROR_WINDOW_CONTEXT_LINES as st}from"./failure/extractErrorWindow.js";export{Ye as ACCOUNT_ROLES,ce as ACCOUNT_STAGES,pe as ACCOUNT_STAGES_WITH_ROOT,Le as ACCOUNT_STAGE_LABELS,fe as ACCOUNT_TIERS,FE as AGENT_INSTALL_COMMAND,xE as AGENT_SETUP_PROMPTS,m as APPROVAL_TOKEN_OUTPUT_PREFIX,mr as ARTEFACT_OUTPUT_FIELDS,ke as AWS_REGIONS_METADATA,Ue as AccountTierSchema,n as BACKUP_VAULT_NAME,H as CAPACITY_ANCHOR_MAX_LENGTH,G as CAPACITY_ANCHOR_PATTERN,v as CAPACITY_IDENTITY_CONTEXT_KEY,Y as CAPACITY_SLOT_MAX_LENGTH,V as CAPACITY_SLOT_PATTERN,Mr as CLICKHOUSE_MIGRATION_SKIP_RE,DE as CONNECTION_FAILURE_REASONS,pE as CONNECTION_PHASES,Sr as CONTENT_HASH_TAG_PATTERN,X as CapacityIdentityConfigSchema,b as CapacityIdentityPinSchema,K as CapacityIdentityWireSchema,sE as ConnectionWireSchema,IE as ConnectionsListResponseSchema,Ae as DANGEROUS_ENV_VARS,y as DEFAULT_CAPACITY_SLOT,Hr as DEFAULT_FORMS_FROM_LOCAL_PART,Ze as DEFAULT_REGION,hr as DEPLOYABLE_PATTERN_TYPES,rt as DEPLOYMENT_FAILURE_CODE_PATTERN,Nt as DEPLOYMENT_FAILURE_DOCS_BASE_URL,_t as DEPLOYMENT_FAILURE_LIMITS,Qr as DEPLOYMENT_FAILURE_PHASES,et as DEPLOYMENT_FAILURE_PROVIDER_SOURCES,tt as DEPLOYMENT_FAILURE_SCHEMA_VERSION,Jr as DEPLOYMENT_FAULT_ATTRIBUTIONS,nt as DEPLOYMENT_FAULT_COPY,it as DEPLOYMENT_PROVIDER_LABELS,Ar as DEPLOY_MODES,wr as DEV_SUBSTRATE_ENTRYPOINT_SOURCE,Wr as DEV_SUBSTRATE_PARAMS_FILENAME,Br as DEV_SUBSTRATE_PARAMS_SCHEMA_VERSION,r as DNS_APEX,N as DOMAIN_DEPLOY_DEFAULT_PHASE,ar as DeployModeSchema,ot as DeploymentFailureAnalysisSchema,qr as DeploymentFailurePhaseSchema,St as DeploymentFailureProviderSchema,Et as DeploymentFailureProviderSourceSchema,Tt as DeploymentFailureResourceSchema,At as DeploymentFailureSchema,$r as DeploymentFaultAttributionSchema,Zr as DevSubstrateParamsSchema,kr as DevSubstrateSynthPropsSchema,st as ERROR_WINDOW_CONTEXT_LINES,pr as EXPECTED_CH_SCHEMA_VERSION_ENV,sr as EXPECTED_SCHEMA_VERSION_ENV,Ir as EXPECTED_SCHEMA_VERSION_TOOL_ENV,cE as EXTERNAL_ID_PATTERN,ue as GOVERNANCE_ACCOUNT_TIERS,tE as GOVERNANCE_SCOPE_REQUIRED_CODE,A as HOSTS_OUTPUT_MAX_BYTES,Nr as IMAGE_TAG_PATTERN,fE as INSTALL_SOURCES,Rr as ImageTagSchema,EE as MACHINE_ONLY_SCOPES,Ne as MASKED_VALUE_MARKER,we as MAX_SECONDARY_REGIONS,Cr as MIGRATION_SNAPSHOT_NAME_PREFIX,Vr as OPENNEXT_PATTERN_TYPES,ze as OPT_IN_REGION_CODES,xr as PATTERN_REGISTRY,dr as PATTERN_TYPES,ur as PATTERN_TYPE_VALUES,Ur as PHYSICAL_NAME_FALLBACK_PROPERTIES,Lr as PRISMA_MIGRATION_DIR_RE,ME as PUBLIC_PACKAGE_NAME,ie as REDACTED_KEY_SENTINEL,z as REGION_SHORT_CODES,JE as RESERVED_APP_NAMES,$E as RESERVED_APP_NAME_MESSAGE,Er as RESERVED_APP_NAME_SUFFIX,rr as RESERVED_APP_NAME_SUFFIX_MESSAGE,Ge as RESOURCE_CATEGORIES,cr as SCHEMA_ADMIN_PASSWORD_ENV,Dr as SCHEMA_ADMIN_USER_ENV,me as SCOPED_TOKEN_REGEX,eE as SCOPE_VALUES,SE as SECRET_NAME_ERROR,oE as SECRET_NAME_PATTERN,UE as SETUP_COMMANDS,uE as SETUP_MODES,gE as SETUP_STEPS,dE as SETUP_STEP_IDS,VE as SKILL_INSTALL_FILENAME,YE as SKILL_INSTALL_PATH,hE as SKILL_INSTALL_SEGMENTS,AE as SSM_COMPONENT_ERROR,TE as SSM_COMPONENT_PATTERN,aE as SSM_STANDARD_MAX_VALUE_BYTES,yr as STATIC_SITE_ROUTING_VALUES,De as STRUCTURAL_ENVIRONMENTS,NE as SecretNamespaceSchema,nr as ServiceArtefactSchema,ir as ServiceArtefactsSchema,O as TOKEN_STDERR_PREFIX,rE as USER_GRANTABLE_SCOPES,We as abbreviateRegion,f as accountConstructKey,Fe as accountTier,u as albDnsExportName,d as albHostedZoneIdExportName,Or as artefactOutputKey,x as bucketWebsiteEndpointExportName,F as bucketWebsiteHostedZoneIdExportName,WE as buildAppConfigPath,RE as buildNamespaceParts,nE as buildParameterPath,L as capitalise,He as categoriseResource,g as cdnDomainExportName,j as defaultConnectedAccountName,br as defaultFormsCorsOrigin,vr as defaultFormsFromAddress,Rt as deploymentFailureDocsUrl,vE as deriveAllTargets,or as deriveContentHashTag,mt as deriveErrorMessageFromFailure,GE as deriveRegionsFromOrgConfig,HE as deriveTargets,bE as environmentOrTier,ge as environmentToTier,PE as escapeDotEnvValue,Ct as extractErrorWindow,ae as filterDangerousEnvVars,k as findAccountNameCollision,jE as findBoundaryPath,ZE as findInfrastructurePaths,KE as findTarget,Q as findTrailingRegionShortCode,_e as formatErrorString,XE as generateTargetName,t as getDomainExportNames,_ as getDomainStackName,o as getDomainUsEast1CertificatesStackName,Ve as getEnvironmentLabel,re as getErrorCode,ee as getErrorMessage,te as getErrorStack,ve as getExpectedDuration,be as getFriendlyResourceType,je as getRegionInfo,M as getSafeZoneName,U as hasAsciiStableConstructKey,Ee as hasErrorCode,tr as hasReservedAppNameSuffix,S as hostsExportPartName,C as imageTagParameterName,QE as inferContainerFromCandidates,Me as isAccountStage,le as isAccountTier,Kr as isAddressAtDomain,de as isGovernanceTier,wE as isInfrastructureFile,mE as isManageablePath,a as isManagedDomainBinding,Yr as isOpenNextPatternType,gr as isPatternType,er as isReservedAppName,se as mapSettledWithConcurrency,Re as maskSensitiveOutput,$ as normaliseError,Qe as optInRegionWarning,at as parseDeploymentFailure,OE as parseDotEnv,Xe as parseGitRemoteUrl,iE as parseParameterPath,ne as parseShellArgs,Fr as patternConstructId,B as projectCapacityIdentityToTarget,q as regionSuffixRejectionMessage,qe as regions,he as resolveSynthEnvironment,T as serialiseHostsChunks,Se as singleton,Pe as sleep,xe as stageFromWireEnvironment,w as suffixedAccountName,Je as suggestRegionForTimezone,Ot as toDeploymentFailureAnalysis,p as toKebab,I as toPascalCase,c as toScreamingSnake,D as toValidDatabaseName,lE as upgradeCommand};
|
|
@@ -28,3 +28,26 @@ export declare const ConnectionsListResponseSchema: z.ZodObject<{
|
|
|
28
28
|
}, z.core.$strip>>;
|
|
29
29
|
}, z.core.$strip>;
|
|
30
30
|
export type ConnectionsListResponse = z.infer<typeof ConnectionsListResponseSchema>;
|
|
31
|
+
/**
|
|
32
|
+
* Connection lifecycle vocabulary shared with the webapp producer
|
|
33
|
+
* (`GET /api/connections/status`, the wizard and the CLI's `connect` wait
|
|
34
|
+
* loop). Coupled value across repos: the webapp mirrors these tuples at
|
|
35
|
+
* `webapp/app/lib/connections-wire.ts` until it imports them from a minted
|
|
36
|
+
* `@fjall/util`; a change here MUST land on both sides together, the way
|
|
37
|
+
* `TOKEN_AUTH_FAILURE_REASONS` is kept in lockstep. The content pins in
|
|
38
|
+
* `util/src/__tests__/connectionsWire.test.ts` are the drift tripwire.
|
|
39
|
+
*/
|
|
40
|
+
export declare const CONNECTION_PHASES: readonly ["awaiting_stack", "connected", "failed", "disconnected"];
|
|
41
|
+
export type ConnectionPhase = (typeof CONNECTION_PHASES)[number];
|
|
42
|
+
export declare const CONNECTION_FAILURE_REASONS: readonly ["account_mismatch", "root_exists", "root_promotion", "name_conflict", "plan_limit", "stack_rolled_back", "stack_deleted"];
|
|
43
|
+
export type ConnectionFailureReason = (typeof CONNECTION_FAILURE_REASONS)[number];
|
|
44
|
+
/**
|
|
45
|
+
* The connection external id: minted by the webapp as
|
|
46
|
+
* `randomBytes(16).toString("hex")` (32 hex characters) and accepted up to 64
|
|
47
|
+
* so a wider mint never breaks an older client. Canonical pattern the
|
|
48
|
+
* validators converge on: the webapp callback route enforces the equivalent
|
|
49
|
+
* 32–64 hex chain today, the status route accepts >=32 with no upper cap
|
|
50
|
+
* until it adopts this constant at the next `@fjall/util` mint, and the CLI
|
|
51
|
+
* `connect status` command consumes it when that command lands.
|
|
52
|
+
*/
|
|
53
|
+
export declare const EXTERNAL_ID_PATTERN: RegExp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as
|
|
1
|
+
import{z as t}from"zod";const n=t.object({awsAccountId:t.string(),accountName:t.string().nullable(),status:t.string(),role:t.string(),roleArn:t.string(),environment:t.string().optional(),connectedAt:t.string()}),e=t.object({accounts:t.array(n)}),c=["awaiting_stack","connected","failed","disconnected"],s=["account_mismatch","root_exists","root_promotion","name_conflict","plan_limit","stack_rolled_back","stack_deleted"],r=/^[a-f0-9]{32,64}$/;export{s as CONNECTION_FAILURE_REASONS,c as CONNECTION_PHASES,n as ConnectionWireSchema,e as ConnectionsListResponseSchema,r as EXTERNAL_ID_PATTERN};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function albDnsExportName(appName: string, computeName?: string): string;
|
|
2
2
|
export declare function albHostedZoneIdExportName(appName: string, computeName?: string): string;
|
|
3
3
|
export declare function cdnDomainExportName(appName: string): string;
|
|
4
|
-
export declare function bucketWebsiteEndpointExportName(bucketName: string): string;
|
|
5
|
-
export declare function bucketWebsiteHostedZoneIdExportName(bucketName: string): string;
|
|
4
|
+
export declare function bucketWebsiteEndpointExportName(appName: string, bucketName: string): string;
|
|
5
|
+
export declare function bucketWebsiteHostedZoneIdExportName(appName: string, bucketName: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var u=Object.defineProperty;var n=(e,t)=>u(e,"name",{value:t,configurable:!0});import{toPascalCase as a}from"./caseConversion.js";function o(e){return a(e.replace(/[^A-Za-z0-9-]/g,""))}n(o,"safeExportToken");function i(e,t){const r=o(e);return t===void 0?r:`${r}-${o(t)}-`}n(i,"albExportScope");function d(e,t){return`${i(e,t)}AlbDnsName`}n(d,"albDnsExportName");function b(e,t){return`${i(e,t)}AlbHostedZoneId`}n(b,"albHostedZoneIdExportName");function x(e){return`${o(e)}CdnDistributionDomainName`}n(x,"cdnDomainExportName");function p(e,t){return`${o(e)}-${o(t)}-`}n(p,"bucketExportScope");function f(e,t){return`${p(e,t)}WebsiteEndpoint`}n(f,"bucketWebsiteEndpointExportName");function E(e,t){return`${p(e,t)}WebsiteHostedZoneId`}n(E,"bucketWebsiteHostedZoneIdExportName");export{d as albDnsExportName,b as albHostedZoneIdExportName,f as bucketWebsiteEndpointExportName,E as bucketWebsiteHostedZoneIdExportName,x as cdnDomainExportName};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Fjall setup contract — the single source of truth for every command
|
|
3
|
+
* string, step sequence and install path the onboarding surfaces show.
|
|
4
|
+
*
|
|
5
|
+
* Consumers (cross-system parity — every surface derives, none hand-copies):
|
|
6
|
+
* the SKILL.md template, CLI next-step hints and gates, the MCP resolver, the
|
|
7
|
+
* webapp wizard, and the docs lint. A rename lands here once; the fjall
|
|
8
|
+
* parity test (`skillInvocationParity.test.ts`) proves every command below
|
|
9
|
+
* still parses against the live commander program.
|
|
10
|
+
*
|
|
11
|
+
* Client-safe by construction: pure data plus pure functions, no Node
|
|
12
|
+
* imports — the webapp renders this in the browser.
|
|
13
|
+
*/
|
|
14
|
+
/** The npm package end users install (the self-contained wrapper). */
|
|
15
|
+
export declare const PUBLIC_PACKAGE_NAME: "fjall";
|
|
16
|
+
export declare const INSTALL_SOURCES: readonly ["npm", "homebrew"];
|
|
17
|
+
export type InstallSource = (typeof INSTALL_SOURCES)[number];
|
|
18
|
+
export declare const SETUP_COMMANDS: {
|
|
19
|
+
readonly install: "npm install -g fjall";
|
|
20
|
+
readonly upgrade: "npm install -g fjall@latest";
|
|
21
|
+
readonly upgradeHomebrew: "brew upgrade fjall";
|
|
22
|
+
readonly installSkill: "fjall agent install-skill";
|
|
23
|
+
readonly installHooks: "fjall agent install-hooks";
|
|
24
|
+
readonly uninstallHooks: "fjall agent uninstall-hooks";
|
|
25
|
+
readonly sessionContext: "fjall agent session-context";
|
|
26
|
+
readonly login: "fjall login";
|
|
27
|
+
readonly loginDevice: "fjall login --device";
|
|
28
|
+
readonly loginDeviceAgent: "fjall login --device --agent";
|
|
29
|
+
readonly createAccount: "fjall create account";
|
|
30
|
+
readonly createOrganisation: "fjall create organisation";
|
|
31
|
+
readonly connect: "fjall connect";
|
|
32
|
+
readonly accountDeploy: "fjall account deploy";
|
|
33
|
+
readonly organisationDeploy: "fjall org deploy";
|
|
34
|
+
readonly createApplication: "fjall create app";
|
|
35
|
+
readonly createApplicationAgent: "fjall apps create";
|
|
36
|
+
readonly deployApplication: "fjall deploy <app>";
|
|
37
|
+
readonly status: "fjall status";
|
|
38
|
+
};
|
|
39
|
+
export type SetupCommandId = keyof typeof SETUP_COMMANDS;
|
|
40
|
+
/** The upgrade command for how the CLI was installed. */
|
|
41
|
+
export declare function upgradeCommand(source: InstallSource): string;
|
|
42
|
+
export declare const SETUP_MODES: readonly ["account", "organisation"];
|
|
43
|
+
export type SetupMode = (typeof SETUP_MODES)[number];
|
|
44
|
+
export declare const SETUP_STEP_IDS: readonly ["scaffold", "connect", "deploy"];
|
|
45
|
+
export type SetupStepId = (typeof SETUP_STEP_IDS)[number];
|
|
46
|
+
export interface SetupStep {
|
|
47
|
+
readonly id: SetupStepId;
|
|
48
|
+
readonly command: SetupCommandId;
|
|
49
|
+
/** Short, path-neutral title — checklist rows, wizard headings. */
|
|
50
|
+
readonly label: string;
|
|
51
|
+
/** One sentence on what the step leaves behind. */
|
|
52
|
+
readonly summary: string;
|
|
53
|
+
}
|
|
54
|
+
export type SetupStepSequence = readonly [SetupStep, SetupStep, SetupStep];
|
|
55
|
+
/**
|
|
56
|
+
* The three steps of each setup mode, in order. Presentation-only fields
|
|
57
|
+
* (time hints, teasers, expected-output lines) stay with the surface that
|
|
58
|
+
* renders them.
|
|
59
|
+
*/
|
|
60
|
+
export declare const SETUP_STEPS: Record<SetupMode, SetupStepSequence>;
|
|
61
|
+
/**
|
|
62
|
+
* The prompt a person pastes into their agent, one per mode. Derived from
|
|
63
|
+
* `SETUP_STEPS` so the prompt and the checklist can never name different
|
|
64
|
+
* commands.
|
|
65
|
+
*/
|
|
66
|
+
export declare const AGENT_SETUP_PROMPTS: Record<SetupMode, string>;
|
|
67
|
+
/** The one-line install for agent hosts: CLI plus the skill file. */
|
|
68
|
+
export declare const AGENT_INSTALL_COMMAND: "npm install -g fjall && fjall agent install-skill";
|
|
69
|
+
/**
|
|
70
|
+
* Where `fjall agent install-skill` writes SKILL.md, relative to the home
|
|
71
|
+
* directory. The runtime `join(homedir(), ...SKILL_INSTALL_SEGMENTS)` and the
|
|
72
|
+
* display string both derive from this tuple.
|
|
73
|
+
*/
|
|
74
|
+
export declare const SKILL_INSTALL_SEGMENTS: readonly [".claude", "skills", "fjall"];
|
|
75
|
+
export declare const SKILL_INSTALL_FILENAME: "SKILL.md";
|
|
76
|
+
export declare const SKILL_INSTALL_DIR: `~/${string}`;
|
|
77
|
+
export declare const SKILL_INSTALL_PATH: `~/${string}/SKILL.md`;
|
|
78
|
+
export { compareSemver, isNewerVersion, parseSemver, type ParsedSemver } from "./versionCurrency.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c=Object.defineProperty;var o=(a,n)=>c(a,"name",{value:n,configurable:!0});const m="fjall",g=["npm","homebrew"],t={install:"npm install -g fjall",upgrade:"npm install -g fjall@latest",upgradeHomebrew:"brew upgrade fjall",installSkill:"fjall agent install-skill",installHooks:"fjall agent install-hooks",uninstallHooks:"fjall agent uninstall-hooks",sessionContext:"fjall agent session-context",login:"fjall login",loginDevice:"fjall login --device",loginDeviceAgent:"fjall login --device --agent",createAccount:"fjall create account",createOrganisation:"fjall create organisation",connect:"fjall connect",accountDeploy:"fjall account deploy",organisationDeploy:"fjall org deploy",createApplication:"fjall create app",createApplicationAgent:"fjall apps create",deployApplication:"fjall deploy <app>",status:"fjall status"};function f(a){return a==="homebrew"?t.upgradeHomebrew:t.upgrade}o(f,"upgradeCommand");const S=["account","organisation"],j=["scaffold","connect","deploy"],r={account:[{id:"scaffold",command:"createAccount",label:"Create the account project",summary:"Scaffolds fjall/account/infrastructure.ts, the declaration of everything Fjall manages in one AWS account."},{id:"connect",command:"connect",label:"Connect your AWS account",summary:"Opens the AWS quick-create link that installs Fjall's OIDC trust in the account, then waits for the stack to report back."},{id:"deploy",command:"accountDeploy",label:"Deploy account infrastructure",summary:"Provisions the account tier \u2014 deploy roles, logging and guardrails \u2014 so applications can be deployed into it."}],organisation:[{id:"scaffold",command:"createOrganisation",label:"Create the organisation project",summary:"Scaffolds fjall/organisation/infrastructure.ts with the member accounts, identity and guardrail declarations."},{id:"connect",command:"connect",label:"Connect the management account",summary:"Opens the AWS quick-create link that installs Fjall's OIDC trust in the AWS Organizations management account, then waits for the stack to report back."},{id:"deploy",command:"organisationDeploy",label:"Deploy the organisation",summary:"Creates the member accounts and provisions the organisation, platform and account tiers."}]},i={account:"I want to deploy a single AWS account",organisation:"I want to deploy an organisation with governance and shared infrastructure"};function e(a){const n=r[a].map(l=>`\`${t[l.command]}\``).join(", ");return`Set up Fjall for me \u2014 ${i[a]}. Follow the fjall skill and run ${n} in that order, passing --agent on every command.`}o(e,"buildAgentSetupPrompt");const A={account:e("account"),organisation:e("organisation")},h=`${t.install} && ${t.installSkill}`,s=[".claude","skills","fjall"],p="SKILL.md",u=`~/${s.join("/")}`,y=`${u}/${p}`;import{compareSemver as T,isNewerVersion as E,parseSemver as I}from"./versionCurrency.js";export{h as AGENT_INSTALL_COMMAND,A as AGENT_SETUP_PROMPTS,g as INSTALL_SOURCES,m as PUBLIC_PACKAGE_NAME,t as SETUP_COMMANDS,S as SETUP_MODES,r as SETUP_STEPS,j as SETUP_STEP_IDS,u as SKILL_INSTALL_DIR,p as SKILL_INSTALL_FILENAME,y as SKILL_INSTALL_PATH,s as SKILL_INSTALL_SEGMENTS,T as compareSemver,E as isNewerVersion,I as parseSemver,f as upgradeCommand};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semver ordering for install-currency decisions ("is the published version
|
|
3
|
+
* newer than the one running?"). Fjall versions are lerna-minted
|
|
4
|
+
* `MAJOR.MINOR.PATCH` with an optional prerelease; build metadata is ignored
|
|
5
|
+
* per the spec. Pure and client-safe — the webapp can compare too.
|
|
6
|
+
*
|
|
7
|
+
* Two sibling parsers exist with deliberately different semantics — do not
|
|
8
|
+
* consolidate onto this one: `util/src/docker/DockerCli.daemon.ts` truncates
|
|
9
|
+
* prerelease (daemon versions like `24.0.7-ce` gate on the core only), and
|
|
10
|
+
* `deploy-core` `engineCompat.ts#parseEngineVersion` refuses malformed input
|
|
11
|
+
* outright so a corrupted constraint cannot vacate the engine gate. This one
|
|
12
|
+
* compares prerelease per spec §11, which dist-tag currency needs.
|
|
13
|
+
*/
|
|
14
|
+
export interface ParsedSemver {
|
|
15
|
+
readonly core: readonly [number, number, number];
|
|
16
|
+
readonly prerelease: readonly string[];
|
|
17
|
+
}
|
|
18
|
+
export declare function parseSemver(version: string): ParsedSemver | undefined;
|
|
19
|
+
/** Spec §11 precedence; -1 / 0 / 1 like `Array.prototype.sort` comparators. */
|
|
20
|
+
export declare function compareSemver(a: ParsedSemver, b: ParsedSemver): number;
|
|
21
|
+
/**
|
|
22
|
+
* Whether `candidate` is strictly newer than `current`. Unparseable input on
|
|
23
|
+
* either side is "not newer" — a currency nudge must never fire on garbage.
|
|
24
|
+
*/
|
|
25
|
+
export declare function isNewerVersion(candidate: string, current: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o=Object.defineProperty;var i=(r,e)=>o(r,"name",{value:e,configurable:!0});const c=/^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;function l(r){const e=c.exec(r.trim());if(e===null)return;const[,t="0",n="0",s="0",a]=e;return{core:[Number(t),Number(n),Number(s)],prerelease:a===void 0?[]:a.split(".")}}i(l,"parseSemver");const u=/^\d+$/;function p(r,e){const t=u.test(r),n=u.test(e);return t&&n?Math.sign(Number(r)-Number(e)):t?-1:n?1:r<e?-1:r>e?1:0}i(p,"comparePrereleaseIdentifier");function d(r,e){for(let n=0;n<3;n+=1){const s=Math.sign(r.core[n]-e.core[n]);if(s!==0)return s}if(r.prerelease.length===0||e.prerelease.length===0)return Math.sign(e.prerelease.length-r.prerelease.length);const t=Math.min(r.prerelease.length,e.prerelease.length);for(let n=0;n<t;n+=1){const s=p(r.prerelease[n]??"",e.prerelease[n]??"");if(s!==0)return s}return Math.sign(r.prerelease.length-e.prerelease.length)}i(d,"compareSemver");function h(r,e){const t=l(r),n=l(e);return t===void 0||n===void 0?!1:d(t,n)>0}i(h,"isNewerVersion");export{d as compareSemver,h as isNewerVersion,l as parseSemver};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fjall/util",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.0.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/fjall-tech/fjall.git",
|
|
@@ -114,6 +114,10 @@
|
|
|
114
114
|
"./errors/absence": {
|
|
115
115
|
"types": "./dist/errors/absence.d.ts",
|
|
116
116
|
"default": "./dist/errors/absence.js"
|
|
117
|
+
},
|
|
118
|
+
"./onboarding": {
|
|
119
|
+
"types": "./dist/onboarding/index.d.ts",
|
|
120
|
+
"default": "./dist/onboarding/index.js"
|
|
117
121
|
}
|
|
118
122
|
},
|
|
119
123
|
"files": [
|