Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Jan 6, 2025
2 parents a23813e + d1368ca commit c371cf6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@junobuild/cli-tools": "^0.0.16",
"@junobuild/config-loader": "^0.0.7",
"@junobuild/core": "^0.1.0",
"@junobuild/did-tools": "^0.0.4",
"@junobuild/did-tools": "^0.0.5",
"@junobuild/utils": "^0.0.27",
"conf": "^13.0.1",
"open": "^10.1.0",
Expand Down
8 changes: 5 additions & 3 deletions src/services/build.services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,15 @@ const api = async () => {

const outputFile = `${DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH}/satellite.api.${outputLanguage}`;

const readCoreLib = async (): Promise<'core' | 'core-peer'> => {
const readCoreLib = async (): Promise<'core' | 'core-standalone'> => {
try {
const packageJson = await readFile(join(process.cwd(), 'package.json'), 'utf-8');
const {dependencies} = JSON.parse(packageJson) as {dependencies?: Record<string, string>};
return Object.keys(dependencies ?? {}).includes('@junobuild/core') ? 'core-peer' : 'core';
return Object.keys(dependencies ?? {}).includes('@junobuild/core-standalone')
? 'core-standalone'
: 'core';
} catch (err: unknown) {
// This should not block the developer therefore we fallback to core
// This should not block the developer therefore we fallback to core which is the common way of using the library
return 'core';
}
};
Expand Down

0 comments on commit c371cf6

Please sign in to comment.