@@ -91,6 +91,8 @@ type ConfigurationFile = {
91
91
version : string ;
92
92
description : string ;
93
93
license : string ;
94
+ author ?: string ;
95
+ repository ?: unknown ;
94
96
exports ?: string | Record < string , string > ;
95
97
imports ?: Record < string , string > ;
96
98
} ;
@@ -107,13 +109,10 @@ const configurationFile: ConfigurationFile = JSON.parse(Deno.readTextFileSync('d
107
109
108
110
const dependencies = await getExportsDependencies ( ) ;
109
111
110
- const scopedName = require ( configurationFile . name ) ;
111
- const name = require ( scopedName . split ( '/' ) [ 1 ] ) ;
112
-
113
112
const manifest = ( ( ) => {
114
113
if ( type === 'jsr' ) {
115
114
return {
116
- name : scopedName ,
115
+ name : require ( configurationFile . name ) ,
117
116
version : require ( configurationFile . version ) ,
118
117
license : require ( configurationFile . license ) ,
119
118
exports : require ( configurationFile . exports ) ,
@@ -127,12 +126,12 @@ const manifest = (() => {
127
126
}
128
127
if ( type === 'npm' ) {
129
128
return {
130
- name : scopedName ,
129
+ name : require ( configurationFile . name ) ,
131
130
version : require ( configurationFile . version ) ,
132
131
description : require ( configurationFile . description ) ,
133
132
license : require ( configurationFile . license ) ,
134
- author : 'Quentin Adam' ,
135
- repository : { type : 'git' , url : `git+https://github.com/quentinadam/deno- ${ name } .git` } ,
133
+ author : configurationFile . author ,
134
+ repository : configurationFile . repository ,
136
135
type : 'module' ,
137
136
exports : ( ( exports ) => {
138
137
const replaceFn = ( path : string ) => path . replace ( / ^ \. \/ s r c \/ / , './dist/' ) . replace ( / \. t s $ / , '.js' ) ;
0 commit comments