diff --git a/package-lock.json b/package-lock.json index db55fd5..3127c55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "polyapi", - "version": "0.23.16", + "version": "0.23.17", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "polyapi", - "version": "0.23.16", + "version": "0.23.17", "license": "MIT", "dependencies": { "@guanghechen/helper-string": "4.7.1", diff --git a/package.json b/package.json index 6e32fec..04ad5ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "polyapi", - "version": "0.23.16", + "version": "0.23.17", "description": "Poly is a CLI tool to help create and manage your Poly definitions.", "license": "MIT", "repository": { diff --git a/src/commands/generate/index.ts b/src/commands/generate/index.ts index eeeac88..833f330 100644 --- a/src/commands/generate/index.ts +++ b/src/commands/generate/index.ts @@ -393,9 +393,14 @@ const generate = async ({ try { specs = await getSpecs(contexts, names, functionIds, noTypes); + + let lastUsedContexts = ''; + if (contexts) { - addOrUpdateConfig(polyPath, 'LAST_GENERATE_CONTEXTS_USED', contexts?.join(',')); + lastUsedContexts = contexts?.join(','); } + + addOrUpdateConfig(polyPath, 'LAST_GENERATE_CONTEXTS_USED', lastUsedContexts); } catch (error) { showErrGettingSpecs(error); return;