Sfoglia il codice sorgente

most working, work on front end

BlackJack 6 anni fa
parent
commit
3df7502993
100 ha cambiato i file con 5808 aggiunte e 1 eliminazioni
  1. 9
    0
      .idea/blueCoin-UI.iml
  2. 6
    0
      .idea/compiler.xml
  3. 5
    0
      .idea/inspectionProfiles/Project_Default.xml
  4. 6
    0
      .idea/misc.xml
  5. 8
    0
      .idea/modules.xml
  6. 6
    0
      .idea/vcs.xml
  7. 206
    0
      .idea/workspace.xml
  8. 1
    1
      .sourcemaps/main.js.map
  9. 7
    0
      ionic.config.json
  10. 1
    0
      node_modules/.bin/ionic
  11. 1
    0
      node_modules/.bin/ncp
  12. 55
    0
      node_modules/@ionic/cli-framework/CHANGELOG.md
  13. 3
    0
      node_modules/@ionic/cli-framework/README.md
  14. 68
    0
      node_modules/@ionic/cli-framework/definitions.d.ts
  15. 2
    0
      node_modules/@ionic/cli-framework/definitions.js
  16. 4
    0
      node_modules/@ionic/cli-framework/guards.d.ts
  17. 19
    0
      node_modules/@ionic/cli-framework/guards.js
  18. 1
    0
      node_modules/@ionic/cli-framework/index.d.ts
  19. 2
    0
      node_modules/@ionic/cli-framework/index.js
  20. 7
    0
      node_modules/@ionic/cli-framework/lib/command.d.ts
  21. 36
    0
      node_modules/@ionic/cli-framework/lib/command.js
  22. 16
    0
      node_modules/@ionic/cli-framework/lib/errors.d.ts
  23. 28
    0
      node_modules/@ionic/cli-framework/lib/errors.js
  24. 14
    0
      node_modules/@ionic/cli-framework/lib/executor.d.ts
  25. 38
    0
      node_modules/@ionic/cli-framework/lib/executor.js
  26. 2
    0
      node_modules/@ionic/cli-framework/lib/index.d.ts
  27. 5
    0
      node_modules/@ionic/cli-framework/lib/index.js
  28. 66
    0
      node_modules/@ionic/cli-framework/lib/options.d.ts
  29. 187
    0
      node_modules/@ionic/cli-framework/lib/options.js
  30. 6
    0
      node_modules/@ionic/cli-framework/lib/validators.d.ts
  31. 77
    0
      node_modules/@ionic/cli-framework/lib/validators.js
  32. 10
    0
      node_modules/@ionic/cli-framework/node_modules/ansi-regex/index.js
  33. 9
    0
      node_modules/@ionic/cli-framework/node_modules/ansi-regex/license
  34. 85
    0
      node_modules/@ionic/cli-framework/node_modules/ansi-regex/package.json
  35. 46
    0
      node_modules/@ionic/cli-framework/node_modules/ansi-regex/readme.md
  36. 4
    0
      node_modules/@ionic/cli-framework/node_modules/strip-ansi/index.js
  37. 9
    0
      node_modules/@ionic/cli-framework/node_modules/strip-ansi/license
  38. 84
    0
      node_modules/@ionic/cli-framework/node_modules/strip-ansi/package.json
  39. 39
    0
      node_modules/@ionic/cli-framework/node_modules/strip-ansi/readme.md
  40. 0
    0
      node_modules/@ionic/cli-framework/package-lock.json.2399697234
  41. 80
    0
      node_modules/@ionic/cli-framework/package.json
  42. 60
    0
      node_modules/@ionic/cli-framework/utils/fs.d.ts
  43. 233
    0
      node_modules/@ionic/cli-framework/utils/fs.js
  44. 9
    0
      node_modules/@ionic/cli-framework/utils/npm.d.ts
  45. 34
    0
      node_modules/@ionic/cli-framework/utils/npm.js
  46. 9
    0
      node_modules/@ionic/cli-framework/utils/promise.d.ts
  47. 14
    0
      node_modules/@ionic/cli-framework/utils/promise.js
  48. 3
    0
      node_modules/@ionic/cli-framework/utils/string.d.ts
  49. 34
    0
      node_modules/@ionic/cli-framework/utils/string.js
  50. 574
    0
      node_modules/@ionic/cli-utils/CHANGELOG.md
  51. 3
    0
      node_modules/@ionic/cli-utils/README.md
  52. 73
    0
      node_modules/@ionic/cli-utils/assets/dev-server/dev-server.js
  53. 103
    0
      node_modules/@ionic/cli-utils/assets/ionic1/lab/index.html
  54. 365
    0
      node_modules/@ionic/cli-utils/assets/ionic1/lab/static/css/style.css
  55. BIN
      node_modules/@ionic/cli-utils/assets/ionic1/lab/static/img/android-statusbar.png
  56. BIN
      node_modules/@ionic/cli-utils/assets/ionic1/lab/static/img/favicon.png
  57. BIN
      node_modules/@ionic/cli-utils/assets/ionic1/lab/static/img/ios-statusbar.png
  58. BIN
      node_modules/@ionic/cli-utils/assets/ionic1/lab/static/img/popup-close.png
  59. BIN
      node_modules/@ionic/cli-utils/assets/ionic1/lab/static/img/popup-ionitron.png
  60. BIN
      node_modules/@ionic/cli-utils/assets/ionic1/lab/static/img/popup-view-bubble.png
  61. BIN
      node_modules/@ionic/cli-utils/assets/ionic1/lab/static/img/wp-statusbar.png
  62. 112
    0
      node_modules/@ionic/cli-utils/assets/ionic1/lab/static/js/lab.js
  63. 4
    0
      node_modules/@ionic/cli-utils/bootstrap.d.ts
  64. 30
    0
      node_modules/@ionic/cli-utils/bootstrap.js
  65. 2
    0
      node_modules/@ionic/cli-utils/commands/build.d.ts
  66. 57
    0
      node_modules/@ionic/cli-utils/commands/build.js
  67. 2
    0
      node_modules/@ionic/cli-utils/commands/config/get.d.ts
  68. 44
    0
      node_modules/@ionic/cli-utils/commands/config/get.js
  69. 2
    0
      node_modules/@ionic/cli-utils/commands/config/set.d.ts
  70. 50
    0
      node_modules/@ionic/cli-utils/commands/config/set.js
  71. 21
    0
      node_modules/@ionic/cli-utils/commands/serve.d.ts
  72. 106
    0
      node_modules/@ionic/cli-utils/commands/serve.js
  73. 21
    0
      node_modules/@ionic/cli-utils/constants.d.ts
  74. 25
    0
      node_modules/@ionic/cli-utils/constants.js
  75. 738
    0
      node_modules/@ionic/cli-utils/definitions.d.ts
  76. 2
    0
      node_modules/@ionic/cli-utils/definitions.js
  77. 55
    0
      node_modules/@ionic/cli-utils/guards.d.ts
  78. 321
    0
      node_modules/@ionic/cli-utils/guards.js
  79. 7
    0
      node_modules/@ionic/cli-utils/index.d.ts
  80. 227
    0
      node_modules/@ionic/cli-utils/index.js
  81. 1
    0
      node_modules/@ionic/cli-utils/lib/android.d.ts
  82. 28
    0
      node_modules/@ionic/cli-utils/lib/android.js
  83. 17
    0
      node_modules/@ionic/cli-utils/lib/app.d.ts
  84. 72
    0
      node_modules/@ionic/cli-utils/lib/app.js
  85. 4
    0
      node_modules/@ionic/cli-utils/lib/backends.d.ts
  86. 5
    0
      node_modules/@ionic/cli-utils/lib/backends.js
  87. 8
    0
      node_modules/@ionic/cli-utils/lib/command.d.ts
  88. 94
    0
      node_modules/@ionic/cli-utils/lib/command.js
  89. 33
    0
      node_modules/@ionic/cli-utils/lib/config.d.ts
  90. 263
    0
      node_modules/@ionic/cli-utils/lib/config.js
  91. 41
    0
      node_modules/@ionic/cli-utils/lib/cordova/config.d.ts
  92. 211
    0
      node_modules/@ionic/cli-utils/lib/cordova/config.js
  93. 3
    0
      node_modules/@ionic/cli-utils/lib/cordova/project.d.ts
  94. 33
    0
      node_modules/@ionic/cli-utils/lib/cordova/project.js
  95. 30
    0
      node_modules/@ionic/cli-utils/lib/cordova/resources.d.ts
  96. 275
    0
      node_modules/@ionic/cli-utils/lib/cordova/resources.js
  97. 13
    0
      node_modules/@ionic/cli-utils/lib/cordova/utils.d.ts
  98. 57
    0
      node_modules/@ionic/cli-utils/lib/cordova/utils.js
  99. 22
    0
      node_modules/@ionic/cli-utils/lib/daemon.d.ts
  100. 0
    0
      node_modules/@ionic/cli-utils/lib/daemon.js

+ 9
- 0
.idea/blueCoin-UI.iml Vedi File

@@ -0,0 +1,9 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module type="JAVA_MODULE" version="4">
3
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
4
+    <exclude-output />
5
+    <content url="file://$MODULE_DIR$" />
6
+    <orderEntry type="inheritedJdk" />
7
+    <orderEntry type="sourceFolder" forTests="false" />
8
+  </component>
9
+</module>

+ 6
- 0
.idea/compiler.xml Vedi File

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="CompilerConfiguration">
4
+    <bytecodeTargetLevel target="8" />
5
+  </component>
6
+</project>

+ 5
- 0
.idea/inspectionProfiles/Project_Default.xml Vedi File

@@ -0,0 +1,5 @@
1
+<component name="InspectionProjectProfileManager">
2
+  <profile version="1.0">
3
+    <option name="myName" value="Project Default" />
4
+  </profile>
5
+</component>

+ 6
- 0
.idea/misc.xml Vedi File

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="JavaScriptSettings">
4
+    <option name="languageLevel" value="ES6" />
5
+  </component>
6
+</project>

+ 8
- 0
.idea/modules.xml Vedi File

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ProjectModuleManager">
4
+    <modules>
5
+      <module fileurl="file://$PROJECT_DIR$/.idea/blueCoin-UI.iml" filepath="$PROJECT_DIR$/.idea/blueCoin-UI.iml" />
6
+    </modules>
7
+  </component>
8
+</project>

+ 6
- 0
.idea/vcs.xml Vedi File

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="VcsDirectoryMappings">
4
+    <mapping directory="" vcs="Git" />
5
+  </component>
6
+</project>

+ 206
- 0
.idea/workspace.xml Vedi File

@@ -0,0 +1,206 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="d5d038b7-1ea0-4165-a8db-cf501b0165cf" name="Default" comment="">
5
+      <change beforePath="$PROJECT_DIR$/.sourcemaps/main.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/.sourcemaps/main.js.map" afterDir="false" />
6
+      <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/src/pages/payment/payment.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/payment/payment.html" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/src/pages/payment/payment.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/payment/payment.ts" afterDir="false" />
9
+      <change beforePath="$PROJECT_DIR$/src/pages/transactions/transactions.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/transactions/transactions.html" afterDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/src/pages/transactions/transactions.module.ts" beforeDir="false" />
11
+      <change beforePath="$PROJECT_DIR$/src/pages/transactions/transactions.scss" beforeDir="false" />
12
+      <change beforePath="$PROJECT_DIR$/www/build/main.js" beforeDir="false" afterPath="$PROJECT_DIR$/www/build/main.js" afterDir="false" />
13
+      <change beforePath="$PROJECT_DIR$/www/build/main.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/www/build/main.js.map" afterDir="false" />
14
+      <change beforePath="$PROJECT_DIR$/www/build/vendor.js" beforeDir="false" afterPath="$PROJECT_DIR$/www/build/vendor.js" afterDir="false" />
15
+      <change beforePath="$PROJECT_DIR$/www/build/vendor.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/www/build/vendor.js.map" afterDir="false" />
16
+    </list>
17
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
18
+    <option name="TRACKING_ENABLED" value="true" />
19
+    <option name="SHOW_DIALOG" value="false" />
20
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
21
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
22
+    <option name="LAST_RESOLUTION" value="IGNORE" />
23
+  </component>
24
+  <component name="Git.Settings">
25
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
26
+  </component>
27
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
28
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
29
+  <component name="JsGulpfileManager">
30
+    <detection-done>true</detection-done>
31
+    <sorting>DEFINITION_ORDER</sorting>
32
+  </component>
33
+  <component name="NodeModulesDirectoryManager">
34
+    <handled-path value="$PROJECT_DIR$/node_modules" />
35
+  </component>
36
+  <component name="NodePackageJsonFileManager">
37
+    <packageJsonPaths>
38
+      <path value="$PROJECT_DIR$/package.json" />
39
+    </packageJsonPaths>
40
+  </component>
41
+  <component name="ProjectFrameBounds" fullScreen="true">
42
+    <option name="y" value="23" />
43
+    <option name="width" value="1127" />
44
+    <option name="height" value="731" />
45
+  </component>
46
+  <component name="ProjectView">
47
+    <navigator proportions="" version="1">
48
+      <foldersAlwaysOnTop value="true" />
49
+    </navigator>
50
+    <panes>
51
+      <pane id="Scope" />
52
+      <pane id="AndroidView" />
53
+      <pane id="PackagesPane" />
54
+      <pane id="ProjectPane" />
55
+    </panes>
56
+  </component>
57
+  <component name="PropertiesComponent">
58
+    <property name="WebServerToolWindowFactoryState" value="false" />
59
+    <property name="aspect.path.notification.shown" value="true" />
60
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
61
+    <property name="node.js.path.for.package.eslint" value="project" />
62
+    <property name="node.js.path.for.package.standard" value="project" />
63
+    <property name="node.js.selected.package.eslint" value="/usr/local/lib/node_modules/eslint" />
64
+    <property name="node.js.selected.package.standard" value="" />
65
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
66
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
67
+    <property name="settings.editor.selected.configurable" value="terminal" />
68
+  </component>
69
+  <component name="RunDashboard">
70
+    <option name="ruleStates">
71
+      <list>
72
+        <RuleState>
73
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
74
+        </RuleState>
75
+        <RuleState>
76
+          <option name="name" value="StatusDashboardGroupingRule" />
77
+        </RuleState>
78
+      </list>
79
+    </option>
80
+  </component>
81
+  <component name="RunManager">
82
+    <configuration default="true" type="Application" factoryName="Application">
83
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
84
+    </configuration>
85
+    <configuration default="true" type="JUnit" factoryName="JUnit">
86
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
87
+      <option name="ALTERNATIVE_JRE_PATH" />
88
+      <option name="PACKAGE_NAME" />
89
+      <option name="MAIN_CLASS_NAME" />
90
+      <option name="METHOD_NAME" />
91
+      <option name="TEST_OBJECT" value="class" />
92
+      <option name="VM_PARAMETERS" value="-ea" />
93
+      <option name="PARAMETERS" />
94
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
95
+      <option name="PASS_PARENT_ENVS" value="true" />
96
+      <option name="TEST_SEARCH_SCOPE">
97
+        <value defaultName="singleModule" />
98
+      </option>
99
+      <patterns />
100
+    </configuration>
101
+    <configuration default="true" type="TestNG" factoryName="TestNG">
102
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
103
+      <option name="ALTERNATIVE_JRE_PATH" />
104
+      <option name="SUITE_NAME" />
105
+      <option name="PACKAGE_NAME" />
106
+      <option name="MAIN_CLASS_NAME" />
107
+      <option name="METHOD_NAME" />
108
+      <option name="GROUP_NAME" />
109
+      <option name="TEST_OBJECT" value="CLASS" />
110
+      <option name="VM_PARAMETERS" value="-ea" />
111
+      <option name="PARAMETERS" />
112
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
113
+      <option name="OUTPUT_DIRECTORY" />
114
+      <option name="PASS_PARENT_ENVS" value="true" />
115
+      <option name="TEST_SEARCH_SCOPE">
116
+        <value defaultName="singleModule" />
117
+      </option>
118
+      <option name="USE_DEFAULT_REPORTERS" value="false" />
119
+      <option name="PROPERTIES_FILE" />
120
+      <properties />
121
+      <listeners />
122
+    </configuration>
123
+  </component>
124
+  <component name="SvnConfiguration">
125
+    <configuration>$USER_HOME$/.subversion</configuration>
126
+  </component>
127
+  <component name="TaskManager">
128
+    <task active="true" id="Default" summary="Default task">
129
+      <changelist id="d5d038b7-1ea0-4165-a8db-cf501b0165cf" name="Default" comment="" />
130
+      <created>1533219704057</created>
131
+      <option name="number" value="Default" />
132
+      <option name="presentableId" value="Default" />
133
+      <updated>1533219704057</updated>
134
+      <workItem from="1533219705866" duration="437000" />
135
+    </task>
136
+    <servers />
137
+  </component>
138
+  <component name="TimeTrackingManager">
139
+    <option name="totallyTimeSpent" value="437000" />
140
+  </component>
141
+  <component name="ToolWindowManager">
142
+    <frame x="0" y="0" width="1280" height="800" extended-state="0" />
143
+    <layout>
144
+      <window_info anchor="right" id="Palette" />
145
+      <window_info anchor="bottom" id="TODO" order="6" />
146
+      <window_info anchor="right" id="Palette&#9;" />
147
+      <window_info id="Image Layers" />
148
+      <window_info anchor="right" id="Capture Analysis" />
149
+      <window_info anchor="bottom" id="Event Log" side_tool="true" />
150
+      <window_info anchor="right" id="Maven Projects" />
151
+      <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
152
+      <window_info anchor="bottom" id="Run" order="2" />
153
+      <window_info anchor="bottom" id="Version Control" />
154
+      <window_info anchor="bottom" id="Terminal" />
155
+      <window_info id="Capture Tool" />
156
+      <window_info id="Designer" />
157
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24959612" />
158
+      <window_info anchor="right" id="Database" />
159
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
160
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
161
+      <window_info id="UI Designer" />
162
+      <window_info anchor="right" id="Theme Preview" />
163
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
164
+      <window_info id="Favorites" side_tool="true" />
165
+      <window_info anchor="bottom" id="Find" order="1" />
166
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
167
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
168
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
169
+      <window_info anchor="bottom" id="Message" order="0" />
170
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
171
+    </layout>
172
+  </component>
173
+  <component name="TypeScriptGeneratedFilesManager">
174
+    <option name="version" value="1" />
175
+  </component>
176
+  <component name="VcsContentAnnotationSettings">
177
+    <option name="myLimit" value="2678400000" />
178
+  </component>
179
+  <component name="masterDetails">
180
+    <states>
181
+      <state key="ArquillianSettingsConfigurable.UI">
182
+        <settings>
183
+          <splitter-proportions>
184
+            <option name="proportions">
185
+              <list>
186
+                <option value="0.2" />
187
+              </list>
188
+            </option>
189
+          </splitter-proportions>
190
+        </settings>
191
+      </state>
192
+      <state key="ProjectJDKs.UI">
193
+        <settings>
194
+          <last-edited>1.8</last-edited>
195
+          <splitter-proportions>
196
+            <option name="proportions">
197
+              <list>
198
+                <option value="0.2" />
199
+              </list>
200
+            </option>
201
+          </splitter-proportions>
202
+        </settings>
203
+      </state>
204
+    </states>
205
+  </component>
206
+</project>

+ 1
- 1
.sourcemaps/main.js.map
File diff suppressed because it is too large
Vedi File


+ 7
- 0
ionic.config.json Vedi File

@@ -3,5 +3,12 @@
3 3
   "integrations": {
4 4
     "cordova": {}
5 5
   },
6
+  "proxies": [
7
+    {
8
+      "path": "/api",
9
+      "proxyUrl": "http://cors.api.com/api"
10
+    }
11
+  ],
12
+  
6 13
   "type": "ionic-angular"
7 14
 }

+ 1
- 0
node_modules/.bin/ionic Vedi File

@@ -0,0 +1 @@
1
+../ionic/bin/ionic

+ 1
- 0
node_modules/.bin/ncp Vedi File

@@ -0,0 +1 @@
1
+../ncp/bin/ncp

+ 55
- 0
node_modules/@ionic/cli-framework/CHANGELOG.md Vedi File

@@ -0,0 +1,55 @@
1
+# Change Log
2
+
3
+All notable changes to this project will be documented in this file.
4
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+<a name="0.1.3"></a>
7
+## [0.1.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-framework@0.1.2...@ionic/cli-framework@0.1.3) (2018-03-13)
8
+
9
+
10
+
11
+
12
+**Note:** Version bump only for package @ionic/cli-framework
13
+
14
+<a name="0.1.2"></a>
15
+## [0.1.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-framework@0.1.1...@ionic/cli-framework@0.1.2) (2017-11-22)
16
+
17
+
18
+
19
+
20
+**Note:** Version bump only for package @ionic/cli-framework
21
+
22
+<a name="0.1.1"></a>
23
+## [0.1.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-framework@0.1.0...@ionic/cli-framework@0.1.1) (2017-11-09)
24
+
25
+
26
+
27
+
28
+**Note:** Version bump only for package @ionic/cli-framework
29
+
30
+<a name="0.1.0"></a>
31
+# [0.1.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-framework@0.0.2...@ionic/cli-framework@0.1.0) (2017-11-07)
32
+
33
+
34
+### Features
35
+
36
+* **integrations:** cordova and gulp integration ([3137c76](https://github.com/ionic-team/ionic-cli/commit/3137c76))
37
+
38
+
39
+
40
+
41
+<a name="0.0.2"></a>
42
+## [0.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-framework@0.0.1...@ionic/cli-framework@0.0.2) (2017-10-26)
43
+
44
+
45
+
46
+
47
+**Note:** Version bump only for package @ionic/cli-framework
48
+
49
+<a name="0.0.1"></a>
50
+## 0.0.1 (2017-10-23)
51
+
52
+
53
+
54
+
55
+**Note:** Version bump only for package @ionic/cli-framework

+ 3
- 0
node_modules/@ionic/cli-framework/README.md Vedi File

@@ -0,0 +1,3 @@
1
+# @ionic/cli-framework
2
+
3
+The foundation framework of the Ionic CLI.

+ 68
- 0
node_modules/@ionic/cli-framework/definitions.d.ts Vedi File

@@ -0,0 +1,68 @@
1
+import * as minimistType from 'minimist';
2
+export declare type CommandLineInput = string | boolean | null | undefined | string[];
3
+export declare type CommandLineInputs = string[];
4
+export declare type Validator = (input?: string, key?: string) => true | string;
5
+export interface CommandLineOptions extends minimistType.ParsedArgs {
6
+    [arg: string]: CommandLineInput;
7
+}
8
+export declare type CommandOptionType = StringConstructor | BooleanConstructor;
9
+export interface CommandInput {
10
+    name: string;
11
+    description: string;
12
+    validators?: Validator[];
13
+    required?: boolean;
14
+    private?: boolean;
15
+}
16
+export interface CommandOption {
17
+    name: string;
18
+    description: string;
19
+    type?: CommandOptionType;
20
+    default?: CommandLineInput;
21
+    aliases?: string[];
22
+    private?: boolean;
23
+    intents?: string[];
24
+    visible?: boolean;
25
+    advanced?: boolean;
26
+}
27
+export interface CommandData<T = CommandInput, U = CommandOption> {
28
+    name: string;
29
+    description: string;
30
+    longDescription?: string;
31
+    exampleCommands?: string[];
32
+    deprecated?: boolean;
33
+    aliases?: string[];
34
+    inputs?: T[];
35
+    options?: U[];
36
+    visible?: boolean;
37
+}
38
+export interface PackageJson {
39
+    name: string;
40
+    version?: string;
41
+    scripts?: {
42
+        [key: string]: string;
43
+    };
44
+    dependencies?: {
45
+        [key: string]: string;
46
+    };
47
+    devDependencies?: {
48
+        [key: string]: string;
49
+    };
50
+}
51
+export interface BowerJson {
52
+    name: string;
53
+    dependencies?: {
54
+        [key: string]: string;
55
+    };
56
+    devDependencies?: {
57
+        [key: string]: string;
58
+    };
59
+}
60
+export interface Validators {
61
+    required: Validator;
62
+    email: Validator;
63
+    numeric: Validator;
64
+}
65
+export interface ValidationError {
66
+    message: string;
67
+    inputName: string;
68
+}

+ 2
- 0
node_modules/@ionic/cli-framework/definitions.js Vedi File

@@ -0,0 +1,2 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });

+ 4
- 0
node_modules/@ionic/cli-framework/guards.d.ts Vedi File

@@ -0,0 +1,4 @@
1
+import { BowerJson, PackageJson, ValidationError } from './definitions';
2
+export declare function isPackageJson(o: Object): o is PackageJson;
3
+export declare function isBowerJson(o: Object): o is BowerJson;
4
+export declare function isValidationErrorArray(e: Object[]): e is ValidationError[];

+ 19
- 0
node_modules/@ionic/cli-framework/guards.js Vedi File

@@ -0,0 +1,19 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+function isPackageJson(o) {
4
+    const obj = o;
5
+    return obj && typeof obj.name === 'string';
6
+}
7
+exports.isPackageJson = isPackageJson;
8
+function isBowerJson(o) {
9
+    const obj = o;
10
+    return obj && typeof obj.name === 'string';
11
+}
12
+exports.isBowerJson = isBowerJson;
13
+function isValidationErrorArray(e) {
14
+    const err = e;
15
+    return err && err[0]
16
+        && typeof err[0].message === 'string'
17
+        && typeof err[0].inputName === 'string';
18
+}
19
+exports.isValidationErrorArray = isValidationErrorArray;

+ 1
- 0
node_modules/@ionic/cli-framework/index.d.ts Vedi File

@@ -0,0 +1 @@
1
+export * from './definitions';

+ 2
- 0
node_modules/@ionic/cli-framework/index.js Vedi File

@@ -0,0 +1,2 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });

+ 7
- 0
node_modules/@ionic/cli-framework/lib/command.d.ts Vedi File

@@ -0,0 +1,7 @@
1
+import { CommandData, CommandLineInputs, CommandLineOptions } from '../definitions';
2
+export declare abstract class Command<T extends CommandData> {
3
+    readonly metadata: T;
4
+    validate(inputs: CommandLineInputs): Promise<void>;
5
+    abstract run(inputs: CommandLineInputs, options: CommandLineOptions): Promise<void>;
6
+}
7
+export declare function validateInputs(argv: string[], metadata: CommandData): void;

+ 36
- 0
node_modules/@ionic/cli-framework/lib/command.js Vedi File

@@ -0,0 +1,36 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const validators_1 = require("./validators");
5
+class Command {
6
+    validate(inputs) {
7
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
8
+            validateInputs(inputs, this.metadata);
9
+        });
10
+    }
11
+}
12
+exports.Command = Command;
13
+function validateInputs(argv, metadata) {
14
+    if (!metadata.inputs) {
15
+        return;
16
+    }
17
+    const errors = [];
18
+    for (let i in metadata.inputs) {
19
+        const input = metadata.inputs[i];
20
+        if (input.validators && input.validators.length > 0) {
21
+            const vnames = input.validators.map(v => v.name);
22
+            if (vnames.includes('required')) {
23
+                validators_1.validate(argv[i], input.name, [validators_1.validators.required], errors);
24
+            }
25
+            else {
26
+                if (argv[i]) {
27
+                    validators_1.validate(argv[i], input.name, input.validators, errors);
28
+                }
29
+            }
30
+        }
31
+    }
32
+    if (errors.length > 0) {
33
+        throw errors;
34
+    }
35
+}
36
+exports.validateInputs = validateInputs;

+ 16
- 0
node_modules/@ionic/cli-framework/lib/errors.d.ts Vedi File

@@ -0,0 +1,16 @@
1
+import { ValidationError } from '../definitions';
2
+export declare class BaseError extends Error {
3
+    message: string;
4
+    name: string;
5
+    stack: string;
6
+    constructor(message: string);
7
+    toString(): string;
8
+}
9
+export declare class InputValidationError extends BaseError {
10
+    errors: ValidationError[];
11
+    constructor(message: string, errors: ValidationError[]);
12
+}
13
+export declare class CommandNotFoundError extends BaseError {
14
+    args: string[];
15
+    constructor(message: string, args: string[]);
16
+}

+ 28
- 0
node_modules/@ionic/cli-framework/lib/errors.js Vedi File

@@ -0,0 +1,28 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+class BaseError extends Error {
4
+    constructor(message) {
5
+        super(message);
6
+        this.name = 'Exception';
7
+        this.message = message;
8
+        this.stack = (new Error()).stack || '';
9
+    }
10
+    toString() {
11
+        return `${this.name}: ${this.message}`;
12
+    }
13
+}
14
+exports.BaseError = BaseError;
15
+class InputValidationError extends BaseError {
16
+    constructor(message, errors) {
17
+        super(message);
18
+        this.errors = errors;
19
+    }
20
+}
21
+exports.InputValidationError = InputValidationError;
22
+class CommandNotFoundError extends BaseError {
23
+    constructor(message, args) {
24
+        super(message);
25
+        this.args = args;
26
+    }
27
+}
28
+exports.CommandNotFoundError = CommandNotFoundError;

+ 14
- 0
node_modules/@ionic/cli-framework/lib/executor.d.ts Vedi File

@@ -0,0 +1,14 @@
1
+import { CommandMetadata, CommandMetadataInput, CommandMetadataOption, ICommand, INamespace } from '../definitions';
2
+import { Command, Namespace } from './command';
3
+export declare class BaseExecutor<C extends ICommand<C, N, M, I, O>, N extends INamespace<C, N, M, I, O>, M extends CommandMetadata<I, O>, I extends CommandMetadataInput, O extends CommandMetadataOption> {
4
+    namespace: N;
5
+    constructor(namespace: N);
6
+    execute(argv: string[], env: {
7
+        [key: string]: string;
8
+    }): Promise<void>;
9
+}
10
+export declare class Executor extends BaseExecutor<Command, Namespace, CommandMetadata, CommandMetadataInput, CommandMetadataOption> {
11
+}
12
+export declare function execute<C extends ICommand<C, N, M, I, O>, N extends INamespace<C, N, M, I, O>, M extends CommandMetadata<I, O>, I extends CommandMetadataInput, O extends CommandMetadataOption>(namespace: N, argv: string[], env: {
13
+    [key: string]: string;
14
+}): Promise<void>;

+ 38
- 0
node_modules/@ionic/cli-framework/lib/executor.js Vedi File

@@ -0,0 +1,38 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const lodash = require("lodash");
5
+const errors_1 = require("./errors");
6
+const options_1 = require("./options");
7
+const guards_1 = require("../guards");
8
+class BaseExecutor {
9
+    constructor(namespace) {
10
+        this.namespace = namespace;
11
+    }
12
+    execute(argv, env) {
13
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
14
+            const parsedArgs = options_1.stripOptions(argv, { includeSeparated: false });
15
+            const location = yield this.namespace.locate(parsedArgs);
16
+            if (guards_1.isNamespace(location.obj)) {
17
+                throw new errors_1.CommandNotFoundError('Command not found.', parsedArgs);
18
+            }
19
+            const cmd = location.obj;
20
+            const metadata = yield cmd.getMetadata();
21
+            const options = options_1.parseArgs(lodash.drop(argv, location.path.length - 1), options_1.metadataToParseArgsOptions(metadata));
22
+            const inputs = options._;
23
+            yield cmd.validate(inputs);
24
+            yield cmd.run(inputs, options, { location });
25
+        });
26
+    }
27
+}
28
+exports.BaseExecutor = BaseExecutor;
29
+class Executor extends BaseExecutor {
30
+}
31
+exports.Executor = Executor;
32
+function execute(namespace, argv, env) {
33
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
34
+        const executor = new BaseExecutor(namespace);
35
+        yield executor.execute(argv, env);
36
+    });
37
+}
38
+exports.execute = execute;

+ 2
- 0
node_modules/@ionic/cli-framework/lib/index.d.ts Vedi File

@@ -0,0 +1,2 @@
1
+export * from './command';
2
+export * from './validators';

+ 5
- 0
node_modules/@ionic/cli-framework/lib/index.js Vedi File

@@ -0,0 +1,5 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+tslib_1.__exportStar(require("./command"), exports);
5
+tslib_1.__exportStar(require("./validators"), exports);

+ 66
- 0
node_modules/@ionic/cli-framework/lib/options.d.ts Vedi File

@@ -0,0 +1,66 @@
1
+import * as minimist from 'minimist';
2
+import { CommandLineOptions, CommandMetadata, CommandMetadataInput, CommandMetadataOption, HydratedCommandOption, HydratedParseArgsOptions, MetadataGroup, ParsedArg } from '../definitions';
3
+export declare const parseArgs: typeof minimist;
4
+export { ParsedArgs } from 'minimist';
5
+/**
6
+ * Remove options, which are any arguments that starts with a hyphen (-), from
7
+ * a list of process args and return the result.
8
+ *
9
+ * If a double-hyphen separator (--) is encountered, it and the remaining
10
+ * arguments are included in the result, as they are not interpreted. This
11
+ * behavior can be disabled by setting the `includeSeparated` option to
12
+ * `false`.
13
+ */
14
+export declare function stripOptions(pargv: string[], {includeSeparated}: {
15
+    includeSeparated?: boolean;
16
+}): string[];
17
+/**
18
+ * Split a list of process args into own-arguments and other-arguments, which
19
+ * are separated by the double-hyphen (--) separator.
20
+ *
21
+ * For example, `['cmd', 'arg1', '--', 'arg2']` will be split into
22
+ * `['cmd', 'arg1']` and `['arg2']`.
23
+ */
24
+export declare function separateArgv(pargv: string[]): [string[], string[]];
25
+/**
26
+ * Takes a Minimist command option and normalizes its values.
27
+ */
28
+export declare function hydrateCommandMetadataOption<O extends CommandMetadataOption>(option: O): O & HydratedCommandOption;
29
+export declare function metadataToParseArgsOptions(metadata: CommandMetadata): HydratedParseArgsOptions;
30
+export declare type OptionPredicate<O extends CommandMetadataOption> = (option: O, value?: ParsedArg) => boolean;
31
+export declare namespace OptionFilters {
32
+    function includesGroups<O extends CommandMetadataOption>(groups: MetadataGroup | MetadataGroup[]): OptionPredicate<O>;
33
+    function excludesGroups<O extends CommandMetadataOption>(groups: MetadataGroup | MetadataGroup[]): OptionPredicate<O>;
34
+}
35
+/**
36
+ * Given a command metadata object and an object of parsed options, match each
37
+ * supplied option with its command metadata option definition and pass it,
38
+ * along with its value, to a predicate function, which is used to return a
39
+ * subset of the parsed options.
40
+ *
41
+ * Options which are unknown to the command metadata are always excluded.
42
+ *
43
+ * @param predicate If excluded, `() => true` is used.
44
+ */
45
+export declare function filterCommandLineOptions<M extends CommandMetadata<I, O>, I extends CommandMetadataInput, O extends CommandMetadataOption>(metadata: M, parsedArgs: CommandLineOptions, predicate?: OptionPredicate<O>): CommandLineOptions;
46
+/**
47
+ * Given a command metadata object and an object of parsed options, return a
48
+ * subset of the parsed options whose command metadata option definition
49
+ * contains the supplied group(s).
50
+ *
51
+ * Options which are unknown to the command metadata are always excluded.
52
+ *
53
+ * @param groups One or more option groups.
54
+ */
55
+export declare function filterCommandLineOptionsByGroup<M extends CommandMetadata<I, O>, I extends CommandMetadataInput, O extends CommandMetadataOption>(metadata: M, parsedArgs: CommandLineOptions, groups: MetadataGroup | MetadataGroup[]): CommandLineOptions;
56
+export interface UnparseArgsOptions {
57
+    useDoubleQuotes?: boolean;
58
+    useEquals?: boolean;
59
+    ignoreFalse?: boolean;
60
+    allowCamelCase?: boolean;
61
+}
62
+/**
63
+ * The opposite of `parseArgs()`. This function takes parsed args and converts
64
+ * them back into an argv array of arguments and options.
65
+ */
66
+export declare function unparseArgs(parsedArgs: minimist.ParsedArgs, {useDoubleQuotes, useEquals, ignoreFalse, allowCamelCase}: UnparseArgsOptions): string[];

+ 187
- 0
node_modules/@ionic/cli-framework/lib/options.js Vedi File

@@ -0,0 +1,187 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const minimist = require("minimist");
4
+const lodash = require("lodash");
5
+exports.parseArgs = minimist;
6
+/**
7
+ * Remove options, which are any arguments that starts with a hyphen (-), from
8
+ * a list of process args and return the result.
9
+ *
10
+ * If a double-hyphen separator (--) is encountered, it and the remaining
11
+ * arguments are included in the result, as they are not interpreted. This
12
+ * behavior can be disabled by setting the `includeSeparated` option to
13
+ * `false`.
14
+ */
15
+function stripOptions(pargv, { includeSeparated = true }) {
16
+    const r = /^\-/;
17
+    const [ownArgs, otherArgs] = separateArgv(pargv);
18
+    const filteredArgs = ownArgs.filter(arg => !r.test(arg));
19
+    if (!includeSeparated) {
20
+        return filteredArgs;
21
+    }
22
+    if (otherArgs.length > 0) {
23
+        otherArgs.unshift('--');
24
+    }
25
+    return [...filteredArgs, ...otherArgs];
26
+}
27
+exports.stripOptions = stripOptions;
28
+/**
29
+ * Split a list of process args into own-arguments and other-arguments, which
30
+ * are separated by the double-hyphen (--) separator.
31
+ *
32
+ * For example, `['cmd', 'arg1', '--', 'arg2']` will be split into
33
+ * `['cmd', 'arg1']` and `['arg2']`.
34
+ */
35
+function separateArgv(pargv) {
36
+    const ownArgs = [...pargv];
37
+    const otherArgs = [];
38
+    const sepIndex = pargv.indexOf('--');
39
+    if (sepIndex >= 0) {
40
+        otherArgs.push(...ownArgs.splice(sepIndex));
41
+        otherArgs.shift(); // strip separator
42
+    }
43
+    return [ownArgs, otherArgs];
44
+}
45
+exports.separateArgv = separateArgv;
46
+const typeDefaults = new Map()
47
+    .set(String, null) // tslint:disable-line:no-null-keyword
48
+    .set(Boolean, false);
49
+/**
50
+ * Takes a Minimist command option and normalizes its values.
51
+ */
52
+function hydrateCommandMetadataOption(option) {
53
+    const type = option.type ? option.type : String;
54
+    return lodash.assign({}, option, {
55
+        type,
56
+        default: option.default ? option.default : typeDefaults.get(type),
57
+        aliases: option.aliases ? option.aliases : [],
58
+    });
59
+}
60
+exports.hydrateCommandMetadataOption = hydrateCommandMetadataOption;
61
+function metadataToParseArgsOptions(metadata) {
62
+    const options = {
63
+        string: ['_'],
64
+        boolean: [],
65
+        alias: {},
66
+        default: {},
67
+        '--': true,
68
+    };
69
+    if (!metadata.options) {
70
+        return options;
71
+    }
72
+    for (const o of metadata.options) {
73
+        const opt = hydrateCommandMetadataOption(o);
74
+        if (opt.type === String) {
75
+            options.string.push(opt.name);
76
+        }
77
+        else if (opt.type === Boolean) {
78
+            options.boolean.push(opt.name);
79
+        }
80
+        options.default[opt.name] = opt.default;
81
+        options.alias[opt.name] = opt.aliases;
82
+    }
83
+    return options;
84
+}
85
+exports.metadataToParseArgsOptions = metadataToParseArgsOptions;
86
+var OptionFilters;
87
+(function (OptionFilters) {
88
+    function includesGroups(groups) {
89
+        const g = Array.isArray(groups) ? groups : [groups];
90
+        return (option) => typeof option.groups !== 'undefined' && lodash.intersection(option.groups, g).length > 0;
91
+    }
92
+    OptionFilters.includesGroups = includesGroups;
93
+    function excludesGroups(groups) {
94
+        const g = Array.isArray(groups) ? groups : [groups];
95
+        return (option) => typeof option.groups === 'undefined' || lodash.difference(option.groups, g).length > 0;
96
+    }
97
+    OptionFilters.excludesGroups = excludesGroups;
98
+})(OptionFilters = exports.OptionFilters || (exports.OptionFilters = {}));
99
+/**
100
+ * Given a command metadata object and an object of parsed options, match each
101
+ * supplied option with its command metadata option definition and pass it,
102
+ * along with its value, to a predicate function, which is used to return a
103
+ * subset of the parsed options.
104
+ *
105
+ * Options which are unknown to the command metadata are always excluded.
106
+ *
107
+ * @param predicate If excluded, `() => true` is used.
108
+ */
109
+function filterCommandLineOptions(metadata, parsedArgs, predicate = () => true) {
110
+    const initial = { _: parsedArgs._ };
111
+    if (parsedArgs['--']) {
112
+        initial['--'] = parsedArgs['--'];
113
+    }
114
+    const mapped = new Map(metadata.options ? [
115
+        ...metadata.options.map((o) => [o.name, o]),
116
+        ...lodash.flatten(metadata.options.map(opt => opt.aliases ? opt.aliases.map((a) => [a, opt]) : [])),
117
+    ] : []);
118
+    const pairs = Object.keys(parsedArgs)
119
+        .map((k) => [k, mapped.get(k), parsedArgs[k]])
120
+        .filter(([k, opt, value]) => opt && predicate(opt, value))
121
+        .map(([k, opt, value]) => [opt ? opt.name : k, value]);
122
+    return Object.assign({}, initial, lodash.fromPairs(pairs));
123
+}
124
+exports.filterCommandLineOptions = filterCommandLineOptions;
125
+/**
126
+ * Given a command metadata object and an object of parsed options, return a
127
+ * subset of the parsed options whose command metadata option definition
128
+ * contains the supplied group(s).
129
+ *
130
+ * Options which are unknown to the command metadata are always excluded.
131
+ *
132
+ * @param groups One or more option groups.
133
+ */
134
+function filterCommandLineOptionsByGroup(metadata, parsedArgs, groups) {
135
+    return filterCommandLineOptions(metadata, parsedArgs, OptionFilters.includesGroups(groups));
136
+}
137
+exports.filterCommandLineOptionsByGroup = filterCommandLineOptionsByGroup;
138
+/**
139
+ * The opposite of `parseArgs()`. This function takes parsed args and converts
140
+ * them back into an argv array of arguments and options.
141
+ */
142
+function unparseArgs(parsedArgs, { useDoubleQuotes, useEquals = true, ignoreFalse = true, allowCamelCase }) {
143
+    // Based on dargs, by sindresorhus
144
+    // @see https://github.com/sindresorhus/dargs/blob/master/license
145
+    const args = [...parsedArgs['_'] || []];
146
+    const separatedArgs = parsedArgs['--'];
147
+    if (useDoubleQuotes) {
148
+        useEquals = true;
149
+    }
150
+    const pushPairs = (...pairs) => {
151
+        for (const [k, val] of pairs) {
152
+            const key = '--' + (allowCamelCase ? k : k.replace(/[A-Z]/g, '-$&').toLowerCase());
153
+            if (useEquals) {
154
+                args.push(key + (val ? `=${useDoubleQuotes && val.includes(' ') ? `"${val}"` : val}` : ''));
155
+            }
156
+            else {
157
+                args.push(key);
158
+                if (val) {
159
+                    args.push(val);
160
+                }
161
+            }
162
+        }
163
+    };
164
+    const pairs = lodash.toPairs(parsedArgs).filter(([k]) => k !== '_' && k !== '--');
165
+    for (const [key, val] of pairs) {
166
+        if (val === true) {
167
+            pushPairs([key, undefined]);
168
+        }
169
+        if (val === false && !ignoreFalse) {
170
+            pushPairs([`no-${key}`, undefined]);
171
+        }
172
+        if (typeof val === 'string') {
173
+            pushPairs([key, val]);
174
+        }
175
+        if (typeof val === 'number' && !Number.isNaN(val)) {
176
+            pushPairs([key, val.toString()]);
177
+        }
178
+        if (Array.isArray(val)) {
179
+            pushPairs(...val.map((v) => [key, v]));
180
+        }
181
+    }
182
+    if (separatedArgs && separatedArgs.length > 0) {
183
+        args.push('--', ...separatedArgs);
184
+    }
185
+    return args;
186
+}
187
+exports.unparseArgs = unparseArgs;

+ 6
- 0
node_modules/@ionic/cli-framework/lib/validators.d.ts Vedi File

@@ -0,0 +1,6 @@
1
+import { ValidationError, Validator, Validators } from '../definitions';
2
+export declare function validate(input: string, key: string, validators: Validator[], errors?: ValidationError[]): void;
3
+export declare const validators: Validators;
4
+export declare function contains(values: (string | undefined)[], {caseSensitive}: {
5
+    caseSensitive?: boolean;
6
+}): Validator;

+ 77
- 0
node_modules/@ionic/cli-framework/lib/validators.js Vedi File

@@ -0,0 +1,77 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const chalk_1 = require("chalk");
4
+const string_1 = require("../utils/string");
5
+function validate(input, key, validators, errors) {
6
+    const throwErrors = typeof errors === 'undefined';
7
+    if (!errors) {
8
+        errors = [];
9
+    }
10
+    for (let validator of validators) {
11
+        const r = validator(input, key);
12
+        if (r !== true) {
13
+            errors.push({ message: r, inputName: key });
14
+        }
15
+    }
16
+    if (throwErrors && errors.length > 0) {
17
+        throw errors;
18
+    }
19
+}
20
+exports.validate = validate;
21
+exports.validators = {
22
+    required(input, key) {
23
+        if (!input) {
24
+            if (key) {
25
+                return `${chalk_1.default.green(key)} must not be empty.`;
26
+            }
27
+            else {
28
+                return 'Must not be empty.';
29
+            }
30
+        }
31
+        return true;
32
+    },
33
+    email(input, key) {
34
+        if (!string_1.isValidEmail(input)) {
35
+            if (key) {
36
+                return `${chalk_1.default.green(key)} is an invalid email address.`;
37
+            }
38
+            else {
39
+                return 'Invalid email address.';
40
+            }
41
+        }
42
+        return true;
43
+    },
44
+    numeric(input, key) {
45
+        if (isNaN(Number(input))) {
46
+            if (key) {
47
+                return `${chalk_1.default.green(key)} must be numeric.`;
48
+            }
49
+            else {
50
+                return 'Must be numeric.';
51
+            }
52
+        }
53
+        return true;
54
+    },
55
+};
56
+function contains(values, { caseSensitive = true }) {
57
+    if (!caseSensitive) {
58
+        values = values.map(v => typeof v === 'string' ? v.toLowerCase() : v);
59
+    }
60
+    return function (input, key) {
61
+        if (!caseSensitive && typeof input === 'string') {
62
+            input = input.toLowerCase();
63
+        }
64
+        if (values.indexOf(input) === -1) {
65
+            const strValues = values.filter(v => typeof v === 'string'); // TODO: typescript bug?
66
+            const mustBe = (strValues.length !== values.length ? 'unset or one of' : 'one of') + ': ' + strValues.map(v => chalk_1.default.green(v)).join(', ');
67
+            if (key) {
68
+                return `${chalk_1.default.green(key)} must be ${mustBe} (not ${typeof input === 'undefined' ? 'unset' : chalk_1.default.green(input)})`;
69
+            }
70
+            else {
71
+                return `Must be ${mustBe} (not ${typeof input === 'undefined' ? 'unset' : chalk_1.default.green(input)})`;
72
+            }
73
+        }
74
+        return true;
75
+    };
76
+}
77
+exports.contains = contains;

+ 10
- 0
node_modules/@ionic/cli-framework/node_modules/ansi-regex/index.js Vedi File

@@ -0,0 +1,10 @@
1
+'use strict';
2
+
3
+module.exports = () => {
4
+	const pattern = [
5
+		'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
6
+		'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
7
+	].join('|');
8
+
9
+	return new RegExp(pattern, 'g');
10
+};

+ 9
- 0
node_modules/@ionic/cli-framework/node_modules/ansi-regex/license Vedi File

@@ -0,0 +1,9 @@
1
+MIT License
2
+
3
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 85
- 0
node_modules/@ionic/cli-framework/node_modules/ansi-regex/package.json Vedi File

@@ -0,0 +1,85 @@
1
+{
2
+  "_from": "ansi-regex@^3.0.0",
3
+  "_id": "ansi-regex@3.0.0",
4
+  "_inBundle": false,
5
+  "_integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
6
+  "_location": "/@ionic/cli-framework/ansi-regex",
7
+  "_phantomChildren": {},
8
+  "_requested": {
9
+    "type": "range",
10
+    "registry": true,
11
+    "raw": "ansi-regex@^3.0.0",
12
+    "name": "ansi-regex",
13
+    "escapedName": "ansi-regex",
14
+    "rawSpec": "^3.0.0",
15
+    "saveSpec": null,
16
+    "fetchSpec": "^3.0.0"
17
+  },
18
+  "_requiredBy": [
19
+    "/@ionic/cli-framework/strip-ansi"
20
+  ],
21
+  "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
22
+  "_shasum": "ed0317c322064f79466c02966bddb605ab37d998",
23
+  "_spec": "ansi-regex@^3.0.0",
24
+  "_where": "/Users/clementO/Desktop/blueCoin-UI/node_modules/@ionic/cli-framework/node_modules/strip-ansi",
25
+  "author": {
26
+    "name": "Sindre Sorhus",
27
+    "email": "sindresorhus@gmail.com",
28
+    "url": "sindresorhus.com"
29
+  },
30
+  "bugs": {
31
+    "url": "https://github.com/chalk/ansi-regex/issues"
32
+  },
33
+  "bundleDependencies": false,
34
+  "deprecated": false,
35
+  "description": "Regular expression for matching ANSI escape codes",
36
+  "devDependencies": {
37
+    "ava": "*",
38
+    "xo": "*"
39
+  },
40
+  "engines": {
41
+    "node": ">=4"
42
+  },
43
+  "files": [
44
+    "index.js"
45
+  ],
46
+  "homepage": "https://github.com/chalk/ansi-regex#readme",
47
+  "keywords": [
48
+    "ansi",
49
+    "styles",
50
+    "color",
51
+    "colour",
52
+    "colors",
53
+    "terminal",
54
+    "console",
55
+    "cli",
56
+    "string",
57
+    "tty",
58
+    "escape",
59
+    "formatting",
60
+    "rgb",
61
+    "256",
62
+    "shell",
63
+    "xterm",
64
+    "command-line",
65
+    "text",
66
+    "regex",
67
+    "regexp",
68
+    "re",
69
+    "match",
70
+    "test",
71
+    "find",
72
+    "pattern"
73
+  ],
74
+  "license": "MIT",
75
+  "name": "ansi-regex",
76
+  "repository": {
77
+    "type": "git",
78
+    "url": "git+https://github.com/chalk/ansi-regex.git"
79
+  },
80
+  "scripts": {
81
+    "test": "xo && ava",
82
+    "view-supported": "node fixtures/view-codes.js"
83
+  },
84
+  "version": "3.0.0"
85
+}

+ 46
- 0
node_modules/@ionic/cli-framework/node_modules/ansi-regex/readme.md Vedi File

@@ -0,0 +1,46 @@
1
+# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
2
+
3
+> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
4
+
5
+
6
+## Install
7
+
8
+```
9
+$ npm install ansi-regex
10
+```
11
+
12
+
13
+## Usage
14
+
15
+```js
16
+const ansiRegex = require('ansi-regex');
17
+
18
+ansiRegex().test('\u001B[4mcake\u001B[0m');
19
+//=> true
20
+
21
+ansiRegex().test('cake');
22
+//=> false
23
+
24
+'\u001B[4mcake\u001B[0m'.match(ansiRegex());
25
+//=> ['\u001B[4m', '\u001B[0m']
26
+```
27
+
28
+
29
+## FAQ
30
+
31
+### Why do you test for codes not in the ECMA 48 standard?
32
+
33
+Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
34
+
35
+On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
36
+
37
+
38
+## Maintainers
39
+
40
+- [Sindre Sorhus](https://github.com/sindresorhus)
41
+- [Josh Junon](https://github.com/qix-)
42
+
43
+
44
+## License
45
+
46
+MIT

+ 4
- 0
node_modules/@ionic/cli-framework/node_modules/strip-ansi/index.js Vedi File

@@ -0,0 +1,4 @@
1
+'use strict';
2
+const ansiRegex = require('ansi-regex');
3
+
4
+module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;

+ 9
- 0
node_modules/@ionic/cli-framework/node_modules/strip-ansi/license Vedi File

@@ -0,0 +1,9 @@
1
+MIT License
2
+
3
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 84
- 0
node_modules/@ionic/cli-framework/node_modules/strip-ansi/package.json Vedi File

@@ -0,0 +1,84 @@
1
+{
2
+  "_from": "strip-ansi@^4.0.0",
3
+  "_id": "strip-ansi@4.0.0",
4
+  "_inBundle": false,
5
+  "_integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
6
+  "_location": "/@ionic/cli-framework/strip-ansi",
7
+  "_phantomChildren": {},
8
+  "_requested": {
9
+    "type": "range",
10
+    "registry": true,
11
+    "raw": "strip-ansi@^4.0.0",
12
+    "name": "strip-ansi",
13
+    "escapedName": "strip-ansi",
14
+    "rawSpec": "^4.0.0",
15
+    "saveSpec": null,
16
+    "fetchSpec": "^4.0.0"
17
+  },
18
+  "_requiredBy": [
19
+    "/@ionic/cli-framework"
20
+  ],
21
+  "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
22
+  "_shasum": "a8479022eb1ac368a871389b635262c505ee368f",
23
+  "_spec": "strip-ansi@^4.0.0",
24
+  "_where": "/Users/clementO/Desktop/blueCoin-UI/node_modules/@ionic/cli-framework",
25
+  "author": {
26
+    "name": "Sindre Sorhus",
27
+    "email": "sindresorhus@gmail.com",
28
+    "url": "sindresorhus.com"
29
+  },
30
+  "bugs": {
31
+    "url": "https://github.com/chalk/strip-ansi/issues"
32
+  },
33
+  "bundleDependencies": false,
34
+  "dependencies": {
35
+    "ansi-regex": "^3.0.0"
36
+  },
37
+  "deprecated": false,
38
+  "description": "Strip ANSI escape codes",
39
+  "devDependencies": {
40
+    "ava": "*",
41
+    "xo": "*"
42
+  },
43
+  "engines": {
44
+    "node": ">=4"
45
+  },
46
+  "files": [
47
+    "index.js"
48
+  ],
49
+  "homepage": "https://github.com/chalk/strip-ansi#readme",
50
+  "keywords": [
51
+    "strip",
52
+    "trim",
53
+    "remove",
54
+    "ansi",
55
+    "styles",
56
+    "color",
57
+    "colour",
58
+    "colors",
59
+    "terminal",
60
+    "console",
61
+    "string",
62
+    "tty",
63
+    "escape",
64
+    "formatting",
65
+    "rgb",
66
+    "256",
67
+    "shell",
68
+    "xterm",
69
+    "log",
70
+    "logging",
71
+    "command-line",
72
+    "text"
73
+  ],
74
+  "license": "MIT",
75
+  "name": "strip-ansi",
76
+  "repository": {
77
+    "type": "git",
78
+    "url": "git+https://github.com/chalk/strip-ansi.git"
79
+  },
80
+  "scripts": {
81
+    "test": "xo && ava"
82
+  },
83
+  "version": "4.0.0"
84
+}

+ 39
- 0
node_modules/@ionic/cli-framework/node_modules/strip-ansi/readme.md Vedi File

@@ -0,0 +1,39 @@
1
+# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
2
+
3
+> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
4
+
5
+
6
+## Install
7
+
8
+```
9
+$ npm install strip-ansi
10
+```
11
+
12
+
13
+## Usage
14
+
15
+```js
16
+const stripAnsi = require('strip-ansi');
17
+
18
+stripAnsi('\u001B[4mUnicorn\u001B[0m');
19
+//=> 'Unicorn'
20
+```
21
+
22
+
23
+## Related
24
+
25
+- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
26
+- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
27
+- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
28
+- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
29
+
30
+
31
+## Maintainers
32
+
33
+- [Sindre Sorhus](https://github.com/sindresorhus)
34
+- [Josh Junon](https://github.com/qix-)
35
+
36
+
37
+## License
38
+
39
+MIT

+ 0
- 0
node_modules/@ionic/cli-framework/package-lock.json.2399697234 Vedi File


+ 80
- 0
node_modules/@ionic/cli-framework/package.json Vedi File

@@ -0,0 +1,80 @@
1
+{
2
+  "_from": "@ionic/cli-framework@0.1.3",
3
+  "_id": "@ionic/cli-framework@0.1.3",
4
+  "_inBundle": false,
5
+  "_integrity": "sha512-by5vosr5MXK5+yJMtRmBX9YjrcHTeelVLV5PsDv56zZR0aDMLP+1st5wvjKwAjlva660bIzx7yIax88hiV5KKA==",
6
+  "_location": "/@ionic/cli-framework",
7
+  "_phantomChildren": {},
8
+  "_requested": {
9
+    "type": "version",
10
+    "registry": true,
11
+    "raw": "@ionic/cli-framework@0.1.3",
12
+    "name": "@ionic/cli-framework",
13
+    "escapedName": "@ionic%2fcli-framework",
14
+    "scope": "@ionic",
15
+    "rawSpec": "0.1.3",
16
+    "saveSpec": null,
17
+    "fetchSpec": "0.1.3"
18
+  },
19
+  "_requiredBy": [
20
+    "/@ionic/cli-utils",
21
+    "/ionic"
22
+  ],
23
+  "_resolved": "https://registry.npmjs.org/@ionic/cli-framework/-/cli-framework-0.1.3.tgz",
24
+  "_shasum": "305ce75f39a3a88db17b969b5dfb323ef119d06c",
25
+  "_spec": "@ionic/cli-framework@0.1.3",
26
+  "_where": "/Users/clementO/Desktop/blueCoin-UI/node_modules/ionic",
27
+  "author": {
28
+    "name": "Ionic Team",
29
+    "email": "hi@ionic.io",
30
+    "url": "https://ionicframework.com"
31
+  },
32
+  "bundleDependencies": false,
33
+  "dependencies": {
34
+    "chalk": "^2.3.0",
35
+    "ncp": "^2.0.0",
36
+    "rimraf": "^2.6.2",
37
+    "strip-ansi": "^4.0.0",
38
+    "superagent": "^3.8.0",
39
+    "tslib": "^1.8.0"
40
+  },
41
+  "deprecated": false,
42
+  "description": "The foundation framework of the Ionic CLI",
43
+  "devDependencies": {
44
+    "@types/minimist": "^1.2.0",
45
+    "@types/ncp": "^2.0.1",
46
+    "@types/rimraf": "^2.0.2",
47
+    "@types/superagent": "^3.5.6"
48
+  },
49
+  "engines": {
50
+    "node": ">=6.4.0"
51
+  },
52
+  "homepage": "https://ionicframework.com/",
53
+  "jest": {
54
+    "globals": {
55
+      "ts-jest": {
56
+        "tsConfigFile": "tsconfig.json"
57
+      }
58
+    },
59
+    "moduleFileExtensions": [
60
+      "ts",
61
+      "js"
62
+    ],
63
+    "transform": {
64
+      ".(ts)": "<rootDir>/../../../node_modules/ts-jest/preprocessor.js"
65
+    },
66
+    "testRegex": "/__tests__/.*\\.(ts|js)$"
67
+  },
68
+  "license": "MIT",
69
+  "main": "./index.js",
70
+  "name": "@ionic/cli-framework",
71
+  "scripts": {
72
+    "build": "npm run clean && tsc",
73
+    "clean": "rm -rf index.* definitions.* guards.* ./utils",
74
+    "prepublishOnly": "npm run build",
75
+    "test": "jest",
76
+    "watch": "tsc -w"
77
+  },
78
+  "types": "./index.d.ts",
79
+  "version": "0.1.3"
80
+}

+ 60
- 0
node_modules/@ionic/cli-framework/utils/fs.d.ts Vedi File

@@ -0,0 +1,60 @@
1
+/// <reference types="node" />
2
+import * as fs from 'fs';
3
+import * as ncpType from 'ncp';
4
+export declare const ERROR_FILE_NOT_FOUND = "FILE_NOT_FOUND";
5
+export declare const ERROR_FILE_INVALID_JSON = "FILE_INVALID_JSON";
6
+export declare const ERROR_OVERWRITE_DENIED = "OVERWRITE_DENIED";
7
+export interface FSReadFileOptions {
8
+    encoding: string;
9
+    flag?: string;
10
+}
11
+export interface FSWriteFileOptions {
12
+    encoding: string;
13
+    mode?: number;
14
+    flag?: string;
15
+}
16
+export declare const fsAccess: (arg1: string, arg2: number) => Promise<void>;
17
+export declare const fsMkdir: (arg1: string, arg2: number) => Promise<void>;
18
+export declare const fsOpen: (arg1: string, arg2: string) => Promise<number>;
19
+export declare const fsStat: (arg1: string) => Promise<fs.Stats>;
20
+export declare const fsUnlink: (arg1: string) => Promise<void>;
21
+export declare const fsReadFile: (arg1: string, arg2: FSReadFileOptions) => Promise<string>;
22
+export declare const fsWriteFile: (arg1: string, arg2: any, arg3: FSWriteFileOptions) => Promise<void>;
23
+export declare const fsReadDir: (arg1: string) => Promise<string[]>;
24
+export declare function readDir(filePath: string): Promise<string[]>;
25
+export declare function fsReadJsonFile(filePath: string, options?: FSReadFileOptions): Promise<{
26
+    [key: string]: any;
27
+}>;
28
+export declare function fsWriteJsonFile(filePath: string, json: {
29
+    [key: string]: any;
30
+}, options: FSWriteFileOptions): Promise<void>;
31
+export declare function fileToString(filepath: string): Promise<string>;
32
+export declare function fsMkdirp(p: string, mode?: number): Promise<void>;
33
+export declare function getFileChecksum(filePath: string): Promise<string>;
34
+/**
35
+ * Return true and cached checksums for a file by its path.
36
+ *
37
+ * Cached checksums are stored as `.md5` files next to the original file. If
38
+ * the cache file is missing, the cached checksum is undefined.
39
+ *
40
+ * @param p The file path
41
+ * @return Promise<[true checksum, cached checksum or undefined if cache file missing]>
42
+ */
43
+export declare function getFileChecksums(p: string): Promise<[string, string | undefined]>;
44
+/**
45
+ * Store a cache file containing the source file's md5 checksum hash.
46
+ *
47
+ * @param p The file path
48
+ * @param checksum The checksum. If excluded, the checksum is computed
49
+ */
50
+export declare function cacheFileChecksum(p: string, checksum?: string): Promise<void>;
51
+export declare function writeStreamToFile(stream: NodeJS.ReadableStream, destination: string): Promise<any>;
52
+export declare function copyDirectory(source: string, destination: string, options?: ncpType.Options): Promise<void>;
53
+export declare function removeDirectory(dir: string): Promise<void>;
54
+export declare function copyFile(fileName: string, target: string, mode?: number): Promise<{}>;
55
+export declare function pathAccessible(filePath: string, mode: number): Promise<boolean>;
56
+export declare function pathExists(filePath: string): Promise<boolean>;
57
+/**
58
+ * Find the base directory based on the path given and a marker file to look for.
59
+ */
60
+export declare function findBaseDirectory(dir: string, file: string): Promise<string | undefined>;

+ 233
- 0
node_modules/@ionic/cli-framework/utils/fs.js Vedi File

@@ -0,0 +1,233 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const fs = require("fs");
5
+const path = require("path");
6
+const promise_1 = require("./promise");
7
+exports.ERROR_FILE_NOT_FOUND = 'FILE_NOT_FOUND';
8
+exports.ERROR_FILE_INVALID_JSON = 'FILE_INVALID_JSON';
9
+exports.ERROR_OVERWRITE_DENIED = 'OVERWRITE_DENIED';
10
+exports.fsAccess = promise_1.promisify(fs.access);
11
+exports.fsMkdir = promise_1.promisify(fs.mkdir);
12
+exports.fsOpen = promise_1.promisify(fs.open);
13
+exports.fsStat = promise_1.promisify(fs.stat);
14
+exports.fsUnlink = promise_1.promisify(fs.unlink);
15
+exports.fsReadFile = promise_1.promisify(fs.readFile);
16
+exports.fsWriteFile = promise_1.promisify(fs.writeFile);
17
+exports.fsReadDir = promise_1.promisify(fs.readdir);
18
+function readDir(filePath) {
19
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
20
+        try {
21
+            return yield exports.fsReadDir(filePath);
22
+        }
23
+        catch (e) {
24
+            if (e.code === 'ENOENT') {
25
+                return [];
26
+            }
27
+            throw e;
28
+        }
29
+    });
30
+}
31
+exports.readDir = readDir;
32
+function fsReadJsonFile(filePath, options = { encoding: 'utf8' }) {
33
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
34
+        try {
35
+            const f = yield exports.fsReadFile(filePath, options);
36
+            return JSON.parse(f);
37
+        }
38
+        catch (e) {
39
+            if (e.code === 'ENOENT') {
40
+                throw exports.ERROR_FILE_NOT_FOUND;
41
+            }
42
+            else if (e instanceof SyntaxError) {
43
+                throw exports.ERROR_FILE_INVALID_JSON;
44
+            }
45
+            throw e;
46
+        }
47
+    });
48
+}
49
+exports.fsReadJsonFile = fsReadJsonFile;
50
+function fsWriteJsonFile(filePath, json, options) {
51
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
52
+        return exports.fsWriteFile(filePath, JSON.stringify(json, null, 2) + '\n', options);
53
+    });
54
+}
55
+exports.fsWriteJsonFile = fsWriteJsonFile;
56
+function fileToString(filepath) {
57
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
58
+        try {
59
+            return yield exports.fsReadFile(filepath, { encoding: 'utf8' });
60
+        }
61
+        catch (e) {
62
+            if (e.code === 'ENOENT') {
63
+                return '';
64
+            }
65
+            throw e;
66
+        }
67
+    });
68
+}
69
+exports.fileToString = fileToString;
70
+function fsMkdirp(p, mode = 0o777) {
71
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
72
+        const absPath = path.resolve(p);
73
+        const pathObj = path.parse(absPath);
74
+        const dirnames = absPath.split(path.sep).splice(1);
75
+        const dirs = dirnames.map((v, i) => path.resolve(pathObj.root, ...dirnames.slice(0, i), v));
76
+        for (let dir of dirs) {
77
+            try {
78
+                yield exports.fsMkdir(dir, mode);
79
+            }
80
+            catch (e) {
81
+                if (e.code !== 'EEXIST') {
82
+                    throw e;
83
+                }
84
+            }
85
+        }
86
+    });
87
+}
88
+exports.fsMkdirp = fsMkdirp;
89
+function getFileChecksum(filePath) {
90
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
91
+        const crypto = yield Promise.resolve().then(() => require('crypto'));
92
+        return new Promise((resolve, reject) => {
93
+            const hash = crypto.createHash('md5');
94
+            const input = fs.createReadStream(filePath);
95
+            input.on('error', (err) => {
96
+                reject(err);
97
+            });
98
+            hash.once('readable', () => {
99
+                const fullChecksum = hash.read().toString('hex');
100
+                resolve(fullChecksum);
101
+            });
102
+            input.pipe(hash);
103
+        });
104
+    });
105
+}
106
+exports.getFileChecksum = getFileChecksum;
107
+/**
108
+ * Return true and cached checksums for a file by its path.
109
+ *
110
+ * Cached checksums are stored as `.md5` files next to the original file. If
111
+ * the cache file is missing, the cached checksum is undefined.
112
+ *
113
+ * @param p The file path
114
+ * @return Promise<[true checksum, cached checksum or undefined if cache file missing]>
115
+ */
116
+function getFileChecksums(p) {
117
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
118
+        return Promise.all([
119
+            getFileChecksum(p),
120
+            (() => tslib_1.__awaiter(this, void 0, void 0, function* () {
121
+                try {
122
+                    const md5 = yield exports.fsReadFile(`${p}.md5`, { encoding: 'utf8' });
123
+                    return md5.trim();
124
+                }
125
+                catch (e) {
126
+                    if (e.code !== 'ENOENT') {
127
+                        throw e;
128
+                    }
129
+                }
130
+            }))(),
131
+        ]);
132
+    });
133
+}
134
+exports.getFileChecksums = getFileChecksums;
135
+/**
136
+ * Store a cache file containing the source file's md5 checksum hash.
137
+ *
138
+ * @param p The file path
139
+ * @param checksum The checksum. If excluded, the checksum is computed
140
+ */
141
+function cacheFileChecksum(p, checksum) {
142
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
143
+        const md5 = yield getFileChecksum(p);
144
+        yield exports.fsWriteFile(`${p}.md5`, md5, { encoding: 'utf8' });
145
+    });
146
+}
147
+exports.cacheFileChecksum = cacheFileChecksum;
148
+function writeStreamToFile(stream, destination) {
149
+    return new Promise((resolve, reject) => {
150
+        const dest = fs.createWriteStream(destination);
151
+        stream.pipe(dest);
152
+        dest.on('error', reject);
153
+        dest.on('finish', resolve);
154
+    });
155
+}
156
+exports.writeStreamToFile = writeStreamToFile;
157
+function copyDirectory(source, destination, options = {}) {
158
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
159
+        const ncp = yield Promise.resolve().then(() => require('ncp'));
160
+        return new Promise((resolve, reject) => {
161
+            ncp.ncp(source, destination, options, err => {
162
+                if (err) {
163
+                    reject(err);
164
+                }
165
+                resolve();
166
+            });
167
+        });
168
+    });
169
+}
170
+exports.copyDirectory = copyDirectory;
171
+function removeDirectory(dir) {
172
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
173
+        const rimraf = yield Promise.resolve().then(() => require('rimraf'));
174
+        const rimrafp = promise_1.promisify(rimraf);
175
+        yield rimrafp(dir);
176
+    });
177
+}
178
+exports.removeDirectory = removeDirectory;
179
+function copyFile(fileName, target, mode = 0o777) {
180
+    return new Promise((resolve, reject) => {
181
+        const rs = fs.createReadStream(fileName);
182
+        const ws = fs.createWriteStream(target, { mode: mode });
183
+        rs.on('error', reject);
184
+        ws.on('error', reject);
185
+        ws.on('open', function () {
186
+            rs.pipe(ws);
187
+        });
188
+        ws.once('finish', resolve);
189
+    });
190
+}
191
+exports.copyFile = copyFile;
192
+function pathAccessible(filePath, mode) {
193
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
194
+        try {
195
+            yield exports.fsAccess(filePath, mode);
196
+        }
197
+        catch (e) {
198
+            return false;
199
+        }
200
+        return true;
201
+    });
202
+}
203
+exports.pathAccessible = pathAccessible;
204
+function pathExists(filePath) {
205
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
206
+        return pathAccessible(filePath, fs.constants.F_OK);
207
+    });
208
+}
209
+exports.pathExists = pathExists;
210
+/**
211
+ * Find the base directory based on the path given and a marker file to look for.
212
+ */
213
+function findBaseDirectory(dir, file) {
214
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
215
+        dir = path.normalize(dir);
216
+        const dirInfo = path.parse(dir);
217
+        const directoriesToCheck = dirInfo.dir
218
+            .slice(dirInfo.root.length)
219
+            .split(path.sep)
220
+            .concat(dirInfo.base)
221
+            .map((segment, index, array) => {
222
+            let pathSegments = array.slice(0, (array.length - index));
223
+            return dirInfo.root + path.join(...pathSegments);
224
+        });
225
+        for (let i = 0; i < directoriesToCheck.length; i++) {
226
+            const results = yield exports.fsReadDir(directoriesToCheck[i]);
227
+            if (results.includes(file)) {
228
+                return directoriesToCheck[i];
229
+            }
230
+        }
231
+    });
232
+}
233
+exports.findBaseDirectory = findBaseDirectory;

+ 9
- 0
node_modules/@ionic/cli-framework/utils/npm.d.ts Vedi File

@@ -0,0 +1,9 @@
1
+import { BowerJson, PackageJson } from '../definitions';
2
+export declare const ERROR_INVALID_PACKAGE_JSON = "INVALID_PACKAGE_JSON";
3
+export declare const ERROR_INVALID_BOWER_JSON = "INVALID_BOWER_JSON";
4
+/**
5
+ * Lightweight version of https://github.com/npm/validate-npm-package-name
6
+ */
7
+export declare function isValidPackageName(name: string): boolean;
8
+export declare function readPackageJsonFile(path: string): Promise<PackageJson>;
9
+export declare function readBowerJsonFile(path: string): Promise<BowerJson>;

+ 34
- 0
node_modules/@ionic/cli-framework/utils/npm.js Vedi File

@@ -0,0 +1,34 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const guards_1 = require("../guards");
5
+const fs_1 = require("./fs");
6
+exports.ERROR_INVALID_PACKAGE_JSON = 'INVALID_PACKAGE_JSON';
7
+exports.ERROR_INVALID_BOWER_JSON = 'INVALID_BOWER_JSON';
8
+/**
9
+ * Lightweight version of https://github.com/npm/validate-npm-package-name
10
+ */
11
+function isValidPackageName(name) {
12
+    return encodeURIComponent(name) === name;
13
+}
14
+exports.isValidPackageName = isValidPackageName;
15
+function readPackageJsonFile(path) {
16
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
17
+        const packageJson = yield fs_1.fsReadJsonFile(path);
18
+        if (!guards_1.isPackageJson(packageJson)) {
19
+            throw exports.ERROR_INVALID_PACKAGE_JSON;
20
+        }
21
+        return packageJson;
22
+    });
23
+}
24
+exports.readPackageJsonFile = readPackageJsonFile;
25
+function readBowerJsonFile(path) {
26
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
27
+        const bowerJson = yield fs_1.fsReadJsonFile(path);
28
+        if (!guards_1.isBowerJson(bowerJson)) {
29
+            throw exports.ERROR_INVALID_BOWER_JSON;
30
+        }
31
+        return bowerJson;
32
+    });
33
+}
34
+exports.readBowerJsonFile = readBowerJsonFile;

+ 9
- 0
node_modules/@ionic/cli-framework/utils/promise.d.ts Vedi File

@@ -0,0 +1,9 @@
1
+export interface Promisify {
2
+    <T>(func: (callback: (err: any, result?: T) => void) => void): () => Promise<T>;
3
+    <T, A1>(func: (arg1: A1, callback: (err: any, result?: T) => void) => void): (arg1: A1) => Promise<T>;
4
+    <T, A1, A2>(func: (arg1: A1, arg2: A2, callback: (err: any, result?: T) => void) => void): (arg1: A1, arg2: A2) => Promise<T>;
5
+    <T, A1, A2, A3>(func: (arg1: A1, arg2: A2, arg3: A3, callback: (err: any, result?: T) => void) => void): (arg1: A1, arg2: A2, arg3: A3) => Promise<T>;
6
+    <T, A1, A2, A3, A4>(func: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (err: any, result?: T) => void) => void): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Promise<T>;
7
+    <T, A1, A2, A3, A4, A5>(func: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: (err: any, result?: T) => void) => void): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Promise<T>;
8
+}
9
+export declare const promisify: Promisify;

+ 14
- 0
node_modules/@ionic/cli-framework/utils/promise.js Vedi File

@@ -0,0 +1,14 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.promisify = function (func) {
4
+    return (...args) => {
5
+        return new Promise((resolve, reject) => {
6
+            func(...args, (err, response) => {
7
+                if (err) {
8
+                    return reject(err);
9
+                }
10
+                resolve(response);
11
+            });
12
+        });
13
+    };
14
+};

+ 3
- 0
node_modules/@ionic/cli-framework/utils/string.d.ts Vedi File

@@ -0,0 +1,3 @@
1
+export declare function isValidEmail(email?: any): boolean;
2
+export declare function strcmp(a: string | undefined, b: string | undefined): number;
3
+export declare function str2num(value: any, defaultValue?: number): number;

+ 34
- 0
node_modules/@ionic/cli-framework/utils/string.js Vedi File

@@ -0,0 +1,34 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
4
+function isValidEmail(email) {
5
+    if (typeof email !== 'string') {
6
+        return false;
7
+    }
8
+    return EMAIL_REGEX.test(email);
9
+}
10
+exports.isValidEmail = isValidEmail;
11
+function strcmp(a, b) {
12
+    if (!a) {
13
+        a = '';
14
+    }
15
+    if (!b) {
16
+        b = '';
17
+    }
18
+    return +(a > b) || +(a === b) - 1;
19
+}
20
+exports.strcmp = strcmp;
21
+function str2num(value, defaultValue = -1) {
22
+    if (typeof value === 'number') {
23
+        return value;
24
+    }
25
+    if (typeof value !== 'string') {
26
+        return defaultValue;
27
+    }
28
+    const result = parseInt(value, 10);
29
+    if (isNaN(result)) {
30
+        return defaultValue;
31
+    }
32
+    return result;
33
+}
34
+exports.str2num = str2num;

+ 574
- 0
node_modules/@ionic/cli-utils/CHANGELOG.md Vedi File

@@ -0,0 +1,574 @@
1
+# Change Log
2
+
3
+All notable changes to this project will be documented in this file.
4
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+<a name="1.19.2"></a>
7
+## [1.19.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.19.1...@ionic/cli-utils@1.19.2) (2018-03-13)
8
+
9
+
10
+
11
+
12
+**Note:** Version bump only for package @ionic/cli-utils
13
+
14
+<a name="1.19.1"></a>
15
+## [1.19.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.19.0...@ionic/cli-utils@1.19.1) (2018-01-17)
16
+
17
+
18
+### Bug Fixes
19
+
20
+* **ssh:** allow tilde expansion upon path inputs ([95f809e](https://github.com/ionic-team/ionic-cli/commit/95f809e))
21
+
22
+
23
+
24
+
25
+<a name="1.19.0"></a>
26
+# [1.19.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.18.0...@ionic/cli-utils@1.19.0) (2017-11-22)
27
+
28
+
29
+### Bug Fixes
30
+
31
+* print message from brutal error ([5956c74](https://github.com/ionic-team/ionic-cli/commit/5956c74))
32
+* **ssh:** fix parsing of ssh config w/o host directives ([cf4e03f](https://github.com/ionic-team/ionic-cli/commit/cf4e03f))
33
+
34
+
35
+### Features
36
+
37
+* **start:** personalize cordova files, --bundle-id flag ([45488dd](https://github.com/ionic-team/ionic-cli/commit/45488dd))
38
+
39
+
40
+
41
+
42
+<a name="1.18.0"></a>
43
+# [1.18.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.17.0...@ionic/cli-utils@1.18.0) (2017-11-09)
44
+
45
+
46
+### Bug Fixes
47
+
48
+* **build:** perform sass task during build ([bb45db4](https://github.com/ionic-team/ionic-cli/commit/bb45db4))
49
+* **doctor:** fix ENOENT error with config.xml ([7c9fd85](https://github.com/ionic-team/ionic-cli/commit/7c9fd85))
50
+
51
+
52
+### Features
53
+
54
+* **start:** --cordova flag to include cordova integration ([fe31173](https://github.com/ionic-team/ionic-cli/commit/fe31173))
55
+
56
+
57
+
58
+
59
+<a name="1.17.0"></a>
60
+# [1.17.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.16.0...@ionic/cli-utils@1.17.0) (2017-11-07)
61
+
62
+
63
+### Bug Fixes
64
+
65
+* **login:** show message about failed login for pro ([ee4e14d](https://github.com/ionic-team/ionic-cli/commit/ee4e14d))
66
+* **serve:** devapp errors are now debug messages ([7afe944](https://github.com/ionic-team/ionic-cli/commit/7afe944))
67
+
68
+
69
+### Features
70
+
71
+* **integrations:** cordova and gulp integration ([3137c76](https://github.com/ionic-team/ionic-cli/commit/3137c76))
72
+* **npm:** support npm rebuild cmd ([2350a57](https://github.com/ionic-team/ionic-cli/commit/2350a57))
73
+* **start:** custom starters ([1c5a527](https://github.com/ionic-team/ionic-cli/commit/1c5a527))
74
+* **start:** starter manifest integration ([6557396](https://github.com/ionic-team/ionic-cli/commit/6557396))
75
+* **start:** use new starters ([9032f3d](https://github.com/ionic-team/ionic-cli/commit/9032f3d))
76
+
77
+
78
+
79
+
80
+<a name="1.16.0"></a>
81
+# [1.16.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.15.2...@ionic/cli-utils@1.16.0) (2017-11-01)
82
+
83
+
84
+### Features
85
+
86
+* **devapp:** broadcast app to trusted interfaces ([fb4e38e](https://github.com/ionic-team/ionic-cli/commit/fb4e38e))
87
+* **serve:** add --local flag ([6b68088](https://github.com/ionic-team/ionic-cli/commit/6b68088))
88
+
89
+
90
+
91
+
92
+<a name="1.15.2"></a>
93
+## [1.15.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.15.1...@ionic/cli-utils@1.15.2) (2017-10-26)
94
+
95
+
96
+### Bug Fixes
97
+
98
+* **serve:** livereload defaults ([16f7d69](https://github.com/ionic-team/ionic-cli/commit/16f7d69))
99
+
100
+
101
+
102
+
103
+<a name="1.15.1"></a>
104
+## [1.15.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.15.0...@ionic/cli-utils@1.15.1) (2017-10-25)
105
+
106
+
107
+### Bug Fixes
108
+
109
+* **cordova:** proxy settings on by default ([19a3390](https://github.com/ionic-team/ionic-cli/commit/19a3390))
110
+* **cordova:** recognize more browsers ([dcaaf97](https://github.com/ionic-team/ionic-cli/commit/dcaaf97))
111
+* **doctor:** fix incorrect count ([b85fd11](https://github.com/ionic-team/ionic-cli/commit/b85fd11))
112
+
113
+
114
+
115
+
116
+<a name="1.15.0"></a>
117
+# [1.15.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.14.0...@ionic/cli-utils@1.15.0) (2017-10-25)
118
+
119
+
120
+### Bug Fixes
121
+
122
+* **cordova:** only return known platforms ([d2e2b26](https://github.com/ionic-team/ionic-cli/commit/d2e2b26))
123
+* **doctor:** ignore bundle ID ailment if no cordova integration ([182205d](https://github.com/ionic-team/ionic-cli/commit/182205d))
124
+* **ssh:** fix whitespace issues with ssh config ([bb4ee5d](https://github.com/ionic-team/ionic-cli/commit/bb4ee5d))
125
+
126
+
127
+### Features
128
+
129
+* **info:** show proxy environment variables ([9103d09](https://github.com/ionic-team/ionic-cli/commit/9103d09))
130
+* **options:** environment variables for command-line opts ([7d39dee](https://github.com/ionic-team/ionic-cli/commit/7d39dee))
131
+
132
+
133
+
134
+
135
+<a name="1.14.0"></a>
136
+# [1.14.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.13.1...@ionic/cli-utils@1.14.0) (2017-10-23)
137
+
138
+
139
+### Bug Fixes
140
+
141
+* don't use local installation for old cli versions ([fc5db21](https://github.com/ionic-team/ionic-cli/commit/fc5db21))
142
+* **cordova:** platforms.json also unreliable, using platforms/ ([04238f4](https://github.com/ionic-team/ionic-cli/commit/04238f4))
143
+* **cordova:** show output in real time for all cordova commands ([0f91220](https://github.com/ionic-team/ionic-cli/commit/0f91220))
144
+* **doctor:** cordova platform save doesn't save to package.json ([56d64e6](https://github.com/ionic-team/ionic-cli/commit/56d64e6))
145
+* **doctor:** look for uncommitted changes, too ([53750b7](https://github.com/ionic-team/ionic-cli/commit/53750b7))
146
+* **pagination:** fix state issue with query params ([5d73098](https://github.com/ionic-team/ionic-cli/commit/5d73098))
147
+
148
+
149
+### Features
150
+
151
+* **doctor:** detect absence of viewport-fit=cover ([7f983c0](https://github.com/ionic-team/ionic-cli/commit/7f983c0))
152
+* **doctor:** detect default bundle ID ([2761fb9](https://github.com/ionic-team/ionic-cli/commit/2761fb9))
153
+* **doctor:** ionic native ailments ([3581537](https://github.com/ionic-team/ionic-cli/commit/3581537))
154
+* **doctor:** list command ([a38be99](https://github.com/ionic-team/ionic-cli/commit/a38be99))
155
+
156
+
157
+
158
+
159
+<a name="1.13.1"></a>
160
+## [1.13.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.13.0...@ionic/cli-utils@1.13.1) (2017-10-16)
161
+
162
+
163
+
164
+
165
+**Note:** Version bump only for package @ionic/cli-utils
166
+
167
+<a name="1.13.0"></a>
168
+# [1.13.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.9.2...@ionic/cli-utils@1.13.0) (2017-10-10)
169
+
170
+
171
+### Bug Fixes
172
+
173
+* **backends:** explicitly list known backends ([84fa7d7](https://github.com/ionic-team/ionic-cli/commit/84fa7d7))
174
+* **config:** compute urls for backend ([19687b1](https://github.com/ionic-team/ionic-cli/commit/19687b1))
175
+* **config:** no config option for this yet ([85e9f81](https://github.com/ionic-team/ionic-cli/commit/85e9f81))
176
+* **config:** prepare configs during env generation ([d0a3072](https://github.com/ionic-team/ionic-cli/commit/d0a3072))
177
+* **cordova:** fix after_prepare being executed twice ([31225b9](https://github.com/ionic-team/ionic-cli/commit/31225b9))
178
+* **cordova:** fix various platform weirdness (use platforms.json) ([2c2478f](https://github.com/ionic-team/ionic-cli/commit/2c2478f))
179
+* **cordova:** look for paths with backslashes, and replace ([9dfc78c](https://github.com/ionic-team/ionic-cli/commit/9dfc78c))
180
+* **cordova:** more robust error handling for serve, shutdown functions ([a2ba645](https://github.com/ionic-team/ionic-cli/commit/a2ba645))
181
+* **cordova:** pass --prod to app-scripts for cordova builds ([3453ed9](https://github.com/ionic-team/ionic-cli/commit/3453ed9))
182
+* **cordova:** remove original-src from config.xml after serve ([4835cd9](https://github.com/ionic-team/ionic-cli/commit/4835cd9))
183
+* **cordova:** send options w/o intent to app-scripts ([0065658](https://github.com/ionic-team/ionic-cli/commit/0065658))
184
+* **cordova:** write hash files only after successful resources generation ([47286cb](https://github.com/ionic-team/ionic-cli/commit/47286cb))
185
+* **ionic1:** fix --consolelogs ([5763a38](https://github.com/ionic-team/ionic-cli/commit/5763a38))
186
+* **pro:** fix "infinity" bug ([3cb47f0](https://github.com/ionic-team/ionic-cli/commit/3cb47f0))
187
+* better guidance for custom projects ([91c1be1](https://github.com/ionic-team/ionic-cli/commit/91c1be1))
188
+* prefer locally installed executables ([fe07215](https://github.com/ionic-team/ionic-cli/commit/fe07215))
189
+* **serve:** do not merge watch patterns ([8664927](https://github.com/ionic-team/ionic-cli/commit/8664927))
190
+* **serve:** find nearest port for dev logger ([9ecc62f](https://github.com/ionic-team/ionic-cli/commit/9ecc62f))
191
+* **serve:** ionic serve w/o external network should work ([eee3cb7](https://github.com/ionic-team/ionic-cli/commit/eee3cb7))
192
+* **ssh:** ensure proper whitespace ([e232787](https://github.com/ionic-team/ionic-cli/commit/e232787))
193
+
194
+
195
+### Features
196
+
197
+* IONIC_DAEMON_DIRECTORY environment variable ([ae1f7f1](https://github.com/ionic-team/ionic-cli/commit/ae1f7f1))
198
+* **config:** add interactive config value ([a783d54](https://github.com/ionic-team/ionic-cli/commit/a783d54))
199
+* **cordova:** add --dev-logger-port to run/emulate ([706680d](https://github.com/ionic-team/ionic-cli/commit/706680d))
200
+* **info:** show backend ([e1b7fda](https://github.com/ionic-team/ionic-cli/commit/e1b7fda))
201
+* **pro:** default new apps to Ionic Pro ([6966135](https://github.com/ionic-team/ionic-cli/commit/6966135))
202
+* **resources:** generate iPhone X splash ([e38c1f0](https://github.com/ionic-team/ionic-cli/commit/e38c1f0))
203
+* **resources:** generate new iOS 1024 marketing icon ([6c99b86](https://github.com/ionic-team/ionic-cli/commit/6c99b86))
204
+* **serve:** --auth feature for basic auth ([0b92c51](https://github.com/ionic-team/ionic-cli/commit/0b92c51))
205
+* **ssh:** allow generation of non-rsa keys ([4f9c648](https://github.com/ionic-team/ionic-cli/commit/4f9c648))
206
+* **ssl:** cafile, certfile, keyfile options ([b9cee01](https://github.com/ionic-team/ionic-cli/commit/b9cee01))
207
+
208
+
209
+
210
+
211
+<a name="1.12.0"></a>
212
+# [1.12.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.9.2...@ionic/cli-utils@1.12.0) (2017-09-21)
213
+
214
+
215
+### Bug Fixes
216
+
217
+* **backends:** explicitly list known backends ([84fa7d7](https://github.com/ionic-team/ionic-cli/commit/84fa7d7))
218
+* **config:** compute urls for backend ([19687b1](https://github.com/ionic-team/ionic-cli/commit/19687b1))
219
+* **config:** no config option for this yet ([85e9f81](https://github.com/ionic-team/ionic-cli/commit/85e9f81))
220
+* **cordova:** pass --prod to app-scripts for cordova builds ([3453ed9](https://github.com/ionic-team/ionic-cli/commit/3453ed9))
221
+* better guidance for custom projects ([91c1be1](https://github.com/ionic-team/ionic-cli/commit/91c1be1))
222
+* **cordova:** remove original-src from config.xml after serve ([4835cd9](https://github.com/ionic-team/ionic-cli/commit/4835cd9))
223
+* **cordova:** send options w/o intent to app-scripts ([0065658](https://github.com/ionic-team/ionic-cli/commit/0065658))
224
+* **cordova:** write hash files only after successful resources generation ([47286cb](https://github.com/ionic-team/ionic-cli/commit/47286cb))
225
+* **ionic1:** fix --consolelogs ([5763a38](https://github.com/ionic-team/ionic-cli/commit/5763a38))
226
+* **pro:** fix "infinity" bug ([3cb47f0](https://github.com/ionic-team/ionic-cli/commit/3cb47f0))
227
+* **serve:** do not merge watch patterns ([8664927](https://github.com/ionic-team/ionic-cli/commit/8664927))
228
+* **serve:** ionic serve w/o external network should work ([eee3cb7](https://github.com/ionic-team/ionic-cli/commit/eee3cb7))
229
+* prefer locally installed executables ([fe07215](https://github.com/ionic-team/ionic-cli/commit/fe07215))
230
+* **ssh:** ensure proper whitespace ([e232787](https://github.com/ionic-team/ionic-cli/commit/e232787))
231
+
232
+
233
+### Features
234
+
235
+* IONIC_DAEMON_DIRECTORY environment variable ([ae1f7f1](https://github.com/ionic-team/ionic-cli/commit/ae1f7f1))
236
+* **config:** add interactive config value ([a783d54](https://github.com/ionic-team/ionic-cli/commit/a783d54))
237
+* **cordova:** add --dev-logger-port to run/emulate ([706680d](https://github.com/ionic-team/ionic-cli/commit/706680d))
238
+* **info:** show backend ([e1b7fda](https://github.com/ionic-team/ionic-cli/commit/e1b7fda))
239
+* **pro:** default new apps to Ionic Pro ([6966135](https://github.com/ionic-team/ionic-cli/commit/6966135))
240
+* **resources:** generate iPhone X splash ([e38c1f0](https://github.com/ionic-team/ionic-cli/commit/e38c1f0))
241
+* **resources:** generate new iOS 1024 marketing icon ([6c99b86](https://github.com/ionic-team/ionic-cli/commit/6c99b86))
242
+* **serve:** --auth feature for basic auth ([0b92c51](https://github.com/ionic-team/ionic-cli/commit/0b92c51))
243
+* **ssh:** allow generation of non-rsa keys ([4f9c648](https://github.com/ionic-team/ionic-cli/commit/4f9c648))
244
+* **ssl:** cafile, certfile, keyfile options ([b9cee01](https://github.com/ionic-team/ionic-cli/commit/b9cee01))
245
+
246
+
247
+
248
+
249
+<a name="1.11.0"></a>
250
+# [1.11.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.9.2...@ionic/cli-utils@1.11.0) (2017-09-21)
251
+
252
+
253
+### Bug Fixes
254
+
255
+* **backends:** explicitly list known backends ([84fa7d7](https://github.com/ionic-team/ionic-cli/commit/84fa7d7))
256
+* **config:** compute urls for backend ([19687b1](https://github.com/ionic-team/ionic-cli/commit/19687b1))
257
+* **cordova:** pass --prod to app-scripts for cordova builds ([3453ed9](https://github.com/ionic-team/ionic-cli/commit/3453ed9))
258
+* **cordova:** remove original-src from config.xml after serve ([4835cd9](https://github.com/ionic-team/ionic-cli/commit/4835cd9))
259
+* **cordova:** send options w/o intent to app-scripts ([0065658](https://github.com/ionic-team/ionic-cli/commit/0065658))
260
+* **cordova:** write hash files only after successful resources generation ([47286cb](https://github.com/ionic-team/ionic-cli/commit/47286cb))
261
+* **ionic1:** fix --consolelogs ([5763a38](https://github.com/ionic-team/ionic-cli/commit/5763a38))
262
+* **pro:** fix "infinity" bug ([3cb47f0](https://github.com/ionic-team/ionic-cli/commit/3cb47f0))
263
+* **serve:** do not merge watch patterns ([8664927](https://github.com/ionic-team/ionic-cli/commit/8664927))
264
+* better guidance for custom projects ([91c1be1](https://github.com/ionic-team/ionic-cli/commit/91c1be1))
265
+* prefer locally installed executables ([fe07215](https://github.com/ionic-team/ionic-cli/commit/fe07215))
266
+* **serve:** ionic serve w/o external network should work ([eee3cb7](https://github.com/ionic-team/ionic-cli/commit/eee3cb7))
267
+* **ssh:** ensure proper whitespace ([e232787](https://github.com/ionic-team/ionic-cli/commit/e232787))
268
+
269
+
270
+### Features
271
+
272
+* **cordova:** add --dev-logger-port to run/emulate ([706680d](https://github.com/ionic-team/ionic-cli/commit/706680d))
273
+* IONIC_DAEMON_DIRECTORY environment variable ([ae1f7f1](https://github.com/ionic-team/ionic-cli/commit/ae1f7f1))
274
+* **info:** show backend ([e1b7fda](https://github.com/ionic-team/ionic-cli/commit/e1b7fda))
275
+* **pro:** default new apps to Ionic Pro ([6966135](https://github.com/ionic-team/ionic-cli/commit/6966135))
276
+* **resources:** generate iPhone X splash ([e38c1f0](https://github.com/ionic-team/ionic-cli/commit/e38c1f0))
277
+* **serve:** --auth feature for basic auth ([0b92c51](https://github.com/ionic-team/ionic-cli/commit/0b92c51))
278
+* **ssl:** cafile, certfile, keyfile options ([b9cee01](https://github.com/ionic-team/ionic-cli/commit/b9cee01))
279
+
280
+
281
+
282
+
283
+<a name="1.10.2"></a>
284
+## [1.10.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.9.2...@ionic/cli-utils@1.10.2) (2017-09-13)
285
+
286
+
287
+### Bug Fixes
288
+
289
+* better guidance for custom projects ([91c1be1](https://github.com/ionic-team/ionic-cli/commit/91c1be1))
290
+* **backends:** explicitly list known backends ([84fa7d7](https://github.com/ionic-team/ionic-cli/commit/84fa7d7))
291
+* **cordova:** pass --prod to app-scripts for cordova builds ([3453ed9](https://github.com/ionic-team/ionic-cli/commit/3453ed9))
292
+* **cordova:** send options w/o intent to app-scripts ([0065658](https://github.com/ionic-team/ionic-cli/commit/0065658))
293
+* **cordova:** write hash files only after successful resources generation ([47286cb](https://github.com/ionic-team/ionic-cli/commit/47286cb))
294
+* **ionic1:** fix --consolelogs ([5763a38](https://github.com/ionic-team/ionic-cli/commit/5763a38))
295
+* **pro:** fix "infinity" bug ([3cb47f0](https://github.com/ionic-team/ionic-cli/commit/3cb47f0))
296
+* **serve:** ionic serve w/o external network should work ([eee3cb7](https://github.com/ionic-team/ionic-cli/commit/eee3cb7))
297
+
298
+
299
+### Features
300
+
301
+* **cordova:** add --dev-logger-port to run/emulate ([706680d](https://github.com/ionic-team/ionic-cli/commit/706680d))
302
+* **pro:** default new apps to Ionic Pro ([6966135](https://github.com/ionic-team/ionic-cli/commit/6966135))
303
+* IONIC_DAEMON_DIRECTORY environment variable ([ae1f7f1](https://github.com/ionic-team/ionic-cli/commit/ae1f7f1))
304
+* **serve:** --auth feature for basic auth ([0b92c51](https://github.com/ionic-team/ionic-cli/commit/0b92c51))
305
+* **ssl:** cafile, certfile, keyfile options ([b9cee01](https://github.com/ionic-team/ionic-cli/commit/b9cee01))
306
+
307
+
308
+
309
+
310
+<a name="1.10.1"></a>
311
+## [1.10.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.9.2...@ionic/cli-utils@1.10.1) (2017-09-12)
312
+
313
+
314
+### Bug Fixes
315
+
316
+* better guidance for custom projects ([91c1be1](https://github.com/ionic-team/ionic-cli/commit/91c1be1))
317
+* **backends:** explicitly list known backends ([84fa7d7](https://github.com/ionic-team/ionic-cli/commit/84fa7d7))
318
+* **cordova:** pass --prod to app-scripts for cordova builds ([3453ed9](https://github.com/ionic-team/ionic-cli/commit/3453ed9))
319
+* **cordova:** write hash files only after successful resources generation ([47286cb](https://github.com/ionic-team/ionic-cli/commit/47286cb))
320
+* **ionic1:** fix --consolelogs ([5763a38](https://github.com/ionic-team/ionic-cli/commit/5763a38))
321
+* **pro:** fix "infinity" bug ([3cb47f0](https://github.com/ionic-team/ionic-cli/commit/3cb47f0))
322
+* **serve:** ionic serve w/o external network should work ([eee3cb7](https://github.com/ionic-team/ionic-cli/commit/eee3cb7))
323
+
324
+
325
+### Features
326
+
327
+* **cordova:** add --dev-logger-port to run/emulate ([706680d](https://github.com/ionic-team/ionic-cli/commit/706680d))
328
+* **pro:** default new apps to Ionic Pro ([6966135](https://github.com/ionic-team/ionic-cli/commit/6966135))
329
+* IONIC_DAEMON_DIRECTORY environment variable ([ae1f7f1](https://github.com/ionic-team/ionic-cli/commit/ae1f7f1))
330
+* **serve:** --auth feature for basic auth ([0b92c51](https://github.com/ionic-team/ionic-cli/commit/0b92c51))
331
+* **ssl:** cafile, certfile, keyfile options ([b9cee01](https://github.com/ionic-team/ionic-cli/commit/b9cee01))
332
+
333
+
334
+
335
+
336
+<a name="1.10.0"></a>
337
+# [1.10.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.9.2...@ionic/cli-utils@1.10.0) (2017-09-12)
338
+
339
+
340
+### Bug Fixes
341
+
342
+* better guidance for custom projects ([91c1be1](https://github.com/ionic-team/ionic-cli/commit/91c1be1))
343
+* **backends:** explicitly list known backends ([84fa7d7](https://github.com/ionic-team/ionic-cli/commit/84fa7d7))
344
+* **cordova:** write hash files only after successful resources generation ([47286cb](https://github.com/ionic-team/ionic-cli/commit/47286cb))
345
+* **ionic1:** fix --consolelogs ([5763a38](https://github.com/ionic-team/ionic-cli/commit/5763a38))
346
+* **pro:** fix "infinity" bug ([3cb47f0](https://github.com/ionic-team/ionic-cli/commit/3cb47f0))
347
+* **serve:** ionic serve w/o external network should work ([eee3cb7](https://github.com/ionic-team/ionic-cli/commit/eee3cb7))
348
+
349
+
350
+### Features
351
+
352
+* **cordova:** add --dev-logger-port to run/emulate ([706680d](https://github.com/ionic-team/ionic-cli/commit/706680d))
353
+* **pro:** default new apps to Ionic Pro ([6966135](https://github.com/ionic-team/ionic-cli/commit/6966135))
354
+* IONIC_DAEMON_DIRECTORY environment variable ([ae1f7f1](https://github.com/ionic-team/ionic-cli/commit/ae1f7f1))
355
+* **serve:** --auth feature for basic auth ([0b92c51](https://github.com/ionic-team/ionic-cli/commit/0b92c51))
356
+* **ssl:** cafile, certfile, keyfile options ([b9cee01](https://github.com/ionic-team/ionic-cli/commit/b9cee01))
357
+
358
+
359
+
360
+
361
+<a name="1.9.2"></a>
362
+## [1.9.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.9.1...@ionic/cli-utils@1.9.2) (2017-08-17)
363
+
364
+
365
+### Bug Fixes
366
+
367
+* **cordova:** pass `--platform` and `--target` options to app-scripts ([5377f7e](https://github.com/ionic-team/ionic-cli/commit/5377f7e))
368
+* **logs:** fix commands spamming lines of output ([af67074](https://github.com/ionic-team/ionic-cli/commit/af67074))
369
+* **serve:** use localhost when external IP not required ([b36f5c2](https://github.com/ionic-team/ionic-cli/commit/b36f5c2))
370
+
371
+
372
+
373
+
374
+<a name="1.9.1"></a>
375
+## [1.9.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.9.0...@ionic/cli-utils@1.9.1) (2017-08-16)
376
+
377
+
378
+### Bug Fixes
379
+
380
+* **proxy:** fix continual prompting to install proxy plugin ([14c3613](https://github.com/ionic-team/ionic-cli/commit/14c3613))
381
+* **resources:** detect resources/<platform> dirs upon platform add ([ea07da9](https://github.com/ionic-team/ionic-cli/commit/ea07da9))
382
+
383
+
384
+
385
+
386
+<a name="1.9.0"></a>
387
+# [1.9.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.8.1...@ionic/cli-utils@1.9.0) (2017-08-16)
388
+
389
+
390
+### Bug Fixes
391
+
392
+* **ionic1:** fix --browser option for v1 projects ([80ac51c](https://github.com/ionic-team/ionic-cli/commit/80ac51c))
393
+
394
+
395
+### Features
396
+
397
+* **docs:** add --browser/-w option to `ionic docs` ([ca74bdc](https://github.com/ionic-team/ionic-cli/commit/ca74bdc))
398
+
399
+
400
+
401
+
402
+<a name="1.8.1"></a>
403
+## [1.8.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.8.0...@ionic/cli-utils@1.8.1) (2017-08-15)
404
+
405
+
406
+### Bug Fixes
407
+
408
+* **cordova:** fix cordova serve issue with cordova.js mock ([f08f22b](https://github.com/ionic-team/ionic-cli/commit/f08f22b))
409
+
410
+
411
+
412
+
413
+<a name="1.8.0"></a>
414
+# [1.8.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.7.0...@ionic/cli-utils@1.8.0) (2017-08-14)
415
+
416
+
417
+### Bug Fixes
418
+
419
+* **cordova:** do not error on prepare with no platforms ([422c95f](https://github.com/ionic-team/ionic-cli/commit/422c95f))
420
+* preserve whitespace in wrapped words ([6dc4cd2](https://github.com/ionic-team/ionic-cli/commit/6dc4cd2))
421
+* **info:** add additional attempt to get ionic 1 version from bower.json ([d89ac09](https://github.com/ionic-team/ionic-cli/commit/d89ac09))
422
+* **serve:** multitude of serve fixes ([d7fe31d](https://github.com/ionic-team/ionic-cli/commit/d7fe31d))
423
+* **serve:** only show ip prompt if external ip is needed ([89853ca](https://github.com/ionic-team/ionic-cli/commit/89853ca))
424
+* **ssh:** if key exists during generate, ask to overwrite ([59bc4fd](https://github.com/ionic-team/ionic-cli/commit/59bc4fd))
425
+
426
+
427
+### Features
428
+
429
+* **config:** --json and --force options for `config set` ([024ef43](https://github.com/ionic-team/ionic-cli/commit/024ef43))
430
+
431
+
432
+
433
+
434
+<a name="1.7.0"></a>
435
+# [1.7.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.6.0...@ionic/cli-utils@1.7.0) (2017-08-03)
436
+
437
+
438
+### Bug Fixes
439
+
440
+* **daemon:** fix occasional ENOENT error on windows ([1beb455](https://github.com/ionic-team/ionic-cli/commit/1beb455))
441
+* **help:** "undefined" slipped in to some help output ([1f885fa](https://github.com/ionic-team/ionic-cli/commit/1f885fa))
442
+* **plugins:** small fix for differing dist tags of plugins ([3adfcb6](https://github.com/ionic-team/ionic-cli/commit/3adfcb6))
443
+* **serve:** allow binding of localhost ([e8a74d0](https://github.com/ionic-team/ionic-cli/commit/e8a74d0))
444
+* **start:** disable yarn dedupe during start ([dd5c35f](https://github.com/ionic-team/ionic-cli/commit/dd5c35f))
445
+
446
+
447
+### Features
448
+
449
+* **build:** `ionic build` command ([3ad304c](https://github.com/ionic-team/ionic-cli/commit/3ad304c))
450
+
451
+
452
+
453
+
454
+<a name="1.6.0"></a>
455
+# [1.6.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.5.0...@ionic/cli-utils@1.6.0) (2017-07-27)
456
+
457
+
458
+### Bug Fixes
459
+
460
+* **timeouts:** rip out timeouts ([22dcd2f](https://github.com/ionic-team/ionic-cli/commit/22dcd2f))
461
+
462
+
463
+### Features
464
+
465
+* ionic pro ([36dc2f7](https://github.com/ionic-team/ionic-cli/commit/36dc2f7))
466
+
467
+
468
+
469
+
470
+<a name="1.5.0"></a>
471
+# [1.5.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.4.0...@ionic/cli-utils@1.5.0) (2017-07-11)
472
+
473
+
474
+### Bug Fixes
475
+
476
+* better icon support for windows ([47ea9ab](https://github.com/ionic-team/ionic-cli/commit/47ea9ab))
477
+* **link:** disable interpretation of scientific notation ([3874ca6](https://github.com/ionic-team/ionic-cli/commit/3874ca6))
478
+* **project:** warn users of ionic.project file ([965af07](https://github.com/ionic-team/ionic-cli/commit/965af07))
479
+* **start:** substitute invalid package.json name for MyApp ([ce6c129](https://github.com/ionic-team/ionic-cli/commit/ce6c129))
480
+
481
+
482
+### Features
483
+
484
+* **cloud:** add options for snapshot metadata ([75099e6](https://github.com/ionic-team/ionic-cli/commit/75099e6))
485
+
486
+
487
+
488
+
489
+<a name="1.4.0"></a>
490
+# [1.4.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.3.0...@ionic/cli-utils@1.4.0) (2017-06-12)
491
+
492
+
493
+### Bug Fixes
494
+
495
+* **cordova:** actually show platform/type of missing resources ([4e154ed](https://github.com/ionic-team/ionic-cli/commit/4e154ed))
496
+* **ionic1:** logger not logging changed files ([1b51529](https://github.com/ionic-team/ionic-cli/commit/1b51529))
497
+* **plugins:** catch npm errors during updates and continue ([316826d](https://github.com/ionic-team/ionic-cli/commit/316826d))
498
+* **serve:** running ionic serve in background ([883c21e](https://github.com/ionic-team/ionic-cli/commit/883c21e))
499
+
500
+
501
+### Features
502
+
503
+* **hooks:** call npm script hooks ([e34fc34](https://github.com/ionic-team/ionic-cli/commit/e34fc34))
504
+* **plugins:** warn about multiple installed project plugins ([88789d8](https://github.com/ionic-team/ionic-cli/commit/88789d8))
505
+
506
+
507
+
508
+
509
+<a name="1.3.0"></a>
510
+# [1.3.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.2.0...@ionic/cli-utils@1.3.0) (2017-05-31)
511
+
512
+
513
+### Bug Fixes
514
+
515
+* **cordova:** more arg parsing fixes... ([4a75255](https://github.com/ionic-team/ionic-cli/commit/4a75255))
516
+* **proxy:** use env load to ensure shared reference ([8552826](https://github.com/ionic-team/ionic-cli/commit/8552826))
517
+
518
+
519
+
520
+
521
+<a name="1.2.0"></a>
522
+# [1.2.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.1.2...@ionic/cli-utils@1.2.0) (2017-05-23)
523
+
524
+
525
+### Bug Fixes
526
+
527
+* **cli-plugin-ionic1:** use documentRoot and watchPatterns from ionic.config.json ([a878a95](https://github.com/ionic-team/ionic-cli/commit/a878a95))
528
+* don't swallow subprocess stdout during --verbose ([d53d11a](https://github.com/ionic-team/ionic-cli/commit/d53d11a))
529
+* **config:** Handle empty file ([fbcfc76](https://github.com/ionic-team/ionic-cli/commit/fbcfc76))
530
+* **package:** dates not internationalized, use ISO ([0674bd9](https://github.com/ionic-team/ionic-cli/commit/0674bd9))
531
+
532
+
533
+### Features
534
+
535
+* **flags:** --no-interactive mode, with --confirm/--no-confirm ([1966a0c](https://github.com/ionic-team/ionic-cli/commit/1966a0c))
536
+* **flags:** add --quiet flag ([6268f0c](https://github.com/ionic-team/ionic-cli/commit/6268f0c))
537
+* **flags:** persistent "cli flags" ([72a9b45](https://github.com/ionic-team/ionic-cli/commit/72a9b45))
538
+* **logging:** disable interval spinner for non-interactive mode ([9e4ed33](https://github.com/ionic-team/ionic-cli/commit/9e4ed33))
539
+* **login:** automatic login via IONIC_EMAIL/IONIC_PASSWORD ([d8d26e4](https://github.com/ionic-team/ionic-cli/commit/d8d26e4))
540
+
541
+
542
+
543
+
544
+<a name="1.1.2"></a>
545
+## [1.1.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.1.1...@ionic/cli-utils@1.1.2) (2017-05-17)
546
+
547
+
548
+
549
+
550
+<a name="1.1.1"></a>
551
+## [1.1.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.1.0...@ionic/cli-utils@1.1.1) (2017-05-16)
552
+
553
+
554
+### Bug Fixes
555
+
556
+* **plugins:** messaging about globally installed plugins ([def3891](https://github.com/ionic-team/ionic-cli/commit/def3891))
557
+
558
+
559
+
560
+
561
+<a name="1.1.0"></a>
562
+# [1.1.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-utils@1.0.0...@ionic/cli-utils@1.1.0) (2017-05-16)
563
+
564
+
565
+### Bug Fixes
566
+
567
+* prevent TypeError runtime error ([1283f49](https://github.com/ionic-team/ionic-cli/commit/1283f49))
568
+* **cordova:** give cordova options after -- separator (https://github.com/ionic-team/ionic-cli/issues/2254) ([256503e](https://github.com/ionic-team/ionic-cli/commit/256503e))
569
+* **upload:** rip out progress library (fixes https://github.com/ionic-team/ionic-cli/issues/2257) ([1559049](https://github.com/ionic-team/ionic-cli/commit/1559049))
570
+
571
+
572
+### Features
573
+
574
+* **proxy:** global proxy plugin for start/login ([be89cb1](https://github.com/ionic-team/ionic-cli/commit/be89cb1))

+ 3
- 0
node_modules/@ionic/cli-utils/README.md Vedi File

@@ -0,0 +1,3 @@
1
+# @ionic/cli-utils
2
+
3
+The utility library for projects created and maintained using the Ionic CLI.

+ 73
- 0
node_modules/@ionic/cli-utils/assets/dev-server/dev-server.js Vedi File

@@ -0,0 +1,73 @@
1
+window.Ionic = window.Ionic || {}; window.Ionic.DevServer = {
2
+  start: function(config) {
3
+    var self = this;
4
+
5
+    if (config.consolelogs) {
6
+      this.socket = new WebSocket('ws://' + window.location.hostname + ':' + String(config.wsPort));
7
+      this.msgQueue = [];
8
+
9
+      this.socket.onopen = function() {
10
+        self.socketReady = true;
11
+
12
+        self.socket.onclose = function() {
13
+          self.socketReady = false;
14
+          console.warn('Dev server closed');
15
+        };
16
+      };
17
+
18
+      this.patchConsole();
19
+    }
20
+  },
21
+
22
+  queueMessageSend: function(msg) {
23
+    this.msgQueue.push(msg);
24
+    this.drainMessageQueue();
25
+  },
26
+
27
+  drainMessageQueue: function() {
28
+    var msg;
29
+    while (msg = this.msgQueue.shift()) {
30
+      if (this.socketReady) {
31
+        try {
32
+          this.socket.send(JSON.stringify(msg));
33
+        } catch(e) {
34
+          if (!(e instanceof TypeError)) {
35
+            console.error('ws error: ' + e);
36
+          }
37
+        }
38
+      }
39
+    }
40
+  },
41
+
42
+  patchConsole: function() {
43
+    var self = this;
44
+
45
+    function _patchConsole(consoleType) {
46
+      console[consoleType] = (function() {
47
+        var orgConsole = console[consoleType];
48
+        return function() {
49
+          orgConsole.apply(console, arguments);
50
+          var msg = {
51
+            category: 'console',
52
+            type: consoleType,
53
+            data: []
54
+          };
55
+          for (var i = 0; i < arguments.length; i++) {
56
+            msg.data.push(arguments[i]);
57
+          }
58
+          if (msg.data.length) {
59
+            self.queueMessageSend(msg);
60
+          }
61
+        };
62
+      })();
63
+    }
64
+
65
+    // https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-console/#supported-methods
66
+    var consoleFns = ['log', 'error', 'exception', 'warn', 'info', 'debug', 'assert', 'dir', 'dirxml', 'time', 'timeEnd', 'table'];
67
+    for (var i in consoleFns) {
68
+      _patchConsole(consoleFns[i]);
69
+    }
70
+  },
71
+};
72
+
73
+Ionic.DevServer.start(Ionic.DevServerConfig || {});

+ 103
- 0
node_modules/@ionic/cli-utils/assets/ionic1/lab/index.html Vedi File

@@ -0,0 +1,103 @@
1
+<!doctype html>
2
+<html>
3
+  <head>
4
+    <title>Ionic Lab</title>
5
+    <meta charset="utf-8">
6
+    <link rel="icon" type="image/png" href="/ionic-lab/static/img/favicon.png" />
7
+    <link rel="stylesheet" href="/ionic-lab/static/css/style.css" />
8
+  </head>
9
+  <body>
10
+    <div id="app">
11
+      <div id="header">
12
+        <div id="header-left">
13
+          <a target="_blank" href="https://ionicframework.com/" id="logo">
14
+          </a>
15
+        </div>
16
+
17
+        <div id="header-right">
18
+          <div class="dropdown">
19
+            <button class="dropdown-toggle" type="button">Platforms <span class="dropdown-caret"></span></button>
20
+            <ul class="dropdown-menu">
21
+              <li><input type="checkbox" id="device-iphone" name="iphone"><label for="device-iphone">iPhone</label></li>
22
+              <li><input type="checkbox" id="device-android" name="android"><label for="device-android">Android</label></li>
23
+              <li><input type="checkbox" id="device-windows" name="windows"><label for="device-windows">Windows</label></li>
24
+            </ul>
25
+          </div>
26
+        </div>
27
+      </div>
28
+      <preview>
29
+      </preview>
30
+      <div id="footer">
31
+        <div id="footer-left">
32
+          <span id="app-info"></span>
33
+        </div>
34
+        <div id="footer-right">
35
+          <a target="_blank" href="https://twitter.com/ionicframework">Twitter</a>
36
+          <a target="_blank" href="https://ionicframework.com/docs">Documentation</a>
37
+          <a target="_blank" href="https://forum.ionicframework.com/">Forum</a>
38
+          <a target="_blank" href="https://github.com/ionic-team/ionic">GitHub</a>
39
+          <a target="_blank" class="view-link" href="https://ionicframework.com/products/view">Ionic View</a>
40
+        </div>
41
+      </div>
42
+
43
+      <div id="view-popup">
44
+        <div class="view-popup-wrapper">
45
+          <div class="close"></div>
46
+          <div class="content">
47
+            <h2>Psssst...</h2>
48
+            <p>
49
+              You can test your app live on iOS and Android
50
+              with the <a href="https://ionicframework.com/products/view" target="_blank">Ionic View</a> app!
51
+            </p>
52
+          </div>
53
+          <div class="ionitron"></div>
54
+        </div>
55
+      </div>
56
+    </div>
57
+    <template id="iphone-frame-template">
58
+      <div class="phone" id="iphone">
59
+        <div class="phone-frame">
60
+          <h2><div class="phone-icon"></div> <a href="/?ionicplatform=ios" target="_blank">iOS</a></h2>
61
+          <div id="iphone-frame" class="phone-frame-wrap">
62
+            <div class="statusbar"></div>
63
+            <iframe src="/?ionicplatform=ios&amp;ionicstatusbarpadding=true" class="frame"></iframe>
64
+          </div>
65
+        </div>
66
+      </div>
67
+    </template>
68
+    <template id="android-frame-template">
69
+      <div class="phone" id="android">
70
+        <div class="phone-frame">
71
+          <h2><div class="phone-icon"></div> <a href="/?ionicplatform=android" target="_blank">Android</a></h2>
72
+          <div id="android-frame" class="phone-frame-wrap">
73
+            <div class="statusbar"></div>
74
+            <iframe src="/?ionicplatform=android" class="frame"></iframe>
75
+          </div>
76
+        </div>
77
+      </div>
78
+    </template>
79
+    <template id="windows-frame-template">
80
+      <div class="phone" id="windows">
81
+        <div class="phone-frame">
82
+          <h2><div class="phone-icon"></div> <a href="/?ionicplatform=windows" target="_blank">Windows</a></h2>
83
+          <div id="windows-frame" class="phone-frame-wrap">
84
+            <div class="statusbar"></div>
85
+            <iframe src="/?ionicplatform=windows" class="frame"></iframe>
86
+          </div>
87
+        </div>
88
+      </div>
89
+    </template>
90
+    <script src="/ionic-lab/static/js/lab.js"></script>
91
+    <script>
92
+      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
93
+      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
94
+      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
95
+      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
96
+
97
+      ga('create', 'UA-44023830-9', {
98
+        'cookieDomain': 'none'
99
+      })
100
+      ga('send', 'pageview');
101
+    </script>
102
+  </body>
103
+</html>

+ 365
- 0
node_modules/@ionic/cli-utils/assets/ionic1/lab/static/css/style.css Vedi File

@@ -0,0 +1,365 @@
1
+@font-face {font-family: 'AvenirNextLTPro-Regular';src: url('https://code.ionicframework.com/assets/fonts/28882F_0_0.eot');src: url('https://code.ionicframework.com/assets/fonts/28882F_0_0.eot?#iefix') format('embedded-opentype'),url('https://code.ionicframework.com/assets/fonts/28882F_0_0.woff') format('woff'),url('https://code.ionicframework.com/assets/fonts/28882F_0_0.ttf') format('truetype');}
2
+
3
+
4
+@font-face {font-family: 'AvenirNextLTPro-Medium';src: url('https://code.ionicframework.com/assets/fonts/28882F_1_0.eot');src: url('https://code.ionicframework.com/assets/fonts/28882F_1_0.eot?#iefix') format('embedded-opentype'),url('https://code.ionicframework.com/assets/fonts/28882F_1_0.woff') format('woff'),url('https://code.ionicframework.com/assets/fonts/28882F_1_0.ttf') format('truetype');}
5
+
6
+
7
+@font-face {font-family: 'AvenirNextLTPro-UltLt';src: url('https://code.ionicframework.com/assets/fonts/29CC36_0_0.eot');src: url('https://code.ionicframework.com/assets/fonts/29CC36_0_0.eot?#iefix') format('embedded-opentype'),url('https://code.ionicframework.com/assets/fonts/29CC36_0_0.woff') format('woff'),url('https://code.ionicframework.com/assets/fonts/29CC36_0_0.ttf') format('truetype');}
8
+
9
+html, body {
10
+  height: 100%;
11
+}
12
+
13
+body {
14
+  background-color: #f8f9fb;
15
+  font-family: 'AvenirNextLTPro-Regular', 'Helvetica Neue', 'Helvetica', Arial, sans-serif;
16
+  padding: 0;
17
+  margin: 0;
18
+  -webkit-font-smoothing: antialiased;
19
+}
20
+h2 {
21
+  color: #fff;
22
+  font-family: 'AvenirNextLTPro-Regular', 'Helvetica Neue', 'Helvetica', Arial, sans-serif;
23
+}
24
+
25
+h2 a {
26
+  font-size: 14px;
27
+  color: #727a87;
28
+  text-decoration: none;
29
+}
30
+
31
+.dropdown {
32
+  height: 100%;
33
+  position: relative;
34
+}
35
+.dropdown-toggle {
36
+  color: #858D9B;
37
+  display: block;
38
+  height: 100%;
39
+  background: none;
40
+  border: none;
41
+  font-size: 13px;
42
+  cursor: pointer;
43
+  padding-left: 15px;
44
+  font-weight: bold;
45
+  outline: none;
46
+  font-family: 'AvenirNextLTPro-Medium', 'Helvetica Neue', 'Helvetica', Arial, sans-serif;
47
+}
48
+.dropdown-menu {
49
+  display: none;
50
+  position: absolute;
51
+  z-index: 999;
52
+  width: 150px;
53
+  right: -10px;
54
+  background-color: white;
55
+  box-shadow: 0 6px 10px rgba(0,0,0,.08), 0 0px 6px rgba(0,0,0,.05);
56
+}
57
+.dropdown-menu > li {
58
+  padding: 6px 5px;
59
+}
60
+.dropdown:hover .dropdown-toggle {
61
+  /* increase the hit box when hovering */
62
+  padding-left: 100px;
63
+}
64
+.dropdown:hover .dropdown-menu {
65
+  display: block;
66
+}
67
+.dropdown li {
68
+  list-style: none;
69
+}
70
+.dropdown ul {
71
+  margin: 0;
72
+  padding: 0;
73
+}
74
+.dropdown-caret {
75
+  width: 0;
76
+  height: 0;
77
+  border-left: 5px solid transparent;
78
+  border-right: 5px solid transparent;
79
+
80
+  border-top: 5px solid #858D9B;
81
+  display: inline-block;
82
+}
83
+.dropdown-menu input {
84
+  cursor: pointer;
85
+  background-color: #4D82E9;
86
+}
87
+.dropdown-menu label {
88
+  font-size: 13px;
89
+  margin-left: 5px;
90
+  color: #858D9B;
91
+  cursor: pointer;
92
+  user-select: none;
93
+  -webkit-user-select: none;
94
+}
95
+
96
+#app {
97
+  display: flex;
98
+  flex-direction: column;
99
+  height: 100%;
100
+}
101
+
102
+#header {
103
+  width: 100%;
104
+  height: 50px;
105
+  background-color: white;
106
+  box-shadow: 0px 1px 3px rgba(0,0,0, 0.15);
107
+}
108
+#header-left {
109
+  float: left;
110
+  line-height: 50px;
111
+}
112
+#header a:hover {
113
+  opacity: 1;
114
+}
115
+#header-right {
116
+  float: right;
117
+  margin-right: 15px;
118
+  height: 100%;
119
+}
120
+#footer {
121
+  width: 100%;
122
+  border-top: 1px solid rgba(0,0,0,0.06);
123
+  background-color: #f8f9fb;
124
+}
125
+#footer-left {
126
+  float: left;
127
+  padding: 14px 0 14px 15px;
128
+  font-size: 13px;
129
+}
130
+#app-info {
131
+  color: #828080;
132
+}
133
+#footer-right {
134
+  float: right;
135
+  padding: 14px 15px 14px 5px;
136
+  font-size: 13px;
137
+}
138
+#footer-right a {
139
+  margin-left: 10px;
140
+  color: #a2a9b4;
141
+  text-decoration: none;
142
+  font-family: 'AvenirNextLTPro-Medium', 'Helvetica Neue', 'Helvetica', Arial, sans-serif;
143
+}
144
+#logo {
145
+  display: inline-block;
146
+  vertical-align: middle;
147
+
148
+  width: 64px;
149
+  height: 28px;
150
+  margin-left: 15px;
151
+  background-size: 100%;
152
+  background-repeat: no-repeat;
153
+  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAAA4CAMAAAACeQDhAAACEFBMVEVHiv////9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv9Hiv/arDJrAAAAr3RSTlMAAAEDBAUGBwgJCgsMDQ4PEBEUFRYXGBkbHB0eHyAhIiMkJSYnKTAxMjU2Nzk6Oz0+P0BFRkdKS1BXWFlaW1xdYGFiY2RlZ2hpa2xub3BxcnN0dXd4eXp8fX5/gIGChYeIiY2Oj5CRl5iZm5ydnp+go6Slrq+wtLW2t7u/wMHCw8bHyMnLzM3Oz9DS09TV2Nna297f4OLj5OXm5+jp6+zu7/Dx8vP09fb3+Pn7/P3+Rx34RQAABFxJREFUeAHF2ft701Qcx/HvCgyQzUWHsuE62HRBBAWDQhXYIooiGEXEi9bZqfXilKBSFa0MlcnKNp0S5qZclg0YFzc+/6LnnFyaNEkxPL28fqPlefbuSU5yckINdUZBic7dmWO/Ts6YM5Onc+/3rU9QUBUD1r3842V4XTn5alftAh4enEXQ7JEtiZoEPPDJNYT7blUtAtQpuK4aYyNjZ6/A8kML0Zred9/YsaKKAc2DsF06fljpbm1a0dTatfXQtxeB6XaiZ6fBDD9atYD2E7CM7O8kr+S+0ZeInofF3FilgK4xCOO7G6lUYyN1zMF2cmlVAtaOg/s300KhDsFxa3M1ApqGwP21nSLocPVVI+BzcKM9FOVIuQBwVF7U/7EC+qzD30GRDsKxsKnyAW1/g5l6iKIlTdhOLKt8wGdgbjxJ5eyF5eIGqniAfB1MhrxWbt2f+XjggLKKHH0GmF82UeUDvgDz291U1Pb2xAK4xT/715Lt3p39bz7RSPTYwO0DFEWODpAV2ReQnAPzNBX1TqJoag/5bP9nsbtsgJQugMupzt/1BEia9WVBk9yAV8QHjeRIZOD3wRJybfhyAXi9XEDahMOQSwIUrfilqTkBQ2D2kSuDUh+S60VxIiQiA6Q8vFR/QAFeuhWwbp7f/9rJsQtBz5BjzQUA13siAwoIcAMCdBGwE8z35LhvGkHni33fiKCogCxs+bwRFWDk3VHSeMAAmNfI8RbCvEeOA2CyEQFJCIYq8X+kwwJ0mRjVyjOTLOAYGMWd/xMIc66JbJvFgEUE6OAKEllkszTATJFFylk5LOA0gPkusm1ZRJhb28iWnOEXjeWhARI4QyKHUhqQIodUEEEsgM95Y3XxLA93kGz38CG60BwakAKnUpHuD8gTlcSlGoj/ovHmqDkYmInL+YjNrQ4NEAfdIA/FH5AiDwNMuoFmARRWku0jhPuUbMuGAVxuCw3Iu7Pb5Q8glzNjcvFHYCR6BERA+v8GiPHKxz8H/hDnQMUC4s8CM3oW6IFDIPkDZPIQEzF7Z9eB4xR9EprkofoDNPIwxScVvRIqgWlY8AcYgTb5zu4FakiA+6NMmRwa/AGe4yOZoij23fD+snfDLHwFGkoD3IJkAZwWez2wB8ypiPWAu3bWUxJJah7BABhakkjOmlaqFHdFtOQUmMMUEUAa4qwHkIq9JkyBmX8wMoB0+Jj+ABM+epxVsXCXOHJfU3SAv8CQ/QGyryAb67lAeAfMzUfKBVDKgM1MS+QPoGS+GKfEejISlGtgjlJpAPmpegEwcqpEIZQsazDz2VS8Z0Nh/Tkwlzqq8Hh+26djkXkG3F6qw/4A1zUC7iuiau6Q7KAo2wxwP0tE9dgjau6/CW6ik6gOu2RLnzoD4fceojrsE74wDMtPSaKa7pSuau1+XOyUWo621HqvePTsVbjOP1fX3fIbg511fV+gb6znG5OhGr4xERKdu6x3RiZ7ZzTQW+13Rg11VveA/wDc7Jb5d/SIFAAAAABJRU5ErkJggg==);
154
+}
155
+
156
+#logo img {
157
+  max-width: 100%;
158
+}
159
+.phone {
160
+  display: inline-block;
161
+  margin: 20px 20px 0 20px;
162
+  vertical-align: middle;
163
+}
164
+.phone h2 {
165
+  text-align: left;
166
+  vertical-align: middle;
167
+}
168
+.phone-icon {
169
+  display: inline-block;
170
+  vertical-align: middle;
171
+  background-repeat: no-repeat;
172
+  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAABgCAYAAAB8InCYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABFlJREFUeNrsmmdoFEEUxzeagIXYomKNhUv8YMPoBzGRKBpEgxoFBSGRiKDYsWFMAuqHqCAW0OgHlSgaRcSICoqFKMEPSuyIiAVLbIgFUcESPf+PvNNh2Nub3Z05EtwHP27uZnbnvzuzb96bvYRwOGxFbHnJRsuHJYAZYD74CsZFa7i5rOhvuZmlxzqB86ASZLo5b6KGzltx54OF326rHqzjDqyROic7Ei8BHcBC6bczoDZeAnJ4CCL2Fsx1cwK/AgYI5ZsgC9S5OYHKJOwGJoCe4Bu4Bi6Bn+Axz/zj4ARIApPBQL4zz8Fp/nQtoD3YBApBc6nuI6gCp/BM58N/TEF5H8gDraW25GgOgmXgnaqAEDgL+jqIm00oOC9yUAUgG4wBj2LNgRRwzqFzr5bK520RS8B20MfSb3T7Z/I8ijoE/dmf67YfPJFrYz2G0y0zti2ac5IFjDYkYIeqI0o30PlDJ+ckC+hsQMArN644wYCAJDcCvhkQ0M9pzZEr6gwIIMc2QlXAfUNPQbGqgKuGBIwHc1QEnLPM2S6wVJ7osoDr4IUhAdTXFnDZScBvsMcya7dirYa7DT2OZL/A1lgCyHOVGxKwUyUgISsDHwzEA2tVo2KK+RZrFjDf7qKcwvJKRofRxD7qJSyfzStkjk0dheU3wBsOUodJSUrEToIFXhOT7yAXlILX/NsDsJLzheEIy/M44u0C5oE73O4loDx8Kodk9iEz7Q8ohNaFvE5cUbzllCH15nzActonUE3PKekgle3oqkEG6C4kLPWc/Vzj2C+b75q2/YH+vKSucmgzFEzh8nlObh7pSE5z+apGusyaaYKO8iuAruIQaMmPEY1rjUP7Gk5qjoFk/uzpRwCtXm2EYOUZZ8TRjOqegnvCBsYmrwLo6icK30v5EZzlcMwsblMqJTupXgTk2UTMaQrjnyYFHVSe5ChA3LcTbLDGdWCI42MIR9SLA0dar8sg6CXn9AU6VyP0Q76jhP3HeppTET9Qxc6FbBAaZvHOhk6joaDtu0z+TmvH0MgcyBAaZhoMx8RzZ+jYJdMSqQYCAgGBgEYhoEL4rdxgf+K5K8SQjMLvw7wWXDQoYBG7fVoLLogCwhzHmTbqp7rJTMJqjf1UexGwxGp4C+LXTvDWjHpewBHSXTEsQ4wQltokSMFG1HrKvOicdhlY3OZAtPSvSXnCL0K53kO9bwH7hfIBD/W+klNbL+ay3j5SXVa8wfQw09PQgzMtIl0ohxLj0YklvarzOgRiJ5R654OxKp24mQOqV0Kp1jTeCfFliZw+h/xeiR8BK4KQLBAQCAgE/NcCyBOu83AcvaTYZzX8n8i3gKcejvvBIrTcgQoPx9FqWKRjNQwmYSAgEBAIaBRrwWqr4T1PiD+7xluAvHOQLCUm6UK5owkBsn22Gv6ie9Omri0LecIpeJ0gsp0uAU72yfr3x8S9TMRSeAjT+VMkWZcAJ3vP2L3i7yLMM3FYQ38EGAB86eMs4sfk/QAAAABJRU5ErkJggg==');
173
+  width: 16px;
174
+  height: 16px;
175
+  background-size: 100%;
176
+}
177
+#iphone .phone-icon {
178
+  background-position: 0px 0px;
179
+}
180
+#android .phone-icon {
181
+  background-position: 0px -16px;
182
+}
183
+#windows .phone-icon {
184
+  background-position: 0px -32px;
185
+}
186
+.frame {
187
+  border: none;
188
+}
189
+.phone-frame-wrap {
190
+  position: relative;
191
+  width: 375px;
192
+  height: 667px;
193
+  border-radius: 3px;
194
+  box-shadow: 0 8px 24px rgba(0,0,0,.08), 0 0px 6px rgba(0,0,0,.1);
195
+  overflow: hidden;
196
+}
197
+.phone-frame-wrap iframe {
198
+  width: 100%;
199
+  height: 100%;
200
+}
201
+.statusbar {
202
+  position: absolute;
203
+  top: 0;
204
+  width: 375px;
205
+  height: 10px;
206
+  padding: 5px 0;
207
+  background-size: 100%;
208
+  background-repeat: no-repeat;
209
+  background-color: transparent;
210
+  background-position: center;
211
+  border-radius: 3px 3px 0 0;
212
+}
213
+
214
+#iphone-frame .statusbar {
215
+  background-image: url(../img/ios-statusbar.png);
216
+}
217
+
218
+#android-frame .statusbar {
219
+  background-image: url(../img/android-statusbar.png);
220
+}
221
+
222
+#windows-frame .statusbar {
223
+  background-image: url(../img/wp-statusbar.png)
224
+}
225
+
226
+.phone-frame-wrap iframe {
227
+  height: 647px;
228
+  margin-top: 20px;
229
+}
230
+
231
+#view-popup {
232
+  display: none;
233
+  opacity: 0;
234
+  transition: 400ms linear opacity;
235
+  position: fixed;
236
+  bottom: 15px;
237
+  left: 15px;
238
+}
239
+#view-popup .view-popup-wrapper {
240
+  position: relative;
241
+}
242
+#view-popup .ionitron {
243
+  background: url('../img/popup-ionitron.png') no-repeat transparent;
244
+  width: 90px;
245
+  height: 90px;
246
+  background-size: 100%;
247
+}
248
+#view-popup .content {
249
+  box-sizing: border-box;
250
+  background: url('../img/popup-view-bubble.png') no-repeat transparent;
251
+  width: 350px;
252
+  height: 350px;
253
+  background-size: 100%;
254
+  margin-bottom: -50px;
255
+  padding-top: 25px;
256
+  text-align: center;
257
+  color: white;
258
+}
259
+#view-popup .content a {
260
+  color: #fff;
261
+  font-weight: bold;
262
+}
263
+#view-popup .content h2 {
264
+  margin-bottom: 5px;
265
+}
266
+#view-popup .content p {
267
+  font-size: 13px;
268
+  max-width: 220px;
269
+  margin: auto;
270
+}
271
+
272
+#view-popup .close {
273
+  cursor: pointer;
274
+  background: url('../img/popup-close.png') no-repeat transparent;
275
+  position: absolute;
276
+  right: 35px;
277
+  top: 20px;
278
+  width: 60px;
279
+  height: 60px;
280
+  background-size: 100%;
281
+  position: absolute;
282
+}
283
+
284
+preview {
285
+  flex: 1;
286
+  width: 100%;
287
+  display: block;
288
+  vertical-align: middle;
289
+  overflow: auto;
290
+  text-align: center;
291
+  justify-content: center;
292
+  align-items: center;
293
+  flex-wrap: wrap;
294
+  flex-direction: row;
295
+}
296
+
297
+
298
+@media screen and (max-height: 800px) {
299
+  #header {
300
+    height: 40px;
301
+  }
302
+  #header-left {
303
+    line-height: 40px;
304
+  }
305
+  #logo {
306
+    width: 50px;
307
+    height: 22px;
308
+  }
309
+  #footer-left {
310
+    float: left;
311
+    padding: 7px 0 7px 15px;
312
+    font-size: 12px;
313
+  }
314
+  #app-info {
315
+    color: #828080;
316
+  }
317
+  #footer-right {
318
+    float: right;
319
+    padding: 7px 15px 7px 5px;
320
+    font-size: 13px;
321
+  }
322
+  #footer-right .view-link {
323
+    color: #4D82E9;
324
+  }
325
+  .phone-frame h2 {
326
+    display: none;
327
+  }
328
+
329
+  @media screen and (max-width: 500px) {
330
+    #footer {
331
+      display: none;
332
+    }
333
+  }
334
+}
335
+
336
+@media screen and (max-height: 780px) {
337
+  .statusbar {
338
+    width: 340px;
339
+  }
340
+
341
+  .phone-frame-wrap {
342
+    width: 340px;
343
+    height: 605px;
344
+  }
345
+
346
+  .phone-frame-wrap iframe {
347
+    height: 585px;
348
+    margin-top: 20px;
349
+  }
350
+}
351
+@media screen and (max-height: 680px) {
352
+  .statusbar {
353
+    width: 325px;
354
+  }
355
+
356
+  .phone-frame-wrap {
357
+    width: 325px;
358
+    height: 578px;
359
+  }
360
+
361
+  .phone-frame-wrap iframe {
362
+    height: 558px;
363
+    margin-top: 20px;
364
+  }
365
+}

BIN
node_modules/@ionic/cli-utils/assets/ionic1/lab/static/img/android-statusbar.png Vedi File


BIN
node_modules/@ionic/cli-utils/assets/ionic1/lab/static/img/favicon.png Vedi File


BIN
node_modules/@ionic/cli-utils/assets/ionic1/lab/static/img/ios-statusbar.png Vedi File


BIN
node_modules/@ionic/cli-utils/assets/ionic1/lab/static/img/popup-close.png Vedi File


BIN
node_modules/@ionic/cli-utils/assets/ionic1/lab/static/img/popup-ionitron.png Vedi File


BIN
node_modules/@ionic/cli-utils/assets/ionic1/lab/static/img/popup-view-bubble.png Vedi File


BIN
node_modules/@ionic/cli-utils/assets/ionic1/lab/static/img/wp-statusbar.png Vedi File


+ 112
- 0
node_modules/@ionic/cli-utils/assets/ionic1/lab/static/js/lab.js Vedi File

@@ -0,0 +1,112 @@
1
+var $ = document.querySelector.bind(document);
2
+
3
+var API_ROOT = '/ionic-lab/api/v1';
4
+
5
+function tryShowViewPopup() {
6
+  var view = window.localStorage.getItem('ionic_viewpop');
7
+
8
+  if(!view) {
9
+    $('#view-popup').style.display = 'block';
10
+    $('#view-popup .close').addEventListener('click', function(e) {
11
+      window.localStorage.setItem('ionic_viewpop', true);
12
+      $('#view-popup').style.opacity = 0;
13
+      setTimeout(function() {
14
+        $('#view-popup').style.display = 'none';
15
+      }, 200);
16
+    });
17
+    window.requestAnimationFrame(function() {
18
+      $('#view-popup').style.opacity = 1;
19
+    });
20
+  }
21
+}
22
+
23
+// Bind the dropdown platform toggles
24
+function bindToggles() {
25
+  // Watch for changes on the checkboxes in the device dropdown
26
+  var iphone = $('#device-iphone');
27
+  var android = $('#device-android');
28
+  var windows = $('#device-windows');
29
+
30
+  var devices = [iphone, android, windows];
31
+  for(i in devices) {
32
+    devices[i].addEventListener('change', function(e) {
33
+      var device = this.name;
34
+      console.log('Device changed', device, this.checked);
35
+
36
+      showDevice(device, this.checked);
37
+      saveLastDevices(device, this.checked);
38
+    })
39
+  }
40
+}
41
+
42
+// Show one of the devices
43
+function showDevice(device, isShowing) {
44
+  $('#device-' + device).checked = isShowing;
45
+
46
+  var rendered = $('#' + device);
47
+  if(!rendered) {
48
+    var template = $('#' + device + '-frame-template');
49
+    var clone = document.importNode(template, true);
50
+    $('preview').appendChild(clone.content);
51
+    //check for extra params in location.url to pass on to iframes
52
+    var params = document.location.href.split('?')
53
+    if (params) {
54
+      var extraparams = params[params.length - 1]
55
+      var oldsrc = $('preview .frame').getAttribute('src')
56
+      $('preview .frame').setAttribute('src', oldsrc + '&' + extraparams)
57
+    }
58
+  } else {
59
+    rendered.style.display = isShowing ? '' : 'none';
60
+  }
61
+}
62
+
63
+function saveLastDevices(newDevice, didAdd) {
64
+  var last = window.localStorage.getItem('ionic_lastdevices');
65
+  if(!last && didAdd) {
66
+    window.localStorage.setItem('ionic_lastdevices', newDevice);
67
+    return;
68
+  }
69
+  var devices = last.split(',');
70
+  var di = devices.indexOf(newDevice);
71
+  if(di == -1 && didAdd) {
72
+    window.localStorage.setItem('ionic_lastdevices', devices.join(',') + ',' + newDevice);
73
+  } else if(di >= 0) {
74
+    devices.splice(di, 1);
75
+    window.localStorage.setItem('ionic_lastdevices', devices.join(','));
76
+  }
77
+}
78
+
79
+function showLastDevices() {
80
+  var last = window.localStorage.getItem('ionic_lastdevices');
81
+  if(!last) {
82
+    showDevice('iphone', true);
83
+    return;
84
+  }
85
+
86
+  var devices = last.split(',');
87
+  for(var i = 0; i < devices.length; i++) {
88
+    showDevice(devices[i], true);
89
+  }
90
+}
91
+
92
+function setCordovaInfo(data) {
93
+  let el = $('#app-info');
94
+  el.innerHTML = data.name + ' - v' + data.version;
95
+  if(data.name) {
96
+    document.title = data.name + ' - Ionic Lab';
97
+  }
98
+}
99
+
100
+function loadCordova() {
101
+  var req = new XMLHttpRequest();
102
+  req.addEventListener('load', function(e) {
103
+    setCordovaInfo(JSON.parse(req.response));
104
+  })
105
+  req.open('GET', API_ROOT + '/cordova', true)
106
+  req.send(null);
107
+}
108
+
109
+showLastDevices();
110
+loadCordova();
111
+bindToggles();
112
+tryShowViewPopup();

+ 4
- 0
node_modules/@ionic/cli-utils/bootstrap.d.ts Vedi File

@@ -0,0 +1,4 @@
1
+export declare const ERROR_BASE_DIRECTORY_NOT_FOUND = "BASE_DIRECTORY_NOT_FOUND";
2
+export declare const ERROR_LOCAL_CLI_NOT_FOUND = "LOCAL_CLI_NOT_FOUND";
3
+export declare const ERROR_VERSION_TOO_OLD = "VERSION_TOO_OLD";
4
+export declare function detectLocalCLI(): Promise<string>;

+ 30
- 0
node_modules/@ionic/cli-utils/bootstrap.js Vedi File

@@ -0,0 +1,30 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const fs = require("fs");
5
+const path = require("path");
6
+const semver = require("semver");
7
+const fs_1 = require("@ionic/cli-framework/utils/fs");
8
+const npm_1 = require("@ionic/cli-framework/utils/npm");
9
+exports.ERROR_BASE_DIRECTORY_NOT_FOUND = 'BASE_DIRECTORY_NOT_FOUND';
10
+exports.ERROR_LOCAL_CLI_NOT_FOUND = 'LOCAL_CLI_NOT_FOUND';
11
+exports.ERROR_VERSION_TOO_OLD = 'VERSION_TOO_OLD';
12
+function detectLocalCLI() {
13
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
14
+        const dir = yield fs_1.findBaseDirectory(process.cwd(), 'package.json');
15
+        if (!dir) {
16
+            throw exports.ERROR_BASE_DIRECTORY_NOT_FOUND;
17
+        }
18
+        const local = path.join(dir, 'node_modules', 'ionic');
19
+        const ok = yield fs_1.pathAccessible(local, fs.constants.R_OK);
20
+        if (!ok) {
21
+            throw exports.ERROR_LOCAL_CLI_NOT_FOUND;
22
+        }
23
+        const pkg = yield npm_1.readPackageJsonFile(path.join(local, 'package.json'));
24
+        if (semver.lt(pkg.version || '', '3.10.0')) {
25
+            throw exports.ERROR_VERSION_TOO_OLD;
26
+        }
27
+        return local;
28
+    });
29
+}
30
+exports.detectLocalCLI = detectLocalCLI;

+ 2
- 0
node_modules/@ionic/cli-utils/commands/build.d.ts Vedi File

@@ -0,0 +1,2 @@
1
+import { CommandLineInputs, CommandLineOptions, IonicEnvironment } from '../definitions';
2
+export declare function build(env: IonicEnvironment, inputs: CommandLineInputs, options: CommandLineOptions): Promise<void>;

+ 57
- 0
node_modules/@ionic/cli-utils/commands/build.js Vedi File

@@ -0,0 +1,57 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const chalk_1 = require("chalk");
5
+const BUILD_BEFORE_HOOK = 'build:before';
6
+const BUILD_BEFORE_SCRIPT = `ionic:${BUILD_BEFORE_HOOK}`;
7
+const BUILD_AFTER_HOOK = 'build:after';
8
+const BUILD_AFTER_SCRIPT = `ionic:${BUILD_AFTER_HOOK}`;
9
+function build(env, inputs, options) {
10
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
11
+        const { detectAndWarnAboutDeprecatedPlugin } = yield Promise.resolve().then(() => require('../lib/plugins'));
12
+        const [platform] = inputs;
13
+        const packageJson = yield env.project.loadPackageJson();
14
+        if (packageJson.scripts && packageJson.scripts[BUILD_BEFORE_SCRIPT]) {
15
+            env.log.debug(() => `Invoking ${chalk_1.default.cyan(BUILD_BEFORE_SCRIPT)} npm script.`);
16
+            yield env.shell.run('npm', ['run', BUILD_BEFORE_SCRIPT], { showExecution: true });
17
+        }
18
+        if (packageJson.devDependencies) {
19
+            if (packageJson.devDependencies['gulp']) {
20
+                const { checkGulp, runTask } = yield Promise.resolve().then(() => require('../lib/gulp'));
21
+                yield checkGulp(env);
22
+                yield runTask(env, BUILD_BEFORE_SCRIPT);
23
+            }
24
+            yield detectAndWarnAboutDeprecatedPlugin(env, '@ionic/cli-plugin-cordova');
25
+            yield detectAndWarnAboutDeprecatedPlugin(env, '@ionic/cli-plugin-ionic-angular');
26
+            yield detectAndWarnAboutDeprecatedPlugin(env, '@ionic/cli-plugin-ionic1');
27
+            yield detectAndWarnAboutDeprecatedPlugin(env, '@ionic/cli-plugin-gulp');
28
+            if (packageJson.devDependencies['@ionic/cli-plugin-cordova']) {
29
+                const { checkCordova } = yield Promise.resolve().then(() => require('../lib/cordova/utils'));
30
+                yield checkCordova(env);
31
+            }
32
+        }
33
+        yield env.hooks.fire(BUILD_BEFORE_HOOK, { env });
34
+        const project = yield env.project.load();
35
+        if (project.type === 'ionic-angular') {
36
+            const { build } = yield Promise.resolve().then(() => require('../lib/ionic-angular/build'));
37
+            yield build({ env, options: Object.assign({ platform }, options) });
38
+        }
39
+        else {
40
+            const { build } = yield Promise.resolve().then(() => require('../lib/ionic1/build'));
41
+            yield build({ env, options: Object.assign({ platform }, options) });
42
+        }
43
+        if (packageJson.scripts && packageJson.scripts[BUILD_AFTER_SCRIPT]) {
44
+            env.log.debug(() => `Invoking ${chalk_1.default.cyan(BUILD_AFTER_SCRIPT)} npm script.`);
45
+            yield env.shell.run('npm', ['run', BUILD_AFTER_SCRIPT], { showExecution: true });
46
+        }
47
+        if (packageJson.devDependencies) {
48
+            if (packageJson.devDependencies['gulp']) {
49
+                const { checkGulp, runTask } = yield Promise.resolve().then(() => require('../lib/gulp'));
50
+                yield checkGulp(env);
51
+                yield runTask(env, BUILD_AFTER_SCRIPT);
52
+            }
53
+        }
54
+        yield env.hooks.fire(BUILD_AFTER_HOOK, { env, platform });
55
+    });
56
+}
57
+exports.build = build;

+ 2
- 0
node_modules/@ionic/cli-utils/commands/config/get.d.ts Vedi File

@@ -0,0 +1,2 @@
1
+import { CommandLineInputs, CommandLineOptions, IonicEnvironment } from '../../definitions';
2
+export declare function get(env: IonicEnvironment, inputs: CommandLineInputs, options: CommandLineOptions): Promise<void>;

+ 44
- 0
node_modules/@ionic/cli-utils/commands/config/get.js Vedi File

@@ -0,0 +1,44 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const util = require("util");
5
+const chalk_1 = require("chalk");
6
+const errors_1 = require("../../lib/errors");
7
+function get(env, inputs, options) {
8
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
9
+        let [p] = inputs;
10
+        const { global, json } = options;
11
+        if (!global && !env.project.directory) {
12
+            throw new errors_1.FatalException(`Sorry--this won't work outside an Ionic project directory. Did you mean to print global config using ${chalk_1.default.green('--global')}?`);
13
+        }
14
+        const file = global ? env.config : env.project;
15
+        const config = yield file.load();
16
+        const [cloneDeep, get] = yield Promise.all([Promise.resolve().then(() => require('lodash/cloneDeep')), Promise.resolve().then(() => require('lodash/get'))]);
17
+        const v = cloneDeep(p ? get(config, p) : config);
18
+        if (json) {
19
+            process.stdout.write(JSON.stringify(v));
20
+        }
21
+        else {
22
+            yield sanitize(p, v);
23
+            env.log.msg(util.inspect(v, { colors: chalk_1.default.enabled }));
24
+        }
25
+    });
26
+}
27
+exports.get = get;
28
+function scrubTokens(obj) {
29
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
30
+        const mapValues = yield Promise.resolve().then(() => require('lodash/mapValues'));
31
+        return mapValues(obj, () => '*****');
32
+    });
33
+}
34
+function sanitize(key, obj) {
35
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
36
+        const assign = yield Promise.resolve().then(() => require('lodash/assign'));
37
+        if (typeof obj === 'object' && 'tokens' in obj) {
38
+            obj['tokens'] = yield scrubTokens(obj['tokens']);
39
+        }
40
+        if (key === 'tokens') {
41
+            assign(obj, yield scrubTokens(obj));
42
+        }
43
+    });
44
+}

+ 2
- 0
node_modules/@ionic/cli-utils/commands/config/set.d.ts Vedi File

@@ -0,0 +1,2 @@
1
+import { CommandLineInputs, CommandLineOptions, IonicEnvironment } from '../../definitions';
2
+export declare function set(env: IonicEnvironment, inputs: CommandLineInputs, options: CommandLineOptions): Promise<void>;

+ 50
- 0
node_modules/@ionic/cli-utils/commands/config/set.js Vedi File

@@ -0,0 +1,50 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const chalk_1 = require("chalk");
5
+const errors_1 = require("../../lib/errors");
6
+function set(env, inputs, options) {
7
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
8
+        const { prettyPath } = yield Promise.resolve().then(() => require('../../lib/utils/format'));
9
+        let [p, v] = inputs;
10
+        const { global, json, force } = options;
11
+        if (!global && !env.project.directory) {
12
+            throw new errors_1.FatalException(`Sorry--this won't work outside an Ionic project directory. Did you mean to set global config using ${chalk_1.default.green('--global')}?`);
13
+        }
14
+        const file = global ? env.config : env.project;
15
+        const config = yield file.load();
16
+        const [get, set] = yield Promise.all([Promise.resolve().then(() => require('lodash/get')), Promise.resolve().then(() => require('lodash/set'))]);
17
+        const oldValue = get(config, p);
18
+        if (!v.match(/^\d+e\d+$/)) {
19
+            try {
20
+                v = JSON.parse(v);
21
+            }
22
+            catch (e) {
23
+                if (!(e instanceof SyntaxError)) {
24
+                    throw e;
25
+                }
26
+                if (json) {
27
+                    throw new errors_1.FatalException(`${chalk_1.default.green('--json')}: ${chalk_1.default.green(v)} is invalid JSON: ${chalk_1.default.red(String(e))}`);
28
+                }
29
+            }
30
+        }
31
+        let newValue = v;
32
+        if (oldValue && typeof oldValue === 'object' && !force) {
33
+            throw new errors_1.FatalException(`Sorry--will not override objects or arrays without ${chalk_1.default.green('--force')}.\n` +
34
+                `Value of ${chalk_1.default.green(p)} is: ${chalk_1.default.bold(JSON.stringify(oldValue))}`);
35
+        }
36
+        const valueChanged = oldValue !== newValue;
37
+        set(config, p, newValue);
38
+        yield file.save();
39
+        if (global && p === 'backend' && valueChanged) {
40
+            yield env.hooks.fire('backend:changed', { env });
41
+        }
42
+        if (valueChanged) {
43
+            env.log.ok(`${chalk_1.default.green(p)} set to ${chalk_1.default.green(JSON.stringify(v))} in ${chalk_1.default.bold(prettyPath(file.filePath))}!`);
44
+        }
45
+        else {
46
+            env.log.info(`${chalk_1.default.green(p)} is already set to ${chalk_1.default.bold(JSON.stringify(v))}.`);
47
+        }
48
+    });
49
+}
50
+exports.set = set;

+ 21
- 0
node_modules/@ionic/cli-utils/commands/serve.d.ts Vedi File

@@ -0,0 +1,21 @@
1
+import { CommandLineInputs, CommandLineOptions, IonicEnvironment, ServeDetails } from '../definitions';
2
+export declare function serve(env: IonicEnvironment, inputs: CommandLineInputs, options: CommandLineOptions): Promise<ServeDetails>;
3
+export declare function cliOptionsToServeOptions(options: CommandLineOptions): {
4
+    address: string;
5
+    port: number;
6
+    livereloadPort: number;
7
+    notificationPort: number;
8
+    consolelogs: boolean;
9
+    serverlogs: boolean;
10
+    livereload: boolean;
11
+    proxy: boolean;
12
+    lab: boolean;
13
+    open: boolean;
14
+    browser: string | undefined;
15
+    browserOption: string | undefined;
16
+    basicAuth: [string, string] | undefined;
17
+    env: string | undefined;
18
+    devapp: boolean;
19
+    externalAddressRequired: boolean;
20
+    iscordovaserve: boolean;
21
+};

+ 106
- 0
node_modules/@ionic/cli-utils/commands/serve.js Vedi File

@@ -0,0 +1,106 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const os = require("os");
5
+const chalk_1 = require("chalk");
6
+const string_1 = require("@ionic/cli-framework/utils/string");
7
+const errors_1 = require("../lib/errors");
8
+const serve_1 = require("../lib/serve");
9
+const WATCH_BEFORE_HOOK = 'watch:before';
10
+const WATCH_BEFORE_SCRIPT = `ionic:${WATCH_BEFORE_HOOK}`;
11
+function serve(env, inputs, options) {
12
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
13
+        const { detectAndWarnAboutDeprecatedPlugin } = yield Promise.resolve().then(() => require('../lib/plugins'));
14
+        const packageJson = yield env.project.loadPackageJson();
15
+        if (packageJson.scripts && packageJson.scripts[WATCH_BEFORE_SCRIPT]) {
16
+            env.log.debug(() => `Invoking ${chalk_1.default.cyan(WATCH_BEFORE_SCRIPT)} npm script.`);
17
+            yield env.shell.run('npm', ['run', WATCH_BEFORE_SCRIPT], { showExecution: true });
18
+        }
19
+        if (packageJson.devDependencies) {
20
+            if (packageJson.devDependencies['gulp']) {
21
+                const { checkGulp, registerWatchEvents, runTask } = yield Promise.resolve().then(() => require('../lib/gulp'));
22
+                yield checkGulp(env);
23
+                yield registerWatchEvents(env);
24
+                yield runTask(env, WATCH_BEFORE_SCRIPT);
25
+            }
26
+            yield detectAndWarnAboutDeprecatedPlugin(env, '@ionic/cli-plugin-cordova');
27
+            yield detectAndWarnAboutDeprecatedPlugin(env, '@ionic/cli-plugin-ionic-angular');
28
+            yield detectAndWarnAboutDeprecatedPlugin(env, '@ionic/cli-plugin-ionic1');
29
+            yield detectAndWarnAboutDeprecatedPlugin(env, '@ionic/cli-plugin-gulp');
30
+            if (packageJson.devDependencies['@ionic/cli-plugin-cordova']) {
31
+                const { checkCordova } = yield Promise.resolve().then(() => require('../lib/cordova/utils'));
32
+                yield checkCordova(env);
33
+            }
34
+        }
35
+        yield env.hooks.fire('watch:before', { env });
36
+        const [platform] = inputs;
37
+        let details;
38
+        const serveOptions = cliOptionsToServeOptions(options);
39
+        const project = yield env.project.load();
40
+        const devAppDetails = yield serve_1.gatherDevAppDetails(env, serveOptions);
41
+        if (project.type === 'ionic1') {
42
+            const { serve } = yield Promise.resolve().then(() => require('../lib/ionic1/serve'));
43
+            details = yield serve({ env, options: serveOptions });
44
+        }
45
+        else if (project.type === 'ionic-angular') {
46
+            const { serve } = yield Promise.resolve().then(() => require('../lib/ionic-angular/serve'));
47
+            details = yield serve({ env, options: Object.assign({ platform, target: serveOptions.iscordovaserve ? 'cordova' : undefined }, serveOptions) });
48
+        }
49
+        else {
50
+            throw new errors_1.FatalException(`Cannot perform Ionic serve/watch for project type: ${chalk_1.default.bold(project.type)}.\n` +
51
+                (project.type === 'custom' ? `Since you're using the ${chalk_1.default.bold('custom')} project type, this command won't work. The Ionic CLI doesn't know how to serve custom projects.\n\n` : '') +
52
+                `If you'd like the CLI to try to detect your project type, you can unset the ${chalk_1.default.bold('type')} attribute in ${chalk_1.default.bold('ionic.config.json')}.\n`);
53
+        }
54
+        if (devAppDetails) {
55
+            const devAppName = yield serve_1.publishDevApp(env, serveOptions, Object.assign({ port: details.port }, devAppDetails));
56
+            devAppDetails.channel = devAppName;
57
+        }
58
+        const localAddress = `http://localhost:${details.port}`;
59
+        const fmtExternalAddress = (address) => `http://${address}:${details.port}`;
60
+        env.log.ok(`Development server running!\n` +
61
+            `Local: ${chalk_1.default.bold(localAddress)}\n` +
62
+            (details.externalNetworkInterfaces.length > 0 ? `External: ${details.externalNetworkInterfaces.map(v => chalk_1.default.bold(fmtExternalAddress(v.address))).join(', ')}\n` : '') +
63
+            (serveOptions.basicAuth ? `Basic Auth: ${chalk_1.default.bold(serveOptions.basicAuth[0])} / ${chalk_1.default.bold(serveOptions.basicAuth[1])}` : '') +
64
+            (devAppDetails && devAppDetails.channel ? `DevApp: ${chalk_1.default.bold(devAppDetails.channel)} on ${chalk_1.default.bold(os.hostname())}` : ''));
65
+        if (serveOptions.open) {
66
+            const openOptions = [localAddress]
67
+                .concat(serveOptions.lab ? [serve_1.IONIC_LAB_URL] : [])
68
+                .concat(serveOptions.browserOption ? [serveOptions.browserOption] : [])
69
+                .concat(platform ? ['?ionicplatform=', platform] : []);
70
+            const opn = yield Promise.resolve().then(() => require('opn'));
71
+            opn(openOptions.join(''), { app: serveOptions.browser, wait: false });
72
+        }
73
+        return details;
74
+    });
75
+}
76
+exports.serve = serve;
77
+function cliOptionsToServeOptions(options) {
78
+    if (options['local']) {
79
+        options['address'] = 'localhost';
80
+        options['devapp'] = false;
81
+    }
82
+    const address = options['address'] ? String(options['address']) : serve_1.BIND_ALL_ADDRESS;
83
+    const port = string_1.str2num(options['port'], serve_1.DEFAULT_SERVER_PORT);
84
+    const livereloadPort = string_1.str2num(options['livereload-port'], serve_1.DEFAULT_LIVERELOAD_PORT);
85
+    const notificationPort = string_1.str2num(options['dev-logger-port'], serve_1.DEFAULT_DEV_LOGGER_PORT);
86
+    return {
87
+        address,
88
+        port,
89
+        livereloadPort,
90
+        notificationPort,
91
+        consolelogs: options['consolelogs'] ? true : false,
92
+        serverlogs: options['serverlogs'] ? true : false,
93
+        livereload: typeof options['livereload'] === 'boolean' ? Boolean(options['livereload']) : true,
94
+        proxy: typeof options['proxy'] === 'boolean' ? Boolean(options['proxy']) : true,
95
+        lab: options['lab'] ? true : false,
96
+        open: options['open'] ? true : false,
97
+        browser: options['browser'] ? String(options['browser']) : undefined,
98
+        browserOption: options['browseroption'] ? String(options['browseroption']) : undefined,
99
+        basicAuth: options['auth'] ? ['ionic', String(options['auth'])] : undefined,
100
+        env: options['env'] ? String(options['env']) : undefined,
101
+        devapp: typeof options['devapp'] === 'undefined' || options['devapp'] ? true : false,
102
+        externalAddressRequired: options['externalAddressRequired'] ? true : false,
103
+        iscordovaserve: typeof options['iscordovaserve'] === 'boolean' ? Boolean(options['iscordovaserve']) : false,
104
+    };
105
+}
106
+exports.cliOptionsToServeOptions = cliOptionsToServeOptions;

+ 21
- 0
node_modules/@ionic/cli-utils/constants.d.ts Vedi File

@@ -0,0 +1,21 @@
1
+import { ProjectType } from './definitions';
2
+export declare const PROJECT_FILE = "ionic.config.json";
3
+export declare const PROJECT_FILE_LEGACY = "ionic.project";
4
+export declare const PROJECT_TYPES: ProjectType[];
5
+export declare enum CommandGroup {
6
+    Deprecated = 0,
7
+    Hidden = 1,
8
+    Beta = 2,
9
+}
10
+export declare enum NamespaceGroup {
11
+    Deprecated = 0,
12
+    Hidden = 1,
13
+    Beta = 2,
14
+}
15
+export declare enum OptionGroup {
16
+    Advanced = 0,
17
+    AppScripts = 1,
18
+    Cordova = 2,
19
+    Deprecated = 3,
20
+    Hidden = 4,
21
+}

+ 25
- 0
node_modules/@ionic/cli-utils/constants.js Vedi File

@@ -0,0 +1,25 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.PROJECT_FILE = 'ionic.config.json';
4
+exports.PROJECT_FILE_LEGACY = 'ionic.project';
5
+exports.PROJECT_TYPES = ['angular', 'ionic-angular', 'ionic1', 'custom'];
6
+var CommandGroup;
7
+(function (CommandGroup) {
8
+    CommandGroup[CommandGroup["Deprecated"] = 0] = "Deprecated";
9
+    CommandGroup[CommandGroup["Hidden"] = 1] = "Hidden";
10
+    CommandGroup[CommandGroup["Beta"] = 2] = "Beta";
11
+})(CommandGroup = exports.CommandGroup || (exports.CommandGroup = {}));
12
+var NamespaceGroup;
13
+(function (NamespaceGroup) {
14
+    NamespaceGroup[NamespaceGroup["Deprecated"] = 0] = "Deprecated";
15
+    NamespaceGroup[NamespaceGroup["Hidden"] = 1] = "Hidden";
16
+    NamespaceGroup[NamespaceGroup["Beta"] = 2] = "Beta";
17
+})(NamespaceGroup = exports.NamespaceGroup || (exports.NamespaceGroup = {}));
18
+var OptionGroup;
19
+(function (OptionGroup) {
20
+    OptionGroup[OptionGroup["Advanced"] = 0] = "Advanced";
21
+    OptionGroup[OptionGroup["AppScripts"] = 1] = "AppScripts";
22
+    OptionGroup[OptionGroup["Cordova"] = 2] = "Cordova";
23
+    OptionGroup[OptionGroup["Deprecated"] = 3] = "Deprecated";
24
+    OptionGroup[OptionGroup["Hidden"] = 4] = "Hidden";
25
+})(OptionGroup = exports.OptionGroup || (exports.OptionGroup = {}));

+ 738
- 0
node_modules/@ionic/cli-utils/definitions.d.ts Vedi File

@@ -0,0 +1,738 @@
1
+/// <reference types="node" />
2
+import * as os from 'os';
3
+import * as crossSpawnType from 'cross-spawn';
4
+import * as inquirerType from 'inquirer';
5
+import * as superagentType from 'superagent';
6
+import * as minimistType from 'minimist';
7
+import * as framework from '@ionic/cli-framework';
8
+import { EventEmitter } from 'events';
9
+export { CommandInput, CommandLineInput, CommandLineInputs, CommandLineOptions, CommandOptionType, PackageJson } from '@ionic/cli-framework';
10
+export interface SuperAgentError extends Error {
11
+    response: superagentType.Response;
12
+}
13
+export declare type LogMsg = string | (() => string);
14
+export declare type LogFn = (msg: LogMsg) => void;
15
+export declare type LogLevel = 'debug' | 'info' | 'ok' | 'warn' | 'error' | 'announce';
16
+export declare type LogPrefix = string | (() => string);
17
+export interface LoggerOptions {
18
+    level?: LogLevel;
19
+    prefix?: string | (() => string);
20
+    stream?: NodeJS.WritableStream;
21
+}
22
+export interface ILogger {
23
+    level: LogLevel;
24
+    prefix: LogPrefix;
25
+    stream: NodeJS.WritableStream;
26
+    debug: LogFn;
27
+    info: LogFn;
28
+    ok: LogFn;
29
+    warn: LogFn;
30
+    error: LogFn;
31
+    announce: LogFn;
32
+    msg: LogFn;
33
+    log: LogFn;
34
+    nl(num?: number): void;
35
+    shouldLog(level: LogLevel): boolean;
36
+}
37
+export interface ITask {
38
+    msg: string;
39
+    running: boolean;
40
+    progressRatio: number;
41
+    start(): this;
42
+    progress(prog: number, total: number): this;
43
+    clear(): this;
44
+    succeed(): this;
45
+    fail(): this;
46
+    end(): this;
47
+}
48
+export interface ITaskChain {
49
+    next(msg: string): ITask;
50
+    updateMsg(msg: string): this;
51
+    end(): this;
52
+    fail(): this;
53
+    cleanup(): this;
54
+}
55
+export interface StarterManifest {
56
+    name: string;
57
+    baseref: string;
58
+    welcome?: string;
59
+}
60
+export interface CordovaPackageJson extends framework.PackageJson {
61
+    cordova: {
62
+        platforms: string[];
63
+        plugins: {
64
+            [key: string]: {};
65
+        };
66
+    };
67
+}
68
+export interface BowerJson {
69
+    name: string;
70
+    dependencies?: {
71
+        [key: string]: string;
72
+    };
73
+    devDependencies?: {
74
+        [key: string]: string;
75
+    };
76
+}
77
+export interface ProjectFileProxy {
78
+    path: string;
79
+    proxyUrl: string;
80
+    proxyNoAgent: boolean;
81
+    /**
82
+     * @deprecated
83
+     */
84
+    rejectUnauthorized: boolean;
85
+}
86
+export declare type ProjectType = 'ionic-angular' | 'ionic1' | 'custom';
87
+export interface ProjectIntegration {
88
+    enabled?: boolean;
89
+}
90
+export interface ProjectIntegrationGulp extends ProjectIntegration {
91
+    file?: string;
92
+}
93
+export interface ProjectFile {
94
+    name: string;
95
+    type: ProjectType;
96
+    app_id: string;
97
+    integrations: {
98
+        cordova?: ProjectIntegration;
99
+        gulp?: ProjectIntegrationGulp;
100
+        [key: string]: ProjectIntegration | undefined;
101
+    };
102
+    documentRoot?: string;
103
+    watchPatterns?: string[];
104
+    proxies?: ProjectFileProxy[];
105
+}
106
+export interface Response<T> extends APIResponseSuccess {
107
+    data: T;
108
+}
109
+export interface Org {
110
+    name: string;
111
+}
112
+export interface GithubRepo {
113
+    full_name: string;
114
+    id: number;
115
+}
116
+export interface GithubBranch {
117
+    name: string;
118
+}
119
+export interface AppAssociation {
120
+    repository: GithubRepoAssociation;
121
+}
122
+export interface RepoAssociation {
123
+    html_url: string;
124
+    clone_url: string;
125
+    full_name: string;
126
+}
127
+export interface GithubRepoAssociation extends RepoAssociation {
128
+    type: 'github';
129
+    id: number;
130
+}
131
+export declare type AssociationType = 'github';
132
+export interface AppDetails {
133
+    id: string;
134
+    name: string;
135
+    slug: string;
136
+    org: null | Org;
137
+    repo_url?: string;
138
+    association?: null | AppAssociation;
139
+}
140
+export interface ResourceClientLoad<T extends object> {
141
+    load(id: string | number, modifiers: ResourceClientRequestModifiers): Promise<T>;
142
+}
143
+export interface ResourceClientDelete {
144
+    delete(id: string | number): Promise<void>;
145
+}
146
+export interface ResourceClientCreate<T extends object, U extends object> {
147
+    create(details: U): Promise<T>;
148
+}
149
+export interface ResourceClientPaginate<T extends object> {
150
+    paginate(args?: Partial<PaginateArgs<Response<T[]>>>): IPaginator<Response<T[]>, PaginatorState>;
151
+}
152
+export interface ResourceClientRequestModifiers {
153
+    fields?: string[];
154
+}
155
+export interface Login {
156
+    user: User;
157
+    token: string;
158
+}
159
+export interface User {
160
+    id: number;
161
+    email: string;
162
+    oauth_identities?: OAuthIdentity;
163
+}
164
+export declare type OAuthIdentity = {
165
+    [A in AssociationType]?: OAuthIdentityDetails;
166
+};
167
+export interface OAuthIdentityDetails {
168
+    username: string;
169
+    name: string;
170
+    html_url: string;
171
+}
172
+export interface AuthToken {
173
+    token: string;
174
+    details: {
175
+        app_id: string;
176
+        type: 'app-user';
177
+        user_id: string;
178
+    };
179
+}
180
+export interface SSHKey {
181
+    id: string;
182
+    pubkey: string;
183
+    fingerprint: string;
184
+    annotation: string;
185
+    name: string;
186
+    created: string;
187
+    updated: string;
188
+}
189
+export interface DeploySnapshot {
190
+    uuid: string;
191
+    url: string;
192
+}
193
+export interface DeploySnapshotRequest extends DeploySnapshot {
194
+    presigned_post: {
195
+        url: string;
196
+        fields: Object;
197
+    };
198
+}
199
+export interface DeployChannel {
200
+    uuid: string;
201
+    tag: string;
202
+}
203
+export interface Deploy {
204
+    uuid: string;
205
+    snapshot: string;
206
+    channel: string;
207
+}
208
+export interface PackageProjectRequest {
209
+    id: number;
210
+    presigned_post: {
211
+        url: string;
212
+        fields: Object;
213
+    };
214
+}
215
+export interface PackageBuild {
216
+    id: number;
217
+    name: string | null;
218
+    created: string;
219
+    completed: string | null;
220
+    platform: 'android' | 'ios';
221
+    status: 'SUCCESS' | 'FAILED' | 'QUEUED' | 'BUILDING';
222
+    mode: 'debug' | 'release';
223
+    security_profile_tag: string | null;
224
+    url?: string | null;
225
+    output?: string | null;
226
+}
227
+export interface SecurityProfile {
228
+    name: string;
229
+    tag: string;
230
+    type: 'development' | 'production';
231
+    created: string;
232
+    credentials: {
233
+        android?: Object;
234
+        ios?: Object;
235
+    };
236
+}
237
+export interface IApp {
238
+    load(app_id?: string): Promise<AppDetails>;
239
+    paginate(): Promise<IPaginator<Response<AppDetails[]>>>;
240
+    create(app: {
241
+        name: string;
242
+    }): Promise<AppDetails>;
243
+}
244
+export interface IConfig extends IBaseConfig<ConfigFile> {
245
+    isUpdatingEnabled(): Promise<boolean>;
246
+    getAPIUrl(): Promise<string>;
247
+    getDashUrl(): Promise<string>;
248
+    getGitHost(): Promise<string>;
249
+    getGitPort(): Promise<number>;
250
+}
251
+export interface IProject extends IBaseConfig<ProjectFile> {
252
+    formatType(input: ProjectType): string;
253
+    getSourceDir(): Promise<string>;
254
+    loadAppId(): Promise<string>;
255
+    loadPackageJson(): Promise<framework.PackageJson>;
256
+    loadBowerJson(): Promise<BowerJson>;
257
+}
258
+export interface PackageVersions {
259
+    [key: string]: string;
260
+}
261
+export interface DaemonFile {
262
+    daemonVersion: string;
263
+    latestVersions: {
264
+        latest: PackageVersions;
265
+        [key: string]: PackageVersions;
266
+    };
267
+}
268
+export interface IDaemon extends IBaseConfig<DaemonFile> {
269
+    pidFilePath: string;
270
+    portFilePath: string;
271
+    logFilePath: string;
272
+    getPid(): Promise<number | undefined>;
273
+    setPid(pid: number): Promise<void>;
274
+    getPort(): Promise<number | undefined>;
275
+    setPort(port: number): Promise<void>;
276
+    populateDistTag(distTag: DistTag): void;
277
+}
278
+export declare type CommandOptionTypeDefaults = Map<framework.CommandOptionType, framework.CommandLineInput>;
279
+export interface CommandOption extends framework.CommandOption {
280
+    backends?: BackendFlag[];
281
+}
282
+export interface NormalizedCommandOption extends CommandOption {
283
+    type: framework.CommandOptionType;
284
+    default: framework.CommandLineInput;
285
+    aliases: string[];
286
+}
287
+export interface ExitCodeException extends Error {
288
+    exitCode: number;
289
+}
290
+export interface NormalizedMinimistOpts extends minimistType.Opts {
291
+    string: string[];
292
+    boolean: string[];
293
+    alias: {
294
+        [key: string]: string[];
295
+    };
296
+    default: {
297
+        [key: string]: framework.CommandLineInput;
298
+    };
299
+}
300
+export declare type BackendFlag = 'pro' | 'legacy';
301
+export interface CommandData extends framework.CommandData<framework.CommandInput, CommandOption> {
302
+    type: 'global' | 'project';
303
+    backends?: BackendFlag[];
304
+    fullName?: string;
305
+}
306
+export interface HydratedCommandData extends CommandData {
307
+    namespace: INamespace;
308
+    aliases: string[];
309
+    fullName: string;
310
+}
311
+export interface ISession {
312
+    login(email: string, password: string): Promise<void>;
313
+    logout(): Promise<void>;
314
+    isLoggedIn(): Promise<boolean>;
315
+    getUser(): Promise<{
316
+        id: number;
317
+    }>;
318
+    getUserToken(): Promise<string>;
319
+    getAppUserToken(app_id?: string): Promise<string>;
320
+}
321
+export interface IShellRunOptions extends crossSpawnType.SpawnOptions {
322
+    showCommand?: boolean;
323
+    showExecution?: boolean;
324
+    showError?: boolean;
325
+    showSpinner?: boolean;
326
+    fatalOnNotFound?: boolean;
327
+    fatalOnError?: boolean;
328
+    truncateErrorOutput?: number;
329
+}
330
+export interface IShell {
331
+    run(command: string, args: string[], options: IShellRunOptions): Promise<string>;
332
+    cmdinfo(cmd: string, args?: string[]): Promise<string | undefined>;
333
+}
334
+export interface ITelemetry {
335
+    sendCommand(command: string, args: string[]): Promise<void>;
336
+    resetToken(): Promise<void>;
337
+}
338
+export interface ConfigFile {
339
+    version: string;
340
+    created: string;
341
+    state: {
342
+        lastCommand: string;
343
+        lastNoResponseToUpdate?: string;
344
+        doctor: {
345
+            ignored: string[];
346
+        };
347
+    };
348
+    addresses: {
349
+        dashUrl?: string;
350
+        apiUrl?: string;
351
+        gitHost?: string;
352
+        gitPort?: number;
353
+    };
354
+    daemon: {
355
+        updates: boolean;
356
+    };
357
+    devapp: {
358
+        knownInterfaces: {
359
+            mac: string;
360
+            trusted: boolean;
361
+        }[];
362
+    };
363
+    ssl?: {
364
+        cafile?: string | string[];
365
+        certfile?: string | string[];
366
+        keyfile?: string | string[];
367
+    };
368
+    git: {
369
+        setup?: boolean;
370
+    };
371
+    user: {
372
+        id?: number;
373
+        email?: string;
374
+    };
375
+    tokens: {
376
+        user?: string;
377
+        telemetry?: string;
378
+        appUser: {
379
+            [app_id: string]: string;
380
+        };
381
+    };
382
+    backend: BackendFlag;
383
+    telemetry: boolean;
384
+    interactive?: boolean;
385
+    yarn: boolean;
386
+}
387
+export interface IBaseConfig<T extends {
388
+    [key: string]: any;
389
+}> {
390
+    directory: string;
391
+    fileName: string;
392
+    filePath: string;
393
+    load(options?: {
394
+        disk?: boolean;
395
+    }): Promise<T>;
396
+    save(configFile?: T): Promise<void>;
397
+}
398
+export declare type APIResponse = APIResponseSuccess | APIResponseError;
399
+export interface APIResponseMeta {
400
+    status: number;
401
+    version: string;
402
+    request_id: string;
403
+}
404
+export interface APIResponsePageTokenMeta extends APIResponseMeta {
405
+    prev_page_token?: string;
406
+    next_page_token?: string;
407
+}
408
+export declare type APIResponseData = Object | Object[] | string;
409
+export interface APIResponseErrorDetails {
410
+    error_type: string;
411
+    parameter: string;
412
+    errors: string[];
413
+}
414
+export interface APIResponseError {
415
+    error: APIResponseErrorError;
416
+    meta: APIResponseMeta;
417
+}
418
+export interface APIResponseErrorError {
419
+    message: string;
420
+    link: string | null;
421
+    type: string;
422
+    details?: APIResponseErrorDetails[];
423
+}
424
+export interface APIResponseSuccess {
425
+    data: APIResponseData;
426
+    meta: APIResponseMeta;
427
+}
428
+export declare type HttpMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE' | 'PURGE' | 'HEAD' | 'OPTIONS';
429
+export interface IClient {
430
+    config: IConfig;
431
+    make(method: HttpMethod, path: string): Promise<{
432
+        req: superagentType.SuperAgentRequest;
433
+    }>;
434
+    do(req: superagentType.SuperAgentRequest): Promise<APIResponseSuccess>;
435
+    paginate<T extends Response<object[]>>(args: PaginateArgs<T>): IPaginator<T>;
436
+}
437
+export declare type PaginateArgs<T extends Response<object[]>> = Pick<PaginatorDeps<T>, 'reqgen' | 'guard' | 'state' | 'max'>;
438
+export interface IPaginator<T extends Response<object[]>, S = PaginatorState> extends IterableIterator<Promise<T>> {
439
+    readonly state: S;
440
+}
441
+export declare type PaginatorRequestGenerator = () => Promise<{
442
+    req: superagentType.SuperAgentRequest;
443
+}>;
444
+export declare type PaginatorGuard<T extends Response<object[]>> = (res: APIResponseSuccess) => res is T;
445
+export interface PaginatorState {
446
+    done: boolean;
447
+    loaded: number;
448
+}
449
+export interface PagePaginatorState extends PaginatorState {
450
+    page: number;
451
+    page_size?: number;
452
+}
453
+export interface TokenPaginatorState extends PaginatorState {
454
+    page_token?: string;
455
+}
456
+export interface PaginatorDeps<T extends Response<object[]>, S = PaginatorState> {
457
+    readonly client: IClient;
458
+    readonly reqgen: PaginatorRequestGenerator;
459
+    readonly guard: PaginatorGuard<T>;
460
+    readonly state?: Partial<S>;
461
+    readonly max?: number;
462
+}
463
+export interface EnvironmentHookArgs {
464
+    env: IonicEnvironment;
465
+}
466
+export interface InfoHookArgs extends EnvironmentHookArgs {
467
+    project: IProject;
468
+}
469
+export interface BuildAfterHookArgs extends EnvironmentHookArgs {
470
+    platform?: string;
471
+}
472
+export interface InfoHookItem {
473
+    type: 'system' | 'global-packages' | 'local-packages' | 'cli-packages' | 'environment' | 'misc';
474
+    key: string;
475
+    value: string;
476
+    flair?: string;
477
+    path?: string;
478
+}
479
+export interface ServeOptions {
480
+    address: string;
481
+    port: number;
482
+    livereloadPort: number;
483
+    notificationPort: number;
484
+    consolelogs: boolean;
485
+    serverlogs: boolean;
486
+    livereload: boolean;
487
+    proxy: boolean;
488
+    lab: boolean;
489
+    open: boolean;
490
+    browser?: string;
491
+    browserOption?: string;
492
+    basicAuth?: [string, string];
493
+    env?: string;
494
+    devapp: boolean;
495
+    externalAddressRequired?: boolean;
496
+    /**
497
+     * @deprecated
498
+     */
499
+    iscordovaserve?: boolean;
500
+}
501
+export interface ServeDetails {
502
+    protocol: string;
503
+    localAddress: string;
504
+    externalAddress: string;
505
+    port: number;
506
+    externalNetworkInterfaces: NetworkInterface[];
507
+    externallyAccessible: boolean;
508
+}
509
+export interface CordovaProjectInfoHookResponse {
510
+    id: string;
511
+    name: string;
512
+    version: string;
513
+}
514
+export interface IHook<T, U> {
515
+    source: string;
516
+    name: string;
517
+    fire(args: T): Promise<U>;
518
+}
519
+export interface IHookEngine {
520
+    fire(hook: 'info', args: InfoHookArgs): Promise<InfoHookItem[]>;
521
+    fire(hook: 'cordova:project:info', args: EnvironmentHookArgs): Promise<CordovaProjectInfoHookResponse[]>;
522
+    fire(hook: 'plugins:init', args: EnvironmentHookArgs): Promise<void[]>;
523
+    fire(hook: 'build:before', args: EnvironmentHookArgs): Promise<void[]>;
524
+    fire(hook: 'build:after', args: BuildAfterHookArgs): Promise<void[]>;
525
+    fire(hook: 'watch:before', args: EnvironmentHookArgs): Promise<void[]>;
526
+    fire(hook: 'backend:changed', args: EnvironmentHookArgs): Promise<void[]>;
527
+    register(source: string, hook: 'info', listener: (args: InfoHookArgs) => Promise<InfoHookItem[]>): void;
528
+    register(source: string, hook: 'cordova:project:info', listener: (args: EnvironmentHookArgs) => Promise<CordovaProjectInfoHookResponse>): void;
529
+    register(source: string, hook: 'plugins:init', listener: (args: EnvironmentHookArgs) => Promise<void>): void;
530
+    register(source: string, hook: 'build:before', listener: (args: EnvironmentHookArgs) => Promise<void>): void;
531
+    register(source: string, hook: 'build:after', listener: (args: BuildAfterHookArgs) => Promise<void>): void;
532
+    register(source: string, hook: 'watch:before', listener: (args: EnvironmentHookArgs) => Promise<void>): void;
533
+    register(source: string, hook: 'backend:changed', listener: (args: EnvironmentHookArgs) => Promise<void>): void;
534
+    getSources(hook: string): string[];
535
+    hasSources(hook: string, sources: string[]): boolean;
536
+    deleteSource(source: string): void;
537
+    getRegistered<T, U>(hook: string): IHook<T, U>[];
538
+}
539
+export interface ICLIEventEmitter extends EventEmitter {
540
+    on(event: 'watch:init', listener: () => void): this;
541
+    on(event: 'watch:change', listener: (path: string) => void): this;
542
+    emit(event: 'watch:init'): boolean;
543
+    emit(event: 'watch:change', path: string): boolean;
544
+}
545
+export interface PromptQuestion extends inquirerType.Question {
546
+    type: string;
547
+    message: string;
548
+    name: string;
549
+}
550
+export interface ConfirmPromptQuestion extends PromptQuestion {
551
+    type: 'confirm';
552
+    noninteractiveValue?: boolean;
553
+}
554
+export interface NonConfirmPromptQuestion extends PromptQuestion {
555
+    type: 'input' | 'password' | 'list';
556
+    noninteractiveValue?: string;
557
+}
558
+export interface CheckboxPromptQuestion extends PromptQuestion {
559
+    type: 'checkbox';
560
+    noninteractiveValue?: string;
561
+}
562
+export interface PromptModule {
563
+    (question: ConfirmPromptQuestion): Promise<boolean>;
564
+    (question: NonConfirmPromptQuestion): Promise<string>;
565
+    (question: CheckboxPromptQuestion): Promise<string[]>;
566
+}
567
+export interface IonicEnvironment {
568
+    readonly flags: IonicEnvironmentFlags;
569
+    readonly hooks: IHookEngine;
570
+    readonly client: IClient;
571
+    readonly config: IConfig;
572
+    readonly daemon: IDaemon;
573
+    readonly events: ICLIEventEmitter;
574
+    readonly log: ILogger;
575
+    readonly prompt: PromptModule;
576
+    readonly meta: IonicEnvironmentMeta;
577
+    project: IProject;
578
+    readonly plugins: IonicEnvironmentPlugins;
579
+    session: ISession;
580
+    readonly shell: IShell;
581
+    readonly tasks: ITaskChain;
582
+    readonly telemetry: ITelemetry;
583
+    readonly namespace: IRootNamespace;
584
+    open(): Promise<void>;
585
+    close(): Promise<void>;
586
+    runCommand(pargv: string[], opts?: {
587
+        showExecution?: boolean;
588
+    }): Promise<void>;
589
+    load(modulePath: 'superagent'): typeof superagentType;
590
+}
591
+export interface IonicEnvironmentFlags {
592
+    interactive: boolean;
593
+    confirm: boolean;
594
+}
595
+export interface IonicEnvironmentMeta {
596
+    cwd: string;
597
+    local: boolean;
598
+    binPath: string;
599
+    libPath: string;
600
+}
601
+export interface IonicEnvironmentPlugins {
602
+    ionic: Plugin;
603
+    [key: string]: Plugin;
604
+}
605
+export declare type DistTag = 'testing' | 'canary' | 'latest';
606
+export interface PluginMeta {
607
+    filePath: string;
608
+    name: string;
609
+    version: string;
610
+    distTag: DistTag;
611
+    latestVersion?: string;
612
+    updateAvailable?: boolean;
613
+}
614
+export interface Plugin {
615
+    registerHooks?(hooks: IHookEngine): void;
616
+    meta: PluginMeta;
617
+    /**
618
+     * @deprecated
619
+     */
620
+    version?: string;
621
+}
622
+export interface RootPlugin extends Plugin {
623
+    namespace: IRootNamespace;
624
+}
625
+export interface INamespace {
626
+    root: boolean;
627
+    name: string;
628
+    description: string;
629
+    longDescription: string;
630
+    namespaces: INamespaceMap;
631
+    commands: ICommandMap;
632
+    locate(argv: string[]): Promise<[number, string[], ICommand | INamespace]>;
633
+    getCommandMetadataList(): Promise<HydratedCommandData[]>;
634
+}
635
+export interface IRootNamespace extends INamespace {
636
+    root: true;
637
+    name: 'ionic';
638
+    runCommand(env: IonicEnvironment, pargv: string[]): Promise<void>;
639
+}
640
+export interface ICommand {
641
+    env: IonicEnvironment;
642
+    metadata: CommandData;
643
+    validate(inputs: framework.CommandLineInputs): Promise<void>;
644
+    run(inputs: framework.CommandLineInputs, options: framework.CommandLineOptions): Promise<void>;
645
+    execute(inputs: framework.CommandLineInputs, options: framework.CommandLineOptions): Promise<void>;
646
+}
647
+export interface CommandPreRun extends ICommand {
648
+    preRun(inputs: framework.CommandLineInputs, options: framework.CommandLineOptions): Promise<void>;
649
+}
650
+export declare type NamespaceMapGetter = () => Promise<INamespace>;
651
+export declare type CommandMapGetter = () => Promise<ICommand>;
652
+export interface INamespaceMap extends Map<string, NamespaceMapGetter> {
653
+}
654
+export interface ICommandMap extends Map<string, string | CommandMapGetter> {
655
+    getAliases(): Map<string, string[]>;
656
+    resolveAliases(cmdName: string): undefined | CommandMapGetter;
657
+}
658
+export interface ImageResource {
659
+    platform: string;
660
+    imageId?: string;
661
+    dest: string;
662
+    resType: string;
663
+    nodeName: string;
664
+    nodeAttributes: string[];
665
+    name: string;
666
+    width: number;
667
+    height: number;
668
+    density?: string;
669
+    orientation?: 'landscape' | 'portrait';
670
+}
671
+export interface ResourcesImageConfig {
672
+    name: string;
673
+    width: number;
674
+    height: number;
675
+    density?: string;
676
+    orientation?: 'landscape' | 'portrait';
677
+}
678
+export interface SourceImage {
679
+    ext: string;
680
+    imageId?: string;
681
+    cachedId?: string;
682
+    platform: string;
683
+    resType: string;
684
+    path: string;
685
+    vector: boolean;
686
+    width: number;
687
+    height: number;
688
+}
689
+export interface ImageUploadResponse {
690
+    Error: string;
691
+    Width: number;
692
+    Height: number;
693
+    Type: string;
694
+    Vector: boolean;
695
+}
696
+export interface ResourcesPlatform {
697
+    [imgType: string]: {
698
+        images: ResourcesImageConfig[];
699
+        nodeName: string;
700
+        nodeAttributes: string[];
701
+    };
702
+}
703
+export interface ResourcesConfig {
704
+    [propName: string]: ResourcesPlatform;
705
+}
706
+export declare type KnownPlatform = 'ios' | 'android' | 'wp8' | 'windows' | 'browser';
707
+export declare type KnownResourceType = 'icon' | 'splash';
708
+export interface StarterList {
709
+    starters: {
710
+        name: string;
711
+        id: string;
712
+        type: ProjectType;
713
+    }[];
714
+    integrations: {
715
+        name: string;
716
+        id: string;
717
+    }[];
718
+}
719
+export interface StarterTemplate {
720
+    name: string;
721
+    type: ProjectType;
722
+    description: string;
723
+    archive: string;
724
+    strip?: boolean;
725
+}
726
+export interface IntegrationTemplate {
727
+    name: string;
728
+    archive?: string;
729
+}
730
+export declare type LiveReloadFunction = (changedFiles: string[]) => void;
731
+export interface DevServerMessage {
732
+    category: 'console';
733
+    type: string;
734
+    data: any[];
735
+}
736
+export declare type NetworkInterface = {
737
+    deviceName: string;
738
+} & os.NetworkInterfaceInfo;

+ 2
- 0
node_modules/@ionic/cli-utils/definitions.js Vedi File

@@ -0,0 +1,2 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });

+ 55
- 0
node_modules/@ionic/cli-utils/guards.d.ts Vedi File

@@ -0,0 +1,55 @@
1
+import { APIResponse, APIResponseError, APIResponseSuccess, AppAssociation, AppDetails, AuthToken, CommandPreRun, CordovaPackageJson, Deploy, DeployChannel, DeploySnapshot, DeploySnapshotRequest, DevServerMessage, ExitCodeException, GithubRepoAssociation, GithubRepo, GithubBranch, ICommand, INamespace, LogLevel, Org, PackageBuild, PackageProjectRequest, Plugin, Response, SSHKey, SecurityProfile, StarterManifest, SuperAgentError, User } from './definitions';
2
+export declare const LOG_LEVELS: LogLevel[];
3
+export declare function isCommand(cmd: ICommand | INamespace): cmd is ICommand;
4
+export declare function isCommandPreRun(cmd: any): cmd is CommandPreRun;
5
+export declare function isLogLevel(l: string): l is LogLevel;
6
+export declare function isStarterManifest(o: Object): o is StarterManifest;
7
+export declare function isCordovaPackageJson(o: Object): o is CordovaPackageJson;
8
+export declare function isExitCodeException(e: Error): e is ExitCodeException;
9
+export declare function isPlugin(p: any): p is Plugin;
10
+export declare function isSuperAgentError(e: Error): e is SuperAgentError;
11
+export declare function isAPIResponseSuccess(r: APIResponse): r is APIResponseSuccess;
12
+export declare function isAPIResponseError(r: APIResponse): r is APIResponseError;
13
+export declare function isOrg(o: object): o is Org;
14
+export declare function isGithubRepo(r: object): r is GithubRepo;
15
+export declare function isGithubBranch(r: object): r is GithubBranch;
16
+export declare function isGithubRepoListResponse(r: APIResponse): r is Response<GithubRepo[]>;
17
+export declare function isGithubBranchListResponse(r: APIResponse): r is Response<GithubBranch[]>;
18
+export declare function isAppAssociation(a: object): a is AppAssociation;
19
+export declare function isAppAssociationResponse(r: APIResponse): r is Response<AppAssociation>;
20
+export declare function isGithubRepoAssociation(a: object): a is GithubRepoAssociation;
21
+export declare function isAppDetails(d: Object): d is AppDetails;
22
+export declare function isAppResponse(r: APIResponse): r is Response<AppDetails>;
23
+export declare function isAppsResponse(r: APIResponse): r is Response<AppDetails[]>;
24
+export interface OAuthLogin {
25
+    redirect_url: string;
26
+}
27
+export declare function isOAuthLoginResponse(r: APIResponse): r is Response<OAuthLogin>;
28
+export declare function isAuthTokensResponse(r: APIResponse): r is Response<AuthToken[]>;
29
+export declare function isLegacyLoginResponse(r: APIResponse): r is Response<{
30
+    user_id: string;
31
+    token: string;
32
+}>;
33
+export declare function isProLoginResponse(r: APIResponse): r is Response<{
34
+    user: {
35
+        id: number;
36
+        email: string;
37
+    };
38
+    token: string;
39
+}>;
40
+export declare function isSSHKeyListResponse(r: APIResponse): r is Response<SSHKey[]>;
41
+export declare function isSSHKeyResponse(r: APIResponse): r is Response<SSHKey>;
42
+export declare function isDeployResponse(r: APIResponse): r is Response<Deploy>;
43
+export declare function isPackageProjectRequestResponse(r: APIResponse): r is Response<PackageProjectRequest>;
44
+export declare function isPackageBuild(o: Object): o is PackageBuild;
45
+export declare function isSecurityProfile(o: Object): o is SecurityProfile;
46
+export declare function isSecurityProfileResponse(r: APIResponse): r is Response<SecurityProfile>;
47
+export declare function isSecurityProfilesResponse(r: APIResponse): r is Response<SecurityProfile[]>;
48
+export declare function isPackageBuildResponse(r: APIResponse): r is Response<PackageBuild>;
49
+export declare function isPackageBuildsResponse(r: APIResponse): r is Response<PackageBuild[]>;
50
+export declare function isDeployChannelResponse(r: APIResponse): r is Response<DeployChannel>;
51
+export declare function isDeploySnapshotResponse(r: APIResponse): r is Response<DeploySnapshot>;
52
+export declare function isDeploySnapshotRequestResponse(r: APIResponse): r is Response<DeploySnapshotRequest>;
53
+export declare function isDevServerMessage(m: any): m is DevServerMessage;
54
+export declare function isUser(u: object): u is User;
55
+export declare function isUserResponse(r: APIResponse): r is Response<User>;

+ 321
- 0
node_modules/@ionic/cli-utils/guards.js Vedi File

@@ -0,0 +1,321 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.LOG_LEVELS = ['debug', 'info', 'ok', 'warn', 'error', 'announce'];
4
+function isCommand(cmd) {
5
+    return typeof cmd.run === 'function';
6
+}
7
+exports.isCommand = isCommand;
8
+function isCommandPreRun(cmd) {
9
+    return cmd && typeof cmd.preRun === 'function';
10
+}
11
+exports.isCommandPreRun = isCommandPreRun;
12
+function isLogLevel(l) {
13
+    const loglevel = l;
14
+    return exports.LOG_LEVELS.includes(loglevel);
15
+}
16
+exports.isLogLevel = isLogLevel;
17
+function isStarterManifest(o) {
18
+    const obj = o;
19
+    return obj &&
20
+        typeof obj.name === 'string' &&
21
+        typeof obj.baseref === 'string';
22
+}
23
+exports.isStarterManifest = isStarterManifest;
24
+function isCordovaPackageJson(o) {
25
+    const obj = o;
26
+    return obj &&
27
+        typeof obj.name === 'string' &&
28
+        typeof obj.cordova === 'object' &&
29
+        typeof obj.cordova.platforms === 'object' &&
30
+        typeof obj.cordova.plugins === 'object';
31
+}
32
+exports.isCordovaPackageJson = isCordovaPackageJson;
33
+function isExitCodeException(e) {
34
+    const err = e;
35
+    return err && typeof err.exitCode === 'number' && err.exitCode >= 0 && err.exitCode <= 255;
36
+}
37
+exports.isExitCodeException = isExitCodeException;
38
+function isPlugin(p) {
39
+    const plugin = p;
40
+    return plugin && typeof plugin.registerHooks === 'function';
41
+}
42
+exports.isPlugin = isPlugin;
43
+function isSuperAgentError(e) {
44
+    const err = e;
45
+    return e && err.response && typeof err.response === 'object';
46
+}
47
+exports.isSuperAgentError = isSuperAgentError;
48
+function isAPIResponseSuccess(r) {
49
+    const res = r;
50
+    return res && (typeof res.data === 'object' || typeof res.data === 'string');
51
+}
52
+exports.isAPIResponseSuccess = isAPIResponseSuccess;
53
+function isAPIResponseError(r) {
54
+    const res = r;
55
+    return res && typeof res.error === 'object';
56
+}
57
+exports.isAPIResponseError = isAPIResponseError;
58
+function isOrg(o) {
59
+    const org = o;
60
+    return org && typeof org.name === 'string';
61
+}
62
+exports.isOrg = isOrg;
63
+function isGithubRepo(r) {
64
+    const repo = r;
65
+    return repo
66
+        && typeof repo.full_name === 'string'
67
+        && typeof repo.id === 'number';
68
+}
69
+exports.isGithubRepo = isGithubRepo;
70
+function isGithubBranch(r) {
71
+    const branch = r;
72
+    return branch
73
+        && typeof branch.name === 'string';
74
+}
75
+exports.isGithubBranch = isGithubBranch;
76
+function isGithubRepoListResponse(r) {
77
+    if (!isAPIResponseSuccess(r) || !Array.isArray(r.data)) {
78
+        return false;
79
+    }
80
+    if (r.data.length === 0) {
81
+        return true;
82
+    }
83
+    return typeof r.data[0] === 'object' && isGithubRepo(r.data[0]);
84
+}
85
+exports.isGithubRepoListResponse = isGithubRepoListResponse;
86
+function isGithubBranchListResponse(r) {
87
+    if (!isAPIResponseSuccess(r) || !Array.isArray(r.data)) {
88
+        return false;
89
+    }
90
+    if (r.data.length === 0) {
91
+        return true;
92
+    }
93
+    return typeof r.data[0] === 'object' && isGithubBranch(r.data[0]);
94
+}
95
+exports.isGithubBranchListResponse = isGithubBranchListResponse;
96
+function isAppAssociation(a) {
97
+    const association = a;
98
+    return association
99
+        && typeof association.repository === 'object'
100
+        && typeof association.repository.html_url === 'string'
101
+        && isGithubRepoAssociation(association.repository);
102
+}
103
+exports.isAppAssociation = isAppAssociation;
104
+function isAppAssociationResponse(r) {
105
+    return isAPIResponseSuccess(r)
106
+        && typeof r.data === 'object'
107
+        && isAppAssociation(r.data);
108
+}
109
+exports.isAppAssociationResponse = isAppAssociationResponse;
110
+function isGithubRepoAssociation(a) {
111
+    const repo = a;
112
+    return repo
113
+        && repo.type === 'github'
114
+        && typeof repo.id === 'number';
115
+}
116
+exports.isGithubRepoAssociation = isGithubRepoAssociation;
117
+function isAppDetails(d) {
118
+    const details = d;
119
+    return details && typeof details === 'object'
120
+        && typeof details.id === 'string'
121
+        && typeof details.name === 'string'
122
+        && typeof details.slug === 'string'
123
+        && (!details.org || isOrg(details.org))
124
+        && (!details.association || isAppAssociation(details.association));
125
+}
126
+exports.isAppDetails = isAppDetails;
127
+function isAppResponse(r) {
128
+    const res = r;
129
+    return isAPIResponseSuccess(res) && isAppDetails(res.data);
130
+}
131
+exports.isAppResponse = isAppResponse;
132
+function isAppsResponse(r) {
133
+    let res = r;
134
+    if (!isAPIResponseSuccess(res) || !Array.isArray(res.data)) {
135
+        return false;
136
+    }
137
+    if (res.data.length > 0) {
138
+        return isAppDetails(res.data[0]);
139
+    }
140
+    return true;
141
+}
142
+exports.isAppsResponse = isAppsResponse;
143
+function isOAuthLoginResponse(r) {
144
+    const res = r;
145
+    return isAPIResponseSuccess(res) && typeof res.data === 'object' && typeof res.data.redirect_url === 'string';
146
+}
147
+exports.isOAuthLoginResponse = isOAuthLoginResponse;
148
+function isAuthTokensResponse(r) {
149
+    const res = r;
150
+    if (!isAPIResponseSuccess(res) || !Array.isArray(res.data)) {
151
+        return false;
152
+    }
153
+    if (res.data.length > 0) {
154
+        return typeof res.data[0].token === 'string'
155
+            && typeof res.data[0].details === 'object'
156
+            && typeof res.data[0].details.app_id === 'string'
157
+            && typeof res.data[0].details.type === 'string'
158
+            && typeof res.data[0].details.user_id === 'string';
159
+    }
160
+    return true;
161
+}
162
+exports.isAuthTokensResponse = isAuthTokensResponse;
163
+function isLegacyLoginResponse(r) {
164
+    const res = r;
165
+    return isAPIResponseSuccess(r) && typeof res.data.token === 'string';
166
+}
167
+exports.isLegacyLoginResponse = isLegacyLoginResponse;
168
+function isProLoginResponse(r) {
169
+    const res = r;
170
+    return isAPIResponseSuccess(r)
171
+        && typeof res.data.user === 'object'
172
+        && typeof res.data.user.id === 'number'
173
+        && typeof res.data.user.email === 'string'
174
+        && typeof res.data.token === 'string';
175
+}
176
+exports.isProLoginResponse = isProLoginResponse;
177
+function isSSHKeyListResponse(r) {
178
+    const res = r;
179
+    if (!isAPIResponseSuccess(r) || !Array.isArray(r.data)) {
180
+        return false;
181
+    }
182
+    if (typeof r.data[0] === 'object') {
183
+        return typeof res.data[0].id === 'string'
184
+            && typeof res.data[0].pubkey === 'string'
185
+            && typeof res.data[0].fingerprint === 'string'
186
+            && typeof res.data[0].annotation === 'string'
187
+            && typeof res.data[0].name === 'string'
188
+            && typeof res.data[0].created === 'string'
189
+            && typeof res.data[0].updated === 'string';
190
+    }
191
+    return true;
192
+}
193
+exports.isSSHKeyListResponse = isSSHKeyListResponse;
194
+function isSSHKeyResponse(r) {
195
+    const res = r;
196
+    return isAPIResponseSuccess(r)
197
+        && typeof res.data.id === 'string'
198
+        && typeof res.data.pubkey === 'string'
199
+        && typeof res.data.fingerprint === 'string'
200
+        && typeof res.data.annotation === 'string'
201
+        && typeof res.data.name === 'string'
202
+        && typeof res.data.created === 'string'
203
+        && typeof res.data.updated === 'string';
204
+}
205
+exports.isSSHKeyResponse = isSSHKeyResponse;
206
+function isDeployResponse(r) {
207
+    const res = r;
208
+    return isAPIResponseSuccess(res)
209
+        && typeof res.data.uuid === 'string'
210
+        && typeof res.data.snapshot === 'string'
211
+        && typeof res.data.channel === 'string';
212
+}
213
+exports.isDeployResponse = isDeployResponse;
214
+function isPackageProjectRequestResponse(r) {
215
+    const res = r;
216
+    return isAPIResponseSuccess(res)
217
+        && typeof res.data.id === 'number'
218
+        && typeof res.data.presigned_post === 'object'
219
+        && typeof res.data.presigned_post.url === 'string'
220
+        && res.data.presigned_post.fields && typeof res.data.presigned_post.fields === 'object';
221
+}
222
+exports.isPackageProjectRequestResponse = isPackageProjectRequestResponse;
223
+function isPackageBuild(o) {
224
+    const obj = o;
225
+    return obj && typeof obj === 'object'
226
+        && typeof obj.id === 'number'
227
+        && (!obj.name) || typeof obj.name === 'string'
228
+        && typeof obj.created === 'string'
229
+        && (!obj.completed || typeof obj.completed === 'string')
230
+        && typeof obj.platform === 'string'
231
+        && typeof obj.status === 'string'
232
+        && typeof obj.mode === 'string'
233
+        && (!obj.security_profile_tag || typeof obj.security_profile_tag === 'string')
234
+        && (!obj.url || typeof obj.url === 'string');
235
+}
236
+exports.isPackageBuild = isPackageBuild;
237
+function isSecurityProfile(o) {
238
+    const obj = o;
239
+    return obj && typeof obj === 'object'
240
+        && typeof obj.name === 'string'
241
+        && typeof obj.tag === 'string'
242
+        && typeof obj.type === 'string'
243
+        && typeof obj.created === 'string'
244
+        && typeof obj.credentials === 'object';
245
+}
246
+exports.isSecurityProfile = isSecurityProfile;
247
+function isSecurityProfileResponse(r) {
248
+    const res = r;
249
+    return isAPIResponseSuccess(res) && isSecurityProfile(res.data);
250
+}
251
+exports.isSecurityProfileResponse = isSecurityProfileResponse;
252
+function isSecurityProfilesResponse(r) {
253
+    const res = r;
254
+    if (!isAPIResponseSuccess(res) || !Array.isArray(res.data)) {
255
+        return false;
256
+    }
257
+    if (res.data.length > 0) {
258
+        return isSecurityProfile(res.data[0]);
259
+    }
260
+    return true;
261
+}
262
+exports.isSecurityProfilesResponse = isSecurityProfilesResponse;
263
+function isPackageBuildResponse(r) {
264
+    const res = r;
265
+    return isAPIResponseSuccess(res) && isPackageBuild(res.data);
266
+}
267
+exports.isPackageBuildResponse = isPackageBuildResponse;
268
+function isPackageBuildsResponse(r) {
269
+    const res = r;
270
+    if (!isAPIResponseSuccess(res) || !Array.isArray(res.data)) {
271
+        return false;
272
+    }
273
+    if (res.data.length > 0) {
274
+        return isPackageBuild(res.data[0]);
275
+    }
276
+    return true;
277
+}
278
+exports.isPackageBuildsResponse = isPackageBuildsResponse;
279
+function isDeployChannelResponse(r) {
280
+    const res = r;
281
+    return isAPIResponseSuccess(res)
282
+        && typeof res.data.uuid === 'string'
283
+        && typeof res.data.tag === 'string';
284
+}
285
+exports.isDeployChannelResponse = isDeployChannelResponse;
286
+function isDeploySnapshotResponse(r) {
287
+    const res = r;
288
+    return isAPIResponseSuccess(res)
289
+        && typeof res.data.uuid === 'string'
290
+        && typeof res.data.url === 'string';
291
+}
292
+exports.isDeploySnapshotResponse = isDeploySnapshotResponse;
293
+function isDeploySnapshotRequestResponse(r) {
294
+    const res = r;
295
+    return isAPIResponseSuccess(res)
296
+        && typeof res.data.uuid === 'string'
297
+        && typeof res.data.presigned_post === 'object'
298
+        && typeof res.data.presigned_post.url === 'string'
299
+        && res.data.presigned_post.fields && typeof res.data.presigned_post.fields === 'object';
300
+}
301
+exports.isDeploySnapshotRequestResponse = isDeploySnapshotRequestResponse;
302
+function isDevServerMessage(m) {
303
+    return m
304
+        && typeof m.category === 'string'
305
+        && typeof m.type === 'string'
306
+        && m.data && typeof m.data.length === 'number';
307
+}
308
+exports.isDevServerMessage = isDevServerMessage;
309
+function isUser(u) {
310
+    const user = u;
311
+    return user
312
+        && typeof user.id === 'number'
313
+        && typeof user.email === 'string';
314
+}
315
+exports.isUser = isUser;
316
+function isUserResponse(r) {
317
+    return isAPIResponseSuccess(r)
318
+        && typeof r.data === 'object'
319
+        && isUser(r.data);
320
+}
321
+exports.isUserResponse = isUserResponse;

+ 7
- 0
node_modules/@ionic/cli-utils/index.d.ts Vedi File

@@ -0,0 +1,7 @@
1
+import { IonicEnvironment, RootPlugin } from './definitions';
2
+export * from './definitions';
3
+export * from './guards';
4
+export { BACKEND_LEGACY, BACKEND_PRO, KNOWN_BACKENDS } from './lib/backends';
5
+export declare function generateIonicEnvironment(plugin: RootPlugin, pargv: string[], env: {
6
+    [key: string]: string;
7
+}): Promise<IonicEnvironment>;

+ 227
- 0
node_modules/@ionic/cli-utils/index.js Vedi File

@@ -0,0 +1,227 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const util = require("util");
5
+const path = require("path");
6
+const ci_info_1 = require("ci-info");
7
+const chalk_1 = require("chalk");
8
+const minimist = require("minimist");
9
+const guards_1 = require("./guards");
10
+const bootstrap_1 = require("./bootstrap");
11
+const backends_1 = require("./lib/backends");
12
+const config_1 = require("./lib/config");
13
+const daemon_1 = require("./lib/daemon");
14
+const http_1 = require("./lib/http");
15
+const events_1 = require("./lib/events");
16
+const environment_1 = require("./lib/environment");
17
+const hooks_1 = require("./lib/hooks");
18
+const project_1 = require("./lib/project");
19
+const logger_1 = require("./lib/utils/logger");
20
+const fs_1 = require("@ionic/cli-framework/utils/fs");
21
+const task_1 = require("./lib/utils/task");
22
+const npm_1 = require("./lib/utils/npm");
23
+const telemetry_1 = require("./lib/telemetry");
24
+const session_1 = require("./lib/session");
25
+const shell_1 = require("./lib/shell");
26
+const prompts_1 = require("./lib/prompts");
27
+tslib_1.__exportStar(require("./guards"), exports);
28
+var backends_2 = require("./lib/backends");
29
+exports.BACKEND_LEGACY = backends_2.BACKEND_LEGACY;
30
+exports.BACKEND_PRO = backends_2.BACKEND_PRO;
31
+exports.KNOWN_BACKENDS = backends_2.KNOWN_BACKENDS;
32
+const name = '@ionic/cli-utils';
33
+function registerHooks(hooks) {
34
+    hooks.register(name, 'info', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
35
+        const packageJson = yield npm_1.readPackageJsonFileOfResolvedModule(__filename);
36
+        const version = packageJson.version || '';
37
+        return [
38
+            { type: 'cli-packages', key: name, value: version, path: path.dirname(__filename) },
39
+        ];
40
+    }));
41
+    hooks.register(name, 'backend:changed', ({ env }) => tslib_1.__awaiter(this, void 0, void 0, function* () {
42
+        const wasLoggedIn = yield env.session.isLoggedIn();
43
+        yield env.session.logout();
44
+        env.session = yield getSession(env.config, env.project, env.client);
45
+        if (wasLoggedIn) {
46
+            env.log.info('You have been logged out.');
47
+        }
48
+    }));
49
+    hooks.register(name, 'info', ({ env, project }) => tslib_1.__awaiter(this, void 0, void 0, function* () {
50
+        const osName = yield Promise.resolve().then(() => require('os-name'));
51
+        const os = osName();
52
+        const node = process.version;
53
+        const npm = yield env.shell.cmdinfo('npm', ['-v']);
54
+        const config = yield env.config.load();
55
+        const info = [
56
+            { type: 'cli-packages', key: 'ionic', flair: 'Ionic CLI', value: env.plugins.ionic.meta.version, path: path.dirname(path.dirname(env.plugins.ionic.meta.filePath)) },
57
+            { type: 'system', key: 'Node', value: node },
58
+            { type: 'system', key: 'npm', value: npm || 'not installed' },
59
+            { type: 'system', key: 'OS', value: os },
60
+            { type: 'misc', key: 'backend', value: config.backend },
61
+        ];
62
+        const projectFile = project.directory ? yield project.load() : undefined;
63
+        if (projectFile) {
64
+            if (projectFile.type === 'ionic1') {
65
+                const { getIonic1Version } = yield Promise.resolve().then(() => require('./lib/ionic1/utils'));
66
+                const ionic1Version = yield getIonic1Version(env);
67
+                info.push({ type: 'local-packages', key: 'Ionic Framework', value: ionic1Version ? `ionic1 ${ionic1Version}` : 'unknown' });
68
+            }
69
+            else if (projectFile.type === 'ionic-angular') {
70
+                const { getIonicAngularVersion, getAppScriptsVersion } = yield Promise.resolve().then(() => require('./lib/ionic-angular/utils'));
71
+                const [ionicAngularVersion, appScriptsVersion] = yield Promise.all([getIonicAngularVersion(env, project), getAppScriptsVersion(env, project)]);
72
+                info.push({ type: 'local-packages', key: 'Ionic Framework', value: ionicAngularVersion ? `ionic-angular ${ionicAngularVersion}` : 'not installed' });
73
+                info.push({ type: 'local-packages', key: '@ionic/app-scripts', value: appScriptsVersion ? appScriptsVersion : 'not installed' });
74
+            }
75
+            if (projectFile.integrations.cordova && projectFile.integrations.cordova.enabled !== false) {
76
+                const { getAndroidSdkToolsVersion } = yield Promise.resolve().then(() => require('./lib/android'));
77
+                const { getCordovaCLIVersion, getCordovaPlatformVersions } = yield Promise.resolve().then(() => require('./lib/cordova/utils'));
78
+                const [cordovaVersion, cordovaPlatforms, xcode, iosDeploy, iosSim, androidSdkToolsVersion,] = yield Promise.all([
79
+                    getCordovaCLIVersion(env),
80
+                    getCordovaPlatformVersions(env),
81
+                    env.shell.cmdinfo('xcodebuild', ['-version']),
82
+                    env.shell.cmdinfo('ios-deploy', ['--version']),
83
+                    env.shell.cmdinfo('ios-sim', ['--version']),
84
+                    getAndroidSdkToolsVersion(),
85
+                ]);
86
+                info.push({ type: 'global-packages', key: 'cordova', flair: 'Cordova CLI', value: cordovaVersion || 'not installed' });
87
+                info.push({ type: 'local-packages', key: 'Cordova Platforms', value: cordovaPlatforms || 'none' });
88
+                if (xcode) {
89
+                    info.push({ type: 'system', key: 'Xcode', value: xcode });
90
+                }
91
+                if (iosDeploy) {
92
+                    info.push({ type: 'system', key: 'ios-deploy', value: iosDeploy });
93
+                }
94
+                if (iosSim) {
95
+                    info.push({ type: 'system', key: 'ios-sim', value: iosSim });
96
+                }
97
+                if (androidSdkToolsVersion) {
98
+                    info.push({ type: 'system', key: 'Android SDK Tools', value: androidSdkToolsVersion });
99
+                }
100
+                info.push({ type: 'environment', key: 'ANDROID_HOME', value: process.env.ANDROID_HOME || 'not set' });
101
+            }
102
+            if (projectFile.integrations.gulp && projectFile.integrations.gulp.enabled !== false) {
103
+                const { getGulpVersion } = yield Promise.resolve().then(() => require('./lib/gulp'));
104
+                const gulpVersion = yield getGulpVersion(env);
105
+                info.push({ type: 'global-packages', key: 'Gulp CLI', value: gulpVersion || 'not installed globally' });
106
+            }
107
+        }
108
+        return info;
109
+    }));
110
+    hooks.register(name, 'cordova:project:info', ({ env }) => tslib_1.__awaiter(this, void 0, void 0, function* () {
111
+        const { ConfigXml } = yield Promise.resolve().then(() => require('./lib/cordova/config'));
112
+        const conf = yield ConfigXml.load(env.project.directory);
113
+        return conf.getProjectInfo();
114
+    }));
115
+}
116
+function getSession(config, project, client) {
117
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
118
+        const configData = yield config.load();
119
+        return configData.backend === backends_1.BACKEND_LEGACY ? new session_1.CloudSession(config, project, client) : new session_1.ProSession(config, project, client);
120
+    });
121
+}
122
+function generateIonicEnvironment(plugin, pargv, env) {
123
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
124
+        const cwd = process.cwd();
125
+        const argv = minimist(pargv, { boolean: true, string: '_' });
126
+        const config = new config_1.Config(env['IONIC_CONFIG_DIRECTORY'] || config_1.DEFAULT_CONFIG_DIRECTORY, config_1.CONFIG_FILE);
127
+        const flags = config_1.gatherFlags(argv);
128
+        let stream;
129
+        let tasks;
130
+        let bottomBar;
131
+        let log;
132
+        let level = 'info';
133
+        let levelInvalid = false;
134
+        let prefix = '';
135
+        const configData = yield config.load();
136
+        if (ci_info_1.isCI || configData.interactive === false) {
137
+            flags.interactive = false;
138
+        }
139
+        if (argv['log-level']) {
140
+            if (guards_1.isLogLevel(argv['log-level'])) {
141
+                level = argv['log-level'];
142
+            }
143
+            else {
144
+                levelInvalid = true;
145
+            }
146
+        }
147
+        if (argv['log-timestamps']) {
148
+            prefix = () => `${chalk_1.default.dim('[' + new Date().toISOString() + ']')}`;
149
+        }
150
+        if (flags.interactive) {
151
+            const inquirer = yield Promise.resolve().then(() => require('inquirer'));
152
+            bottomBar = new inquirer.ui.BottomBar();
153
+            stream = bottomBar.log;
154
+            log = new logger_1.Logger({ level, prefix, stream });
155
+            tasks = new task_1.InteractiveTaskChain({ log, bottomBar });
156
+        }
157
+        else {
158
+            stream = process.stdout;
159
+            log = new logger_1.Logger({ level, prefix, stream });
160
+            tasks = new task_1.TaskChain({ log });
161
+        }
162
+        const projectDir = yield fs_1.findBaseDirectory(cwd, project_1.PROJECT_FILE);
163
+        env['IONIC_PROJECT_DIR'] = projectDir || '';
164
+        env['IONIC_PROJECT_FILE'] = project_1.PROJECT_FILE;
165
+        configData.version = plugin.meta.version;
166
+        const project = new project_1.Project(env['IONIC_PROJECT_DIR'], project_1.PROJECT_FILE);
167
+        const client = new http_1.Client(config);
168
+        const session = yield getSession(config, project, client);
169
+        const hooks = new hooks_1.HookEngine();
170
+        const daemon = new daemon_1.Daemon(env['IONIC_DAEMON_DIRECTORY'] || config_1.DEFAULT_CONFIG_DIRECTORY, daemon_1.DAEMON_JSON_FILE);
171
+        const telemetry = new telemetry_1.Telemetry();
172
+        const shell = new shell_1.Shell({ tasks, log, project });
173
+        registerHooks(hooks);
174
+        yield Promise.all([config.prepare(), daemon.prepare()]);
175
+        const ienv = new environment_1.Environment({
176
+            bottomBar,
177
+            client,
178
+            config,
179
+            daemon,
180
+            events: new events_1.CLIEventEmitter(),
181
+            flags,
182
+            hooks,
183
+            log,
184
+            meta: {
185
+                cwd,
186
+                local: env['IONIC_CLI_LOCAL'] ? true : false,
187
+                binPath: env['IONIC_CLI_BIN'],
188
+                libPath: env['IONIC_CLI_LIB'],
189
+            },
190
+            namespace: plugin.namespace,
191
+            plugins: {
192
+                ionic: plugin,
193
+            },
194
+            prompt: yield prompts_1.createPromptModule({ confirm: flags.confirm, interactive: flags.interactive, log, config }),
195
+            project,
196
+            session,
197
+            shell,
198
+            tasks,
199
+            telemetry,
200
+        });
201
+        telemetry.env = ienv; // TODO: proper DI
202
+        yield ienv.open();
203
+        if (env['IONIC_CLI_LOCAL_ERROR']) {
204
+            log.debug(() => `Reason for not using local CLI: ${chalk_1.default.bold(env['IONIC_CLI_LOCAL_ERROR'])}`);
205
+            if (env['IONIC_CLI_LOCAL_ERROR'] === bootstrap_1.ERROR_VERSION_TOO_OLD) {
206
+                log.warn(`Detected locally installed Ionic CLI, but it's too old--using global CLI.`);
207
+            }
208
+        }
209
+        if (levelInvalid) {
210
+            log.warn(`${chalk_1.default.green(argv['log-level'])} is an invalid log level--defaulting back to ${chalk_1.default.bold(level)}.\n` +
211
+                `You can choose from the following log levels: ${guards_1.LOG_LEVELS.map(l => chalk_1.default.green(l)).join(', ')}.\n`);
212
+        }
213
+        log.debug(() => `CLI flags: ${util.inspect(flags, { breakLength: Infinity, colors: chalk_1.default.enabled })}`);
214
+        if (typeof argv['yarn'] === 'boolean') {
215
+            log.warn(`${chalk_1.default.green('--yarn')} / ${chalk_1.default.green('--no-yarn')} switch is deprecated. Use ${chalk_1.default.green('ionic config set -g yarn ' + String(argv['yarn']))}.`);
216
+            configData.yarn = argv['yarn'];
217
+        }
218
+        if (!projectDir) {
219
+            const foundDir = yield fs_1.findBaseDirectory(cwd, project_1.PROJECT_FILE_LEGACY);
220
+            if (foundDir) {
221
+                log.warn(`${chalk_1.default.bold(project_1.PROJECT_FILE_LEGACY)} file found in ${chalk_1.default.bold(foundDir)}--please rename it to ${chalk_1.default.bold(project_1.PROJECT_FILE)}, or your project directory will not be detected!`);
222
+            }
223
+        }
224
+        return ienv;
225
+    });
226
+}
227
+exports.generateIonicEnvironment = generateIonicEnvironment;

+ 1
- 0
node_modules/@ionic/cli-utils/lib/android.d.ts Vedi File

@@ -0,0 +1 @@
1
+export declare function getAndroidSdkToolsVersion(): Promise<string | undefined>;

+ 28
- 0
node_modules/@ionic/cli-utils/lib/android.js Vedi File

@@ -0,0 +1,28 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const path = require("path");
5
+const fs_1 = require("@ionic/cli-framework/utils/fs");
6
+function getAndroidSdkToolsVersion() {
7
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
8
+        const androidHome = process.env.ANDROID_HOME;
9
+        if (androidHome) {
10
+            try {
11
+                const f = yield fs_1.fsReadFile(path.join(androidHome, 'tools', 'source.properties'), { encoding: 'utf8' });
12
+                for (let l of f.split('\n')) {
13
+                    const [a, b] = l.split('=');
14
+                    if (a === 'Pkg.Revision') {
15
+                        return b;
16
+                    }
17
+                }
18
+            }
19
+            catch (e) {
20
+                if (e.code !== 'ENOENT') {
21
+                    throw e;
22
+                }
23
+            }
24
+        }
25
+        return undefined;
26
+    });
27
+}
28
+exports.getAndroidSdkToolsVersion = getAndroidSdkToolsVersion;

+ 17
- 0
node_modules/@ionic/cli-utils/lib/app.d.ts Vedi File

@@ -0,0 +1,17 @@
1
+import { AppAssociation, AppDetails, AssociationType, IApp, IClient, IPaginator, Response } from '../definitions';
2
+export declare class App implements IApp {
3
+    token: string;
4
+    protected client: IClient;
5
+    constructor(token: string, client: IClient);
6
+    load(app_id: string): Promise<AppDetails>;
7
+    paginate(): Promise<IPaginator<Response<AppDetails[]>>>;
8
+    create({name}: {
9
+        name: string;
10
+    }): Promise<AppDetails>;
11
+    createAssociation(id: string, association: {
12
+        repoId: number;
13
+        type: AssociationType;
14
+        branches: string[];
15
+    }): Promise<AppAssociation>;
16
+    deleteAssociation(id: string): Promise<void>;
17
+}

+ 72
- 0
node_modules/@ionic/cli-utils/lib/app.js Vedi File

@@ -0,0 +1,72 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const http_1 = require("./http");
5
+const guards_1 = require("../guards");
6
+class App {
7
+    constructor(token, client) {
8
+        this.token = token;
9
+        this.client = client;
10
+    }
11
+    load(app_id) {
12
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
13
+            const { req } = yield this.client.make('GET', `/apps/${app_id}`);
14
+            req.set('Authorization', `Bearer ${this.token}`).send({});
15
+            const res = yield this.client.do(req);
16
+            if (!guards_1.isAppResponse(res)) {
17
+                throw http_1.createFatalAPIFormat(req, res);
18
+            }
19
+            return res.data;
20
+        });
21
+    }
22
+    paginate() {
23
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
24
+            return this.client.paginate({
25
+                reqgen: () => tslib_1.__awaiter(this, void 0, void 0, function* () {
26
+                    const { req } = yield this.client.make('GET', '/apps');
27
+                    req.set('Authorization', `Bearer ${this.token}`);
28
+                    return { req };
29
+                }),
30
+                guard: guards_1.isAppsResponse,
31
+            });
32
+        });
33
+    }
34
+    create({ name }) {
35
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
36
+            const { req } = yield this.client.make('POST', '/apps');
37
+            req.set('Authorization', `Bearer ${this.token}`).send({ name });
38
+            const res = yield this.client.do(req);
39
+            if (!guards_1.isAppResponse(res)) {
40
+                throw http_1.createFatalAPIFormat(req, res);
41
+            }
42
+            return res.data;
43
+        });
44
+    }
45
+    createAssociation(id, association) {
46
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
47
+            const { req } = yield this.client.make('POST', `/apps/${id}/repository`);
48
+            req
49
+                .set('Authorization', `Bearer ${this.token}`)
50
+                .send({
51
+                repository_id: association.repoId,
52
+                type: association.type,
53
+                branches: association.branches,
54
+            });
55
+            const res = yield this.client.do(req);
56
+            if (!guards_1.isAppAssociationResponse(res)) {
57
+                throw http_1.createFatalAPIFormat(req, res);
58
+            }
59
+            return res.data;
60
+        });
61
+    }
62
+    deleteAssociation(id) {
63
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
64
+            const { req } = yield this.client.make('DELETE', `/apps/${id}/repository`);
65
+            req
66
+                .set('Authorization', `Bearer ${this.token}`)
67
+                .send({});
68
+            yield req;
69
+        });
70
+    }
71
+}
72
+exports.App = App;

+ 4
- 0
node_modules/@ionic/cli-utils/lib/backends.d.ts Vedi File

@@ -0,0 +1,4 @@
1
+import { BackendFlag } from '../definitions';
2
+export declare const BACKEND_LEGACY: BackendFlag;
3
+export declare const BACKEND_PRO: BackendFlag;
4
+export declare const KNOWN_BACKENDS: BackendFlag[];

+ 5
- 0
node_modules/@ionic/cli-utils/lib/backends.js Vedi File

@@ -0,0 +1,5 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.BACKEND_LEGACY = 'legacy';
4
+exports.BACKEND_PRO = 'pro';
5
+exports.KNOWN_BACKENDS = [exports.BACKEND_PRO, exports.BACKEND_LEGACY];

+ 8
- 0
node_modules/@ionic/cli-utils/lib/command.d.ts Vedi File

@@ -0,0 +1,8 @@
1
+import { CommandData, CommandLineInputs, CommandLineOptions, ICommand, IonicEnvironment } from '../definitions';
2
+import { Command as BaseCommand } from '@ionic/cli-framework/lib';
3
+export declare function CommandMetadata(metadata: CommandData): (target: Function) => void;
4
+export declare abstract class Command extends BaseCommand<CommandData> implements ICommand {
5
+    env: IonicEnvironment;
6
+    execute(inputs: CommandLineInputs, options: CommandLineOptions): Promise<void>;
7
+    getCleanInputsForTelemetry(inputs: CommandLineInputs, options: CommandLineOptions): Promise<string[]>;
8
+}

+ 94
- 0
node_modules/@ionic/cli-utils/lib/command.js Vedi File

@@ -0,0 +1,94 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const chalk_1 = require("chalk");
5
+const guards_1 = require("../guards");
6
+const lib_1 = require("@ionic/cli-framework/lib");
7
+const command_1 = require("./utils/command");
8
+const lib_2 = require("@ionic/cli-framework/lib");
9
+function CommandMetadata(metadata) {
10
+    return function (target) {
11
+        target.prototype.metadata = metadata;
12
+    };
13
+}
14
+exports.CommandMetadata = CommandMetadata;
15
+class Command extends lib_2.Command {
16
+    execute(inputs, options) {
17
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
18
+            const config = yield this.env.config.load();
19
+            if (guards_1.isCommandPreRun(this)) {
20
+                yield this.preRun(inputs, options);
21
+            }
22
+            if (this.metadata.inputs) {
23
+                for (let input of this.metadata.inputs) {
24
+                    if (!input.validators) {
25
+                        input.validators = [];
26
+                    }
27
+                    if (input.required !== false) {
28
+                        input.validators.unshift(lib_1.validators.required);
29
+                    }
30
+                }
31
+                try {
32
+                    // Validate inputs again, this time with required validator (prompt input
33
+                    // should've happened in preRun)
34
+                    lib_2.validateInputs(inputs, this.metadata);
35
+                }
36
+                catch (e) {
37
+                    if (!this.env.flags.interactive) {
38
+                        this.env.log.warn(`Command ran non-interactively due to ${chalk_1.default.green('--no-interactive')} flag, CI being detected, or a config setting.`);
39
+                    }
40
+                    throw e;
41
+                }
42
+            }
43
+            const runPromise = this.run(inputs, options);
44
+            const telemetryPromise = (() => tslib_1.__awaiter(this, void 0, void 0, function* () {
45
+                if (config.telemetry !== false) {
46
+                    let cmdInputs = [];
47
+                    if (this.metadata.name === 'login' || this.metadata.name === 'logout') {
48
+                        yield runPromise;
49
+                    }
50
+                    else if (this.metadata.name === 'help') {
51
+                        cmdInputs = inputs;
52
+                    }
53
+                    else {
54
+                        cmdInputs = yield this.getCleanInputsForTelemetry(inputs, options);
55
+                    }
56
+                    yield this.env.telemetry.sendCommand(`ionic ${this.metadata.fullName}`, cmdInputs);
57
+                }
58
+            }))();
59
+            yield Promise.all([runPromise, telemetryPromise]);
60
+        });
61
+    }
62
+    getCleanInputsForTelemetry(inputs, options) {
63
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
64
+            const initialOptions = { _: [] };
65
+            const filteredInputs = inputs.filter((input, i) => !this.metadata.inputs || (this.metadata.inputs[i] && !this.metadata.inputs[i].private));
66
+            const filteredOptions = Object.keys(options)
67
+                .filter(optionName => {
68
+                const metadataOption = this.metadata.options && this.metadata.options.find((o) => {
69
+                    return o.name === optionName || (typeof o.aliases !== 'undefined' && o.aliases.includes(optionName));
70
+                });
71
+                if (metadataOption && metadataOption.aliases && metadataOption.aliases.includes(optionName)) {
72
+                    return false; // exclude aliases
73
+                }
74
+                if (!metadataOption) {
75
+                    return true; // include unknown options
76
+                }
77
+                if (metadataOption.private) {
78
+                    return false; // exclude private options
79
+                }
80
+                if (typeof metadataOption.default !== 'undefined' && metadataOption.default === options[optionName]) {
81
+                    return false; // exclude options that match their default value (means it wasn't supplied by user)
82
+                }
83
+                return true;
84
+            })
85
+                .reduce((allOptions, optionName) => {
86
+                allOptions[optionName] = options[optionName];
87
+                return allOptions;
88
+            }, initialOptions);
89
+            const optionInputs = command_1.minimistOptionsToArray(filteredOptions, { useDoubleQuotes: true });
90
+            return filteredInputs.concat(optionInputs);
91
+        });
92
+    }
93
+}
94
+exports.Command = Command;

+ 33
- 0
node_modules/@ionic/cli-utils/lib/config.d.ts Vedi File

@@ -0,0 +1,33 @@
1
+import * as minimistType from 'minimist';
2
+import { ConfigFile, IBaseConfig, IConfig, IonicEnvironment } from '../definitions';
3
+export declare abstract class BaseConfig<T> implements IBaseConfig<T> {
4
+    fileName: string;
5
+    directory: string;
6
+    filePath: string;
7
+    protected configFile?: T;
8
+    protected originalConfigFile?: {
9
+        [key: string]: any;
10
+    };
11
+    constructor(directory: string, fileName: string);
12
+    abstract provideDefaults(o: {
13
+        [key: string]: any;
14
+    }): Promise<T>;
15
+    abstract is(o: any): o is T;
16
+    prepare(): Promise<void>;
17
+    load(options?: {
18
+        disk?: boolean;
19
+    }): Promise<T>;
20
+    save(configFile?: T): Promise<void>;
21
+}
22
+export declare const CONFIG_FILE = "config.json";
23
+export declare const DEFAULT_CONFIG_DIRECTORY: string;
24
+export declare class Config extends BaseConfig<ConfigFile> implements IConfig {
25
+    provideDefaults(o: any): Promise<ConfigFile>;
26
+    is(j: any): j is ConfigFile;
27
+    isUpdatingEnabled(): Promise<boolean>;
28
+    getAPIUrl(): Promise<string>;
29
+    getDashUrl(): Promise<string>;
30
+    getGitHost(): Promise<string>;
31
+    getGitPort(): Promise<number>;
32
+}
33
+export declare function gatherFlags(argv: minimistType.ParsedArgs): IonicEnvironment['flags'];

+ 263
- 0
node_modules/@ionic/cli-utils/lib/config.js Vedi File

@@ -0,0 +1,263 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const path = require("path");
5
+const os = require("os");
6
+const chalk_1 = require("chalk");
7
+const backends_1 = require("./backends");
8
+const errors_1 = require("./errors");
9
+const format_1 = require("./utils/format");
10
+const fs_1 = require("@ionic/cli-framework/utils/fs");
11
+class BaseConfig {
12
+    constructor(directory, fileName) {
13
+        this.fileName = fileName;
14
+        // TODO: better way to check if in project
15
+        if (directory) {
16
+            this.directory = path.resolve(directory);
17
+        }
18
+        else {
19
+            this.directory = '';
20
+        }
21
+        this.filePath = path.resolve(this.directory, fileName);
22
+    }
23
+    prepare() {
24
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
25
+            try {
26
+                const stats = yield fs_1.fsStat(this.directory);
27
+                if (!stats.isDirectory()) {
28
+                    throw new errors_1.FatalException(`${chalk_1.default.bold(this.directory)} appears to be a file, but it must be a directory.`);
29
+                }
30
+            }
31
+            catch (e) {
32
+                if (e.code !== 'ENOENT') {
33
+                    throw e;
34
+                }
35
+                yield fs_1.fsMkdirp(this.directory);
36
+            }
37
+        });
38
+    }
39
+    load(options = {}) {
40
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
41
+            if (options.disk || !this.configFile) {
42
+                let o;
43
+                try {
44
+                    const stats = yield fs_1.fsStat(this.filePath);
45
+                    if (stats.size < 5) {
46
+                        o = {};
47
+                    }
48
+                }
49
+                catch (e) {
50
+                    if (e.code !== 'ENOENT') {
51
+                        throw e;
52
+                    }
53
+                    o = {};
54
+                }
55
+                if (typeof o === 'undefined') {
56
+                    try {
57
+                        o = yield fs_1.fsReadJsonFile(this.filePath);
58
+                    }
59
+                    catch (e) {
60
+                        if (e === fs_1.ERROR_FILE_INVALID_JSON) {
61
+                            throw new errors_1.FatalException(`The config file (${chalk_1.default.bold(format_1.prettyPath(this.filePath))}) is not valid JSON format.\n\n` +
62
+                                `Please fix any JSON errors in the file.`);
63
+                        }
64
+                        else {
65
+                            throw e;
66
+                        }
67
+                    }
68
+                }
69
+                const cloneDeep = yield Promise.resolve().then(() => require('lodash/cloneDeep'));
70
+                this.originalConfigFile = cloneDeep(o);
71
+                o = yield this.provideDefaults(o);
72
+                if (this.is(o)) {
73
+                    this.configFile = o;
74
+                }
75
+                else {
76
+                    throw new errors_1.FatalException(`The config file (${chalk_1.default.bold(format_1.prettyPath(this.filePath))}) has an unrecognized JSON format.\n\n` +
77
+                        `This usually means a key had an unexpected value. Please look through it and fix any issues.\n` +
78
+                        `If all else fails--the CLI will recreate the file if you delete it.`);
79
+                }
80
+            }
81
+            return this.configFile;
82
+        });
83
+    }
84
+    save(configFile) {
85
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
86
+            if (!configFile) {
87
+                configFile = this.configFile;
88
+            }
89
+            if (configFile) {
90
+                const [isEqual, cloneDeep] = yield Promise.all([Promise.resolve().then(() => require('lodash/isEqual')), Promise.resolve().then(() => require('lodash/cloneDeep'))]);
91
+                if (!isEqual(configFile, this.originalConfigFile)) {
92
+                    yield fs_1.fsWriteJsonFile(this.filePath, configFile, { encoding: 'utf8' });
93
+                    this.configFile = configFile;
94
+                    this.originalConfigFile = cloneDeep(configFile);
95
+                }
96
+            }
97
+        });
98
+    }
99
+}
100
+exports.BaseConfig = BaseConfig;
101
+exports.CONFIG_FILE = 'config.json';
102
+exports.DEFAULT_CONFIG_DIRECTORY = path.resolve(os.homedir(), '.ionic');
103
+class Config extends BaseConfig {
104
+    provideDefaults(o) {
105
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
106
+            const cloneDeep = yield Promise.resolve().then(() => require('lodash/cloneDeep'));
107
+            const results = cloneDeep(o);
108
+            if (!results.state) {
109
+                results.state = {};
110
+            }
111
+            if (!results.state.doctor) {
112
+                results.state.doctor = {};
113
+            }
114
+            if (typeof results.state.doctor.ignored === 'undefined') {
115
+                results.state.doctor.ignored = [];
116
+            }
117
+            if (!results.state.lastCommand) {
118
+                if (results.lastCommand) {
119
+                    results.state.lastCommand = results.lastCommand;
120
+                }
121
+                else {
122
+                    results.state.lastCommand = new Date().toISOString();
123
+                }
124
+            }
125
+            if (!results.created) {
126
+                results.created = new Date().toISOString();
127
+            }
128
+            if (!results.daemon) {
129
+                results.daemon = {};
130
+            }
131
+            if (typeof results.daemon.updates === 'undefined') {
132
+                results.daemon.updates = true;
133
+            }
134
+            if (!results.devapp) {
135
+                results.devapp = {};
136
+            }
137
+            if (!results.devapp.knownInterfaces) {
138
+                results.devapp.knownInterfaces = [];
139
+            }
140
+            if (!results.addresses) {
141
+                results.addresses = {};
142
+            }
143
+            if (!results.git) {
144
+                results.git = {};
145
+            }
146
+            if (!results.user) {
147
+                results.user = {};
148
+            }
149
+            if (typeof results.user.id === 'string') {
150
+                results.user.id = Number(results.user.id);
151
+            }
152
+            if (!results.tokens) {
153
+                results.tokens = {};
154
+            }
155
+            if (!results.tokens.appUser) {
156
+                results.tokens.appUser = {};
157
+            }
158
+            if (typeof results.backend !== 'string') {
159
+                results.backend = backends_1.BACKEND_PRO;
160
+            }
161
+            if (typeof results.telemetry === 'undefined') {
162
+                if (results.cliFlags && typeof results.cliFlags.enableTelemetry !== 'undefined') {
163
+                    results.telemetry = results.cliFlags.enableTelemetry;
164
+                }
165
+                else if (results.cliFlags && typeof results.cliFlags.telemetry !== 'undefined') {
166
+                    results.telemetry = results.cliFlags.telemetry;
167
+                }
168
+                else {
169
+                    results.telemetry = true;
170
+                }
171
+            }
172
+            if (typeof results.yarn === 'undefined') {
173
+                if (results.cliFlags && typeof results.cliFlags.yarn !== 'undefined') {
174
+                    results.yarn = results.cliFlags.yarn;
175
+                }
176
+                else {
177
+                    results.yarn = false;
178
+                }
179
+            }
180
+            delete results.lastCommand;
181
+            delete results.lastUpdated;
182
+            delete results.cliFlags;
183
+            delete results.urls;
184
+            delete results.git.host;
185
+            delete results.git.port;
186
+            return results;
187
+        });
188
+    }
189
+    is(j) {
190
+        return j
191
+            && typeof j.addresses === 'object'
192
+            && typeof j.state === 'object'
193
+            && typeof j.state.lastCommand === 'string'
194
+            && typeof j.state.doctor === 'object'
195
+            && typeof j.daemon === 'object'
196
+            && typeof j.devapp === 'object'
197
+            && typeof j.user === 'object'
198
+            && typeof j.tokens === 'object'
199
+            && typeof j.tokens.appUser === 'object'
200
+            && typeof j.backend === 'string'
201
+            && typeof j.telemetry === 'boolean'
202
+            && typeof j.yarn === 'boolean';
203
+    }
204
+    isUpdatingEnabled() {
205
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
206
+            const config = yield this.load();
207
+            if (!config.daemon.updates) {
208
+                return false;
209
+            }
210
+            return !config.state.lastNoResponseToUpdate || (new Date().getTime() - new Date(config.state.lastNoResponseToUpdate).getTime() > 86400000);
211
+        });
212
+    }
213
+    getAPIUrl() {
214
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
215
+            const config = yield this.load();
216
+            if (config.addresses.apiUrl) {
217
+                return config.addresses.apiUrl;
218
+            }
219
+            if (config.backend === 'legacy') {
220
+                return 'https://api.ionic.io';
221
+            }
222
+            return 'https://api.ionicjs.com';
223
+        });
224
+    }
225
+    getDashUrl() {
226
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
227
+            const config = yield this.load();
228
+            if (config.addresses.dashUrl) {
229
+                return config.addresses.dashUrl;
230
+            }
231
+            if (config.backend === 'legacy') {
232
+                return 'https://apps.ionic.io';
233
+            }
234
+            return 'https://dashboard.ionicjs.com';
235
+        });
236
+    }
237
+    getGitHost() {
238
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
239
+            const config = yield this.load();
240
+            if (config.addresses.gitHost) {
241
+                return config.addresses.gitHost;
242
+            }
243
+            return 'git.ionicjs.com';
244
+        });
245
+    }
246
+    getGitPort() {
247
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
248
+            const config = yield this.load();
249
+            if (config.addresses.gitPort) {
250
+                return config.addresses.gitPort;
251
+            }
252
+            return 22;
253
+        });
254
+    }
255
+}
256
+exports.Config = Config;
257
+function gatherFlags(argv) {
258
+    return {
259
+        interactive: typeof argv['interactive'] === 'undefined' ? true : argv['interactive'],
260
+        confirm: typeof argv['confirm'] === 'undefined' ? false : argv['confirm'],
261
+    };
262
+}
263
+exports.gatherFlags = gatherFlags;

+ 41
- 0
node_modules/@ionic/cli-utils/lib/cordova/config.d.ts Vedi File

@@ -0,0 +1,41 @@
1
+import * as et from 'elementtree';
2
+import { ResourcesPlatform } from '../../definitions';
3
+export interface PlatformEngine {
4
+    name: string;
5
+    spec: string;
6
+    [key: string]: string;
7
+}
8
+export declare class ConfigXml {
9
+    protected _filePath?: string;
10
+    protected _doc?: et.ElementTree;
11
+    protected saving: boolean;
12
+    readonly doc: et.ElementTree;
13
+    readonly filePath: string;
14
+    static load(projectDir: string): Promise<ConfigXml>;
15
+    save(): Promise<void>;
16
+    saveSync(): void;
17
+    setName(name: string): void;
18
+    setBundleId(bundleId: string): void;
19
+    getBundleId(): string | undefined;
20
+    /**
21
+     * Update config.xml content src to be a dev server url. As part of this
22
+     * backup the original content src for a reset to occur at a later time.
23
+     */
24
+    writeContentSrc(newSrc: string): void;
25
+    /**
26
+     * Set config.xml src url back to its original url
27
+     */
28
+    resetContentSrc(): void;
29
+    getPreference(prefName: string): string | undefined;
30
+    getProjectInfo(): {
31
+        id: string;
32
+        name: string;
33
+        version: string;
34
+    };
35
+    getPlatformEngines(): PlatformEngine[];
36
+    getPlatformEngine(platform: string): PlatformEngine | undefined;
37
+    ensurePlatformImages(platform: string, resourcesPlatform: ResourcesPlatform): Promise<void>;
38
+    ensureSplashScreenPreferences(): Promise<void>;
39
+    protected write(): string;
40
+    protected engineElementToPlatformEngine(engine: et.IElement): PlatformEngine;
41
+}

+ 211
- 0
node_modules/@ionic/cli-utils/lib/cordova/config.js Vedi File

@@ -0,0 +1,211 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const fs = require("fs");
5
+const path = require("path");
6
+const et = require("elementtree");
7
+const fs_1 = require("@ionic/cli-framework/utils/fs");
8
+class ConfigXml {
9
+    constructor() {
10
+        this.saving = false;
11
+    }
12
+    get doc() {
13
+        if (!this._doc) {
14
+            throw new Error('No doc loaded. Call load() properly.');
15
+        }
16
+        return this._doc;
17
+    }
18
+    get filePath() {
19
+        if (!this._filePath) {
20
+            throw new Error('No file path given. Call load() properly.');
21
+        }
22
+        return this._filePath;
23
+    }
24
+    static load(projectDir) {
25
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
26
+            if (!projectDir) {
27
+                throw new Error('Must supply project directory.');
28
+            }
29
+            const conf = new ConfigXml();
30
+            conf._filePath = path.join(projectDir, 'config.xml');
31
+            const configFileContents = yield fs_1.fsReadFile(conf.filePath, { encoding: 'utf8' });
32
+            if (!configFileContents) {
33
+                throw new Error(`Cannot load empty config.xml file.`);
34
+            }
35
+            conf._doc = et.parse(configFileContents);
36
+            return conf;
37
+        });
38
+    }
39
+    save() {
40
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
41
+            if (!this.saving) {
42
+                this.saving = true;
43
+                yield fs_1.fsWriteFile(this.filePath, this.write(), { encoding: 'utf8' });
44
+                this.saving = false;
45
+            }
46
+        });
47
+    }
48
+    saveSync() {
49
+        if (!this.saving) {
50
+            this.saving = true;
51
+            fs.writeFileSync(this.filePath, this.write(), { encoding: 'utf8' });
52
+            this.saving = false;
53
+        }
54
+    }
55
+    setName(name) {
56
+        const root = this.doc.getroot();
57
+        let nameNode = root.find('name');
58
+        if (!nameNode) {
59
+            nameNode = et.SubElement(root, 'name', {});
60
+        }
61
+        nameNode.text = name;
62
+    }
63
+    setBundleId(bundleId) {
64
+        const root = this.doc.getroot();
65
+        root.set('id', bundleId);
66
+    }
67
+    getBundleId() {
68
+        const root = this.doc.getroot();
69
+        return root.get('id');
70
+    }
71
+    /**
72
+     * Update config.xml content src to be a dev server url. As part of this
73
+     * backup the original content src for a reset to occur at a later time.
74
+     */
75
+    writeContentSrc(newSrc) {
76
+        const root = this.doc.getroot();
77
+        let contentElement = root.find('content');
78
+        if (!contentElement) {
79
+            contentElement = et.SubElement(root, 'content', { src: 'index.html' });
80
+        }
81
+        contentElement.set('original-src', contentElement.get('src'));
82
+        contentElement.set('src', newSrc);
83
+        let navElement = root.find(`allow-navigation[@href='${newSrc}']`);
84
+        if (!navElement) {
85
+            navElement = et.SubElement(root, 'allow-navigation', { href: newSrc });
86
+        }
87
+    }
88
+    /**
89
+     * Set config.xml src url back to its original url
90
+     */
91
+    resetContentSrc() {
92
+        const root = this.doc.getroot();
93
+        let contentElement = root.find('content');
94
+        if (!contentElement) {
95
+            contentElement = et.SubElement(root, 'content', { src: 'index.html' });
96
+        }
97
+        const originalSrc = contentElement.get('original-src');
98
+        if (originalSrc) {
99
+            contentElement.set('src', originalSrc);
100
+            delete contentElement.attrib['original-src'];
101
+        }
102
+    }
103
+    getPreference(prefName) {
104
+        const root = this.doc.getroot();
105
+        const preferenceElement = root.find(`preference[@name='${prefName}']`);
106
+        if (!preferenceElement) {
107
+            return undefined;
108
+        }
109
+        const value = preferenceElement.get('value');
110
+        if (!value) {
111
+            return undefined;
112
+        }
113
+        return value;
114
+    }
115
+    getProjectInfo() {
116
+        const root = this.doc.getroot();
117
+        let id = root.get('id');
118
+        if (!id) {
119
+            id = '';
120
+        }
121
+        let version = root.get('version');
122
+        if (!version) {
123
+            version = '';
124
+        }
125
+        let nameElement = root.find('name');
126
+        if (!nameElement) {
127
+            nameElement = et.SubElement(root, 'name', {});
128
+        }
129
+        if (!nameElement.text) {
130
+            nameElement.text = 'MyApp';
131
+        }
132
+        const name = nameElement.text;
133
+        return { id, name, version };
134
+    }
135
+    getPlatformEngines() {
136
+        const root = this.doc.getroot();
137
+        const engines = root.findall('engine');
138
+        return engines.map(engine => this.engineElementToPlatformEngine(engine));
139
+    }
140
+    getPlatformEngine(platform) {
141
+        const root = this.doc.getroot();
142
+        const engine = root.find(`engine[@name='${platform}']`);
143
+        if (!engine) {
144
+            return undefined;
145
+        }
146
+        return this.engineElementToPlatformEngine(engine);
147
+    }
148
+    ensurePlatformImages(platform, resourcesPlatform) {
149
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
150
+            const root = this.doc.getroot();
151
+            const orientation = this.getPreference('Orientation') || 'default';
152
+            for (let imgName in resourcesPlatform) {
153
+                const imgType = resourcesPlatform[imgName];
154
+                let platformElement = root.find(`platform[@name='${platform}']`);
155
+                if (!platformElement) {
156
+                    platformElement = et.SubElement(root, 'platform', { name: platform });
157
+                }
158
+                const images = imgType.images.filter(img => orientation === 'default' || typeof img.orientation === 'undefined' || img.orientation === orientation);
159
+                for (let image of images) {
160
+                    // We use forward slashes, (not path.join) here to provide
161
+                    // cross-platform compatibility for paths.
162
+                    const imgPath = ['resources', platform, imgType.nodeName, image.name].join('/'); // TODO: hard-coded 'resources' dir
163
+                    let imgElement = platformElement.find(`${imgType.nodeName}[@src='${imgPath}']`);
164
+                    if (!imgElement) {
165
+                        imgElement = platformElement.find(`${imgType.nodeName}[@src='${imgPath.split('/').join('\\')}']`);
166
+                    }
167
+                    if (!imgElement) {
168
+                        const attrs = {};
169
+                        for (let attr of imgType.nodeAttributes) {
170
+                            let v = image[attr]; // TODO
171
+                            if (attr === 'src') {
172
+                                v = imgPath;
173
+                            }
174
+                            attrs[attr] = v;
175
+                        }
176
+                        imgElement = et.SubElement(platformElement, imgType.nodeName, attrs);
177
+                    }
178
+                    imgElement.set('src', imgPath);
179
+                }
180
+            }
181
+        });
182
+    }
183
+    ensureSplashScreenPreferences() {
184
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
185
+            const root = this.doc.getroot();
186
+            let splashScreenPrefElement = root.find(`preference[@name='SplashScreen']`);
187
+            if (!splashScreenPrefElement) {
188
+                splashScreenPrefElement = et.SubElement(root, 'preference', { name: 'SplashScreen', value: 'screen' });
189
+            }
190
+            let splashShowOnlyFirstTimePrefElement = root.find(`preference[@name='SplashShowOnlyFirstTime']`);
191
+            if (!splashShowOnlyFirstTimePrefElement) {
192
+                splashShowOnlyFirstTimePrefElement = et.SubElement(root, 'preference', { name: 'SplashShowOnlyFirstTime', value: 'false' });
193
+            }
194
+            let splashScreenDelayPrefElement = root.find(`preference[@name='SplashScreenDelay']`);
195
+            if (!splashScreenDelayPrefElement) {
196
+                splashScreenDelayPrefElement = et.SubElement(root, 'preference', { name: 'SplashScreenDelay', value: '3000' });
197
+            }
198
+        });
199
+    }
200
+    write() {
201
+        // Cordova hard codes an indentation of 4 spaces, so we'll follow.
202
+        const contents = this.doc.write({ indent: 4 });
203
+        return contents;
204
+    }
205
+    engineElementToPlatformEngine(engine) {
206
+        const name = engine.get('name');
207
+        const spec = engine.get('spec');
208
+        return Object.assign({ name: name ? name : '', spec: spec ? spec : '' }, engine.attrib);
209
+    }
210
+}
211
+exports.ConfigXml = ConfigXml;

+ 3
- 0
node_modules/@ionic/cli-utils/lib/cordova/project.d.ts Vedi File

@@ -0,0 +1,3 @@
1
+import { IonicEnvironment } from '../../definitions';
2
+export declare function getPlatforms(projectDir: string): Promise<string[]>;
3
+export declare function installPlatform(env: IonicEnvironment, platform: string): Promise<void>;

+ 33
- 0
node_modules/@ionic/cli-utils/lib/cordova/project.js Vedi File

@@ -0,0 +1,33 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const path = require("path");
5
+const chalk_1 = require("chalk");
6
+const errors_1 = require("../errors");
7
+const fs_1 = require("@ionic/cli-framework/utils/fs");
8
+function getPlatforms(projectDir) {
9
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
10
+        const platformsDir = path.resolve(projectDir, 'platforms');
11
+        const dirContents = yield fs_1.readDir(platformsDir);
12
+        return dirContents.filter(f => f && f !== 'platforms.json' && !f.startsWith('.'));
13
+    });
14
+}
15
+exports.getPlatforms = getPlatforms;
16
+function installPlatform(env, platform) {
17
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
18
+        try {
19
+            yield env.shell.run('cordova', ['platform', 'add', platform, '--save'], { fatalOnError: false, showError: false, showExecution: true });
20
+        }
21
+        catch (e) {
22
+            const s = String(e);
23
+            if (s.match(/Platform [A-Za-z0-9-]+ already added/)) {
24
+                env.log.warn(`Platform already added. Saving platforms to ${chalk_1.default.bold('config.xml')}.`);
25
+                yield env.shell.run('cordova', ['platform', 'save'], {});
26
+            }
27
+            else {
28
+                throw new errors_1.FatalException(s, typeof e.exitCode === 'undefined' ? 1 : e.exitCode);
29
+            }
30
+        }
31
+    });
32
+}
33
+exports.installPlatform = installPlatform;

+ 30
- 0
node_modules/@ionic/cli-utils/lib/cordova/resources.d.ts Vedi File

@@ -0,0 +1,30 @@
1
+import { ImageResource, ImageUploadResponse, IonicEnvironment, KnownPlatform, ResourcesConfig, SourceImage } from '../../definitions';
2
+import { ConfigXml } from './config';
3
+export declare function getImageResources(env: IonicEnvironment): Promise<ImageResource[]>;
4
+/**
5
+ * Create the destination directories for the provided image resources.
6
+ */
7
+export declare function createImgDestinationDirectories(imgResources: ImageResource[]): Promise<void[]>;
8
+/**
9
+ * Find all source images within the resources directory
10
+ */
11
+export declare function getSourceImages(env: IonicEnvironment, buildPlatforms: string[], resourceTypes: string[]): Promise<SourceImage[]>;
12
+/**
13
+ * Find the source image that matches the requirements of the image resource provided.
14
+ */
15
+export declare function findMostSpecificImage(imageResource: ImageResource, srcImagesAvailable: SourceImage[]): SourceImage | null;
16
+/**
17
+ * Upload the provided source image through the resources web service. This will make it available
18
+ * for transforms for the next 5 minutes.
19
+ */
20
+export declare function uploadSourceImages(env: IonicEnvironment, srcImages: SourceImage[]): Promise<ImageUploadResponse[]>;
21
+/**
22
+ * Using the transformation web service transform the provided image resource
23
+ * into the appropriate w x h and then write this file to the provided destination directory.
24
+ */
25
+export declare function transformResourceImage(env: IonicEnvironment, imageResource: ImageResource): Promise<void>;
26
+/**
27
+ * Add image resource references for the provided platforms to the project's config.xml file.
28
+ */
29
+export declare function addResourcesToConfigXml(conf: ConfigXml, platformList: KnownPlatform[], resourceJson: ResourcesConfig): Promise<void>;
30
+export declare const RESOURCES: ResourcesConfig;

+ 275
- 0
node_modules/@ionic/cli-utils/lib/cordova/resources.js Vedi File

@@ -0,0 +1,275 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const path = require("path");
5
+const fs_1 = require("@ionic/cli-framework/utils/fs");
6
+const http_1 = require("../http");
7
+const SUPPORTED_SOURCE_EXTENSIONS = ['.psd', '.ai', '.png'];
8
+const UPLOAD_URL = 'https://res.ionic.io/api/v1/upload';
9
+const TRANSFORM_URL = 'https://res.ionic.io/api/v1/transform';
10
+function getImageResources(env) {
11
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
12
+        const images = [];
13
+        for (let platform in exports.RESOURCES) {
14
+            const platformConfig = exports.RESOURCES[platform];
15
+            for (let imageType in platformConfig) {
16
+                const imageTypeConfig = platformConfig[imageType];
17
+                for (let image of imageTypeConfig.images) {
18
+                    images.push({
19
+                        platform,
20
+                        resType: imageType,
21
+                        dest: path.resolve(env.project.directory, 'resources', platform, imageType, image.name),
22
+                        name: image.name,
23
+                        width: image.width,
24
+                        height: image.height,
25
+                        density: image.density,
26
+                        orientation: image.orientation,
27
+                        nodeName: imageTypeConfig.nodeName,
28
+                        nodeAttributes: imageTypeConfig.nodeAttributes,
29
+                    });
30
+                }
31
+            }
32
+        }
33
+        return images;
34
+    });
35
+}
36
+exports.getImageResources = getImageResources;
37
+/**
38
+ * Create the destination directories for the provided image resources.
39
+ */
40
+function createImgDestinationDirectories(imgResources) {
41
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
42
+        const buildDirPromises = imgResources
43
+            .map(img => path.dirname(img.dest))
44
+            .filter((dir, i, dirNames) => dirNames.indexOf(dir) === i)
45
+            .map(dir => fs_1.fsMkdirp(dir));
46
+        return Promise.all(buildDirPromises);
47
+    });
48
+}
49
+exports.createImgDestinationDirectories = createImgDestinationDirectories;
50
+/**
51
+ * Find all source images within the resources directory
52
+ */
53
+function getSourceImages(env, buildPlatforms, resourceTypes) {
54
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
55
+        const resourceDir = path.resolve(env.project.directory, 'resources'); // TODO: hard-coded
56
+        const srcDirList = buildPlatforms
57
+            .map(platform => ({ platform, path: path.resolve(resourceDir, platform) }))
58
+            .concat({ platform: 'global', path: resourceDir });
59
+        const sourceImages = [];
60
+        for (let srcImgDir of srcDirList) {
61
+            const srcImageDirContents = yield fs_1.readDir(srcImgDir.path);
62
+            for (let srcImage of srcImageDirContents) {
63
+                const ext = path.extname(srcImage);
64
+                const resType = path.basename(srcImage, ext);
65
+                if (SUPPORTED_SOURCE_EXTENSIONS.includes(ext) && resourceTypes.includes(resType)) {
66
+                    sourceImages.push({
67
+                        ext,
68
+                        resType,
69
+                        platform: srcImgDir.platform,
70
+                        path: path.join(srcImgDir.path, srcImage),
71
+                        vector: false,
72
+                        height: 0,
73
+                        width: 0,
74
+                    });
75
+                }
76
+            }
77
+        }
78
+        const sourceImageChecksums = yield Promise.all(sourceImages.map((img) => tslib_1.__awaiter(this, void 0, void 0, function* () {
79
+            const [md5, cachedMd5] = yield fs_1.getFileChecksums(img.path);
80
+            if (cachedMd5) {
81
+                img.cachedId = cachedMd5;
82
+            }
83
+            return md5;
84
+        })));
85
+        return sourceImages.map((img, i) => (Object.assign({}, img, { imageId: sourceImageChecksums[i] })));
86
+    });
87
+}
88
+exports.getSourceImages = getSourceImages;
89
+/**
90
+ * Find the source image that matches the requirements of the image resource provided.
91
+ */
92
+function findMostSpecificImage(imageResource, srcImagesAvailable) {
93
+    return srcImagesAvailable.reduce((mostSpecificImage, sourceImage) => {
94
+        if (sourceImage.platform === imageResource.platform && sourceImage.resType === imageResource.resType) {
95
+            return sourceImage;
96
+        }
97
+        if (sourceImage.platform === 'global' && sourceImage.resType === imageResource.resType && !mostSpecificImage) {
98
+            return sourceImage;
99
+        }
100
+        return mostSpecificImage;
101
+    }, null);
102
+}
103
+exports.findMostSpecificImage = findMostSpecificImage;
104
+/**
105
+ * Upload the provided source image through the resources web service. This will make it available
106
+ * for transforms for the next 5 minutes.
107
+ */
108
+function uploadSourceImages(env, srcImages) {
109
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
110
+        return Promise.all(srcImages.map((srcImage) => tslib_1.__awaiter(this, void 0, void 0, function* () {
111
+            let { req } = yield http_1.createRequest(env.config, 'POST', UPLOAD_URL);
112
+            req = req
113
+                .type('form')
114
+                .attach('src', srcImage.path)
115
+                .field('image_id', srcImage.imageId || '');
116
+            const res = yield req;
117
+            return res.body;
118
+        })));
119
+    });
120
+}
121
+exports.uploadSourceImages = uploadSourceImages;
122
+/**
123
+ * Using the transformation web service transform the provided image resource
124
+ * into the appropriate w x h and then write this file to the provided destination directory.
125
+ */
126
+function transformResourceImage(env, imageResource) {
127
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
128
+        let { req } = yield http_1.createRequest(env.config, 'POST', TRANSFORM_URL);
129
+        return new Promise((resolve, reject) => {
130
+            req = req
131
+                .type('form')
132
+                .send({
133
+                'name': imageResource.name,
134
+                'image_id': imageResource.imageId,
135
+                'width': imageResource.width,
136
+                'height': imageResource.height,
137
+                'res_type': imageResource.resType,
138
+                'crop': 'center',
139
+                'encoding': 'png',
140
+            })
141
+                .on('response', (res) => {
142
+                if (res.statusCode !== 200) {
143
+                    let bufs = [];
144
+                    res.on('data', (chunk) => {
145
+                        bufs.push(chunk);
146
+                    });
147
+                    res.on('end', () => {
148
+                        const buf = Buffer.concat(bufs);
149
+                        const body = buf.toString();
150
+                        reject(new Error(`encountered bad status code (${res.statusCode}) for ${TRANSFORM_URL}\nbody: ${body}`));
151
+                    });
152
+                }
153
+            })
154
+                .on('error', (err) => {
155
+                if (err.code === 'ECONNABORTED') {
156
+                    reject(new Error(`timeout of ${err.timeout}ms reached for ${TRANSFORM_URL}`));
157
+                }
158
+                else {
159
+                    reject(err);
160
+                }
161
+            });
162
+            fs_1.writeStreamToFile(req, imageResource.dest).then(resolve, reject);
163
+        });
164
+    });
165
+}
166
+exports.transformResourceImage = transformResourceImage;
167
+/**
168
+ * Add image resource references for the provided platforms to the project's config.xml file.
169
+ */
170
+function addResourcesToConfigXml(conf, platformList, resourceJson) {
171
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
172
+        for (let platform of platformList) {
173
+            yield conf.ensurePlatformImages(platform, resourceJson[platform]);
174
+        }
175
+        yield conf.ensureSplashScreenPreferences();
176
+    });
177
+}
178
+exports.addResourcesToConfigXml = addResourcesToConfigXml;
179
+exports.RESOURCES = {
180
+    android: {
181
+        icon: {
182
+            images: [
183
+                { name: 'drawable-ldpi-icon.png', width: 36, height: 36, density: 'ldpi' },
184
+                { name: 'drawable-mdpi-icon.png', width: 48, height: 48, density: 'mdpi' },
185
+                { name: 'drawable-hdpi-icon.png', width: 72, height: 72, density: 'hdpi' },
186
+                { name: 'drawable-xhdpi-icon.png', width: 96, height: 96, density: 'xhdpi' },
187
+                { name: 'drawable-xxhdpi-icon.png', width: 144, height: 144, density: 'xxhdpi' },
188
+                { name: 'drawable-xxxhdpi-icon.png', width: 192, height: 192, density: 'xxxhdpi' },
189
+            ],
190
+            nodeName: 'icon',
191
+            nodeAttributes: ['src', 'density'],
192
+        },
193
+        splash: {
194
+            images: [
195
+                { name: 'drawable-land-ldpi-screen.png', width: 320, height: 240, density: 'land-ldpi', orientation: 'landscape' },
196
+                { name: 'drawable-land-mdpi-screen.png', width: 480, height: 320, density: 'land-mdpi', orientation: 'landscape' },
197
+                { name: 'drawable-land-hdpi-screen.png', width: 800, height: 480, density: 'land-hdpi', orientation: 'landscape' },
198
+                { name: 'drawable-land-xhdpi-screen.png', width: 1280, height: 720, density: 'land-xhdpi', orientation: 'landscape' },
199
+                { name: 'drawable-land-xxhdpi-screen.png', width: 1600, height: 960, density: 'land-xxhdpi', orientation: 'landscape' },
200
+                { name: 'drawable-land-xxxhdpi-screen.png', width: 1920, height: 1280, density: 'land-xxxhdpi', orientation: 'landscape' },
201
+                { name: 'drawable-port-ldpi-screen.png', width: 240, height: 320, density: 'port-ldpi', orientation: 'portrait' },
202
+                { name: 'drawable-port-mdpi-screen.png', width: 320, height: 480, density: 'port-mdpi', orientation: 'portrait' },
203
+                { name: 'drawable-port-hdpi-screen.png', width: 480, height: 800, density: 'port-hdpi', orientation: 'portrait' },
204
+                { name: 'drawable-port-xhdpi-screen.png', width: 720, height: 1280, density: 'port-xhdpi', orientation: 'portrait' },
205
+                { name: 'drawable-port-xxhdpi-screen.png', width: 960, height: 1600, density: 'port-xxhdpi', orientation: 'portrait' },
206
+                { name: 'drawable-port-xxxhdpi-screen.png', width: 1280, height: 1920, density: 'port-xxxhdpi', orientation: 'portrait' },
207
+            ],
208
+            nodeName: 'splash',
209
+            nodeAttributes: ['src', 'density'],
210
+        }
211
+    },
212
+    ios: {
213
+        icon: {
214
+            images: [
215
+                { name: 'icon.png', width: 57, height: 57 },
216
+                { name: 'icon@2x.png', width: 114, height: 114 },
217
+                { name: 'icon-40.png', width: 40, height: 40 },
218
+                { name: 'icon-40@2x.png', width: 80, height: 80 },
219
+                { name: 'icon-40@3x.png', width: 120, height: 120 },
220
+                { name: 'icon-50.png', width: 50, height: 50 },
221
+                { name: 'icon-50@2x.png', width: 100, height: 100 },
222
+                { name: 'icon-60.png', width: 60, height: 60 },
223
+                { name: 'icon-60@2x.png', width: 120, height: 120 },
224
+                { name: 'icon-60@3x.png', width: 180, height: 180 },
225
+                { name: 'icon-72.png', width: 72, height: 72 },
226
+                { name: 'icon-72@2x.png', width: 144, height: 144 },
227
+                { name: 'icon-76.png', width: 76, height: 76 },
228
+                { name: 'icon-76@2x.png', width: 152, height: 152 },
229
+                { name: 'icon-83.5@2x.png', width: 167, height: 167 },
230
+                { name: 'icon-small.png', width: 29, height: 29 },
231
+                { name: 'icon-small@2x.png', width: 58, height: 58 },
232
+                { name: 'icon-small@3x.png', width: 87, height: 87 },
233
+                { name: 'icon-1024.png', width: 1024, height: 1024 },
234
+            ],
235
+            nodeName: 'icon',
236
+            nodeAttributes: ['src', 'width', 'height'],
237
+        },
238
+        splash: {
239
+            images: [
240
+                { name: 'Default-568h@2x~iphone.png', width: 640, height: 1136, orientation: 'portrait' },
241
+                { name: 'Default-667h.png', width: 750, height: 1334, orientation: 'portrait' },
242
+                { name: 'Default-736h.png', width: 1242, height: 2208, orientation: 'portrait' },
243
+                { name: 'Default-Landscape-736h.png', width: 2208, height: 1242, orientation: 'landscape' },
244
+                { name: 'Default-Landscape@2x~ipad.png', width: 2048, height: 1536, orientation: 'landscape' },
245
+                { name: 'Default-Landscape@~ipadpro.png', width: 2732, height: 2048, orientation: 'landscape' },
246
+                { name: 'Default-Landscape~ipad.png', width: 1024, height: 768, orientation: 'landscape' },
247
+                { name: 'Default-Portrait@2x~ipad.png', width: 1536, height: 2048, orientation: 'portrait' },
248
+                { name: 'Default-Portrait@~ipadpro.png', width: 2048, height: 2732, orientation: 'portrait' },
249
+                { name: 'Default-Portrait~ipad.png', width: 768, height: 1024, orientation: 'portrait' },
250
+                { name: 'Default@2x~iphone.png', width: 640, height: 960, orientation: 'portrait' },
251
+                { name: 'Default~iphone.png', width: 320, height: 480, orientation: 'portrait' },
252
+                { name: 'Default@2x~universal~anyany.png', width: 2732, height: 2732 },
253
+            ],
254
+            nodeName: 'splash',
255
+            nodeAttributes: ['src', 'width', 'height'],
256
+        },
257
+    },
258
+    wp8: {
259
+        icon: {
260
+            images: [
261
+                { name: 'ApplicationIcon.png', width: 99, height: 99 },
262
+                { name: 'Background.png', width: 159, height: 159 },
263
+            ],
264
+            nodeName: 'icon',
265
+            nodeAttributes: ['src', 'width', 'height'],
266
+        },
267
+        splash: {
268
+            images: [
269
+                { name: 'SplashScreenImage.png', width: 768, height: 1280 },
270
+            ],
271
+            nodeName: 'splash',
272
+            nodeAttributes: ['src', 'width', 'height'],
273
+        },
274
+    },
275
+};

+ 13
- 0
node_modules/@ionic/cli-utils/lib/cordova/utils.d.ts Vedi File

@@ -0,0 +1,13 @@
1
+import { CommandData, CommandLineInputs, CommandLineOptions, IonicEnvironment } from '../../definitions';
2
+export declare const CORDOVA_INTENT = "cordova";
3
+/**
4
+ * Filter and gather arguments from command line to be passed to Cordova
5
+ */
6
+export declare function filterArgumentsForCordova(metadata: CommandData, inputs: CommandLineInputs, options: CommandLineOptions): string[];
7
+/**
8
+ * Start the app scripts server for emulator or device
9
+ */
10
+export declare function generateBuildOptions(metadata: CommandData, options: CommandLineOptions): CommandLineOptions;
11
+export declare function getCordovaCLIVersion(env: IonicEnvironment): Promise<string | undefined>;
12
+export declare function getCordovaPlatformVersions(env: IonicEnvironment): Promise<string | undefined>;
13
+export declare function checkCordova(env: IonicEnvironment): Promise<void>;

+ 57
- 0
node_modules/@ionic/cli-utils/lib/cordova/utils.js Vedi File

@@ -0,0 +1,57 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const tslib_1 = require("tslib");
4
+const command_1 = require("../utils/command");
5
+const app_scripts_1 = require("../ionic-angular/app-scripts");
6
+exports.CORDOVA_INTENT = 'cordova';
7
+/**
8
+ * Filter and gather arguments from command line to be passed to Cordova
9
+ */
10
+function filterArgumentsForCordova(metadata, inputs, options) {
11
+    const results = command_1.filterOptionsByIntent(metadata, options, exports.CORDOVA_INTENT);
12
+    const args = command_1.minimistOptionsToArray(results, { useEquals: false, allowCamelCase: true });
13
+    let unparsedCdvArgs = [];
14
+    const indexOfSep = inputs.indexOf('--');
15
+    if (indexOfSep >= 0) {
16
+        unparsedCdvArgs = inputs.splice(indexOfSep);
17
+    }
18
+    return [metadata.name].concat(inputs, args, unparsedCdvArgs);
19
+}
20
+exports.filterArgumentsForCordova = filterArgumentsForCordova;
21
+/**
22
+ * Start the app scripts server for emulator or device
23
+ */
24
+function generateBuildOptions(metadata, options) {
25
+    const results = Object.assign({}, command_1.filterOptionsByIntent(metadata, options), command_1.filterOptionsByIntent(metadata, options, app_scripts_1.APP_SCRIPTS_INTENT));
26
+    // Serve specific options not related to the actual run or emulate code
27
+    return Object.assign({}, results, { externalAddressRequired: true, iscordovaserve: true, nobrowser: true, target: 'cordova' });
28
+}
29
+exports.generateBuildOptions = generateBuildOptions;
30
+function getCordovaCLIVersion(env) {
31
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
32
+        return env.shell.cmdinfo('cordova', ['-v', '--no-telemetry']);
33
+    });
34
+}
35
+exports.getCordovaCLIVersion = getCordovaCLIVersion;
36
+function getCordovaPlatformVersions(env) {
37
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
38
+        let cordovaPlatforms = yield env.shell.cmdinfo('cordova', ['platform', 'ls', '--no-telemetry']);
39
+        if (cordovaPlatforms) {
40
+            cordovaPlatforms = cordovaPlatforms.replace(/\s+/g, ' ');
41
+            cordovaPlatforms = cordovaPlatforms.replace('Installed platforms:', '');
42
+            cordovaPlatforms = cordovaPlatforms.replace(/Available platforms.+/, '');
43
+            cordovaPlatforms = cordovaPlatforms.trim();
44
+        }
45
+        return cordovaPlatforms;
46
+    });
47
+}
48
+exports.getCordovaPlatformVersions = getCordovaPlatformVersions;
49
+function checkCordova(env) {
50
+    return tslib_1.__awaiter(this, void 0, void 0, function* () {
51
+        const project = yield env.project.load();
52
+        if (!project.integrations.cordova) {
53
+            yield env.runCommand(['integrations', 'enable', 'cordova']);
54
+        }
55
+    });
56
+}
57
+exports.checkCordova = checkCordova;

+ 22
- 0
node_modules/@ionic/cli-utils/lib/daemon.d.ts Vedi File

@@ -0,0 +1,22 @@
1
+import * as expressType from 'express';
2
+import { DaemonFile, DistTag, IonicEnvironment } from '../definitions';
3
+import { BaseConfig } from './config';
4
+export declare const DAEMON_PID_FILE = "daemon.pid";
5
+export declare const DAEMON_PORT_FILE = "daemon.port";
6
+export declare const DAEMON_JSON_FILE = "daemon.json";
7
+export declare const DAEMON_LOG_FILE = "daemon.log";
8
+export declare class Daemon extends BaseConfig<DaemonFile> {
9
+    readonly pidFilePath: string;
10
+    readonly portFilePath: string;
11
+    readonly logFilePath: string;
12
+    getPid(): Promise<number | undefined>;
13
+    setPid(pid: number): Promise<void>;
14
+    getPort(): Promise<number | undefined>;
15
+    setPort(port: number): Promise<void>;
16
+    provideDefaults(o: any): Promise<DaemonFile>;
17
+    populateDistTag(distTag: DistTag): void;
18
+    is(j: any): j is DaemonFile;
19
+}
20
+export declare function processRunning(pid: number): boolean;
21
+export declare function checkForDaemon(env: IonicEnvironment): Promise<number>;
22
+export declare function createCommServer(env: IonicEnvironment): Promise<expressType.Application>;

+ 0
- 0
node_modules/@ionic/cli-utils/lib/daemon.js Vedi File


Some files were not shown because too many files changed in this diff