From 64f829d5802e88b038bc55817eb48ae7586ab61b Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Sat, 17 Feb 2024 09:28:31 +0100 Subject: [PATCH 1/5] feat: add support for --mode to commands --- package-lock.json | 16 ++++---- package.json | 2 +- src/commands/config.ts | 8 ++-- src/commands/deploy.ts | 38 +++++++++++-------- src/commands/open.ts | 10 +++-- src/commands/version.ts | 8 ++-- src/configs/juno.config.ts | 2 +- src/services/clear.services.ts | 12 +++--- src/services/deploy.services.ts | 9 +++-- src/services/links.services.ts | 9 +++-- .../upgrade/upgrade.satellite.services.ts | 10 +++-- src/types/config.ts | 7 ++++ src/utils/satellite.utils.ts | 23 +++++++++-- 13 files changed, 102 insertions(+), 52 deletions(-) diff --git a/package-lock.json b/package-lock.json index b0145ba..d860a17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@dfinity/identity": "^0.20.2", "@dfinity/principal": "^0.20.2", "@junobuild/admin": "^0.0.45", - "@junobuild/config": "^0.0.1", + "@junobuild/config": "file:../juno-js/packages/config", "@junobuild/core-peer": "^0.0.10", "@junobuild/utils": "^0.0.18", "conf": "^12.0.0", @@ -60,6 +60,11 @@ "node": ">=18" } }, + "../juno-js/packages/config": { + "name": "@junobuild/config", + "version": "0.0.1", + "license": "MIT" + }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", @@ -1453,9 +1458,8 @@ } }, "node_modules/@junobuild/config": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@junobuild/config/-/config-0.0.1.tgz", - "integrity": "sha512-UAmUKJVOCAAKvEwHI5PZ/6wi0wo2gRblSnkRW+sghaU/ST2/Vsrstd+tDBAyU12haEHVSCjMWho0fOEJyS5KJg==" + "resolved": "../juno-js/packages/config", + "link": true }, "node_modules/@junobuild/core-peer": { "version": "0.0.10", @@ -7564,9 +7568,7 @@ "requires": {} }, "@junobuild/config": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@junobuild/config/-/config-0.0.1.tgz", - "integrity": "sha512-UAmUKJVOCAAKvEwHI5PZ/6wi0wo2gRblSnkRW+sghaU/ST2/Vsrstd+tDBAyU12haEHVSCjMWho0fOEJyS5KJg==" + "version": "file:../juno-js/packages/config" }, "@junobuild/core-peer": { "version": "0.0.10", diff --git a/package.json b/package.json index 11d7748..afe1aea 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@dfinity/identity": "^0.20.2", "@dfinity/principal": "^0.20.2", "@junobuild/admin": "^0.0.45", - "@junobuild/config": "^0.0.1", + "@junobuild/config": "file:../juno-js/packages/config", "@junobuild/core-peer": "^0.0.10", "@junobuild/utils": "^0.0.18", "conf": "^12.0.0", diff --git a/src/commands/config.ts b/src/commands/config.ts index f090cde..fd174d6 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -1,6 +1,6 @@ import {setConfig} from '@junobuild/admin'; import ora from 'ora'; -import {junoConfigExist, readSatelliteConfig} from '../configs/juno.config'; +import {junoConfigExist, readJunoConfig} from '../configs/juno.config'; import {configEnv} from '../utils/config.utils'; import {satelliteParameters} from '../utils/satellite.utils'; import {init} from './init'; @@ -10,7 +10,9 @@ export const config = async (args?: string[]) => { await init(); } - const {satelliteId, storage} = await readSatelliteConfig(configEnv(args)); + const env = configEnv(args); + const {satellite} = await readJunoConfig(env); + const {storage} = satellite; const spinner = ora(`Configuring...`).start(); @@ -24,7 +26,7 @@ export const config = async (args?: string[]) => { iframe: storage?.iframe } }, - satellite: satelliteParameters(satelliteId) + satellite: satelliteParameters({satellite, env}) }); } finally { spinner.stop(); diff --git a/src/commands/deploy.ts b/src/commands/deploy.ts index 90f852b..b5c1570 100644 --- a/src/commands/deploy.ts +++ b/src/commands/deploy.ts @@ -18,7 +18,7 @@ import {minimatch} from 'minimatch'; import {lstatSync} from 'node:fs'; import {readFile} from 'node:fs/promises'; import {basename, extname, join, relative} from 'node:path'; -import {junoConfigExist, readSatelliteConfig} from '../configs/juno.config'; +import {junoConfigExist, readJunoConfig} from '../configs/juno.config'; import {COLLECTION_DAPP, DAPP_COLLECTION, UPLOAD_BATCH_SIZE} from '../constants/constants'; import { DEPLOY_DEFAULT_ENCODING, @@ -29,6 +29,7 @@ import { import {clear} from '../services/clear.services'; import {assertSatelliteMemorySize} from '../services/deploy.services'; import {links} from '../services/links.services'; +import type {SatelliteConfigEnv} from '../types/config'; import {hasArgs} from '../utils/args.utils'; import {gzipFiles} from '../utils/compress.utils'; import {configEnv} from '../utils/config.utils'; @@ -59,17 +60,26 @@ export const deploy = async (args?: string[]) => { }; const executeDeploy = async (args?: string[]) => { + const env = configEnv(args); + const {satellite: satelliteConfig} = await readJunoConfig(env); + const { - satelliteId, source = DEPLOY_DEFAULT_SOURCE, ignore = DEPLOY_DEFAULT_IGNORE, encoding = DEPLOY_DEFAULT_ENCODING, gzip = DEPLOY_DEFAULT_GZIP - } = await readSatelliteConfig(configEnv(args)); + } = satelliteConfig; const sourceAbsolutePath = join(process.cwd(), source); - const sourceFiles = await listFiles({sourceAbsolutePath, satelliteId, ignore, encoding, gzip}); + const sourceFiles = await listFiles({ + sourceAbsolutePath, + ignore, + encoding, + gzip, + satellite: satelliteConfig, + env + }); if (sourceFiles.length === 0) { console.log('No new files to upload.'); @@ -78,7 +88,7 @@ const executeDeploy = async (args?: string[]) => { await assertSatelliteMemorySize(args); - const satellite = satelliteParameters(satelliteId); + const satellite = satelliteParameters({satellite: satelliteConfig, env}); const fileDetailsPath = (file: FileDetails): string => file.alternateFile ?? file.file; @@ -145,15 +155,14 @@ const assertSourceDirExists = (source: string) => { const filterFilesToUpload = async ({ files, sourceAbsolutePath, - satelliteId + ...env }: { files: FileDetails[]; sourceAbsolutePath: string; - satelliteId: string; -}): Promise => { +} & SatelliteConfigEnv): Promise => { const existingAssets = await listAssets({ collection: DAPP_COLLECTION, - satellite: satelliteParameters(satelliteId) + satellite: satelliteParameters(env) }); const promises = files.map( @@ -201,15 +210,14 @@ const fileNeedUpload = async ({ const listFiles = async ({ sourceAbsolutePath, - satelliteId, ignore, encoding, - gzip + gzip, + ...env }: { sourceAbsolutePath: string; -} & Required>): Promise< - FileDetails[] -> => { +} & SatelliteConfigEnv & + Required>): Promise => { assertSourceDirExists(sourceAbsolutePath); const sourceFiles = listSourceFiles({sourceAbsolutePath, ignore}); @@ -282,6 +290,6 @@ const listFiles = async ({ return await filterFilesToUpload({ files: encodingFiles, sourceAbsolutePath, - satelliteId + ...env }); }; diff --git a/src/commands/open.ts b/src/commands/open.ts index 87baf69..703307a 100644 --- a/src/commands/open.ts +++ b/src/commands/open.ts @@ -1,6 +1,6 @@ import {listCustomDomains, type CustomDomain} from '@junobuild/admin'; import prompts from 'prompts'; -import {junoConfigExist, readSatelliteConfig} from '../configs/juno.config'; +import {junoConfigExist, readJunoConfig} from '../configs/juno.config'; import {hasArgs, nextArg} from '../utils/args.utils'; import {configEnv} from '../utils/config.utils'; import {consoleUrl, defaultSatelliteDomain} from '../utils/domain.utils'; @@ -17,13 +17,17 @@ export const open = async (args?: string[]) => { const browser = nextArg({args, option: '-b'}) ?? nextArg({args, option: '--browser'}); - const {satelliteId} = await readSatelliteConfig(configEnv(args)); + const env = configEnv(args); + const {satellite: satelliteConfig} = await readJunoConfig(env); + + const satellite = satelliteParameters({satellite: satelliteConfig, env}); + const {satelliteId} = satellite; + if (hasArgs({args, options: ['-c', '--console']})) { await openUrl({url: consoleUrl(satelliteId), browser}); return; } - const satellite = satelliteParameters(satelliteId); const domains = await listCustomDomains({satellite}); if (domains.length === 0) { diff --git a/src/commands/version.ts b/src/commands/version.ts index fe6f99e..8d11495 100644 --- a/src/commands/version.ts +++ b/src/commands/version.ts @@ -8,7 +8,7 @@ import {cyan, green, red, yellow} from 'kleur'; import {clean, compare} from 'semver'; import {version as cliCurrentVersion} from '../../package.json'; import {getCliMissionControl, getCliOrbiters} from '../configs/cli.config'; -import {junoConfigExist, readSatelliteConfig} from '../configs/juno.config'; +import {junoConfigExist, readJunoConfig} from '../configs/juno.config'; import { MISSION_CONTROL_WASM_NAME, ORBITER_WASM_NAME, @@ -90,9 +90,11 @@ const satelliteVersion = async (args?: string[]) => { return; } - const {satelliteId} = await readSatelliteConfig(configEnv(args)); + const env = configEnv(args); + const {satellite: satelliteConfig} = await readJunoConfig(env); - const satellite = satelliteParameters(satelliteId); + const satellite = satelliteParameters({satellite: satelliteConfig, env}); + const {satelliteId} = satellite; const currentVersion = await satelliteVersionLib({ satellite diff --git a/src/configs/juno.config.ts b/src/configs/juno.config.ts index 52feada..9311a1f 100644 --- a/src/configs/juno.config.ts +++ b/src/configs/juno.config.ts @@ -139,7 +139,7 @@ const writeJunoConfig = async ({ } }; -const readJunoConfig = async (env: JunoConfigEnv): Promise => { +export const readJunoConfig = async (env: JunoConfigEnv): Promise => { const {configPath, configType} = junoConfigFile(); const config = (userConfig: JunoConfigFnOrObject): JunoConfig => diff --git a/src/services/clear.services.ts b/src/services/clear.services.ts index d052f92..12cf419 100644 --- a/src/services/clear.services.ts +++ b/src/services/clear.services.ts @@ -1,20 +1,21 @@ import {deleteAssets} from '@junobuild/admin'; import {deleteAsset} from '@junobuild/core-peer'; import ora from 'ora'; -import {readSatelliteConfig} from '../configs/juno.config'; +import {readJunoConfig} from '../configs/juno.config'; import {DAPP_COLLECTION} from '../constants/constants'; import {configEnv} from '../utils/config.utils'; import {satelliteParameters} from '../utils/satellite.utils'; export const clear = async (args?: string[]) => { - const {satelliteId} = await readSatelliteConfig(configEnv(args)); + const env = configEnv(args); + const {satellite: satelliteConfig} = await readJunoConfig(env); const spinner = ora('Clearing dapp assets...').start(); try { await deleteAssets({ collection: DAPP_COLLECTION, - satellite: satelliteParameters(satelliteId) + satellite: satelliteParameters({satellite: satelliteConfig, env}) }); } finally { spinner.stop(); @@ -27,14 +28,15 @@ const cleanFullPath = (fullPath: string): string => { }; export const clearAsset = async ({fullPath, args}: {fullPath: string; args?: string[]}) => { - const {satelliteId} = await readSatelliteConfig(configEnv(args)); + const env = configEnv(args); + const {satellite: satelliteConfig} = await readJunoConfig(env); const spinner = ora(`Clearing ${fullPath}...`).start(); try { await deleteAsset({ collection: DAPP_COLLECTION, - satellite: satelliteParameters(satelliteId), + satellite: satelliteParameters({satellite: satelliteConfig, env}), fullPath: cleanFullPath(fullPath) }); } finally { diff --git a/src/services/deploy.services.ts b/src/services/deploy.services.ts index f8108a4..be6c879 100644 --- a/src/services/deploy.services.ts +++ b/src/services/deploy.services.ts @@ -1,20 +1,23 @@ import {satelliteMemorySize, satelliteVersion} from '@junobuild/admin'; import {yellow} from 'kleur'; import {compare} from 'semver'; -import {readSatelliteConfig} from '../configs/juno.config'; +import {readJunoConfig} from '../configs/juno.config'; import {MEMORY_HEAP_WARNING, MEMORY_SIZE_ENDPOINT_VERSION} from '../constants/deploy.constants'; import {configEnv} from '../utils/config.utils'; import {NEW_CMD_LINE, confirmAndExit} from '../utils/prompt.utils'; import {satelliteParameters} from '../utils/satellite.utils'; export const assertSatelliteMemorySize = async (args?: string[]) => { - const {satelliteId, assertions} = await readSatelliteConfig(configEnv(args)); + const env = configEnv(args); + const {satellite: satelliteConfig} = await readJunoConfig(env); + + const {assertions} = satelliteConfig; if (assertions?.heapMemory === false) { return; } - const satellite = satelliteParameters(satelliteId); + const satellite = satelliteParameters({satellite: satelliteConfig, env}); const currentVersion = await satelliteVersion({ satellite diff --git a/src/services/links.services.ts b/src/services/links.services.ts index d3efb01..3ef5cd0 100644 --- a/src/services/links.services.ts +++ b/src/services/links.services.ts @@ -1,6 +1,6 @@ import {listCustomDomains} from '@junobuild/admin'; import {red} from 'kleur'; -import {junoConfigExist, readSatelliteConfig} from '../configs/juno.config'; +import {junoConfigExist, readJunoConfig} from '../configs/juno.config'; import {configEnv} from '../utils/config.utils'; import {consoleUrl, defaultSatelliteDomain} from '../utils/domain.utils'; import {terminalLink} from '../utils/links.utils'; @@ -18,13 +18,16 @@ export const links = async (args?: string[]) => { return; } - const {satelliteId} = await readSatelliteConfig(configEnv(args)); + const env = configEnv(args); + const {satellite: satelliteConfig} = await readJunoConfig(env); + + const satellite = satelliteParameters({satellite: satelliteConfig, env}); + const {satelliteId} = satellite; const defaultUrl = defaultSatelliteDomain(satelliteId); const adminUrl = consoleUrl(satelliteId); try { - const satellite = satelliteParameters(satelliteId); const domains = await listCustomDomains({satellite}); console.log(`\n🛠️ ${terminalLink(adminUrl)}`); diff --git a/src/services/upgrade/upgrade.satellite.services.ts b/src/services/upgrade/upgrade.satellite.services.ts index 48c0fcc..25bab81 100644 --- a/src/services/upgrade/upgrade.satellite.services.ts +++ b/src/services/upgrade/upgrade.satellite.services.ts @@ -7,7 +7,7 @@ import { import {isNullish} from '@junobuild/utils'; import {cyan, red} from 'kleur'; import {compare} from 'semver'; -import {junoConfigExist, readSatelliteConfig} from '../../configs/juno.config'; +import {junoConfigExist, readJunoConfig} from '../../configs/juno.config'; import {SATELLITE_WASM_NAME} from '../../constants/constants'; import type {UpgradeWasm, UpgradeWasmModule} from '../../types/upgrade'; import {hasArgs, nextArg} from '../../utils/args.utils'; @@ -30,14 +30,16 @@ export const upgradeSatellite = async (args?: string[]) => { return; } - const {satelliteId} = await readSatelliteConfig(configEnv(args)); + const env = configEnv(args); + const {satellite: satelliteConfig} = await readJunoConfig(env); + + const satellite = satelliteParameters({satellite: satelliteConfig, env}); + const {satelliteId} = satellite; console.log( `${NEW_CMD_LINE}Initiating upgrade for satellite ${cyan(satelliteId)}.${NEW_CMD_LINE}` ); - const satellite = satelliteParameters(satelliteId); - const consoleSuccess = () => { console.log(`✅ Satellite successfully upgraded.`); }; diff --git a/src/types/config.ts b/src/types/config.ts index 9732cd6..567d4c2 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -1 +1,8 @@ +import type {JunoConfigEnv, SatelliteConfig} from '@junobuild/config'; + export type ConfigType = 'ts' | 'js' | 'json'; + +export interface SatelliteConfigEnv { + satellite: SatelliteConfig; + env: JunoConfigEnv; +} diff --git a/src/utils/satellite.utils.ts b/src/utils/satellite.utils.ts index ec4e674..e9d21d3 100644 --- a/src/utils/satellite.utils.ts +++ b/src/utils/satellite.utils.ts @@ -1,11 +1,26 @@ import {type SatelliteParameters} from '@junobuild/admin'; +import {assertNonNullish} from '@junobuild/utils'; import {getCliOrbiters, getCliSatellites} from '../configs/cli.config'; +import type {SatelliteConfigEnv} from '../types/config'; import {actorParameters} from './actor.utils'; -export const satelliteParameters = (satelliteId: string): SatelliteParameters => ({ - satelliteId, - ...actorParameters() -}); +export const satelliteParameters = ({ + satellite: {satelliteId: satelliteIdUser, satellitesIds}, + env: {mode} +}: SatelliteConfigEnv): Omit & + Required> => { + const satelliteId = satellitesIds?.[mode] ?? satelliteIdUser; + + assertNonNullish( + satelliteId, + `A satellite ID must be provided in your configuration. Selected mode: ${mode}` + ); + + return { + satelliteId, + ...actorParameters() + }; +}; /** * For display purpose, use either the name or id. Most probably we should find a name but for simplicity reason we fallback to Id. From 084bf52b1679b38adecf15d4f1e9c429aaaa9655 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Sat, 17 Feb 2024 09:36:41 +0100 Subject: [PATCH 2/5] feat: make satelliteId mandatory in save config --- src/configs/juno.config.ts | 18 ++++-------------- src/types/config.ts | 7 ++++++- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/configs/juno.config.ts b/src/configs/juno.config.ts index 9311a1f..bac0291 100644 --- a/src/configs/juno.config.ts +++ b/src/configs/juno.config.ts @@ -1,9 +1,4 @@ -import type { - JunoConfig, - JunoConfigEnv, - JunoConfigFnOrObject, - SatelliteConfig -} from '@junobuild/config'; +import type {JunoConfig, JunoConfigEnv, JunoConfigFnOrObject} from '@junobuild/config'; import {nonNullish} from '@junobuild/utils'; import {existsSync} from 'node:fs'; import {access, readFile, writeFile} from 'node:fs/promises'; @@ -14,7 +9,7 @@ import { } from '../constants/config.constants'; import {JUNO_CONFIG_FILENAME, JUNO_JSON} from '../constants/constants'; import {DEPLOY_DEFAULT_SOURCE} from '../constants/deploy.constants'; -import type {ConfigType} from '../types/config'; +import {ConfigType, JunoConfigWithSatelliteId} from '../types/config'; import {readTemplateFile} from '../utils/fs.utils'; import {nodeRequire} from '../utils/node.utils'; @@ -22,7 +17,7 @@ export const saveJunoConfig = async ({ config, configType }: { - config: JunoConfig; + config: JunoConfigWithSatelliteId; configType: ConfigType; }): Promise => { await writeJunoConfig({ @@ -31,11 +26,6 @@ export const saveJunoConfig = async ({ }); }; -export const readSatelliteConfig = async (env: JunoConfigEnv): Promise => { - const {satellite} = await readJunoConfig(env); - return satellite; -}; - export const junoConfigExist = async (): Promise => { try { const {configPath} = junoConfigFile(); @@ -107,7 +97,7 @@ const writeJunoConfig = async ({ config, configType }: { - config: JunoConfig; + config: JunoConfigWithSatelliteId; configType: ConfigType; }): Promise => { switch (configType) { diff --git a/src/types/config.ts b/src/types/config.ts index 567d4c2..be63a6a 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -1,4 +1,4 @@ -import type {JunoConfigEnv, SatelliteConfig} from '@junobuild/config'; +import type {JunoConfig, JunoConfigEnv, SatelliteConfig} from '@junobuild/config'; export type ConfigType = 'ts' | 'js' | 'json'; @@ -6,3 +6,8 @@ export interface SatelliteConfigEnv { satellite: SatelliteConfig; env: JunoConfigEnv; } + +export type JunoConfigWithSatelliteId = Omit & { + satellite: Omit & + Required>; +}; From 1bfafacc7aaf61cf8a070cf1a80c9c7e63204940 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Sat, 17 Feb 2024 09:38:48 +0100 Subject: [PATCH 3/5] feat: don't buble error but, exist if no satellite id --- src/utils/satellite.utils.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/utils/satellite.utils.ts b/src/utils/satellite.utils.ts index e9d21d3..a7ec87e 100644 --- a/src/utils/satellite.utils.ts +++ b/src/utils/satellite.utils.ts @@ -1,5 +1,6 @@ import {type SatelliteParameters} from '@junobuild/admin'; -import {assertNonNullish} from '@junobuild/utils'; +import {isNullish} from '@junobuild/utils'; +import {red} from 'kleur'; import {getCliOrbiters, getCliSatellites} from '../configs/cli.config'; import type {SatelliteConfigEnv} from '../types/config'; import {actorParameters} from './actor.utils'; @@ -11,10 +12,10 @@ export const satelliteParameters = ({ Required> => { const satelliteId = satellitesIds?.[mode] ?? satelliteIdUser; - assertNonNullish( - satelliteId, - `A satellite ID must be provided in your configuration. Selected mode: ${mode}` - ); + if (isNullish(satelliteId)) { + console.log(`${red(`A satellite ID for ${mode} must be set in your configuration.`)}`); + process.exit(1); + } return { satelliteId, From d097b457f95e366a2697fbf962bafb6b30c63512 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Sat, 17 Feb 2024 09:56:15 +0100 Subject: [PATCH 4/5] feat: config next --- package-lock.json | 16 +++++++--------- package.json | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index d860a17..f7e8185 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@dfinity/identity": "^0.20.2", "@dfinity/principal": "^0.20.2", "@junobuild/admin": "^0.0.45", - "@junobuild/config": "file:../juno-js/packages/config", + "@junobuild/config": "^0.0.1-next-2024-02-17", "@junobuild/core-peer": "^0.0.10", "@junobuild/utils": "^0.0.18", "conf": "^12.0.0", @@ -60,11 +60,6 @@ "node": ">=18" } }, - "../juno-js/packages/config": { - "name": "@junobuild/config", - "version": "0.0.1", - "license": "MIT" - }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", @@ -1458,8 +1453,9 @@ } }, "node_modules/@junobuild/config": { - "resolved": "../juno-js/packages/config", - "link": true + "version": "0.0.1-next-2024-02-17", + "resolved": "https://registry.npmjs.org/@junobuild/config/-/config-0.0.1-next-2024-02-17.tgz", + "integrity": "sha512-L4JMtaM5vSQKxZaLDmgoC9ieFBTRTw/w6X71uyXVC32a7yxN09pnyCQfd29Mg/M7cSirH+7y0pijf7s7I61z/A==" }, "node_modules/@junobuild/core-peer": { "version": "0.0.10", @@ -7568,7 +7564,9 @@ "requires": {} }, "@junobuild/config": { - "version": "file:../juno-js/packages/config" + "version": "0.0.1-next-2024-02-17", + "resolved": "https://registry.npmjs.org/@junobuild/config/-/config-0.0.1-next-2024-02-17.tgz", + "integrity": "sha512-L4JMtaM5vSQKxZaLDmgoC9ieFBTRTw/w6X71uyXVC32a7yxN09pnyCQfd29Mg/M7cSirH+7y0pijf7s7I61z/A==" }, "@junobuild/core-peer": { "version": "0.0.10", diff --git a/package.json b/package.json index afe1aea..ebab688 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@dfinity/identity": "^0.20.2", "@dfinity/principal": "^0.20.2", "@junobuild/admin": "^0.0.45", - "@junobuild/config": "file:../juno-js/packages/config", + "@junobuild/config": "^0.0.1-next-2024-02-17", "@junobuild/core-peer": "^0.0.10", "@junobuild/utils": "^0.0.18", "conf": "^12.0.0", From 2cc7582ad5f3314cfd9d00d3e441b81568dd5eeb Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Sat, 17 Feb 2024 09:57:28 +0100 Subject: [PATCH 5/5] chore: lint --- src/configs/juno.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configs/juno.config.ts b/src/configs/juno.config.ts index bac0291..14f9f75 100644 --- a/src/configs/juno.config.ts +++ b/src/configs/juno.config.ts @@ -9,7 +9,7 @@ import { } from '../constants/config.constants'; import {JUNO_CONFIG_FILENAME, JUNO_JSON} from '../constants/constants'; import {DEPLOY_DEFAULT_SOURCE} from '../constants/deploy.constants'; -import {ConfigType, JunoConfigWithSatelliteId} from '../types/config'; +import type {ConfigType, JunoConfigWithSatelliteId} from '../types/config'; import {readTemplateFile} from '../utils/fs.utils'; import {nodeRequire} from '../utils/node.utils';