@ember-data/request-utils 5.6.0-alpha.3 → 5.6.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/deprecation-support.js +2 -2
- package/dist/deprecation-support.js.map +1 -1
- package/dist/handlers.js +0 -6
- package/dist/handlers.js.map +1 -1
- package/dist/index.js +10 -36
- package/dist/index.js.map +1 -1
- package/dist/{inflect-CwI_k2it.js → inflect-SV-gOUrZ.js} +1 -39
- package/dist/inflect-SV-gOUrZ.js.map +1 -0
- package/dist/string.js +2 -2
- package/dist/{transform-1PDozfHr.js → transform-BixPrO0I.js} +0 -19
- package/dist/transform-BixPrO0I.js.map +1 -0
- package/package.json +4 -10
- package/unstable-preview-types/-private/handlers/auto-compress.d.ts +2 -15
- package/unstable-preview-types/-private/handlers/auto-compress.d.ts.map +1 -1
- package/unstable-preview-types/-private/string/inflect.d.ts +0 -33
- package/unstable-preview-types/-private/string/inflect.d.ts.map +1 -1
- package/unstable-preview-types/-private/string/transform.d.ts +0 -15
- package/unstable-preview-types/-private/string/transform.d.ts.map +1 -1
- package/unstable-preview-types/handlers.d.ts +2 -3
- package/unstable-preview-types/handlers.d.ts.map +1 -1
- package/unstable-preview-types/index.d.ts +15 -51
- package/unstable-preview-types/index.d.ts.map +1 -1
- package/unstable-preview-types/string.d.ts +3 -4
- package/unstable-preview-types/string.d.ts.map +1 -1
- package/dist/inflect-CwI_k2it.js.map +0 -1
- package/dist/transform-1PDozfHr.js.map +0 -1
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @module @ember-data/request-utils/string
|
|
5
|
-
*/
|
|
6
2
|
const DEFAULT_MAX_CACHE_SIZE = 10_000;
|
|
7
3
|
class LRUCache {
|
|
8
4
|
// debug stats
|
|
@@ -83,10 +79,7 @@ const CAPITALIZE_CACHE = new LRUCache(str => str.replace(STRING_CAPITALIZE_REGEX
|
|
|
83
79
|
* dasherize('privateDocs/ownerInvoice'; // 'private-docs/owner-invoice'
|
|
84
80
|
* ```
|
|
85
81
|
*
|
|
86
|
-
* @method dasherize
|
|
87
82
|
* @public
|
|
88
|
-
* @static
|
|
89
|
-
* @for @ember-data/request-utils/string
|
|
90
83
|
* @param {String} str
|
|
91
84
|
* @return {String}
|
|
92
85
|
* @since 4.13.0
|
|
@@ -109,10 +102,7 @@ function dasherize(str) {
|
|
|
109
102
|
* camelize('private-docs/owner-invoice'); // 'privateDocs/ownerInvoice'
|
|
110
103
|
* ```
|
|
111
104
|
*
|
|
112
|
-
* @method camelize
|
|
113
105
|
* @public
|
|
114
|
-
* @static
|
|
115
|
-
* @for @ember-data/request-utils/string
|
|
116
106
|
* @param {String} str
|
|
117
107
|
* @return {String}
|
|
118
108
|
* @since 4.13.0
|
|
@@ -134,10 +124,7 @@ function camelize(str) {
|
|
|
134
124
|
* underscore('privateDocs/ownerInvoice'); // 'private_docs/owner_invoice'
|
|
135
125
|
* ```
|
|
136
126
|
*
|
|
137
|
-
* @method underscore
|
|
138
127
|
* @public
|
|
139
|
-
* @static
|
|
140
|
-
* @for @ember-data/request-utils/string
|
|
141
128
|
* @param {String} str
|
|
142
129
|
* @return {String}
|
|
143
130
|
* @since 4.13.0
|
|
@@ -159,10 +146,7 @@ function underscore(str) {
|
|
|
159
146
|
* capitalize('privateDocs/ownerInvoice'); // 'PrivateDocs/ownerInvoice'
|
|
160
147
|
* ```
|
|
161
148
|
*
|
|
162
|
-
* @method capitalize
|
|
163
|
-
* @static
|
|
164
149
|
* @public
|
|
165
|
-
* @for @ember-data/request-utils/string
|
|
166
150
|
* @param {String} str
|
|
167
151
|
* @return {String}
|
|
168
152
|
* @since 4.13.0
|
|
@@ -175,10 +159,7 @@ function capitalize(str) {
|
|
|
175
159
|
* Sets the maximum size of the LRUCache for all string transformation functions.
|
|
176
160
|
* The default size is 10,000.
|
|
177
161
|
*
|
|
178
|
-
* @method setMaxLRUCacheSize
|
|
179
162
|
* @public
|
|
180
|
-
* @static
|
|
181
|
-
* @for @ember-data/request-utils/string
|
|
182
163
|
* @param {Number} size
|
|
183
164
|
* @return {void}
|
|
184
165
|
* @since 4.13.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform-BixPrO0I.js","sources":["../src/-private/string/transform.ts"],"sourcesContent":["import { DEBUG } from '@warp-drive/build-config/env';\n\nconst DEFAULT_MAX_CACHE_SIZE = 10_000;\nexport class LRUCache<T, V> {\n declare size: number;\n declare state: Map<T, V>;\n declare doWork: (k: T) => V;\n\n // debug stats\n declare _hits: number;\n declare _misses: number;\n declare _ejected: number;\n\n constructor(doWork: (k: T) => V, size?: number) {\n this.size = size || DEFAULT_MAX_CACHE_SIZE;\n this.state = new Map();\n this.doWork = doWork;\n\n if (DEBUG) {\n this._hits = 0;\n this._misses = 0;\n this._ejected = 0;\n }\n }\n get(key: T) {\n const value = this.state.get(key);\n if (value) {\n if (DEBUG) {\n this._hits++;\n }\n this.state.delete(key);\n this.state.set(key, value);\n return value;\n }\n if (DEBUG) {\n this._misses++;\n }\n\n const newValue = this.doWork(key);\n this.set(key, newValue);\n return newValue;\n }\n\n set(key: T, value: V) {\n if (this.state.size === this.size) {\n for (const [k] of this.state) {\n if (DEBUG) {\n this._ejected++;\n }\n this.state.delete(k);\n break;\n }\n }\n this.state.set(key, value);\n }\n\n clear() {\n this.state.clear();\n if (DEBUG) {\n this._hits = 0;\n this._misses = 0;\n this._ejected = 0;\n }\n }\n}\n\nconst STRING_DASHERIZE_REGEXP = /[ _]/g;\nconst STRING_DECAMELIZE_REGEXP = /([a-z\\d])([A-Z])/g;\nconst STRING_DASHERIZE_CACHE = new LRUCache<string, string>((key: string) =>\n key.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase().replace(STRING_DASHERIZE_REGEXP, '-')\n);\n\n// eslint-disable-next-line no-useless-escape\nconst STRING_CAMELIZE_REGEXP_1 = /(\\-|\\_|\\.|\\s)+(.)?/g;\nconst STRING_CAMELIZE_REGEXP_2 = /(^|\\/)([A-Z])/g;\nconst CAMELIZE_CACHE = new LRUCache<string, string>((key: string) =>\n key\n .replace(STRING_CAMELIZE_REGEXP_1, (_match, _separator, chr: string | null) => (chr ? chr.toUpperCase() : ''))\n .replace(STRING_CAMELIZE_REGEXP_2, (match /*, separator, chr */) => match.toLowerCase())\n);\n\nconst STRING_UNDERSCORE_REGEXP_1 = /([a-z\\d])([A-Z]+)/g;\n// eslint-disable-next-line no-useless-escape\nconst STRING_UNDERSCORE_REGEXP_2 = /\\-|\\s+/g;\nconst UNDERSCORE_CACHE = new LRUCache<string, string>((str: string) =>\n str.replace(STRING_UNDERSCORE_REGEXP_1, '$1_$2').replace(STRING_UNDERSCORE_REGEXP_2, '_').toLowerCase()\n);\n\nconst STRING_CAPITALIZE_REGEXP = /(^|\\/)([a-z\\u00C0-\\u024F])/g;\nconst CAPITALIZE_CACHE = new LRUCache<string, string>((str: string) =>\n str.replace(STRING_CAPITALIZE_REGEXP, (match /*, separator, chr */) => match.toUpperCase())\n);\n\n/**\n * Replaces underscores, spaces, or camelCase with dashes.\n *\n * ```js\n * import { dasherize } from '@ember-data/request-utils/string';\n *\n * dasherize('innerHTML'); // 'inner-html'\n * dasherize('action_name'); // 'action-name'\n * dasherize('css-class-name'); // 'css-class-name'\n * dasherize('my favorite items'); // 'my-favorite-items'\n * dasherize('privateDocs/ownerInvoice'; // 'private-docs/owner-invoice'\n * ```\n *\n * @public\n * @param {String} str\n * @return {String}\n * @since 4.13.0\n */\nexport function dasherize(str: string): string {\n return STRING_DASHERIZE_CACHE.get(str);\n}\n\n/**\n * Returns the lowerCamelCase form of a string.\n *\n * ```js\n * import { camelize } from '@ember-data/request-utils/string';\n *\n * camelize('innerHTML'); // 'innerHTML'\n * camelize('action_name'); // 'actionName'\n * camelize('css-class-name'); // 'cssClassName'\n * camelize('my favorite items'); // 'myFavoriteItems'\n * camelize('My Favorite Items'); // 'myFavoriteItems'\n * camelize('private-docs/owner-invoice'); // 'privateDocs/ownerInvoice'\n * ```\n *\n * @public\n * @param {String} str\n * @return {String}\n * @since 4.13.0\n */\nexport function camelize(str: string): string {\n return CAMELIZE_CACHE.get(str);\n}\n\n/**\n * Returns the lower\\_case\\_and\\_underscored form of a string.\n *\n * ```js\n * import { underscore } from '@ember-data/request-utils/string';\n *\n * underscore('innerHTML'); // 'inner_html'\n * underscore('action_name'); // 'action_name'\n * underscore('css-class-name'); // 'css_class_name'\n * underscore('my favorite items'); // 'my_favorite_items'\n * underscore('privateDocs/ownerInvoice'); // 'private_docs/owner_invoice'\n * ```\n *\n * @public\n * @param {String} str\n * @return {String}\n * @since 4.13.0\n */\nexport function underscore(str: string): string {\n return UNDERSCORE_CACHE.get(str);\n}\n\n/**\n * Returns the Capitalized form of a string\n *\n * ```js\n * import { capitalize } from '@ember-data/request-utils/string';\n *\n * capitalize('innerHTML') // 'InnerHTML'\n * capitalize('action_name') // 'Action_name'\n * capitalize('css-class-name') // 'Css-class-name'\n * capitalize('my favorite items') // 'My favorite items'\n * capitalize('privateDocs/ownerInvoice'); // 'PrivateDocs/ownerInvoice'\n * ```\n *\n * @public\n * @param {String} str\n * @return {String}\n * @since 4.13.0\n */\nexport function capitalize(str: string): string {\n return CAPITALIZE_CACHE.get(str);\n}\n\n/**\n * Sets the maximum size of the LRUCache for all string transformation functions.\n * The default size is 10,000.\n *\n * @public\n * @param {Number} size\n * @return {void}\n * @since 4.13.0\n */\nexport function setMaxLRUCacheSize(size: number) {\n CAMELIZE_CACHE.size = size;\n UNDERSCORE_CACHE.size = size;\n CAPITALIZE_CACHE.size = size;\n STRING_DASHERIZE_CACHE.size = size;\n}\n"],"names":["DEFAULT_MAX_CACHE_SIZE","LRUCache","constructor","doWork","size","state","Map","macroCondition","getGlobalConfig","WarpDrive","env","DEBUG","_hits","_misses","_ejected","get","key","value","delete","set","newValue","k","clear","STRING_DASHERIZE_REGEXP","STRING_DECAMELIZE_REGEXP","STRING_DASHERIZE_CACHE","replace","toLowerCase","STRING_CAMELIZE_REGEXP_1","STRING_CAMELIZE_REGEXP_2","CAMELIZE_CACHE","_match","_separator","chr","toUpperCase","match","STRING_UNDERSCORE_REGEXP_1","STRING_UNDERSCORE_REGEXP_2","UNDERSCORE_CACHE","str","STRING_CAPITALIZE_REGEXP","CAPITALIZE_CACHE","dasherize","camelize","underscore","capitalize","setMaxLRUCacheSize"],"mappings":";;AAEA,MAAMA,sBAAsB,GAAG,MAAM;AAC9B,MAAMC,QAAQ,CAAO;AAK1B;;AAKAC,EAAAA,WAAWA,CAACC,MAAmB,EAAEC,IAAa,EAAE;AAC9C,IAAA,IAAI,CAACA,IAAI,GAAGA,IAAI,IAAIJ,sBAAsB;AAC1C,IAAA,IAAI,CAACK,KAAK,GAAG,IAAIC,GAAG,EAAE;IACtB,IAAI,CAACH,MAAM,GAAGA,MAAM;IAEpB,IAAAI,cAAA,CAAAC,eAAA,EAAA,CAAAC,SAAA,CAAAC,GAAA,CAAAC,KAAA,CAAW,EAAA;MACT,IAAI,CAACC,KAAK,GAAG,CAAC;MACd,IAAI,CAACC,OAAO,GAAG,CAAC;MAChB,IAAI,CAACC,QAAQ,GAAG,CAAC;AACnB;AACF;EACAC,GAAGA,CAACC,GAAM,EAAE;IACV,MAAMC,KAAK,GAAG,IAAI,CAACZ,KAAK,CAACU,GAAG,CAACC,GAAG,CAAC;AACjC,IAAA,IAAIC,KAAK,EAAE;MACT,IAAAV,cAAA,CAAAC,eAAA,EAAA,CAAAC,SAAA,CAAAC,GAAA,CAAAC,KAAA,CAAW,EAAA;QACT,IAAI,CAACC,KAAK,EAAE;AACd;AACA,MAAA,IAAI,CAACP,KAAK,CAACa,MAAM,CAACF,GAAG,CAAC;MACtB,IAAI,CAACX,KAAK,CAACc,GAAG,CAACH,GAAG,EAAEC,KAAK,CAAC;AAC1B,MAAA,OAAOA,KAAK;AACd;IACA,IAAAV,cAAA,CAAAC,eAAA,EAAA,CA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G,CAACwB,GAAG,CAAC;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASK,UAAUA,CAACL,GAAW,EAAU;AAC9C,EAAA,OAAOD,gBAAgB,CAACvB,GAAG,CAACwB,GAAG,CAAC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASM,UAAUA,CAACN,GAAW,EAAU;AAC9C,EAAA,OAAOE,gBAAgB,CAAC1B,GAAG,CAACwB,GAAG,CAAC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASO,kBAAkBA,CAAC1C,IAAY,EAAE;EAC/C0B,cAAc,CAAC1B,IAAI,GAAGA,IAAI;EAC1BkC,gBAAgB,CAAClC,IAAI,GAAGA,IAAI;EAC5BqC,gBAAgB,CAACrC,IAAI,GAAGA,IAAI;EAC5BqB,sBAAsB,CAACrB,IAAI,GAAGA,IAAI;AACpC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-data/request-utils",
|
|
3
3
|
"description": "Request Building Utilities for use with EmberData",
|
|
4
|
-
"version": "5.6.0-alpha.
|
|
4
|
+
"version": "5.6.0-alpha.5",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Chris Thoburn <runspired@users.noreply.github.com>",
|
|
@@ -12,9 +12,6 @@
|
|
|
12
12
|
},
|
|
13
13
|
"homepage": "https://github.com/emberjs/data",
|
|
14
14
|
"bugs": "https://github.com/emberjs/data/issues",
|
|
15
|
-
"engines": {
|
|
16
|
-
"node": ">= 18.20.8"
|
|
17
|
-
},
|
|
18
15
|
"keywords": [
|
|
19
16
|
"ember-addon"
|
|
20
17
|
],
|
|
@@ -47,8 +44,6 @@
|
|
|
47
44
|
},
|
|
48
45
|
"peerDependencies": {
|
|
49
46
|
"@ember/string": "^3.1.1 || ^4.0.0",
|
|
50
|
-
"@warp-drive/core-types": "5.6.0-alpha.3",
|
|
51
|
-
"@ember-data/request": "5.6.0-alpha.3",
|
|
52
47
|
"ember-inflector": "^4.0.2 || ^5.0.0 || ^6.0.0"
|
|
53
48
|
},
|
|
54
49
|
"peerDependenciesMeta": {
|
|
@@ -61,7 +56,8 @@
|
|
|
61
56
|
},
|
|
62
57
|
"dependencies": {
|
|
63
58
|
"@embroider/macros": "^1.16.12",
|
|
64
|
-
"@warp-drive/build-config": "5.6.0-alpha.
|
|
59
|
+
"@warp-drive/build-config": "5.6.0-alpha.5",
|
|
60
|
+
"@warp-drive/core": "5.6.0-alpha.5"
|
|
65
61
|
},
|
|
66
62
|
"devDependencies": {
|
|
67
63
|
"@babel/core": "^7.26.10",
|
|
@@ -70,9 +66,7 @@
|
|
|
70
66
|
"@babel/preset-typescript": "^7.27.0",
|
|
71
67
|
"@glimmer/component": "^2.0.0",
|
|
72
68
|
"@ember/string": "4.0.1",
|
|
73
|
-
"@warp-drive/
|
|
74
|
-
"@ember-data/request": "5.6.0-alpha.3",
|
|
75
|
-
"@warp-drive/internal-config": "5.6.0-alpha.3",
|
|
69
|
+
"@warp-drive/internal-config": "5.6.0-alpha.5",
|
|
76
70
|
"ember-source": "~6.3.0",
|
|
77
71
|
"ember-inflector": "6.0.0",
|
|
78
72
|
"typescript": "^5.8.3",
|
|
@@ -1,50 +1,42 @@
|
|
|
1
1
|
declare module '@ember-data/request-utils/-private/handlers/auto-compress' {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
import type { Future, Handler, NextFn, RequestContext } from '@ember-data/request';
|
|
2
|
+
import type { Future, Handler, NextFn } from '@warp-drive/core/request';
|
|
3
|
+
import type { RequestContext } from '@warp-drive/core/types/request';
|
|
6
4
|
export const SupportsRequestStreams: boolean;
|
|
7
5
|
interface Constraints {
|
|
8
6
|
/**
|
|
9
7
|
* The minimum size at which to compress blobs
|
|
10
8
|
*
|
|
11
9
|
* @default 1000
|
|
12
|
-
* @typedoc
|
|
13
10
|
*/
|
|
14
11
|
Blob?: number;
|
|
15
12
|
/**
|
|
16
13
|
* The minimum size at which to compress array buffers
|
|
17
14
|
*
|
|
18
15
|
* @default 1000
|
|
19
|
-
* @typedoc
|
|
20
16
|
*/
|
|
21
17
|
ArrayBuffer?: number;
|
|
22
18
|
/**
|
|
23
19
|
* The minimum size at which to compress typed arrays
|
|
24
20
|
*
|
|
25
21
|
* @default 1000
|
|
26
|
-
* @typedoc
|
|
27
22
|
*/
|
|
28
23
|
TypedArray?: number;
|
|
29
24
|
/**
|
|
30
25
|
* The minimum size at which to compress data views
|
|
31
26
|
*
|
|
32
27
|
* @default 1000
|
|
33
|
-
* @typedoc
|
|
34
28
|
*/
|
|
35
29
|
DataView?: number;
|
|
36
30
|
/**
|
|
37
31
|
* The minimum size at which to compress strings
|
|
38
32
|
*
|
|
39
33
|
* @default 1000
|
|
40
|
-
* @typedoc
|
|
41
34
|
*/
|
|
42
35
|
String?: number;
|
|
43
36
|
}
|
|
44
37
|
/**
|
|
45
38
|
* Options for configuring the AutoCompress handler.
|
|
46
39
|
*
|
|
47
|
-
* @typedoc
|
|
48
40
|
*/
|
|
49
41
|
interface CompressionOptions {
|
|
50
42
|
/**
|
|
@@ -53,7 +45,6 @@ declare module '@ember-data/request-utils/-private/handlers/auto-compress' {
|
|
|
53
45
|
*
|
|
54
46
|
* The default is `gzip`.
|
|
55
47
|
*
|
|
56
|
-
* @typedoc
|
|
57
48
|
*/
|
|
58
49
|
format?: CompressionFormat;
|
|
59
50
|
/**
|
|
@@ -81,7 +72,6 @@ declare module '@ember-data/request-utils/-private/handlers/auto-compress' {
|
|
|
81
72
|
* in the chain can handle the request body as a stream.
|
|
82
73
|
*
|
|
83
74
|
* @default false
|
|
84
|
-
* @typedoc
|
|
85
75
|
*/
|
|
86
76
|
allowStreaming?: boolean;
|
|
87
77
|
/**
|
|
@@ -90,7 +80,6 @@ declare module '@ember-data/request-utils/-private/handlers/auto-compress' {
|
|
|
90
80
|
* in the chain can handle the request body as a stream.
|
|
91
81
|
*
|
|
92
82
|
* @default false
|
|
93
|
-
* @typedoc
|
|
94
83
|
*/
|
|
95
84
|
forceStreaming?: boolean;
|
|
96
85
|
/**
|
|
@@ -123,7 +112,6 @@ declare module '@ember-data/request-utils/-private/handlers/auto-compress' {
|
|
|
123
112
|
* enable compression for all values, and a value of `-1` will
|
|
124
113
|
* disable compression.
|
|
125
114
|
*
|
|
126
|
-
* @typedoc
|
|
127
115
|
*/
|
|
128
116
|
constraints?: Constraints;
|
|
129
117
|
}
|
|
@@ -152,7 +140,6 @@ declare module '@ember-data/request-utils/-private/handlers/auto-compress' {
|
|
|
152
140
|
* ```
|
|
153
141
|
*
|
|
154
142
|
* @class AutoCompress
|
|
155
|
-
* @extends Handler
|
|
156
143
|
* @public
|
|
157
144
|
* @since 5.5.0
|
|
158
145
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-compress.d.ts","sourceRoot":"","sources":["../../../src/-private/handlers/auto-compress.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"auto-compress.d.ts","sourceRoot":"","sources":["../../../src/-private/handlers/auto-compress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,KAAK,EAAc,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAMjF,eAAO,MAAM,sBAAsB,SAc/B,CAAC;AAEL,UAAU,WAAW;IACnB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,UAAU,kBAAkB;IAC1B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAE3B;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAWD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,YAAa,YAAW,OAAO;IAClC,OAAO,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG;QAAE,WAAW,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAA;KAAE,CAAC;gBAE3E,OAAO,GAAE,kBAAuB;IAU5C,OAAO,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;CA2DjF"}
|
|
@@ -3,10 +3,7 @@ declare module '@ember-data/request-utils/-private/string/inflect' {
|
|
|
3
3
|
* Marks a word as uncountable. Uncountable words are not pluralized
|
|
4
4
|
* or singularized.
|
|
5
5
|
*
|
|
6
|
-
* @method uncountable
|
|
7
6
|
* @public
|
|
8
|
-
* @static
|
|
9
|
-
* @for @ember-data/request-utils/string
|
|
10
7
|
* @param {String} word
|
|
11
8
|
* @return {void}
|
|
12
9
|
* @since 4.13.0
|
|
@@ -16,10 +13,7 @@ declare module '@ember-data/request-utils/-private/string/inflect' {
|
|
|
16
13
|
* Marks a list of words as uncountable. Uncountable words are not pluralized
|
|
17
14
|
* or singularized.
|
|
18
15
|
*
|
|
19
|
-
* @method loadUncountable
|
|
20
16
|
* @public
|
|
21
|
-
* @static
|
|
22
|
-
* @for @ember-data/request-utils/string
|
|
23
17
|
* @param {Array<String>} uncountables
|
|
24
18
|
* @return {void}
|
|
25
19
|
* @since 4.13.0
|
|
@@ -29,10 +23,7 @@ declare module '@ember-data/request-utils/-private/string/inflect' {
|
|
|
29
23
|
* Marks a word as irregular. Irregular words have unique
|
|
30
24
|
* pluralization and singularization rules.
|
|
31
25
|
*
|
|
32
|
-
* @method irregular
|
|
33
26
|
* @public
|
|
34
|
-
* @static
|
|
35
|
-
* @for @ember-data/request-utils/string
|
|
36
27
|
* @param {String} single
|
|
37
28
|
* @param {String} plur
|
|
38
29
|
* @return {void}
|
|
@@ -43,10 +34,7 @@ declare module '@ember-data/request-utils/-private/string/inflect' {
|
|
|
43
34
|
* Marks a list of word pairs as irregular. Irregular words have unique
|
|
44
35
|
* pluralization and singularization rules.
|
|
45
36
|
*
|
|
46
|
-
* @method loadIrregular
|
|
47
37
|
* @public
|
|
48
|
-
* @static
|
|
49
|
-
* @for @ember-data/request-utils/string
|
|
50
38
|
* @param {Array<Array<String>>} irregularPairs
|
|
51
39
|
* @return {void}
|
|
52
40
|
* @since 4.13.0
|
|
@@ -55,10 +43,7 @@ declare module '@ember-data/request-utils/-private/string/inflect' {
|
|
|
55
43
|
/**
|
|
56
44
|
* Clears the caches for singularize and pluralize.
|
|
57
45
|
*
|
|
58
|
-
* @method clear
|
|
59
46
|
* @public
|
|
60
|
-
* @static
|
|
61
|
-
* @for @ember-data/request-utils/string
|
|
62
47
|
* @return {void}
|
|
63
48
|
* @since 4.13.0
|
|
64
49
|
*/
|
|
@@ -66,10 +51,7 @@ declare module '@ember-data/request-utils/-private/string/inflect' {
|
|
|
66
51
|
/**
|
|
67
52
|
* Resets the inflection rules to the defaults.
|
|
68
53
|
*
|
|
69
|
-
* @method resetToDefaults
|
|
70
54
|
* @public
|
|
71
|
-
* @static
|
|
72
|
-
* @for @ember-data/request-utils/string
|
|
73
55
|
* @return {void}
|
|
74
56
|
* @since 4.13.0
|
|
75
57
|
*/
|
|
@@ -78,10 +60,7 @@ declare module '@ember-data/request-utils/-private/string/inflect' {
|
|
|
78
60
|
* Clears all inflection rules
|
|
79
61
|
* and resets the caches for singularize and pluralize.
|
|
80
62
|
*
|
|
81
|
-
* @method clearRules
|
|
82
63
|
* @public
|
|
83
|
-
* @static
|
|
84
|
-
* @for @ember-data/request-utils/string
|
|
85
64
|
* @return {void}
|
|
86
65
|
* @since 4.13.0
|
|
87
66
|
*/
|
|
@@ -89,10 +68,7 @@ declare module '@ember-data/request-utils/-private/string/inflect' {
|
|
|
89
68
|
/**
|
|
90
69
|
* Singularizes a word.
|
|
91
70
|
*
|
|
92
|
-
* @method singularize
|
|
93
71
|
* @public
|
|
94
|
-
* @static
|
|
95
|
-
* @for @ember-data/request-utils/string
|
|
96
72
|
* @param {String} word
|
|
97
73
|
* @return {String}
|
|
98
74
|
* @since 4.13.0
|
|
@@ -101,10 +77,7 @@ declare module '@ember-data/request-utils/-private/string/inflect' {
|
|
|
101
77
|
/**
|
|
102
78
|
* Pluralizes a word.
|
|
103
79
|
*
|
|
104
|
-
* @method pluralize
|
|
105
80
|
* @public
|
|
106
|
-
* @static
|
|
107
|
-
* @for @ember-data/request-utils/string
|
|
108
81
|
* @param {String} word
|
|
109
82
|
* @return {String}
|
|
110
83
|
* @since 4.13.0
|
|
@@ -113,10 +86,7 @@ declare module '@ember-data/request-utils/-private/string/inflect' {
|
|
|
113
86
|
/**
|
|
114
87
|
* Adds a pluralization rule.
|
|
115
88
|
*
|
|
116
|
-
* @method plural
|
|
117
89
|
* @public
|
|
118
|
-
* @static
|
|
119
|
-
* @for @ember-data/request-utils/string
|
|
120
90
|
* @param {RegExp} regex
|
|
121
91
|
* @param {String} string
|
|
122
92
|
* @return {void}
|
|
@@ -126,10 +96,7 @@ declare module '@ember-data/request-utils/-private/string/inflect' {
|
|
|
126
96
|
/**
|
|
127
97
|
* Adds a singularization rule.
|
|
128
98
|
*
|
|
129
|
-
* @method singular
|
|
130
99
|
* @public
|
|
131
|
-
* @static
|
|
132
|
-
* @for @ember-data/request-utils/string
|
|
133
100
|
* @param {RegExp} regex
|
|
134
101
|
* @param {String} string
|
|
135
102
|
* @return {void}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inflect.d.ts","sourceRoot":"","sources":["../../../src/-private/string/inflect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inflect.d.ts","sourceRoot":"","sources":["../../../src/-private/string/inflect.ts"],"names":[],"mappings":"AAsBA;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,QAEvC;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,QAIrD;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAQrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,QAUpE;AAGD;;;;;;GAMG;AACH,wBAAgB,KAAK,SAGpB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,SAM9B;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,SAQzB;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,UAIvC;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,UAIrC;AAWD;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAQnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAQrD"}
|
|
@@ -24,10 +24,7 @@ declare module '@ember-data/request-utils/-private/string/transform' {
|
|
|
24
24
|
* dasherize('privateDocs/ownerInvoice'; // 'private-docs/owner-invoice'
|
|
25
25
|
* ```
|
|
26
26
|
*
|
|
27
|
-
* @method dasherize
|
|
28
27
|
* @public
|
|
29
|
-
* @static
|
|
30
|
-
* @for @ember-data/request-utils/string
|
|
31
28
|
* @param {String} str
|
|
32
29
|
* @return {String}
|
|
33
30
|
* @since 4.13.0
|
|
@@ -47,10 +44,7 @@ declare module '@ember-data/request-utils/-private/string/transform' {
|
|
|
47
44
|
* camelize('private-docs/owner-invoice'); // 'privateDocs/ownerInvoice'
|
|
48
45
|
* ```
|
|
49
46
|
*
|
|
50
|
-
* @method camelize
|
|
51
47
|
* @public
|
|
52
|
-
* @static
|
|
53
|
-
* @for @ember-data/request-utils/string
|
|
54
48
|
* @param {String} str
|
|
55
49
|
* @return {String}
|
|
56
50
|
* @since 4.13.0
|
|
@@ -69,10 +63,7 @@ declare module '@ember-data/request-utils/-private/string/transform' {
|
|
|
69
63
|
* underscore('privateDocs/ownerInvoice'); // 'private_docs/owner_invoice'
|
|
70
64
|
* ```
|
|
71
65
|
*
|
|
72
|
-
* @method underscore
|
|
73
66
|
* @public
|
|
74
|
-
* @static
|
|
75
|
-
* @for @ember-data/request-utils/string
|
|
76
67
|
* @param {String} str
|
|
77
68
|
* @return {String}
|
|
78
69
|
* @since 4.13.0
|
|
@@ -91,10 +82,7 @@ declare module '@ember-data/request-utils/-private/string/transform' {
|
|
|
91
82
|
* capitalize('privateDocs/ownerInvoice'); // 'PrivateDocs/ownerInvoice'
|
|
92
83
|
* ```
|
|
93
84
|
*
|
|
94
|
-
* @method capitalize
|
|
95
|
-
* @static
|
|
96
85
|
* @public
|
|
97
|
-
* @for @ember-data/request-utils/string
|
|
98
86
|
* @param {String} str
|
|
99
87
|
* @return {String}
|
|
100
88
|
* @since 4.13.0
|
|
@@ -104,10 +92,7 @@ declare module '@ember-data/request-utils/-private/string/transform' {
|
|
|
104
92
|
* Sets the maximum size of the LRUCache for all string transformation functions.
|
|
105
93
|
* The default size is 10,000.
|
|
106
94
|
*
|
|
107
|
-
* @method setMaxLRUCacheSize
|
|
108
95
|
* @public
|
|
109
|
-
* @static
|
|
110
|
-
* @for @ember-data/request-utils/string
|
|
111
96
|
* @param {Number} size
|
|
112
97
|
* @return {void}
|
|
113
98
|
* @since 4.13.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/-private/string/transform.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/-private/string/transform.ts"],"names":[],"mappings":"AAGA,qBAAa,QAAQ,CAAC,CAAC,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACjB,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IAGpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;gBAEb,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM;IAW9C,GAAG,CAAC,GAAG,EAAE,CAAC;IAmBV,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC;IAapB,KAAK;CAQN;AA6BD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,QAK9C"}
|
|
@@ -3,9 +3,8 @@ declare module '@ember-data/request-utils/handlers' {
|
|
|
3
3
|
* A selection of pre-built request handlers for handling common
|
|
4
4
|
* request scenarios.
|
|
5
5
|
*
|
|
6
|
-
* @module
|
|
7
|
-
* @main @ember-data/request-utils/handlers
|
|
6
|
+
* @module
|
|
8
7
|
*/
|
|
9
|
-
export { AutoCompress, SupportsRequestStreams } from '@ember-data/request-utils/-private/handlers/auto-compress';
|
|
8
|
+
export { AutoCompress, SupportsRequestStreams } from '@ember-data/request-utils/-private/handlers/auto-compress.ts';
|
|
10
9
|
}
|
|
11
10
|
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../src/handlers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../src/handlers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC"}
|