@atproto/common 0.2.0 → 0.3.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/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # @atproto/common
2
+
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`41ee177f`](https://github.com/bluesky-social/atproto/commit/41ee177f5a440490280d17acd8a89bcddaffb23b)]:
8
+ - @atproto/common-web@0.2.1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022-2023 Bluesky PBC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,10 @@
1
- # ATP Common Library
1
+ # @atproto/common
2
2
 
3
- A library containing code which is shared between ATP packages.
3
+ Shared TypeScript code for other `@atproto/*` packages. This package is oriented towards writing servers, and is not designed to be browser-compatible.
4
+
5
+ [![NPM](https://img.shields.io/npm/v/@atproto/common)](https://www.npmjs.com/package/@atproto/common)
6
+ [![Github CI Status](https://github.com/bluesky-social/atproto/actions/workflows/repo.yaml/badge.svg)](https://github.com/bluesky-social/atproto/actions/workflows/repo.yaml)
7
+
8
+ ## License
9
+
10
+ MIT License
package/build.js CHANGED
@@ -1,16 +1,8 @@
1
- const pkgJson = require('@npmcli/package-json')
2
1
  const { nodeExternalsPlugin } = require('esbuild-node-externals')
3
2
 
4
3
  const buildShallow =
5
4
  process.argv.includes('--shallow') || process.env.ATP_BUILD_SHALLOW === 'true'
6
5
 
7
- if (process.argv.includes('--update-main-to-dist')) {
8
- return pkgJson
9
- .load(__dirname)
10
- .then((pkg) => pkg.update({ main: 'dist/index.js' }))
11
- .then((pkg) => pkg.save())
12
- }
13
-
14
6
  require('esbuild').build({
15
7
  logLevel: 'info',
16
8
  entryPoints: ['src/index.ts'],
@@ -0,0 +1,3 @@
1
+ /// <reference types="node" />
2
+ export declare function ui8ToBuffer(bytes: Uint8Array): Buffer;
3
+ export declare function ui8ToArrayBuffer(bytes: Uint8Array): ArrayBuffer;
@@ -0,0 +1 @@
1
+ export declare function toSimplifiedISOSafe(dateStr: string): string;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  export * from '@atproto/common-web';
2
+ export * from './dates';
2
3
  export * from './fs';
3
4
  export * from './ipld';
4
5
  export * from './ipld-multi';
5
6
  export * from './logger';
6
7
  export * from './streams';
8
+ export * from './buffers';