@@ -170,21 +170,8 @@ async function main (argv) {
170170 ...templates [ templateName ] ?. deps ?? [ ]
171171 ]
172172
173- // remove eventually
174- let isSocket05orGreater = true
175-
176173 try {
177- const { stdout } = await exec ( 'ssc --version' )
178-
179- try {
180- const sscVersion = stdout . trim ( ) . split ( ' ' ) [ 0 ]
181- // split by dot
182- . split ( '.' )
183- // convert to numbers
184- . map ( s => parseInt ( s ) )
185-
186- isSocket05orGreater = sscVersion [ 0 ] >= 1 || sscVersion [ 1 ] >= 5
187- } catch ( err ) { }
174+ await exec ( 'ssc --version' )
188175 } catch ( err ) {
189176 process . stdout . write ( 'Installing \'@socketsupply/socket\' locally (ssc not in PATH)\n' )
190177 deps . push ( '@socketsupply/socket' )
@@ -210,7 +197,6 @@ async function main (argv) {
210197 }
211198
212199 pkg . type = 'module'
213- pkg . scripts [ 'init-project' ] = `ssc init${ isSocket05orGreater ? ' --config' : '' } `
214200 pkg . scripts . start = 'ssc build -r -o'
215201 pkg . scripts . build = 'ssc build -o'
216202 pkg . scripts . test = 'ssc build -r -o --test=./test/index.js --headless'
@@ -231,8 +217,8 @@ async function main (argv) {
231217 process . stdout . write ( 'Creating socket files...' )
232218 // Use spawn so we can pass stdio, fte is interactive
233219 const initProcess = spawn (
234- `npm ${ os . platform ( ) === 'win32' ? '.cmd' : '' } ` ,
235- [ 'run ' , 'init-project ' ] ,
220+ 'ssc' ,
221+ [ 'init ' , '--config ' ] ,
236222 {
237223 stdio : [ process . stdin , process . stdout , process . stderr ]
238224 } )
@@ -299,10 +285,6 @@ async function main (argv) {
299285 if ( line . includes ( 'script = ' ) ) {
300286 return line . replace ( line , 'script = "node build.js"' )
301287 }
302- // Socket 0.5 compatibility
303- if ( isSocket05orGreater && line . includes ( 'forward_arguments = ' ) ) {
304- return line . replace ( line , 'forward_arguments = true' )
305- }
306288 return line
307289 } ) . join ( '\n' )
308290
0 commit comments