@rws-framework/client 2.1.5 → 2.1.6
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/.bin/emerge.sh +0 -0
- package/.emerge-fast.yaml +0 -0
- package/.emerge-typescript-template.yaml +0 -0
- package/_rws_externals.js +0 -1
- package/package.json +1 -1
- package/src/components/_container.ts +0 -0
- package/src/components/_design_system.ts +0 -0
- package/src/interfaces/IRWSViewComponent.ts +0 -0
- package/src/routing/_router.ts +0 -0
- package/src/services/ApiService.ts +3 -3
- package/webpack/rws_fast_html_loader.js +18 -2
- package/webpack/rws_fast_ts_loader.js +3 -0
package/.bin/emerge.sh
CHANGED
|
File without changes
|
package/.emerge-fast.yaml
CHANGED
|
File without changes
|
|
File without changes
|
package/_rws_externals.js
CHANGED
|
@@ -26,7 +26,6 @@ const externals = (declaredCodeBase, nodeModules, externalOptions = _defaultOpts
|
|
|
26
26
|
const codeBase = path.resolve(declaredCodeBase);
|
|
27
27
|
|
|
28
28
|
let mergeTarget = true;
|
|
29
|
-
console.log('req', context, request, mergeTarget);
|
|
30
29
|
|
|
31
30
|
if (mergeTarget) {
|
|
32
31
|
//merging to output
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/routing/_router.ts
CHANGED
|
File without changes
|
|
@@ -195,14 +195,14 @@ class ApiServiceInstance extends TheService {
|
|
|
195
195
|
return `${this.config.get('backendUrl')}${this.config.get('apiPrefix') || ''}${apiPath}`;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
async uploadFile(url: string, file: File, onProgress: (progress: number) => void,
|
|
198
|
+
async uploadFile(url: string, file: File, onProgress: (progress: number) => void, payload: any = {}): Promise<UploadResponse>
|
|
199
199
|
{
|
|
200
200
|
return upload(
|
|
201
201
|
|
|
202
202
|
url,
|
|
203
203
|
{
|
|
204
204
|
file,
|
|
205
|
-
...
|
|
205
|
+
...payload
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
onProgress,
|
|
@@ -216,7 +216,7 @@ class ApiServiceInstance extends TheService {
|
|
|
216
216
|
post: <T, P extends object = object>(routeName: string, payload?: P, options?: IAPIOptions): Promise<T> => this.post(this.getBackendUrl(routeName, options?.routeParams), payload, options),
|
|
217
217
|
put: <T, P extends object = object>(routeName: string, payload: P, options?: IAPIOptions): Promise<T> => this.put(this.getBackendUrl(routeName, options?.routeParams), payload, options),
|
|
218
218
|
delete: <T>(routeName: string, options?: IAPIOptions): Promise<T> => this.delete(this.getBackendUrl(routeName, options?.routeParams), options),
|
|
219
|
-
uploadFile: (routeName: string, file: File, onProgress: (progress: number) => void, options: IAPIOptions = {}): Promise<UploadResponse> => this.uploadFile(this.getBackendUrl(routeName, options?.routeParams), file, onProgress),
|
|
219
|
+
uploadFile: (routeName: string, file: File, onProgress: (progress: number) => void, options: IAPIOptions = {}, payload: any = {}): Promise<UploadResponse> => this.uploadFile(this.getBackendUrl(routeName, options?.routeParams), file, onProgress, payload),
|
|
220
220
|
};
|
|
221
221
|
|
|
222
222
|
connectToAmplify()
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
|
|
4
|
+
module.exports = function(content) {
|
|
5
|
+
const filePath = this.resourcePath;
|
|
6
|
+
|
|
7
|
+
const dirPath = path.dirname(filePath);
|
|
8
|
+
const tsPath = `${dirPath}/component.ts`;
|
|
9
|
+
|
|
10
|
+
fs.readFile(tsPath, { encoding: 'utf-8' }, (err, content) => {
|
|
11
|
+
fs.writeFileSync(tsPath, content);
|
|
12
|
+
|
|
13
|
+
if (err) {
|
|
14
|
+
throw new Error('Error reading file:', tsPath);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
|
|
3
19
|
return '';
|
|
4
20
|
};
|
|
@@ -72,6 +72,7 @@ module.exports = function(content) {
|
|
|
72
72
|
|
|
73
73
|
const tagName = decoratorData.tagName;
|
|
74
74
|
|
|
75
|
+
|
|
75
76
|
|
|
76
77
|
try {
|
|
77
78
|
if(tagName){
|
|
@@ -112,6 +113,8 @@ module.exports = function(content) {
|
|
|
112
113
|
let template = 'const template: null = null;';
|
|
113
114
|
|
|
114
115
|
if(templateExists){
|
|
116
|
+
this.addDependency(templatePath);
|
|
117
|
+
|
|
115
118
|
template = `import './${templateName}.html';\nconst template: any = T.html\`${fs.readFileSync(templatePath, 'utf-8')}\`;`;
|
|
116
119
|
}
|
|
117
120
|
|