mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-30 00:01: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
|
#!/bin/bash
|
||||||
|
|
||||||
# First re-generate the types by running cargo test on lemmy
|
# First re-generate the types by running cargo test on lemmy
|
||||||
cd ../lemmy/scripts
|
pushd ../lemmy/scripts
|
||||||
./test.sh
|
./test.sh
|
||||||
|
|
||||||
cd ../crates
|
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_actor/bindings/* ../../lemmy-js-client/src/types/
|
||||||
cp db_views_moderator/bindings/* ../../lemmy-js-client/src/types/
|
cp db_views_moderator/bindings/* ../../lemmy-js-client/src/types/
|
||||||
|
|
||||||
# Change all the bigints to numbers
|
popd
|
||||||
find ../../lemmy-js-client/src/types -type f -name '*.ts' -exec sed -i 's/bigint/number/g' {} +
|
|
||||||
|
# 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",
|
"name": "lemmy-js-client",
|
||||||
"version": "0.17.2-rc.23",
|
"version": "0.17.2-rc.24",
|
||||||
"description": "A javascript / typescript client for Lemmy",
|
"description": "A javascript / typescript client for Lemmy",
|
||||||
"repository": "https://github.com/LemmyNet/lemmy-js-client",
|
"repository": "https://github.com/LemmyNet/lemmy-js-client",
|
||||||
"license": "AGPL-3.0",
|
"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 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() {
|
async function putTypesInIndex() {
|
||||||
const typeFiles = await fs.readdir(path.resolve("./src/types"));
|
const typeFiles = await fs.readdir(path.resolve("./src/types"));
|
||||||
|
|
|
@ -252,4 +252,3 @@ export {
|
||||||
UploadImageResponse,
|
UploadImageResponse,
|
||||||
UserOperation,
|
UserOperation,
|
||||||
} from "./types/others";
|
} from "./types/others";
|
||||||
export * from "./websocket";
|
|
||||||
|
|
|
@ -10,5 +10,4 @@ export interface GetCommunityResponse {
|
||||||
moderators: Array<CommunityModeratorView>;
|
moderators: Array<CommunityModeratorView>;
|
||||||
online: number;
|
online: number;
|
||||||
discussion_languages: Array<LanguageId>;
|
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.
|
// 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 { SiteView } from "./SiteView";
|
||||||
|
import type { Tagline } from "./Tagline";
|
||||||
|
|
||||||
export interface SiteResponse {
|
export interface SiteResponse {
|
||||||
site_view: SiteView;
|
site_view: SiteView;
|
||||||
|
taglines: Array<Tagline>;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue