@kernelminds/create-enclave 0.0.2 → 0.0.4
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/create-enclave.js +3 -2
- package/package.json +1 -1
- package/server/golang/go.mod +12 -11
- package/server/golang/go.sum +24 -19
- package/server/golang/server.go +10 -1
- package/server/node/server.ts +5 -0
- package/src/create-enclave.ts +3 -2
- package/src/package.ts +59 -10
package/bin/create-enclave.js
CHANGED
|
@@ -65,7 +65,7 @@ var prompt = require("@inquirer/prompts");
|
|
|
65
65
|
var crypto = require("crypto");
|
|
66
66
|
var applicationIdentifier = "scailo-test-enclave";
|
|
67
67
|
var applicationName = "Scailo Test Enclave";
|
|
68
|
-
var version = "0.0.
|
|
68
|
+
var version = "0.0.0";
|
|
69
69
|
var rootFolder = path.dirname(__dirname);
|
|
70
70
|
var selectedEnclaveRuntime = "node";
|
|
71
71
|
var selectedEntryPointManagement = "platform_redirect";
|
|
@@ -256,7 +256,8 @@ function setupDependenciesForNode() {
|
|
|
256
256
|
"dotenv",
|
|
257
257
|
"redis@4.7.0",
|
|
258
258
|
"@fastify/cookie@9.4.0",
|
|
259
|
-
"pino-pretty@13.1.2"
|
|
259
|
+
"pino-pretty@13.1.2",
|
|
260
|
+
"@fastify/compress@7.0.3"
|
|
260
261
|
];
|
|
261
262
|
return [4 /*yield*/, spawnChildProcess("npm", __spreadArray(__spreadArray(["install"], npmDependencies, true), ["--save"], false))];
|
|
262
263
|
case 2:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kernelminds/create-enclave",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "🚀 The official Scailo starter framework. Instantly scaffold a complete, dependency-ready starter project that could be deployed as an application or a widget on Scailo.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": "https://github.com/scailo/create-enclave",
|
package/server/golang/go.mod
CHANGED
|
@@ -3,48 +3,49 @@ module enclave
|
|
|
3
3
|
go 1.24.4
|
|
4
4
|
|
|
5
5
|
require (
|
|
6
|
+
github.com/gin-contrib/gzip v1.2.5
|
|
6
7
|
github.com/gin-gonic/gin v1.11.0
|
|
7
8
|
github.com/go-redis/redis v6.15.9+incompatible
|
|
8
9
|
github.com/gorilla/securecookie v1.1.2
|
|
9
10
|
github.com/joho/godotenv v1.5.1
|
|
10
|
-
github.com/scailo/go-sdk v0.1.
|
|
11
|
+
github.com/scailo/go-sdk v0.1.12
|
|
11
12
|
google.golang.org/grpc v1.77.0
|
|
12
13
|
google.golang.org/protobuf v1.36.10
|
|
13
14
|
)
|
|
14
15
|
|
|
15
16
|
require (
|
|
16
17
|
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.9-20250912141014-52f32327d4b0.1 // indirect
|
|
17
|
-
github.com/bytedance/
|
|
18
|
+
github.com/bytedance/gopkg v0.1.3 // indirect
|
|
19
|
+
github.com/bytedance/sonic v1.14.1 // indirect
|
|
18
20
|
github.com/bytedance/sonic/loader v0.3.0 // indirect
|
|
19
21
|
github.com/cloudwego/base64x v0.1.6 // indirect
|
|
20
|
-
github.com/gabriel-vasile/mimetype v1.4.
|
|
22
|
+
github.com/gabriel-vasile/mimetype v1.4.10 // indirect
|
|
21
23
|
github.com/gin-contrib/sse v1.1.0 // indirect
|
|
22
24
|
github.com/go-playground/locales v0.14.1 // indirect
|
|
23
25
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
|
24
|
-
github.com/go-playground/validator/v10 v10.
|
|
25
|
-
github.com/goccy/go-json v0.10.
|
|
26
|
+
github.com/go-playground/validator/v10 v10.28.0 // indirect
|
|
27
|
+
github.com/goccy/go-json v0.10.5 // indirect
|
|
26
28
|
github.com/goccy/go-yaml v1.18.0 // indirect
|
|
27
29
|
github.com/json-iterator/go v1.1.12 // indirect
|
|
28
30
|
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
|
29
31
|
github.com/leodido/go-urn v1.4.0 // indirect
|
|
30
32
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
31
|
-
github.com/modern-go/concurrent v0.0.0-
|
|
33
|
+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
|
32
34
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
|
33
35
|
github.com/onsi/ginkgo v1.16.5 // indirect
|
|
34
36
|
github.com/onsi/gomega v1.38.3 // indirect
|
|
35
37
|
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
|
36
38
|
github.com/quic-go/qpack v0.5.1 // indirect
|
|
37
|
-
github.com/quic-go/quic-go v0.
|
|
39
|
+
github.com/quic-go/quic-go v0.55.0 // indirect
|
|
38
40
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
|
39
41
|
github.com/ugorji/go/codec v1.3.0 // indirect
|
|
40
|
-
|
|
41
|
-
golang.org/x/arch v0.20.0 // indirect
|
|
42
|
+
golang.org/x/arch v0.22.0 // indirect
|
|
42
43
|
golang.org/x/crypto v0.43.0 // indirect
|
|
43
|
-
golang.org/x/mod v0.
|
|
44
|
+
golang.org/x/mod v0.29.0 // indirect
|
|
44
45
|
golang.org/x/net v0.46.1-0.20251013234738-63d1a5100f82 // indirect
|
|
45
46
|
golang.org/x/sync v0.17.0 // indirect
|
|
46
47
|
golang.org/x/sys v0.37.0 // indirect
|
|
47
48
|
golang.org/x/text v0.30.0 // indirect
|
|
48
|
-
golang.org/x/tools v0.
|
|
49
|
+
golang.org/x/tools v0.38.0 // indirect
|
|
49
50
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 // indirect
|
|
50
51
|
)
|
package/server/golang/go.sum
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.9-20250912141014-52f32327d4b0.1 h1:DQLS/rRxLHuugVzjJU5AvOwD57pdFl9he/0O7e5P294=
|
|
2
2
|
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.9-20250912141014-52f32327d4b0.1/go.mod h1:aY3zbkNan5F+cGm9lITDP6oxJIwu0dn9KjJuJjWaHkg=
|
|
3
|
-
github.com/bytedance/
|
|
4
|
-
github.com/bytedance/
|
|
3
|
+
github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M=
|
|
4
|
+
github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM=
|
|
5
|
+
github.com/bytedance/sonic v1.14.1 h1:FBMC0zVz5XUmE4z9wF4Jey0An5FueFvOsTKKKtwIl7w=
|
|
6
|
+
github.com/bytedance/sonic v1.14.1/go.mod h1:gi6uhQLMbTdeP0muCnrjHLeCUPyb70ujhnNlhOylAFc=
|
|
5
7
|
github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA=
|
|
6
8
|
github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI=
|
|
7
9
|
github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M=
|
|
@@ -12,8 +14,10 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
|
|
|
12
14
|
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
|
13
15
|
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
|
14
16
|
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
|
15
|
-
github.com/gabriel-vasile/mimetype v1.4.
|
|
16
|
-
github.com/gabriel-vasile/mimetype v1.4.
|
|
17
|
+
github.com/gabriel-vasile/mimetype v1.4.10 h1:zyueNbySn/z8mJZHLt6IPw0KoZsiQNszIpU+bX4+ZK0=
|
|
18
|
+
github.com/gabriel-vasile/mimetype v1.4.10/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
|
|
19
|
+
github.com/gin-contrib/gzip v1.2.5 h1:fIZs0S+l17pIu1P5XRJOo/YNqfIuPCrZZ3TWB7pjckI=
|
|
20
|
+
github.com/gin-contrib/gzip v1.2.5/go.mod h1:aomRgR7ftdZV3uWY0gW/m8rChfxau0n8YVvwlOHONzw=
|
|
17
21
|
github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w=
|
|
18
22
|
github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM=
|
|
19
23
|
github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk=
|
|
@@ -28,13 +32,13 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o
|
|
|
28
32
|
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
|
29
33
|
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
|
30
34
|
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
|
31
|
-
github.com/go-playground/validator/v10 v10.
|
|
32
|
-
github.com/go-playground/validator/v10 v10.
|
|
35
|
+
github.com/go-playground/validator/v10 v10.28.0 h1:Q7ibns33JjyW48gHkuFT91qX48KG0ktULL6FgHdG688=
|
|
36
|
+
github.com/go-playground/validator/v10 v10.28.0/go.mod h1:GoI6I1SjPBh9p7ykNE/yj3fFYbyDOpwMn5KXd+m2hUU=
|
|
33
37
|
github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg=
|
|
34
38
|
github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
|
|
35
39
|
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
|
36
|
-
github.com/goccy/go-json v0.10.
|
|
37
|
-
github.com/goccy/go-json v0.10.
|
|
40
|
+
github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
|
|
41
|
+
github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
|
38
42
|
github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
|
|
39
43
|
github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
|
|
40
44
|
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
|
@@ -69,8 +73,9 @@ github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
|
|
|
69
73
|
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
|
|
70
74
|
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
|
71
75
|
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
|
72
|
-
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
|
|
73
76
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
|
77
|
+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
|
78
|
+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
|
74
79
|
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
|
75
80
|
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
|
76
81
|
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
|
@@ -90,8 +95,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
|
|
|
90
95
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
|
91
96
|
github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI=
|
|
92
97
|
github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg=
|
|
93
|
-
github.com/quic-go/quic-go v0.
|
|
94
|
-
github.com/quic-go/quic-go v0.
|
|
98
|
+
github.com/quic-go/quic-go v0.55.0 h1:zccPQIqYCXDt5NmcEabyYvOnomjs8Tlwl7tISjJh9Mk=
|
|
99
|
+
github.com/quic-go/quic-go v0.55.0/go.mod h1:DR51ilwU1uE164KuWXhinFcKWGlEjzys2l8zUl5Ss1U=
|
|
95
100
|
github.com/scailo/go-sdk v0.1.10 h1:nV46RWJrvL8GkewGoUksTDbumrTDxXDinnEpIbsWtzw=
|
|
96
101
|
github.com/scailo/go-sdk v0.1.10/go.mod h1:woakCIDaphiNoAXNZXj6YiG6ZDK0Sak+qDcuQMxd3B8=
|
|
97
102
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
@@ -121,20 +126,20 @@ go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6
|
|
|
121
126
|
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
|
|
122
127
|
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
|
|
123
128
|
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
|
|
124
|
-
go.uber.org/mock v0.
|
|
125
|
-
go.uber.org/mock v0.
|
|
129
|
+
go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y=
|
|
130
|
+
go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU=
|
|
126
131
|
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
|
|
127
132
|
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
|
128
|
-
golang.org/x/arch v0.
|
|
129
|
-
golang.org/x/arch v0.
|
|
133
|
+
golang.org/x/arch v0.22.0 h1:c/Zle32i5ttqRXjdLyyHZESLD/bB90DCU1g9l/0YBDI=
|
|
134
|
+
golang.org/x/arch v0.22.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A=
|
|
130
135
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
|
131
136
|
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
|
132
137
|
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
|
133
138
|
golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04=
|
|
134
139
|
golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0=
|
|
135
140
|
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|
136
|
-
golang.org/x/mod v0.
|
|
137
|
-
golang.org/x/mod v0.
|
|
141
|
+
golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA=
|
|
142
|
+
golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w=
|
|
138
143
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
139
144
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
140
145
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
@@ -166,8 +171,8 @@ golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM=
|
|
|
166
171
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
167
172
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
|
168
173
|
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
|
169
|
-
golang.org/x/tools v0.
|
|
170
|
-
golang.org/x/tools v0.
|
|
174
|
+
golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ=
|
|
175
|
+
golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs=
|
|
171
176
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
172
177
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
173
178
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
package/server/golang/server.go
CHANGED
|
@@ -13,6 +13,7 @@ import (
|
|
|
13
13
|
"sync"
|
|
14
14
|
"time"
|
|
15
15
|
|
|
16
|
+
"github.com/gin-contrib/gzip"
|
|
16
17
|
"github.com/gin-gonic/gin"
|
|
17
18
|
"github.com/go-redis/redis"
|
|
18
19
|
"github.com/scailo/go-sdk"
|
|
@@ -228,11 +229,16 @@ func getGRPCConnection() *grpc.ClientConn {
|
|
|
228
229
|
creds = grpc.WithTransportCredentials(credentials.NewClientTLSFromCert(nil, getServerURL()))
|
|
229
230
|
}
|
|
230
231
|
|
|
232
|
+
// Max Message Size is 64MB
|
|
233
|
+
const maxMessageSize = 64 * 1024 * 1024
|
|
231
234
|
conn, err := grpc.NewClient(getServerURL(), creds, grpc.WithKeepaliveParams(keepalive.ClientParameters{
|
|
232
235
|
Time: 10 * time.Second, // Ping every 10s if idle
|
|
233
236
|
Timeout: time.Second, // Wait 1s for response
|
|
234
237
|
PermitWithoutStream: true, // Ping even if there are no active RPCs
|
|
235
|
-
})
|
|
238
|
+
}), grpc.WithDefaultCallOptions(
|
|
239
|
+
grpc.MaxCallRecvMsgSize(maxMessageSize),
|
|
240
|
+
grpc.MaxCallSendMsgSize(maxMessageSize),
|
|
241
|
+
))
|
|
236
242
|
if err != nil {
|
|
237
243
|
log.Fatalf("did not connect: %v", err)
|
|
238
244
|
}
|
|
@@ -375,6 +381,9 @@ func main() {
|
|
|
375
381
|
// Initialize Gin
|
|
376
382
|
router := gin.Default()
|
|
377
383
|
|
|
384
|
+
// Enable gzip compression with default compression level
|
|
385
|
+
router.Use(gzip.Gzip(gzip.DefaultCompression))
|
|
386
|
+
|
|
378
387
|
// --- 1. Register Static Routes ---
|
|
379
388
|
router.Static(fmt.Sprintf("%s/resources/dist", enclavePrefix), filepath.Join("resources", "dist"))
|
|
380
389
|
|
package/server/node/server.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Fastify, { FastifyReply, FastifyRequest } from "fastify";
|
|
2
|
+
import fastifyCompress from '@fastify/compress';
|
|
2
3
|
import fastifyStatic from "@fastify/static";
|
|
3
4
|
import * as path from "path";
|
|
4
5
|
import * as fs from "fs";
|
|
@@ -89,6 +90,10 @@ const server = Fastify({
|
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
92
|
});
|
|
93
|
+
server.register(fastifyCompress, {
|
|
94
|
+
global: true,
|
|
95
|
+
threshold: 1024,
|
|
96
|
+
});
|
|
92
97
|
const loginClient = getScailoClientForLoginService(transport);
|
|
93
98
|
const vaultClient = getScailoClientForVaultService(transport);
|
|
94
99
|
const purchaseOrdersClient = getScailoClientForPurchasesOrdersService(transport);
|
package/src/create-enclave.ts
CHANGED
|
@@ -10,7 +10,7 @@ import crypto = require("crypto");
|
|
|
10
10
|
let applicationIdentifier = "scailo-test-enclave";
|
|
11
11
|
let applicationName = "Scailo Test Enclave";
|
|
12
12
|
|
|
13
|
-
let version = "0.0.
|
|
13
|
+
let version = "0.0.0";
|
|
14
14
|
const rootFolder = path.dirname(__dirname);
|
|
15
15
|
|
|
16
16
|
type enclaveRuntime = "node" | "golang" | "python";
|
|
@@ -160,7 +160,8 @@ async function setupDependenciesForNode() {
|
|
|
160
160
|
"dotenv",
|
|
161
161
|
"redis@4.7.0",
|
|
162
162
|
"@fastify/cookie@9.4.0",
|
|
163
|
-
"pino-pretty@13.1.2"
|
|
163
|
+
"pino-pretty@13.1.2",
|
|
164
|
+
"@fastify/compress@7.0.3"
|
|
164
165
|
]
|
|
165
166
|
|
|
166
167
|
await spawnChildProcess("npm", ["install", ...npmDependencies, "--save"]);
|
package/src/package.ts
CHANGED
|
@@ -9,19 +9,61 @@ import semver = require("semver");
|
|
|
9
9
|
import AdmZip = require("adm-zip");
|
|
10
10
|
import favicons = require("favicons");
|
|
11
11
|
|
|
12
|
+
let manifestFile = "MANIFEST.yaml";
|
|
13
|
+
let distFolder = "dist";
|
|
14
|
+
let nextVersion = "";
|
|
15
|
+
|
|
12
16
|
async function loadManifest() {
|
|
13
|
-
const file = fs.readFileSync(
|
|
17
|
+
const file = fs.readFileSync(manifestFile, 'utf8')
|
|
14
18
|
return YAML.parse(file);
|
|
15
19
|
}
|
|
16
20
|
|
|
21
|
+
// Supports both --key=value and --key value formats
|
|
22
|
+
function parseArgs() {
|
|
23
|
+
const args = process.argv.slice(2);
|
|
24
|
+
|
|
25
|
+
for (let i = 0; i < args.length; i++) {
|
|
26
|
+
const arg = args[i] || "";
|
|
27
|
+
let key = "", value = "";
|
|
28
|
+
|
|
29
|
+
// Check for the "=" syntax
|
|
30
|
+
if (arg.includes('=')) {
|
|
31
|
+
const parts = arg.split('=');
|
|
32
|
+
key = parts[0] || "";
|
|
33
|
+
value = parts[1] || "";
|
|
34
|
+
} else {
|
|
35
|
+
key = arg;
|
|
36
|
+
value = args[i + 1] || "";
|
|
37
|
+
// Move index forward because we are consuming the next element as a value
|
|
38
|
+
i++;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Helper to check for specific flags
|
|
42
|
+
const isFlag = (long: string, short: string) => key === long || key === short;
|
|
43
|
+
|
|
44
|
+
if (isFlag('--manifest', '-m')) {
|
|
45
|
+
manifestFile = value || "MANIFEST.yaml";
|
|
46
|
+
} else if (isFlag('--dist', '-d')) {
|
|
47
|
+
distFolder = value || "dist";
|
|
48
|
+
} else if (isFlag('--version', '-v')) {
|
|
49
|
+
nextVersion = value || "";
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
17
54
|
async function acceptUserInputs({ existingVersion }: { existingVersion: string }) {
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
55
|
+
let userEnteredVersion = "";
|
|
56
|
+
if (nextVersion.length > 0) {
|
|
57
|
+
userEnteredVersion = nextVersion;
|
|
58
|
+
} else {
|
|
59
|
+
nextVersion = semver.inc(existingVersion, "patch") || "0.0.1";
|
|
60
|
+
userEnteredVersion = (await prompt.input({
|
|
61
|
+
message: "Current version: " + existingVersion + ". Enter the Next Version (Semver Format): ",
|
|
62
|
+
default: nextVersion,
|
|
63
|
+
required: true,
|
|
64
|
+
validate: input => input.length > 0
|
|
65
|
+
})).trim();
|
|
66
|
+
}
|
|
25
67
|
|
|
26
68
|
if (!semver.valid(userEnteredVersion)) {
|
|
27
69
|
console.log("Invalid semver: " + userEnteredVersion);
|
|
@@ -123,6 +165,7 @@ interface MANIFEST {
|
|
|
123
165
|
|
|
124
166
|
|
|
125
167
|
async function main() {
|
|
168
|
+
parseArgs();
|
|
126
169
|
let manifest: MANIFEST = await loadManifest();
|
|
127
170
|
let userEnteredVersion = await acceptUserInputs({ existingVersion: manifest.app_version });
|
|
128
171
|
if (manifest.entry_point_management !== "platform_redirect" && manifest.entry_point_management !== "direct_url") {
|
|
@@ -131,7 +174,7 @@ async function main() {
|
|
|
131
174
|
}
|
|
132
175
|
|
|
133
176
|
manifest.app_version = userEnteredVersion;
|
|
134
|
-
fs.writeFileSync(
|
|
177
|
+
fs.writeFileSync(manifestFile, YAML.stringify(manifest, { indent: 4 }));
|
|
135
178
|
|
|
136
179
|
// Create the favicon here
|
|
137
180
|
await generateSimpleFavicon({ sourceFile: path.join("resources", "dist", "img", "logo.png"), outputDir: path.join("resources", "dist", "img"), fileName: "favicon.ico" });
|
|
@@ -139,7 +182,7 @@ async function main() {
|
|
|
139
182
|
await spawnChildProcess("npm", ["run", "css:build"]);
|
|
140
183
|
await spawnChildProcess("npm", ["run", "ui:build"]);
|
|
141
184
|
fs.mkdirSync(path.join("artifacts", "resources"), { recursive: true });
|
|
142
|
-
fs.copyFileSync(
|
|
185
|
+
fs.copyFileSync(manifestFile, path.join("artifacts", "MANIFEST.yaml"));
|
|
143
186
|
|
|
144
187
|
fs.cpSync(path.join("resources", "dist"), path.join("artifacts", "resources", "dist"), { recursive: true });
|
|
145
188
|
|
|
@@ -161,6 +204,8 @@ async function main() {
|
|
|
161
204
|
}
|
|
162
205
|
}
|
|
163
206
|
|
|
207
|
+
const currDir = process.cwd();
|
|
208
|
+
|
|
164
209
|
process.chdir("artifacts");
|
|
165
210
|
// Zip the folder
|
|
166
211
|
const zip = new AdmZip();
|
|
@@ -168,9 +213,13 @@ async function main() {
|
|
|
168
213
|
zip.addLocalFolder(process.cwd());
|
|
169
214
|
process.chdir("..");
|
|
170
215
|
|
|
216
|
+
fs.rmSync(path.join(distFolder), { recursive: true, force: true });
|
|
217
|
+
fs.mkdirSync(path.join(distFolder), { recursive: true });
|
|
218
|
+
process.chdir(distFolder);
|
|
171
219
|
const outputName = `${manifest.app_name}.enc`;
|
|
172
220
|
|
|
173
221
|
zip.writeZip(outputName);
|
|
222
|
+
process.chdir(currDir);
|
|
174
223
|
fs.rmSync(path.join("artifacts"), { recursive: true });
|
|
175
224
|
|
|
176
225
|
console.log(`Successfully package: ${outputName} (${userEnteredVersion})`);
|