casualos 3.8.0-alpha.18204122333 → 3.8.0

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.
Files changed (2) hide show
  1. package/dist/cli.js +63 -65
  2. package/package.json +4 -4
package/dist/cli.js CHANGED
@@ -93467,7 +93467,7 @@ var trace = TraceAPI.getInstance();
93467
93467
  function hashLowEntropyPasswordWithSalt2(password, salt) {
93468
93468
  const tracer = trace.getTracer(
93469
93469
  "InstrumentedHashHelpers",
93470
- false ? void 0 : "v3.8.0-alpha.18204122333"
93470
+ false ? void 0 : "v3.8.0"
93471
93471
  );
93472
93472
  return tracer.startActiveSpan(
93473
93473
  "hashLowEntropyPasswordWithSalt",
@@ -93485,7 +93485,7 @@ function hashLowEntropyPasswordWithSalt2(password, salt) {
93485
93485
  function hashHighEntropyPasswordWithSalt2(password, salt) {
93486
93486
  const tracer = trace.getTracer(
93487
93487
  "InstrumentedHashHelpers",
93488
- false ? void 0 : "v3.8.0-alpha.18204122333"
93488
+ false ? void 0 : "v3.8.0"
93489
93489
  );
93490
93490
  return tracer.startActiveSpan(
93491
93491
  "hashHighEntropyPasswordWithSalt",
@@ -93503,7 +93503,7 @@ function hashHighEntropyPasswordWithSalt2(password, salt) {
93503
93503
  function verifyPasswordAgainstHashes2(password, salt, hashes) {
93504
93504
  const tracer = trace.getTracer(
93505
93505
  "InstrumentedHashHelpers",
93506
- false ? void 0 : "v3.8.0-alpha.18204122333"
93506
+ false ? void 0 : "v3.8.0"
93507
93507
  );
93508
93508
  return tracer.startActiveSpan(
93509
93509
  "verifyPasswordAgainstHashes",
@@ -100895,7 +100895,7 @@ var import_semantic_conventions = __toESM(require_src3());
100895
100895
  function traced(tracerName, options = {}, metricOptions = {}) {
100896
100896
  const tracer = trace.getTracer(
100897
100897
  tracerName,
100898
- false ? void 0 : "v3.8.0-alpha.18204122333"
100898
+ false ? void 0 : "v3.8.0"
100899
100899
  );
100900
100900
  return function(target, propertyKey, descriptor) {
100901
100901
  const originalMethod = descriptor.value;
@@ -100977,7 +100977,7 @@ function getHistogram(meter) {
100977
100977
  }
100978
100978
  return metrics.getMeter(
100979
100979
  meter.meter,
100980
- false ? void 0 : "v3.8.0-alpha.18204122333"
100980
+ false ? void 0 : "v3.8.0"
100981
100981
  ).createHistogram(meter.name, meter.options);
100982
100982
  }
100983
100983
  function getCounter(meter) {
@@ -100986,7 +100986,7 @@ function getCounter(meter) {
100986
100986
  }
100987
100987
  return metrics.getMeter(
100988
100988
  meter.meter,
100989
- false ? void 0 : "v3.8.0-alpha.18204122333"
100989
+ false ? void 0 : "v3.8.0"
100990
100990
  ).createCounter(meter.name, meter.options);
100991
100991
  }
100992
100992
  function traceHttpResponse(options = {}) {
@@ -111472,7 +111472,7 @@ var RecordsServer = class {
111472
111472
  this._databaseRecordsController = databaseRecordsController;
111473
111473
  this._tracer = trace.getTracer(
111474
111474
  "RecordsServer",
111475
- false ? void 0 : "v3.8.0-alpha.18204122333"
111475
+ false ? void 0 : "v3.8.0"
111476
111476
  );
111477
111477
  this._procedures = this._createProcedures();
111478
111478
  this._setupRoutes();
@@ -114604,8 +114604,8 @@ var RecordsServer = class {
114604
114604
  return {
114605
114605
  success: true,
114606
114606
  ...metadata,
114607
- version: true ? "v3.8.0-alpha.18204122333" : void 0,
114608
- versionHash: true ? "61916dc671764c173e2e371073f08df6985b866f" : void 0
114607
+ version: true ? "v3.8.0" : void 0,
114608
+ versionHash: true ? "538634ea9a70117c929b4161b9f295c96a49b02b" : void 0
114609
114609
  };
114610
114610
  })
114611
114611
  };
@@ -131412,28 +131412,28 @@ var WebhookRecordsController = class extends CrudRecordsController {
131412
131412
  errorMessage: "Invalid webhook target. The targeted record does not contain a valid name."
131413
131413
  };
131414
131414
  }
131415
- const data = await this._data.getData(
131415
+ const data2 = await this._data.getData(
131416
131416
  webhook.targetRecordName,
131417
131417
  webhook.targetAddress,
131418
131418
  webhook.userId,
131419
131419
  request2.instances
131420
131420
  );
131421
- if (data.success === false) {
131421
+ if (data2.success === false) {
131422
131422
  return {
131423
131423
  success: false,
131424
131424
  errorCode: "invalid_webhook_target",
131425
131425
  errorMessage: "Invalid webhook target. The targeted record was not able to be retrieved.",
131426
- internalError: data
131426
+ internalError: data2
131427
131427
  };
131428
131428
  }
131429
131429
  let auxData;
131430
- if (typeof data.data === "string") {
131431
- const stored = tryParseJson(data.data);
131430
+ if (typeof data2.data === "string") {
131431
+ const stored = tryParseJson(data2.data);
131432
131432
  if (stored.success === true) {
131433
131433
  auxData = stored.value;
131434
131434
  }
131435
- } else if (typeof data.data === "object") {
131436
- auxData = data.data;
131435
+ } else if (typeof data2.data === "object") {
131436
+ auxData = data2.data;
131437
131437
  }
131438
131438
  const parseResult = STORED_AUX_SCHEMA.safeParse(auxData);
131439
131439
  if (parseResult.success === false) {
@@ -131569,54 +131569,52 @@ var WebhookRecordsController = class extends CrudRecordsController {
131569
131569
  const runId = v7_default();
131570
131570
  let infoFileName = null;
131571
131571
  let infoRecordName = null;
131572
- if (webhook.userId) {
131573
- const recordName2 = webhook.userId;
131574
- const dataFile = {
131575
- runId,
131576
- version: 1,
131577
- request: request2.request,
131578
- requestUserId: request2.userId,
131579
- response: result.success === true ? result.response : null,
131580
- logs: result.success === true ? result.logs : [],
131581
- state,
131582
- stateSha256: stateHash,
131583
- authorization: webhookAuthorization
131584
- };
131585
- const json = fast_json_stable_stringify_default(dataFile);
131586
- const data = new TextEncoder().encode(json);
131587
- const recordResult = await this._files.recordFile(
131588
- recordName2,
131589
- recordName2,
131590
- {
131591
- fileSha256Hex: (0, import_hash5.sha256)().update(data).digest("hex"),
131592
- fileByteLength: data.byteLength,
131593
- fileDescription: `Webhook data for run ${runId}`,
131594
- fileMimeType: "application/json",
131595
- headers: {},
131596
- markers: [`private:logs`]
131597
- }
131572
+ const dataFile = {
131573
+ runId,
131574
+ version: 1,
131575
+ request: request2.request,
131576
+ requestUserId: request2.userId,
131577
+ response: result.success === true ? result.response : null,
131578
+ logs: result.success === true ? result.logs : [],
131579
+ state,
131580
+ stateSha256: stateHash,
131581
+ authorization: webhookAuthorization
131582
+ };
131583
+ const json = fast_json_stable_stringify_default(dataFile);
131584
+ const data = new TextEncoder().encode(json);
131585
+ const recordResult = await this._files.recordFile(
131586
+ recordName,
131587
+ null,
131588
+ {
131589
+ fileSha256Hex: (0, import_hash5.sha256)().update(data).digest("hex"),
131590
+ fileByteLength: data.byteLength,
131591
+ fileDescription: `Webhook data for run ${runId}`,
131592
+ fileMimeType: "application/json",
131593
+ headers: {},
131594
+ markers: [`private:logs`],
131595
+ userRole: "system"
131596
+ }
131597
+ );
131598
+ if (recordResult.success === false) {
131599
+ console.error(
131600
+ "[WebhookRecordsController] Error recording webhook info file:",
131601
+ recordResult
131598
131602
  );
131599
- if (recordResult.success === false) {
131603
+ } else {
131604
+ infoRecordName = recordName;
131605
+ infoFileName = recordResult.fileName;
131606
+ const requestResult = await axios_default.request({
131607
+ method: recordResult.uploadMethod,
131608
+ headers: recordResult.uploadHeaders,
131609
+ url: recordResult.uploadUrl,
131610
+ data,
131611
+ validateStatus: () => true
131612
+ });
131613
+ if (requestResult.status <= 199 || requestResult.status >= 300) {
131600
131614
  console.error(
131601
- "[WebhookRecordsController] Error recording webhook info file:",
131602
- recordResult
131615
+ "[WebhookRecordsController] Error uploading webhook info file:",
131616
+ requestResult
131603
131617
  );
131604
- } else {
131605
- infoRecordName = recordName2;
131606
- infoFileName = recordResult.fileName;
131607
- const requestResult = await axios_default.request({
131608
- method: recordResult.uploadMethod,
131609
- headers: recordResult.uploadHeaders,
131610
- url: recordResult.uploadUrl,
131611
- data,
131612
- validateStatus: () => true
131613
- });
131614
- if (requestResult.status <= 199 || requestResult.status >= 300) {
131615
- console.error(
131616
- "[WebhookRecordsController] Error uploading webhook info file:",
131617
- requestResult
131618
- );
131619
- }
131620
131618
  }
131621
131619
  }
131622
131620
  const run = {
@@ -134074,7 +134072,7 @@ var WebsocketController = class {
134074
134072
  inst = savedInst;
134075
134073
  }
134076
134074
  } else {
134077
- const userInfo = await this._authStore.findUser(userId);
134075
+ const userInfo = userId ? await this._authStore.findUser(userId) : null;
134078
134076
  if (userInfo) {
134079
134077
  const userPrivacyFeatures = userInfo.privacyFeatures;
134080
134078
  if (userPrivacyFeatures) {
@@ -134091,8 +134089,8 @@ var WebsocketController = class {
134091
134089
  if (privoConfig) {
134092
134090
  return {
134093
134091
  success: false,
134094
- errorCode: "not_authorized",
134095
- errorMessage: "Public insts are not allowed."
134092
+ errorCode: "not_logged_in",
134093
+ errorMessage: "Please log in to access public insts."
134096
134094
  };
134097
134095
  }
134098
134096
  }
@@ -146352,7 +146350,7 @@ var config = new Conf({
146352
146350
  projectName: "casualos-cli"
146353
146351
  });
146354
146352
  var program2 = new Command();
146355
- program2.name("casualos").description("A CLI for CasualOS").version("v3.8.0-alpha.18204122333").option(
146353
+ program2.name("casualos").description("A CLI for CasualOS").version("v3.8.0").option(
146356
146354
  "-e, --endpoint <url>",
146357
146355
  "The endpoint to use for queries. Can be used to override the current endpoint."
146358
146356
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "casualos",
3
- "version": "3.8.0-alpha.18204122333",
3
+ "version": "3.8.0",
4
4
  "description": "Command line interface for CasualOS.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "index.d.ts",
@@ -35,8 +35,8 @@
35
35
  "access": "public"
36
36
  },
37
37
  "dependencies": {
38
- "@casual-simulation/aux-common": "^3.8.0-alpha.18204122333",
39
- "@casual-simulation/aux-records": "^3.8.0-alpha.18204122333",
38
+ "@casual-simulation/aux-common": "^3.8.0",
39
+ "@casual-simulation/aux-records": "^3.8.0",
40
40
  "@octokit/app": "^15.1.0",
41
41
  "@octokit/auth-oauth-device": "^7.1.1",
42
42
  "@octokit/core": "^6.1.2",
@@ -63,5 +63,5 @@
63
63
  "**/*.def",
64
64
  "templates/**"
65
65
  ],
66
- "gitHead": "61916dc671764c173e2e371073f08df6985b866f"
66
+ "gitHead": "538634ea9a70117c929b4161b9f295c96a49b02b"
67
67
  }