@react-native-ohos/react-native-background-timer 2.4.2-rc.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 (45) hide show
  1. package/.circleci/config.yml +37 -0
  2. package/.eslintignore +1 -0
  3. package/.eslintrc.js +8 -0
  4. package/.prettierrc +4 -0
  5. package/COMMITTERS.md +10 -0
  6. package/LICENSE +21 -0
  7. package/OAT.xml +58 -0
  8. package/README.OpenSource +11 -0
  9. package/README.md +13 -0
  10. package/android/build.gradle +20 -0
  11. package/android/src/main/AndroidManifest.xml +3 -0
  12. package/android/src/main/java/com/ocetnik/timer/BackgroundTimerModule.java +97 -0
  13. package/android/src/main/java/com/ocetnik/timer/BackgroundTimerPackage.java +34 -0
  14. package/harmony/background_timer/Index.ets +9 -0
  15. package/harmony/background_timer/build-profile.json5 +12 -0
  16. package/harmony/background_timer/hvigorfile.ts +6 -0
  17. package/harmony/background_timer/oh-package.json5 +11 -0
  18. package/harmony/background_timer/src/main/cpp/CMakeLists.txt +13 -0
  19. package/harmony/background_timer/src/main/cpp/ReactNativeOhosReactNativeBackgroundTimerPackage.h +15 -0
  20. package/harmony/background_timer/src/main/cpp/generated/RNOH/generated/BaseReactNativeBackgroundTimerPackage.h +75 -0
  21. package/harmony/background_timer/src/main/cpp/generated/RNOH/generated/turbo_modules/BackgroundTimerTurboModule.cpp +21 -0
  22. package/harmony/background_timer/src/main/cpp/generated/RNOH/generated/turbo_modules/BackgroundTimerTurboModule.h +16 -0
  23. package/harmony/background_timer/src/main/ets/BackgroundTimerPackage.ts +30 -0
  24. package/harmony/background_timer/src/main/ets/BackgroundTimerTurboModule.ts +36 -0
  25. package/harmony/background_timer/src/main/ets/BackgroundTimerWorker.ts +17 -0
  26. package/harmony/background_timer/src/main/ets/generated/components/ts.ts +5 -0
  27. package/harmony/background_timer/src/main/ets/generated/index.ets +5 -0
  28. package/harmony/background_timer/src/main/ets/generated/ts.ts +6 -0
  29. package/harmony/background_timer/src/main/ets/generated/turboModules/BackgroundTimerTurboModule.ts +18 -0
  30. package/harmony/background_timer/src/main/ets/generated/turboModules/ts.ts +5 -0
  31. package/harmony/background_timer/src/main/ets/ts.ts +12 -0
  32. package/harmony/background_timer/src/main/module.json5 +11 -0
  33. package/harmony/background_timer/src/main/resources/base/element/string.json +8 -0
  34. package/harmony/background_timer/src/main/resources/en_US/element/string.json +8 -0
  35. package/harmony/background_timer/src/main/resources/zh_CN/element/string.json +8 -0
  36. package/harmony/background_timer/ts.ts +10 -0
  37. package/harmony/background_timer.har +0 -0
  38. package/index.js +111 -0
  39. package/ios/RNBackgroundTimer.h +21 -0
  40. package/ios/RNBackgroundTimer.m +90 -0
  41. package/ios/RNBackgroundTimer.xcodeproj/project.pbxproj +347 -0
  42. package/ios/RNBackgroundTimer.xcodeproj/xcuserdata/jlexyc.xcuserdatad/xcschemes/xcschememanagement.plist +19 -0
  43. package/package.json +65 -0
  44. package/react-native-background-timer.podspec +24 -0
  45. package/src/RNBackgroundTimerSpec.ts +18 -0
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@react-native-ohos/react-native-background-timer",
3
+ "version": "2.4.2-rc.1",
4
+ "description": "Emit event periodically (even when app is in the background)",
5
+ "keywords": [
6
+ "react-native",
7
+ "background",
8
+ "timer",
9
+ "android",
10
+ "ios"
11
+ ],
12
+ "main": "index.js",
13
+ "scripts": {
14
+ "eslint": "eslint *.js",
15
+ "eslint:fix": "yarn eslint --fix",
16
+ "test": "echo \"Error: no test specified\" && exit 1",
17
+ "codegen-lib": "react-native codegen-lib-harmony --no-safety-check --npm-package-name react-native-background-timer --cpp-output-path ./harmony/background_timer/src/main/cpp/generated --ets-output-path ./harmony/background_timer/src/main/ets/generated --turbo-modules-spec-paths ./src/RNBackgroundTimerSpec.ts"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "https://gitee.com/openharmony-sig/rntpc_react-native-background-timer.git"
22
+ },
23
+ "author": "David Ocetnik",
24
+ "license": "MIT",
25
+ "peerDependencies": {
26
+ "react-native": ">=0.47.0"
27
+ },
28
+ "devDependencies": {
29
+ "@babel/core": "^7.11.6",
30
+ "eslint": "^7.10.0",
31
+ "eslint-config-airbnb": "^18.2.0",
32
+ "eslint-config-prettier": "^6.12.0",
33
+ "eslint-plugin-import": "^2.22.1",
34
+ "eslint-plugin-jsx-a11y": "^6.3.1",
35
+ "eslint-plugin-prettier": "^3.1.4",
36
+ "eslint-plugin-react": "^7.21.2",
37
+ "eslint-plugin-react-hooks": "^4.1.2",
38
+ "husky": "^4.3.0",
39
+ "lint-staged": "^10.4.0",
40
+ "prettier": "^2.1.2",
41
+ "react": "16.13.1",
42
+ "react-native": "^0.63.3",
43
+ "react-native-harmony": "npm:@react-native-oh/react-native-harmony@^0.72.38",
44
+ "react-native-harmony-cli": "npm:@react-native-oh/react-native-harmony-cli@^0.0.27"
45
+ },
46
+ "husky": {
47
+ "hooks": {
48
+ "pre-commit": "lint-staged"
49
+ }
50
+ },
51
+ "lint-staged": {
52
+ "*.js": [
53
+ "eslint --fix",
54
+ "git add"
55
+ ]
56
+ },
57
+ "harmony": {
58
+ "alias": "react-native-background-timer"
59
+ },
60
+ "publishConfig": {
61
+ "registry": "https://registry.npmjs.com/",
62
+ "access": "public"
63
+ }
64
+
65
+ }
@@ -0,0 +1,24 @@
1
+ require 'json'
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
+
5
+ Pod::Spec.new do |s|
6
+
7
+ s.name = package['name']
8
+ s.version = package['version']
9
+ s.summary = package['description']
10
+ s.homepage = package['repository']['url']
11
+ s.license = package['license']
12
+ s.author = package['author']
13
+ s.source = { :git => s.homepage, :tag => 'v#{s.version}' }
14
+
15
+ s.requires_arc = true
16
+ s.ios.deployment_target = '8.0'
17
+ s.tvos.deployment_target = '9.0'
18
+
19
+ s.preserve_paths = 'README.md', 'package.json', 'index.js'
20
+ s.source_files = 'ios/*.{h,m}'
21
+
22
+ s.dependency 'React-Core'
23
+
24
+ end
@@ -0,0 +1,18 @@
1
+ /*
2
+ *
3
+ * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
4
+ * Use of this source code is governed by a MIT license that can be
5
+ * found in the LICENSE file
6
+ *
7
+ */
8
+
9
+ import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
10
+ import { TurboModuleRegistry } from 'react-native';
11
+
12
+ export interface Spec extends TurboModule {
13
+ start(delay: number): void;
14
+ stop(): void;
15
+ setTimeout(timeoutId:number,timeout:number): void;
16
+ }
17
+
18
+ export default TurboModuleRegistry.get<Spec>('BackgroundTimerTurboModule') as Spec | null;