@ember-data/request-utils 5.4.0-alpha.1 → 5.4.0-alpha.100

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/addon/index.js DELETED
@@ -1,213 +0,0 @@
1
- import { assert } from '@ember/debug';
2
-
3
- /**
4
- * Simple utility function to assist in url building,
5
- * query params, and other common request operations.
6
- *
7
- * These primitives may be used directly or composed
8
- * by request builders to provide a consistent interface
9
- * for building requests.
10
- *
11
- * For instance:
12
- *
13
- * ```ts
14
- * import { buildBaseURL, buildQueryParams } from '@ember-data/request-utils';
15
- *
16
- * const baseURL = buildBaseURL({
17
- * host: 'https://api.example.com',
18
- * namespace: 'api/v1',
19
- * resourcePath: 'emberDevelopers',
20
- * op: 'query',
21
- * identifier: { type: 'ember-developer' }
22
- * });
23
- * const url = `${baseURL}?${buildQueryParams({ name: 'Chris', include:['pets'] })}`;
24
- * // => 'https://api.example.com/api/v1/emberDevelopers?include=pets&name=Chris'
25
- * ```
26
- *
27
- * This is useful, but not as useful as the REST request builder for query which is sugar
28
- * over this (and more!):
29
- *
30
- * ```ts
31
- * import { query } from '@ember-data/rest/request';
32
- *
33
- * const options = query('ember-developer', { name: 'Chris', include:['pets'] });
34
- * // => { url: 'https://api.example.com/api/v1/emberDevelopers?include=pets&name=Chris' }
35
- * // Note: options will also include other request options like headers, method, etc.
36
- * ```
37
- *
38
- * @module @ember-data/request-utils
39
- * @main @ember-data/request-utils
40
- * @public
41
- */
42
-
43
- // prevents the final constructed object from needing to add
44
- // host and namespace which are provided by the final consuming
45
- // class to the prototype which can result in overwrite errors
46
- let CONFIG = {
47
- host: '',
48
- namespace: ''
49
- };
50
- function setBuildURLConfig(values) {
51
- CONFIG = values;
52
- }
53
- const OPERATIONS_WITH_PRIMARY_RECORDS = new Set(['findRecord', 'findRelatedRecord', 'findRelatedCollection', 'updateRecord', 'deleteRecord']);
54
- function isOperationWithPrimaryRecord(options) {
55
- return OPERATIONS_WITH_PRIMARY_RECORDS.has(options.op);
56
- }
57
- function resourcePathForType(options) {
58
- return options.op === 'findMany' ? options.identifiers[0].type : options.identifier.type;
59
- }
60
-
61
- /**
62
- * Builds a URL for a request based on the provided options.
63
- * Does not include support for building query params (see `buildQueryParams`)
64
- * so that it may be composed cleanly with other query-params strategies.
65
- *
66
- * Usage:
67
- *
68
- * ```ts
69
- * import { buildBaseURL } from '@ember-data/request-utils';
70
- *
71
- * const url = buildBaseURL({
72
- * host: 'https://api.example.com',
73
- * namespace: 'api/v1',
74
- * resourcePath: 'emberDevelopers',
75
- * op: 'query',
76
- * identifier: { type: 'ember-developer' }
77
- * });
78
- *
79
- * // => 'https://api.example.com/api/v1/emberDevelopers'
80
- * ```
81
- *
82
- * On the surface this may seem like a lot of work to do something simple, but
83
- * it is designed to be composable with other utilities and interfaces that the
84
- * average product engineer will never need to see or use.
85
- *
86
- * A few notes:
87
- *
88
- * - `resourcePath` is optional, but if it is not provided, `identifier.type` will be used.
89
- * - `host` and `namespace` are optional, but if they are not provided, the values globally
90
- * configured via `setBuildURLConfig` will be used.
91
- * - `op` is required and must be one of the following:
92
- * - 'findRecord' 'query' 'findMany' 'findRelatedCollection' 'findRelatedRecord'` 'createRecord' 'updateRecord' 'deleteRecord'
93
- * - Depending on the value of `op`, `identifier` or `identifiers` will be required.
94
- *
95
- * @method buildBaseURL
96
- * @static
97
- * @public
98
- * @for @ember-data/request-utils
99
- * @param urlOptions
100
- * @returns string
101
- */
102
- function buildBaseURL(urlOptions) {
103
- const options = Object.assign({
104
- host: CONFIG.host,
105
- namespace: CONFIG.namespace
106
- }, urlOptions);
107
- assert(`buildBaseURL: You must pass \`op\` as part of options`, typeof options.op === 'string' && options.op.length > 0);
108
- assert(`buildBaseURL: You must pass \`identifier\` as part of options`, options.op === 'findMany' || options.identifier && typeof options.identifier === 'object');
109
- assert(`buildBaseURL: You must pass \`identifiers\` as part of options`, options.op !== 'findMany' || options.identifiers && Array.isArray(options.identifiers) && options.identifiers.length > 0 && options.identifiers.every(i => i && typeof i === 'object'));
110
- assert(`buildBaseURL: You must pass valid \`identifier\` as part of options, expected 'id'`, !isOperationWithPrimaryRecord(options) || typeof options.identifier.id === 'string' && options.identifier.id.length > 0);
111
- assert(`buildBaseURL: You must pass \`identifiers\` as part of options`, options.op !== 'findMany' || options.identifiers.every(i => typeof i.id === 'string' && i.id.length > 0));
112
- assert(`buildBaseURL: You must pass valid \`identifier\` as part of options, expected 'type'`, options.op === 'findMany' || typeof options.identifier.type === 'string' && options.identifier.type.length > 0);
113
- assert(`buildBaseURL: You must pass valid \`identifiers\` as part of options, expected 'type'`, options.op !== 'findMany' || typeof options.identifiers[0].type === 'string' && options.identifiers[0].type.length > 0);
114
-
115
- // prettier-ignore
116
- const idPath = isOperationWithPrimaryRecord(options) ? encodeURIComponent(options.identifier.id) : '';
117
- const resourcePath = options.resourcePath || resourcePathForType(options);
118
- const {
119
- host,
120
- namespace
121
- } = options;
122
- const fieldPath = 'fieldPath' in options ? options.fieldPath : '';
123
- assert(`buildBaseURL: You tried to build a ${String(options.op)} request to ${resourcePath} but op must be one of "${['findRecord', 'findRelatedRecord', 'findRelatedCollection', 'updateRecord', 'deleteRecord', 'createRecord', 'query', 'findMany'].join('","')}".`, ['findRecord', 'query', 'findMany', 'findRelatedCollection', 'findRelatedRecord', 'createRecord', 'updateRecord', 'deleteRecord'].includes(options.op));
124
- assert(`buildBaseURL: host must NOT end with '/', received '${host}'`, host === '/' || !host.endsWith('/'));
125
- assert(`buildBaseURL: namespace must NOT start with '/', received '${namespace}'`, !namespace.startsWith('/'));
126
- assert(`buildBaseURL: namespace must NOT end with '/', received '${namespace}'`, !namespace.endsWith('/'));
127
- assert(`buildBaseURL: resourcePath must NOT start with '/', received '${resourcePath}'`, !resourcePath.startsWith('/'));
128
- assert(`buildBaseURL: resourcePath must NOT end with '/', received '${resourcePath}'`, !resourcePath.endsWith('/'));
129
- assert(`buildBaseURL: fieldPath must NOT start with '/', received '${fieldPath}'`, !fieldPath.startsWith('/'));
130
- assert(`buildBaseURL: fieldPath must NOT end with '/', received '${fieldPath}'`, !fieldPath.endsWith('/'));
131
- assert(`buildBaseURL: idPath must NOT start with '/', received '${idPath}'`, !idPath.startsWith('/'));
132
- assert(`buildBaseURL: idPath must NOT end with '/', received '${idPath}'`, !idPath.endsWith('/'));
133
- const url = [host === '/' ? '' : host, namespace, resourcePath, idPath, fieldPath].filter(Boolean).join('/');
134
- return host ? url : `/${url}`;
135
- }
136
- const DEFAULT_QUERY_PARAMS_SERIALIZATION_OPTIONS = {
137
- arrayFormat: 'comma'
138
- };
139
- function handleInclude(include) {
140
- assert(`Expected include to be a string or array, got ${typeof include}`, typeof include === 'string' || Array.isArray(include));
141
- return typeof include === 'string' ? include.split(',') : include;
142
- }
143
- function filterEmpty(obj) {
144
- const result = {};
145
- for (const key in obj) {
146
- const value = obj[key];
147
- if (value) {
148
- if (!Array.isArray(value) || value.length > 0) {
149
- result[key] = obj[key];
150
- }
151
- }
152
- }
153
- return result;
154
- }
155
- function sortQueryParams(params, options) {
156
- options = Object.assign({}, DEFAULT_QUERY_PARAMS_SERIALIZATION_OPTIONS, options);
157
- const paramsIsObject = !(params instanceof URLSearchParams);
158
- const urlParams = new URLSearchParams();
159
- const dictionaryParams = paramsIsObject ? params : {};
160
- if (!paramsIsObject) {
161
- params.forEach((value, key) => {
162
- const hasExisting = (key in dictionaryParams);
163
- if (!hasExisting) {
164
- dictionaryParams[key] = value;
165
- } else {
166
- const existingValue = dictionaryParams[key];
167
- if (Array.isArray(existingValue)) {
168
- existingValue.push(value);
169
- } else {
170
- dictionaryParams[key] = [existingValue, value];
171
- }
172
- }
173
- });
174
- }
175
- if ('include' in dictionaryParams) {
176
- dictionaryParams.include = handleInclude(dictionaryParams.include);
177
- }
178
- const sortedKeys = Object.keys(dictionaryParams).sort();
179
- sortedKeys.forEach(key => {
180
- const value = dictionaryParams[key];
181
- if (Array.isArray(value)) {
182
- value.sort();
183
- switch (options.arrayFormat) {
184
- case 'indices':
185
- value.forEach((v, i) => {
186
- urlParams.append(`${key}[${i}]`, String(v));
187
- });
188
- return;
189
- case 'bracket':
190
- value.forEach(v => {
191
- urlParams.append(`${key}[]`, String(v));
192
- });
193
- return;
194
- case 'repeat':
195
- value.forEach(v => {
196
- urlParams.append(key, String(v));
197
- });
198
- return;
199
- case 'comma':
200
- default:
201
- urlParams.append(key, value.join(','));
202
- return;
203
- }
204
- } else {
205
- urlParams.append(key, String(value));
206
- }
207
- });
208
- return urlParams;
209
- }
210
- function buildQueryParams(params, options) {
211
- return sortQueryParams(params, options).toString();
212
- }
213
- export { buildBaseURL, buildQueryParams, filterEmpty, setBuildURLConfig, sortQueryParams };
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { assert } from '@ember/debug';\n\n/**\n * Simple utility function to assist in url building,\n * query params, and other common request operations.\n *\n * These primitives may be used directly or composed\n * by request builders to provide a consistent interface\n * for building requests.\n *\n * For instance:\n *\n * ```ts\n * import { buildBaseURL, buildQueryParams } from '@ember-data/request-utils';\n *\n * const baseURL = buildBaseURL({\n * host: 'https://api.example.com',\n * namespace: 'api/v1',\n * resourcePath: 'emberDevelopers',\n * op: 'query',\n * identifier: { type: 'ember-developer' }\n * });\n * const url = `${baseURL}?${buildQueryParams({ name: 'Chris', include:['pets'] })}`;\n * // => 'https://api.example.com/api/v1/emberDevelopers?include=pets&name=Chris'\n * ```\n *\n * This is useful, but not as useful as the REST request builder for query which is sugar\n * over this (and more!):\n *\n * ```ts\n * import { query } from '@ember-data/rest/request';\n *\n * const options = query('ember-developer', { name: 'Chris', include:['pets'] });\n * // => { url: 'https://api.example.com/api/v1/emberDevelopers?include=pets&name=Chris' }\n * // Note: options will also include other request options like headers, method, etc.\n * ```\n *\n * @module @ember-data/request-utils\n * @main @ember-data/request-utils\n * @public\n */\n\n// prevents the final constructed object from needing to add\n// host and namespace which are provided by the final consuming\n// class to the prototype which can result in overwrite errors\n\ninterface BuildURLConfig {\n host: string | null;\n namespace: string | null;\n}\n\nlet CONFIG: BuildURLConfig = {\n host: '',\n namespace: '',\n};\n\nexport function setBuildURLConfig(values: BuildURLConfig) {\n CONFIG = values;\n}\n\nexport interface FindRecordUrlOptions {\n op: 'findRecord';\n identifier: { type: string; id: string };\n resourcePath?: string;\n host?: string;\n namespace?: string;\n}\n\nexport interface QueryUrlOptions {\n op: 'query';\n identifier: { type: string };\n resourcePath?: string;\n host?: string;\n namespace?: string;\n}\n\nexport interface FindManyUrlOptions {\n op: 'findMany';\n identifiers: { type: string; id: string }[];\n resourcePath?: string;\n host?: string;\n namespace?: string;\n}\nexport interface FindRelatedCollectionUrlOptions {\n op: 'findRelatedCollection';\n identifier: { type: string; id: string };\n fieldPath: string;\n resourcePath?: string;\n host?: string;\n namespace?: string;\n}\n\nexport interface FindRelatedResourceUrlOptions {\n op: 'findRelatedRecord';\n identifier: { type: string; id: string };\n fieldPath: string;\n resourcePath?: string;\n host?: string;\n namespace?: string;\n}\n\nexport interface CreateRecordUrlOptions {\n op: 'createRecord';\n identifier: { type: string };\n resourcePath?: string;\n host?: string;\n namespace?: string;\n}\n\nexport interface UpdateRecordUrlOptions {\n op: 'updateRecord';\n identifier: { type: string; id: string };\n resourcePath?: string;\n host?: string;\n namespace?: string;\n}\n\nexport interface DeleteRecordUrlOptions {\n op: 'deleteRecord';\n identifier: { type: string; id: string };\n resourcePath?: string;\n host?: string;\n namespace?: string;\n}\n\nexport type UrlOptions =\n | FindRecordUrlOptions\n | QueryUrlOptions\n | FindManyUrlOptions\n | FindRelatedCollectionUrlOptions\n | FindRelatedResourceUrlOptions\n | CreateRecordUrlOptions\n | UpdateRecordUrlOptions\n | DeleteRecordUrlOptions;\n\nconst OPERATIONS_WITH_PRIMARY_RECORDS = new Set([\n 'findRecord',\n 'findRelatedRecord',\n 'findRelatedCollection',\n 'updateRecord',\n 'deleteRecord',\n]);\n\nfunction isOperationWithPrimaryRecord(\n options: UrlOptions\n): options is\n | FindRecordUrlOptions\n | FindRelatedCollectionUrlOptions\n | FindRelatedResourceUrlOptions\n | UpdateRecordUrlOptions\n | DeleteRecordUrlOptions {\n return OPERATIONS_WITH_PRIMARY_RECORDS.has(options.op);\n}\n\nfunction resourcePathForType(options: UrlOptions): string {\n return options.op === 'findMany' ? options.identifiers[0].type : options.identifier.type;\n}\n\n/**\n * Builds a URL for a request based on the provided options.\n * Does not include support for building query params (see `buildQueryParams`)\n * so that it may be composed cleanly with other query-params strategies.\n *\n * Usage:\n *\n * ```ts\n * import { buildBaseURL } from '@ember-data/request-utils';\n *\n * const url = buildBaseURL({\n * host: 'https://api.example.com',\n * namespace: 'api/v1',\n * resourcePath: 'emberDevelopers',\n * op: 'query',\n * identifier: { type: 'ember-developer' }\n * });\n *\n * // => 'https://api.example.com/api/v1/emberDevelopers'\n * ```\n *\n * On the surface this may seem like a lot of work to do something simple, but\n * it is designed to be composable with other utilities and interfaces that the\n * average product engineer will never need to see or use.\n *\n * A few notes:\n *\n * - `resourcePath` is optional, but if it is not provided, `identifier.type` will be used.\n * - `host` and `namespace` are optional, but if they are not provided, the values globally\n * configured via `setBuildURLConfig` will be used.\n * - `op` is required and must be one of the following:\n * - 'findRecord' 'query' 'findMany' 'findRelatedCollection' 'findRelatedRecord'` 'createRecord' 'updateRecord' 'deleteRecord'\n * - Depending on the value of `op`, `identifier` or `identifiers` will be required.\n *\n * @method buildBaseURL\n * @static\n * @public\n * @for @ember-data/request-utils\n * @param urlOptions\n * @returns string\n */\nexport function buildBaseURL(urlOptions: UrlOptions): string {\n const options = Object.assign(\n {\n host: CONFIG.host,\n namespace: CONFIG.namespace,\n },\n urlOptions\n );\n assert(\n `buildBaseURL: You must pass \\`op\\` as part of options`,\n typeof options.op === 'string' && options.op.length > 0\n );\n assert(\n `buildBaseURL: You must pass \\`identifier\\` as part of options`,\n options.op === 'findMany' || (options.identifier && typeof options.identifier === 'object')\n );\n assert(\n `buildBaseURL: You must pass \\`identifiers\\` as part of options`,\n options.op !== 'findMany' ||\n (options.identifiers &&\n Array.isArray(options.identifiers) &&\n options.identifiers.length > 0 &&\n options.identifiers.every((i) => i && typeof i === 'object'))\n );\n assert(\n `buildBaseURL: You must pass valid \\`identifier\\` as part of options, expected 'id'`,\n !isOperationWithPrimaryRecord(options) ||\n (typeof options.identifier.id === 'string' && options.identifier.id.length > 0)\n );\n assert(\n `buildBaseURL: You must pass \\`identifiers\\` as part of options`,\n options.op !== 'findMany' || options.identifiers.every((i) => typeof i.id === 'string' && i.id.length > 0)\n );\n assert(\n `buildBaseURL: You must pass valid \\`identifier\\` as part of options, expected 'type'`,\n options.op === 'findMany' || (typeof options.identifier.type === 'string' && options.identifier.type.length > 0)\n );\n assert(\n `buildBaseURL: You must pass valid \\`identifiers\\` as part of options, expected 'type'`,\n options.op !== 'findMany' ||\n (typeof options.identifiers[0].type === 'string' && options.identifiers[0].type.length > 0)\n );\n\n // prettier-ignore\n const idPath: string =\n isOperationWithPrimaryRecord(options) ? encodeURIComponent(options.identifier.id)\n : '';\n const resourcePath = options.resourcePath || resourcePathForType(options);\n const { host, namespace } = options;\n const fieldPath = 'fieldPath' in options ? options.fieldPath : '';\n\n assert(\n `buildBaseURL: You tried to build a ${String(\n (options as { op: string }).op\n )} request to ${resourcePath} but op must be one of \"${[\n 'findRecord',\n 'findRelatedRecord',\n 'findRelatedCollection',\n 'updateRecord',\n 'deleteRecord',\n 'createRecord',\n 'query',\n 'findMany',\n ].join('\",\"')}\".`,\n [\n 'findRecord',\n 'query',\n 'findMany',\n 'findRelatedCollection',\n 'findRelatedRecord',\n 'createRecord',\n 'updateRecord',\n 'deleteRecord',\n ].includes(options.op)\n );\n\n assert(`buildBaseURL: host must NOT end with '/', received '${host}'`, host === '/' || !host.endsWith('/'));\n assert(`buildBaseURL: namespace must NOT start with '/', received '${namespace}'`, !namespace.startsWith('/'));\n assert(`buildBaseURL: namespace must NOT end with '/', received '${namespace}'`, !namespace.endsWith('/'));\n assert(\n `buildBaseURL: resourcePath must NOT start with '/', received '${resourcePath}'`,\n !resourcePath.startsWith('/')\n );\n assert(`buildBaseURL: resourcePath must NOT end with '/', received '${resourcePath}'`, !resourcePath.endsWith('/'));\n assert(`buildBaseURL: fieldPath must NOT start with '/', received '${fieldPath}'`, !fieldPath.startsWith('/'));\n assert(`buildBaseURL: fieldPath must NOT end with '/', received '${fieldPath}'`, !fieldPath.endsWith('/'));\n assert(`buildBaseURL: idPath must NOT start with '/', received '${idPath}'`, !idPath.startsWith('/'));\n assert(`buildBaseURL: idPath must NOT end with '/', received '${idPath}'`, !idPath.endsWith('/'));\n\n const url = [host === '/' ? '' : host, namespace, resourcePath, idPath, fieldPath].filter(Boolean).join('/');\n return host ? url : `/${url}`;\n}\n\ntype SerializablePrimitive = string | number | boolean | null;\ntype Serializable = SerializablePrimitive | SerializablePrimitive[];\nexport type QueryParamsSerializationOptions = {\n arrayFormat?: 'bracket' | 'indices' | 'repeat' | 'comma';\n};\nexport type QueryParamsSource = Record<string, Serializable> | URLSearchParams;\n\nconst DEFAULT_QUERY_PARAMS_SERIALIZATION_OPTIONS: QueryParamsSerializationOptions = {\n arrayFormat: 'comma',\n};\n\nfunction handleInclude(include: string | string[]): string[] {\n assert(\n `Expected include to be a string or array, got ${typeof include}`,\n typeof include === 'string' || Array.isArray(include)\n );\n return typeof include === 'string' ? include.split(',') : include;\n}\n\nexport function filterEmpty(obj: Record<string, Serializable>): Record<string, Serializable> {\n const result: Record<string, Serializable> = {};\n for (const key in obj) {\n const value = obj[key];\n if (value) {\n if (!Array.isArray(value) || value.length > 0) {\n result[key] = obj[key];\n }\n }\n }\n return result;\n}\n\nexport function sortQueryParams(params: QueryParamsSource, options?: QueryParamsSerializationOptions): URLSearchParams {\n options = Object.assign({}, DEFAULT_QUERY_PARAMS_SERIALIZATION_OPTIONS, options);\n const paramsIsObject = !(params instanceof URLSearchParams);\n const urlParams = new URLSearchParams();\n const dictionaryParams: Record<string, Serializable> = paramsIsObject ? params : {};\n\n if (!paramsIsObject) {\n params.forEach((value, key) => {\n const hasExisting = key in dictionaryParams;\n if (!hasExisting) {\n dictionaryParams[key] = value;\n } else {\n const existingValue = dictionaryParams[key];\n if (Array.isArray(existingValue)) {\n existingValue.push(value);\n } else {\n dictionaryParams[key] = [existingValue, value];\n }\n }\n });\n }\n\n if ('include' in dictionaryParams) {\n dictionaryParams.include = handleInclude(dictionaryParams.include as string | string[]);\n }\n\n const sortedKeys = Object.keys(dictionaryParams).sort();\n sortedKeys.forEach((key) => {\n const value = dictionaryParams[key];\n if (Array.isArray(value)) {\n value.sort();\n switch (options!.arrayFormat) {\n case 'indices':\n value.forEach((v, i) => {\n urlParams.append(`${key}[${i}]`, String(v));\n });\n return;\n case 'bracket':\n value.forEach((v) => {\n urlParams.append(`${key}[]`, String(v));\n });\n return;\n case 'repeat':\n value.forEach((v) => {\n urlParams.append(key, String(v));\n });\n return;\n case 'comma':\n default:\n urlParams.append(key, value.join(','));\n return;\n }\n } else {\n urlParams.append(key, String(value));\n }\n });\n\n return urlParams;\n}\n\nexport function buildQueryParams(params: QueryParamsSource, options?: QueryParamsSerializationOptions): string {\n return sortQueryParams(params, options).toString();\n}\n"],"names":["CONFIG","host","namespace","setBuildURLConfig","values","OPERATIONS_WITH_PRIMARY_RECORDS","Set","isOperationWithPrimaryRecord","options","has","op","resourcePathForType","identifiers","type","identifier","buildBaseURL","urlOptions","Object","assign","assert","length","Array","isArray","every","i","id","idPath","encodeURIComponent","resourcePath","fieldPath","String","join","includes","endsWith","startsWith","url","filter","Boolean","DEFAULT_QUERY_PARAMS_SERIALIZATION_OPTIONS","arrayFormat","handleInclude","include","split","filterEmpty","obj","result","key","value","sortQueryParams","params","paramsIsObject","URLSearchParams","urlParams","dictionaryParams","forEach","hasExisting","existingValue","push","sortedKeys","keys","sort","v","append","buildQueryParams","toString"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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;;"}
package/addon-main.js DELETED
@@ -1,19 +0,0 @@
1
- module.exports = {
2
- name: require('./package.json').name,
3
-
4
- treeForVendor() {
5
- return;
6
- },
7
- treeForPublic() {
8
- return;
9
- },
10
- treeForStyles() {
11
- return;
12
- },
13
- treeForAddonStyles() {
14
- return;
15
- },
16
- treeForApp() {
17
- return;
18
- },
19
- };