create-strata 2.2.46 → 2.2.47

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/cli.js CHANGED
@@ -2609,6 +2609,8 @@ ${tokenLookup}
2609
2609
  function renderAuthProvider(layers) {
2610
2610
  if (layers.auth === "headers") {
2611
2611
  return `import { CORE_AUTH_TOKEN } from "@getstrata/bootstrap/config";
2612
+ import { createTokenAbilityChecker } from "@getstrata/core/auth/tokenAbilityChecker";
2613
+ import { CORE_ABILITY_CHECKER_TOKEN } from "@getstrata/core/contracts/serviceTokens";
2612
2614
  import { AuthManager, GuestGuard } from "@getstrata/core/auth/guard";
2613
2615
  import type { ServiceProvider } from "@getstrata/core/contracts/di";
2614
2616
  import { envFlagEnabled } from "@getstrata/core/runtime/appEnv";
@@ -2620,6 +2622,7 @@ const authProvider: ServiceProvider = {
2620
2622
  ? new GuestGuard()
2621
2623
  : { resolve: () => null };
2622
2624
  container.set(CORE_AUTH_TOKEN, new AuthManager(guard));
2625
+ container.set(CORE_ABILITY_CHECKER_TOKEN, createTokenAbilityChecker());
2623
2626
  },
2624
2627
  };
2625
2628
 
@@ -2644,7 +2647,7 @@ export default authProvider;
2644
2647
  auth.registerGuard("token", apiGuard);` : "";
2645
2648
  const jwtReg = authUsesJwt(layers.auth) ? ` auth.registerGuard("jwt", new JwtGuard(container));` : "";
2646
2649
  const basicReg = authUsesToken(layers.auth) || authUsesJwt(layers.auth) ? ` auth.registerGuard("basic", new BasicAuthGuard(container));` : "";
2647
- const ability = authUsesToken(layers.auth) ? ` container.set(CORE_ABILITY_CHECKER_TOKEN, createTokenAbilityChecker());` : "";
2650
+ const ability = ` container.set(CORE_ABILITY_CHECKER_TOKEN, createTokenAbilityChecker());`;
2648
2651
  const imports = [`import { CORE_AUTH_TOKEN } from "@getstrata/bootstrap/config";`];
2649
2652
  if (authUsesCookie(layers.auth)) {
2650
2653
  imports.push(`import { createCookieSessionAuthManager } from "@getstrata/bootstrap/web/session";`);
@@ -2662,14 +2665,9 @@ export default authProvider;
2662
2665
  if (authUsesJwt(layers.auth)) {
2663
2666
  imports.push(`import { JwtGuard } from "@getstrata/core/auth/jwtGuard";`);
2664
2667
  }
2665
- if (authUsesToken(layers.auth)) {
2666
- imports.push(`import { createTokenAbilityChecker } from "@getstrata/core/auth/tokenAbilityChecker";`);
2667
- }
2668
+ imports.push(`import { createTokenAbilityChecker } from "@getstrata/core/auth/tokenAbilityChecker";`);
2668
2669
  imports.push(`import type { ServiceProvider } from "@getstrata/core/contracts/di";`);
2669
- const tokenImports = ["CORE_AUTH_USER_DIRECTORY_TOKEN"];
2670
- if (authUsesToken(layers.auth)) {
2671
- tokenImports.unshift("CORE_ABILITY_CHECKER_TOKEN");
2672
- }
2670
+ const tokenImports = ["CORE_ABILITY_CHECKER_TOKEN", "CORE_AUTH_USER_DIRECTORY_TOKEN"];
2673
2671
  imports.push(`import {
2674
2672
  ${tokenImports.join(`,
2675
2673
  `)},
@@ -3238,9 +3236,9 @@ function renderPackageJson(projectName, options = {}) {
3238
3236
  "@getstrata/cli": "workspace:*",
3239
3237
  "@getstrata/core": "workspace:*"
3240
3238
  } : {
3241
- "@getstrata/bootstrap": "^2.2.46",
3242
- "@getstrata/cli": "^2.2.46",
3243
- "@getstrata/core": "^2.2.46"
3239
+ "@getstrata/bootstrap": "^2.2.47",
3240
+ "@getstrata/cli": "^2.2.47",
3241
+ "@getstrata/core": "^2.2.47"
3244
3242
  };
3245
3243
  coreDeps.eta = "^4.6.0";
3246
3244
  if (options.layers?.database === "mysql") {
@@ -12,9 +12,9 @@
12
12
  "check": "tsc --noEmit"
13
13
  },
14
14
  "dependencies": {
15
- "@getstrata/bootstrap": "^2.2.46",
16
- "@getstrata/cli": "^2.2.46",
17
- "@getstrata/core": "^2.2.46",
15
+ "@getstrata/bootstrap": "^2.2.47",
16
+ "@getstrata/cli": "^2.2.47",
17
+ "@getstrata/core": "^2.2.47",
18
18
  "eta": "^4.6.0"
19
19
  },
20
20
  "devDependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-strata",
3
- "version": "2.2.46",
3
+ "version": "2.2.47",
4
4
  "description": "Create a new Strata app. Interactive wizard; choose each layer; one database engine.",
5
5
  "type": "module",
6
6
  "license": "MIT",