Skip to content

Commit

Permalink
Clean code: remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
qmonmert committed Jan 5, 2025
1 parent ceee0da commit 9e7008f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 81 deletions.
75 changes: 0 additions & 75 deletions generators/base-application/support/task-type-inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,82 +24,18 @@ export function asWriteFilesSection<Data = ApplicationType<Entity>>(section: Wri
return section;
}

export function asWriteFilesBlock<Data = ApplicationType<Entity>>(section: WriteFileBlock<Data>) {
return section;
}

export function asInitializingTask<E = Entity, A = ApplicationType<E>, const G extends CoreGenerator = CoreGenerator>(
task: (this: G, params: TaskTypes<E, A>['InitializingTaskParam']) => void,
) {
return task;
}

export function asPromptingTask<E = Entity, A = ApplicationType<E>, const G extends CoreGenerator = CoreGenerator>(
task: (this: G, params: TaskTypes<E, A>['PromptingTaskParam']) => void,
) {
return task;
}

export function asConfiguringTask<E = Entity, A = ApplicationType<E>, const G extends CoreGenerator = CoreGenerator>(
task: (this: G, params: TaskTypes<E, A>['ConfiguringTaskParam']) => void,
) {
return task;
}

export function asComposingTask<E = Entity, A = ApplicationType<E>, const G extends CoreGenerator = CoreGenerator>(
task: (this: G, params: TaskTypes<E, A>['ComposingTaskParam']) => void,
) {
return task;
}

export function asLoadingTask<E = Entity, A = ApplicationType<E>, const G extends CoreGenerator = CoreGenerator>(
task: (this: G, params: TaskTypes<E, A>['LoadingTaskParam']) => void,
) {
return task;
}

export function asPreparingTask<E = Entity, A = ApplicationType<E>, const G extends CoreGenerator = CoreGenerator>(
task: (this: G, params: TaskTypes<E, A>['PreparingTaskParam']) => void,
) {
return task;
}

export function asPostPreparingTask<E = Entity, A = ApplicationType<E>, const G extends CoreGenerator = CoreGenerator>(
task: (this: G, params: TaskTypes<E, A>['PostPreparingTaskParam']) => void,
) {
return task;
}

export function asPreparingEachEntityTask<E = Entity, A = ApplicationType<E>, const G extends CoreGenerator = CoreGenerator>(
task: (this: G, params: TaskTypes<E, A>['PreparingEachEntityTaskParam']) => void,
) {
return task;
}

export function asPreparingEachEntityFieldTask<E = Entity, A = ApplicationType<E>, const G extends CoreGenerator = CoreGenerator>(
task: (this: G, params: TaskTypes<E, A>['PreparingEachEntityFieldTaskParam']) => void,
) {
return task;
}

export function asPreparingEachEntityRelationshipTask<E = Entity, A = ApplicationType<E>, const G extends CoreGenerator = CoreGenerator>(
task: (this: G, params: TaskTypes<E, A>['PreparingEachEntityRelationshipTaskParam']) => void,
) {
return task;
}

export function asPostPreparingEachEntityTask<E = Entity, A = ApplicationType<E>, const G extends CoreGenerator = CoreGenerator>(
task: (this: G, params: TaskTypes<E, A>['PostPreparingEachEntityTaskParam']) => void,
) {
return task;
}

export function asDefaultTask<E = Entity, A = ApplicationType<E>, const G extends CoreGenerator = CoreGenerator>(
task: (this: G, params: TaskTypes<E, A>['DefaultTaskParam']) => void,
) {
return task;
}

export function asWritingTask<E = Entity, A = ApplicationType<E>, const G extends CoreGenerator = CoreGenerator>(
task: (this: G, params: TaskTypes<E, A>['WritingTaskParam']) => void,
) {
Expand All @@ -124,14 +60,3 @@ export function asPostWritingEntitiesTask<E = Entity, A = ApplicationType<E>, co
return task;
}

export function asInstallTask<E = Entity, A = ApplicationType<E>, const G extends CoreGenerator = CoreGenerator>(
task: (this: G, params: TaskTypes<E, A>['InstallTaskParam']) => void,
) {
return task;
}

export function asEndTask<E = Entity, A = ApplicationType<E>, const G extends CoreGenerator = CoreGenerator>(
task: (this: G, params: TaskTypes<E, A>['EndTaskParam']) => void,
) {
return task;
}
6 changes: 0 additions & 6 deletions generators/base/support/secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,3 @@ export function createBase64Secret(len?: number | boolean, reproducible = false)
return Buffer.from(createSecret(len)).toString('base64');
}

/**
* Create a strong secret from a timestamp and a base name
*/
export function createSafeSecret(timestamp: number, baseName: string) {
return Buffer.from(`${timestamp}-${baseName}`).toString('base64');
}

0 comments on commit 9e7008f

Please sign in to comment.