sv 0.6.0 → 0.6.1

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/bin.js CHANGED
@@ -25,7 +25,7 @@ import require$$0$3 from 'events';
25
25
  import { t as templates, c as create$2 } from './index-A89HFWzv.js';
26
26
 
27
27
  var name = "sv";
28
- var version = "0.6.0";
28
+ var version = "0.6.1";
29
29
  var type = "module";
30
30
  var description = "A CLI for creating and updating SvelteKit projects";
31
31
  var license = "MIT";
@@ -50397,7 +50397,7 @@ var lucia = defineAdder({
50397
50397
  imports.addNamespace(ast, "$lib/server/db/schema", "table");
50398
50398
  imports.addNamed(ast, "$lib/server/db", { db: "db" });
50399
50399
  imports.addNamed(ast, "@oslojs/encoding", {
50400
- encodeBase64url: "encodeBase64url",
50400
+ encodeBase32LowerCase: "encodeBase32LowerCase",
50401
50401
  encodeHexLowerCase: "encodeHexLowerCase"
50402
50402
  });
50403
50403
  imports.addNamed(ast, "@oslojs/crypto/sha2", { sha256: "sha256" });
@@ -50416,8 +50416,8 @@ var lucia = defineAdder({
50416
50416
  if (!ms.original.includes("export function generateSessionToken")) {
50417
50417
  const generateSessionToken = dedent`
50418
50418
  export function generateSessionToken() {
50419
- const bytes = crypto.getRandomValues(new Uint8Array(18));
50420
- const token = encodeBase64url(bytes);
50419
+ const bytes = crypto.getRandomValues(new Uint8Array(20));
50420
+ const token = encodeBase32LowerCase(bytes);
50421
50421
  return token;
50422
50422
  }`;
50423
50423
  ms.append(`
@@ -50581,7 +50581,7 @@ ${deleteSessionTokenCookie}`);
50581
50581
  const [ts] = utils.createPrinter(typescript);
50582
50582
  return dedent`
50583
50583
  import { hash, verify } from '@node-rs/argon2';
50584
- import { encodeBase64url } from '@oslojs/encoding';
50584
+ import { encodeBase32LowerCase } from '@oslojs/encoding';
50585
50585
  import { fail, redirect } from '@sveltejs/kit';
50586
50586
  import { eq } from 'drizzle-orm';
50587
50587
  import * as auth from '$lib/server/auth';
@@ -50672,7 +50672,7 @@ ${deleteSessionTokenCookie}`);
50672
50672
  function generateUserId() {
50673
50673
  // ID with 120 bits of entropy, or about the same as UUID v4.
50674
50674
  const bytes = crypto.getRandomValues(new Uint8Array(15));
50675
- const id = encodeBase64url(bytes);
50675
+ const id = encodeBase32LowerCase(bytes);
50676
50676
  return id;
50677
50677
  }
50678
50678