@react-native-ohos/react-native-fileupload 1.2.0-rc.1 → 1.2.1-beta.2
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/CHANGELOG.md +7 -7
- package/COMMITTERS.md +6 -6
- package/LICENSE +20 -20
- package/NativeRNFileupload.ts +7 -7
- package/README.OpenSource +10 -10
- package/README.md +9 -9
- package/harmony/fileUpload/LICENSE +19 -19
- package/harmony/fileUpload/README.OpenSource +10 -10
- package/harmony/fileUpload/README.md +164 -164
- package/harmony/fileUpload/build-profile.json5 +28 -28
- package/harmony/fileUpload/hvigorfile.ts +6 -6
- package/harmony/fileUpload/index.ets +1 -1
- package/harmony/fileUpload/obfuscation-rules.txt +17 -17
- package/harmony/fileUpload/oh-package.json5 +11 -11
- package/harmony/fileUpload/src/main/cpp/CMakeLists.txt +8 -8
- package/harmony/fileUpload/src/main/cpp/FileuploadPackage.h +18 -18
- package/harmony/fileUpload/src/main/cpp/generated/RNOH/generated/BaseReactNativeFileuploadPackage.h +65 -65
- package/harmony/fileUpload/src/main/cpp/generated/RNOH/generated/turbo_modules/RNFileupload.cpp +16 -16
- package/harmony/fileUpload/src/main/cpp/generated/RNOH/generated/turbo_modules/RNFileupload.h +16 -16
- package/harmony/fileUpload/src/main/cpp/generated/react/renderer/components/react_native_fileupload/ComponentDescriptors.h +22 -22
- package/harmony/fileUpload/src/main/cpp/generated/react/renderer/components/react_native_fileupload/EventEmitters.cpp +18 -18
- package/harmony/fileUpload/src/main/cpp/generated/react/renderer/components/react_native_fileupload/EventEmitters.h +19 -19
- package/harmony/fileUpload/src/main/cpp/generated/react/renderer/components/react_native_fileupload/Props.cpp +21 -21
- package/harmony/fileUpload/src/main/cpp/generated/react/renderer/components/react_native_fileupload/Props.h +20 -20
- package/harmony/fileUpload/src/main/cpp/generated/react/renderer/components/react_native_fileupload/ShadowNodes.cpp +19 -19
- package/harmony/fileUpload/src/main/cpp/generated/react/renderer/components/react_native_fileupload/ShadowNodes.h +25 -25
- package/harmony/fileUpload/src/main/cpp/generated/react/renderer/components/react_native_fileupload/States.cpp +18 -18
- package/harmony/fileUpload/src/main/cpp/generated/react/renderer/components/react_native_fileupload/States.h +22 -22
- package/harmony/fileUpload/src/main/ets/FileUpLoadModule.ts +109 -106
- package/harmony/fileUpload/src/main/ets/FileUpLoadPackage.ts +46 -46
- package/harmony/fileUpload/src/main/ets/Logger.ts +63 -63
- package/harmony/fileUpload/src/main/ets/generated/components/ts.ts +5 -5
- package/harmony/fileUpload/src/main/ets/generated/index.ets +5 -5
- package/harmony/fileUpload/src/main/ets/generated/ts.ts +6 -6
- package/harmony/fileUpload/src/main/ets/generated/turboModules/RNFileupload.ts +14 -14
- package/harmony/fileUpload/src/main/ets/generated/turboModules/ts.ts +5 -5
- package/harmony/fileUpload/src/main/module.json5 +11 -11
- package/harmony/fileUpload/src/main/resources/base/element/string.json +8 -8
- package/harmony/fileUpload/src/main/resources/en_US/element/string.json +8 -8
- package/harmony/fileUpload/src/main/resources/zh_CN/element/string.json +8 -8
- package/harmony/fileUpload/src/test/List.test.ets +4 -4
- package/harmony/fileUpload/src/test/LocalUnit.test.ets +32 -32
- package/harmony/fileUpload/ts.ts +1 -1
- package/harmony/fileupload.har +0 -0
- package/index.js +1 -1
- package/package.json +51 -43
- package/harmony/fileUpload/OAT.xml +0 -38
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
|
|
2
|
-
|
|
3
|
-
export default function localUnitTest() {
|
|
4
|
-
describe('localUnitTest',() => {
|
|
5
|
-
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
|
|
6
|
-
beforeAll(() => {
|
|
7
|
-
// Presets an action, which is performed only once before all test cases of the test suite start.
|
|
8
|
-
// This API supports only one parameter: preset action function.
|
|
9
|
-
});
|
|
10
|
-
beforeEach(() => {
|
|
11
|
-
// Presets an action, which is performed before each unit test case starts.
|
|
12
|
-
// The number of execution times is the same as the number of test cases defined by **it**.
|
|
13
|
-
// This API supports only one parameter: preset action function.
|
|
14
|
-
});
|
|
15
|
-
afterEach(() => {
|
|
16
|
-
// Presets a clear action, which is performed after each unit test case ends.
|
|
17
|
-
// The number of execution times is the same as the number of test cases defined by **it**.
|
|
18
|
-
// This API supports only one parameter: clear action function.
|
|
19
|
-
});
|
|
20
|
-
afterAll(() => {
|
|
21
|
-
// Presets a clear action, which is performed after all test cases of the test suite end.
|
|
22
|
-
// This API supports only one parameter: clear action function.
|
|
23
|
-
});
|
|
24
|
-
it('assertContain', 0, () => {
|
|
25
|
-
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
|
|
26
|
-
let a = 'abc';
|
|
27
|
-
let b = 'b';
|
|
28
|
-
// Defines a variety of assertion methods, which are used to declare expected boolean conditions.
|
|
29
|
-
expect(a).assertContain(b);
|
|
30
|
-
expect(a).assertEqual(a);
|
|
31
|
-
});
|
|
32
|
-
});
|
|
1
|
+
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
|
|
2
|
+
|
|
3
|
+
export default function localUnitTest() {
|
|
4
|
+
describe('localUnitTest',() => {
|
|
5
|
+
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
|
|
6
|
+
beforeAll(() => {
|
|
7
|
+
// Presets an action, which is performed only once before all test cases of the test suite start.
|
|
8
|
+
// This API supports only one parameter: preset action function.
|
|
9
|
+
});
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
// Presets an action, which is performed before each unit test case starts.
|
|
12
|
+
// The number of execution times is the same as the number of test cases defined by **it**.
|
|
13
|
+
// This API supports only one parameter: preset action function.
|
|
14
|
+
});
|
|
15
|
+
afterEach(() => {
|
|
16
|
+
// Presets a clear action, which is performed after each unit test case ends.
|
|
17
|
+
// The number of execution times is the same as the number of test cases defined by **it**.
|
|
18
|
+
// This API supports only one parameter: clear action function.
|
|
19
|
+
});
|
|
20
|
+
afterAll(() => {
|
|
21
|
+
// Presets a clear action, which is performed after all test cases of the test suite end.
|
|
22
|
+
// This API supports only one parameter: clear action function.
|
|
23
|
+
});
|
|
24
|
+
it('assertContain', 0, () => {
|
|
25
|
+
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
|
|
26
|
+
let a = 'abc';
|
|
27
|
+
let b = 'b';
|
|
28
|
+
// Defines a variety of assertion methods, which are used to declare expected boolean conditions.
|
|
29
|
+
expect(a).assertContain(b);
|
|
30
|
+
expect(a).assertEqual(a);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
33
|
}
|
package/harmony/fileUpload/ts.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./src/main/ets/FileUpLoadPackage";
|
|
1
|
+
export * from "./src/main/ets/FileUpLoadPackage";
|
|
2
2
|
export * from "./src/main/ets/FileUpLoadModule";
|
package/harmony/fileupload.har
CHANGED
|
Binary file
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import NativeModule from "./NativeRNFileupload";
|
|
1
|
+
import NativeModule from "./NativeRNFileupload";
|
|
2
2
|
export default NativeModule;
|
package/package.json
CHANGED
|
@@ -1,43 +1,51 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@react-native-ohos/react-native-fileupload",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "A file upload plugin for react-native",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
-
"codegen-lib": "react-native codegen-lib-harmony --no-safety-check --npm-package-name react-native-fileupload --cpp-output-path ./harmony/fileUpload/src/main/cpp/generated --ets-output-path ./harmony/fileUpload/src/main/ets/generated --turbo-modules-spec-paths ./NativeRNFileupload.ts"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
},
|
|
32
|
-
"
|
|
33
|
-
"react-native
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@react-native-ohos/react-native-fileupload",
|
|
3
|
+
"version": "1.2.1-beta.2",
|
|
4
|
+
"description": "A file upload plugin for react-native",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"codegen-lib": "react-native codegen-lib-harmony --no-safety-check --npm-package-name react-native-fileupload --cpp-output-path ./harmony/fileUpload/src/main/cpp/generated --ets-output-path ./harmony/fileUpload/src/main/ets/generated --turbo-modules-spec-paths ./NativeRNFileupload.ts",
|
|
9
|
+
"pack": "npm pack"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://gitcode.com/CPF-RN/rntpc_react-native-fileupload"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"harmony",
|
|
17
|
+
"index.js",
|
|
18
|
+
"NativeRNFileupload.ts",
|
|
19
|
+
"CHANGELOG.md",
|
|
20
|
+
"COMMITTERS.md"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"harmony",
|
|
24
|
+
"react-component",
|
|
25
|
+
"react-native",
|
|
26
|
+
"file",
|
|
27
|
+
"upload"
|
|
28
|
+
],
|
|
29
|
+
"harmony": {
|
|
30
|
+
"alias": "react-native-fileupload"
|
|
31
|
+
},
|
|
32
|
+
"overrides": {
|
|
33
|
+
"@react-native/codegen": "0.74.0"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"react-native-fileupload": "1.1.0",
|
|
37
|
+
"react": "18.2.0",
|
|
38
|
+
"react-native": "0.72.5"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"react-native-harmony-cli": "npm:@react-native-oh/react-native-harmony-cli@^0.0.27",
|
|
42
|
+
"@react-native-community/cli": "latest"
|
|
43
|
+
},
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://gitcode.com/CPF-RN/rntpc_react-native-fileupload/issues"
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"registry": "https://registry.npmjs.org/",
|
|
49
|
+
"access": "public"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<configuration>
|
|
3
|
-
<oatconfig>
|
|
4
|
-
<licensefile>LICENSE</licensefile>
|
|
5
|
-
<filefilterlist>
|
|
6
|
-
<filefilter name="copyrightPolicyFilter" desc="Filters for compatibility,license header policies">
|
|
7
|
-
<filteritem type="filename" name="hvigorfile.ts" desc="hvigor构建脚本,DevEco Studio自动生成,不需要添加版权头"/>
|
|
8
|
-
<filteritem type="filename" name="*.json5" desc="hvigor工程配置文件,DevEco Studio自动生成,不需要添加版权头"/>
|
|
9
|
-
<filteritem type="filename" name="*.proto" desc="资源文件,不需要添加版权头"/>
|
|
10
|
-
<filteritem type="filename" name="*.json" desc="资源文件,不需要添加版权头"/>
|
|
11
|
-
<filteritem type="filepath" name="hvigorw" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
12
|
-
<filteritem type="filepath" name="hvigorw.bat" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
13
|
-
<filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
14
|
-
<filteritem type="filename" name="LICENSE" desc="工程文件,不修改版权头"/>
|
|
15
|
-
</filefilter>
|
|
16
|
-
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
|
17
|
-
<filteritem type="filename" name="hvigorfile.ts" desc="hvigor构建脚本,DevEco Studio自动生成,不需要添加许可证头"/>
|
|
18
|
-
<filteritem type="filename" name="*.json5" desc="hvigor工程配置文件,DevEco Studio自动生成,不需要添加许可证头"/>
|
|
19
|
-
<filteritem type="filename" name="LICENSE" desc="原三方库证书文件无需更改,因此添加过滤"/>
|
|
20
|
-
<filteritem type="filename" name="*.proto" desc="资源文件,不需要添加许可证头"/>
|
|
21
|
-
<filteritem type="filename" name="*.json" desc="资源文件,不需要添加许可证头"/>
|
|
22
|
-
<filteritem type="filepath" name="hvigorw" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
23
|
-
<filteritem type="filepath" name="hvigorw.bat" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
24
|
-
<filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
25
|
-
</filefilter>
|
|
26
|
-
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for resources files policies">
|
|
27
|
-
<filteritem type="filename" name="icon.png" desc="应用图标"/>
|
|
28
|
-
<filteritem type="filename" name="app_icon.png" desc="应用图标"/>
|
|
29
|
-
<filteritem type="filename" name="warn.png" desc="页面展示图标"/>
|
|
30
|
-
</filefilter>
|
|
31
|
-
</filefilterlist>
|
|
32
|
-
<policylist>
|
|
33
|
-
<policy name="projectPolicy" desc="">
|
|
34
|
-
<policyitem type="license" name="MIT" path=".*" desc="license under the MIT"/>
|
|
35
|
-
</policy>
|
|
36
|
-
</policylist>
|
|
37
|
-
</oatconfig>
|
|
38
|
-
</configuration>
|