@ankhorage/contracts 26.2.0 → 26.2.2
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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/appManifest/bindings.js +1 -1
- package/dist/appManifest/bindings.js.map +1 -1
- package/dist/appManifest/constants.js.map +1 -1
- package/dist/appManifest/dataSources.js +2 -2
- package/dist/appManifest/dataSources.js.map +1 -1
- package/dist/appManifest/isAppManifest.d.ts +1 -1
- package/dist/appManifest/isAppManifest.d.ts.map +1 -1
- package/dist/appManifest/isAppManifest.js +8 -8
- package/dist/appManifest/isAppManifest.js.map +1 -1
- package/dist/appManifest/isAppStateSpec.d.ts +1 -1
- package/dist/appManifest/isAppStateSpec.d.ts.map +1 -1
- package/dist/appManifest/isAppStateSpec.js.map +1 -1
- package/dist/appManifest/isManifestValue.js +1 -1
- package/dist/appManifest/isManifestValue.js.map +1 -1
- package/dist/appManifest/media.d.ts +1 -1
- package/dist/appManifest/media.d.ts.map +1 -1
- package/dist/appManifest/media.js +1 -1
- package/dist/appManifest/media.js.map +1 -1
- package/dist/appManifest/navigator.d.ts +1 -1
- package/dist/appManifest/navigator.d.ts.map +1 -1
- package/dist/appManifest/navigator.js +3 -3
- package/dist/appManifest/navigator.js.map +1 -1
- package/dist/appManifest/navigatorOptions.js +1 -1
- package/dist/appManifest/navigatorOptions.js.map +1 -1
- package/dist/appManifest/parseAppManifest.d.ts +1 -1
- package/dist/appManifest/parseAppManifest.d.ts.map +1 -1
- package/dist/appManifest/parseAppManifest.js +1 -1
- package/dist/appManifest/parseAppManifest.js.map +1 -1
- package/dist/appManifest/screens.d.ts +2 -2
- package/dist/appManifest/screens.d.ts.map +1 -1
- package/dist/appManifest/screens.js +6 -6
- package/dist/appManifest/screens.js.map +1 -1
- package/dist/appManifest.d.ts +4 -4
- package/dist/appManifest.d.ts.map +1 -1
- package/dist/appManifest.js +2 -2
- package/dist/appManifest.js.map +1 -1
- package/dist/auth.d.ts +5 -5
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js.map +1 -1
- package/dist/bindings.d.ts +3 -3
- package/dist/bindings.d.ts.map +1 -1
- package/dist/bindings.js.map +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/data/apis.d.ts +6 -6
- package/dist/data/apis.d.ts.map +1 -1
- package/dist/data/apis.js.map +1 -1
- package/dist/data/diagnostics.d.ts +1 -1
- package/dist/data/diagnostics.d.ts.map +1 -1
- package/dist/data/diagnostics.js.map +1 -1
- package/dist/data/endpoints.d.ts +5 -5
- package/dist/data/endpoints.d.ts.map +1 -1
- package/dist/data/endpoints.js.map +1 -1
- package/dist/data/index.d.ts +10 -10
- package/dist/data/index.d.ts.map +1 -1
- package/dist/data/index.js +10 -10
- package/dist/data/index.js.map +1 -1
- package/dist/data/isApiDefinitionRegistry.d.ts +1 -1
- package/dist/data/isApiDefinitionRegistry.d.ts.map +1 -1
- package/dist/data/isApiDefinitionRegistry.js +2 -2
- package/dist/data/isApiDefinitionRegistry.js.map +1 -1
- package/dist/data/operations.d.ts +5 -5
- package/dist/data/operations.d.ts.map +1 -1
- package/dist/data/operations.js.map +1 -1
- package/dist/data/refs.d.ts +2 -2
- package/dist/data/refs.d.ts.map +1 -1
- package/dist/data/refs.js.map +1 -1
- package/dist/data/schemas.d.ts +3 -3
- package/dist/data/schemas.d.ts.map +1 -1
- package/dist/data/schemas.js.map +1 -1
- package/dist/data/sources.d.ts +6 -6
- package/dist/data/sources.d.ts.map +1 -1
- package/dist/data/sources.js.map +1 -1
- package/dist/data/values.d.ts +1 -1
- package/dist/data/values.d.ts.map +1 -1
- package/dist/data/values.js.map +1 -1
- package/dist/icon.js +1 -1
- package/dist/icon.js.map +1 -1
- package/dist/index.d.ts +24 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -24
- package/dist/index.js.map +1 -1
- package/dist/infra/isInfraAdapterDescriptor.d.ts +1 -1
- package/dist/infra/isInfraAdapterDescriptor.d.ts.map +1 -1
- package/dist/infra/isInfraAdapterDescriptor.js +2 -2
- package/dist/infra/isInfraAdapterDescriptor.js.map +1 -1
- package/dist/infra/isInfraAuthSpec.d.ts +1 -1
- package/dist/infra/isInfraAuthSpec.d.ts.map +1 -1
- package/dist/infra/isInfraAuthSpec.js +4 -4
- package/dist/infra/isInfraAuthSpec.js.map +1 -1
- package/dist/infra/isInfraCredentialRef.js +1 -1
- package/dist/infra/isInfraCredentialRef.js.map +1 -1
- package/dist/infra/isInfraDeploymentSpec.d.ts +1 -1
- package/dist/infra/isInfraDeploymentSpec.d.ts.map +1 -1
- package/dist/infra/isInfraDeploymentSpec.js +4 -4
- package/dist/infra/isInfraDeploymentSpec.js.map +1 -1
- package/dist/infra/isInfraEnvironmentSpec.d.ts +1 -1
- package/dist/infra/isInfraEnvironmentSpec.d.ts.map +1 -1
- package/dist/infra/isInfraEnvironmentSpec.js +8 -8
- package/dist/infra/isInfraEnvironmentSpec.js.map +1 -1
- package/dist/infra/isInfraManifest.d.ts +1 -1
- package/dist/infra/isInfraManifest.d.ts.map +1 -1
- package/dist/infra/isInfraManifest.js +5 -5
- package/dist/infra/isInfraManifest.js.map +1 -1
- package/dist/infra/isInfraWorkloadHealth.js +2 -2
- package/dist/infra/isInfraWorkloadHealth.js.map +1 -1
- package/dist/infra/isInfraWorkloadSpec.d.ts +1 -1
- package/dist/infra/isInfraWorkloadSpec.d.ts.map +1 -1
- package/dist/infra/isInfraWorkloadSpec.js +5 -5
- package/dist/infra/isInfraWorkloadSpec.js.map +1 -1
- package/dist/infra/isInfraWorkloadValue.js +3 -3
- package/dist/infra/isInfraWorkloadValue.js.map +1 -1
- package/dist/infra/parseInfraManifest.d.ts +2 -2
- package/dist/infra/parseInfraManifest.d.ts.map +1 -1
- package/dist/infra/parseInfraManifest.js +1 -1
- package/dist/infra/parseInfraManifest.js.map +1 -1
- package/dist/infra/validateInfraAdapterSelection.d.ts +3 -3
- package/dist/infra/validateInfraAdapterSelection.d.ts.map +1 -1
- package/dist/infra/validateInfraAdapterSelection.js +2 -2
- package/dist/infra/validateInfraAdapterSelection.js.map +1 -1
- package/dist/infra.d.ts +15 -15
- package/dist/infra.d.ts.map +1 -1
- package/dist/infra.js +9 -9
- package/dist/infra.js.map +1 -1
- package/dist/infraCatalog.d.ts +8 -8
- package/dist/infraCatalog.js +8 -8
- package/dist/infraCatalog.js.map +1 -1
- package/dist/media.d.ts +1 -1
- package/dist/media.d.ts.map +1 -1
- package/dist/media.js.map +1 -1
- package/dist/navigator/catalog.d.ts +3 -3
- package/dist/navigator/catalog.d.ts.map +1 -1
- package/dist/navigator/catalog.js.map +1 -1
- package/dist/navigator/extensions.d.ts +2 -2
- package/dist/navigator/extensions.d.ts.map +1 -1
- package/dist/navigator/extensions.js.map +1 -1
- package/dist/navigator/generation.d.ts +1 -1
- package/dist/navigator/generation.d.ts.map +1 -1
- package/dist/navigator/generation.js.map +1 -1
- package/dist/navigator/planning.d.ts +3 -3
- package/dist/navigator/planning.d.ts.map +1 -1
- package/dist/navigator/planning.js.map +1 -1
- package/dist/navigator.d.ts +7 -7
- package/dist/navigator.d.ts.map +1 -1
- package/dist/navigator.js +1 -1
- package/dist/navigator.js.map +1 -1
- package/dist/requirements.d.ts +1 -1
- package/dist/requirements.d.ts.map +1 -1
- package/dist/requirements.js.map +1 -1
- package/dist/runtimeCallbacks.d.ts +1 -1
- package/dist/runtimeCallbacks.d.ts.map +1 -1
- package/dist/runtimeCallbacks.js.map +1 -1
- package/dist/state.d.ts +1 -1
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js.map +1 -1
- package/dist/structure/generated.d.ts +2 -2
- package/dist/structure/generated.js +2 -2
- package/dist/structure/generated.js.map +1 -1
- package/dist/structure/index.d.ts +1 -1
- package/dist/structure/index.d.ts.map +1 -1
- package/dist/structure/index.js.map +1 -1
- package/dist/structure/isStructureDescriptor.d.ts +1 -1
- package/dist/structure/isStructureDescriptor.d.ts.map +1 -1
- package/dist/structure/isStructureDescriptor.js.map +1 -1
- package/dist/structure/types.d.ts +1 -1
- package/dist/structure/types.d.ts.map +1 -1
- package/dist/structure/types.js.map +1 -1
- package/dist/theme.d.ts +1 -1
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js.map +1 -1
- package/dist/types/appManifest.d.ts +1 -1
- package/dist/types/appManifest.d.ts.map +1 -1
- package/dist/types/appManifest.js.map +1 -1
- package/dist/types/infraAdapters.d.ts +7 -7
- package/dist/types/infraAdapters.d.ts.map +1 -1
- package/dist/types/infraAdapters.js.map +1 -1
- package/dist/types/infraLifecycle.d.ts +4 -4
- package/dist/types/infraLifecycle.d.ts.map +1 -1
- package/dist/types/infraLifecycle.js.map +1 -1
- package/dist/types/infraManifest.d.ts +8 -8
- package/dist/types/infraManifest.d.ts.map +1 -1
- package/dist/types/infraManifest.js.map +1 -1
- package/dist/types/infraSecrets.d.ts +1 -1
- package/dist/types/infraSecrets.d.ts.map +1 -1
- package/dist/types/infraSecrets.js.map +1 -1
- package/dist/types/infraTargets.d.ts +1 -1
- package/dist/types/infraTargets.d.ts.map +1 -1
- package/dist/types/infraTargets.js.map +1 -1
- package/dist/types/infraWorkload.d.ts +2 -2
- package/dist/types/infraWorkload.d.ts.map +1 -1
- package/dist/types/infraWorkload.js.map +1 -1
- package/dist/types.d.ts +13 -13
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/ui.d.ts +2 -2
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js.map +1 -1
- package/package.json +4 -4
- package/src/appManifest/bindings.ts +1 -1
- package/src/appManifest/constants.ts +1 -1
- package/src/appManifest/dataSources.ts +2 -2
- package/src/appManifest/isAppManifest.ts +9 -9
- package/src/appManifest/isAppStateSpec.ts +1 -1
- package/src/appManifest/isManifestValue.ts +1 -1
- package/src/appManifest/media.ts +1 -1
- package/src/appManifest/navigator.ts +3 -3
- package/src/appManifest/navigatorOptions.ts +1 -1
- package/src/appManifest/parseAppManifest.ts +2 -2
- package/src/appManifest/screens.ts +6 -6
- package/src/appManifest.ts +4 -4
- package/src/auth.ts +6 -6
- package/src/bindings.ts +3 -3
- package/src/cli/index.ts +1 -1
- package/src/data/apis.ts +6 -6
- package/src/data/diagnostics.ts +1 -1
- package/src/data/endpoints.ts +5 -5
- package/src/data/index.ts +10 -10
- package/src/data/isApiDefinitionRegistry.ts +3 -3
- package/src/data/operations.ts +5 -5
- package/src/data/refs.ts +2 -2
- package/src/data/schemas.ts +3 -3
- package/src/data/sources.ts +6 -6
- package/src/data/values.ts +1 -1
- package/src/icon.ts +1 -1
- package/src/index.ts +24 -24
- package/src/infra/isInfraAdapterDescriptor.ts +3 -3
- package/src/infra/isInfraAuthSpec.ts +6 -6
- package/src/infra/isInfraCredentialRef.ts +1 -1
- package/src/infra/isInfraDeploymentSpec.ts +6 -6
- package/src/infra/isInfraEnvironmentSpec.ts +10 -10
- package/src/infra/isInfraManifest.ts +7 -7
- package/src/infra/isInfraWorkloadHealth.ts +2 -2
- package/src/infra/isInfraWorkloadSpec.ts +7 -7
- package/src/infra/isInfraWorkloadValue.ts +4 -4
- package/src/infra/parseInfraManifest.ts +3 -3
- package/src/infra/validateInfraAdapterSelection.ts +5 -5
- package/src/infra.test.ts +1 -1
- package/src/infra.ts +15 -15
- package/src/infraCatalog.ts +8 -8
- package/src/infraPackedConsumer.test.ts +102 -0
- package/src/media.ts +1 -1
- package/src/navigator/catalog.ts +3 -3
- package/src/navigator/extensions.ts +2 -2
- package/src/navigator/generation.ts +1 -1
- package/src/navigator/planning.ts +3 -3
- package/src/navigator.ts +7 -7
- package/src/requirements.ts +1 -1
- package/src/runtimeCallbacks.ts +1 -1
- package/src/state.ts +1 -1
- package/src/structure/generated.ts +2 -2
- package/src/structure/index.ts +1 -1
- package/src/structure/isStructureDescriptor.ts +1 -1
- package/src/structure/types.ts +1 -1
- package/src/theme.ts +1 -1
- package/src/types/appManifest.ts +1 -1
- package/src/types/infraAdapters.ts +7 -7
- package/src/types/infraLifecycle.ts +4 -4
- package/src/types/infraManifest.ts +8 -8
- package/src/types/infraSecrets.ts +1 -1
- package/src/types/infraTargets.ts +1 -1
- package/src/types/infraWorkload.ts +2 -2
- package/src/types.ts +13 -13
- package/src/ui.ts +2 -2
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAgFA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,eAAe;IACf,uBAAuB;IACvB,iBAAiB;IACjB,oBAAoB;IACpB,qBAAqB;IACrB,eAAe;IACf,YAAY;IACZ,OAAO;IACP,iBAAiB;IACjB,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,SAAS;IACT,aAAa;IACb,mBAAmB;IACnB,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,mBAAmB;IACnB,kBAAkB;IAClB,QAAQ;IACR,iBAAiB;IACjB,SAAS;CACD,CAAC;AAGX,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAU,CAAC;AAGrE,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAU,CAAC;AAGhF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,YAAY,EAAE,qBAAqB,CAAU,CAAC;AAGpF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,wBAAwB;IAC3B,WAAW;IACX,UAAU;IACV,aAAa;IACb,WAAW;CACH,CAAC;AAIX,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,YAAY,CAAU,CAAC;AAG3E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC;AAGjF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,KAAK,EAAE,KAAK,CAAU,CAAC","sourcesContent":["import type { ColorHarmony } from '@ankhorage/color-theory';\n\nimport type { AuthIdentifierKind, AuthSignUpField } from './auth';\nimport type {\n BindingExpression,\n ComponentDataBindingRegistry,\n ScreenDataLoaderDefinition,\n} from './bindings';\nimport type { EntityRegistry } from './collections';\nimport type { DataSourceRegistry } from './data';\nimport type { AppDeployManifest } from './deploy';\nimport type { InfraManifest } from './infra';\nimport type { MediaAssetReference, MediaManifest } from './media';\nimport type { AppNavigatorManifest } from './navigator';\nimport type { RepositoryManifest } from './repository';\nimport type { ScreenRequirements } from './requirements';\nimport type { SerializableValue } from './serializable';\nimport type { AppStateSpec } from './state';\nimport type { ThemeGlobalTokenOverrides, ThemeRecipeOverrides } from './theme';\n\nexport interface ThemeModeConfig {\n primaryColor: string;\n harmony: ColorHarmony;\n}\n\nexport type ThemeId = string;\n\nexport interface ThemeConfig {\n id: ThemeId;\n name: string;\n light: ThemeModeConfig;\n dark: ThemeModeConfig;\n /** Theme-global authored token overrides shared by light and dark mode. */\n tokens?: ThemeGlobalTokenOverrides;\n /** Component/pattern recipe override values; recipe schemas remain package-owned metadata. */\n recipes?: ThemeRecipeOverrides;\n}\n\nexport type ThemeRegistry = EntityRegistry<ThemeId, ThemeConfig, 'id'>;\n\nexport type ManifestValue = SerializableValue;\n\nexport type ComponentEventPayloadValue = ManifestValue;\n\nexport interface ComponentEventDto<\n TType extends string = string,\n TPayload extends object = Record<string, ComponentEventPayloadValue>,\n> {\n readonly type: TType;\n readonly sourceNodeId: string;\n readonly payload: TPayload;\n}\n\nexport type FormSubmitValues = Record<string, ComponentEventPayloadValue>;\n\nexport type FormSubmitEventDto = ComponentEventDto<\n 'form.submit',\n {\n readonly values: FormSubmitValues;\n }\n>;\n\nexport type ButtonPressEventDto = ComponentEventDto<'button.press', Record<string, never>>;\n\nexport interface CollectionItemPressPayload {\n readonly itemId: string | number;\n readonly item: Record<string, ComponentEventPayloadValue>;\n}\n\nexport type CollectionItemPressEventDto = ComponentEventDto<\n 'collection.itemPress',\n CollectionItemPressPayload\n>;\n\nexport type ComponentEventDtoKind =\n ButtonPressEventDto['type'] | CollectionItemPressEventDto['type'] | FormSubmitEventDto['type'];\n\nexport type KnownComponentEventDto =\n ButtonPressEventDto | CollectionItemPressEventDto | FormSubmitEventDto;\n\nexport const APP_CATEGORIES = [\n 'books_reading',\n 'business_productivity',\n 'developer_tools',\n 'education_learning',\n 'entertainment_media',\n 'finance_money',\n 'food_drink',\n 'games',\n 'graphics_design',\n 'health_fitness',\n 'kids_family',\n 'lifestyle',\n 'medical',\n 'music_audio',\n 'navigation_travel',\n 'news_magazines',\n 'photo_video',\n 'reference',\n 'shopping_commerce',\n 'social_community',\n 'sports',\n 'utilities_tools',\n 'weather',\n] as const;\nexport type AppCategory = (typeof APP_CATEGORIES)[number];\n\nexport const AUTH_SCOPES = ['global', 'none', 'integrated'] as const;\nexport type AuthScope = (typeof AUTH_SCOPES)[number];\n\nexport const AUTH_SIGN_IN_IDENTIFIERS = ['email', 'username', 'phone'] as const;\nexport type AuthSignInIdentifier = AuthIdentifierKind;\n\nexport const AUTH_SIGN_UP_POLICIES = ['autoSignIn', 'requireVerification'] as const;\nexport type AuthSignUpPolicy = (typeof AUTH_SIGN_UP_POLICIES)[number];\n\nexport const AUTH_PROFILE_FIELDS = [\n ...AUTH_SIGN_IN_IDENTIFIERS,\n 'firstName',\n 'lastName',\n 'displayName',\n 'avatarUrl',\n] as const;\nexport type KnownAuthProfileField = (typeof AUTH_PROFILE_FIELDS)[number];\nexport type AuthProfileField = KnownAuthProfileField | (string & {});\n\nexport const AUTH_PROFILE_PRIMARY_KEY_STRATEGIES = ['authUserId'] as const;\nexport type AuthProfilePrimaryKeyStrategy = (typeof AUTH_PROFILE_PRIMARY_KEY_STRATEGIES)[number];\n\nexport const AUTH_PROFILE_CREATE_STRATEGIES = ['trigger', 'api', 'app'] as const;\nexport type AuthProfileCreateStrategy = (typeof AUTH_PROFILE_CREATE_STRATEGIES)[number];\n\nexport const AUTH_PROFILE_UPDATE_STRATEGIES = ['api', 'app'] as const;\nexport type AuthProfileUpdateStrategy = (typeof AUTH_PROFILE_UPDATE_STRATEGIES)[number];\n\ninterface IconPresentationSpec {\n size?: number | string;\n color?: string;\n}\n\nexport interface NamedIconSpec extends IconPresentationSpec {\n name: string;\n provider?: string;\n source?: never;\n}\n\nexport interface SvgIconSpec extends IconPresentationSpec {\n source: MediaAssetReference;\n name?: never;\n provider?: never;\n}\n\nexport type IconSpec = NamedIconSpec | SvgIconSpec;\n\nexport interface UiNodeRepeatSpec {\n source: BindingExpression;\n itemAlias?: string;\n keyPath?: string;\n empty?: readonly UiNode[];\n}\n\nexport interface UiNode {\n id: string;\n type: string;\n alias?: string;\n props?: Record<string, unknown>;\n children?: UiNode[];\n style?: Record<string, number | string>;\n repeat?: UiNodeRepeatSpec;\n}\n\nexport interface ScreenMetadataSpec {\n id: string;\n name: string;\n title?: string;\n description?: string;\n}\n\nexport interface ScreenSpec extends ScreenMetadataSpec {\n root: UiNode;\n dataLoaders?: readonly ScreenDataLoaderDefinition[];\n requires?: ScreenRequirements;\n}\n\nexport interface AuthSignInSpec {\n identifiers: AuthSignInIdentifier[];\n}\n\nexport interface AuthSignUpSpec {\n requiredFields: AuthSignUpField[];\n optionalFields?: AuthSignUpField[];\n signUpPolicy?: AuthSignUpPolicy;\n}\n\nexport interface AuthProfileSpec {\n fields: AuthProfileField[];\n table?: string;\n primaryKey?: AuthProfilePrimaryKeyStrategy;\n createStrategy?: AuthProfileCreateStrategy;\n updateStrategy?: AuthProfileUpdateStrategy;\n}\n\nexport interface AppSettings {\n localization: {\n defaultLocale: string;\n locales: string[];\n };\n}\n\nexport type SplashScreenResizeMode = 'contain' | 'cover' | 'native';\n\nexport interface SplashScreenModeSpec {\n readonly backgroundColor?: string;\n readonly image?: MediaAssetReference;\n}\n\nexport interface SplashScreenSpec extends SplashScreenModeSpec {\n readonly imageWidth?: number;\n readonly resizeMode?: SplashScreenResizeMode;\n readonly dark?: SplashScreenModeSpec;\n}\n\nexport interface AppManifest {\n metadata: {\n name: string;\n slug: string;\n version: string;\n category: AppCategory;\n themeId: ThemeId;\n created?: string;\n updated?: string;\n };\n themes: ThemeRegistry;\n activeThemeId: ThemeId;\n activeThemeMode?: 'dark' | 'light';\n splashScreen?: SplashScreenSpec;\n /** Studio-managed authoring media. Runtime/user uploads are intentionally separate. */\n media?: MediaManifest;\n /** App distribution desired state, separate from environment-specific infrastructure. */\n deploy?: AppDeployManifest;\n /** Application runtime state is not provisioned by Infra. */\n state?: AppStateSpec;\n infra: InfraManifest;\n navigator: AppNavigatorManifest;\n screens: EntityRegistry<string, ScreenSpec, 'id'>;\n dataSources?: DataSourceRegistry;\n dataBindings?: ComponentDataBindingRegistry;\n repository?: RepositoryManifest;\n settings: AppSettings;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAgFA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,eAAe;IACf,uBAAuB;IACvB,iBAAiB;IACjB,oBAAoB;IACpB,qBAAqB;IACrB,eAAe;IACf,YAAY;IACZ,OAAO;IACP,iBAAiB;IACjB,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,SAAS;IACT,aAAa;IACb,mBAAmB;IACnB,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,mBAAmB;IACnB,kBAAkB;IAClB,QAAQ;IACR,iBAAiB;IACjB,SAAS;CACD,CAAC;AAGX,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAU,CAAC;AAGrE,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAU,CAAC;AAGhF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,YAAY,EAAE,qBAAqB,CAAU,CAAC;AAGpF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,wBAAwB;IAC3B,WAAW;IACX,UAAU;IACV,aAAa;IACb,WAAW;CACH,CAAC;AAIX,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,YAAY,CAAU,CAAC;AAG3E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC;AAGjF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,KAAK,EAAE,KAAK,CAAU,CAAC","sourcesContent":["import type { ColorHarmony } from '@ankhorage/color-theory';\n\nimport type { AuthIdentifierKind, AuthSignUpField } from './auth.js';\nimport type {\n BindingExpression,\n ComponentDataBindingRegistry,\n ScreenDataLoaderDefinition,\n} from './bindings.js';\nimport type { EntityRegistry } from './collections.js';\nimport type { DataSourceRegistry } from './data/index.js';\nimport type { AppDeployManifest } from './deploy.js';\nimport type { InfraManifest } from './infra.js';\nimport type { MediaAssetReference, MediaManifest } from './media.js';\nimport type { AppNavigatorManifest } from './navigator.js';\nimport type { RepositoryManifest } from './repository.js';\nimport type { ScreenRequirements } from './requirements.js';\nimport type { SerializableValue } from './serializable.js';\nimport type { AppStateSpec } from './state.js';\nimport type { ThemeGlobalTokenOverrides, ThemeRecipeOverrides } from './theme.js';\n\nexport interface ThemeModeConfig {\n primaryColor: string;\n harmony: ColorHarmony;\n}\n\nexport type ThemeId = string;\n\nexport interface ThemeConfig {\n id: ThemeId;\n name: string;\n light: ThemeModeConfig;\n dark: ThemeModeConfig;\n /** Theme-global authored token overrides shared by light and dark mode. */\n tokens?: ThemeGlobalTokenOverrides;\n /** Component/pattern recipe override values; recipe schemas remain package-owned metadata. */\n recipes?: ThemeRecipeOverrides;\n}\n\nexport type ThemeRegistry = EntityRegistry<ThemeId, ThemeConfig, 'id'>;\n\nexport type ManifestValue = SerializableValue;\n\nexport type ComponentEventPayloadValue = ManifestValue;\n\nexport interface ComponentEventDto<\n TType extends string = string,\n TPayload extends object = Record<string, ComponentEventPayloadValue>,\n> {\n readonly type: TType;\n readonly sourceNodeId: string;\n readonly payload: TPayload;\n}\n\nexport type FormSubmitValues = Record<string, ComponentEventPayloadValue>;\n\nexport type FormSubmitEventDto = ComponentEventDto<\n 'form.submit',\n {\n readonly values: FormSubmitValues;\n }\n>;\n\nexport type ButtonPressEventDto = ComponentEventDto<'button.press', Record<string, never>>;\n\nexport interface CollectionItemPressPayload {\n readonly itemId: string | number;\n readonly item: Record<string, ComponentEventPayloadValue>;\n}\n\nexport type CollectionItemPressEventDto = ComponentEventDto<\n 'collection.itemPress',\n CollectionItemPressPayload\n>;\n\nexport type ComponentEventDtoKind =\n ButtonPressEventDto['type'] | CollectionItemPressEventDto['type'] | FormSubmitEventDto['type'];\n\nexport type KnownComponentEventDto =\n ButtonPressEventDto | CollectionItemPressEventDto | FormSubmitEventDto;\n\nexport const APP_CATEGORIES = [\n 'books_reading',\n 'business_productivity',\n 'developer_tools',\n 'education_learning',\n 'entertainment_media',\n 'finance_money',\n 'food_drink',\n 'games',\n 'graphics_design',\n 'health_fitness',\n 'kids_family',\n 'lifestyle',\n 'medical',\n 'music_audio',\n 'navigation_travel',\n 'news_magazines',\n 'photo_video',\n 'reference',\n 'shopping_commerce',\n 'social_community',\n 'sports',\n 'utilities_tools',\n 'weather',\n] as const;\nexport type AppCategory = (typeof APP_CATEGORIES)[number];\n\nexport const AUTH_SCOPES = ['global', 'none', 'integrated'] as const;\nexport type AuthScope = (typeof AUTH_SCOPES)[number];\n\nexport const AUTH_SIGN_IN_IDENTIFIERS = ['email', 'username', 'phone'] as const;\nexport type AuthSignInIdentifier = AuthIdentifierKind;\n\nexport const AUTH_SIGN_UP_POLICIES = ['autoSignIn', 'requireVerification'] as const;\nexport type AuthSignUpPolicy = (typeof AUTH_SIGN_UP_POLICIES)[number];\n\nexport const AUTH_PROFILE_FIELDS = [\n ...AUTH_SIGN_IN_IDENTIFIERS,\n 'firstName',\n 'lastName',\n 'displayName',\n 'avatarUrl',\n] as const;\nexport type KnownAuthProfileField = (typeof AUTH_PROFILE_FIELDS)[number];\nexport type AuthProfileField = KnownAuthProfileField | (string & {});\n\nexport const AUTH_PROFILE_PRIMARY_KEY_STRATEGIES = ['authUserId'] as const;\nexport type AuthProfilePrimaryKeyStrategy = (typeof AUTH_PROFILE_PRIMARY_KEY_STRATEGIES)[number];\n\nexport const AUTH_PROFILE_CREATE_STRATEGIES = ['trigger', 'api', 'app'] as const;\nexport type AuthProfileCreateStrategy = (typeof AUTH_PROFILE_CREATE_STRATEGIES)[number];\n\nexport const AUTH_PROFILE_UPDATE_STRATEGIES = ['api', 'app'] as const;\nexport type AuthProfileUpdateStrategy = (typeof AUTH_PROFILE_UPDATE_STRATEGIES)[number];\n\ninterface IconPresentationSpec {\n size?: number | string;\n color?: string;\n}\n\nexport interface NamedIconSpec extends IconPresentationSpec {\n name: string;\n provider?: string;\n source?: never;\n}\n\nexport interface SvgIconSpec extends IconPresentationSpec {\n source: MediaAssetReference;\n name?: never;\n provider?: never;\n}\n\nexport type IconSpec = NamedIconSpec | SvgIconSpec;\n\nexport interface UiNodeRepeatSpec {\n source: BindingExpression;\n itemAlias?: string;\n keyPath?: string;\n empty?: readonly UiNode[];\n}\n\nexport interface UiNode {\n id: string;\n type: string;\n alias?: string;\n props?: Record<string, unknown>;\n children?: UiNode[];\n style?: Record<string, number | string>;\n repeat?: UiNodeRepeatSpec;\n}\n\nexport interface ScreenMetadataSpec {\n id: string;\n name: string;\n title?: string;\n description?: string;\n}\n\nexport interface ScreenSpec extends ScreenMetadataSpec {\n root: UiNode;\n dataLoaders?: readonly ScreenDataLoaderDefinition[];\n requires?: ScreenRequirements;\n}\n\nexport interface AuthSignInSpec {\n identifiers: AuthSignInIdentifier[];\n}\n\nexport interface AuthSignUpSpec {\n requiredFields: AuthSignUpField[];\n optionalFields?: AuthSignUpField[];\n signUpPolicy?: AuthSignUpPolicy;\n}\n\nexport interface AuthProfileSpec {\n fields: AuthProfileField[];\n table?: string;\n primaryKey?: AuthProfilePrimaryKeyStrategy;\n createStrategy?: AuthProfileCreateStrategy;\n updateStrategy?: AuthProfileUpdateStrategy;\n}\n\nexport interface AppSettings {\n localization: {\n defaultLocale: string;\n locales: string[];\n };\n}\n\nexport type SplashScreenResizeMode = 'contain' | 'cover' | 'native';\n\nexport interface SplashScreenModeSpec {\n readonly backgroundColor?: string;\n readonly image?: MediaAssetReference;\n}\n\nexport interface SplashScreenSpec extends SplashScreenModeSpec {\n readonly imageWidth?: number;\n readonly resizeMode?: SplashScreenResizeMode;\n readonly dark?: SplashScreenModeSpec;\n}\n\nexport interface AppManifest {\n metadata: {\n name: string;\n slug: string;\n version: string;\n category: AppCategory;\n themeId: ThemeId;\n created?: string;\n updated?: string;\n };\n themes: ThemeRegistry;\n activeThemeId: ThemeId;\n activeThemeMode?: 'dark' | 'light';\n splashScreen?: SplashScreenSpec;\n /** Studio-managed authoring media. Runtime/user uploads are intentionally separate. */\n media?: MediaManifest;\n /** App distribution desired state, separate from environment-specific infrastructure. */\n deploy?: AppDeployManifest;\n /** Application runtime state is not provisioned by Infra. */\n state?: AppStateSpec;\n infra: InfraManifest;\n navigator: AppNavigatorManifest;\n screens: EntityRegistry<string, ScreenSpec, 'id'>;\n dataSources?: DataSourceRegistry;\n dataBindings?: ComponentDataBindingRegistry;\n repository?: RepositoryManifest;\n settings: AppSettings;\n}\n"]}
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MediaAssetKind } from './media';
|
|
2
|
-
import type { ComponentEventDtoKind } from './types';
|
|
1
|
+
import type { MediaAssetKind } from './media.js';
|
|
2
|
+
import type { ComponentEventDtoKind } from './types.js';
|
|
3
3
|
export type UiComponentCategory = 'component' | 'foundation' | 'layout' | 'pattern';
|
|
4
4
|
export type UiComponentPropType = 'action' | 'array' | 'boolean' | 'color' | 'enum' | 'imageAsset' | 'media' | 'number' | 'radius' | 'shadow' | 'spacing' | 'string' | 'typographySize' | 'typographyWeight';
|
|
5
5
|
export type UiComponentPropValue = string | number | boolean | null | readonly UiComponentPropValue[] | {
|
package/dist/ui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"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"}
|
package/dist/ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"","sourcesContent":["import type { MediaAssetKind } from './media';\nimport type { ComponentEventDtoKind } from './types';\n\nexport type UiComponentCategory = 'component' | 'foundation' | 'layout' | 'pattern';\n\nexport type UiComponentPropType =\n | 'action'\n | 'array'\n | 'boolean'\n | 'color'\n | 'enum'\n | 'imageAsset'\n | 'media'\n | 'number'\n | 'radius'\n | 'shadow'\n | 'spacing'\n | 'string'\n | 'typographySize'\n | 'typographyWeight';\n\nexport type UiComponentPropValue =\n | string\n | number\n | boolean\n | null\n | readonly UiComponentPropValue[]\n | {\n readonly [key: string]: UiComponentPropValue;\n };\n\nexport interface UiComponentPropArrayItemSchema {\n readonly key: string;\n readonly schema: UiComponentPropSchema;\n}\n\nexport interface UiComponentPropSchema {\n readonly type: UiComponentPropType;\n readonly category: string;\n readonly label?: string;\n readonly enum?: readonly (number | string)[];\n readonly default?: UiComponentPropValue;\n readonly itemSchema?: readonly UiComponentPropArrayItemSchema[];\n readonly mediaKinds?: readonly MediaAssetKind[];\n}\n\nexport interface UiComponentBlueprintIcon {\n readonly name: string;\n readonly provider?: string;\n}\n\nexport interface UiComponentBlueprint {\n readonly label: string;\n readonly icon?: UiComponentBlueprintIcon;\n readonly defaultProps?: Readonly<Record<string, UiComponentPropValue>>;\n}\n\nexport interface UiComponentI18nFieldMeta {\n readonly keyProp: string;\n readonly defaultTextProp: string;\n}\n\nexport interface UiComponentI18nMeta {\n readonly fields: readonly UiComponentI18nFieldMeta[];\n}\n\nexport type UiComponentEventPayloadKind = ComponentEventDtoKind | (string & {});\n\nexport type UiComponentEventPayloadFieldType =\n 'boolean' | 'number' | 'object' | 'record' | 'string' | 'unknown';\n\nexport interface UiComponentEventPayloadFieldMeta {\n readonly path: string;\n readonly type: UiComponentEventPayloadFieldType;\n readonly label?: string;\n readonly description?: string;\n}\n\nexport interface UiComponentEventMeta {\n readonly label: string;\n readonly eventType: UiComponentEventPayloadKind;\n readonly description?: string;\n readonly payloadFields?: readonly UiComponentEventPayloadFieldMeta[];\n}\n\nexport type UiBindableValueType =\n | 'array'\n | 'boolean'\n | 'date'\n | 'imageAsset'\n | 'number'\n | 'object'\n | 'record'\n | 'string'\n | 'unknown';\n\nexport interface UiBindableValueFieldMeta {\n readonly path: string;\n readonly type: UiBindableValueType;\n readonly label?: string;\n readonly description?: string;\n readonly required?: boolean;\n}\n\nexport interface UiBindableValueMeta {\n readonly type: UiBindableValueType;\n readonly label?: string;\n readonly description?: string;\n readonly fields?: readonly UiBindableValueFieldMeta[];\n readonly itemType?: UiBindableValueType;\n}\n\nexport interface UiBindablePropMeta {\n readonly value: UiBindableValueMeta;\n readonly label?: string;\n readonly description?: string;\n readonly required?: boolean;\n readonly acceptsFallback?: boolean;\n readonly acceptsTransforms?: boolean;\n}\n\nexport interface UiBindableEventPayloadMeta {\n readonly eventType: UiComponentEventPayloadKind;\n readonly fields?: readonly UiComponentEventPayloadFieldMeta[];\n}\n\nexport interface UiBindableEventMeta {\n readonly label?: string;\n readonly description?: string;\n readonly payload?: UiBindableEventPayloadMeta;\n}\n\nexport interface UiComponentBindingMeta {\n readonly props?: Readonly<Record<string, UiBindablePropMeta>>;\n readonly events?: Readonly<Record<string, UiBindableEventMeta>>;\n}\n\nexport interface UiComponentSlotMeta {\n readonly label?: string;\n readonly allowedChildren?: readonly string[];\n}\n\nexport interface UiComponentMeta {\n readonly name: string;\n readonly category: UiComponentCategory;\n readonly description?: string;\n readonly directManifestNode: boolean;\n readonly allowedChildren: readonly string[];\n readonly bindings?: UiComponentBindingMeta;\n readonly blueprint?: UiComponentBlueprint;\n readonly events?: Readonly<Record<string, UiComponentEventMeta>>;\n readonly i18n?: UiComponentI18nMeta;\n readonly slots?: Readonly<Record<string, UiComponentSlotMeta>>;\n readonly note?: string;\n readonly props: Readonly<Record<string, UiComponentPropSchema>>;\n}\n\nexport type UiComponentMetaRegistry = Readonly<Record<string, UiComponentMeta>>;\n\nexport interface UiComponentPackageManifest {\n readonly packageName: string;\n readonly displayName?: string;\n readonly components: UiComponentMetaRegistry;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"","sourcesContent":["import type { MediaAssetKind } from './media.js';\nimport type { ComponentEventDtoKind } from './types.js';\n\nexport type UiComponentCategory = 'component' | 'foundation' | 'layout' | 'pattern';\n\nexport type UiComponentPropType =\n | 'action'\n | 'array'\n | 'boolean'\n | 'color'\n | 'enum'\n | 'imageAsset'\n | 'media'\n | 'number'\n | 'radius'\n | 'shadow'\n | 'spacing'\n | 'string'\n | 'typographySize'\n | 'typographyWeight';\n\nexport type UiComponentPropValue =\n | string\n | number\n | boolean\n | null\n | readonly UiComponentPropValue[]\n | {\n readonly [key: string]: UiComponentPropValue;\n };\n\nexport interface UiComponentPropArrayItemSchema {\n readonly key: string;\n readonly schema: UiComponentPropSchema;\n}\n\nexport interface UiComponentPropSchema {\n readonly type: UiComponentPropType;\n readonly category: string;\n readonly label?: string;\n readonly enum?: readonly (number | string)[];\n readonly default?: UiComponentPropValue;\n readonly itemSchema?: readonly UiComponentPropArrayItemSchema[];\n readonly mediaKinds?: readonly MediaAssetKind[];\n}\n\nexport interface UiComponentBlueprintIcon {\n readonly name: string;\n readonly provider?: string;\n}\n\nexport interface UiComponentBlueprint {\n readonly label: string;\n readonly icon?: UiComponentBlueprintIcon;\n readonly defaultProps?: Readonly<Record<string, UiComponentPropValue>>;\n}\n\nexport interface UiComponentI18nFieldMeta {\n readonly keyProp: string;\n readonly defaultTextProp: string;\n}\n\nexport interface UiComponentI18nMeta {\n readonly fields: readonly UiComponentI18nFieldMeta[];\n}\n\nexport type UiComponentEventPayloadKind = ComponentEventDtoKind | (string & {});\n\nexport type UiComponentEventPayloadFieldType =\n 'boolean' | 'number' | 'object' | 'record' | 'string' | 'unknown';\n\nexport interface UiComponentEventPayloadFieldMeta {\n readonly path: string;\n readonly type: UiComponentEventPayloadFieldType;\n readonly label?: string;\n readonly description?: string;\n}\n\nexport interface UiComponentEventMeta {\n readonly label: string;\n readonly eventType: UiComponentEventPayloadKind;\n readonly description?: string;\n readonly payloadFields?: readonly UiComponentEventPayloadFieldMeta[];\n}\n\nexport type UiBindableValueType =\n | 'array'\n | 'boolean'\n | 'date'\n | 'imageAsset'\n | 'number'\n | 'object'\n | 'record'\n | 'string'\n | 'unknown';\n\nexport interface UiBindableValueFieldMeta {\n readonly path: string;\n readonly type: UiBindableValueType;\n readonly label?: string;\n readonly description?: string;\n readonly required?: boolean;\n}\n\nexport interface UiBindableValueMeta {\n readonly type: UiBindableValueType;\n readonly label?: string;\n readonly description?: string;\n readonly fields?: readonly UiBindableValueFieldMeta[];\n readonly itemType?: UiBindableValueType;\n}\n\nexport interface UiBindablePropMeta {\n readonly value: UiBindableValueMeta;\n readonly label?: string;\n readonly description?: string;\n readonly required?: boolean;\n readonly acceptsFallback?: boolean;\n readonly acceptsTransforms?: boolean;\n}\n\nexport interface UiBindableEventPayloadMeta {\n readonly eventType: UiComponentEventPayloadKind;\n readonly fields?: readonly UiComponentEventPayloadFieldMeta[];\n}\n\nexport interface UiBindableEventMeta {\n readonly label?: string;\n readonly description?: string;\n readonly payload?: UiBindableEventPayloadMeta;\n}\n\nexport interface UiComponentBindingMeta {\n readonly props?: Readonly<Record<string, UiBindablePropMeta>>;\n readonly events?: Readonly<Record<string, UiBindableEventMeta>>;\n}\n\nexport interface UiComponentSlotMeta {\n readonly label?: string;\n readonly allowedChildren?: readonly string[];\n}\n\nexport interface UiComponentMeta {\n readonly name: string;\n readonly category: UiComponentCategory;\n readonly description?: string;\n readonly directManifestNode: boolean;\n readonly allowedChildren: readonly string[];\n readonly bindings?: UiComponentBindingMeta;\n readonly blueprint?: UiComponentBlueprint;\n readonly events?: Readonly<Record<string, UiComponentEventMeta>>;\n readonly i18n?: UiComponentI18nMeta;\n readonly slots?: Readonly<Record<string, UiComponentSlotMeta>>;\n readonly note?: string;\n readonly props: Readonly<Record<string, UiComponentPropSchema>>;\n}\n\nexport type UiComponentMetaRegistry = Readonly<Record<string, UiComponentMeta>>;\n\nexport interface UiComponentPackageManifest {\n readonly packageName: string;\n readonly displayName?: string;\n readonly components: UiComponentMetaRegistry;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/contracts",
|
|
3
|
-
"version": "26.2.
|
|
3
|
+
"version": "26.2.2",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"ankh": {
|
|
6
6
|
"category": "contracts",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@ankhorage/color-theory": "^0.3.
|
|
43
|
+
"@ankhorage/color-theory": "^0.3.2",
|
|
44
44
|
"@ankhorage/utility": "^1.10.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@ankhorage/devtools": "^2.3.
|
|
47
|
+
"@ankhorage/devtools": "^2.3.30",
|
|
48
48
|
"@ankhorage/paradox": "^0.3.5",
|
|
49
49
|
"@types/bun": "^1.4.2",
|
|
50
50
|
"@types/node": "^26.6.5",
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
"format": "ankhorage-prettier --write .",
|
|
177
177
|
"format:check": "ankhorage-prettier --check .",
|
|
178
178
|
"test": "bun test src",
|
|
179
|
-
"typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.infra-tests.json && bun run build && tsc --noEmit -p tsconfig.deploy-provider-consumer.json && bun run structure:check",
|
|
179
|
+
"typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.node-esm.json && tsc --noEmit -p tsconfig.infra-tests.json && bun run build && tsc --noEmit -p tsconfig.deploy-provider-consumer.json && bun run structure:check",
|
|
180
180
|
"version-packages": "ankhorage-changeset version",
|
|
181
181
|
"knip:check": "ankhorage-knip",
|
|
182
182
|
"structure:check": "ankhorage-structure check ."
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isRecord } from '@ankhorage/utility/object';
|
|
2
2
|
import { isOptionalString } from '@ankhorage/utility/string';
|
|
3
3
|
|
|
4
|
-
import { isManifestValue } from './isManifestValue';
|
|
4
|
+
import { isManifestValue } from './isManifestValue.js';
|
|
5
5
|
|
|
6
6
|
/*** Validate every component binding in the authored registry. */
|
|
7
7
|
export function isComponentDataBindingRegistry(value: unknown): boolean {
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
isCredentialRef,
|
|
7
7
|
isDataEndpointRegistry,
|
|
8
8
|
isDataSchemaRegistry,
|
|
9
|
-
} from '../data/dataValidation';
|
|
10
|
-
import { isManifestValue } from './isManifestValue';
|
|
9
|
+
} from '../data/dataValidation.js';
|
|
10
|
+
import { isManifestValue } from './isManifestValue.js';
|
|
11
11
|
|
|
12
12
|
const DATABASE_SOURCE_KEYS = [
|
|
13
13
|
'id',
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { isStringArray } from '@ankhorage/utility/array';
|
|
2
2
|
import { isRecord } from '@ankhorage/utility/object';
|
|
3
3
|
|
|
4
|
-
import { isInfraManifest } from '../infra/isInfraManifest';
|
|
5
|
-
import type { AppManifest } from '../types';
|
|
6
|
-
import { isComponentDataBindingRegistry } from './bindings';
|
|
7
|
-
import { APP_MANIFEST_KEY_POLICY } from './constants';
|
|
8
|
-
import { isDataSourceRegistry } from './dataSources';
|
|
9
|
-
import { isAppDeployManifest } from './deploy';
|
|
10
|
-
import { isAppStateSpec } from './isAppStateSpec';
|
|
11
|
-
import { isMediaManifest } from './media';
|
|
4
|
+
import { isInfraManifest } from '../infra/isInfraManifest.js';
|
|
5
|
+
import type { AppManifest } from '../types.js';
|
|
6
|
+
import { isComponentDataBindingRegistry } from './bindings.js';
|
|
7
|
+
import { APP_MANIFEST_KEY_POLICY } from './constants.js';
|
|
8
|
+
import { isDataSourceRegistry } from './dataSources.js';
|
|
9
|
+
import { isAppDeployManifest } from './deploy.js';
|
|
10
|
+
import { isAppStateSpec } from './isAppStateSpec.js';
|
|
11
|
+
import { isMediaManifest } from './media.js';
|
|
12
12
|
import {
|
|
13
13
|
isAppNavigatorManifest,
|
|
14
14
|
isManifestMetadata,
|
|
15
15
|
isScreenRegistry,
|
|
16
16
|
isSplashScreenSpec,
|
|
17
17
|
isThemeRegistry,
|
|
18
|
-
} from './screens';
|
|
18
|
+
} from './screens.js';
|
|
19
19
|
|
|
20
20
|
/*** Return whether an unknown value satisfies the canonical AppManifest shape. */
|
|
21
21
|
export function isAppManifest(value: unknown): value is AppManifest {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isRecord } from '@ankhorage/utility/object';
|
|
2
2
|
|
|
3
|
-
import type { AppStateSpec } from '../state';
|
|
3
|
+
import type { AppStateSpec } from '../state.js';
|
|
4
4
|
|
|
5
5
|
/*** Application state cannot claim persistence unsupported by the selected Legend adapter. */
|
|
6
6
|
export function isAppStateSpec(value: unknown): value is AppStateSpec {
|
package/src/appManifest/media.ts
CHANGED
|
@@ -2,15 +2,15 @@ import { isStringArray } from '@ankhorage/utility/array';
|
|
|
2
2
|
import { hasOnlyKeys, isRecord } from '@ankhorage/utility/object';
|
|
3
3
|
import { isOptionalString } from '@ankhorage/utility/string';
|
|
4
4
|
|
|
5
|
-
import { isIconSpec } from '../icon';
|
|
6
|
-
import { type AppNavigatorManifest, NAVIGATOR_PRESETS, NAVIGATOR_TYPES } from '../navigator';
|
|
5
|
+
import { isIconSpec } from '../icon.js';
|
|
6
|
+
import { type AppNavigatorManifest, NAVIGATOR_PRESETS, NAVIGATOR_TYPES } from '../navigator.js';
|
|
7
7
|
import {
|
|
8
8
|
isDrawerNavigatorOptions,
|
|
9
9
|
isNavigatorScreenReference,
|
|
10
10
|
isStackImplementationConfig,
|
|
11
11
|
isStackScreenOptions,
|
|
12
12
|
isTabsImplementationConfig,
|
|
13
|
-
} from './navigatorOptions';
|
|
13
|
+
} from './navigatorOptions.js';
|
|
14
14
|
|
|
15
15
|
/*** Validate the complete serialized `AppManifest.navigator` slice. */
|
|
16
16
|
export function isAppNavigatorManifest(value: unknown): value is AppNavigatorManifest {
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
JAVASCRIPT_TABS_PRESENTATIONS,
|
|
11
11
|
NATIVE_TABS_MINIMIZE_BEHAVIORS,
|
|
12
12
|
STACK_PRESENTATIONS,
|
|
13
|
-
} from '../navigator';
|
|
13
|
+
} from '../navigator.js';
|
|
14
14
|
|
|
15
15
|
/*** Validate stable native, JavaScript, or alpha Experimental Stack desired state. */
|
|
16
16
|
export function isStackImplementationConfig(value: Record<string, unknown>): boolean {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AppManifestParseResult } from '../types/appManifest';
|
|
2
|
-
import { isAppManifest } from './isAppManifest';
|
|
1
|
+
import type { AppManifestParseResult } from '../types/appManifest.js';
|
|
2
|
+
import { isAppManifest } from './isAppManifest.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Parse unknown JSON-compatible input at the canonical AppManifest boundary.
|
|
@@ -2,13 +2,13 @@ import { COLOR_HARMONIES } from '@ankhorage/color-theory';
|
|
|
2
2
|
import { isRecord } from '@ankhorage/utility/object';
|
|
3
3
|
import { isOptionalString } from '@ankhorage/utility/string';
|
|
4
4
|
|
|
5
|
-
import { isSerializableSet } from '../collections';
|
|
6
|
-
import { isMediaAssetReference } from '../media';
|
|
7
|
-
import { ANKHORAGE_CAPABILITY_NAMES, ANKHORAGE_PERMISSION_NAMES } from '../requirements';
|
|
8
|
-
import { APP_CATEGORIES, type ThemeRegistry } from '../types';
|
|
9
|
-
import { isBindingExpression, isScreenDataLoaderDefinition } from './bindings';
|
|
5
|
+
import { isSerializableSet } from '../collections.js';
|
|
6
|
+
import { isMediaAssetReference } from '../media.js';
|
|
7
|
+
import { ANKHORAGE_CAPABILITY_NAMES, ANKHORAGE_PERMISSION_NAMES } from '../requirements.js';
|
|
8
|
+
import { APP_CATEGORIES, type ThemeRegistry } from '../types.js';
|
|
9
|
+
import { isBindingExpression, isScreenDataLoaderDefinition } from './bindings.js';
|
|
10
10
|
|
|
11
|
-
export { isAppNavigatorManifest } from './navigator';
|
|
11
|
+
export { isAppNavigatorManifest } from './navigator.js';
|
|
12
12
|
|
|
13
13
|
const APP_CATEGORY_SET = new Set<string>(APP_CATEGORIES);
|
|
14
14
|
const COLOR_HARMONY_SET = new Set<string>(COLOR_HARMONIES);
|
package/src/appManifest.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { isAppManifest } from './appManifest/isAppManifest';
|
|
2
|
-
export { parseAppManifest } from './appManifest/parseAppManifest';
|
|
3
|
-
export type { SplashScreenModeSpec, SplashScreenResizeMode, SplashScreenSpec } from './types';
|
|
4
|
-
export type { AppManifestParseResult } from './types/appManifest';
|
|
1
|
+
export { isAppManifest } from './appManifest/isAppManifest.js';
|
|
2
|
+
export { parseAppManifest } from './appManifest/parseAppManifest.js';
|
|
3
|
+
export type { SplashScreenModeSpec, SplashScreenResizeMode, SplashScreenSpec } from './types.js';
|
|
4
|
+
export type { AppManifestParseResult } from './types/appManifest.js';
|
package/src/auth.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ValueMap } from './collections';
|
|
2
|
-
import type { DataSchema } from './data/schemas';
|
|
3
|
-
import type { AppDeployTargetId } from './deploy';
|
|
4
|
-
import type { AppEnvironmentId } from './environments';
|
|
5
|
-
import type { SecretRef } from './secrets';
|
|
6
|
-
import type { IconSpec } from './types';
|
|
1
|
+
import type { ValueMap } from './collections.js';
|
|
2
|
+
import type { DataSchema } from './data/schemas.js';
|
|
3
|
+
import type { AppDeployTargetId } from './deploy.js';
|
|
4
|
+
import type { AppEnvironmentId } from './environments.js';
|
|
5
|
+
import type { SecretRef } from './secrets.js';
|
|
6
|
+
import type { IconSpec } from './types.js';
|
|
7
7
|
|
|
8
8
|
export const AUTH_IDENTIFIER_KINDS = ['email', 'phone', 'username'] as const;
|
|
9
9
|
export type AuthIdentifierKind = (typeof AUTH_IDENTIFIER_KINDS)[number];
|
package/src/bindings.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Capability } from './capability';
|
|
2
|
-
import type { EntityRegistry, ValueMap } from './collections';
|
|
3
|
-
import type { SerializableValue } from './serializable';
|
|
1
|
+
import type { Capability } from './capability.js';
|
|
2
|
+
import type { EntityRegistry, ValueMap } from './collections.js';
|
|
3
|
+
import type { SerializableValue } from './serializable.js';
|
|
4
4
|
|
|
5
5
|
export type ComponentInstanceId = string;
|
|
6
6
|
export type ComponentTypeId = string;
|
package/src/cli/index.ts
CHANGED
package/src/data/apis.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { EntityRegistry } from '../collections';
|
|
2
|
-
import type { DataEndpointRegistry } from './endpoints';
|
|
3
|
-
import type { ApiId } from './ids';
|
|
4
|
-
import type { CredentialRef } from './refs';
|
|
5
|
-
import type { DataSchemaRegistry } from './schemas';
|
|
6
|
-
import type { DataContractValue } from './values';
|
|
1
|
+
import type { EntityRegistry } from '../collections.js';
|
|
2
|
+
import type { DataEndpointRegistry } from './endpoints.js';
|
|
3
|
+
import type { ApiId } from './ids.js';
|
|
4
|
+
import type { CredentialRef } from './refs.js';
|
|
5
|
+
import type { DataSchemaRegistry } from './schemas.js';
|
|
6
|
+
import type { DataContractValue } from './values.js';
|
|
7
7
|
|
|
8
8
|
export type ApiOrigin = 'external' | 'internal';
|
|
9
9
|
export type ApiProtocol = 'graphql' | 'rest';
|
package/src/data/diagnostics.ts
CHANGED
package/src/data/endpoints.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { EntityRegistry } from '../collections';
|
|
2
|
-
import type { EndpointId } from './ids';
|
|
3
|
-
import type { DataOperationRegistry } from './operations';
|
|
4
|
-
import type { CredentialRef } from './refs';
|
|
5
|
-
import type { DataContractValue } from './values';
|
|
1
|
+
import type { EntityRegistry } from '../collections.js';
|
|
2
|
+
import type { EndpointId } from './ids.js';
|
|
3
|
+
import type { DataOperationRegistry } from './operations.js';
|
|
4
|
+
import type { CredentialRef } from './refs.js';
|
|
5
|
+
import type { DataContractValue } from './values.js';
|
|
6
6
|
|
|
7
7
|
export type DataEndpointKind = 'database' | 'graphql' | 'http' | (string & {});
|
|
8
8
|
|
package/src/data/index.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './apis';
|
|
2
|
-
export { isDataSchema, isDataSchemaSlot } from './dataValidation';
|
|
3
|
-
export * from './diagnostics';
|
|
4
|
-
export * from './endpoints';
|
|
5
|
-
export * from './ids';
|
|
6
|
-
export * from './operations';
|
|
7
|
-
export * from './refs';
|
|
8
|
-
export * from './schemas';
|
|
9
|
-
export * from './sources';
|
|
10
|
-
export * from './values';
|
|
1
|
+
export * from './apis.js';
|
|
2
|
+
export { isDataSchema, isDataSchemaSlot } from './dataValidation.js';
|
|
3
|
+
export * from './diagnostics.js';
|
|
4
|
+
export * from './endpoints.js';
|
|
5
|
+
export * from './ids.js';
|
|
6
|
+
export * from './operations.js';
|
|
7
|
+
export * from './refs.js';
|
|
8
|
+
export * from './schemas.js';
|
|
9
|
+
export * from './sources.js';
|
|
10
|
+
export * from './values.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { hasOnlyKeys, isRecord } from '@ankhorage/utility/object';
|
|
2
2
|
import { isNonEmptyString, isOptionalString } from '@ankhorage/utility/string';
|
|
3
3
|
|
|
4
|
-
import { isSerializableValue } from '../serializable';
|
|
5
|
-
import type { ApiDefinition, ApiDefinitionRegistry } from './apis';
|
|
6
|
-
import { isCredentialRef, isDataEndpointRegistry, isDataSchemaRegistry } from './dataValidation';
|
|
4
|
+
import { isSerializableValue } from '../serializable.js';
|
|
5
|
+
import type { ApiDefinition, ApiDefinitionRegistry } from './apis.js';
|
|
6
|
+
import { isCredentialRef, isDataEndpointRegistry, isDataSchemaRegistry } from './dataValidation.js';
|
|
7
7
|
|
|
8
8
|
const API_BASE_KEYS = [
|
|
9
9
|
'id',
|
package/src/data/operations.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { EntityRegistry } from '../collections';
|
|
2
|
-
import type { EndpointId, OperationId } from './ids';
|
|
3
|
-
import type { CredentialRef } from './refs';
|
|
4
|
-
import type { DataSchemaSlot } from './schemas';
|
|
5
|
-
import type { DataContractValue } from './values';
|
|
1
|
+
import type { EntityRegistry } from '../collections.js';
|
|
2
|
+
import type { EndpointId, OperationId } from './ids.js';
|
|
3
|
+
import type { CredentialRef } from './refs.js';
|
|
4
|
+
import type { DataSchemaSlot } from './schemas.js';
|
|
5
|
+
import type { DataContractValue } from './values.js';
|
|
6
6
|
|
|
7
7
|
export type DataOperationIntent = 'action' | 'create' | 'delete' | 'read' | 'update';
|
|
8
8
|
|
package/src/data/refs.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AdapterId, CredentialId } from './ids';
|
|
2
|
-
import type { DataContractValue } from './values';
|
|
1
|
+
import type { AdapterId, CredentialId } from './ids.js';
|
|
2
|
+
import type { DataContractValue } from './values.js';
|
|
3
3
|
|
|
4
4
|
export type CredentialKind = 'apiKey' | 'basic' | 'bearer' | 'custom' | 'oauth2';
|
|
5
5
|
|
package/src/data/schemas.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ValueMap } from '../collections';
|
|
2
|
-
import type { SchemaId } from './ids';
|
|
3
|
-
import type { DataContractValue } from './values';
|
|
1
|
+
import type { ValueMap } from '../collections.js';
|
|
2
|
+
import type { SchemaId } from './ids.js';
|
|
3
|
+
import type { DataContractValue } from './values.js';
|
|
4
4
|
|
|
5
5
|
export type DataSchemaPrimitiveType =
|
|
6
6
|
'array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string';
|
package/src/data/sources.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { EntityRegistry } from '../collections';
|
|
2
|
-
import type { DataEndpointRegistry } from './endpoints';
|
|
3
|
-
import type { DataSourceId } from './ids';
|
|
4
|
-
import type { CredentialRef, DatabaseAdapterRef } from './refs';
|
|
5
|
-
import type { DataSchemaRegistry } from './schemas';
|
|
6
|
-
import type { DataContractValue } from './values';
|
|
1
|
+
import type { EntityRegistry } from '../collections.js';
|
|
2
|
+
import type { DataEndpointRegistry } from './endpoints.js';
|
|
3
|
+
import type { DataSourceId } from './ids.js';
|
|
4
|
+
import type { CredentialRef, DatabaseAdapterRef } from './refs.js';
|
|
5
|
+
import type { DataSchemaRegistry } from './schemas.js';
|
|
6
|
+
import type { DataContractValue } from './values.js';
|
|
7
7
|
|
|
8
8
|
export type DataSourceKind = 'database';
|
|
9
9
|
|
package/src/data/values.ts
CHANGED
package/src/icon.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isRecord } from '@ankhorage/utility/object';
|
|
2
2
|
import { isOptionalString } from '@ankhorage/utility/string';
|
|
3
3
|
|
|
4
|
-
import { isMediaAssetReference } from './media';
|
|
4
|
+
import { isMediaAssetReference } from './media.js';
|
|
5
5
|
|
|
6
6
|
/*** Validate a serializable icon as either a named font glyph or an SVG media reference. */
|
|
7
7
|
export function isIconSpec(value: unknown): boolean {
|
package/src/index.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export * from './appManifest';
|
|
2
|
-
export * from './auth';
|
|
3
|
-
export * from './bindings';
|
|
4
|
-
export * from './cli';
|
|
5
|
-
export * from './collections';
|
|
6
|
-
export * from './data';
|
|
7
|
-
export * from './db';
|
|
8
|
-
export * from './deploy';
|
|
9
|
-
export * from './deployProvider';
|
|
10
|
-
export * from './environments';
|
|
11
|
-
export * from './infra';
|
|
12
|
-
export * from './media';
|
|
13
|
-
export * from './navigator';
|
|
14
|
-
export * from './repository';
|
|
15
|
-
export * from './requirements';
|
|
16
|
-
export * from './runtimeCallbacks';
|
|
17
|
-
export * from './secrets';
|
|
18
|
-
export * from './serializable';
|
|
19
|
-
export * from './state';
|
|
20
|
-
export * from './storage';
|
|
21
|
-
export * from './structure';
|
|
22
|
-
export * from './theme';
|
|
23
|
-
export * from './types';
|
|
24
|
-
export * from './ui';
|
|
1
|
+
export * from './appManifest.js';
|
|
2
|
+
export * from './auth.js';
|
|
3
|
+
export * from './bindings.js';
|
|
4
|
+
export * from './cli/index.js';
|
|
5
|
+
export * from './collections.js';
|
|
6
|
+
export * from './data/index.js';
|
|
7
|
+
export * from './db.js';
|
|
8
|
+
export * from './deploy.js';
|
|
9
|
+
export * from './deployProvider.js';
|
|
10
|
+
export * from './environments.js';
|
|
11
|
+
export * from './infra.js';
|
|
12
|
+
export * from './media.js';
|
|
13
|
+
export * from './navigator.js';
|
|
14
|
+
export * from './repository.js';
|
|
15
|
+
export * from './requirements.js';
|
|
16
|
+
export * from './runtimeCallbacks.js';
|
|
17
|
+
export * from './secrets.js';
|
|
18
|
+
export * from './serializable.js';
|
|
19
|
+
export * from './state.js';
|
|
20
|
+
export * from './storage.js';
|
|
21
|
+
export * from './structure/index.js';
|
|
22
|
+
export * from './theme.js';
|
|
23
|
+
export * from './types.js';
|
|
24
|
+
export * from './ui.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isRecord } from '@ankhorage/utility/object';
|
|
2
2
|
|
|
3
|
-
import { INFRA_ADAPTER_CATALOG } from '../infraCatalog';
|
|
4
|
-
import type { InfraAdapterDescriptor } from '../types/infraAdapters';
|
|
5
|
-
import { isInfraShape } from './isInfraShape';
|
|
3
|
+
import { INFRA_ADAPTER_CATALOG } from '../infraCatalog.js';
|
|
4
|
+
import type { InfraAdapterDescriptor } from '../types/infraAdapters.js';
|
|
5
|
+
import { isInfraShape } from './isInfraShape.js';
|
|
6
6
|
|
|
7
7
|
/*** Installed adapters must match the canonical identity, capabilities, targets and config version exactly. */
|
|
8
8
|
export function isInfraAdapterDescriptor(value: unknown): value is InfraAdapterDescriptor {
|
|
@@ -2,8 +2,8 @@ import { isStringArray } from '@ankhorage/utility/array';
|
|
|
2
2
|
import { isRecordOf } from '@ankhorage/utility/object';
|
|
3
3
|
import { isOptionalString } from '@ankhorage/utility/string';
|
|
4
4
|
|
|
5
|
-
import { AUTH_OAUTH_PROVIDER_IDS } from '../auth';
|
|
6
|
-
import { isIconSpec } from '../icon';
|
|
5
|
+
import { AUTH_OAUTH_PROVIDER_IDS } from '../auth.js';
|
|
6
|
+
import { isIconSpec } from '../icon.js';
|
|
7
7
|
import {
|
|
8
8
|
AUTH_PROFILE_CREATE_STRATEGIES,
|
|
9
9
|
AUTH_PROFILE_PRIMARY_KEY_STRATEGIES,
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
AUTH_SCOPES,
|
|
12
12
|
AUTH_SIGN_IN_IDENTIFIERS,
|
|
13
13
|
AUTH_SIGN_UP_POLICIES,
|
|
14
|
-
} from '../types';
|
|
15
|
-
import type { InfraAuthSpec } from '../types/infraManifest';
|
|
16
|
-
import type { InfraShape } from '../types/infraValidation';
|
|
17
|
-
import { isInfraShape } from './isInfraShape';
|
|
14
|
+
} from '../types.js';
|
|
15
|
+
import type { InfraAuthSpec } from '../types/infraManifest.js';
|
|
16
|
+
import type { InfraShape } from '../types/infraValidation.js';
|
|
17
|
+
import { isInfraShape } from './isInfraShape.js';
|
|
18
18
|
|
|
19
19
|
/*** Preserve application auth configuration while rejecting nested authorization and unknown providers. */
|
|
20
20
|
export function isInfraAuthSpec(value: unknown): value is InfraAuthSpec {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isNonEmptyString } from '@ankhorage/utility/string';
|
|
2
2
|
|
|
3
|
-
import { isInfraShape } from './isInfraShape';
|
|
3
|
+
import { isInfraShape } from './isInfraShape.js';
|
|
4
4
|
|
|
5
5
|
/*** Bootstrap credential references are explicitly separate from managed runtime secrets. */
|
|
6
6
|
export function isInfraCredentialRef(value: unknown): boolean {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { isRecord } from '@ankhorage/utility/object';
|
|
2
2
|
import { isNonEmptyString } from '@ankhorage/utility/string';
|
|
3
3
|
|
|
4
|
-
import { INFRA_RUNTIME_COMPATIBILITY } from '../infraCatalog';
|
|
4
|
+
import { INFRA_RUNTIME_COMPATIBILITY } from '../infraCatalog.js';
|
|
5
5
|
import type {
|
|
6
6
|
InfraComputeSelection,
|
|
7
7
|
InfraDeploymentSpec,
|
|
8
8
|
InfraRuntimeSelection,
|
|
9
|
-
} from '../types/infraManifest';
|
|
10
|
-
import type { InfraShape } from '../types/infraValidation';
|
|
11
|
-
import { infraFields } from './infraFields';
|
|
12
|
-
import { isInfraCredentialRef } from './isInfraCredentialRef';
|
|
13
|
-
import { isInfraShape } from './isInfraShape';
|
|
9
|
+
} from '../types/infraManifest.js';
|
|
10
|
+
import type { InfraShape } from '../types/infraValidation.js';
|
|
11
|
+
import { infraFields } from './infraFields.js';
|
|
12
|
+
import { isInfraCredentialRef } from './isInfraCredentialRef.js';
|
|
13
|
+
import { isInfraShape } from './isInfraShape.js';
|
|
14
14
|
|
|
15
15
|
/*** Validate provider-specific config and the exact same compatibility map used by TypeScript. */
|
|
16
16
|
export function isInfraDeploymentSpec(value: unknown): value is InfraDeploymentSpec {
|