1.4.0 • Published 3 years ago

@skypager/features-file-manager v1.4.0

Weekly downloads
606
License
MIT
Repository
-
Last release
3 years ago

Skypager File Manager Feature

The File Manager provides an interface for browsing / searching / manipulating the file contents inside of a project.

Under the hood it uses git ls-files to find all of the files in the project.

File Manager API Docs

Package Manager

In addition to the file manager, a package manager feature is used to work with all of the package.json manifests that may be found inside a project.

This is especially useful for monorepos and yarn workspaces.

Package Manager API Docs

Module Manager

In addition to the file manager and package manager, the module manager feature is used to work with all of the package.json that can be found in the project's node_modules hierarchy.

Module Manager API Docs

Servers

This feature provides two servers which are implementations of the Skypager Server Helper

  • File Manager API - provides a REST API for browsing the project's files.
  • Package Manager API - provides a REST API for browsing the project's package.json manifests

Feature API

import runtime from '@skypager/node'

async function main() {
  // start the file manager
  await runtime.fileManager.startAsync()
  // list all the file ids
  console.log(runtime.fileManager.fileIds)
  // list all the directory ids
  console.log(runtime.fileManager.directoryIds)
  // find a file
  const file = runtime.fileManager.file('package.json')
  console.log(file)

  // find all files matching a route pattern
  const components = runtime.fileManager.matchRoute('src/components/:componentName*.js')

  // calculate the md5 hash of all package.json files
  await runtime.fileManager.hashFiles({
    include: [/package.json$/]
  })

  const hash = runtime.file('package.json').hash
  console.log('hash', hash)
}

main()
1.4.0

3 years ago

1.3.0

5 years ago

1.1.4

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

1.0.1-alpha.1

5 years ago

1.0.1-alpha.0

5 years ago

0.4.10

5 years ago

0.4.7

5 years ago

0.4.6

5 years ago

0.4.5

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.1.29

5 years ago

0.1.26

5 years ago

0.1.25

5 years ago

0.1.23

5 years ago

0.1.21

5 years ago

0.1.20

5 years ago

0.1.18

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.2

6 years ago

0.1.0

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.12

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago