craft-native 0.0.486 → 0.0.490
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/android/src/index.d.ts +28 -0
- package/dist/android/src/index.js +15 -0
- package/dist/android/templates/CraftNativeServices.kt.template +10 -1
- package/dist/android/templates/CraftNativeShell.kt.template +96 -8
- package/dist/android/templates/MainActivityNative.kt.template +145 -30
- package/dist/cli.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/ios/src/index.d.ts +42 -1
- package/dist/ios/src/index.js +15 -0
- package/dist/ios/templates/CraftApp.swift +30 -0
- package/dist/ios/templates/CraftHybrid.swift +49 -0
- package/dist/ios/templates/CraftNativeActions.swift +9 -1
- package/dist/ios/templates/CraftNativeScreen.swift +353 -95
- package/dist/mobile.js +2 -2
- package/package.json +1 -1
package/dist/mobile.js
CHANGED
|
@@ -1510,7 +1510,7 @@ function postHybrid(message) {
|
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
1512
|
function isSnapshotName(name) {
|
|
1513
|
-
return typeof name === "string" && /^[A-Za-z0-9_
|
|
1513
|
+
return typeof name === "string" && /^[A-Za-z0-9_:-][\w.:-]{0,127}$/.test(name);
|
|
1514
1514
|
}
|
|
1515
1515
|
var snapshots = {
|
|
1516
1516
|
isAvailable() {
|
|
@@ -1518,7 +1518,7 @@ var snapshots = {
|
|
|
1518
1518
|
},
|
|
1519
1519
|
set(name, value) {
|
|
1520
1520
|
if (!isSnapshotName(name))
|
|
1521
|
-
throw new TypeError(`Snapshot names are letters, digits, ".", "_" and "
|
|
1521
|
+
throw new TypeError(`Snapshot names are letters, digits, ".", "_", "-" and ":": ${String(name)}`);
|
|
1522
1522
|
const json = JSON.stringify(value);
|
|
1523
1523
|
if (json === undefined)
|
|
1524
1524
|
throw new TypeError(`Snapshot ${name} is not JSON`);
|