@astrale-os/sdk 0.5.0-beta.98 → 0.5.0-beta.99
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
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.0-beta.99](https://github.com/astrale-os/sdk/compare/sdk-v0.5.0-beta.98...sdk-v0.5.0-beta.99) (2026-09-01)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* admit unified functions composition in linter ([#378](https://github.com/astrale-os/sdk/issues/378)) ([b096b00](https://github.com/astrale-os/sdk/commit/b096b00215c8a269490658ab67ddde0130e4185c))
|
|
9
|
+
|
|
3
10
|
## [0.5.0-beta.98](https://github.com/astrale-os/sdk/compare/sdk-v0.5.0-beta.97...sdk-v0.5.0-beta.98) (2026-09-01)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -813,9 +813,13 @@ function compositionStatement(file, statement) {
|
|
|
813
813
|
if (!declaration.initializer)
|
|
814
814
|
return false;
|
|
815
815
|
const value = unwrap(declaration.initializer);
|
|
816
|
-
if (ts.isObjectLiteralExpression(value)) {
|
|
816
|
+
if (ts.isObjectLiteralExpression(value) || ts.isArrayLiteralExpression(value)) {
|
|
817
817
|
return ts.isIdentifier(declaration.name) && COMPOSITION_BINDING.test(declaration.name.text);
|
|
818
818
|
}
|
|
819
|
+
if (ts.isArrowFunction(value) || ts.isFunctionExpression(value)) {
|
|
820
|
+
return (ts.isIdentifier(declaration.name) &&
|
|
821
|
+
RUNTIME_INITIALIZER_BINDING.test(declaration.name.text));
|
|
822
|
+
}
|
|
819
823
|
if (!ts.isCallExpression(value))
|
|
820
824
|
return false;
|
|
821
825
|
return isDomainDefinitionCall(file, value);
|
|
@@ -835,7 +839,8 @@ function isDomainDefinitionCall(file, call) {
|
|
|
835
839
|
if (direct?.module.startsWith('@astrale-os/sdk') &&
|
|
836
840
|
(direct.name === 'defineApplication' ||
|
|
837
841
|
direct.name === 'defineFrontend' ||
|
|
838
|
-
direct.name === 'defineRuntime'
|
|
842
|
+
direct.name === 'defineRuntime' ||
|
|
843
|
+
direct.name === 'requirements')) {
|
|
839
844
|
return true;
|
|
840
845
|
}
|
|
841
846
|
if (!ts.isCallExpression(expression))
|
|
@@ -843,7 +848,8 @@ function isDomainDefinitionCall(file, call) {
|
|
|
843
848
|
const factory = importedSymbol(file, expression.expression);
|
|
844
849
|
return factory?.name === 'defineRuntime' && factory.module.startsWith('@astrale-os/sdk');
|
|
845
850
|
}
|
|
846
|
-
const COMPOSITION_BINDING = /^(?:actions|application|frontend|integrations|providers|routes|runtime|workflows)$/i;
|
|
851
|
+
const COMPOSITION_BINDING = /^(?:actions|application|frontend|functions|integrations|providers|routes|runtime|workflows)$/i;
|
|
852
|
+
const RUNTIME_INITIALIZER_BINDING = /^initialize$/i;
|
|
847
853
|
function importForLocalBinding(file, localName) {
|
|
848
854
|
return file.imports.find(({ bindings, namespace }) => namespace === localName || [...bindings.values()].includes(localName));
|
|
849
855
|
}
|