Skip to content

Commit bcb15b9

Browse files
feat: source for init
Signed-off-by: David Dal Busco <david.dalbusco@outlook.com>
1 parent 0e29a4f commit bcb15b9

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

src/configs/juno.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ export const writeJunoConfigPlaceholder = async ({
5555
case 'ts':
5656
case 'js': {
5757
const {
58-
satellite: {source}
58+
satellite: {
59+
hosting: {source}
60+
}
5961
} = config;
6062

6163
const withPredeploy = nonNullish(pm);
@@ -74,7 +76,7 @@ export const writeJunoConfigPlaceholder = async ({
7476
});
7577

7678
let content = template
77-
.replace('<SOURCE>', source ?? DEPLOY_DEFAULT_SOURCE)
79+
.replace('<SOURCE>', source)
7880
.replace('<COMMAND>', pm === 'npm' ? 'npm run' : (pm ?? ''));
7981

8082
if (nonNullish(emulatorConfig)) {

src/services/config/init.services.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ export const initConfigNoneInteractive = async ({
9494
await writeJunoConfigPlaceholder({
9595
...rest,
9696
config: {
97-
satellite: {source}
97+
satellite: {
98+
hosting: {source}
99+
}
98100
},
99101
emulatorConfig
100102
});

src/types/config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
import type {JunoConfig, OrbiterConfig, SatelliteConfig} from '@junobuild/config';
1+
import type {HostingConfig, JunoConfig, OrbiterConfig, SatelliteConfig} from '@junobuild/config';
22

33
export type JunoConfigWithSatelliteId = Omit<JunoConfig, 'satellite' | 'orbiter'> & {
44
satellite: Omit<SatelliteConfig, 'id' | 'satellitesIds'> & Required<Pick<SatelliteConfig, 'id'>>;
55
orbiter?: Omit<OrbiterConfig, 'orbiterId'>;
66
};
77

88
export type JunoConfigWithPlaceholder = Omit<JunoConfig, 'satellite' | 'orbiter'> & {
9-
satellite: Pick<SatelliteConfig, 'source'>;
9+
satellite: {
10+
hosting: Pick<HostingConfig, 'source'>;
11+
};
1012
};

0 commit comments

Comments
 (0)