@react-native-ohos/react-native-fileupload 1.1.1-rc.2 → 1.1.1

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.
Files changed (34) hide show
  1. package/LICENSE +20 -20
  2. package/NativeRNFileupload.ts +7 -7
  3. package/OAT.xml +46 -46
  4. package/README.OpenSource +10 -10
  5. package/README.md +9 -9
  6. package/harmony/fileUpload/LICENSE +19 -19
  7. package/harmony/fileUpload/build-profile.json5 +8 -8
  8. package/harmony/fileUpload/hvigorfile.ts +6 -6
  9. package/harmony/fileUpload/index.ets +3 -3
  10. package/harmony/fileUpload/obfuscation-rules.txt +17 -17
  11. package/harmony/fileUpload/oh-package.json5 +11 -11
  12. package/harmony/fileUpload/src/main/cpp/CMakeLists.txt +8 -8
  13. package/harmony/fileUpload/src/main/cpp/FileUploadPackage.h +35 -35
  14. package/harmony/fileUpload/src/main/cpp/generated/RNOH/generated/BaseReactNativeFileuploadPackage.h +65 -65
  15. package/harmony/fileUpload/src/main/cpp/generated/RNOH/generated/turbo_modules/RNFileupload.cpp +16 -16
  16. package/harmony/fileUpload/src/main/cpp/generated/RNOH/generated/turbo_modules/RNFileupload.h +16 -16
  17. package/harmony/fileUpload/src/main/ets/FileUpLoadModule.ts +106 -106
  18. package/harmony/fileUpload/src/main/ets/FileUpLoadPackage.ets +46 -46
  19. package/harmony/fileUpload/src/main/ets/Logger.ts +63 -63
  20. package/harmony/fileUpload/src/main/ets/generated/components/ts.ts +5 -5
  21. package/harmony/fileUpload/src/main/ets/generated/index.ets +5 -5
  22. package/harmony/fileUpload/src/main/ets/generated/ts.ts +6 -6
  23. package/harmony/fileUpload/src/main/ets/generated/turboModules/RNFileupload.ts +14 -14
  24. package/harmony/fileUpload/src/main/ets/generated/turboModules/ts.ts +5 -5
  25. package/harmony/fileUpload/src/main/module.json5 +11 -11
  26. package/harmony/fileUpload/src/main/resources/base/element/string.json +8 -8
  27. package/harmony/fileUpload/src/main/resources/en_US/element/string.json +8 -8
  28. package/harmony/fileUpload/src/main/resources/zh_CN/element/string.json +8 -8
  29. package/harmony/fileUpload/src/test/List.test.ets +4 -4
  30. package/harmony/fileUpload/src/test/LocalUnit.test.ets +32 -32
  31. package/harmony/fileUpload/ts.ets +1 -1
  32. package/harmony/fileupload.har +0 -0
  33. package/index.js +1 -1
  34. package/package.json +46 -46
@@ -1,107 +1,107 @@
1
- /**
2
- * MIT License
3
- *
4
- * Copyright (C) 2024 Huawei Device Co., Ltd.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- import { TurboModule, TurboModuleContext } from "@rnoh/react-native-openharmony/ts";
26
- import Logger from './Logger';
27
- import { TM } from './generated/ts';
28
- import request from '@ohos.request';
29
- import { BusinessError } from '@ohos.base';
30
- import { JSON } from '@kit.ArkTS';
31
-
32
- export class FileUpLoadModule extends TurboModule implements TM.RNFileupload.Spec{
33
- constructor(protected ctx: TurboModuleContext) {
34
- super(ctx);
35
- }
36
-
37
- upload(options: Object, callback: (err: string, result: string)=>void): void {
38
-
39
- let filesArray = new Array();
40
- for (let index = 0; index < options['files'].length; index++) {
41
- let Object = {
42
- filename: '',
43
- name: '',
44
- uri: '',
45
- type: ''
46
- };
47
- let filesItem = options['files'][index];
48
- Object.filename = filesItem['filename'];
49
- let path = filesItem['filepath'].substring(0, filesItem['filepath'].lastIndexOf('/'));
50
- if (path == this.ctx.uiAbilityContext.cacheDir || path == 'file://' + this.ctx.uiAbilityContext.cacheDir) {
51
- Object.uri = 'internal://cache/' + filesItem['filename'];
52
- } else if (filesItem['filepath'] == 'internal://cache/' + filesItem['filename']) {
53
- Object.uri = filesItem['filepath'];
54
- }
55
-
56
- let i = filesItem['filename'].lastIndexOf('.')
57
- let type = filesItem['filename'].substring(i + 1);
58
- Object.type = filesItem['filetype'] ? filesItem['filetype'] : type;
59
- Object.name = filesItem['name'] ? filesItem['name'] : 'file';
60
- filesArray.push(Object);
61
- }
62
- let uploadConfig: request.UploadConfig = {
63
- url: options['uploadUrl'],
64
- header: options['headers'],
65
- method: options['method'],
66
- files: filesArray,
67
- data: [
68
- options['fields']
69
- ],
70
- };
71
-
72
- let uploadTask: request.UploadTask;
73
- let responseMessage: string
74
- try {
75
- request.uploadFile(this.ctx.uiAbilityContext, uploadConfig).then((data: request.UploadTask) => {
76
- uploadTask = data;
77
- uploadTask.on('complete', (taskStates: Array<request.TaskState>) => {
78
- for (let i = 0; i < taskStates.length; i++) {
79
- Logger.info(`FileUpLoad complete taskState: ${JSON.stringify(taskStates)}`);
80
- if (taskStates[i].responseCode == 0) {
81
- responseMessage = taskStates[i].message;
82
- }
83
- }
84
- callback('',responseMessage !== '' ? responseMessage : 'File uploaded successfully.');
85
- removeEvent(uploadTask);
86
- });
87
- uploadTask.on('fail', (taskStates: Array<request.TaskState>) => {
88
- for (let i = 0; i < taskStates.length; i++) {
89
- Logger.info(`FileUpLoad fail taskState: ${JSON.stringify(taskStates[i])}`);
90
- responseMessage = taskStates[i].message;
91
- }
92
- callback(responseMessage, '');
93
- removeEvent(uploadTask);
94
- });
95
- }).catch((err: BusinessError) => {
96
- Logger.error(`Failed to request the upload. Code: ${err.code}, message: ${err.message}`);
97
- });
98
- } catch (err) {
99
- Logger.error(`FileUpLoad: Invoke uploadFile failed, code is ${err.code}, message is ${err.message}`);
100
- callback(err.message,'');
101
- }
102
- const removeEvent = (uploadTask) => {
103
- uploadTask.off('fail');
104
- uploadTask.off('complete');
105
- }
106
- }
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2024 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
25
+ import { TurboModule, TurboModuleContext } from "@rnoh/react-native-openharmony/ts";
26
+ import Logger from './Logger';
27
+ import { TM } from './generated/ts';
28
+ import request from '@ohos.request';
29
+ import { BusinessError } from '@ohos.base';
30
+ import { JSON } from '@kit.ArkTS';
31
+
32
+ export class FileUpLoadModule extends TurboModule implements TM.RNFileupload.Spec{
33
+ constructor(protected ctx: TurboModuleContext) {
34
+ super(ctx);
35
+ }
36
+
37
+ upload(options: Object, callback: (err: string, result: string)=>void): void {
38
+
39
+ let filesArray = new Array();
40
+ for (let index = 0; index < options['files'].length; index++) {
41
+ let Object = {
42
+ filename: '',
43
+ name: '',
44
+ uri: '',
45
+ type: ''
46
+ };
47
+ let filesItem = options['files'][index];
48
+ Object.filename = filesItem['filename'];
49
+ let path = filesItem['filepath'].substring(0, filesItem['filepath'].lastIndexOf('/'));
50
+ if (path == this.ctx.uiAbilityContext.cacheDir || path == 'file://' + this.ctx.uiAbilityContext.cacheDir) {
51
+ Object.uri = 'internal://cache/' + filesItem['filename'];
52
+ } else if (filesItem['filepath'] == 'internal://cache/' + filesItem['filename']) {
53
+ Object.uri = filesItem['filepath'];
54
+ }
55
+
56
+ let i = filesItem['filename'].lastIndexOf('.')
57
+ let type = filesItem['filename'].substring(i + 1);
58
+ Object.type = filesItem['filetype'] ? filesItem['filetype'] : type;
59
+ Object.name = filesItem['name'] ? filesItem['name'] : 'file';
60
+ filesArray.push(Object);
61
+ }
62
+ let uploadConfig: request.UploadConfig = {
63
+ url: options['uploadUrl'],
64
+ header: options['headers'],
65
+ method: options['method'],
66
+ files: filesArray,
67
+ data: [
68
+ options['fields']
69
+ ],
70
+ };
71
+
72
+ let uploadTask: request.UploadTask;
73
+ let responseMessage: string
74
+ try {
75
+ request.uploadFile(this.ctx.uiAbilityContext, uploadConfig).then((data: request.UploadTask) => {
76
+ uploadTask = data;
77
+ uploadTask.on('complete', (taskStates: Array<request.TaskState>) => {
78
+ for (let i = 0; i < taskStates.length; i++) {
79
+ Logger.info(`FileUpLoad complete taskState: ${JSON.stringify(taskStates)}`);
80
+ if (taskStates[i].responseCode == 0) {
81
+ responseMessage = taskStates[i].message;
82
+ }
83
+ }
84
+ callback('',responseMessage !== '' ? responseMessage : 'File uploaded successfully.');
85
+ removeEvent(uploadTask);
86
+ });
87
+ uploadTask.on('fail', (taskStates: Array<request.TaskState>) => {
88
+ for (let i = 0; i < taskStates.length; i++) {
89
+ Logger.info(`FileUpLoad fail taskState: ${JSON.stringify(taskStates[i])}`);
90
+ responseMessage = taskStates[i].message;
91
+ }
92
+ callback(responseMessage, '');
93
+ removeEvent(uploadTask);
94
+ });
95
+ }).catch((err: BusinessError) => {
96
+ Logger.error(`Failed to request the upload. Code: ${err.code}, message: ${err.message}`);
97
+ });
98
+ } catch (err) {
99
+ Logger.error(`FileUpLoad: Invoke uploadFile failed, code is ${err.code}, message is ${err.message}`);
100
+ callback(err.message,'');
101
+ }
102
+ const removeEvent = (uploadTask) => {
103
+ uploadTask.off('fail');
104
+ uploadTask.off('complete');
105
+ }
106
+ }
107
107
  }
@@ -1,47 +1,47 @@
1
- /**
2
- * MIT License
3
- *
4
- * Copyright (C) 2024 Huawei Device Co., Ltd.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- import { RNOHPackage, TurboModulesFactory } from '@rnoh/react-native-openharmony';
26
- import type { TurboModule, TurboModuleContext } from '@rnoh/react-native-openharmony/ts';
27
- import { FileUpLoadModule } from './FileUpLoadModule';
28
- import { TM } from "./generated/ts";
29
-
30
- class FileUpLoadModulesFactory extends TurboModulesFactory {
31
- createTurboModule(name: string): TurboModule | null {
32
- if (name === TM.RNFileupload.NAME) {
33
- return new FileUpLoadModule(this.ctx)
34
- }
35
- return null;
36
- }
37
-
38
- hasTurboModule(name: string): boolean {
39
- return name === TM.RNFileupload.NAME;
40
- }
41
- }
42
-
43
- export class FileUploadPackage extends RNOHPackage {
44
- createTurboModulesFactory(ctx: TurboModuleContext): TurboModulesFactory {
45
- return new FileUpLoadModulesFactory(ctx);
46
- }
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2024 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
25
+ import { RNOHPackage, TurboModulesFactory } from '@rnoh/react-native-openharmony';
26
+ import type { TurboModule, TurboModuleContext } from '@rnoh/react-native-openharmony/ts';
27
+ import { FileUpLoadModule } from './FileUpLoadModule';
28
+ import { TM } from "./generated/ts";
29
+
30
+ class FileUpLoadModulesFactory extends TurboModulesFactory {
31
+ createTurboModule(name: string): TurboModule | null {
32
+ if (name === TM.RNFileupload.NAME) {
33
+ return new FileUpLoadModule(this.ctx)
34
+ }
35
+ return null;
36
+ }
37
+
38
+ hasTurboModule(name: string): boolean {
39
+ return name === TM.RNFileupload.NAME;
40
+ }
41
+ }
42
+
43
+ export class FileUploadPackage extends RNOHPackage {
44
+ createTurboModulesFactory(ctx: TurboModuleContext): TurboModulesFactory {
45
+ return new FileUpLoadModulesFactory(ctx);
46
+ }
47
47
  }
@@ -1,64 +1,64 @@
1
- /**
2
- * MIT License
3
- *
4
- * Copyright (C) 2024 Huawei Device Co., Ltd.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- import hilog from '@ohos.hilog';
26
-
27
- class Logger {
28
- private domain : number;
29
- private prefix : string;
30
- private format : string = '%{public}s, %{public}s';
31
- private isDebug : boolean;
32
-
33
- /**
34
- * constructor.
35
- *
36
- * @param Prefix Identifies the log tag.
37
- * @param domain Domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFFF.
38
- */
39
- constructor(prefix: string = 'MyApp', domain: number = 0xFF00, isDebug = false) {
40
- this.prefix = prefix;
41
- this.domain = domain;
42
- this.isDebug = isDebug;
43
- }
44
-
45
- debug(...args: string[]): void {
46
- if (this.isDebug) {
47
- hilog.debug(this.domain, this.prefix, this.format, args);
48
- }
49
- }
50
-
51
- info(...args: string[]): void {
52
- hilog.info(this.domain, this.prefix, this.format, args);
53
- }
54
-
55
- warn(...args: string[]) : void {
56
- hilog.warn(this.domain, this.prefix, this.format, args);
57
- }
58
-
59
- error(...args: string[]) : void {
60
- hilog.error(this.domain, this.prefix, this.format, args);
61
- }
62
- }
63
-
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2024 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
25
+ import hilog from '@ohos.hilog';
26
+
27
+ class Logger {
28
+ private domain : number;
29
+ private prefix : string;
30
+ private format : string = '%{public}s, %{public}s';
31
+ private isDebug : boolean;
32
+
33
+ /**
34
+ * constructor.
35
+ *
36
+ * @param Prefix Identifies the log tag.
37
+ * @param domain Domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFFF.
38
+ */
39
+ constructor(prefix: string = 'MyApp', domain: number = 0xFF00, isDebug = false) {
40
+ this.prefix = prefix;
41
+ this.domain = domain;
42
+ this.isDebug = isDebug;
43
+ }
44
+
45
+ debug(...args: string[]): void {
46
+ if (this.isDebug) {
47
+ hilog.debug(this.domain, this.prefix, this.format, args);
48
+ }
49
+ }
50
+
51
+ info(...args: string[]): void {
52
+ hilog.info(this.domain, this.prefix, this.format, args);
53
+ }
54
+
55
+ warn(...args: string[]) : void {
56
+ hilog.warn(this.domain, this.prefix, this.format, args);
57
+ }
58
+
59
+ error(...args: string[]) : void {
60
+ hilog.error(this.domain, this.prefix, this.format, args);
61
+ }
62
+ }
63
+
64
64
  export default new Logger('RNFileupload', 0xFF00, false)
@@ -1,5 +1,5 @@
1
-
2
- /**
3
- */
4
-
5
- export {}
1
+
2
+ /**
3
+ */
4
+
5
+ export {}
@@ -1,5 +1,5 @@
1
- /**
2
- * This code was generated by "react-native codegen-lib-harmony"
3
- */
4
-
5
- export * from "./ts"
1
+ /**
2
+ * This code was generated by "react-native codegen-lib-harmony"
3
+ */
4
+
5
+ export * from "./ts"
@@ -1,6 +1,6 @@
1
- /**
2
- * This code was generated by "react-native codegen-lib-harmony"
3
- */
4
-
5
- export * as RNC from "./components/ts"
6
- export * as TM from "./turboModules/ts"
1
+ /**
2
+ * This code was generated by "react-native codegen-lib-harmony"
3
+ */
4
+
5
+ export * as RNC from "./components/ts"
6
+ export * as TM from "./turboModules/ts"
@@ -1,14 +1,14 @@
1
- /**
2
- * This code was generated by "react-native codegen-lib-harmony"
3
- */
4
-
5
- import { Tag } from "@rnoh/react-native-openharmony/ts"
6
-
7
- export namespace RNFileupload {
8
- export const NAME = 'RNFileupload' as const
9
-
10
- export interface Spec {
11
- upload(options: Object, callback: (err: string, result: string) => void): void;
12
-
13
- }
14
- }
1
+ /**
2
+ * This code was generated by "react-native codegen-lib-harmony"
3
+ */
4
+
5
+ import { Tag } from "@rnoh/react-native-openharmony/ts"
6
+
7
+ export namespace RNFileupload {
8
+ export const NAME = 'RNFileupload' as const
9
+
10
+ export interface Spec {
11
+ upload(options: Object, callback: (err: string, result: string) => void): void;
12
+
13
+ }
14
+ }
@@ -1,5 +1,5 @@
1
- /**
2
- * This code was generated by "react-native codegen-lib-harmony"
3
- */
4
-
5
- export * from "./RNFileupload"
1
+ /**
2
+ * This code was generated by "react-native codegen-lib-harmony"
3
+ */
4
+
5
+ export * from "./RNFileupload"
@@ -1,11 +1,11 @@
1
- {
2
- "module": {
3
- "name": "fileupload",
4
- "type": "har",
5
- "deviceTypes": [
6
- "default",
7
- "tablet",
8
- "2in1"
9
- ]
10
- }
11
- }
1
+ {
2
+ "module": {
3
+ "name": "fileupload",
4
+ "type": "har",
5
+ "deviceTypes": [
6
+ "default",
7
+ "tablet",
8
+ "2in1"
9
+ ]
10
+ }
11
+ }
@@ -1,8 +1,8 @@
1
- {
2
- "string": [
3
- {
4
- "name": "page_show",
5
- "value": "page from package"
6
- }
7
- ]
8
- }
1
+ {
2
+ "string": [
3
+ {
4
+ "name": "page_show",
5
+ "value": "page from package"
6
+ }
7
+ ]
8
+ }
@@ -1,8 +1,8 @@
1
- {
2
- "string": [
3
- {
4
- "name": "page_show",
5
- "value": "page from package"
6
- }
7
- ]
8
- }
1
+ {
2
+ "string": [
3
+ {
4
+ "name": "page_show",
5
+ "value": "page from package"
6
+ }
7
+ ]
8
+ }
@@ -1,8 +1,8 @@
1
- {
2
- "string": [
3
- {
4
- "name": "page_show",
5
- "value": "page from package"
6
- }
7
- ]
8
- }
1
+ {
2
+ "string": [
3
+ {
4
+ "name": "page_show",
5
+ "value": "page from package"
6
+ }
7
+ ]
8
+ }
@@ -1,5 +1,5 @@
1
- import localUnitTest from './LocalUnit.test';
2
-
3
- export default function testsuite() {
4
- localUnitTest();
1
+ import localUnitTest from './LocalUnit.test';
2
+
3
+ export default function testsuite() {
4
+ localUnitTest();
5
5
  }