etincidunt 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.prettierignore +2 -0
- package/.travis.yml +29 -0
- package/.vscode/launch.json +24 -0
- package/.vscode/settings.json +3 -0
- package/demos/ago-node-cli/README.md +29 -0
- package/demos/ago-node-cli/ago.js +32 -0
- package/demos/ago-node-cli/index.js +11 -0
- package/demos/ago-node-cli/lib/item-export-command.js +48 -0
- package/demos/ago-node-cli/lib/item-search-command.js +35 -0
- package/demos/ago-node-cli/package-lock.json +172 -0
- package/demos/ago-node-cli/package.json +30 -0
- package/demos/attachments/README.md +5 -0
- package/demos/attachments/index.html +164 -0
- package/demos/attachments/package-lock.json +182 -0
- package/demos/attachments/package.json +18 -0
- package/demos/batch-geocoder-node/NYC_Restaurant_Inspection_Results.csv +100 -0
- package/demos/batch-geocoder-node/README.md +14 -0
- package/demos/batch-geocoder-node/batch-geocode.js +112 -0
- package/demos/batch-geocoder-node/config-template.js +18 -0
- package/demos/batch-geocoder-node/package-lock.json +109 -0
- package/demos/batch-geocoder-node/package.json +37 -0
- package/demos/express/README.md +10 -0
- package/demos/express/config.json.template +3 -0
- package/demos/express/package-lock.json +388 -0
- package/demos/express/package.json +18 -0
- package/demos/express/server.js +28 -0
- package/demos/feature-service-browser/README.md +6 -0
- package/demos/feature-service-browser/index.html +122 -0
- package/demos/feature-service-browser/package-lock.json +182 -0
- package/demos/feature-service-browser/package.json +18 -0
- package/demos/geocoder-browser/README.md +10 -0
- package/demos/geocoder-browser/config.js.template +1 -0
- package/demos/geocoder-browser/index.html +131 -0
- package/demos/geocoder-browser/package-lock.json +163 -0
- package/demos/geocoder-browser/package.json +19 -0
- package/demos/geocoder-browser/post-sign-in.html +25 -0
- package/demos/jsapi-integration/README.md +8 -0
- package/demos/jsapi-integration/config.js +6 -0
- package/demos/jsapi-integration/index.html +79 -0
- package/demos/jsapi-integration/package-lock.json +184 -0
- package/demos/jsapi-integration/package.json +19 -0
- package/demos/oauth2-browser/README.md +12 -0
- package/demos/oauth2-browser/authenticate.html +32 -0
- package/demos/oauth2-browser/config.js.template +6 -0
- package/demos/oauth2-browser/index.html +202 -0
- package/demos/oauth2-browser/logo.svg +4 -0
- package/demos/oauth2-browser/package-lock.json +163 -0
- package/demos/oauth2-browser/package.json +18 -0
- package/demos/oauth2-browser/style.css +36 -0
- package/demos/vue/.babelrc +6 -0
- package/demos/vue/.env.example +8 -0
- package/demos/vue/README.md +17 -0
- package/demos/vue/index.html +21 -0
- package/demos/vue/package-lock.json +7236 -0
- package/demos/vue/package.json +39 -0
- package/demos/vue/src/assets/logo.svg +29 -0
- package/demos/vue/src/components/App.vue +302 -0
- package/demos/vue/src/components/Authenticate.vue +68 -0
- package/demos/vue/src/components/Loader.vue +216 -0
- package/demos/vue/src/main.js +75 -0
- package/demos/vue/webpack.config.js +84 -0
- package/docs/FAQ.md +28 -0
- package/docs/HISTORY.md +62 -0
- package/docs/acetate.config.js +214 -0
- package/docs/build-typedoc.js +301 -0
- package/docs/src/_layout.html +82 -0
- package/docs/src/api/_declaration.html +496 -0
- package/docs/src/api/_layout.html +127 -0
- package/docs/src/api/_package.html +13 -0
- package/docs/src/api/index.html +23 -0
- package/docs/src/guides/_layout.html +24 -0
- package/docs/src/guides/amd-requirejs-dojo.md +40 -0
- package/docs/src/guides/babel-and-rollup.md +30 -0
- package/docs/src/guides/babel-and-webpack.md +30 -0
- package/docs/src/guides/browser-authentication.md +9 -0
- package/docs/src/guides/browserify.md +9 -0
- package/docs/src/guides/cli-authentication.md +9 -0
- package/docs/src/guides/client-server-authentication.md +9 -0
- package/docs/src/guides/from-a-cdn.md +36 -0
- package/docs/src/guides/index.md +52 -0
- package/docs/src/guides/node.md +30 -0
- package/docs/src/guides/package-overview.md +8 -0
- package/docs/src/guides/server-authentication.md +9 -0
- package/docs/src/guides/typescript-and-webpack.md +9 -0
- package/docs/src/img/icons.png +0 -0
- package/docs/src/img/icons@2x.png +0 -0
- package/docs/src/index.html +12 -0
- package/docs/src/js/api-search.js +113 -0
- package/docs/src/js/index.js +1 -0
- package/docs/src/js/nav-toggle.js +41 -0
- package/docs/src/sass/_highlight.scss +96 -0
- package/docs/src/sass/_icons.scss +157 -0
- package/docs/src/sass/style.scss +169 -0
- package/jasmine.json +7 -0
- package/karma.conf.js +100 -0
- package/lerna.json +8 -0
- package/notes/README.md +88 -0
- package/package.json +91 -0
- package/packages/arcgis-rest-auth/README.md +64 -0
- package/packages/arcgis-rest-auth/package-lock.json +11 -0
- package/packages/arcgis-rest-auth/package.json +51 -0
- package/packages/arcgis-rest-auth/src/ApplicationSession.ts +91 -0
- package/packages/arcgis-rest-auth/src/UserSession.ts +829 -0
- package/packages/arcgis-rest-auth/src/authenticated-request-options.ts +21 -0
- package/packages/arcgis-rest-auth/src/fetch-token.ts +55 -0
- package/packages/arcgis-rest-auth/src/generate-token.ts +36 -0
- package/packages/arcgis-rest-auth/src/index.ts +5 -0
- package/packages/arcgis-rest-auth/test/ApplicationSession.test.ts +121 -0
- package/packages/arcgis-rest-auth/test/UserSession.test.ts +883 -0
- package/packages/arcgis-rest-auth/test/fetchToken.test.ts +76 -0
- package/packages/arcgis-rest-auth/test/generateToken.test.ts +36 -0
- package/packages/arcgis-rest-auth/test/utils.ts +11 -0
- package/packages/arcgis-rest-auth/tsconfig.json +6 -0
- package/packages/arcgis-rest-common-types/README.md +61 -0
- package/packages/arcgis-rest-common-types/package.json +38 -0
- package/packages/arcgis-rest-common-types/src/group.ts +51 -0
- package/packages/arcgis-rest-common-types/src/index.ts +467 -0
- package/packages/arcgis-rest-common-types/src/item.ts +45 -0
- package/packages/arcgis-rest-common-types/src/webmap.ts +1225 -0
- package/packages/arcgis-rest-common-types/tsconfig.json +11 -0
- package/packages/arcgis-rest-feature-service/README.md +70 -0
- package/packages/arcgis-rest-feature-service/package-lock.json +11 -0
- package/packages/arcgis-rest-feature-service/package.json +50 -0
- package/packages/arcgis-rest-feature-service/src/add.ts +82 -0
- package/packages/arcgis-rest-feature-service/src/addAttachment.ts +65 -0
- package/packages/arcgis-rest-feature-service/src/delete.ts +85 -0
- package/packages/arcgis-rest-feature-service/src/deleteAttachments.ts +68 -0
- package/packages/arcgis-rest-feature-service/src/getAttachments.ts +64 -0
- package/packages/arcgis-rest-feature-service/src/helpers.ts +77 -0
- package/packages/arcgis-rest-feature-service/src/index.ts +8 -0
- package/packages/arcgis-rest-feature-service/src/query.ts +174 -0
- package/packages/arcgis-rest-feature-service/src/update.ts +81 -0
- package/packages/arcgis-rest-feature-service/src/updateAttachment.ts +74 -0
- package/packages/arcgis-rest-feature-service/test/attachments.test.ts +179 -0
- package/packages/arcgis-rest-feature-service/test/features.test.ts +172 -0
- package/packages/arcgis-rest-feature-service/test/mocks/feature.ts +220 -0
- package/packages/arcgis-rest-feature-service/test/mocks/foo.txt +1 -0
- package/packages/arcgis-rest-feature-service/tsconfig.json +6 -0
- package/packages/arcgis-rest-geocoder/README.md +73 -0
- package/packages/arcgis-rest-geocoder/package-lock.json +11 -0
- package/packages/arcgis-rest-geocoder/package.json +52 -0
- package/packages/arcgis-rest-geocoder/src/bulk.ts +102 -0
- package/packages/arcgis-rest-geocoder/src/geocode.ts +117 -0
- package/packages/arcgis-rest-geocoder/src/helpers.ts +81 -0
- package/packages/arcgis-rest-geocoder/src/index.ts +4 -0
- package/packages/arcgis-rest-geocoder/src/reverse.ts +84 -0
- package/packages/arcgis-rest-geocoder/src/suggest.ts +72 -0
- package/packages/arcgis-rest-geocoder/test/geocoder.test.ts +510 -0
- package/packages/arcgis-rest-geocoder/test/mocks/responses.ts +588 -0
- package/packages/arcgis-rest-geocoder/tsconfig.json +6 -0
- package/packages/arcgis-rest-groups/README.md +64 -0
- package/packages/arcgis-rest-groups/package-lock.json +11 -0
- package/packages/arcgis-rest-groups/package.json +52 -0
- package/packages/arcgis-rest-groups/src/groups.ts +272 -0
- package/packages/arcgis-rest-groups/src/index.ts +1 -0
- package/packages/arcgis-rest-groups/test/groups.test.ts +280 -0
- package/packages/arcgis-rest-groups/test/mocks/responses.ts +137 -0
- package/packages/arcgis-rest-groups/tsconfig.json +6 -0
- package/packages/arcgis-rest-items/README.md +66 -0
- package/packages/arcgis-rest-items/package-lock.json +11 -0
- package/packages/arcgis-rest-items/package.json +52 -0
- package/packages/arcgis-rest-items/src/index.ts +1 -0
- package/packages/arcgis-rest-items/src/items.ts +498 -0
- package/packages/arcgis-rest-items/test/items.test.ts +1153 -0
- package/packages/arcgis-rest-items/test/mocks/foo.zip +0 -0
- package/packages/arcgis-rest-items/test/mocks/item.ts +30 -0
- package/packages/arcgis-rest-items/test/mocks/resources.ts +28 -0
- package/packages/arcgis-rest-items/test/mocks/search.ts +60 -0
- package/packages/arcgis-rest-items/tsconfig.json +6 -0
- package/packages/arcgis-rest-request/README.md +65 -0
- package/packages/arcgis-rest-request/package-lock.json +11 -0
- package/packages/arcgis-rest-request/package.json +42 -0
- package/packages/arcgis-rest-request/src/index.ts +10 -0
- package/packages/arcgis-rest-request/src/request.ts +259 -0
- package/packages/arcgis-rest-request/src/utils/ArcGISAuthError.ts +67 -0
- package/packages/arcgis-rest-request/src/utils/ArcGISRequestError.ts +73 -0
- package/packages/arcgis-rest-request/src/utils/ErrorTypes.ts +29 -0
- package/packages/arcgis-rest-request/src/utils/check-for-errors.ts +65 -0
- package/packages/arcgis-rest-request/src/utils/encode-form-data.ts +29 -0
- package/packages/arcgis-rest-request/src/utils/encode-query-string.ts +23 -0
- package/packages/arcgis-rest-request/src/utils/get-portal-url.ts +25 -0
- package/packages/arcgis-rest-request/src/utils/get-portal.ts +45 -0
- package/packages/arcgis-rest-request/src/utils/process-params.ts +99 -0
- package/packages/arcgis-rest-request/test/mocks/errors.ts +59 -0
- package/packages/arcgis-rest-request/test/mocks/geojson-feature-collection.ts +10 -0
- package/packages/arcgis-rest-request/test/mocks/portal.ts +109 -0
- package/packages/arcgis-rest-request/test/mocks/sharing-rest-info.ts +38 -0
- package/packages/arcgis-rest-request/test/mocks/webmap.ts +38 -0
- package/packages/arcgis-rest-request/test/request.test.ts +296 -0
- package/packages/arcgis-rest-request/test/utils/ArcGISAuthError.test.ts +167 -0
- package/packages/arcgis-rest-request/test/utils/ArcGISRequestError.test.ts +40 -0
- package/packages/arcgis-rest-request/test/utils/check-for-errors.test.ts +101 -0
- package/packages/arcgis-rest-request/test/utils/encode-form-data.test.ts +112 -0
- package/packages/arcgis-rest-request/test/utils/get-portal-url.test.ts +34 -0
- package/packages/arcgis-rest-request/test/utils/portal.test.ts +94 -0
- package/packages/arcgis-rest-request/test/utils/process-params.test.ts +190 -0
- package/packages/arcgis-rest-request/tsconfig.json +6 -0
- package/packages/arcgis-rest-sharing/README.md +67 -0
- package/packages/arcgis-rest-sharing/package-lock.json +11 -0
- package/packages/arcgis-rest-sharing/package.json +55 -0
- package/packages/arcgis-rest-sharing/src/access.ts +91 -0
- package/packages/arcgis-rest-sharing/src/group-sharing.ts +212 -0
- package/packages/arcgis-rest-sharing/src/helpers.ts +92 -0
- package/packages/arcgis-rest-sharing/src/index.ts +2 -0
- package/packages/arcgis-rest-sharing/test/access.test.ts +153 -0
- package/packages/arcgis-rest-sharing/test/group-sharing.test.ts +436 -0
- package/packages/arcgis-rest-sharing/test/mocks/sharing.ts +15 -0
- package/packages/arcgis-rest-sharing/tsconfig.json +6 -0
- package/packages/arcgis-rest-users/README.md +71 -0
- package/packages/arcgis-rest-users/package-lock.json +11 -0
- package/packages/arcgis-rest-users/package.json +51 -0
- package/packages/arcgis-rest-users/src/index.ts +1 -0
- package/packages/arcgis-rest-users/src/users.ts +70 -0
- package/packages/arcgis-rest-users/test/mocks/responses.ts +170 -0
- package/packages/arcgis-rest-users/test/users.test.ts +97 -0
- package/packages/arcgis-rest-users/tsconfig.json +6 -0
- package/support/FormData.d.ts +1 -0
- package/support/changelog.js +388 -0
- package/support/commit-template.txt +19 -0
- package/support/deploy-doc-site.js +16 -0
- package/support/publish.sh +40 -0
- package/support/test-helpers.js +8 -0
- package/tsconfig.json +69 -0
- package/tslint.json +14 -0
- package/umd-base-profile.js +82 -0
- package/umd-production-profile.js +13 -0
@@ -0,0 +1,157 @@
|
|
1
|
+
$type-icons: (object-literal), (class), ('class.tsd-has-type-parameter'),
|
2
|
+
(interface), ('interface.tsd-has-type-parameter'),
|
3
|
+
(module, external-module), (enumeration), (enumeration-member),
|
4
|
+
(signature), (type-alias);
|
5
|
+
|
6
|
+
$member-icons: (variable, property), (get-signature), (set-signature),
|
7
|
+
(accessor), (function, method, call-signature),
|
8
|
+
('function.tsd-has-type-parameter', 'method.tsd-has-type-parameter'),
|
9
|
+
(constructor, constructor-signature), (index-signature), (event),
|
10
|
+
(property), (function, method, call-signature), (event);
|
11
|
+
|
12
|
+
@mixin retina () {
|
13
|
+
@media (-webkit-min-device-pixel-ratio: 1.5),
|
14
|
+
(min-device-pixel-ratio: 1.5),
|
15
|
+
(min-resolution: 144dpi) {
|
16
|
+
@content;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
// parameter
|
21
|
+
// type-literal
|
22
|
+
// type-parameter
|
23
|
+
|
24
|
+
.tsd-kind-icon {
|
25
|
+
display: inline-block;
|
26
|
+
position: relative;
|
27
|
+
padding-left: 20px;
|
28
|
+
text-indent: -20px;
|
29
|
+
|
30
|
+
&:before {
|
31
|
+
content: '';
|
32
|
+
display: inline-block;
|
33
|
+
vertical-align: middle;
|
34
|
+
width: 17px;
|
35
|
+
height: 17px;
|
36
|
+
margin: 0 3px 2px 0;
|
37
|
+
background-image: url(../img/icons.png);
|
38
|
+
|
39
|
+
@include retina {
|
40
|
+
background-image: url(../img/icons@2x.png);
|
41
|
+
background-size: 238px 204px;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
.tsd-signature.tsd-kind-icon:before {
|
47
|
+
background-position: 0 -153px;
|
48
|
+
}
|
49
|
+
|
50
|
+
$icon-size: 17px;
|
51
|
+
$type: -0 * $icon-size;
|
52
|
+
$type-protected: -1 * $icon-size;
|
53
|
+
$type-private: -2 * $icon-size;
|
54
|
+
$member-class-public: -3 * $icon-size;
|
55
|
+
$member-class-public-inherited: -4 * $icon-size;
|
56
|
+
$member-class-protected: -5 * $icon-size;
|
57
|
+
$member-class-protected-inherited: -6 * $icon-size;
|
58
|
+
$member-private: -7 * $icon-size;
|
59
|
+
$member: -8 * $icon-size;
|
60
|
+
$member-protected: -9 * $icon-size;
|
61
|
+
$member-enum: -10 * $icon-size;
|
62
|
+
$member-enum-protected: -11 * $icon-size;
|
63
|
+
$member-interface: -12 * $icon-size;
|
64
|
+
$member-interface-inherited: -13 * $icon-size;
|
65
|
+
|
66
|
+
@for $index from 1 through length($type-icons) {
|
67
|
+
@each $kind in nth($type-icons, $index) {
|
68
|
+
$selector: '.tsd-kind-' + $kind;
|
69
|
+
$offset: -#{17 * ($index)}px;
|
70
|
+
|
71
|
+
#{$selector} {
|
72
|
+
> .tsd-kind-icon:before {
|
73
|
+
background-position: $type $offset;
|
74
|
+
}
|
75
|
+
|
76
|
+
&.tsd-is-protected > .tsd-kind-icon:before {
|
77
|
+
background-position: $type-protected $offset;
|
78
|
+
}
|
79
|
+
|
80
|
+
&.tsd-is-private > .tsd-kind-icon:before {
|
81
|
+
background-position: $type-private $offset;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
@for $index from 1 through length($member-icons) {
|
88
|
+
@each $kind in nth($member-icons, $index) {
|
89
|
+
$offset: -#{17 * ($index - 1)}px;
|
90
|
+
$selector: '.tsd-kind-' + $kind;
|
91
|
+
@if $index == 10 {
|
92
|
+
$selector: '.tsd-is-static';
|
93
|
+
} @else if $index > 10 {
|
94
|
+
$selector: '.tsd-is-static.tsd-kind-' + $kind;
|
95
|
+
}
|
96
|
+
|
97
|
+
#{$selector} {
|
98
|
+
> .tsd-kind-icon:before {
|
99
|
+
background-position: $member $offset;
|
100
|
+
}
|
101
|
+
|
102
|
+
&.tsd-is-protected > .tsd-kind-icon:before {
|
103
|
+
background-position: $member-protected $offset;
|
104
|
+
}
|
105
|
+
|
106
|
+
&.tsd-is-private > .tsd-kind-icon:before {
|
107
|
+
background-position: $member-private $offset;
|
108
|
+
}
|
109
|
+
|
110
|
+
&.tsd-parent-kind-class {
|
111
|
+
> .tsd-kind-icon:before {
|
112
|
+
background-position: $member-class-public $offset;
|
113
|
+
}
|
114
|
+
|
115
|
+
&.tsd-is-inherited > .tsd-kind-icon:before {
|
116
|
+
background-position: $member-class-public-inherited $offset;
|
117
|
+
}
|
118
|
+
|
119
|
+
&.tsd-is-protected > .tsd-kind-icon:before {
|
120
|
+
background-position: $member-class-protected $offset;
|
121
|
+
}
|
122
|
+
|
123
|
+
&.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before {
|
124
|
+
background-position: $member-class-protected-inherited $offset;
|
125
|
+
}
|
126
|
+
|
127
|
+
&.tsd-is-private > .tsd-kind-icon:before {
|
128
|
+
background-position: $member-private $offset;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
|
132
|
+
&.tsd-parent-kind-enumeration {
|
133
|
+
> .tsd-kind-icon:before {
|
134
|
+
background-position: $member-enum $offset;
|
135
|
+
}
|
136
|
+
|
137
|
+
&.tsd-is-protected > .tsd-kind-icon:before {
|
138
|
+
background-position: $member-enum-protected $offset;
|
139
|
+
}
|
140
|
+
|
141
|
+
&.tsd-is-private > .tsd-kind-icon:before {
|
142
|
+
background-position: $member-private $offset;
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
&.tsd-parent-kind-interface {
|
147
|
+
> .tsd-kind-icon:before {
|
148
|
+
background-position: $member-interface $offset;
|
149
|
+
}
|
150
|
+
|
151
|
+
&.tsd-is-inherited > .tsd-kind-icon:before {
|
152
|
+
background-position: $member-interface-inherited $offset;
|
153
|
+
}
|
154
|
+
}
|
155
|
+
}
|
156
|
+
}
|
157
|
+
}
|
@@ -0,0 +1,169 @@
|
|
1
|
+
@import "_icons.scss";
|
2
|
+
@import "_highlight.scss";
|
3
|
+
|
4
|
+
[v-cloak],
|
5
|
+
[hide] {
|
6
|
+
display: none;
|
7
|
+
}
|
8
|
+
|
9
|
+
tr:hover .table-link,
|
10
|
+
.method-panel:hover header .table-link {
|
11
|
+
display: block;
|
12
|
+
}
|
13
|
+
|
14
|
+
.method-panel header .table-link {
|
15
|
+
left: -0.875rem;
|
16
|
+
top: 1.75rem;
|
17
|
+
}
|
18
|
+
|
19
|
+
td,
|
20
|
+
.method-panel {
|
21
|
+
position: relative;
|
22
|
+
}
|
23
|
+
|
24
|
+
tr:target,
|
25
|
+
.panel:target {
|
26
|
+
background: #efe397;
|
27
|
+
}
|
28
|
+
|
29
|
+
.table-link {
|
30
|
+
position: absolute;
|
31
|
+
left: -1.25rem;
|
32
|
+
top: 50%;
|
33
|
+
margin-top: -0.8375rem;
|
34
|
+
display: none;
|
35
|
+
border-radius: 50%;
|
36
|
+
background: white;
|
37
|
+
border: 1px solid #cccccc;
|
38
|
+
color: #0079c1;
|
39
|
+
width: 1.675rem;
|
40
|
+
height: 1.675rem;
|
41
|
+
text-align: center;
|
42
|
+
line-height: 1.675rem;
|
43
|
+
&:hover {
|
44
|
+
color: white;
|
45
|
+
background: #005e95;
|
46
|
+
border: 1px solid #005e95;
|
47
|
+
}
|
48
|
+
.svg-icon {
|
49
|
+
vertical-align: auto;
|
50
|
+
padding: 0;
|
51
|
+
width: 1rem;
|
52
|
+
height: 1rem;
|
53
|
+
top: 2px;
|
54
|
+
position: relative;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
.api-search-result {
|
59
|
+
border: 1px solid transparent;
|
60
|
+
padding: 0.25rem;
|
61
|
+
|
62
|
+
&.is-selected {
|
63
|
+
background: #f8f8f8;
|
64
|
+
border: 1px solid #0079c1;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
.text-purple {
|
69
|
+
color: #7461a8;
|
70
|
+
}
|
71
|
+
|
72
|
+
.sub-nav {
|
73
|
+
background: #005e95;
|
74
|
+
}
|
75
|
+
|
76
|
+
.api-param-comment {
|
77
|
+
p {
|
78
|
+
margin-bottom: 0;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
.api-function-comment {
|
83
|
+
p {
|
84
|
+
margin-bottom: 0.5rem;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
.api-package-content-list {
|
89
|
+
margin-left: 1.1375rem;
|
90
|
+
}
|
91
|
+
|
92
|
+
a > code {
|
93
|
+
color: #0079c1;
|
94
|
+
&:hover {
|
95
|
+
color: #005e95;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
.no-wrap {
|
100
|
+
white-space: nowrap;
|
101
|
+
}
|
102
|
+
|
103
|
+
.method-table-signatures {
|
104
|
+
margin: 0;
|
105
|
+
li {
|
106
|
+
margin: 0;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
110
|
+
.package-contents {
|
111
|
+
display: grid;
|
112
|
+
grid-gap: 10px;
|
113
|
+
}
|
114
|
+
|
115
|
+
/* no grid support? */
|
116
|
+
|
117
|
+
.package-contents {
|
118
|
+
display: flex;
|
119
|
+
flex-wrap: wrap;
|
120
|
+
}
|
121
|
+
|
122
|
+
.package-contents {
|
123
|
+
display: grid;
|
124
|
+
margin: 0 auto;
|
125
|
+
grid-template-columns: repeat(auto-fill, minmax(25ch, 1fr));
|
126
|
+
}
|
127
|
+
|
128
|
+
.package-contents li {
|
129
|
+
/* needed for the flex layout*/
|
130
|
+
flex: 1 1 200px;
|
131
|
+
}
|
132
|
+
|
133
|
+
/* We need to set the margin used on flex items to 0 as we have gaps in grid. */
|
134
|
+
@supports (display: grid) {
|
135
|
+
.package-contents > * {
|
136
|
+
margin: 0;
|
137
|
+
}
|
138
|
+
}
|
139
|
+
|
140
|
+
.type-child-list {
|
141
|
+
margin: 0;
|
142
|
+
}
|
143
|
+
|
144
|
+
.type-child-name {
|
145
|
+
float: left;
|
146
|
+
clear: left;
|
147
|
+
padding: 0 0.25rem 0 1rem;
|
148
|
+
margin: 0;
|
149
|
+
}
|
150
|
+
|
151
|
+
.type-child-type {
|
152
|
+
float: left;
|
153
|
+
clear: right;
|
154
|
+
margin: 0;
|
155
|
+
}
|
156
|
+
|
157
|
+
.api-toggle-button {
|
158
|
+
padding: 0.1rem 0.1rem;
|
159
|
+
}
|
160
|
+
|
161
|
+
.api-list-item {
|
162
|
+
white-space: nowrap;
|
163
|
+
}
|
164
|
+
|
165
|
+
.list-item-active {
|
166
|
+
border-width: 1px;
|
167
|
+
border-color: #0079c1;
|
168
|
+
border-style: solid
|
169
|
+
}
|
package/jasmine.json
ADDED
package/karma.conf.js
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
// Karma configuration
|
2
|
+
// Generated on Thu Jul 13 2017 11:01:30 GMT-0700 (PDT)
|
3
|
+
const fs = require("fs");
|
4
|
+
|
5
|
+
module.exports = function(config) {
|
6
|
+
config.set({
|
7
|
+
// base path that will be used to resolve all patterns (eg. files, exclude)
|
8
|
+
basePath: "",
|
9
|
+
|
10
|
+
// frameworks to use
|
11
|
+
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
12
|
+
frameworks: ["jasmine", "karma-typescript"],
|
13
|
+
|
14
|
+
// list of files / patterns to load in the browser
|
15
|
+
files: ["packages/*/{src,test}/**/*.ts"],
|
16
|
+
|
17
|
+
// list of files to exclude
|
18
|
+
exclude: [],
|
19
|
+
|
20
|
+
karmaTypescriptConfig: {
|
21
|
+
reports: {
|
22
|
+
lcovonly: "coverage",
|
23
|
+
html: "coverage",
|
24
|
+
text: ""
|
25
|
+
},
|
26
|
+
compilerOptions: {
|
27
|
+
module: "commonjs"
|
28
|
+
},
|
29
|
+
tsconfig: "./tsconfig.json",
|
30
|
+
bundlerOptions: {
|
31
|
+
transforms: [require("karma-typescript-es6-transform")()],
|
32
|
+
resolve: {
|
33
|
+
// karmas resolver cant figure out the symlinked deps from lerna
|
34
|
+
// so we need to manually alias each package here.
|
35
|
+
alias: fs
|
36
|
+
.readdirSync("packages")
|
37
|
+
.filter(p => p[0] !== ".")
|
38
|
+
.reduce((alias, p) => {
|
39
|
+
alias[`@esri/${p}`] = `packages/${p}/src/index.ts`;
|
40
|
+
return alias;
|
41
|
+
}, {})
|
42
|
+
}
|
43
|
+
}
|
44
|
+
},
|
45
|
+
|
46
|
+
// coveralls uses this one. still need to figure out how to DRY this up.
|
47
|
+
coverageReporter: {
|
48
|
+
type: 'lcov',
|
49
|
+
dir: 'coverage/'
|
50
|
+
},
|
51
|
+
|
52
|
+
// preprocess matching files before serving them to the browser
|
53
|
+
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
54
|
+
preprocessors: {
|
55
|
+
"**/*.ts": ["karma-typescript"] // *.tsx for React Jsx
|
56
|
+
},
|
57
|
+
|
58
|
+
// test results reporter to use
|
59
|
+
// possible values: 'dots', 'progress'
|
60
|
+
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
61
|
+
reporters: ["jasmine-diff", "dots", "karma-typescript", "coverage", "coveralls"],
|
62
|
+
|
63
|
+
// web server port
|
64
|
+
port: 9876,
|
65
|
+
|
66
|
+
// enable / disable colors in the output (reporters and logs)
|
67
|
+
colors: true,
|
68
|
+
|
69
|
+
// level of logging
|
70
|
+
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
71
|
+
logLevel: config.LOG_INFO,
|
72
|
+
|
73
|
+
// enable / disable watching file and executing tests whenever any file changes
|
74
|
+
autoWatch: true,
|
75
|
+
|
76
|
+
// start these browsers
|
77
|
+
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
78
|
+
browsers: [
|
79
|
+
// 'Chrome',
|
80
|
+
// 'ChromeCanary',
|
81
|
+
// 'Firefox',
|
82
|
+
// 'Safari',
|
83
|
+
// 'IE'
|
84
|
+
],
|
85
|
+
|
86
|
+
// Continuous Integration mode
|
87
|
+
// if true, Karma captures browsers, runs the tests and exits
|
88
|
+
singleRun: false,
|
89
|
+
|
90
|
+
// Concurrency level
|
91
|
+
// how many browsers should be started simultaneously
|
92
|
+
concurrency: Infinity,
|
93
|
+
customLaunchers: {
|
94
|
+
ChromeHeadlessCI: {
|
95
|
+
base: 'ChromeHeadless',
|
96
|
+
flags: ['--no-sandbox']
|
97
|
+
}
|
98
|
+
},
|
99
|
+
});
|
100
|
+
};
|
package/lerna.json
ADDED
package/notes/README.md
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
# Testing
|
2
|
+
|
3
|
+
* Use `npm test` as normal to run all tests.
|
4
|
+
* `npm test` will run `lerna run test` which will in turn will execute `npm test` in each package if it exists with the root of the package as the `process.cwd()`
|
5
|
+
* Browser based tests are setup to run with Karma as a test runner as Jasmine as teh testing framework. There is a common config that all packages can use in the root folder called `karma.conf.js`.
|
6
|
+
* Node tests use the `jasmine` CLI tool. Each package will require a `jasmine.json` to tell jasmine where the test files are for that package. The `jasmine.json` should register the `support/register-tsnode.js` helper so TypeScript files are compiled before the tests execute.
|
7
|
+
* Currently the Node tests take quite awhile. I think this is becuase the `ignore` param isn't being respected and thus the entirety of `node_modules` get processed by TypeScript. This needs to happen in ordr to make `lodash-es` work.
|
8
|
+
|
9
|
+
# Build
|
10
|
+
|
11
|
+
The build system currently builds for 3 seperate targets:
|
12
|
+
|
13
|
+
* Common JS bundle for Node.js
|
14
|
+
* A UMD bundle for CommonJS, AMD and a global variable for browsers
|
15
|
+
* ES5 files in the ES2015 module syntax for use with Rollup and Webpack 2.
|
16
|
+
|
17
|
+
Like with tests running `npm run build` will run `lerna run build` which will run `npm run build` in each package. Currently `npm run build:node` and `npm run build:umd` both use the shared rollup configurations in `rollup.config.*.js`. `npm run build:esm` uses a `tsconfig.json` file in the root of hte repo that extends the base `tsconfig.json` file. This `tsconfig.json` tells the Typescript compiler where to out the output files and generated `.d.ts` type declarations.
|
18
|
+
|
19
|
+
These 4 outputs (2, rollup builds, ES2015 modules and type declarations) are referenced by their respective fields in `package.json`:
|
20
|
+
|
21
|
+
```js
|
22
|
+
{
|
23
|
+
// ...
|
24
|
+
|
25
|
+
"main": "dist/node/bundle.cjs.js",
|
26
|
+
"browser": "dist/browser/bundle.umd.js",
|
27
|
+
"module": "dist/esm/index.js",
|
28
|
+
"js:next": "dist/esm/index.js",
|
29
|
+
"types": "dist/types/index.d.ts",
|
30
|
+
|
31
|
+
// ...
|
32
|
+
}
|
33
|
+
```
|
34
|
+
|
35
|
+
Currently we are bundling Node in order to use `lodash-es` as a utility library which needs to be bundled in.
|
36
|
+
|
37
|
+
The ES2015 build also has the references to `form-data` and `url-search-params` removed. Rollup handles ignoring these in the UMD and CJS builds but Typescirpt is not a bundler so these needed to be removed some other way. If we run into issues with sourcemaps this replacement process might need to be replaced by a custom script with [`magic-string`](https://github.com/Rich-Harris/magic-string).
|
38
|
+
|
39
|
+
# Support files
|
40
|
+
|
41
|
+
There are several general support files needed for various operations of the Typescript compiler to prevent errors:
|
42
|
+
|
43
|
+
* `support/json.d.ts` - make the typescript compiler happy when you `import` JSON files `import * as sharingRestInfo from './mocks/sharing-rest-info.json';`
|
44
|
+
* `support/lodash-es.d.ts` - currently `@types/lodash-es` has issues https://github.com/DefinitelyTyped/DefinitelyTyped/issues/15227 so this is an alternate typings file
|
45
|
+
* `register-tsnode.js` - enables on-the-fly compilation of Typescript in Node.js, used by the Jasmine tests
|
46
|
+
* `url-search-params.d.ts` - typings for the `url-search-params` module which is used to emulate `URLSearchParams` in Node.js
|
47
|
+
|
48
|
+
# Doc system
|
49
|
+
|
50
|
+
[Typedoc](https://github.com/TypeStrong/typedoc) leaves much to be desired figuring out how TypeDoc is organizing the source files is next to impossible and there is almost no doc. It does appear to be usable since project like Dojo 2 and Maquette use it however figuring out how to generate the docs in a struture that looks good is pretty beyond me after looking at it for a few hours.
|
51
|
+
|
52
|
+
A potentially better option might be to just use JSDoc and work from the compiled ES2015 source. I will look into this later.
|
53
|
+
|
54
|
+
# Release system
|
55
|
+
|
56
|
+
the release process has been entirely automated.
|
57
|
+
|
58
|
+
the command below bumps the version in each individual package.json file and parses all `npm run c` invoked commit messages since the last release to update the changelog.
|
59
|
+
|
60
|
+
```bash
|
61
|
+
npm run release:prepare
|
62
|
+
```
|
63
|
+
|
64
|
+
afterwards, you can display a diff to give you a sense of what will be committed to master when you actually publish.
|
65
|
+
|
66
|
+
```bash
|
67
|
+
npm run release:review
|
68
|
+
```
|
69
|
+
|
70
|
+
the last command increments the version in the root package.json, pushes the new tag to GitHub and publishes a release of each individual package on npm.
|
71
|
+
|
72
|
+
```bash
|
73
|
+
npm run release:publish
|
74
|
+
```
|
75
|
+
|
76
|
+
# Potential improvments
|
77
|
+
|
78
|
+
* Finding a decent alternative to `lodash/defaults` without broken typings would be ideal. This forces all kinds of weirdness on us.
|
79
|
+
* Figure out why the Node tests take so long (might be becuase of hacks needed for `lodash-es`) `lerna run test:node`
|
80
|
+
* Since we are importing `lodash-es` we need to use `karma-typescript-es6-transform` to trasform the ES2015 module syntax into CommonJS. We should look into if this is neccessary at all (i.e. replace `lodash-es`) or think about replacing it with https://github.com/jlmakes/karma-rollup-preprocessor.
|
81
|
+
|
82
|
+
# Thoughts
|
83
|
+
|
84
|
+
Basic utility libraries are going to be a problem. Most recommendation are to use something like `import defaults = require('lodash/defaults')` because you are importing a common JS module. However if you use this syntax you cannot have Typescript compile ES2015 modules which is goal for us. Not every library publishes itself as ES2015 modules.
|
85
|
+
|
86
|
+
We need to make a call on what we bundle into the library (`Promise`, `fetch`) ect... Do we ask people to bring their own polyfills or do we bundle them ourselves for simplicity. If we want to do both it will likly complicate the builds a great deal.
|
87
|
+
|
88
|
+
|
package/package.json
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
{
|
2
|
+
"name": "etincidunt",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "Compact, modular JavaScript wrappers for the ArcGIS REST API that run in Node.js and modern browsers.",
|
5
|
+
"devDependencies": {
|
6
|
+
"@types/es6-promise": "0.0.32",
|
7
|
+
"@types/fetch-mock": "^5.12.2",
|
8
|
+
"@types/isomorphic-fetch": "0.0.34",
|
9
|
+
"@types/jasmine": "^2.8.2",
|
10
|
+
"@types/node": "^6.0.95",
|
11
|
+
"acetate": "^2.0.0",
|
12
|
+
"acetate-cli": "^1.0.1",
|
13
|
+
"changelog-parser": "^2.1.0",
|
14
|
+
"cheerio": "^1.0.0-rc.2",
|
15
|
+
"commitizen": "^2.10.0",
|
16
|
+
"concurrently": "^3.5.1",
|
17
|
+
"cpx": "^1.5.0",
|
18
|
+
"cross-spawn": "^5.1.0",
|
19
|
+
"cz-lerna-changelog": "github:patrickarlt/cz-lerna-changelog#3fe7650a2e2e624b1f46e5031c96119759698288",
|
20
|
+
"date-fns": "^1.29.0",
|
21
|
+
"fetch-mock": "^5.13.1",
|
22
|
+
"gh-pages": "^1.1.0",
|
23
|
+
"gh-release": "^3.2.1",
|
24
|
+
"husky": "^0.14.3",
|
25
|
+
"inspect-process": "^0.5.0",
|
26
|
+
"jasmine": "^2.8.0",
|
27
|
+
"jasmine-core": "^2.8.0",
|
28
|
+
"karma": "^2.0.2",
|
29
|
+
"karma-chrome-launcher": "^2.2.0",
|
30
|
+
"karma-coverage": "^1.1.1",
|
31
|
+
"karma-coveralls": "1.1.2",
|
32
|
+
"karma-firefox-launcher": "^1.1.0",
|
33
|
+
"karma-ie-launcher": "^1.0.0",
|
34
|
+
"karma-jasmine": "^1.1.1",
|
35
|
+
"karma-jasmine-diff-reporter": "^1.1.1",
|
36
|
+
"karma-safari-launcher": "^1.0.0",
|
37
|
+
"karma-typescript": "^3.0.9",
|
38
|
+
"karma-typescript-es6-transform": "^1.0.3",
|
39
|
+
"lerna": "^2.5.1",
|
40
|
+
"lint-staged": "^4.3.0",
|
41
|
+
"minimatch": "^3.0.4",
|
42
|
+
"node-sass": "^4.9.0",
|
43
|
+
"onchange": "^3.3.0",
|
44
|
+
"prettier": "^1.9.2",
|
45
|
+
"resolve": "^1.5.0",
|
46
|
+
"rimraf": "^2.6.2",
|
47
|
+
"rollup": "^0.53.4",
|
48
|
+
"rollup-plugin-commonjs": "^8.2.6",
|
49
|
+
"rollup-plugin-filesize": "^1.5.0",
|
50
|
+
"rollup-plugin-json": "^2.3.0",
|
51
|
+
"rollup-plugin-node-resolve": "^3.0.3",
|
52
|
+
"rollup-plugin-typescript2": "^0.4.6",
|
53
|
+
"rollup-plugin-uglify": "^3.0.0",
|
54
|
+
"shelljs": "^0.7.8",
|
55
|
+
"slug": "^0.9.1",
|
56
|
+
"ts-node": "^3.3.0",
|
57
|
+
"tslint": "^5.8.0",
|
58
|
+
"tslint-config-prettier": "^1.6.0",
|
59
|
+
"tslint-config-standard": "^6.0.1",
|
60
|
+
"typedoc": "^0.8.0",
|
61
|
+
"typescript": "^2.6.2"
|
62
|
+
},
|
63
|
+
"dependencies": {
|
64
|
+
"es6-promise": "^4.2.1",
|
65
|
+
"isomorphic-fetch": "^2.2.1",
|
66
|
+
"isomorphic-form-data": "^1.0.0",
|
67
|
+
"tslib": "^1.8.1"
|
68
|
+
},
|
69
|
+
"lint-staged": {
|
70
|
+
"*.ts": [
|
71
|
+
"prettier --write --parser typescript --tab-width 2 --use-tabs false",
|
72
|
+
"tslint",
|
73
|
+
"git add"
|
74
|
+
]
|
75
|
+
},
|
76
|
+
"repository": {
|
77
|
+
"type": "git",
|
78
|
+
"url": "https://github.com/MathewLeuschke/etincidunt.git"
|
79
|
+
},
|
80
|
+
"license": "Apache-2.0",
|
81
|
+
"bugs": {
|
82
|
+
"url": "https://github.com/MathewLeuschke/etincidunt.git/issues"
|
83
|
+
},
|
84
|
+
"homepage": "https://github.com/MathewLeuschke/etincidunt.git",
|
85
|
+
"config": {
|
86
|
+
"commitizen": {
|
87
|
+
"path": "./node_modules/cz-lerna-changelog"
|
88
|
+
}
|
89
|
+
},
|
90
|
+
"author": "JaydenPfannerstill"
|
91
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
[![npm version][npm-img]][npm-url]
|
2
|
+
[![build status][travis-img]][travis-url]
|
3
|
+
[![apache licensed](https://img.shields.io/badge/license-Apache-green.svg?style=flat-square)](https://raw.githubusercontent.com/Esri/arcgis-rest-js/master/LICENSE)
|
4
|
+
|
5
|
+
[npm-img]: https://img.shields.io/npm/v/@esri/arcgis-rest-auth.svg?style=flat-square
|
6
|
+
[npm-url]: https://www.npmjs.com/package/@esri/arcgis-rest-auth
|
7
|
+
[travis-img]: https://img.shields.io/travis/Esri/arcgis-rest-js/master.svg?style=flat-square
|
8
|
+
[travis-url]: https://travis-ci.org/Esri/arcgis-rest-js
|
9
|
+
|
10
|
+
# @esri/arcgis-rest-auth
|
11
|
+
|
12
|
+
> Authentication helpers for [`@esri/arcgis-rest-*`](https://github.com/Esri/arcgis-rest-js).
|
13
|
+
|
14
|
+
### Example
|
15
|
+
|
16
|
+
```bash
|
17
|
+
npm install @esri/arcgis-rest-request
|
18
|
+
npm install @esri/arcgis-rest-auth
|
19
|
+
```
|
20
|
+
|
21
|
+
```js
|
22
|
+
import { UserSession } from '@esri/arcgis-rest-auth';
|
23
|
+
|
24
|
+
const session = new UserSession({
|
25
|
+
username: "casey",
|
26
|
+
password: "123456"
|
27
|
+
});
|
28
|
+
```
|
29
|
+
|
30
|
+
### [API Reference](https://esri.github.io/arcgis-rest-js/api/auth/)
|
31
|
+
|
32
|
+
### Issues
|
33
|
+
|
34
|
+
If something isn't working the way you expected, please take a look at [previously logged issues](https://github.com/Esri/arcgis-rest-js/issues) first. Have you found a new bug? Want to request a new feature? We'd [**love**](https://github.com/Esri/arcgis-rest-js/issues/new) to hear from you.
|
35
|
+
|
36
|
+
If you're looking for help you can also post issues on [GIS Stackexchange](http://gis.stackexchange.com/questions/ask?tags=esri-oss).
|
37
|
+
|
38
|
+
### Versioning
|
39
|
+
|
40
|
+
For transparency into the release cycle and in striving to maintain backward compatibility, @esri/arcgis-rest-js is maintained under Semantic Versioning guidelines and will adhere to these rules whenever possible.
|
41
|
+
|
42
|
+
For more information on SemVer, please visit <http://semver.org/>.
|
43
|
+
|
44
|
+
### Contributing
|
45
|
+
|
46
|
+
Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](CONTRIBUTING.md).
|
47
|
+
|
48
|
+
### License
|
49
|
+
|
50
|
+
Copyright © 2017-2018 Esri
|
51
|
+
|
52
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
53
|
+
you may not use this file except in compliance with the License.
|
54
|
+
You may obtain a copy of the License at
|
55
|
+
|
56
|
+
> http://www.apache.org/licenses/LICENSE-2.0
|
57
|
+
|
58
|
+
Unless required by applicable law or agreed to in writing, software
|
59
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
60
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
61
|
+
See the License for the specific language governing permissions and
|
62
|
+
limitations under the License.
|
63
|
+
|
64
|
+
A copy of the license is available in the repository's [LICENSE](../../LICENSE) file.
|