@capgo/cli 4.13.2 → 4.13.3

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.
Files changed (69) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
  3. package/.github/FUNDING.yml +0 -1
  4. package/.github/workflows/autofix.yml +0 -25
  5. package/.github/workflows/build.yml +0 -46
  6. package/.github/workflows/bump_version.yml +0 -56
  7. package/.github/workflows/check_posix_paths.yml +0 -229
  8. package/.github/workflows/test.yml +0 -30
  9. package/.prettierignore +0 -6
  10. package/.vscode/launch.json +0 -23
  11. package/.vscode/settings.json +0 -46
  12. package/.vscode/tasks.json +0 -42
  13. package/CHANGELOG.md +0 -3392
  14. package/build.mjs +0 -21
  15. package/bun.lockb +0 -0
  16. package/bunfig.toml +0 -2
  17. package/capacitor.config.ts +0 -33
  18. package/crypto_explained.png +0 -0
  19. package/eslint.config.js +0 -10
  20. package/renovate.json +0 -23
  21. package/src/api/app.ts +0 -55
  22. package/src/api/channels.ts +0 -163
  23. package/src/api/crypto.ts +0 -116
  24. package/src/api/devices_override.ts +0 -41
  25. package/src/api/update.ts +0 -13
  26. package/src/api/versions.ts +0 -101
  27. package/src/app/add.ts +0 -157
  28. package/src/app/debug.ts +0 -258
  29. package/src/app/delete.ts +0 -110
  30. package/src/app/info.ts +0 -99
  31. package/src/app/list.ts +0 -67
  32. package/src/app/set.ts +0 -96
  33. package/src/bundle/check.ts +0 -42
  34. package/src/bundle/cleanup.ts +0 -123
  35. package/src/bundle/compatibility.ts +0 -70
  36. package/src/bundle/decrypt.ts +0 -54
  37. package/src/bundle/delete.ts +0 -52
  38. package/src/bundle/encrypt.ts +0 -60
  39. package/src/bundle/list.ts +0 -42
  40. package/src/bundle/unlink.ts +0 -88
  41. package/src/bundle/upload.ts +0 -552
  42. package/src/bundle/zip.ts +0 -145
  43. package/src/channel/add.ts +0 -80
  44. package/src/channel/currentBundle.ts +0 -72
  45. package/src/channel/delete.ts +0 -57
  46. package/src/channel/list.ts +0 -49
  47. package/src/channel/set.ts +0 -179
  48. package/src/config/index.ts +0 -156
  49. package/src/index.ts +0 -310
  50. package/src/init.ts +0 -495
  51. package/src/key.ts +0 -135
  52. package/src/login.ts +0 -70
  53. package/src/types/capacitor__cli.d.ts +0 -6
  54. package/src/types/supabase.types.ts +0 -2123
  55. package/src/user/account.ts +0 -11
  56. package/src/utils.ts +0 -1076
  57. package/test/VerifyZip.java +0 -83
  58. package/test/check-posix-paths.js +0 -21
  59. package/test/chunk_convert.ts +0 -28
  60. package/test/data.ts +0 -18769
  61. package/test/test_headers_rls.ts +0 -24
  62. package/test/test_semver.ts +0 -13
  63. package/test/test_upload/app.js +0 -3
  64. package/test/test_upload/assets/check-posix-paths.js +0 -21
  65. package/test/test_upload/index.html +0 -0
  66. package/test/test_zip_swift/Package.resolved +0 -24
  67. package/test/test_zip_swift/Package.swift +0 -29
  68. package/test/test_zip_swift/Sources/main.swift +0 -80
  69. package/tsconfig.json +0 -39
@@ -1,24 +0,0 @@
1
- import { createClient } from '@supabase/supabase-js'
2
-
3
- const supaUrl = 'https://aucsybvnhavogdmzwtcw.supabase.co'
4
- const apikey = '***'
5
- const anonKey = '***'
6
- const init = async () => {
7
- const supabase = createClient(supaUrl, anonKey, {
8
- global: {
9
- headers: {
10
- capgkey: '***',
11
- }
12
- }
13
- })
14
- const { data: userId } = await supabase
15
- .rpc('get_user_id', { apikey })
16
- console.log('userId', userId)
17
- const apps = await supabase.from('apps')
18
- .select()
19
- .eq('app_id', 'ee.forgr.captime')
20
- console.log('apps', apps.data)
21
- // try to find one app
22
- }
23
-
24
- init()
@@ -1,13 +0,0 @@
1
- // import semver from 'semver'
2
-
3
- // eslint-disable-next-line max-len
4
- const regex = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
5
- const bundles = ['20220929.0.0+7c146f40', 'v1.2.3']
6
- // check if bundle is valid
7
- for (const bundle of bundles) {
8
- if (!regex.test(bundle)) {
9
- console.log(`Your bundle name ${bundle}, is not valid it should follow semver convention : https://semver.org/`);
10
- } else {
11
- console.log('valid')
12
- }
13
- }
@@ -1,3 +0,0 @@
1
- import { CapacitorUpdater } from '@capgo/capacitor-updater'
2
-
3
- CapacitorUpdater.notifyAppReady()
@@ -1,21 +0,0 @@
1
- const AdmZip = require('adm-zip');
2
-
3
- const zip = new AdmZip('build.zip');
4
- const zipEntries = zip.getEntries(); // an array of ZipEntry records
5
-
6
- let errorFound = false;
7
-
8
- zipEntries.forEach((zipEntry) => {
9
- const entryName = zipEntry.entryName;
10
- if (entryName.includes('\\')) {
11
- console.error(`Non-POSIX path detected: ${entryName}`);
12
- errorFound = true;
13
- }
14
- });
15
-
16
- if (errorFound) {
17
- console.error('Non-POSIX paths detected in the zip file');
18
- process.exit(1);
19
- } else {
20
- console.log('All paths are POSIX compliant.');
21
- }
File without changes
@@ -1,24 +0,0 @@
1
- {
2
- "originHash" : "be28ad70f15d01b567aeb05f85c074fc7d437a0ade8a8ceab7a6149b8f5b3593",
3
- "pins" : [
4
- {
5
- "identity" : "swift-argument-parser",
6
- "kind" : "remoteSourceControl",
7
- "location" : "https://github.com/apple/swift-argument-parser",
8
- "state" : {
9
- "revision" : "0fbc8848e389af3bb55c182bc19ca9d5dc2f255b",
10
- "version" : "1.4.0"
11
- }
12
- },
13
- {
14
- "identity" : "ziparchive",
15
- "kind" : "remoteSourceControl",
16
- "location" : "https://github.com/ZipArchive/ZipArchive.git",
17
- "state" : {
18
- "revision" : "79d4dc9729096c6ad83dd3cee2b9f354d1b4ab7b",
19
- "version" : "2.5.5"
20
- }
21
- }
22
- ],
23
- "version" : 3
24
- }
@@ -1,29 +0,0 @@
1
- // swift-tools-version: 5.10
2
- // The swift-tools-version declares the minimum version of Swift required to build this package.
3
-
4
- import PackageDescription
5
-
6
- let package = Package(
7
- name: "MyCLI",
8
- platforms: [
9
- .macOS(.v11)
10
- ], dependencies: [
11
- .package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMajor(from: "1.4.0")),
12
- .package(url: "https://github.com/ZipArchive/ZipArchive.git", .upToNextMajor(from: "2.5.5"))
13
- ],
14
- targets: [
15
- // Targets are the basic building blocks of a package, defining a module or a test suite.
16
- // Targets can depend on other targets in this package and products from dependencies.
17
- .executableTarget(
18
- name: "MyCLI",
19
- dependencies: [
20
- .product(name: "ZipArchive", package: "ZipArchive"),
21
- .product(name: "ArgumentParser", package: "swift-argument-parser"),
22
- ],
23
- path: "Sources",
24
- swiftSettings: [
25
- .unsafeFlags(["-parse-as-library"])
26
- ]
27
- ),
28
- ]
29
- )
@@ -1,80 +0,0 @@
1
- // The Swift Programming Language
2
- // https://docs.swift.org/swift-book
3
-
4
- import ArgumentParser
5
- import Foundation
6
- import ZipArchive
7
- import Darwin
8
-
9
- extension URL {
10
- var isDirectory: Bool {
11
- (try? resourceValues(forKeys: [.isDirectoryKey]))?.isDirectory == true
12
- }
13
- var exist: Bool {
14
- return FileManager().fileExists(atPath: self.path)
15
- }
16
- }
17
-
18
-
19
- func verifyZipFile(zipFilePath: String) {
20
- let destUnZip = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent("extracted")
21
-
22
- var unzipError: NSError?
23
- let success = SSZipArchive.unzipFile(atPath: zipFilePath,
24
- toDestination: destUnZip.path,
25
- preserveAttributes: true,
26
- overwrite: true,
27
- nestedZipLevel: 1,
28
- password: nil,
29
- error: &unzipError,
30
- delegate: nil,
31
- progressHandler: { (entry, _, _, _) in
32
- if entry.contains("\\") {
33
- print("Windows path is not supported: \(entry)")
34
- exit(1)
35
- }
36
-
37
- let fileURL = destUnZip.appendingPathComponent(entry)
38
- let canonicalPath = fileURL.path
39
- let canonicalDir = destUnZip.path
40
-
41
- if !canonicalPath.hasPrefix(canonicalDir) {
42
- print("SecurityException, Failed to ensure directory is the start path: \(canonicalDir) of \(canonicalPath)")
43
- exit(1)
44
- }
45
- },
46
- completionHandler: nil)
47
-
48
- if !success || unzipError != nil {
49
- print("Failed to unzip file: \(zipFilePath)")
50
- print("Error: \(unzipError?.localizedDescription ?? "")")
51
- exit(1)
52
- }
53
-
54
- print("ZIP file is valid: \(zipFilePath)")
55
- }
56
-
57
- @main
58
- struct CapgoCliTest: ParsableCommand {
59
- @Option(parsing: .upToNextOption, help: "Specify the files to test")
60
- public var zipFiles: [String]
61
-
62
- public func run() throws {
63
- print("Hello capgo test", zipFiles)
64
-
65
- for file in zipFiles {
66
- guard let fileUrl = URL(string: file) else {
67
- print("Cannot convert \"\(file)\" into a file")
68
- Darwin.exit(1)
69
- }
70
-
71
- if (!fileUrl.exist) {
72
- print("File \"\(fileUrl)\" does not exist")
73
- Darwin.exit(1)
74
- }
75
-
76
- print("Testing file \(file)")
77
- verifyZipFile(zipFilePath: file)
78
- }
79
- }
80
- }
package/tsconfig.json DELETED
@@ -1,39 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "strict": true,
4
- "forceConsistentCasingInFileNames": true,
5
- "module": "commonjs",
6
- "esModuleInterop": true,
7
- "skipLibCheck": true,
8
- "resolveJsonModule": true,
9
- "target": "es2015",
10
- "moduleResolution": "node",
11
- "sourceMap": true,
12
- "outDir": "dist",
13
- "baseUrl": "src",
14
- "lib": [
15
- "es2016",
16
- "dom"
17
- ],
18
- "typeRoots": [
19
- "src/types/*"
20
- ],
21
- "paths": {
22
- "*": [
23
- "src/types/*"
24
- ],
25
- "@capacitor/cli/dist/config": [
26
- "src/types/capacitor-cli.d.ts"
27
- ]
28
- }
29
- },
30
- "include": [
31
- "src/**/*"
32
- ],
33
- "exclude": [
34
- "node_modules",
35
- "dist",
36
- "__tests__",
37
- "**/*.spec.ts"
38
- ],
39
- }