Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@atproto/xrpc

Package Overview
Dependencies
Maintainers
4
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atproto/xrpc - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

CHANGELOG.md

8

build.js

@@ -1,2 +0,1 @@

const pkgJson = require('@npmcli/package-json')
const { nodeExternalsPlugin } = require('esbuild-node-externals')

@@ -7,9 +6,2 @@

if (process.argv.includes('--update-main-to-dist')) {
return pkgJson
.load(__dirname)
.then((pkg) => pkg.update({ main: 'dist/index.js' }))
.then((pkg) => pkg.save())
}
require('esbuild').build({

@@ -16,0 +8,0 @@ logLevel: 'info',

30

package.json
{
"name": "@atproto/xrpc",
"version": "0.3.0",
"version": "0.3.1",
"main": "dist/index.js",
"scripts": {
"prettier": "prettier --check src/",
"prettier:fix": "prettier --write src/",
"lint": "eslint . --ext .ts,.tsx",
"lint:fix": "yarn lint --fix",
"verify": "run-p prettier lint",
"verify:fix": "yarn prettier:fix && yarn lint:fix",
"build": "node ./build.js",
"postbuild": "tsc --build tsconfig.build.json",
"update-main-to-dist": "node ./update-pkg.js --update-main-to-dist",
"update-main-to-src": "node ./update-pkg.js --update-main-to-src",
"prepublish": "npm run update-main-to-dist",
"postpublish": "npm run update-main-to-src"
},
"license": "MIT",

@@ -26,5 +12,11 @@ "repository": {

"dependencies": {
"@atproto/lexicon": "*",
"zod": "^3.21.4"
}
}
"zod": "^3.21.4",
"@atproto/lexicon": "^0.2.1"
},
"scripts": {
"build": "node ./build.js",
"postbuild": "tsc --build tsconfig.build.json",
"update-main-to-dist": "node ../../update-main-to-dist.js packages/xrpc"
},
"types": "dist/index.d.ts"
}

@@ -17,3 +17,3 @@ # XRPC API

type: 'params',
properties: {message: { type: 'string' }}
properties: { message: { type: 'string' } },
},

@@ -25,5 +25,5 @@ output: {

required: ['message'],
properties: {message: { type: 'string' }},
properties: { message: { type: 'string' } },
},
}
},
},

@@ -33,6 +33,10 @@ },

const res1 = await xrpc.call('https://example.com', 'io.example.ping', {message: 'hello world'})
const res1 = await xrpc.call('https://example.com', 'io.example.ping', {
message: 'hello world',
})
res1.encoding // => 'application/json'
res1.body // => {message: 'hello world'}
const res2 = await xrpc.service('https://example.com').call('io.example.ping', {message: 'hello world'})
const res2 = await xrpc
.service('https://example.com')
.call('io.example.ping', { message: 'hello world' })
res2.encoding // => 'application/json'

@@ -50,6 +54,6 @@ res2.body // => {message: 'hello world'}

type: 'params',
properties: {fileName: { type: 'string' }},
properties: { fileName: { type: 'string' } },
},
input: {
encoding: 'application/json'
encoding: 'application/json',
},

@@ -60,8 +64,7 @@ },

const res3 = await xrpc
.service('https://example.com')
.call('io.example.writeJsonFile',
{fileName: 'foo.json'}, // query parameters
{hello: 'world', thisIs: 'the file to write'} // input body
)
const res3 = await xrpc.service('https://example.com').call(
'io.example.writeJsonFile',
{ fileName: 'foo.json' }, // query parameters
{ hello: 'world', thisIs: 'the file to write' }, // input body
)
```

@@ -68,0 +71,0 @@

{
"extends": "./tsconfig.json",
"exclude": ["**/*.spec.ts", "**/*.test.ts"]
}
}

@@ -8,3 +8,3 @@ {

},
"include": ["./src","__tests__/**/**.ts"],
"include": ["./src", "__tests__/**/**.ts"],
"references": [

@@ -14,2 +14,2 @@ { "path": "../common/tsconfig.build.json" },

]
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc