@team-supercharge/oasg 16.7.1-temp-feat-swift-openapi-generator-b75a302f → 16.7.1-temp-feat-swift-openapi-generator-e6ad5e94

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.
package/bin/oasg CHANGED
@@ -552,15 +552,15 @@ function fetchBinary(target) {
552
552
  const generator = target.generator
553
553
  const binary = {};
554
554
 
555
- if (generator.startsWith('http')) {
555
+ if (generator === undefined) {
556
+ return '/dev/null';
557
+ }
558
+ else if (generator.startsWith('http')) {
556
559
  binary.url = generator;
557
560
 
558
561
  const hash = crypto.createHash('sha256').update(binary.url).digest('hex').substring(0, 8);
559
562
  binary.name = `openapi-generator-cli-${hash}.jar`;
560
563
  }
561
- else if (generator === undefined) {
562
- return '/dev/null';
563
- }
564
564
  else {
565
565
  binary.url = `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/${generator}/openapi-generator-cli-${generator}.jar`;
566
566
  binary.name = `openapi-generator-cli-${generator}.jar`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-supercharge/oasg",
3
- "version": "16.7.1-temp-feat-swift-openapi-generator-b75a302f",
3
+ "version": "16.7.1-temp-feat-swift-openapi-generator-e6ad5e94",
4
4
  "description": "Node-based tool to lint OpenAPI documents and generate clients, servers and documentation from them",
5
5
  "author": "Supercharge",
6
6
  "license": "MIT",
@@ -21,4 +21,10 @@ swift-openapi-generator \
21
21
 
22
22
  # Copy Package.swift file
23
23
  cp "$(dirname "$0")/Package.swift" "out/$targetId/"
24
- sed -i '' "s/__PROJECT_NAME__/$projectName/" "out/$targetId/Package.swift"
24
+
25
+ # Replace the placeholder in Package.swift with the project name
26
+ if [[ "$(uname -s)" == "Darwin"* ]]; then
27
+ sed -i '' "s/__PROJECT_NAME__/$projectName/" "out/$targetId/Package.swift"
28
+ else
29
+ sed -i "s/__PROJECT_NAME__/$projectName/" "out/$targetId/Package.swift"
30
+ fi