From 1c3064f8d1df581504c61c20bef67a936468246c Mon Sep 17 00:00:00 2001 From: Marco Link Date: Thu, 2 Feb 2023 00:42:41 +0100 Subject: [PATCH] feat: switch to named imports --- README.md | 28 ++++---- src/cli.ts | 2 +- src/index.ts | 2 + src/renderer/field/render-prop-any.ts | 12 +++- src/renderer/field/render-prop-array.ts | 7 +- src/renderer/field/render-prop-link.ts | 21 +++++- .../type/default-content-type-renderer.ts | 14 ++-- test/cases/fixtures/01-output.txt | 52 +++++++------- test/cf-definitions-builder.test.ts | 70 +++++++++---------- test/renderer/field/render-prop-any.test.ts | 14 ++-- test/renderer/field/render-prop-array.test.ts | 13 ++-- test/renderer/field/render-prop-link.test.ts | 11 +-- .../type/content-type-renfderer.test.ts | 32 +++++---- yarn.lock | 26 +++---- 14 files changed, 166 insertions(+), 138 deletions(-) diff --git a/README.md b/README.md index 79e9b72..436f142 100644 --- a/README.md +++ b/README.md @@ -206,7 +206,7 @@ As input a [json file](https://github.com/contentful/contentful-cli/tree/master/ ```typescript import * as CFRichTextTypes from '@contentful/rich-text-types'; -import * as Contentful from 'contentful'; +import { Entry, EntryFields } from 'contentful'; export interface TypeArtistFields { name: Contentful.EntryFields.Symbol; @@ -214,16 +214,16 @@ export interface TypeArtistFields { bio?: CFRichTextTypes.Block | CFRichTextTypes.Inline; } -export type TypeArtist = Contentful.Entry; +export type TypeArtist = Entry; export interface TypeArtworkFields { - name: Contentful.EntryFields.Symbol; + name: EntryFields.Symbol; type?: 'print' | 'drawing' | 'painting'; - preview?: Contentful.Asset[]; - artist: Contentful.Entry; + preview?: Asset[]; + artist: Entry; } -export type TypeArtwork = Contentful.Entry; +export type TypeArtwork = Entry; ``` This all only works if you add the [`contentful`](https://www.npmjs.com/package/contentful) package to your target project to get all relevant type definitions. @@ -249,8 +249,8 @@ Relevant methods to override: Set content type renderers: ```typescript -import CFDefinitionsBuilder from 'cf-content-types-generator'; import { + CFDefinitionsBuilder, DefaultContentTypeRenderer, LocalizedContentTypeRenderer, } from 'cf-content-types-generator'; @@ -329,21 +329,21 @@ const stringContent = new CFDefinitionsBuilder() validations: [], disabled: false, localized: false, - omitted: false + omitted: false, }, ], }) .toString(); -console.log(stringContent) +console.log(stringContent); -// import * as Contentful from "contentful"; -// +// import { Entry, EntryFields } from "contentful"; +// // export interface TypeMyEntryFields { -// myField: Contentful.EntryFields.Symbol; +// myField: EntryFields.Symbol; // } -// -// export type TypeMyEntry = Contentful.Entry; +// +// export type TypeMyEntry = Entry; ``` # Browser Usage diff --git a/src/cli.ts b/src/cli.ts index 3a62c9c..5f9d832 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -7,7 +7,7 @@ import { ContentTypeRenderer, DefaultContentTypeRenderer, LocalizedContentTypeRenderer, -} from './renderer/type'; +} from './renderer'; // eslint-disable-next-line unicorn/prefer-module const contentfulExport = require('contentful-export'); diff --git a/src/index.ts b/src/index.ts index f3d7a22..ef3911f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,9 @@ import CFDefinitionsBuilder from './cf-definitions-builder'; + export * from './extract-validation'; export * from './module-name'; export * from './property-imports'; export * from './renderer'; export * from './types'; export default CFDefinitionsBuilder; +export { CFDefinitionsBuilder }; diff --git a/src/renderer/field/render-prop-any.ts b/src/renderer/field/render-prop-any.ts index e780849..4a96d00 100644 --- a/src/renderer/field/render-prop-any.ts +++ b/src/renderer/field/render-prop-any.ts @@ -1,7 +1,8 @@ -import { renderTypeLiteral, renderTypeUnion } from '../generic'; import { Field } from 'contentful'; +import { renderTypeLiteral, renderTypeUnion } from '../generic'; +import { RenderContext } from '../type'; -export const renderPropAny = (field: Field): string => { +export const renderPropAny = (field: Field, context: RenderContext): string => { if (field.validations?.length > 0) { const includesValidation = field.validations.find((validation) => validation.in); if (includesValidation && includesValidation.in) { @@ -17,5 +18,10 @@ export const renderPropAny = (field: Field): string => { } } - return `Contentful.EntryFields.${field.type}`; + context.imports.add({ + moduleSpecifier: 'contentful', + namedImports: ['EntryFields'], + }); + + return `EntryFields.${field.type}`; }; diff --git a/src/renderer/field/render-prop-array.ts b/src/renderer/field/render-prop-array.ts index 99ff340..7178375 100644 --- a/src/renderer/field/render-prop-array.ts +++ b/src/renderer/field/render-prop-array.ts @@ -25,7 +25,12 @@ export const renderPropArray = (field: Field, context: RenderContext): string => return renderTypeArray(`${renderTypeUnion(validationsTypes)}`); } - return renderTypeArray('Contentful.EntryFields.Symbol'); + context.imports.add({ + moduleSpecifier: 'contentful', + namedImports: ['EntryFields'], + }); + + return renderTypeArray('EntryFields.Symbol'); } throw new Error('unhandled array type "' + field.items.type + '"'); diff --git a/src/renderer/field/render-prop-link.ts b/src/renderer/field/render-prop-link.ts index ba42c91..48f3545 100644 --- a/src/renderer/field/render-prop-link.ts +++ b/src/renderer/field/render-prop-link.ts @@ -14,7 +14,22 @@ export const renderPropLink = ( : 'Record'; }; - return field.linkType === 'Entry' - ? renderTypeGeneric('Contentful.' + field.linkType, linkContentType(field, context)) - : 'Contentful.' + field.linkType!; + switch (field.linkType) { + case 'Entry': + context.imports.add({ + moduleSpecifier: 'contentful', + namedImports: ['Entry'], + }); + return renderTypeGeneric(field.linkType, linkContentType(field, context)); + + case 'Asset': + context.imports.add({ + moduleSpecifier: 'contentful', + namedImports: ['Asset'], + }); + return 'Asset'; + + default: + throw new Error(`Unknown linkType "${field.linkType}"`); + } }; diff --git a/src/renderer/type/default-content-type-renderer.ts b/src/renderer/type/default-content-type-renderer.ts index 13214f4..d1b51ab 100644 --- a/src/renderer/type/default-content-type-renderer.ts +++ b/src/renderer/type/default-content-type-renderer.ts @@ -44,12 +44,8 @@ export class DefaultContentTypeRenderer extends BaseContentTypeRenderer { } } - protected addDefaultImports(context: RenderContext): void { - context.imports.add({ - moduleSpecifier: 'contentful', - namespaceImport: 'Contentful', - }); - } + // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-function + protected addDefaultImports(context: RenderContext): void {} protected renderField( field: Field, @@ -78,6 +74,10 @@ export class DefaultContentTypeRenderer extends BaseContentTypeRenderer { } protected renderEntryType(contentType: CFContentType, context: RenderContext): string { - return renderTypeGeneric('Contentful.Entry', context.moduleFieldsName(contentType.sys.id)); + context.imports.add({ + moduleSpecifier: 'contentful', + namedImports: ['Entry'], + }); + return renderTypeGeneric('Entry', context.moduleFieldsName(contentType.sys.id)); } } diff --git a/test/cases/fixtures/01-output.txt b/test/cases/fixtures/01-output.txt index 5c4b918..14533a6 100644 --- a/test/cases/fixtures/01-output.txt +++ b/test/cases/fixtures/01-output.txt @@ -1,38 +1,38 @@ -import * as Contentful from "contentful"; +import { Asset, Entry, EntryFields } from "contentful"; export interface TypeBrandFields { - companyName: Contentful.EntryFields.Text; - logo?: Contentful.Asset; - companyDescription?: Contentful.EntryFields.Text; - website?: Contentful.EntryFields.Symbol; - twitter?: Contentful.EntryFields.Symbol; - email?: Contentful.EntryFields.Symbol; - phone?: Contentful.EntryFields.Symbol[]; + companyName: EntryFields.Text; + logo?: Asset; + companyDescription?: EntryFields.Text; + website?: EntryFields.Symbol; + twitter?: EntryFields.Symbol; + email?: EntryFields.Symbol; + phone?: EntryFields.Symbol[]; } -export type TypeBrand = Contentful.Entry; +export type TypeBrand = Entry; export interface TypeCategoryFields { - title: Contentful.EntryFields.Text; - icon?: Contentful.Asset; - categoryDescription?: Contentful.EntryFields.Text; + title: EntryFields.Text; + icon?: Asset; + categoryDescription?: EntryFields.Text; } -export type TypeCategory = Contentful.Entry; +export type TypeCategory = Entry; export interface TypeProductFields { - productName: Contentful.EntryFields.Text; - slug?: Contentful.EntryFields.Symbol; - productDescription?: Contentful.EntryFields.Text; - sizetypecolor?: Contentful.EntryFields.Symbol; - image?: Contentful.Asset[]; - tags?: Contentful.EntryFields.Symbol[]; - categories?: Contentful.Entry[]; - price?: Contentful.EntryFields.Number; - brand?: Contentful.Entry; - quantity?: Contentful.EntryFields.Integer; - sku?: Contentful.EntryFields.Symbol; - website?: Contentful.EntryFields.Symbol; + productName: EntryFields.Text; + slug?: EntryFields.Symbol; + productDescription?: EntryFields.Text; + sizetypecolor?: EntryFields.Symbol; + image?: Asset[]; + tags?: EntryFields.Symbol[]; + categories?: Entry[]; + price?: EntryFields.Number; + brand?: Entry; + quantity?: EntryFields.Integer; + sku?: EntryFields.Symbol; + website?: EntryFields.Symbol; } -export type TypeProduct = Contentful.Entry; +export type TypeProduct = Entry; diff --git a/test/cf-definitions-builder.test.ts b/test/cf-definitions-builder.test.ts index 58df9bd..aabfd41 100644 --- a/test/cf-definitions-builder.test.ts +++ b/test/cf-definitions-builder.test.ts @@ -49,12 +49,12 @@ describe('A Contentful definitions builder', () => { builder.appendType(modelType); expect('\n' + builder.toString()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { Entry } from "contentful"; export interface TypeSysIdFields { } - export type TypeSysId = Contentful.Entry; + export type TypeSysId = Entry; `), ); }); @@ -80,13 +80,13 @@ describe('A Contentful definitions builder', () => { }); expect('\n' + builder.toString()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { Entry, EntryFields } from "contentful"; export interface TypeSysIdFields { - symbolFieldId: Contentful.EntryFields.Symbol; + symbolFieldId: EntryFields.Symbol; } - export type TypeSysId = Contentful.Entry; + export type TypeSysId = Entry; `), ); }); @@ -112,13 +112,13 @@ describe('A Contentful definitions builder', () => { }); expect('\n' + builder.toString()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { Entry, EntryFields } from "contentful"; export interface TypeSysIdFields { - symbolFieldId?: Contentful.EntryFields.Symbol; + symbolFieldId?: EntryFields.Symbol; } - export type TypeSysId = Contentful.Entry; + export type TypeSysId = Entry; `), ); }); @@ -144,13 +144,13 @@ describe('A Contentful definitions builder', () => { }); expect('\n' + builder.toString()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { Entry, EntryFields } from "contentful"; export interface TypeSysIdFields { - boolFieldId?: Contentful.EntryFields.Boolean; + boolFieldId?: EntryFields.Boolean; } - export type TypeSysId = Contentful.Entry; + export type TypeSysId = Entry; `), ); }); @@ -181,14 +181,14 @@ describe('A Contentful definitions builder', () => { }); expect('\n' + builder.toString()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { Entry } from "contentful"; import { TypeLinkedTypeFields } from "./TypeLinkedType"; export interface TypeSysIdFields { - linkFieldId?: Contentful.Entry; + linkFieldId?: Entry; } - export type TypeSysId = Contentful.Entry; + export type TypeSysId = Entry; `), ); }); @@ -223,15 +223,15 @@ describe('A Contentful definitions builder', () => { }); expect('\n' + builder.toString()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { Entry } from "contentful"; import { TypeArtistFields } from "./TypeArtist"; import { TypeArtworkFields } from "./TypeArtwork"; export interface TypeSysIdFields { - arrayFieldId?: Contentful.Entry[]; + arrayFieldId?: Entry[]; } - export type TypeSysId = Contentful.Entry; + export type TypeSysId = Entry; `), ); }); @@ -261,13 +261,13 @@ describe('A Contentful definitions builder', () => { }); expect('\n' + builder.toString()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { Entry } from "contentful"; export interface TypeSysIdFields { stringFieldId?: "hello" | "world"; } - export type TypeSysId = Contentful.Entry; + export type TypeSysId = Entry; `), ); }); @@ -297,13 +297,13 @@ describe('A Contentful definitions builder', () => { }); expect('\n' + builder.toString()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { Entry } from "contentful"; export interface TypeSysIdFields { numericFieldId?: 1 | 2 | 3; } - export type TypeSysId = Contentful.Entry; + export type TypeSysId = Entry; `), ); }); @@ -317,12 +317,12 @@ describe('A Contentful definitions builder', () => { expect('\n' + result.toString()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { Entry } from "contentful"; export interface TypeSysIdFields { } - export type TypeSysId = Contentful.Entry; + export type TypeSysId = Entry; `), ); }); @@ -345,23 +345,23 @@ describe('A Contentful definitions builder', () => { expect('\n' + result1.toString()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { Entry } from "contentful"; export interface TypeSysIdFields { } - export type TypeSysId = Contentful.Entry; + export type TypeSysId = Entry; `), ); expect('\n' + result2.toString()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { Entry } from "contentful"; export interface TypeMyTypeFields { } - export type TypeMyType = Contentful.Entry; + export type TypeMyType = Entry; `), ); }); @@ -400,25 +400,25 @@ describe('A Contentful definitions builder', () => { expect('\n' + result1.toString()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { Entry } from "contentful"; export interface TypeSysIdFields { } - export type TypeSysId = Contentful.Entry; + export type TypeSysId = Entry; `), ); expect('\n' + result2.toString()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { Entry } from "contentful"; import { TypeSysIdFields } from "./TypeSysId"; export interface TypeMyTypeFields { - linkFieldId?: Contentful.Entry; + linkFieldId?: Entry; } - export type TypeMyType = Contentful.Entry; + export type TypeMyType = Entry; `), ); }); @@ -468,13 +468,13 @@ describe('A Contentful definitions builder', () => { expect('\n' + result2.toString()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { Entry } from "contentful"; export interface TypeMyTypeFields { - linkFieldId?: Contentful.Entry; + linkFieldId?: Entry; } - export type TypeMyType = Contentful.Entry; + export type TypeMyType = Entry; `), ); }); diff --git a/test/renderer/field/render-prop-any.test.ts b/test/renderer/field/render-prop-any.test.ts index ead4505..41a8e3a 100644 --- a/test/renderer/field/render-prop-any.test.ts +++ b/test/renderer/field/render-prop-any.test.ts @@ -1,6 +1,12 @@ -import { renderPropAny } from '../../../src/renderer/field'; +import { createDefaultContext, RenderContext, renderPropAny } from '../../../src'; describe('A renderPropAny function', () => { + let context: RenderContext; + + beforeEach(() => { + context = createDefaultContext(); + }); + it('can evaluate a "Symbol" type', () => { const field = JSON.parse(` { @@ -16,7 +22,7 @@ describe('A renderPropAny function', () => { } `); - expect(renderPropAny(field)).toEqual('Contentful.EntryFields.Symbol'); + expect(renderPropAny(field, context)).toEqual('EntryFields.Symbol'); }); it('can evaluate a "Symbol" type with "in" validation', () => { @@ -40,7 +46,7 @@ describe('A renderPropAny function', () => { } `); - expect(renderPropAny(field)).toEqual('"Center-aligned" | "Left-aligned"'); + expect(renderPropAny(field, context)).toEqual('"Center-aligned" | "Left-aligned"'); }); it('can evaluate a "Symbol" type with missing validations', () => { @@ -56,6 +62,6 @@ describe('A renderPropAny function', () => { } `); - expect(renderPropAny(field)).toEqual('Contentful.EntryFields.Symbol'); + expect(renderPropAny(field, context)).toEqual('EntryFields.Symbol'); }); }); diff --git a/test/renderer/field/render-prop-array.test.ts b/test/renderer/field/render-prop-array.test.ts index 6ff8ef3..853bb3d 100644 --- a/test/renderer/field/render-prop-array.test.ts +++ b/test/renderer/field/render-prop-array.test.ts @@ -1,5 +1,4 @@ -import { renderPropArray } from '../../../src/renderer/field'; -import { createDefaultContext } from '../../../src/renderer/type'; +import { createDefaultContext, renderPropArray } from '../../../src'; describe('A renderPropArray function', () => { it('can evaluate a "Array" of "Link" with no validations', () => { @@ -21,9 +20,7 @@ describe('A renderPropArray function', () => { } `); - expect(renderPropArray(field, createDefaultContext())).toEqual( - 'Contentful.Entry>[]', - ); + expect(renderPropArray(field, createDefaultContext())).toEqual('Entry>[]'); }); it('can evaluate an "Array" of "Symbol"', () => { @@ -46,9 +43,7 @@ describe('A renderPropArray function', () => { } `); - expect(renderPropArray(field, createDefaultContext())).toEqual( - 'Contentful.EntryFields.Symbol[]', - ); + expect(renderPropArray(field, createDefaultContext())).toEqual('EntryFields.Symbol[]'); }); it('can evaluate an "Array" of "Symbol" with "in" validation', () => { @@ -114,7 +109,7 @@ describe('A renderPropArray function', () => { `); expect(renderPropArray(field, createDefaultContext())).toEqual( - 'Contentful.Entry[]', + 'Entry[]', ); }); }); diff --git a/test/renderer/field/render-prop-link.test.ts b/test/renderer/field/render-prop-link.test.ts index f84593e..01ad9b2 100644 --- a/test/renderer/field/render-prop-link.test.ts +++ b/test/renderer/field/render-prop-link.test.ts @@ -1,5 +1,4 @@ -import { renderPropLink } from '../../../src/renderer/field'; -import { createDefaultContext } from '../../../src/renderer/type'; +import { createDefaultContext, renderPropLink } from '../../../src'; describe('A renderPropLink function', () => { it('can evaluate a "Link" type', () => { @@ -23,9 +22,7 @@ describe('A renderPropLink function', () => { } `); - expect(renderPropLink(field, createDefaultContext())).toEqual( - 'Contentful.Entry', - ); + expect(renderPropLink(field, createDefaultContext())).toEqual('Entry'); }); it('can evaluate a "Link" type with no validations', () => { @@ -43,8 +40,6 @@ describe('A renderPropLink function', () => { } `); - expect(renderPropLink(field, createDefaultContext())).toEqual( - 'Contentful.Entry>', - ); + expect(renderPropLink(field, createDefaultContext())).toEqual('Entry>'); }); }); diff --git a/test/renderer/type/content-type-renfderer.test.ts b/test/renderer/type/content-type-renfderer.test.ts index df4e9df..9efc7f2 100644 --- a/test/renderer/type/content-type-renfderer.test.ts +++ b/test/renderer/type/content-type-renfderer.test.ts @@ -1,11 +1,16 @@ import { Field, FieldType } from 'contentful'; import { Project, ScriptTarget, SourceFile } from 'ts-morph'; -import { moduleFieldsName, moduleName } from '../../../src/module-name'; -import { defaultRenderers, FieldRenderer } from '../../../src/renderer/field'; -import { renderTypeGeneric } from '../../../src/renderer/generic'; -import { DefaultContentTypeRenderer, RenderContext } from '../../../src/renderer/type'; -import { CFContentType } from '../../../src/types'; +import { + CFContentType, + DefaultContentTypeRenderer, + defaultRenderers, + FieldRenderer, + moduleFieldsName, + moduleName, + RenderContext, + renderTypeGeneric, +} from '../../../src'; import stripIndent = require('strip-indent'); describe('A derived content type renderer class', () => { @@ -27,6 +32,7 @@ describe('A derived content type renderer class', () => { const symbolTypeRenderer = () => { return 'Test.Symbol'; }; + class DerivedContentTypeRenderer extends DefaultContentTypeRenderer { public createContext(): RenderContext { return { @@ -69,13 +75,13 @@ describe('A derived content type renderer class', () => { expect('\n' + testFile.getFullText()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { Entry } from "contentful"; export interface TypeTestFields { field_id: Test.Symbol; } - export type TypeTest = Contentful.Entry; + export type TypeTest = Entry; `), ); }); @@ -90,6 +96,7 @@ describe('A derived content type renderer class', () => { type: super.renderFieldType(field, context), }; } + protected renderEntry(contentType: CFContentType, context: RenderContext) { return { docs: [ @@ -130,15 +137,16 @@ describe('A derived content type renderer class', () => { expect('\n' + testFile.getFullText()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { EntryFields } from "contentful"; + import { Entry } from "contentful"; export interface TypeTestFields { /** Field of type "Symbol" */ - field_id: Contentful.EntryFields.Symbol; + field_id: EntryFields.Symbol; } /** content type "display name" with id: test */ - export type TypeTest = Contentful.Entry; + export type TypeTest = Entry; `), ); }); @@ -183,11 +191,11 @@ describe('A derived content type renderer class', () => { expect('\n' + testFile.getFullText()).toEqual( stripIndent(` - import * as Contentful from "contentful"; + import { EntryFields } from "contentful"; import { IdScopedEntry } from "@custom"; export interface TypeTestFields { - field_id: Contentful.EntryFields.Symbol; + field_id: EntryFields.Symbol; } export type TypeTest = IdScopedEntry<'test', TypeTestFields>; diff --git a/yarn.lock b/yarn.lock index 862d01e..ef8619f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -955,7 +955,7 @@ is-wsl "^2.1.1" tslib "^2.3.1" -"@oclif/core@^1.20.4", "@oclif/core@^1.24.0": +"@oclif/core@^1.24.0": version "1.24.0" resolved "https://registry.yarnpkg.com/@oclif/core/-/core-1.24.0.tgz#e94e2f3a1259ebb3cc867d04b12c5bfc31c21f50" integrity sha512-J41suyV4fLfLcRRySZdtgFYSjIlpYqD90SY01Fm4+ZJUMcfDh/eQAD4sogyYOsIT0bfEzYOyYCjmfHmgcoX5aA== @@ -989,10 +989,10 @@ widest-line "^3.1.0" wrap-ansi "^7.0.0" -"@oclif/core@^2.0.2-beta.6": - version "2.0.2-beta.10" - resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.0.2-beta.10.tgz#5b459a91d653b8d5aa234e4324a4cc483747abd2" - integrity sha512-FgJ5XHE6MjE7DOyQAcOZPD5Xs5cNOzP91zAQBkut8xhOkZA1NRQjv+7BczJqOTerXccohhTlu09pd7OAyDuitw== +"@oclif/core@^2.0.2-beta.6", "@oclif/core@^2.0.3": + version "2.0.7" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.0.7.tgz#a17a85dfa105dda120fbc5647432010feaa97a9e" + integrity sha512-pj7hIH8SBeH3qha47fmyqdaBdNVEqesRgnKFh8Ytdb4S41/4BYOiQuyQGuvnKgvicH6DMxp4FbM9EQEW46V9xw== dependencies: "@types/cli-progress" "^3.11.0" ansi-escapes "^4.3.2" @@ -6226,11 +6226,11 @@ object-treeify@^1.1.33: integrity sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A== oclif@^3.4.3: - version "3.4.3" - resolved "https://registry.yarnpkg.com/oclif/-/oclif-3.4.3.tgz#8db95c7d1f0c8c82fb3037545f78e65fa7769a4a" - integrity sha512-Kg8ezSJvDluazG6eyN+TeoryaFn3i9utKVty2hy6I0FUy6QcPnbl8+MCha4Jwc+x5+pA46Tu0n2cnjUcWqp56w== + version "3.6.1" + resolved "https://registry.yarnpkg.com/oclif/-/oclif-3.6.1.tgz#157ac35f1e634af745879a55c3fa39bf724a5e69" + integrity sha512-zedbQqxAzC8WlH/T2D/CbGCTWIXHMV7wGs2av+M3KPG4SfB9/lwn1zXGjft/3NNy3X6KCEoGCYWqYYMZOf2Fgg== dependencies: - "@oclif/core" "^1.20.4" + "@oclif/core" "^2.0.3" "@oclif/plugin-help" "^5.1.19" "@oclif/plugin-not-found" "^2.3.7" "@oclif/plugin-warn-if-update-available" "^2.0.14" @@ -6244,6 +6244,7 @@ oclif@^3.4.3: lodash "^4.17.21" normalize-package-data "^3.0.3" semver "^7.3.8" + shelljs "^0.8.5" tslib "^2.3.1" yeoman-environment "^3.11.1" yeoman-generator "^5.6.1" @@ -7854,12 +7855,7 @@ tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2, tslib@^2.0.0, tslib@^2.1.0, tslib@^2.3.1: - version "2.4.0" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz" - integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== - -tslib@^2.4.1: +tslib@^2, tslib@^2.0.0, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==