casualos 3.10.2 → 3.10.3

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 +27 -22
  2. package/package.json +4 -4
package/dist/cli.js CHANGED
@@ -147981,7 +147981,7 @@ var trace = TraceAPI.getInstance();
147981
147981
  function hashLowEntropyPasswordWithSalt2(password, salt) {
147982
147982
  const tracer = trace.getTracer(
147983
147983
  "InstrumentedHashHelpers",
147984
- false ? void 0 : "v3.10.2"
147984
+ false ? void 0 : "v3.10.3"
147985
147985
  );
147986
147986
  return tracer.startActiveSpan(
147987
147987
  "hashLowEntropyPasswordWithSalt",
@@ -147999,7 +147999,7 @@ function hashLowEntropyPasswordWithSalt2(password, salt) {
147999
147999
  function hashHighEntropyPasswordWithSalt2(password, salt) {
148000
148000
  const tracer = trace.getTracer(
148001
148001
  "InstrumentedHashHelpers",
148002
- false ? void 0 : "v3.10.2"
148002
+ false ? void 0 : "v3.10.3"
148003
148003
  );
148004
148004
  return tracer.startActiveSpan(
148005
148005
  "hashHighEntropyPasswordWithSalt",
@@ -148017,7 +148017,7 @@ function hashHighEntropyPasswordWithSalt2(password, salt) {
148017
148017
  function verifyPasswordAgainstHashes2(password, salt, hashes) {
148018
148018
  const tracer = trace.getTracer(
148019
148019
  "InstrumentedHashHelpers",
148020
- false ? void 0 : "v3.10.2"
148020
+ false ? void 0 : "v3.10.3"
148021
148021
  );
148022
148022
  return tracer.startActiveSpan(
148023
148023
  "verifyPasswordAgainstHashes",
@@ -155547,7 +155547,7 @@ var import_semantic_conventions = __toESM(require_src3());
155547
155547
  function traced(tracerName, options = {}, metricOptions = {}) {
155548
155548
  const tracer = trace.getTracer(
155549
155549
  tracerName,
155550
- false ? void 0 : "v3.10.2"
155550
+ false ? void 0 : "v3.10.3"
155551
155551
  );
155552
155552
  return function(target, propertyKey, descriptor) {
155553
155553
  const originalMethod = descriptor.value;
@@ -155629,7 +155629,7 @@ function getHistogram(meter) {
155629
155629
  }
155630
155630
  return metrics.getMeter(
155631
155631
  meter.meter,
155632
- false ? void 0 : "v3.10.2"
155632
+ false ? void 0 : "v3.10.3"
155633
155633
  ).createHistogram(meter.name, meter.options);
155634
155634
  }
155635
155635
  function getCounter(meter) {
@@ -155638,7 +155638,7 @@ function getCounter(meter) {
155638
155638
  }
155639
155639
  return metrics.getMeter(
155640
155640
  meter.meter,
155641
- false ? void 0 : "v3.10.2"
155641
+ false ? void 0 : "v3.10.3"
155642
155642
  ).createCounter(meter.name, meter.options);
155643
155643
  }
155644
155644
  function traceHttpResponse(options = {}) {
@@ -167398,7 +167398,7 @@ var RecordsServer = class {
167398
167398
  this._viewTemplateRenderer = viewTemplateRenderer;
167399
167399
  this._tracer = trace.getTracer(
167400
167400
  "RecordsServer",
167401
- false ? void 0 : "v3.10.2"
167401
+ false ? void 0 : "v3.10.3"
167402
167402
  );
167403
167403
  this._purchasableItems = purchasableItemsController;
167404
167404
  this._procedures = this._createProcedures();
@@ -171278,8 +171278,8 @@ var RecordsServer = class {
171278
171278
  return {
171279
171279
  success: true,
171280
171280
  ...metadata,
171281
- version: true ? "v3.10.2" : void 0,
171282
- versionHash: true ? "f0bdf342d7b5dc955cc4ebee7f6221842ae48945" : void 0
171281
+ version: true ? "v3.10.3" : void 0,
171282
+ versionHash: true ? "5f117f0f662af7a8343caf655b7a3cfb9bed4ff1" : void 0
171283
171283
  };
171284
171284
  }),
171285
171285
  getPurchasableItem: procedure().origins(true).http("GET", "/api/v2/records/purchasableItems").inputs(
@@ -174567,12 +174567,7 @@ var SubscriptionController = class {
174567
174567
  const keyResult = await this._auth.validateSessionKey(
174568
174568
  request2.sessionKey
174569
174569
  );
174570
- let accountBalances = success2(
174571
- {
174572
- usd: void 0,
174573
- credits: void 0
174574
- }
174575
- );
174570
+ let accountBalances = success2(void 0);
174576
174571
  let customerId;
174577
174572
  let role;
174578
174573
  if (keyResult.success === false) {
@@ -174592,9 +174587,11 @@ var SubscriptionController = class {
174592
174587
  const user = await this._authStore.findUser(request2.userId);
174593
174588
  customerId = user.stripeCustomerId;
174594
174589
  role = "user";
174595
- accountBalances = await this._financialController.getAccountBalances({
174596
- userId: request2.userId
174597
- });
174590
+ if (this._financialController) {
174591
+ accountBalances = await this._financialController.getAccountBalances({
174592
+ userId: request2.userId
174593
+ });
174594
+ }
174598
174595
  } else if (request2.studioId) {
174599
174596
  const assignments = await this._recordsStore.listStudioAssignments(
174600
174597
  request2.studioId,
@@ -174618,9 +174615,11 @@ var SubscriptionController = class {
174618
174615
  );
174619
174616
  customerId = studio.stripeCustomerId;
174620
174617
  role = "studio";
174621
- accountBalances = await this._financialController.getAccountBalances({
174622
- studioId: request2.studioId
174623
- });
174618
+ if (this._financialController) {
174619
+ accountBalances = await this._financialController.getAccountBalances({
174620
+ studioId: request2.studioId
174621
+ });
174622
+ }
174624
174623
  }
174625
174624
  }
174626
174625
  if (isFailure(accountBalances)) {
@@ -176421,6 +176420,12 @@ var SubscriptionController = class {
176421
176420
  return refundResult;
176422
176421
  }
176423
176422
  async invoiceContract(request2) {
176423
+ if (!this._financialController) {
176424
+ return failure({
176425
+ errorCode: "not_supported",
176426
+ errorMessage: "This operation is not supported."
176427
+ });
176428
+ }
176424
176429
  if (request2.amount <= 0) {
176425
176430
  return failure({
176426
176431
  errorCode: "invalid_request",
@@ -222895,7 +222900,7 @@ var config2 = new Conf({
222895
222900
  projectName: "casualos-cli"
222896
222901
  });
222897
222902
  var program2 = new Command();
222898
- program2.name("casualos").description("A CLI for CasualOS").version("v3.10.2").option(
222903
+ program2.name("casualos").description("A CLI for CasualOS").version("v3.10.3").option(
222899
222904
  "-e, --endpoint <url>",
222900
222905
  "The endpoint to use for queries. Can be used to override the current endpoint."
222901
222906
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "casualos",
3
- "version": "3.10.2",
3
+ "version": "3.10.3",
4
4
  "description": "Command line interface for CasualOS.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "index.d.ts",
@@ -28,9 +28,9 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@casual-simulation/aux-common": "^3.8.1",
32
- "@casual-simulation/aux-records": "^3.10.0",
33
- "@casual-simulation/aux-runtime": "^3.8.1",
31
+ "@casual-simulation/aux-common": "^3.10.3",
32
+ "@casual-simulation/aux-records": "^3.10.3",
33
+ "@casual-simulation/aux-runtime": "^3.10.3",
34
34
  "@octokit/app": "^15.1.0",
35
35
  "@octokit/auth-oauth-device": "^7.1.1",
36
36
  "@octokit/core": "^6.1.2",