@lucent-lang/lucent 0.0.4 → 0.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.
- package/README.md +97 -0
- package/app.plugin.js +46 -10
- package/dist/{bench-CR3E7e2e.js → bench-eEez4jhQ.js} +10 -6
- package/dist/{build-CAIrRSYA.js → build-CpUjeHFz.js} +1 -1
- package/dist/{build-check-QozuNJm5.js → build-check-BA1ZEp9s.js} +28 -13
- package/dist/{check-1SCmYlqA.js → check-BZx3FgI6.js} +1 -1
- package/dist/cli.js +62 -13
- package/dist/{codes-CIuwXt1S.js → codes-D-6LxUqD.js} +163 -7
- package/dist/compiler.js +4 -4
- package/dist/{dashboard-B-NzjjaN.js → dashboard-CC-HXhcd.js} +2 -2
- package/dist/{dev-BYWMP7oC.js → dev-DI5yL8zx.js} +62 -23
- package/dist/{diagnostic-BM9sXmwl.js → diagnostic-BvwLZQS1.js} +3 -1
- package/dist/{doctor-C0PrfWT6.js → doctor-CTAX3euc.js} +1 -1
- package/dist/{doctor-DdR4JnVc.js → doctor-CrgOAV5L.js} +1 -1
- package/dist/{explain--vV1oaRl.js → explain-Byit07F-.js} +1 -1
- package/dist/{packages-HyskKIsY.js → packages-CSmKeaAh.js} +2 -33
- package/dist/pipeline-BM_VM2X_.js +700 -0
- package/dist/project-BKNoTEEp.js +342 -0
- package/dist/sdk-coverage-iiv3JqMp.js +113 -0
- package/dist/sdk-diff-ByJ1Gw-F.js +109 -0
- package/dist/sdk-lock-BQn7IyRs.js +38 -0
- package/dist/{sdk-prefetch-mo04JDZV.js → sdk-prefetch-Bv2pNega.js} +2 -2
- package/dist/{sdk-search-Iv4K3-8a.js → sdk-search-CPGJm_Ne.js} +2 -2
- package/dist/{sdk-show-CkrdlqlP.js → sdk-show-BUkLqRnA.js} +5 -4
- package/dist/sdk-usage-0ZFMAYg1.js +95 -0
- package/dist/src-ChnmWLwn.js +40851 -0
- package/dist/trace-Bi4hkmPx.js +139 -0
- package/lib/core.cjs +368 -1
- package/lib/sdk/android.d.ts +54 -1
- package/lib/sdk/compose.d.ts +94 -0
- package/lib/sdk/compose.schemas.json.gz +0 -0
- package/lib/sdk/core.d.ts +201 -0
- package/lib/sdk/ios.d.ts +75 -2
- package/lib/sdk/ui.d.ts +129 -0
- package/metro/transformer.cjs +11 -2
- package/package.json +4 -3
- package/runtime/cpp/lucent/abort.cpp +59 -11
- package/runtime/cpp/lucent/abort.h +22 -6
- package/runtime/cpp/lucent/array.h +12 -2
- package/runtime/cpp/lucent/async.h +101 -21
- package/runtime/cpp/lucent/bigint.cpp +898 -0
- package/runtime/cpp/lucent/bigint.h +302 -0
- package/runtime/cpp/lucent/buffer.cpp +228 -0
- package/runtime/cpp/lucent/buffer.h +328 -0
- package/runtime/cpp/lucent/builtins.cpp +4 -1
- package/runtime/cpp/lucent/bytes.h +21 -2
- package/runtime/cpp/lucent/callback.cpp +29 -0
- package/runtime/cpp/lucent/callback.h +230 -0
- package/runtime/cpp/lucent/compute.cpp +370 -0
- package/runtime/cpp/lucent/compute.h +455 -0
- package/runtime/cpp/lucent/conversions.h +111 -0
- package/runtime/cpp/lucent/core.h +16 -5
- package/runtime/cpp/lucent/equality.h +107 -28
- package/runtime/cpp/lucent/execution.cpp +416 -0
- package/runtime/cpp/lucent/execution.h +270 -0
- package/runtime/cpp/lucent/extension.cpp +97 -0
- package/runtime/cpp/lucent/extension.h +210 -0
- package/runtime/cpp/lucent/helpers.h +12 -5
- package/runtime/cpp/lucent/items.h +52 -0
- package/runtime/cpp/lucent/jserror.cpp +9 -0
- package/runtime/cpp/lucent/jserror.h +11 -0
- package/runtime/cpp/lucent/jsi/convert.cpp +138 -0
- package/runtime/cpp/lucent/jsi/convert.h +128 -59
- package/runtime/cpp/lucent/jsi/host.cpp +213 -35
- package/runtime/cpp/lucent/jsi/host.h +116 -16
- package/runtime/cpp/lucent/json.h +19 -1
- package/runtime/cpp/lucent/lifecycle.cpp +260 -0
- package/runtime/cpp/lucent/lifecycle.h +124 -0
- package/runtime/cpp/lucent/lucent.h +7 -0
- package/runtime/cpp/lucent/map.h +41 -7
- package/runtime/cpp/lucent/native.cpp +35 -47
- package/runtime/cpp/lucent/native.h +116 -26
- package/runtime/cpp/lucent/number.cpp +38 -38
- package/runtime/cpp/lucent/number.h +33 -0
- package/runtime/cpp/lucent/operation.h +65 -0
- package/runtime/cpp/lucent/ops.h +14 -6
- package/runtime/cpp/lucent/platform/android.cpp +223 -10
- package/runtime/cpp/lucent/platform/android.h +227 -4
- package/runtime/cpp/lucent/platform/android_activity.cpp +258 -0
- package/runtime/cpp/lucent/platform/android_requests.h +140 -0
- package/runtime/cpp/lucent/platform/compose.h +256 -0
- package/runtime/cpp/lucent/platform/ios.h +325 -25
- package/runtime/cpp/lucent/platform/ios.mm +1 -14
- package/runtime/cpp/lucent/platform/ios_ui.h +192 -0
- package/runtime/cpp/lucent/platform/ios_ui.mm +454 -0
- package/runtime/cpp/lucent/platform/swiftui.h +190 -0
- package/runtime/cpp/lucent/presentation.cpp +11 -0
- package/runtime/cpp/lucent/presentation.h +109 -0
- package/runtime/cpp/lucent/reactive.cpp +406 -0
- package/runtime/cpp/lucent/reactive.h +566 -0
- package/runtime/cpp/lucent/report.cpp +40 -0
- package/runtime/cpp/lucent/report.h +16 -0
- package/runtime/cpp/lucent/resource.cpp +83 -0
- package/runtime/cpp/lucent/resource.h +75 -0
- package/runtime/cpp/lucent/scheduler.cpp +38 -124
- package/runtime/cpp/lucent/scheduler.h +102 -83
- package/runtime/cpp/lucent/scope.cpp +308 -0
- package/runtime/cpp/lucent/scope.h +452 -0
- package/runtime/cpp/lucent/sizing.h +263 -0
- package/runtime/cpp/lucent/slots.h +231 -0
- package/runtime/cpp/lucent/trace.cpp +539 -0
- package/runtime/cpp/lucent/trace.h +251 -0
- package/runtime/cpp/lucent/transport.cpp +9 -0
- package/runtime/cpp/lucent/transport.h +341 -0
- package/runtime/cpp/lucent/view.cpp +123 -0
- package/runtime/cpp/lucent/view.h +157 -0
- package/runtime/cpp/rn/LucentComponentView.h +121 -0
- package/runtime/cpp/rn/LucentComponentView.mm +479 -0
- package/runtime/cpp/rn/LucentModule.cpp +37 -7
- package/runtime/cpp/rn/LucentModule.h +3 -0
- package/runtime/cpp/rn/LucentViewChildren.h +80 -0
- package/runtime/cpp/rn/LucentViewChildren.mm +211 -0
- package/runtime/cpp/rn/LucentViewRegistry.h +62 -0
- package/runtime/cpp/rn/LucentViewRequests.cpp +91 -0
- package/runtime/cpp/rn/LucentViewRequests.h +104 -0
- package/runtime/cpp/rn/LucentViewSizing.h +345 -0
- package/runtime/cpp/rn/LucentViewSlots.h +242 -0
- package/runtime/cpp/rn/LucentViewValues.h +125 -0
- package/runtime/cpp/rn/LucentViews.h +440 -0
- package/runtime/cpp/rn/LucentViewsAndroid.cpp +439 -0
- package/runtime/cpp/rn/LucentViewsAndroid.h +138 -0
- package/runtime/cpp/third_party/dragonbox/LICENSE-Boost +23 -0
- package/runtime/cpp/third_party/dragonbox/README.md +16 -0
- package/runtime/cpp/third_party/dragonbox/dragonbox.h +4440 -0
- package/runtime/js/index.d.ts +11 -1
- package/runtime/js/index.js +84 -8
- package/runtime/js/views.d.ts +38 -0
- package/runtime/js/views.js +226 -0
- package/runtime/native/android/CMakeLists.txt +4 -1
- package/runtime/native/android/src/compose/java/dev/lucent/compose/CompositionRules.kt +44 -0
- package/runtime/native/android/src/compose/java/dev/lucent/compose/LucentComposition.kt +161 -0
- package/runtime/native/android/src/main/java/dev/lucent/LucentActivities.java +292 -0
- package/runtime/native/android/src/main/java/dev/lucent/LucentChildren.java +174 -0
- package/runtime/native/android/src/main/java/dev/lucent/LucentHostView.java +232 -0
- package/runtime/native/android/src/main/java/dev/lucent/LucentInitializer.java +46 -0
- package/runtime/native/android/src/main/java/dev/lucent/LucentPackage.java +4 -3
- package/runtime/native/android/src/main/java/dev/lucent/LucentRequestActivity.java +92 -0
- package/runtime/native/android/src/main/java/dev/lucent/LucentSlotView.java +102 -0
- package/runtime/native/android/src/main/java/dev/lucent/LucentViewManager.java +149 -0
- package/runtime/native/android/src/main/java/dev/lucent/LucentViewManagers.java +16 -0
- package/runtime/native/android/src/main/java/dev/lucent/LucentViews.java +44 -0
- package/runtime/test/jsi/harness.cpp +9 -0
- package/schemas/build.schema.json +96 -1
- package/schemas/check.schema.json +56 -1
- package/schemas/lucent.schema.json +495 -9
- package/schemas/sdk-diff.schema.json +70 -0
- package/schemas/sdk-lock.schema.json +67 -0
- package/ts-plugin/index.js +85 -4
- package/dist/pipeline-CH7-2cxu.js +0 -232
- package/dist/project-D8tEet0k.js +0 -150
- package/dist/sdk-coverage-BoW_3Efd.js +0 -64
- package/dist/src-BD7f1_aZ.js +0 -11493
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$id": "https://lucent-lang.dev/schemas/check.schema.json",
|
|
3
3
|
"title": "lucent check --json",
|
|
4
4
|
"type": "object",
|
|
5
|
-
"required": ["ok", "modules", "diagnostics", "errors", "ms"],
|
|
5
|
+
"required": ["ok", "modules", "diagnostics", "warnings", "errors", "ms"],
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"properties": {
|
|
8
8
|
"ok": {
|
|
@@ -58,10 +58,65 @@
|
|
|
58
58
|
"docs": {
|
|
59
59
|
"type": "string",
|
|
60
60
|
"description": "Where the code is explained"
|
|
61
|
+
},
|
|
62
|
+
"severity": {
|
|
63
|
+
"const": "warning",
|
|
64
|
+
"description": "Present on warnings only"
|
|
61
65
|
}
|
|
62
66
|
}
|
|
63
67
|
}
|
|
64
68
|
},
|
|
69
|
+
"warnings": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"required": ["code", "message"],
|
|
74
|
+
"properties": {
|
|
75
|
+
"code": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"pattern": "^LUCENT\\d{4}$",
|
|
78
|
+
"description": "Stable code; lucent explain <code> describes it"
|
|
79
|
+
},
|
|
80
|
+
"message": {
|
|
81
|
+
"type": "string"
|
|
82
|
+
},
|
|
83
|
+
"file": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"description": "Relative to the project root"
|
|
86
|
+
},
|
|
87
|
+
"line": {
|
|
88
|
+
"type": "integer",
|
|
89
|
+
"minimum": 1
|
|
90
|
+
},
|
|
91
|
+
"column": {
|
|
92
|
+
"type": "integer",
|
|
93
|
+
"minimum": 1
|
|
94
|
+
},
|
|
95
|
+
"start": {
|
|
96
|
+
"type": "integer",
|
|
97
|
+
"minimum": 0,
|
|
98
|
+
"description": "Offset of the span in the file"
|
|
99
|
+
},
|
|
100
|
+
"length": {
|
|
101
|
+
"type": "integer",
|
|
102
|
+
"minimum": 0
|
|
103
|
+
},
|
|
104
|
+
"fix": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"description": "How to fix it, in one line"
|
|
107
|
+
},
|
|
108
|
+
"docs": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"description": "Where the code is explained"
|
|
111
|
+
},
|
|
112
|
+
"severity": {
|
|
113
|
+
"const": "warning",
|
|
114
|
+
"description": "Present on warnings only"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"description": "Warnings: reported, but the build goes on"
|
|
119
|
+
},
|
|
65
120
|
"errors": {
|
|
66
121
|
"type": "integer",
|
|
67
122
|
"minimum": 0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$id": "https://lucent-lang.dev/schemas/lucent.schema.json",
|
|
3
3
|
"title": "lucent.json",
|
|
4
|
-
"description": "What a Lucent package's platform code needs from the app that installs it
|
|
4
|
+
"description": "What a Lucent package's platform code needs from the app that installs it, next to the package's package.json. The app's build merges every package's needs into .lucent/native/resolved.json, naming the package each came from. Needs that cannot all hold fail the build, naming both packages.",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"properties": {
|
|
@@ -12,13 +12,182 @@
|
|
|
12
12
|
"properties": {
|
|
13
13
|
"pods": {
|
|
14
14
|
"type": "object",
|
|
15
|
-
"description": "CocoaPods the native package depends on: pod name → version requirement, as in a Podfile (\"~> 1.0\"). Their frameworks can be imported from lucent:ios/* once installed.",
|
|
16
|
-
"additionalProperties": {
|
|
15
|
+
"description": "CocoaPods the native package depends on: pod name → version requirement, as in a Podfile (\"~> 1.0\", \">= 1.2, < 2\"). Every package's requirement on a pod goes to CocoaPods, which picks the version; requirements no version can meet fail the build. Their frameworks can be imported from lucent:ios/* once installed.",
|
|
16
|
+
"additionalProperties": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"frameworks": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"description": "Apple frameworks the native package links, such as \"CoreHaptics\". Frameworks of the lucent:ios/* modules the code imports are linked without listing them here.",
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
}
|
|
17
26
|
},
|
|
18
27
|
"infoPlist": {
|
|
19
28
|
"type": "object",
|
|
20
|
-
"description": "Info.plist entries: key → string value. The Expo config plugin adds them
|
|
21
|
-
"additionalProperties": {
|
|
29
|
+
"description": "Info.plist entries: key → a string, a boolean or an array of strings. Packages must agree on a key's value, except arrays, which join. The Expo config plugin adds them: a key the app sets keeps the app's value, and an array gains the values it lacks. For bare apps, lucent build names the keys and array values the app's Info.plist lacks.",
|
|
30
|
+
"additionalProperties": {
|
|
31
|
+
"anyOf": [
|
|
32
|
+
{
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "boolean"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": {
|
|
41
|
+
"type": "string"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"nativeSources": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"description": "Directories of native sources compiled into the native package's pod: C, C++, Objective-C and Swift (.h, .hpp, .m, .mm, .c, .cc, .cpp, .swift). Each directory is also a header search path. Paths are relative to the package; lucent build copies them into .lucent/native/packages/<package>/.",
|
|
50
|
+
"items": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"resources": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"description": "Files or directories copied into the app bundle's root under their own names, such as \"assets/chime.caf\". Two that would land on the same name fail the build, naming both packages: namespace one with resourceBundles.",
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "string"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"resourceBundles": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"description": "Resource bundles: bundle name → files or directories copied into <name>.bundle in the app. A bundle name belongs to one package.",
|
|
64
|
+
"additionalProperties": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"items": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"vendoredFrameworks": {
|
|
72
|
+
"type": "array",
|
|
73
|
+
"description": "Prebuilt .framework or .xcframework directories the pod links and embeds. lucent:ios binds their modules (an XCFramework's through its iOS simulator slice). Two with the same framework name fail the build, naming both packages.",
|
|
74
|
+
"items": {
|
|
75
|
+
"type": "string"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"swiftPackages": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"description": "Swift packages the pod depends on: package URL → { requirement, products }. The requirement is Xcode's, such as { \"kind\": \"upToNextMajorVersion\", \"minimumVersion\": \"1.2.0\" }. Packages must agree on a URL's requirement; their products join. React Native's spm_dependency adds them at pod install.",
|
|
81
|
+
"additionalProperties": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": ["requirement", "products"],
|
|
85
|
+
"properties": {
|
|
86
|
+
"requirement": {
|
|
87
|
+
"anyOf": [
|
|
88
|
+
{
|
|
89
|
+
"type": "object",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"required": ["kind", "minimumVersion"],
|
|
92
|
+
"properties": {
|
|
93
|
+
"kind": {
|
|
94
|
+
"enum": ["upToNextMajorVersion", "upToNextMinorVersion"]
|
|
95
|
+
},
|
|
96
|
+
"minimumVersion": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"type": "object",
|
|
103
|
+
"additionalProperties": false,
|
|
104
|
+
"required": ["kind", "version"],
|
|
105
|
+
"properties": {
|
|
106
|
+
"kind": {
|
|
107
|
+
"const": "exactVersion"
|
|
108
|
+
},
|
|
109
|
+
"version": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "object",
|
|
116
|
+
"additionalProperties": false,
|
|
117
|
+
"required": ["kind", "minimumVersion", "maximumVersion"],
|
|
118
|
+
"properties": {
|
|
119
|
+
"kind": {
|
|
120
|
+
"const": "versionRange"
|
|
121
|
+
},
|
|
122
|
+
"minimumVersion": {
|
|
123
|
+
"type": "string"
|
|
124
|
+
},
|
|
125
|
+
"maximumVersion": {
|
|
126
|
+
"type": "string"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"type": "object",
|
|
132
|
+
"additionalProperties": false,
|
|
133
|
+
"required": ["kind", "branch"],
|
|
134
|
+
"properties": {
|
|
135
|
+
"kind": {
|
|
136
|
+
"const": "branch"
|
|
137
|
+
},
|
|
138
|
+
"branch": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"type": "object",
|
|
145
|
+
"additionalProperties": false,
|
|
146
|
+
"required": ["kind", "revision"],
|
|
147
|
+
"properties": {
|
|
148
|
+
"kind": {
|
|
149
|
+
"const": "revision"
|
|
150
|
+
},
|
|
151
|
+
"revision": {
|
|
152
|
+
"type": "string"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
"products": {
|
|
159
|
+
"type": "array",
|
|
160
|
+
"items": {
|
|
161
|
+
"type": "string"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"entitlements": {
|
|
168
|
+
"type": "object",
|
|
169
|
+
"description": "The app's entitlements: key → a string, a boolean or an array of strings. Packages must agree on a key's value, except arrays, which join. The Expo config plugin adds them like Info.plist entries. For bare apps, lucent build names what the app's .entitlements file lacks.",
|
|
170
|
+
"additionalProperties": {
|
|
171
|
+
"anyOf": [
|
|
172
|
+
{
|
|
173
|
+
"type": "string"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"type": "boolean"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"type": "array",
|
|
180
|
+
"items": {
|
|
181
|
+
"type": "string"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"deploymentTarget": {
|
|
188
|
+
"type": "string",
|
|
189
|
+
"pattern": "^\\d+(\\.\\d+){0,2}$",
|
|
190
|
+
"description": "The lowest iOS version the package runs on, such as \"15.1\". The pod requires the highest any package needs, and never less than React Native's minimum. CocoaPods fails an app target below it."
|
|
22
191
|
}
|
|
23
192
|
}
|
|
24
193
|
},
|
|
@@ -29,13 +198,330 @@
|
|
|
29
198
|
"properties": {
|
|
30
199
|
"dependencies": {
|
|
31
200
|
"type": "object",
|
|
32
|
-
"description": "Gradle artifacts: \"group:artifact\" → version. They become api dependencies of the native package, so lucent:android/* can import their classes.",
|
|
33
|
-
"additionalProperties": {
|
|
201
|
+
"description": "Gradle artifacts: \"group:artifact\" → version. They become api dependencies of the native package, so lucent:android/* can import their classes. Every package's version of an artifact goes to Gradle, which picks one; a strict version (\"1.0!!\") that another package's excludes fails the build.",
|
|
202
|
+
"additionalProperties": {
|
|
203
|
+
"type": "string"
|
|
204
|
+
}
|
|
34
205
|
},
|
|
35
206
|
"permissions": {
|
|
36
207
|
"type": "array",
|
|
37
|
-
"description": "Android permissions for the manifest, such as \"android.permission.CAMERA\". Permissions the SDK methods you call require are added without listing them here.",
|
|
38
|
-
"items": {
|
|
208
|
+
"description": "Android permissions for the manifest, such as \"android.permission.CAMERA\". Each is declared once, however many packages list it. Permissions the SDK methods you call require are added without listing them here.",
|
|
209
|
+
"items": {
|
|
210
|
+
"type": "string"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"nativeSources": {
|
|
214
|
+
"type": "array",
|
|
215
|
+
"description": "Java and Kotlin source roots of the native package's Android library, such as \"native/android\". Their C and C++ files (.c, .cc, .cpp) are compiled with the runtime. Each directory is also a header search path. Kotlin sources apply the Kotlin Android plugin.",
|
|
216
|
+
"items": {
|
|
217
|
+
"type": "string"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"resources": {
|
|
221
|
+
"type": "array",
|
|
222
|
+
"description": "Android resource directories (the res layout: drawable/, values/…). A file-based resource two packages both have fails the build, naming both; Android's resource merger reports duplicate value resources.",
|
|
223
|
+
"items": {
|
|
224
|
+
"type": "string"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"assets": {
|
|
228
|
+
"type": "array",
|
|
229
|
+
"description": "Asset directories, packaged into the app's assets. Two files with the same path fail the build, naming both packages.",
|
|
230
|
+
"items": {
|
|
231
|
+
"type": "string"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"libraries": {
|
|
235
|
+
"type": "array",
|
|
236
|
+
"description": "Prebuilt .aar or .jar files, api dependencies of the native package's library. lucent:android binds their classes, before the app's Gradle build has run. Two with the same file name fail the build, naming both packages.",
|
|
237
|
+
"items": {
|
|
238
|
+
"type": "string"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"nativeLibraries": {
|
|
242
|
+
"type": "array",
|
|
243
|
+
"description": "Directories of prebuilt native libraries by ABI (arm64-v8a/liborbit.so), packaged into the app. Two with the same path fail the build, naming both packages.",
|
|
244
|
+
"items": {
|
|
245
|
+
"type": "string"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"components": {
|
|
249
|
+
"type": "array",
|
|
250
|
+
"description": "Components for the library's manifest, which Android merges into the app's: services, receivers, activities and providers. A class is declared once; packages that declare it differently fail the build, naming both.",
|
|
251
|
+
"items": {
|
|
252
|
+
"type": "object",
|
|
253
|
+
"additionalProperties": false,
|
|
254
|
+
"required": ["kind", "name"],
|
|
255
|
+
"if": {
|
|
256
|
+
"properties": {
|
|
257
|
+
"kind": {
|
|
258
|
+
"const": "provider"
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"then": {
|
|
263
|
+
"required": ["authorities"]
|
|
264
|
+
},
|
|
265
|
+
"properties": {
|
|
266
|
+
"kind": {
|
|
267
|
+
"enum": ["activity", "service", "receiver", "provider"]
|
|
268
|
+
},
|
|
269
|
+
"name": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"pattern": "^[A-Za-z_$][\\w$]*(\\.[A-Za-z_$][\\w$]*)+$",
|
|
272
|
+
"description": "Fully qualified class name."
|
|
273
|
+
},
|
|
274
|
+
"exported": {
|
|
275
|
+
"type": "boolean"
|
|
276
|
+
},
|
|
277
|
+
"enabled": {
|
|
278
|
+
"type": "boolean"
|
|
279
|
+
},
|
|
280
|
+
"permission": {
|
|
281
|
+
"type": "string"
|
|
282
|
+
},
|
|
283
|
+
"authorities": {
|
|
284
|
+
"type": "string"
|
|
285
|
+
},
|
|
286
|
+
"grantUriPermissions": {
|
|
287
|
+
"type": "boolean"
|
|
288
|
+
},
|
|
289
|
+
"foregroundServiceType": {
|
|
290
|
+
"type": "string"
|
|
291
|
+
},
|
|
292
|
+
"theme": {
|
|
293
|
+
"type": "string",
|
|
294
|
+
"description": "An activity's theme, such as \"@android:style/Theme.Translucent.NoTitleBar\"."
|
|
295
|
+
},
|
|
296
|
+
"configChanges": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"description": "The configuration changes an activity handles itself instead of being recreated, such as \"orientation|screenSize\"."
|
|
299
|
+
},
|
|
300
|
+
"intentFilters": {
|
|
301
|
+
"type": "array",
|
|
302
|
+
"items": {
|
|
303
|
+
"type": "object",
|
|
304
|
+
"additionalProperties": false,
|
|
305
|
+
"required": ["actions"],
|
|
306
|
+
"properties": {
|
|
307
|
+
"actions": {
|
|
308
|
+
"type": "array",
|
|
309
|
+
"items": {
|
|
310
|
+
"type": "string"
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"categories": {
|
|
314
|
+
"type": "array",
|
|
315
|
+
"items": {
|
|
316
|
+
"type": "string"
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"data": {
|
|
320
|
+
"type": "array",
|
|
321
|
+
"items": {
|
|
322
|
+
"type": "object",
|
|
323
|
+
"additionalProperties": false,
|
|
324
|
+
"properties": {
|
|
325
|
+
"scheme": {
|
|
326
|
+
"type": "string"
|
|
327
|
+
},
|
|
328
|
+
"host": {
|
|
329
|
+
"type": "string"
|
|
330
|
+
},
|
|
331
|
+
"port": {
|
|
332
|
+
"type": "string"
|
|
333
|
+
},
|
|
334
|
+
"path": {
|
|
335
|
+
"type": "string"
|
|
336
|
+
},
|
|
337
|
+
"pathPrefix": {
|
|
338
|
+
"type": "string"
|
|
339
|
+
},
|
|
340
|
+
"pathPattern": {
|
|
341
|
+
"type": "string"
|
|
342
|
+
},
|
|
343
|
+
"mimeType": {
|
|
344
|
+
"type": "string"
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"metaData": {
|
|
353
|
+
"type": "object",
|
|
354
|
+
"additionalProperties": {
|
|
355
|
+
"type": "string"
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"minSdk": {
|
|
362
|
+
"type": "integer",
|
|
363
|
+
"minimum": 1,
|
|
364
|
+
"description": "The lowest Android API level the package runs on. The library requires the highest any package needs, and never less than the app's minSdkVersion. Android's manifest merger fails an app below it."
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"extensions": {
|
|
369
|
+
"type": "object",
|
|
370
|
+
"description": "Extension name → a native extension, imported as lucent:ext/<name>. A name belongs to one package of the app.",
|
|
371
|
+
"propertyNames": {
|
|
372
|
+
"pattern": "^[A-Za-z][\\w-]*$"
|
|
373
|
+
},
|
|
374
|
+
"additionalProperties": {
|
|
375
|
+
"type": "object",
|
|
376
|
+
"description": "A native extension: a C header whose functions Lucent code imports from lucent:ext/<name>, with what C declarations cannot say. Every name is checked against the header as clang reads it.",
|
|
377
|
+
"additionalProperties": false,
|
|
378
|
+
"required": ["header"],
|
|
379
|
+
"properties": {
|
|
380
|
+
"header": {
|
|
381
|
+
"type": "string",
|
|
382
|
+
"description": "The C header, relative to the package, in a directory both ios.nativeSources and android.nativeSources list: both builds compile the extension and search that directory. It must compile as C and as C++, declaring its functions in extern \"C\" when C++ includes it. Functions it declares that need no declaration here (numbers and booleans) are bound as they are; one that takes a handle must be named here."
|
|
383
|
+
},
|
|
384
|
+
"handles": {
|
|
385
|
+
"type": "object",
|
|
386
|
+
"description": "Opaque struct (declared, not defined, in the header) → the handle Lucent code holds, a class of lucent:ext/<name>. Handles cannot cross the JavaScript boundary: a Lucent class keeps one.",
|
|
387
|
+
"propertyNames": {
|
|
388
|
+
"pattern": "^[A-Za-z_]\\w*$"
|
|
389
|
+
},
|
|
390
|
+
"additionalProperties": {
|
|
391
|
+
"type": "object",
|
|
392
|
+
"additionalProperties": false,
|
|
393
|
+
"required": ["create", "destroy"],
|
|
394
|
+
"properties": {
|
|
395
|
+
"create": {
|
|
396
|
+
"type": "string",
|
|
397
|
+
"pattern": "^[A-Za-z_]\\w*$",
|
|
398
|
+
"description": "The function that makes one: it returns a pointer to the struct, null when it fails (declare failsWhen: null). It is the class's constructor."
|
|
399
|
+
},
|
|
400
|
+
"destroy": {
|
|
401
|
+
"type": "string",
|
|
402
|
+
"pattern": "^[A-Za-z_]\\w*$",
|
|
403
|
+
"description": "void f(T *): runs once, when the handle closes (close(), a using declaration, or its last reference going)."
|
|
404
|
+
},
|
|
405
|
+
"methods": {
|
|
406
|
+
"type": "object",
|
|
407
|
+
"description": "Method name → the function it calls, with the handle as its first argument.",
|
|
408
|
+
"additionalProperties": {
|
|
409
|
+
"type": "string",
|
|
410
|
+
"pattern": "^[A-Za-z_]\\w*$"
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"affinity": {
|
|
414
|
+
"enum": ["any", "main"],
|
|
415
|
+
"description": "The thread: any, one call at a time (the default), or the main thread, where Lucent code uses it inside main(() => …)."
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"functions": {
|
|
421
|
+
"type": "object",
|
|
422
|
+
"description": "C function name → what its parameters and result mean.",
|
|
423
|
+
"propertyNames": {
|
|
424
|
+
"pattern": "^[A-Za-z_]\\w*$"
|
|
425
|
+
},
|
|
426
|
+
"additionalProperties": {
|
|
427
|
+
"type": "object",
|
|
428
|
+
"additionalProperties": false,
|
|
429
|
+
"properties": {
|
|
430
|
+
"params": {
|
|
431
|
+
"type": "object",
|
|
432
|
+
"description": "C parameter name → what the pointer is. Numbers, booleans and handles need nothing; nothing escapes the call.",
|
|
433
|
+
"propertyNames": {
|
|
434
|
+
"pattern": "^[A-Za-z_]\\w*$"
|
|
435
|
+
},
|
|
436
|
+
"additionalProperties": {
|
|
437
|
+
"oneOf": [
|
|
438
|
+
{
|
|
439
|
+
"type": "object",
|
|
440
|
+
"description": "Bytes the function reads or writes: a Uint8Array in Lucent, as many bytes as its length. The pointer must point to 8-bit integers or void, and to non-const ones for write.",
|
|
441
|
+
"additionalProperties": false,
|
|
442
|
+
"required": ["bytes", "length"],
|
|
443
|
+
"properties": {
|
|
444
|
+
"bytes": {
|
|
445
|
+
"enum": ["read", "write"]
|
|
446
|
+
},
|
|
447
|
+
"length": {
|
|
448
|
+
"type": "string",
|
|
449
|
+
"pattern": "^[A-Za-z_]\\w*$",
|
|
450
|
+
"description": "The integer parameter holding the byte count: Lucent passes the array's length."
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"type": "object",
|
|
456
|
+
"description": "A NUL-terminated UTF-8 string (const char *): a string in Lucent, valid during the call.",
|
|
457
|
+
"additionalProperties": false,
|
|
458
|
+
"required": ["string"],
|
|
459
|
+
"properties": {
|
|
460
|
+
"string": {
|
|
461
|
+
"enum": ["utf8"]
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"type": "object",
|
|
467
|
+
"description": "The error struct the function fills in when it fails; Lucent passes it and throws its message.",
|
|
468
|
+
"additionalProperties": false,
|
|
469
|
+
"required": ["error"],
|
|
470
|
+
"properties": {
|
|
471
|
+
"error": {
|
|
472
|
+
"type": "string",
|
|
473
|
+
"pattern": "^[A-Za-z_]\\w*$",
|
|
474
|
+
"description": "A struct declared in errors."
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
]
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
"failsWhen": {
|
|
482
|
+
"enum": ["null", "negative", "nonzero", "zero", "false"],
|
|
483
|
+
"description": "How the result says the call failed, which throws an Error with the error struct's message and code. With nonzero or false the result is a status, and the Lucent function returns nothing."
|
|
484
|
+
},
|
|
485
|
+
"affinity": {
|
|
486
|
+
"enum": ["any", "main"],
|
|
487
|
+
"description": "The thread: any, one call at a time (the default), or the main thread, where Lucent code uses it inside main(() => …)."
|
|
488
|
+
},
|
|
489
|
+
"blocking": {
|
|
490
|
+
"type": "boolean",
|
|
491
|
+
"description": "It may block (I/O, locks, long work): calling it inside main(() => …) is a warning."
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
"errors": {
|
|
497
|
+
"type": "object",
|
|
498
|
+
"description": "C struct name (defined in the header) → the error its functions fill in.",
|
|
499
|
+
"propertyNames": {
|
|
500
|
+
"pattern": "^[A-Za-z_]\\w*$"
|
|
501
|
+
},
|
|
502
|
+
"additionalProperties": {
|
|
503
|
+
"type": "object",
|
|
504
|
+
"additionalProperties": false,
|
|
505
|
+
"required": ["message"],
|
|
506
|
+
"properties": {
|
|
507
|
+
"code": {
|
|
508
|
+
"type": "string",
|
|
509
|
+
"pattern": "^[A-Za-z_]\\w*$",
|
|
510
|
+
"description": "An integer field: the Error's code."
|
|
511
|
+
},
|
|
512
|
+
"message": {
|
|
513
|
+
"type": "string",
|
|
514
|
+
"pattern": "^[A-Za-z_]\\w*$",
|
|
515
|
+
"description": "A const char * field: the Error's message, copied before the call returns."
|
|
516
|
+
},
|
|
517
|
+
"release": {
|
|
518
|
+
"type": "string",
|
|
519
|
+
"pattern": "^[A-Za-z_]\\w*$",
|
|
520
|
+
"description": "void f(E *), called after every call that takes the struct, once it was read, when it holds something to free."
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
39
525
|
}
|
|
40
526
|
}
|
|
41
527
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://lucent-lang.dev/schemas/sdk-diff.schema.json",
|
|
3
|
+
"title": "lucent sdk diff --json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["ok", "unavailable", "artifacts", "used"],
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"definitions": {
|
|
8
|
+
"change": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"required": ["change", "platform", "module", "key", "display", "signature", "details"],
|
|
11
|
+
"additionalProperties": false,
|
|
12
|
+
"properties": {
|
|
13
|
+
"change": { "enum": ["removed", "changed", "added", "unchanged"] },
|
|
14
|
+
"platform": { "enum": ["ios", "android"] },
|
|
15
|
+
"module": { "type": "string" },
|
|
16
|
+
"key": { "type": "string", "description": "The symbol's key in the lock" },
|
|
17
|
+
"display": { "type": "string", "description": "As the lock names it: Tracker.level" },
|
|
18
|
+
"signature": { "type": "string", "description": "As installed (as locked, when removed)" },
|
|
19
|
+
"details": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"description": "What changed; why, for a removed module",
|
|
22
|
+
"items": { "type": "string" }
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"properties": {
|
|
28
|
+
"ok": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"description": "Every locked target has its SDK, and no used symbol was removed or changed"
|
|
31
|
+
},
|
|
32
|
+
"unavailable": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"required": ["platform", "reason"],
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"properties": {
|
|
39
|
+
"platform": { "enum": ["ios", "android"] },
|
|
40
|
+
"reason": { "type": "string" }
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"artifacts": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"description": "Used modules now read from other artifacts than the lock records",
|
|
47
|
+
"items": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"required": ["module", "found"],
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"properties": {
|
|
52
|
+
"module": { "type": "string" },
|
|
53
|
+
"locked": { "type": "array", "items": { "type": "string" } },
|
|
54
|
+
"found": { "type": "array", "items": { "type": "string" } }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"used": { "type": "array", "items": { "$ref": "#/definitions/change" } },
|
|
59
|
+
"others": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"description": "With --all: changes to the other members of the used modules",
|
|
62
|
+
"items": { "$ref": "#/definitions/change" }
|
|
63
|
+
},
|
|
64
|
+
"uncached": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"description": "With --all: modules whose locked schema this machine's SDK cache does not hold",
|
|
67
|
+
"items": { "type": "string" }
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|