@@ -121,29 +121,30 @@ private function checkComposerJson(): bool
121
121
$ this ->error ('Symlinked packages are not supported. Please remove them from your composer.json. ' );
122
122
123
123
return false ;
124
- } elseif ($ repository ['type ' ] === 'composer ' ) {
125
- if (! $ this ->checkComposerPackageAuth ($ repository ['url ' ])) {
126
- $ this ->error ('Cannot authenticate with ' .$ repository ['url ' ].'. ' );
127
- $ this ->error ('Go to ' .$ this ->baseUrl ().' and add your credentials for ' .$ repository ['url ' ].'. ' );
128
-
129
- return false ;
130
- }
131
124
}
125
+ // elseif ($repository['type'] === 'composer') {
126
+ // if (! $this->checkComposerPackageAuth($repository['url'])) {
127
+ // $this->error('Cannot authenticate with '.$repository['url'].'.');
128
+ // $this->error('Go to '.$this->baseUrl().' and add your composer package credentials.');
129
+ //
130
+ // return false;
131
+ // }
132
+ // }
132
133
}
133
134
134
135
return true ;
135
136
}
136
137
137
- private function checkComposerPackageAuth (string $ repositoryUrl ): bool
138
- {
139
- $ host = parse_url ($ repositoryUrl , PHP_URL_HOST );
140
- $ this ->line ('Checking ' .$ host .' authentication… ' );
141
-
142
- return Http::acceptJson ()
143
- ->withToken (config ('nativephp-internal.zephpyr.token ' ))
144
- ->get ($ this ->baseUrl ().'api/v1/project/ ' .$ this ->key .'/composer/auth/ ' .$ host )
145
- ->successful ();
146
- }
138
+ // private function checkComposerPackageAuth(string $repositoryUrl): bool
139
+ // {
140
+ // $host = parse_url($repositoryUrl, PHP_URL_HOST);
141
+ // $this->line('Checking '.$host.' authentication…');
142
+ //
143
+ // return Http::acceptJson()
144
+ // ->withToken(config('nativephp-internal.zephpyr.token'))
145
+ // ->get($this->baseUrl().'api/v1/project/'.$this->key.'/composer/auth/'.$host)
146
+ // ->successful();
147
+ // }
147
148
148
149
private function addFilesToZip (ZipArchive $ zip ): void
149
150
{
@@ -165,9 +166,12 @@ private function addFilesToZip(ZipArchive $zip): void
165
166
166
167
$ this ->finderToZip ($ app , $ zip );
167
168
168
- // Add .env file
169
+ // Add .env file manually because Finder ignores hidden files
169
170
$ zip ->addFile (base_path ('.env ' ), '.env ' );
170
171
172
+ // Add auth.json file to support private packages
173
+ $ zip ->addFile (base_path ('auth.json ' ), 'auth.json ' );
174
+
171
175
// Custom binaries
172
176
$ binaryPath = Str::replaceStart (base_path ('vendor ' ), '' , config ('nativephp.binary_path ' ));
173
177
0 commit comments