@siteed/audio-studio 3.2.0 → 3.2.1-beta.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.
- package/README.md +30 -1
- package/android/src/main/java/net/siteed/audiostudio/AudioRecorderManager.kt +142 -12
- package/android/src/main/java/net/siteed/audiostudio/AudioRecordingService.kt +1 -1
- package/android/src/main/java/net/siteed/audiostudio/AudioStudioModule.kt +5 -4
- package/android/src/main/java/net/siteed/audiostudio/Constants.kt +2 -1
- package/android/src/main/java/net/siteed/audiostudio/RecordingActionReceiver.kt +1 -1
- package/android/src/main/java/net/siteed/audiostudio/RecordingConfig.kt +5 -1
- package/build/cjs/AudioRecorder.provider.js +3 -37
- package/build/cjs/AudioRecorder.provider.js.map +1 -1
- package/build/cjs/AudioStudio.types.js.map +1 -1
- package/build/cjs/AudioStudio.web.js +125 -13
- package/build/cjs/AudioStudio.web.js.map +1 -1
- package/build/cjs/AudioStudioModule.js +6 -1
- package/build/cjs/AudioStudioModule.js.map +1 -1
- package/build/cjs/events.js +4 -0
- package/build/cjs/events.js.map +1 -1
- package/build/cjs/index.js +3 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/useAudioRecorder.js +139 -4
- package/build/cjs/useAudioRecorder.js.map +1 -1
- package/build/esm/AudioRecorder.provider.js +3 -4
- package/build/esm/AudioRecorder.provider.js.map +1 -1
- package/build/esm/AudioStudio.types.js.map +1 -1
- package/build/esm/AudioStudio.web.js +125 -13
- package/build/esm/AudioStudio.web.js.map +1 -1
- package/build/esm/AudioStudioModule.js +6 -1
- package/build/esm/AudioStudioModule.js.map +1 -1
- package/build/esm/events.js +3 -0
- package/build/esm/events.js.map +1 -1
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/useAudioRecorder.js +140 -5
- package/build/esm/useAudioRecorder.js.map +1 -1
- package/build/types/AudioStudio.types.d.ts +44 -1
- package/build/types/AudioStudio.types.d.ts.map +1 -1
- package/build/types/AudioStudio.web.d.ts +17 -1
- package/build/types/AudioStudio.web.d.ts.map +1 -1
- package/build/types/AudioStudioModule.d.ts.map +1 -1
- package/build/types/events.d.ts +2 -1
- package/build/types/events.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/useAudioRecorder.d.ts +2 -0
- package/build/types/useAudioRecorder.d.ts.map +1 -1
- package/ios/AudioStreamManager.swift +103 -9
- package/ios/AudioStreamManagerDelegate.swift +1 -0
- package/ios/AudioStudio.podspec +1 -1
- package/ios/AudioStudioModule.swift +6 -0
- package/ios/RecordingSettings.swift +48 -43
- package/package.json +163 -163
- package/plugin/tsconfig.json +8 -2
- package/src/AudioStudio.types.ts +48 -1
- package/src/AudioStudio.web.ts +152 -13
- package/src/AudioStudioModule.ts +6 -1
- package/src/events.ts +13 -1
- package/src/index.ts +1 -0
- package/src/useAudioRecorder.tsx +182 -2
- package/scripts/README.md +0 -58
|
@@ -22,13 +22,13 @@ struct OutputSettings {
|
|
|
22
22
|
var enabled: Bool = true
|
|
23
23
|
var format: String = "wav" // Currently only "wav" is supported
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
struct CompressedOutput {
|
|
27
27
|
var enabled: Bool = false
|
|
28
28
|
var format: String = "aac" // "aac" or "opus" (opus falls back to aac on iOS)
|
|
29
29
|
var bitrate: Int = 128000
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
var primary: PrimaryOutput = PrimaryOutput()
|
|
33
33
|
var compressed: CompressedOutput = CompressedOutput()
|
|
34
34
|
}
|
|
@@ -39,13 +39,13 @@ struct CompressedRecordingInfo {
|
|
|
39
39
|
var bitrate: Int
|
|
40
40
|
var format: String
|
|
41
41
|
var size: Int64 = 0 // Add size with default value
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
static func validate(format: String, bitrate: Int) -> Result<(String, Int), Error> {
|
|
44
44
|
// Validate format
|
|
45
45
|
guard ["aac", "opus"].contains(format.lowercased()) else {
|
|
46
46
|
return .failure(RecordingError.unsupportedFormat(format))
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
// Adjust bitrate based on format
|
|
50
50
|
let adjustedBitrate: Int
|
|
51
51
|
if format.lowercased() == "aac" {
|
|
@@ -57,7 +57,7 @@ struct CompressedRecordingInfo {
|
|
|
57
57
|
// Typical Opus voice bitrates: 8-24 kbps, music: 32-128 kbps
|
|
58
58
|
adjustedBitrate = min(max(bitrate, 8000), 320000)
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
|
|
61
61
|
return .success((format, adjustedBitrate))
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -77,7 +77,7 @@ enum RecordingError: Error {
|
|
|
77
77
|
case unsupportedFormat(String)
|
|
78
78
|
case invalidBitrate(Int)
|
|
79
79
|
case invalidOutputDirectory(String)
|
|
80
|
-
|
|
80
|
+
|
|
81
81
|
var localizedDescription: String {
|
|
82
82
|
switch self {
|
|
83
83
|
case .unsupportedFormat(let format):
|
|
@@ -98,56 +98,58 @@ struct RecordingSettings {
|
|
|
98
98
|
var bitDepth: Int = 16
|
|
99
99
|
var interval: Int?
|
|
100
100
|
var intervalAnalysis: Int?
|
|
101
|
-
|
|
101
|
+
|
|
102
102
|
// Feature flags
|
|
103
103
|
var keepAwake: Bool = true
|
|
104
104
|
var showNotification: Bool = false
|
|
105
105
|
var enableProcessing: Bool = false
|
|
106
|
-
|
|
106
|
+
|
|
107
107
|
// Remove pointsPerSecond and algorithm
|
|
108
108
|
var featureOptions: [String: Bool]? = ["rms": true, "zcr": true]
|
|
109
|
-
|
|
109
|
+
|
|
110
110
|
// iOS-specific configuration
|
|
111
111
|
var ios: IOSConfig?
|
|
112
|
-
|
|
112
|
+
|
|
113
113
|
// Notification configuration
|
|
114
114
|
var notification: NotificationConfig?
|
|
115
|
-
|
|
115
|
+
|
|
116
116
|
// Output configuration
|
|
117
117
|
var output: OutputSettings = OutputSettings()
|
|
118
|
-
|
|
118
|
+
|
|
119
119
|
let autoResumeAfterInterruption: Bool
|
|
120
|
-
|
|
120
|
+
|
|
121
121
|
var outputDirectory: String? = nil
|
|
122
122
|
var filename: String? = nil
|
|
123
|
-
|
|
123
|
+
|
|
124
124
|
// Update default to 100ms
|
|
125
125
|
var segmentDurationMs: Int = 100 // Default 100ms segments
|
|
126
|
-
|
|
126
|
+
|
|
127
127
|
// Add these new properties
|
|
128
128
|
var deviceId: String?
|
|
129
129
|
var deviceDisconnectionBehavior: DeviceDisconnectionBehavior = .FALLBACK
|
|
130
130
|
var bufferDurationSeconds: Double?
|
|
131
131
|
var streamFormat: String = "raw"
|
|
132
|
-
|
|
132
|
+
var maxDurationMs: Int64 = 0
|
|
133
|
+
var autoStopOnMaxDuration: Bool = false
|
|
134
|
+
|
|
133
135
|
static func fromDictionary(_ dict: [String: Any]) -> Result<RecordingSettings, Error> {
|
|
134
136
|
// Parse output configuration
|
|
135
137
|
var outputSettings = OutputSettings()
|
|
136
|
-
|
|
138
|
+
|
|
137
139
|
if let outputDict = dict["output"] as? [String: Any] {
|
|
138
140
|
// Parse primary output settings
|
|
139
141
|
if let primaryDict = outputDict["primary"] as? [String: Any] {
|
|
140
142
|
outputSettings.primary.enabled = primaryDict["enabled"] as? Bool ?? true
|
|
141
143
|
outputSettings.primary.format = primaryDict["format"] as? String ?? "wav"
|
|
142
144
|
}
|
|
143
|
-
|
|
145
|
+
|
|
144
146
|
// Parse compressed output settings
|
|
145
147
|
if let compressedDict = outputDict["compressed"] as? [String: Any] {
|
|
146
148
|
outputSettings.compressed.enabled = compressedDict["enabled"] as? Bool ?? false
|
|
147
149
|
let format = (compressedDict["format"] as? String)?.lowercased() ?? "aac"
|
|
148
150
|
outputSettings.compressed.format = format
|
|
149
151
|
outputSettings.compressed.bitrate = compressedDict["bitrate"] as? Int ?? 128000
|
|
150
|
-
|
|
152
|
+
|
|
151
153
|
// Validate compression settings if enabled
|
|
152
154
|
if outputSettings.compressed.enabled {
|
|
153
155
|
if case .failure(let error) = CompressedRecordingInfo.validate(
|
|
@@ -159,40 +161,43 @@ struct RecordingSettings {
|
|
|
159
161
|
}
|
|
160
162
|
}
|
|
161
163
|
}
|
|
162
|
-
|
|
164
|
+
|
|
163
165
|
// Add extraction of new properties
|
|
164
166
|
let deviceId = dict["deviceId"] as? String
|
|
165
167
|
let deviceDisconnectionBehaviorStr = dict["deviceDisconnectionBehavior"] as? String
|
|
166
|
-
|
|
168
|
+
|
|
167
169
|
// Create settings
|
|
168
170
|
var settings = RecordingSettings(
|
|
169
171
|
sampleRate: dict["sampleRate"] as? Double ?? 44100.0,
|
|
170
172
|
desiredSampleRate: dict["desiredSampleRate"] as? Double ?? 44100.0,
|
|
171
173
|
autoResumeAfterInterruption: dict["autoResumeAfterInterruption"] as? Bool ?? false
|
|
172
174
|
)
|
|
173
|
-
|
|
175
|
+
|
|
174
176
|
settings.output = outputSettings
|
|
175
|
-
|
|
177
|
+
|
|
176
178
|
// Parse core settings
|
|
177
179
|
settings.numberOfChannels = dict["channels"] as? Int ?? 1
|
|
178
180
|
settings.bitDepth = dict["bitDepth"] as? Int ?? 16
|
|
179
181
|
settings.interval = dict["interval"] as? Int
|
|
180
182
|
settings.intervalAnalysis = dict["intervalAnalysis"] as? Int
|
|
181
|
-
|
|
183
|
+
if let maxDurationNumber = dict["maxDurationMs"] as? NSNumber {
|
|
184
|
+
settings.maxDurationMs = maxDurationNumber.int64Value
|
|
185
|
+
}
|
|
186
|
+
settings.autoStopOnMaxDuration = dict["autoStopOnMaxDuration"] as? Bool ?? false
|
|
182
187
|
// Parse feature flags
|
|
183
188
|
settings.keepAwake = dict["keepAwake"] as? Bool ?? true
|
|
184
189
|
settings.showNotification = dict["showNotification"] as? Bool ?? false
|
|
185
190
|
settings.enableProcessing = dict["enableProcessing"] as? Bool ?? false
|
|
186
|
-
|
|
191
|
+
|
|
187
192
|
settings.featureOptions = dict["features"] as? [String: Bool]
|
|
188
|
-
|
|
193
|
+
|
|
189
194
|
// Update segmentDurationMs parsing
|
|
190
195
|
settings.segmentDurationMs = dict["segmentDurationMs"] as? Int ?? 100
|
|
191
|
-
|
|
196
|
+
|
|
192
197
|
// Parse iOS-specific config
|
|
193
198
|
if let iosDict = dict["ios"] as? [String: Any],
|
|
194
199
|
let audioSessionDict = iosDict["audioSession"] as? [String: Any] {
|
|
195
|
-
|
|
200
|
+
|
|
196
201
|
// Map category
|
|
197
202
|
let category: AVAudioSession.Category
|
|
198
203
|
if let categoryStr = audioSessionDict["category"] as? String {
|
|
@@ -208,7 +213,7 @@ struct RecordingSettings {
|
|
|
208
213
|
} else {
|
|
209
214
|
category = .record
|
|
210
215
|
}
|
|
211
|
-
|
|
216
|
+
|
|
212
217
|
// Map mode
|
|
213
218
|
let mode: AVAudioSession.Mode
|
|
214
219
|
if let modeStr = audioSessionDict["mode"] as? String {
|
|
@@ -226,7 +231,7 @@ struct RecordingSettings {
|
|
|
226
231
|
} else {
|
|
227
232
|
mode = .default
|
|
228
233
|
}
|
|
229
|
-
|
|
234
|
+
|
|
230
235
|
// Map category options
|
|
231
236
|
var categoryOptions: AVAudioSession.CategoryOptions = []
|
|
232
237
|
if let optionsArray = audioSessionDict["categoryOptions"] as? [String] {
|
|
@@ -243,63 +248,63 @@ struct RecordingSettings {
|
|
|
243
248
|
}
|
|
244
249
|
}
|
|
245
250
|
}
|
|
246
|
-
|
|
251
|
+
|
|
247
252
|
settings.ios = IOSConfig(audioSession: IOSAudioSessionConfig(
|
|
248
253
|
category: category,
|
|
249
254
|
mode: mode,
|
|
250
255
|
categoryOptions: categoryOptions
|
|
251
256
|
))
|
|
252
257
|
}
|
|
253
|
-
|
|
258
|
+
|
|
254
259
|
// Parse notification config
|
|
255
260
|
if let notificationDict = dict["notification"] as? [String: Any] {
|
|
256
261
|
var notificationConfig = NotificationConfig()
|
|
257
262
|
notificationConfig.title = notificationDict["title"] as? String
|
|
258
263
|
notificationConfig.text = notificationDict["text"] as? String
|
|
259
264
|
notificationConfig.icon = notificationDict["icon"] as? String
|
|
260
|
-
|
|
265
|
+
|
|
261
266
|
// Parse iOS-specific notification config
|
|
262
267
|
if let iosNotificationDict = notificationDict["ios"] as? [String: Any] {
|
|
263
268
|
notificationConfig.ios = IOSNotificationConfig(
|
|
264
269
|
categoryIdentifier: iosNotificationDict["categoryIdentifier"] as? String
|
|
265
270
|
)
|
|
266
271
|
}
|
|
267
|
-
|
|
272
|
+
|
|
268
273
|
settings.notification = notificationConfig
|
|
269
274
|
}
|
|
270
|
-
|
|
275
|
+
|
|
271
276
|
// Parse output settings (they remain nil if not provided)
|
|
272
277
|
if let directory = dict["outputDirectory"] as? String {
|
|
273
278
|
// Only validate if a custom directory is provided
|
|
274
279
|
let fileManager = FileManager.default
|
|
275
280
|
var isDirectory: ObjCBool = false
|
|
276
|
-
|
|
281
|
+
|
|
277
282
|
// Clean up the directory path by removing file:// protocol if present
|
|
278
283
|
let cleanDirectory = directory.replacingOccurrences(of: "file://", with: "")
|
|
279
284
|
.trimmingCharacters(in: CharacterSet(charactersIn: "/"))
|
|
280
285
|
.replacingOccurrences(of: "//", with: "/")
|
|
281
|
-
|
|
286
|
+
|
|
282
287
|
if !fileManager.fileExists(atPath: cleanDirectory, isDirectory: &isDirectory) {
|
|
283
288
|
return .failure(RecordingError.invalidOutputDirectory("Directory does not exist: \(cleanDirectory)"))
|
|
284
289
|
}
|
|
285
|
-
|
|
290
|
+
|
|
286
291
|
if !isDirectory.boolValue {
|
|
287
292
|
return .failure(RecordingError.invalidOutputDirectory("Path is not a directory: \(cleanDirectory)"))
|
|
288
293
|
}
|
|
289
|
-
|
|
294
|
+
|
|
290
295
|
if !fileManager.isWritableFile(atPath: cleanDirectory) {
|
|
291
296
|
return .failure(RecordingError.invalidOutputDirectory("Directory is not writable: \(cleanDirectory)"))
|
|
292
297
|
}
|
|
293
|
-
|
|
298
|
+
|
|
294
299
|
settings.outputDirectory = cleanDirectory
|
|
295
300
|
}
|
|
296
|
-
|
|
301
|
+
|
|
297
302
|
settings.filename = dict["filename"] as? String
|
|
298
|
-
|
|
303
|
+
|
|
299
304
|
// Set new properties
|
|
300
305
|
settings.deviceId = deviceId
|
|
301
306
|
settings.deviceDisconnectionBehavior = DeviceDisconnectionBehavior(rawValue: deviceDisconnectionBehaviorStr ?? "fallback") ?? .FALLBACK
|
|
302
|
-
|
|
307
|
+
|
|
303
308
|
if let bufferDuration = dict["bufferDurationSeconds"] as? Double {
|
|
304
309
|
settings.bufferDurationSeconds = bufferDuration
|
|
305
310
|
}
|
package/package.json
CHANGED
|
@@ -1,164 +1,164 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
2
|
+
"name": "@siteed/audio-studio",
|
|
3
|
+
"version": "3.2.1-beta.1",
|
|
4
|
+
"description": "Comprehensive audio processing library for React Native and Expo with recording, analysis, visualization, and streaming capabilities across iOS, Android, and web",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "commonjs",
|
|
7
|
+
"main": "./build/cjs/index.js",
|
|
8
|
+
"module": "./build/esm/index.js",
|
|
9
|
+
"types": "./build/types/index.d.ts",
|
|
10
|
+
"expo": {
|
|
11
|
+
"plugin": "./app.plugin.js"
|
|
12
|
+
},
|
|
13
|
+
"author": "Arthur Breton <abreton@siteed.net> (https://github.com/deeeed)",
|
|
14
|
+
"homepage": "https://github.com/deeeed/audiolab/blob/main/packages/audio-studio/README.md",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/deeeed/audiolab.git",
|
|
18
|
+
"directory": "packages/audio-studio"
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/deeeed/audiolab/issues"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"react-native",
|
|
25
|
+
"expo",
|
|
26
|
+
"audio",
|
|
27
|
+
"recording",
|
|
28
|
+
"audio-analysis",
|
|
29
|
+
"audio-processing",
|
|
30
|
+
"audio-visualization",
|
|
31
|
+
"waveform",
|
|
32
|
+
"spectrogram",
|
|
33
|
+
"mel-spectrogram",
|
|
34
|
+
"mfcc",
|
|
35
|
+
"audio-features",
|
|
36
|
+
"audio-compression",
|
|
37
|
+
"opus",
|
|
38
|
+
"aac",
|
|
39
|
+
"pcm",
|
|
40
|
+
"wav",
|
|
41
|
+
"cross-platform",
|
|
42
|
+
"background-recording",
|
|
43
|
+
"audio-trimming",
|
|
44
|
+
"dual-stream"
|
|
45
|
+
],
|
|
46
|
+
"files": [
|
|
47
|
+
"src",
|
|
48
|
+
"android",
|
|
49
|
+
"ios",
|
|
50
|
+
"cpp",
|
|
51
|
+
"plugin",
|
|
52
|
+
"app.plugin.js",
|
|
53
|
+
"LICENSE",
|
|
54
|
+
"CHANGELOG.md",
|
|
55
|
+
"generated",
|
|
56
|
+
"expo-module.config.json",
|
|
57
|
+
"README.md",
|
|
58
|
+
"package.json",
|
|
59
|
+
"*.podspec",
|
|
60
|
+
"prebuilt",
|
|
61
|
+
"build",
|
|
62
|
+
"!ios/build",
|
|
63
|
+
"!android/build",
|
|
64
|
+
"!android/gradle",
|
|
65
|
+
"!android/gradlew",
|
|
66
|
+
"!android/gradlew.bat",
|
|
67
|
+
"!android/local.properties",
|
|
68
|
+
"!ios/AudioStudioTests",
|
|
69
|
+
"!ios/AudioStudioTests/**",
|
|
70
|
+
"!ios/tests",
|
|
71
|
+
"!ios/tests/**",
|
|
72
|
+
"!android/src/androidTest",
|
|
73
|
+
"!android/src/androidTest/**",
|
|
74
|
+
"!android/src/test",
|
|
75
|
+
"!android/src/test/**",
|
|
76
|
+
"!android/src/test/resources",
|
|
77
|
+
"!android/src/test/resources/**",
|
|
78
|
+
"!**/__tests__",
|
|
79
|
+
"!**/__fixtures__",
|
|
80
|
+
"!**/__mocks__",
|
|
81
|
+
"!**/.*"
|
|
82
|
+
],
|
|
83
|
+
"scripts": {
|
|
84
|
+
"build:wasm": "bash scripts/build-wasm.sh",
|
|
85
|
+
"build": "rimraf build && yarn build:types && yarn build:cjs && yarn build:esm && yarn build:plugin && cp -r prebuilt/ build/cjs/prebuilt && cp -r prebuilt/ build/esm/prebuilt",
|
|
86
|
+
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
87
|
+
"build:esm": "tsc -p tsconfig.esm.json",
|
|
88
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
89
|
+
"build:plugin": "tsc --project plugin/tsconfig.json && cp plugin/build/index.js plugin/build/index.cjs",
|
|
90
|
+
"build:plugin:dev": "expo-module build plugin",
|
|
91
|
+
"build:dev": "expo-module build",
|
|
92
|
+
"clean": "expo-module clean && rimraf build plugin/build",
|
|
93
|
+
"lint": "expo-module lint",
|
|
94
|
+
"lint:fix": "expo-module lint --fix",
|
|
95
|
+
"test": "expo-module test",
|
|
96
|
+
"test:android": "yarn test:android:unit && yarn test:android:instrumented",
|
|
97
|
+
"test:android:unit": "cd ../../apps/playground/android && ./gradlew :siteed-audio-studio:test",
|
|
98
|
+
"test:android:instrumented": "cd ../../apps/playground/android && ./gradlew :siteed-audio-studio:connectedAndroidTest",
|
|
99
|
+
"test:android:unit:watch": "cd ../../apps/playground/android && ./gradlew :siteed-audio-studio:test --continuous",
|
|
100
|
+
"test:ios": "cd ../../apps/playground/ios && xcodebuild -workspace AudioDevPlayground.xcworkspace -scheme AudioDevPlayground -destination 'generic/platform=iOS Simulator' build",
|
|
101
|
+
"test:coverage": "cd ../../apps/playground/android && ./gradlew :siteed-audio-studio:jacocoTestReport",
|
|
102
|
+
"typecheck": "tsc --noEmit",
|
|
103
|
+
"docgen": "typedoc src/index.ts --plugin typedoc-plugin-markdown --readme none --out ../../documentation_site/docs/api-reference/API && node ../../scripts/escape-mdx-generics.js ../../documentation_site/docs/api-reference",
|
|
104
|
+
"prepare": "yarn build && node -e \"require('fs').renameSync('./plugin/build/index.d.ts', './plugin/build/index.d.cts')\"",
|
|
105
|
+
"prepublishOnly.disabled": "expo-module prepublishOnly",
|
|
106
|
+
"expo-module": "expo-module",
|
|
107
|
+
"open:ios": "open -a \"Xcode\" ../../apps/playground/ios",
|
|
108
|
+
"open:android": "open -a \"Android Studio\" ../../apps/playground/android",
|
|
109
|
+
"size": "bundle-size && size-limit",
|
|
110
|
+
"release": "./publish.sh",
|
|
111
|
+
"agent:test:unit": "yarn test:android:unit",
|
|
112
|
+
"agent:test:integration": "yarn test:android:instrumented",
|
|
113
|
+
"agent:compilation:check": "yarn typecheck && yarn build",
|
|
114
|
+
"android": "cd ../../apps/playground && yarn android",
|
|
115
|
+
"android:launch": "cd ../../apps/playground && yarn android:launch",
|
|
116
|
+
"validate:stream-long": "node scripts/validate-stream-long.mjs",
|
|
117
|
+
"android:device": "cd ../../apps/playground && yarn android:device",
|
|
118
|
+
"android:device:launch": "cd ../../apps/playground && yarn android:device:launch",
|
|
119
|
+
"summarize:stream-long": "node scripts/summarize-stream-long.mjs"
|
|
120
|
+
},
|
|
121
|
+
"devDependencies": {
|
|
122
|
+
"@expo/config-plugins": "~56.0.8",
|
|
123
|
+
"@expo/npm-proofread": "^1.0.1",
|
|
124
|
+
"@siteed/publisher": "^0.4.18",
|
|
125
|
+
"@size-limit/preset-big-lib": "^11.1.4",
|
|
126
|
+
"@types/jest": "^29.5.12",
|
|
127
|
+
"@types/node": "^20.12.7",
|
|
128
|
+
"@types/react": "^19.1.1",
|
|
129
|
+
"@typescript-eslint/eslint-plugin": "^8.60.0",
|
|
130
|
+
"@typescript-eslint/parser": "^8.60.0",
|
|
131
|
+
"bundle-size": "^1.1.5",
|
|
132
|
+
"eslint": "^8.56.0",
|
|
133
|
+
"eslint-config-prettier": "^9.1.0",
|
|
134
|
+
"eslint-config-universe": "^12.0.0",
|
|
135
|
+
"eslint-plugin-import": "^2.29.1",
|
|
136
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
137
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
138
|
+
"eslint-plugin-react": "^7.34.1",
|
|
139
|
+
"expo": "^56.0.5",
|
|
140
|
+
"expo-module-scripts": "^56.0.2",
|
|
141
|
+
"expo-modules-core": "~56.0.13",
|
|
142
|
+
"jest": "^29.7.0",
|
|
143
|
+
"prettier": "^3.2.5",
|
|
144
|
+
"react": "19.2.3",
|
|
145
|
+
"react-native": "0.85.3",
|
|
146
|
+
"rimraf": "^6.0.1",
|
|
147
|
+
"size-limit": "^11.1.4",
|
|
148
|
+
"ts-jest": "^29.4.11",
|
|
149
|
+
"ts-node": "^10.9.2",
|
|
150
|
+
"typedoc": "^0.28.19",
|
|
151
|
+
"typedoc-plugin-markdown": "~4.11.0",
|
|
152
|
+
"typescript": "~6.0.3"
|
|
153
|
+
},
|
|
154
|
+
"peerDependencies": {
|
|
155
|
+
"@expo/config-plugins": ">=7.0.0",
|
|
156
|
+
"expo": ">=52.0.0",
|
|
157
|
+
"react": "*",
|
|
158
|
+
"react-native": "*"
|
|
159
|
+
},
|
|
160
|
+
"publishConfig": {
|
|
161
|
+
"access": "public",
|
|
162
|
+
"registry": "https://registry.npmjs.org"
|
|
163
|
+
}
|
|
164
|
+
}
|
package/plugin/tsconfig.json
CHANGED
|
@@ -3,8 +3,14 @@
|
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"outDir": "build",
|
|
5
5
|
"lib": ["es2023", "dom"],
|
|
6
|
-
"rootDir": "src"
|
|
6
|
+
"rootDir": "src",
|
|
7
|
+
"types": ["node"]
|
|
8
|
+
},
|
|
9
|
+
"ts-node": {
|
|
10
|
+
"compilerOptions": {
|
|
11
|
+
"rootDir": "."
|
|
12
|
+
}
|
|
7
13
|
},
|
|
8
14
|
"include": ["./src"],
|
|
9
15
|
"exclude": ["**/__mocks__/*", "**/__tests__/*"]
|
|
10
|
-
}
|
|
16
|
+
}
|