tar-vern 0.1.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.
- package/LICENSE +21 -0
- package/README.md +219 -0
- package/README_pack.md +79 -0
- package/dist/generated/packageMetadata.d.ts +16 -0
- package/dist/generated/packageMetadata.d.ts.map +1 -0
- package/dist/index.cjs +324 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +324 -0
- package/dist/index.js.map +1 -0
- package/dist/packer.d.ts +20 -0
- package/dist/packer.d.ts.map +1 -0
- package/dist/types.d.ts +159 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils.d.ts +45 -0
- package/dist/utils.d.ts.map +1 -0
- package/package.json +48 -0
package/dist/utils.d.ts
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
/*!
|
2
|
+
* name: tar-vern
|
3
|
+
* version: 0.1.0
|
4
|
+
* description: Tape archiver library for Typescript
|
5
|
+
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
6
|
+
* license: MIT
|
7
|
+
* repository.url: https://github.com/kekyo/tar-vern.git
|
8
|
+
*/
|
9
|
+
|
10
|
+
import { Readable } from 'stream';
|
11
|
+
import { CreateItemOptions, CreateReadableItemOptions, FileItem, DirectoryItem, ReflectStats, CreateDirectoryItemOptions } from './types';
|
12
|
+
/**
|
13
|
+
* Create a DirectoryItem
|
14
|
+
* @param path - The path to the directory in the tar archive
|
15
|
+
* @param reflectStat - Whether to reflect optional stat of the file (mode, uid, gid, mtime. Default: 'none')
|
16
|
+
* @param options - Metadata for the directory including path in tar archive
|
17
|
+
* @returns A DirectoryItem
|
18
|
+
* @remarks When reflectStat is 'all' or 'exceptName', `options.directoryPath` must be provided.
|
19
|
+
*/
|
20
|
+
export declare const createDirectoryItem: (path: string, reflectStat?: ReflectStats, options?: CreateDirectoryItemOptions) => Promise<DirectoryItem>;
|
21
|
+
/**
|
22
|
+
* Create a FileItem from a Readable stream
|
23
|
+
* @param path - The path to the file in the tar archive
|
24
|
+
* @param reader - The readable stream
|
25
|
+
* @param options - Metadata for the file including path in tar archive
|
26
|
+
* @returns A FileItem
|
27
|
+
*/
|
28
|
+
export declare const createReadableItem: (path: string, reader: Readable, options?: CreateReadableItemOptions) => Promise<FileItem>;
|
29
|
+
/**
|
30
|
+
* Create a FileItem from a local file path
|
31
|
+
* @param path - The path to the file in the tar archive
|
32
|
+
* @param filePath - The path to the file to read from real filesystem
|
33
|
+
* @param reflectStat - Whether to reflect optional stat of the file (mode, uid, gid, mtime. Default: 'exceptName')
|
34
|
+
* @param options - Metadata for the file including path in tar archive
|
35
|
+
* @returns A FileItem
|
36
|
+
*/
|
37
|
+
export declare const createReadFileItem: (path: string, filePath: string, reflectStat?: ReflectStats, options?: CreateItemOptions) => Promise<FileItem>;
|
38
|
+
/**
|
39
|
+
* Store a readable stream to a file
|
40
|
+
* @param reader - The readable stream
|
41
|
+
* @param path - The path to the file to store the readable stream to
|
42
|
+
* @returns A promise that resolves when the stream is finished
|
43
|
+
*/
|
44
|
+
export declare const storeReaderToFile: (reader: Readable, path: string) => Promise<void>;
|
45
|
+
//# sourceMappingURL=utils.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAa1I;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAC9B,MAAM,MAAM,EACZ,cAAc,YAAY,EAC1B,UAAU,0BAA0B,KACnC,OAAO,CAAC,aAAa,CA2BvB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAC7B,MAAM,MAAM,EACZ,QAAQ,QAAQ,EAChB,UAAU,yBAAyB,KAClC,OAAO,CAAC,QAAQ,CAuClB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAC7B,MAAM,MAAM,EACZ,UAAU,MAAM,EAChB,cAAc,YAAY,EAC1B,UAAU,iBAAiB,KAC1B,OAAO,CAAC,QAAQ,CAoBlB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,QAAQ,QAAQ,EAAE,MAAM,MAAM,kBAO/D,CAAC"}
|
package/package.json
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
{
|
2
|
+
"name": "tar-vern",
|
3
|
+
"version": "0.1.0",
|
4
|
+
"description": "Tape archiver library for Typescript",
|
5
|
+
"keywords": [
|
6
|
+
"typescript",
|
7
|
+
"tar",
|
8
|
+
"async",
|
9
|
+
"stream"
|
10
|
+
],
|
11
|
+
"author": "Kouji Matsui (@kekyo@mi.kekyo.net)",
|
12
|
+
"license": "MIT",
|
13
|
+
"repository": {
|
14
|
+
"type": "git",
|
15
|
+
"url": "https://github.com/kekyo/tar-vern.git"
|
16
|
+
},
|
17
|
+
"homepage": "https://github.com/kekyo/tar-vern#readme",
|
18
|
+
"readme": "README_pack.md",
|
19
|
+
"type": "module",
|
20
|
+
"main": "./dist/index.cjs",
|
21
|
+
"module": "./dist/index.js",
|
22
|
+
"types": "./dist/index.d.ts",
|
23
|
+
"exports": {
|
24
|
+
".": {
|
25
|
+
"types": "./dist/index.d.ts",
|
26
|
+
"import": "./dist/index.js",
|
27
|
+
"require": "./dist/index.cjs"
|
28
|
+
}
|
29
|
+
},
|
30
|
+
"files": [
|
31
|
+
"dist",
|
32
|
+
"README_pack.md"
|
33
|
+
],
|
34
|
+
"scripts": {
|
35
|
+
"build": "vite build",
|
36
|
+
"test": "npm run build && vitest run",
|
37
|
+
"dump": "npm run build && screw-up dump",
|
38
|
+
"pack": "npm run build && screw-up pack --pack-destination artifacts/"
|
39
|
+
},
|
40
|
+
"devDependencies": {
|
41
|
+
"@types/node": ">=20.0.0",
|
42
|
+
"screw-up": ">=0.9.1",
|
43
|
+
"typescript": ">=5.0.0",
|
44
|
+
"vite": ">=5.0.0",
|
45
|
+
"vite-plugin-dts": ">=3.0.0",
|
46
|
+
"vitest": ">=1.0.0"
|
47
|
+
}
|
48
|
+
}
|