openship 0.5.0 → 0.6.1
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/README.md +26 -1
- package/dist/bare-IWS2QHJ3.js +23 -0
- package/dist/{bowser-O3AEA6AN.js → bowser-HNOTPGJO.js} +2 -2
- package/dist/{chunk-5MZ624VX.js → chunk-2GWYYHOR.js} +1 -1
- package/dist/{chunk-BS2AXYZX.js → chunk-2NZSUXOB.js} +647 -214
- package/dist/chunk-3FYIXVX5.js +8051 -0
- package/dist/{chunk-ILFETZOM.js → chunk-3LDWWY7U.js} +21 -1
- package/dist/{chunk-W73X43R7.js → chunk-3NQQXMDR.js} +3 -3
- package/dist/{chunk-NNPEG6HM.js → chunk-3NZICQHF.js} +2 -2
- package/dist/{chunk-OWED2GRM.js → chunk-42WQABXM.js} +2 -2
- package/dist/{chunk-TYVME3XD.js → chunk-6FH4AXVY.js} +20 -3
- package/dist/{chunk-ZCOQJCZO.js → chunk-6ODUBKUB.js} +3 -3
- package/dist/{chunk-DYPH4HCI.js → chunk-AO252K7Z.js} +1 -1
- package/dist/{chunk-IXCHURVK.js → chunk-DOD2BXHQ.js} +4 -4
- package/dist/{chunk-VWPEKOH6.js → chunk-DRK3MEDS.js} +3 -3
- package/dist/{chunk-V7BZMGOT.js → chunk-EMXI4UCU.js} +5 -5
- package/dist/{chunk-RB35YN3J.js → chunk-EW6KB2J7.js} +391 -63
- package/dist/chunk-I3DPMTSF.js +29 -0
- package/dist/{chunk-NXFIRK2Z.js → chunk-IOT5ZX23.js} +573 -459
- package/dist/{chunk-KZOBYJUW.js → chunk-IW2UKBVF.js} +3 -3
- package/dist/{chunk-YWMODKWL.js → chunk-IXM5245F.js} +165 -13
- package/dist/{chunk-KNTJ7PSF.js → chunk-JIMUYEKN.js} +4 -4
- package/dist/{chunk-O6ZZF52V.js → chunk-ONKEYSMY.js} +2 -2
- package/dist/{chunk-UMQP7SYT.js → chunk-OTLSJYAC.js} +1316 -53
- package/dist/{chunk-EI575GHN.js → chunk-PDW4L3NV.js} +3 -3
- package/dist/{chunk-KI2EY3WB.js → chunk-PXKCZB2I.js} +1 -1
- package/dist/{chunk-6APIPIJY.js → chunk-QWHBRY2K.js} +5 -5
- package/dist/{chunk-JLKKYUZA.js → chunk-RRJJGVKE.js} +7 -7
- package/dist/{chunk-6B5YCFFV.js → chunk-RVER2EOO.js} +5 -5
- package/dist/{chunk-Q2CIRAOK.js → chunk-RXQBD4ZY.js} +1 -1
- package/dist/{chunk-6LKHXB6T.js → chunk-TWJCLD4W.js} +48 -13
- package/dist/{chunk-K2RPVGPN.js → chunk-UC7YIEHT.js} +36 -17
- package/dist/{chunk-I6PSTQIR.js → chunk-VDDMADOF.js} +3 -3
- package/dist/{chunk-6PIYRG5I.js → chunk-VZ2ZHPS2.js} +52 -42
- package/dist/{chunk-AVIB7CT7.js → chunk-WNWQBB7F.js} +2 -2
- package/dist/{chunk-FRNAR33O.js → chunk-XZYFZ6A5.js} +3 -3
- package/dist/chunk-YIPMDGG6.js +703 -0
- package/dist/{chunk-RPHRPFEH.js → chunk-ZCFVHA25.js} +1 -1
- package/dist/{chunk-FPRHYBY2.js → chunk-ZFJXPCQP.js} +1 -1
- package/dist/{chunk-JYGD5WSN.js → chunk-ZWLDLTJP.js} +1 -1
- package/dist/{cloud-7QYOGF7F.js → cloud-KRTZ2IL5.js} +3 -3
- package/dist/cloud-M2YLWEXO.js +31 -0
- package/dist/{detect-BAJMY6KM.js → detect-ALF4GXRX.js} +7 -8
- package/dist/{dist-IQJ6H6UZ.js → dist-BM6NPWIH.js} +3 -3
- package/dist/{dist-es-X3B5QYKB.js → dist-es-2YRDXMUU.js} +6 -6
- package/dist/{dist-es-OSNJBLXB.js → dist-es-CCVZEFRZ.js} +5 -5
- package/dist/{dist-es-VNKHQVIB.js → dist-es-IOH6G4GM.js} +4 -4
- package/dist/{dist-es-RYHIPOTN.js → dist-es-JGBPABJI.js} +14 -14
- package/dist/{dist-es-JSTDUS7Q.js → dist-es-KWSMDPIP.js} +6 -6
- package/dist/{dist-es-5DY7K32L.js → dist-es-UYDDOVZ3.js} +6 -6
- package/dist/{dist-es-WV4AMOII.js → dist-es-XUOR4NQN.js} +8 -8
- package/dist/docker-QECQJ5P4.js +32 -0
- package/dist/docker-edge-executor-62N64MGS.js +17 -0
- package/dist/edge-import-SAYTRJLO.js +48 -0
- package/dist/ensure-container-edge-CFSCPGZK.js +32 -0
- package/dist/{event-streams-EHRAKL75.js → event-streams-TR4GAC53.js} +4 -4
- package/dist/{executor-LOYMPU67.js → executor-PT6UEJ5M.js} +8 -8
- package/dist/index.js +1228 -463
- package/dist/{loadSso-46FQRIZS.js → loadSso-UGF4JMRK.js} +10 -10
- package/dist/{local-executor-V7U5VOZW.js → local-executor-WOFZD72X.js} +4 -4
- package/dist/nginx-YOEEFBTE.js +31 -0
- package/dist/node-entry.js +4 -0
- package/dist/{noop-FMMFG2EZ.js → noop-NJ72F46T.js} +3 -3
- package/dist/openresty-lua-WGBO2M3Z.js +81 -0
- package/dist/server/index.js +23276 -8015
- package/dist/server/lua/geo_country.lua +34 -8
- package/dist/server/lua/maxminddb.lua +403 -0
- package/dist/server/lua/mgmt_api.lua +431 -68
- package/dist/server/lua/pipe_stream.lua +52 -39
- package/dist/server/lua/site_logger.lua +236 -30
- package/dist/server/migrations/0082_edge_target_verification.sql +39 -0
- package/dist/server/migrations/0083_service_incident.sql +84 -0
- package/dist/server/migrations/0084_analytics_daily_rollup.sql +72 -0
- package/dist/server/migrations/0085_resource_usage.sql +68 -0
- package/dist/server/migrations/0086_remote_infra_updates.sql +41 -0
- package/dist/server/migrations/0087_server_container_version_columns.sql +17 -0
- package/dist/server/migrations/0088_audit_source_and_settings.sql +27 -0
- package/dist/server/migrations/0089_auto_scan_infra.sql +7 -0
- package/dist/server/migrations/0090_project_collect_paths.sql +18 -0
- package/dist/server/migrations/0091_project_server_id.sql +26 -0
- package/dist/server/migrations/0092_project_internal_alias.sql +13 -0
- package/dist/server/migrations/0093_service_incident_org_index.sql +13 -0
- package/dist/server/migrations/0094_backup_restore_meta.sql +15 -0
- package/dist/server/migrations/0095_backup_restore_cancel.sql +19 -0
- package/dist/server/migrations/0096_backup_policy_retention_defaults.sql +20 -0
- package/dist/server/migrations/0097_update_status_upstream_only.sql +35 -0
- package/dist/server/migrations/meta/_journal.json +112 -0
- package/dist/setup-M2ZDGH3O.js +21 -0
- package/dist/{signin-ITOPKKUB.js → signin-3M3UPB6K.js} +10 -10
- package/dist/{sso-oidc-NON2PD7Y.js → sso-oidc-3VDIYOEJ.js} +10 -10
- package/dist/{sts-HHFFSAY2.js → sts-B3WIYLXR.js} +9 -9
- package/package.json +6 -3
- package/dist/bare-VRGE5MXH.js +0 -23
- package/dist/chunk-CUJXGK7R.js +0 -3167
- package/dist/chunk-EAAGSQXN.js +0 -377
- package/dist/cloud-3M2WZ624.js +0 -30
- package/dist/docker-2NGBRJFJ.js +0 -18
- package/dist/docker-edge-executor-5I4M5QT7.js +0 -13
- package/dist/edge-import-RIWNEIXQ.js +0 -47
- package/dist/ensure-container-edge-3NSYKHRX.js +0 -31
- package/dist/nginx-QE4DOM5J.js +0 -24
- package/dist/openresty-lua-BTAKECCF.js +0 -42
- package/dist/server/lua/pipe_log.lua +0 -71
- package/dist/setup-KELALK7H.js +0 -20
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
":" //# ; exec "$(command -v bun || command -v node)" "$0" "$@"
|
|
3
|
-
import { createRequire as __ospCreateRequire } from "node:module";
|
|
4
|
-
const require = __ospCreateRequire(import.meta.url);
|
|
5
|
-
import {
|
|
6
|
-
ACME_CHALLENGE_LOCATION,
|
|
7
|
-
ACME_HTTP01_PORT,
|
|
8
|
-
EDGE_CONTAINER_MOUNTS,
|
|
9
|
-
EDGE_HOST_PATHS,
|
|
10
|
-
EDGE_HOST_STATE_DIR,
|
|
11
|
-
LUA_LOGGER_PATH,
|
|
12
|
-
OPENRESTY_DEFAULT_PATHS,
|
|
13
|
-
OPENRESTY_LUA_DIR,
|
|
14
|
-
OPENRESTY_MGMT_PORT,
|
|
15
|
-
RULES_GUARD_PATH,
|
|
16
|
-
buildReloadCommand,
|
|
17
|
-
deployLuaScripts,
|
|
18
|
-
detectOpenRestyPaths,
|
|
19
|
-
ensureLuaScripts,
|
|
20
|
-
ensureOpenRestyConfig,
|
|
21
|
-
luaSourceAvailable
|
|
22
|
-
} from "./chunk-EAAGSQXN.js";
|
|
23
|
-
import "./chunk-UMQP7SYT.js";
|
|
24
|
-
import "./chunk-KI2EY3WB.js";
|
|
25
|
-
export {
|
|
26
|
-
ACME_CHALLENGE_LOCATION,
|
|
27
|
-
ACME_HTTP01_PORT,
|
|
28
|
-
EDGE_CONTAINER_MOUNTS,
|
|
29
|
-
EDGE_HOST_PATHS,
|
|
30
|
-
EDGE_HOST_STATE_DIR,
|
|
31
|
-
LUA_LOGGER_PATH,
|
|
32
|
-
OPENRESTY_DEFAULT_PATHS,
|
|
33
|
-
OPENRESTY_LUA_DIR,
|
|
34
|
-
OPENRESTY_MGMT_PORT,
|
|
35
|
-
RULES_GUARD_PATH,
|
|
36
|
-
buildReloadCommand,
|
|
37
|
-
deployLuaScripts,
|
|
38
|
-
detectOpenRestyPaths,
|
|
39
|
-
ensureLuaScripts,
|
|
40
|
-
ensureOpenRestyConfig,
|
|
41
|
-
luaSourceAvailable
|
|
42
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
-- pipe_log.lua
|
|
2
|
-
-- Push request log into shared dict queue log_pipe:q:{host} for /stream SSE.
|
|
3
|
-
-- Payload shape matches requestLogger.js (id, ip, country when known,
|
|
4
|
-
-- timestamp, date, uri, method, status, userAgent, requestSize, responseSize,
|
|
5
|
-
-- responseTime).
|
|
6
|
-
--
|
|
7
|
-
-- Called via ngx.timer.at from site_logger (premature is first arg).
|
|
8
|
-
|
|
9
|
-
local cjson = require "cjson.safe"
|
|
10
|
-
|
|
11
|
-
local SUB_PREFIX = "log_pipe:sub:"
|
|
12
|
-
local QUEUE_PREFIX = "log_pipe:q:"
|
|
13
|
-
local QUEUE_MAX_LEN = 2000
|
|
14
|
-
|
|
15
|
-
-- SAFE LOAD: GeoIP (per-worker, cached by require)
|
|
16
|
-
local geo_ok, geo = pcall(require, "openship.geo_country")
|
|
17
|
-
if not geo_ok then geo = nil end
|
|
18
|
-
|
|
19
|
-
-- Reused payload table per worker (cleared after encode to avoid GC pressure)
|
|
20
|
-
local payload = {}
|
|
21
|
-
|
|
22
|
-
local function pipe_request_log(premature, host, ip, ts, ua, uri,
|
|
23
|
-
req_len, bytes, rt, method, status)
|
|
24
|
-
if premature then return end
|
|
25
|
-
|
|
26
|
-
local sh = ngx.shared.request_data
|
|
27
|
-
if not sh then return end
|
|
28
|
-
|
|
29
|
-
-- Double-check subscriber is still active (guard against race)
|
|
30
|
-
if not sh:get(SUB_PREFIX .. host) then return end
|
|
31
|
-
|
|
32
|
-
pcall(function()
|
|
33
|
-
local country = nil
|
|
34
|
-
if geo and geo.get_country_code then
|
|
35
|
-
country = geo.get_country_code(ip)
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
payload.id = string.format("%.3f-%d", ts, math.random(10000, 99999))
|
|
39
|
-
payload.host = host
|
|
40
|
-
payload.ip = ip
|
|
41
|
-
if country and type(country) == "string" and country ~= "" then
|
|
42
|
-
payload.country = country
|
|
43
|
-
end
|
|
44
|
-
payload.timestamp = ts
|
|
45
|
-
payload.date = os.date("!%Y-%m-%d %H:%M:%S", ts)
|
|
46
|
-
payload.uri = uri
|
|
47
|
-
payload.method = method or "GET"
|
|
48
|
-
payload.status = tonumber(status) or 0
|
|
49
|
-
payload.userAgent = ua or ""
|
|
50
|
-
payload.requestSize = tonumber(req_len) or 0
|
|
51
|
-
payload.responseSize = tonumber(bytes) or 0
|
|
52
|
-
payload.responseTime = tonumber(rt) or 0
|
|
53
|
-
|
|
54
|
-
local body = cjson.encode(payload)
|
|
55
|
-
|
|
56
|
-
-- Clear payload table for next reuse
|
|
57
|
-
for k in pairs(payload) do payload[k] = nil end
|
|
58
|
-
|
|
59
|
-
if not body then return end
|
|
60
|
-
|
|
61
|
-
local qkey = QUEUE_PREFIX .. host
|
|
62
|
-
sh:lpush(qkey, body)
|
|
63
|
-
if sh:llen(qkey) > QUEUE_MAX_LEN then
|
|
64
|
-
sh:rpop(qkey)
|
|
65
|
-
end
|
|
66
|
-
end)
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
return {
|
|
70
|
-
pipe_request_log = pipe_request_log,
|
|
71
|
-
}
|
package/dist/setup-KELALK7H.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
":" //# ; exec "$(command -v bun || command -v node)" "$0" "$@"
|
|
3
|
-
import { createRequire as __ospCreateRequire } from "node:module";
|
|
4
|
-
const require = __ospCreateRequire(import.meta.url);
|
|
5
|
-
import {
|
|
6
|
-
SystemManager
|
|
7
|
-
} from "./chunk-NNPEG6HM.js";
|
|
8
|
-
import "./chunk-NXFIRK2Z.js";
|
|
9
|
-
import "./chunk-KZOBYJUW.js";
|
|
10
|
-
import "./chunk-RPHRPFEH.js";
|
|
11
|
-
import "./chunk-RB35YN3J.js";
|
|
12
|
-
import "./chunk-FPRHYBY2.js";
|
|
13
|
-
import "./chunk-6PIYRG5I.js";
|
|
14
|
-
import "./chunk-ILFETZOM.js";
|
|
15
|
-
import "./chunk-EAAGSQXN.js";
|
|
16
|
-
import "./chunk-UMQP7SYT.js";
|
|
17
|
-
import "./chunk-KI2EY3WB.js";
|
|
18
|
-
export {
|
|
19
|
-
SystemManager
|
|
20
|
-
};
|