mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-26 06:11:14 +00:00
Merge pull request #130 from LemmyNet/add_taglines_to_site_res
This commit is contained in:
commit
bad0ec49db
6 changed files with 14 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# First re-generate the types by running cargo test on lemmy
|
||||
cd ../lemmy/scripts
|
||||
pushd ../lemmy/scripts
|
||||
./test.sh
|
||||
|
||||
cd ../crates
|
||||
|
@ -13,7 +13,13 @@ cp db_views/bindings/* ../../lemmy-js-client/src/types/
|
|||
cp db_views_actor/bindings/* ../../lemmy-js-client/src/types/
|
||||
cp db_views_moderator/bindings/* ../../lemmy-js-client/src/types/
|
||||
|
||||
# Change all the bigints to numbers
|
||||
find ../../lemmy-js-client/src/types -type f -name '*.ts' -exec sed -i 's/bigint/number/g' {} +
|
||||
popd
|
||||
|
||||
# Remove the Sensitive type
|
||||
rm src/types/Sensitive.ts
|
||||
|
||||
# Change all the bigints to numbers
|
||||
find src/types -type f -name '*.ts' -exec sed -i 's/bigint/number/g' {} +
|
||||
|
||||
node putTypesInIndex.js
|
||||
|
||||
node ../../lemmy-js-client/putTypesInIndex.js
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "lemmy-js-client",
|
||||
"version": "0.17.2-rc.23",
|
||||
"version": "0.17.2-rc.24",
|
||||
"description": "A javascript / typescript client for Lemmy",
|
||||
"repository": "https://github.com/LemmyNet/lemmy-js-client",
|
||||
"license": "AGPL-3.0",
|
||||
|
|
|
@ -3,7 +3,7 @@ const path = require("path");
|
|||
|
||||
const exportRegex = /export\s+(?:enum|interface|type)\s+([A-Za-z0-9_]+)/g;
|
||||
|
||||
const baseExports = ['export * from "./http";', 'export * from "./websocket";'];
|
||||
const baseExports = ['export * from "./http";'];
|
||||
|
||||
async function putTypesInIndex() {
|
||||
const typeFiles = await fs.readdir(path.resolve("./src/types"));
|
||||
|
|
|
@ -252,4 +252,3 @@ export {
|
|||
UploadImageResponse,
|
||||
UserOperation,
|
||||
} from "./types/others";
|
||||
export * from "./websocket";
|
||||
|
|
|
@ -10,5 +10,4 @@ export interface GetCommunityResponse {
|
|||
moderators: Array<CommunityModeratorView>;
|
||||
online: number;
|
||||
discussion_languages: Array<LanguageId>;
|
||||
default_post_language?: LanguageId;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { SiteView } from "./SiteView";
|
||||
import type { Tagline } from "./Tagline";
|
||||
|
||||
export interface SiteResponse {
|
||||
site_view: SiteView;
|
||||
taglines: Array<Tagline>;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue