Skip to content

Commit

Permalink
fix: default load repos from devsapp
Browse files Browse the repository at this point in the history
Signed-off-by: zxypro1 <1018995004@qq.com>
  • Loading branch information
zxypro1 committed Apr 2, 2024
1 parent 0b7c0f6 commit 76bfc7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/load-application/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@serverless-devs/load-application",
"version": "0.0.13-beta.4",
"version": "0.0.13-beta.5",
"description": "load application for serverless-devs",
"main": "lib/index.js",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion packages/load-application/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { endsWith, keys, replace } from 'lodash';
import { endsWith, keys, replace, split } from 'lodash';
import { RANDOM_PATTERN, REGISTRY, GITHUB_REGISTRY } from '../constant';
import Credential from '@serverless-devs/credential';

Expand All @@ -12,6 +12,9 @@ export const tryfun = async (fn: Function, ...args: any[]) => {

export const getUrlWithLatest = (name: string) => {
if (REGISTRY.CUSTOM_URL === GITHUB_REGISTRY) {
if (split(name, '/').length === 1) {
return `${REGISTRY.CUSTOM_URL}/devsapp/${name}`;
}
return `${REGISTRY.CUSTOM_URL}/${name}`;
}
return `${REGISTRY.V3}/packages/${name}/release/latest`
Expand Down

0 comments on commit 76bfc7d

Please sign in to comment.