@cedarjs/auth-supertokens-setup 0.1.1 → 0.2.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.
@@ -68,7 +68,7 @@ const addRoutingLogic = {
68
68
  task: () => {
69
69
  const routesPath = (0, import_cli_helpers.getPaths)().web.routes;
70
70
  let content = import_fs.default.readFileSync(routesPath, "utf-8");
71
- content = content.replace("import SuperTokens from 'supertokens-auth-react'", "").replace(/if \(SuperTokens.canHandleRoute\(\)\) {[^}]+}/, "");
71
+ content = content.replace("import SuperTokens from 'supertokens-auth-react'\n", "").replace(/[ \t]*if \(SuperTokens.canHandleRoute\(\)\) {[^}]+}\n/, "");
72
72
  if (!/\s*if\s*\(canHandleRoute\(PreBuiltUI\)\)\s*\{/.test(content)) {
73
73
  let hasImportedSuperTokensFunctions = false;
74
74
  content = content.split("\n").reduce((acc, line) => {
@@ -88,7 +88,7 @@ const addRoutingLogic = {
88
88
  );
89
89
  content = content.replace(
90
90
  /const Routes = \(\) => \{\n/,
91
- "const Routes = () => {\n if (canHandleRoute(PreBuiltUI)) {\n return getRoutingComponent(PreBuiltUI)\n }\n\n"
91
+ "const Routes = () => {\n if (canHandleRoute(PreBuiltUI)) {\n return getRoutingComponent(PreBuiltUI)\n }\n"
92
92
  );
93
93
  import_fs.default.writeFileSync(routesPath, content);
94
94
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/auth-supertokens-setup",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -39,21 +39,21 @@
39
39
  "test:watch": "vitest watch"
40
40
  },
41
41
  "dependencies": {
42
- "@cedarjs/cli-helpers": "0.1.1"
42
+ "@cedarjs/cli-helpers": "0.2.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@arethetypeswrong/cli": "0.18.1",
46
- "@cedarjs/framework-tools": "0.1.1",
46
+ "@cedarjs/framework-tools": "0.2.0",
47
47
  "@types/yargs": "17.0.33",
48
48
  "concurrently": "8.2.2",
49
49
  "memfs": "4.17.2",
50
50
  "publint": "0.3.12",
51
- "tsx": "4.19.3",
51
+ "tsx": "4.19.4",
52
52
  "typescript": "5.6.2",
53
- "vitest": "2.1.9"
53
+ "vitest": "3.2.4"
54
54
  },
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  },
58
- "gitHead": "87e486de4e0bced95a0441f3bbe4977508b161e9"
58
+ "gitHead": "568c8f994789688a43c5f57181505d7461417b0f"
59
59
  }