Skip to content

Commit

Permalink
fix(sponsor): fixing sponsor syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
johnlindquist committed Dec 20, 2024
1 parent d03fc38 commit 296fdee
Show file tree
Hide file tree
Showing 9 changed files with 231 additions and 304 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@
"isomorphic-git": "1.27.2",
"jsonfile": "6.1.0",
"keyv": "^5.2.2",
"keyv-file": "^5.0.4",
"keyv-file": "^5.1.1",
"lowdb": "7.0.1",
"marked": "4.3.0",
"minimist": "1.2.8",
"p-retry": "6.2.1",
"project-name-generator": "2.1.9",
"quick-score": "^0.2.0",
"replace-in-file": "8.2.0",
"replace-in-file": "8.3.0",
"rimraf": "6.0.1",
"rxjs": "7.8.1",
"safe-stable-stringify": "^2.5.0",
Expand All @@ -144,7 +144,7 @@
"tsx": "4.19.2",
"typescript": "5.7.2",
"unzipper": "0.12.3",
"vite": "6.0.3"
"vite": "6.0.4"
},
"ava": {
"environmentVariables": {
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/api/kit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,7 @@ let groupScripts = (scripts) => {
return groupChoices(scripts, {
groupKey: 'kenv',
missingGroupName: 'Main',
order: splitEnvVarIntoArray(process?.env?.KIT_MAIN_ORDER, ['Favorite', 'Main', 'Scriptlets']),
order: splitEnvVarIntoArray(process?.env?.KIT_MAIN_ORDER, ['Favorite', 'Main', 'Scriptlets', 'Kit']),

endOrder: splitEnvVarIntoArray(process?.env?.KIT_MAIN_END_ORDER, ['Apps', 'Pass']),
recentKey: 'timestamp',
Expand Down
2 changes: 2 additions & 0 deletions src/core/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { JSONFile } from 'lowdb/node'
import type { RestEndpointMethodTypes } from '@octokit/plugin-rest-endpoint-methods'
import type { Keyv } from 'keyv'
import type { DBData, DBKeyOrPath, DBReturnType } from '../types/kit.js'
import { Env } from './enum.js'

export const resolveKenv = (...parts: string[]) => {
if (global.kitScript) {
Expand Down Expand Up @@ -402,6 +403,7 @@ export type AppDb = {
export type UserDb = Partial<RestEndpointMethodTypes['users']['getAuthenticated']['response']['data']>

export let setUserJson = async (user: UserDb) => {
await global.cli('set-env-var', 'KIT_LOGIN', user?.login || Env.REMOVE)
await writeJson(userDbPath, user)
}

Expand Down
Loading

0 comments on commit 296fdee

Please sign in to comment.