casualos 3.3.8-alpha.10203321239 → 3.3.8

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 +33 -17
  2. package/package.json +4 -4
package/dist/cli.js CHANGED
@@ -94691,7 +94691,7 @@ var trace = TraceAPI.getInstance();
94691
94691
  function hashLowEntropyPasswordWithSalt2(password, salt) {
94692
94692
  const tracer = trace.getTracer(
94693
94693
  "InstrumentedHashHelpers",
94694
- false ? void 0 : "v3.3.8-alpha.10203321239"
94694
+ false ? void 0 : "v3.3.8"
94695
94695
  );
94696
94696
  return tracer.startActiveSpan(
94697
94697
  "hashLowEntropyPasswordWithSalt",
@@ -94709,7 +94709,7 @@ function hashLowEntropyPasswordWithSalt2(password, salt) {
94709
94709
  function hashHighEntropyPasswordWithSalt2(password, salt) {
94710
94710
  const tracer = trace.getTracer(
94711
94711
  "InstrumentedHashHelpers",
94712
- false ? void 0 : "v3.3.8-alpha.10203321239"
94712
+ false ? void 0 : "v3.3.8"
94713
94713
  );
94714
94714
  return tracer.startActiveSpan(
94715
94715
  "hashHighEntropyPasswordWithSalt",
@@ -94727,7 +94727,7 @@ function hashHighEntropyPasswordWithSalt2(password, salt) {
94727
94727
  function verifyPasswordAgainstHashes2(password, salt, hashes) {
94728
94728
  const tracer = trace.getTracer(
94729
94729
  "InstrumentedHashHelpers",
94730
- false ? void 0 : "v3.3.8-alpha.10203321239"
94730
+ false ? void 0 : "v3.3.8"
94731
94731
  );
94732
94732
  return tracer.startActiveSpan(
94733
94733
  "verifyPasswordAgainstHashes",
@@ -101321,7 +101321,7 @@ var import_semantic_conventions = __toESM(require_src3());
101321
101321
  function traced(tracerName, options = {}, metricOptions = {}) {
101322
101322
  const tracer = trace.getTracer(
101323
101323
  tracerName,
101324
- false ? void 0 : "v3.3.8-alpha.10203321239"
101324
+ false ? void 0 : "v3.3.8"
101325
101325
  );
101326
101326
  return function(target, propertyKey, descriptor) {
101327
101327
  const originalMethod = descriptor.value;
@@ -101399,7 +101399,7 @@ function getHistogram(meter) {
101399
101399
  }
101400
101400
  return metrics.getMeter(
101401
101401
  meter.meter,
101402
- false ? void 0 : "v3.3.8-alpha.10203321239"
101402
+ false ? void 0 : "v3.3.8"
101403
101403
  ).createHistogram(meter.name, meter.options);
101404
101404
  }
101405
101405
  function getCounter(meter) {
@@ -101408,7 +101408,7 @@ function getCounter(meter) {
101408
101408
  }
101409
101409
  return metrics.getMeter(
101410
101410
  meter.meter,
101411
- false ? void 0 : "v3.3.8-alpha.10203321239"
101411
+ false ? void 0 : "v3.3.8"
101412
101412
  ).createCounter(meter.name, meter.options);
101413
101413
  }
101414
101414
  function traceHttpResponse(options = {}) {
@@ -111900,7 +111900,7 @@ var RecordsServer = class {
111900
111900
  this._loomController = loomController;
111901
111901
  this._tracer = trace.getTracer(
111902
111902
  "RecordsServer",
111903
- false ? void 0 : "v3.3.8-alpha.10203321239"
111903
+ false ? void 0 : "v3.3.8"
111904
111904
  );
111905
111905
  this._procedures = this._createProcedures();
111906
111906
  this._setupRoutes();
@@ -112469,7 +112469,7 @@ var RecordsServer = class {
112469
112469
  recordName: RECORD_NAME_VALIDATION,
112470
112470
  fileName: z.string().min(1)
112471
112471
  })
112472
- ).handler(async (input2, context) => {
112472
+ ).handler(async ({ recordName, fileName }, context) => {
112473
112473
  const validation = await this._validateSessionKey(
112474
112474
  context.sessionKey
112475
112475
  );
@@ -112486,14 +112486,32 @@ var RecordsServer = class {
112486
112486
  errorMessage: "You are not authorized to perform this action."
112487
112487
  };
112488
112488
  }
112489
- const recordName = input2.recordName;
112490
- const fileName = input2.fileName;
112491
112489
  const result = await this._moderationController.scanFile({
112492
112490
  recordName,
112493
112491
  fileName
112494
112492
  });
112495
112493
  return result;
112496
112494
  }),
112495
+ scheduleModerationScans: procedure().origins("account").http("POST", "/api/v2/moderation/schedule/scan").inputs(z.object({})).handler(async (input2, context) => {
112496
+ const validation = await this._validateSessionKey(
112497
+ context.sessionKey
112498
+ );
112499
+ if (validation.success === false) {
112500
+ if (validation.errorCode === "no_session_key") {
112501
+ return NOT_LOGGED_IN_RESULT;
112502
+ }
112503
+ return validation;
112504
+ }
112505
+ if (!isSuperUserRole(validation.role)) {
112506
+ return {
112507
+ success: false,
112508
+ errorCode: "not_authorized",
112509
+ errorMessage: "You are not authorized to perform this action."
112510
+ };
112511
+ }
112512
+ const result = await this._moderationController.scheduleModerationScans();
112513
+ return result;
112514
+ }),
112497
112515
  eraseData: procedure().origins("api").http("DELETE", "/api/v2/records/data").inputs(ERASE_DATA_SCHEMA).handler(
112498
112516
  async (data, context) => this._baseEraseRecordData(this._data, data, context)
112499
112517
  ),
@@ -113764,8 +113782,8 @@ var RecordsServer = class {
113764
113782
  return {
113765
113783
  success: true,
113766
113784
  ...metadata,
113767
- version: true ? "v3.3.8-alpha.10203321239" : void 0,
113768
- versionHash: true ? "434fa5a5ee98a511f868243fe4ffc0872d939840" : void 0
113785
+ version: true ? "v3.3.8" : void 0,
113786
+ versionHash: true ? "109dfc7003d185a0a14c286186c782be38552779" : void 0
113769
113787
  };
113770
113788
  })
113771
113789
  };
@@ -126684,15 +126702,13 @@ var ModerationController = class {
126684
126702
  );
126685
126703
  let filter3 = {};
126686
126704
  if (config2.jobs.files.fileExtensions) {
126687
- filter3.keyNameConstraint = {
126688
- matchAnySuffix: config2.jobs.files.fileExtensions
126689
- };
126705
+ filter3.fileExtensions = config2.jobs.files.fileExtensions.slice();
126690
126706
  }
126691
126707
  const lastFileJob = await this._store.findMostRecentJobOfType(
126692
126708
  "files"
126693
126709
  );
126694
126710
  if (lastFileJob) {
126695
- filter3.createdAfterMs = lastFileJob.createdAtMs;
126711
+ filter3.uploadedAfterMs = lastFileJob.createdAtMs;
126696
126712
  }
126697
126713
  const job = await this._jobProvider.startFilesJob(filter3);
126698
126714
  await this._store.addModerationJob(job);
@@ -128399,7 +128415,7 @@ var config = new Conf({
128399
128415
  projectName: "casualos-cli"
128400
128416
  });
128401
128417
  var program2 = new Command();
128402
- program2.name("casualos").description("A CLI for CasualOS").version("v3.3.8-alpha.10203321239").option(
128418
+ program2.name("casualos").description("A CLI for CasualOS").version("v3.3.8").option(
128403
128419
  "-e, --endpoint <url>",
128404
128420
  "The endpoint to use for queries. Can be used to override the current endpoint."
128405
128421
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "casualos",
3
- "version": "3.3.8-alpha.10203321239",
3
+ "version": "3.3.8",
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.3.8-alpha.10203321239",
39
- "@casual-simulation/aux-records": "^3.3.8-alpha.10203321239",
38
+ "@casual-simulation/aux-common": "^3.3.8",
39
+ "@casual-simulation/aux-records": "^3.3.8",
40
40
  "axios": "1.6.2",
41
41
  "commander": "12.0.0",
42
42
  "conf": "12.0.0",
@@ -54,5 +54,5 @@
54
54
  "**/*.d.ts",
55
55
  "**/*.def"
56
56
  ],
57
- "gitHead": "434fa5a5ee98a511f868243fe4ffc0872d939840"
57
+ "gitHead": "109dfc7003d185a0a14c286186c782be38552779"
58
58
  }