@ankhorage/contracts 13.0.1 → 15.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.
Files changed (256) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +10 -2
  3. package/dist/appManifest/apis.d.ts +1 -0
  4. package/dist/appManifest/apis.d.ts.map +1 -1
  5. package/dist/appManifest/apis.js +17 -14
  6. package/dist/appManifest/apis.js.map +1 -1
  7. package/dist/appManifest/bindings.d.ts +3 -0
  8. package/dist/appManifest/bindings.d.ts.map +1 -1
  9. package/dist/appManifest/bindings.js +17 -1
  10. package/dist/appManifest/bindings.js.map +1 -1
  11. package/dist/appManifest/constants.d.ts +18 -0
  12. package/dist/appManifest/constants.d.ts.map +1 -0
  13. package/dist/appManifest/constants.js +18 -0
  14. package/dist/appManifest/constants.js.map +1 -0
  15. package/dist/appManifest/data.d.ts +4 -0
  16. package/dist/appManifest/data.d.ts.map +1 -1
  17. package/dist/appManifest/data.js +22 -3
  18. package/dist/appManifest/data.js.map +1 -1
  19. package/dist/appManifest/dataSources.d.ts +1 -0
  20. package/dist/appManifest/dataSources.d.ts.map +1 -1
  21. package/dist/appManifest/dataSources.js +7 -6
  22. package/dist/appManifest/dataSources.js.map +1 -1
  23. package/dist/appManifest/deploy.d.ts +1 -0
  24. package/dist/appManifest/deploy.d.ts.map +1 -1
  25. package/dist/appManifest/deploy.js +16 -13
  26. package/dist/appManifest/deploy.js.map +1 -1
  27. package/dist/appManifest/icon.d.ts.map +1 -1
  28. package/dist/appManifest/icon.js +2 -1
  29. package/dist/appManifest/icon.js.map +1 -1
  30. package/dist/appManifest/isAppManifest.d.ts +4 -0
  31. package/dist/appManifest/isAppManifest.d.ts.map +1 -0
  32. package/dist/appManifest/isAppManifest.js +69 -0
  33. package/dist/appManifest/isAppManifest.js.map +1 -0
  34. package/dist/appManifest/isAppStateSpec.d.ts +4 -0
  35. package/dist/appManifest/isAppStateSpec.d.ts.map +1 -0
  36. package/dist/appManifest/isAppStateSpec.js +9 -0
  37. package/dist/appManifest/isAppStateSpec.js.map +1 -0
  38. package/dist/appManifest/isManifestValue.d.ts +3 -0
  39. package/dist/appManifest/isManifestValue.d.ts.map +1 -0
  40. package/dist/appManifest/isManifestValue.js +15 -0
  41. package/dist/appManifest/isManifestValue.js.map +1 -0
  42. package/dist/appManifest/media.d.ts +1 -0
  43. package/dist/appManifest/media.d.ts.map +1 -1
  44. package/dist/appManifest/media.js +10 -8
  45. package/dist/appManifest/media.js.map +1 -1
  46. package/dist/appManifest/navigator.d.ts.map +1 -1
  47. package/dist/appManifest/navigator.js +7 -6
  48. package/dist/appManifest/navigator.js.map +1 -1
  49. package/dist/appManifest/navigatorOptions.d.ts +0 -2
  50. package/dist/appManifest/navigatorOptions.d.ts.map +1 -1
  51. package/dist/appManifest/navigatorOptions.js +8 -12
  52. package/dist/appManifest/navigatorOptions.js.map +1 -1
  53. package/dist/appManifest/parseAppManifest.d.ts +10 -0
  54. package/dist/appManifest/parseAppManifest.d.ts.map +1 -0
  55. package/dist/appManifest/parseAppManifest.js +14 -0
  56. package/dist/appManifest/parseAppManifest.js.map +1 -0
  57. package/dist/appManifest/screens.d.ts +4 -0
  58. package/dist/appManifest/screens.d.ts.map +1 -1
  59. package/dist/appManifest/screens.js +14 -2
  60. package/dist/appManifest/screens.js.map +1 -1
  61. package/dist/appManifest/splashScreen.d.ts +15 -0
  62. package/dist/appManifest/splashScreen.d.ts.map +1 -0
  63. package/dist/appManifest/splashScreen.js +2 -0
  64. package/dist/appManifest/splashScreen.js.map +1 -0
  65. package/dist/appManifest.d.ts +4 -18
  66. package/dist/appManifest.d.ts.map +1 -1
  67. package/dist/appManifest.js +2 -80
  68. package/dist/appManifest.js.map +1 -1
  69. package/dist/auth.d.ts +3 -2
  70. package/dist/auth.d.ts.map +1 -1
  71. package/dist/auth.js.map +1 -1
  72. package/dist/deploy.d.ts +0 -9
  73. package/dist/deploy.d.ts.map +1 -1
  74. package/dist/deploy.js +0 -8
  75. package/dist/deploy.js.map +1 -1
  76. package/dist/environments.d.ts +4 -0
  77. package/dist/environments.d.ts.map +1 -0
  78. package/dist/environments.js +3 -0
  79. package/dist/environments.js.map +1 -0
  80. package/dist/index.d.ts +2 -1
  81. package/dist/index.d.ts.map +1 -1
  82. package/dist/index.js +2 -1
  83. package/dist/index.js.map +1 -1
  84. package/dist/infra/constants.d.ts +91 -0
  85. package/dist/infra/constants.d.ts.map +1 -0
  86. package/dist/infra/constants.js +91 -0
  87. package/dist/infra/constants.js.map +1 -0
  88. package/dist/infra/infraFields.d.ts +12 -0
  89. package/dist/infra/infraFields.d.ts.map +1 -0
  90. package/dist/infra/infraFields.js +14 -0
  91. package/dist/infra/infraFields.js.map +1 -0
  92. package/dist/infra/isInfraAdapterDescriptor.d.ts +4 -0
  93. package/dist/infra/isInfraAdapterDescriptor.d.ts.map +1 -0
  94. package/dist/infra/isInfraAdapterDescriptor.js +31 -0
  95. package/dist/infra/isInfraAdapterDescriptor.js.map +1 -0
  96. package/dist/infra/isInfraAuthSpec.d.ts +4 -0
  97. package/dist/infra/isInfraAuthSpec.d.ts.map +1 -0
  98. package/dist/infra/isInfraAuthSpec.js +75 -0
  99. package/dist/infra/isInfraAuthSpec.js.map +1 -0
  100. package/dist/infra/isInfraCredentialRef.d.ts +3 -0
  101. package/dist/infra/isInfraCredentialRef.d.ts.map +1 -0
  102. package/dist/infra/isInfraCredentialRef.js +10 -0
  103. package/dist/infra/isInfraCredentialRef.js.map +1 -0
  104. package/dist/infra/isInfraDeploymentSpec.d.ts +4 -0
  105. package/dist/infra/isInfraDeploymentSpec.d.ts.map +1 -0
  106. package/dist/infra/isInfraDeploymentSpec.js +66 -0
  107. package/dist/infra/isInfraDeploymentSpec.js.map +1 -0
  108. package/dist/infra/isInfraEnvironmentSpec.d.ts +4 -0
  109. package/dist/infra/isInfraEnvironmentSpec.d.ts.map +1 -0
  110. package/dist/infra/isInfraEnvironmentSpec.js +82 -0
  111. package/dist/infra/isInfraEnvironmentSpec.js.map +1 -0
  112. package/dist/infra/isInfraManifest.d.ts +4 -0
  113. package/dist/infra/isInfraManifest.d.ts.map +1 -0
  114. package/dist/infra/isInfraManifest.js +23 -0
  115. package/dist/infra/isInfraManifest.js.map +1 -0
  116. package/dist/infra/isInfraShape.d.ts +3 -0
  117. package/dist/infra/isInfraShape.d.ts.map +1 -0
  118. package/dist/infra/isInfraShape.js +10 -0
  119. package/dist/infra/isInfraShape.js.map +1 -0
  120. package/dist/infra/isInfraWorkloadHealth.d.ts +3 -0
  121. package/dist/infra/isInfraWorkloadHealth.d.ts.map +1 -0
  122. package/dist/infra/isInfraWorkloadHealth.js +37 -0
  123. package/dist/infra/isInfraWorkloadHealth.js.map +1 -0
  124. package/dist/infra/isInfraWorkloadSpec.d.ts +4 -0
  125. package/dist/infra/isInfraWorkloadSpec.d.ts.map +1 -0
  126. package/dist/infra/isInfraWorkloadSpec.js +70 -0
  127. package/dist/infra/isInfraWorkloadSpec.js.map +1 -0
  128. package/dist/infra/isInfraWorkloadValue.d.ts +3 -0
  129. package/dist/infra/isInfraWorkloadValue.d.ts.map +1 -0
  130. package/dist/infra/isInfraWorkloadValue.js +40 -0
  131. package/dist/infra/isInfraWorkloadValue.js.map +1 -0
  132. package/dist/infra/parseInfraManifest.d.ts +5 -0
  133. package/dist/infra/parseInfraManifest.d.ts.map +1 -0
  134. package/dist/infra/parseInfraManifest.js +17 -0
  135. package/dist/infra/parseInfraManifest.js.map +1 -0
  136. package/dist/infra/validateInfraAdapterSelection.d.ts +6 -0
  137. package/dist/infra/validateInfraAdapterSelection.d.ts.map +1 -0
  138. package/dist/infra/validateInfraAdapterSelection.js +36 -0
  139. package/dist/infra/validateInfraAdapterSelection.js.map +1 -0
  140. package/dist/infra.d.ts +16 -0
  141. package/dist/infra.d.ts.map +1 -0
  142. package/dist/infra.js +11 -0
  143. package/dist/infra.js.map +1 -0
  144. package/dist/media.d.ts +7 -6
  145. package/dist/media.d.ts.map +1 -1
  146. package/dist/media.js +5 -5
  147. package/dist/media.js.map +1 -1
  148. package/dist/state.d.ts +5 -0
  149. package/dist/state.d.ts.map +1 -1
  150. package/dist/state.js.map +1 -1
  151. package/dist/types/appManifest.d.ts +9 -0
  152. package/dist/types/appManifest.d.ts.map +1 -0
  153. package/dist/types/appManifest.js +2 -0
  154. package/dist/types/appManifest.js.map +1 -0
  155. package/dist/types/infraAdapters.d.ts +85 -0
  156. package/dist/types/infraAdapters.d.ts.map +1 -0
  157. package/dist/types/infraAdapters.js +2 -0
  158. package/dist/types/infraAdapters.js.map +1 -0
  159. package/dist/types/infraLifecycle.d.ts +107 -0
  160. package/dist/types/infraLifecycle.d.ts.map +1 -0
  161. package/dist/types/infraLifecycle.js +2 -0
  162. package/dist/types/infraLifecycle.js.map +1 -0
  163. package/dist/types/infraManifest.d.ts +142 -0
  164. package/dist/types/infraManifest.d.ts.map +1 -0
  165. package/dist/types/infraManifest.js +2 -0
  166. package/dist/types/infraManifest.js.map +1 -0
  167. package/dist/types/infraSecrets.d.ts +15 -0
  168. package/dist/types/infraSecrets.d.ts.map +1 -0
  169. package/dist/types/infraSecrets.js +2 -0
  170. package/dist/types/infraSecrets.js.map +1 -0
  171. package/dist/types/infraValidation.d.ts +5 -0
  172. package/dist/types/infraValidation.d.ts.map +1 -0
  173. package/dist/types/infraValidation.js +2 -0
  174. package/dist/types/infraValidation.js.map +1 -0
  175. package/dist/types/infraWorkload.d.ts +70 -0
  176. package/dist/types/infraWorkload.d.ts.map +1 -0
  177. package/dist/types/infraWorkload.js +2 -0
  178. package/dist/types/infraWorkload.js.map +1 -0
  179. package/dist/types.d.ts +8 -82
  180. package/dist/types.d.ts.map +1 -1
  181. package/dist/types.js +0 -9
  182. package/dist/types.js.map +1 -1
  183. package/package.json +13 -3
  184. package/src/appManifest/apis.ts +18 -16
  185. package/src/appManifest/bindings.ts +18 -1
  186. package/src/appManifest/constants.ts +19 -0
  187. package/src/appManifest/data.ts +23 -9
  188. package/src/appManifest/dataSources.ts +8 -7
  189. package/src/appManifest/deploy.ts +17 -15
  190. package/src/appManifest/icon.ts +3 -1
  191. package/src/appManifest/isAppManifest.ts +95 -0
  192. package/src/appManifest/isAppStateSpec.ts +13 -0
  193. package/src/appManifest/isManifestValue.ts +19 -0
  194. package/src/appManifest/media.ts +11 -10
  195. package/src/appManifest/navigator.ts +7 -6
  196. package/src/appManifest/navigatorOptions.ts +9 -16
  197. package/src/appManifest/parseAppManifest.ts +15 -0
  198. package/src/appManifest/screens.ts +14 -2
  199. package/src/appManifest/splashScreen.test.ts +40 -0
  200. package/src/appManifest/splashScreen.ts +24 -0
  201. package/src/appManifest.test.ts +9 -5
  202. package/src/appManifest.ts +8 -106
  203. package/src/auth-flow-contract.test.ts +6 -10
  204. package/src/auth-oauth.test.ts +2 -2
  205. package/src/auth.ts +3 -2
  206. package/src/bindings.test.ts +5 -0
  207. package/src/contracts.test.ts +21 -39
  208. package/src/deploy.test.ts +13 -5
  209. package/src/deploy.ts +0 -11
  210. package/src/environments.ts +4 -0
  211. package/src/index.ts +2 -1
  212. package/src/infra/constants.ts +91 -0
  213. package/src/infra/infraFields.ts +20 -0
  214. package/src/infra/isInfraAdapterDescriptor.ts +37 -0
  215. package/src/infra/isInfraAuthSpec.ts +98 -0
  216. package/src/infra/isInfraCredentialRef.ts +11 -0
  217. package/src/infra/isInfraDeploymentSpec.ts +75 -0
  218. package/src/infra/isInfraEnvironmentSpec.ts +95 -0
  219. package/src/infra/isInfraManifest.ts +29 -0
  220. package/src/infra/isInfraShape.ts +16 -0
  221. package/src/infra/isInfraWorkloadHealth.ts +38 -0
  222. package/src/infra/isInfraWorkloadSpec.ts +87 -0
  223. package/src/infra/isInfraWorkloadValue.ts +41 -0
  224. package/src/infra/parseInfraManifest.ts +20 -0
  225. package/src/infra/validateInfraAdapterSelection.ts +42 -0
  226. package/src/infra-types.test.ts +78 -0
  227. package/src/infra-workload.test.ts +186 -0
  228. package/src/infra.test.ts +268 -0
  229. package/src/infra.ts +15 -0
  230. package/src/media.ts +12 -11
  231. package/src/profile-contract.test.ts +2 -3
  232. package/src/secrets.test.ts +19 -13
  233. package/src/state.ts +6 -0
  234. package/src/types/appManifest.ts +5 -0
  235. package/src/types/infraAdapters.ts +148 -0
  236. package/src/types/infraLifecycle.ts +105 -0
  237. package/src/types/infraManifest.ts +130 -0
  238. package/src/types/infraSecrets.ts +16 -0
  239. package/src/types/infraValidation.ts +2 -0
  240. package/src/types/infraWorkload.ts +64 -0
  241. package/src/types.ts +8 -103
  242. package/dist/appManifest/infra.d.ts +0 -2
  243. package/dist/appManifest/infra.d.ts.map +0 -1
  244. package/dist/appManifest/infra.js +0 -130
  245. package/dist/appManifest/infra.js.map +0 -1
  246. package/dist/appManifest/shared.d.ts +0 -8
  247. package/dist/appManifest/shared.d.ts.map +0 -1
  248. package/dist/appManifest/shared.js +0 -31
  249. package/dist/appManifest/shared.js.map +0 -1
  250. package/dist/secretManifest.d.ts +0 -11
  251. package/dist/secretManifest.d.ts.map +0 -1
  252. package/dist/secretManifest.js +0 -2
  253. package/dist/secretManifest.js.map +0 -1
  254. package/src/appManifest/infra.ts +0 -190
  255. package/src/appManifest/shared.ts +0 -40
  256. package/src/secretManifest.ts +0 -12
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,eAAO,MAAM,qBAAqB,yCAA0C,CAAC;AAC7E,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,eAAO,MAAM,mBAAmB,6FAMtB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,mBA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sB;IACtB,sBAAsB;IACtB,iCAAiC;IACjC,kBAAkB;IAClB,gBAAgB;IAChB,eAAe;IACf,4BAA4B;IAC5B,sBAAsB;IACtB,eAAe;IACf,4BAA4B;IAC5B,yBAAyB;IACzB,gBAAgB;CACR,CAAC;AAUX,MAAM,CAAC,MAAM,yCAAyC,GAAG;IACvD,gBAAgB;IAChB,mBAAmB;CACX,CAAC;AAIX,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,GAAG,yCAAyC;IAC5C,iBAAiB;CACT,CAAC;AAGX,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,qBAAqB;IACrB,kBAAkB;CACV,CAAC","sourcesContent":["import type { AppDeployEnvironmentId, AppDeployTargetId } from './deploy';\nimport type { SecretRef } from './secrets';\nimport type { IconSpec } from './types';\n\nexport const AUTH_IDENTIFIER_KINDS = ['email', 'phone', 'username'] as const;\nexport type AuthIdentifierKind = (typeof AUTH_IDENTIFIER_KINDS)[number];\n\nexport const AUTH_SIGN_UP_FIELDS = [\n ...AUTH_IDENTIFIER_KINDS,\n 'password',\n 'displayName',\n 'firstName',\n 'lastName',\n] as const;\nexport type KnownAuthSignUpField = (typeof AUTH_SIGN_UP_FIELDS)[number];\nexport type AuthSignUpField = KnownAuthSignUpField | (string & {});\n\nexport const AUTH_OAUTH_PROVIDER_IDS = [\n 'apple',\n 'azure',\n 'bitbucket',\n 'discord',\n 'facebook',\n 'figma',\n 'github',\n 'gitlab',\n 'google',\n 'kakao',\n 'keycloak',\n 'linkedin',\n 'notion',\n 'slack',\n 'spotify',\n 'twitch',\n 'twitter',\n 'workos',\n 'zoom',\n] as const;\nexport type KnownAuthOAuthProviderId = (typeof AUTH_OAUTH_PROVIDER_IDS)[number];\nexport type AuthOAuthProviderId = KnownAuthOAuthProviderId | (string & {});\n\nexport const AUTH_OAUTH_TRANSPORT_IDS = ['brokeredRedirect'] as const;\nexport type KnownAuthOAuthTransportId = (typeof AUTH_OAUTH_TRANSPORT_IDS)[number];\nexport type AuthOAuthTransportId = KnownAuthOAuthTransportId | (string & {});\n\nexport const AUTH_OAUTH_SETUP_FIELD_PERSISTENCE_KINDS = [\n 'trustedCredential',\n 'publicConfig',\n] as const;\nexport type AuthOAuthSetupFieldPersistence =\n (typeof AUTH_OAUTH_SETUP_FIELD_PERSISTENCE_KINDS)[number];\n\nexport const AUTH_OAUTH_SETUP_FIELD_SENSITIVITIES = ['public', 'secret'] as const;\nexport type AuthOAuthSetupFieldSensitivity = (typeof AUTH_OAUTH_SETUP_FIELD_SENSITIVITIES)[number];\n\nexport const AUTH_OAUTH_SETUP_CALLBACK_ROLES = ['provider', 'app'] as const;\nexport type AuthOAuthSetupCallbackRole = (typeof AUTH_OAUTH_SETUP_CALLBACK_ROLES)[number];\n\nexport interface AuthOAuthSetupFieldRequirement {\n readonly kind: 'field';\n /** Adapter-owned stable key. The contract does not prescribe provider-specific field names. */\n readonly key: string;\n readonly label: string;\n readonly required: boolean;\n readonly sensitivity: AuthOAuthSetupFieldSensitivity;\n readonly persistence: AuthOAuthSetupFieldPersistence;\n /** Present only when a field belongs to one application target rather than the backend setup. */\n readonly target?: AppDeployTargetId;\n readonly description?: string;\n}\n\nexport interface AuthOAuthSetupCallbackRequirement {\n readonly kind: 'callback';\n readonly role: AuthOAuthSetupCallbackRole;\n readonly label: string;\n readonly required: boolean;\n /** App callbacks may be target-specific; provider/backend callbacks normally omit this. */\n readonly target?: AppDeployTargetId;\n readonly description?: string;\n}\n\nexport type AuthOAuthSetupRequirement =\n AuthOAuthSetupFieldRequirement | AuthOAuthSetupCallbackRequirement;\n\n/**\n * Adapter-neutral description of the OAuth setup Studio or Doctor should surface for one\n * provider/transport/environment combination. It contains requirements only, never credential\n * values, tokens, callback authorization data, or other secret material.\n */\nexport interface AuthOAuthSetupPlan {\n readonly provider: AuthOAuthProviderId;\n readonly transport: AuthOAuthTransportId;\n readonly environment: AppDeployEnvironmentId;\n /** Enabled application targets considered while deriving this plan. */\n readonly targets: readonly AppDeployTargetId[];\n readonly requirements: readonly AuthOAuthSetupRequirement[];\n}\n\n/** Backend-owned setup capabilities used by administration planning, separate from runtime OAuth. */\nexport interface AuthOAuthSetupCapabilities {\n readonly providers: readonly AuthOAuthProviderId[];\n readonly transports: readonly AuthOAuthTransportId[];\n}\n\nexport interface AuthIdentifier {\n kind: AuthIdentifierKind;\n value: string;\n}\n\nexport interface AuthFlowConfig {\n signInRoute: string;\n signUpRoute?: string;\n signOutRoute?: string;\n forgotPasswordRoute?: string;\n otpRoute?: string;\n postSignInRoute: string;\n unauthorizedRoute?: string;\n}\n\nexport const DEFAULT_AUTH_FLOW = {\n signInRoute: 'sign-in',\n signUpRoute: 'sign-up',\n signOutRoute: 'sign-out',\n forgotPasswordRoute: 'forgot-password',\n postSignInRoute: '/',\n unauthorizedRoute: 'sign-in',\n} as const satisfies AuthFlowConfig;\n\nexport function resolveAuthFlow(flow?: AuthFlowConfig): AuthFlowConfig {\n return { ...(flow ?? DEFAULT_AUTH_FLOW) };\n}\n\nexport interface AuthSignInConfig {\n identifiers: AuthIdentifierKind[];\n}\n\nexport interface AuthSignUpConfig {\n requiredFields: AuthSignUpField[];\n optionalFields?: AuthSignUpField[];\n}\n\nexport interface AuthOAuthProviderConfig {\n id: AuthOAuthProviderId;\n label?: string;\n enabled?: boolean;\n scopes?: string[];\n queryParams?: Record<string, string>;\n icon?: IconSpec;\n /** Logical server-side secret reference; raw credentials must never be stored here. */\n credentialsRef?: SecretRef;\n}\n\nexport interface AuthOAuthConfig {\n enabled: boolean;\n callbackRoute: string;\n providers: AuthOAuthProviderConfig[];\n}\n\nexport interface AuthProviderConfig {\n provider: string;\n signIn: AuthSignInConfig;\n signUp?: AuthSignUpConfig;\n oauth?: AuthOAuthConfig;\n passwordReset?: {\n enabled: boolean;\n };\n otp?: {\n enabled: boolean;\n };\n}\n\nexport interface AuthUser {\n id: string;\n email?: string;\n phone?: string;\n username?: string;\n displayName?: string;\n avatarUrl?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface AuthSession {\n accessToken: string;\n refreshToken?: string;\n expiresAt?: number;\n tokenType?: string;\n user: AuthUser;\n}\n\nexport interface AuthAdapterError {\n code: string;\n message: string;\n cause?: unknown;\n}\n\nexport type AuthResult<TData = void> =\n | {\n ok: true;\n data?: TData;\n }\n | {\n ok: false;\n error: AuthAdapterError;\n };\n\nexport interface SignInInput {\n identifier: AuthIdentifier;\n password?: string;\n otp?: string;\n redirectTo?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface SignUpInput {\n identifier: AuthIdentifier;\n password?: string;\n profile?: Record<string, unknown>;\n redirectTo?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface SignOutInput {\n allDevices?: boolean;\n}\n\nexport interface PasswordResetInput {\n identifier: AuthIdentifier;\n redirectTo?: string;\n}\n\nexport interface VerifyOtpInput {\n identifier: AuthIdentifier;\n token: string;\n redirectTo?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport const AUTH_OAUTH_ERROR_STAGES = [\n 'start',\n 'transport',\n 'callback',\n 'exchange',\n 'session',\n 'profile',\n] as const;\nexport type AuthOAuthErrorStage = (typeof AUTH_OAUTH_ERROR_STAGES)[number];\n\nexport const AUTH_OAUTH_ERROR_CODES = [\n 'oauth_unavailable',\n 'provider_disabled',\n 'provider_misconfigured',\n 'invalid_redirect_uri',\n 'authorization_failed',\n 'authorization_attempt_not_found',\n 'invalid_callback',\n 'state_mismatch',\n 'pkce_mismatch',\n 'callback_already_completed',\n 'code_exchange_failed',\n 'network_error',\n 'session_persistence_failed',\n 'profile_creation_failed',\n 'provider_error',\n] as const;\nexport type AuthOAuthErrorCode = (typeof AUTH_OAUTH_ERROR_CODES)[number];\n\nexport interface AuthOAuthError extends AuthAdapterError {\n code: AuthOAuthErrorCode;\n stage: AuthOAuthErrorStage;\n provider?: AuthOAuthProviderId;\n recoverable: boolean;\n}\n\nexport const AUTH_OAUTH_TRANSPORT_CANCELLATION_REASONS = [\n 'user_cancelled',\n 'browser_dismissed',\n] as const;\nexport type AuthOAuthTransportCancellationReason =\n (typeof AUTH_OAUTH_TRANSPORT_CANCELLATION_REASONS)[number];\n\nexport const AUTH_OAUTH_CANCELLATION_REASONS = [\n ...AUTH_OAUTH_TRANSPORT_CANCELLATION_REASONS,\n 'provider_denied',\n] as const;\nexport type AuthOAuthCancellationReason = (typeof AUTH_OAUTH_CANCELLATION_REASONS)[number];\n\nexport const AUTH_OAUTH_TRANSPORT_ERROR_CODES = [\n 'browser_unavailable',\n 'transport_failed',\n] as const;\nexport type AuthOAuthTransportErrorCode = (typeof AUTH_OAUTH_TRANSPORT_ERROR_CODES)[number];\n\nexport interface AuthOAuthTransportError {\n code: AuthOAuthTransportErrorCode;\n message: string;\n cause?: unknown;\n}\n\nexport interface StartOAuthAuthorizationInput {\n provider: AuthOAuthProviderId;\n redirectUri: string;\n scopes?: readonly string[];\n queryParams?: Readonly<Record<string, string>>;\n}\n\nexport interface AuthOAuthAuthorizationRequest {\n attemptId: string;\n provider: AuthOAuthProviderId;\n authorizationUrl: string;\n redirectUri: string;\n}\n\nexport type AuthOAuthStartResult =\n | {\n ok: true;\n data: AuthOAuthAuthorizationRequest;\n }\n | {\n ok: false;\n error: AuthOAuthError;\n };\n\nexport type AuthOAuthAuthorizationResponse =\n | {\n type: 'callback';\n url: string;\n }\n | {\n type: 'cancelled';\n reason: AuthOAuthTransportCancellationReason;\n }\n | {\n type: 'error';\n error: AuthOAuthTransportError;\n };\n\nexport interface CompleteOAuthAuthorizationInput {\n attemptId: string;\n response: AuthOAuthAuthorizationResponse;\n}\n\nexport type AuthOAuthCompletionResult =\n | {\n ok: true;\n status: 'authenticated';\n provider: AuthOAuthProviderId;\n session: AuthSession;\n }\n | {\n ok: false;\n status: 'cancelled';\n provider: AuthOAuthProviderId;\n reason: AuthOAuthCancellationReason;\n }\n | {\n ok: false;\n status: 'error';\n error: AuthOAuthError;\n };\n\nexport interface AuthOAuthCapabilities {\n /** Enabled providers for which start and callback completion are operational. */\n providers: readonly [AuthOAuthProviderId, ...AuthOAuthProviderId[]];\n}\n\nexport interface AuthOAuthAdapter {\n readonly capabilities: AuthOAuthCapabilities;\n\n startAuthorization(input: StartOAuthAuthorizationInput): Promise<AuthOAuthStartResult>;\n completeAuthorization(input: CompleteOAuthAuthorizationInput): Promise<AuthOAuthCompletionResult>;\n}\n\nexport interface AuthAdapterCapabilities {\n signInIdentifiers: AuthIdentifierKind[];\n supportsSignUp: boolean;\n supportsPasswordReset: boolean;\n supportsOtp: boolean;\n supportsSessionRefresh: boolean;\n}\n\nexport interface AuthAdapter {\n readonly capabilities?: AuthAdapterCapabilities;\n /**\n * Presence is the canonical OAuth capability signal. When present, both authorization start and\n * callback completion are mandatory and operational for every advertised provider.\n */\n readonly oauth?: AuthOAuthAdapter;\n\n signIn(input: SignInInput): Promise<AuthResult<AuthSession>>;\n signUp(input: SignUpInput): Promise<AuthResult<AuthSession | AuthUser>>;\n signOut(input?: SignOutInput): Promise<AuthResult>;\n\n getSession(): Promise<AuthResult<AuthSession | null>>;\n refreshSession?(): Promise<AuthResult<AuthSession | null>>;\n\n requestPasswordReset?(input: PasswordResetInput): Promise<AuthResult>;\n verifyOtp?(input: VerifyOtpInput): Promise<AuthResult<AuthSession>>;\n}\n"]}
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAU,CAAC;AAG7E,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,qBAAqB;IACxB,UAAU;IACV,aAAa;IACb,WAAW;IACX,UAAU;CACF,CAAC;AAIX,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,OAAO;IACP,OAAO;IACP,WAAW;IACX,SAAS;IACT,UAAU;IACV,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,UAAU;IACV,UAAU;IACV,QAAQ;IACR,OAA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AGX,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,qBAAqB;IACrB,kBAAkB;CACV,CAAC","sourcesContent":["import type { AppDeployTargetId } from './deploy';\nimport type { AppEnvironmentId } from './environments';\nimport type { SecretRef } from './secrets';\nimport type { IconSpec } from './types';\n\nexport const AUTH_IDENTIFIER_KINDS = ['email', 'phone', 'username'] as const;\nexport type AuthIdentifierKind = (typeof AUTH_IDENTIFIER_KINDS)[number];\n\nexport const AUTH_SIGN_UP_FIELDS = [\n ...AUTH_IDENTIFIER_KINDS,\n 'password',\n 'displayName',\n 'firstName',\n 'lastName',\n] as const;\nexport type KnownAuthSignUpField = (typeof AUTH_SIGN_UP_FIELDS)[number];\nexport type AuthSignUpField = KnownAuthSignUpField | (string & {});\n\nexport const AUTH_OAUTH_PROVIDER_IDS = [\n 'apple',\n 'azure',\n 'bitbucket',\n 'discord',\n 'facebook',\n 'figma',\n 'github',\n 'gitlab',\n 'google',\n 'kakao',\n 'keycloak',\n 'linkedin',\n 'notion',\n 'slack',\n 'spotify',\n 'twitch',\n 'twitter',\n 'workos',\n 'zoom',\n] as const;\nexport type KnownAuthOAuthProviderId = (typeof AUTH_OAUTH_PROVIDER_IDS)[number];\nexport type AuthOAuthProviderId = KnownAuthOAuthProviderId | (string & {});\n\nexport const AUTH_OAUTH_TRANSPORT_IDS = ['brokeredRedirect'] as const;\nexport type KnownAuthOAuthTransportId = (typeof AUTH_OAUTH_TRANSPORT_IDS)[number];\nexport type AuthOAuthTransportId = KnownAuthOAuthTransportId | (string & {});\n\nexport const AUTH_OAUTH_SETUP_FIELD_PERSISTENCE_KINDS = [\n 'trustedCredential',\n 'publicConfig',\n] as const;\nexport type AuthOAuthSetupFieldPersistence =\n (typeof AUTH_OAUTH_SETUP_FIELD_PERSISTENCE_KINDS)[number];\n\nexport const AUTH_OAUTH_SETUP_FIELD_SENSITIVITIES = ['public', 'secret'] as const;\nexport type AuthOAuthSetupFieldSensitivity = (typeof AUTH_OAUTH_SETUP_FIELD_SENSITIVITIES)[number];\n\nexport const AUTH_OAUTH_SETUP_CALLBACK_ROLES = ['provider', 'app'] as const;\nexport type AuthOAuthSetupCallbackRole = (typeof AUTH_OAUTH_SETUP_CALLBACK_ROLES)[number];\n\nexport interface AuthOAuthSetupFieldRequirement {\n readonly kind: 'field';\n /** Adapter-owned stable key. The contract does not prescribe provider-specific field names. */\n readonly key: string;\n readonly label: string;\n readonly required: boolean;\n readonly sensitivity: AuthOAuthSetupFieldSensitivity;\n readonly persistence: AuthOAuthSetupFieldPersistence;\n /** Present only when a field belongs to one application target rather than the backend setup. */\n readonly target?: AppDeployTargetId;\n readonly description?: string;\n}\n\nexport interface AuthOAuthSetupCallbackRequirement {\n readonly kind: 'callback';\n readonly role: AuthOAuthSetupCallbackRole;\n readonly label: string;\n readonly required: boolean;\n /** App callbacks may be target-specific; provider/backend callbacks normally omit this. */\n readonly target?: AppDeployTargetId;\n readonly description?: string;\n}\n\nexport type AuthOAuthSetupRequirement =\n AuthOAuthSetupFieldRequirement | AuthOAuthSetupCallbackRequirement;\n\n/**\n * Adapter-neutral description of the OAuth setup Studio or Doctor should surface for one\n * provider/transport/environment combination. It contains requirements only, never credential\n * values, tokens, callback authorization data, or other secret material.\n */\nexport interface AuthOAuthSetupPlan {\n readonly provider: AuthOAuthProviderId;\n readonly transport: AuthOAuthTransportId;\n readonly environment: AppEnvironmentId;\n /** Enabled application targets considered while deriving this plan. */\n readonly targets: readonly AppDeployTargetId[];\n readonly requirements: readonly AuthOAuthSetupRequirement[];\n}\n\n/** Backend-owned setup capabilities used by administration planning, separate from runtime OAuth. */\nexport interface AuthOAuthSetupCapabilities {\n readonly providers: readonly AuthOAuthProviderId[];\n readonly transports: readonly AuthOAuthTransportId[];\n}\n\nexport interface AuthIdentifier {\n kind: AuthIdentifierKind;\n value: string;\n}\n\nexport interface AuthFlowConfig {\n signInRoute: string;\n signUpRoute?: string;\n signOutRoute?: string;\n forgotPasswordRoute?: string;\n otpRoute?: string;\n postSignInRoute: string;\n unauthorizedRoute?: string;\n}\n\nexport const DEFAULT_AUTH_FLOW = {\n signInRoute: 'sign-in',\n signUpRoute: 'sign-up',\n signOutRoute: 'sign-out',\n forgotPasswordRoute: 'forgot-password',\n postSignInRoute: '/',\n unauthorizedRoute: 'sign-in',\n} as const satisfies AuthFlowConfig;\n\nexport function resolveAuthFlow(flow?: AuthFlowConfig): AuthFlowConfig {\n return { ...(flow ?? DEFAULT_AUTH_FLOW) };\n}\n\nexport interface AuthSignInConfig {\n identifiers: AuthIdentifierKind[];\n}\n\nexport interface AuthSignUpConfig {\n requiredFields: AuthSignUpField[];\n optionalFields?: AuthSignUpField[];\n}\n\nexport interface AuthOAuthProviderConfig {\n id: AuthOAuthProviderId;\n label?: string;\n enabled?: boolean;\n scopes?: string[];\n queryParams?: Record<string, string>;\n icon?: IconSpec;\n /** Logical server-side secret reference; raw credentials must never be stored here. */\n credentialsRef?: SecretRef;\n}\n\nexport interface AuthOAuthConfig {\n enabled: boolean;\n callbackRoute: string;\n providers: AuthOAuthProviderConfig[];\n}\n\nexport interface AuthProviderConfig {\n provider: string;\n signIn: AuthSignInConfig;\n signUp?: AuthSignUpConfig;\n oauth?: AuthOAuthConfig;\n passwordReset?: {\n enabled: boolean;\n };\n otp?: {\n enabled: boolean;\n };\n}\n\nexport interface AuthUser {\n id: string;\n email?: string;\n phone?: string;\n username?: string;\n displayName?: string;\n avatarUrl?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface AuthSession {\n accessToken: string;\n refreshToken?: string;\n expiresAt?: number;\n tokenType?: string;\n user: AuthUser;\n}\n\nexport interface AuthAdapterError {\n code: string;\n message: string;\n cause?: unknown;\n}\n\nexport type AuthResult<TData = void> =\n | {\n ok: true;\n data?: TData;\n }\n | {\n ok: false;\n error: AuthAdapterError;\n };\n\nexport interface SignInInput {\n identifier: AuthIdentifier;\n password?: string;\n otp?: string;\n redirectTo?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface SignUpInput {\n identifier: AuthIdentifier;\n password?: string;\n profile?: Record<string, unknown>;\n redirectTo?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface SignOutInput {\n allDevices?: boolean;\n}\n\nexport interface PasswordResetInput {\n identifier: AuthIdentifier;\n redirectTo?: string;\n}\n\nexport interface VerifyOtpInput {\n identifier: AuthIdentifier;\n token: string;\n redirectTo?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport const AUTH_OAUTH_ERROR_STAGES = [\n 'start',\n 'transport',\n 'callback',\n 'exchange',\n 'session',\n 'profile',\n] as const;\nexport type AuthOAuthErrorStage = (typeof AUTH_OAUTH_ERROR_STAGES)[number];\n\nexport const AUTH_OAUTH_ERROR_CODES = [\n 'oauth_unavailable',\n 'provider_disabled',\n 'provider_misconfigured',\n 'invalid_redirect_uri',\n 'authorization_failed',\n 'authorization_attempt_not_found',\n 'invalid_callback',\n 'state_mismatch',\n 'pkce_mismatch',\n 'callback_already_completed',\n 'code_exchange_failed',\n 'network_error',\n 'session_persistence_failed',\n 'profile_creation_failed',\n 'provider_error',\n] as const;\nexport type AuthOAuthErrorCode = (typeof AUTH_OAUTH_ERROR_CODES)[number];\n\nexport interface AuthOAuthError extends AuthAdapterError {\n code: AuthOAuthErrorCode;\n stage: AuthOAuthErrorStage;\n provider?: AuthOAuthProviderId;\n recoverable: boolean;\n}\n\nexport const AUTH_OAUTH_TRANSPORT_CANCELLATION_REASONS = [\n 'user_cancelled',\n 'browser_dismissed',\n] as const;\nexport type AuthOAuthTransportCancellationReason =\n (typeof AUTH_OAUTH_TRANSPORT_CANCELLATION_REASONS)[number];\n\nexport const AUTH_OAUTH_CANCELLATION_REASONS = [\n ...AUTH_OAUTH_TRANSPORT_CANCELLATION_REASONS,\n 'provider_denied',\n] as const;\nexport type AuthOAuthCancellationReason = (typeof AUTH_OAUTH_CANCELLATION_REASONS)[number];\n\nexport const AUTH_OAUTH_TRANSPORT_ERROR_CODES = [\n 'browser_unavailable',\n 'transport_failed',\n] as const;\nexport type AuthOAuthTransportErrorCode = (typeof AUTH_OAUTH_TRANSPORT_ERROR_CODES)[number];\n\nexport interface AuthOAuthTransportError {\n code: AuthOAuthTransportErrorCode;\n message: string;\n cause?: unknown;\n}\n\nexport interface StartOAuthAuthorizationInput {\n provider: AuthOAuthProviderId;\n redirectUri: string;\n scopes?: readonly string[];\n queryParams?: Readonly<Record<string, string>>;\n}\n\nexport interface AuthOAuthAuthorizationRequest {\n attemptId: string;\n provider: AuthOAuthProviderId;\n authorizationUrl: string;\n redirectUri: string;\n}\n\nexport type AuthOAuthStartResult =\n | {\n ok: true;\n data: AuthOAuthAuthorizationRequest;\n }\n | {\n ok: false;\n error: AuthOAuthError;\n };\n\nexport type AuthOAuthAuthorizationResponse =\n | {\n type: 'callback';\n url: string;\n }\n | {\n type: 'cancelled';\n reason: AuthOAuthTransportCancellationReason;\n }\n | {\n type: 'error';\n error: AuthOAuthTransportError;\n };\n\nexport interface CompleteOAuthAuthorizationInput {\n attemptId: string;\n response: AuthOAuthAuthorizationResponse;\n}\n\nexport type AuthOAuthCompletionResult =\n | {\n ok: true;\n status: 'authenticated';\n provider: AuthOAuthProviderId;\n session: AuthSession;\n }\n | {\n ok: false;\n status: 'cancelled';\n provider: AuthOAuthProviderId;\n reason: AuthOAuthCancellationReason;\n }\n | {\n ok: false;\n status: 'error';\n error: AuthOAuthError;\n };\n\nexport interface AuthOAuthCapabilities {\n /** Enabled providers for which start and callback completion are operational. */\n providers: readonly [AuthOAuthProviderId, ...AuthOAuthProviderId[]];\n}\n\nexport interface AuthOAuthAdapter {\n readonly capabilities: AuthOAuthCapabilities;\n\n startAuthorization(input: StartOAuthAuthorizationInput): Promise<AuthOAuthStartResult>;\n completeAuthorization(input: CompleteOAuthAuthorizationInput): Promise<AuthOAuthCompletionResult>;\n}\n\nexport interface AuthAdapterCapabilities {\n signInIdentifiers: AuthIdentifierKind[];\n supportsSignUp: boolean;\n supportsPasswordReset: boolean;\n supportsOtp: boolean;\n supportsSessionRefresh: boolean;\n}\n\nexport interface AuthAdapter {\n readonly capabilities?: AuthAdapterCapabilities;\n /**\n * Presence is the canonical OAuth capability signal. When present, both authorization start and\n * callback completion are mandatory and operational for every advertised provider.\n */\n readonly oauth?: AuthOAuthAdapter;\n\n signIn(input: SignInInput): Promise<AuthResult<AuthSession>>;\n signUp(input: SignUpInput): Promise<AuthResult<AuthSession | AuthUser>>;\n signOut(input?: SignOutInput): Promise<AuthResult>;\n\n getSession(): Promise<AuthResult<AuthSession | null>>;\n refreshSession?(): Promise<AuthResult<AuthSession | null>>;\n\n requestPasswordReset?(input: PasswordResetInput): Promise<AuthResult>;\n verifyOtp?(input: VerifyOtpInput): Promise<AuthResult<AuthSession>>;\n}\n"]}
package/dist/deploy.d.ts CHANGED
@@ -1,14 +1,5 @@
1
1
  export declare const APP_DEPLOY_TARGET_IDS: readonly ["web", "android", "ios"];
2
2
  export type AppDeployTargetId = (typeof APP_DEPLOY_TARGET_IDS)[number];
3
- /**
4
- * Logical application environments shared across platform-specific planning.
5
- *
6
- * `local` maps to local Web, iOS development, and Android debug execution.
7
- * Environment-specific endpoints, signing material, and credentials are owned
8
- * by their dedicated deployment/infra configuration rather than this identity contract.
9
- */
10
- export declare const APP_DEPLOY_ENVIRONMENT_IDS: readonly ["local", "preview", "production"];
11
- export type AppDeployEnvironmentId = (typeof APP_DEPLOY_ENVIRONMENT_IDS)[number];
12
3
  export interface AppDeployProviderSelection {
13
4
  readonly build?: string;
14
5
  readonly publish?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,oCAAqC,CAAC;AAExE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,6CAA8C,CAAC;AAEtF,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,0BAA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CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACjD;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,8FAA8F;IAC9F,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACjD;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,8FAA8F;IAC9F,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACjD;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,GAAG,CAAC,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,OAAO,CAAC,EAAE,4BAA4B,CAAC;IAChD,QAAQ,CAAC,GAAG,CAAC,EAAE,wBAAwB,CAAC;CACzC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;CACpC;AAED,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
package/dist/deploy.js CHANGED
@@ -1,11 +1,3 @@
1
1
  export const APP_DEPLOY_TARGET_IDS = ['web', 'android', 'ios'];
2
- /**
3
- * Logical application environments shared across platform-specific planning.
4
- *
5
- * `local` maps to local Web, iOS development, and Android debug execution.
6
- * Environment-specific endpoints, signing material, and credentials are owned
7
- * by their dedicated deployment/infra configuration rather than this identity contract.
8
- */
9
- export const APP_DEPLOY_ENVIRONMENT_IDS = ['local', 'preview', 'production'];
10
2
  export { isAppDeployManifest } from './appManifest/deploy';
11
3
  //# sourceMappingURL=deploy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.js","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAU,CAAC;AAIxE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,YAAY,CAAU,CAAC;AAwCtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export const APP_DEPLOY_TARGET_IDS = ['web', 'android', 'ios'] as const;\n\nexport type AppDeployTargetId = (typeof APP_DEPLOY_TARGET_IDS)[number];\n\n/**\n * Logical application environments shared across platform-specific planning.\n *\n * `local` maps to local Web, iOS development, and Android debug execution.\n * Environment-specific endpoints, signing material, and credentials are owned\n * by their dedicated deployment/infra configuration rather than this identity contract.\n */\nexport const APP_DEPLOY_ENVIRONMENT_IDS = ['local', 'preview', 'production'] as const;\n\nexport type AppDeployEnvironmentId = (typeof APP_DEPLOY_ENVIRONMENT_IDS)[number];\n\nexport interface AppDeployProviderSelection {\n readonly build?: string;\n readonly publish?: string;\n}\n\nexport interface AppDeployWebTargetConfig {\n readonly enabled: boolean;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface AppDeployAndroidTargetConfig {\n readonly enabled: boolean;\n readonly package: string;\n /** Stable application URI scheme used for target-aware deep links such as OAuth callbacks. */\n readonly scheme?: string;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface AppDeployIosTargetConfig {\n readonly enabled: boolean;\n readonly bundleIdentifier: string;\n /** Stable application URI scheme used for target-aware deep links such as OAuth callbacks. */\n readonly scheme?: string;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface AppDeployTargets {\n readonly web?: AppDeployWebTargetConfig;\n readonly android?: AppDeployAndroidTargetConfig;\n readonly ios?: AppDeployIosTargetConfig;\n}\n\nexport interface AppDeployManifest {\n readonly targets: AppDeployTargets;\n}\n\nexport { isAppDeployManifest } from './appManifest/deploy';\n"]}
1
+ {"version":3,"file":"deploy.js","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAU,CAAC;AAwCxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export const APP_DEPLOY_TARGET_IDS = ['web', 'android', 'ios'] as const;\n\nexport type AppDeployTargetId = (typeof APP_DEPLOY_TARGET_IDS)[number];\n\nexport interface AppDeployProviderSelection {\n readonly build?: string;\n readonly publish?: string;\n}\n\nexport interface AppDeployWebTargetConfig {\n readonly enabled: boolean;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface AppDeployAndroidTargetConfig {\n readonly enabled: boolean;\n readonly package: string;\n /** Stable application URI scheme used for target-aware deep links such as OAuth callbacks. */\n readonly scheme?: string;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface AppDeployIosTargetConfig {\n readonly enabled: boolean;\n readonly bundleIdentifier: string;\n /** Stable application URI scheme used for target-aware deep links such as OAuth callbacks. */\n readonly scheme?: string;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface AppDeployTargets {\n readonly web?: AppDeployWebTargetConfig;\n readonly android?: AppDeployAndroidTargetConfig;\n readonly ios?: AppDeployIosTargetConfig;\n}\n\nexport interface AppDeployManifest {\n readonly targets: AppDeployTargets;\n}\n\nexport { isAppDeployManifest } from './appManifest/deploy';\n"]}
@@ -0,0 +1,4 @@
1
+ /** Logical application environments shared by infrastructure and application shipment. */
2
+ export declare const APP_ENVIRONMENT_IDS: readonly ["local", "preview", "production"];
3
+ export type AppEnvironmentId = (typeof APP_ENVIRONMENT_IDS)[number];
4
+ //# sourceMappingURL=environments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environments.d.ts","sourceRoot":"","sources":["../src/environments.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,eAAO,MAAM,mBAAmB,6CAA8C,CAAC;AAE/E,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Logical application environments shared by infrastructure and application shipment. */
2
+ export const APP_ENVIRONMENT_IDS = ['local', 'preview', 'production'];
3
+ //# sourceMappingURL=environments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environments.js","sourceRoot":"","sources":["../src/environments.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,YAAY,CAAU,CAAC","sourcesContent":["/** Logical application environments shared by infrastructure and application shipment. */\nexport const APP_ENVIRONMENT_IDS = ['local', 'preview', 'production'] as const;\n\nexport type AppEnvironmentId = (typeof APP_ENVIRONMENT_IDS)[number];\n"]}
package/dist/index.d.ts CHANGED
@@ -5,12 +5,13 @@ export * from './cli';
5
5
  export * from './data';
6
6
  export * from './db';
7
7
  export * from './deploy';
8
+ export * from './environments';
9
+ export * from './infra';
8
10
  export * from './media';
9
11
  export * from './navigator';
10
12
  export * from './repository';
11
13
  export * from './requirements';
12
14
  export * from './runtimeCallbacks';
13
- export * from './secretManifest';
14
15
  export * from './secrets';
15
16
  export * from './state';
16
17
  export * from './storage';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC"}
package/dist/index.js CHANGED
@@ -5,12 +5,13 @@ export * from './cli';
5
5
  export * from './data';
6
6
  export * from './db';
7
7
  export * from './deploy';
8
+ export * from './environments';
9
+ export * from './infra';
8
10
  export * from './media';
9
11
  export * from './navigator';
10
12
  export * from './repository';
11
13
  export * from './requirements';
12
14
  export * from './runtimeCallbacks';
13
- export * from './secretManifest';
14
15
  export * from './secrets';
15
16
  export * from './state';
16
17
  export * from './storage';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC","sourcesContent":["export * from './appManifest';\nexport * from './auth';\nexport * from './bindings';\nexport * from './cli';\nexport * from './data';\nexport * from './db';\nexport * from './deploy';\nexport * from './media';\nexport * from './navigator';\nexport * from './repository';\nexport * from './requirements';\nexport * from './runtimeCallbacks';\nexport * from './secretManifest';\nexport * from './secrets';\nexport * from './state';\nexport * from './storage';\nexport * from './theme';\nexport * from './types';\nexport * from './ui';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC","sourcesContent":["export * from './appManifest';\nexport * from './auth';\nexport * from './bindings';\nexport * from './cli';\nexport * from './data';\nexport * from './db';\nexport * from './deploy';\nexport * from './environments';\nexport * from './infra';\nexport * from './media';\nexport * from './navigator';\nexport * from './repository';\nexport * from './requirements';\nexport * from './runtimeCallbacks';\nexport * from './secrets';\nexport * from './state';\nexport * from './storage';\nexport * from './theme';\nexport * from './types';\nexport * from './ui';\n"]}
@@ -0,0 +1,91 @@
1
+ /** One compatibility source for manifest types, validation, discovery and configuration UIs. */
2
+ export declare const INFRA_RUNTIME_COMPATIBILITY: {
3
+ readonly minikube: readonly ["local"];
4
+ readonly k3s: readonly ["local", "hetzner"];
5
+ readonly 'docker-compose': readonly ["local", "hetzner"];
6
+ };
7
+ /** Canonical package identities. Capabilities describe ownership, not eight mandatory methods. */
8
+ export declare const INFRA_ADAPTER_CATALOG: {
9
+ readonly local: {
10
+ readonly id: "local";
11
+ readonly package: "@ankhorage/local";
12
+ readonly kind: "compute";
13
+ readonly configVersion: 1;
14
+ readonly capabilities: readonly ["compute"];
15
+ readonly targets: readonly ["local-host"];
16
+ readonly dependencies: readonly [];
17
+ };
18
+ readonly hetzner: {
19
+ readonly id: "hetzner";
20
+ readonly package: "@ankhorage/hetzner";
21
+ readonly kind: "compute";
22
+ readonly configVersion: 1;
23
+ readonly capabilities: readonly ["compute"];
24
+ readonly targets: readonly ["ssh-host"];
25
+ readonly dependencies: readonly [];
26
+ };
27
+ readonly minikube: {
28
+ readonly id: "minikube";
29
+ readonly package: "@ankhorage/minikube";
30
+ readonly kind: "runtime";
31
+ readonly configVersion: 1;
32
+ readonly capabilities: readonly ["runtime", "workloads", "networking"];
33
+ readonly targets: readonly ["local-host"];
34
+ readonly dependencies: readonly ["compute"];
35
+ };
36
+ readonly k3s: {
37
+ readonly id: "k3s";
38
+ readonly package: "@ankhorage/k3s";
39
+ readonly kind: "runtime";
40
+ readonly configVersion: 1;
41
+ readonly capabilities: readonly ["runtime", "workloads", "networking"];
42
+ readonly targets: readonly ["local-host", "ssh-host"];
43
+ readonly dependencies: readonly ["compute"];
44
+ };
45
+ readonly 'docker-compose': {
46
+ readonly id: "docker-compose";
47
+ readonly package: "@ankhorage/docker-compose";
48
+ readonly kind: "runtime";
49
+ readonly configVersion: 1;
50
+ readonly capabilities: readonly ["runtime", "workloads", "networking"];
51
+ readonly targets: readonly ["local-host", "ssh-host"];
52
+ readonly dependencies: readonly ["compute"];
53
+ };
54
+ readonly supabase: {
55
+ readonly id: "supabase";
56
+ readonly package: "@ankhorage/supabase";
57
+ readonly kind: "service";
58
+ readonly configVersion: 1;
59
+ readonly capabilities: readonly ["database", "auth", "objectStorage"];
60
+ readonly targets: readonly [];
61
+ readonly dependencies: readonly ["workloads"];
62
+ };
63
+ readonly cerbos: {
64
+ readonly id: "cerbos";
65
+ readonly package: "@ankhorage/cerbos";
66
+ readonly kind: "service";
67
+ readonly configVersion: 1;
68
+ readonly capabilities: readonly ["authz"];
69
+ readonly targets: readonly [];
70
+ readonly dependencies: readonly ["workloads"];
71
+ };
72
+ readonly r2: {
73
+ readonly id: "r2";
74
+ readonly package: "@ankhorage/r2";
75
+ readonly kind: "service";
76
+ readonly configVersion: 1;
77
+ readonly capabilities: readonly ["objectStorage"];
78
+ readonly targets: readonly [];
79
+ readonly dependencies: readonly [];
80
+ };
81
+ readonly 'supabase-vault': {
82
+ readonly id: "supabase-vault";
83
+ readonly package: "@ankhorage/supabase-vault";
84
+ readonly kind: "service";
85
+ readonly configVersion: 1;
86
+ readonly capabilities: readonly ["secretStore"];
87
+ readonly targets: readonly [];
88
+ readonly dependencies: readonly ["database"];
89
+ };
90
+ };
91
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/infra/constants.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,eAAO,MAAM,2BAA2B;;;;CAI9B,CAAC;AAEX,kGAAkG;AAClG,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFxB,CAAC"}
@@ -0,0 +1,91 @@
1
+ /** One compatibility source for manifest types, validation, discovery and configuration UIs. */
2
+ export const INFRA_RUNTIME_COMPATIBILITY = {
3
+ minikube: ['local'],
4
+ k3s: ['local', 'hetzner'],
5
+ 'docker-compose': ['local', 'hetzner'],
6
+ };
7
+ /** Canonical package identities. Capabilities describe ownership, not eight mandatory methods. */
8
+ export const INFRA_ADAPTER_CATALOG = {
9
+ local: {
10
+ id: 'local',
11
+ package: '@ankhorage/local',
12
+ kind: 'compute',
13
+ configVersion: 1,
14
+ capabilities: ['compute'],
15
+ targets: ['local-host'],
16
+ dependencies: [],
17
+ },
18
+ hetzner: {
19
+ id: 'hetzner',
20
+ package: '@ankhorage/hetzner',
21
+ kind: 'compute',
22
+ configVersion: 1,
23
+ capabilities: ['compute'],
24
+ targets: ['ssh-host'],
25
+ dependencies: [],
26
+ },
27
+ minikube: {
28
+ id: 'minikube',
29
+ package: '@ankhorage/minikube',
30
+ kind: 'runtime',
31
+ configVersion: 1,
32
+ capabilities: ['runtime', 'workloads', 'networking'],
33
+ targets: ['local-host'],
34
+ dependencies: ['compute'],
35
+ },
36
+ k3s: {
37
+ id: 'k3s',
38
+ package: '@ankhorage/k3s',
39
+ kind: 'runtime',
40
+ configVersion: 1,
41
+ capabilities: ['runtime', 'workloads', 'networking'],
42
+ targets: ['local-host', 'ssh-host'],
43
+ dependencies: ['compute'],
44
+ },
45
+ 'docker-compose': {
46
+ id: 'docker-compose',
47
+ package: '@ankhorage/docker-compose',
48
+ kind: 'runtime',
49
+ configVersion: 1,
50
+ capabilities: ['runtime', 'workloads', 'networking'],
51
+ targets: ['local-host', 'ssh-host'],
52
+ dependencies: ['compute'],
53
+ },
54
+ supabase: {
55
+ id: 'supabase',
56
+ package: '@ankhorage/supabase',
57
+ kind: 'service',
58
+ configVersion: 1,
59
+ capabilities: ['database', 'auth', 'objectStorage'],
60
+ targets: [],
61
+ dependencies: ['workloads'],
62
+ },
63
+ cerbos: {
64
+ id: 'cerbos',
65
+ package: '@ankhorage/cerbos',
66
+ kind: 'service',
67
+ configVersion: 1,
68
+ capabilities: ['authz'],
69
+ targets: [],
70
+ dependencies: ['workloads'],
71
+ },
72
+ r2: {
73
+ id: 'r2',
74
+ package: '@ankhorage/r2',
75
+ kind: 'service',
76
+ configVersion: 1,
77
+ capabilities: ['objectStorage'],
78
+ targets: [],
79
+ dependencies: [],
80
+ },
81
+ 'supabase-vault': {
82
+ id: 'supabase-vault',
83
+ package: '@ankhorage/supabase-vault',
84
+ kind: 'service',
85
+ configVersion: 1,
86
+ capabilities: ['secretStore'],
87
+ targets: [],
88
+ dependencies: ['database'],
89
+ },
90
+ };
91
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/infra/constants.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,GAAG,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;IACzB,gBAAgB,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;CAC9B,CAAC;AAEX,kGAAkG;AAClG,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,OAAO,EAAE,kBAAkB;QAC3B,IAAI,EAAE,SAAS;QACf,aAAa,EAAE,CAAC;QAChB,YAAY,EAAE,CAAC,SAAS,CAAC;QACzB,OAAO,EA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nD,OAAO,EAAE,EAAE;QACX,YAAY,EAAE,CAAC,WAAW,CAAC;KAC5B;IACD,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,OAAO,EAAE,mBAAmB;QAC5B,IAAI,EAAE,SAAS;QACf,aAAa,EAAE,CAAC;QAChB,YAAY,EAAE,CAAC,OAAO,CAAC;QACvB,OAAO,EAAE,EAAE;QACX,YAAY,EAAE,CAAC,WAAW,CAAC;KAC5B;IACD,EAAE,EAAE;QACF,EAAE,EAAE,IAAI;QACR,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,SAAS;QACf,aAAa,EAAE,CAAC;QAChB,YAAY,EAAE,CAAC,eAAe,CAAC;QAC/B,OAAO,EAAE,EAAE;QACX,YAAY,EAAE,EAAE;KACjB;IACD,gBAAgB,EAAE;QAChB,EAAE,EAAE,gBAAgB;QACpB,OAAO,EAAE,2BAA2B;QACpC,IAAI,EAAE,SAAS;QACf,aAAa,EAAE,CAAC;QAChB,YAAY,EAAE,CAAC,aAAa,CAAC;QAC7B,OAAO,EAAE,EAAE;QACX,YAAY,EAAE,CAAC,UAAU,CAAC;KAC3B;CACO,CAAC","sourcesContent":["/** One compatibility source for manifest types, validation, discovery and configuration UIs. */\nexport const INFRA_RUNTIME_COMPATIBILITY = {\n minikube: ['local'],\n k3s: ['local', 'hetzner'],\n 'docker-compose': ['local', 'hetzner'],\n} as const;\n\n/** Canonical package identities. Capabilities describe ownership, not eight mandatory methods. */\nexport const INFRA_ADAPTER_CATALOG = {\n local: {\n id: 'local',\n package: '@ankhorage/local',\n kind: 'compute',\n configVersion: 1,\n capabilities: ['compute'],\n targets: ['local-host'],\n dependencies: [],\n },\n hetzner: {\n id: 'hetzner',\n package: '@ankhorage/hetzner',\n kind: 'compute',\n configVersion: 1,\n capabilities: ['compute'],\n targets: ['ssh-host'],\n dependencies: [],\n },\n minikube: {\n id: 'minikube',\n package: '@ankhorage/minikube',\n kind: 'runtime',\n configVersion: 1,\n capabilities: ['runtime', 'workloads', 'networking'],\n targets: ['local-host'],\n dependencies: ['compute'],\n },\n k3s: {\n id: 'k3s',\n package: '@ankhorage/k3s',\n kind: 'runtime',\n configVersion: 1,\n capabilities: ['runtime', 'workloads', 'networking'],\n targets: ['local-host', 'ssh-host'],\n dependencies: ['compute'],\n },\n 'docker-compose': {\n id: 'docker-compose',\n package: '@ankhorage/docker-compose',\n kind: 'runtime',\n configVersion: 1,\n capabilities: ['runtime', 'workloads', 'networking'],\n targets: ['local-host', 'ssh-host'],\n dependencies: ['compute'],\n },\n supabase: {\n id: 'supabase',\n package: '@ankhorage/supabase',\n kind: 'service',\n configVersion: 1,\n capabilities: ['database', 'auth', 'objectStorage'],\n targets: [],\n dependencies: ['workloads'],\n },\n cerbos: {\n id: 'cerbos',\n package: '@ankhorage/cerbos',\n kind: 'service',\n configVersion: 1,\n capabilities: ['authz'],\n targets: [],\n dependencies: ['workloads'],\n },\n r2: {\n id: 'r2',\n package: '@ankhorage/r2',\n kind: 'service',\n configVersion: 1,\n capabilities: ['objectStorage'],\n targets: [],\n dependencies: [],\n },\n 'supabase-vault': {\n id: 'supabase-vault',\n package: '@ankhorage/supabase-vault',\n kind: 'service',\n configVersion: 1,\n capabilities: ['secretStore'],\n targets: [],\n dependencies: ['database'],\n },\n} as const;\n"]}
@@ -0,0 +1,12 @@
1
+ /*** Primitive field rules for portable Infra configuration, shared by its exact-shape validators. */
2
+ export declare const infraFields: {
3
+ optionalText: (value: unknown) => boolean;
4
+ strings: (value: unknown) => boolean;
5
+ optionalStrings: (value: unknown) => boolean;
6
+ positiveInteger: (value: unknown) => boolean;
7
+ nonnegativeInteger: (value: unknown) => boolean;
8
+ optionalPositiveInteger: (value: unknown) => boolean;
9
+ optionalNonnegativeInteger: (value: unknown) => boolean;
10
+ port: (value: unknown) => boolean;
11
+ };
12
+ //# sourceMappingURL=infraFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infraFields.d.ts","sourceRoot":"","sources":["../../src/infra/infraFields.ts"],"names":[],"mappings":"AAGA,qGAAqG;AACrG,eAAO,MAAM,WAAW;0BACA,OAAO,KAAG,OAAO;qBACtB,OAAO,KAAG,OAAO;6BACT,OAAO,KAAG,OAAO;6BAEjB,OAAO,KAAG,OAAO;gCAEd,OAAO,KAAG,OAAO;qCAEZ,OAAO,KAAG,OAAO;wCAEd,OAAO,KAAG,OAAO;kBAEvC,OAAO,KAAG,OAAO;CAEhC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { isStringArray } from '@ankhorage/utility/array';
2
+ import { isNonEmptyString } from '@ankhorage/utility/string';
3
+ /*** Primitive field rules for portable Infra configuration, shared by its exact-shape validators. */
4
+ export const infraFields = {
5
+ optionalText: (value) => value === undefined || isNonEmptyString(value),
6
+ strings: (value) => isStringArray(value) && value.every(isNonEmptyString),
7
+ optionalStrings: (value) => value === undefined || (isStringArray(value) && value.every(isNonEmptyString)),
8
+ positiveInteger: (value) => typeof value === 'number' && Number.isSafeInteger(value) && value > 0,
9
+ nonnegativeInteger: (value) => typeof value === 'number' && Number.isSafeInteger(value) && value >= 0,
10
+ optionalPositiveInteger: (value) => value === undefined || (typeof value === 'number' && Number.isSafeInteger(value) && value > 0),
11
+ optionalNonnegativeInteger: (value) => value === undefined || (typeof value === 'number' && Number.isSafeInteger(value) && value >= 0),
12
+ port: (value) => typeof value === 'number' && Number.isInteger(value) && value > 0 && value <= 65535,
13
+ };
14
+ //# sourceMappingURL=infraFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infraFields.js","sourceRoot":"","sources":["../../src/infra/infraFields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,qGAAqG;AACrG,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,YAAY,EAAE,CAAC,KAAc,EAAW,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,gBAAgB,CAAC,KAAK,CAAC;IACzF,OAAO,EAAE,CAAC,KAAc,EAAW,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC;IAC3F,eAAe,EAAE,CAAC,KAAc,EAAW,EAAE,CAC3C,KAAK,KAAK,SAAS,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAChF,eAAe,EAAE,CAAC,KAAc,EAAW,EAAE,CAC3C,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC;IACvE,kBAAkB,EAAE,CAAC,KAAc,EAAW,EAAE,CAC9C,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC;IACxE,uBAAuB,EAAE,CAAC,KAAc,EAAW,EAAE,CACnD,KAAK,KAAK,SAAS,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;IAChG,0BAA0B,EAAE,CAAC,KAAc,EAAW,EAAE,CACtD,KAAK,KAAK,SAAS,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IACjG,IAAI,EAAE,CAAC,KAAc,EAAW,EAAE,CAChC,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,KAAK;CACtF,CAAC","sourcesContent":["import { isStringArray } from '@ankhorage/utility/array';\nimport { isNonEmptyString } from '@ankhorage/utility/string';\n\n/*** Primitive field rules for portable Infra configuration, shared by its exact-shape validators. */\nexport const infraFields = {\n optionalText: (value: unknown): boolean => value === undefined || isNonEmptyString(value),\n strings: (value: unknown): boolean => isStringArray(value) && value.every(isNonEmptyString),\n optionalStrings: (value: unknown): boolean =>\n value === undefined || (isStringArray(value) && value.every(isNonEmptyString)),\n positiveInteger: (value: unknown): boolean =>\n typeof value === 'number' && Number.isSafeInteger(value) && value > 0,\n nonnegativeInteger: (value: unknown): boolean =>\n typeof value === 'number' && Number.isSafeInteger(value) && value >= 0,\n optionalPositiveInteger: (value: unknown): boolean =>\n value === undefined || (typeof value === 'number' && Number.isSafeInteger(value) && value > 0),\n optionalNonnegativeInteger: (value: unknown): boolean =>\n value === undefined || (typeof value === 'number' && Number.isSafeInteger(value) && value >= 0),\n port: (value: unknown): boolean =>\n typeof value === 'number' && Number.isInteger(value) && value > 0 && value <= 65535,\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import type { InfraAdapterDescriptor } from '../types/infraAdapters';
2
+ /*** Installed adapters must match the canonical identity, capabilities, targets and config version exactly. */
3
+ export declare function isInfraAdapterDescriptor(value: unknown): value is InfraAdapterDescriptor;
4
+ //# sourceMappingURL=isInfraAdapterDescriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isInfraAdapterDescriptor.d.ts","sourceRoot":"","sources":["../../src/infra/isInfraAdapterDescriptor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIrE,+GAA+G;AAC/G,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,sBAAsB,CAoBxF"}
@@ -0,0 +1,31 @@
1
+ import { isRecord } from '@ankhorage/utility/object';
2
+ import { INFRA_ADAPTER_CATALOG } from './constants';
3
+ import { isInfraShape } from './isInfraShape';
4
+ /*** Installed adapters must match the canonical identity, capabilities, targets and config version exactly. */
5
+ export function isInfraAdapterDescriptor(value) {
6
+ if (!isRecord(value))
7
+ return false;
8
+ const entry = Object.values(INFRA_ADAPTER_CATALOG).find((candidate) => candidate.id === value.id);
9
+ if (!entry)
10
+ return false;
11
+ return isInfraShape(value, {
12
+ id: (id) => id === entry.id,
13
+ package: (name) => name === entry.package,
14
+ kind: (kind) => kind === entry.kind,
15
+ configVersion: (version) => version === entry.configVersion,
16
+ capabilities: (items) => matchesCatalogList(items, entry.capabilities),
17
+ targets: (items) => matchesCatalogList(items, entry.targets),
18
+ dependencies: (items) => matchesCatalogList(items, entry.dependencies),
19
+ operations: (items) => items === undefined ||
20
+ (Array.isArray(items) &&
21
+ new Set(items).size === items.length &&
22
+ items.every((item) => ['suspend', 'resume', 'generate', 'diagnostics'].some((operation) => operation === item))),
23
+ });
24
+ }
25
+ /*** Canonical descriptor lists are ordered so JSON discovery and conformance are deterministic. */
26
+ function matchesCatalogList(value, expected) {
27
+ return (Array.isArray(value) &&
28
+ value.length === expected.length &&
29
+ value.every((item, index) => item === expected.at(index)));
30
+ }
31
+ //# sourceMappingURL=isInfraAdapterDescriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isInfraAdapterDescriptor.js","sourceRoot":"","sources":["../../src/infra/isInfraAdapterDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAGrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,+GAA+G;AAC/G,MAAM,UAAU,wBAAwB,CAAC,KAAc;IACrD,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACnC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,CAAC,CAAC;IAClG,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,OAAO,YAAY,CAAC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C,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,KAAK,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAC1D,CAAC;AACJ,CAAC","sourcesContent":["import { isRecord } from '@ankhorage/utility/object';\n\nimport type { InfraAdapterDescriptor } from '../types/infraAdapters';\nimport { INFRA_ADAPTER_CATALOG } from './constants';\nimport { isInfraShape } from './isInfraShape';\n\n/*** Installed adapters must match the canonical identity, capabilities, targets and config version exactly. */\nexport function isInfraAdapterDescriptor(value: unknown): value is InfraAdapterDescriptor {\n if (!isRecord(value)) return false;\n const entry = Object.values(INFRA_ADAPTER_CATALOG).find((candidate) => candidate.id === value.id);\n if (!entry) return false;\n return isInfraShape(value, {\n id: (id) => id === entry.id,\n package: (name) => name === entry.package,\n kind: (kind) => kind === entry.kind,\n configVersion: (version) => version === entry.configVersion,\n capabilities: (items) => matchesCatalogList(items, entry.capabilities),\n targets: (items) => matchesCatalogList(items, entry.targets),\n dependencies: (items) => matchesCatalogList(items, entry.dependencies),\n operations: (items) =>\n items === undefined ||\n (Array.isArray(items) &&\n new Set(items).size === items.length &&\n items.every((item: unknown) =>\n ['suspend', 'resume', 'generate', 'diagnostics'].some((operation) => operation === item),\n )),\n });\n}\n\n/*** Canonical descriptor lists are ordered so JSON discovery and conformance are deterministic. */\nfunction matchesCatalogList(value: unknown, expected: readonly string[]): boolean {\n return (\n Array.isArray(value) &&\n value.length === expected.length &&\n value.every((item, index) => item === expected.at(index))\n );\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { InfraAuthSpec } from '../types/infraManifest';
2
+ /*** Preserve application auth configuration while rejecting nested authorization and unknown providers. */
3
+ export declare function isInfraAuthSpec(value: unknown): value is InfraAuthSpec;
4
+ //# sourceMappingURL=isInfraAuthSpec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isInfraAuthSpec.d.ts","sourceRoot":"","sources":["../../src/infra/isInfraAuthSpec.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAI5D,2GAA2G;AAC3G,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAgBtE"}
@@ -0,0 +1,75 @@
1
+ import { isStringArray } from '@ankhorage/utility/array';
2
+ import { isRecordOf } from '@ankhorage/utility/object';
3
+ import { isOptionalString } from '@ankhorage/utility/string';
4
+ import { isIconSpec } from '../appManifest/icon';
5
+ import { AUTH_OAUTH_PROVIDER_IDS } from '../auth';
6
+ import { AUTH_PROFILE_CREATE_STRATEGIES, AUTH_PROFILE_PRIMARY_KEY_STRATEGIES, AUTH_PROFILE_UPDATE_STRATEGIES, AUTH_SCOPES, AUTH_SIGN_IN_IDENTIFIERS, AUTH_SIGN_UP_POLICIES, } from '../types';
7
+ import { isInfraShape } from './isInfraShape';
8
+ /*** Preserve application auth configuration while rejecting nested authorization and unknown providers. */
9
+ export function isInfraAuthSpec(value) {
10
+ return isInfraShape(value, {
11
+ provider: (provider) => provider === 'supabase',
12
+ scope: (scope) => scope === undefined || AUTH_SCOPES.some((item) => item === scope),
13
+ flow: (flow) => flow === undefined || isAuthFlow(flow),
14
+ signIn: (signIn) => signIn === undefined ||
15
+ isInfraShape(signIn, {
16
+ identifiers: (ids) => Array.isArray(ids) &&
17
+ ids.every((id) => AUTH_SIGN_IN_IDENTIFIERS.some((item) => item === id)),
18
+ }),
19
+ signUp: (signUp) => signUp === undefined || isAuthSignUp(signUp),
20
+ oauth: (oauth) => oauth === undefined || isAuthOAuth(oauth),
21
+ profile: (profile) => profile === undefined || isAuthProfile(profile),
22
+ });
23
+ }
24
+ /*** Auth routing intent stays separate from provider-runtime callbacks and Navigator topology. */
25
+ function isAuthFlow(value) {
26
+ return isInfraShape(value, {
27
+ signInRoute: (route) => typeof route === 'string',
28
+ postSignInRoute: (route) => typeof route === 'string',
29
+ signUpRoute: isOptionalString,
30
+ signOutRoute: isOptionalString,
31
+ forgotPasswordRoute: isOptionalString,
32
+ otpRoute: isOptionalString,
33
+ unauthorizedRoute: isOptionalString,
34
+ });
35
+ }
36
+ /*** Validate sign-up field intent using the existing application auth contract. */
37
+ function isAuthSignUp(value) {
38
+ return isInfraShape(value, {
39
+ requiredFields: isStringArray,
40
+ optionalFields: (fields) => fields === undefined || isStringArray(fields),
41
+ signUpPolicy: (policy) => policy === undefined || AUTH_SIGN_UP_POLICIES.some((item) => item === policy),
42
+ });
43
+ }
44
+ /*** OAuth references contain no credential payload. Custom OAuth identities remain application-owned. */
45
+ function isAuthOAuth(value) {
46
+ return isInfraShape(value, {
47
+ enabled: (enabled) => typeof enabled === 'boolean',
48
+ callbackRoute: (route) => typeof route === 'string',
49
+ providers: (providers) => Array.isArray(providers) && providers.every(isAuthOAuthProvider),
50
+ });
51
+ }
52
+ /*** Validate OAuth display/config metadata, preserving explicitly extensible OAuth provider IDs. */
53
+ function isAuthOAuthProvider(value) {
54
+ return isInfraShape(value, {
55
+ id: (id) => typeof id === 'string' &&
56
+ (AUTH_OAUTH_PROVIDER_IDS.some((item) => item === id) || id.length > 0),
57
+ label: isOptionalString,
58
+ enabled: (value) => value === undefined || typeof value === 'boolean',
59
+ scopes: (scopes) => scopes === undefined || isStringArray(scopes),
60
+ queryParams: (params) => params === undefined || isRecordOf(params, (entry) => typeof entry === 'string'),
61
+ icon: (icon) => icon === undefined || isIconSpec(icon),
62
+ credentialsRef: isOptionalString,
63
+ });
64
+ }
65
+ /*** Validate profile provisioning choices without inventing a new application profile model. */
66
+ function isAuthProfile(value) {
67
+ return isInfraShape(value, {
68
+ fields: isStringArray,
69
+ table: isOptionalString,
70
+ primaryKey: (key) => key === undefined || AUTH_PROFILE_PRIMARY_KEY_STRATEGIES.some((item) => item === key),
71
+ createStrategy: (strategy) => strategy === undefined || AUTH_PROFILE_CREATE_STRATEGIES.some((item) => item === strategy),
72
+ updateStrategy: (strategy) => strategy === undefined || AUTH_PROFILE_UPDATE_STRATEGIES.some((item) => item === strategy),
73
+ });
74
+ }
75
+ //# sourceMappingURL=isInfraAuthSpec.js.map