@thelacanians/vue-native-cli 0.4.13 → 0.4.14

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/cli.js CHANGED
@@ -10,7 +10,7 @@ import { join, dirname } from "path";
10
10
  import { fileURLToPath } from "url";
11
11
  import { existsSync } from "fs";
12
12
  import pc from "picocolors";
13
- var VERSION = "0.4.13";
13
+ var VERSION = "0.4.14";
14
14
  var createCommand = new Command("create").description("Create a new Vue Native project").argument("<name>", "project name").option("-t, --template <template>", "project template (blank, tabs, drawer)", "blank").action(async (name, options) => {
15
15
  const template = options.template;
16
16
  if (!["blank", "tabs", "drawer"].includes(template)) {
@@ -156,6 +156,11 @@ targets:
156
156
  <string>UIInterfaceOrientationLandscapeLeft</string>
157
157
  <string>UIInterfaceOrientationLandscapeRight</string>
158
158
  </array>
159
+ <key>NSAppTransportSecurity</key>
160
+ <dict>
161
+ <key>NSAllowsLocalNetworking</key>
162
+ <true/>
163
+ </dict>
159
164
  <!-- Uncomment the privacy descriptions for features your app uses -->
160
165
  <!-- <key>NSCameraUsageDescription</key><string>This app needs camera access</string> -->
161
166
  <!-- <key>NSMicrophoneUsageDescription</key><string>This app needs microphone access</string> -->
@@ -119,7 +119,7 @@ afterEvaluate {
119
119
  create<MavenPublication>("release") {
120
120
  groupId = "com.vuenative"
121
121
  artifactId = "core"
122
- version = "0.4.13"
122
+ version = "0.4.14"
123
123
  from(components["release"])
124
124
  }
125
125
  }
@@ -704,8 +704,21 @@ enum JSPolyfills {
704
704
  /// Produce a JSON-safe string literal (with quotes) for embedding in JS eval strings.
705
705
  private enum JSPolyfillsJSON {
706
706
  static func encode(_ str: String) -> String {
707
- let data = (try? JSONSerialization.data(withJSONObject: str)) ?? Data()
708
- return String(data: data, encoding: .utf8) ?? "\"\""
707
+ // Wrap in array so JSONSerialization gets a valid top-level type.
708
+ // String alone causes an NSException that try? cannot catch.
709
+ if let data = try? JSONSerialization.data(withJSONObject: [str]),
710
+ let json = String(data: data, encoding: .utf8),
711
+ json.count >= 2 {
712
+ return String(json.dropFirst().dropLast())
713
+ }
714
+ // Fallback: manual escaping
715
+ let escaped = str
716
+ .replacingOccurrences(of: "\\", with: "\\\\")
717
+ .replacingOccurrences(of: "\"", with: "\\\"")
718
+ .replacingOccurrences(of: "\n", with: "\\n")
719
+ .replacingOccurrences(of: "\r", with: "\\r")
720
+ .replacingOccurrences(of: "\t", with: "\\t")
721
+ return "\"\(escaped)\""
709
722
  }
710
723
  }
711
724
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thelacanians/vue-native-cli",
3
- "version": "0.4.13",
3
+ "version": "0.4.14",
4
4
  "description": "CLI for creating and running Vue Native apps",
5
5
  "license": "MIT",
6
6
  "author": "Vue Native Contributors",