extension-create 3.13.0 → 3.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,8 @@
1
1
  export declare function copyDirectoryWithSymlinks(source: string, destination: string): Promise<void>;
2
2
  export declare function moveDirectoryContents(source: string, destination: string): Promise<void>;
3
3
  export declare function getInstallCommand(): Promise<"pnpm" | "yarn" | "npm">;
4
- export declare function isDirectoryWriteable(directory: string, projectName: string): Promise<boolean>;
4
+ export declare function isDirectoryWriteable(directory: string, projectName: string, logger: {
5
+ log(...args: any[]): void;
6
+ error(...args: any[]): void;
7
+ }): Promise<boolean>;
5
8
  export declare function isTypeScriptTemplate(templateName: string): boolean;
package/dist/module.cjs CHANGED
@@ -240,15 +240,15 @@ async function moveDirectoryContents(source, destination) {
240
240
  async function getInstallCommand() {
241
241
  return detectPackageManagerFromEnv();
242
242
  }
243
- async function isDirectoryWriteable(directory, projectName) {
243
+ async function isDirectoryWriteable(directory, projectName, logger) {
244
244
  try {
245
- console.log(folderExists(projectName));
245
+ logger.log(folderExists(projectName));
246
246
  await promises_namespaceObject.mkdir(directory, {
247
247
  recursive: true
248
248
  });
249
249
  return true;
250
250
  } catch (err) {
251
- console.log(writingDirectoryError(err));
251
+ logger.log(writingDirectoryError(err));
252
252
  return false;
253
253
  }
254
254
  }
@@ -259,17 +259,17 @@ const allowlist = [
259
259
  'LICENSE',
260
260
  'node_modules'
261
261
  ];
262
- async function createDirectory(projectPath, projectName) {
263
- console.log(startingNewExtension(projectName));
262
+ async function createDirectory(projectPath, projectName, logger) {
263
+ logger.log(startingNewExtension(projectName));
264
264
  try {
265
- const isCurrentDirWriteable = await isDirectoryWriteable(projectPath, projectName);
266
- console.log(checkingIfPathIsWriteable());
265
+ const isCurrentDirWriteable = await isDirectoryWriteable(projectPath, projectName, logger);
266
+ logger.log(checkingIfPathIsWriteable());
267
267
  if (!isCurrentDirWriteable) {
268
- console.error(destinationNotWriteable(projectPath));
268
+ logger.error(destinationNotWriteable(projectPath));
269
269
  throw new Error(destinationNotWriteable(projectPath));
270
270
  }
271
271
  const currentDir = await promises_namespaceObject.readdir(projectPath);
272
- console.log(scanningPossiblyConflictingFiles());
272
+ logger.log(scanningPossiblyConflictingFiles());
273
273
  const conflictingFiles = await Promise.all(currentDir.filter((file)=>!file.startsWith('.')).filter((file)=>!file.endsWith('.log')).filter((file)=>!allowlist.includes(file)).map(async (file)=>{
274
274
  const stats = await promises_namespaceObject.lstat(external_path_namespaceObject.join(projectPath, file));
275
275
  return stats.isDirectory() ? `${file}/` : `${file}`;
@@ -323,7 +323,7 @@ async function getZipSourcePath(tempPath, templateUrl) {
323
323
  if (onlyDir.name === archiveBase) return external_path_namespaceObject.join(tempPath, onlyDir.name);
324
324
  return tempPath;
325
325
  }
326
- async function importExternalTemplate(projectPath, projectName, template) {
326
+ async function importExternalTemplate(projectPath, projectName, template, logger) {
327
327
  const templateName = external_path_namespaceObject.basename(template);
328
328
  const examplesUrl = 'https://github.com/extension-js/examples/tree/main/examples';
329
329
  const resolvedTemplate = 'init' === templateName ? "javascript" : template;
@@ -373,7 +373,7 @@ async function importExternalTemplate(projectPath, projectName, template) {
373
373
  force: true
374
374
  });
375
375
  } catch (error) {
376
- console.error(installingFromTemplateError(projectName, templateName, error));
376
+ logger.error(installingFromTemplateError(projectName, templateName, error));
377
377
  throw error;
378
378
  }
379
379
  }
@@ -419,7 +419,7 @@ function resolveExtensionDevDependencyVersion(cliVersion) {
419
419
  if (!cliVersion) return 'latest';
420
420
  return cliVersion.includes('-') ? cliVersion : `^${cliVersion}`;
421
421
  }
422
- async function overridePackageJson(projectPath, projectName, { template = "javascript", cliVersion }) {
422
+ async function overridePackageJson(projectPath, projectName, { template = "javascript", cliVersion }, logger) {
423
423
  const extensionBinary = await resolveExtensionBinary();
424
424
  const candidatePath = external_path_namespaceObject.join(projectPath, 'package.json');
425
425
  let packageJson = {};
@@ -462,10 +462,10 @@ async function overridePackageJson(projectPath, projectName, { template = "javas
462
462
  }
463
463
  };
464
464
  try {
465
- console.log(writingPackageJsonMetadata());
465
+ logger.log(writingPackageJsonMetadata());
466
466
  await promises_namespaceObject.writeFile(external_path_namespaceObject.join(projectPath, 'package.json'), JSON.stringify(packageMetadata, null, 2));
467
467
  } catch (error) {
468
- console.error(writingPackageJsonMetadataError(projectName, error));
468
+ logger.error(writingPackageJsonMetadataError(projectName, error));
469
469
  throw error;
470
470
  }
471
471
  }
@@ -521,7 +521,7 @@ function getTagFallback(version) {
521
521
  const cleaned = version.replace(/^[~^]/, '');
522
522
  return cleaned.includes('-') ? 'next' : 'latest';
523
523
  }
524
- async function updateExtensionDependencyTag(projectPath, projectName) {
524
+ async function updateExtensionDependencyTag(projectPath, projectName, logger) {
525
525
  const packageJsonPath = external_path_namespaceObject.join(projectPath, 'package.json');
526
526
  try {
527
527
  const raw = await external_fs_namespaceObject.promises.readFile(packageJsonPath, 'utf8');
@@ -537,7 +537,7 @@ async function updateExtensionDependencyTag(projectPath, projectName) {
537
537
  await external_fs_namespaceObject.promises.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n');
538
538
  return true;
539
539
  } catch (error) {
540
- console.error(cantInstallDependencies(projectName, error));
540
+ logger.error(cantInstallDependencies(projectName, error));
541
541
  return false;
542
542
  }
543
543
  }
@@ -562,14 +562,14 @@ async function hasDependenciesToInstall(projectPath) {
562
562
  return true;
563
563
  }
564
564
  }
565
- async function installDependencies(projectPath, projectName) {
565
+ async function installDependencies(projectPath, projectName, logger) {
566
566
  const nodeModulesPath = external_path_namespaceObject.join(projectPath, 'node_modules');
567
567
  const shouldInstall = await hasDependenciesToInstall(projectPath);
568
568
  if (!shouldInstall) return;
569
569
  const command = await getInstallCommand();
570
570
  const dependenciesArgs = getInstallArgs();
571
571
  const installMessage = installingDependencies();
572
- console.log(installMessage);
572
+ logger.log(installMessage);
573
573
  try {
574
574
  await external_fs_namespaceObject.promises.mkdir(nodeModulesPath, {
575
575
  recursive: true
@@ -579,7 +579,7 @@ async function installDependencies(projectPath, projectName) {
579
579
  if (0 !== firstRun.code) {
580
580
  const output = `${firstRun.stdout}\n${firstRun.stderr}`;
581
581
  const shouldRetry = shouldRetryWithTagFallback(output);
582
- const didUpdate = shouldRetry ? await updateExtensionDependencyTag(projectPath, projectName) : false;
582
+ const didUpdate = shouldRetry ? await updateExtensionDependencyTag(projectPath, projectName, logger) : false;
583
583
  if (didUpdate) {
584
584
  const retryRun = await install_dependencies_runInstall(command, dependenciesArgs, projectPath, stdio);
585
585
  if (0 === retryRun.code) return;
@@ -587,8 +587,8 @@ async function installDependencies(projectPath, projectName) {
587
587
  throw new Error(installingDependenciesFailed(command, dependenciesArgs, firstRun.code));
588
588
  }
589
589
  } catch (error) {
590
- console.error(installingDependenciesProcessError(projectName, error));
591
- console.error(cantInstallDependencies(projectName, error));
590
+ logger.error(installingDependenciesProcessError(projectName, error));
591
+ logger.error(cantInstallDependencies(projectName, error));
592
592
  throw error;
593
593
  }
594
594
  }
@@ -635,7 +635,7 @@ async function findManifestJsonPath(projectPath) {
635
635
  }
636
636
  throw new Error(`Could not locate manifest.json under ${projectPath}. Checked common paths and searched up to depth ${manifestSearchMaxDepth}.`);
637
637
  }
638
- async function writeReadmeFile(projectPath, projectName) {
638
+ async function writeReadmeFile(projectPath, projectName, logger) {
639
639
  try {
640
640
  await promises_namespaceObject.access(external_path_namespaceObject.join(projectPath, 'README.md'));
641
641
  return;
@@ -702,17 +702,17 @@ Learn more in the [Extension.js docs](https://extension.js.org).
702
702
  const manifestJson = JSON.parse(await promises_namespaceObject.readFile(manifestJsonPath, 'utf-8'));
703
703
  const readmeFileEdited = initTemplateReadme.replaceAll('[projectName]', projectName).replaceAll("[templateDescription]", manifestJson.description).replaceAll('[runCommand]', installCommand);
704
704
  try {
705
- console.log(writingReadmeMetaData());
705
+ logger.log(writingReadmeMetaData());
706
706
  await promises_namespaceObject.mkdir(projectPath, {
707
707
  recursive: true
708
708
  });
709
709
  await promises_namespaceObject.writeFile(external_path_namespaceObject.join(projectPath, 'README.md'), readmeFileEdited);
710
710
  } catch (error) {
711
- console.error(writingReadmeMetaDataEError(projectName, error));
711
+ logger.error(writingReadmeMetaDataEError(projectName, error));
712
712
  throw error;
713
713
  }
714
714
  }
715
- async function writeManifestJson(projectPath, projectName) {
715
+ async function writeManifestJson(projectPath, projectName, logger) {
716
716
  const manifestJsonPath = await findManifestJsonPath(projectPath);
717
717
  const manifestJsonContent = await promises_namespaceObject.readFile(manifestJsonPath);
718
718
  const manifestJson = JSON.parse(manifestJsonContent.toString());
@@ -722,14 +722,14 @@ async function writeManifestJson(projectPath, projectName) {
722
722
  author: 'Your Name'
723
723
  };
724
724
  try {
725
- console.log(writingManifestJsonMetadata());
725
+ logger.log(writingManifestJsonMetadata());
726
726
  await promises_namespaceObject.writeFile(manifestJsonPath, JSON.stringify(manifestMetadata, null, 2));
727
727
  } catch (error) {
728
- console.error(writingManifestJsonMetadataError(projectName, error));
728
+ logger.error(writingManifestJsonMetadataError(projectName, error));
729
729
  throw error;
730
730
  }
731
731
  }
732
- async function generateExtensionTypes(projectPath, projectName) {
732
+ async function generateExtensionTypes(projectPath, projectName, logger) {
733
733
  const extensionEnvFile = external_path_namespaceObject.join(projectPath, 'extension-env.d.ts');
734
734
  const typePath = 'extension';
735
735
  const fileContent = `\
@@ -747,10 +747,10 @@ async function generateExtensionTypes(projectPath, projectName) {
747
747
  await promises_namespaceObject.mkdir(projectPath, {
748
748
  recursive: true
749
749
  });
750
- console.log(writingTypeDefinitions(projectName));
750
+ logger.log(writingTypeDefinitions(projectName));
751
751
  await promises_namespaceObject.writeFile(extensionEnvFile, fileContent);
752
752
  } catch (error) {
753
- console.error(writingTypeDefinitionsError(error));
753
+ logger.error(writingTypeDefinitionsError(error));
754
754
  throw error;
755
755
  }
756
756
  }
@@ -798,13 +798,13 @@ const globalLines = [
798
798
  ...envFiles,
799
799
  ...debugFiles
800
800
  ];
801
- async function writeGitignore(projectPath) {
801
+ async function writeGitignore(projectPath, logger) {
802
802
  const gitIgnorePath = external_path_namespaceObject.join(projectPath, '.gitignore');
803
803
  const paths = new Set();
804
804
  let currentContents = '';
805
805
  currentContents = await promises_namespaceObject.readFile(gitIgnorePath, 'utf8').catch((err)=>{
806
806
  if ('ENOENT' === err.code) return '';
807
- console.error(err);
807
+ logger.error(err);
808
808
  throw err;
809
809
  });
810
810
  for (const rawLine of currentContents.split(/\r?\n/)){
@@ -814,21 +814,21 @@ async function writeGitignore(projectPath) {
814
814
  const linesToAdd = globalLines.filter((line)=>!paths.has(line));
815
815
  while('' === linesToAdd[linesToAdd.length - 1])linesToAdd.pop();
816
816
  if (0 === linesToAdd.length) return;
817
- console.log(writingGitIgnore());
817
+ logger.log(writingGitIgnore());
818
818
  const shouldPrefixWithNewline = currentContents.length > 0 && !currentContents.endsWith('\n');
819
819
  const contentToAppend = `${shouldPrefixWithNewline ? '\n' : ''}${linesToAdd.join('\n')}`;
820
820
  await promises_namespaceObject.appendFile(gitIgnorePath, contentToAppend).catch((err)=>{
821
- console.error(err);
821
+ logger.error(err);
822
822
  throw err;
823
823
  });
824
824
  }
825
- async function initializeGitRepository(projectPath, projectName) {
825
+ async function initializeGitRepository(projectPath, projectName, logger) {
826
826
  const gitCommand = 'git';
827
827
  const gitArgs = [
828
828
  'init',
829
829
  '--quiet'
830
830
  ];
831
- console.log(initializingGitForRepository(projectName));
831
+ logger.log(initializingGitForRepository(projectName));
832
832
  try {
833
833
  const stdio = 'development' === process.env.EXTENSION_ENV ? 'inherit' : 'ignore';
834
834
  const child = (0, external_cross_spawn_namespaceObject.spawn)(gitCommand, gitArgs, {
@@ -841,21 +841,21 @@ async function initializeGitRepository(projectPath, projectName) {
841
841
  else resolve();
842
842
  });
843
843
  child.on('error', (error)=>{
844
- console.error(initializingGitForRepositoryProcessError(projectName, error));
844
+ logger.error(initializingGitForRepositoryProcessError(projectName, error));
845
845
  reject(error);
846
846
  });
847
847
  });
848
848
  } catch (error) {
849
- console.error(initializingGitForRepositoryError(projectName, error));
849
+ logger.error(initializingGitForRepositoryError(projectName, error));
850
850
  throw error;
851
851
  }
852
852
  }
853
- async function setupBuiltInTests(projectPath, projectName) {
853
+ async function setupBuiltInTests(projectPath, projectName, logger) {
854
854
  try {
855
855
  const testSpecPath = external_path_namespaceObject.join(projectPath, 'tests', 'templates.spec.ts');
856
856
  if (external_fs_namespaceObject.existsSync(testSpecPath)) external_fs_namespaceObject.unlinkSync(testSpecPath);
857
857
  } catch (error) {
858
- console.error(cantSetupBuiltInTests(projectName, error));
858
+ logger.error(cantSetupBuiltInTests(projectName, error));
859
859
  throw error;
860
860
  }
861
861
  }
@@ -1039,18 +1039,18 @@ function resolveMissingOptionalDeps(developRoot, projectPath) {
1039
1039
  dependenciesByIntegration
1040
1040
  };
1041
1041
  }
1042
- async function installOptionalDependencies(developRoot, projectPath, plan) {
1042
+ async function installOptionalDependencies(developRoot, projectPath, plan, logger) {
1043
1043
  if (0 === plan.dependencies.length) return;
1044
1044
  const pm = detectPackageManagerFromEnv();
1045
1045
  const stdio = 'development' === process.env.EXTENSION_ENV ? 'inherit' : 'ignore';
1046
- console.log(foundSpecializedDependencies(plan.integrations.length));
1046
+ logger.log(foundSpecializedDependencies(plan.integrations.length));
1047
1047
  for (const [index, integration] of plan.integrations.entries()){
1048
1048
  const missingDeps = plan.dependenciesByIntegration[integration] || [];
1049
1049
  const baseMessage = installingProjectIntegrations([
1050
1050
  integration
1051
1051
  ]);
1052
1052
  const installMessage = baseMessage.replace('⏵⏵⏵ ', `⏵⏵⏵ [${index + 1}/${plan.integrations.length}] `);
1053
- console.log(installMessage);
1053
+ logger.log(installMessage);
1054
1054
  if (0 === missingDeps.length) continue;
1055
1055
  const args = buildOptionalInstallArgs(pm, missingDeps, developRoot);
1056
1056
  const result = await runInstall(pm, args, {
@@ -1060,37 +1060,43 @@ async function installOptionalDependencies(developRoot, projectPath, plan) {
1060
1060
  if (0 !== result.code) throw new Error(installingDependenciesFailed(pm, args, result.code));
1061
1061
  }
1062
1062
  }
1063
- async function installInternalDependencies(projectPath) {
1063
+ async function installInternalDependencies(projectPath, logger) {
1064
1064
  if ('test' === process.env.EXTENSION_ENV || 'true' === process.env.EXTENSION_SKIP_INTERNAL_INSTALL) return;
1065
1065
  const developRoot = resolveDevelopRoot(projectPath);
1066
1066
  if (!developRoot) return;
1067
1067
  const optionalPlan = resolveMissingOptionalDeps(developRoot, projectPath);
1068
- if (optionalPlan.dependencies.length > 0) await installOptionalDependencies(developRoot, projectPath, optionalPlan);
1068
+ if (optionalPlan.dependencies.length > 0) await installOptionalDependencies(developRoot, projectPath, optionalPlan, logger);
1069
1069
  }
1070
- async function extensionCreate(projectNameInput, { cliVersion, template = "javascript", install = false }) {
1070
+ async function extensionCreate(projectNameInput, { cliVersion, template = "javascript", install = false, logger = console }) {
1071
1071
  if (!projectNameInput) throw new Error(noProjectName());
1072
1072
  if (projectNameInput.startsWith('http')) throw new Error(noUrlAllowed());
1073
1073
  const projectPath = external_path_namespaceObject.isAbsolute(projectNameInput) ? projectNameInput : external_path_namespaceObject.join(process.cwd(), projectNameInput);
1074
1074
  const projectName = external_path_namespaceObject.basename(projectPath);
1075
1075
  try {
1076
- await createDirectory(projectPath, projectName);
1077
- await importExternalTemplate(projectPath, projectName, template);
1076
+ await createDirectory(projectPath, projectName, logger);
1077
+ await importExternalTemplate(projectPath, projectName, template, logger);
1078
1078
  await overridePackageJson(projectPath, projectName, {
1079
1079
  template,
1080
1080
  cliVersion
1081
- });
1081
+ }, logger);
1082
1082
  if (install) {
1083
- await installDependencies(projectPath, projectName);
1084
- await installInternalDependencies(projectPath);
1083
+ await installDependencies(projectPath, projectName, logger);
1084
+ await installInternalDependencies(projectPath, logger);
1085
1085
  }
1086
- await writeReadmeFile(projectPath, projectName);
1087
- await writeManifestJson(projectPath, projectName);
1088
- await initializeGitRepository(projectPath, projectName);
1089
- await writeGitignore(projectPath);
1090
- await setupBuiltInTests(projectPath, projectName);
1091
- if (isTypeScriptTemplate(template)) await generateExtensionTypes(projectPath, projectName);
1086
+ await writeReadmeFile(projectPath, projectName, logger);
1087
+ await writeManifestJson(projectPath, projectName, logger);
1088
+ await initializeGitRepository(projectPath, projectName, logger);
1089
+ await writeGitignore(projectPath, logger);
1090
+ await setupBuiltInTests(projectPath, projectName, logger);
1091
+ if (isTypeScriptTemplate(template)) await generateExtensionTypes(projectPath, projectName, logger);
1092
1092
  const successfulInstall = await successfullInstall(projectPath, projectName, Boolean(install));
1093
- console.log(successfulInstall);
1093
+ logger.log(successfulInstall);
1094
+ return {
1095
+ projectPath,
1096
+ projectName,
1097
+ template,
1098
+ depsInstalled: install
1099
+ };
1094
1100
  } catch (error) {
1095
1101
  throw error;
1096
1102
  }
package/dist/module.d.ts CHANGED
@@ -1,6 +1,17 @@
1
+ export interface CreateLogger {
2
+ log: (...args: any[]) => void;
3
+ error: (...args: any[]) => void;
4
+ }
1
5
  export interface CreateOptions {
2
6
  template?: string;
3
7
  install?: boolean;
4
8
  cliVersion?: string;
9
+ logger?: CreateLogger;
10
+ }
11
+ export interface CreateResult {
12
+ projectPath: string;
13
+ projectName: string;
14
+ template: string;
15
+ depsInstalled: boolean;
5
16
  }
6
- export declare function extensionCreate(projectNameInput: string | undefined, { cliVersion, template, install }: CreateOptions): Promise<void>;
17
+ export declare function extensionCreate(projectNameInput: string | undefined, { cliVersion, template, install, logger }: CreateOptions): Promise<CreateResult>;
@@ -1 +1,4 @@
1
- export declare function createDirectory(projectPath: string, projectName: string): Promise<void>;
1
+ export declare function createDirectory(projectPath: string, projectName: string, logger: {
2
+ log(...args: any[]): void;
3
+ error(...args: any[]): void;
4
+ }): Promise<void>;
@@ -1 +1,4 @@
1
- export declare function generateExtensionTypes(projectPath: string, projectName: string): Promise<void>;
1
+ export declare function generateExtensionTypes(projectPath: string, projectName: string, logger: {
2
+ log(...args: any[]): void;
3
+ error(...args: any[]): void;
4
+ }): Promise<void>;
@@ -1 +1,4 @@
1
- export declare function importExternalTemplate(projectPath: string, projectName: string, template: string): Promise<void>;
1
+ export declare function importExternalTemplate(projectPath: string, projectName: string, template: string, logger: {
2
+ log(...args: any[]): void;
3
+ error(...args: any[]): void;
4
+ }): Promise<void>;
@@ -1 +1,4 @@
1
- export declare function initializeGitRepository(projectPath: string, projectName: string): Promise<void>;
1
+ export declare function initializeGitRepository(projectPath: string, projectName: string, logger: {
2
+ log(...args: any[]): void;
3
+ error(...args: any[]): void;
4
+ }): Promise<void>;
@@ -1 +1,4 @@
1
- export declare function installDependencies(projectPath: string, projectName: string): Promise<void>;
1
+ export declare function installDependencies(projectPath: string, projectName: string, logger: {
2
+ log(...args: any[]): void;
3
+ error(...args: any[]): void;
4
+ }): Promise<void>;
@@ -6,7 +6,10 @@ type OptionalDepsPlan = {
6
6
  declare function resolveDevelopRoot(projectPath: string): string | null;
7
7
  declare function detectOptionalDependencies(projectPath: string): OptionalDepsPlan;
8
8
  declare function resolveMissingOptionalDeps(developRoot: string, projectPath: string): OptionalDepsPlan;
9
- export declare function installInternalDependencies(projectPath: string): Promise<void>;
9
+ export declare function installInternalDependencies(projectPath: string, logger: {
10
+ log(...args: any[]): void;
11
+ error(...args: any[]): void;
12
+ }): Promise<void>;
10
13
  export declare const __testing__: {
11
14
  resolveDevelopRoot: typeof resolveDevelopRoot;
12
15
  resolveMissingOptionalDeps: typeof resolveMissingOptionalDeps;
@@ -1 +1,4 @@
1
- export declare function setupBuiltInTests(projectPath: string, projectName: string): Promise<void>;
1
+ export declare function setupBuiltInTests(projectPath: string, projectName: string, logger: {
2
+ log(...args: any[]): void;
3
+ error(...args: any[]): void;
4
+ }): Promise<void>;
@@ -1 +1,4 @@
1
- export declare function writeGitignore(projectPath: string): Promise<void>;
1
+ export declare function writeGitignore(projectPath: string, logger: {
2
+ log(...args: any[]): void;
3
+ error(...args: any[]): void;
4
+ }): Promise<void>;
@@ -1 +1,4 @@
1
- export declare function writeManifestJson(projectPath: string, projectName: string): Promise<void>;
1
+ export declare function writeManifestJson(projectPath: string, projectName: string, logger: {
2
+ log(...args: any[]): void;
3
+ error(...args: any[]): void;
4
+ }): Promise<void>;
@@ -3,5 +3,8 @@ interface OverridePackageJsonOptions {
3
3
  template?: string;
4
4
  cliVersion?: string;
5
5
  }
6
- export declare function overridePackageJson(projectPath: string, projectName: string, { template, cliVersion }: OverridePackageJsonOptions): Promise<void>;
6
+ export declare function overridePackageJson(projectPath: string, projectName: string, { template, cliVersion }: OverridePackageJsonOptions, logger: {
7
+ log(...args: any[]): void;
8
+ error(...args: any[]): void;
9
+ }): Promise<void>;
7
10
  export {};
@@ -1 +1,4 @@
1
- export declare function writeReadmeFile(projectPath: string, projectName: string): Promise<void>;
1
+ export declare function writeReadmeFile(projectPath: string, projectName: string, logger: {
2
+ log(...args: any[]): void;
3
+ error(...args: any[]): void;
4
+ }): Promise<void>;
package/package.json CHANGED
@@ -24,7 +24,7 @@
24
24
  "dist"
25
25
  ],
26
26
  "name": "extension-create",
27
- "version": "3.13.0",
27
+ "version": "3.13.3",
28
28
  "description": "The standalone extension creation engine for Extension.js",
29
29
  "author": {
30
30
  "name": "Cezar Augusto",
@@ -76,8 +76,7 @@
76
76
  "axios": "^1.15.0",
77
77
  "cross-spawn": "^7.0.6",
78
78
  "go-git-it": "^5.1.5",
79
- "pintor": "0.3.0",
80
- "tiny-glob": "^0.2.9"
79
+ "pintor": "0.3.0"
81
80
  },
82
81
  "devDependencies": {
83
82
  "@biomejs/biome": "^2.2.4",