Skip to content

Commit b5f1cf1

Browse files
committed
[fix] several detail bugs of Type package & Import script
1 parent b861cf9 commit b5f1cf1

File tree

9 files changed

+39
-31
lines changed

9 files changed

+39
-31
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ $RECYCLE.BIN/
7070
*.sql
7171
*.sqlite
7272
*.sqlite3
73-
73+
*.xlsx
7474

7575
############################
7676
# Misc.

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Strapi-PNPM-Docker-ts
1+
# China-NGO-database
22

33
[Strapi][7] scaffold with [TypeScript][5], [PNPM][6] & [Docker][9], which is made with ❤️ by [idea2app][1].
44

5-
[![Deploy to Production environment](https://github.com/idea2app/Strapi-PNPM-Docker-ts/actions/workflows/deploy-production.yml/badge.svg)][2]
5+
[![Deploy to Production environment](https://github.com/Open-Source-Bazaar/China-NGO-database/actions/workflows/deploy-production.yml/badge.svg)][2]
66

77
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)][3]
88
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][4]
@@ -143,9 +143,9 @@ Feel free to check out the [Strapi GitHub repository][35]. Your feedback and con
143143
<sub>🤫 Psst! [Strapi is hiring][39].</sub>
144144

145145
[1]: https://idea2.app/
146-
[2]: https://github.com/idea2app/Strapi-PNPM-Docker-ts/actions/workflows/deploy-production.yml
147-
[3]: https://codespaces.new/idea2app/Strapi-PNPM-Docker-ts
148-
[4]: https://gitpod.io/?autostart=true#https://github.com/idea2app/Strapi-PNPM-Docker-ts
146+
[2]: https://github.com/Open-Source-Bazaar/China-NGO-database/actions/workflows/deploy-production.yml
147+
[3]: https://codespaces.new/Open-Source-Bazaar/China-NGO-database
148+
[4]: https://gitpod.io/?autostart=true#https://github.com/Open-Source-Bazaar/China-NGO-database
149149
[5]: https://www.typescriptlang.org/
150150
[6]: https://pnpm.io/
151151
[7]: https://strapi.io/
@@ -161,11 +161,11 @@ Feel free to check out the [Strapi GitHub repository][35]. Your feedback and con
161161
[17]: https://github.com/ckeditor/strapi-plugin-ckeditor
162162
[18]: https://github.com/wisnuwiry/strapi-geodata
163163
[19]: https://github.com/apps/settings
164-
[20]: https://github.com/new?template_name=Strapi-PNPM-Docker-ts&template_owner=idea2app
165-
[21]: https://codespaces.new/idea2app/Strapi-PNPM-Docker-ts
164+
[20]: https://github.com/new?template_name=China-NGO-database&template_owner=Open-Source-Bazaar
165+
[21]: https://codespaces.new/Open-Source-Bazaar/China-NGO-database
166166
[22]: https://github.com/FreeCodeCamp-Chengdu/FreeCodeCamp-Chengdu.github.io/blob/8df9944449002758f7ec809deeb260ce08182259/.github/workflows/main.yml#L34-L63
167-
[23]: https://github.com/idea2app/Strapi-PNPM-Docker-ts/issues/new/choose
168-
[24]: https://github.com/idea2app/Strapi-PNPM-Docker-ts/projects
167+
[23]: https://github.com/Open-Source-Bazaar/China-NGO-database/issues/new/choose
168+
[24]: https://github.com/Open-Source-Bazaar/China-NGO-database/projects
169169
[25]: https://docs.strapi.io/dev-docs/cli#strapi-develop
170170
[26]: https://docs.strapi.io/dev-docs/cli#strapi-start
171171
[27]: https://docs.strapi.io/dev-docs/cli#strapi-build

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717
strapi-server:
1818
depends_on:
1919
- postgres-server
20-
image: idea2app/strapi-pnpm-docker-ts
20+
image: open-source-bazaar/china-ngo-database
2121
environment:
2222
- DATABASE_CLIENT=postgres
2323
- DATABASE_URL=postgres://postgres:${ADMIN_JWT_SECRET}@postgres-server:5432/postgres

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@idea2app/strapi-pnpm-docker-ts",
3-
"version": "0.5.0",
2+
"name": "@open-source-bazaar/china-ngo-database",
3+
"version": "0.6.0",
44
"private": true,
55
"engines": {
66
"node": ">=20.0.0",
@@ -71,9 +71,9 @@
7171
"build-type": "rm -rf types/client/ && npm run make-type",
7272
"build": "npm run clean && strapi ts:generate-types && cross-env NODE_ENV=production strapi build",
7373
"start": "cross-env NODE_ENV=production strapi start",
74-
"pack-image": "docker build -t idea2app/strapi-pnpm-docker-ts .",
74+
"pack-image": "docker build -t open-source-bazaar/china-ngo-database .",
7575
"database": "docker rm -f postgres-server && docker run --name postgres-server -v ./.data:/var/lib/postgresql/data/ -e POSTGRES_PASSWORD=tobemodified -p 5432:5432 -d postgres",
76-
"container": "docker rm -f strapi-server && docker run --name strapi-server -p 1337:1337 -d idea2app/strapi-pnpm-docker-ts",
76+
"container": "docker rm -f strapi-server && docker run --name strapi-server -p 1337:1337 -d open-source-bazaar/china-ngo-database",
7777
"deploy": "strapi deploy",
7878
"console": "strapi console"
7979
}

scripts/tsconfig.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"moduleResolution": "Node",
5+
"strict": false
6+
}
7+
}

scripts/utils/strapi-api.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ export class StrapiAPI {
66
constructor(
77
private baseURL: string,
88
private token: string,
9-
) {}
10-
11-
client = new HTTPClient({ baseURI: this.baseURL, responseType: 'json' }).use(
12-
({ request }, next) => {
13-
request.headers = {
14-
Authorization: `Bearer ${this.token}`,
15-
...request.headers,
16-
};
17-
return next();
18-
},
19-
);
9+
) {
10+
this.client.baseURI = this.baseURL;
11+
}
12+
13+
client = new HTTPClient({ responseType: 'json' }).use(({ request }, next) => {
14+
request.headers = {
15+
Authorization: `Bearer ${this.token}`,
16+
...request.headers,
17+
};
18+
return next();
19+
});
2020

2121
async createOrganization(data: OrganizationData) {
2222
const { body } = await this.client.post<OrganizationData>(

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
// Do not include test files
3838
"**/*.test.*",
3939
// Do not include plugins in the server compilation
40-
"src/plugins/**"
40+
"src/plugins/**",
41+
"scripts/**"
4142
]
4243
}

types/ReadMe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Strapi-PNPM-Docker-ts - Type package
1+
# China-NGO-database - Type package
22

33
## Usage
44

@@ -15,7 +15,7 @@
1515
```shell
1616
npm i pnpm -g
1717

18-
pnpm i @idea2app/strapi-pnpm-docker-ts -D
18+
pnpm i @open-source-bazaar/china-ngo-database -D
1919
```
2020

2121
[1]: https://github.com/settings/tokens

types/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@idea2app/strapi-pnpm-docker-ts",
3-
"version": "0.5.0",
2+
"name": "@open-source-bazaar/china-ngo-database",
3+
"version": "0.6.0",
44
"types": "index.ts"
55
}

0 commit comments

Comments
 (0)