fix(core): update
This commit is contained in:
parent
d90e833270
commit
fbdb75d673
66
.gitea/workflows/default_nottags.yaml
Normal file
66
.gitea/workflows/default_nottags.yaml
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
name: Default (not tags)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags-ignore:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||||
|
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||||
|
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||||
|
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||||
|
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
security:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install pnpm and npmci
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
|
||||||
|
- name: Run npm prepare
|
||||||
|
run: npmci npm prepare
|
||||||
|
|
||||||
|
- name: Audit production dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --prod
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Audit development dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --dev
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
test:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs: security
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Test stable
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm test
|
||||||
|
|
||||||
|
- name: Test build
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm build
|
124
.gitea/workflows/default_tags.yaml
Normal file
124
.gitea/workflows/default_tags.yaml
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
name: Default (tags)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||||
|
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||||
|
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||||
|
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||||
|
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
security:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Audit production dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --prod
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Audit development dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --dev
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
test:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs: security
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Test stable
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm test
|
||||||
|
|
||||||
|
- name: Test build
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm build
|
||||||
|
|
||||||
|
release:
|
||||||
|
needs: test
|
||||||
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm publish
|
||||||
|
|
||||||
|
metadata:
|
||||||
|
needs: test
|
||||||
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Code quality
|
||||||
|
run: |
|
||||||
|
npmci command npm install -g typescript
|
||||||
|
npmci npm install
|
||||||
|
|
||||||
|
- name: Trigger
|
||||||
|
run: npmci trigger
|
||||||
|
|
||||||
|
- name: Build docs and upload artifacts
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
pnpm install -g @gitzone/tsdoc
|
||||||
|
npmci command tsdoc
|
||||||
|
continue-on-error: true
|
137
.gitlab-ci.yml
137
.gitlab-ci.yml
@ -1,137 +0,0 @@
|
|||||||
# gitzone ci_default
|
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
|
||||||
|
|
||||||
cache:
|
|
||||||
paths:
|
|
||||||
- .npmci_cache/
|
|
||||||
key: '$CI_BUILD_STAGE'
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- security
|
|
||||||
- test
|
|
||||||
- release
|
|
||||||
- metadata
|
|
||||||
|
|
||||||
# ====================
|
|
||||||
# security stage
|
|
||||||
# ====================
|
|
||||||
mirror:
|
|
||||||
stage: security
|
|
||||||
script:
|
|
||||||
- npmci git mirror
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
tags:
|
|
||||||
- lossless
|
|
||||||
- docker
|
|
||||||
- notpriv
|
|
||||||
|
|
||||||
auditProductionDependencies:
|
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
|
||||||
stage: security
|
|
||||||
script:
|
|
||||||
- npmci npm prepare
|
|
||||||
- npmci command npm install --production --ignore-scripts
|
|
||||||
- npmci command npm config set registry https://registry.npmjs.org
|
|
||||||
- npmci command npm audit --audit-level=high --only=prod --production
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
auditDevDependencies:
|
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
|
||||||
stage: security
|
|
||||||
script:
|
|
||||||
- npmci npm prepare
|
|
||||||
- npmci command npm install --ignore-scripts
|
|
||||||
- npmci command npm config set registry https://registry.npmjs.org
|
|
||||||
- npmci command npm audit --audit-level=high --only=dev
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
# ====================
|
|
||||||
# test stage
|
|
||||||
# ====================
|
|
||||||
|
|
||||||
testStable:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- npmci npm prepare
|
|
||||||
- npmci node install stable
|
|
||||||
- npmci npm install
|
|
||||||
- npmci npm test
|
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
testBuild:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- npmci npm prepare
|
|
||||||
- npmci node install stable
|
|
||||||
- npmci npm install
|
|
||||||
- npmci command npm run build
|
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
release:
|
|
||||||
stage: release
|
|
||||||
script:
|
|
||||||
- npmci node install stable
|
|
||||||
- npmci npm publish
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
tags:
|
|
||||||
- lossless
|
|
||||||
- docker
|
|
||||||
- notpriv
|
|
||||||
|
|
||||||
# ====================
|
|
||||||
# metadata stage
|
|
||||||
# ====================
|
|
||||||
codequality:
|
|
||||||
stage: metadata
|
|
||||||
allow_failure: true
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
script:
|
|
||||||
- npmci command npm install -g tslint typescript
|
|
||||||
- npmci npm prepare
|
|
||||||
- npmci npm install
|
|
||||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
|
||||||
tags:
|
|
||||||
- lossless
|
|
||||||
- docker
|
|
||||||
- priv
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
stage: metadata
|
|
||||||
script:
|
|
||||||
- npmci trigger
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
tags:
|
|
||||||
- lossless
|
|
||||||
- docker
|
|
||||||
- notpriv
|
|
||||||
|
|
||||||
pages:
|
|
||||||
stage: metadata
|
|
||||||
script:
|
|
||||||
- npmci node install lts
|
|
||||||
- npmci command npm install -g @gitzone/tsdoc
|
|
||||||
- npmci npm prepare
|
|
||||||
- npmci npm install
|
|
||||||
- npmci command tsdoc
|
|
||||||
tags:
|
|
||||||
- lossless
|
|
||||||
- docker
|
|
||||||
- notpriv
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
artifacts:
|
|
||||||
expire_in: 1 week
|
|
||||||
paths:
|
|
||||||
- public
|
|
||||||
allow_failure: true
|
|
24
.vscode/launch.json
vendored
24
.vscode/launch.json
vendored
@ -2,28 +2,10 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "current file",
|
"command": "npm test",
|
||||||
"type": "node",
|
"name": "Run npm test",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"args": [
|
"type": "node-terminal"
|
||||||
"${relativeFile}"
|
|
||||||
],
|
|
||||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
|
||||||
"cwd": "${workspaceRoot}",
|
|
||||||
"protocol": "inspector",
|
|
||||||
"internalConsoleOptions": "openOnSessionStart"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "test.ts",
|
|
||||||
"type": "node",
|
|
||||||
"request": "launch",
|
|
||||||
"args": [
|
|
||||||
"test/test.ts"
|
|
||||||
],
|
|
||||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
|
||||||
"cwd": "${workspaceRoot}",
|
|
||||||
"protocol": "inspector",
|
|
||||||
"internalConsoleOptions": "openOnSessionStart"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
10
dist_ts/smartarchive.classes.smartarchive.d.ts
vendored
10
dist_ts/smartarchive.classes.smartarchive.d.ts
vendored
@ -1,7 +1,6 @@
|
|||||||
/// <reference types="node" resolution-mode="require"/>
|
/// <reference types="node" resolution-mode="require"/>
|
||||||
import * as plugins from './smartarchive.plugins.js';
|
import * as plugins from './smartarchive.plugins.js';
|
||||||
export declare class SmartArchive {
|
export declare class SmartArchive {
|
||||||
archiveDirectory: string;
|
|
||||||
constructor();
|
constructor();
|
||||||
/**
|
/**
|
||||||
* extracts an archive from a given url
|
* extracts an archive from a given url
|
||||||
@ -10,13 +9,18 @@ export declare class SmartArchive {
|
|||||||
/**
|
/**
|
||||||
* extracts an archive from a given filePath on disk
|
* extracts an archive from a given filePath on disk
|
||||||
* @param filePathArg
|
* @param filePathArg
|
||||||
* @param targetDir
|
* @param targetDirArg
|
||||||
*/
|
*/
|
||||||
extractArchiveFromFilePathToFs(filePathArg: string, targetDir: string): Promise<void>;
|
extractArchiveFromFilePathToFs(filePathArg: string, targetDirArg: string): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* extracts to Observable
|
* extracts to Observable
|
||||||
|
* where the Observable is emitting smartfiles
|
||||||
*/
|
*/
|
||||||
extractArchiveFromBufferToObservable(bufferArg: Buffer): Promise<plugins.smartrx.rxjs.ReplaySubject<plugins.smartfile.Smartfile>>;
|
extractArchiveFromBufferToObservable(bufferArg: Buffer): Promise<plugins.smartrx.rxjs.ReplaySubject<plugins.smartfile.Smartfile>>;
|
||||||
|
extractArchiveWithIntakeAndReplaySubject(): {
|
||||||
|
intake: plugins.smartstream.StreamIntake<Buffer>;
|
||||||
|
replaySubject: plugins.smartrx.rxjs.ReplaySubject<plugins.smartfile.Smartfile>;
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* extracts to Observable
|
* extracts to Observable
|
||||||
*/
|
*/
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
|||||||
import * as plugins from './smartarchive.plugins.js';
|
import * as plugins from './smartarchive.plugins.js';
|
||||||
export const packageDir = plugins.path.join(plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url), '../');
|
export const packageDir = plugins.path.join(plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url), '../');
|
||||||
export const nogitDir = plugins.path.join(packageDir, './.nogit');
|
export const nogitDir = plugins.path.join(packageDir, './.nogit');
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhcmNoaXZlLnBhdGhzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRhcmNoaXZlLnBhdGhzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sMkJBQTJCLENBQUM7QUFFckQsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLHdCQUF3QixDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsS0FBSyxDQUFDLENBQUM7QUFDcEgsTUFBTSxDQUFDLE1BQU0sUUFBUSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLFVBQVUsRUFBRSxVQUFVLENBQUMsQ0FBQyJ9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhcmNoaXZlLnBhdGhzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRhcmNoaXZlLnBhdGhzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sMkJBQTJCLENBQUM7QUFFckQsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUN6QyxPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyx3QkFBd0IsQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUMvRCxLQUFLLENBQ04sQ0FBQztBQUNGLE1BQU0sQ0FBQyxNQUFNLFFBQVEsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxVQUFVLEVBQUUsVUFBVSxDQUFDLENBQUMifQ==
|
15
dist_ts/smartarchive.plugins.d.ts
vendored
15
dist_ts/smartarchive.plugins.d.ts
vendored
@ -1,12 +1,13 @@
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
export { path };
|
export { path };
|
||||||
import * as smartfile from '@pushrocks/smartfile';
|
import * as smartfile from '@push.rocks/smartfile';
|
||||||
import * as smartpath from '@pushrocks/smartpath';
|
import * as smartpath from '@push.rocks/smartpath';
|
||||||
import * as smartrequest from '@pushrocks/smartrequest';
|
import * as smartpromise from '@push.rocks/smartpromise';
|
||||||
import * as smartunique from '@pushrocks/smartunique';
|
import * as smartrequest from '@push.rocks/smartrequest';
|
||||||
import * as smartstream from '@pushrocks/smartstream';
|
import * as smartunique from '@push.rocks/smartunique';
|
||||||
import * as smartrx from '@pushrocks/smartrx';
|
import * as smartstream from '@push.rocks/smartstream';
|
||||||
export { smartfile, smartpath, smartrequest, smartunique, smartstream, smartrx };
|
import * as smartrx from '@push.rocks/smartrx';
|
||||||
|
export { smartfile, smartpath, smartpromise, smartrequest, smartunique, smartstream, smartrx };
|
||||||
import gunzipMaybe from 'gunzip-maybe';
|
import gunzipMaybe from 'gunzip-maybe';
|
||||||
import tar from 'tar';
|
import tar from 'tar';
|
||||||
import tarStream from 'tar-stream';
|
import tarStream from 'tar-stream';
|
||||||
|
@ -2,17 +2,18 @@
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
export { path };
|
export { path };
|
||||||
// @pushrocks scope
|
// @pushrocks scope
|
||||||
import * as smartfile from '@pushrocks/smartfile';
|
import * as smartfile from '@push.rocks/smartfile';
|
||||||
import * as smartpath from '@pushrocks/smartpath';
|
import * as smartpath from '@push.rocks/smartpath';
|
||||||
import * as smartrequest from '@pushrocks/smartrequest';
|
import * as smartpromise from '@push.rocks/smartpromise';
|
||||||
import * as smartunique from '@pushrocks/smartunique';
|
import * as smartrequest from '@push.rocks/smartrequest';
|
||||||
import * as smartstream from '@pushrocks/smartstream';
|
import * as smartunique from '@push.rocks/smartunique';
|
||||||
import * as smartrx from '@pushrocks/smartrx';
|
import * as smartstream from '@push.rocks/smartstream';
|
||||||
export { smartfile, smartpath, smartrequest, smartunique, smartstream, smartrx };
|
import * as smartrx from '@push.rocks/smartrx';
|
||||||
|
export { smartfile, smartpath, smartpromise, smartrequest, smartunique, smartstream, smartrx };
|
||||||
// third party scope
|
// third party scope
|
||||||
import gunzipMaybe from 'gunzip-maybe';
|
import gunzipMaybe from 'gunzip-maybe';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import tar from 'tar';
|
import tar from 'tar';
|
||||||
import tarStream from 'tar-stream';
|
import tarStream from 'tar-stream';
|
||||||
export { gunzipMaybe, tar, tarStream };
|
export { gunzipMaybe, tar, tarStream };
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhcmNoaXZlLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydGFyY2hpdmUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxvQkFBb0I7QUFDcEIsT0FBTyxLQUFLLElBQUksTUFBTSxNQUFNLENBQUM7QUFFN0IsT0FBTyxFQUFFLElBQUksRUFBRSxDQUFDO0FBRWhCLG1CQUFtQjtBQUNuQixPQUFPLEtBQUssU0FBUyxNQUFNLHNCQUFzQixDQUFDO0FBQ2xELE9BQU8sS0FBSyxTQUFTLE1BQU0sc0JBQXNCLENBQUM7QUFDbEQsT0FBTyxLQUFLLFlBQVksTUFBTSx5QkFBeUIsQ0FBQztBQUN4RCxPQUFPLEtBQUssV0FBVyxNQUFNLHdCQUF3QixDQUFDO0FBQ3RELE9BQU8sS0FBSyxXQUFXLE1BQU0sd0JBQXdCLENBQUM7QUFDdEQsT0FBTyxLQUFLLE9BQU8sTUFBTSxvQkFBb0IsQ0FBQztBQUU5QyxPQUFPLEVBQUUsU0FBUyxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsV0FBVyxFQUFFLFdBQVcsRUFBRSxPQUFPLEVBQUUsQ0FBQztBQUVqRixvQkFBb0I7QUFDcEIsT0FBTyxXQUFXLE1BQU0sY0FBYyxDQUFDO0FBRXZDLGFBQWE7QUFDYixPQUFPLEdBQUcsTUFBTSxLQUFLLENBQUM7QUFDdEIsT0FBTyxTQUFTLE1BQU0sWUFBWSxDQUFDO0FBRW5DLE9BQU8sRUFBRSxXQUFXLEVBQUUsR0FBRyxFQUFFLFNBQVMsRUFBRSxDQUFDIn0=
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhcmNoaXZlLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydGFyY2hpdmUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxvQkFBb0I7QUFDcEIsT0FBTyxLQUFLLElBQUksTUFBTSxNQUFNLENBQUM7QUFFN0IsT0FBTyxFQUFFLElBQUksRUFBRSxDQUFDO0FBRWhCLG1CQUFtQjtBQUNuQixPQUFPLEtBQUssU0FBUyxNQUFNLHVCQUF1QixDQUFDO0FBQ25ELE9BQU8sS0FBSyxTQUFTLE1BQU0sdUJBQXVCLENBQUM7QUFDbkQsT0FBTyxLQUFLLFlBQVksTUFBTSwwQkFBMEIsQ0FBQztBQUN6RCxPQUFPLEtBQUssWUFBWSxNQUFNLDBCQUEwQixDQUFDO0FBQ3pELE9BQU8sS0FBSyxXQUFXLE1BQU0seUJBQXlCLENBQUM7QUFDdkQsT0FBTyxLQUFLLFdBQVcsTUFBTSx5QkFBeUIsQ0FBQztBQUN2RCxPQUFPLEtBQUssT0FBTyxNQUFNLHFCQUFxQixDQUFDO0FBRS9DLE9BQU8sRUFBRSxTQUFTLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxZQUFZLEVBQUUsV0FBVyxFQUFFLFdBQVcsRUFBRSxPQUFPLEVBQUUsQ0FBQztBQUUvRixvQkFBb0I7QUFDcEIsT0FBTyxXQUFXLE1BQU0sY0FBYyxDQUFDO0FBRXZDLGFBQWE7QUFDYixPQUFPLEdBQUcsTUFBTSxLQUFLLENBQUM7QUFDdEIsT0FBTyxTQUFTLE1BQU0sWUFBWSxDQUFDO0FBRW5DLE9BQU8sRUFBRSxXQUFXLEVBQUUsR0FBRyxFQUFFLFNBQVMsRUFBRSxDQUFDIn0=
|
@ -9,7 +9,7 @@
|
|||||||
"githost": "gitlab.com",
|
"githost": "gitlab.com",
|
||||||
"gitscope": "push.rocks",
|
"gitscope": "push.rocks",
|
||||||
"gitrepo": "smartarchive",
|
"gitrepo": "smartarchive",
|
||||||
"shortDescription": "work with archives",
|
"description": "work with archives",
|
||||||
"npmPackagename": "@push.rocks/smartarchive",
|
"npmPackagename": "@push.rocks/smartarchive",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
|
11924
package-lock.json
generated
11924
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
30
package.json
30
package.json
@ -7,7 +7,8 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/ --web)",
|
"test": "(tstest test/ --web)",
|
||||||
"build": "tsbuild --web --allowimplicitany"
|
"build": "tsbuild --web --allowimplicitany",
|
||||||
|
"buildDocs": "tsdoc"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -20,25 +21,24 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/pushrocks/smartarchive#readme",
|
"homepage": "https://github.com/pushrocks/smartarchive#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartfile": "^10.0.1",
|
"@push.rocks/smartfile": "^10.0.28",
|
||||||
"@pushrocks/smartpath": "^5.0.5",
|
"@push.rocks/smartpath": "^5.0.11",
|
||||||
"@pushrocks/smartpromise": "^3.1.7",
|
"@push.rocks/smartpromise": "^4.0.3",
|
||||||
"@pushrocks/smartrequest": "^1.1.56",
|
"@push.rocks/smartrequest": "^2.0.18",
|
||||||
"@pushrocks/smartrx": "^2.0.25",
|
"@push.rocks/smartrx": "^3.0.6",
|
||||||
"@pushrocks/smartstream": "^2.0.2",
|
"@push.rocks/smartstream": "^2.0.4",
|
||||||
"@pushrocks/smartunique": "^3.0.3",
|
"@push.rocks/smartunique": "^3.0.3",
|
||||||
"@types/gunzip-maybe": "^1.4.0",
|
"@types/gunzip-maybe": "^1.4.0",
|
||||||
"@types/tar-stream": "^2.2.2",
|
"@types/tar-stream": "^2.2.2",
|
||||||
"gunzip-maybe": "^1.4.2",
|
"gunzip-maybe": "^1.4.2",
|
||||||
"tar": "^6.1.11",
|
"tar": "^6.1.15",
|
||||||
"tar-stream": "^2.2.0"
|
"tar-stream": "^3.1.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.63",
|
"@gitzone/tsbuild": "^2.1.66",
|
||||||
"@gitzone/tstest": "^1.0.71",
|
"@gitzone/tsrun": "^1.2.44",
|
||||||
"@pushrocks/tapbundle": "^5.0.3",
|
"@gitzone/tstest": "^1.0.77",
|
||||||
"tslint": "^6.1.3",
|
"@push.rocks/tapbundle": "^5.0.12"
|
||||||
"tslint-config-prettier": "^1.18.0"
|
|
||||||
},
|
},
|
||||||
"private": false,
|
"private": false,
|
||||||
"files": [
|
"files": [
|
||||||
|
1856
pnpm-lock.yaml
generated
1856
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
30
readme.md
30
readme.md
@ -1,27 +1,26 @@
|
|||||||
# @pushrocks/smartarchive
|
# @push.rocks/smartarchive
|
||||||
work with archives
|
work with archives
|
||||||
|
|
||||||
## Availabililty and Links
|
## Availabililty and Links
|
||||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartarchive)
|
* [npmjs.org (npm package)](https://www.npmjs.com/package/@push.rocks/smartarchive)
|
||||||
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartarchive)
|
* [gitlab.com (source)](https://gitlab.com/push.rocks/smartarchive)
|
||||||
* [github.com (source mirror)](https://github.com/pushrocks/smartarchive)
|
* [github.com (source mirror)](https://github.com/push.rocks/smartarchive)
|
||||||
* [docs (typedoc)](https://pushrocks.gitlab.io/smartarchive/)
|
* [docs (typedoc)](https://push.rocks.gitlab.io/smartarchive/)
|
||||||
|
|
||||||
## Status for master
|
## Status for master
|
||||||
|
|
||||||
Status Category | Status Badge
|
Status Category | Status Badge
|
||||||
-- | --
|
-- | --
|
||||||
GitLab Pipelines | [![pipeline status](https://gitlab.com/pushrocks/smartarchive/badges/master/pipeline.svg)](https://lossless.cloud)
|
GitLab Pipelines | [![pipeline status](https://gitlab.com/push.rocks/smartarchive/badges/master/pipeline.svg)](https://lossless.cloud)
|
||||||
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/pushrocks/smartarchive/badges/master/coverage.svg)](https://lossless.cloud)
|
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/push.rocks/smartarchive/badges/master/coverage.svg)](https://lossless.cloud)
|
||||||
npm | [![npm downloads per month](https://badgen.net/npm/dy/@pushrocks/smartarchive)](https://lossless.cloud)
|
npm | [![npm downloads per month](https://badgen.net/npm/dy/@push.rocks/smartarchive)](https://lossless.cloud)
|
||||||
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/pushrocks/smartarchive)](https://lossless.cloud)
|
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/push.rocks/smartarchive)](https://lossless.cloud)
|
||||||
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
|
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
|
||||||
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
|
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
|
||||||
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smartarchive)](https://lossless.cloud)
|
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@push.rocks/smartarchive)](https://lossless.cloud)
|
||||||
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartarchive)](https://lossless.cloud)
|
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@push.rocks/smartarchive)](https://lossless.cloud)
|
||||||
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartarchive)](https://lossless.cloud)
|
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@push.rocks/smartarchive)](https://lossless.cloud)
|
||||||
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@ -50,7 +49,6 @@ We are always happy for code contributions. If you are not the code contributing
|
|||||||
|
|
||||||
For further information read the linked docs at the top of this readme.
|
For further information read the linked docs at the top of this readme.
|
||||||
|
|
||||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
## Legal
|
||||||
|
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
|
||||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||||
|
|
||||||
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)
|
|
||||||
|
30
test/test.ts
30
test/test.ts
@ -1,9 +1,9 @@
|
|||||||
import { tap, expect } from '@pushrocks/tapbundle';
|
import { tap, expect } from '@push.rocks/tapbundle';
|
||||||
|
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as smartpath from '@pushrocks/smartpath';
|
import * as smartpath from '@push.rocks/smartpath';
|
||||||
import * as smartfile from '@pushrocks/smartfile';
|
import * as smartfile from '@push.rocks/smartfile';
|
||||||
import * as smartrequest from '@pushrocks/smartrequest';
|
import * as smartrequest from '@push.rocks/smartrequest';
|
||||||
|
|
||||||
const testPlugins = {
|
const testPlugins = {
|
||||||
path,
|
path,
|
||||||
@ -12,8 +12,14 @@ const testPlugins = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const testPaths = {
|
const testPaths = {
|
||||||
nogitDir: testPlugins.path.join(smartpath.get.dirnameFromImportMetaUrl(import.meta.url), '../.nogit/'),
|
nogitDir: testPlugins.path.join(
|
||||||
remoteDir: testPlugins.path.join(smartpath.get.dirnameFromImportMetaUrl(import.meta.url), '../.nogit/remote'),
|
smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
|
||||||
|
'../.nogit/'
|
||||||
|
),
|
||||||
|
remoteDir: testPlugins.path.join(
|
||||||
|
smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
|
||||||
|
'../.nogit/remote'
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
import * as smartarchive from '../ts/index.js';
|
import * as smartarchive from '../ts/index.js';
|
||||||
@ -25,7 +31,7 @@ tap.preTask('should prepare .nogit dir', async () => {
|
|||||||
tap.preTask('should prepare downloads', async (tools) => {
|
tap.preTask('should prepare downloads', async (tools) => {
|
||||||
const downloadedFile: Buffer = (
|
const downloadedFile: Buffer = (
|
||||||
await testPlugins.smartrequest.getBinary(
|
await testPlugins.smartrequest.getBinary(
|
||||||
'https://verdaccio.lossless.one/@pushrocks%2fwebsetup/-/websetup-2.0.14.tgz'
|
'https://verdaccio.lossless.digital/@pushrocks%2fwebsetup/-/websetup-2.0.14.tgz'
|
||||||
)
|
)
|
||||||
).body;
|
).body;
|
||||||
await testPlugins.smartfile.memory.toFs(
|
await testPlugins.smartfile.memory.toFs(
|
||||||
@ -45,7 +51,7 @@ tap.test('should extract existing files on disk', async () => {
|
|||||||
tap.test('should download a package from the registry', async () => {
|
tap.test('should download a package from the registry', async () => {
|
||||||
const testSmartarchive = new smartarchive.SmartArchive();
|
const testSmartarchive = new smartarchive.SmartArchive();
|
||||||
await testSmartarchive.extractArchiveFromUrlToFs(
|
await testSmartarchive.extractArchiveFromUrlToFs(
|
||||||
'https://verdaccio.lossless.one/@pushrocks%2fsmartfile/-/smartfile-7.0.11.tgz',
|
'https://verdaccio.lossless.digital/@pushrocks%2fsmartfile/-/smartfile-7.0.11.tgz',
|
||||||
testPaths.remoteDir
|
testPaths.remoteDir
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -79,9 +85,10 @@ tap.test('should extract a file from url to replaySubject', async (tools) => {
|
|||||||
const done = tools.defer();
|
const done = tools.defer();
|
||||||
const testSmartarchive = new smartarchive.SmartArchive();
|
const testSmartarchive = new smartarchive.SmartArchive();
|
||||||
const extractionFileObservable = await testSmartarchive.extractArchiveFromUrlToObservable(
|
const extractionFileObservable = await testSmartarchive.extractArchiveFromUrlToObservable(
|
||||||
'https://verdaccio.lossless.one/@pushrocks%2fwebsetup/-/websetup-2.0.14.tgz'
|
'https://verdaccio.lossless.digital/@pushrocks%2fwebsetup/-/websetup-2.0.14.tgz'
|
||||||
);
|
);
|
||||||
const subscription = extractionFileObservable.subscribe((file) => {
|
const subscription = extractionFileObservable.subscribe(
|
||||||
|
(file) => {
|
||||||
console.log(file.path);
|
console.log(file.path);
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
@ -89,7 +96,8 @@ tap.test('should extract a file from url to replaySubject', async (tools) => {
|
|||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
done.resolve();
|
done.resolve();
|
||||||
});
|
}
|
||||||
|
);
|
||||||
await done.promise;
|
await done.promise;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* autocreated commitinfo by @pushrocks/commitinfo
|
* autocreated commitinfo by @pushrocks/commitinfo
|
||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@pushrocks/smartarchive',
|
name: '@push.rocks/smartarchive',
|
||||||
version: '3.0.6',
|
version: '3.0.7',
|
||||||
description: 'work with archives'
|
description: 'work with archives'
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ export class SmartArchive {
|
|||||||
stream.on('end', () => {
|
stream.on('end', () => {
|
||||||
console.log(`extracted ${header.name}`);
|
console.log(`extracted ${header.name}`);
|
||||||
next();
|
next();
|
||||||
})
|
});
|
||||||
stream.resume();
|
stream.resume();
|
||||||
});
|
});
|
||||||
extractPipeStop.on('finish', () => {
|
extractPipeStop.on('finish', () => {
|
||||||
@ -48,9 +48,7 @@ export class SmartArchive {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// lets run the stream
|
// lets run the stream
|
||||||
readableStream
|
readableStream.pipe(plugins.gunzipMaybe()).pipe(extractPipeStop);
|
||||||
.pipe(plugins.gunzipMaybe())
|
|
||||||
.pipe(extractPipeStop);
|
|
||||||
await done.promise;
|
await done.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +84,7 @@ export class SmartArchive {
|
|||||||
new plugins.smartfile.Smartfile({
|
new plugins.smartfile.Smartfile({
|
||||||
base: null, // no working directory for this one
|
base: null, // no working directory for this one
|
||||||
contentBuffer: fileBuffer,
|
contentBuffer: fileBuffer,
|
||||||
path: `${header.name}`
|
path: `${header.name}`,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
next();
|
next();
|
||||||
@ -97,12 +95,10 @@ export class SmartArchive {
|
|||||||
replaySubject.complete();
|
replaySubject.complete();
|
||||||
});
|
});
|
||||||
// lets run the stream
|
// lets run the stream
|
||||||
readableStream
|
readableStream.pipe(plugins.gunzipMaybe()).pipe(extractPipeStop);
|
||||||
.pipe(plugins.gunzipMaybe())
|
|
||||||
.pipe(extractPipeStop);
|
|
||||||
return {
|
return {
|
||||||
intake,
|
intake,
|
||||||
replaySubject
|
replaySubject,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,9 +114,7 @@ export class SmartArchive {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
public async extractArchiveFromUrlToStream() {
|
public async extractArchiveFromUrlToStream() {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
public async extractArchiveFromFilePathToStream() {}
|
public async extractArchiveFromFilePathToStream() {}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
import * as plugins from './smartarchive.plugins.js';
|
import * as plugins from './smartarchive.plugins.js';
|
||||||
|
|
||||||
export const packageDir = plugins.path.join(plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url), '../');
|
export const packageDir = plugins.path.join(
|
||||||
|
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
|
||||||
|
'../'
|
||||||
|
);
|
||||||
export const nogitDir = plugins.path.join(packageDir, './.nogit');
|
export const nogitDir = plugins.path.join(packageDir, './.nogit');
|
||||||
|
@ -4,13 +4,13 @@ import * as path from 'path';
|
|||||||
export { path };
|
export { path };
|
||||||
|
|
||||||
// @pushrocks scope
|
// @pushrocks scope
|
||||||
import * as smartfile from '@pushrocks/smartfile';
|
import * as smartfile from '@push.rocks/smartfile';
|
||||||
import * as smartpath from '@pushrocks/smartpath';
|
import * as smartpath from '@push.rocks/smartpath';
|
||||||
import * as smartpromise from '@pushrocks/smartpromise';
|
import * as smartpromise from '@push.rocks/smartpromise';
|
||||||
import * as smartrequest from '@pushrocks/smartrequest';
|
import * as smartrequest from '@push.rocks/smartrequest';
|
||||||
import * as smartunique from '@pushrocks/smartunique';
|
import * as smartunique from '@push.rocks/smartunique';
|
||||||
import * as smartstream from '@pushrocks/smartstream';
|
import * as smartstream from '@push.rocks/smartstream';
|
||||||
import * as smartrx from '@pushrocks/smartrx';
|
import * as smartrx from '@push.rocks/smartrx';
|
||||||
|
|
||||||
export { smartfile, smartpath, smartpromise, smartrequest, smartunique, smartstream, smartrx };
|
export { smartfile, smartpath, smartpromise, smartrequest, smartunique, smartstream, smartrx };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user