@stacksjs/actions 0.75.336 → 0.75.339
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build/ios-config.d.ts +1 -0
- package/dist/build/ios-config.js +1 -1
- package/dist/build/ios.js +1 -1
- package/dist/helpers/api-shutdown.d.ts +16 -0
- package/dist/helpers/api-shutdown.js +1 -0
- package/dist/serve/api.js +1 -1
- package/dist/upgrade/framework.js +1 -1
- package/dist/upgrade/packages.d.ts +7 -0
- package/dist/upgrade/packages.js +5 -2
- package/package.json +40 -40
|
@@ -125,6 +125,7 @@ export declare interface CraftIosConfig {
|
|
|
125
125
|
darkMode?: boolean
|
|
126
126
|
appearance?: IosMobileConfig['appearance']
|
|
127
127
|
backgroundColor?: string
|
|
128
|
+
tintColor?: string
|
|
128
129
|
backgroundColorDark?: string
|
|
129
130
|
swipeNavigation?: boolean
|
|
130
131
|
allowsLinkPreview?: boolean
|
package/dist/build/ios-config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{existsSync,readFileSync,writeFileSync}from"node:fs";import{isAbsolute,join,relative,resolve}from"node:path";import{spotlightActivityTypes}from"@stacksjs/mobile";import{nativeScreenRoutes}from"./native-screens";export const NATIVE_APP_ROUTE="__app";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",localNetwork:"enableLocalNetwork",filePicker:"enableFilePicker",fileDownload:"enableFileDownload",socialAuth:"enableSocialAuth",audioRecording:"enableAudioRecording",videoRecording:"enableVideoRecording",motionSensors:"enableMotionSensors",localDatabase:"enableLocalDatabase",bluetooth:"enableBluetooth",nfc:"enableNFC",healthKit:"enableHealthKit",appleMusic:"enableAppleMusic",heartRate:"enableHeartRate",backgroundAudio:"enableBackgroundAudio",scheduledWorkouts:"enableScheduledWorkouts",liveActivities:"enableLiveActivities",watchApp:"enableWatchApp",backgroundTasks:"enableBackgroundTasks",screenCapture:"enableScreenCapture",pdfViewer:"enablePDFViewer",augmentedReality:"enableAR",machineLearning:"enableMLKit"};export const CRAFT_CAPABILITY_FLOORS={audioRecording:"0.0.324",appleMusic:"0.0.144",heartRate:"0.0.152",backgroundAudio:"0.0.162",scheduledWorkouts:"0.0.163"};export function unsupportedCraftCapabilities(capabilities,version){const missing=[];for(const[capability,needs]of Object.entries(CRAFT_CAPABILITY_FLOORS))if(capabilities?.[capability]&&!Bun.semver.satisfies(version,`>=${needs}`))missing.push({capability,needs});return missing}export function assertCraftSupportsCapabilities(capabilities,version,source){const missing=unsupportedCraftCapabilities(capabilities,version);if(missing.length===0)return;const needed=missing.reduce((max,{needs})=>Bun.semver.order(needs,max)>0?needs:max,"0.0.0");throw Error(`The Craft iOS builder is craft-native ${version} (${source}), which would build the app without ${missing.map(({capability,needs})=>`ios.capabilities.${capability} (needs >= ${needs})`).join(", ")}. Install craft-native >= ${needed}: look for an older copy nested under @stacksjs/mobile in bun.lock, or raise the app's own craft-native pin.`)}export const CRAFT_CRASH_REPORTING_FLOOR="0.0.179";export function resolveCrashReporting(shared,platform){const set=(config)=>Object.fromEntries(Object.entries(config??{}).filter(([,value])=>value!==void 0&&value!=="")),merged={...set(shared),...set(platform)};if(!merged.key?.trim())return;if(merged.host){const url=new URL(normalizeMobileUrl(merged.host)),local=["localhost","127.0.0.1","::1","10.0.2.2"].includes(url.hostname);if(url.protocol!=="https:"&&!local)throw Error("crashReporting.host must use HTTPS outside local development");merged.host=url.origin}return merged}export function toCraftCrashReporting(config){if(!config?.key)return;const craft={key:config.key,host:config.host,environment:config.environment,release:config.release,sessions:config.sessions};for(const key of Object.keys(craft))if(craft[key]===void 0)delete craft[key];return craft}export function assertCraftSupportsCrashReporting(config,version,source){if(!config?.key||Bun.semver.satisfies(version,`>=${CRAFT_CRASH_REPORTING_FLOOR}`))return;throw Error(`The Craft builder is craft-native ${version} (${source}), which would build the app without crash reporting (crashReporting needs >= ${CRAFT_CRASH_REPORTING_FLOOR}). Install craft-native >= ${CRAFT_CRASH_REPORTING_FLOOR}: look for an older copy nested under @stacksjs/mobile in bun.lock, or raise the app's own craft-native pin.`)}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 portablePaths(value,projectDir,appRoot){if(typeof value==="string")return isAbsolute(value)&&!relative(appRoot,value).startsWith("..")?relative(projectDir,value)||".":value;if(Array.isArray(value))return value.map((item)=>portablePaths(item,projectDir,appRoot));if(value&&typeof value==="object"){const out={};for(const[key,item]of Object.entries(value))out[key]=typeof item==="string"&&!/(?:path(?:dark)?|bundle)$|^(?:src|license)$/i.test(key)?item:portablePaths(item,projectDir,appRoot);return out}return value}export function resolveMobilePath(root,value){if(!value)return;return isAbsolute(value)?value:resolve(root,value)}export function resolveSwipeNavigation(config){if(config.swipeNavigation!==void 0)return config.swipeNavigation;return config.swipeBack==="webview"}export function toCraftIosConfig(config){const devServerURL=normalizeMobileUrl(config.url),trustedOrigins=new Set(config.trustedOrigins??[]);if(devServerURL)trustedOrigins.add(new URL(devServerURL).origin);const declaresAppBoundDomains=(config.appBoundDomains?.length??0)>0,craft={nativeFonts:config.nativeFonts,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:resolveSwipeNavigation(config),allowsLinkPreview:config.allowsLinkPreview,keyboardAccessory:config.keyboardAccessory,disableZoom:config.disableZoom,splashMaxSeconds:config.splashMaxSeconds,requestTimeoutSeconds:config.requestTimeoutSeconds,backgroundRefresh:config.backgroundRefresh,iosVersion:config.deploymentTarget,watchosVersion:config.watchDeploymentTarget,teamId:config.teamId,devServerURL,urlSchemes:config.urlSchemes,appShortcuts:config.appShortcuts,trustedOrigins:[...trustedOrigins],appBoundDomains:config.appBoundDomains,limitNavigationsToAppBoundDomains:config.limitNavigationsToAppBoundDomains??(declaresAppBoundDomains||void 0),associatedDomains:config.associatedDomains,renderer:config.renderer,nativeScreens:nativeScreenRoutes(config),nativeApp:config.nativeApp?NATIVE_APP_ROUTE:void 0,nativeScriptThread:config.nativeScriptThread,tabs:config.tabs,shareStorage:config.shareStorage,appGroups:config.appGroups,appIconPath:config.appIcon,privacy:config.privacy,usageDescriptions:config.usageDescriptions,orientations:config.orientations,deviceFamilies:config.deviceFamilies,crashReporting:toCraftCrashReporting(config.crashReporting)};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.renderer!==void 0&&config.renderer!=="web"&&config.renderer!=="native")throw Error(`ios.renderer must be 'web' or 'native', not ${String(config.renderer)}`);if(config.renderer==="native"){if(!Object.keys(config.nativeScreens??{}).length)throw Error("ios.renderer 'native' draws every screen natively: list them in ios.nativeScreens");if(config.webAssets)throw Error("ios.renderer 'native' has no web view to show ios.webAssets in: set ios.url to the app's site instead");if(config.fallbackWebAssets)throw Error("ios.fallbackWebAssets is the web view's offline page; ios.renderer 'native' has no web view")}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}`);for(const key of["splashMaxSeconds","requestTimeoutSeconds"]){const value=config[key];if(value!==void 0&&(!Number.isFinite(value)||value<=0))throw Error(`ios.${key} must be a positive number of seconds`)}const refresh=config.backgroundRefresh;if(refresh){if(refresh.identifier!==void 0&&!/^[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)+$/.test(refresh.identifier))throw Error(`Invalid iOS background refresh identifier: ${refresh.identifier}`);if(refresh.minimumIntervalMinutes!==void 0&&(!Number.isFinite(refresh.minimumIntervalMinutes)||refresh.minimumIntervalMinutes<=0))throw Error("ios.backgroundRefresh.minimumIntervalMinutes must be a positive number of minutes")}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")}}const ACTIVITY_TYPES_BLOCK=/[ \t]*<key>NSUserActivityTypes<\/key>\s*<array>[\s\S]*?<\/array>\n?/;export function withActivityTypes(plist,types){const entries=types.map((type)=>` <string>${escapeXml(type)}</string>`).join(`
|
|
1
|
+
import{existsSync,readFileSync,writeFileSync}from"node:fs";import{isAbsolute,join,relative,resolve}from"node:path";import{spotlightActivityTypes}from"@stacksjs/mobile";import{nativeScreenRoutes}from"./native-screens";export const NATIVE_APP_ROUTE="__app";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",localNetwork:"enableLocalNetwork",filePicker:"enableFilePicker",fileDownload:"enableFileDownload",socialAuth:"enableSocialAuth",audioRecording:"enableAudioRecording",videoRecording:"enableVideoRecording",motionSensors:"enableMotionSensors",localDatabase:"enableLocalDatabase",bluetooth:"enableBluetooth",nfc:"enableNFC",healthKit:"enableHealthKit",appleMusic:"enableAppleMusic",heartRate:"enableHeartRate",backgroundAudio:"enableBackgroundAudio",scheduledWorkouts:"enableScheduledWorkouts",liveActivities:"enableLiveActivities",watchApp:"enableWatchApp",backgroundTasks:"enableBackgroundTasks",screenCapture:"enableScreenCapture",pdfViewer:"enablePDFViewer",augmentedReality:"enableAR",machineLearning:"enableMLKit"};export const CRAFT_CAPABILITY_FLOORS={audioRecording:"0.0.324",appleMusic:"0.0.144",heartRate:"0.0.152",backgroundAudio:"0.0.162",scheduledWorkouts:"0.0.163"};export function unsupportedCraftCapabilities(capabilities,version){const missing=[];for(const[capability,needs]of Object.entries(CRAFT_CAPABILITY_FLOORS))if(capabilities?.[capability]&&!Bun.semver.satisfies(version,`>=${needs}`))missing.push({capability,needs});return missing}export function assertCraftSupportsCapabilities(capabilities,version,source){const missing=unsupportedCraftCapabilities(capabilities,version);if(missing.length===0)return;const needed=missing.reduce((max,{needs})=>Bun.semver.order(needs,max)>0?needs:max,"0.0.0");throw Error(`The Craft iOS builder is craft-native ${version} (${source}), which would build the app without ${missing.map(({capability,needs})=>`ios.capabilities.${capability} (needs >= ${needs})`).join(", ")}. Install craft-native >= ${needed}: look for an older copy nested under @stacksjs/mobile in bun.lock, or raise the app's own craft-native pin.`)}export const CRAFT_CRASH_REPORTING_FLOOR="0.0.179";export function resolveCrashReporting(shared,platform){const set=(config)=>Object.fromEntries(Object.entries(config??{}).filter(([,value])=>value!==void 0&&value!=="")),merged={...set(shared),...set(platform)};if(!merged.key?.trim())return;if(merged.host){const url=new URL(normalizeMobileUrl(merged.host)),local=["localhost","127.0.0.1","::1","10.0.2.2"].includes(url.hostname);if(url.protocol!=="https:"&&!local)throw Error("crashReporting.host must use HTTPS outside local development");merged.host=url.origin}return merged}export function toCraftCrashReporting(config){if(!config?.key)return;const craft={key:config.key,host:config.host,environment:config.environment,release:config.release,sessions:config.sessions};for(const key of Object.keys(craft))if(craft[key]===void 0)delete craft[key];return craft}export function assertCraftSupportsCrashReporting(config,version,source){if(!config?.key||Bun.semver.satisfies(version,`>=${CRAFT_CRASH_REPORTING_FLOOR}`))return;throw Error(`The Craft builder is craft-native ${version} (${source}), which would build the app without crash reporting (crashReporting needs >= ${CRAFT_CRASH_REPORTING_FLOOR}). Install craft-native >= ${CRAFT_CRASH_REPORTING_FLOOR}: look for an older copy nested under @stacksjs/mobile in bun.lock, or raise the app's own craft-native pin.`)}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 portablePaths(value,projectDir,appRoot){if(typeof value==="string")return isAbsolute(value)&&!relative(appRoot,value).startsWith("..")?relative(projectDir,value)||".":value;if(Array.isArray(value))return value.map((item)=>portablePaths(item,projectDir,appRoot));if(value&&typeof value==="object"){const out={};for(const[key,item]of Object.entries(value))out[key]=typeof item==="string"&&!/(?:path(?:dark)?|bundle)$|^(?:src|license)$/i.test(key)?item:portablePaths(item,projectDir,appRoot);return out}return value}export function resolveMobilePath(root,value){if(!value)return;return isAbsolute(value)?value:resolve(root,value)}export function resolveSwipeNavigation(config){if(config.swipeNavigation!==void 0)return config.swipeNavigation;return config.swipeBack==="webview"}export function toCraftIosConfig(config){const devServerURL=normalizeMobileUrl(config.url),trustedOrigins=new Set(config.trustedOrigins??[]);if(devServerURL)trustedOrigins.add(new URL(devServerURL).origin);const declaresAppBoundDomains=(config.appBoundDomains?.length??0)>0,craft={nativeFonts:config.nativeFonts,appName:config.appName,bundleId:config.bundleId,version:config.version,buildNumber:config.buildNumber,darkMode:config.darkMode,appearance:config.appearance,backgroundColor:config.backgroundColor,tintColor:config.tintColor,backgroundColorDark:config.backgroundColorDark,swipeNavigation:resolveSwipeNavigation(config),allowsLinkPreview:config.allowsLinkPreview,keyboardAccessory:config.keyboardAccessory,disableZoom:config.disableZoom,splashMaxSeconds:config.splashMaxSeconds,requestTimeoutSeconds:config.requestTimeoutSeconds,backgroundRefresh:config.backgroundRefresh,iosVersion:config.deploymentTarget,watchosVersion:config.watchDeploymentTarget,teamId:config.teamId,devServerURL,urlSchemes:config.urlSchemes,appShortcuts:config.appShortcuts,trustedOrigins:[...trustedOrigins],appBoundDomains:config.appBoundDomains,limitNavigationsToAppBoundDomains:config.limitNavigationsToAppBoundDomains??(declaresAppBoundDomains||void 0),associatedDomains:config.associatedDomains,renderer:config.renderer,nativeScreens:nativeScreenRoutes(config),nativeApp:config.nativeApp?NATIVE_APP_ROUTE:void 0,nativeScriptThread:config.nativeScriptThread,tabs:config.tabs,shareStorage:config.shareStorage,appGroups:config.appGroups,appIconPath:config.appIcon,privacy:config.privacy,usageDescriptions:config.usageDescriptions,orientations:config.orientations,deviceFamilies:config.deviceFamilies,crashReporting:toCraftCrashReporting(config.crashReporting)};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.renderer!==void 0&&config.renderer!=="web"&&config.renderer!=="native")throw Error(`ios.renderer must be 'web' or 'native', not ${String(config.renderer)}`);if(config.renderer==="native"){if(!Object.keys(config.nativeScreens??{}).length)throw Error("ios.renderer 'native' draws every screen natively: list them in ios.nativeScreens");if(config.webAssets)throw Error("ios.renderer 'native' has no web view to show ios.webAssets in: set ios.url to the app's site instead");if(config.fallbackWebAssets)throw Error("ios.fallbackWebAssets is the web view's offline page; ios.renderer 'native' has no web view")}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}`);for(const key of["splashMaxSeconds","requestTimeoutSeconds"]){const value=config[key];if(value!==void 0&&(!Number.isFinite(value)||value<=0))throw Error(`ios.${key} must be a positive number of seconds`)}const refresh=config.backgroundRefresh;if(refresh){if(refresh.identifier!==void 0&&!/^[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)+$/.test(refresh.identifier))throw Error(`Invalid iOS background refresh identifier: ${refresh.identifier}`);if(refresh.minimumIntervalMinutes!==void 0&&(!Number.isFinite(refresh.minimumIntervalMinutes)||refresh.minimumIntervalMinutes<=0))throw Error("ios.backgroundRefresh.minimumIntervalMinutes must be a positive number of minutes")}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")}}const ACTIVITY_TYPES_BLOCK=/[ \t]*<key>NSUserActivityTypes<\/key>\s*<array>[\s\S]*?<\/array>\n?/;export function withActivityTypes(plist,types){const entries=types.map((type)=>` <string>${escapeXml(type)}</string>`).join(`
|
|
2
2
|
`),block=types.length===0?"":` <key>NSUserActivityTypes</key>
|
|
3
3
|
<array>
|
|
4
4
|
${entries}
|
package/dist/build/ios.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{existsSync,readFileSync,writeFileSync}from"node:fs";import{pathToFileURL}from"node:url";import process from"node:process";import{log}from"@stacksjs/cli";import{projectPath,storagePath}from"@stacksjs/path";import{craftBuilderSpecifier,craftBuilderVersion}from"./craft-entry";import{resolveCraftBuilderProvenance}from"./craft-provenance";import{assertCraftSupportsAppShortcuts,assertCraftSupportsCapabilities,assertCraftSupportsCrashReporting,portablePaths,resolveCrashReporting,resolveMobilePath,resolveNativeFonts,assertCraftSupportsNativeFonts,toCraftIosConfig,validateIosMobileConfig,writeIosActivityTypes}from"./ios-config";import{generateXcodeProject,resolveXcodegen}from"./ios-toolchain";import{compileNativeScreens}from"./native-screens";import{writeIosShellSupport}from"./ios-shell";import{reportMobileBuildTarget}from"./mobile-target";process.exitCode=1;function craftIosEntry(){const explicit=process.env.CRAFT_IOS_SRC;return explicit?pathToFileURL(explicit).href:craftBuilderSpecifier("ios",projectPath())}async function loadCraftIosBuilder(){try{return await import(craftIosEntry())}catch(error){throw Error("Craft iOS builder is unavailable. Install the current craft-native package or set CRAFT_IOS_SRC to packages/ios/src/index.ts in a Craft checkout.",{cause:error})}}const configPath=projectPath("config/mobile.ts");if(!existsSync(configPath))throw Error("Missing config/mobile.ts. Add an ios section before running `buddy build:ios`.");const configModule=await import(`${pathToFileURL(configPath).href}?t=${Date.now()}`),mobile=configModule.default,config=mobile.ios;validateIosMobileConfig(config);if(config.swipeNavigation===!0&&config.swipeBack!=="webview")log.warn("ios.swipeNavigation turns on WebKit's edge swipe alongside the stx router's own. Remove it, or set ios.swipeBack: 'webview' for an app not on the router.");const output=resolveMobilePath(projectPath(),config.output)??storagePath("framework/mobile/ios"),generateProject=process.env.STACKS_IOS_SKIP_XCODEGEN!=="1",xcodegen=generateProject?await resolveXcodegen(projectPath()):null,webAssets=resolveMobilePath(projectPath(),config.webAssets),fallbackWebAssets=resolveMobilePath(projectPath(),config.fallbackWebAssets),crashReporting=resolveCrashReporting(mobile.crashReporting,config.crashReporting),craftConfig=toCraftIosConfig({...config,crashReporting});craftConfig.nativeFonts=resolveNativeFonts(config.nativeFonts,projectPath());craftConfig.appIconPath=resolveMobilePath(projectPath(),config.appIcon);craftConfig.splashImagePath=resolveMobilePath(projectPath(),config.splash?.image);craftConfig.splashImagePathDark=resolveMobilePath(projectPath(),config.splash?.imageDark);const builder=await loadCraftIosBuilder(),nativeBundle=await compileNativeScreens(config,projectPath(),output,void 0,"ios",{routes:builder.nativeRouteBundles===!0,runtime:builder.nativeRouteRuntime===!0,messages:builder.nativeMessages===!0});if(nativeBundle){craftConfig.nativeBundle=nativeBundle.outFile;for(const diagnostic of nativeBundle.diagnostics??[])log.warn(`${diagnostic.file?`${diagnostic.file}: `:""}${diagnostic.message}`);log.info(`Compiled ${Object.keys(config.nativeScreens??{}).length} native screen path(s) into ${nativeBundle.outFile}`)}const craftVersion=craftBuilderVersion(craftIosEntry(),projectPath());assertCraftSupportsNativeFonts(config.nativeFonts,craftVersion?.version);assertCraftSupportsAppShortcuts(config.appShortcuts,craftVersion?.version);if(craftVersion){assertCraftSupportsCapabilities(config.capabilities,craftVersion.version,craftVersion.manifest);assertCraftSupportsCrashReporting(crashReporting,craftVersion.version,craftVersion.manifest)}else log.warn(`Could not read the craft-native version behind ${craftIosEntry()}, so the build cannot check that it supports every capability config/mobile.ts turns on.`);await builder.init({name:config.appName,bundleId:config.bundleId,teamId:config.teamId,output,config:craftConfig});const native=config.renderer==="native";if(native&&!nativeBundle)throw Error("ios.renderer 'native' needs native screens to draw: list them in ios.nativeScreens");reportMobileBuildTarget({renderer:config.renderer,site:craftConfig.devServerURL,nativeBundle:nativeBundle?.outFile,webAssets,fallbackWebAssets,production:process.env.NODE_ENV==="production"},log);await builder.build(native?{output,nativeBundlePath:nativeBundle.outFile,generateProject:!1}:{output,htmlPath:webAssets??fallbackWebAssets,devServer:craftConfig.devServerURL,generateProject:!1});if(xcodegen){generateXcodeProject(xcodegen,output);log.info(`Generated the Xcode project with xcodegen ${xcodegen.version} from Pantry`)}writeIosShellSupport(output,config,void 0,crashReporting);if(crashReporting)log.info(`Crash reporting to ${crashReporting.host??"https://bughq.org"}${crashReporting.uploadSymbols===!1?"":": dSYMs upload from Xcode Cloud when BUGHQ_UPLOAD_TOKEN is set in the workflow"}`);const activityTypes=writeIosActivityTypes(output,mobile);if(activityTypes)log.info(`Declared ${activityTypes.length} activity types, so a tapped Spotlight or Siri entry reaches the app`);const sourceRevision=Bun.spawnSync(["git","rev-parse","HEAD"],{cwd:projectPath()}).stdout.toString().trim(),craftConfigPath=`${output}/craft.config.json`,generatedConfig=portablePaths(JSON.parse(readFileSync(craftConfigPath,"utf8")),output,projectPath());writeFileSync(craftConfigPath,`${JSON.stringify(generatedConfig,null,2)}
|
|
1
|
+
import{existsSync,readFileSync,writeFileSync}from"node:fs";import{pathToFileURL}from"node:url";import process from"node:process";import{log}from"@stacksjs/cli";import{applyWithheldEnv}from"@stacksjs/env";import{projectPath,storagePath}from"@stacksjs/path";import{craftBuilderSpecifier,craftBuilderVersion}from"./craft-entry";import{resolveCraftBuilderProvenance}from"./craft-provenance";import{assertCraftSupportsAppShortcuts,assertCraftSupportsCapabilities,assertCraftSupportsCrashReporting,portablePaths,resolveCrashReporting,resolveMobilePath,resolveNativeFonts,assertCraftSupportsNativeFonts,toCraftIosConfig,validateIosMobileConfig,writeIosActivityTypes}from"./ios-config";import{generateXcodeProject,resolveXcodegen}from"./ios-toolchain";import{compileNativeScreens}from"./native-screens";import{writeIosShellSupport}from"./ios-shell";import{reportMobileBuildTarget}from"./mobile-target";process.exitCode=1;function craftIosEntry(){const explicit=process.env.CRAFT_IOS_SRC;return explicit?pathToFileURL(explicit).href:craftBuilderSpecifier("ios",projectPath())}async function loadCraftIosBuilder(){try{return await import(craftIosEntry())}catch(error){throw Error("Craft iOS builder is unavailable. Install the current craft-native package or set CRAFT_IOS_SRC to packages/ios/src/index.ts in a Craft checkout.",{cause:error})}}const configPath=projectPath("config/mobile.ts");if(!existsSync(configPath))throw Error("Missing config/mobile.ts. Add an ios section before running `buddy build:ios`.");applyWithheldEnv();const configModule=await import(`${pathToFileURL(configPath).href}?t=${Date.now()}`),mobile=configModule.default,config=mobile.ios;validateIosMobileConfig(config);if(config.swipeNavigation===!0&&config.swipeBack!=="webview")log.warn("ios.swipeNavigation turns on WebKit's edge swipe alongside the stx router's own. Remove it, or set ios.swipeBack: 'webview' for an app not on the router.");const output=resolveMobilePath(projectPath(),config.output)??storagePath("framework/mobile/ios"),generateProject=process.env.STACKS_IOS_SKIP_XCODEGEN!=="1",xcodegen=generateProject?await resolveXcodegen(projectPath()):null,webAssets=resolveMobilePath(projectPath(),config.webAssets),fallbackWebAssets=resolveMobilePath(projectPath(),config.fallbackWebAssets),crashReporting=resolveCrashReporting(mobile.crashReporting,config.crashReporting),craftConfig=toCraftIosConfig({...config,crashReporting});craftConfig.nativeFonts=resolveNativeFonts(config.nativeFonts,projectPath());craftConfig.appIconPath=resolveMobilePath(projectPath(),config.appIcon);craftConfig.splashImagePath=resolveMobilePath(projectPath(),config.splash?.image);craftConfig.splashImagePathDark=resolveMobilePath(projectPath(),config.splash?.imageDark);const builder=await loadCraftIosBuilder(),nativeBundle=await compileNativeScreens(config,projectPath(),output,void 0,"ios",{routes:builder.nativeRouteBundles===!0,runtime:builder.nativeRouteRuntime===!0,messages:builder.nativeMessages===!0});if(nativeBundle){craftConfig.nativeBundle=nativeBundle.outFile;for(const diagnostic of nativeBundle.diagnostics??[])log.warn(`${diagnostic.file?`${diagnostic.file}: `:""}${diagnostic.message}`);log.info(`Compiled ${Object.keys(config.nativeScreens??{}).length} native screen path(s) into ${nativeBundle.outFile}`)}const craftVersion=craftBuilderVersion(craftIosEntry(),projectPath());assertCraftSupportsNativeFonts(config.nativeFonts,craftVersion?.version);assertCraftSupportsAppShortcuts(config.appShortcuts,craftVersion?.version);if(craftVersion){assertCraftSupportsCapabilities(config.capabilities,craftVersion.version,craftVersion.manifest);assertCraftSupportsCrashReporting(crashReporting,craftVersion.version,craftVersion.manifest)}else log.warn(`Could not read the craft-native version behind ${craftIosEntry()}, so the build cannot check that it supports every capability config/mobile.ts turns on.`);await builder.init({name:config.appName,bundleId:config.bundleId,teamId:config.teamId,output,config:craftConfig});const native=config.renderer==="native";if(native&&!nativeBundle)throw Error("ios.renderer 'native' needs native screens to draw: list them in ios.nativeScreens");reportMobileBuildTarget({renderer:config.renderer,site:craftConfig.devServerURL,nativeBundle:nativeBundle?.outFile,webAssets,fallbackWebAssets,production:process.env.NODE_ENV==="production"},log);await builder.build(native?{output,nativeBundlePath:nativeBundle.outFile,generateProject:!1}:{output,htmlPath:webAssets??fallbackWebAssets,devServer:craftConfig.devServerURL,generateProject:!1});if(xcodegen){generateXcodeProject(xcodegen,output);log.info(`Generated the Xcode project with xcodegen ${xcodegen.version} from Pantry`)}writeIosShellSupport(output,config,void 0,crashReporting);if(crashReporting)log.info(`Crash reporting to ${crashReporting.host??"https://bughq.org"}${crashReporting.uploadSymbols===!1?"":": dSYMs upload from Xcode Cloud when BUGHQ_UPLOAD_TOKEN is set in the workflow"}`);const activityTypes=writeIosActivityTypes(output,mobile);if(activityTypes)log.info(`Declared ${activityTypes.length} activity types, so a tapped Spotlight or Siri entry reaches the app`);const sourceRevision=Bun.spawnSync(["git","rev-parse","HEAD"],{cwd:projectPath()}).stdout.toString().trim(),craftConfigPath=`${output}/craft.config.json`,generatedConfig=portablePaths(JSON.parse(readFileSync(craftConfigPath,"utf8")),output,projectPath());writeFileSync(craftConfigPath,`${JSON.stringify(generatedConfig,null,2)}
|
|
2
2
|
`);writeFileSync(`${output}/stacks-mobile.json`,`${JSON.stringify(portablePaths({schemaVersion:"1.0.0",platform:"ios",sourceRevision,source:native?{kind:"native",site:craftConfig.devServerURL}:webAssets?{kind:"bundled",path:webAssets}:{kind:"remote",url:craftConfig.devServerURL,fallback:fallbackWebAssets?{kind:"bundled",path:fallbackWebAssets}:void 0},capabilities:config.capabilities??{},builder:resolveCraftBuilderProvenance(process.env.CRAFT_IOS_SRC),craft:generatedConfig},output,projectPath()),null,2)}
|
|
3
3
|
`);log.success(`Built the Craft iOS project in ${output}`);await log.flush();process.exitCode=0;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stop the production API server (stacksjs/stacks#3034).
|
|
3
|
+
*
|
|
4
|
+
* The zero-downtime cutover sends the old release SIGTERM. It stops accepting
|
|
5
|
+
* connections and lets in-flight requests finish, and alongside that runs the
|
|
6
|
+
* shutdown hooks: what the process holds that would otherwise outlive it or
|
|
7
|
+
* end unrecorded, such as open terminal sessions. Both share the grace window,
|
|
8
|
+
* and the process exits when both are done or when it runs out, so a stuck
|
|
9
|
+
* keep-alive or a hook that hangs cannot ride into systemd's SIGKILL.
|
|
10
|
+
*/
|
|
11
|
+
export declare function shutDownApiServer(server: { stop: () => unknown } | undefined, options: ApiShutdownOptions): Promise<void>;
|
|
12
|
+
export declare interface ApiShutdownOptions {
|
|
13
|
+
graceMs: number
|
|
14
|
+
exit: (code: number) => void
|
|
15
|
+
hooks?: () => Promise<void>
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{runShutdownHooks}from"@stacksjs/router";export async function shutDownApiServer(server,options){let exited=!1;const exit=()=>{if(exited)return;exited=!0;options.exit(0)},deadline=setTimeout(exit,options.graceMs);deadline.unref?.();await Promise.allSettled([(options.hooks??runShutdownHooks)(),Promise.resolve().then(()=>server?.stop())]);clearTimeout(deadline);exit()}
|
package/dist/serve/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{existsSync}from"node:fs";import{dirname,join}from"node:path";import process from"node:process";import{config,overridesReady}from"@stacksjs/config";import{log}from"@stacksjs/logging";import{appPath,frameworkPath}from"@stacksjs/path";import{disableViewRouting,route}from"@stacksjs/router";import{ensureDiscoveredPackages}from"../discover-packages";import{resolveApiHost}from"../helpers/api-host";function resolveDefaultsFile(rel){if(rel.startsWith("app/")){const published=appPath(rel.slice(4));if(existsSync(published))return published}const vendored=frameworkPath(`defaults/${rel}`);if(existsSync(vendored))return vendored;try{const pkgJson=Bun.resolveSync("@stacksjs/defaults/package.json",process.cwd());return join(dirname(pkgJson),rel)}catch{return vendored}}await overridesReady;const port=Number(process.env.PORT)||config.ports?.api||3008,hostname=resolveApiHost();log.info("[Stacks API] Starting server...");log.info(`[Stacks API] Environment: ${process.env.APP_ENV||"development"}`);const corsMod=await import(resolveDefaultsFile("app/Middleware/Cors.ts")),corsMiddleware=corsMod.default;route.use(corsMiddleware.toRouterHandler());await ensureDiscoveredPackages();const{reportStripeAvailability}=await import("@stacksjs/payments");reportStripeAvailability();const{autoImportsAreStale,generateAutoImportFiles,injectGlobalAutoImports,warnShadowedSecurityDefaults}=await import("@stacksjs/server");try{if(autoImportsAreStale()){log.info("[Stacks API] Installed packages moved since the auto-import barrel was written; rebuilding it.");await generateAutoImportFiles({declarations:!1})}}catch(error){log.warn(`[Stacks API] Could not refresh the auto-import barrel: ${error instanceof Error?error.message:String(error)}`)}await injectGlobalAutoImports();warnShadowedSecurityDefaults();await route.importRoutes();try{const{describeUnforwardableRoutes,resolveApiProxyRules,unforwardableRoutes}=await import("@stacksjs/server"),{listRedirectRoutes,listRootMountedAppRoutes}=await import("@stacksjs/router"),redirected=new Set(listRedirectRoutes().map((entry)=>entry.path)),unreachable=unforwardableRoutes(listRootMountedAppRoutes().filter((entry)=>(entry.method==="GET"||entry.method==="HEAD")&&!redirected.has(entry.path)),resolveApiProxyRules(config.server?.proxy));if(unreachable.length>0)log.warn(describeUnforwardableRoutes(unreachable))}catch(error){log.debug(`[Stacks API] Route reachability check skipped: ${error instanceof Error?error.message:String(error)}`)}disableViewRouting(route.bunRouter);const isDeployed=["production","staging","development"].includes((process.env.APP_ENV||"").toLowerCase()),server=await route.serve({port,hostname,reusePort:isDeployed});process.on("SIGTERM",()=>{
|
|
1
|
+
import{existsSync}from"node:fs";import{dirname,join}from"node:path";import process from"node:process";import{config,overridesReady}from"@stacksjs/config";import{log}from"@stacksjs/logging";import{appPath,frameworkPath}from"@stacksjs/path";import{disableViewRouting,route}from"@stacksjs/router";import{ensureDiscoveredPackages}from"../discover-packages";import{resolveApiHost}from"../helpers/api-host";import{shutDownApiServer}from"../helpers/api-shutdown";function resolveDefaultsFile(rel){if(rel.startsWith("app/")){const published=appPath(rel.slice(4));if(existsSync(published))return published}const vendored=frameworkPath(`defaults/${rel}`);if(existsSync(vendored))return vendored;try{const pkgJson=Bun.resolveSync("@stacksjs/defaults/package.json",process.cwd());return join(dirname(pkgJson),rel)}catch{return vendored}}await overridesReady;const port=Number(process.env.PORT)||config.ports?.api||3008,hostname=resolveApiHost();log.info("[Stacks API] Starting server...");log.info(`[Stacks API] Environment: ${process.env.APP_ENV||"development"}`);const corsMod=await import(resolveDefaultsFile("app/Middleware/Cors.ts")),corsMiddleware=corsMod.default;route.use(corsMiddleware.toRouterHandler());await ensureDiscoveredPackages();const{reportStripeAvailability}=await import("@stacksjs/payments");reportStripeAvailability();const{autoImportsAreStale,generateAutoImportFiles,injectGlobalAutoImports,warnShadowedSecurityDefaults}=await import("@stacksjs/server");try{if(autoImportsAreStale()){log.info("[Stacks API] Installed packages moved since the auto-import barrel was written; rebuilding it.");await generateAutoImportFiles({declarations:!1})}}catch(error){log.warn(`[Stacks API] Could not refresh the auto-import barrel: ${error instanceof Error?error.message:String(error)}`)}await injectGlobalAutoImports();warnShadowedSecurityDefaults();await route.importRoutes();try{const{describeUnforwardableRoutes,resolveApiProxyRules,unforwardableRoutes}=await import("@stacksjs/server"),{listRedirectRoutes,listRootMountedAppRoutes}=await import("@stacksjs/router"),redirected=new Set(listRedirectRoutes().map((entry)=>entry.path)),unreachable=unforwardableRoutes(listRootMountedAppRoutes().filter((entry)=>(entry.method==="GET"||entry.method==="HEAD")&&!redirected.has(entry.path)),resolveApiProxyRules(config.server?.proxy));if(unreachable.length>0)log.warn(describeUnforwardableRoutes(unreachable))}catch(error){log.debug(`[Stacks API] Route reachability check skipped: ${error instanceof Error?error.message:String(error)}`)}disableViewRouting(route.bunRouter);const isDeployed=["production","staging","development"].includes((process.env.APP_ENV||"").toLowerCase()),server=await route.serve({port,hostname,reusePort:isDeployed});process.on("SIGTERM",()=>{shutDownApiServer(server,{graceMs:Number(process.env.SHUTDOWN_GRACE_MS)||15000,exit:(code)=>process.exit(code)})});log.info(`[Stacks API] Server running at http://${hostname}:${port}`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{chmodSync,copyFileSync,cpSync,existsSync,mkdirSync,mkdtempSync,readFileSync,rmSync,statSync,writeFileSync}from"node:fs";import{tmpdir}from"node:os";import{dirname,join}from"node:path";import process from"node:process";import{parseOptions}from"@stacksjs/cli";import{downloadTemplate}from"@stacksjs/gitit";import{path as p}from"@stacksjs/path";import{ExitCode}from"@stacksjs/types";import{buildTemplateString,detectLocalStacks,diffSnapshots,diffSnapshotsDetailed,MANAGED_PATHS,readChannel,readSyncedVersion,readVersion,resolveLatestStableTag,resolveSuccessMessage,resolveUpgradeContext,resolveUpgradeMessage,shouldAutoDetectLocalStacks,shouldCheckDirtyManagedPaths,shouldShortCircuit,snapshotTree,writeChannel,writeSyncedVersion}from"./framework-utils";import{detectDependencyInstaller,resolveDependencyRefreshCommand,resolvePantryExecutable,runPostSyncDatabaseTypesRefresh,runPostSyncDependencyRefresh,runPostSyncMigration,shouldRefreshPostSyncDependencies,shouldRunPostSyncHooks}from"./framework-hooks";import{describeDanglingRouteActions,findDanglingRouteActions,pruneRetiredScaffoldRoutes}from"./route-actions";const options=parseOptions(),projectRoot=p.projectPath();if(!existsSync(p.projectPath("storage/framework/core"))){const{upgradeStacksPackages}=await import("./packages");await upgradeStacksPackages(projectRoot,{version:options.version,canary:options.canary,stable:options.stable,force:options.force,dryRun:options.dryRun,noPostinstall:options.noPostinstall??options.postinstall===!1})}const channelFile=join(projectRoot,".stacks-channel"),versionFile=join(projectRoot,".stacks-version"),currentChannel=readChannel(channelFile),corePkgPath=p.projectPath("storage/framework/core/buddy/package.json"),currentVersion=readVersion(corePkgPath),explicitLocal=options.from?p.projectPath(options.from):null,detectedLocal=explicitLocal??(shouldAutoDetectLocalStacks(options)?detectLocalStacks(projectRoot):null),usingLocal=!!detectedLocal,willResolveStable=!usingLocal&&!options.version&&!options.canary&&(!!options.stable||currentChannel!=="canary");let latestStableRef=currentVersion?`v${currentVersion}`:"main";if(willResolveStable)latestStableRef=await resolveLatestStableTag()??latestStableRef;const ctx=resolveUpgradeContext(options,currentChannel,latestStableRef);console.log(resolveUpgradeMessage(ctx,currentChannel,!!options.stable));console.log(usingLocal?` source: local checkout at ${detectedLocal}`:` source: github:stacksjs/stacks#${ctx.ref}`);if(options.dryRun){await runDryRunPreview();process.exit(ExitCode.Success)}const alreadyRestarted=process.argv.includes("--__restarted");if(shouldCheckDirtyManagedPaths({force:!!options.force,alreadyRestarted})){const dirty=await detectDirtyManagedPaths(projectRoot);if(dirty.length>0){console.warn(`
|
|
1
|
+
import{chmodSync,copyFileSync,cpSync,existsSync,mkdirSync,mkdtempSync,readFileSync,rmSync,statSync,writeFileSync}from"node:fs";import{tmpdir}from"node:os";import{dirname,join}from"node:path";import process from"node:process";import{parseOptions}from"@stacksjs/cli";import{downloadTemplate}from"@stacksjs/gitit";import{path as p}from"@stacksjs/path";import{ExitCode}from"@stacksjs/types";import{buildTemplateString,detectLocalStacks,diffSnapshots,diffSnapshotsDetailed,MANAGED_PATHS,readChannel,readSyncedVersion,readVersion,resolveLatestStableTag,resolveSuccessMessage,resolveUpgradeContext,resolveUpgradeMessage,shouldAutoDetectLocalStacks,shouldCheckDirtyManagedPaths,shouldShortCircuit,snapshotTree,writeChannel,writeSyncedVersion}from"./framework-utils";import{detectDependencyInstaller,resolveDependencyRefreshCommand,resolvePantryExecutable,runPostSyncDatabaseTypesRefresh,runPostSyncDependencyRefresh,runPostSyncMigration,shouldRefreshPostSyncDependencies,shouldRunPostSyncHooks}from"./framework-hooks";import{describeDanglingRouteActions,findDanglingRouteActions,pruneRetiredScaffoldRoutes}from"./route-actions";const options=parseOptions(),projectRoot=p.projectPath();if(!existsSync(p.projectPath("storage/framework/core"))){const{upgradeStacksPackages}=await import("./packages");await upgradeStacksPackages(projectRoot,{version:options.version,canary:options.canary,stable:options.stable,force:options.force,dryRun:options.dryRun,noPostinstall:options.noPostinstall??options.postinstall===!1,allowDowngrade:options.allowDowngrade})}const channelFile=join(projectRoot,".stacks-channel"),versionFile=join(projectRoot,".stacks-version"),currentChannel=readChannel(channelFile),corePkgPath=p.projectPath("storage/framework/core/buddy/package.json"),currentVersion=readVersion(corePkgPath),explicitLocal=options.from?p.projectPath(options.from):null,detectedLocal=explicitLocal??(shouldAutoDetectLocalStacks(options)?detectLocalStacks(projectRoot):null),usingLocal=!!detectedLocal,willResolveStable=!usingLocal&&!options.version&&!options.canary&&(!!options.stable||currentChannel!=="canary");let latestStableRef=currentVersion?`v${currentVersion}`:"main";if(willResolveStable)latestStableRef=await resolveLatestStableTag()??latestStableRef;const ctx=resolveUpgradeContext(options,currentChannel,latestStableRef);console.log(resolveUpgradeMessage(ctx,currentChannel,!!options.stable));console.log(usingLocal?` source: local checkout at ${detectedLocal}`:` source: github:stacksjs/stacks#${ctx.ref}`);if(options.dryRun){await runDryRunPreview();process.exit(ExitCode.Success)}const alreadyRestarted=process.argv.includes("--__restarted");if(shouldCheckDirtyManagedPaths({force:!!options.force,alreadyRestarted})){const dirty=await detectDirtyManagedPaths(projectRoot);if(dirty.length>0){console.warn(`
|
|
2
2
|
\u26A0 The following framework-managed paths have uncommitted changes:`);for(const path of dirty)console.warn(` - ${path}`);console.warn(`
|
|
3
3
|
Aborting to avoid clobbering your edits.`);console.warn(` Re-run with --force to overwrite, or commit / stash the changes first.
|
|
4
4
|
`);process.exit(ExitCode.FatalError)}}let resolvedRemoteSha=null;if(!options.force&&!ctx.targetVersion){resolvedRemoteSha=await getRemoteSha(ctx,usingLocal,detectedLocal);const synced=readSyncedVersion(versionFile);if(shouldShortCircuit({force:!!options.force,targetVersion:ctx.targetVersion,remoteSha:resolvedRemoteSha,synced,channel:ctx.channel})){console.log(`\u2714 Already on the latest ${ctx.channel} (${resolvedRemoteSha.slice(0,7)}).`);process.exit(ExitCode.Success)}}const ownPath=p.frameworkPath("core/actions/src/upgrade/framework.ts"),ownHashBefore=await hashFileOrZero(ownPath),aggregate={added:0,changed:0,removed:0,unchanged:0},perPath=[];try{for(const managed of MANAGED_PATHS){const localTarget=join(projectRoot,managed.localPath),before=managed.isFile?await singleFileSnapshot(localTarget):await snapshotTree(localTarget,managed.skip);if(usingLocal&&detectedLocal)await syncFromLocal(detectedLocal,managed,localTarget);else{if(managed.isFile)continue;await syncFromGitHub(ctx.ref,managed,localTarget,!!options.force)}const after=managed.isFile?await singleFileSnapshot(localTarget):await snapshotTree(localTarget,managed.skip),summary=diffSnapshots(before,after);aggregate.added+=summary.added;aggregate.changed+=summary.changed;aggregate.removed+=summary.removed;aggregate.unchanged+=summary.unchanged;perPath.push({managed,summary})}if(!usingLocal)await syncRootFilesFromGitHub(ctx.ref)}catch(err){console.error("\u2718 Failed to upgrade Stacks framework:",err?.message||err);process.exit(ExitCode.FatalError)}const newVersion=readVersion(corePkgPath),ownHashAfter=await hashFileOrZero(ownPath);if(ownHashBefore!==0n&&ownHashAfter!==0n&&ownHashBefore!==ownHashAfter&&!alreadyRestarted){console.log(`Upgrade pulled a newer version of the upgrade action - re-running once to pick up new sync paths and hooks.
|
|
@@ -18,6 +18,12 @@ export declare function resolvePublishedRuntimePins(dependencies: Record<string,
|
|
|
18
18
|
export declare function applyRuntimePins(pkg: PkgJson, pins: Record<string, string>): Array<{ name: string, from: string, to: string, field?: 'overrides' | 'resolutions' }>;
|
|
19
19
|
/** Strip a range operator (`^`, `~`, `>=`, …) so a declared range compares to a bare version. */
|
|
20
20
|
export declare function baseVersion(range: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether rewriting a declaration from `from` to `to` lowers the version it
|
|
23
|
+
* names. Only plain versions under an optional range operator are compared, so
|
|
24
|
+
* a `workspace:` reference, a link or a tag is never called a downgrade.
|
|
25
|
+
*/
|
|
26
|
+
export declare function isDowngrade(from: string, to: string): boolean;
|
|
21
27
|
/*` tooling
|
|
22
28
|
* (e.g. `better-dx`) are excluded, so they are never force-bumped to a framework
|
|
23
29
|
* version they don't publish (stacksjs/stacks#2078).
|
|
@@ -78,6 +84,7 @@ export declare interface PackageUpgradeOptions {
|
|
|
78
84
|
force?: boolean
|
|
79
85
|
dryRun?: boolean
|
|
80
86
|
noPostinstall?: boolean
|
|
87
|
+
allowDowngrade?: boolean
|
|
81
88
|
}
|
|
82
89
|
export declare interface PkgJson {
|
|
83
90
|
dependencies?: Record<string, string>
|
package/dist/upgrade/packages.js
CHANGED
|
@@ -2,9 +2,12 @@ import{existsSync,lstatSync,readdirSync,readFileSync,writeFileSync}from"node:fs"
|
|
|
2
2
|
Standalone package detected. No Stacks framework source is installed.`);if(options.dryRun){console.log(" --dry-run: would refresh the package dependencies with `bun update`. No files were changed.\n");process.exit(0)}if(options.noPostinstall){console.log(" --no-postinstall: skipping the dependency refresh. Run `bun update` when ready.\n");process.exit(0)}console.log(` Refreshing declared dependencies...
|
|
3
3
|
`);if((await runCommand(standalonePackageUpdateCommand(),{cwd:projectRoot})).isErr){console.error("\n\u2717 The dependency refresh failed. Resolve the reported error and re-run `buddy update`.\n");process.exit(1)}console.log(`
|
|
4
4
|
\u2714 Standalone package dependencies are up to date.
|
|
5
|
-
`);process.exit(0)}async function resolveTarget(options){const res=await fetch("https://registry.npmjs.org/stacks").catch(()=>null);if(!res||!res.ok)throw Error("Could not reach the npm registry to resolve the target `stacks` version.");const meta=await res.json(),distTags=meta["dist-tags"]??{},versions=meta.versions??{};let version;if(options.version){if(!versions[options.version])throw Error(`stacks@${options.version} was not found on the npm registry.`);version=options.version}else{const tag=options.canary?"canary":"latest",resolved=distTags[tag];if(!resolved)throw Error(`The \`${tag}\` dist-tag is not published for \`stacks\`.`);version=resolved}const metaDeps=versions[version]?.dependencies??{},actions=await fetch(`https://registry.npmjs.org/@stacksjs%2factions/${version}`);if(!actions.ok)throw Error(`Could not resolve the frontend dependencies shipped by @stacksjs/actions@${version}.`);const manifest=await actions.json();if(manifest.version!==version)throw Error("The published actions manifest does not match the requested framework release.");return{version,metaDeps,runtimePins:await resolvePublishedRuntimePins(manifest.dependencies??{})}}export function publishedRuntimePins(dependencies){const pins={};for(const name of["@stacksjs/stx","@stacksjs/components","bun-plugin-stx","@stacksjs/desktop","@stacksjs/sanitizer","stx-router"]){const version=dependencies[name];if(version&&/^\d+\.\d+\.\d+(?:-[\w.-]+)?$/.test(version))pins[name]=version}return pins}export async function resolvePublishedRuntimePins(dependencies,read=fetch){const pins=publishedRuntimePins(dependencies),version=pins["@stacksjs/stx"];if(!version)return pins;const response=await read(`https://registry.npmjs.org/@stacksjs%2fstx/${version}`);if(!response.ok)throw Error(`Could not resolve the runtime dependencies shipped by @stacksjs/stx@${version}.`);const manifest=await response.json();if(manifest.name!=="@stacksjs/stx"||manifest.version!==version)throw Error("The published STX manifest does not match the requested runtime release.");for(const[name,target]of Object.entries(publishedRuntimePins(manifest.dependencies??{}))){if(pins[name]&&pins[name]!==target)throw Error(`The published framework and STX manifests disagree on ${name}.`);pins[name]=target}return pins}export function applyRuntimePins(pkg,pins){const changes=[];for(const field of["dependencies","devDependencies","overrides","resolutions"]){const declarations=pkg[field];if(!declarations||typeof declarations!=="object"||Array.isArray(declarations))continue;for(const[name,target]of Object.entries(pins)){const spec=declarations[name];if(typeof spec!=="string"||!/^[\^~]?\d+\.\d+\.\d+(?:-[\w.-]+)?$/.test(spec))continue;const next=`${/^[\^~]/.test(spec)?spec[0]:""}${target}`;if(next===spec)continue;changes.push({name,from:spec,to:next,...field==="overrides"||field==="resolutions"?{field}:{}});declarations[name]=next}}return changes}export function baseVersion(range){return range.replace(/^[\^~>=<\s]+/,"").trim()}export function lockstepPackages(metaDeps,target){const lockstep=new Set(["stacks"]);for(const[name,range]of Object.entries(metaDeps))if(name.startsWith("@stacksjs/")&&baseVersion(range)===target)lockstep.add(name);return lockstep}export function applyBumps(pkg,target,lockstep){const changes=[];for(const field of["dependencies","devDependencies"]){const deps=pkg[field];if(!deps)continue;for(const[name,spec]of Object.entries(deps)){if(!lockstep.has(name))continue;const next=`${/^[\^~]/.test(spec)?spec[0]:/^\d/.test(spec)?"":"^"}${target}`;if(spec!==next){changes.push({name,from:spec,to:next});deps[name]=next}}}for(const field of["overrides","resolutions"]){const rules=pkg[field];if(!rules||typeof rules!=="object"||Array.isArray(rules))continue;for(const[name,spec]of Object.entries(rules)){if(!lockstep.has(name)||typeof spec!=="string"||!/^[\^~]?\d/.test(spec))continue;const next=resolveManifestSpec(name,spec,target);if(!next)continue;changes.push({name,from:spec,to:next,field});rules[name]=next}}return changes}export async function upgradeStacksPackages(projectRoot,options){const pkgPath=join(projectRoot,"package.json");if(!existsSync(pkgPath)){console.error("No package.json found - nothing to upgrade.");process.exit(1)}const raw=readFileSync(pkgPath,"utf-8"),pkg=JSON.parse(raw),current=pkg.dependencies?.stacks??pkg.devDependencies?.stacks;if(!hasStacksDependency(pkg))return updateStandalonePackage(projectRoot,options);const{version:target,metaDeps,runtimePins}=await resolveTarget(options).catch((err)=>{console.error(`\u2717 ${err.message}`);process.exit(1)});console.log(`
|
|
5
|
+
`);process.exit(0)}async function resolveTarget(options){const res=await fetch("https://registry.npmjs.org/stacks").catch(()=>null);if(!res||!res.ok)throw Error("Could not reach the npm registry to resolve the target `stacks` version.");const meta=await res.json(),distTags=meta["dist-tags"]??{},versions=meta.versions??{};let version;if(options.version){if(!versions[options.version])throw Error(`stacks@${options.version} was not found on the npm registry.`);version=options.version}else{const tag=options.canary?"canary":"latest",resolved=distTags[tag];if(!resolved)throw Error(`The \`${tag}\` dist-tag is not published for \`stacks\`.`);version=resolved}const metaDeps=versions[version]?.dependencies??{},actions=await fetch(`https://registry.npmjs.org/@stacksjs%2factions/${version}`);if(!actions.ok)throw Error(`Could not resolve the frontend dependencies shipped by @stacksjs/actions@${version}.`);const manifest=await actions.json();if(manifest.version!==version)throw Error("The published actions manifest does not match the requested framework release.");return{version,metaDeps,runtimePins:await resolvePublishedRuntimePins(manifest.dependencies??{})}}export function publishedRuntimePins(dependencies){const pins={};for(const name of["@stacksjs/stx","@stacksjs/components","bun-plugin-stx","@stacksjs/desktop","@stacksjs/sanitizer","stx-router"]){const version=dependencies[name];if(version&&/^\d+\.\d+\.\d+(?:-[\w.-]+)?$/.test(version))pins[name]=version}return pins}export async function resolvePublishedRuntimePins(dependencies,read=fetch){const pins=publishedRuntimePins(dependencies),version=pins["@stacksjs/stx"];if(!version)return pins;const response=await read(`https://registry.npmjs.org/@stacksjs%2fstx/${version}`);if(!response.ok)throw Error(`Could not resolve the runtime dependencies shipped by @stacksjs/stx@${version}.`);const manifest=await response.json();if(manifest.name!=="@stacksjs/stx"||manifest.version!==version)throw Error("The published STX manifest does not match the requested runtime release.");for(const[name,target]of Object.entries(publishedRuntimePins(manifest.dependencies??{}))){if(pins[name]&&pins[name]!==target)throw Error(`The published framework and STX manifests disagree on ${name}.`);pins[name]=target}return pins}export function applyRuntimePins(pkg,pins){const changes=[];for(const field of["dependencies","devDependencies","overrides","resolutions"]){const declarations=pkg[field];if(!declarations||typeof declarations!=="object"||Array.isArray(declarations))continue;for(const[name,target]of Object.entries(pins)){const spec=declarations[name];if(typeof spec!=="string"||!/^[\^~]?\d+\.\d+\.\d+(?:-[\w.-]+)?$/.test(spec))continue;const next=`${/^[\^~]/.test(spec)?spec[0]:""}${target}`;if(next===spec)continue;changes.push({name,from:spec,to:next,...field==="overrides"||field==="resolutions"?{field}:{}});declarations[name]=next}}return changes}export function baseVersion(range){return range.replace(/^[\^~>=<\s]+/,"").trim()}export function isDowngrade(from,to){const before=baseVersion(from),after=baseVersion(to),plain=/^\d+\.\d+\.\d+(?:-[\w.-]+)?$/;return plain.test(before)&&plain.test(after)&&Bun.semver.order(after,before)<0}export function lockstepPackages(metaDeps,target){const lockstep=new Set(["stacks"]);for(const[name,range]of Object.entries(metaDeps))if(name.startsWith("@stacksjs/")&&baseVersion(range)===target)lockstep.add(name);return lockstep}export function applyBumps(pkg,target,lockstep){const changes=[];for(const field of["dependencies","devDependencies"]){const deps=pkg[field];if(!deps)continue;for(const[name,spec]of Object.entries(deps)){if(!lockstep.has(name))continue;const next=`${/^[\^~]/.test(spec)?spec[0]:/^\d/.test(spec)?"":"^"}${target}`;if(spec!==next){changes.push({name,from:spec,to:next});deps[name]=next}}}for(const field of["overrides","resolutions"]){const rules=pkg[field];if(!rules||typeof rules!=="object"||Array.isArray(rules))continue;for(const[name,spec]of Object.entries(rules)){if(!lockstep.has(name)||typeof spec!=="string"||!/^[\^~]?\d/.test(spec))continue;const next=resolveManifestSpec(name,spec,target);if(!next)continue;changes.push({name,from:spec,to:next,field});rules[name]=next}}return changes}export async function upgradeStacksPackages(projectRoot,options){const pkgPath=join(projectRoot,"package.json");if(!existsSync(pkgPath)){console.error("No package.json found - nothing to upgrade.");process.exit(1)}const raw=readFileSync(pkgPath,"utf-8"),pkg=JSON.parse(raw),current=pkg.dependencies?.stacks??pkg.devDependencies?.stacks;if(!hasStacksDependency(pkg))return updateStandalonePackage(projectRoot,options);const{version:target,metaDeps,runtimePins}=await resolveTarget(options).catch((err)=>{console.error(`\u2717 ${err.message}`);process.exit(1)});console.log(`
|
|
6
6
|
Upgrading the Stacks framework${options.canary?" (canary)":""} \u2192 ${target}`);if(current)console.log(` current \`stacks\` constraint: ${current}
|
|
7
|
-
`);const lockstep=lockstepPackages(metaDeps,target),changes=[...applyBumps(pkg,target,lockstep),...applyRuntimePins(pkg,runtimePins)],projectManifestChanges=migratePackageProjectManifest(pkg),manifestChanges=reconcileVendoredManifests(projectRoot,target,{dryRun:
|
|
7
|
+
`);const lockstep=lockstepPackages(metaDeps,target),changes=[...applyBumps(pkg,target,lockstep),...applyRuntimePins(pkg,runtimePins)],projectManifestChanges=migratePackageProjectManifest(pkg),manifestContext={lockstep,metaDeps},manifestChanges=reconcileVendoredManifests(projectRoot,target,{dryRun:!0,context:manifestContext}),backwards=(change)=>isDowngrade(change.from,change.to),forwards=changes.filter((change)=>!backwards(change)),downgrades=[...changes.filter(backwards).map((change)=>({...change,label:change.field?`${change.name} (${change.field})`:change.name,where:""})),...manifestChanges.filter(backwards).map((change)=>({...change,label:change.name,where:` ${change.file}`}))];if(forwards.length>0){console.log(" The following dependencies will be updated:");const reported=forwards.map((change)=>({...change,label:change.field?`${change.name} (${change.field})`:change.name})),width=Math.max(...reported.map((c)=>c.label.length));for(const c of reported)console.log(` ${c.label.padEnd(width)} ${c.from} \u2192 ${c.to}`);console.log("")}const vendoredForwards=manifestChanges.filter((change)=>!backwards(change));if(vendoredForwards.length>0){console.log(` Vendored manifests under storage/framework (${vendoredForwards.length}):`);const width=Math.max(...vendoredForwards.map((c)=>c.name.length));for(const c of vendoredForwards)console.log(` ${c.name.padEnd(width)} ${c.from} \u2192 ${c.to} ${c.file}`);console.log("")}if(downgrades.length>0){const verb=options.allowDowngrade?"will be downgraded":"would be downgraded";console.log(` The following dependencies ${verb}, because stacks@${target} declares older versions than this app does:`);const width=Math.max(...downgrades.map((c)=>c.label.length));for(const c of downgrades)console.log(` ${c.label.padEnd(width)} ${c.from} \u2192 ${c.to} (downgrade)${c.where}`);console.log("");if(!options.allowDowngrade){const advice=options.version?[` --version ${target} asks for an older release than this app declares. Re-run with --allow-downgrade to confirm it.
|
|
8
|
+
`]:[" Wait for a framework release that declares these versions or newer, or re-run with --allow-downgrade to accept them."," Checking for one: `npm view stacks versions`, then `buddy upgrade --version <version> --dry-run`.\n"];if(options.dryRun){console.log(" A real run refuses this upgrade unless --allow-downgrade is passed.");console.log(advice.join(`
|
|
9
|
+
`))}else{console.error(`\u2717 Refusing to downgrade ${downgrades.length} ${downgrades.length===1?"dependency":"dependencies"}. Nothing was written or installed.`);console.error(advice.join(`
|
|
10
|
+
`));process.exit(1)}}}if(!options.dryRun&&manifestChanges.length>0)reconcileVendoredManifests(projectRoot,target,{context:manifestContext});if(projectManifestChanges.length>0)console.log(` Project manifest migrations: ${projectManifestChanges.length}
|
|
8
11
|
`);if(options.dryRun){const pending=measureDefaultsDrift(projectRoot);if(pending&&pending.length>0){const installed=installedDefaultsVersion(projectRoot);console.log(` Managed project files, against the installed @stacksjs/defaults${installed?` (${installed})`:""}:`);console.log(` ${summarizeStructureChanges(pending)} in storage/framework/defaults and project support files
|
|
9
12
|
`)}reportRouteActions(projectRoot,!0);console.log(` --dry-run: no files were written and nothing was installed.
|
|
10
13
|
`);process.exit(0)}if(changes.length>0||projectManifestChanges.length>0){const trailing=raw.endsWith(`
|
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.
|
|
5
|
+
"version": "0.75.339",
|
|
6
6
|
"description": "The Stacks actions.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -66,54 +66,54 @@
|
|
|
66
66
|
"prepublishOnly": "bun run build"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@stacksjs/action-runner": "0.75.
|
|
70
|
-
"@stacksjs/ai": "0.75.
|
|
71
|
-
"@stacksjs/analytics": "0.75.
|
|
72
|
-
"@stacksjs/api": "0.75.
|
|
73
|
-
"@stacksjs/auth": "0.75.
|
|
74
|
-
"@stacksjs/build": "0.75.
|
|
69
|
+
"@stacksjs/action-runner": "0.75.339",
|
|
70
|
+
"@stacksjs/ai": "0.75.339",
|
|
71
|
+
"@stacksjs/analytics": "0.75.339",
|
|
72
|
+
"@stacksjs/api": "0.75.339",
|
|
73
|
+
"@stacksjs/auth": "0.75.339",
|
|
74
|
+
"@stacksjs/build": "0.75.339",
|
|
75
75
|
"@stacksjs/bumpx": "^0.2.26",
|
|
76
76
|
"@stacksjs/bunpress": "^0.2.15",
|
|
77
|
-
"@stacksjs/cli": "0.75.
|
|
78
|
-
"@stacksjs/cloud": "0.75.
|
|
79
|
-
"@stacksjs/cms": "0.75.
|
|
77
|
+
"@stacksjs/cli": "0.75.339",
|
|
78
|
+
"@stacksjs/cloud": "0.75.339",
|
|
79
|
+
"@stacksjs/cms": "0.75.339",
|
|
80
80
|
"@stacksjs/components": "0.2.736",
|
|
81
|
-
"@stacksjs/config": "0.75.
|
|
82
|
-
"@stacksjs/database": "0.75.
|
|
83
|
-
"@stacksjs/desktop-build": "0.75.
|
|
84
|
-
"@stacksjs/dns": "0.75.
|
|
85
|
-
"@stacksjs/enums": "0.75.
|
|
86
|
-
"@stacksjs/env": "0.75.
|
|
87
|
-
"@stacksjs/error-handling": "0.75.
|
|
88
|
-
"@stacksjs/github": "0.75.
|
|
81
|
+
"@stacksjs/config": "0.75.339",
|
|
82
|
+
"@stacksjs/database": "0.75.339",
|
|
83
|
+
"@stacksjs/desktop-build": "0.75.339",
|
|
84
|
+
"@stacksjs/dns": "0.75.339",
|
|
85
|
+
"@stacksjs/enums": "0.75.339",
|
|
86
|
+
"@stacksjs/env": "0.75.339",
|
|
87
|
+
"@stacksjs/error-handling": "0.75.339",
|
|
88
|
+
"@stacksjs/github": "0.75.339",
|
|
89
89
|
"@stacksjs/gitit": "^0.2.5",
|
|
90
|
-
"@stacksjs/i18n": "0.75.
|
|
91
|
-
"@stacksjs/image": "0.75.
|
|
92
|
-
"@stacksjs/logging": "0.75.
|
|
90
|
+
"@stacksjs/i18n": "0.75.339",
|
|
91
|
+
"@stacksjs/image": "0.75.339",
|
|
92
|
+
"@stacksjs/logging": "0.75.339",
|
|
93
93
|
"@stacksjs/logsmith": "^0.2.11",
|
|
94
|
-
"@stacksjs/mobile": "0.75.
|
|
95
|
-
"@stacksjs/orm": "0.75.
|
|
96
|
-
"@stacksjs/path": "0.75.
|
|
97
|
-
"@stacksjs/payments": "0.75.
|
|
98
|
-
"@stacksjs/queue": "0.75.
|
|
99
|
-
"@stacksjs/registry": "0.75.
|
|
100
|
-
"@stacksjs/router": "0.75.
|
|
94
|
+
"@stacksjs/mobile": "0.75.339",
|
|
95
|
+
"@stacksjs/orm": "0.75.339",
|
|
96
|
+
"@stacksjs/path": "0.75.339",
|
|
97
|
+
"@stacksjs/payments": "0.75.339",
|
|
98
|
+
"@stacksjs/queue": "0.75.339",
|
|
99
|
+
"@stacksjs/registry": "0.75.339",
|
|
100
|
+
"@stacksjs/router": "0.75.339",
|
|
101
101
|
"@stacksjs/rpx": "^0.11.54",
|
|
102
|
-
"@stacksjs/scheduler": "0.75.
|
|
103
|
-
"@stacksjs/search-engine": "0.75.
|
|
104
|
-
"@stacksjs/security": "0.75.
|
|
105
|
-
"@stacksjs/server": "0.75.
|
|
106
|
-
"@stacksjs/sites": "0.75.
|
|
107
|
-
"@stacksjs/storage": "0.75.
|
|
108
|
-
"@stacksjs/strings": "0.75.
|
|
102
|
+
"@stacksjs/scheduler": "0.75.339",
|
|
103
|
+
"@stacksjs/search-engine": "0.75.339",
|
|
104
|
+
"@stacksjs/security": "0.75.339",
|
|
105
|
+
"@stacksjs/server": "0.75.339",
|
|
106
|
+
"@stacksjs/sites": "0.75.339",
|
|
107
|
+
"@stacksjs/storage": "0.75.339",
|
|
108
|
+
"@stacksjs/strings": "0.75.339",
|
|
109
109
|
"@stacksjs/stx": "0.2.736",
|
|
110
110
|
"@stacksjs/tlsx": "^0.13.19",
|
|
111
111
|
"@stacksjs/ts-cloud": "^0.16.69",
|
|
112
112
|
"@stacksjs/ts-md": "^0.1.1",
|
|
113
|
-
"@stacksjs/tunnel": "0.75.
|
|
114
|
-
"@stacksjs/types": "0.75.
|
|
115
|
-
"@stacksjs/utils": "0.75.
|
|
116
|
-
"@stacksjs/whois": "0.75.
|
|
113
|
+
"@stacksjs/tunnel": "0.75.339",
|
|
114
|
+
"@stacksjs/types": "0.75.339",
|
|
115
|
+
"@stacksjs/utils": "0.75.339",
|
|
116
|
+
"@stacksjs/whois": "0.75.339",
|
|
117
117
|
"bun-plugin-stx": "0.2.736"
|
|
118
118
|
},
|
|
119
119
|
"peerDependencies": {
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
}
|
|
130
130
|
},
|
|
131
131
|
"devDependencies": {
|
|
132
|
-
"@stacksjs/validation": "0.75.
|
|
132
|
+
"@stacksjs/validation": "0.75.339",
|
|
133
133
|
"better-dx": "^0.2.24"
|
|
134
134
|
}
|
|
135
135
|
}
|