nuxt-atproto 0.0.1 → 0.0.2

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/README.md CHANGED
@@ -59,16 +59,16 @@ defineNuxtConfig({
59
59
  remote: '',
60
60
  // configuration for the local client_metadata.json
61
61
  local: {
62
- client_id: '',
63
- client_name: '',
64
- client_uri: '',
65
- logo_uri: '',
66
- tos_uri: '',
67
- policy_uri: '',
68
- redirect_uris: [''],
69
- scope: 'atproto',
70
- grant_types: [],
71
- response_types: [],
62
+ client_id: 'https://nuxt-atproto.pages.dev/client-metadata.json',
63
+ client_name: 'nuxt-atproto',
64
+ client_uri: 'https://nuxt-atproto.pages.dev',
65
+ logo_uri: 'https://nuxt-atproto.pages.dev/logo.png',
66
+ tos_uri: 'https://nuxt-atproto.pages.dev',
67
+ policy_uri: 'https://nuxt-atproto.pages.dev',
68
+ redirect_uris: ['https://nuxt-atproto.pages.dev'],
69
+ scope: "atproto transition:generic",
70
+ grant_types: ["authorization_code", "refresh_token"],
71
+ response_types: ["code"],
72
72
  token_endpoint_auth_method: 'none',
73
73
  application_type: 'web',
74
74
  dpop_bound_access_tokens: true
package/dist/module.d.mts CHANGED
@@ -30,7 +30,7 @@ interface AtprotoNuxtOptions {
30
30
  logo_uri: string
31
31
  tos_uri: string
32
32
  policy_uri: string
33
- redirect_uris: [string, ...string[]]
33
+ redirect_uris: string[]
34
34
  scope: string
35
35
  grant_types: Array<any>
36
36
  response_types: Array<any>
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-atproto",
3
3
  "configKey": "atproto",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.1",
7
7
  "unbuild": "3.5.0"
package/dist/module.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { mkdirSync, writeFileSync, rmSync } from 'node:fs';
1
+ import { mkdirSync, writeFileSync } from 'node:fs';
2
2
  import { defineNuxtModule, createResolver, addImportsDir, addPlugin } from '@nuxt/kit';
3
3
 
4
4
  const module = defineNuxtModule({
@@ -23,7 +23,7 @@ const module = defineNuxtModule({
23
23
  logo_uri: "",
24
24
  tos_uri: "",
25
25
  policy_uri: "",
26
- redirect_uris: [""],
26
+ redirect_uris: [],
27
27
  scope: "atproto",
28
28
  grant_types: [],
29
29
  response_types: [],
@@ -54,20 +54,16 @@ const module = defineNuxtModule({
54
54
  config.optimizeDeps.include.push("@atproto/oauth-client-browser");
55
55
  config.optimizeDeps.include.push("@atproto/api");
56
56
  });
57
- if (!_options.oauth.clientMetadata.remote) {
58
- try {
59
- mkdirSync(publicDir, { recursive: true });
60
- } catch (error) {
61
- console.error("Failed creating /public/client-metadata.json", error);
62
- return;
63
- }
64
- writeFileSync(
65
- publicDir + "/client-metadata.json",
66
- JSON.stringify(_options.oauth.clientMetadata.local, null, 2)
67
- );
68
- } else {
69
- rmSync(publicDir + "/client-metadata.json");
57
+ try {
58
+ mkdirSync(publicDir, { recursive: true });
59
+ } catch (error) {
60
+ console.error("Failed creating /public/client-metadata.json", error);
61
+ return;
70
62
  }
63
+ writeFileSync(
64
+ publicDir + "/client-metadata.json",
65
+ JSON.stringify(_options.oauth.clientMetadata.local, null, 2)
66
+ );
71
67
  addImportsDir(resolve("./runtime/composables"));
72
68
  addPlugin(resolve("./runtime/plugin.client"));
73
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-atproto",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Interact with AT Protocol and Bluesky in your Nuxt.js application",
5
5
  "keywords": [
6
6
  "nuxt",