Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Commit 66a3c92

Browse files
committed
chore: Report ts and js as separate SDKs #389
1 parent 38533ff commit 66a3c92

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ sources := src build/src/managed
77

88
src_managed := build/src/managed
99
managed_attachments := ${src_managed}/modules/${module}/attachments
10+
managed_ts_attachments := ${src_managed}/modules/typescript/attachments
1011
managed_examples := ${src_managed}/modules/${module}/examples
1112
managed_partials := ${src_managed}/modules/${module}/partials
1213

@@ -38,8 +39,10 @@ attributes:
3839
apidocs:
3940
cd ../sdk && npm ci && npm run typedoc
4041
mkdir -p "${managed_attachments}"
42+
mkdir -p "${managed_ts_attachments}"
4143
rsync -a ../sdk/apidocs/ "${managed_attachments}/api/"
4244
bin/version.sh > "${managed_attachments}/latest-version.txt"
45+
cp "${managed_attachments}/latest-version.txt" "${managed_ts_attachments}/latest-version.txt"
4346

4447
examples:
4548
mkdir -p "${managed_examples}"

sdk/src/kalix.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,12 @@ class ServiceInfo {
9090

9191
private loadFromPkg(filename: string = userPkgJson) {
9292
const json = loadJson(filename);
93-
this.pkgName = json.name;
93+
// try to detect if ts or js through process starting points
94+
if (process.argv.find((arg: string) => arg.endsWith('.ts'))) {
95+
this.pkgName = json.name.replace('javascript', 'typescript');
96+
} else {
97+
this.pkgName = json.name;
98+
}
9499
this.pkgVersion = json.version;
95100
}
96101
}

0 commit comments

Comments
 (0)