@appcircle/codepush-cli 0.0.1-alpha.1

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 (59) hide show
  1. package/.eslintrc.json +17 -0
  2. package/.github/pre-push +30 -0
  3. package/.github/prepare-commit--msg +2 -0
  4. package/CONTRIBUTING.md +71 -0
  5. package/Dockerfile +9 -0
  6. package/Jenkinsfile +45 -0
  7. package/README.md +837 -0
  8. package/bin/script/acquisition-sdk.js +178 -0
  9. package/bin/script/cli.js +23 -0
  10. package/bin/script/command-executor.js +1292 -0
  11. package/bin/script/command-parser.js +1123 -0
  12. package/bin/script/commands/debug.js +125 -0
  13. package/bin/script/hash-utils.js +203 -0
  14. package/bin/script/index.js +5 -0
  15. package/bin/script/management-sdk.js +454 -0
  16. package/bin/script/react-native-utils.js +249 -0
  17. package/bin/script/sign.js +69 -0
  18. package/bin/script/types/cli.js +40 -0
  19. package/bin/script/types/rest-definitions.js +19 -0
  20. package/bin/script/types.js +4 -0
  21. package/bin/script/utils/file-utils.js +50 -0
  22. package/bin/test/acquisition-rest-mock.js +108 -0
  23. package/bin/test/acquisition-sdk.js +188 -0
  24. package/bin/test/cli.js +1342 -0
  25. package/bin/test/hash-utils.js +149 -0
  26. package/bin/test/management-sdk.js +338 -0
  27. package/package.json +74 -0
  28. package/prettier.config.js +7 -0
  29. package/script/acquisition-sdk.ts +273 -0
  30. package/script/cli.ts +27 -0
  31. package/script/command-executor.ts +1614 -0
  32. package/script/command-parser.ts +1340 -0
  33. package/script/commands/debug.ts +148 -0
  34. package/script/hash-utils.ts +241 -0
  35. package/script/index.ts +5 -0
  36. package/script/management-sdk.ts +627 -0
  37. package/script/react-native-utils.ts +283 -0
  38. package/script/sign.ts +80 -0
  39. package/script/types/cli.ts +234 -0
  40. package/script/types/rest-definitions.ts +152 -0
  41. package/script/types.ts +35 -0
  42. package/script/utils/check-package.mjs +11 -0
  43. package/script/utils/file-utils.ts +46 -0
  44. package/test/acquisition-rest-mock.ts +125 -0
  45. package/test/acquisition-sdk.ts +272 -0
  46. package/test/cli.ts +1692 -0
  47. package/test/hash-utils.ts +170 -0
  48. package/test/management-sdk.ts +438 -0
  49. package/test/resources/TestApp/android/app/build.gradle +56 -0
  50. package/test/resources/TestApp/iOS/TestApp/Info.plist +49 -0
  51. package/test/resources/TestApp/index.android.js +2 -0
  52. package/test/resources/TestApp/index.ios.js +2 -0
  53. package/test/resources/TestApp/index.windows.js +2 -0
  54. package/test/resources/TestApp/package.json +6 -0
  55. package/test/resources/TestApp/windows/TestApp/Package.appxmanifest +46 -0
  56. package/test/resources/ignoredMetadata.zip +0 -0
  57. package/test/resources/test.zip +0 -0
  58. package/test/superagent-mock-config.js +58 -0
  59. package/tsconfig.json +13 -0
@@ -0,0 +1,49 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>CFBundleDevelopmentRegion</key>
6
+ <string>en</string>
7
+ <key>CFBundleExecutable</key>
8
+ <string>$(EXECUTABLE_NAME)</string>
9
+ <key>CFBundleIdentifier</key>
10
+ <string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
11
+ <key>CFBundleInfoDictionaryVersion</key>
12
+ <string>6.0</string>
13
+ <key>CFBundleName</key>
14
+ <string>$(PRODUCT_NAME)</string>
15
+ <key>CFBundlePackageType</key>
16
+ <string>APPL</string>
17
+ <key>CFBundleShortVersionString</key>
18
+ <string>1.2.3</string>
19
+ <key>CFBundleSignature</key>
20
+ <string>????</string>
21
+ <key>CFBundleVersion</key>
22
+ <string>1</string>
23
+ <key>LSRequiresIPhoneOS</key>
24
+ <true/>
25
+ <key>NSAppTransportSecurity</key>
26
+ <dict>
27
+ <key>NSAllowsArbitraryLoads</key>
28
+ <true/>
29
+ </dict>
30
+ <key>UILaunchStoryboardName</key>
31
+ <string>LaunchScreen</string>
32
+ <key>UIRequiredDeviceCapabilities</key>
33
+ <array>
34
+ <string>armv7</string>
35
+ </array>
36
+ <key>UISupportedInterfaceOrientations</key>
37
+ <array>
38
+ <string>UIInterfaceOrientationPortrait</string>
39
+ <string>UIInterfaceOrientationLandscapeLeft</string>
40
+ <string>UIInterfaceOrientationLandscapeRight</string>
41
+ </array>
42
+ <key>UIViewControllerBasedStatusBarAppearance</key>
43
+ <false/>
44
+ <key>NSLocationWhenInUseUsageDescription</key>
45
+ <string></string>
46
+ <key>CodePushDeploymentKey</key>
47
+ <string>deployment-key-here</string>
48
+ </dict>
49
+ </plist>
@@ -0,0 +1,2 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
@@ -0,0 +1,2 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
@@ -0,0 +1,2 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "TestApp",
3
+ "dependencies": {
4
+ "react-native": "0.19.0"
5
+ }
6
+ }
@@ -0,0 +1,46 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+
3
+ <Package
4
+ xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
5
+ xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
6
+ xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
7
+ IgnorableNamespaces="uap mp">
8
+
9
+ <Identity
10
+ Version="1.0.0.0" />
11
+
12
+ <mp:PhoneIdentity PhoneProductId="7cc2be53-6057-4824-ba24-1f73726e3357" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
13
+
14
+ <Properties>
15
+ <DisplayName>TestApp</DisplayName>
16
+ <Logo>Assets\StoreLogo.png</Logo>
17
+ </Properties>
18
+
19
+ <Dependencies>
20
+ <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
21
+ </Dependencies>
22
+
23
+ <Resources>
24
+ <Resource Language="x-generate"/>
25
+ </Resources>
26
+
27
+ <Applications>
28
+ <Application Id="App"
29
+ Executable="$targetnametoken$.exe"
30
+ EntryPoint="TestApp.App">
31
+ <uap:VisualElements
32
+ DisplayName="TestApp"
33
+ Square150x150Logo="Assets\Square150x150Logo.png"
34
+ Square44x44Logo="Assets\Square44x44Logo.png"
35
+ Description="TestApp"
36
+ BackgroundColor="transparent">
37
+ <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
38
+ <uap:SplashScreen Image="Assets\SplashScreen.png" />
39
+ </uap:VisualElements>
40
+ </Application>
41
+ </Applications>
42
+
43
+ <Capabilities>
44
+ <Capability Name="internetClient" />
45
+ </Capabilities>
46
+ </Package>
Binary file
@@ -0,0 +1,58 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+
4
+ // ./superagent-mock-config.js file
5
+ module.exports = [
6
+ {
7
+ pattern: 'http://localhost/(\\w+)/',
8
+
9
+ /**
10
+ * returns the data
11
+ *
12
+ * @param match array Result of the resolution of the regular expression
13
+ * @param params object sent by 'send' function
14
+ */
15
+ fixtures: function (match, params) {
16
+ return {text: "Error", status: 403, ok: false};
17
+
18
+ /**
19
+ * example:
20
+ * request.get('https://error.example/404').end(function(err, res){
21
+ * console.log(err); // 404
22
+ * })
23
+ */
24
+ if (match[1] === '404') {
25
+ throw new Error(404);
26
+ }
27
+
28
+ /**
29
+ * example:
30
+ * request.get('https://error.example/200').end(function(err, res){
31
+ * console.log(res.body); // "Data fixtures"
32
+ * })
33
+ */
34
+
35
+ /**
36
+ * example:
37
+ * request.get('https://domain.send.example/').send({superhero: "me"}).end(function(err, res){
38
+ * console.log(res.body); // "Data fixtures - superhero:me"
39
+ * })
40
+ */
41
+ if(params["superhero"]) {
42
+ return 'Data fixtures - superhero:' + params["superhero"];
43
+ } else {
44
+ return 'Data fixtures';
45
+ }
46
+ },
47
+
48
+ /**
49
+ * returns the result of the request
50
+ *
51
+ * @param match array Result of the resolution of the regular expression
52
+ * @param data mixed Data returns by `fixtures` attribute
53
+ */
54
+ callback: function (match, data) {
55
+ return data;
56
+ }
57
+ },
58
+ ];
package/tsconfig.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "commonjs",
4
+ "noImplicitAny": false,
5
+ "target": "ES2022",
6
+ "outDir": "./bin",
7
+ "skipLibCheck": true,
8
+ },
9
+ "exclude": [
10
+ "./bin",
11
+ "./node_modules"
12
+ ]
13
+ }