@stacksjs/actions 0.75.21 → 0.75.23

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.
@@ -10,7 +10,10 @@ export declare interface CraftIosConfig {
10
10
  version?: string
11
11
  buildNumber?: string
12
12
  darkMode?: boolean
13
+ appearance?: IosMobileConfig['appearance']
13
14
  backgroundColor?: string
15
+ backgroundColorDark?: string
16
+ swipeNavigation?: boolean
14
17
  iosVersion?: string
15
18
  watchosVersion?: string
16
19
  teamId?: string
@@ -1 +1 @@
1
- import{isAbsolute,resolve}from"node:path";const CAPABILITY_KEYS={speechRecognition:"enableSpeechRecognition",haptics:"enableHaptics",share:"enableShare",camera:"enableCamera",biometric:"enableBiometric",pushNotifications:"enablePushNotifications",secureStorage:"enableSecureStorage",geolocation:"enableGeolocation",backgroundLocation:"enableBackgroundLocation",clipboard:"enableClipboard",contacts:"enableContacts",calendar:"enableCalendar",localNotifications:"enableLocalNotifications",inAppPurchase:"enableInAppPurchase",keepAwake:"enableKeepAwake",orientationLock:"enableOrientationLock",deepLinks:"enableDeepLinks",qrScanner:"enableQRScanner",filePicker:"enableFilePicker",fileDownload:"enableFileDownload",socialAuth:"enableSocialAuth",audioRecording:"enableAudioRecording",videoRecording:"enableVideoRecording",motionSensors:"enableMotionSensors",localDatabase:"enableLocalDatabase",bluetooth:"enableBluetooth",nfc:"enableNFC",healthKit:"enableHealthKit",liveActivities:"enableLiveActivities",watchApp:"enableWatchApp",backgroundTasks:"enableBackgroundTasks",screenCapture:"enableScreenCapture",pdfViewer:"enablePDFViewer",augmentedReality:"enableAR",machineLearning:"enableMLKit"};export function normalizeMobileUrl(value){const input=value?.trim();if(!input)return;return new URL(/^https?:\/\//i.test(input)?input:`https://${input}`).toString().replace(/\/$/,"")}export function resolveMobilePath(root,value){if(!value)return;return isAbsolute(value)?value:resolve(root,value)}export function toCraftIosConfig(config){const devServerURL=normalizeMobileUrl(config.url),trustedOrigins=new Set(config.trustedOrigins??[]);if(devServerURL)trustedOrigins.add(new URL(devServerURL).origin);const craft={appName:config.appName,bundleId:config.bundleId,version:config.version,buildNumber:config.buildNumber,darkMode:config.darkMode,backgroundColor:config.backgroundColor,iosVersion:config.deploymentTarget,watchosVersion:config.watchDeploymentTarget,teamId:config.teamId,devServerURL,urlSchemes:config.urlSchemes,trustedOrigins:[...trustedOrigins],associatedDomains:config.associatedDomains,appGroups:config.appGroups,appIconPath:config.appIcon,privacy:config.privacy,orientations:config.orientations,deviceFamilies:config.deviceFamilies};for(const[key,nativeKey]of Object.entries(CAPABILITY_KEYS)){const enabled=config.capabilities?.[key];if(enabled!==void 0)craft[nativeKey]=enabled}if(config.capabilities?.backgroundLocation)craft.enableGeolocation=!0;return craft}export function validateIosMobileConfig(config){if(!config.appName?.trim())throw Error("config/mobile.ts must define ios.appName");if(!/^[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)+$/.test(config.bundleId))throw Error(`Invalid iOS bundle identifier: ${config.bundleId}`);if(config.url&&config.webAssets)throw Error("Choose either ios.url or ios.webAssets in config/mobile.ts, not both");if(!config.url&&!config.webAssets)throw Error("config/mobile.ts must define ios.url or ios.webAssets");if(config.fallbackWebAssets&&!config.url)throw Error("ios.fallbackWebAssets requires ios.url");if(config.deviceFamilies&&(config.deviceFamilies.length===0||config.deviceFamilies.some((family)=>family!=="iphone"&&family!=="ipad")))throw Error("ios.deviceFamilies must contain iphone and/or ipad");if(config.url){const url=new URL(normalizeMobileUrl(config.url)),isLocal=["localhost","127.0.0.1","::1"].includes(url.hostname);if(url.protocol!=="https:"&&!isLocal)throw Error("ios.url must use HTTPS outside local development")}for(const domain of config.associatedDomains??[])if(!/^(applinks|webcredentials|activitycontinuation):[^/\s]+$/.test(domain))throw Error(`Invalid iOS associated domain: ${domain}`);if(config.capabilities?.watchApp){const target=Number.parseFloat(config.watchDeploymentTarget??"9.0");if(!Number.isFinite(target)||target<9)throw Error("ios.watchDeploymentTarget must be watchOS 9.0 or newer")}}
1
+ import{isAbsolute,resolve}from"node:path";const CAPABILITY_KEYS={speechRecognition:"enableSpeechRecognition",haptics:"enableHaptics",share:"enableShare",camera:"enableCamera",biometric:"enableBiometric",pushNotifications:"enablePushNotifications",secureStorage:"enableSecureStorage",geolocation:"enableGeolocation",backgroundLocation:"enableBackgroundLocation",clipboard:"enableClipboard",contacts:"enableContacts",calendar:"enableCalendar",localNotifications:"enableLocalNotifications",inAppPurchase:"enableInAppPurchase",keepAwake:"enableKeepAwake",orientationLock:"enableOrientationLock",deepLinks:"enableDeepLinks",qrScanner:"enableQRScanner",filePicker:"enableFilePicker",fileDownload:"enableFileDownload",socialAuth:"enableSocialAuth",audioRecording:"enableAudioRecording",videoRecording:"enableVideoRecording",motionSensors:"enableMotionSensors",localDatabase:"enableLocalDatabase",bluetooth:"enableBluetooth",nfc:"enableNFC",healthKit:"enableHealthKit",liveActivities:"enableLiveActivities",watchApp:"enableWatchApp",backgroundTasks:"enableBackgroundTasks",screenCapture:"enableScreenCapture",pdfViewer:"enablePDFViewer",augmentedReality:"enableAR",machineLearning:"enableMLKit"};export function normalizeMobileUrl(value){const input=value?.trim();if(!input)return;return new URL(/^https?:\/\//i.test(input)?input:`https://${input}`).toString().replace(/\/$/,"")}export function resolveMobilePath(root,value){if(!value)return;return isAbsolute(value)?value:resolve(root,value)}export function toCraftIosConfig(config){const devServerURL=normalizeMobileUrl(config.url),trustedOrigins=new Set(config.trustedOrigins??[]);if(devServerURL)trustedOrigins.add(new URL(devServerURL).origin);const craft={appName:config.appName,bundleId:config.bundleId,version:config.version,buildNumber:config.buildNumber,darkMode:config.darkMode,appearance:config.appearance,backgroundColor:config.backgroundColor,backgroundColorDark:config.backgroundColorDark,swipeNavigation:config.swipeNavigation,iosVersion:config.deploymentTarget,watchosVersion:config.watchDeploymentTarget,teamId:config.teamId,devServerURL,urlSchemes:config.urlSchemes,trustedOrigins:[...trustedOrigins],associatedDomains:config.associatedDomains,appGroups:config.appGroups,appIconPath:config.appIcon,privacy:config.privacy,orientations:config.orientations,deviceFamilies:config.deviceFamilies};for(const[key,nativeKey]of Object.entries(CAPABILITY_KEYS)){const enabled=config.capabilities?.[key];if(enabled!==void 0)craft[nativeKey]=enabled}if(config.capabilities?.backgroundLocation)craft.enableGeolocation=!0;for(const key of Object.keys(craft))if(craft[key]===void 0)delete craft[key];return craft}export function validateIosMobileConfig(config){if(!config.appName?.trim())throw Error("config/mobile.ts must define ios.appName");if(!/^[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)+$/.test(config.bundleId))throw Error(`Invalid iOS bundle identifier: ${config.bundleId}`);if(config.url&&config.webAssets)throw Error("Choose either ios.url or ios.webAssets in config/mobile.ts, not both");if(!config.url&&!config.webAssets)throw Error("config/mobile.ts must define ios.url or ios.webAssets");if(config.fallbackWebAssets&&!config.url)throw Error("ios.fallbackWebAssets requires ios.url");if(config.deviceFamilies&&(config.deviceFamilies.length===0||config.deviceFamilies.some((family)=>family!=="iphone"&&family!=="ipad")))throw Error("ios.deviceFamilies must contain iphone and/or ipad");if(config.url){const url=new URL(normalizeMobileUrl(config.url)),isLocal=["localhost","127.0.0.1","::1"].includes(url.hostname);if(url.protocol!=="https:"&&!isLocal)throw Error("ios.url must use HTTPS outside local development")}for(const domain of config.associatedDomains??[])if(!/^(applinks|webcredentials|activitycontinuation):[^/\s]+$/.test(domain))throw Error(`Invalid iOS associated domain: ${domain}`);if(config.capabilities?.watchApp){const target=Number.parseFloat(config.watchDeploymentTarget??"9.0");if(!Number.isFinite(target)||target<9)throw Error("ios.watchDeploymentTarget must be watchOS 9.0 or newer")}}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/actions",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.21",
5
+ "version": "0.75.23",
6
6
  "description": "The Stacks actions.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -60,56 +60,56 @@
60
60
  "prepublishOnly": "bun run build"
61
61
  },
62
62
  "dependencies": {
63
- "@stacksjs/action-runner": "0.75.21",
64
- "@stacksjs/ai": "0.75.21",
65
- "@stacksjs/analytics": "0.75.21",
66
- "@stacksjs/api": "0.75.21",
67
- "@stacksjs/auth": "0.75.21",
68
- "@stacksjs/build": "0.75.21",
63
+ "@stacksjs/action-runner": "0.75.23",
64
+ "@stacksjs/ai": "0.75.23",
65
+ "@stacksjs/analytics": "0.75.23",
66
+ "@stacksjs/api": "0.75.23",
67
+ "@stacksjs/auth": "0.75.23",
68
+ "@stacksjs/build": "0.75.23",
69
69
  "@stacksjs/bumpx": "^0.2.6",
70
70
  "@stacksjs/bunpress": "^0.2.8",
71
- "@stacksjs/cli": "0.75.21",
72
- "@stacksjs/cloud": "0.75.21",
73
- "@stacksjs/cms": "0.75.21",
74
- "@stacksjs/components": "^0.2.325",
75
- "@stacksjs/config": "0.75.21",
76
- "@stacksjs/database": "0.75.21",
77
- "@stacksjs/desktop-build": "0.75.21",
78
- "@stacksjs/dns": "0.75.21",
79
- "@stacksjs/enums": "0.75.21",
80
- "@stacksjs/env": "0.75.21",
81
- "@stacksjs/error-handling": "0.75.21",
71
+ "@stacksjs/cli": "0.75.23",
72
+ "@stacksjs/cloud": "0.75.23",
73
+ "@stacksjs/cms": "0.75.23",
74
+ "@stacksjs/components": "^0.2.328",
75
+ "@stacksjs/config": "0.75.23",
76
+ "@stacksjs/database": "0.75.23",
77
+ "@stacksjs/desktop-build": "0.75.23",
78
+ "@stacksjs/dns": "0.75.23",
79
+ "@stacksjs/enums": "0.75.23",
80
+ "@stacksjs/env": "0.75.23",
81
+ "@stacksjs/error-handling": "0.75.23",
82
82
  "@stacksjs/gitit": "^0.2.5",
83
- "@stacksjs/i18n": "0.75.21",
84
- "@stacksjs/image": "0.75.21",
85
- "@stacksjs/logging": "0.75.21",
83
+ "@stacksjs/i18n": "0.75.23",
84
+ "@stacksjs/image": "0.75.23",
85
+ "@stacksjs/logging": "0.75.23",
86
86
  "@stacksjs/logsmith": "^0.2.3",
87
- "@stacksjs/orm": "0.75.21",
88
- "@stacksjs/path": "0.75.21",
89
- "@stacksjs/payments": "0.75.21",
90
- "@stacksjs/queue": "0.75.21",
91
- "@stacksjs/registry": "0.75.21",
92
- "@stacksjs/router": "0.75.21",
87
+ "@stacksjs/orm": "0.75.23",
88
+ "@stacksjs/path": "0.75.23",
89
+ "@stacksjs/payments": "0.75.23",
90
+ "@stacksjs/queue": "0.75.23",
91
+ "@stacksjs/registry": "0.75.23",
92
+ "@stacksjs/router": "0.75.23",
93
93
  "@stacksjs/rpx": "^0.11.54",
94
- "@stacksjs/scheduler": "0.75.21",
95
- "@stacksjs/search-engine": "0.75.21",
96
- "@stacksjs/security": "0.75.21",
97
- "@stacksjs/server": "0.75.21",
98
- "@stacksjs/sites": "0.75.21",
99
- "@stacksjs/storage": "0.75.21",
100
- "@stacksjs/strings": "0.75.21",
101
- "@stacksjs/stx": "^0.2.325",
94
+ "@stacksjs/scheduler": "0.75.23",
95
+ "@stacksjs/search-engine": "0.75.23",
96
+ "@stacksjs/security": "0.75.23",
97
+ "@stacksjs/server": "0.75.23",
98
+ "@stacksjs/sites": "0.75.23",
99
+ "@stacksjs/storage": "0.75.23",
100
+ "@stacksjs/strings": "0.75.23",
101
+ "@stacksjs/stx": "^0.2.328",
102
102
  "@stacksjs/tlsx": "^0.13.19",
103
103
  "@stacksjs/ts-cloud": "^0.16.15",
104
104
  "@stacksjs/ts-md": "^0.1.1",
105
- "@stacksjs/tunnel": "0.75.21",
106
- "@stacksjs/types": "0.75.21",
107
- "@stacksjs/utils": "0.75.21",
108
- "@stacksjs/whois": "0.75.21",
109
- "bun-plugin-stx": "^0.2.324"
105
+ "@stacksjs/tunnel": "0.75.23",
106
+ "@stacksjs/types": "0.75.23",
107
+ "@stacksjs/utils": "0.75.23",
108
+ "@stacksjs/whois": "0.75.23",
109
+ "bun-plugin-stx": "^0.2.328"
110
110
  },
111
111
  "peerDependencies": {
112
- "craft-native": ">=0.0.72",
112
+ "craft-native": ">=0.0.100",
113
113
  "pickier": "^0.1.58"
114
114
  },
115
115
  "peerDependenciesMeta": {
@@ -121,7 +121,7 @@
121
121
  }
122
122
  },
123
123
  "devDependencies": {
124
- "@stacksjs/validation": "0.75.21",
124
+ "@stacksjs/validation": "0.75.23",
125
125
  "better-dx": "^0.2.24"
126
126
  }
127
127
  }