@ankhorage/contracts 4.0.2 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +1 -1
- package/dist/types.d.ts +10 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/src/bindings.test.ts +1 -1
- package/src/contracts.test.ts +64 -3
- package/src/secrets.test.ts +1 -1
- package/src/types.ts +10 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @ankhorage/contracts
|
|
2
2
|
|
|
3
|
+
## 6.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 6dd3d50: Replace the Ankhorage module registry fields on `InfraManifest` with the canonical `modules` and `modulesConfig` names. The obsolete `plugins` and `pluginsConfig` fields are removed without compatibility aliases.
|
|
8
|
+
|
|
9
|
+
## 5.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- 671bbcb: Replace the tab-specific route visibility field with `showInPrimaryNavigation`. Omitted routes remain visible by default, while `false` hides a route from Tabs and Drawer primary navigation without removing its navigability.
|
|
14
|
+
- b125e14: Replace the mixed REST, OpenAPI, GraphQL, and managed-API data-source kinds with an orthogonal API/database model. APIs now declare external/generated origin and REST/GraphQL protocol, while OpenAPI is optional REST description metadata. Preserve generated REST/CRUD desired state in a dedicated manifest registry and keep its normalized runtime data-source projection separate, with no speculative API-server generator adapter.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- a804711: Release trigger
|
|
19
|
+
|
|
3
20
|
## 4.0.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# CONTRACTS
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Serializable app, action, theme, auth, and secret-store contracts for Ankhorage.
|
|
9
9
|
|
package/dist/types.d.ts
CHANGED
|
@@ -159,7 +159,14 @@ export interface RouteDefinition {
|
|
|
159
159
|
path?: string;
|
|
160
160
|
label?: string;
|
|
161
161
|
icon?: IconSpec;
|
|
162
|
-
|
|
162
|
+
/**
|
|
163
|
+
* Whether this route appears in Tabs and Drawer primary navigation.
|
|
164
|
+
*
|
|
165
|
+
* Omitted routes are visible by default. Setting this to `false` hides the
|
|
166
|
+
* route from primary navigation without making it unnavigable. Stack
|
|
167
|
+
* navigators preserve the value but do not present primary navigation.
|
|
168
|
+
*/
|
|
169
|
+
showInPrimaryNavigation?: boolean;
|
|
163
170
|
guards?: string[];
|
|
164
171
|
screenId?: string;
|
|
165
172
|
navigator?: NavigatorSpec;
|
|
@@ -232,8 +239,8 @@ export interface InfraManifest {
|
|
|
232
239
|
storage?: StorageSpec;
|
|
233
240
|
state?: StateSpec;
|
|
234
241
|
networking?: NetworkingSpec;
|
|
235
|
-
|
|
236
|
-
|
|
242
|
+
modules: string[];
|
|
243
|
+
modulesConfig?: Record<string, unknown>;
|
|
237
244
|
}
|
|
238
245
|
export interface AppSettings {
|
|
239
246
|
apiBaseUrl?: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACnG,OAAO,KAAK,EACV,kBAAkB,EAClB,4BAA4B,EAC5B,0BAA0B,EAC3B,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE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,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 { AuthFlowConfig, AuthIdentifierKind, AuthOAuthConfig, AuthSignUpField } from './auth';\nimport type {\n BindingValueSource,\n ComponentDataBindingRegistry,\n ScreenDataLoaderDefinition,\n} from './bindings';\nimport type { DataSourceRegistry, GeneratedApiRegistry } from './data';\nimport type { ScreenRequirements } from './requirements';\n\nexport interface ThemeModeConfig {\n primaryColor: string;\n harmony: ColorHarmony;\n}\n\nexport interface ThemeConfig {\n id: string;\n name: string;\n light: ThemeModeConfig;\n dark: ThemeModeConfig;\n}\n\nexport type ActionType =\n | 'navigate'\n | 'alert'\n | 'console'\n | 'toggleDarkMode'\n | 'setLanguage'\n | 'search'\n | 'filter';\n\nexport interface NavigateAction {\n type: 'navigate';\n payload: {\n route: string;\n params?: Record<string, number | string>;\n };\n}\n\nexport interface AlertAction {\n type: 'alert';\n payload?: {\n message?: string;\n };\n}\n\nexport interface ConsoleAction {\n type: 'console';\n payload?: Record<string, unknown>;\n}\n\nexport interface ToggleDarkModeAction {\n type: 'toggleDarkMode';\n payload?: never;\n}\n\nexport interface SetLanguageAction {\n type: 'setLanguage';\n payload: {\n locale: string;\n };\n}\n\nexport interface SearchAction {\n type: 'search';\n payload: {\n query: string;\n scope?: string;\n };\n}\n\nexport interface FilterAction {\n type: 'filter';\n payload: {\n filterKey: string;\n filterValue: string;\n };\n}\n\nexport type Action =\n | AlertAction\n | ConsoleAction\n | FilterAction\n | NavigateAction\n | SearchAction\n | SetLanguageAction\n | ToggleDarkModeAction;\n\nexport type ManifestValue =\n | string\n | number\n | boolean\n | null\n | readonly ManifestValue[]\n | { readonly [key: string]: ManifestValue };\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']\n | CollectionItemPressEventDto['type']\n | FormSubmitEventDto['type'];\n\nexport type KnownComponentEventDto =\n | ButtonPressEventDto\n | CollectionItemPressEventDto\n | FormSubmitEventDto;\n\nexport const NAVIGATOR_TYPES = ['stack', 'tabs', 'drawer'] as const;\nexport type NavigatorType = (typeof NAVIGATOR_TYPES)[number];\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 DEPLOYMENT_TARGETS = ['minikube'] as const;\nexport type KnownDeploymentTarget = (typeof DEPLOYMENT_TARGETS)[number];\nexport type DeploymentTarget = KnownDeploymentTarget | (string & {});\n\nexport const DATABASE_PROVIDERS = ['supabase'] as const;\nexport type KnownDatabaseProvider = (typeof DATABASE_PROVIDERS)[number];\nexport type DatabaseProvider = KnownDatabaseProvider | (string & {});\n\nexport const DATABASE_TIERS = ['dev', 'prod'] as const;\nexport type DatabaseTier = (typeof DATABASE_TIERS)[number];\n\nexport const STORAGE_PROVIDERS = ['auto', 's3', 'r2'] as const;\nexport type StorageProvider = (typeof STORAGE_PROVIDERS)[number];\n\nexport const STATE_PROVIDERS = ['legend'] as const;\nexport type KnownStateProvider = (typeof STATE_PROVIDERS)[number];\nexport type StateProvider = KnownStateProvider | (string & {});\n\nexport const STATE_PERSISTENCE_MODES = ['none', 'local', 'secure', 'database'] as const;\nexport type StatePersistenceMode = (typeof STATE_PERSISTENCE_MODES)[number];\n\nexport const AUTHZ_KINDS = ['RBAC', 'ABAC'] as const;\nexport type AuthzKind = (typeof AUTHZ_KINDS)[number];\n\nexport const AUTHZ_ENGINES = ['cerbos', 'native'] as const;\nexport type AuthzEngine = (typeof AUTHZ_ENGINES)[number];\n\nexport const AUTH_SCOPES = ['global', 'none', 'integrated'] as const;\nexport type AuthScope = (typeof AUTH_SCOPES)[number];\n\nexport const AUTH_PROVIDERS = ['supabase'] as const;\nexport type KnownAuthProvider = (typeof AUTH_PROVIDERS)[number];\nexport type AuthProvider = KnownAuthProvider | (string & {});\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\nexport interface IconSpec {\n name: string;\n provider?: string;\n size?: number | string;\n color?: string;\n}\n\nexport interface UiNodeRepeatSpec {\n source: BindingValueSource;\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 ScreenSpec {\n id: string;\n name: string;\n title?: string;\n description?: string;\n root: UiNode;\n dataLoaders?: readonly ScreenDataLoaderDefinition[];\n requires?: ScreenRequirements;\n}\n\nexport interface NavigatorSpec {\n type: NavigatorType;\n initialRouteName?: string;\n routes: RouteDefinition[];\n options?: Record<string, unknown>;\n}\n\nexport interface RouteDefinition {\n name: string;\n path?: string;\n label?: string;\n icon?: IconSpec;\n hideInTabBar?: boolean;\n guards?: string[];\n screenId?: string;\n navigator?: NavigatorSpec;\n}\n\nexport type SplashScreenResizeMode = 'contain' | 'cover' | 'native';\n\nexport interface SplashScreenAssetSpec {\n readonly image?: string;\n readonly imageWidth?: number;\n readonly resizeMode?: SplashScreenResizeMode;\n}\n\nexport interface SplashScreenModeSpec extends SplashScreenAssetSpec {\n readonly backgroundColor?: string;\n}\n\nexport interface SplashScreenSpec extends SplashScreenModeSpec {\n readonly dark?: SplashScreenModeSpec;\n}\n\nexport interface DeploymentSpec {\n target: DeploymentTarget;\n monitoring: boolean;\n}\n\nexport interface DatabaseSpec {\n provider: DatabaseProvider;\n tier: DatabaseTier;\n}\n\nexport interface StorageSpec {\n provider: StorageProvider;\n buckets: string[];\n}\n\nexport interface StateSpec {\n readonly provider: StateProvider;\n readonly persistence?: StatePersistenceMode;\n}\n\nexport interface AuthzSpec {\n kind: AuthzKind;\n engine: AuthzEngine;\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 AuthSpec {\n scope: AuthScope;\n provider: AuthProvider;\n authorization?: AuthzSpec;\n flow?: AuthFlowConfig;\n signIn?: AuthSignInSpec;\n signUp?: AuthSignUpSpec;\n oauth?: AuthOAuthConfig;\n profile?: AuthProfileSpec;\n}\n\nexport interface NetworkingSpec {\n domain?: string;\n cdn: boolean;\n}\n\nexport interface InfraManifest {\n deployment?: DeploymentSpec;\n auth?: AuthSpec;\n database?: DatabaseSpec;\n storage?: StorageSpec;\n state?: StateSpec;\n networking?: NetworkingSpec;\n plugins: string[];\n pluginsConfig?: Record<string, unknown>;\n}\n\nexport interface AppSettings {\n apiBaseUrl?: string;\n localization: {\n defaultLocale: string;\n locales: string[];\n };\n}\n\nexport interface AppManifest {\n metadata: {\n name: string;\n slug: string;\n version: string;\n category: AppCategory;\n themeId: string;\n created?: string;\n updated?: string;\n };\n themes: ThemeConfig[];\n activeThemeId: string;\n activeThemeMode?: 'dark' | 'light';\n splashScreen?: SplashScreenSpec;\n infra: InfraManifest;\n navigator: NavigatorSpec;\n screens: Record<string, ScreenSpec>;\n generatedApis?: GeneratedApiRegistry;\n dataSources?: DataSourceRegistry;\n dataBindings?: ComponentDataBindingRegistry;\n settings: AppSettings;\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AC,UAAU,CAAU,CAAC;AAIpD,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 { AuthFlowConfig, AuthIdentifierKind, AuthOAuthConfig, AuthSignUpField } from './auth';\nimport type {\n BindingValueSource,\n ComponentDataBindingRegistry,\n ScreenDataLoaderDefinition,\n} from './bindings';\nimport type { DataSourceRegistry, GeneratedApiRegistry } from './data';\nimport type { ScreenRequirements } from './requirements';\n\nexport interface ThemeModeConfig {\n primaryColor: string;\n harmony: ColorHarmony;\n}\n\nexport interface ThemeConfig {\n id: string;\n name: string;\n light: ThemeModeConfig;\n dark: ThemeModeConfig;\n}\n\nexport type ActionType =\n | 'navigate'\n | 'alert'\n | 'console'\n | 'toggleDarkMode'\n | 'setLanguage'\n | 'search'\n | 'filter';\n\nexport interface NavigateAction {\n type: 'navigate';\n payload: {\n route: string;\n params?: Record<string, number | string>;\n };\n}\n\nexport interface AlertAction {\n type: 'alert';\n payload?: {\n message?: string;\n };\n}\n\nexport interface ConsoleAction {\n type: 'console';\n payload?: Record<string, unknown>;\n}\n\nexport interface ToggleDarkModeAction {\n type: 'toggleDarkMode';\n payload?: never;\n}\n\nexport interface SetLanguageAction {\n type: 'setLanguage';\n payload: {\n locale: string;\n };\n}\n\nexport interface SearchAction {\n type: 'search';\n payload: {\n query: string;\n scope?: string;\n };\n}\n\nexport interface FilterAction {\n type: 'filter';\n payload: {\n filterKey: string;\n filterValue: string;\n };\n}\n\nexport type Action =\n | AlertAction\n | ConsoleAction\n | FilterAction\n | NavigateAction\n | SearchAction\n | SetLanguageAction\n | ToggleDarkModeAction;\n\nexport type ManifestValue =\n | string\n | number\n | boolean\n | null\n | readonly ManifestValue[]\n | { readonly [key: string]: ManifestValue };\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']\n | CollectionItemPressEventDto['type']\n | FormSubmitEventDto['type'];\n\nexport type KnownComponentEventDto =\n | ButtonPressEventDto\n | CollectionItemPressEventDto\n | FormSubmitEventDto;\n\nexport const NAVIGATOR_TYPES = ['stack', 'tabs', 'drawer'] as const;\nexport type NavigatorType = (typeof NAVIGATOR_TYPES)[number];\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 DEPLOYMENT_TARGETS = ['minikube'] as const;\nexport type KnownDeploymentTarget = (typeof DEPLOYMENT_TARGETS)[number];\nexport type DeploymentTarget = KnownDeploymentTarget | (string & {});\n\nexport const DATABASE_PROVIDERS = ['supabase'] as const;\nexport type KnownDatabaseProvider = (typeof DATABASE_PROVIDERS)[number];\nexport type DatabaseProvider = KnownDatabaseProvider | (string & {});\n\nexport const DATABASE_TIERS = ['dev', 'prod'] as const;\nexport type DatabaseTier = (typeof DATABASE_TIERS)[number];\n\nexport const STORAGE_PROVIDERS = ['auto', 's3', 'r2'] as const;\nexport type StorageProvider = (typeof STORAGE_PROVIDERS)[number];\n\nexport const STATE_PROVIDERS = ['legend'] as const;\nexport type KnownStateProvider = (typeof STATE_PROVIDERS)[number];\nexport type StateProvider = KnownStateProvider | (string & {});\n\nexport const STATE_PERSISTENCE_MODES = ['none', 'local', 'secure', 'database'] as const;\nexport type StatePersistenceMode = (typeof STATE_PERSISTENCE_MODES)[number];\n\nexport const AUTHZ_KINDS = ['RBAC', 'ABAC'] as const;\nexport type AuthzKind = (typeof AUTHZ_KINDS)[number];\n\nexport const AUTHZ_ENGINES = ['cerbos', 'native'] as const;\nexport type AuthzEngine = (typeof AUTHZ_ENGINES)[number];\n\nexport const AUTH_SCOPES = ['global', 'none', 'integrated'] as const;\nexport type AuthScope = (typeof AUTH_SCOPES)[number];\n\nexport const AUTH_PROVIDERS = ['supabase'] as const;\nexport type KnownAuthProvider = (typeof AUTH_PROVIDERS)[number];\nexport type AuthProvider = KnownAuthProvider | (string & {});\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\nexport interface IconSpec {\n name: string;\n provider?: string;\n size?: number | string;\n color?: string;\n}\n\nexport interface UiNodeRepeatSpec {\n source: BindingValueSource;\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 ScreenSpec {\n id: string;\n name: string;\n title?: string;\n description?: string;\n root: UiNode;\n dataLoaders?: readonly ScreenDataLoaderDefinition[];\n requires?: ScreenRequirements;\n}\n\nexport interface NavigatorSpec {\n type: NavigatorType;\n initialRouteName?: string;\n routes: RouteDefinition[];\n options?: Record<string, unknown>;\n}\n\nexport interface RouteDefinition {\n name: string;\n path?: string;\n label?: string;\n icon?: IconSpec;\n /**\n * Whether this route appears in Tabs and Drawer primary navigation.\n *\n * Omitted routes are visible by default. Setting this to `false` hides the\n * route from primary navigation without making it unnavigable. Stack\n * navigators preserve the value but do not present primary navigation.\n */\n showInPrimaryNavigation?: boolean;\n guards?: string[];\n screenId?: string;\n navigator?: NavigatorSpec;\n}\n\nexport type SplashScreenResizeMode = 'contain' | 'cover' | 'native';\n\nexport interface SplashScreenAssetSpec {\n readonly image?: string;\n readonly imageWidth?: number;\n readonly resizeMode?: SplashScreenResizeMode;\n}\n\nexport interface SplashScreenModeSpec extends SplashScreenAssetSpec {\n readonly backgroundColor?: string;\n}\n\nexport interface SplashScreenSpec extends SplashScreenModeSpec {\n readonly dark?: SplashScreenModeSpec;\n}\n\nexport interface DeploymentSpec {\n target: DeploymentTarget;\n monitoring: boolean;\n}\n\nexport interface DatabaseSpec {\n provider: DatabaseProvider;\n tier: DatabaseTier;\n}\n\nexport interface StorageSpec {\n provider: StorageProvider;\n buckets: string[];\n}\n\nexport interface StateSpec {\n readonly provider: StateProvider;\n readonly persistence?: StatePersistenceMode;\n}\n\nexport interface AuthzSpec {\n kind: AuthzKind;\n engine: AuthzEngine;\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 AuthSpec {\n scope: AuthScope;\n provider: AuthProvider;\n authorization?: AuthzSpec;\n flow?: AuthFlowConfig;\n signIn?: AuthSignInSpec;\n signUp?: AuthSignUpSpec;\n oauth?: AuthOAuthConfig;\n profile?: AuthProfileSpec;\n}\n\nexport interface NetworkingSpec {\n domain?: string;\n cdn: boolean;\n}\n\nexport interface InfraManifest {\n deployment?: DeploymentSpec;\n auth?: AuthSpec;\n database?: DatabaseSpec;\n storage?: StorageSpec;\n state?: StateSpec;\n networking?: NetworkingSpec;\n modules: string[];\n modulesConfig?: Record<string, unknown>;\n}\n\nexport interface AppSettings {\n apiBaseUrl?: string;\n localization: {\n defaultLocale: string;\n locales: string[];\n };\n}\n\nexport interface AppManifest {\n metadata: {\n name: string;\n slug: string;\n version: string;\n category: AppCategory;\n themeId: string;\n created?: string;\n updated?: string;\n };\n themes: ThemeConfig[];\n activeThemeId: string;\n activeThemeMode?: 'dark' | 'light';\n splashScreen?: SplashScreenSpec;\n infra: InfraManifest;\n navigator: NavigatorSpec;\n screens: Record<string, ScreenSpec>;\n generatedApis?: GeneratedApiRegistry;\n dataSources?: DataSourceRegistry;\n dataBindings?: ComponentDataBindingRegistry;\n settings: AppSettings;\n}\n"]}
|
package/package.json
CHANGED
package/src/bindings.test.ts
CHANGED
package/src/contracts.test.ts
CHANGED
|
@@ -25,7 +25,9 @@ import {
|
|
|
25
25
|
DEPLOYMENT_TARGETS,
|
|
26
26
|
type FormSubmitEventDto,
|
|
27
27
|
type ImageAssetSource,
|
|
28
|
+
type InfraManifest,
|
|
28
29
|
NAVIGATOR_TYPES,
|
|
30
|
+
type RouteDefinition,
|
|
29
31
|
type SplashScreenSpec,
|
|
30
32
|
STATE_PERSISTENCE_MODES,
|
|
31
33
|
STATE_PROVIDERS,
|
|
@@ -115,6 +117,27 @@ describe('contracts', () => {
|
|
|
115
117
|
expect(category).toBe('developer_tools');
|
|
116
118
|
});
|
|
117
119
|
|
|
120
|
+
it('serializes canonical primary-navigation visibility on routes', () => {
|
|
121
|
+
const visibleRoute: RouteDefinition = {
|
|
122
|
+
name: 'home',
|
|
123
|
+
path: '/',
|
|
124
|
+
screenId: 'home-screen',
|
|
125
|
+
};
|
|
126
|
+
const hiddenRoute: RouteDefinition = {
|
|
127
|
+
name: 'settings',
|
|
128
|
+
path: '/settings',
|
|
129
|
+
screenId: 'settings-screen',
|
|
130
|
+
showInPrimaryNavigation: false,
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
expect(JSON.parse(JSON.stringify({ visibleRoute, hiddenRoute }))).toEqual({
|
|
134
|
+
visibleRoute,
|
|
135
|
+
hiddenRoute,
|
|
136
|
+
});
|
|
137
|
+
expect(visibleRoute.showInPrimaryNavigation).toBeUndefined();
|
|
138
|
+
expect(hiddenRoute.showInPrimaryNavigation).toBe(false);
|
|
139
|
+
});
|
|
140
|
+
|
|
118
141
|
it('accepts the current serialized theme config shape', () => {
|
|
119
142
|
const theme: ThemeConfig = {
|
|
120
143
|
id: 'theme-default',
|
|
@@ -220,18 +243,55 @@ describe('contracts', () => {
|
|
|
220
243
|
const manifest: Pick<AppManifest, 'infra'> = {
|
|
221
244
|
infra: {
|
|
222
245
|
state,
|
|
223
|
-
|
|
246
|
+
modules: [],
|
|
247
|
+
modulesConfig: {
|
|
248
|
+
localization: {
|
|
249
|
+
defaultLocale: 'en',
|
|
250
|
+
},
|
|
251
|
+
},
|
|
224
252
|
},
|
|
225
253
|
};
|
|
226
254
|
|
|
227
255
|
expect(JSON.parse(JSON.stringify(manifest))).toEqual({
|
|
228
256
|
infra: {
|
|
229
257
|
state,
|
|
230
|
-
|
|
258
|
+
modules: [],
|
|
259
|
+
modulesConfig: {
|
|
260
|
+
localization: {
|
|
261
|
+
defaultLocale: 'en',
|
|
262
|
+
},
|
|
263
|
+
},
|
|
231
264
|
},
|
|
232
265
|
});
|
|
233
266
|
});
|
|
234
267
|
|
|
268
|
+
it('exposes only canonical module fields without reserving external plugin terminology', () => {
|
|
269
|
+
type HasLegacyModules = 'plugins' extends keyof InfraManifest ? true : false;
|
|
270
|
+
type HasLegacyModulesConfig = 'pluginsConfig' extends keyof InfraManifest ? true : false;
|
|
271
|
+
|
|
272
|
+
const hasLegacyModules: HasLegacyModules = false;
|
|
273
|
+
const hasLegacyModulesConfig: HasLegacyModulesConfig = false;
|
|
274
|
+
const infra: InfraManifest = {
|
|
275
|
+
modules: ['expo-localization'],
|
|
276
|
+
modulesConfig: {
|
|
277
|
+
'expo-localization': {
|
|
278
|
+
defaultLocale: 'en',
|
|
279
|
+
locales: ['en', 'de'],
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
};
|
|
283
|
+
// `plugins` remains valid when it names an unrelated external ecosystem concept,
|
|
284
|
+
// such as Expo configuration plugins rather than Ankhorage Orchestrator modules.
|
|
285
|
+
const expoConfig: { plugins: string[] } = {
|
|
286
|
+
plugins: ['expo-router'],
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
expect(hasLegacyModules).toBe(false);
|
|
290
|
+
expect(hasLegacyModulesConfig).toBe(false);
|
|
291
|
+
expect(Object.keys(infra).sort()).toEqual(['modules', 'modulesConfig']);
|
|
292
|
+
expect(expoConfig.plugins).toEqual(['expo-router']);
|
|
293
|
+
});
|
|
294
|
+
|
|
235
295
|
it('ThemeModeConfig.harmony accepts all ColorHarmony values', () => {
|
|
236
296
|
for (const harmony of COLOR_HARMONIES) {
|
|
237
297
|
const config = { primaryColor: '#ff0000', harmony } satisfies ThemeModeConfig;
|
|
@@ -253,7 +313,7 @@ describe('contracts', () => {
|
|
|
253
313
|
expect(names.includes('color-theory.ts')).toBe(false);
|
|
254
314
|
});
|
|
255
315
|
|
|
256
|
-
it('removes
|
|
316
|
+
it('removes obsolete contract symbols from src recursively', async () => {
|
|
257
317
|
const banned = [
|
|
258
318
|
'Color' + 'Tone',
|
|
259
319
|
'color' + 'Tone',
|
|
@@ -263,6 +323,7 @@ describe('contracts', () => {
|
|
|
263
323
|
'APP_' + 'MOODS',
|
|
264
324
|
'suggested' + 'Color' + 'Tone',
|
|
265
325
|
'APP_CATEGORY_' + 'THEME_RECOMMENDATIONS',
|
|
326
|
+
'hide' + 'InTabBar',
|
|
266
327
|
];
|
|
267
328
|
|
|
268
329
|
const srcFiles = await collectTypeScriptFiles(join(process.cwd(), 'src'));
|
package/src/secrets.test.ts
CHANGED
package/src/types.ts
CHANGED
|
@@ -272,7 +272,14 @@ export interface RouteDefinition {
|
|
|
272
272
|
path?: string;
|
|
273
273
|
label?: string;
|
|
274
274
|
icon?: IconSpec;
|
|
275
|
-
|
|
275
|
+
/**
|
|
276
|
+
* Whether this route appears in Tabs and Drawer primary navigation.
|
|
277
|
+
*
|
|
278
|
+
* Omitted routes are visible by default. Setting this to `false` hides the
|
|
279
|
+
* route from primary navigation without making it unnavigable. Stack
|
|
280
|
+
* navigators preserve the value but do not present primary navigation.
|
|
281
|
+
*/
|
|
282
|
+
showInPrimaryNavigation?: boolean;
|
|
276
283
|
guards?: string[];
|
|
277
284
|
screenId?: string;
|
|
278
285
|
navigator?: NavigatorSpec;
|
|
@@ -360,8 +367,8 @@ export interface InfraManifest {
|
|
|
360
367
|
storage?: StorageSpec;
|
|
361
368
|
state?: StateSpec;
|
|
362
369
|
networking?: NetworkingSpec;
|
|
363
|
-
|
|
364
|
-
|
|
370
|
+
modules: string[];
|
|
371
|
+
modulesConfig?: Record<string, unknown>;
|
|
365
372
|
}
|
|
366
373
|
|
|
367
374
|
export interface AppSettings {
|