@arcote.tech/arc-cli 0.7.30 → 0.7.32
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/dist/index.js +38 -19
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -20063,6 +20063,9 @@ class SQLiteReadTransaction {
|
|
|
20063
20063
|
deserializeValue(value, column) {
|
|
20064
20064
|
if (value === null || value === undefined)
|
|
20065
20065
|
return null;
|
|
20066
|
+
if (column.arcType === "boolean") {
|
|
20067
|
+
return Boolean(value);
|
|
20068
|
+
}
|
|
20066
20069
|
switch (column.type.toLowerCase()) {
|
|
20067
20070
|
case "json":
|
|
20068
20071
|
if (typeof value === "string") {
|
|
@@ -20283,6 +20286,7 @@ class SQLiteAdapter {
|
|
|
20283
20286
|
const columns = agnosticSchema.columns.map((columnInfo) => ({
|
|
20284
20287
|
name: columnInfo.name,
|
|
20285
20288
|
type: this.mapType(columnInfo.type, columnInfo.storeData),
|
|
20289
|
+
arcType: columnInfo.type,
|
|
20286
20290
|
constraints: this.buildConstraints(columnInfo.storeData),
|
|
20287
20291
|
isNullable: columnInfo.storeData?.isNullable || false,
|
|
20288
20292
|
defaultValue: columnInfo.defaultValue,
|
|
@@ -20299,6 +20303,7 @@ class SQLiteAdapter {
|
|
|
20299
20303
|
columns: columns.map((col) => ({
|
|
20300
20304
|
name: col.name,
|
|
20301
20305
|
type: col.type,
|
|
20306
|
+
arcType: col.arcType,
|
|
20302
20307
|
isOptional: col.isNullable,
|
|
20303
20308
|
default: col.defaultValue
|
|
20304
20309
|
}))
|
|
@@ -20362,6 +20367,7 @@ class SQLiteAdapter {
|
|
|
20362
20367
|
columns: allColumns.map((col) => ({
|
|
20363
20368
|
name: col.name,
|
|
20364
20369
|
type: this.mapType(col.type, col.storeData),
|
|
20370
|
+
arcType: col.type,
|
|
20365
20371
|
isOptional: col.storeData?.isNullable || false,
|
|
20366
20372
|
default: col.defaultValue
|
|
20367
20373
|
}))
|
|
@@ -22581,6 +22587,9 @@ var init_dist2 = __esm(() => {
|
|
|
22581
22587
|
serializeValue(value, column) {
|
|
22582
22588
|
if (value === null || value === undefined)
|
|
22583
22589
|
return null;
|
|
22590
|
+
if (column.arcType === "boolean") {
|
|
22591
|
+
return value ? 1 : 0;
|
|
22592
|
+
}
|
|
22584
22593
|
switch (column.type.toLowerCase()) {
|
|
22585
22594
|
case "timestamp":
|
|
22586
22595
|
case "datetime":
|
|
@@ -23061,7 +23070,7 @@ var {
|
|
|
23061
23070
|
// ../../node_modules/.bun/find-up@7.0.0/node_modules/find-up/index.js
|
|
23062
23071
|
import path2 from "path";
|
|
23063
23072
|
|
|
23064
|
-
// ../../node_modules/.bun/
|
|
23073
|
+
// ../../node_modules/.bun/find-up@7.0.0/node_modules/find-up/node_modules/locate-path/index.js
|
|
23065
23074
|
import process2 from "process";
|
|
23066
23075
|
import path from "path";
|
|
23067
23076
|
import fs, { promises as fsPromises } from "fs";
|
|
@@ -37935,6 +37944,7 @@ async function createArcServer(config) {
|
|
|
37935
37944
|
const cronScheduler = new CronScheduler(contextHandler);
|
|
37936
37945
|
cronScheduler.start();
|
|
37937
37946
|
const connectionManager = new ConnectionManager;
|
|
37947
|
+
const messageChains = new Map;
|
|
37938
37948
|
const coep = config.coep ?? "unsafe-none";
|
|
37939
37949
|
const corsOrigins = config.corsOrigins;
|
|
37940
37950
|
const maxRequestBodySize = config.maxRequestBodySize ?? 10 * 1024 * 1024;
|
|
@@ -38073,29 +38083,38 @@ async function createArcServer(config) {
|
|
|
38073
38083
|
console.error("WS handler error:", error);
|
|
38074
38084
|
}
|
|
38075
38085
|
};
|
|
38076
|
-
const
|
|
38077
|
-
|
|
38078
|
-
|
|
38079
|
-
|
|
38080
|
-
|
|
38081
|
-
const carrier = {};
|
|
38082
|
-
if (typeof message?.traceparent === "string")
|
|
38083
|
-
carrier.traceparent = message.traceparent;
|
|
38084
|
-
if (typeof message?.tracestate === "string")
|
|
38085
|
-
carrier.tracestate = message.tracestate;
|
|
38086
|
-
await telemetry.runWithExtractedContext(carrier, () => telemetry.startSpan(`ws.${message?.type ?? "message"}`, () => dispatch(), {
|
|
38087
|
-
kind: 2,
|
|
38088
|
-
attributes: {
|
|
38089
|
-
"messaging.system": "arc-ws",
|
|
38090
|
-
"messaging.operation": "process",
|
|
38091
|
-
"messaging.message.type": message?.type,
|
|
38092
|
-
"arc.ws.client_id": client.id
|
|
38086
|
+
const processMessage = async () => {
|
|
38087
|
+
const telemetry = config.telemetry;
|
|
38088
|
+
if (!telemetry) {
|
|
38089
|
+
await dispatch();
|
|
38090
|
+
return;
|
|
38093
38091
|
}
|
|
38094
|
-
|
|
38092
|
+
const carrier = {};
|
|
38093
|
+
if (typeof message?.traceparent === "string")
|
|
38094
|
+
carrier.traceparent = message.traceparent;
|
|
38095
|
+
if (typeof message?.tracestate === "string")
|
|
38096
|
+
carrier.tracestate = message.tracestate;
|
|
38097
|
+
await telemetry.runWithExtractedContext(carrier, () => telemetry.startSpan(`ws.${message?.type ?? "message"}`, () => dispatch(), {
|
|
38098
|
+
kind: 2,
|
|
38099
|
+
attributes: {
|
|
38100
|
+
"messaging.system": "arc-ws",
|
|
38101
|
+
"messaging.operation": "process",
|
|
38102
|
+
"messaging.message.type": message?.type,
|
|
38103
|
+
"arc.ws.client_id": client.id
|
|
38104
|
+
}
|
|
38105
|
+
}));
|
|
38106
|
+
};
|
|
38107
|
+
const prev = messageChains.get(client.id) ?? Promise.resolve();
|
|
38108
|
+
const next = prev.then(processMessage, processMessage).catch((error) => {
|
|
38109
|
+
console.error("WS message chain error:", error);
|
|
38110
|
+
});
|
|
38111
|
+
messageChains.set(client.id, next);
|
|
38112
|
+
await next;
|
|
38095
38113
|
},
|
|
38096
38114
|
close(ws) {
|
|
38097
38115
|
const client = connectionManager.getClientByWs(ws);
|
|
38098
38116
|
if (client) {
|
|
38117
|
+
messageChains.delete(client.id);
|
|
38099
38118
|
cleanupClientSubs(client.id);
|
|
38100
38119
|
config.onWsClose?.(client.id);
|
|
38101
38120
|
connectionManager.removeClient(client.id);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcote.tech/arc-cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.32",
|
|
4
4
|
"description": "CLI tool for Arc framework",
|
|
5
5
|
"module": "index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
"build": "bun build --target=bun ./src/index.ts --outdir=dist --external @arcote.tech/arc --external @arcote.tech/arc-ds --external @arcote.tech/arc-react --external @arcote.tech/platform --external @arcote.tech/arc-map --external '@opentelemetry/*' && chmod +x dist/index.js"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@arcote.tech/arc": "^0.7.
|
|
16
|
-
"@arcote.tech/arc-ds": "^0.7.
|
|
17
|
-
"@arcote.tech/arc-react": "^0.7.
|
|
18
|
-
"@arcote.tech/arc-host": "^0.7.
|
|
19
|
-
"@arcote.tech/arc-adapter-db-sqlite": "^0.7.
|
|
20
|
-
"@arcote.tech/arc-adapter-db-postgres": "^0.7.
|
|
21
|
-
"@arcote.tech/arc-otel": "^0.7.
|
|
15
|
+
"@arcote.tech/arc": "^0.7.32",
|
|
16
|
+
"@arcote.tech/arc-ds": "^0.7.32",
|
|
17
|
+
"@arcote.tech/arc-react": "^0.7.32",
|
|
18
|
+
"@arcote.tech/arc-host": "^0.7.32",
|
|
19
|
+
"@arcote.tech/arc-adapter-db-sqlite": "^0.7.32",
|
|
20
|
+
"@arcote.tech/arc-adapter-db-postgres": "^0.7.32",
|
|
21
|
+
"@arcote.tech/arc-otel": "^0.7.32",
|
|
22
22
|
"@opentelemetry/api": "^1.9.0",
|
|
23
23
|
"@opentelemetry/api-logs": "^0.57.0",
|
|
24
24
|
"@opentelemetry/core": "^1.30.0",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@opentelemetry/sdk-trace-base": "^1.30.0",
|
|
32
32
|
"@opentelemetry/sdk-trace-node": "^1.30.0",
|
|
33
33
|
"@opentelemetry/semantic-conventions": "^1.27.0",
|
|
34
|
-
"@arcote.tech/platform": "^0.7.
|
|
35
|
-
"@arcote.tech/arc-map": "^0.7.
|
|
34
|
+
"@arcote.tech/platform": "^0.7.32",
|
|
35
|
+
"@arcote.tech/arc-map": "^0.7.32",
|
|
36
36
|
"@clack/prompts": "^0.9.0",
|
|
37
37
|
"commander": "^11.1.0",
|
|
38
38
|
"chokidar": "^3.5.3",
|