@regulaforensics/face-sdk 6.3.3-beta → 6.3.4-beta

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 (68) hide show
  1. package/examples/capacitor/package.json +1 -1
  2. package/examples/cordova/package.json +1 -1
  3. package/examples/ionic/package.json +1 -1
  4. package/examples/react-native/package.json +1 -1
  5. package/package.json +1 -1
  6. package/plugin.xml +1 -1
  7. package/ios-ci/.gitlab-ci.yml +0 -41
  8. package/ios-ci/.sample-env +0 -22
  9. package/ios-ci/README.md +0 -97
  10. package/ios-ci/RegulaDanger/Package.swift +0 -34
  11. package/ios-ci/RegulaDanger/Sources/RegulaDanger/RegulaDanger.swift +0 -44
  12. package/ios-ci/RegulaDanger/Tests/LinuxMain.swift +0 -7
  13. package/ios-ci/RegulaDanger/Tests/RegulaDangerTests/RegulaDangerTests.swift +0 -15
  14. package/ios-ci/RegulaDanger/Tests/RegulaDangerTests/XCTestManifests.swift +0 -9
  15. package/ios-ci/install.sh +0 -9
  16. package/ios-ci/ios_ci/__init__.py +0 -8
  17. package/ios-ci/ios_ci/cli.py +0 -408
  18. package/ios-ci/ios_ci/common/__init__.py +0 -0
  19. package/ios-ci/ios_ci/common/build_index.py +0 -70
  20. package/ios-ci/ios_ci/common/clean_cocoapod.sh +0 -13
  21. package/ios-ci/ios_ci/common/dependency.py +0 -466
  22. package/ios-ci/ios_ci/common/ftp.py +0 -314
  23. package/ios-ci/ios_ci/common/searchpod.sh +0 -6
  24. package/ios-ci/ios_ci/common/wait_for_cocopod.sh +0 -21
  25. package/ios-ci/ios_ci/inject.py +0 -145
  26. package/ios-ci/ios_ci/podspec/__init__.py +0 -0
  27. package/ios-ci/ios_ci/podspec/podspec.py +0 -88
  28. package/ios-ci/ios_ci/podspec/templates/BTDevice.podspec +0 -17
  29. package/ios-ci/ios_ci/podspec/templates/Core.podspec +0 -17
  30. package/ios-ci/ios_ci/podspec/templates/DocumentReader.podspec +0 -19
  31. package/ios-ci/ios_ci/podspec/templates/FaceCore.podspec +0 -17
  32. package/ios-ci/ios_ci/podspec/templates/FaceSDK.podspec +0 -18
  33. package/ios-ci/ios_ci/podspec/templates/IRS.podspec +0 -17
  34. package/ios-ci/ios_ci/podspec/templates/RegulaCommon.podspec +0 -17
  35. package/ios-ci/ios_ci/resolve_podfile_common.py +0 -76
  36. package/ios-ci/ios_ci/spm/AppleRootCA-G3.cer +0 -0
  37. package/ios-ci/ios_ci/spm/AppleWWDRCAG3.cer +0 -0
  38. package/ios-ci/ios_ci/spm/SwiftPackageGenerator+Common.sh +0 -48
  39. package/ios-ci/ios_ci/spm/SwiftPackageGenerator.sh +0 -33
  40. package/ios-ci/ios_ci/spm/XcodeSPMCollection.json +0 -29
  41. package/ios-ci/ios_ci/spm/__init__.py +0 -0
  42. package/ios-ci/ios_ci/spm/askpass.py +0 -19
  43. package/ios-ci/ios_ci/spm/spm.py +0 -227
  44. package/ios-ci/ios_ci/upload_build.py +0 -158
  45. package/ios-ci/ios_ci/version.py +0 -14
  46. package/ios-ci/poetry.lock +0 -342
  47. package/ios-ci/pyproject.toml +0 -26
  48. package/ios-ci/scripts.py +0 -9
  49. package/ios-ci/tests/__init__.py +0 -0
  50. package/ios-ci/tests/podspec/fixtures/BTDevice.podspec +0 -17
  51. package/ios-ci/tests/podspec/fixtures/BTDeviceBeta.podspec +0 -17
  52. package/ios-ci/tests/podspec/fixtures/DocumentReaderBeta_RegulaCommon_Beta.podspec +0 -19
  53. package/ios-ci/tests/podspec/fixtures/DocumentReaderBeta_RegulaCommon_Release.podspec +0 -19
  54. package/ios-ci/tests/podspec/fixtures/DocumentReaderFullRFID.podspec +0 -17
  55. package/ios-ci/tests/podspec/fixtures/DocumentReaderFullRFIDBeta.podspec +0 -17
  56. package/ios-ci/tests/podspec/fixtures/DocumentReader_RegulaCommon_Beta.podspec +0 -19
  57. package/ios-ci/tests/podspec/fixtures/DocumentReader_RegulaCommon_Release.podspec +0 -19
  58. package/ios-ci/tests/podspec/fixtures/FaceSDK.podspec +0 -18
  59. package/ios-ci/tests/podspec/fixtures/FaceSDKBeta.podspec +0 -18
  60. package/ios-ci/tests/podspec/fixtures/IRS.podspec +0 -17
  61. package/ios-ci/tests/podspec/fixtures/IRSBeta.podspec +0 -17
  62. package/ios-ci/tests/podspec/fixtures/RegulaCommon.podspec +0 -17
  63. package/ios-ci/tests/podspec/fixtures/RegulaCommonBeta.podspec +0 -17
  64. package/ios-ci/tests/podspec/test_podspec.py +0 -188
  65. package/ios-ci/tests/test_build_index.py +0 -117
  66. package/ios-ci/tests/test_dependency.py +0 -139
  67. package/ios-ci/tests/test_ios_ci.py +0 -5
  68. package/www/capacitor/internal/webpack.config.js +0 -11
@@ -1,408 +0,0 @@
1
- import click
2
- from ios_ci.spm import spm
3
- from ios_ci import inject
4
- from ios_ci import upload_build
5
- from ios_ci import version
6
- from ios_ci.common import dependency
7
- from ios_ci.podspec import podspec
8
-
9
- #
10
- # NOTE: click framework documentation: https://click.palletsprojects.com/en/8.0.x/
11
- #
12
-
13
-
14
- @click.group()
15
- def cli():
16
- """Collection of tools related to Continuous Integration for iOS Platform"""
17
- pass
18
-
19
-
20
- @cli.command()
21
- @click.option(
22
- "-n",
23
- "--name",
24
- required=True,
25
- type=str,
26
- help="a name of a dependency without `Beta` suffix. For Core dependency use short lowercase name.",
27
- metavar="`FaceSDK`, `fullrfid`, `DocumentReader`",
28
- )
29
- @click.option(
30
- "-v",
31
- "--version",
32
- required=True,
33
- type=str,
34
- help="a version of a dependency.",
35
- metavar="`x.x.x` | `+`",
36
- )
37
- @click.option(
38
- "-t",
39
- "--type",
40
- required=True,
41
- type=click.Choice(["Release", "Beta", "Temp", "Nightly", "Stage"], case_sensitive=True),
42
- help="a type of a dependency.",
43
- metavar="`Release` | `Beta` | `Temp` | `Nightly` | `Stage`",
44
- )
45
- @click.option(
46
- "-b",
47
- "--branch",
48
- default="none",
49
- type=str,
50
- help="a branch for Temp dependency. [required] for --type Temp",
51
- metavar="`develop`",
52
- )
53
- @click.option(
54
- "-d",
55
- "--dest",
56
- type=click.Path(exists=True, file_okay=False, resolve_path=True),
57
- help="a path location for the dependency. [optional]",
58
- )
59
- def inject_dependency(name, version, type, branch, dest):
60
- """
61
- Downloads and unzips specified dependency.
62
-
63
- Supports exact version and `+`.
64
- Finds the most appropriate location for the framework to store if the directory is not specified explicitly.
65
- If there is a Pods directory - the dependency will be injected there.
66
- Otherwise the location is the root of the host project.
67
- """
68
-
69
- if type == "Temp" and branch == "none":
70
- raise click.UsageError("The option --branch is [required] for --type `Temp`")
71
-
72
- inject.inject_dependency(
73
- name=name,
74
- version_selector=version,
75
- dependency_type=type,
76
- branch=branch,
77
- destination=dest,
78
- )
79
-
80
-
81
- @cli.command()
82
- @click.option(
83
- "-n",
84
- "--name",
85
- required=True,
86
- type=str,
87
- help="a name of a dependency without `Beta` suffix. For Core dependency use short lowercase name.",
88
- metavar="`FaceSDK`, `fullrfid`, `DocumentReader`",
89
- )
90
- @click.option(
91
- "-v",
92
- "--version",
93
- required=True,
94
- type=str,
95
- help="a version of a dependency.",
96
- metavar="`x.x.x` | `+`",
97
- )
98
- @click.option(
99
- "-t",
100
- "--type",
101
- required=True,
102
- type=click.Choice(["Release", "Beta", "Temp", "Nightly", "Stage"], case_sensitive=True),
103
- help="a type of a dependency.",
104
- metavar="`Release` | `Beta` | `Temp` | `Nightly` | `Stage`",
105
- )
106
- @click.option(
107
- "-b",
108
- "--branch",
109
- default="none",
110
- type=str,
111
- help="a branch for Temp dependency to update the index.toml. [required] for --type Temp",
112
- metavar="`develop`",
113
- )
114
- @click.option(
115
- "-p",
116
- "--path",
117
- required=True,
118
- type=click.Path(exists=True, file_okay=False, resolve_path=True),
119
- help="a location of the [xc]framework folder.",
120
- )
121
- def ftp_upload(name, version, type, branch, path):
122
- """
123
- Determines the ftp location (private or public FTP server) by the name and the version of a package.
124
- Creates .zip archive and upload the build to the server.
125
-
126
- Prompts the user with credentials for the FTP server. To skip the interaction please specify
127
- environment variables:
128
- [PUBLIC_UPLOAD_FTP_USERNAME] [PUBLIC_UPLOAD_FTP_PASSWORD]
129
- [PRIVATE_UPLOAD_FTP_USERNAME] [PRIVATE_UPLOAD_FTP_PASSWORD]
130
- """
131
-
132
- if type == "Temp" and branch == "none":
133
- raise click.UsageError("The option --branch is [required] for --type `Temp`")
134
-
135
- upload_build.upload_build(
136
- name=name,
137
- version=version,
138
- dependency_type=type,
139
- branch=branch,
140
- build_location=path,
141
- )
142
-
143
-
144
- @cli.command()
145
- @click.option(
146
- "-n",
147
- "--name",
148
- required=True,
149
- type=str,
150
- help="a name of a dependency without `Beta` suffix. For Core dependency use short lowercase name.",
151
- metavar="`FaceSDK`, `fullrfid`, `DocumentReader`",
152
- )
153
- @click.option(
154
- "-v",
155
- "--version",
156
- required=True,
157
- type=str,
158
- help="a version of a dependency.",
159
- metavar="`x.x.x` | `+`",
160
- )
161
- @click.option(
162
- "-b",
163
- "--branch",
164
- default="none",
165
- type=str,
166
- help="a branch for Temp dependency to update the index.toml. [required] for --type Temp",
167
- metavar="`develop`",
168
- )
169
- def ftp_update_index_toml(name, version, branch):
170
- """
171
- Only for Temp build type. Adds current version and branch to index.toml
172
- """
173
-
174
- upload_build.update_index_toml(name=name, version=version, branch=branch)
175
-
176
-
177
- @cli.command()
178
- @click.option(
179
- "-n",
180
- "--name",
181
- required=True,
182
- type=str,
183
- help="a name of a dependency without `Beta` suffix.",
184
- metavar="`FaceSDK`, `Common`, `DocumentReader`",
185
- )
186
- @click.option(
187
- "-v",
188
- "--version",
189
- required=True,
190
- type=str,
191
- help="plugin version.",
192
- metavar="`x.x.x` | `+`",
193
- )
194
- @click.option(
195
- "-w",
196
- "--wrapper",
197
- required=True,
198
- type=str,
199
- help="Wrapper name.",
200
- metavar="`react`, `cordova`, `flutter`, `ionic`, `xamarin`",
201
- )
202
- @click.option(
203
- "-p",
204
- "--path",
205
- required=True,
206
- type=click.Path(exists=True, file_okay=False, resolve_path=True),
207
- help="a location of the plugin folder.",
208
- )
209
- def ftp_upload_wrapper(name, version, wrapper, path):
210
- """
211
- Creates .zip archive and upload the build to the server.
212
-
213
- Prompts the user with credentials for the FTP server. To skip the interaction please specify
214
- environment variables:
215
- [PUBLIC_UPLOAD_FTP_USERNAME] [PUBLIC_UPLOAD_FTP_PASSWORD]
216
- [PRIVATE_UPLOAD_FTP_USERNAME] [PRIVATE_UPLOAD_FTP_PASSWORD]
217
- """
218
-
219
- upload_build.upload_wrapper(
220
- name=name,
221
- version=version,
222
- wrapper=wrapper,
223
- build_location=path,
224
- )
225
-
226
-
227
- @cli.command()
228
- @click.option(
229
- "-n",
230
- "--name",
231
- required=True,
232
- type=str,
233
- help="a name of a dependency without `Beta` suffix. For Core dependency use short lowercase name.",
234
- metavar="`FaceSDK`, `fullrfid`, `DocumentReader`",
235
- )
236
- @click.option(
237
- "-t",
238
- "--type",
239
- required=True,
240
- type=click.Choice(["Release", "Beta", "Temp", "Nightly", "Stage"], case_sensitive=True),
241
- help="a type of a dependency.",
242
- metavar="`Release` | `Beta` | `Temp` | `Nightly` | `Stage`",
243
- )
244
- @click.option(
245
- "-b",
246
- "--branch",
247
- default="none",
248
- type=str,
249
- help="a branch for Temp dependency. [required] for --type Temp",
250
- metavar="`develop`",
251
- )
252
- def dependency_version(name, type, branch):
253
- """
254
- Fetches the version of a package by the name and the type.
255
- """
256
- if type == "Temp" and branch == "none":
257
- raise click.UsageError("The option --branch is [required] for --type `Temp`")
258
-
259
- result = version.fetch_version(name=name, type=type, branch=branch)
260
- if result is None:
261
- click.echo("Failed to fetch version", err=True)
262
- exit(1)
263
- else:
264
- click.echo(f"Dependency version: {result}")
265
-
266
-
267
- @cli.command()
268
- @click.option(
269
- "--package-name",
270
- type=str,
271
- help="The name of the package used to create a link to pods.regulaforensics.",
272
- metavar="PACKAGE_NAME",
273
- )
274
- @click.option(
275
- "-v",
276
- "--version",
277
- required=True,
278
- type=str,
279
- help="a version of a new SDK to be published.",
280
- metavar="`x.x.x`",
281
- )
282
- @click.option(
283
- "--collection-update",
284
- type=str,
285
- help="Updates spm collection.",
286
- metavar="COLLECTION_UPDATE",
287
- )
288
- @click.option(
289
- "--common-version",
290
- type=str,
291
- help="a version of the RegulaCommon dependency.",
292
- metavar="`x.x.x`",
293
- )
294
- @click.option(
295
- "-b",
296
- "--branch",
297
- required=True,
298
- type=str,
299
- help="a branch from which the Package.swift will be used as a template.",
300
- metavar="develop",
301
- )
302
- def update_spm(package_name, version, collection_update, common_version, branch):
303
- """Updates the SPM repository manifest with provided version and .zip archived build."""
304
- spm.update_spm(
305
- package_name=package_name, #for post build sh input name
306
- build_version=version,
307
- collection_update=collection_update,
308
- common_version=common_version,
309
- zipped_build_filepath="README.md",
310
- spm_repo_url="repo",
311
- spm_repo_template_branch=branch,
312
- )
313
-
314
-
315
- @cli.command()
316
- @click.option(
317
- "-n",
318
- "--name",
319
- required=True,
320
- type=str,
321
- help="a name of a dependency without `Beta` suffix. For Core dependency use short lowercase name.",
322
- metavar="`FaceSDK`, `fullrfid`, `DocumentReader`",
323
- )
324
- @click.option(
325
- "-v",
326
- "--version",
327
- required=True,
328
- type=str,
329
- help="a version of a dependency.",
330
- metavar="`x.x.x`",
331
- )
332
- @click.option(
333
- "-t",
334
- "--type",
335
- required=True,
336
- type=click.Choice(["Release", "Beta", "Temp", "Nightly", "Stage"], case_sensitive=True),
337
- help="a type of a dependency.",
338
- metavar="`Release` | `Beta` | `Temp` | `Nightly` | `Stage`",
339
- )
340
- @click.option(
341
- "-d",
342
- "--dependency",
343
- nargs=3,
344
- type=click.Tuple(
345
- [str, str, click.Choice(["Release", "Beta", "Temp", "Nightly", "Stage"], case_sensitive=True)]
346
- ),
347
- help="a dependency for a podspec",
348
- metavar="`name` `version` `type`",
349
- )
350
- @click.option(
351
- "-d",
352
- "--dest",
353
- type=click.Path(exists=True, file_okay=False, resolve_path=True),
354
- help="a path location for the output files. [optional]",
355
- )
356
- def create_podspec(name, version, type, dependency, dest):
357
- """
358
- Creates a podspec file for a package at a given location with a dependency.
359
- Packages such as FaceSDK, DocumentReader and IRS require specifying a dependency.
360
- """
361
- import re
362
-
363
- version_pattern = "^\d+\.\d+\.\d+$"
364
- if not re.search(version_pattern, version):
365
- raise click.UsageError(
366
- "The option --version must be in a format of 'x.x.x' where x is a digit."
367
- )
368
-
369
- if name in ["FaceSDK", "DocumentReader"] and dependency is None:
370
- raise click.UsageError(
371
- f"The option --dependency is [required] for the {name} podspec creation."
372
- )
373
- if dependency:
374
- if not re.search(version_pattern, dependency[1]):
375
- raise click.UsageError(
376
- "The option --version must be in a format of 'x.x.x' where `x` is a digit."
377
- )
378
-
379
- result = podspec.make_podspec(
380
- name=name,
381
- version=version,
382
- type=type,
383
- dependency_name=dependency[0] if dependency else None,
384
- dependency_version=dependency[1] if dependency else None,
385
- dependency_type=dependency[2] if dependency else None,
386
- output_location_directory=dest,
387
- )
388
- if result is None:
389
- click.echo("Failed to create podspec", err=True)
390
- exit(1)
391
- else:
392
- click.echo(f"Created podspec at: {result}")
393
-
394
-
395
- @cli.command()
396
- @click.option(
397
- "-n",
398
- "--name",
399
- required=True,
400
- type=str,
401
- help="a short version of corename.",
402
- metavar="fullauthrfid",
403
- )
404
- def core_full_name_from_short_name(name):
405
- click.echo(dependency._core_full_name_from_short_name(name))
406
-
407
- if __name__ == "__main__":
408
- cli()
File without changes
@@ -1,70 +0,0 @@
1
- from __future__ import annotations
2
- from dataclasses import dataclass
3
- from typing import List
4
- from typing import Dict
5
- from typing import Optional
6
-
7
-
8
- @dataclass
9
- class BuildIndex:
10
- branches: List[str]
11
- builds: Dict[str, List[str]]
12
-
13
- def add_version(self, version: str, branch: str):
14
- if branch in self.branches:
15
- builds = self.builds[branch]
16
- if version not in builds:
17
- builds.append(version)
18
- else:
19
- self.branches.append(branch)
20
- self.builds[branch] = [version]
21
-
22
- def version(self, branch: str) -> Optional[str]:
23
- if branch in self.branches and len(self.builds[branch]) > 0:
24
- last_element = self.builds[branch][-1]
25
- return last_element
26
- return None
27
-
28
- @classmethod
29
- def empty(cls) -> BuildIndex:
30
- return BuildIndex(branches=[], builds={})
31
-
32
- @classmethod
33
- def from_json(cls, json: dict) -> Optional[BuildIndex]:
34
- if "branches" not in json.keys():
35
- return None
36
- try:
37
- mapped_builds: dict[str, list[str]] = {}
38
- for branch_key, values in json["branches"].items():
39
- if "builds" not in values.keys():
40
- return None
41
- builds = values["builds"]
42
- if not builds:
43
- return None
44
- mapped_builds[branch_key] = builds.copy()
45
- branches = list(json["branches"].keys())
46
- except AttributeError as error:
47
- print(
48
- f"[error] failed to parse BuildIndex from json: {json}. Error: {error}"
49
- )
50
- return None
51
-
52
- index = BuildIndex(branches=branches, builds=mapped_builds)
53
- return index
54
-
55
- def to_json(self) -> dict:
56
- from datetime import datetime
57
-
58
- updated_at = datetime.utcnow().isoformat()
59
- branches = {}
60
- for branch_name in self.branches:
61
- json_branch = {"builds": self.builds[branch_name]}
62
- branches[branch_name] = json_branch
63
- json = {
64
- "metadata": {
65
- "version": 1,
66
- "updated_at": updated_at,
67
- },
68
- "branches": branches,
69
- }
70
- return json
@@ -1,13 +0,0 @@
1
- #!/bin/bash -l
2
-
3
- PODNAME=$1
4
- output=$(pod trunk info ${PODNAME})
5
-
6
- while read -r line; do
7
- version=$(echo "$line" | egrep -oh '\d+\.\d+\.\d+')
8
- upload_date=$(echo "$line" | egrep -oh '\d{4}-\d{2}-\d{2}')
9
- if [[ $(gdate -d "60 days ago" +'%s') > $(gdate -d "${upload_date}" +'%s') ]]; then
10
- echo "Deleting pod: ${PODNAME} Version: $version upload date: ${upload_date}"
11
- echo "yes" | pod trunk delete ${PODNAME} $version --silent
12
- fi
13
- done <<< "$(echo "$output" | egrep -oh '\d+\.\d+\.\d+.+\d{4}-\d{2}-\d{2}')"