From e7b00acde9040f62812d1f57a6a2a97f150526ff Mon Sep 17 00:00:00 2001 From: Stephen B <158498287+StephenDev0@users.noreply.github.com> Date: Sun, 6 Jul 2025 19:55:25 -0400 Subject: [PATCH] Code base cleanup & Better JS editor --- StikDebug.xcodeproj/project.pbxproj | 397 ++---------------- .../xcshareddata/swiftpm/Package.resolved | 24 ++ StikJIT/JSSupport/ScriptEditorView.swift | 32 +- .../AccentColor.colorset/Contents.json | 11 - .../AppIcon.appiconset/Contents.json | 35 -- StikVPN/Assets.xcassets/Contents.json | 6 - StikVPN/ContentView.swift | 24 -- .../Preview Assets.xcassets/Contents.json | 6 - StikVPN/StikVPNApp.swift | 17 - StikVPNTests/StikVPNTests.swift | 17 - StikVPNUITests/StikVPNUITests.swift | 43 -- .../StikVPNUITestsLaunchTests.swift | 33 -- 12 files changed, 82 insertions(+), 563 deletions(-) create mode 100644 StikDebug.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved delete mode 100644 StikVPN/Assets.xcassets/AccentColor.colorset/Contents.json delete mode 100644 StikVPN/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 StikVPN/Assets.xcassets/Contents.json delete mode 100644 StikVPN/ContentView.swift delete mode 100644 StikVPN/Preview Content/Preview Assets.xcassets/Contents.json delete mode 100644 StikVPN/StikVPNApp.swift delete mode 100644 StikVPNTests/StikVPNTests.swift delete mode 100644 StikVPNUITests/StikVPNUITests.swift delete mode 100644 StikVPNUITests/StikVPNUITestsLaunchTests.swift diff --git a/StikDebug.xcodeproj/project.pbxproj b/StikDebug.xcodeproj/project.pbxproj index dcd3f4e..479155c 100644 --- a/StikDebug.xcodeproj/project.pbxproj +++ b/StikDebug.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 68D569BE2E1B415700A5BA36 /* CodeEditorView in Frameworks */ = {isa = PBXBuildFile; productRef = 68D569BD2E1B415700A5BA36 /* CodeEditorView */; }; + 68D569C02E1B415700A5BA36 /* LanguageSupport in Frameworks */ = {isa = PBXBuildFile; productRef = 68D569BF2E1B415700A5BA36 /* LanguageSupport */; }; DC139F6E2DE97EA400F63846 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC139F6D2DE97EA400F63846 /* WidgetKit.framework */; }; DC139F702DE97EA400F63846 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC139F6F2DE97EA400F63846 /* SwiftUI.framework */; }; DC139F812DE97EA600F63846 /* DebugWidgetExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = DC139F6C2DE97EA400F63846 /* DebugWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; @@ -22,20 +24,6 @@ remoteGlobalIDString = DC139F6B2DE97EA400F63846; remoteInfo = DebugWidgetExtension; }; - DC32875A2DEFF3AD005B2F11 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = DC6F1D2F2D94EADD0071B2B6 /* Project object */; - proxyType = 1; - remoteGlobalIDString = DC3287492DEFF3AB005B2F11; - remoteInfo = StikVPN; - }; - DC3287642DEFF3AD005B2F11 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = DC6F1D2F2D94EADD0071B2B6 /* Project object */; - proxyType = 1; - remoteGlobalIDString = DC3287492DEFF3AB005B2F11; - remoteInfo = StikVPN; - }; DC6F1D492D94EADF0071B2B6 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = DC6F1D2F2D94EADD0071B2B6 /* Project object */; @@ -79,9 +67,6 @@ DC139F6D2DE97EA400F63846 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; DC139F6F2DE97EA400F63846 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; DC139F862DE97F2000F63846 /* DebugWidgetExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugWidgetExtension.entitlements; sourceTree = ""; }; - DC32874A2DEFF3AB005B2F11 /* StikVPN.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StikVPN.app; sourceTree = BUILT_PRODUCTS_DIR; }; - DC3287592DEFF3AD005B2F11 /* StikVPNTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StikVPNTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - DC3287632DEFF3AD005B2F11 /* StikVPNUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StikVPNUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; DC6F1D372D94EADD0071B2B6 /* StikDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StikDebug.app; sourceTree = BUILT_PRODUCTS_DIR; }; DC6F1D482D94EADF0071B2B6 /* StikDebugTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StikDebugTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; DC6F1D522D94EADF0071B2B6 /* StikDebugUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StikDebugUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -93,7 +78,6 @@ 1775D3612D9644FD00DFA8E0 /* Exceptions for "StikJIT" folder in "StikDebug" target */ = { isa = PBXFileSystemSynchronizedBuildFileExceptionSet; membershipExceptions = ( - idevice/libem_proxy.a, Info.plist, ); target = DC6F1D362D94EADD0071B2B6 /* StikDebug */; @@ -123,21 +107,6 @@ path = DebugWidget; sourceTree = ""; }; - DC32874B2DEFF3AB005B2F11 /* StikVPN */ = { - isa = PBXFileSystemSynchronizedRootGroup; - path = StikVPN; - sourceTree = ""; - }; - DC32875C2DEFF3AD005B2F11 /* StikVPNTests */ = { - isa = PBXFileSystemSynchronizedRootGroup; - path = StikVPNTests; - sourceTree = ""; - }; - DC3287662DEFF3AD005B2F11 /* StikVPNUITests */ = { - isa = PBXFileSystemSynchronizedRootGroup; - path = StikVPNUITests; - sourceTree = ""; - }; DC6F1D392D94EADD0071B2B6 /* StikJIT */ = { isa = PBXFileSystemSynchronizedRootGroup; exceptions = ( @@ -176,31 +145,12 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - DC3287472DEFF3AB005B2F11 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DC3287562DEFF3AD005B2F11 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DC3287602DEFF3AD005B2F11 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; DC6F1D342D94EADD0071B2B6 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 68D569C02E1B415700A5BA36 /* LanguageSupport in Frameworks */, + 68D569BE2E1B415700A5BA36 /* CodeEditorView in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -238,9 +188,6 @@ DC6F1D552D94EADF0071B2B6 /* StikJITUITests */, DCA690132DAF660E007C91A8 /* TunnelProv */, DC139F712DE97EA400F63846 /* DebugWidget */, - DC32874B2DEFF3AB005B2F11 /* StikVPN */, - DC32875C2DEFF3AD005B2F11 /* StikVPNTests */, - DC3287662DEFF3AD005B2F11 /* StikVPNUITests */, DC6F1D752D94EB620071B2B6 /* Frameworks */, DC6F1D382D94EADD0071B2B6 /* Products */, ); @@ -254,9 +201,6 @@ DC6F1D522D94EADF0071B2B6 /* StikDebugUITests.xctest */, DCA690102DAF660E007C91A8 /* TunnelProv.appex */, DC139F6C2DE97EA400F63846 /* DebugWidgetExtension.appex */, - DC32874A2DEFF3AB005B2F11 /* StikVPN.app */, - DC3287592DEFF3AD005B2F11 /* StikVPNTests.xctest */, - DC3287632DEFF3AD005B2F11 /* StikVPNUITests.xctest */, ); name = Products; sourceTree = ""; @@ -296,74 +240,6 @@ productReference = DC139F6C2DE97EA400F63846 /* DebugWidgetExtension.appex */; productType = "com.apple.product-type.app-extension"; }; - DC3287492DEFF3AB005B2F11 /* StikVPN */ = { - isa = PBXNativeTarget; - buildConfigurationList = DC3287712DEFF3AD005B2F11 /* Build configuration list for PBXNativeTarget "StikVPN" */; - buildPhases = ( - DC3287462DEFF3AB005B2F11 /* Sources */, - DC3287472DEFF3AB005B2F11 /* Frameworks */, - DC3287482DEFF3AB005B2F11 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - fileSystemSynchronizedGroups = ( - DC32874B2DEFF3AB005B2F11 /* StikVPN */, - ); - name = StikVPN; - packageProductDependencies = ( - ); - productName = StikVPN; - productReference = DC32874A2DEFF3AB005B2F11 /* StikVPN.app */; - productType = "com.apple.product-type.application"; - }; - DC3287582DEFF3AD005B2F11 /* StikVPNTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = DC3287722DEFF3AD005B2F11 /* Build configuration list for PBXNativeTarget "StikVPNTests" */; - buildPhases = ( - DC3287552DEFF3AD005B2F11 /* Sources */, - DC3287562DEFF3AD005B2F11 /* Frameworks */, - DC3287572DEFF3AD005B2F11 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - DC32875B2DEFF3AD005B2F11 /* PBXTargetDependency */, - ); - fileSystemSynchronizedGroups = ( - DC32875C2DEFF3AD005B2F11 /* StikVPNTests */, - ); - name = StikVPNTests; - packageProductDependencies = ( - ); - productName = StikVPNTests; - productReference = DC3287592DEFF3AD005B2F11 /* StikVPNTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - DC3287622DEFF3AD005B2F11 /* StikVPNUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = DC3287732DEFF3AD005B2F11 /* Build configuration list for PBXNativeTarget "StikVPNUITests" */; - buildPhases = ( - DC32875F2DEFF3AD005B2F11 /* Sources */, - DC3287602DEFF3AD005B2F11 /* Frameworks */, - DC3287612DEFF3AD005B2F11 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - DC3287652DEFF3AD005B2F11 /* PBXTargetDependency */, - ); - fileSystemSynchronizedGroups = ( - DC3287662DEFF3AD005B2F11 /* StikVPNUITests */, - ); - name = StikVPNUITests; - packageProductDependencies = ( - ); - productName = StikVPNUITests; - productReference = DC3287632DEFF3AD005B2F11 /* StikVPNUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; DC6F1D362D94EADD0071B2B6 /* StikDebug */ = { isa = PBXNativeTarget; buildConfigurationList = DC6F1D5C2D94EADF0071B2B6 /* Build configuration list for PBXNativeTarget "StikDebug" */; @@ -384,6 +260,8 @@ ); name = StikDebug; packageProductDependencies = ( + 68D569BD2E1B415700A5BA36 /* CodeEditorView */, + 68D569BF2E1B415700A5BA36 /* LanguageSupport */, ); productName = StikJIT; productReference = DC6F1D372D94EADD0071B2B6 /* StikDebug.app */; @@ -470,17 +348,6 @@ DC139F6B2DE97EA400F63846 = { CreatedOnToolsVersion = 16.2; }; - DC3287492DEFF3AB005B2F11 = { - CreatedOnToolsVersion = 16.2; - }; - DC3287582DEFF3AD005B2F11 = { - CreatedOnToolsVersion = 16.2; - TestTargetID = DC3287492DEFF3AB005B2F11; - }; - DC3287622DEFF3AD005B2F11 = { - CreatedOnToolsVersion = 16.2; - TestTargetID = DC3287492DEFF3AB005B2F11; - }; DC6F1D362D94EADD0071B2B6 = { CreatedOnToolsVersion = 16.2; LastSwiftMigration = 1620; @@ -507,6 +374,9 @@ ); mainGroup = DC6F1D2E2D94EADD0071B2B6; minimizedProjectReferenceProxies = 1; + packageReferences = ( + 68D569BC2E1B415700A5BA36 /* XCRemoteSwiftPackageReference "CodeEditorView" */, + ); preferredProjectObjectVersion = 77; productRefGroup = DC6F1D382D94EADD0071B2B6 /* Products */; projectDirPath = ""; @@ -517,9 +387,6 @@ DC6F1D512D94EADF0071B2B6 /* StikDebugUITests */, DCA6900F2DAF660E007C91A8 /* TunnelProv */, DC139F6B2DE97EA400F63846 /* DebugWidgetExtension */, - DC3287492DEFF3AB005B2F11 /* StikVPN */, - DC3287582DEFF3AD005B2F11 /* StikVPNTests */, - DC3287622DEFF3AD005B2F11 /* StikVPNUITests */, ); }; /* End PBXProject section */ @@ -532,27 +399,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - DC3287482DEFF3AB005B2F11 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DC3287572DEFF3AD005B2F11 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DC3287612DEFF3AD005B2F11 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; DC6F1D352D94EADD0071B2B6 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -591,27 +437,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - DC3287462DEFF3AB005B2F11 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DC3287552DEFF3AD005B2F11 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DC32875F2DEFF3AD005B2F11 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; DC6F1D332D94EADD0071B2B6 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -648,16 +473,6 @@ target = DC139F6B2DE97EA400F63846 /* DebugWidgetExtension */; targetProxy = DC139F7F2DE97EA600F63846 /* PBXContainerItemProxy */; }; - DC32875B2DEFF3AD005B2F11 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = DC3287492DEFF3AB005B2F11 /* StikVPN */; - targetProxy = DC32875A2DEFF3AD005B2F11 /* PBXContainerItemProxy */; - }; - DC3287652DEFF3AD005B2F11 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = DC3287492DEFF3AB005B2F11 /* StikVPN */; - targetProxy = DC3287642DEFF3AD005B2F11 /* PBXContainerItemProxy */; - }; DC6F1D4A2D94EADF0071B2B6 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = DC6F1D362D94EADD0071B2B6 /* StikDebug */; @@ -737,149 +552,6 @@ }; name = Release; }; - DC32876B2DEFF3AD005B2F11 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"StikVPN/Preview Content\""; - DEVELOPMENT_TEAM = SZ977XLF24; - ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.stik.sj.StikVPN; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - DC32876C2DEFF3AD005B2F11 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"StikVPN/Preview Content\""; - DEVELOPMENT_TEAM = SZ977XLF24; - ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.stik.sj.StikVPN; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - DC32876D2DEFF3AD005B2F11 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = SZ977XLF24; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.stik.sj.StikVPNTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/StikVPN.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/StikVPN"; - }; - name = Debug; - }; - DC32876E2DEFF3AD005B2F11 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = SZ977XLF24; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.stik.sj.StikVPNTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/StikVPN.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/StikVPN"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - DC32876F2DEFF3AD005B2F11 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = SZ977XLF24; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.stik.sj.StikVPNUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = StikVPN; - }; - name = Debug; - }; - DC3287702DEFF3AD005B2F11 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = SZ977XLF24; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 18.2; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.stik.sj.StikVPNUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = StikVPN; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; DC6F1D5A2D94EADF0071B2B6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1250,33 +922,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - DC3287712DEFF3AD005B2F11 /* Build configuration list for PBXNativeTarget "StikVPN" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DC32876B2DEFF3AD005B2F11 /* Debug */, - DC32876C2DEFF3AD005B2F11 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - DC3287722DEFF3AD005B2F11 /* Build configuration list for PBXNativeTarget "StikVPNTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DC32876D2DEFF3AD005B2F11 /* Debug */, - DC32876E2DEFF3AD005B2F11 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - DC3287732DEFF3AD005B2F11 /* Build configuration list for PBXNativeTarget "StikVPNUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DC32876F2DEFF3AD005B2F11 /* Debug */, - DC3287702DEFF3AD005B2F11 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; DC6F1D322D94EADD0071B2B6 /* Build configuration list for PBXProject "StikDebug" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -1323,6 +968,30 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 68D569BC2E1B415700A5BA36 /* XCRemoteSwiftPackageReference "CodeEditorView" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/mchakravarty/CodeEditorView"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 0.15.4; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 68D569BD2E1B415700A5BA36 /* CodeEditorView */ = { + isa = XCSwiftPackageProductDependency; + package = 68D569BC2E1B415700A5BA36 /* XCRemoteSwiftPackageReference "CodeEditorView" */; + productName = CodeEditorView; + }; + 68D569BF2E1B415700A5BA36 /* LanguageSupport */ = { + isa = XCSwiftPackageProductDependency; + package = 68D569BC2E1B415700A5BA36 /* XCRemoteSwiftPackageReference "CodeEditorView" */; + productName = LanguageSupport; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = DC6F1D2F2D94EADD0071B2B6 /* Project object */; } diff --git a/StikDebug.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/StikDebug.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..7f82837 --- /dev/null +++ b/StikDebug.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,24 @@ +{ + "originHash" : "3675a8b363ad866505239c8e2c7f6a0862ed02618f2dca478b2519372fb79c0c", + "pins" : [ + { + "identity" : "codeeditorview", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mchakravarty/CodeEditorView", + "state" : { + "revision" : "aba6c189bb2f6fd9d7b8e9f5739aeb3c8c7e3254", + "version" : "0.15.4" + } + }, + { + "identity" : "rearrange", + "kind" : "remoteSourceControl", + "location" : "https://github.com/ChimeHQ/Rearrange.git", + "state" : { + "revision" : "5ff7f3363f7a08f77e0d761e38e6add31c2136e1", + "version" : "1.8.1" + } + } + ], + "version" : 3 +} diff --git a/StikJIT/JSSupport/ScriptEditorView.swift b/StikJIT/JSSupport/ScriptEditorView.swift index 5c98b64..2303bcf 100644 --- a/StikJIT/JSSupport/ScriptEditorView.swift +++ b/StikJIT/JSSupport/ScriptEditorView.swift @@ -6,20 +6,35 @@ // import SwiftUI +import CodeEditorView +import LanguageSupport struct ScriptEditorView: View { let scriptURL: URL + @State private var scriptContent: String = "" + @State private var position: CodeEditor.Position = .init() + @State private var messages: Set> = [] + + @Environment(\.colorScheme) private var colorScheme @Environment(\.dismiss) private var dismiss var body: some View { - VStack { - TextEditor(text: $scriptContent) - .padding() - .border(Color.gray, width: 1) - .navigationTitle(scriptURL.lastPathComponent) - .navigationBarTitleDisplayMode(.inline) - .font(.system(.footnote, design: .monospaced)) + VStack(spacing: 0) { + CodeEditor( + text: $scriptContent, + position: $position, + messages: $messages, + language: .swift() + ) + .font(.system(.footnote, design: .monospaced)) + .frame(maxWidth: .infinity, maxHeight: .infinity) + .environment( + \.codeEditorTheme, + colorScheme == .dark ? Theme.defaultDark : Theme.defaultLight + ) + + Divider() HStack { Button("Cancel") { @@ -37,7 +52,10 @@ struct ScriptEditorView: View { } .padding() } + .navigationTitle(scriptURL.lastPathComponent) + .navigationBarTitleDisplayMode(.inline) .onAppear(perform: loadScript) + .frame(maxWidth: .infinity, maxHeight: .infinity) } private func loadScript() { diff --git a/StikVPN/Assets.xcassets/AccentColor.colorset/Contents.json b/StikVPN/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb87897..0000000 --- a/StikVPN/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/StikVPN/Assets.xcassets/AppIcon.appiconset/Contents.json b/StikVPN/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 2305880..0000000 --- a/StikVPN/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "tinted" - } - ], - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/StikVPN/Assets.xcassets/Contents.json b/StikVPN/Assets.xcassets/Contents.json deleted file mode 100644 index 73c0059..0000000 --- a/StikVPN/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/StikVPN/ContentView.swift b/StikVPN/ContentView.swift deleted file mode 100644 index 32c7071..0000000 --- a/StikVPN/ContentView.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// ContentView.swift -// StikVPN -// -// Created by Stephen on 6/3/25. -// - -import SwiftUI - -struct ContentView: View { - var body: some View { - VStack { - Image(systemName: "globe") - .imageScale(.large) - .foregroundStyle(.tint) - Text("Hello, world!") - } - .padding() - } -} - -#Preview { - ContentView() -} diff --git a/StikVPN/Preview Content/Preview Assets.xcassets/Contents.json b/StikVPN/Preview Content/Preview Assets.xcassets/Contents.json deleted file mode 100644 index 73c0059..0000000 --- a/StikVPN/Preview Content/Preview Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/StikVPN/StikVPNApp.swift b/StikVPN/StikVPNApp.swift deleted file mode 100644 index a7cae50..0000000 --- a/StikVPN/StikVPNApp.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// StikVPNApp.swift -// StikVPN -// -// Created by Stephen on 6/3/25. -// - -import SwiftUI - -@main -struct StikVPNApp: App { - var body: some Scene { - WindowGroup { - ContentView() - } - } -} diff --git a/StikVPNTests/StikVPNTests.swift b/StikVPNTests/StikVPNTests.swift deleted file mode 100644 index 89cf214..0000000 --- a/StikVPNTests/StikVPNTests.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// StikVPNTests.swift -// StikVPNTests -// -// Created by Stephen on 6/3/25. -// - -import Testing -@testable import StikVPN - -struct StikVPNTests { - - @Test func example() async throws { - // Write your test here and use APIs like `#expect(...)` to check expected conditions. - } - -} diff --git a/StikVPNUITests/StikVPNUITests.swift b/StikVPNUITests/StikVPNUITests.swift deleted file mode 100644 index 0e8a2d2..0000000 --- a/StikVPNUITests/StikVPNUITests.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// StikVPNUITests.swift -// StikVPNUITests -// -// Created by Stephen on 6/3/25. -// - -import XCTest - -final class StikVPNUITests: XCTestCase { - - override func setUpWithError() throws { - // Put setup code here. This method is called before the invocation of each test method in the class. - - // In UI tests it is usually best to stop immediately when a failure occurs. - continueAfterFailure = false - - // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. - } - - override func tearDownWithError() throws { - // Put teardown code here. This method is called after the invocation of each test method in the class. - } - - @MainActor - func testExample() throws { - // UI tests must launch the application that they test. - let app = XCUIApplication() - app.launch() - - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - @MainActor - func testLaunchPerformance() throws { - if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { - // This measures how long it takes to launch your application. - measure(metrics: [XCTApplicationLaunchMetric()]) { - XCUIApplication().launch() - } - } - } -} diff --git a/StikVPNUITests/StikVPNUITestsLaunchTests.swift b/StikVPNUITests/StikVPNUITestsLaunchTests.swift deleted file mode 100644 index 6d2dc9f..0000000 --- a/StikVPNUITests/StikVPNUITestsLaunchTests.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// StikVPNUITestsLaunchTests.swift -// StikVPNUITests -// -// Created by Stephen on 6/3/25. -// - -import XCTest - -final class StikVPNUITestsLaunchTests: XCTestCase { - - override class var runsForEachTargetApplicationUIConfiguration: Bool { - true - } - - override func setUpWithError() throws { - continueAfterFailure = false - } - - @MainActor - func testLaunch() throws { - let app = XCUIApplication() - app.launch() - - // Insert steps here to perform after app launch but before taking a screenshot, - // such as logging into a test account or navigating somewhere in the app - - let attachment = XCTAttachment(screenshot: app.screenshot()) - attachment.name = "Launch Screen" - attachment.lifetime = .keepAlways - add(attachment) - } -}